@atom-learning/components 3.27.0-beta.5 → 3.27.1

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.
Files changed (85) hide show
  1. package/CHANGELOG.md +208 -0
  2. package/dist/components/accordion/AccordionTrigger.d.ts +1 -1
  3. package/dist/components/accordion/AccordionTrigger.js +1 -1
  4. package/dist/components/accordion/AccordionTrigger.js.map +1 -1
  5. package/dist/components/action-icon/ActionIcon.js +1 -1
  6. package/dist/components/action-icon/ActionIcon.js.map +1 -1
  7. package/dist/components/banner/banner-regular/BannerRegular.d.ts +0 -1
  8. package/dist/components/banner/banner-regular/BannerRegularActions.js +1 -1
  9. package/dist/components/banner/banner-slim/BannerSlim.d.ts +0 -1
  10. package/dist/components/button/Button.js +1 -1
  11. package/dist/components/button/Button.js.map +1 -1
  12. package/dist/components/calendar/Day.js +1 -1
  13. package/dist/components/calendar/Day.js.map +1 -1
  14. package/dist/components/create-password-field/CreatePasswordField.js +1 -1
  15. package/dist/components/data-table/DataTable.d.ts +44 -9
  16. package/dist/components/data-table/DataTableTable.js +1 -1
  17. package/dist/components/data-table/DataTableTable.js.map +1 -1
  18. package/dist/components/dropdown-menu/DropdownMenu.d.ts +1 -2
  19. package/dist/components/dropdown-menu/DropdownMenuLinkItem.d.ts +1 -2
  20. package/dist/components/dropdown-menu/DropdownMenuLinkItem.js +1 -1
  21. package/dist/components/dropdown-menu/DropdownMenuLinkItem.js.map +1 -1
  22. package/dist/components/empty-state/EmptyState.context.d.ts +8 -0
  23. package/dist/components/empty-state/EmptyState.context.js +2 -0
  24. package/dist/components/empty-state/EmptyState.context.js.map +1 -0
  25. package/dist/components/empty-state/EmptyState.d.ts +374 -738
  26. package/dist/components/empty-state/EmptyState.js +1 -1
  27. package/dist/components/empty-state/EmptyState.js.map +1 -1
  28. package/dist/components/empty-state/EmptyStateBody.d.ts +9 -4
  29. package/dist/components/empty-state/EmptyStateBody.js +1 -1
  30. package/dist/components/empty-state/EmptyStateBody.js.map +1 -1
  31. package/dist/components/empty-state/EmptyStateImage.d.ts +1 -2
  32. package/dist/components/empty-state/EmptyStateImage.js +1 -1
  33. package/dist/components/empty-state/EmptyStateImage.js.map +1 -1
  34. package/dist/components/empty-state/EmptyStateTitle.d.ts +7 -1
  35. package/dist/components/empty-state/EmptyStateTitle.js +1 -1
  36. package/dist/components/empty-state/EmptyStateTitle.js.map +1 -1
  37. package/dist/components/form/Form.js +1 -1
  38. package/dist/components/index.d.ts +1 -1
  39. package/dist/components/input/Input.d.ts +1504 -7
  40. package/dist/components/input/Input.js +1 -1
  41. package/dist/components/input/Input.js.map +1 -1
  42. package/dist/components/input/index.d.ts +1 -1
  43. package/dist/components/link/Link.js +1 -1
  44. package/dist/components/link/Link.js.map +1 -1
  45. package/dist/components/navigation/NavigationMenuLink.js +1 -1
  46. package/dist/components/navigation/NavigationMenuLink.js.map +1 -1
  47. package/dist/components/navigation-menu-vertical/NavigationMenuVertical.d.ts +1 -1
  48. package/dist/components/navigation-menu-vertical/NavigationMenuVerticalLink.d.ts +2 -2
  49. package/dist/components/navigation-menu-vertical/NavigationMenuVerticalLink.js +1 -1
  50. package/dist/components/navigation-menu-vertical/NavigationMenuVerticalLink.js.map +1 -1
  51. package/dist/components/side-bar/SideBar.d.ts +360 -364
  52. package/dist/components/side-bar/SideBarComponents.d.ts +8 -10
  53. package/dist/components/side-bar/SideBarComponents.js +1 -1
  54. package/dist/components/side-bar/SideBarComponents.js.map +1 -1
  55. package/dist/components/stepper/Stepper.js +1 -1
  56. package/dist/components/table/Table.d.ts +6 -2
  57. package/dist/components/table/Table.js +1 -1
  58. package/dist/components/table/Table.js.map +1 -1
  59. package/dist/components/table/TableStickyColumnsContainer.d.ts +3 -1
  60. package/dist/components/table/TableStickyColumnsContainer.js +1 -1
  61. package/dist/components/table/TableStickyColumnsContainer.js.map +1 -1
  62. package/dist/components/table/useStickyColumnsCss.d.ts +6 -1
  63. package/dist/components/table/useStickyColumnsCss.js +1 -1
  64. package/dist/components/table/useStickyColumnsCss.js.map +1 -1
  65. package/dist/components/tile-interactive/TileInteractive.d.ts +3 -1
  66. package/dist/components/tile-interactive/TileInteractive.js +1 -1
  67. package/dist/components/tile-interactive/TileInteractive.js.map +1 -1
  68. package/dist/components/tile-toggle-group/TileToggleGroupItem.d.ts +2 -0
  69. package/dist/components/top-bar/TopBar.d.ts +360 -364
  70. package/dist/components/top-bar/TopBarBrand.d.ts +1 -2
  71. package/dist/components/top-bar/TopBarBrand.js +1 -1
  72. package/dist/components/top-bar/TopBarBrand.js.map +1 -1
  73. package/dist/docgen.json +1 -1
  74. package/dist/index.cjs.js +1 -1
  75. package/dist/index.cjs.js.map +1 -1
  76. package/dist/index.d.ts +0 -1
  77. package/dist/index.js +1 -1
  78. package/dist/types/navigatorActions.types.d.ts +0 -1
  79. package/dist/utilities/uri/index.d.ts +0 -2
  80. package/dist/utilities/uri/index.js +1 -1
  81. package/dist/utilities/uri/index.js.map +1 -1
  82. package/package.json +1 -1
  83. package/dist/context/router/index.d.ts +0 -11
  84. package/dist/context/router/index.js +0 -2
  85. package/dist/context/router/index.js.map +0 -1
