@strapi/design-system 1.6.6 → 1.7.0-alpha.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.
Files changed (82) hide show
  1. package/README.md +55 -0
  2. package/dist/BaseButton/BaseButton.cjs +1 -1
  3. package/dist/BaseButton/BaseButton.js +1 -1
  4. package/dist/BaseLink/BaseLink.cjs +1 -3
  5. package/dist/BaseLink/BaseLink.js +14 -14
  6. package/dist/Combobox/Combobox.cjs +104 -1
  7. package/dist/Combobox/Combobox.js +348 -278
  8. package/dist/Combobox/ComboboxList.cjs +1 -1
  9. package/dist/Combobox/ComboboxList.js +7 -6
  10. package/dist/Combobox/ComboboxOption.cjs +1 -1
  11. package/dist/Combobox/ComboboxOption.js +3 -29
  12. package/dist/DatePicker/DatePicker.cjs +6 -2
  13. package/dist/DatePicker/DatePicker.js +55 -49
  14. package/dist/DateTimePicker/parseDate.cjs +1 -0
  15. package/dist/DateTimePicker/parseDate.js +8 -0
  16. package/dist/NumberInput/NumberInput.cjs +2 -2
  17. package/dist/NumberInput/NumberInput.js +31 -31
  18. package/dist/Select/MultiSelect.cjs +30 -0
  19. package/dist/Select/MultiSelect.js +239 -0
  20. package/dist/Select/MultiSelectNested.cjs +3 -1
  21. package/dist/Select/MultiSelectNested.js +25 -12
  22. package/dist/Select/OptGroup.cjs +1 -1
  23. package/dist/Select/OptGroup.js +3 -22
  24. package/dist/Select/Option.cjs +1 -45
  25. package/dist/Select/Option.js +12 -100
  26. package/dist/Select/Select.cjs +1 -3
  27. package/dist/Select/Select.js +9 -207
  28. package/dist/Select/SelectList.cjs +1 -1
  29. package/dist/Select/SelectList.js +98 -80
  30. package/dist/Select/SelectParts.cjs +79 -0
  31. package/dist/Select/SelectParts.js +221 -0
  32. package/dist/Select/SingleSelect.cjs +1 -0
  33. package/dist/Select/SingleSelect.js +129 -0
  34. package/dist/Select/index.cjs +1 -1
  35. package/dist/Select/index.js +15 -10
  36. package/dist/TimePicker/TimePicker.cjs +2 -2
  37. package/dist/TimePicker/TimePicker.js +42 -40
  38. package/dist/helpers/objects.cjs +1 -1
  39. package/dist/helpers/objects.js +6 -22
  40. package/dist/hooks/useComposeRefs.cjs +1 -0
  41. package/dist/hooks/useComposeRefs.js +14 -0
  42. package/dist/hooks/useIntersection.cjs +1 -1
  43. package/dist/hooks/useIntersection.js +7 -7
  44. package/dist/index.cjs +1 -1
  45. package/dist/index.js +143 -138
  46. package/dist/themes/extendTheme.cjs +4 -4
  47. package/dist/themes/extendTheme.js +21 -13
  48. package/dist/themes/utils.cjs +6 -6
  49. package/dist/themes/utils.js +7 -6
  50. package/dist/v2/Link/Link.cjs +13 -11
  51. package/dist/v2/Link/Link.js +52 -37
  52. package/dist/v2/SimpleMenu/Menu.cjs +65 -0
  53. package/dist/v2/SimpleMenu/Menu.js +229 -0
  54. package/dist/v2/SimpleMenu/SimpleMenu.cjs +1 -33
  55. package/dist/v2/SimpleMenu/SimpleMenu.js +37 -176
  56. package/dist/v2/SimpleMenu/index.cjs +1 -1
  57. package/dist/v2/SimpleMenu/index.js +5 -3
  58. package/dist/v2/index.cjs +1 -1
  59. package/dist/v2/index.js +53 -51
  60. package/package.json +6 -19
  61. package/dist/Combobox/components.cjs +0 -53
  62. package/dist/Combobox/components.js +0 -64
  63. package/dist/Combobox/utils.cjs +0 -1
  64. package/dist/Combobox/utils.js +0 -78
  65. package/dist/Select/SelectButton.cjs +0 -19
  66. package/dist/Select/SelectButton.js +0 -69
  67. package/dist/Select/SelectTags.cjs +0 -6
  68. package/dist/Select/SelectTags.js +0 -38
  69. package/dist/Select/components.cjs +0 -39
  70. package/dist/Select/components.js +0 -48
  71. package/dist/Select/constants.cjs +0 -1
  72. package/dist/Select/constants.js +0 -8
  73. package/dist/Select/hooks/useButtonRef.cjs +0 -1
  74. package/dist/Select/hooks/useButtonRef.js +0 -13
  75. package/dist/Select/hooks/useListRef.cjs +0 -1
  76. package/dist/Select/hooks/useListRef.js +0 -18
  77. package/dist/Select/utils.cjs +0 -1
  78. package/dist/Select/utils.js +0 -17
  79. package/dist/helpers/arrays.cjs +0 -1
  80. package/dist/helpers/arrays.js +0 -6
  81. package/dist/v2/SimpleMenu/utils.cjs +0 -12
  82. package/dist/v2/SimpleMenu/utils.js +0 -15
