Commit Graph

55 Commits

Author SHA1 Message Date
Muhammed Mustafa
cc272beb7a feat(tools): use context to set dropup in the dropdown (#50200)
* feat(tools): use context to set dropup in the dropdown

* remove the extra export

* clean extra changes export and make it into arrow function

Co-authored-by: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com>

---------

Co-authored-by: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com>
2023-05-03 11:02:15 +02:00
Muhammed Mustafa
c93d61f1e5 feat(client, tools): make ui component respect theme (#50202)
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2023-04-28 12:44:12 +03:00
Moshe
21e5470220 feat(ui-tools): add dropDown component (#47043)
* Create a drop down menu

Co-authored-by: ahmad abdolsaheb <ahmad.abdolsaheb@gmail.com>
Co-authored-by: moshe vilner <shootermv@gmail.com>

hopefully sort the tests

hopefully sort the test this time

this time? I hope

test compound component

I give up

This reverts commit d88c6783cccf811c3c5dced0ab980adff0172669.

headless doesn't pass onclick to its buttons children

add the logical statment back

revert the removing the ability to click

sort the tests

fix a typo

* sort the tests

* rename to menu item

* let dropdown trigger accept children

* include dropdown and menu items in the exports

* polish the logic around setting the dropup style

* add tests

* fix: typo DropDown to Dropdown

* sort the styles

* sort the type and add bsStyle to dropdownToggle

* fix: types in button and menu items

* align text to center

* remove the bsstyle and block logic from dropdown

Co-authored-by: ahmad abdolsaheb <ahmad.abdolsaheb@gmail.com>

* add w-full to sort default button not taking all width

* move the styling dependecy away from dev

Co-authored-by: ahmad abdolsaheb <ahmad.abdolsaheb@gmail.com>

* stop the mutation

Co-authored-by: sembauke <semboot699@gmail.com>

* remove the extra story

---------

Co-authored-by: Sboonny <muhammedelruby@gmail.com>
Co-authored-by: Sboonny <muhammed@freecodecamp.org>
Co-authored-by: ahmad abdolsaheb <ahmad.abdolsaheb@gmail.com>
Co-authored-by: sembauke <semboot699@gmail.com>
2023-04-24 10:05:25 +02:00
Muhammed Mustafa
6b869ec375 feat(tools): add panel component (#49398)
* run panel gen code

* add the default style

* add tthe styles for the panel

* create context of bsStyle

* add panel heading

* add panel title

* add panel body

* create the story for the panel

* typo hiding the border

* border doesn't work for some reason

* only border-3 works in tailwind

* change for border-1 for better visual indication

* fix: bsStyle not applying to the panel

* add html props to the elements

* remove the info colors for our info colors

* fix heading style

* add Panel test

* use to have Class instead

* fix type

* component disregarding default attributes?

* remove duplication in the test

* use compound components

* clean the old logic for the bsStyle

* clean the exports

* add heading and bsstyle control

* fix the classes

* check for title body render

* remove extra types

---------

Co-authored-by: Ahmad Abdolsaheb <ahmad.abdolsaheb@gmail.com>
2023-04-19 16:37:13 +02:00
Muhammed Mustafa
27c75679cd fix(tools): sort small issues in formControl (#49872) 2023-04-18 20:01:36 +05:30
Muhammed Mustafa
3988d426f5 feat(tools): remove system colors variables from colors.css (#49870) 2023-04-03 14:06:18 +05:30
Muhammed Mustafa
e3b25be4d9 chore(tools): create formgroup component (#46758)
Co-authored-by: Ahmad Abdolsaheb <ahmad.abdolsaheb@gmail.com>
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2023-03-27 13:39:18 +05:30
Muhammed Mustafa
6c0f2d0998 fix(tools): FromControl disregard the default attributes (#49411)
Co-authored-by: ahmad abdolsaheb <ahmad.abdolsaheb@gmail.com>
2023-03-21 14:05:55 +05:30
Muhammed Mustafa
ea83d87869 feat(tools): export Alertprops if needed for consumption (#49236)
Co-authored-by: Ahmad Abdolsaheb <ahmad.abdolsaheb@gmail.com>
2023-03-15 16:27:07 +03:00
Rajkumar Gaur
f03c4a2ecc feat(UI): implement ToggleButton component (#48567) 2023-03-15 14:08:58 +03:00
Mrugesh Mohapatra
0393910a24 fix(client): add return type to component (#49616) 2023-03-07 17:07:55 +00:00
Muhammed Mustafa
040faba6f8 feat(ui-components): add ControlLabel component (#47219) 2023-03-07 20:58:29 +05:30
Muhammed Mustafa
d1166f0a3a refactor(tools): import close button props and stop reassigning its value (#49235)
refactor(tools): import close button  props and stop reassigning its value
2023-02-18 08:18:40 -08:00
Oliver Eyton-Williams
4ff00922da refactor: fix hidden eslint errors (#49365)
* refactor: explicit types for validate

* refactor: explicit return types for ui-components

* refactor: use exec instead of match

* refactor: add lots more boundary types

* refactor: more eslint warnings

* refactor: more explicit exports

* refactor: more explicit types

* refactor: even more explicit types

* fix: relax type contrainsts for superblock-order

* refactor: final boundaries

* refactor: avoid using 'object' type

* fix: use named import for captureException

This uses TypeScript (which works) instead of import/namespace
(which doesn't) to check if captureException exists in sentry/gatsby
(it does)
2023-02-13 07:13:50 -08:00
Muhammed Mustafa
47ffd20f74 fix(client): add type to warn misuse of attributes in formControl (#48696)
* feat: add type to warn miss usage of attributes in formControl

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>

* refactor the value type

Co-authored-by: sembauke <semboot699@gmail.com>

* add condition type for readyonly and onchange types

* warn when using readonly and onchange props together

Co-authored-by: Ahmad Abdolsaheb <ahmad.abdolsaheb@gmail.com>

* allow value to be undefined

* Make read-only undefined

Co-authored-by: Ahmad Abdolsaheb <ahmad.abdolsaheb@gmail.com>

---------

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
Co-authored-by: sembauke <semboot699@gmail.com>
Co-authored-by: Ahmad Abdolsaheb <ahmad.abdolsaheb@gmail.com>
2023-02-10 13:24:23 +00:00
Muhammed Mustafa
b35e8166c0 feat(tools): add system pallet to ui components color (#49125) 2023-01-27 10:45:21 -06:00
Jordan Moore
bfec58f744 test(UI): add tests to the table spec (#48823)
feat: add tests to table spec
2023-01-02 23:18:07 +05:30
Muhammed Mustafa
35c3a93a72 feat: add the ability to create a download button (#48697)
* feat: add the ability to create a download button

* Allow the creating of download button

* update test, and stories props
2022-12-16 08:57:39 -08:00
Ahmad Abdolsaheb
b1627abb2c fix(component-library): add color variables to css build (#48417) 2022-11-11 08:13:07 +02:00
Muhammed Mustafa
8a23a25707 feat(tools): FormContext link FormGroup with its children (#48356) 2022-11-04 14:20:45 +03:00
Jordan Moore
d5d03e078a feat(tools): Implement basic functionality of table component (#47263)
Co-authored-by: ahmad abdolsaheb <ahmad.abdolsaheb@gmail.com>
2022-11-02 14:20:10 +05:30
Ahmad Abdolsaheb
ebc69b1933 revert(tools): Flex and Spacer components - UI Components (#47964) 2022-10-10 16:34:10 +01:00
Sirasit Thitirattanakorn
17ba240313 feat(tools): Flex and Spacer components - UI Components (#47231)
* implement: flex and spacer components

* implement: Flex and Spacer components

* delete core.3149

Co-authored-by: Mrugesh Mohapatra <1884376+raisedadead@users.noreply.github.com>
2022-10-10 16:19:26 +03:00
Huyen Nguyen
92e496cbe9 feat(ui-components): create Link component (#46105)
* feat(ui-components): create Link component

* refactor(ui-components): replace color tokens
2022-05-23 16:38:13 +03:00
Huyen Nguyen
fa59d4a107 chore(ui-components): simplify color tokens (#45848)
* chore: rename color tokens

* chore: clean up hover tokens

* docs: add a note on colors usage
2022-05-09 16:28:25 +03:00
Huyen Nguyen
cf68bd0efd chore(ui-components): rename HelpBlock files to kebab-case (#45849) 2022-05-03 07:07:08 -07:00
saltedTofu
2cc13c322f fix(ui-components): disabled button behavior (#45739)
* fixed disabled button behavior

Changed disabled button to not have active styles

* Update tools/ui-components/src/button/button.tsx

Co-authored-by: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com>

* Update tools/ui-components/src/button/button.tsx

* Update tools/ui-components/src/button/button.tsx

Co-authored-by: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com>
2022-04-29 17:14:07 +03:00
Huyen Nguyen
86935fa59f feat(ui-components): add support for link to Button component (#45671)
* add active style

* add disable state

* add support for full-width

* add custom focus outline

* feat(ui-components): add support for link to Button component

* Add onClick action

* center content
2022-04-25 13:47:40 +03:00
Ahmad Abdolsaheb
3c4f671629 feat/add props form control (#45706)
* feat: add textarea variation to formControl

* feat/add-storybook-argtypes
2022-04-19 11:39:04 +03:00
Huyen Nguyen
d35c24af42 feat(ui-components): add states and full-width support to Button component (#45665)
* add active style

* add disable state

* add support for full-width

* add custom focus outline
2022-04-18 11:26:36 +03:00
Ahmad Abdolsaheb
e7577927df feat/create initial form control component (#45578)
* feat: form control initial structure

* feat: add form control feedback default styles.

* feat: add initial form control static styles

* feat: add initial form-control styles

* feat: add initial stories

* feat: readjust styles
2022-04-01 14:03:54 +03:00
Huyen Nguyen
791b8b527b feat(ui-components): add info variant and hover state to Button component (#45541)
* add info variant

* add styling for hover state

* feat: add info variant

Co-authored-by: ahmad abdolsaheb <ahmad.abdolsaheb@gmail.com>
2022-03-31 21:54:06 +03:00
Ismail Tlemcani
ed66e5d01c feat(tools): add helpblock component (#45399)
* feat: add helpblock component

* fix: clean up

* Update tools/ui-components/src/helpblock/helpblock.stories.tsx

Co-authored-by: Ismail Tlemcani <ismail.tlemcani@gmail.com>
Co-authored-by: ahmad abdolsaheb <ahmad.abdolsaheb@gmail.com>
2022-03-31 15:20:44 +03:00
Huyen Nguyen
06a1aa39b2 chore(ui-components): minor adjustments in Button component (#45480) 2022-03-23 11:23:26 +03:00
Huyen Nguyen
3fc687a583 feat(ui-components): implement basic Button component (#45421)
* Move to its own folder

* file rename

* implement basic Button component
2022-03-16 12:00:53 +03:00
Huyen Nguyen
610ba7b3e9 fix(ui-components): correct the setup of tailwind default styles (#45369) 2022-03-15 15:20:57 +03:00
Huyen Nguyen
686e9f6233 fix(ui-components): make Alert not dismissable (#45291) 2022-03-01 20:37:53 +05:30
Huyen Nguyen
0ccf3d4558 fix(tools): add missing colors to the Color storybook page (#45018)
* fix(tools): add missing colors to the Color storybook page

* remove colors
2022-02-11 16:01:40 -08:00
Huyen Nguyen
95e473d4bb Merge pull request #45015 from huyenltnguyen/chore/alert
refactor(tools): Alert component
2022-02-09 04:14:54 +03:00
Ismail Tlemcani
b0db8ec244 feat: add image component (#44590)
Co-authored-by: IsmailTlemcani <ismail.tlemcani@gmail.com>
2022-02-03 13:48:14 +03:00
Huyen Nguyen
1bd75fa04e chore(tools): update import statement (#44990) 2022-02-01 13:36:04 -08:00
Huyen Nguyen
f871bf1dbd chore(tools): convert color-system to TypeScript (#44970)
* Change file extension

* Move the files to their own folder

* Fix typecheck
2022-01-31 17:06:45 +03:00
Ahmad Abdolsaheb
8c5ac39dd2 fix: build tailwind with rollup in TS (#44713)
* fix: build tailwind with rollup in TS

* Update tools/ui-components/package.json

Co-authored-by: ahmad abdolsaheb <home@mac-16.local>
2022-01-13 16:59:03 +03:00
Maciek Sitkowski
58701d511b feat(tools): add Alert component (#43835)
* feat(alert): initialize component

* feat(alert): add children prop

* feat(alert): add className prop

* feat(alert): add variant prop

* feat(alert): add close button and handle onDismiss click

* feat(alert): place all alert related css in alert.css

* feat: define state color variables and use them instead of bootstrap ones

* chore: remove unused classes

* feat: replace base alert styles with tailwind classes

* feat: extract close button to separate component

* chore: remove unused css

* test: add close button tests

* refactor: use more tailwind-like approach for adding colors to theme

* refactor: use more expressive prop name for close button label

* refactor: use semantic color names

* feat: add stories with/without close button

* chore: add missing variants
2021-11-27 12:28:40 +03:00
Maciek Sitkowski
63f6d9d3f2 feat(storybook): add theme toggle (#44234) 2021-11-25 16:32:52 +03:00
Ahmad Abdolsaheb
f56a5617ac feat: add tailwind theme support (#43616)
* feat: add tailwind theme support

* feat: simplify config
2021-10-11 10:38:44 +03:00
Oliver Eyton-Williams
c8d7f0a782 feat(tools): remove eslint-plugin-prettier for prettier (#42438)
* feat: remove eslint-plugin-prettier for prettier

This removes the annoying lint warnings when all that needs to change is
formatting

* fix: use .js lint-staged config to ignore properly

* fix: lint everything if a lot of files are changed

It's faster than making lots of individual linter calls

* chore: apply prettier

* fix: ignore code in curriculum-file-structure
2021-10-06 21:02:21 +05:30
Hamza Waleed
ebec6705a3 feat(typescript): Add typescript support for UI components library (#43541)
* Add TS configs and improve dir structure

* Add TS configs and improve dir structure

* Fix components exports from index

* chore: prettier

* Add tsconfig and then fix the linter warnings

* Add @babel/preset-typescript

* Fix eslint rule and update btn component to fix storybook

* Fix TS and Jest configs

Converted all remaining files to TS as well

* Remove TS ignored rules and fixed some TS & jest stuff

* Revert to old directory structure

* Use absolute versions in package.json

* enable ts strict to infer types

Co-authored-by: Hamza Waleed <hamza.waleed@arbisoft.com>
2021-09-28 14:06:21 +03:00
Oliver Eyton-Williams
e118dda13a fix: order imports and remove circular dependencies (#41824)
* fix: remove circular dependency

redux depended on templates/Challenges/redux and vice versa.  This
meant that import order mattered and confusing bugs could arise.

(cherry picked from commit 7d67a4e70922bbb3051f2f9982dcc69e240d43dc)

* feat: require imports to be in alphabetical order

Import order generally does not matter, but there are edge cases
(circular  imports and css imports, for example) where changing order
changes behaviour

(cherry picked from commit b8d1393a91ec6e068caf8e8498a5c95df68c2b2c)

* chore: order imports

* fix: lift up challenge description + title comps

This brings the classic Show closer to the others as they
now all create the description and title components

* fix: remove donation-saga/index circular import

(cherry picked from commit 51a44ca668a700786d2744feffeae4fdba5fd207)

* refactor: extract action-types from settings

(cherry picked from commit 25e26124d691c84a0d0827d41dafb761c686fadd)

* fix: lint errors

* feat: prevent useless renames
2021-08-02 08:39:40 -05:00
Oliver Eyton-Williams
95dc63678c feat: bundling for UI Components (#42549)
Co-authored-by: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com>
2021-06-21 15:21:40 +07:00