@strapi/design-system 1.6.2 → 1.6.4
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/dist/Accordion/Accordion.cjs +5 -5
- package/dist/Accordion/Accordion.js +45 -44
- package/dist/Accordion/AccordionContent.cjs +1 -1
- package/dist/Accordion/AccordionContent.js +4 -4
- package/dist/Accordion/AccordionGroup.cjs +4 -4
- package/dist/Accordion/AccordionGroup.js +18 -18
- package/dist/Accordion/AccordionToggle.cjs +2 -2
- package/dist/Accordion/AccordionToggle.js +11 -11
- package/dist/Alert/Alert.cjs +1 -1
- package/dist/Alert/Alert.js +8 -8
- package/dist/Avatar/Avatar.cjs +5 -5
- package/dist/Avatar/Avatar.js +11 -11
- package/dist/Avatar/AvatarGroup.cjs +2 -2
- package/dist/Avatar/AvatarGroup.js +4 -4
- package/dist/BaseButton/BaseButton.cjs +5 -11
- package/dist/BaseButton/BaseButton.js +31 -38
- package/dist/BaseCheckbox/BaseCheckbox.cjs +3 -3
- package/dist/BaseCheckbox/BaseCheckbox.js +22 -22
- package/dist/BaseRadio/BaseRadio.cjs +2 -2
- package/dist/BaseRadio/BaseRadio.js +4 -4
- package/dist/BaseRadio/RadioGroup.cjs +1 -1
- package/dist/BaseRadio/RadioGroup.js +28 -26
- package/dist/Box/Box.cjs +2 -2
- package/dist/Box/Box.js +36 -33
- package/dist/Breadcrumbs/Breadcrumbs.cjs +4 -4
- package/dist/Breadcrumbs/Breadcrumbs.js +12 -12
- package/dist/Button/Button.cjs +10 -27
- package/dist/Button/Button.js +65 -85
- package/dist/Button/utils.cjs +22 -22
- package/dist/Button/utils.js +2 -2
- package/dist/Card/Card.cjs +1 -1
- package/dist/Card/Card.js +15 -14
- package/dist/Card/CardAsset.js +4 -4
- package/dist/Card/CardBody.cjs +1 -1
- package/dist/Card/CardBody.js +4 -4
- package/dist/Card/CardCheckbox.cjs +1 -1
- package/dist/Card/CardCheckbox.js +6 -6
- package/dist/Card/CardTitle.cjs +1 -1
- package/dist/Card/CardTitle.js +1 -1
- package/dist/CarouselInput/Carousel.cjs +2 -2
- package/dist/CarouselInput/Carousel.js +19 -64
- package/dist/CarouselInput/CarouselActions.js +1 -9
- package/dist/CarouselInput/CarouselImage.js +1 -10
- package/dist/CarouselInput/CarouselInput.cjs +1 -1
- package/dist/CarouselInput/CarouselInput.js +19 -24
- package/dist/CarouselInput/CarouselSlide.js +13 -9
- package/dist/Checkbox/Checkbox.cjs +2 -2
- package/dist/Checkbox/Checkbox.js +7 -26
- package/dist/Combobox/Combobox.cjs +1 -1
- package/dist/Combobox/Combobox.js +106 -120
- package/dist/Combobox/ComboboxOption.cjs +1 -1
- package/dist/Combobox/ComboboxOption.js +18 -17
- package/dist/DatePicker/DatePicker.cjs +1 -1
- package/dist/DatePicker/DatePicker.js +47 -46
- package/dist/DatePicker/DatePickerCalendar.cjs +1 -1
- package/dist/DatePicker/DatePickerCalendar.js +28 -61
- package/dist/DatePicker/DatePickerTd.js +1 -12
- package/dist/DatePicker/DatePickerTh.cjs +3 -3
- package/dist/DatePicker/DatePickerTh.js +7 -16
- package/dist/DatePicker/components.cjs +3 -3
- package/dist/DatePicker/components.js +6 -6
- package/dist/DateTimePicker/DateTimePicker.cjs +1 -1
- package/dist/DateTimePicker/DateTimePicker.js +64 -61
- package/dist/DateTimePicker/DateTimePickerProps.js +1 -3
- package/dist/Dialog/Dialog.cjs +4 -4
- package/dist/Dialog/Dialog.js +26 -37
- package/dist/Dialog/DialogBody.cjs +1 -1
- package/dist/Dialog/DialogBody.js +2 -11
- package/dist/Dialog/DialogFooter.cjs +1 -1
- package/dist/Dialog/DialogFooter.js +2 -7
- package/dist/DismissibleLayer/DismissibleLayer.js +1 -4
- package/dist/Divider/Divider.js +1 -5
- package/dist/EmptyStateLayout/EmptyStateLayout.cjs +1 -1
- package/dist/EmptyStateLayout/EmptyStateLayout.js +2 -16
- package/dist/EmptyStateLayout/story-assets/Illo.js +60 -45
- package/dist/Field/Field.cjs +1 -1
- package/dist/Field/Field.js +12 -13
- package/dist/Field/FieldAction.cjs +1 -1
- package/dist/Field/FieldAction.js +2 -6
- package/dist/Field/FieldError.js +1 -7
- package/dist/Field/FieldHint.js +1 -6
- package/dist/Field/FieldInput.cjs +4 -4
- package/dist/Field/FieldInput.js +26 -34
- package/dist/Field/FieldLabel.cjs +1 -1
- package/dist/Field/FieldLabel.js +3 -16
- package/dist/FocusTrap/FocusTrap.js +1 -5
- package/dist/Grid/Grid.cjs +3 -3
- package/dist/Grid/Grid.js +12 -15
- package/dist/Grid/GridItem.cjs +2 -2
- package/dist/Grid/GridItem.js +5 -13
- package/dist/IconButton/IconButton.cjs +7 -12
- package/dist/IconButton/IconButton.js +88 -84
- package/dist/JSONInput/JSONInput.cjs +1 -1
- package/dist/JSONInput/JSONInput.js +85 -78
- package/dist/JSONInput/JSONInputContainer.cjs +10 -10
- package/dist/JSONInput/JSONInputContainer.js +22 -15
- package/dist/Layout/ActionLayout.js +1 -13
- package/dist/Layout/ContentLayout.js +1 -4
- package/dist/Layout/HeaderLayout.cjs +1 -1
- package/dist/Layout/HeaderLayout.js +35 -64
- package/dist/Layout/Layout.js +1 -5
- package/dist/Layout/TwoColsLayout.js +1 -17
- package/dist/Link/Link.cjs +5 -5
- package/dist/Link/Link.js +55 -57
- package/dist/LinkButton/LinkButton.cjs +7 -24
- package/dist/LinkButton/LinkButton.js +60 -87
- package/dist/LiveRegions/LiveRegions.cjs +1 -1
- package/dist/LiveRegions/LiveRegions.js +1 -1
- package/dist/Loader/Loader.cjs +4 -4
- package/dist/Loader/Loader.js +26 -24
- package/dist/Main/Main.js +1 -6
- package/dist/Main/SkipToContent.cjs +2 -2
- package/dist/Main/SkipToContent.js +17 -13
- package/dist/MainNav/MainNav.cjs +2 -2
- package/dist/MainNav/MainNav.js +21 -20
- package/dist/MainNav/NavBrand.cjs +2 -2
- package/dist/MainNav/NavBrand.js +4 -38
- package/dist/MainNav/NavCondense.cjs +2 -2
- package/dist/MainNav/NavCondense.js +10 -18
- package/dist/MainNav/NavFooter.js +1 -3
- package/dist/MainNav/NavLink.cjs +4 -4
- package/dist/MainNav/NavLink.js +8 -34
- package/dist/MainNav/NavSection.cjs +1 -1
- package/dist/MainNav/NavSection.js +5 -38
- package/dist/MainNav/NavSections.cjs +2 -2
- package/dist/MainNav/NavSections.js +4 -15
- package/dist/MainNav/NavUser.cjs +2 -2
- package/dist/MainNav/NavUser.js +6 -27
- package/dist/ModalLayout/ModalBody.js +1 -4
- package/dist/ModalLayout/ModalFooter.cjs +1 -1
- package/dist/ModalLayout/ModalFooter.js +2 -10
- package/dist/ModalLayout/ModalHeader.cjs +2 -2
- package/dist/ModalLayout/ModalHeader.js +8 -20
- package/dist/ModalLayout/ModalLayout.cjs +3 -3
- package/dist/ModalLayout/ModalLayout.js +23 -31
- package/dist/NumberInput/NumberInput.cjs +2 -2
- package/dist/NumberInput/NumberInput.js +54 -59
- package/dist/Pagination/Pagination.cjs +2 -2
- package/dist/Pagination/Pagination.js +11 -16
- package/dist/Pagination/components.cjs +3 -3
- package/dist/Pagination/components.js +31 -38
- package/dist/Popover/Popover.cjs +3 -3
- package/dist/Popover/Popover.js +111 -102
- package/dist/Popover/index.cjs +1 -1
- package/dist/Popover/index.js +9 -3
- package/dist/Portal/Portal.cjs +1 -1
- package/dist/Portal/Portal.js +10 -12
- package/dist/ProgressBar/ProgressBar.js +17 -14
- package/dist/Radio/Radio.cjs +2 -2
- package/dist/Radio/Radio.js +4 -11
- package/dist/RawTable/RawCell.cjs +1 -1
- package/dist/RawTable/RawCell.js +5 -14
- package/dist/RawTable/RawTable.cjs +1 -1
- package/dist/RawTable/RawTable.js +36 -35
- package/dist/RawTable/RawTbody.js +1 -3
- package/dist/RawTable/RawThead.js +1 -3
- package/dist/RawTable/RawTr.js +1 -4
- package/dist/Searchbar/SearchForm.js +1 -4
- package/dist/Searchbar/Searchbar.cjs +3 -3
- package/dist/Searchbar/Searchbar.js +21 -25
- package/dist/Select/MultiSelectNested.js +2 -14
- package/dist/Select/OptGroup.cjs +1 -1
- package/dist/Select/OptGroup.js +14 -10
- package/dist/Select/Option.cjs +3 -3
- package/dist/Select/Option.js +31 -33
- package/dist/Select/Select.cjs +2 -2
- package/dist/Select/Select.js +87 -107
- package/dist/Select/SelectButton.cjs +1 -1
- package/dist/Select/SelectButton.js +14 -11
- package/dist/Select/SelectList.cjs +1 -1
- package/dist/Select/SelectList.js +20 -16
- package/dist/Select/SelectTags.cjs +3 -3
- package/dist/Select/SelectTags.js +17 -15
- package/dist/Select/SingleSelect.cjs +1 -1
- package/dist/Select/SingleSelect.js +1 -1
- package/dist/SimpleMenu/SimpleMenu.cjs +3 -3
- package/dist/SimpleMenu/SimpleMenu.js +43 -67
- package/dist/Status/Status.js +15 -13
- package/dist/SubNav/SubNav.cjs +2 -2
- package/dist/SubNav/SubNav.js +5 -9
- package/dist/SubNav/SubNavHeader.cjs +2 -2
- package/dist/SubNav/SubNavHeader.js +31 -53
- package/dist/SubNav/SubNavLink.cjs +3 -3
- package/dist/SubNav/SubNavLink.js +18 -22
- package/dist/SubNav/SubNavLinkSection.cjs +2 -2
- package/dist/SubNav/SubNavLinkSection.js +5 -30
- package/dist/SubNav/SubNavSection.cjs +2 -2
- package/dist/SubNav/SubNavSection.js +23 -30
- package/dist/SubNav/SubNavSectionLabel.cjs +2 -2
- package/dist/SubNav/SubNavSectionLabel.js +15 -24
- package/dist/SubNav/SubNavSections.cjs +1 -1
- package/dist/SubNav/SubNavSections.js +3 -12
- package/dist/Switch/Switch.cjs +2 -2
- package/dist/Switch/Switch.js +16 -17
- package/dist/Table/Cell.cjs +1 -1
- package/dist/Table/Cell.js +3 -8
- package/dist/Table/TFooter.cjs +2 -2
- package/dist/Table/TFooter.js +3 -17
- package/dist/Table/Table.cjs +1 -1
- package/dist/Table/Table.js +2 -18
- package/dist/Table/Tbody.js +1 -3
- package/dist/Table/Thead.js +1 -3
- package/dist/Table/Tr.js +1 -3
- package/dist/Tabs/TabGroup.cjs +1 -1
- package/dist/Tabs/TabGroup.js +30 -27
- package/dist/Tabs/TabPanels.js +2 -10
- package/dist/Tabs/Tabs.cjs +1 -1
- package/dist/Tabs/Tabs.js +43 -51
- package/dist/Tag/Tag.cjs +1 -1
- package/dist/Tag/Tag.js +20 -23
- package/dist/TextButton/TextButton.cjs +6 -6
- package/dist/TextButton/TextButton.js +15 -15
- package/dist/TextInput/TextInput.cjs +1 -1
- package/dist/TextInput/TextInput.js +14 -32
- package/dist/Textarea/Textarea.cjs +2 -2
- package/dist/Textarea/Textarea.js +10 -25
- package/dist/Textarea/TextareaInput.cjs +1 -1
- package/dist/Textarea/TextareaInput.js +15 -15
- package/dist/TimePicker/TimePicker.cjs +2 -2
- package/dist/TimePicker/TimePicker.js +27 -26
- package/dist/ToggleCheckbox/ToggleCheckbox.cjs +5 -5
- package/dist/ToggleCheckbox/ToggleCheckbox.js +85 -60
- package/dist/ToggleInput/ToggleInput.cjs +3 -3
- package/dist/ToggleInput/ToggleInput.js +14 -32
- package/dist/Tooltip/Tooltip.cjs +2 -2
- package/dist/Tooltip/Tooltip.js +62 -53
- package/dist/Tooltip/hooks/useTooltipHandlers.cjs +1 -1
- package/dist/Tooltip/hooks/useTooltipHandlers.js +7 -7
- package/dist/Tooltip/hooks/useTooltipLayout.cjs +1 -1
- package/dist/Tooltip/hooks/useTooltipLayout.js +8 -5
- package/dist/Typography/Typography.cjs +3 -2
- package/dist/Typography/Typography.js +17 -14
- package/dist/helpers/objects.cjs +1 -1
- package/dist/helpers/objects.js +1 -1
- package/dist/hooks/useId.cjs +1 -0
- package/dist/hooks/useId.js +13 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +136 -134
- package/dist/themes/extendTheme.cjs +1 -1
- package/dist/themes/extendTheme.js +4 -4
- package/dist/v2/Breadcrumbs/Breadcrumbs.cjs +2 -2
- package/dist/v2/Breadcrumbs/Breadcrumbs.js +4 -13
- package/dist/v2/Breadcrumbs/Crumb.js +11 -12
- package/dist/v2/Breadcrumbs/CrumbLink.js +1 -3
- package/dist/v2/Breadcrumbs/CrumbSimpleMenu.cjs +2 -2
- package/dist/v2/Breadcrumbs/CrumbSimpleMenu.js +5 -11
- package/dist/v2/Breadcrumbs/Divider.js +1 -8
- package/dist/v2/Link/Link.cjs +2 -2
- package/dist/v2/Link/Link.js +5 -24
- package/dist/v2/LinkButton/LinkButton.cjs +11 -24
- package/dist/v2/LinkButton/LinkButton.js +62 -84
- package/dist/v2/MainNav/MainNav.cjs +2 -2
- package/dist/v2/MainNav/MainNav.js +21 -20
- package/dist/v2/MainNav/NavBrand.cjs +2 -2
- package/dist/v2/MainNav/NavBrand.js +4 -38
- package/dist/v2/MainNav/NavCondense.cjs +2 -2
- package/dist/v2/MainNav/NavCondense.js +10 -18
- package/dist/v2/MainNav/NavFooter.js +1 -3
- package/dist/v2/MainNav/NavLink.cjs +4 -4
- package/dist/v2/MainNav/NavLink.js +10 -39
- package/dist/v2/MainNav/NavSection.cjs +1 -1
- package/dist/v2/MainNav/NavSection.js +5 -38
- package/dist/v2/MainNav/NavSections.cjs +2 -2
- package/dist/v2/MainNav/NavSections.js +4 -15
- package/dist/v2/MainNav/NavUser.cjs +2 -2
- package/dist/v2/MainNav/NavUser.js +6 -27
- package/dist/v2/Pagination/Pagination.cjs +2 -2
- package/dist/v2/Pagination/Pagination.js +11 -16
- package/dist/v2/Pagination/components.cjs +2 -2
- package/dist/v2/Pagination/components.js +11 -39
- package/dist/v2/SimpleMenu/SimpleMenu.cjs +4 -4
- package/dist/v2/SimpleMenu/SimpleMenu.js +42 -65
- package/dist/v2/SubNav/SubNav.cjs +2 -2
- package/dist/v2/SubNav/SubNav.js +5 -9
- package/dist/v2/SubNav/SubNavHeader.cjs +2 -2
- package/dist/v2/SubNav/SubNavHeader.js +31 -53
- package/dist/v2/SubNav/SubNavLink.cjs +2 -2
- package/dist/v2/SubNav/SubNavLink.js +18 -22
- package/dist/v2/SubNav/SubNavLinkSection.cjs +2 -2
- package/dist/v2/SubNav/SubNavLinkSection.js +5 -30
- package/dist/v2/SubNav/SubNavSection.cjs +2 -2
- package/dist/v2/SubNav/SubNavSection.js +26 -33
- package/dist/v2/SubNav/SubNavSectionLabel.cjs +2 -2
- package/dist/v2/SubNav/SubNavSectionLabel.js +15 -24
- package/dist/v2/SubNav/SubNavSections.cjs +1 -1
- package/dist/v2/SubNav/SubNavSections.js +3 -12
- package/package.json +7 -4
|
@@ -1,57 +1,50 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
cursor: pointer;
|
|
8
|
-
padding: ${({
|
|
9
|
-
theme: r
|
|
10
|
-
}) => r.spaces[2]};
|
|
11
|
-
border-radius: ${({
|
|
12
|
-
theme: r
|
|
13
|
-
}) => r.borderRadius};
|
|
14
|
-
background: ${({
|
|
15
|
-
theme: r
|
|
16
|
-
}) => r.colors.neutral0};
|
|
17
|
-
border: 1px solid ${({
|
|
18
|
-
theme: r
|
|
19
|
-
}) => r.colors.neutral200};
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import s from "react";
|
|
3
|
+
import n from "styled-components";
|
|
4
|
+
import { Flex as i } from "../Flex/Flex.js";
|
|
5
|
+
import { buttonFocusStyle as u } from "../themes/utils.js";
|
|
6
|
+
const p = n(i)`
|
|
20
7
|
svg {
|
|
21
8
|
height: ${({
|
|
22
|
-
theme:
|
|
23
|
-
}) =>
|
|
9
|
+
theme: t
|
|
10
|
+
}) => t.spaces[3]};
|
|
24
11
|
width: ${({
|
|
25
|
-
theme:
|
|
26
|
-
}) =>
|
|
27
|
-
|
|
28
|
-
svg {
|
|
12
|
+
theme: t
|
|
13
|
+
}) => t.spaces[3]};
|
|
14
|
+
|
|
29
15
|
> g,
|
|
30
16
|
path {
|
|
31
17
|
fill: ${({
|
|
32
|
-
theme:
|
|
33
|
-
}) =>
|
|
18
|
+
theme: t
|
|
19
|
+
}) => t.colors.neutral0};
|
|
34
20
|
}
|
|
35
21
|
}
|
|
22
|
+
|
|
36
23
|
&[aria-disabled='true'] {
|
|
37
24
|
pointer-events: none;
|
|
38
25
|
}
|
|
39
26
|
|
|
40
|
-
${
|
|
41
|
-
`,
|
|
42
|
-
disabled:
|
|
43
|
-
children:
|
|
27
|
+
${u}
|
|
28
|
+
`, d = s.forwardRef(({
|
|
29
|
+
disabled: t,
|
|
30
|
+
children: r,
|
|
44
31
|
...e
|
|
45
|
-
}, o) =>
|
|
32
|
+
}, o) => a(p, {
|
|
46
33
|
ref: o,
|
|
47
|
-
"aria-disabled":
|
|
34
|
+
"aria-disabled": t,
|
|
35
|
+
as: "button",
|
|
48
36
|
type: "button",
|
|
49
|
-
disabled:
|
|
37
|
+
disabled: t,
|
|
38
|
+
padding: 2,
|
|
39
|
+
hasRadius: !0,
|
|
40
|
+
background: "neutral0",
|
|
41
|
+
borderColor: "neutral200",
|
|
42
|
+
cursor: "pointer",
|
|
50
43
|
...e,
|
|
51
|
-
children:
|
|
44
|
+
children: r
|
|
52
45
|
}));
|
|
53
|
-
|
|
46
|
+
d.displayName = "BaseButton";
|
|
54
47
|
export {
|
|
55
|
-
|
|
56
|
-
|
|
48
|
+
d as BaseButton,
|
|
49
|
+
p as BaseButtonWrapper
|
|
57
50
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
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 n=require("react/jsx-runtime"),b=require("react"),p=require("styled-components"),f=require("./assets/checkmark-black.cjs"),k=require("./assets/checkmark.cjs"),s=require("./utils.cjs"),h=require("../Box/Box.cjs"),x=e=>e&&typeof e=="object"&&"default"in e?e:{default:e};function g(e){if(e&&e.__esModule)return e;const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const t=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(o,r,t.get?t:{enumerable:!0,get:()=>e[r]})}}return o.default=e,Object.freeze(o)}const l=g(b),m=x(p),y=m.default.input`
|
|
2
2
|
height: ${s.getCheckboxSize};
|
|
3
3
|
min-width: ${s.getCheckboxSize};
|
|
4
4
|
margin: 0;
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
&:disabled:after {
|
|
28
|
-
background: url(${
|
|
28
|
+
background: url(${f}) no-repeat no-repeat center center;
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
|
|
@@ -59,4 +59,4 @@
|
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
`,
|
|
62
|
+
`,i=({indeterminate:e=!1,size:o="M",name:r,value:t=!1,onValueChange:a,...u})=>{const c=l.useRef(null);l.useEffect(()=>{c.current&&e?c.current.indeterminate=e:c.current.indeterminate=!1},[e]);const d=()=>{a&&a(!t)};return n.jsx(h.Box,{children:n.jsx(y,{size:o,checked:t,onChange:d,type:"checkbox",ref:c,name:r,...u})})};i.displayName="BaseCheckbox";exports.BaseCheckbox=i;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
const
|
|
9
|
-
height: ${
|
|
10
|
-
min-width: ${
|
|
2
|
+
import * as c from "react";
|
|
3
|
+
import d from "styled-components";
|
|
4
|
+
import p from "./assets/checkmark-black.js";
|
|
5
|
+
import u from "./assets/checkmark.js";
|
|
6
|
+
import { getCheckboxSize as n } from "./utils.js";
|
|
7
|
+
import { Box as b } from "../Box/Box.js";
|
|
8
|
+
const m = d.input`
|
|
9
|
+
height: ${n};
|
|
10
|
+
min-width: ${n};
|
|
11
11
|
margin: 0;
|
|
12
12
|
border-radius: ${({
|
|
13
13
|
theme: r
|
|
@@ -33,7 +33,7 @@ const f = p.input`
|
|
|
33
33
|
content: '';
|
|
34
34
|
display: block;
|
|
35
35
|
position: relative;
|
|
36
|
-
background: url(${
|
|
36
|
+
background: url(${u}) no-repeat no-repeat center center;
|
|
37
37
|
width: 10px;
|
|
38
38
|
height: 10px;
|
|
39
39
|
left: 50%;
|
|
@@ -42,7 +42,7 @@ const f = p.input`
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
&:disabled:after {
|
|
45
|
-
background: url(${
|
|
45
|
+
background: url(${p}) no-repeat no-repeat center center;
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
|
|
@@ -92,32 +92,32 @@ const f = p.input`
|
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
|
-
`,
|
|
95
|
+
`, f = ({
|
|
96
96
|
indeterminate: r = !1,
|
|
97
|
-
size:
|
|
98
|
-
name:
|
|
97
|
+
size: l = "M",
|
|
98
|
+
name: s,
|
|
99
99
|
value: e = !1,
|
|
100
100
|
onValueChange: t,
|
|
101
101
|
...i
|
|
102
102
|
}) => {
|
|
103
|
-
const o =
|
|
104
|
-
return
|
|
103
|
+
const o = c.useRef(null);
|
|
104
|
+
return c.useEffect(() => {
|
|
105
105
|
o.current && r ? o.current.indeterminate = r : o.current.indeterminate = !1;
|
|
106
|
-
}, [r]), a(
|
|
107
|
-
children: a(
|
|
108
|
-
size:
|
|
106
|
+
}, [r]), a(b, {
|
|
107
|
+
children: a(m, {
|
|
108
|
+
size: l,
|
|
109
109
|
checked: e,
|
|
110
110
|
onChange: () => {
|
|
111
111
|
t && t(!e);
|
|
112
112
|
},
|
|
113
113
|
type: "checkbox",
|
|
114
114
|
ref: o,
|
|
115
|
-
name:
|
|
115
|
+
name: s,
|
|
116
116
|
...i
|
|
117
117
|
})
|
|
118
118
|
});
|
|
119
119
|
};
|
|
120
|
-
|
|
120
|
+
f.displayName = "BaseCheckbox";
|
|
121
121
|
export {
|
|
122
|
-
|
|
122
|
+
f as BaseCheckbox
|
|
123
123
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const b=require("react/jsx-runtime"),r=require("react"),g=require("styled-components"),y=require("
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const b=require("react/jsx-runtime"),r=require("react"),g=require("styled-components"),y=require("./context.cjs"),t=require("./utils.cjs"),R=require("../helpers/useId.cjs"),d=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},m=d(r),h=d(g),x=h.default.input`
|
|
2
2
|
margin: 0;
|
|
3
3
|
padding: 0;
|
|
4
4
|
background-color: ${({theme:e})=>e.colors.neutral0};
|
|
@@ -28,4 +28,4 @@
|
|
|
28
28
|
border: 1px solid ${({theme:e})=>e.colors.neutral300};
|
|
29
29
|
background: ${({theme:e})=>e.colors.neutral200};
|
|
30
30
|
}
|
|
31
|
-
`,a=m.default.forwardRef(({value:e,disabled:n=!1,...i},c)=>{const s=
|
|
31
|
+
`,a=m.default.forwardRef(({value:e,disabled:n=!1,...i},c)=>{const s=R.useId(),{onChange:l,selected:u,name:p,size:f}=r.useContext(y.RadioContext),o=u===e;return b.jsx(x,{ref:c,type:"radio",name:p,value:e,tabIndex:o?0:-1,"aria-checked":o,checked:o,disabled:n,id:s,size:f,onChange:l,...i})});a.displayName="Radio";exports.BaseRadio=a;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as f } from "react/jsx-runtime";
|
|
2
2
|
import u, { useContext as b } from "react";
|
|
3
3
|
import g from "styled-components";
|
|
4
|
-
import {
|
|
5
|
-
import { RadioContext as $ } from "./context.js";
|
|
4
|
+
import { RadioContext as h } from "./context.js";
|
|
6
5
|
import { getRadioSize as r, getSelectedRadioSize as t, getSelectedRadioPosition as d } from "./utils.js";
|
|
6
|
+
import { useId as $ } from "../helpers/useId.js";
|
|
7
7
|
const y = g.input`
|
|
8
8
|
margin: 0;
|
|
9
9
|
padding: 0;
|
|
@@ -57,12 +57,12 @@ const y = g.input`
|
|
|
57
57
|
disabled: a = !1,
|
|
58
58
|
...n
|
|
59
59
|
}, i) => {
|
|
60
|
-
const c =
|
|
60
|
+
const c = $(), {
|
|
61
61
|
onChange: l,
|
|
62
62
|
selected: p,
|
|
63
63
|
name: m,
|
|
64
64
|
size: s
|
|
65
|
-
} = b(
|
|
65
|
+
} = b(h), o = p === e;
|
|
66
66
|
return f(y, {
|
|
67
67
|
ref: i,
|
|
68
68
|
type: "radio",
|
|
@@ -1 +1 @@
|
|
|
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 c=require("react/jsx-runtime"),r=require("react"),l=require("./context.cjs"),x=require("../helpers/setTabIndexOnFirstItem.cjs"),b=({children:n,labelledBy:u,onChange:o,value:e="",size:s="M",name:t,...d})=>{const i=r.useRef(null);r.useLayoutEffect(()=>{e||x.setTabIndexOnFirstItem(i.current,`[name="${t}"]`)},[e,t]);const a=r.useMemo(()=>({onChange:o,selected:e,name:t,size:s}),[t,o,s,e]);return c.jsx(l.RadioContext.Provider,{value:a,children:c.jsx("div",{ref:i,role:"radiogroup","aria-labelledby":u,...d,children:n})})};exports.RadioGroup=b;
|
|
@@ -1,35 +1,37 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { RadioContext as
|
|
4
|
-
import { setTabIndexOnFirstItem as
|
|
5
|
-
const
|
|
6
|
-
children:
|
|
7
|
-
labelledBy:
|
|
8
|
-
onChange:
|
|
1
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as n, useLayoutEffect as p, useMemo as u } from "react";
|
|
3
|
+
import { RadioContext as l } from "./context.js";
|
|
4
|
+
import { setTabIndexOnFirstItem as x } from "../helpers/setTabIndexOnFirstItem.js";
|
|
5
|
+
const G = ({
|
|
6
|
+
children: f,
|
|
7
|
+
labelledBy: c,
|
|
8
|
+
onChange: t,
|
|
9
9
|
value: r = "",
|
|
10
|
-
size:
|
|
10
|
+
size: e = "M",
|
|
11
11
|
name: o,
|
|
12
|
-
...
|
|
12
|
+
...s
|
|
13
13
|
}) => {
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
r ||
|
|
17
|
-
}, [r, o])
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
14
|
+
const i = n(null);
|
|
15
|
+
p(() => {
|
|
16
|
+
r || x(i.current, `[name="${o}"]`);
|
|
17
|
+
}, [r, o]);
|
|
18
|
+
const m = u(() => ({
|
|
19
|
+
onChange: t,
|
|
20
|
+
selected: r,
|
|
21
|
+
name: o,
|
|
22
|
+
size: e
|
|
23
|
+
}), [o, t, e, r]);
|
|
24
|
+
return d(l.Provider, {
|
|
25
|
+
value: m,
|
|
26
|
+
children: d("div", {
|
|
27
|
+
ref: i,
|
|
26
28
|
role: "radiogroup",
|
|
27
|
-
"aria-labelledby":
|
|
28
|
-
...
|
|
29
|
-
children:
|
|
29
|
+
"aria-labelledby": c,
|
|
30
|
+
...s,
|
|
31
|
+
children: f
|
|
30
32
|
})
|
|
31
33
|
});
|
|
32
34
|
};
|
|
33
35
|
export {
|
|
34
|
-
|
|
36
|
+
G as RadioGroup
|
|
35
37
|
};
|
package/dist/Box/Box.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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 i=require("styled-components"),o=require("../helpers/handleResponsiveValues.cjs"),r=require("../helpers/theme.cjs"),a=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},d=a(i),l={color:!0,cursor:!0,height:!0,width:!0},m=d.default.div.withConfig({shouldForwardProp:(e,t)=>!l[e]&&t(e)})`
|
|
2
2
|
// Font
|
|
3
3
|
font-size: ${({fontSize:e,theme:t})=>r.extractStyleFromTheme(t.fontSizes,e,e)};
|
|
4
4
|
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
border-style: ${({borderStyle:e})=>e};
|
|
28
28
|
border-width: ${({borderWidth:e})=>e};
|
|
29
29
|
border-color: ${({borderColor:e,theme:t})=>r.extractStyleFromTheme(t.colors,e,void 0)};
|
|
30
|
-
border: ${({theme:e,borderColor:t,borderStyle:s,borderWidth:n})=>{if(t&&!s
|
|
30
|
+
border: ${({theme:e,borderColor:t,borderStyle:s,borderWidth:n})=>{if(t&&!s&&typeof n>"u")return`1px solid ${e.colors[t]}`}};
|
|
31
31
|
|
|
32
32
|
// Shadows
|
|
33
33
|
box-shadow: ${({theme:e,shadow:t})=>r.extractStyleFromTheme(e.shadows,t,void 0)};
|
package/dist/Box/Box.js
CHANGED
|
@@ -1,64 +1,67 @@
|
|
|
1
1
|
import d from "styled-components";
|
|
2
|
-
import
|
|
3
|
-
import { extractStyleFromTheme as
|
|
4
|
-
const
|
|
5
|
-
color: !0
|
|
2
|
+
import s from "../helpers/handleResponsiveValues.js";
|
|
3
|
+
import { extractStyleFromTheme as r } from "../helpers/theme.js";
|
|
4
|
+
const t = {
|
|
5
|
+
color: !0,
|
|
6
|
+
cursor: !0,
|
|
7
|
+
height: !0,
|
|
8
|
+
width: !0
|
|
6
9
|
}, l = d.div.withConfig({
|
|
7
|
-
shouldForwardProp: (e, o) =>
|
|
10
|
+
shouldForwardProp: (e, o) => !t[e] && o(e)
|
|
8
11
|
})`
|
|
9
12
|
// Font
|
|
10
13
|
font-size: ${({
|
|
11
14
|
fontSize: e,
|
|
12
15
|
theme: o
|
|
13
|
-
}) =>
|
|
16
|
+
}) => r(o.fontSizes, e, e)};
|
|
14
17
|
|
|
15
18
|
// Colors
|
|
16
19
|
background: ${({
|
|
17
20
|
theme: e,
|
|
18
21
|
background: o
|
|
19
|
-
}) =>
|
|
22
|
+
}) => r(e.colors, o, void 0)};
|
|
20
23
|
color: ${({
|
|
21
24
|
theme: e,
|
|
22
25
|
color: o
|
|
23
|
-
}) =>
|
|
26
|
+
}) => r(e.colors, o, void 0)};
|
|
24
27
|
|
|
25
28
|
// Spaces
|
|
26
29
|
${({
|
|
27
30
|
theme: e,
|
|
28
31
|
padding: o
|
|
29
|
-
}) =>
|
|
32
|
+
}) => s("padding", o, e)}
|
|
30
33
|
${({
|
|
31
34
|
theme: e,
|
|
32
35
|
paddingTop: o
|
|
33
|
-
}) =>
|
|
36
|
+
}) => s("padding-top", o, e)}
|
|
34
37
|
${({
|
|
35
38
|
theme: e,
|
|
36
39
|
paddingRight: o
|
|
37
|
-
}) =>
|
|
40
|
+
}) => s("padding-right", o, e)}
|
|
38
41
|
${({
|
|
39
42
|
theme: e,
|
|
40
43
|
paddingBottom: o
|
|
41
|
-
}) =>
|
|
44
|
+
}) => s("padding-bottom", o, e)}
|
|
42
45
|
${({
|
|
43
46
|
theme: e,
|
|
44
47
|
paddingLeft: o
|
|
45
|
-
}) =>
|
|
48
|
+
}) => s("padding-left", o, e)}
|
|
46
49
|
${({
|
|
47
50
|
theme: e,
|
|
48
51
|
marginLeft: o
|
|
49
|
-
}) =>
|
|
52
|
+
}) => s("margin-left", o, e)}
|
|
50
53
|
${({
|
|
51
54
|
theme: e,
|
|
52
55
|
marginRight: o
|
|
53
|
-
}) =>
|
|
56
|
+
}) => s("margin-right", o, e)}
|
|
54
57
|
${({
|
|
55
58
|
theme: e,
|
|
56
59
|
marginTop: o
|
|
57
|
-
}) =>
|
|
60
|
+
}) => s("margin-top", o, e)}
|
|
58
61
|
${({
|
|
59
62
|
theme: e,
|
|
60
63
|
marginBottom: o
|
|
61
|
-
}) =>
|
|
64
|
+
}) => s("margin-bottom", o, e)}
|
|
62
65
|
|
|
63
66
|
// Responsive hiding
|
|
64
67
|
${({
|
|
@@ -75,8 +78,8 @@ const $ = {
|
|
|
75
78
|
border-radius: ${({
|
|
76
79
|
theme: e,
|
|
77
80
|
hasRadius: o,
|
|
78
|
-
borderRadius:
|
|
79
|
-
}) => o ? e.borderRadius :
|
|
81
|
+
borderRadius: i
|
|
82
|
+
}) => o ? e.borderRadius : i};
|
|
80
83
|
border-style: ${({
|
|
81
84
|
borderStyle: e
|
|
82
85
|
}) => e};
|
|
@@ -86,14 +89,14 @@ const $ = {
|
|
|
86
89
|
border-color: ${({
|
|
87
90
|
borderColor: e,
|
|
88
91
|
theme: o
|
|
89
|
-
}) =>
|
|
92
|
+
}) => r(o.colors, e, void 0)};
|
|
90
93
|
border: ${({
|
|
91
94
|
theme: e,
|
|
92
95
|
borderColor: o,
|
|
93
|
-
borderStyle:
|
|
96
|
+
borderStyle: i,
|
|
94
97
|
borderWidth: n
|
|
95
98
|
}) => {
|
|
96
|
-
if (o && !
|
|
99
|
+
if (o && !i && typeof n > "u")
|
|
97
100
|
return `1px solid ${e.colors[o]}`;
|
|
98
101
|
}};
|
|
99
102
|
|
|
@@ -101,7 +104,7 @@ const $ = {
|
|
|
101
104
|
box-shadow: ${({
|
|
102
105
|
theme: e,
|
|
103
106
|
shadow: o
|
|
104
|
-
}) =>
|
|
107
|
+
}) => r(e.shadows, o, void 0)};
|
|
105
108
|
|
|
106
109
|
// Handlers
|
|
107
110
|
pointer-events: ${({
|
|
@@ -126,19 +129,19 @@ const $ = {
|
|
|
126
129
|
left: ${({
|
|
127
130
|
left: e,
|
|
128
131
|
theme: o
|
|
129
|
-
}) =>
|
|
132
|
+
}) => r(o.spaces, e, e)};
|
|
130
133
|
right: ${({
|
|
131
134
|
right: e,
|
|
132
135
|
theme: o
|
|
133
|
-
}) =>
|
|
136
|
+
}) => r(o.spaces, e, e)};
|
|
134
137
|
top: ${({
|
|
135
138
|
top: e,
|
|
136
139
|
theme: o
|
|
137
|
-
}) =>
|
|
140
|
+
}) => r(o.spaces, e, e)};
|
|
138
141
|
bottom: ${({
|
|
139
142
|
bottom: e,
|
|
140
143
|
theme: o
|
|
141
|
-
}) =>
|
|
144
|
+
}) => r(o.spaces, e, e)};
|
|
142
145
|
z-index: ${({
|
|
143
146
|
zIndex: e
|
|
144
147
|
}) => e};
|
|
@@ -150,27 +153,27 @@ const $ = {
|
|
|
150
153
|
width: ${({
|
|
151
154
|
width: e,
|
|
152
155
|
theme: o
|
|
153
|
-
}) =>
|
|
156
|
+
}) => r(o.spaces, e, e)};
|
|
154
157
|
max-width: ${({
|
|
155
158
|
maxWidth: e,
|
|
156
159
|
theme: o
|
|
157
|
-
}) =>
|
|
160
|
+
}) => r(o.spaces, e, e)};
|
|
158
161
|
min-width: ${({
|
|
159
162
|
minWidth: e,
|
|
160
163
|
theme: o
|
|
161
|
-
}) =>
|
|
164
|
+
}) => r(o.spaces, e, e)};
|
|
162
165
|
height: ${({
|
|
163
166
|
height: e,
|
|
164
167
|
theme: o
|
|
165
|
-
}) =>
|
|
168
|
+
}) => r(o.spaces, e, e)};
|
|
166
169
|
max-height: ${({
|
|
167
170
|
maxHeight: e,
|
|
168
171
|
theme: o
|
|
169
|
-
}) =>
|
|
172
|
+
}) => r(o.spaces, e, e)};
|
|
170
173
|
min-height: ${({
|
|
171
174
|
minHeight: e,
|
|
172
175
|
theme: o
|
|
173
|
-
}) =>
|
|
176
|
+
}) => r(o.spaces, e, e)};
|
|
174
177
|
|
|
175
178
|
// Animation
|
|
176
179
|
transition: ${({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react/jsx-runtime"),d=require("
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react/jsx-runtime"),d=require("@strapi/icons"),u=require("styled-components"),t=require("../Box/Box.cjs"),s=require("../Flex/Flex.cjs"),i=require("../Typography/Typography.cjs"),c=require("../VisuallyHidden/VisuallyHidden.cjs"),p=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},y=p(u),h=y.default(s.Flex)`
|
|
2
2
|
svg {
|
|
3
3
|
height: ${10/16}rem;
|
|
4
4
|
width: ${10/16}rem;
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
fill: ${({theme:e})=>e.colors.neutral500};
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
|
-
:last-of-type ${
|
|
9
|
+
:last-of-type ${t.Box} {
|
|
10
10
|
display: none;
|
|
11
11
|
}
|
|
12
|
-
:last-of-type ${
|
|
12
|
+
:last-of-type ${i.Typography} {
|
|
13
13
|
color: ${({theme:e})=>e.colors.neutral800};
|
|
14
14
|
font-weight: ${({theme:e})=>e.fontWeights.bold};
|
|
15
15
|
}
|
|
16
|
-
`,l=({children:e})=>r.jsxs(h,{inline:!0,as:"li",children:[r.jsx(
|
|
16
|
+
`,l=({children:e})=>r.jsxs(h,{inline:!0,as:"li",children:[r.jsx(i.Typography,{variant:"pi",textColor:"neutral600",children:e}),r.jsx(t.Box,{"aria-hidden":!0,paddingLeft:3,paddingRight:3,children:r.jsx(d.ChevronRight,{})})]});l.displayName="Crumb";const o=({children:e,label:n,...a})=>r.jsxs(s.Flex,{...a,children:[r.jsx(c.VisuallyHidden,{children:n}),r.jsx("ol",{"aria-hidden":!0,children:e})]});o.displayName="Breadcrumbs";exports.Breadcrumbs=o;exports.Crumb=l;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import d from "
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
2
|
+
import { ChevronRight as d } from "@strapi/icons";
|
|
3
|
+
import m from "styled-components";
|
|
4
|
+
import { Box as o } from "../Box/Box.js";
|
|
5
|
+
import { Flex as t } from "../Flex/Flex.js";
|
|
6
|
+
import { Typography as l } from "../Typography/Typography.js";
|
|
7
7
|
import { VisuallyHidden as p } from "../VisuallyHidden/VisuallyHidden.js";
|
|
8
|
-
const s =
|
|
8
|
+
const s = m(t)`
|
|
9
9
|
svg {
|
|
10
10
|
height: ${10 / 16}rem;
|
|
11
11
|
width: ${10 / 16}rem;
|
|
@@ -15,10 +15,10 @@ const s = d(l)`
|
|
|
15
15
|
}) => r.colors.neutral500};
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
-
:last-of-type ${
|
|
18
|
+
:last-of-type ${o} {
|
|
19
19
|
display: none;
|
|
20
20
|
}
|
|
21
|
-
:last-of-type ${
|
|
21
|
+
:last-of-type ${l} {
|
|
22
22
|
color: ${({
|
|
23
23
|
theme: r
|
|
24
24
|
}) => r.colors.neutral800};
|
|
@@ -31,15 +31,15 @@ const s = d(l)`
|
|
|
31
31
|
}) => i(s, {
|
|
32
32
|
inline: !0,
|
|
33
33
|
as: "li",
|
|
34
|
-
children: [e(
|
|
34
|
+
children: [e(l, {
|
|
35
35
|
variant: "pi",
|
|
36
36
|
textColor: "neutral600",
|
|
37
37
|
children: r
|
|
38
|
-
}), e(
|
|
38
|
+
}), e(o, {
|
|
39
39
|
"aria-hidden": !0,
|
|
40
40
|
paddingLeft: 3,
|
|
41
41
|
paddingRight: 3,
|
|
42
|
-
children: e(
|
|
42
|
+
children: e(d, {})
|
|
43
43
|
})]
|
|
44
44
|
});
|
|
45
45
|
h.displayName = "Crumb";
|
|
@@ -47,7 +47,7 @@ const c = ({
|
|
|
47
47
|
children: r,
|
|
48
48
|
label: n,
|
|
49
49
|
...a
|
|
50
|
-
}) => i(
|
|
50
|
+
}) => i(t, {
|
|
51
51
|
...a,
|
|
52
52
|
children: [e(p, {
|
|
53
53
|
children: n
|
package/dist/Button/Button.cjs
CHANGED
|
@@ -1,48 +1,31 @@
|
|
|
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 t=require("react/jsx-runtime"),q=require("react"),v=require("@strapi/icons"),l=require("styled-components"),d=require("./constants.cjs"),r=require("./utils.cjs"),S=require("../BaseButton/BaseButton.cjs"),T=require("../Box/Box.cjs"),_=require("../Flex/Flex.cjs"),$=require("../Typography/Typography.cjs"),f=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},D=f(q),p=f(l),F=l.keyframes`
|
|
2
2
|
from {
|
|
3
3
|
transform: rotate(0deg);
|
|
4
4
|
}
|
|
5
5
|
to {
|
|
6
6
|
transform: rotate(359deg);
|
|
7
7
|
}
|
|
8
|
-
`,L=
|
|
9
|
-
animation: ${
|
|
8
|
+
`,L=p.default.div`
|
|
9
|
+
animation: ${F} 2s infinite linear;
|
|
10
10
|
will-change: transform;
|
|
11
|
-
`,
|
|
12
|
-
height:
|
|
13
|
-
`,y=n.default(T.BaseButton)`
|
|
14
|
-
align-items: center;
|
|
15
|
-
background-color: ${({theme:t})=>t.colors.buttonPrimary600};
|
|
16
|
-
border: 1px solid ${({theme:t})=>t.colors.buttonPrimary600};
|
|
17
|
-
height: ${({theme:t,size:i})=>t.sizes.button[i]};
|
|
18
|
-
padding-left: ${({theme:t})=>t.spaces[4]};
|
|
19
|
-
padding-right: ${({theme:t})=>t.spaces[4]};
|
|
20
|
-
|
|
21
|
-
${s.Box} {
|
|
22
|
-
display: flex;
|
|
23
|
-
align-items: center;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
${p.Typography} {
|
|
27
|
-
color: ${({theme:t})=>t.colors.buttonNeutral0};
|
|
28
|
-
}
|
|
11
|
+
`,y=p.default(S.BaseButton)`
|
|
12
|
+
height: ${({theme:e,size:n})=>e.sizes.button[n]};
|
|
29
13
|
|
|
30
14
|
&[aria-disabled='true'] {
|
|
31
15
|
${r.getDisabledStyle}
|
|
16
|
+
|
|
32
17
|
&:active {
|
|
33
18
|
${r.getDisabledStyle}
|
|
34
19
|
}
|
|
35
20
|
}
|
|
21
|
+
|
|
36
22
|
&:hover {
|
|
37
23
|
${r.getHoverStyle}
|
|
38
24
|
}
|
|
25
|
+
|
|
39
26
|
&:active {
|
|
40
27
|
${r.getActiveStyle}
|
|
41
28
|
}
|
|
29
|
+
|
|
42
30
|
${r.getVariantStyle}
|
|
43
|
-
|
|
44
|
-
display: inline-flex;
|
|
45
|
-
justify-content: center;
|
|
46
|
-
width: 100%;
|
|
47
|
-
`}
|
|
48
|
-
`,h=_.default.forwardRef(({variant:t=u.DEFAULT,startIcon:i,endIcon:l,disabled:B=!1,children:x,onClick:c,size:d=u.BUTTON_SIZES[0],loading:a=!1,fullWidth:b=!1,...j},m)=>{const o=B||a,$=v=>{!o&&c&&c(v)};return e.jsxs(y,{ref:m,"aria-disabled":o,disabled:o,size:d,variant:t,onClick:$,fullWidth:b,...j,children:[(i||a)&&e.jsx(R,{"aria-hidden":!0,paddingRight:2,children:a?e.jsx(L,{children:e.jsx(q.Loader,{})}):i}),e.jsx(p.Typography,{variant:d==="S"?"pi":void 0,fontWeight:"bold",lineHeight:0,children:x}),l&&e.jsx(s.Box,{"aria-hidden":!0,paddingLeft:2,children:l})]})});h.displayName="Button";exports.Button=h;exports.ButtonWrapper=y;
|
|
31
|
+
`,g=D.default.forwardRef(({variant:e=d.DEFAULT,startIcon:n,endIcon:s,disabled:h=!1,children:B,onClick:c,size:u=d.BUTTON_SIZES[0],loading:i=!1,fullWidth:a=!1,...j},x)=>{const o=h||i,b=m=>{!o&&c&&c(m)};return t.jsxs(y,{ref:x,"aria-disabled":o,disabled:o,size:u,variant:e,onClick:b,fullWidth:a,alignItems:"center",background:"buttonPrimary600",borderColor:"buttonPrimary600",gap:2,inline:a,justifyContent:a?"center":void 0,paddingLeft:4,paddingRight:4,width:a?"100%":void 0,...j,children:[(n||i)&&t.jsx(T.Box,{"aria-hidden":!0,children:i?t.jsx(L,{children:t.jsx(v.Loader,{})}):n}),t.jsx($.Typography,{variant:u==="S"?"pi":void 0,fontWeight:"bold",lineHeight:0,textColor:"buttonNeutral0",children:B}),s&&t.jsx(_.Flex,{"aria-hidden":!0,children:s})]})});g.displayName="Button";exports.Button=g;exports.ButtonWrapper=y;
|