package/dist/index.js CHANGED
@@ -3,17 +3,17 @@ import { AccordionContent as m } from "./Accordion/AccordionContent.js";
3
3
  import { AccordionToggle as f } from "./Accordion/AccordionToggle.js";
4
4
  import { AccordionGroup as i } from "./Accordion/AccordionGroup.js";
5
5
  import { Alert as d } from "./Alert/Alert.js";
6
- import { Avatar as l, Initials as s } from "./Avatar/Avatar.js";
7
- import { AvatarGroup as c } from "./Avatar/AvatarGroup.js";
8
- import { Badge as C } from "./Badge/Badge.js";
6
+ import { Avatar as l, Initials as c } from "./Avatar/Avatar.js";
7
+ import { AvatarGroup as T } from "./Avatar/AvatarGroup.js";
8
+ import { Badge as S } from "./Badge/Badge.js";
9
9
  import { BaseButton as v, BaseButtonWrapper as y } from "./BaseButton/BaseButton.js";
10
- import { BaseCheckbox as B } from "./BaseCheckbox/BaseCheckbox.js";
10
+ import { BaseCheckbox as L } from "./BaseCheckbox/BaseCheckbox.js";
11
11
  import { BaseLink as N } from "./BaseLink/BaseLink.js";
12
12
  import { BaseRadio as k } from "./BaseRadio/BaseRadio.js";
13
13
  import { RadioGroup as P } from "./BaseRadio/RadioGroup.js";
14
14
  import { Box as I } from "./Box/Box.js";
15
- import { Breadcrumbs as M, Crumb as G } from "./Breadcrumbs/Breadcrumbs.js";
16
- import { Button as D, ButtonWrapper as H } from "./Button/Button.js";
15
+ import { Breadcrumbs as R, Crumb as G } from "./Breadcrumbs/Breadcrumbs.js";
16
+ import { Button as D, ButtonWrapper as O } from "./Button/Button.js";
17
17
  import { Card as E } from "./Card/Card.js";
18
18
  import { CardAction as V } from "./Card/CardAction.js";
19
19
  import { CardAsset as J } from "./Card/CardAsset.js";
@@ -28,18 +28,18 @@ import { Carousel as xo } from "./CarouselInput/Carousel.js";
28
28
  import { CarouselInput as ao } from "./CarouselInput/CarouselInput.js";
29
29
  import { CarouselActions as no } from "./CarouselInput/CarouselActions.js";
30
30
  import { CarouselImage as lo } from "./CarouselInput/CarouselImage.js";
31
- import { CarouselSlide as To } from "./CarouselInput/CarouselSlide.js";
31
+ import { CarouselSlide as so } from "./CarouselInput/CarouselSlide.js";
32
32
  import { Checkbox as bo } from "./Checkbox/Checkbox.js";
33
- import { Combobox as So, CreatableCombobox as vo } from "./Combobox/Combobox.js";
34
- import { ComboboxOption as Lo } from "./Combobox/ComboboxOption.js";
35
- import { Dialog as go } from "./Dialog/Dialog.js";
33
+ import { Combobox as Co, CreatableCombobox as vo } from "./Combobox/Combobox.js";
34
+ import { ComboboxOption as go } from "./Combobox/ComboboxOption.js";
35
+ import { Dialog as Bo } from "./Dialog/Dialog.js";
36
36
  import { DialogBody as ho } from "./Dialog/DialogBody.js";
37
37
  import { DialogFooter as Fo } from "./Dialog/DialogFooter.js";
38
38
  import { DismissibleLayer as Ao } from "./DismissibleLayer/DismissibleLayer.js";
39
- import { DatePicker as Ro } from "./DatePicker/DatePicker.js";
39
+ import { DatePicker as Mo } from "./DatePicker/DatePicker.js";
40
40
  import { DateTimePicker as Go } from "./DateTimePicker/DateTimePicker.js";
41
41
  import { Divider as Do } from "./Divider/Divider.js";
42
- import { EmptyStateLayout as Oo } from "./EmptyStateLayout/EmptyStateLayout.js";
42
+ import { EmptyStateLayout as Ho } from "./EmptyStateLayout/EmptyStateLayout.js";
43
43
  import { Field as Wo } from "./Field/Field.js";
44
44
  import { FieldLabel as zo } from "./Field/FieldLabel.js";
45
45
  import { FieldInput as Ko, InputWrapper as Uo } from "./Field/FieldInput.js";
@@ -53,18 +53,18 @@ import { GridItem as xr } from "./Grid/GridItem.js";
53
53
  import { Icon as ar } from "./Icon/Icon.js";
