@atom-learning/components 2.24.0 → 2.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +207 -0
- package/dist/components/accordion/AccordionContent.js +1 -1
- package/dist/components/accordion/AccordionItem.js +1 -1
- package/dist/components/alert-dialog/AlertDialogContent.js +1 -1
- package/dist/components/avatar/Avatar.js +1 -1
- package/dist/components/button/Button.js +1 -1
- package/dist/components/calendar/Calendar.js +1 -1
- package/dist/components/carousel/CarouselArrows.js +1 -1
- package/dist/components/carousel/CarouselSlide.js +1 -1
- package/dist/components/checkbox-field/CheckboxField.js +1 -1
- package/dist/components/chip/Chip.js +1 -1
- package/dist/components/chip/ChipGroup.js +1 -1
- package/dist/components/chip-dismissible-group/ChipDismissibleGroupRoot.js +1 -1
- package/dist/components/data-table/DataTable.d.ts +24 -2
- package/dist/components/data-table/DataTable.js +1 -1
- package/dist/components/data-table/DataTable.types.d.ts +28 -0
- package/dist/components/data-table/DataTable.types.js +1 -0
- package/dist/components/data-table/DataTableBody.js +1 -1
- package/dist/components/data-table/DataTableContext.d.ts +13 -11
- package/dist/components/data-table/DataTableContext.js +1 -1
- package/dist/components/data-table/DataTableDataCell.js +1 -1
- package/dist/components/data-table/DataTableError.d.ts +7 -0
- package/dist/components/data-table/DataTableError.js +1 -0
- package/dist/components/data-table/DataTableGlobalFilter.js +1 -1
- package/dist/components/data-table/DataTableLoading.d.ts +273 -0
- package/dist/components/data-table/DataTableLoading.js +1 -0
- package/dist/components/data-table/DataTableRow.js +1 -1
- package/dist/components/data-table/DataTableTable.js +1 -1
- package/dist/components/data-table/getNewAsyncData.d.ts +3 -0
- package/dist/components/data-table/getNewAsyncData.js +1 -0
- package/dist/components/data-table/pagination/Pagination.d.ts +1 -3
- package/dist/components/data-table/pagination/Pagination.js +1 -1
- package/dist/components/data-table/pagination/PaginationButtons.d.ts +1 -0
- package/dist/components/data-table/pagination/PaginationButtons.js +1 -1
- package/dist/components/dialog/DialogContent.js +1 -1
- package/dist/components/dismissible/DismissibleRoot.js +1 -1
- package/dist/components/dismissible/DismissibleTrigger.js +1 -1
- package/dist/components/dropdown-menu/DropdownMenuLinkItem.js +1 -1
- package/dist/components/field-wrapper/FieldDescription.js +1 -1
- package/dist/components/field-wrapper/InlineFieldWrapper.js +1 -1
- package/dist/components/file-input/FileInput.js +1 -1
- package/dist/components/grid/Grid.js +1 -1
- package/dist/components/heading/Heading.js +1 -1
- package/dist/components/icon/Icon.js +1 -1
- package/dist/components/index.d.ts +11 -11
- package/dist/components/inline-message/InlineMessage.js +1 -1
- package/dist/components/label/Label.js +1 -1
- package/dist/components/link/Link.js +1 -1
- package/dist/components/loader/Loader.js +1 -1
- package/dist/components/markdown-content/components/MarkdownEmphasis.d.ts +266 -0
- package/dist/components/markdown-content/components/MarkdownEmphasis.js +1 -1
- package/dist/components/markdown-content/components/MarkdownHeading.d.ts +0 -2
- package/dist/components/markdown-content/components/MarkdownHeading.js +1 -1
- package/dist/components/markdown-content/components/MarkdownImage.js +1 -1
- package/dist/components/markdown-content/components/MarkdownInlineCode.js +1 -1
- package/dist/components/markdown-content/components/MarkdownLink.js +1 -1
- package/dist/components/markdown-content/components/MarkdownListItem.js +1 -1
- package/dist/components/markdown-content/components/MarkdownParagraph.d.ts +0 -2
- package/dist/components/markdown-content/components/MarkdownParagraph.js +1 -1
- package/dist/components/markdown-content/components/MarkdownStrong.js +1 -1
- package/dist/components/markdown-content/components/MarkdownThematicBreak.js +1 -1
- package/dist/components/markdown-content/components/index.d.ts +1 -1
- package/dist/components/navigation/NavigationMenuDropdownContent.d.ts +2 -7
- package/dist/components/navigation/NavigationMenuDropdownContent.js +1 -1
- package/dist/components/navigation/NavigationMenuDropdownTrigger.js +1 -1
- package/dist/components/navigation/NavigationMenuLink.js +1 -1
- package/dist/components/notification-badge/NotificationBadge.js +1 -1
- package/dist/components/number-input/NumberInput.js +1 -1
- package/dist/components/number-input-field/NumberInputField.js +1 -1
- package/dist/components/popover/PopoverContent.js +1 -1
- package/dist/components/radio-button/RadioButton.js +1 -1
- package/dist/components/radio-button-field/RadioButtonField.js +1 -1
- package/dist/components/radio-button-field/RadioField.js +1 -1
- package/dist/components/radio-card/RadioCardGroup.js +1 -1
- package/dist/components/search-input/SearchInput.js +1 -1
- package/dist/components/select-field/SelectField.js +1 -1
- package/dist/components/sidedrawer/SidedrawerAccordion/SidedrawerAccordionContent.js +1 -1
- package/dist/components/sidedrawer/SidedrawerContent.js +1 -1
- package/dist/components/slider-field/SliderField.js +1 -1
- package/dist/components/stack-content/StackContent.js +1 -1
- package/dist/components/stepper/StepperStepBack.js +1 -1
- package/dist/components/table/TableHeader.js +1 -1
- package/dist/components/tabs/Tabs.js +1 -1
- package/dist/components/tabs/utils.js +1 -1
- package/dist/components/text/Text.js +1 -1
- package/dist/components/toast/Toast.js +1 -1
- package/dist/components/toast/ToastProvider.js +1 -1
- package/dist/components/toggle-group/ToggleGroupButton.js +1 -1
- package/dist/components/tooltip/TooltipContent.js +1 -1
- package/dist/components/video/Video.js +1 -1
- package/dist/docgen.json +1 -1
- package/dist/docs/DataTable.mdx +86 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.js +1 -1
- package/dist/utilities/hooks/useCallbackRef.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
# [2.25.0](https://github.com/Atom-Learning/components/compare/v2.24.0...v2.25.0) (2022-12-15)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* support markdown emphasis wrapping link without line break ([c656c97](https://github.com/Atom-Learning/components/commit/c656c970917e0959530ba741b27861166ba0c163))
|
|
7
|
+
|
|
8
|
+
# [1.4.0](https://github.com/Atom-Learning/components/compare/v1.3.0...v1.4.0) (2022-04-11)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **stepper:** adding ability to override default forward behaviour ([#318](https://github.com/Atom-Learning/components/issues/318)) ([c9cc080](https://github.com/Atom-Learning/components/commit/c9cc080ce9c77afda0ba9df48eb74276ce2c4505))
|
|
14
|
+
|
|
15
|
+
# [1.3.0](https://github.com/Atom-Learning/components/compare/v1.2.1...v1.3.0) (2022-04-07)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* add compound variant for outline secondary buttons ([09bb100](https://github.com/Atom-Learning/components/commit/09bb10071d10f421eec37bc505860120396e2232))
|
|
21
|
+
* add typings to package.json to explicitly refer index.d.ts ([033c9b6](https://github.com/Atom-Learning/components/commit/033c9b6330d1b75a862a0a0c4d525a53e3707571))
|
|
22
|
+
* added type=search back and used css to hide browser icon ([13cf732](https://github.com/Atom-Learning/components/commit/13cf7320eda155eed7b6b340602cfeee02021745))
|
|
23
|
+
* adding custom plurals ([ad13522](https://github.com/Atom-Learning/components/commit/ad1352277fac5b6b6e4f4b41c7a7b0092c62d4ae))
|
|
24
|
+
* adding label translation, input size, and fixing popover tweaks ([08c47e6](https://github.com/Atom-Learning/components/commit/08c47e6b18537e73150d9010311d8d59d31fdc09))
|
|
25
|
+
* adding test for min max values ([5026b4d](https://github.com/Atom-Learning/components/commit/5026b4d95f9ac7a7c9fdc7baf06f153d8c00a8f5))
|
|
26
|
+
* adding test for slidersteps ([7254b0f](https://github.com/Atom-Learning/components/commit/7254b0f85d9cb81e2ebeab5946ab91caa46804fb))
|
|
27
|
+
* allow external change handler on date input ([d265761](https://github.com/Atom-Learning/components/commit/d26576148c94740899f87cfd6708dc5a982f8fb4))
|
|
28
|
+
* attempting to fix merge issue ([531590e](https://github.com/Atom-Learning/components/commit/531590e2ae068be69303f63e83e612e974cb8a90))
|
|
29
|
+
* avoid initial render, screenWidth can be left undefined ([35766bf](https://github.com/Atom-Learning/components/commit/35766bfeb28a66bee20e735aaf27b34862815495))
|
|
30
|
+
* change accordion type ([8caeed7](https://github.com/Atom-Learning/components/commit/8caeed70b8425090e15ae0451bbc4b8b7601d72c))
|
|
31
|
+
* changing composition so value is a separate component ([7cefeed](https://github.com/Atom-Learning/components/commit/7cefeed2d6097152ea484c329d3bce02c45cfc6d))
|
|
32
|
+
* changing prop name to appearance ([429cab2](https://github.com/Atom-Learning/components/commit/429cab230f959de10fbbd8af51bebb5942b9193e))
|
|
33
|
+
* changing unintuitive variant name ([d6993b0](https://github.com/Atom-Learning/components/commit/d6993b08346dffb6a2033a25f1c05bcbd84bd1c4))
|
|
34
|
+
* css as per designs ([9f3a964](https://github.com/Atom-Learning/components/commit/9f3a96483c6acc2482ba7114d45ea11b2cffa529))
|
|
35
|
+
* css typing ([324e323](https://github.com/Atom-Learning/components/commit/324e323a0e5aae0bddc76170f7833abf26832809))
|
|
36
|
+
* dateinput type error ([ee5e109](https://github.com/Atom-Learning/components/commit/ee5e1094dfc46ec449fc5c1d207c62614dd2e1ea))
|
|
37
|
+
* disabled state should not have any interaction whatsoever ([7e458ee](https://github.com/Atom-Learning/components/commit/7e458ee5311be59b552f99eb21aeaa0888168544))
|
|
38
|
+
* documentation ([82e8ac4](https://github.com/Atom-Learning/components/commit/82e8ac45bca1d97d34bcb9ac3d36158af5c7edc0))
|
|
39
|
+
* drop mount check inside useEffect hook ([8771774](https://github.com/Atom-Learning/components/commit/8771774de3a479d102e804eeec933685f22f1e64))
|
|
40
|
+
* ensure dayjs plugin is treated as external dep ([a2525ea](https://github.com/Atom-Learning/components/commit/a2525eaf3d64dbcfd22351ae31d98b3d2d42fef5))
|
|
41
|
+
* extend type to allow passing CSS ([261cda6](https://github.com/Atom-Learning/components/commit/261cda629c8435a8615e8b01d51fb55dd0a46d4b))
|
|
42
|
+
* fixing tests, changing div to box ([1f57a3a](https://github.com/Atom-Learning/components/commit/1f57a3a874b7049b4accb3d498dfde1563aad4cd))
|
|
43
|
+
* focus issue with next/prev buttons ([67d3de3](https://github.com/Atom-Learning/components/commit/67d3de3f5c65ed11f12588757a849bbe4601fa7d))
|
|
44
|
+
* forcing boolean to clean up logic ([eeaec16](https://github.com/Atom-Learning/components/commit/eeaec164e7ff5ad35a0f61e38dcfeadff4922a3a))
|
|
45
|
+
* introduce enum for icon ([2ce7486](https://github.com/Atom-Learning/components/commit/2ce7486b6410406e1cb67ecc3c5d7f72c4fe1949))
|
|
46
|
+
* making position more responsive, updating tests ([01d2e77](https://github.com/Atom-Learning/components/commit/01d2e77a42f78fbe8b6e8ab7d7c3702327e163c9))
|
|
47
|
+
* minor test and docs fixes ([a128057](https://github.com/Atom-Learning/components/commit/a1280573e8334c27ae58d5d63169840f1473b755))
|
|
48
|
+
* minor tweak to tests ([cfb37a0](https://github.com/Atom-Learning/components/commit/cfb37a073dbb9015e98212525385d50eda1b245f))
|
|
49
|
+
* minor update to docs ([c7a1673](https://github.com/Atom-Learning/components/commit/c7a1673f1e655177fcbe93838f84949e645e80dd))
|
|
50
|
+
* minor update to docs ([35dbedd](https://github.com/Atom-Learning/components/commit/35dbedd6a0d26001025cf28007e8c9ace8396e73))
|
|
51
|
+
* more responsive styling, mdx changes ([e18585a](https://github.com/Atom-Learning/components/commit/e18585accc31e5c62637ad4e9f922a43b10b1e9c))
|
|
52
|
+
* positioning of icon ([5f630f0](https://github.com/Atom-Learning/components/commit/5f630f0b351c21a705dcb6f042332ab130f138f3))
|
|
53
|
+
* prop name and docs example ([2e6a91e](https://github.com/Atom-Learning/components/commit/2e6a91e882402204507d24391d688f9e608f136b))
|
|
54
|
+
* proper types for validationMode ([7f6cb30](https://github.com/Atom-Learning/components/commit/7f6cb300a769a7c43670f937517528519bb4ff13))
|
|
55
|
+
* reducing height of track ([43f1f33](https://github.com/Atom-Learning/components/commit/43f1f335b8c1bb9ae06050b7ff913771b1fc5ce8))
|
|
56
|
+
* remove unnecessary box wrapper ([cd6203f](https://github.com/Atom-Learning/components/commit/cd6203fab71597d243b25b13be987e0508b462a8))
|
|
57
|
+
* remove unnecessary calendar docs, update datefield docs ([2a3ecb0](https://github.com/Atom-Learning/components/commit/2a3ecb0204b29e13f1542f65e11893eaeffad65a))
|
|
58
|
+
* remove unused babel file ([8df5e19](https://github.com/Atom-Learning/components/commit/8df5e195eb78c5462e5610cf9d8c3cf1f53c4172))
|
|
59
|
+
* remove unused code ([8019865](https://github.com/Atom-Learning/components/commit/8019865df92a86fee4f23480ec09d4dba4c18986))
|
|
60
|
+
* remove unwanted padding from container ([2d3fd00](https://github.com/Atom-Learning/components/commit/2d3fd00ccdbdc293d923b96d4a348d508b22c874))
|
|
61
|
+
* removing unneeded default value ([4db40c6](https://github.com/Atom-Learning/components/commit/4db40c656bf73b2a459dd69fcee5c0de8d705baf))
|
|
62
|
+
* rename Icon component ([ce20992](https://github.com/Atom-Learning/components/commit/ce20992e40e29a6940ef57749184871be539b0b5))
|
|
63
|
+
* rename prop and move callback into useEffect hook ([14cd086](https://github.com/Atom-Learning/components/commit/14cd086a536a937087a1088beefedd36170865fd))
|
|
64
|
+
* rename test description ([3137897](https://github.com/Atom-Learning/components/commit/313789734a3d06ac0d1e2d5e7ec159335106224b))
|
|
65
|
+
* render buttons with display: none to include them in snapshot ([9844223](https://github.com/Atom-Learning/components/commit/9844223fc29a4505620111f8427ba4c3073fe7b0))
|
|
66
|
+
* replace babel-jest ([8c1c0d4](https://github.com/Atom-Learning/components/commit/8c1c0d4dcfffe162b0effe415ef96998fb421484))
|
|
67
|
+
* replace iconwrapper for accordion ([52d93ad](https://github.com/Atom-Learning/components/commit/52d93ade51e91e9c71e21ab5d078e5ad0668705e))
|
|
68
|
+
* revalidate on date select ([a688ed8](https://github.com/Atom-Learning/components/commit/a688ed81950e751e53c686c84331226a03aa397b))
|
|
69
|
+
* revert jest to last version to stop node engine errors ([6351b74](https://github.com/Atom-Learning/components/commit/6351b74f7a29363511ed61816b29b09821000ba4))
|
|
70
|
+
* review feedback ([9237067](https://github.com/Atom-Learning/components/commit/9237067445a947e3aacde6645a03961de2708703))
|
|
71
|
+
* review feedback ([d74a333](https://github.com/Atom-Learning/components/commit/d74a3337de79f373eca066050c0f98116bd9e7e1))
|
|
72
|
+
* rotation applied to all icons and not just the arrow ([595a246](https://github.com/Atom-Learning/components/commit/595a246216ffc2bfb84c6c29806d17dcfeb8e817))
|
|
73
|
+
* search input onChange ([f13bd23](https://github.com/Atom-Learning/components/commit/f13bd23c8fd12eb32b7c41a62122206891dc9d6f))
|
|
74
|
+
* separating slidersteps component ([5d1b0af](https://github.com/Atom-Learning/components/commit/5d1b0afac6268218fd75893365fa0e8ff28095f2))
|
|
75
|
+
* separator colours and skipping behaviour ([8e85863](https://github.com/Atom-Learning/components/commit/8e85863fa36f31503cdfc67f74427ff128a77e03))
|
|
76
|
+
* slider min max bug ([2a5405f](https://github.com/Atom-Learning/components/commit/2a5405fd7ce0ef7fa13219eb4775b4fa8fc00938))
|
|
77
|
+
* snapshot test ([b364cf6](https://github.com/Atom-Learning/components/commit/b364cf66c865a875ae978393c533a1e662bec1b8))
|
|
78
|
+
* stepper being able to navigate outside bullet range when no OnComplete handler is passed ([c620481](https://github.com/Atom-Learning/components/commit/c620481fa5d41583779590c63e183f9c0532aba9))
|
|
79
|
+
* stepper types ([f7e1c20](https://github.com/Atom-Learning/components/commit/f7e1c208dbb911ccaade2bebb6cdbf49fe82f39b))
|
|
80
|
+
* stop render on empty value ([005c14c](https://github.com/Atom-Learning/components/commit/005c14c9fc819f7106ef6768ac1a1ac110af662a))
|
|
81
|
+
* tabs jump on font weight change ([219b01b](https://github.com/Atom-Learning/components/commit/219b01bbf86cc81881893b5efd925aea27c1ba93))
|
|
82
|
+
* throttle was being called in a wrong way ([bce0d0d](https://github.com/Atom-Learning/components/commit/bce0d0db6d2fc5569bec0e1eec96399fdf573d64))
|
|
83
|
+
* TS issues ([fad5121](https://github.com/Atom-Learning/components/commit/fad5121e853f6fa56368c8ec479b260e955c886b))
|
|
84
|
+
* tweaking null return logic ([528afda](https://github.com/Atom-Learning/components/commit/528afda648c8c6275414c7856ff145facd4884c2))
|
|
85
|
+
* typo on slider mdx ([45c2218](https://github.com/Atom-Learning/components/commit/45c2218bb9e21f41aea864b6ca387794bfcf06b8))
|
|
86
|
+
* unifying disabled theme styles ([14538e4](https://github.com/Atom-Learning/components/commit/14538e43f66fb1cf4d1665898c985318aaaada28))
|
|
87
|
+
* update snaps ([af59ab1](https://github.com/Atom-Learning/components/commit/af59ab1e77377fac7c71f7e785f44a81b3e24650))
|
|
88
|
+
* update theme package ([1059b45](https://github.com/Atom-Learning/components/commit/1059b45256c79fc84bc6f8659b1d32f832b93114))
|
|
89
|
+
* updating key to not be index ([26de60e](https://github.com/Atom-Learning/components/commit/26de60e4995a8cd5488a63cec03555ceb9d8d01c))
|
|
90
|
+
* updating mdx ([ce15564](https://github.com/Atom-Learning/components/commit/ce155646da9fb5dd4230b9135eaad9cd6d1824e8))
|
|
91
|
+
* updating mdx ([60604ee](https://github.com/Atom-Learning/components/commit/60604ee02f959767fdc06d15b8aceb16078918bb))
|
|
92
|
+
* updating mdx ([c433934](https://github.com/Atom-Learning/components/commit/c433934f3bc0e3377b2067d61c4a3d0b208b4bdd))
|
|
93
|
+
* updating mdx files ([f55277b](https://github.com/Atom-Learning/components/commit/f55277b47476a5614a632b09b39118d0fa3c85c0))
|
|
94
|
+
* updating readme ([959ec26](https://github.com/Atom-Learning/components/commit/959ec2629e01bbeb6781e9bcf236fb544153be86))
|
|
95
|
+
* updating readme ([4032986](https://github.com/Atom-Learning/components/commit/40329868600b456eff3e7456028e1f747817462b))
|
|
96
|
+
* updating style changes to be opt in and better typed ([3b94b09](https://github.com/Atom-Learning/components/commit/3b94b09d7ce7ac359b58149eb2cc86f49a47c740))
|
|
97
|
+
* use stitches to style the icon ([5fb3fb2](https://github.com/Atom-Learning/components/commit/5fb3fb2e5a066cc1967ca0093158a363de161ac0))
|
|
98
|
+
* yarn.lock ([a81c04a](https://github.com/Atom-Learning/components/commit/a81c04a9f8b67fc222d971c808bc9babfb708b34))
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
### Features
|
|
102
|
+
|
|
103
|
+
* add date field, finalise date input changes ([58edcfc](https://github.com/Atom-Learning/components/commit/58edcfc365ca7a5f902cdffb6f9de9c9f5c2009d))
|
|
104
|
+
* add tab scrollers which allows easy navigation if tabs length is more than available space ([cec5b04](https://github.com/Atom-Learning/components/commit/cec5b04235f2c24915050dfd71975608ddee7c86))
|
|
105
|
+
* add test:ci option to improve logs on ci ([3452dbb](https://github.com/Atom-Learning/components/commit/3452dbbf141d659a2044148712dd243729fb8916))
|
|
106
|
+
* added translation, firstDayOfWeek, test, and documentation ([ca785b4](https://github.com/Atom-Learning/components/commit/ca785b4509ee581f5ba7d916c041f8291235ad24))
|
|
107
|
+
* adding neutral outline variant ([53a793a](https://github.com/Atom-Learning/components/commit/53a793a02836a74a8e2dac481cedec2e1707fef2))
|
|
108
|
+
* adding new table variants ([8a1fcc8](https://github.com/Atom-Learning/components/commit/8a1fcc8d68f48c78fc3dfc5a9a2e9a758c9eaaf6))
|
|
109
|
+
* adding optional uppercase to tabs ([708c6f2](https://github.com/Atom-Learning/components/commit/708c6f2d5ca33988b69f2aa868fdb8543aa56d6b))
|
|
110
|
+
* additional icon variant ([7e471bc](https://github.com/Atom-Learning/components/commit/7e471bc558543f84a732bc3180bd79dde76b58aa))
|
|
111
|
+
* button neutral theme ([8bbcf1a](https://github.com/Atom-Learning/components/commit/8bbcf1a4301cb07579de485fb6789576f7fa82c1))
|
|
112
|
+
* changed new variants colors for different states ([d29b374](https://github.com/Atom-Learning/components/commit/d29b374319bf133d2525681036e9ca3cda326a86))
|
|
113
|
+
* grid max item size ([573c17e](https://github.com/Atom-Learning/components/commit/573c17e0aec90b68e636de8238f3a98922113593))
|
|
114
|
+
* initial work on calendar component ([ebc8948](https://github.com/Atom-Learning/components/commit/ebc8948b66573efcc782e29b78537d89968d43d8))
|
|
115
|
+
* initial work on date input ([4fc6827](https://github.com/Atom-Learning/components/commit/4fc682733639ce69a60e2d869cdeaaeb88f3a4c3))
|
|
116
|
+
* initial work on slider ([f5a6ea1](https://github.com/Atom-Learning/components/commit/f5a6ea11349b903ed1b05ab27dc2da0004a2a595))
|
|
117
|
+
* make it possible to show / hide close button in modal ([1c44907](https://github.com/Atom-Learning/components/commit/1c44907ad94a5ccf5c07d2b329d292ccb05a9368))
|
|
118
|
+
* no light bg for tabs ([b57cdff](https://github.com/Atom-Learning/components/commit/b57cdff08f0c5594d909bcaf2f23414b2087a06a))
|
|
119
|
+
* notification badge component ([3f93049](https://github.com/Atom-Learning/components/commit/3f930490be322df4f58e3f643d197e1d7db6d142))
|
|
120
|
+
* option to hide the chevron icon in trigger ([6cc28bf](https://github.com/Atom-Learning/components/commit/6cc28bff3dd5a25f734e860cdcbddc17e4725432))
|
|
121
|
+
* pass ref onto the ReactPlayer component so that we have access to the ReactPlayer instance ([fb2b09c](https://github.com/Atom-Learning/components/commit/fb2b09ca81e62581dcf3b5e55a8ec5722c3621dc))
|
|
122
|
+
* progress-indicator ([b2ebe20](https://github.com/Atom-Learning/components/commit/b2ebe208e0af05245c3738403bb0b6c05250f2d6))
|
|
123
|
+
* remove :before and :after for nested Text components ([55e7a9b](https://github.com/Atom-Learning/components/commit/55e7a9be37fac435a85b21c21df505be26b26e89))
|
|
124
|
+
* replace babel & terser with esbuild ([bb11c3c](https://github.com/Atom-Learning/components/commit/bb11c3cbb6d226750eaae75372e49d9afaa05606))
|
|
125
|
+
* **SearchInput:** added clear functionality ([8c0fc32](https://github.com/Atom-Learning/components/commit/8c0fc3240cfaeb50df231da383a448eabd509d75))
|
|
126
|
+
* show / hide scroller buttons based on scroll position ([a6c7e49](https://github.com/Atom-Learning/components/commit/a6c7e49b0851415fc90e4c8d401b6926bacdd719))
|
|
127
|
+
* simplifying output label to callback ([fcf0eb2](https://github.com/Atom-Learning/components/commit/fcf0eb2c0d88dfbc6c8b17c8831ba022de537539))
|
|
128
|
+
* slider step functionality ([ec0d308](https://github.com/Atom-Learning/components/commit/ec0d308c6f106aed3ba6f130bb163990c923adf9))
|
|
129
|
+
* slider value label ([9645dc9](https://github.com/Atom-Learning/components/commit/9645dc9abb3c7dc2fd96212b6c4b395cdc206b89))
|
|
130
|
+
* slider.steps component, composition change ([5be643f](https://github.com/Atom-Learning/components/commit/5be643f7caa9db1dcc91bb3c6537dc87458512ed))
|
|
131
|
+
* sliderfield component added ([3536925](https://github.com/Atom-Learning/components/commit/35369251f41ddd74bfe491ea5022bd60ab7a2c42))
|
|
132
|
+
* support multiple values, updating mdx ([a01bfab](https://github.com/Atom-Learning/components/commit/a01bfab5635b6a0710cb997bc4794fd69299f025))
|
|
133
|
+
* tab scroll percentage ([06240fb](https://github.com/Atom-Learning/components/commit/06240fb093d760121ab18ed053f826e37d42cb94))
|
|
134
|
+
* update slider api ([d752c75](https://github.com/Atom-Learning/components/commit/d752c751395313cd6fa499c26f5ed342d6b4bbe3))
|
|
135
|
+
* update to preset-small-lib to improve performance ([431da9c](https://github.com/Atom-Learning/components/commit/431da9ced8916e0ebc90dc064d200adcb1c25384))
|
|
136
|
+
* WIP update packages and improve keyboard accessibility ([e0f5f9d](https://github.com/Atom-Learning/components/commit/e0f5f9dfa989e74c3ada486b16785ebb7f0d7c8e))
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
### Reverts
|
|
140
|
+
|
|
141
|
+
* remove showChevron option ([e9b928c](https://github.com/Atom-Learning/components/commit/e9b928c53e23431563719624cb77b244a79e73b9))
|
|
142
|
+
|
|
143
|
+
# [1.4.0](https://github.com/Atom-Learning/components/compare/v1.3.1...v1.4.0) (2021-12-03)
|
|
144
|
+
|
|
145
|
+
# [1.3.1](https://github.com/Atom-Learning/components/compare/v1.3.0...v1.3.1) (2021-11-25)
|
|
146
|
+
|
|
147
|
+
# [1.3.0](https://github.com/Atom-Learning/components/compare/v1.2.3...v1.3.0) (2021-11-23)
|
|
148
|
+
|
|
149
|
+
# [1.2.3](https://github.com/Atom-Learning/components/compare/v1.2.2...v1.2.3) (2021-11-16)
|
|
150
|
+
|
|
151
|
+
# [1.2.2](https://github.com/Atom-Learning/components/compare/v1.2.1...v1.2.2) (2021-11-12)
|
|
152
|
+
|
|
153
|
+
# [1.2.1](https://github.com/Atom-Learning/components/compare/v1.2.0...v1.2.1) (2021-11-11)
|
|
154
|
+
|
|
155
|
+
# [1.2.0](https://github.com/Atom-Learning/components/compare/v1.1.1...v1.2.0) (2021-11-10)
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
### Bug Fixes
|
|
159
|
+
|
|
160
|
+
* adding TODO on type ([e928651](https://github.com/Atom-Learning/components/commit/e928651928291f8a9b639c8fa6c348b1bafe6513))
|
|
161
|
+
* few changes from PR ([e0f75a1](https://github.com/Atom-Learning/components/commit/e0f75a1788af1e23ec6efdfdd24f2788d73d33b0))
|
|
162
|
+
* fixing small error on documentation ([3be573a](https://github.com/Atom-Learning/components/commit/3be573a7584cbe8470a0db0186302e3e39e8734b))
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
### Features
|
|
166
|
+
|
|
167
|
+
* adding accordion component ([60eac3c](https://github.com/Atom-Learning/components/commit/60eac3c47e3ce48371af624ff1ec0b6477b86823))
|
|
168
|
+
|
|
169
|
+
## [1.1.1](https://github.com/Atom-Learning/components/compare/v1.1.0...v1.1.1) (2021-11-10)
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
### Bug Fixes
|
|
173
|
+
|
|
174
|
+
* update snapshot ([e71c8a4](https://github.com/Atom-Learning/components/commit/e71c8a4f03227a29eeefca9d2afd7b6355a3ed46))
|
|
175
|
+
|
|
176
|
+
# [1.1.0](https://github.com/Atom-Learning/components/compare/v1.0.2...v1.1.0) (2021-11-05)
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
### Features
|
|
180
|
+
|
|
181
|
+
* update dropdown item styles ([6bf229f](https://github.com/Atom-Learning/components/commit/6bf229fbfa9cffaaa74fda5d3629636a926a3404))
|
|
182
|
+
|
|
183
|
+
## [1.0.2](https://github.com/Atom-Learning/components/compare/v1.0.1...v1.0.2) (2021-11-02)
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
### Bug Fixes
|
|
187
|
+
|
|
188
|
+
* reinstate as type on heading and text ([1ec5ca7](https://github.com/Atom-Learning/components/commit/1ec5ca7d7ae09664bbd662cc21fee7784cf1bb3c))
|
|
189
|
+
* remove redundant flex styles for block Label ([54715ff](https://github.com/Atom-Learning/components/commit/54715ffc938231b4569a3ce4813c2e25d5404988))
|
|
190
|
+
* remove unnecessary overridden as & size types ([985231a](https://github.com/Atom-Learning/components/commit/985231a9259005a6b44cdfe20ba786f942dba81c))
|
|
191
|
+
|
|
192
|
+
## [1.0.1](https://github.com/Atom-Learning/components/compare/v1.0.0...v1.0.1) (2021-11-02)
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
### Bug Fixes
|
|
196
|
+
|
|
197
|
+
* remove cursor pointer from disabled tab ([34c283f](https://github.com/Atom-Learning/components/commit/34c283f70ce73d0ca2b2886e495bcece5475097c))
|
|
198
|
+
|
|
199
|
+
# 1.0.0 (2021-10-22)
|
|
200
|
+
|
|
201
|
+
- Initial release 🎉
|
|
202
|
+
|
|
203
|
+
# Changelog
|
|
204
|
+
|
|
205
|
+
All notable changes to this project will be documented in this file.
|
|
206
|
+
|
|
207
|
+
_NOTE: THIS FILE IS AUTOMATICALLY UPDATED_
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Content as i}from"@radix-ui/react-accordion";import t from"react";import{keyframes as
|
|
1
|
+
import{Content as i}from"@radix-ui/react-accordion";import t from"react";import{keyframes as e,styled as n}from"../../stitches.js";import{CSSWrapper as c}from"../../utilities/css-wrapper/CSSWrapper.js";const d=e({from:{height:0},to:{height:"var(--radix-accordion-content-height)"}}),m=e({from:{height:"var(--radix-accordion-content-height)"},to:{height:0}}),s=n(i,{border:0,width:"100%",bg:"#fff",'&[data-state="open"]':{borderRadius:"0 0 $0 $0"},"@allowMotion":{'&[data-state="open"]':{animation:`${d} 300ms ease-out`},'&[data-state="closed"]':{animation:`${m} 300ms ease-out`}}}),h=({children:o,css:a,...r})=>t.createElement(s,{...r},t.createElement(c,{css:a},o));export{h as AccordionContent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Item as r}from"@radix-ui/react-accordion";import m from"react";import{styled as d}from"../../stitches.js";const l=d(r,{width:"100%",overflow:"hidden","&:not(:last-child)":{mb:"$1"}}),i=({children:
|
|
1
|
+
import{Item as r}from"@radix-ui/react-accordion";import m from"react";import{styled as d}from"../../stitches.js";const l=d(r,{width:"100%",overflow:"hidden","&:not(:last-child)":{mb:"$1"}}),i=({children:t,value:e,...o})=>m.createElement(l,{value:e,...o},t);export{i as AccordionItem};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Overlay as m,Content as d,Portal as l}from"@radix-ui/react-alert-dialog";import*as t from"react";import{DIALOG_Z_INDEX as e}from"../../constants/zIndices.js";import{keyframes as a,styled as n}from"../../stitches.js";import{fadeIn as f,fadeOut as p}from"../../utilities/style/keyframe-animations.js";const o="translate3d(-50%, -50%, 0)",i="translate3d(-50%, 50vh, 0)",c=a({"0%":{transform:i},"100%":{transform:o}}),x=a({"0%":{transform:o},"100%":{transform:i}}),b=n(m,{backgroundColor:"$alpha600",inset:0,position:"fixed",zIndex:e,"@allowMotion":{'&[data-state="open"]':{animation:`${f} 250ms ease-out`},'&[data-state="closed"]':{animation:`${p} 550ms ease-out`}}}),u=n(d,{bg:"white",borderRadius:"$1",boxShadow:"$3",boxSizing:"border-box",left:"50%",maxWidth:"90vw",p:"$5",position:"fixed",top:"50%",transform:o,"&:focus":{outline:"none"},zIndex:e,"@allowMotion":{'&[data-state="open"]':{animation:`${c} 550ms cubic-bezier(0.22, 1, 0.36, 1)`},'&[data-state="closed"]':{animation:`${x} 550ms cubic-bezier(0.22, 1, 0.36, 1)`}},variants:{size:{sm:{width:"380px"},md:{width:"480px"},lg:{width:"600px"}}}})
|
|
1
|
+
import{Overlay as m,Content as d,Portal as l}from"@radix-ui/react-alert-dialog";import*as t from"react";import{DIALOG_Z_INDEX as e}from"../../constants/zIndices.js";import{keyframes as a,styled as n}from"../../stitches.js";import{fadeIn as f,fadeOut as p}from"../../utilities/style/keyframe-animations.js";const o="translate3d(-50%, -50%, 0)",i="translate3d(-50%, 50vh, 0)",c=a({"0%":{transform:i},"100%":{transform:o}}),x=a({"0%":{transform:o},"100%":{transform:i}}),b=n(m,{backgroundColor:"$alpha600",inset:0,position:"fixed",zIndex:e,"@allowMotion":{'&[data-state="open"]':{animation:`${f} 250ms ease-out`},'&[data-state="closed"]':{animation:`${p} 550ms ease-out`}}}),u=n(d,{bg:"white",borderRadius:"$1",boxShadow:"$3",boxSizing:"border-box",left:"50%",maxWidth:"90vw",p:"$5",position:"fixed",top:"50%",transform:o,"&:focus":{outline:"none"},zIndex:e,"@allowMotion":{'&[data-state="open"]':{animation:`${c} 550ms cubic-bezier(0.22, 1, 0.36, 1)`},'&[data-state="closed"]':{animation:`${x} 550ms cubic-bezier(0.22, 1, 0.36, 1)`}},variants:{size:{sm:{width:"380px"},md:{width:"480px"},lg:{width:"600px"}}}}),h=({size:r="sm",...s})=>t.createElement(l,null,t.createElement(b,null),t.createElement(u,{size:r,...s}));export{h as AlertDialogContent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as o from"react";import{styled as n}from"../../stitches.js";import{AvatarPlaceholder as v}from"./AvatarPlaceholder.js";import{AvatarIcon as u}from"./AvatarIcon.js";import{AvatarInitial as b}from"./AvatarInitial.js";import{AvatarImage as p}from"./AvatarImage.js";import{focusVisibleStyleBlock as z}from"../../utilities/style/focus-visible-style-block.js";const s={display:"flex",justifyContent:"center",alignItems:"center",color:"$tonal400",borderRadius:"$round",border:"2px solid $tonal100",backgroundColor:"$white",overflow:"hidden",variants:{size:{xs:{size:"$2"},sm:{size:"$3"},md:{size:"$4"},lg:{size:"$5"},xl:{size:"$6"},xxl:{size:"$7"}}}}
|
|
1
|
+
import*as o from"react";import{styled as n}from"../../stitches.js";import{AvatarPlaceholder as v}from"./AvatarPlaceholder.js";import{AvatarIcon as u}from"./AvatarIcon.js";import{AvatarInitial as b}from"./AvatarInitial.js";import{AvatarImage as p}from"./AvatarImage.js";import{focusVisibleStyleBlock as z}from"../../utilities/style/focus-visible-style-block.js";const s={display:"flex",justifyContent:"center",alignItems:"center",color:"$tonal400",borderRadius:"$round",border:"2px solid $tonal100",backgroundColor:"$white",overflow:"hidden",variants:{size:{xs:{size:"$2"},sm:{size:"$3"},md:{size:"$4"},lg:{size:"$5"},xl:{size:"$6"},xxl:{size:"$7"}}}},$=n("div",s),f=n("button",{all:"unset",...s,"&:not([disabled])":{"&:hover":{borderColor:"$tonal400",backgroundColor:"$tonal50"},"&:active":{borderColor:"$primary",backgroundColor:"$tonal100"},"&:focus-visible":z()},"&[disabled]":{opacity:"30%",cursor:"not-allowed"}}),d=o.createContext({name:void 0,size:"lg"}),m=({children:a,name:e,size:i})=>{const t=o.useMemo(()=>({name:e,size:i}),[e,i]);return o.createElement(d.Provider,{value:t},a)},c=({children:a,size:e="lg",name:i,disabled:t=!1,onClick:l})=>o.createElement(m,{name:i,size:e},l?o.createElement(f,{size:e,disabled:t,onClick:t?void 0:l,css:{cursor:t?"auto":"pointer"}},a):o.createElement($,{size:e},a)),r=c;r.Image=p,r.Initial=b,r.Placeholder=v,r.Icon=u,r.displayName="Avatar";export{r as Avatar,c as AvatarRoot,d as AvatarRootContext,m as AvatarRootProvider};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{darken as i,opacify as s}from"color2k";import*as o from"react";import{Box as b}from"../box/Box.js";import{Icon as w}from"../icon/Icon.js";import{Loader as k}from"../loader/Loader.js";import{styled as v,theme as l}from"../../stitches.js";const d=(e,r,a)=>({border:"1px solid",borderColor:"currentColor",color:e,"&[disabled]":{borderColor:"$tonal400",color:"$tonal400",cursor:"not-allowed"},"&:not([disabled]):hover, &:not([disabled]):focus":{textDecoration:"none",color:r},"&:not([disabled]):active":{color:a}}),n=(e,r,a,t="white")=>({bg:e,color:t,"&[disabled]":{bg:"$tonal100",color:"$tonal400",cursor:"not-allowed"},"&:not([disabled]):hover, &:not([disabled]):focus":{bg:r,color:t},"&:not([disabled]):active":{bg:a}}),p=v("button",{alignItems:"center",bg:"unset",border:"unset",borderRadius:"$0",cursor:"pointer",display:"flex",fontFamily:"$body",fontWeight:600,justifyContent:"center",p:"unset",textDecoration:"none",transition:"all 100ms ease-out",whiteSpace:"nowrap",width:"max-content",variants:{theme:{primary:{},secondary:{},success:{},warning:{},danger:{},neutral:{}},appearance:{solid:{},outline:{}},size:{sm:{fontSize:"$sm",lineHeight:1.53,height:"$3",px:"$4"},md:{fontSize:"$md",lineHeight:1.5,height:"$4",px:"$5"},lg:{fontSize:"$lg",lineHeight:1.5,height:"$5",px:"$5"}},isLoading:{true:{cursor:"not-allowed",opacity:.6,pointerEvents:"none"}},fullWidth:{false:{width:"max-content"},true:{width:"100%"}},isRounded:{true:{borderRadius:"$round"}}},compoundVariants:[{theme:"primary",appearance:"solid",css:n("$primary","$primaryMid","$primaryDark")},{theme:"secondary",appearance:"solid",css:n("$primaryDark",i(l.colors.primaryDark.value,.1),i(l.colors.primaryDark.value,.15))},{theme:"success",appearance:"solid",css:n("$success","$successMid","$successDark")},{theme:"warning",appearance:"solid",css:n("$warning","$warningMid","$warningDark","$tonal500")},{theme:"danger",appearance:"solid",css:n("$danger","$dangerMid","$dangerDark")},{theme:"neutral",appearance:"solid",css:n("white",s("white",-.1),s("white",-.25),"$primary")},{theme:"primary",appearance:"outline",css:d("$primary","$primaryMid","$primaryDark")},{theme:"neutral",appearance:"outline",css:d("white",s("white",-.2),s("white",-.35))},{theme:"secondary",appearance:"outline",css:d("$primaryDark",i(l.colors.primaryDark.value,.1),i(l.colors.primaryDark.value,.15))}]}),D=({isLoading:e,children:r})=>o.createElement(o.Fragment,null,o.createElement(k,{css:{opacity:e?1:0,position:"absolute",transition:"opacity 150ms"}}),o.createElement(b,{as:"span",css:e?{opacity:0,transition:"opacity 150ms"}:{}},r)),x=e=>{switch(e){case"lg":return 22;case"md":return 20;case"sm":default:return 16}},m=(e,r)=>o.Children.map(e,(a,t)=>(a==null?void 0:a.type)===w?o.cloneElement(a,{css:{[t===0?"mr":"ml"]:r==="sm"?"$2":"$3",size:x(r),...a.props.css?a.props.css:{}}}):a),u=o.forwardRef(({children:e,isLoading:r,onClick:a,href:t,appearance:h="solid",size:c="md",theme:y="primary",type
|
|
1
|
+
import{darken as i,opacify as s}from"color2k";import*as o from"react";import{Box as b}from"../box/Box.js";import{Icon as w}from"../icon/Icon.js";import{Loader as k}from"../loader/Loader.js";import{styled as v,theme as l}from"../../stitches.js";const d=(e,r,a)=>({border:"1px solid",borderColor:"currentColor",color:e,"&[disabled]":{borderColor:"$tonal400",color:"$tonal400",cursor:"not-allowed"},"&:not([disabled]):hover, &:not([disabled]):focus":{textDecoration:"none",color:r},"&:not([disabled]):active":{color:a}}),n=(e,r,a,t="white")=>({bg:e,color:t,"&[disabled]":{bg:"$tonal100",color:"$tonal400",cursor:"not-allowed"},"&:not([disabled]):hover, &:not([disabled]):focus":{bg:r,color:t},"&:not([disabled]):active":{bg:a}}),p=v("button",{alignItems:"center",bg:"unset",border:"unset",borderRadius:"$0",cursor:"pointer",display:"flex",fontFamily:"$body",fontWeight:600,justifyContent:"center",p:"unset",textDecoration:"none",transition:"all 100ms ease-out",whiteSpace:"nowrap",width:"max-content",variants:{theme:{primary:{},secondary:{},success:{},warning:{},danger:{},neutral:{}},appearance:{solid:{},outline:{}},size:{sm:{fontSize:"$sm",lineHeight:1.53,height:"$3",px:"$4"},md:{fontSize:"$md",lineHeight:1.5,height:"$4",px:"$5"},lg:{fontSize:"$lg",lineHeight:1.5,height:"$5",px:"$5"}},isLoading:{true:{cursor:"not-allowed",opacity:.6,pointerEvents:"none"}},fullWidth:{false:{width:"max-content"},true:{width:"100%"}},isRounded:{true:{borderRadius:"$round"}}},compoundVariants:[{theme:"primary",appearance:"solid",css:n("$primary","$primaryMid","$primaryDark")},{theme:"secondary",appearance:"solid",css:n("$primaryDark",i(l.colors.primaryDark.value,.1),i(l.colors.primaryDark.value,.15))},{theme:"success",appearance:"solid",css:n("$success","$successMid","$successDark")},{theme:"warning",appearance:"solid",css:n("$warning","$warningMid","$warningDark","$tonal500")},{theme:"danger",appearance:"solid",css:n("$danger","$dangerMid","$dangerDark")},{theme:"neutral",appearance:"solid",css:n("white",s("white",-.1),s("white",-.25),"$primary")},{theme:"primary",appearance:"outline",css:d("$primary","$primaryMid","$primaryDark")},{theme:"neutral",appearance:"outline",css:d("white",s("white",-.2),s("white",-.35))},{theme:"secondary",appearance:"outline",css:d("$primaryDark",i(l.colors.primaryDark.value,.1),i(l.colors.primaryDark.value,.15))}]}),D=({isLoading:e,children:r})=>o.createElement(o.Fragment,null,o.createElement(k,{css:{opacity:e?1:0,position:"absolute",transition:"opacity 150ms"}}),o.createElement(b,{as:"span",css:e?{opacity:0,transition:"opacity 150ms"}:{}},r)),x=e=>{switch(e){case"lg":return 22;case"md":return 20;case"sm":default:return 16}},m=(e,r)=>o.Children.map(e,(a,t)=>(a==null?void 0:a.type)===w?o.cloneElement(a,{css:{[t===0?"mr":"ml"]:r==="sm"?"$2":"$3",size:x(r),...a.props.css?a.props.css:{}}}):a),u=o.forwardRef(({children:e,isLoading:r,onClick:a,href:t,appearance:h="solid",size:c="md",theme:y="primary",type:$="button",...g},f)=>o.createElement(p,{isLoading:r||!1,onClick:r?void 0:a,appearance:h,size:c,theme:y,...g,...t?{as:"a",href:t,onClick:void 0}:{},...t?{}:{type:$},ref:f},typeof r=="boolean"?o.createElement(D,{isLoading:r},m(e,c)):m(e,c)));u.displayName="Button";export{u as Button,p as StyledButton};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ChevronLeft as q,ChevronRight as H}from"@atom-learning/icons";import{useDayzed as J}from"dayzed";import*as e from"react";import{ActionIcon as x}from"../action-icon/ActionIcon.js";import{Box as
|
|
1
|
+
import{ChevronLeft as q,ChevronRight as H}from"@atom-learning/icons";import{useDayzed as J}from"dayzed";import*as e from"react";import{ActionIcon as x}from"../action-icon/ActionIcon.js";import{Box as g}from"../box/Box.js";import{Flex as C}from"../flex/Flex.js";import{Icon as Y}from"../icon/Icon.js";import{Text as K}from"../text/Text.js";import{Button as w}from"../button/Button.js";import{styled as F}from"../../stitches.js";import{monthNamesShort as Q,weekdayNamesShort as V,DEFAULT_LABELS as X}from"./constants.js";import{Day as Z}from"./Day.js";const f=F("div",{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gridGap:"$1 $2"}),ee=F(w,{color:"$tonal600",p:"$3",width:"$6",variants:{selected:{false:{color:"$tonal600 !important",fontWeight:"400","&:hover":{bg:"$tonal100 !important",color:"$tonal600 !important"},"&[disabled]":{bg:"white !important"}}}}}),te=(i,c)=>{const u=i.slice(0,c);return i.slice(c).concat(u)},S=({css:i,refDateSelected:c,refDateToday:u,firstDayOfWeek:$=0,monthNames:N=Q,weekdayNames:T=V,labels:y=X,date:o=new Date,minDate:l,maxDate:s,setYear:A,...L})=>{const[a,E]=e.useState(!1),[m,k]=e.useState(o==null?void 0:o.getFullYear()),O=t=>{const r=o;r.setFullYear(t),A(r),E(!1)},W=l&&m-16<=l.getFullYear(),z=s&&m>=s.getFullYear(),B=Array.from({length:16},(t,r)=>{const n=m-r;return s&&n>s.getFullYear()||l&&n<l.getFullYear()?0:n}),{calendars:d,getBackProps:I,getForwardProps:M,getDateProps:G}=J({firstDayOfWeek:$,showOutsideDays:!0,date:o,minDate:l,maxDate:s,...L});return d.length?e.createElement(g,{css:{position:"relative",width:"min-content",mt:"-$1",...i}},e.createElement(C,{css:{position:"absolute",top:0,right:"-$1"}},e.createElement(x,{label:y[a?"previousYear":"previous"],theme:"neutral",size:"md",...!a&&I({calendars:d}),...a&&{onClick:()=>k(m-16)},disabled:a&&W},e.createElement(Y,{is:q})),e.createElement(x,{label:y[a?"nextYear":"next"],theme:"neutral",size:"md",...!a&&M({calendars:d}),...a&&{onClick:()=>k(m+16)},disabled:a&&z},e.createElement(Y,{is:H}))),a&&e.createElement(f,{css:{gridTemplateColumns:"repeat(4, 1fr)",pt:"$7",direction:"rtl",gridGap:"$3 $1"}},B.map((t,r)=>{const n=t===o.getFullYear();return t?e.createElement(ee,{key:`${t}${r}`,theme:n?"primary":"neutral",isRounded:!0,onClick:()=>O(t),selected:n},t):e.createElement(g,{key:r,css:{width:"$6",height:"$4"}})})),!a&&d.map(({month:t,year:r,weeks:n})=>e.createElement(g,{key:`${t}${r}`},e.createElement(C,{css:{height:"$4",alignItems:"center",mb:"$4"}},e.createElement(w,{theme:"neutral",css:{px:"0",color:"$tonal600"},onClick:()=>E(!0)},N[t]," ",r)),e.createElement(f,{css:{mb:"$3"}},te(T,$).map(p=>e.createElement(K,{as:"span",size:"sm",key:`${t}${r}${p}`,css:{fontWeight:600,textAlign:"center"}},p))),e.createElement(f,null,n.map((p,P)=>p.map((h,R)=>{const D=`${t}${r}${P}${R}`;if(!h)return e.createElement("div",{key:D});const{date:j,selected:b,today:v,prevMonth:U,nextMonth:_}=h;return e.createElement(Z,{isOutsideMonth:U||_,isSelected:b,isToday:v,key:D,ref:b?c:v?u:null,...G({dateObj:h}),type:"button"},j.getDate())})))))):null};S.displayName="Calendar";export{S as Calendar};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ChevronLeft as s,ChevronRight as i}from"@atom-learning/icons";import{ButtonBack as a,ButtonNext as l}from"pure-react-carousel";import*as r from"react";import{Icon as
|
|
1
|
+
import{ChevronLeft as s,ChevronRight as i}from"@atom-learning/icons";import{ButtonBack as a,ButtonNext as l}from"pure-react-carousel";import*as r from"react";import{Icon as t}from"../icon/Icon.js";import{styled as o}from"../../stitches.js";const n={alignItems:"center",bg:"unset",border:"unset",color:"$primary",cursor:"pointer",display:"flex",justifyContent:"center",p:"unset",size:"$5",top:"50%",transform:"translateY(-50%)",transition:"color 0.15s ease-in-out","&:hover":{color:"$primaryMid"},"&:active":{color:"$primaryDark"},"&:disabled":{color:"$tonal100"}},m=o(a,n),c=o(l,n),p=e=>r.createElement(m,{...e},r.createElement(t,{is:s})),u=e=>r.createElement(c,{...e},r.createElement(t,{is:i}));export{u as CarouselArrowNext,p as CarouselArrowPrevious};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Slide as
|
|
1
|
+
import{Slide as r}from"pure-react-carousel";import*as e from"react";import{Box as m}from"../box/Box.js";import{styled as i}from"../../stitches.js";const l=i(r,{}),s=({children:t,...o})=>e.createElement(l,{...o,tag:"div"},e.createElement(m,{css:{px:"$3"}},t));export{s as CarouselSlide};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as t from"react";import{useFormContext as p,Controller as C}from"react-hook-form";import{Checkbox as h}from"../checkbox/Checkbox.js";import"../field-wrapper/FieldWrapper.js";import{InlineFieldWrapper as F}from"../field-wrapper/InlineFieldWrapper.js";import"../form/Form.js";import{useFieldError as k}from"../form/useFieldError.js";var b=(e=>(e.ON="on",e.OFF="off",e))(b||{});const i=({css:e,defaultChecked:r=!1,label:m,name:n,validation:o,description:d,...c})=>{const{control:f}=p(),{error:a}=k(n);return t.createElement(C,{control:f,name:n,defaultValue:r,rules:o,render:({onChange:u,value:l,name:s})=>t.createElement(F,{css:e,description:d,error:a,label:m,required:Boolean(o==null?void 0:o.required)},t.createElement(h,{defaultChecked:r,defaultValue:r?"on":"off",checked:l,name:s,onCheckedChange:u,value:l?"on":"off",...a&&{state:"error"},...c}))})};i.displayName="CheckboxField";export{i as CheckboxField};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{Box as C}from"../box/Box.js";import{Flex as
|
|
1
|
+
import*as e from"react";import{Box as C}from"../box/Box.js";import{Flex as $}from"../flex/Flex.js";import{Icon as c}from"../icon/Icon.js";import{getTextVariant as a}from"../text/Text.js";import{styled as m}from"../../stitches.js";import{overrideStitchesVariantValue as g}from"../../utilities/override-stitches-variant-value/overrideStitchesVariantValue.js";const d={overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},h=m("span",{display:"inline-flex",alignItems:"center",px:"$1",flexGrow:1,...d,"& > *:not(:last-child)":{mr:"$1"}}),z={sm:"sm",md:"sm",lg:"md"},f=m(c,{flexShrink:0}),l=({...r})=>{const i=e.useContext(p),{size:t}=i,n=e.useMemo(()=>g(t,o=>z[o]),[t]);return e.createElement(f,{...r,size:n})},u=({children:r,...i})=>{const t=e.Children.toArray(r),n=t.length<=1;return e.createElement(h,{...i},t.map(o=>!n&&typeof o=="string"?e.createElement(C,{as:"span",css:d,key:o},o):e.isValidElement(o)&&o.type===c?e.createElement(l,{...o.props}):o))},x=m($,{px:"$2",border:"1px solid",borderRadius:"$0",alignItems:"center",fontFamily:"$body",maxWidth:"100%",borderColor:"$primary",color:"$primaryMid",bg:"$primaryLight","&[data-disabled]":{opacity:"0.3",pointerEvents:"none"},variants:{size:{sm:{height:"$2",...a({size:"sm"})},md:{height:"$3",...a({size:"sm"})},lg:{height:"$4",...a({size:"md"})}}}}),p=e.createContext({}),y=({size:r,children:i})=>{const t=e.useMemo(()=>({size:r}),[r]);return e.createElement(p.Provider,{value:t},i)},E=e.forwardRef(({asWorkaround:r,size:i="md",...t},n)=>e.createElement(y,{size:i},e.createElement(x,{ref:n,as:r,size:i,...t}))),s=E;s.Content=u,s.Icon=l,s.displayName="Chip";export{s as Chip,l as ChipIcon,p as ChipRootContext,y as ChipRootProvider,h as StyledChipContent,f as StyledChipIcon,x as StyledRoot};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as r from"react";import{Stack as a}from"../stack/Stack.js";const p=r.forwardRef(({gap:o=2,...
|
|
1
|
+
import*as r from"react";import{Stack as a}from"../stack/Stack.js";const p=r.forwardRef(({gap:o=2,...t},e)=>r.createElement(a,{ref:e,direction:"row",gap:o,align:!1,...t}));export{p as ChipGroup};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as o from"react";import"../chip/Chip.js";import{ChipGroup as m}from"../chip/ChipGroup.js";import{DismissibleGroup as p}from"../dismissible-group/index.js";const
|
|
1
|
+
import*as o from"react";import"../chip/Chip.js";import{ChipGroup as m}from"../chip/ChipGroup.js";import{DismissibleGroup as p}from"../dismissible-group/index.js";const t=o.forwardRef((r,i)=>o.createElement(m,{as:p,ref:i,...r}));export{t as ChipDismissibleGroupRoot};
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { DataTableBody } from './DataTableBody';
|
|
3
|
-
import { DataTableDataCell } from './DataTableDataCell';
|
|
4
3
|
import { DataTableProvider } from './DataTableContext';
|
|
4
|
+
import { DataTableDataCell } from './DataTableDataCell';
|
|
5
|
+
import { DataTableError } from './DataTableError';
|
|
6
|
+
import { DataTableGlobalFilter } from './DataTableGlobalFilter';
|
|
5
7
|
import { DataTableHead } from './DataTableHead';
|
|
6
8
|
import { DataTableHeaderCell } from './DataTableHeaderCell';
|
|
9
|
+
import { DataTableLoading } from './DataTableLoading';
|
|
7
10
|
import { DataTableRow } from './DataTableRow';
|
|
8
|
-
import { DataTableGlobalFilter } from './DataTableGlobalFilter';
|
|
9
11
|
import { DataTableTable } from './DataTableTable';
|
|
10
12
|
import { Pagination } from './pagination';
|
|
11
13
|
declare type TDataTable = React.FC<React.ComponentProps<typeof DataTableProvider>> & {
|
|
@@ -61,6 +63,26 @@ declare type TDataTable = React.FC<React.ComponentProps<typeof DataTableProvider
|
|
|
61
63
|
*
|
|
62
64
|
*/
|
|
63
65
|
Table: typeof DataTableTable;
|
|
66
|
+
/** Default loading implementation for remote data
|
|
67
|
+
*
|
|
68
|
+
* Renders a loading component while fetching the paginated data using `getAsyncData`.
|
|
69
|
+
*
|
|
70
|
+
* If you need more customisation, you can compose your own implentation, `asyncDataState`
|
|
71
|
+
* can be retrieved from `useDataTable`
|
|
72
|
+
*/
|
|
73
|
+
Loading: typeof DataTableLoading;
|
|
74
|
+
/** Default error implementation for remote data
|
|
75
|
+
*
|
|
76
|
+
* Renders an error component when `getAsyncData` promise rejects.
|
|
77
|
+
* Children are rendered as a function, it exposes a `runAsyncData` function to the children component.
|
|
78
|
+
* `runAsyncData()` can be used to retry fetching the paginated data with the current pageIndex, pageSize
|
|
79
|
+
* and sorting parameters or your own custom paginated options.
|
|
80
|
+
*
|
|
81
|
+
* If you need more customisation, you can compose your own implentation, `asyncDataState` and `runAsyncData()`
|
|
82
|
+
* can be retrieved from `useDataTable`
|
|
83
|
+
*
|
|
84
|
+
*/
|
|
85
|
+
Error: typeof DataTableError;
|
|
64
86
|
};
|
|
65
87
|
/** Context provider for DataTable state and logic.
|
|
66
88
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as r from"react";import{DataTableBody as t}from"./DataTableBody.js";import{DataTableProvider as e}from"./DataTableContext.js";import{DataTableDataCell as l}from"./DataTableDataCell.js";import{DataTableError as m}from"./DataTableError.js";import{DataTableGlobalFilter as i}from"./DataTableGlobalFilter.js";import{DataTableHead as b}from"./DataTableHead.js";import{DataTableHeaderCell as p}from"./DataTableHeaderCell.js";import{DataTableLoading as D}from"./DataTableLoading.js";import{DataTableRow as T}from"./DataTableRow.js";import{DataTableTable as f}from"./DataTableTable.js";import{Pagination as d}from"./pagination/Pagination.js";const a=o=>r.createElement(e,{...o});a.Body=t,a.DataCell=l,a.Head=b,a.HeaderCell=p,a.Pagination=d,a.Row=T,a.GlobalFilter=i,a.Table=f,a.Loading=D,a.Error=m;export{a as DataTable};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { Table, SortDirection } from '@tanstack/react-table';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export declare enum AsyncDataState {
|
|
4
|
+
NONE = "none",
|
|
5
|
+
PENDING = "pending",
|
|
6
|
+
FULFILLED = "fulfilled",
|
|
7
|
+
REJECTED = "rejected"
|
|
8
|
+
}
|
|
9
|
+
export declare type TAsyncDataResult = {
|
|
10
|
+
total: number;
|
|
11
|
+
results: Array<Record<string, unknown>>;
|
|
12
|
+
};
|
|
13
|
+
export declare type TAsyncDataOptions = {
|
|
14
|
+
pageIndex: number;
|
|
15
|
+
pageSize: number;
|
|
16
|
+
sortBy?: string;
|
|
17
|
+
sortDirection?: SortDirection;
|
|
18
|
+
globalFilter?: string;
|
|
19
|
+
};
|
|
20
|
+
export declare type TGetAsyncData = (options: TAsyncDataOptions) => Promise<TAsyncDataResult | undefined>;
|
|
21
|
+
export declare type DataTableContextType<T = unknown> = Table<T> & {
|
|
22
|
+
setIsSortable: React.Dispatch<React.SetStateAction<boolean>>;
|
|
23
|
+
applyPagination: () => void;
|
|
24
|
+
getTotalRows: () => number;
|
|
25
|
+
isSortable: boolean;
|
|
26
|
+
asyncDataState?: AsyncDataState;
|
|
27
|
+
runAsyncData?: (options: Partial<TAsyncDataOptions>) => Promise<void>;
|
|
28
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var E=(e=>(e.NONE="none",e.PENDING="pending",e.FULFILLED="fulfilled",e.REJECTED="rejected",e))(E||{});export{E as AsyncDataState};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as t from"react";import{Table as m}from"../table/Table.js";import{useDataTable as p}from"./DataTableContext.js";import{DataTable as i}from"./DataTable.js";const l=({striped:r=!1,...o})=>{const{getRowModel:a}=p();return t.createElement(m.Body,{...o,striped:r},a().rows.map(e=>t.createElement(i.Row,{row:e,key:e.id})))};export{l as DataTableBody};
|
|
@@ -1,22 +1,24 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import type { VisibilityTableState, ColumnOrderTableState, ColumnPinningTableState, FiltersTableState, SortingTableState, ExpandedTableState, GroupingTableState, ColumnSizingTableState, PaginationTableState, RowSelectionTableState,
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
applyPagination: () => void;
|
|
6
|
-
getTotalRows: () => number;
|
|
7
|
-
isSortable: boolean;
|
|
8
|
-
};
|
|
2
|
+
import type { VisibilityTableState, ColumnOrderTableState, ColumnPinningTableState, FiltersTableState, SortingTableState, ExpandedTableState, GroupingTableState, ColumnSizingTableState, PaginationTableState, RowSelectionTableState, SortDirection } from '@tanstack/react-table';
|
|
3
|
+
import { CSS } from '../../stitches';
|
|
4
|
+
import { DataTableContextType, TGetAsyncData } from './DataTable.types';
|
|
9
5
|
declare type InitialState = Partial<VisibilityTableState & ColumnOrderTableState & ColumnPinningTableState & FiltersTableState & SortingTableState & ExpandedTableState & GroupingTableState & ColumnSizingTableState & PaginationTableState & RowSelectionTableState>;
|
|
10
6
|
declare type TableProviderProps = {
|
|
11
7
|
columns: any;
|
|
12
|
-
data: Array<Record<string, unknown>>;
|
|
13
8
|
defaultSort?: {
|
|
14
9
|
column: string;
|
|
15
|
-
direction:
|
|
10
|
+
direction: SortDirection;
|
|
16
11
|
};
|
|
17
12
|
children: React.ReactNode;
|
|
18
13
|
initialState?: InitialState;
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
css?: CSS;
|
|
15
|
+
} & ({
|
|
16
|
+
data: Array<Record<string, unknown>>;
|
|
17
|
+
getAsyncData?: never;
|
|
18
|
+
} | {
|
|
19
|
+
data?: never;
|
|
20
|
+
getAsyncData: TGetAsyncData;
|
|
21
|
+
});
|
|
22
|
+
export declare const DataTableProvider: ({ columns, data: dataProp, getAsyncData, defaultSort, initialState, children, css }: TableProviderProps) => JSX.Element;
|
|
21
23
|
export declare const useDataTable: <T extends Record<string, unknown>>() => DataTableContextType<T>;
|
|
22
24
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{useReactTable as
|
|
1
|
+
import*as e from"react";import{useReactTable as x,getCoreRowModel as I,getPaginationRowModel as A,getSortedRowModel as G,getFilteredRowModel as L}from"@tanstack/react-table";import{AsyncDataState as l}from"./DataTable.types.js";import{getNewAsyncData as z}from"./getNewAsyncData.js";const k={pageIndex:0,pageSize:10},C=e.createContext(null),O=({columns:n,data:i,getAsyncData:a,defaultSort:u,initialState:o=void 0,children:R,css:U})=>{var m;const[b,f]=e.useState({results:i!=null?i:[],total:(m=i==null?void 0:i.length)!=null?m:0}),[r,E]=e.useState(!!(o!=null&&o.pagination)),[v,d]=e.useState(l.NONE),[g,M]=e.useState(""),[t,y]=e.useState(a?{...k,...o==null?void 0:o.pagination}:o==null?void 0:o.pagination),[c,P]=e.useState(!1),[s,h]=e.useState(u?[{id:u.column,desc:u.direction==="desc"}]:[]),w=e.useCallback(()=>{E(!0)},[]),S=e.useCallback(async T=>{if(a)try{d(l.PENDING);const N=await z(a,T,t,s,g);f(N),d(l.FULFILLED)}catch{d(l.REJECTED)}},[a,t==null?void 0:t.pageIndex,t==null?void 0:t.pageSize,s,g]);e.useEffect(()=>{S({})},[S]);const p=()=>b.total,D=x({columns:n,data:b.results,pageCount:t?Math.ceil(p()/t.pageSize):-1,initialState:o,state:{sorting:s,globalFilter:g,pagination:t},manualPagination:a&&r,manualSorting:a&&r,enableSorting:v!==l.PENDING,enableGlobalFilter:!a,getCoreRowModel:I(),getPaginationRowModel:r?A():void 0,getSortedRowModel:c||s.length?G():void 0,getFilteredRowModel:L(),onPaginationChange:r?y:void 0,onSortingChange:h,onGlobalFilterChange:M}),F=e.useMemo(()=>({...D,setIsSortable:P,applyPagination:w,getTotalRows:p,isSortable:c,asyncDataState:v,runAsyncData:S}),[D,w,p,c]);return e.createElement(C.Provider,{value:F},R)},J=()=>{const n=e.useContext(C);if(!n)throw new Error("useDataTable can only be called from inside a DataTableProvider");return n};export{O as DataTableProvider,J as useDataTable};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as l from"react";import{Table as
|
|
1
|
+
import*as l from"react";import{Table as t}from"../table/Table.js";import{flexRender as o}from"@tanstack/react-table";const m=({cell:e})=>l.createElement(t.Cell,{key:e.id},o(e.column.columnDef.cell,e.getContext()));export{m as DataTableDataCell};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { DataTableContextType } from './DataTable.types';
|
|
3
|
+
interface IDataTableErrorProps {
|
|
4
|
+
children: (retry?: DataTableContextType['runAsyncData']) => React.ReactElement;
|
|
5
|
+
}
|
|
6
|
+
export declare const DataTableError: React.FC<IDataTableErrorProps>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{AsyncDataState as n}from"./DataTable.types.js";import{useDataTable as e}from"./DataTableContext.js";const o=({children:t})=>{const{asyncDataState:a,runAsyncData:r}=e();return a!==n.REJECTED?null:t(r)};export{o as DataTableError};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{debounce as p}from"throttle-debounce";import{SearchInput as
|
|
1
|
+
import*as e from"react";import{debounce as p}from"throttle-debounce";import{SearchInput as u}from"../search-input/SearchInput.js";import{useDataTable as g}from"./DataTableContext.js";import{Label as d}from"../label/Label.js";import{OptionallyVisuallyHiddenContainer as f}from"../../utilities/optionally-visually-hidden-container/OptionallyVisuallyHiddenContainer.js";const h=({onChange:a,label:t,hideLabel:r=!1,...n})=>{const{setGlobalFilter:o,getState:m,resetPagination:i}=g(),{globalFilter:b}=m(),s=p(250,l=>{const{target:{value:c}}=l;a==null||a(l),i(),o(c)});return e.createElement(e.Fragment,null,e.createElement(f,{hidden:r},e.createElement(d,{css:{mb:"$3"},htmlFor:t},t)),e.createElement(u,{...n,value:b,onChange:s,name:t}))};export{h as DataTableGlobalFilter};
|