@strapi/design-system 1.6.3 → 1.6.5
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 +6 -6
- package/dist/Accordion/AccordionToggle.js +50 -53
- 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 +3 -3
- package/dist/Box/Box.js +27 -27
- 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.cjs +1 -1
- package/dist/CarouselInput/CarouselActions.js +16 -12
- package/dist/CarouselInput/CarouselImage.js +1 -10
- package/dist/CarouselInput/CarouselInput.cjs +1 -1
- package/dist/CarouselInput/CarouselInput.js +23 -28
- package/dist/CarouselInput/CarouselSlide.js +13 -9
- package/dist/Checkbox/Checkbox.cjs +2 -2
- package/dist/Checkbox/Checkbox.js +15 -34
- package/dist/Combobox/Combobox.cjs +1 -1
- package/dist/Combobox/Combobox.js +144 -159
- 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 +30 -62
- package/dist/DatePicker/DatePickerTd.cjs +3 -3
- package/dist/DatePicker/DatePickerTd.js +8 -20
- package/dist/DatePicker/DatePickerTh.cjs +3 -3
- package/dist/DatePicker/DatePickerTh.js +10 -20
- 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 +70 -67
- package/dist/DateTimePicker/DateTimePickerProps.js +1 -3
- package/dist/Dialog/Dialog.cjs +5 -5
- 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 +3 -3
- package/dist/Dialog/DialogFooter.js +3 -8
- 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 +31 -28
- package/dist/Field/FieldAction.cjs +2 -8
- package/dist/Field/FieldAction.js +26 -19
- package/dist/Field/FieldContext.cjs +1 -1
- package/dist/Field/FieldContext.js +2 -2
- package/dist/Field/FieldError.cjs +1 -1
- package/dist/Field/FieldError.js +11 -7
- package/dist/Field/FieldHint.cjs +1 -1
- package/dist/Field/FieldHint.js +15 -10
- package/dist/Field/FieldInput.cjs +14 -16
- package/dist/Field/FieldInput.js +105 -81
- package/dist/Field/FieldLabel.cjs +3 -3
- package/dist/Field/FieldLabel.js +43 -38
- package/dist/FocusTrap/FocusTrap.cjs +1 -1
- package/dist/FocusTrap/FocusTrap.js +33 -41
- 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 +88 -79
- 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 +2 -2
- package/dist/Layout/HeaderLayout.js +37 -66
- 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 +31 -44
- package/dist/MainNav/NavSections.cjs +2 -2
- package/dist/MainNav/NavSections.js +20 -21
- 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 +75 -80
- 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 +1 -1
- package/dist/Popover/Popover.js +5 -5
- 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 +57 -72
- package/dist/RawTable/RawTable.cjs +1 -1
- package/dist/RawTable/RawTable.js +45 -42
- package/dist/RawTable/RawTbody.cjs +1 -1
- package/dist/RawTable/RawTbody.js +14 -13
- package/dist/RawTable/RawThead.cjs +1 -1
- package/dist/RawTable/RawThead.js +13 -10
- package/dist/RawTable/RawTr.cjs +1 -1
- package/dist/RawTable/RawTr.js +19 -15
- package/dist/Searchbar/SearchForm.js +1 -4
- package/dist/Searchbar/Searchbar.cjs +3 -3
- package/dist/Searchbar/Searchbar.js +25 -28
- 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 +98 -119
- 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 +24 -18
- package/dist/Select/SelectTags.cjs +3 -3
- package/dist/Select/SelectTags.js +17 -15
- 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 +3 -3
- package/dist/SubNav/SubNavLinkSection.js +5 -30
- package/dist/SubNav/SubNavSection.cjs +2 -2
- package/dist/SubNav/SubNavSection.js +27 -34
- 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 +17 -16
- 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 +8 -8
- package/dist/Tag/Tag.js +52 -52
- 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 +13 -31
- package/dist/Textarea/Textarea.cjs +2 -2
- package/dist/Textarea/Textarea.js +12 -28
- package/dist/Textarea/TextareaInput.cjs +4 -4
- package/dist/Textarea/TextareaInput.js +22 -21
- package/dist/TimePicker/TimePicker.cjs +2 -2
- package/dist/TimePicker/TimePicker.js +26 -25
- package/dist/ToggleCheckbox/ToggleCheckbox.cjs +5 -5
- package/dist/ToggleCheckbox/ToggleCheckbox.js +86 -60
- package/dist/ToggleInput/ToggleInput.cjs +3 -3
- package/dist/ToggleInput/ToggleInput.js +28 -47
- 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/deprecations.cjs +1 -1
- package/dist/helpers/deprecations.js +7 -7
- package/dist/helpers/objects.cjs +1 -1
- package/dist/helpers/objects.js +1 -1
- package/dist/helpers/useElementOnScreen.cjs +1 -1
- package/dist/helpers/useElementOnScreen.js +4 -13
- package/dist/helpers/useId.cjs +1 -1
- package/dist/helpers/useId.js +4 -11
- package/dist/helpers/useIntersection.cjs +1 -1
- package/dist/helpers/useIntersection.js +4 -21
- package/dist/helpers/useLockScroll.cjs +1 -1
- package/dist/helpers/useLockScroll.js +4 -7
- package/dist/helpers/usePrevious.cjs +1 -1
- package/dist/helpers/usePrevious.js +4 -8
- package/dist/helpers/useResizeObserver.cjs +1 -1
- package/dist/helpers/useResizeObserver.js +4 -14
- package/dist/hooks/useElementOnScreen.cjs +1 -0
- package/dist/hooks/useElementOnScreen.js +15 -0
- package/dist/hooks/useId.cjs +1 -0
- package/dist/hooks/useId.js +13 -0
- package/dist/hooks/useIntersection.cjs +1 -1
- package/dist/hooks/useIntersection.js +3 -3
- package/dist/hooks/useLockScroll.cjs +1 -0
- package/dist/hooks/useLockScroll.js +9 -0
- package/dist/hooks/usePrevious.cjs +1 -0
- package/dist/hooks/usePrevious.js +10 -0
- package/dist/hooks/useResizeObserver.cjs +1 -0
- package/dist/hooks/useResizeObserver.js +16 -0
- 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 +31 -44
- package/dist/v2/MainNav/NavSections.cjs +2 -2
- package/dist/v2/MainNav/NavSections.js +20 -21
- 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 +3 -3
- package/dist/v2/SubNav/SubNavLinkSection.js +5 -30
- package/dist/v2/SubNav/SubNavSection.cjs +2 -2
- package/dist/v2/SubNav/SubNavSection.js +29 -36
- 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 +17 -16
- package/package.json +8 -4
- package/dist/Select/SingleSelect.cjs +0 -82
- package/dist/Select/SingleSelect.js +0 -285
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
2
|
-
border: ${
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("react/jsx-runtime"),m=require("react"),$=require("styled-components"),b=require("./AccordionContext.cjs"),p=require("../Box/Box.cjs"),h=require("../Flex/Flex.cjs"),T=require("../hooks/useId.cjs"),a=require("../Typography/Typography.cjs"),_=r=>r&&typeof r=="object"&&"default"in r?r:{default:r};function q(r){if(r&&r.__esModule)return r;const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const e in r)if(e!=="default"){const t=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(o,e,t.get?t:{enumerable:!0,get:()=>r[e]})}}return o.default=r,Object.freeze(o)}const A=q(m),y=_($),v=({theme:r,expanded:o,variant:e,disabled:t,error:n})=>n?`1px solid ${r.colors.danger600} !important`:t?`1px solid ${r.colors.neutral150}`:o?`1px solid ${r.colors.primary600}`:e==="primary"?`1px solid ${r.colors.neutral0}`:`1px solid ${r.colors.neutral100}`,f=y.default(a.Typography)``,B=y.default(p.Box)`
|
|
2
|
+
border: ${v};
|
|
3
3
|
|
|
4
4
|
&:hover:not([aria-disabled='true']) {
|
|
5
5
|
border: 1px solid ${({theme:r})=>r.colors.primary600};
|
|
6
6
|
|
|
7
|
-
${
|
|
7
|
+
${f} {
|
|
8
8
|
color: ${({theme:r,expanded:o})=>o?void 0:r.colors.primary700};
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
${
|
|
11
|
+
${a.Typography} {
|
|
12
12
|
color: ${({theme:r,expanded:o})=>o?void 0:r.colors.primary600};
|
|
13
13
|
}
|
|
14
14
|
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
background: ${({theme:r})=>r.colors.primary200};
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
`,
|
|
23
|
+
`,M=({children:r,disabled:o=!1,error:e,expanded:t=!1,hasErrorMessage:n=!0,id:x,onToggle:i,toggle:d,size:u="M",variant:s="primary",shadow:g})=>{const l=T.useId(x),j=A.useMemo(()=>({expanded:t,onToggle:i,toggle:d,id:l,size:u,variant:s,disabled:o}),[o,t,l,i,u,d,s]);return c.jsxs(b.AccordionContext.Provider,{value:j,children:[c.jsx(B,{"data-strapi-expanded":t,disabled:o,"aria-disabled":o,expanded:t,hasRadius:!0,variant:s,error:e,shadow:g,children:r}),e&&n&&c.jsx(p.Box,{paddingTop:1,children:c.jsx(a.Typography,{variant:"pi",textColor:"danger600",children:e})})]})};exports.Accordion=M;exports.AccordionTypography=f;
|
|
@@ -1,39 +1,40 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import { Box as
|
|
6
|
-
import { Flex as
|
|
7
|
-
import {
|
|
8
|
-
|
|
1
|
+
import { jsxs as y, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import * as g from "react";
|
|
3
|
+
import m from "styled-components";
|
|
4
|
+
import { AccordionContext as h } from "./AccordionContext.js";
|
|
5
|
+
import { Box as u } from "../Box/Box.js";
|
|
6
|
+
import { Flex as b } from "../Flex/Flex.js";
|
|
7
|
+
import { useId as A } from "../hooks/useId.js";
|
|
8
|
+
import { Typography as p } from "../Typography/Typography.js";
|
|
9
|
+
const v = ({
|
|
9
10
|
theme: r,
|
|
10
11
|
expanded: o,
|
|
11
|
-
variant:
|
|
12
|
-
disabled:
|
|
12
|
+
variant: t,
|
|
13
|
+
disabled: i,
|
|
13
14
|
error: a
|
|
14
|
-
}) => a ? `1px solid ${r.colors.danger600} !important` :
|
|
15
|
-
border: ${
|
|
15
|
+
}) => a ? `1px solid ${r.colors.danger600} !important` : i ? `1px solid ${r.colors.neutral150}` : o ? `1px solid ${r.colors.primary600}` : t === "primary" ? `1px solid ${r.colors.neutral0}` : `1px solid ${r.colors.neutral100}`, j = m(p)``, k = m(u)`
|
|
16
|
+
border: ${v};
|
|
16
17
|
|
|
17
18
|
&:hover:not([aria-disabled='true']) {
|
|
18
19
|
border: 1px solid ${({
|
|
19
20
|
theme: r
|
|
20
21
|
}) => r.colors.primary600};
|
|
21
22
|
|
|
22
|
-
${
|
|
23
|
+
${j} {
|
|
23
24
|
color: ${({
|
|
24
25
|
theme: r,
|
|
25
26
|
expanded: o
|
|
26
27
|
}) => o ? void 0 : r.colors.primary700};
|
|
27
28
|
}
|
|
28
29
|
|
|
29
|
-
${
|
|
30
|
+
${p} {
|
|
30
31
|
color: ${({
|
|
31
32
|
theme: r,
|
|
32
33
|
expanded: o
|
|
33
34
|
}) => o ? void 0 : r.colors.primary600};
|
|
34
35
|
}
|
|
35
36
|
|
|
36
|
-
& > ${
|
|
37
|
+
& > ${b} {
|
|
37
38
|
background: ${({
|
|
38
39
|
theme: r
|
|
39
40
|
}) => r.colors.primary100};
|
|
@@ -48,48 +49,48 @@ const h = ({
|
|
|
48
49
|
`, F = ({
|
|
49
50
|
children: r,
|
|
50
51
|
disabled: o = !1,
|
|
51
|
-
error:
|
|
52
|
-
expanded:
|
|
52
|
+
error: t,
|
|
53
|
+
expanded: i = !1,
|
|
53
54
|
hasErrorMessage: a = !0,
|
|
54
|
-
id:
|
|
55
|
-
onToggle:
|
|
56
|
-
toggle:
|
|
57
|
-
size:
|
|
58
|
-
variant:
|
|
59
|
-
shadow:
|
|
55
|
+
id: f,
|
|
56
|
+
onToggle: s,
|
|
57
|
+
toggle: c,
|
|
58
|
+
size: e = "M",
|
|
59
|
+
variant: d = "primary",
|
|
60
|
+
shadow: $
|
|
60
61
|
}) => {
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
children: [n(
|
|
73
|
-
"data-strapi-expanded":
|
|
62
|
+
const l = A(f), x = g.useMemo(() => ({
|
|
63
|
+
expanded: i,
|
|
64
|
+
onToggle: s,
|
|
65
|
+
toggle: c,
|
|
66
|
+
id: l,
|
|
67
|
+
size: e,
|
|
68
|
+
variant: d,
|
|
69
|
+
disabled: o
|
|
70
|
+
}), [o, i, l, s, e, c, d]);
|
|
71
|
+
return y(h.Provider, {
|
|
72
|
+
value: x,
|
|
73
|
+
children: [n(k, {
|
|
74
|
+
"data-strapi-expanded": i,
|
|
74
75
|
disabled: o,
|
|
75
76
|
"aria-disabled": o,
|
|
76
|
-
expanded:
|
|
77
|
+
expanded: i,
|
|
77
78
|
hasRadius: !0,
|
|
78
|
-
variant:
|
|
79
|
-
error:
|
|
80
|
-
shadow:
|
|
79
|
+
variant: d,
|
|
80
|
+
error: t,
|
|
81
|
+
shadow: $,
|
|
81
82
|
children: r
|
|
82
|
-
}),
|
|
83
|
+
}), t && a && n(u, {
|
|
83
84
|
paddingTop: 1,
|
|
84
|
-
children: n(
|
|
85
|
+
children: n(p, {
|
|
85
86
|
variant: "pi",
|
|
86
87
|
textColor: "danger600",
|
|
87
|
-
children:
|
|
88
|
+
children: t
|
|
88
89
|
})
|
|
89
90
|
})]
|
|
90
91
|
});
|
|
91
92
|
};
|
|
92
93
|
export {
|
|
93
94
|
F as Accordion,
|
|
94
|
-
|
|
95
|
+
j as AccordionTypography
|
|
95
96
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("react/jsx-runtime"),s=require("
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("react/jsx-runtime"),s=require("./AccordionContext.cjs"),a=require("../Box/Box.cjs"),l=({children:o,...n})=>{const{expanded:c,id:e}=s.useAccordion();if(!c)return null;const r=`accordion-content-${e}`,t=`accordion-label-${e}`,i=`accordion-desc-${e}`;return d.jsx(a.Box,{role:"region",id:r,"aria-labelledby":t,"aria-describedby":i,...n,children:o})};exports.AccordionContent=l;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { useAccordion as a } from "./AccordionContext.js";
|
|
3
|
+
import { Box as l } from "../Box/Box.js";
|
|
4
4
|
const p = ({
|
|
5
5
|
children: r,
|
|
6
6
|
...n
|
|
@@ -8,11 +8,11 @@ const p = ({
|
|
|
8
8
|
const {
|
|
9
9
|
expanded: i,
|
|
10
10
|
id: o
|
|
11
|
-
} =
|
|
11
|
+
} = a();
|
|
12
12
|
if (!i)
|
|
13
13
|
return null;
|
|
14
14
|
const c = `accordion-content-${o}`, e = `accordion-label-${o}`, t = `accordion-desc-${o}`;
|
|
15
|
-
return d(
|
|
15
|
+
return d(l, {
|
|
16
16
|
role: "region",
|
|
17
17
|
id: c,
|
|
18
18
|
"aria-labelledby": e,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("react/jsx-runtime"),p=require("react"),b=require("styled-components"),d=require("../Box/Box.cjs"),x=require("../Flex/Flex.cjs"),y=require("../KeyboardNavigable/KeyboardNavigable.cjs"),l=require("../Typography/Typography.cjs"),g=r=>r&&typeof r=="object"&&"default"in r?r:{default:r};function f(r){if(r&&r.__esModule)return r;const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,a.get?a:{enumerable:!0,get:()=>r[t]})}}return e.default=r,Object.freeze(e)}const n=f(p),s=g(b),h=s.default(d.Box)`
|
|
2
2
|
border-bottom: 1px solid ${({theme:r})=>r.colors.neutral200};
|
|
3
3
|
border-right: 1px solid ${({theme:r})=>r.colors.neutral200};
|
|
4
4
|
border-left: 1px solid ${({theme:r})=>r.colors.neutral200};
|
|
5
5
|
border-radius: 0 0 ${({theme:r})=>r.borderRadius} ${({theme:r})=>r.borderRadius};
|
|
6
|
-
`,
|
|
6
|
+
`,j=s.default(d.Box)`
|
|
7
7
|
& > * {
|
|
8
8
|
& > * {
|
|
9
9
|
border-radius: unset;
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
`}
|
|
43
|
-
`,$=
|
|
43
|
+
`,$=s.default(d.Box)`
|
|
44
44
|
svg path {
|
|
45
45
|
fill: ${({theme:r})=>r.colors.neutral500};
|
|
46
46
|
}
|
|
47
|
-
`,
|
|
47
|
+
`,m=({children:r,footer:e,label:t,labelAction:a,error:i})=>{const c=n.Children.toArray(r).map(u=>n.cloneElement(u,{hasErrorMessage:!1}));return o.jsxs(y.KeyboardNavigable,{attributeName:"data-strapi-accordion-toggle",children:[t&&o.jsxs(x.Flex,{paddingBottom:1,children:[o.jsx(l.Typography,{variant:"pi",as:"label",textColor:"neutral800",fontWeight:"bold",children:t}),a&&o.jsx($,{paddingLeft:1,children:a})]}),o.jsx(j,{footer:e,children:c}),e&&o.jsx(h,{children:e}),i&&o.jsx(d.Box,{paddingTop:1,children:o.jsx(l.Typography,{variant:"pi",textColor:"danger600",children:i})})]})};exports.AccordionGroup=m;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsxs as l, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import * as n from "react";
|
|
3
3
|
import t from "styled-components";
|
|
4
4
|
import { Box as e } from "../Box/Box.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
const
|
|
5
|
+
import { Flex as b } from "../Flex/Flex.js";
|
|
6
|
+
import { KeyboardNavigable as m } from "../KeyboardNavigable/KeyboardNavigable.js";
|
|
7
|
+
import { Typography as p } from "../Typography/Typography.js";
|
|
8
|
+
const $ = t(e)`
|
|
9
9
|
border-bottom: 1px solid ${({
|
|
10
10
|
theme: r
|
|
11
11
|
}) => r.colors.neutral200};
|
|
@@ -20,7 +20,7 @@ const h = t(e)`
|
|
|
20
20
|
}) => r.borderRadius} ${({
|
|
21
21
|
theme: r
|
|
22
22
|
}) => r.borderRadius};
|
|
23
|
-
`,
|
|
23
|
+
`, h = t(e)`
|
|
24
24
|
& > * {
|
|
25
25
|
& > * {
|
|
26
26
|
border-radius: unset;
|
|
@@ -80,44 +80,44 @@ const h = t(e)`
|
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
`}
|
|
83
|
-
`,
|
|
83
|
+
`, x = t(e)`
|
|
84
84
|
svg path {
|
|
85
85
|
fill: ${({
|
|
86
86
|
theme: r
|
|
87
87
|
}) => r.colors.neutral500};
|
|
88
88
|
}
|
|
89
|
-
`,
|
|
89
|
+
`, C = ({
|
|
90
90
|
children: r,
|
|
91
91
|
footer: d,
|
|
92
92
|
label: i,
|
|
93
93
|
labelAction: a,
|
|
94
94
|
error: s
|
|
95
95
|
}) => {
|
|
96
|
-
const
|
|
96
|
+
const c = n.Children.toArray(r).map((u) => n.cloneElement(u, {
|
|
97
97
|
hasErrorMessage: !1
|
|
98
98
|
}));
|
|
99
|
-
return l(
|
|
99
|
+
return l(m, {
|
|
100
100
|
attributeName: "data-strapi-accordion-toggle",
|
|
101
|
-
children: [i && l(
|
|
101
|
+
children: [i && l(b, {
|
|
102
102
|
paddingBottom: 1,
|
|
103
|
-
children: [o(
|
|
103
|
+
children: [o(p, {
|
|
104
104
|
variant: "pi",
|
|
105
105
|
as: "label",
|
|
106
106
|
textColor: "neutral800",
|
|
107
107
|
fontWeight: "bold",
|
|
108
108
|
children: i
|
|
109
|
-
}), a && o(
|
|
109
|
+
}), a && o(x, {
|
|
110
110
|
paddingLeft: 1,
|
|
111
111
|
children: a
|
|
112
112
|
})]
|
|
113
|
-
}), o(
|
|
113
|
+
}), o(h, {
|
|
114
114
|
footer: d,
|
|
115
|
-
children:
|
|
116
|
-
}), d && o(
|
|
115
|
+
children: c
|
|
116
|
+
}), d && o($, {
|
|
117
117
|
children: d
|
|
118
118
|
}), s && o(e, {
|
|
119
119
|
paddingTop: 1,
|
|
120
|
-
children: o(
|
|
120
|
+
children: o(p, {
|
|
121
121
|
variant: "pi",
|
|
122
122
|
textColor: "danger600",
|
|
123
123
|
children: s
|
|
@@ -126,5 +126,5 @@ const h = t(e)`
|
|
|
126
126
|
});
|
|
127
127
|
};
|
|
128
128
|
export {
|
|
129
|
-
|
|
129
|
+
C as AccordionGroup
|
|
130
130
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("react/jsx-runtime"),F=require("@strapi/icons"),v=require("styled-components"),B=require("./Accordion.cjs"),I=require("./AccordionContext.cjs"),M=require("./utils.cjs"),s=require("../Flex/Flex.cjs"),R=require("../Icon/Icon.cjs"),z=require("../TextButton/TextButton.cjs"),S=require("../Typography/Typography.cjs"),_=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},m=_(v),D=m.default(z.TextButton)`
|
|
2
2
|
text-align: left;
|
|
3
3
|
|
|
4
4
|
// necessary to make the ellipsis prop work on the title
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
height: ${14/16}rem;
|
|
12
12
|
|
|
13
13
|
path {
|
|
14
|
-
fill: ${({theme:e,expanded:
|
|
14
|
+
fill: ${({theme:e,expanded:t})=>t?e.colors.primary600:e.colors.neutral500};
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
-
`,
|
|
18
|
-
min-height: ${({theme:e,size:
|
|
19
|
-
border-radius: ${({theme:e,expanded:
|
|
17
|
+
`,W=m.default(s.Flex)`
|
|
18
|
+
min-height: ${({theme:e,size:t})=>e.sizes.accordions[t]};
|
|
19
|
+
border-radius: ${({theme:e,expanded:t})=>t?`${e.borderRadius} ${e.borderRadius} 0 0`:e.borderRadius};
|
|
20
20
|
|
|
21
21
|
&:hover {
|
|
22
22
|
svg {
|
|
@@ -25,4 +25,4 @@
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
-
`,
|
|
28
|
+
`,L=({title:e,description:t,as:b="span",togglePosition:d="right",action:u,...j})=>{const{onToggle:c,toggle:p,expanded:r,id:l,size:n,variant:T,disabled:i}=I.useAccordion(),$=`accordion-content-${l}`,g=`accordion-label-${l}`,w=`accordion-desc-${l}`,a=n==="M"?6:4,x=n==="M"?a:a-2,C=M.getBackground({expanded:r,disabled:i,variant:T}),q={as:b,fontWeight:n==="S"?"bold":void 0,id:g,textColor:r?"primary600":"neutral700",ellipsis:!0,variant:n==="M"?"delta":void 0},k=r?"primary600":"neutral600",A=r?"primary200":"neutral200",h=n==="M"?`${32/16}rem`:`${24/16}rem`,f=()=>{i||(p&&!c?(console.warn('Deprecation warning: Usage of "toggle" prop in Accordion component is deprecated. This is discouraged and will be removed in the next major release. Please use "onToggle" instead'),p()):c&&c())},y=o.jsx(s.Flex,{justifyContent:"center",borderRadius:"50%",height:h,width:h,transform:r?"rotate(180deg)":void 0,"data-strapi-dropdown":!0,"aria-hidden":!0,as:"span",background:A,cursor:i?"not-allowed":"pointer",onClick:f,shrink:0,children:o.jsx(R.Icon,{as:F.CarretDown,width:n==="M"?`${11/16}rem`:`${8/16}rem`,color:r?"primary600":"neutral600"})});return o.jsx(W,{paddingBottom:x,paddingLeft:a,paddingRight:a,paddingTop:x,background:C,expanded:r,size:n,justifyContent:"space-between",cursor:i?"not-allowed":"",children:o.jsxs(s.Flex,{gap:3,flex:1,maxWidth:"100%",children:[d==="left"&&y,o.jsx(D,{onClick:f,"aria-disabled":i,"aria-expanded":r,"aria-controls":$,"aria-labelledby":g,"data-strapi-accordion-toggle":!0,expanded:r,type:"button",flex:1,minWidth:0,...j,children:o.jsxs(o.Fragment,{children:[o.jsx(B.AccordionTypography,{...q,children:e}),t&&o.jsx(S.Typography,{as:"p",id:w,textColor:k,children:t})]})}),d==="right"&&o.jsxs(s.Flex,{gap:3,children:[y,u]}),d==="left"&&u]})})};exports.AccordionToggle=L;
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { jsx as i, jsxs as
|
|
2
|
-
import { CarretDown as
|
|
1
|
+
import { jsx as i, jsxs as p, Fragment as M } from "react/jsx-runtime";
|
|
2
|
+
import { CarretDown as R } from "@strapi/icons";
|
|
3
3
|
import y from "styled-components";
|
|
4
|
-
import {
|
|
4
|
+
import { AccordionTypography as A } from "./Accordion.js";
|
|
5
|
+
import { useAccordion as I } from "./AccordionContext.js";
|
|
6
|
+
import { getBackground as W } from "./utils.js";
|
|
7
|
+
import { Flex as d } from "../Flex/Flex.js";
|
|
8
|
+
import { Icon as D } from "../Icon/Icon.js";
|
|
9
|
+
import { TextButton as F } from "../TextButton/TextButton.js";
|
|
5
10
|
import { Typography as S } from "../Typography/Typography.js";
|
|
6
|
-
|
|
7
|
-
import { Stack as b } from "../Stack/Stack.js";
|
|
8
|
-
import { Icon as W } from "../Icon/Icon.js";
|
|
9
|
-
import { AccordionTypography as D } from "./Accordion.js";
|
|
10
|
-
import { useAccordion as F } from "./AccordionContext.js";
|
|
11
|
-
import { getBackground as L } from "./utils.js";
|
|
12
|
-
const P = y(I)`
|
|
11
|
+
const L = y(F)`
|
|
13
12
|
text-align: left;
|
|
14
13
|
|
|
15
14
|
// necessary to make the ellipsis prop work on the title
|
|
@@ -28,7 +27,7 @@ const P = y(I)`
|
|
|
28
27
|
}) => e ? o.colors.primary600 : o.colors.neutral500};
|
|
29
28
|
}
|
|
30
29
|
}
|
|
31
|
-
`,
|
|
30
|
+
`, P = y(d)`
|
|
32
31
|
min-height: ${({
|
|
33
32
|
theme: o,
|
|
34
33
|
size: e
|
|
@@ -47,100 +46,98 @@ const P = y(I)`
|
|
|
47
46
|
}
|
|
48
47
|
}
|
|
49
48
|
}
|
|
50
|
-
`,
|
|
49
|
+
`, Q = ({
|
|
51
50
|
title: o,
|
|
52
51
|
description: e,
|
|
53
|
-
as:
|
|
54
|
-
togglePosition:
|
|
55
|
-
action:
|
|
56
|
-
...
|
|
52
|
+
as: $ = "span",
|
|
53
|
+
togglePosition: l = "right",
|
|
54
|
+
action: g,
|
|
55
|
+
...w
|
|
57
56
|
}) => {
|
|
58
57
|
const {
|
|
59
|
-
onToggle:
|
|
60
|
-
toggle:
|
|
58
|
+
onToggle: s,
|
|
59
|
+
toggle: m,
|
|
61
60
|
expanded: r,
|
|
62
|
-
id:
|
|
61
|
+
id: c,
|
|
63
62
|
size: t,
|
|
64
|
-
variant:
|
|
63
|
+
variant: C,
|
|
65
64
|
disabled: n
|
|
66
|
-
} =
|
|
65
|
+
} = I(), T = `accordion-content-${c}`, h = `accordion-label-${c}`, k = `accordion-desc-${c}`, a = t === "M" ? 6 : 4, u = t === "M" ? a : a - 2, v = W({
|
|
67
66
|
expanded: r,
|
|
68
67
|
disabled: n,
|
|
69
|
-
variant:
|
|
68
|
+
variant: C
|
|
70
69
|
}), j = {
|
|
71
|
-
as:
|
|
70
|
+
as: $,
|
|
72
71
|
fontWeight: t === "S" ? "bold" : void 0,
|
|
73
|
-
id:
|
|
72
|
+
id: h,
|
|
74
73
|
textColor: r ? "primary600" : "neutral700",
|
|
75
74
|
ellipsis: !0,
|
|
76
75
|
variant: t === "M" ? "delta" : void 0
|
|
77
|
-
},
|
|
78
|
-
n || (
|
|
79
|
-
},
|
|
76
|
+
}, z = r ? "primary600" : "neutral600", B = r ? "primary200" : "neutral200", f = t === "M" ? `${32 / 16}rem` : `${24 / 16}rem`, x = () => {
|
|
77
|
+
n || (m && !s ? (console.warn('Deprecation warning: Usage of "toggle" prop in Accordion component is deprecated. This is discouraged and will be removed in the next major release. Please use "onToggle" instead'), m()) : s && s());
|
|
78
|
+
}, b = i(d, {
|
|
80
79
|
justifyContent: "center",
|
|
81
80
|
borderRadius: "50%",
|
|
82
|
-
height:
|
|
83
|
-
width:
|
|
81
|
+
height: f,
|
|
82
|
+
width: f,
|
|
84
83
|
transform: r ? "rotate(180deg)" : void 0,
|
|
85
84
|
"data-strapi-dropdown": !0,
|
|
86
85
|
"aria-hidden": !0,
|
|
87
86
|
as: "span",
|
|
88
|
-
background:
|
|
87
|
+
background: B,
|
|
89
88
|
cursor: n ? "not-allowed" : "pointer",
|
|
90
|
-
onClick:
|
|
89
|
+
onClick: x,
|
|
91
90
|
shrink: 0,
|
|
92
|
-
children: i(
|
|
93
|
-
as:
|
|
91
|
+
children: i(D, {
|
|
92
|
+
as: R,
|
|
94
93
|
width: t === "M" ? `${11 / 16}rem` : `${8 / 16}rem`,
|
|
95
94
|
color: r ? "primary600" : "neutral600"
|
|
96
95
|
})
|
|
97
96
|
});
|
|
98
|
-
return i(
|
|
99
|
-
paddingBottom:
|
|
97
|
+
return i(P, {
|
|
98
|
+
paddingBottom: u,
|
|
100
99
|
paddingLeft: a,
|
|
101
100
|
paddingRight: a,
|
|
102
|
-
paddingTop:
|
|
101
|
+
paddingTop: u,
|
|
103
102
|
background: v,
|
|
104
103
|
expanded: r,
|
|
105
104
|
size: t,
|
|
106
105
|
justifyContent: "space-between",
|
|
107
106
|
cursor: n ? "not-allowed" : "",
|
|
108
|
-
children:
|
|
109
|
-
|
|
110
|
-
spacing: 3,
|
|
107
|
+
children: p(d, {
|
|
108
|
+
gap: 3,
|
|
111
109
|
flex: 1,
|
|
112
110
|
maxWidth: "100%",
|
|
113
|
-
children: [
|
|
114
|
-
onClick:
|
|
111
|
+
children: [l === "left" && b, i(L, {
|
|
112
|
+
onClick: x,
|
|
115
113
|
"aria-disabled": n,
|
|
116
114
|
"aria-expanded": r,
|
|
117
115
|
"aria-controls": T,
|
|
118
|
-
"aria-labelledby":
|
|
116
|
+
"aria-labelledby": h,
|
|
119
117
|
"data-strapi-accordion-toggle": !0,
|
|
120
118
|
expanded: r,
|
|
121
119
|
type: "button",
|
|
122
120
|
flex: 1,
|
|
123
121
|
minWidth: 0,
|
|
124
|
-
...
|
|
125
|
-
children:
|
|
126
|
-
children: [i(
|
|
122
|
+
...w,
|
|
123
|
+
children: p(M, {
|
|
124
|
+
children: [i(A, {
|
|
127
125
|
...j,
|
|
128
126
|
children: o
|
|
129
127
|
}), e && i(S, {
|
|
130
128
|
as: "p",
|
|
131
|
-
id:
|
|
132
|
-
textColor:
|
|
129
|
+
id: k,
|
|
130
|
+
textColor: z,
|
|
133
131
|
children: e
|
|
134
132
|
})]
|
|
135
133
|
})
|
|
136
|
-
}),
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
}), d === "left" && p]
|
|
134
|
+
}), l === "right" && p(d, {
|
|
135
|
+
gap: 3,
|
|
136
|
+
children: [b, g]
|
|
137
|
+
}), l === "left" && g]
|
|
141
138
|
})
|
|
142
139
|
});
|
|
143
140
|
};
|
|
144
141
|
export {
|
|
145
|
-
|
|
142
|
+
Q as AccordionToggle
|
|
146
143
|
};
|
package/dist/Alert/Alert.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),a=require("@strapi/icons"),h=require("styled-components"),s=require("./utils.cjs"),o=require("../Box/Box.cjs"),g=require("../Flex/Flex.cjs"),f=require("../themes/utils.cjs"),i=require("../Typography/Typography.cjs"),j=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},l=j(h),y=l.default(o.Box)`
|
|
2
2
|
flex: 1;
|
|
3
3
|
flex-wrap: wrap;
|
|
4
4
|
display: flex;
|
package/dist/Alert/Alert.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { jsx as r, jsxs as a } from "react/jsx-runtime";
|
|
2
|
-
import d from "styled-components";
|
|
3
2
|
import { Cross as f, CheckCircle as m, ExclamationMarkCircle as u, Information as x } from "@strapi/icons";
|
|
3
|
+
import d from "styled-components";
|
|
4
|
+
import { handleBorderColor as C, handleBackgroundColor as $, handleIconColor as l } from "./utils.js";
|
|
4
5
|
import { Box as t } from "../Box/Box.js";
|
|
6
|
+
import { Flex as b } from "../Flex/Flex.js";
|
|
7
|
+
import { buttonFocusStyle as B } from "../themes/utils.js";
|
|
5
8
|
import { Typography as s } from "../Typography/Typography.js";
|
|
6
|
-
import { Flex as C } from "../Flex/Flex.js";
|
|
7
|
-
import { buttonFocusStyle as $ } from "../themes/utils.js";
|
|
8
|
-
import { handleBorderColor as b, handleBackgroundColor as B, handleIconColor as l } from "./utils.js";
|
|
9
9
|
const w = d(t)`
|
|
10
10
|
flex: 1;
|
|
11
11
|
flex-wrap: wrap;
|
|
12
12
|
display: flex;
|
|
13
13
|
flex-direction: row;
|
|
14
14
|
`, k = d(t)`
|
|
15
|
-
border: 1px solid ${
|
|
16
|
-
background: ${
|
|
15
|
+
border: 1px solid ${C};
|
|
16
|
+
background: ${$};
|
|
17
17
|
box-shadow: ${({
|
|
18
18
|
theme: o
|
|
19
19
|
}) => o.shadows.filterShadow};
|
|
@@ -29,7 +29,7 @@ const w = d(t)`
|
|
|
29
29
|
margin-top: ${({
|
|
30
30
|
theme: o
|
|
31
31
|
}) => o.spaces[1]};
|
|
32
|
-
${
|
|
32
|
+
${B};
|
|
33
33
|
`, A = d(t)`
|
|
34
34
|
font-size: ${20 / 16}rem;
|
|
35
35
|
svg path {
|
|
@@ -71,7 +71,7 @@ const w = d(t)`
|
|
|
71
71
|
paddingTop: 5,
|
|
72
72
|
variant: n,
|
|
73
73
|
...g,
|
|
74
|
-
children: a(
|
|
74
|
+
children: a(b, {
|
|
75
75
|
alignItems: "flex-start",
|
|
76
76
|
children: [r(A, {
|
|
77
77
|
paddingRight: 3,
|
package/dist/Avatar/Avatar.cjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
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("react/jsx-runtime"),u=require("react"),d=require("styled-components"),t=require("./constants.cjs"),l=require("../Box/Box.cjs"),p=require("../Flex/Flex.cjs"),x=require("../Typography/Typography.cjs"),f=e=>e&&typeof e=="object"&&"default"in e?e:{default:e};function g(e){if(e&&e.__esModule)return e;const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(a,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}return a.default=e,Object.freeze(a)}const h=g(u),n=f(d),v=n.default.img`
|
|
2
2
|
border-radius: 50%;
|
|
3
3
|
object-fit: cover;
|
|
4
4
|
display: block;
|
|
5
5
|
position: relative;
|
|
6
|
-
`,
|
|
6
|
+
`,b=n.default.img`
|
|
7
7
|
border-radius: 50%;
|
|
8
8
|
object-fit: cover;
|
|
9
9
|
position: absolute;
|
|
10
10
|
transform: translate(-${(t.previewSize-t.avatarSize)/2}px, -100%);
|
|
11
11
|
margin-top: -${({theme:e})=>e.spaces[1]};
|
|
12
|
-
`,
|
|
12
|
+
`,y=n.default(l.Box)`
|
|
13
13
|
opacity: 0.4;
|
|
14
|
-
`,
|
|
14
|
+
`,j=({src:e,alt:a,preview:r})=>{const[o,c]=h.useState(!1),s=Boolean(r&&o);return i.jsxs("span",{children:[s?i.jsx(b,{"aria-hidden":!0,alt:"",width:`${t.previewSize}px`,height:`${t.previewSize}px`,src:r===!0?e:typeof r=="string"?r:""}):null,i.jsxs(l.Box,{zIndex:s?1:void 0,position:"relative",onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),width:`${t.avatarSize}px`,height:`${t.avatarSize}px`,children:[s?i.jsx(y,{background:"neutral0",borderRadius:"50%",position:"absolute",width:`${t.avatarSize}px`,height:`${t.avatarSize}px`,zIndex:1}):null,i.jsx(v,{src:e,alt:a,width:`${t.avatarSize}px`,height:`${t.avatarSize}px`})]})]})},S=n.default(p.Flex)`
|
|
15
15
|
span {
|
|
16
16
|
line-height: 0;
|
|
17
17
|
}
|
|
18
|
-
`,
|
|
18
|
+
`,z=({children:e,background:a="primary600",textColor:r="buttonNeutral0"})=>i.jsx(S,{background:a,borderRadius:"50%",width:`${t.avatarSize}px`,height:`${t.avatarSize}px`,justifyContent:"center",children:i.jsx(x.Typography,{fontSize:0,fontWeight:"bold",textColor:r,textTransform:"uppercase",children:e})});exports.Avatar=j;exports.Initials=z;
|