54
54
  import { IconButton as nr, IconButtonGroup as dr } from "./IconButton/IconButton.js";
55
55
  import { JSONInput as lr } from "./JSONInput/JSONInput.js";
56
- import { KeyboardNavigable as Tr } from "./KeyboardNavigable/KeyboardNavigable.js";
56
+ import { KeyboardNavigable as sr } from "./KeyboardNavigable/KeyboardNavigable.js";
57
57
  import { Layout as br } from "./Layout/Layout.js";
58
- import { ActionLayout as Sr } from "./Layout/ActionLayout.js";
58
+ import { ActionLayout as Cr } from "./Layout/ActionLayout.js";
59
59
  import { ContentLayout as yr } from "./Layout/ContentLayout.js";
60
- import { BaseHeaderLayout as Br, HeaderLayout as gr } from "./Layout/HeaderLayout.js";
60
+ import { BaseHeaderLayout as Lr, HeaderLayout as Br } from "./Layout/HeaderLayout.js";
61
61
  import { TwoColsLayout as hr } from "./Layout/TwoColsLayout.js";
62
62
  import { GridLayout as Fr } from "./Layout/GridLayout.js";
63
63
  import { Link as Ar } from "./Link/Link.js";
64
- import { LinkButton as Rr } from "./LinkButton/LinkButton.js";
64
+ import { LinkButton as Mr } from "./LinkButton/LinkButton.js";
65
65
  import { useNotifyAT as Gr } from "./LiveRegions/useNotifyAT.js";
66
66
  import { LiveRegions as Dr } from "./LiveRegions/LiveRegions.js";
67
- import { Loader as Or } from "./Loader/Loader.js";
67
+ import { Loader as Hr } from "./Loader/Loader.js";
68
68
  import { Main as Wr } from "./Main/Main.js";
69
69
  import { SkipToContent as zr } from "./Main/SkipToContent.js";
70
70
  import { MainNav as Kr } from "./MainNav/MainNav.js";
@@ -79,83 +79,84 @@ import { ModalLayout as xe } from "./ModalLayout/ModalLayout.js";
79
79
  import { ModalHeader as ae } from "./ModalLayout/ModalHeader.js";
80
80
  import { ModalFooter as ne } from "./ModalLayout/ModalFooter.js";
81
81
  import { ModalBody as ue } from "./ModalLayout/ModalBody.js";
82
- import { NumberInput as se } from "./NumberInput/NumberInput.js";
83
- import { Pagination as ce } from "./Pagination/Pagination.js";
84
- import { Dots as Ce, NextLink as Se, PageLink as ve, PreviousLink as ye } from "./Pagination/components.js";
85
- import { PopoverPrimitives as Be } from "./Popover/index.js";
82
+ import { NumberInput as ce } from "./NumberInput/NumberInput.js";
83
+ import { Pagination as Te } from "./Pagination/Pagination.js";
84
+ import { Dots as Se, NextLink as Ce, PageLink as ve, PreviousLink as ye } from "./Pagination/components.js";
85
+ import { PopoverPrimitives as Le } from "./Popover/index.js";
86
86
  import { Portal as Ne } from "./Portal/Portal.js";
87
87
  import { ProgressBar as ke } from "./ProgressBar/ProgressBar.js";
88
88
  import { Radio as Pe } from "./Radio/Radio.js";
89
89
  import { RawTable as Ie } from "./RawTable/RawTable.js";
90
- import { RawTd as Me, RawTh as Ge } from "./RawTable/RawCell.js";
90
+ import { RawTd as Re, RawTh as Ge } from "./RawTable/RawCell.js";
91
91
  import { RawThead as De } from "./RawTable/RawThead.js";
92
- import { RawTbody as Oe } from "./RawTable/RawTbody.js";
92
+ import { RawTbody as He } from "./RawTable/RawTbody.js";
93
93
  import { RawTr as We } from "./RawTable/RawTr.js";
94
94
  import { Flex as ze } from "./Flex/Flex.js";
95
95
  import { Searchbar as Ke } from "./Searchbar/Searchbar.js";
96
96
  import { SearchForm as _e } from "./Searchbar/SearchForm.js";