package/CHANGELOG.md ADDED
@@ -0,0 +1,208 @@
1
+ ## [3.27.1](https://github.com/Atom-Learning/components/compare/v3.27.0...v3.27.1) (2024-08-07)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * DateInput snap ([0d65f59](https://github.com/Atom-Learning/components/commit/0d65f595200ec6b4732a0db1ae4edbd086d78d98))
7
+ * do not use Override in Input types ([76a438a](https://github.com/Atom-Learning/components/commit/76a438aa1701c1f1590e2b9d2bbb05652ab37af6))
8
+
9
+ # [1.4.0](https://github.com/Atom-Learning/components/compare/v1.3.0...v1.4.0) (2022-04-11)
10
+
11
+
12
+ ### Features
13
+
14
+ * **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))
15
+
16
+ # [1.3.0](https://github.com/Atom-Learning/components/compare/v1.2.1...v1.3.0) (2022-04-07)
17
+
18
+
19
+ ### Bug Fixes
20
+
21
+ * add compound variant for outline secondary buttons ([09bb100](https://github.com/Atom-Learning/components/commit/09bb10071d10f421eec37bc505860120396e2232))
22
+ * add typings to package.json to explicitly refer index.d.ts ([033c9b6](https://github.com/Atom-Learning/components/commit/033c9b6330d1b75a862a0a0c4d525a53e3707571))
23
+ * added type=search back and used css to hide browser icon ([13cf732](https://github.com/Atom-Learning/components/commit/13cf7320eda155eed7b6b340602cfeee02021745))
24
+ * adding custom plurals ([ad13522](https://github.com/Atom-Learning/components/commit/ad1352277fac5b6b6e4f4b41c7a7b0092c62d4ae))
25
+ * adding label translation, input size, and fixing popover tweaks ([08c47e6](https://github.com/Atom-Learning/components/commit/08c47e6b18537e73150d9010311d8d59d31fdc09))
26
+ * adding test for min max values ([5026b4d](https://github.com/Atom-Learning/components/commit/5026b4d95f9ac7a7c9fdc7baf06f153d8c00a8f5))
27
+ * adding test for slidersteps ([7254b0f](https://github.com/Atom-Learning/components/commit/7254b0f85d9cb81e2ebeab5946ab91caa46804fb))
28
+ * allow external change handler on date input ([d265761](https://github.com/Atom-Learning/components/commit/d26576148c94740899f87cfd6708dc5a982f8fb4))
29
+ * attempting to fix merge issue ([531590e](https://github.com/Atom-Learning/components/commit/531590e2ae068be69303f63e83e612e974cb8a90))
30
+ * avoid initial render, screenWidth can be left undefined ([35766bf](https://github.com/Atom-Learning/components/commit/35766bfeb28a66bee20e735aaf27b34862815495))
31
+ * change accordion type ([8caeed7](https://github.com/Atom-Learning/components/commit/8caeed70b8425090e15ae0451bbc4b8b7601d72c))
32
+ * changing composition so value is a separate component ([7cefeed](https://github.com/Atom-Learning/components/commit/7cefeed2d6097152ea484c329d3bce02c45cfc6d))
33
+ * changing prop name to appearance ([429cab2](https://github.com/Atom-Learning/components/commit/429cab230f959de10fbbd8af51bebb5942b9193e))
34
+ * changing unintuitive variant name ([d6993b0](https://github.com/Atom-Learning/components/commit/d6993b08346dffb6a2033a25f1c05bcbd84bd1c4))
35
+ * css as per designs ([9f3a964](https://github.com/Atom-Learning/components/commit/9f3a96483c6acc2482ba7114d45ea11b2cffa529))
36
+ * css typing ([324e323](https://github.com/Atom-Learning/components/commit/324e323a0e5aae0bddc76170f7833abf26832809))
37
+ * dateinput type error ([ee5e109](https://github.com/Atom-Learning/components/commit/ee5e1094dfc46ec449fc5c1d207c62614dd2e1ea))
38
+ * disabled state should not have any interaction whatsoever ([7e458ee](https://github.com/Atom-Learning/components/commit/7e458ee5311be59b552f99eb21aeaa0888168544))
39
+ * documentation ([82e8ac4](https://github.com/Atom-Learning/components/commit/82e8ac45bca1d97d34bcb9ac3d36158af5c7edc0))
40
+ * drop mount check inside useEffect hook ([8771774](https://github.com/Atom-Learning/components/commit/8771774de3a479d102e804eeec933685f22f1e64))
41
+ * ensure dayjs plugin is treated as external dep ([a2525ea](https://github.com/Atom-Learning/components/commit/a2525eaf3d64dbcfd22351ae31d98b3d2d42fef5))
42
+ * extend type to allow passing CSS ([261cda6](https://github.com/Atom-Learning/components/commit/261cda629c8435a8615e8b01d51fb55dd0a46d4b))
43
+ * fixing tests, changing div to box ([1f57a3a](https://github.com/Atom-Learning/components/commit/1f57a3a874b7049b4accb3d498dfde1563aad4cd))
44
+ * focus issue with next/prev buttons ([67d3de3](https://github.com/Atom-Learning/components/commit/67d3de3f5c65ed11f12588757a849bbe4601fa7d))
45
+ * forcing boolean to clean up logic ([eeaec16](https://github.com/Atom-Learning/components/commit/eeaec164e7ff5ad35a0f61e38dcfeadff4922a3a))
46
+ * introduce enum for icon ([2ce7486](https://github.com/Atom-Learning/components/commit/2ce7486b6410406e1cb67ecc3c5d7f72c4fe1949))
47
+ * making position more responsive, updating tests ([01d2e77](https://github.com/Atom-Learning/components/commit/01d2e77a42f78fbe8b6e8ab7d7c3702327e163c9))
48
+ * minor test and docs fixes ([a128057](https://github.com/Atom-Learning/components/commit/a1280573e8334c27ae58d5d63169840f1473b755))
49
+ * minor tweak to tests ([cfb37a0](https://github.com/Atom-Learning/components/commit/cfb37a073dbb9015e98212525385d50eda1b245f))
50
+ * minor update to docs ([c7a1673](https://github.com/Atom-Learning/components/commit/c7a1673f1e655177fcbe93838f84949e645e80dd))
51
+ * minor update to docs ([35dbedd](https://github.com/Atom-Learning/components/commit/35dbedd6a0d26001025cf28007e8c9ace8396e73))
52
+ * more responsive styling, mdx changes ([e18585a](https://github.com/Atom-Learning/components/commit/e18585accc31e5c62637ad4e9f922a43b10b1e9c))
53
+ * positioning of icon ([5f630f0](https://github.com/Atom-Learning/components/commit/5f630f0b351c21a705dcb6f042332ab130f138f3))
54
+ * prop name and docs example ([2e6a91e](https://github.com/Atom-Learning/components/commit/2e6a91e882402204507d24391d688f9e608f136b))
55
+ * proper types for validationMode ([7f6cb30](https://github.com/Atom-Learning/components/commit/7f6cb300a769a7c43670f937517528519bb4ff13))
56
+ * reducing height of track ([43f1f33](https://github.com/Atom-Learning/components/commit/43f1f335b8c1bb9ae06050b7ff913771b1fc5ce8))
57
+ * remove unnecessary box wrapper ([cd6203f](https://github.com/Atom-Learning/components/commit/cd6203fab71597d243b25b13be987e0508b462a8))
58
+ * remove unnecessary calendar docs, update datefield docs ([2a3ecb0](https://github.com/Atom-Learning/components/commit/2a3ecb0204b29e13f1542f65e11893eaeffad65a))
59
+ * remove unused babel file ([8df5e19](https://github.com/Atom-Learning/components/commit/8df5e195eb78c5462e5610cf9d8c3cf1f53c4172))
60
+ * remove unused code ([8019865](https://github.com/Atom-Learning/components/commit/8019865df92a86fee4f23480ec09d4dba4c18986))
61
+ * remove unwanted padding from container ([2d3fd00](https://github.com/Atom-Learning/components/commit/2d3fd00ccdbdc293d923b96d4a348d508b22c874))
62
+ * removing unneeded default value ([4db40c6](https://github.com/Atom-Learning/components/commit/4db40c656bf73b2a459dd69fcee5c0de8d705baf))
63
+ * rename Icon component ([ce20992](https://github.com/Atom-Learning/components/commit/ce20992e40e29a6940ef57749184871be539b0b5))
64
+ * rename prop and move callback into useEffect hook ([14cd086](https://github.com/Atom-Learning/components/commit/14cd086a536a937087a1088beefedd36170865fd))
65
+ * rename test description ([3137897](https://github.com/Atom-Learning/components/commit/313789734a3d06ac0d1e2d5e7ec159335106224b))
66
+ * render buttons with display: none to include them in snapshot ([9844223](https://github.com/Atom-Learning/components/commit/9844223fc29a4505620111f8427ba4c3073fe7b0))
67
+ * replace babel-jest ([8c1c0d4](https://github.com/Atom-Learning/components/commit/8c1c0d4dcfffe162b0effe415ef96998fb421484))
68
+ * replace iconwrapper for accordion ([52d93ad](https://github.com/Atom-Learning/components/commit/52d93ade51e91e9c71e21ab5d078e5ad0668705e))
69
+ * revalidate on date select ([a688ed8](https://github.com/Atom-Learning/components/commit/a688ed81950e751e53c686c84331226a03aa397b))
70
+ * revert jest to last version to stop node engine errors ([6351b74](https://github.com/Atom-Learning/components/commit/6351b74f7a29363511ed61816b29b09821000ba4))
71
+ * review feedback ([9237067](https://github.com/Atom-Learning/components/commit/9237067445a947e3aacde6645a03961de2708703))
72
+ * review feedback ([d74a333](https://github.com/Atom-Learning/components/commit/d74a3337de79f373eca066050c0f98116bd9e7e1))
73
+ * rotation applied to all icons and not just the arrow ([595a246](https://github.com/Atom-Learning/components/commit/595a246216ffc2bfb84c6c29806d17dcfeb8e817))
74
+ * search input onChange ([f13bd23](https://github.com/Atom-Learning/components/commit/f13bd23c8fd12eb32b7c41a62122206891dc9d6f))
75
+ * separating slidersteps component ([5d1b0af](https://github.com/Atom-Learning/components/commit/5d1b0afac6268218fd75893365fa0e8ff28095f2))
76
+ * separator colours and skipping behaviour ([8e85863](https://github.com/Atom-Learning/components/commit/8e85863fa36f31503cdfc67f74427ff128a77e03))
77
+ * slider min max bug ([2a5405f](https://github.com/Atom-Learning/components/commit/2a5405fd7ce0ef7fa13219eb4775b4fa8fc00938))
78
+ * snapshot test ([b364cf6](https://github.com/Atom-Learning/components/commit/b364cf66c865a875ae978393c533a1e662bec1b8))
79
+ * stepper being able to navigate outside bullet range when no OnComplete handler is passed ([c620481](https://github.com/Atom-Learning/components/commit/c620481fa5d41583779590c63e183f9c0532aba9))
80
+ * stepper types ([f7e1c20](https://github.com/Atom-Learning/components/commit/f7e1c208dbb911ccaade2bebb6cdbf49fe82f39b))
81
+ * stop render on empty value ([005c14c](https://github.com/Atom-Learning/components/commit/005c14c9fc819f7106ef6768ac1a1ac110af662a))
82
+ * tabs jump on font weight change ([219b01b](https://github.com/Atom-Learning/components/commit/219b01bbf86cc81881893b5efd925aea27c1ba93))
83
+ * throttle was being called in a wrong way ([bce0d0d](https://github.com/Atom-Learning/components/commit/bce0d0db6d2fc5569bec0e1eec96399fdf573d64))
84
+ * TS issues ([fad5121](https://github.com/Atom-Learning/components/commit/fad5121e853f6fa56368c8ec479b260e955c886b))
85
+ * tweaking null return logic ([528afda](https://github.com/Atom-Learning/components/commit/528afda648c8c6275414c7856ff145facd4884c2))
86
+ * typo on slider mdx ([45c2218](https://github.com/Atom-Learning/components/commit/45c2218bb9e21f41aea864b6ca387794bfcf06b8))
87
+ * unifying disabled theme styles ([14538e4](https://github.com/Atom-Learning/components/commit/14538e43f66fb1cf4d1665898c985318aaaada28))
88
+ * update snaps ([af59ab1](https://github.com/Atom-Learning/components/commit/af59ab1e77377fac7c71f7e785f44a81b3e24650))
89
+ * update theme package ([1059b45](https://github.com/Atom-Learning/components/commit/1059b45256c79fc84bc6f8659b1d32f832b93114))
90
+ * updating key to not be index ([26de60e](https://github.com/Atom-Learning/components/commit/26de60e4995a8cd5488a63cec03555ceb9d8d01c))
91
+ * updating mdx ([ce15564](https://github.com/Atom-Learning/components/commit/ce155646da9fb5dd4230b9135eaad9cd6d1824e8))
92
+ * updating mdx ([60604ee](https://github.com/Atom-Learning/components/commit/60604ee02f959767fdc06d15b8aceb16078918bb))
93
+ * updating mdx ([c433934](https://github.com/Atom-Learning/components/commit/c433934f3bc0e3377b2067d61c4a3d0b208b4bdd))
94
+ * updating mdx files ([f55277b](https://github.com/Atom-Learning/components/commit/f55277b47476a5614a632b09b39118d0fa3c85c0))
95
+ * updating readme ([959ec26](https://github.com/Atom-Learning/components/commit/959ec2629e01bbeb6781e9bcf236fb544153be86))
96
+ * updating readme ([4032986](https://github.com/Atom-Learning/components/commit/40329868600b456eff3e7456028e1f747817462b))
97
+ * updating style changes to be opt in and better typed ([3b94b09](https://github.com/Atom-Learning/components/commit/3b94b09d7ce7ac359b58149eb2cc86f49a47c740))
98
+ * use stitches to style the icon ([5fb3fb2](https://github.com/Atom-Learning/components/commit/5fb3fb2e5a066cc1967ca0093158a363de161ac0))
99
+ * yarn.lock ([a81c04a](https://github.com/Atom-Learning/components/commit/a81c04a9f8b67fc222d971c808bc9babfb708b34))
100
+
101
+
102
+ ### Features
103
+
104
+ * add date field, finalise date input changes ([58edcfc](https://github.com/Atom-Learning/components/commit/58edcfc365ca7a5f902cdffb6f9de9c9f5c2009d))
105
+ * add tab scrollers which allows easy navigation if tabs length is more than available space ([cec5b04](https://github.com/Atom-Learning/components/commit/cec5b04235f2c24915050dfd71975608ddee7c86))
106
+ * add test:ci option to improve logs on ci ([3452dbb](https://github.com/Atom-Learning/components/commit/3452dbbf141d659a2044148712dd243729fb8916))
107
+ * added translation, firstDayOfWeek, test, and documentation ([ca785b4](https://github.com/Atom-Learning/components/commit/ca785b4509ee581f5ba7d916c041f8291235ad24))
108
+ * adding neutral outline variant ([53a793a](https://github.com/Atom-Learning/components/commit/53a793a02836a74a8e2dac481cedec2e1707fef2))
109
+ * adding new table variants ([8a1fcc8](https://github.com/Atom-Learning/components/commit/8a1fcc8d68f48c78fc3dfc5a9a2e9a758c9eaaf6))
110
+ * adding optional uppercase to tabs ([708c6f2](https://github.com/Atom-Learning/components/commit/708c6f2d5ca33988b69f2aa868fdb8543aa56d6b))
111
+ * additional icon variant ([7e471bc](https://github.com/Atom-Learning/components/commit/7e471bc558543f84a732bc3180bd79dde76b58aa))
112
+ * button neutral theme ([8bbcf1a](https://github.com/Atom-Learning/components/commit/8bbcf1a4301cb07579de485fb6789576f7fa82c1))
113
+ * changed new variants colors for different states ([d29b374](https://github.com/Atom-Learning/components/commit/d29b374319bf133d2525681036e9ca3cda326a86))
114
+ * grid max item size ([573c17e](https://github.com/Atom-Learning/components/commit/573c17e0aec90b68e636de8238f3a98922113593))
115
+ * initial work on calendar component ([ebc8948](https://github.com/Atom-Learning/components/commit/ebc8948b66573efcc782e29b78537d89968d43d8))
116
+ * initial work on date input ([4fc6827](https://github.com/Atom-Learning/components/commit/4fc682733639ce69a60e2d869cdeaaeb88f3a4c3))
117
+ * initial work on slider ([f5a6ea1](https://github.com/Atom-Learning/components/commit/f5a6ea11349b903ed1b05ab27dc2da0004a2a595))
118
+ * make it possible to show / hide close button in modal ([1c44907](https://github.com/Atom-Learning/components/commit/1c44907ad94a5ccf5c07d2b329d292ccb05a9368))
119
+ * no light bg for tabs ([b57cdff](https://github.com/Atom-Learning/components/commit/b57cdff08f0c5594d909bcaf2f23414b2087a06a))
120
+ * notification badge component ([3f93049](https://github.com/Atom-Learning/components/commit/3f930490be322df4f58e3f643d197e1d7db6d142))
121
+ * option to hide the chevron icon in trigger ([6cc28bf](https://github.com/Atom-Learning/components/commit/6cc28bff3dd5a25f734e860cdcbddc17e4725432))
122
+ * pass ref onto the ReactPlayer component so that we have access to the ReactPlayer instance ([fb2b09c](https://github.com/Atom-Learning/components/commit/fb2b09ca81e62581dcf3b5e55a8ec5722c3621dc))
123
+ * progress-indicator ([b2ebe20](https://github.com/Atom-Learning/components/commit/b2ebe208e0af05245c3738403bb0b6c05250f2d6))
124
+ * remove :before and :after for nested Text components ([55e7a9b](https://github.com/Atom-Learning/components/commit/55e7a9be37fac435a85b21c21df505be26b26e89))
125
+ * replace babel & terser with esbuild ([bb11c3c](https://github.com/Atom-Learning/components/commit/bb11c3cbb6d226750eaae75372e49d9afaa05606))
126
+ * **SearchInput:** added clear functionality ([8c0fc32](https://github.com/Atom-Learning/components/commit/8c0fc3240cfaeb50df231da383a448eabd509d75))
127
+ * show / hide scroller buttons based on scroll position ([a6c7e49](https://github.com/Atom-Learning/components/commit/a6c7e49b0851415fc90e4c8d401b6926bacdd719))
128
+ * simplifying output label to callback ([fcf0eb2](https://github.com/Atom-Learning/components/commit/fcf0eb2c0d88dfbc6c8b17c8831ba022de537539))
129
+ * slider step functionality ([ec0d308](https://github.com/Atom-Learning/components/commit/ec0d308c6f106aed3ba6f130bb163990c923adf9))
130
+ * slider value label ([9645dc9](https://github.com/Atom-Learning/components/commit/9645dc9abb3c7dc2fd96212b6c4b395cdc206b89))
131
+ * slider.steps component, composition change ([5be643f](https://github.com/Atom-Learning/components/commit/5be643f7caa9db1dcc91bb3c6537dc87458512ed))
132
+ * sliderfield component added ([3536925](https://github.com/Atom-Learning/components/commit/35369251f41ddd74bfe491ea5022bd60ab7a2c42))
133
+ * support multiple values, updating mdx ([a01bfab](https://github.com/Atom-Learning/components/commit/a01bfab5635b6a0710cb997bc4794fd69299f025))
134
+ * tab scroll percentage ([06240fb](https://github.com/Atom-Learning/components/commit/06240fb093d760121ab18ed053f826e37d42cb94))
135
+ * update slider api ([d752c75](https://github.com/Atom-Learning/components/commit/d752c751395313cd6fa499c26f5ed342d6b4bbe3))
136
+ * update to preset-small-lib to improve performance ([431da9c](https://github.com/Atom-Learning/components/commit/431da9ced8916e0ebc90dc064d200adcb1c25384))
137
+ * WIP update packages and improve keyboard accessibility ([e0f5f9d](https://github.com/Atom-Learning/components/commit/e0f5f9dfa989e74c3ada486b16785ebb7f0d7c8e))
138
+
139
+
140
+ ### Reverts
141
+
142
+ * remove showChevron option ([e9b928c](https://github.com/Atom-Learning/components/commit/e9b928c53e23431563719624cb77b244a79e73b9))
143
+
144
+ # [1.4.0](https://github.com/Atom-Learning/components/compare/v1.3.1...v1.4.0) (2021-12-03)
145
+
146
+ # [1.3.1](https://github.com/Atom-Learning/components/compare/v1.3.0...v1.3.1) (2021-11-25)
147
+
148
+ # [1.3.0](https://github.com/Atom-Learning/components/compare/v1.2.3...v1.3.0) (2021-11-23)
149
+
150
+ # [1.2.3](https://github.com/Atom-Learning/components/compare/v1.2.2...v1.2.3) (2021-11-16)
151
+
152
+ # [1.2.2](https://github.com/Atom-Learning/components/compare/v1.2.1...v1.2.2) (2021-11-12)
153
+
154
+ # [1.2.1](https://github.com/Atom-Learning/components/compare/v1.2.0...v1.2.1) (2021-11-11)
155
+
156
+ # [1.2.0](https://github.com/Atom-Learning/components/compare/v1.1.1...v1.2.0) (2021-11-10)
157
+
158
+
159
+ ### Bug Fixes
160
+
161
+ * adding TODO on type ([e928651](https://github.com/Atom-Learning/components/commit/e928651928291f8a9b639c8fa6c348b1bafe6513))
162
+ * few changes from PR ([e0f75a1](https://github.com/Atom-Learning/components/commit/e0f75a1788af1e23ec6efdfdd24f2788d73d33b0))
163
+ * fixing small error on documentation ([3be573a](https://github.com/Atom-Learning/components/commit/3be573a7584cbe8470a0db0186302e3e39e8734b))
164
+
165
+
166
+ ### Features
167
+
168
+ * adding accordion component ([60eac3c](https://github.com/Atom-Learning/components/commit/60eac3c47e3ce48371af624ff1ec0b6477b86823))
169
+
170
+ ## [1.1.1](https://github.com/Atom-Learning/components/compare/v1.1.0...v1.1.1) (2021-11-10)
171
+
172
+
173
+ ### Bug Fixes
174
+
175
+ * update snapshot ([e71c8a4](https://github.com/Atom-Learning/components/commit/e71c8a4f03227a29eeefca9d2afd7b6355a3ed46))
176
+
177
+ # [1.1.0](https://github.com/Atom-Learning/components/compare/v1.0.2...v1.1.0) (2021-11-05)
178
+
179
+
180
+ ### Features
181
+
182
+ * update dropdown item styles ([6bf229f](https://github.com/Atom-Learning/components/commit/6bf229fbfa9cffaaa74fda5d3629636a926a3404))
183
+
184
+ ## [1.0.2](https://github.com/Atom-Learning/components/compare/v1.0.1...v1.0.2) (2021-11-02)
185
+
186
+
187
+ ### Bug Fixes
188
+
189
+ * reinstate as type on heading and text ([1ec5ca7](https://github.com/Atom-Learning/components/commit/1ec5ca7d7ae09664bbd662cc21fee7784cf1bb3c))
190
+ * remove redundant flex styles for block Label ([54715ff](https://github.com/Atom-Learning/components/commit/54715ffc938231b4569a3ce4813c2e25d5404988))
191
+ * remove unnecessary overridden as & size types ([985231a](https://github.com/Atom-Learning/components/commit/985231a9259005a6b44cdfe20ba786f942dba81c))
192
+
193
+ ## [1.0.1](https://github.com/Atom-Learning/components/compare/v1.0.0...v1.0.1) (2021-11-02)
194
+
195
+
196
+ ### Bug Fixes
197
+
198
+ * remove cursor pointer from disabled tab ([34c283f](https://github.com/Atom-Learning/components/commit/34c283f70ce73d0ca2b2886e495bcece5475097c))
199
+
200
+ # 1.0.0 (2021-10-22)
201
+
202
+ - Initial release 🎉
203
+
204
+ # Changelog
205
+
206
+ All notable changes to this project will be documented in this file.
207
+
208
+ _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 a}from"@atom-learning/icons";import{Trigger as s}from"@radix-ui/react-accordion";import e from"react";import{ColorScheme as n}from"../../experiments/color-scheme/ColorScheme.js";import{styled as t}from"../../stitches.js";import"../../utilities/css-wrapper/CSSWrapper.js";import"../../utilities/no-overflow-wrapper/NoOverflowWrapper.js";import"color2k";import{focusVisibleStyleBlock as c}from"../../utilities/style/focus-visible-style-block.js";import"../../utilities/style/keyframe-animations.js";import{Icon as m}from"../icon/Icon.js";const d=t(m,{transition:"transform 300ms",'[data-state="open"] > &':{transform:"rotate(180deg)"},'[data-state="closed"] > &':{transform:"rotate(0deg)"}}),l=t(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":{...c()}},'&[data-state="open"]':{borderRadius:"$0 $0 0 0"},'&[data-state="closed"]':{borderRadius:"$0"}}),p=({children:o,colorScheme:r={},...i})=>e.createElement(n,{asChild:!0,accent:"grey1",interactive:"loContrast",...r},e.createElement(l,{...i},o,e.createElement(d,{is:a})));export{p as AccordionTrigger};
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 <RotatingIcon is={ChevronDown} />\n </StyledTrigger>\n </ColorScheme>\n)\n"],"names":["RotatingIcon","styled","Icon","StyledTrigger","Trigger","focusVisibleStyleBlock","AccordionTrigger","children","colorScheme","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,MACXC,CACL,IAGEC,EAAA,cAACC,EAAA,CAAY,QAAO,GAAC,OAAO,QAAQ,YAAY,aAAc,GAAGH,CAAAA,EAC/DE,EAAA,cAACP,EAAA,CAAe,GAAGM,CAChBF,EAAAA,EACDG,EAAA,cAACV,EAAA,CAAa,GAAIY,CAAAA,CAAa,CACjC,CACF"}
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 g from"invariant";import*as n from"react";import{useRouter as D}from"../../context/router/index.js";import{styled as z}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 M}from"../../utilities/style/disabledStyle.js";import{getExternalAnchorProps as v}from"../../utilities/uri/index.js";import{Icon as c}from"../icon/Icon.js";import{ActionIconSizeMap as x}from"./ActionIcon.constants.js";import{OptionalTooltipWrapper as C}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}}}),E=z("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]":M,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")]}),l=n.forwardRef(({children:r,theme:a="primary",appearance:i="simple",size:e="sm",label:$,href:d,target:y,disabled:m,hasTooltip:b=!0,tooltipSide:h,...f},w)=>{const{RouterLink:k}=D({href:d,target:y}),u=`A single ${c.displayName} component is permitted as a child of ${l.displayName}`;return g(n.Children.count(r)===1,u),n.createElement(C,{hasTooltip:b,label:$,tooltipSide:h},n.createElement(E,{...d?{as:k,href:m?null:d,target:y,onClick:void 0,"aria-disabled":!!m}:{type:"button"},...v(d),...f,"aria-label":$,theme:a,appearance:i,size:e,ref:w,disabled:m},n.Children.map(r,o=>{if(!n.isValidElement(o))throw new Error(u);return g(o.type===c,`Children of type ${o==null?void 0:o.type} aren't permitted. Only an ${c.displayName} component is allowed in ${l.displayName}`),n.cloneElement(o,{size:x[e],css:{...o.props.css?o.props.css:{}}})})))});l.displayName="ActionIcon";export{l as ActionIcon};
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 { useRouter } from '~/context/router'\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 target,\n disabled,\n hasTooltip = true,\n tooltipSide,\n ...remainingProps\n },\n ref\n ) => {\n const { RouterLink } = useRouter({ href, target })\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: RouterLink,\n href: disabled ? null : href,\n target,\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","target","disabled","hasTooltip","tooltipSide","remainingProps","ref","RouterLink","useRouter","INVALID_CHILDREN_MESSAGE","Icon","invariant","OptionalTooltipWrapper","getExternalAnchorProps","child","ActionIconSizeMap"],"mappings":"4qBAeA,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,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AAM,CAAE,WAAAC,CAAW,EAAIC,EAAU,CAAE,KAAAR,EAAM,OAAAC,CAAO,CAAC,EAE3CQ,EAA2B,YAAYC,EAAK,oDAAoDhB,EAAW,cAEjH,OAAAiB,EAAUhB,EAAM,SAAS,MAAMC,CAAQ,IAAM,EAAGa,CAAwB,EAatEd,EAAA,cAACiB,EAAA,CACC,WAAYT,EACZ,MAAOJ,EACP,YAAaK,CAEbT,EAAAA,EAAA,cAACJ,EAAA,CACE,GAjBmBS,EACrB,CACC,GAAIO,EACJ,KAAML,EAAW,KAAOF,EACxB,OAAAC,EACA,QAAS,OACT,gBAAiB,CAAC,CAACC,CACrB,EACC,CAAE,KAAM,QAAS,EAUf,GAAGW,EAAuBb,CAAI,EAC9B,GAAGK,EACJ,aAAYN,EACZ,MAAOd,EACP,WAAYY,EACZ,KAAMC,EACN,IAAKQ,EACL,SAAUJ,GAETP,EAAM,SAAS,IAAIC,EAAWkB,GAAU,CAGvC,GAAI,CAACnB,EAAM,eAAemB,CAAK,EAC7B,MAAM,IAAI,MAAML,CAAwB,EAG1C,OAAAE,EACEG,EAAM,OAASJ,EACf,oBAAoBI,GAAA,KAAAA,OAAAA,EAAO,kCAAkCJ,EAAK,uCAAuChB,EAAW,aACtH,EAEOC,EAAM,aAAamB,EAAO,CAC/B,KAAMC,EAAkBjB,GACxB,IAAK,CAAE,GAAIgB,EAAM,MAAM,IAAMA,EAAM,MAAM,IAAM,CAAA,CAAI,CACrD,CAAC,CACH,CAAC,CACH,CACF,CAEJ,CACF,EAEFpB,EAAW,YAAc"}
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,EAA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,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"}
@@ -3073,7 +3073,6 @@ export declare const BannerRegular: {
3073
3073
  ref?: ((instance: HTMLButtonElement | null) => void) | React.RefObject<HTMLButtonElement> | null | undefined;
3074
3074
  key?: React.Key | null | undefined;
3075
3075
  name?: string | undefined;
3076
- target?: string | undefined;
3077
3076
  defaultChecked?: boolean | undefined;
3078
3077
  defaultValue?: string | number | readonly string[] | undefined;
3079
3078
  suppressContentEditableWarning?: boolean | undefined;
@@ -1,2 +1,2 @@
1
- import a from"invariant";import*as n from"react";import{overrideStitchesVariantValue as m}from"../../../utilities/override-stitches-variant-value/overrideStitchesVariantValue.js";import{Flex as y}from"../../flex/Flex.js";import{useBannerContext as f}from"../BannerContext.js";import{BannerRegularButton as t}from"./BannerRegularButton.js";const l=2,h={sm:2,md:4},N={sm:"column",md:"row"},r=({children:i,...s})=>{const{size:o}=f(),p=n.useMemo(()=>m(o,e=>h[e]),[o]),d=n.useMemo(()=>m(o,e=>N[e]),[o]);return a(n.Children.count(i)<=l,`A maximum of ${l} ${t.displayName} component(s) are permitted as children of ${r.displayName}`),n.createElement(y,{gap:p,direction:d,...s},n.Children.map(i,(e,c)=>{if(e==null)return e;if(!n.isValidElement(e))throw new Error(`Child passed to ${r.displayName} is not a valid element`);a(e.type===t,`Children of type ${e==null?void 0:e.type} aren't permitted. Only an ${t.displayName} component is allowed in ${r.displayName}`);const u={appearance:c>0?"outline":void 0};return n.cloneElement(e,u)}))};r.displayName="BannerRegularActions";export{r as BannerRegularActions};
1
+ import a from"invariant";import*as n from"react";import{overrideStitchesVariantValue as m}from"../../../utilities/override-stitches-variant-value/overrideStitchesVariantValue.js";import{Flex as f}from"../../flex/Flex.js";import{useBannerContext as y}from"../BannerContext.js";import{BannerRegularButton as t}from"./BannerRegularButton.js";const l=2,h={sm:2,md:4},N={sm:"column",md:"row"},r=({children:i,...s})=>{const{size:o}=y(),p=n.useMemo(()=>m(o,e=>h[e]),[o]),d=n.useMemo(()=>m(o,e=>N[e]),[o]);return a(n.Children.count(i)<=l,`A maximum of ${l} ${t.displayName} component(s) are permitted as children of ${r.displayName}`),n.createElement(f,{gap:p,direction:d,...s},n.Children.map(i,(e,c)=>{if(e==null)return e;if(!n.isValidElement(e))throw new Error(`Child passed to ${r.displayName} is not a valid element`);a(e.type===t,`Children of type ${e==null?void 0:e.type} aren't permitted. Only an ${t.displayName} component is allowed in ${r.displayName}`);const u={appearance:c>0?"outline":void 0};return n.cloneElement(e,u)}))};r.displayName="BannerRegularActions";export{r as BannerRegularActions};
2
2
  //# sourceMappingURL=BannerRegularActions.js.map
@@ -2319,7 +2319,6 @@ export declare const BannerSlim: {
2319
2319
  ref?: ((instance: HTMLButtonElement | null) => void) | React.RefObject<HTMLButtonElement> | null | undefined;
2320
2320
  key?: React.Key | null | undefined;
2321
2321
  name?: string | undefined;
2322
- target?: string | undefined;
2323
2322
  defaultChecked?: boolean | undefined;
2324
2323
  defaultValue?: string | number | readonly string[] | undefined;
2325
2324
  suppressContentEditableWarning?: boolean | undefined;
@@ -1,2 +1,2 @@
1
- import{opacify as s}from"color2k";import*as i from"react";import{StyledIcon as l}from"../icon/Icon.js";import{Loader as f}from"../loader/Loader.js";import{useRouter as b}from"../../context/router/index.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 w}from"../../utilities/uri/index.js";const p=(r,t,e,a)=>({theme:r,appearance:"outline",css:{border:"1px solid",borderColor:"currentColor",color:t,"&[disabled]":d,"&:not([disabled]):hover, &:not([disabled]):focus":{textDecoration:"none",color:e},"&:not([disabled]):active":{color:a}}}),n=(r,t,e,a,o="white")=>({theme:r,appearance:"solid",css:{bg:t,color:o,"&[disabled]":d,"&:not([disabled]):hover, &:not([disabled]):focus":{bg:e,color:o},"&:not([disabled]):active":{bg:a}}}),$=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"}}),z=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"}}),x=({size:r,children:t})=>i.createElement(i.Fragment,null,i.createElement(f,{css:{position:"absolute"}}),i.createElement(z,{size:r},t)),g=i.forwardRef(({children:r,as:t,href:e,target:a,isLoading:o=!1,onClick:u,...m},h)=>{const{RouterLink:y}=b({href:e,target:a});return i.createElement($,{as:t||(e?y:void 0),href:e,isLoading:o,onClick:o?void 0:u,type:e?void 0:"button",target:a,...m,...w(e),ref:h},o?i.createElement(x,{size:m.size},r):r)});g.displayName="Button";export{g as Button,$ as StyledButton};
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 { useRouter } from '~/context/router'\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, target, isLoading = false, onClick, ...rest }, ref) => {\n const { RouterLink } = useRouter({ href, target })\n const component = as || (href ? RouterLink : undefined)\n\n return (\n <StyledButton\n as={component}\n href={href}\n isLoading={isLoading}\n onClick={!isLoading ? onClick : undefined}\n type={!href ? 'button' : undefined}\n target={target}\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 )\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","target","isLoading","onClick","rest","ref","RouterLink","useRouter","getExternalAnchorProps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AAOC,CAAS,CAC/C,EAaWG,EACXF,EAAM,WACJ,CAAC,CAAE,SAAAD,EAAU,GAAAI,EAAI,KAAAC,EAAM,OAAAC,EAAQ,UAAAC,EAAY,GAAO,QAAAC,KAAYC,CAAK,EAAGC,IAAQ,CAC5E,KAAM,CAAE,WAAAC,CAAW,EAAIC,EAAU,CAAE,KAAAP,EAAM,OAAAC,CAAO,CAAC,EAGjD,OACEL,EAAA,cAACR,EAAA,CACC,GAJcW,IAAOC,EAAOM,EAAa,QAKzC,KAAMN,EACN,UAAWE,EACX,QAAUA,EAAsB,OAAVC,EACtB,KAAOH,EAAkB,OAAX,SACd,OAAQC,EACP,GAAGG,EACH,GAAGI,EAAuBR,CAAI,EAC/B,IAAKK,CAAAA,EAEJH,EACCN,EAAA,cAACH,EAAA,CAAW,KAAMW,EAAK,IAAA,EAAOT,CAAS,EAEvCA,CAEJ,CAEJ,CACF,EAEFG,EAAO,YAAc"}
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":"ofAWA,MAAMA,EAA0B,CAC9BC,EACAC,EACA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AAE,SAAAD,EAAU,GAAAI,EAAI,KAAAC,EAAM,UAAAC,EAAY,GAAO,QAAAC,KAAYC,CAAK,EAAGC,IAC5DR,EAAA,cAACR,EACC,CAAA,GAAIW,IAAOC,EAAO,IAAM,QACxB,KAAMA,EACN,UAAWC,EACX,QAAUA,EAAsB,OAAVC,EACtB,KAAOF,EAAkB,OAAX,SACb,GAAGG,EACH,GAAGE,EAAuBL,CAAI,EAC/B,IAAKI,CAAAA,EAEJH,EACCL,EAAA,cAACH,EAAA,CAAW,KAAMU,EAAK,IAAA,EAAOR,CAAS,EAEvCA,CAEJ,CAEJ,EAEFG,EAAO,YAAc"}
@@ -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":"2CAEa,MAAAA,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,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"}
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"}
@@ -1,2 +1,2 @@
1
- import j from"invariant";import*as a from"react";import{useFormContext as E}from"react-hook-form";import{throttle as k}from"throttle-debounce";import{Box as P}from"../box/Box.js";import{Flex as S}from"../flex/Flex.js";import{InlineMessage as B}from"../inline-message/InlineMessage.js";import{PasswordField as D}from"../password-field/PasswordField.js";const c=({validate:d,defaultValidation:u,messageDirection:p="row",label:f="Create a password",name:r="password",css:v,validation:b,...w})=>{var s;const{formState:l}=E(),[i,n]=a.useState(!1),[C,m]=a.useState(u),y=l.touched[r],F=((s=l.errors[r])==null?void 0:s.type)==="validate",o=a.useCallback(async e=>{const t=await d(e);return t?(j(typeof t=="object","The validate function must return an object"),m(t),Object.values(t).every(h=>h)):!1},[m]),g=a.useCallback(k(500,o),[o]),x=(e,t)=>e?"success":t?"neutral":"error";return a.createElement(P,{css:v},a.createElement(D,{label:f,name:r,onChange:e=>g(e.target.value),onBlur:()=>n(!1),onFocus:()=>n(!0),validation:{...b,validate:o},...w}),(y||i||F)&&a.createElement(S,{css:{mt:"$2",gap:"$2",flexWrap:"wrap",flexDirection:p}},Object.entries(C).map(([e,t])=>a.createElement(B,{key:e,theme:x(t,i)},e))))};c.displayName="CreatePasswordField";export{c as CreatePasswordField};
1
+ import j from"invariant";import*as a from"react";import{useFormContext as E}from"react-hook-form";import{throttle as k}from"throttle-debounce";import{Box as P}from"../box/Box.js";import{Flex as S}from"../flex/Flex.js";import{InlineMessage as B}from"../inline-message/InlineMessage.js";import{PasswordField as D}from"../password-field/PasswordField.js";const c=({validate:d,defaultValidation:u,messageDirection:p="row",label:f="Create a password",name:r="password",css:v,validation:b,...w})=>{var s;const{formState:l}=E(),[i,n]=a.useState(!1),[C,m]=a.useState(u),g=l.touched[r],F=((s=l.errors[r])==null?void 0:s.type)==="validate",o=a.useCallback(async e=>{const t=await d(e);return t?(j(typeof t=="object","The validate function must return an object"),m(t),Object.values(t).every(h=>h)):!1},[m]),x=a.useCallback(k(500,o),[o]),y=(e,t)=>e?"success":t?"neutral":"error";return a.createElement(P,{css:v},a.createElement(D,{label:f,name:r,onChange:e=>x(e.target.value),onBlur:()=>n(!1),onFocus:()=>n(!0),validation:{...b,validate:o},...w}),(g||i||F)&&a.createElement(S,{css:{mt:"$2",gap:"$2",flexWrap:"wrap",flexDirection:p}},Object.entries(C).map(([e,t])=>a.createElement(B,{key:e,theme:y(t,i)},e))))};c.displayName="CreatePasswordField";export{c as CreatePasswordField};
2
2
  //# sourceMappingURL=CreatePasswordField.js.map