@strapi/design-system 1.6.6 → 1.7.0-alpha.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.
- package/README.md +55 -0
- package/dist/BaseButton/BaseButton.cjs +1 -1
- package/dist/BaseButton/BaseButton.js +1 -1
- package/dist/BaseLink/BaseLink.cjs +1 -3
- package/dist/BaseLink/BaseLink.js +14 -14
- package/dist/Combobox/Combobox.cjs +104 -1
- package/dist/Combobox/Combobox.js +348 -278
- package/dist/Combobox/ComboboxList.cjs +1 -1
- package/dist/Combobox/ComboboxList.js +7 -6
- package/dist/Combobox/ComboboxOption.cjs +1 -1
- package/dist/Combobox/ComboboxOption.js +3 -29
- package/dist/DatePicker/DatePicker.cjs +6 -2
- package/dist/DatePicker/DatePicker.js +55 -49
- package/dist/DateTimePicker/parseDate.cjs +1 -0
- package/dist/DateTimePicker/parseDate.js +8 -0
- package/dist/NumberInput/NumberInput.cjs +2 -2
- package/dist/NumberInput/NumberInput.js +31 -31
- package/dist/Select/MultiSelect.cjs +30 -0
- package/dist/Select/MultiSelect.js +239 -0
- package/dist/Select/MultiSelectNested.cjs +3 -1
- package/dist/Select/MultiSelectNested.js +25 -12
- package/dist/Select/OptGroup.cjs +1 -1
- package/dist/Select/OptGroup.js +3 -22
- package/dist/Select/Option.cjs +1 -45
- package/dist/Select/Option.js +12 -100
- package/dist/Select/Select.cjs +1 -3
- package/dist/Select/Select.js +9 -207
- package/dist/Select/SelectList.cjs +1 -1
- package/dist/Select/SelectList.js +98 -80
- package/dist/Select/SelectParts.cjs +79 -0
- package/dist/Select/SelectParts.js +221 -0
- package/dist/Select/SingleSelect.cjs +1 -0
- package/dist/Select/SingleSelect.js +129 -0
- package/dist/Select/index.cjs +1 -1
- package/dist/Select/index.js +15 -10
- package/dist/TimePicker/TimePicker.cjs +2 -2
- package/dist/TimePicker/TimePicker.js +42 -40
- package/dist/helpers/objects.cjs +1 -1
- package/dist/helpers/objects.js +6 -22
- package/dist/hooks/useComposeRefs.cjs +1 -0
- package/dist/hooks/useComposeRefs.js +14 -0
- package/dist/hooks/useIntersection.cjs +1 -1
- package/dist/hooks/useIntersection.js +7 -7
- package/dist/index.cjs +1 -1
- package/dist/index.js +143 -138
- package/dist/themes/extendTheme.cjs +4 -4
- package/dist/themes/extendTheme.js +21 -13
- package/dist/themes/utils.cjs +6 -6
- package/dist/themes/utils.js +7 -6
- package/dist/v2/Link/Link.cjs +13 -11
- package/dist/v2/Link/Link.js +52 -37
- package/dist/v2/SimpleMenu/Menu.cjs +65 -0
- package/dist/v2/SimpleMenu/Menu.js +229 -0
- package/dist/v2/SimpleMenu/SimpleMenu.cjs +1 -33
- package/dist/v2/SimpleMenu/SimpleMenu.js +37 -176
- package/dist/v2/SimpleMenu/index.cjs +1 -1
- package/dist/v2/SimpleMenu/index.js +5 -3
- package/dist/v2/index.cjs +1 -1
- package/dist/v2/index.js +53 -51
- package/package.json +6 -19
- package/dist/Combobox/components.cjs +0 -53
- package/dist/Combobox/components.js +0 -64
- package/dist/Combobox/utils.cjs +0 -1
- package/dist/Combobox/utils.js +0 -78
- package/dist/Select/SelectButton.cjs +0 -19
- package/dist/Select/SelectButton.js +0 -69
- package/dist/Select/SelectTags.cjs +0 -6
- package/dist/Select/SelectTags.js +0 -38
- package/dist/Select/components.cjs +0 -39
- package/dist/Select/components.js +0 -48
- package/dist/Select/constants.cjs +0 -1
- package/dist/Select/constants.js +0 -8
- package/dist/Select/hooks/useButtonRef.cjs +0 -1
- package/dist/Select/hooks/useButtonRef.js +0 -13
- package/dist/Select/hooks/useListRef.cjs +0 -1
- package/dist/Select/hooks/useListRef.js +0 -18
- package/dist/Select/utils.cjs +0 -1
- package/dist/Select/utils.js +0 -17
- package/dist/helpers/arrays.cjs +0 -1
- package/dist/helpers/arrays.js +0 -6
- package/dist/v2/SimpleMenu/utils.cjs +0 -12
- 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
|
|
7
|
-
import { AvatarGroup as
|
|
8
|
-
import { Badge as
|
|
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
|
|
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
|
|
16
|
-
import { Button as D, ButtonWrapper as
|
|
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
|
|
31
|
+
import { CarouselSlide as so } from "./CarouselInput/CarouselSlide.js";
|
|
32
32
|
import { Checkbox as bo } from "./Checkbox/Checkbox.js";
|
|
33
|
-
import { Combobox as
|
|
34
|
-
import { ComboboxOption as
|
|
35
|
-
import { Dialog as
|
|
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
|
|
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
|
|
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
|
|
56
|
+
import { KeyboardNavigable as sr } from "./KeyboardNavigable/KeyboardNavigable.js";
|
|
57
57
|
import { Layout as br } from "./Layout/Layout.js";
|
|
58
|
-
import { ActionLayout as
|
|
58
|
+
import { ActionLayout as Cr } from "./Layout/ActionLayout.js";
|
|
59
59
|
import { ContentLayout as yr } from "./Layout/ContentLayout.js";
|
|
60
|
-
import { BaseHeaderLayout as
|
|
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
|
|
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
|
|
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
|
|
83
|
-
import { Pagination as
|
|
84
|
-
import { Dots as
|
|
85
|
-
import { PopoverPrimitives as
|
|
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
|
|
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
|
|
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 {
|
|
98
|
-
import {
|
|
99
|
-
import {
|
|
100
|
-
import {
|
|
101
|
-
import {
|
|
102
|
-
import {
|
|
103
|
-
import {
|
|
104
|
-
import {
|
|
105
|
-
import {
|
|
106
|
-
import {
|
|
107
|
-
import {
|
|
108
|
-
import {
|
|
109
|
-
import {
|
|
110
|
-
import {
|
|
111
|
-
import {
|
|
112
|
-
import {
|
|
113
|
-
import {
|
|
114
|
-
import {
|
|
115
|
-
import {
|
|
116
|
-
import {
|
|
117
|
-
import {
|
|
118
|
-
import {
|
|
119
|
-
import {
|
|
120
|
-
import {
|
|
121
|
-
import {
|
|
122
|
-
import {
|
|
123
|
-
import {
|
|
124
|
-
import {
|
|
125
|
-
import {
|
|
126
|
-
import {
|
|
127
|
-
import {
|
|
128
|
-
import {
|
|
129
|
-
import {
|
|
130
|
-
import {
|
|
131
|
-
import {
|
|
132
|
-
import {
|
|
133
|
-
import {
|
|
134
|
-
import {
|
|
135
|
-
import {
|
|
136
|
-
import {
|
|
137
|
-
import {
|
|
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
|
-
|
|
145
|
+
Cr as ActionLayout,
|
|
145
146
|
d as Alert,
|
|
146
147
|
l as Avatar,
|
|
147
|
-
|
|
148
|
-
|
|
148
|
+
T as AvatarGroup,
|
|
149
|
+
S as Badge,
|
|
149
150
|
v as BaseButton,
|
|
150
151
|
y as BaseButtonWrapper,
|
|
151
|
-
|
|
152
|
-
|
|
152
|
+
L as BaseCheckbox,
|
|
153
|
+
Lr as BaseHeaderLayout,
|
|
153
154
|
N as BaseLink,
|
|
154
155
|
k as BaseRadio,
|
|
155
156
|
I as Box,
|
|
156
|
-
|
|
157
|
+
R as Breadcrumbs,
|
|
157
158
|
D as Button,
|
|
158
|
-
|
|
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
|
-
|
|
175
|
+
so as CarouselSlide,
|
|
175
176
|
bo as Checkbox,
|
|
176
|
-
|
|
177
|
-
|
|
177
|
+
Co as Combobox,
|
|
178
|
+
go as ComboboxOption,
|
|
178
179
|
yr as ContentLayout,
|
|
179
180
|
vo as CreatableCombobox,
|
|
180
181
|
G as Crumb,
|
|
181
|
-
|
|
182
|
+
Mo as DatePicker,
|
|
182
183
|
Go as DateTimePicker,
|
|
183
|
-
|
|
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
|
-
|
|
189
|
-
|
|
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
|
-
|
|
203
|
+
Br as HeaderLayout,
|
|
203
204
|
ar as Icon,
|
|
204
205
|
nr as IconButton,
|
|
205
206
|
dr as IconButtonGroup,
|
|
206
|
-
|
|
207
|
+
c as Initials,
|
|
207
208
|
Uo as InputWrapper,
|
|
208
209
|
lr as JSONInput,
|
|
209
|
-
|
|
210
|
+
sr as KeyboardNavigable,
|
|
210
211
|
br as Layout,
|
|
211
212
|
Ar as Link,
|
|
212
|
-
|
|
213
|
+
Mr as LinkButton,
|
|
213
214
|
Dr as LiveRegions,
|
|
214
|
-
|
|
215
|
+
Hr as Loader,
|
|
215
216
|
Wr as Main,
|
|
216
217
|
Kr as MainNav,
|
|
217
|
-
|
|
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
|
-
|
|
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
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
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
|
-
|
|
237
|
-
|
|
238
|
-
|
|
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
|
-
|
|
246
|
-
|
|
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
|
-
|
|
253
|
-
|
|
254
|
-
|
|
256
|
+
ft as SelectList,
|
|
257
|
+
nt as SimpleMenu,
|
|
258
|
+
ot as SingleSelect,
|
|
259
|
+
rt as SingleSelectOption,
|
|
255
260
|
zr as SkipToContent,
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
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
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
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
|
-
|
|
303
|
+
ap as useTheme
|
|
299
304
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
2
|
-
${
|
|
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(
|
|
10
|
+
${Object.keys(d.lightTheme).map(t=>`${t}: /* put the overrides for the ${t} key */,`).join(`
|
|
11
11
|
`)}
|
|
12
12
|
})
|
|
13
|
-
`,
|
|
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 {
|
|
2
|
-
import {
|
|
3
|
-
|
|
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(
|
|
13
|
+
${Object.keys(f).map((r) => `${r}: /* put the overrides for the ${r} key */,`).join(`
|
|
13
14
|
`)}
|
|
14
15
|
})
|
|
15
|
-
`,
|
|
16
|
-
if (!
|
|
17
|
-
const
|
|
18
|
-
throw new Error(
|
|
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
|
|
21
|
-
const
|
|
22
|
-
throw new Error(
|
|
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
|
-
|
|
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
|
-
|
|
35
|
+
g as extendTheme
|
|
28
36
|
};
|
package/dist/themes/utils.cjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
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 ${
|
|
9
|
-
box-shadow: ${
|
|
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=
|
|
41
|
+
`;exports.buttonFocusStyle=n;exports.getThemeSize=s;exports.inputFocusStyle=i;
|
package/dist/themes/utils.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
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
|
-
`,
|
|
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
|
-
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
e as buttonFocusStyle,
|
|
45
|
+
s as getThemeSize,
|
|
46
|
+
p as inputFocusStyle
|
|
46
47
|
};
|
package/dist/v2/Link/Link.cjs
CHANGED
|
@@ -1,23 +1,25 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
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.
|
|
21
|
+
color: ${({theme:e})=>e.colors.primary700};
|
|
18
22
|
}
|
|
19
23
|
|
|
20
|
-
${
|
|
21
|
-
`,
|
|
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;
|