@atom-learning/components 3.27.0-beta.4 → 3.27.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/AccordionTrigger.d.ts +1 -1
- package/dist/components/accordion/AccordionTrigger.js +1 -1
- package/dist/components/accordion/AccordionTrigger.js.map +1 -1
- package/dist/components/action-icon/ActionIcon.js +1 -1
- package/dist/components/action-icon/ActionIcon.js.map +1 -1
- package/dist/components/button/Button.js +1 -1
- package/dist/components/button/Button.js.map +1 -1
- package/dist/components/calendar/Day.js +1 -1
- package/dist/components/calendar/Day.js.map +1 -1
- package/dist/components/data-table/DataTable.d.ts +44 -9
- package/dist/components/data-table/DataTableTable.js +1 -1
- package/dist/components/data-table/DataTableTable.js.map +1 -1
- package/dist/components/dropdown-menu/DropdownMenuLinkItem.js +1 -1
- package/dist/components/dropdown-menu/DropdownMenuLinkItem.js.map +1 -1
- package/dist/components/empty-state/EmptyState.context.d.ts +8 -0
- package/dist/components/empty-state/EmptyState.context.js +2 -0
- package/dist/components/empty-state/EmptyState.context.js.map +1 -0
- package/dist/components/empty-state/EmptyState.d.ts +374 -738
- package/dist/components/empty-state/EmptyState.js +1 -1
- package/dist/components/empty-state/EmptyState.js.map +1 -1
- package/dist/components/empty-state/EmptyStateBody.d.ts +9 -4
- package/dist/components/empty-state/EmptyStateBody.js +1 -1
- package/dist/components/empty-state/EmptyStateBody.js.map +1 -1
- package/dist/components/empty-state/EmptyStateImage.d.ts +1 -2
- package/dist/components/empty-state/EmptyStateImage.js +1 -1
- package/dist/components/empty-state/EmptyStateImage.js.map +1 -1
- package/dist/components/empty-state/EmptyStateTitle.d.ts +7 -1
- package/dist/components/empty-state/EmptyStateTitle.js +1 -1
- package/dist/components/empty-state/EmptyStateTitle.js.map +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/input/Input.d.ts +1503 -5
- package/dist/components/input/Input.js +1 -1
- package/dist/components/input/Input.js.map +1 -1
- package/dist/components/input/index.d.ts +1 -1
- package/dist/components/link/Link.js +1 -1
- package/dist/components/link/Link.js.map +1 -1
- package/dist/components/navigation/NavigationMenuDropdown.js +1 -1
- package/dist/components/navigation/NavigationMenuDropdownTrigger.js +1 -1
- package/dist/components/navigation/NavigationMenuLink.js +1 -1
- package/dist/components/navigation/NavigationMenuLink.js.map +1 -1
- package/dist/components/navigation-menu-vertical/NavigationMenuVerticalLink.d.ts +1 -1
- package/dist/components/navigation-menu-vertical/NavigationMenuVerticalLink.js +1 -1
- package/dist/components/navigation-menu-vertical/NavigationMenuVerticalLink.js.map +1 -1
- package/dist/components/side-bar/SideBar.d.ts +360 -364
- package/dist/components/side-bar/SideBarComponents.d.ts +8 -10
- package/dist/components/side-bar/SideBarComponents.js +1 -1
- package/dist/components/side-bar/SideBarComponents.js.map +1 -1
- package/dist/components/table/Table.d.ts +6 -2
- package/dist/components/table/Table.js +1 -1
- package/dist/components/table/Table.js.map +1 -1
- package/dist/components/table/TableStickyColumnsContainer.d.ts +3 -1
- package/dist/components/table/TableStickyColumnsContainer.js +1 -1
- package/dist/components/table/TableStickyColumnsContainer.js.map +1 -1
- package/dist/components/table/useStickyColumnsCss.d.ts +6 -1
- package/dist/components/table/useStickyColumnsCss.js +1 -1
- package/dist/components/table/useStickyColumnsCss.js.map +1 -1
- package/dist/components/tile-interactive/TileInteractive.d.ts +3 -1
- package/dist/components/tile-interactive/TileInteractive.js +1 -1
- package/dist/components/tile-interactive/TileInteractive.js.map +1 -1
- package/dist/components/tile-toggle-group/TileToggleGroupItem.d.ts +2 -0
- package/dist/components/top-bar/TopBar.d.ts +360 -364
- package/dist/components/top-bar/TopBarBrand.d.ts +1 -2
- package/dist/components/top-bar/TopBarBrand.js +1 -1
- package/dist/components/top-bar/TopBarBrand.js.map +1 -1
- package/dist/docgen.json +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +1 -1
- package/dist/utilities/uri/index.d.ts +0 -1
- package/dist/utilities/uri/index.js +1 -1
- package/dist/utilities/uri/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/context/router/index.d.ts +0 -10
- package/dist/context/router/index.js +0 -2
- package/dist/context/router/index.js.map +0 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
# [3.27.0](https://github.com/Atom-Learning/components/compare/v3.26.7...v3.27.0) (2024-08-05)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* split and export InputBackground and InputText to allow for separate use ([a1449ad](https://github.com/Atom-Learning/components/commit/a1449adddf7dc1afe78bcc1f6da4a0cf665b86ae))
|
|
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_
|
|
@@ -367,7 +367,7 @@ declare const StyledTrigger: import("@stitches/react/types/styled-component").St
|
|
|
367
367
|
marginBottom: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
|
|
368
368
|
};
|
|
369
369
|
}>>;
|
|
370
|
-
export declare const AccordionTrigger: ({ children, colorScheme, ...remainingProps }: Omit<import("@radix-ui/react-accordion").AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>, "css"> & import("@stitches/react/types/styled-component").TransformProps<{}, {
|
|
370
|
+
export declare const AccordionTrigger: ({ children, colorScheme, asChild, ...remainingProps }: Omit<import("@radix-ui/react-accordion").AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>, "css"> & import("@stitches/react/types/styled-component").TransformProps<{}, {
|
|
371
371
|
sm: string;
|
|
372
372
|
md: string;
|
|
373
373
|
lg: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{ChevronDown as
|
|
1
|
+
import{ChevronDown as n}from"@atom-learning/icons";import{Trigger as s}from"@radix-ui/react-accordion";import e from"react";import{ColorScheme as c}from"../../experiments/color-scheme/ColorScheme.js";import{styled as o}from"../../stitches.js";import"../../utilities/css-wrapper/CSSWrapper.js";import"../../utilities/no-overflow-wrapper/NoOverflowWrapper.js";import"color2k";import{focusVisibleStyleBlock as d}from"../../utilities/style/focus-visible-style-block.js";import"../../utilities/style/keyframe-animations.js";import{Icon as m}from"../icon/Icon.js";const l=o(m,{transition:"transform 300ms",'[data-state="open"] > &':{transform:"rotate(180deg)"},'[data-state="closed"] > &':{transform:"rotate(0deg)"}}),p=o(s,{border:0,py:"$3",px:"$4",width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",bg:"$interactive2",color:"$interactiveForeground","&[data-disabled]":{opacity:.3,cursor:"not-allowed"},"&:not([data-disabled])":{"&:active, &:hover, &:focus-visible":{bg:"$interactive3"},"&:focus-visible":{...d()}},'&[data-state="open"]':{borderRadius:"$0 $0 0 0"},'&[data-state="closed"]':{borderRadius:"$0"}}),f=({children:t,colorScheme:a={},asChild:r,...i})=>e.createElement(c,{asChild:!0,accent:"grey1",interactive:"loContrast",...a},e.createElement(p,{asChild:r,...i},r?t:e.createElement(e.Fragment,null,t,e.createElement(l,{is:n,"data-testid":"accordion-chevron"}))));export{f as AccordionTrigger};
|
|
2
2
|
//# sourceMappingURL=AccordionTrigger.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccordionTrigger.js","sources":["../../../src/components/accordion/AccordionTrigger.tsx"],"sourcesContent":["import { ChevronDown } from '@atom-learning/icons'\nimport { Trigger } from '@radix-ui/react-accordion'\nimport React from 'react'\n\nimport { ColorScheme, TcolorScheme } from '~/experiments/color-scheme'\nimport { styled } from '~/stitches'\nimport { focusVisibleStyleBlock } from '~/utilities'\n\nimport { Icon } from '../icon'\n\nconst RotatingIcon = styled(Icon, {\n transition: 'transform 300ms',\n '[data-state=\"open\"] > &': {\n transform: 'rotate(180deg)'\n },\n '[data-state=\"closed\"] > &': {\n transform: 'rotate(0deg)'\n }\n})\n\nconst StyledTrigger = styled(Trigger, {\n border: 0,\n py: '$3',\n px: '$4',\n width: '100%',\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n cursor: 'pointer',\n bg: '$interactive2',\n color: '$interactiveForeground',\n '&[data-disabled]': {\n opacity: 0.3,\n cursor: 'not-allowed'\n },\n '&:not([data-disabled])': {\n '&:active, &:hover, &:focus-visible': {\n bg: '$interactive3'\n },\n '&:focus-visible': {\n ...focusVisibleStyleBlock()\n }\n },\n '&[data-state=\"open\"]': {\n borderRadius: '$0 $0 0 0'\n },\n '&[data-state=\"closed\"]': {\n borderRadius: '$0'\n }\n})\n\nexport const AccordionTrigger = ({\n children,\n colorScheme = {},\n ...remainingProps\n}: React.ComponentProps<typeof StyledTrigger> & {\n colorScheme?: TcolorScheme\n}) => (\n <ColorScheme asChild accent=\"grey1\" interactive=\"loContrast\" {...colorScheme}>\n <StyledTrigger {...remainingProps}>\n {children}\n
|
|
1
|
+
{"version":3,"file":"AccordionTrigger.js","sources":["../../../src/components/accordion/AccordionTrigger.tsx"],"sourcesContent":["import { ChevronDown } from '@atom-learning/icons'\nimport { Trigger } from '@radix-ui/react-accordion'\nimport React from 'react'\n\nimport { ColorScheme, TcolorScheme } from '~/experiments/color-scheme'\nimport { styled } from '~/stitches'\nimport { focusVisibleStyleBlock } from '~/utilities'\n\nimport { Icon } from '../icon'\n\nconst RotatingIcon = styled(Icon, {\n transition: 'transform 300ms',\n '[data-state=\"open\"] > &': {\n transform: 'rotate(180deg)'\n },\n '[data-state=\"closed\"] > &': {\n transform: 'rotate(0deg)'\n }\n})\n\nconst StyledTrigger = styled(Trigger, {\n border: 0,\n py: '$3',\n px: '$4',\n width: '100%',\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n cursor: 'pointer',\n bg: '$interactive2',\n color: '$interactiveForeground',\n '&[data-disabled]': {\n opacity: 0.3,\n cursor: 'not-allowed'\n },\n '&:not([data-disabled])': {\n '&:active, &:hover, &:focus-visible': {\n bg: '$interactive3'\n },\n '&:focus-visible': {\n ...focusVisibleStyleBlock()\n }\n },\n '&[data-state=\"open\"]': {\n borderRadius: '$0 $0 0 0'\n },\n '&[data-state=\"closed\"]': {\n borderRadius: '$0'\n }\n})\n\nexport const AccordionTrigger = ({\n children,\n colorScheme = {},\n asChild,\n ...remainingProps\n}: React.ComponentProps<typeof StyledTrigger> & {\n colorScheme?: TcolorScheme\n}) => (\n <ColorScheme asChild accent=\"grey1\" interactive=\"loContrast\" {...colorScheme}>\n <StyledTrigger asChild={asChild} {...remainingProps}>\n {asChild ? (\n children\n ) : (\n <>\n {children}\n <RotatingIcon is={ChevronDown} data-testid=\"accordion-chevron\" />\n </>\n )}\n </StyledTrigger>\n </ColorScheme>\n)\n"],"names":["RotatingIcon","styled","Icon","StyledTrigger","Trigger","focusVisibleStyleBlock","AccordionTrigger","children","colorScheme","asChild","remainingProps","React","ColorScheme","ChevronDown"],"mappings":"8iBAUA,MAAMA,EAAeC,EAAOC,EAAM,CAChC,WAAY,kBACZ,0BAA2B,CACzB,UAAW,gBACb,EACA,4BAA6B,CAC3B,UAAW,cACb,CACF,CAAC,EAEKC,EAAgBF,EAAOG,EAAS,CACpC,OAAQ,EACR,GAAI,KACJ,GAAI,KACJ,MAAO,OACP,QAAS,OACT,eAAgB,gBAChB,WAAY,SACZ,OAAQ,UACR,GAAI,gBACJ,MAAO,yBACP,mBAAoB,CAClB,QAAS,GACT,OAAQ,aACV,EACA,yBAA0B,CACxB,qCAAsC,CACpC,GAAI,eACN,EACA,kBAAmB,CACjB,GAAGC,EACL,CAAA,CACF,EACA,uBAAwB,CACtB,aAAc,WAChB,EACA,yBAA0B,CACxB,aAAc,IAChB,CACF,CAAC,EAEYC,EAAmB,CAAC,CAC/B,SAAAC,EACA,YAAAC,EAAc,CAAC,EACf,QAAAC,KACGC,CACL,IAGEC,EAAA,cAACC,EAAA,CAAY,QAAO,GAAC,OAAO,QAAQ,YAAY,aAAc,GAAGJ,GAC/DG,EAAA,cAACR,EAAA,CAAc,QAASM,EAAU,GAAGC,CAClCD,EAAAA,EACCF,EAEAI,EAAA,cAAAA,EAAA,SAAA,KACGJ,EACDI,EAAA,cAACX,EAAA,CAAa,GAAIa,EAAa,cAAY,mBAAoB,CAAA,CACjE,CAEJ,CACF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import u from"invariant";import*as o from"react";import{styled as w}from"../../stitches.js";import"../../utilities/css-wrapper/CSSWrapper.js";import"../../utilities/no-overflow-wrapper/NoOverflowWrapper.js";import"color2k";import"../../utilities/style/keyframe-animations.js";import{disabledStyle as k}from"../../utilities/style/disabledStyle.js";import{getExternalAnchorProps as D}from"../../utilities/uri/index.js";import{Icon as m}from"../icon/Icon.js";import{ActionIconSizeMap as z}from"./ActionIcon.constants.js";import{OptionalTooltipWrapper as M}from"../../utilities/optional-tooltip-wrapper/OptionalTooltipWrapper.js";const s=(r,a,i,e)=>({theme:r,appearance:"simple",css:{bg:"transparent",color:a,"&:not(:disabled):hover, &:not(:disabled):focus":{color:i},"&:not(:disabled):active":{color:e}}}),t=(r,a,i,e)=>({theme:r,appearance:"solid",css:{bg:a,color:"white","&:not(:disabled):hover, &:not(:disabled):focus":{bg:i,color:"white"},"&:not(:disabled):active":{bg:e}}}),p=(r,a,i,e)=>({theme:r,appearance:"outline",css:{border:"1px solid",borderColor:"currentColor",color:a,"&:not(:disabled):hover, &:not(:disabled):focus":{color:i},"&:not(:disabled):active":{color:e}}}),v=w("button",{alignItems:"center",appearance:"none",bg:"white",border:"unset",borderRadius:"$0",boxSizing:"border-box",cursor:"pointer",display:"flex",flexShrink:0,justifyContent:"center",p:"unset",transition:"all 100ms ease-out","&[disabled]":k,variants:{theme:{neutral:{},primary:{},success:{},warning:{},danger:{}},appearance:{simple:{},outline:{},solid:{}},size:{xs:{size:"$2"},sm:{size:"$3"},md:{size:"$4"},lg:{size:"$5"}},isRounded:{true:{borderRadius:"$round"}}},compoundVariants:[s("neutral","$tonal300","$primary900","$primary1000"),s("primary","$primary800","$primary900","$primary1000"),s("primaryDark","$primary1000","$primary1100","$primary1200"),s("success","$success","$successMid","$successDark"),s("warning","$warning","$warningMid","$warningDark"),s("danger","$danger","$dangerMid","$dangerDark"),t("primary","$primary800","$primary900","$primary1000"),t("primaryDark","$primary1000","$primary1100","$primary1200"),t("success","$success","$successMid","$successDark"),t("warning","$warning","$warningMid","$warningDark"),t("danger","$danger","$dangerMid","$dangerDark"),p("primary","$primary800","$primary900","$primary1000"),p("primaryDark","$primary1000","$primary1100","$primary1200"),p("success","$success","$successMid","$successDark"),p("warning","$warning","$warningMid","$warningDark"),p("danger","$danger","$dangerMid","$dangerDark")]}),d=o.forwardRef(({children:r,theme:a="primary",appearance:i="simple",size:e="sm",label:$,href:l,disabled:c,hasTooltip:g=!0,tooltipSide:b,...h},f)=>{const y=`A single ${m.displayName} component is permitted as a child of ${d.displayName}`;return u(o.Children.count(r)===1,y),o.createElement(M,{hasTooltip:g,label:$,tooltipSide:b},o.createElement(v,{...l?{as:"a",href:c?null:l,onClick:void 0,"aria-disabled":!!c}:{type:"button"},...D(l),...h,"aria-label":$,theme:a,appearance:i,size:e,ref:f,disabled:c},o.Children.map(r,n=>{if(!o.isValidElement(n))throw new Error(y);return u(n.type===m,`Children of type ${n==null?void 0:n.type} aren't permitted. Only an ${m.displayName} component is allowed in ${d.displayName}`),o.cloneElement(n,{size:z[e],css:{...n.props.css?n.props.css:{}}})})))});d.displayName="ActionIcon";export{d as ActionIcon};
|
|
2
2
|
//# sourceMappingURL=ActionIcon.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionIcon.js","sources":["../../../src/components/action-icon/ActionIcon.tsx"],"sourcesContent":["import type { VariantProps } from '@stitches/react'\nimport invariant from 'invariant'\nimport * as React from 'react'\n\nimport {
|
|
1
|
+
{"version":3,"file":"ActionIcon.js","sources":["../../../src/components/action-icon/ActionIcon.tsx"],"sourcesContent":["import type { VariantProps } from '@stitches/react'\nimport invariant from 'invariant'\nimport * as React from 'react'\n\nimport { styled } from '~/stitches'\nimport { NavigatorActions } from '~/types'\nimport { disabledStyle, Override } from '~/utilities'\nimport type { TOptionalTooltipWrapperProps } from '~/utilities/optional-tooltip-wrapper'\nimport { OptionalTooltipWrapper } from '~/utilities/optional-tooltip-wrapper'\nimport { getExternalAnchorProps } from '~/utilities/uri'\n\nimport { Icon } from '../icon/Icon'\nimport { ActionIconSizeMap } from './ActionIcon.constants'\n\nconst getSimpleVariant = (\n theme: string,\n base: string,\n interact: string,\n active: string\n) => ({\n theme,\n appearance: 'simple',\n css: {\n bg: 'transparent',\n color: base,\n '&:not(:disabled):hover, &:not(:disabled):focus': { color: interact },\n '&:not(:disabled):active': { color: active }\n }\n})\n\nconst getSolidVariant = (\n theme: string,\n base: string,\n interact: string,\n active: string\n) => ({\n theme,\n appearance: 'solid',\n css: {\n bg: base,\n color: 'white',\n '&:not(:disabled):hover, &:not(:disabled):focus': {\n bg: interact,\n color: 'white'\n },\n '&:not(:disabled):active': { bg: active }\n }\n})\n\nconst getOutlineVariant = (\n theme: string,\n base: string,\n interact: string,\n active: string\n) => ({\n theme,\n appearance: 'outline',\n css: {\n border: '1px solid',\n borderColor: 'currentColor',\n color: base,\n '&:not(:disabled):hover, &:not(:disabled):focus': { color: interact },\n '&:not(:disabled):active': { color: active }\n }\n})\n\nconst StyledButton = styled('button', {\n alignItems: 'center',\n appearance: 'none',\n bg: 'white',\n border: 'unset',\n borderRadius: '$0',\n boxSizing: 'border-box',\n cursor: 'pointer',\n display: 'flex',\n flexShrink: 0,\n justifyContent: 'center',\n p: 'unset',\n transition: 'all 100ms ease-out',\n '&[disabled]': disabledStyle,\n variants: {\n theme: {\n neutral: {},\n primary: {},\n success: {},\n warning: {},\n danger: {}\n },\n appearance: {\n simple: {},\n outline: {},\n solid: {}\n },\n size: {\n xs: { size: '$2' },\n sm: { size: '$3' },\n md: { size: '$4' },\n lg: { size: '$5' }\n },\n isRounded: {\n true: {\n borderRadius: '$round'\n }\n }\n },\n\n // prettier-ignore\n compoundVariants: [\n getSimpleVariant('neutral', '$tonal300', '$primary900', '$primary1000'),\n getSimpleVariant('primary', '$primary800', '$primary900', '$primary1000'),\n getSimpleVariant('primaryDark', '$primary1000', '$primary1100', '$primary1200'),\n getSimpleVariant('success', '$success', '$successMid', '$successDark'),\n getSimpleVariant('warning', '$warning', '$warningMid', '$warningDark'),\n getSimpleVariant('danger', '$danger', '$dangerMid', '$dangerDark'),\n\n getSolidVariant('primary', '$primary800', '$primary900', '$primary1000'),\n getSolidVariant('primaryDark', '$primary1000', '$primary1100', '$primary1200'),\n getSolidVariant('success', '$success', '$successMid', '$successDark'),\n getSolidVariant('warning', '$warning', '$warningMid', '$warningDark'),\n getSolidVariant('danger', '$danger', '$dangerMid', '$dangerDark'),\n\n getOutlineVariant('primary', '$primary800', '$primary900', '$primary1000'),\n getOutlineVariant('primaryDark', '$primary1000', '$primary1100', '$primary1200'),\n getOutlineVariant('success', '$success', '$successMid', '$successDark'),\n getOutlineVariant('warning', '$warning', '$warningMid', '$warningDark'),\n getOutlineVariant('danger', '$danger', '$dangerMid', '$dangerDark')\n ]\n})\n\ntype ActionIconProps = Override<\n React.ComponentProps<typeof StyledButton>,\n VariantProps<typeof StyledButton> & {\n as?: string | React.ReactNode\n children: React.ReactNode\n label: string\n } & Omit<TOptionalTooltipWrapperProps, 'label'> &\n NavigatorActions\n>\n\nexport const ActionIcon: React.ForwardRefExoticComponent<ActionIconProps> =\n React.forwardRef(\n (\n {\n children,\n theme = 'primary',\n appearance = 'simple',\n size = 'sm',\n label,\n href,\n disabled,\n hasTooltip = true,\n tooltipSide,\n ...remainingProps\n },\n ref\n ) => {\n const INVALID_CHILDREN_MESSAGE = `A single ${Icon.displayName} component is permitted as a child of ${ActionIcon.displayName}`\n\n invariant(React.Children.count(children) === 1, INVALID_CHILDREN_MESSAGE)\n\n const optionalLinkProps = href\n ? ({\n as: 'a',\n href: disabled ? null : href,\n onClick: undefined,\n 'aria-disabled': !!disabled\n } as const)\n : ({ type: 'button' } as const)\n\n return (\n <OptionalTooltipWrapper\n hasTooltip={hasTooltip}\n label={label}\n tooltipSide={tooltipSide}\n >\n <StyledButton\n {...optionalLinkProps}\n {...getExternalAnchorProps(href)}\n {...remainingProps}\n aria-label={label}\n theme={theme}\n appearance={appearance}\n size={size}\n ref={ref}\n disabled={disabled}\n >\n {React.Children.map(children, (child) => {\n // TS needs this check for any following code to access child.type\n // even with optional chaining\n if (!React.isValidElement(child)) {\n throw new Error(INVALID_CHILDREN_MESSAGE)\n }\n\n invariant(\n child.type === Icon,\n `Children of type ${child?.type} aren't permitted. Only an ${Icon.displayName} component is allowed in ${ActionIcon.displayName}`\n )\n\n return React.cloneElement(child, {\n size: ActionIconSizeMap[size as string],\n css: { ...(child.props.css ? child.props.css : {}) }\n })\n })}\n </StyledButton>\n </OptionalTooltipWrapper>\n )\n }\n )\n\nActionIcon.displayName = 'ActionIcon'\n"],"names":["getSimpleVariant","theme","base","interact","active","getSolidVariant","getOutlineVariant","StyledButton","styled","disabledStyle","ActionIcon","React","children","appearance","size","label","href","disabled","hasTooltip","tooltipSide","remainingProps","ref","INVALID_CHILDREN_MESSAGE","Icon","invariant","OptionalTooltipWrapper","getExternalAnchorProps","child","ActionIconSizeMap"],"mappings":"knBAcA,MAAMA,EAAmB,CACvBC,EACAC,EACAC,EACAC,KACI,CACJ,MAAAH,EACA,WAAY,SACZ,IAAK,CACH,GAAI,cACJ,MAAOC,EACP,iDAAkD,CAAE,MAAOC,CAAS,EACpE,0BAA2B,CAAE,MAAOC,CAAO,CAC7C,CACF,GAEMC,EAAkB,CACtBJ,EACAC,EACAC,EACAC,KACI,CACJ,MAAAH,EACA,WAAY,QACZ,IAAK,CACH,GAAIC,EACJ,MAAO,QACP,iDAAkD,CAChD,GAAIC,EACJ,MAAO,OACT,EACA,0BAA2B,CAAE,GAAIC,CAAO,CAC1C,CACF,GAEME,EAAoB,CACxBL,EACAC,EACAC,EACAC,KACI,CACJ,MAAAH,EACA,WAAY,UACZ,IAAK,CACH,OAAQ,YACR,YAAa,eACb,MAAOC,EACP,iDAAkD,CAAE,MAAOC,CAAS,EACpE,0BAA2B,CAAE,MAAOC,CAAO,CAC7C,CACF,GAEMG,EAAeC,EAAO,SAAU,CACpC,WAAY,SACZ,WAAY,OACZ,GAAI,QACJ,OAAQ,QACR,aAAc,KACd,UAAW,aACX,OAAQ,UACR,QAAS,OACT,WAAY,EACZ,eAAgB,SAChB,EAAG,QACH,WAAY,qBACZ,cAAeC,EACf,SAAU,CACR,MAAO,CACL,QAAS,CAAA,EACT,QAAS,GACT,QAAS,GACT,QAAS,CAAA,EACT,OAAQ,CACV,CAAA,EACA,WAAY,CACV,OAAQ,CAAC,EACT,QAAS,CAAA,EACT,MAAO,EACT,EACA,KAAM,CACJ,GAAI,CAAE,KAAM,IAAK,EACjB,GAAI,CAAE,KAAM,IAAK,EACjB,GAAI,CAAE,KAAM,IAAK,EACjB,GAAI,CAAE,KAAM,IAAK,CACnB,EACA,UAAW,CACT,KAAM,CACJ,aAAc,QAChB,CACF,CACF,EAGA,iBAAkB,CAChBT,EAAiB,UAAW,YAAa,cAAe,cAAc,EACtEA,EAAiB,UAAW,cAAe,cAAe,cAAc,EACxEA,EAAiB,cAAe,eAAgB,eAAgB,cAAc,EAC9EA,EAAiB,UAAW,WAAY,cAAe,cAAc,EACrEA,EAAiB,UAAW,WAAY,cAAe,cAAc,EACrEA,EAAiB,SAAU,UAAW,aAAc,aAAa,EAEjEK,EAAgB,UAAW,cAAe,cAAe,cAAc,EACvEA,EAAgB,cAAe,eAAgB,eAAgB,cAAc,EAC7EA,EAAgB,UAAW,WAAY,cAAe,cAAc,EACpEA,EAAgB,UAAW,WAAY,cAAe,cAAc,EACpEA,EAAgB,SAAU,UAAW,aAAc,aAAa,EAEhEC,EAAkB,UAAW,cAAe,cAAe,cAAc,EACzEA,EAAkB,cAAe,eAAgB,eAAgB,cAAc,EAC/EA,EAAkB,UAAW,WAAY,cAAe,cAAc,EACtEA,EAAkB,UAAW,WAAY,cAAe,cAAc,EACtEA,EAAkB,SAAU,UAAW,aAAc,aAAa,CACpE,CACF,CAAC,EAYYI,EACXC,EAAM,WACJ,CACE,CACE,SAAAC,EACA,MAAAX,EAAQ,UACR,WAAAY,EAAa,SACb,KAAAC,EAAO,KACP,MAAAC,EACA,KAAAC,EACA,SAAAC,EACA,WAAAC,EAAa,GACb,YAAAC,KACGC,CACL,EACAC,IACG,CACH,MAAMC,EAA2B,YAAYC,EAAK,oDAAoDb,EAAW,cAEjH,OAAAc,EAAUb,EAAM,SAAS,MAAMC,CAAQ,IAAM,EAAGU,CAAwB,EAYtEX,EAAA,cAACc,EAAA,CACC,WAAYP,EACZ,MAAOH,EACP,YAAaI,CAEbR,EAAAA,EAAA,cAACJ,EAAA,CACE,GAhBmBS,EACrB,CACC,GAAI,IACJ,KAAMC,EAAW,KAAOD,EACxB,QAAS,OACT,gBAAiB,CAAC,CAACC,CACrB,EACC,CAAE,KAAM,QAAS,EAUf,GAAGS,EAAuBV,CAAI,EAC9B,GAAGI,EACJ,aAAYL,EACZ,MAAOd,EACP,WAAYY,EACZ,KAAMC,EACN,IAAKO,EACL,SAAUJ,CAETN,EAAAA,EAAM,SAAS,IAAIC,EAAWe,GAAU,CAGvC,GAAI,CAAChB,EAAM,eAAegB,CAAK,EAC7B,MAAM,IAAI,MAAML,CAAwB,EAG1C,OAAAE,EACEG,EAAM,OAASJ,EACf,oBAAoBI,GAAA,KAAA,OAAAA,EAAO,kCAAkCJ,EAAK,uCAAuCb,EAAW,aACtH,EAEOC,EAAM,aAAagB,EAAO,CAC/B,KAAMC,EAAkBd,GACxB,IAAK,CAAE,GAAIa,EAAM,MAAM,IAAMA,EAAM,MAAM,IAAM,EAAI,CACrD,CAAC,CACH,CAAC,CACH,CACF,CAEJ,CACF,EAEFjB,EAAW,YAAc"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{opacify as s}from"color2k";import*as a from"react";import{StyledIcon as l}from"../icon/Icon.js";import{Loader as y}from"../loader/Loader.js";import{
|
|
1
|
+
import{opacify as s}from"color2k";import*as a from"react";import{StyledIcon as l}from"../icon/Icon.js";import{Loader as y}from"../loader/Loader.js";import{styled as c}from"../../stitches.js";import"../../utilities/css-wrapper/CSSWrapper.js";import"../../utilities/no-overflow-wrapper/NoOverflowWrapper.js";import"../../utilities/style/keyframe-animations.js";import{disabledStyle as d}from"../../utilities/style/disabledStyle.js";import{getExternalAnchorProps as u}from"../../utilities/uri/index.js";const p=(e,r,i,t)=>({theme:e,appearance:"outline",css:{border:"1px solid",borderColor:"currentColor",color:r,"&[disabled]":d,"&:not([disabled]):hover, &:not([disabled]):focus":{textDecoration:"none",color:i},"&:not([disabled]):active":{color:t}}}),n=(e,r,i,t,o="white")=>({theme:e,appearance:"solid",css:{bg:r,color:o,"&[disabled]":d,"&:not([disabled]):hover, &:not([disabled]):focus":{bg:i,color:o},"&:not([disabled]):active":{bg:t}}}),$=c("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","&[disabled]":d,variants:{theme:{primary:{},secondary:{},success:{},warning:{},danger:{},neutral:{}},appearance:{solid:{},outline:{}},size:{sm:{fontSize:"$sm",lineHeight:1.53,height:"$3",px:"$4",gap:"$2",[`& ${l}`]:{size:16}},md:{fontSize:"$md",lineHeight:1.5,height:"$4",px:"$5",gap:"$3",[`& ${l}`]:{size:20}},lg:{fontSize:"$lg",lineHeight:1.5,height:"$5",px:"$5",gap:"$3",[`& ${l}`]:{size:22}},xl:{fontSize:"$lg",lineHeight:1.5,height:"$6",px:"$5",gap:"$3",[`& ${l}`]:{size:22}}},isLoading:{true:{cursor:"not-allowed",opacity:.6,pointerEvents:"none"}},fullWidth:{true:{width:"100%"},false:{width:"max-content"}}},compoundVariants:[n("primary","$primary800","$primary900","$primary1000"),n("secondary","$primary1000","$primary1100","$primary1200"),n("success","$success","$successMid","$successDark"),n("warning","$warning","$warningMid","$warningDark","$tonal500"),n("danger","$danger","$dangerMid","$dangerDark"),n("neutral","white",s("white",-.1),s("white",-.25),"$primary800"),p("primary","$primary800","$primary900","$primary1000"),p("secondary","$primary1000","$primary1100","$primary1200"),p("neutral","white",s("white",-.2),s("white",-.35))],defaultVariants:{appearance:"solid",size:"md",theme:"primary"}}),f=c("span",{alignItems:"center",display:"flex",justifyContent:"center",visibility:"hidden",variants:{size:{sm:{gap:"$2"},md:{gap:"$3"},lg:{gap:"$3"},xl:{gap:"$3"}}},defaultVariants:{size:"md"}}),b=({size:e,children:r})=>a.createElement(a.Fragment,null,a.createElement(y,{css:{position:"absolute"}}),a.createElement(f,{size:e},r)),g=a.forwardRef(({children:e,as:r,href:i,isLoading:t=!1,onClick:o,...m},h)=>a.createElement($,{as:r||(i?"a":void 0),href:i,isLoading:t,onClick:t?void 0:o,type:i?void 0:"button",...m,...u(i),ref:h},t?a.createElement(b,{size:m.size},e):e));g.displayName="Button";export{g as Button,$ as StyledButton};
|
|
2
2
|
//# sourceMappingURL=Button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sources":["../../../src/components/button/Button.tsx"],"sourcesContent":["import type { VariantProps } from '@stitches/react'\nimport { opacify } from 'color2k'\nimport * as React from 'react'\n\nimport { StyledIcon } from '~/components/icon'\nimport { Loader } from '~/components/loader'\nimport {
|
|
1
|
+
{"version":3,"file":"Button.js","sources":["../../../src/components/button/Button.tsx"],"sourcesContent":["import type { VariantProps } from '@stitches/react'\nimport { opacify } from 'color2k'\nimport * as React from 'react'\n\nimport { StyledIcon } from '~/components/icon'\nimport { Loader } from '~/components/loader'\nimport { styled } from '~/stitches'\nimport { NavigatorActions } from '~/types'\nimport { disabledStyle, Override } from '~/utilities'\nimport { getExternalAnchorProps } from '~/utilities/uri'\n\nconst getButtonOutlineVariant = (\n theme: string,\n base: string,\n interact: string,\n active: string\n) => ({\n theme,\n appearance: 'outline',\n css: {\n border: '1px solid',\n borderColor: 'currentColor',\n color: base,\n '&[disabled]': disabledStyle,\n '&:not([disabled]):hover, &:not([disabled]):focus': {\n textDecoration: 'none',\n color: interact\n },\n '&:not([disabled]):active': { color: active }\n }\n})\n\nconst getButtonSolidVariant = (\n theme: string,\n base: string,\n interact: string,\n active: string,\n text = 'white'\n) => ({\n theme,\n appearance: 'solid',\n css: {\n bg: base,\n color: text,\n '&[disabled]': disabledStyle,\n '&:not([disabled]):hover, &:not([disabled]):focus': {\n bg: interact,\n color: text\n },\n '&:not([disabled]):active': { bg: active }\n }\n})\n\nexport const StyledButton = styled('button', {\n alignItems: 'center',\n bg: 'unset',\n border: 'unset',\n borderRadius: '$0',\n cursor: 'pointer',\n display: 'flex',\n fontFamily: '$body',\n fontWeight: 600,\n justifyContent: 'center',\n p: 'unset',\n textDecoration: 'none',\n transition: 'all 100ms ease-out',\n whiteSpace: 'nowrap',\n width: 'max-content',\n '&[disabled]': disabledStyle,\n variants: {\n theme: {\n primary: {},\n secondary: {},\n success: {},\n warning: {},\n danger: {},\n neutral: {}\n },\n appearance: {\n solid: {},\n outline: {}\n },\n size: {\n sm: {\n fontSize: '$sm',\n lineHeight: 1.53,\n height: '$3',\n px: '$4',\n gap: '$2',\n [`& ${StyledIcon}`]: { size: 16 }\n },\n md: {\n fontSize: '$md',\n lineHeight: 1.5,\n height: '$4',\n px: '$5',\n gap: '$3',\n [`& ${StyledIcon}`]: { size: 20 }\n },\n lg: {\n fontSize: '$lg',\n lineHeight: 1.5,\n height: '$5',\n px: '$5',\n gap: '$3',\n [`& ${StyledIcon}`]: { size: 22 }\n },\n xl: {\n fontSize: '$lg',\n lineHeight: 1.5,\n height: '$6',\n px: '$5',\n gap: '$3',\n [`& ${StyledIcon}`]: { size: 22 }\n }\n },\n isLoading: {\n true: {\n cursor: 'not-allowed',\n opacity: 0.6,\n pointerEvents: 'none'\n }\n },\n fullWidth: {\n true: { width: '100%' },\n false: { width: 'max-content' }\n }\n },\n\n // prettier-ignore\n compoundVariants: [\n getButtonSolidVariant('primary', '$primary800', '$primary900', '$primary1000'),\n getButtonSolidVariant('secondary', '$primary1000', '$primary1100', '$primary1200'),\n getButtonSolidVariant('success', '$success', '$successMid', '$successDark'),\n getButtonSolidVariant('warning', '$warning', '$warningMid', '$warningDark', '$tonal500'),\n getButtonSolidVariant('danger', '$danger', '$dangerMid', '$dangerDark'),\n getButtonSolidVariant('neutral', 'white', opacify('white', -0.1), opacify('white', -0.25), '$primary800'),\n getButtonOutlineVariant('primary', '$primary800', '$primary900', '$primary1000'),\n getButtonOutlineVariant('secondary', '$primary1000', '$primary1100', '$primary1200'),\n getButtonOutlineVariant('neutral', 'white', opacify('white', -0.2), opacify('white', -0.35))\n ],\n\n defaultVariants: {\n appearance: 'solid',\n size: 'md',\n theme: 'primary'\n }\n})\n\nconst LoaderContentsWrapper = styled('span', {\n alignItems: 'center',\n display: 'flex',\n justifyContent: 'center',\n visibility: 'hidden',\n variants: {\n size: {\n sm: { gap: '$2' },\n md: { gap: '$3' },\n lg: { gap: '$3' },\n xl: { gap: '$3' }\n }\n },\n defaultVariants: {\n size: 'md'\n }\n})\n\nconst WithLoader = ({\n size,\n children\n}: React.ComponentProps<typeof LoaderContentsWrapper>) => (\n <>\n <Loader css={{ position: 'absolute' }} />\n <LoaderContentsWrapper size={size}>{children}</LoaderContentsWrapper>\n </>\n)\n\ntype ButtonProps = Override<\n React.ComponentProps<typeof StyledButton>,\n VariantProps<typeof StyledButton> & {\n as?: React.ComponentType | React.ElementType\n children: React.ReactNode\n href?: string\n isLoading?: boolean\n } & NavigatorActions\n>\n\nexport const Button: React.ForwardRefExoticComponent<ButtonProps> =\n React.forwardRef(\n ({ children, as, href, isLoading = false, onClick, ...rest }, ref) => (\n <StyledButton\n as={as || (href ? 'a' : undefined)}\n href={href}\n isLoading={isLoading}\n onClick={!isLoading ? onClick : undefined}\n type={!href ? 'button' : undefined}\n {...rest}\n {...getExternalAnchorProps(href)}\n ref={ref}\n >\n {isLoading ? (\n <WithLoader size={rest.size}>{children}</WithLoader>\n ) : (\n children\n )}\n </StyledButton>\n )\n )\n\nButton.displayName = 'Button'\n"],"names":["getButtonOutlineVariant","theme","base","interact","active","disabledStyle","getButtonSolidVariant","text","StyledButton","styled","StyledIcon","opacify","LoaderContentsWrapper","WithLoader","size","children","React","Loader","Button","as","href","isLoading","onClick","rest","ref","getExternalAnchorProps"],"mappings":"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"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{styled as o}from"../../stitches.js";const r=o("button",{bg:"transparent",border:"none",borderRadius:"$round",color:"$tonal900",cursor:"pointer",fontFamily:"$body",fontSize:"$sm",size:"$3",p:0,transition:"all 75ms","&:hover":{bg:"$tonal100"},"&:active":{color:"white",bg:"$primary800"},"&:focus":{outline:"2px solid $primary800",outlineOffset:"2px"},variants:{isSelected:{true:{bg:"$primary800",color:"white","&:hover":{bg:"$primary800"}}},isToday:{true:{bg:"$tonal100"}},isOutsideMonth:{true:{color:"$tonal200"}}}});export{r as Day};
|
|
1
|
+
import{styled as o}from"../../stitches.js";const r=o("button",{bg:"transparent",border:"none",borderRadius:"$round",color:"$tonal900",cursor:"pointer",fontFamily:"$body",fontSize:"$sm",size:"$3",p:0,transition:"all 75ms","&:hover":{bg:"$tonal100"},"&:active":{color:"white",bg:"$primary800"},"&:focus":{outline:"2px solid $primary800",outlineOffset:"2px"},"&[disabled]":{opacity:"0.3",cursor:"default"},variants:{isSelected:{true:{bg:"$primary800",color:"white","&:hover":{bg:"$primary800"}}},isToday:{true:{bg:"$tonal100"}},isOutsideMonth:{true:{color:"$tonal200"}}}});export{r as Day};
|
|
2
2
|
//# sourceMappingURL=Day.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Day.js","sources":["../../../src/components/calendar/Day.tsx"],"sourcesContent":["import { styled } from '~/stitches'\n\nexport const Day = styled('button', {\n bg: 'transparent',\n border: 'none',\n borderRadius: '$round',\n color: '$tonal900',\n cursor: 'pointer',\n fontFamily: '$body',\n fontSize: '$sm',\n size: '$3',\n p: 0,\n transition: 'all 75ms',\n '&:hover': {\n bg: '$tonal100'\n },\n '&:active': {\n color: 'white',\n bg: '$primary800'\n },\n '&:focus': {\n outline: '2px solid $primary800',\n outlineOffset: '2px'\n },\n variants: {\n isSelected: {\n true: {\n bg: '$primary800',\n color: 'white',\n '&:hover': { bg: '$primary800' }\n }\n },\n isToday: {\n true: { bg: '$tonal100' }\n },\n isOutsideMonth: {\n true: { color: '$tonal200' }\n }\n }\n})\n"],"names":["Day","styled"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Day.js","sources":["../../../src/components/calendar/Day.tsx"],"sourcesContent":["import { styled } from '~/stitches'\n\nexport const Day = styled('button', {\n bg: 'transparent',\n border: 'none',\n borderRadius: '$round',\n color: '$tonal900',\n cursor: 'pointer',\n fontFamily: '$body',\n fontSize: '$sm',\n size: '$3',\n p: 0,\n transition: 'all 75ms',\n '&:hover': {\n bg: '$tonal100'\n },\n '&:active': {\n color: 'white',\n bg: '$primary800'\n },\n '&:focus': {\n outline: '2px solid $primary800',\n outlineOffset: '2px'\n },\n '&[disabled]': {\n opacity: '0.3',\n cursor: 'default'\n },\n variants: {\n isSelected: {\n true: {\n bg: '$primary800',\n color: 'white',\n '&:hover': { bg: '$primary800' }\n }\n },\n isToday: {\n true: { bg: '$tonal100' }\n },\n isOutsideMonth: {\n true: { color: '$tonal200' }\n }\n }\n})\n"],"names":["Day","styled"],"mappings":"iDAEaA,EAAMC,EAAO,SAAU,CAClC,GAAI,cACJ,OAAQ,OACR,aAAc,SACd,MAAO,YACP,OAAQ,UACR,WAAY,QACZ,SAAU,MACV,KAAM,KACN,EAAG,EACH,WAAY,WACZ,UAAW,CACT,GAAI,WACN,EACA,WAAY,CACV,MAAO,QACP,GAAI,aACN,EACA,UAAW,CACT,QAAS,wBACT,cAAe,KACjB,EACA,cAAe,CACb,QAAS,MACT,OAAQ,SACV,EACA,SAAU,CACR,WAAY,CACV,KAAM,CACJ,GAAI,cACJ,MAAO,QACP,UAAW,CAAE,GAAI,aAAc,CACjC,CACF,EACA,QAAS,CACP,KAAM,CAAE,GAAI,WAAY,CAC1B,EACA,eAAgB,CACd,KAAM,CAAE,MAAO,WAAY,CAC7B,CACF,CACF,CAAC"}
|
|
@@ -1040,6 +1040,8 @@ export declare const DataTable: (({ columns, data: dataProp, getAsyncData, defau
|
|
|
1040
1040
|
} & {
|
|
1041
1041
|
numberOfStickyColumns?: number | undefined;
|
|
1042
1042
|
scrollContainerCss?: import("../..").CSS | undefined;
|
|
1043
|
+
controlColumnCount?: number | undefined;
|
|
1044
|
+
maxRowDepth?: number | undefined;
|
|
1043
1045
|
}, "children" | "numberOfStickyColumns"> & Partial<Pick<Omit<Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, "key" | keyof import("react").HTMLAttributes<HTMLTableSectionElement>> & {
|
|
1044
1046
|
ref?: ((instance: HTMLTableSectionElement | null) => void) | import("react").RefObject<HTMLTableSectionElement> | null | undefined;
|
|
1045
1047
|
}, "css" | "theme" | "isSticky"> & import("@stitches/react/types/styled-component").TransformProps<{
|
|
@@ -1808,12 +1810,9 @@ export declare const DataTable: (({ columns, data: dataProp, getAsyncData, defau
|
|
|
1808
1810
|
*
|
|
1809
1811
|
* If you need more customisation options, you can compose your own implementation with our UI-only input components and `useDataTable`.
|
|
1810
1812
|
*/
|
|
1811
|
-
GlobalFilter: ({ onChange, label, hideLabel, ...props }: Omit<Omit<Pick<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof import("react").InputHTMLAttributes<HTMLInputElement>> & {
|
|
1813
|
+
GlobalFilter: ({ onChange, label, hideLabel, ...props }: Pick<Omit<Pick<Omit<Omit<Pick<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof import("react").InputHTMLAttributes<HTMLInputElement>> & {
|
|
1812
1814
|
ref?: ((instance: HTMLInputElement | null) => void) | import("react").RefObject<HTMLInputElement> | null | undefined;
|
|
1813
|
-
}, "
|
|
1814
|
-
size?: "sm" | "md" | "lg" | "xl" | undefined;
|
|
1815
|
-
state?: "error" | undefined;
|
|
1816
|
-
}, {
|
|
1815
|
+
}, "css"> & import("@stitches/react/types/styled-component").TransformProps<{}, {
|
|
1817
1816
|
sm: string;
|
|
1818
1817
|
md: string;
|
|
1819
1818
|
lg: string;
|
|
@@ -2181,11 +2180,47 @@ export declare const DataTable: (({ columns, data: dataProp, getAsyncData, defau
|
|
|
2181
2180
|
marginBottom: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
|
|
2182
2181
|
};
|
|
2183
2182
|
}> | undefined;
|
|
2184
|
-
}, "
|
|
2185
|
-
|
|
2186
|
-
|
|
2183
|
+
}, "size" | "as" | "type"> & {
|
|
2184
|
+
size: "sm" | "md" | "lg" | "xl" | "xs" | ({
|
|
2185
|
+
"@sm"?: "sm" | "md" | "lg" | "xl" | "xs" | undefined;
|
|
2186
|
+
"@md"?: "sm" | "md" | "lg" | "xl" | "xs" | undefined;
|
|
2187
|
+
"@lg"?: "sm" | "md" | "lg" | "xl" | "xs" | undefined;
|
|
2188
|
+
"@xl"?: "sm" | "md" | "lg" | "xl" | "xs" | undefined;
|
|
2189
|
+
"@reducedMotion"?: "sm" | "md" | "lg" | "xl" | "xs" | undefined;
|
|
2190
|
+
"@allowMotion"?: "sm" | "md" | "lg" | "xl" | "xs" | undefined;
|
|
2191
|
+
"@hover"?: "sm" | "md" | "lg" | "xl" | "xs" | undefined;
|
|
2192
|
+
"@initial"?: "sm" | "md" | "lg" | "xl" | "xs" | undefined;
|
|
2193
|
+
} & {
|
|
2194
|
+
[x: string]: "sm" | "md" | "lg" | "xl" | "xs" | undefined;
|
|
2195
|
+
}) | undefined;
|
|
2187
2196
|
type?: "number" | "text" | "search" | "tel" | "url" | "email" | "password" | undefined;
|
|
2188
|
-
|
|
2197
|
+
as?: undefined;
|
|
2198
|
+
}, "color" | "height" | "translate" | "width" | "size" | "css" | "onBlur" | "onChange" | "onSubmit" | "form" | "slot" | "style" | "title" | "pattern" | "key" | "autoComplete" | "name" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "list" | "as" | "step" | "required" | "min" | "max" | "maxLength" | "minLength" | "disabled" | "type" | "crossOrigin" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "value" | "multiple" | "alt" | "src" | "accept" | "capture" | "checked" | "enterKeyHint" | "readOnly"> & import("react").RefAttributes<HTMLInputElement>, "size" | "state"> & {
|
|
2199
|
+
size?: "sm" | "md" | "lg" | "xl" | ({
|
|
2200
|
+
"@sm"?: "sm" | "md" | "lg" | "xl" | undefined;
|
|
2201
|
+
"@md"?: "sm" | "md" | "lg" | "xl" | undefined;
|
|
2202
|
+
"@lg"?: "sm" | "md" | "lg" | "xl" | undefined;
|
|
2203
|
+
"@xl"?: "sm" | "md" | "lg" | "xl" | undefined;
|
|
2204
|
+
"@reducedMotion"?: "sm" | "md" | "lg" | "xl" | undefined;
|
|
2205
|
+
"@allowMotion"?: "sm" | "md" | "lg" | "xl" | undefined;
|
|
2206
|
+
"@hover"?: "sm" | "md" | "lg" | "xl" | undefined;
|
|
2207
|
+
"@initial"?: "sm" | "md" | "lg" | "xl" | undefined;
|
|
2208
|
+
} & {
|
|
2209
|
+
[x: string]: "sm" | "md" | "lg" | "xl" | undefined;
|
|
2210
|
+
}) | undefined;
|
|
2211
|
+
state?: "error" | ({
|
|
2212
|
+
"@sm"?: "error" | undefined;
|
|
2213
|
+
"@md"?: "error" | undefined;
|
|
2214
|
+
"@lg"?: "error" | undefined;
|
|
2215
|
+
"@xl"?: "error" | undefined;
|
|
2216
|
+
"@reducedMotion"?: "error" | undefined;
|
|
2217
|
+
"@allowMotion"?: "error" | undefined;
|
|
2218
|
+
"@hover"?: "error" | undefined;
|
|
2219
|
+
"@initial"?: "error" | undefined;
|
|
2220
|
+
} & {
|
|
2221
|
+
[x: string]: "error" | undefined;
|
|
2222
|
+
}) | undefined;
|
|
2223
|
+
}, "color" | "height" | "translate" | "width" | "size" | "css" | "onBlur" | "onChange" | "onSubmit" | "form" | "slot" | "style" | "title" | "pattern" | "key" | "autoComplete" | "name" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "list" | "as" | "step" | "required" | "min" | "max" | "maxLength" | "minLength" | "disabled" | "type" | "crossOrigin" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "value" | "multiple" | "alt" | "src" | "accept" | "capture" | "checked" | "enterKeyHint" | "readOnly" | "state"> & import("react").RefAttributes<HTMLInputElement> & {
|
|
2189
2224
|
size?: "sm" | "md" | "lg" | undefined;
|
|
2190
2225
|
css?: import("../..").CSS | undefined;
|
|
2191
2226
|
value?: string | undefined;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import*as e from"react";import{Table as
|
|
1
|
+
import*as e from"react";import{Table as h}from"../table/Table.js";import{DataTable as l}from"./DataTable.js";import{AsyncDataState as D}from"./DataTable.types.js";import{useDataTable as E}from"./DataTableContext.js";import{DataTableLoading as T}from"./DataTableLoading.js";const k=({sortable:m,striped:c,theme:i,css:p,scrollOptions:t={numberOfStickyColumns:0,hasStickyHeader:!1},...d})=>{const{asyncDataState:u,getTotalRows:b,getCanSomeRowsExpand:o,getGroupedRowModel:y,enableRowSelection:r}=E(),n=u===D.PENDING,C=!n&&b()===0,f=()=>y().flatRows.reduce((a,s)=>(s.depth>a&&(a=s.depth),a),0),S=()=>o()&&!!r?2:o()||!!r?1:0;return C?null:e.createElement(e.Fragment,null,e.createElement(T,null),e.createElement(h,{...d,numberOfStickyColumns:t.numberOfStickyColumns,scrollContainerCss:t.scrollContainerCss,controlColumnCount:S(),maxRowDepth:f(),css:{...p,...n&&{opacity:.5,pointerEvents:"none",transition:"opacity 250ms linear 150ms"}}},e.createElement(l.Head,{theme:i,sortable:m,isSticky:t.hasStickyHeader,css:t.headerCss}),e.createElement(l.Body,{striped:c})))};export{k as DataTableTable};
|
|
2
2
|
//# sourceMappingURL=DataTableTable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTableTable.js","sources":["../../../src/components/data-table/DataTableTable.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { CSS } from '~/stitches'\n\nimport { Table } from '../table'\nimport { TableBody } from '../table/TableBody'\nimport { DataTable } from './DataTable'\nimport { AsyncDataState } from './DataTable.types'\nimport { useDataTable } from './DataTableContext'\nimport { DataTableHead } from './DataTableHead'\nimport { DataTableLoading } from './DataTableLoading'\n\nexport type DataTableTableProps = Omit<\n React.ComponentProps<typeof Table>,\n 'children' | 'numberOfStickyColumns'\n> &\n Partial<\n Pick<React.ComponentProps<typeof DataTableHead>, 'theme' | 'sortable'>\n > &\n Partial<Pick<React.ComponentProps<typeof TableBody>, 'striped'>> & {\n scrollOptions?: {\n hasStickyHeader?: boolean\n headerCss?: CSS\n numberOfStickyColumns?: number\n scrollContainerCss?: CSS\n }\n }\n\nexport const DataTableTable = ({\n sortable,\n striped,\n theme,\n css,\n scrollOptions = {\n numberOfStickyColumns: 0,\n hasStickyHeader: false\n },\n ...props\n}: DataTableTableProps) => {\n const {
|
|
1
|
+
{"version":3,"file":"DataTableTable.js","sources":["../../../src/components/data-table/DataTableTable.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { CSS } from '~/stitches'\n\nimport { Table } from '../table'\nimport { TableBody } from '../table/TableBody'\nimport { DataTable } from './DataTable'\nimport { AsyncDataState } from './DataTable.types'\nimport { useDataTable } from './DataTableContext'\nimport { DataTableHead } from './DataTableHead'\nimport { DataTableLoading } from './DataTableLoading'\n\nexport type DataTableTableProps = Omit<\n React.ComponentProps<typeof Table>,\n 'children' | 'numberOfStickyColumns'\n> &\n Partial<\n Pick<React.ComponentProps<typeof DataTableHead>, 'theme' | 'sortable'>\n > &\n Partial<Pick<React.ComponentProps<typeof TableBody>, 'striped'>> & {\n scrollOptions?: {\n hasStickyHeader?: boolean\n headerCss?: CSS\n numberOfStickyColumns?: number\n scrollContainerCss?: CSS\n }\n }\n\nexport const DataTableTable = ({\n sortable,\n striped,\n theme,\n css,\n scrollOptions = {\n numberOfStickyColumns: 0,\n hasStickyHeader: false\n },\n ...props\n}: DataTableTableProps) => {\n const {\n asyncDataState,\n getTotalRows,\n getCanSomeRowsExpand,\n getGroupedRowModel,\n enableRowSelection\n } = useDataTable()\n const isPending = asyncDataState === AsyncDataState.PENDING\n const isEmpty = !isPending && getTotalRows() === 0\n\n const getMaxRowDepth = () => {\n return getGroupedRowModel().flatRows.reduce((acc, curr) => {\n if (curr.depth > acc) {\n acc = curr.depth\n }\n\n return acc\n }, 0)\n }\n\n const getControlColumnsCount = (): number => {\n if (getCanSomeRowsExpand() && !!enableRowSelection) return 2\n\n if (getCanSomeRowsExpand() || !!enableRowSelection) return 1\n\n return 0\n }\n\n if (isEmpty) return null\n\n return (\n <>\n <DataTableLoading />\n\n <Table\n {...props}\n numberOfStickyColumns={scrollOptions.numberOfStickyColumns}\n scrollContainerCss={scrollOptions.scrollContainerCss}\n controlColumnCount={getControlColumnsCount()}\n maxRowDepth={getMaxRowDepth()}\n css={{\n ...css,\n ...(isPending && {\n opacity: 0.5,\n pointerEvents: 'none',\n transition: 'opacity 250ms linear 150ms'\n })\n }}\n >\n <DataTable.Head\n theme={theme}\n sortable={sortable}\n isSticky={scrollOptions.hasStickyHeader}\n css={scrollOptions.headerCss}\n />\n <DataTable.Body striped={striped} />\n </Table>\n </>\n )\n}\n"],"names":["DataTableTable","sortable","striped","theme","css","scrollOptions","props","asyncDataState","getTotalRows","getCanSomeRowsExpand","getGroupedRowModel","enableRowSelection","useDataTable","isPending","AsyncDataState","isEmpty","getMaxRowDepth","acc","curr","getControlColumnsCount","React","DataTableLoading","Table","DataTable"],"mappings":"uRA4BaA,EAAiB,CAAC,CAC7B,SAAAC,EACA,QAAAC,EACA,MAAAC,EACA,IAAAC,EACA,cAAAC,EAAgB,CACd,sBAAuB,EACvB,gBAAiB,EACnB,KACGC,CACL,IAA2B,CACzB,KAAM,CACJ,eAAAC,EACA,aAAAC,EACA,qBAAAC,EACA,mBAAAC,EACA,mBAAAC,CACF,EAAIC,EACEC,EAAAA,EAAYN,IAAmBO,EAAe,QAC9CC,EAAU,CAACF,GAAaL,MAAmB,EAE3CQ,EAAiB,IACdN,IAAqB,SAAS,OAAO,CAACO,EAAKC,KAC5CA,EAAK,MAAQD,IACfA,EAAMC,EAAK,OAGND,GACN,CAAC,EAGAE,EAAyB,IACzBV,EAAAA,GAA0B,CAAC,CAACE,EAA2B,EAEvDF,KAA0B,CAAC,CAACE,EAA2B,EAEpD,EAGT,OAAII,EAAgB,KAGlBK,EAAA,cAAAA,EAAA,SAAA,KACEA,EAAA,cAACC,EAAA,IAAiB,EAElBD,EAAA,cAACE,EAAA,CACE,GAAGhB,EACJ,sBAAuBD,EAAc,sBACrC,mBAAoBA,EAAc,mBAClC,mBAAoBc,EAAuB,EAC3C,YAAaH,IACb,IAAK,CACH,GAAGZ,EACH,GAAIS,GAAa,CACf,QAAS,GACT,cAAe,OACf,WAAY,4BACd,CACF,CAEAO,EAAAA,EAAA,cAACG,EAAU,KAAV,CACC,MAAOpB,EACP,SAAUF,EACV,SAAUI,EAAc,gBACxB,IAAKA,EAAc,SAAA,CACrB,EACAe,EAAA,cAACG,EAAU,KAAV,CAAe,QAASrB,CAAS,CAAA,CACpC,CACF,CAEJ"}
|