97
- import { Select as qe } from "./Select/Select.js";
98
- import { Option as Xe } from "./Select/Option.js";
99
- import { OptGroup as Ze } from "./Select/OptGroup.js";
100
- import { MultiSelectNested as ot } from "./Select/MultiSelectNested.js";
101
- import { SelectList as et } from "./Select/SelectList.js";
102
- import { MenuItem as pt, SimpleMenu as mt } from "./SimpleMenu/SimpleMenu.js";
103
- import { Stack as ft } from "./Stack/Stack.js";
104
- import { Status as it } from "./Status/Status.js";
105
- import { SubNav as dt, subNavWidth as ut } from "./SubNav/SubNav.js";
106
- import { SubNavHeader as st } from "./SubNav/SubNavHeader.js";
107
- import { SubNavLink as ct } from "./SubNav/SubNavLink.js";
108
- import { SubNavLinkSection as Ct } from "./SubNav/SubNavLinkSection.js";
109
- import { SubNavSection as vt } from "./SubNav/SubNavSection.js";
110
- import { SubNavSections as Lt } from "./SubNav/SubNavSections.js";
111
- import { Switch as gt } from "./Switch/Switch.js";
112
- import { Tab as ht, Tabs as kt } from "./Tabs/Tabs.js";
113
- import { TabPanel as Pt, TabPanels as At } from "./Tabs/TabPanels.js";
114
- import { TabGroup as Rt } from "./Tabs/TabGroup.js";
115
- import { Table as Gt } from "./Table/Table.js";
116
- import { Tbody as Dt } from "./Table/Tbody.js";
117
- import { Thead as Ot } from "./Table/Thead.js";
118
- import { Tr as Wt } from "./Table/Tr.js";
119
- import { Td as zt, Th as Jt } from "./Table/Cell.js";
120
- import { TFooter as Ut } from "./Table/TFooter.js";
121
- import { Tag as jt } from "./Tag/Tag.js";
122
- import { TextButton as Qt } from "./TextButton/TextButton.js";
123
- import { TextInput as Yt } from "./TextInput/TextInput.js";
124
- import { Textarea as $t } from "./Textarea/Textarea.js";
125
- import { ThemeProvider as rp } from "./ThemeProvider/ThemeProvider.js";
126
- import { useTheme as tp } from "./ThemeProvider/hooks.js";
127
- import { TimePicker as mp } from "./TimePicker/TimePicker.js";
128
- import { ToggleCheckbox as fp } from "./ToggleCheckbox/ToggleCheckbox.js";
129
- import { ToggleInput as ip } from "./ToggleInput/ToggleInput.js";
130
- import { Tooltip as dp } from "./Tooltip/Tooltip.js";
131
- import { Typography as lp } from "./Typography/Typography.js";
132
- import { VisuallyHidden as Tp } from "./VisuallyHidden/VisuallyHidden.js";
133
- import { lightTheme as bp } from "./themes/lightTheme/index.js";
134
- import { darkTheme as Sp } from "./themes/darkTheme/index.js";
135
- import { extendTheme as yp } from "./themes/extendTheme.js";
136
- import { buttonFocusStyle as Bp, getThemeSize as gp, inputFocusStyle as Np } from "./themes/utils.js";
137
- import { POPOVER_PLACEMENTS as kp, Popover as Fp } from "./Popover/Popover.js";
97
+ import { MultiSelectNested as qe } from "./Select/MultiSelectNested.js";
98
+ import { MultiSelect as Xe, MultiSelectGroup as Ye, MultiSelectOption as Ze } from "./Select/MultiSelect.js";
99
+ import { SingleSelect as ot, SingleSelectOption as rt } from "./Select/SingleSelect.js";
100
+ import { Option as tt } from "./Select/Option.js";
101
+ import { OptGroup as mt } from "./Select/OptGroup.js";
102
+ import { SelectList as ft } from "./Select/SelectList.js";
103
+ import { MenuItem as it, SimpleMenu as nt } from "./SimpleMenu/SimpleMenu.js";
104
+ import { Stack as ut } from "./Stack/Stack.js";
105
+ import { Status as ct } from "./Status/Status.js";
106
+ import { SubNav as Tt, subNavWidth as bt } from "./SubNav/SubNav.js";
107
+ import { SubNavHeader as Ct } from "./SubNav/SubNavHeader.js";
108
+ import { SubNavLink as yt } from "./SubNav/SubNavLink.js";
109
+ import { SubNavLinkSection as Lt } from "./SubNav/SubNavLinkSection.js";
110
+ import { SubNavSection as Nt } from "./SubNav/SubNavSection.js";
111
+ import { SubNavSections as kt } from "./SubNav/SubNavSections.js";
112
+ import { Switch as Pt } from "./Switch/Switch.js";
113
+ import { Tab as It, Tabs as Mt } from "./Tabs/Tabs.js";
114
+ import { TabPanel as Gt, TabPanels as wt } from "./Tabs/TabPanels.js";
115
+ import { TabGroup as Ot } from "./Tabs/TabGroup.js";
116
+ import { Table as Et } from "./Table/Table.js";
117
+ import { Tbody as Vt } from "./Table/Tbody.js";
118
+ import { Thead as Jt } from "./Table/Thead.js";
119
+ import { Tr as Ut } from "./Table/Tr.js";
120
+ import { Td as jt, Th as qt } from "./Table/Cell.js";
121
+ import { TFooter as Xt } from "./Table/TFooter.js";
122
+ import { Tag as Zt } from "./Tag/Tag.js";
123
+ import { TextButton as op } from "./TextButton/TextButton.js";
124
+ import { TextInput as ep } from "./TextInput/TextInput.js";
125
+ import { Textarea as pp } from "./Textarea/Textarea.js";
126
+ import { ThemeProvider as xp } from "./ThemeProvider/ThemeProvider.js";
127
+ import { useTheme as ap } from "./ThemeProvider/hooks.js";
128
+ import { TimePicker as np } from "./TimePicker/TimePicker.js";
129
+ import { ToggleCheckbox as up } from "./ToggleCheckbox/ToggleCheckbox.js";
130
+ import { ToggleInput as cp } from "./ToggleInput/ToggleInput.js";
131
+ import { Tooltip as Tp } from "./Tooltip/Tooltip.js";
132
+ import { Typography as Sp } from "./Typography/Typography.js";
133
+ import { VisuallyHidden as vp } from "./VisuallyHidden/VisuallyHidden.js";
134
+ import { lightTheme as gp } from "./themes/lightTheme/index.js";
135
+ import { darkTheme as Bp } from "./themes/darkTheme/index.js";
136
+ import { extendTheme as hp } from "./themes/extendTheme.js";
137
+ import { buttonFocusStyle as Fp, getThemeSize as Pp, inputFocusStyle as Ap } from "./themes/utils.js";
138
+ import { POPOVER_PLACEMENTS as Mp, Popover as Rp } from "./Popover/Popover.js";
138
139
  export {
139
140
  e as Accordion,
140
141
  m as AccordionContent,
141
142
  i as AccordionGroup,
142
143
  f as AccordionToggle,
143
144
  t as AccordionTypography,
144
- Sr as ActionLayout,
145
+ Cr as ActionLayout,
145
146
  d as Alert,
146
147
  l as Avatar,
147
- c as AvatarGroup,
148
- C as Badge,
148
+ T as AvatarGroup,
149
+ S as Badge,
149
150
  v as BaseButton,
150
151
  y as BaseButtonWrapper,
151
- B as BaseCheckbox,
152
- Br as BaseHeaderLayout,
152
+ L as BaseCheckbox,
153
+ Lr as BaseHeaderLayout,
153
154
  N as BaseLink,
154
155
  k as BaseRadio,
155
156
  I as Box,
156
- M as Breadcrumbs,
157
+ R as Breadcrumbs,
157
158
  D as Button,
158
- H as ButtonWrapper,
159
+ O as ButtonWrapper,
159
160
  E as Card,
160
161
  V as CardAction,
161
162
  J as CardAsset,
@@ -171,22 +172,22 @@ export {
171
172
  no as CarouselActions,
172
173
  lo as CarouselImage,
173
174
  ao as CarouselInput,
174
- To as CarouselSlide,
175
+ so as CarouselSlide,
175
176
  bo as Checkbox,
176
- So as Combobox,
177
- Lo as ComboboxOption,
177
+ Co as Combobox,
178
+ go as ComboboxOption,
178
179
  yr as ContentLayout,
179
180
  vo as CreatableCombobox,
180
181
  G as Crumb,
181
- Ro as DatePicker,
182
+ Mo as DatePicker,
182
183
  Go as DateTimePicker,
183
- go as Dialog,
184
+ Bo as Dialog,
184
185
  ho as DialogBody,
185
186
  Fo as DialogFooter,
186
187
  Ao as DismissibleLayer,
187
188
  Do as Divider,
188
- Ce as Dots,
189
- Oo as EmptyStateLayout,
189
+ Se as Dots,
190
+ Ho as EmptyStateLayout,
190
191
  Wo as Field,
191
192
  or as FieldAction,
192
193
  Yo as FieldContext,
@@ -199,27 +200,30 @@ export {
199
200
  pr as Grid,
200
201
  xr as GridItem,
201
202
  Fr as GridLayout,
202
- gr as HeaderLayout,
203
+ Br as HeaderLayout,
203
204
  ar as Icon,
204
205
  nr as IconButton,
205
206
  dr as IconButtonGroup,
206
- s as Initials,
207
+ c as Initials,
207
208
  Uo as InputWrapper,
208
209
  lr as JSONInput,
209
- Tr as KeyboardNavigable,
210
+ sr as KeyboardNavigable,
210
211
  br as Layout,
211
212
  Ar as Link,
212
- Rr as LinkButton,
213
+ Mr as LinkButton,
213
214
  Dr as LiveRegions,
214
- Or as Loader,
215
+ Hr as Loader,
215
216
  Wr as Main,
216
217
  Kr as MainNav,
217
- pt as MenuItem,
218
+ it as MenuItem,
218
219
  ue as ModalBody,
219
220
  ne as ModalFooter,
220
221
  ae as ModalHeader,
221
222
  xe as ModalLayout,
222
- ot as MultiSelectNested,
223
+ Xe as MultiSelect,
224
+ Ye as MultiSelectGroup,
225
+ qe as MultiSelectNested,
226
+ Ze as MultiSelectOption,
223
227
  _r as NavBrand,
224
228
  qr as NavCondense,
225
229
  Xr as NavFooter,
@@ -227,73 +231,74 @@ export {
227
231
  oe as NavSection,
228
232
  ee as NavSections,
229
233
  pe as NavUser,
230
- Se as NextLink,
231
- se as NumberInput,
232
- Ze as OptGroup,
233
- Xe as Option,
234
- kp as POPOVER_PLACEMENTS,
234
+ Ce as NextLink,
235
+ ce as NumberInput,
236
+ mt as OptGroup,
237
+ tt as Option,
238
+ Mp as POPOVER_PLACEMENTS,
235
239
  ve as PageLink,
236
- ce as Pagination,
237
- Fp as Popover,
238
- Be as PopoverPrimitives,
240
+ Te as Pagination,
241
+ Rp as Popover,
242
+ Le as PopoverPrimitives,
239
243
  Ne as Portal,
240
244
  ye as PreviousLink,
241
245
  ke as ProgressBar,
242
246
  Pe as Radio,
243
247
  P as RadioGroup,
244
248
  Ie as RawTable,
245
- Oe as RawTbody,
246
- Me as RawTd,
249
+ He as RawTbody,
250
+ Re as RawTd,
247
251
  Ge as RawTh,
248
252
  De as RawThead,
249
253
  We as RawTr,
250
254
  _e as SearchForm,
251
255
  Ke as Searchbar,
252
- qe as Select,
253
- et as SelectList,
254
- mt as SimpleMenu,
256
+ ft as SelectList,
257
+ nt as SimpleMenu,
258
+ ot as SingleSelect,
259
+ rt as SingleSelectOption,
255
260
  zr as SkipToContent,
256
- ft as Stack,
257
- it as Status,
258
- dt as SubNav,
259
- st as SubNavHeader,
260
- ct as SubNavLink,
261
- Ct as SubNavLinkSection,
262
- vt as SubNavSection,
263
- Lt as SubNavSections,
264
- gt as Switch,
265
- Ut as TFooter,
266
- ht as Tab,
267
- Rt as TabGroup,
268
- Pt as TabPanel,
269
- At as TabPanels,
270
- Gt as Table,
271
- kt as Tabs,
272
- jt as Tag,
273
- Dt as Tbody,
274
- zt as Td,
275
- Qt as TextButton,
276
- Yt as TextInput,
277
- $t as Textarea,
278
- Jt as Th,
279
- Ot as Thead,
280
- rp as ThemeProvider,
281
- mp as TimePicker,
282
- fp as ToggleCheckbox,
283
- ip as ToggleInput,
284
- dp as Tooltip,
285
- Wt as Tr,
261
+ ut as Stack,
262
+ ct as Status,
263
+ Tt as SubNav,
264
+ Ct as SubNavHeader,
265
+ yt as SubNavLink,
266
+ Lt as SubNavLinkSection,
267
+ Nt as SubNavSection,
268
+ kt as SubNavSections,
269
+ Pt as Switch,
270
+ Xt as TFooter,
271
+ It as Tab,
272
+ Ot as TabGroup,
273
+ Gt as TabPanel,
274
+ wt as TabPanels,
275
+ Et as Table,
276
+ Mt as Tabs,
277
+ Zt as Tag,
278
+ Vt as Tbody,
279
+ jt as Td,
280
+ op as TextButton,
281
+ ep as TextInput,
282
+ pp as Textarea,
283
+ qt as Th,
284
+ Jt as Thead,
285
+ xp as ThemeProvider,
286
+ np as TimePicker,
287
+ up as ToggleCheckbox,
288
+ cp as ToggleInput,
289
+ Tp as Tooltip,
290
+ Ut as Tr,
286
291
  hr as TwoColsLayout,
287
- lp as Typography,
288
- Tp as VisuallyHidden,
289
- Bp as buttonFocusStyle,
290
- Sp as darkTheme,
291
- yp as extendTheme,
292
- gp as getThemeSize,
293
- Np as inputFocusStyle,
294
- bp as lightTheme,
295
- ut as subNavWidth,
292
+ Sp as Typography,
293
+ vp as VisuallyHidden,
294
+ Fp as buttonFocusStyle,
295
+ Bp as darkTheme,
296
+ hp as extendTheme,
297
+ Pp as getThemeSize,
298
+ Ap as inputFocusStyle,
299
+ gp as lightTheme,
300
+ bt as subNavWidth,
296
301
  Zo as useField,
297
302
  Gr as useNotifyAT,
298
- tp as useTheme
303
+ ap as useTheme
299
304
  };
@@ -1,5 +1,5 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("./lightTheme/index.cjs"),r=require("../helpers/objects.cjs"),n=t=>`
2
- ${t}
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("lodash"),d=require("./lightTheme/index.cjs"),n=require("../helpers/objects.cjs"),h=r=>`
2
+ ${r}
3
3
 
4
4
  The following is an example:
5
5
 
@@ -7,7 +7,7 @@ The following is an example:
7
7
  import { lightTheme, extendTheme } from '@strapi/design-system';
8
8
 
9
9
  const myCustomTheme = extendTheme(lightTheme, {
10
- ${Object.keys(s.lightTheme).map(e=>`${e}: /* put the overrides for the ${e} key */,`).join(`
10
+ ${Object.keys(d.lightTheme).map(t=>`${t}: /* put the overrides for the ${t} key */,`).join(`
11
11
  `)}
12
12
  })
13
- `,h=(t,e)=>{if(!r.isObject(t)){const o=n("The first argument should be an object and corresponds to the theme you want to extend.");throw new Error(o)}if(!r.isObject(e)){const o=n("The second argument should be an object and corresponds to the keys of the theme you want to override.");throw new Error(o)}return r.mergeDeep(t??{},e??{})};exports.extendTheme=h;
13
+ `,u=(r,t)=>{if(!n.isObject(r)){const e=h("The first argument should be an object and corresponds to the theme you want to extend.");throw new Error(e)}if(!n.isObject(t)){const e=h("The second argument should be an object and corresponds to the keys of the theme you want to override.");throw new Error(e)}function c(e,s){if(Array.isArray(e))return s;if(n.isObject(e)&&n.isObject(s))return o.merge(e,s)}const i=o.cloneDeep(r??{}),m=o.cloneDeep(t??{});return o.assignWith(i,m,c),i};exports.extendTheme=u;
@@ -1,6 +1,7 @@
1
- import { lightTheme as h } from "./lightTheme/index.js";
2
- import { isObject as r, mergeDeep as m } from "../helpers/objects.js";
3
- const n = (t) => `
1
+ import { cloneDeep as m, assignWith as c, merge as a } from "lodash";
2
+ import { lightTheme as f } from "./lightTheme/index.js";
3
+ import { isObject as o } from "../helpers/objects.js";
4
+ const i = (t) => `
4
5
  ${t}
5
6
 
6
7
  The following is an example:
@@ -9,20 +10,27 @@ The following is an example:
9
10
  import { lightTheme, extendTheme } from '@strapi/design-system';
10
11
 
11
12
  const myCustomTheme = extendTheme(lightTheme, {
12
- ${Object.keys(h).map((e) => `${e}: /* put the overrides for the ${e} key */,`).join(`
13
+ ${Object.keys(f).map((r) => `${r}: /* put the overrides for the ${r} key */,`).join(`
13
14
  `)}
14
15
  })
15
- `, a = (t, e) => {
16
- if (!r(t)) {
17
- const o = n("The first argument should be an object and corresponds to the theme you want to extend.");
18
- throw new Error(o);
16
+ `, g = (t, r) => {
17
+ if (!o(t)) {
18
+ const e = i("The first argument should be an object and corresponds to the theme you want to extend.");
19
+ throw new Error(e);
19
20
  }
20
- if (!r(e)) {
21
- const o = n("The second argument should be an object and corresponds to the keys of the theme you want to override.");
22
- throw new Error(o);
21
+ if (!o(r)) {
22
+ const e = i("The second argument should be an object and corresponds to the keys of the theme you want to override.");
23
+ throw new Error(e);
23
24
  }
24
- return m(t ?? {}, e ?? {});
25
+ function h(e, n) {
26
+ if (Array.isArray(e))
27
+ return n;
28
+ if (o(e) && o(n))
29
+ return a(e, n);
30
+ }
31
+ const s = m(t ?? {}), d = m(r ?? {});
32
+ return c(s, d, h), s;
25
33
  };
26
34
  export {
27
- a as extendTheme
35
+ g as extendTheme
28
36
  };
@@ -1,17 +1,17 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=t=>({theme:o,size:r})=>o.sizes[t][r],i=(t="&")=>({theme:o,hasError:r})=>`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("styled-components"),s=t=>({theme:o,size:e})=>o.sizes[t][e],i=(t="&")=>({theme:o,hasError:e})=>r.css`
2
2
  outline: none;
3
3
  box-shadow: 0;
4
4
  transition-property: border-color, box-shadow, fill;
5
5
  transition-duration: 0.2s;
6
6
 
7
7
  ${t}:focus-within {
8
- border: 1px solid ${r?o.colors.danger600:o.colors.primary600};
9
- box-shadow: ${r?o.colors.danger600:o.colors.primary600} 0px 0px 0px 2px;
8
+ border: 1px solid ${e?o.colors.danger600:o.colors.primary600};
9
+ box-shadow: ${e?o.colors.danger600:o.colors.primary600} 0px 0px 0px 2px;
10
10
  }
11
- `,n=({theme:t})=>`
11
+ `,n=({theme:t})=>r.css`
12
12
  position: relative;
13
13
  outline: none;
14
-
14
+
15
15
  &:after {
16
16
  transition-property: all;
17
17
  transition-duration: 0.2s;
@@ -38,4 +38,4 @@
38
38
  border: 2px solid ${t.colors.primary600};
39
39
  }
40
40
  }
41
- `;exports.buttonFocusStyle=n;exports.getThemeSize=e;exports.inputFocusStyle=i;
41
+ `;exports.buttonFocusStyle=n;exports.getThemeSize=s;exports.inputFocusStyle=i;
@@ -1,4 +1,5 @@
1
- const i = (t) => ({ theme: o, size: r }) => o.sizes[t][r], n = (t = "&") => ({ theme: o, hasError: r }) => `
1
+ import { css as i } from "styled-components";
2
+ const s = (t) => ({ theme: o, size: r }) => o.sizes[t][r], p = (t = "&") => ({ theme: o, hasError: r }) => i`
2
3
  outline: none;
3
4
  box-shadow: 0;
4
5
  transition-property: border-color, box-shadow, fill;
@@ -8,10 +9,10 @@ const i = (t) => ({ theme: o, size: r }) => o.sizes[t][r], n = (t = "&") => ({ t
8
9
  border: 1px solid ${r ? o.colors.danger600 : o.colors.primary600};
9
10
  box-shadow: ${r ? o.colors.danger600 : o.colors.primary600} 0px 0px 0px 2px;
10
11
  }
11
- `, s = ({ theme: t }) => `
12
+ `, e = ({ theme: t }) => i`
12
13
  position: relative;
13
14
  outline: none;
14
-
15
+
15
16
  &:after {
16
17
  transition-property: all;
17
18
  transition-duration: 0.2s;
@@ -40,7 +41,7 @@ const i = (t) => ({ theme: o, size: r }) => o.sizes[t][r], n = (t = "&") => ({ t
40
41
  }
41
42
  `;
42
43
  export {
43
- s as buttonFocusStyle,
44
- i as getThemeSize,
45
- n as inputFocusStyle
44
+ e as buttonFocusStyle,
45
+ s as getThemeSize,
46
+ p as inputFocusStyle
46
47
  };
@@ -1,23 +1,25 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const f=require("react"),y=require("@strapi/icons"),m=require("prop-types"),g=require("styled-components"),h=require("../../BaseLink/BaseLink.cjs"),v=require("../../Box/Box.cjs"),L=require("../../themes/utils.cjs"),k=require("../../Typography/Typography.cjs"),l=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},t=l(f),a=l(m),u=l(g),q=u.default(h.BaseLink)`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react/jsx-runtime"),p=require("react"),y=require("@strapi/icons"),d=require("styled-components"),f=require("../../BaseLink/BaseLink.cjs"),m=require("../../themes/utils.cjs"),g=require("../../Typography/Typography.cjs"),i=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},j=i(p),L=i(d),k=L.default(f.BaseLink)`
2
2
  display: inline-flex;
3
3
  align-items: center;
4
4
  text-decoration: none;
5
+ gap: ${({theme:e})=>e.spaces[2]};
5
6
  pointer-events: ${({disabled:e})=>e?"none":void 0};
6
7
 
7
- svg path {
8
- fill: ${({disabled:e,theme:r})=>e?r.colors.neutral600:r.colors.primary600};
9
- }
10
-
11
8
  svg {
12
9
  font-size: ${10/16}rem;
10
+
11
+ path {
12
+ fill: ${({disabled:e,theme:t})=>e?t.colors.neutral600:t.colors.primary600};
13
+ }
14
+ }
15
+
16
+ &:hover {
17
+ color: ${({theme:e})=>e.colors.primary500};
13
18
  }
14
19
 
15
- &:hover,
16
20
  &:active {
17
- color: ${({theme:e})=>e.colors.primary800};
21
+ color: ${({theme:e})=>e.colors.primary700};
18
22
  }
19
23
 
20
- ${L.buttonFocusStyle};
21
- `,s=u.default(v.Box)`
22
- display: flex;
23
- `,n=t.default.forwardRef(({children:e,href:r,disabled:i,startIcon:d,endIcon:o,...c},p)=>t.default.createElement(q,{ref:p,href:r,disabled:i,...c},d&&t.default.createElement(s,{as:"span","aria-hidden":!0,paddingRight:2},d),t.default.createElement(k.Typography,{textColor:i?"neutral600":"primary600"},e),o&&t.default.createElement(s,{as:"span","aria-hidden":!0,paddingLeft:2},o),r&&!o&&t.default.createElement(s,{as:"span","aria-hidden":!0,paddingLeft:2},t.default.createElement(y.ExternalLink,null))));n.displayName="Link";n.defaultProps={as:void 0,href:void 0,disabled:!1,startIcon:void 0,endIcon:void 0};n.propTypes={as:a.default.elementType,children:a.default.node.isRequired,disabled:a.default.bool,endIcon:a.default.element,href:a.default.string,startIcon:a.default.element};exports.Link=n;
24
+ ${m.buttonFocusStyle};
25
+ `,a=j.default.forwardRef(({children:e,href:t,disabled:s=!1,startIcon:c,endIcon:o,isExternal:n=!0,...l},u)=>r.jsxs(k,{ref:u,href:t,disabled:s,isExternal:n,...l,children:[c,r.jsx(g.Typography,{textColor:s?"neutral600":"primary600",children:e}),o,t&&!o&&n&&r.jsx(y.ExternalLink,{})]}));a.displayName="Link";exports.Link=a;