@strapi/design-system 1.3.0 → 1.3.1-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/dist/Accordion/AccordionContent.cjs +1 -1
- package/dist/Accordion/AccordionContent.js +37 -17
- package/dist/Accordion/AccordionToggle.cjs +6 -6
- package/dist/Accordion/AccordionToggle.js +96 -75
- package/dist/Alert/Alert.cjs +12 -12
- package/dist/Alert/Alert.js +102 -83
- package/dist/Badge/Badge.cjs +1 -1
- package/dist/Badge/Badge.js +47 -25
- package/dist/BaseButton/BaseButton.cjs +3 -3
- package/dist/BaseButton/BaseButton.js +42 -20
- package/dist/BaseCheckbox/BaseCheckbox.cjs +6 -6
- package/dist/BaseCheckbox/BaseCheckbox.js +55 -35
- package/dist/BaseLink/BaseLink.cjs +2 -2
- package/dist/BaseLink/BaseLink.js +43 -21
- package/dist/BaseRadio/BaseRadio.cjs +8 -8
- package/dist/BaseRadio/BaseRadio.js +51 -31
- package/dist/BaseRadio/RadioGroup.cjs +1 -1
- package/dist/BaseRadio/RadioGroup.js +44 -24
- package/dist/Box/BoxProps.cjs +1 -1
- package/dist/Box/BoxProps.js +19 -10
- package/dist/Breadcrumbs/Breadcrumbs.cjs +4 -4
- package/dist/Breadcrumbs/Breadcrumbs.js +50 -29
- package/dist/Button/Button.cjs +14 -14
- package/dist/Button/Button.js +73 -53
- package/dist/Card/Card.cjs +1 -1
- package/dist/Card/Card.js +37 -17
- package/dist/Card/CardAsset.cjs +4 -4
- package/dist/Card/CardAsset.js +42 -19
- package/dist/Card/CardBadge.cjs +3 -3
- package/dist/Card/CardBadge.js +18 -9
- package/dist/Card/CardBody.cjs +1 -1
- package/dist/Card/CardBody.js +19 -8
- package/dist/Card/CardCheckbox.cjs +1 -1
- package/dist/Card/CardCheckbox.js +22 -12
- package/dist/Card/CardContent.cjs +2 -2
- package/dist/Card/CardContent.js +32 -11
- package/dist/Card/CardHeader.cjs +2 -2
- package/dist/Card/CardHeader.js +19 -9
- package/dist/Card/CardTimer.cjs +2 -2
- package/dist/Card/CardTimer.js +42 -20
- package/dist/Card/CardTitle.cjs +1 -1
- package/dist/Card/CardTitle.js +27 -16
- package/dist/CarouselInput/Carousel.cjs +6 -6
- package/dist/CarouselInput/Carousel.js +107 -77
- package/dist/CarouselInput/CarouselActions.cjs +1 -1
- package/dist/CarouselInput/CarouselActions.js +17 -7
- package/dist/CarouselInput/CarouselImage.cjs +3 -3
- package/dist/CarouselInput/CarouselImage.js +38 -26
- package/dist/CarouselInput/CarouselInput.cjs +1 -1
- package/dist/CarouselInput/CarouselInput.js +83 -49
- package/dist/CarouselInput/CarouselSlide.cjs +2 -2
- package/dist/CarouselInput/CarouselSlide.js +42 -20
- package/dist/Checkbox/Checkbox.cjs +2 -2
- package/dist/Checkbox/Checkbox.js +63 -44
- package/dist/Combobox/Combobox.cjs +1 -1
- package/dist/Combobox/Combobox.js +240 -190
- package/dist/Combobox/ComboboxOption.cjs +1 -1
- package/dist/Combobox/ComboboxOption.js +47 -25
- package/dist/Combobox/utils.cjs +1 -1
- package/dist/Combobox/utils.js +18 -18
- package/dist/DatePicker/DatePicker.cjs +1 -1
- package/dist/DatePicker/DatePicker.js +111 -80
- package/dist/DatePicker/DatePickerCalendar.cjs +1 -1
- package/dist/DatePicker/DatePickerCalendar.js +1 -1
- package/dist/DatePicker/DatePickerTd.cjs +4 -4
- package/dist/DatePicker/DatePickerTd.js +42 -23
- package/dist/DatePicker/DatePickerTh.cjs +3 -3
- package/dist/DatePicker/DatePickerTh.js +44 -23
- package/dist/DatePicker/utils/getYears.cjs +1 -1
- package/dist/DatePicker/utils/getYears.js +7 -6
- package/dist/Dialog/Dialog.cjs +5 -5
- package/dist/Dialog/Dialog.js +58 -39
- package/dist/DismissibleLayer/DismissibleLayer.cjs +1 -1
- package/dist/DismissibleLayer/DismissibleLayer.js +29 -26
- package/dist/Divider/Divider.cjs +2 -2
- package/dist/Divider/Divider.js +38 -15
- package/dist/Field/Field.cjs +1 -1
- package/dist/Field/Field.js +38 -19
- package/dist/Field/FieldAction.cjs +2 -2
- package/dist/Field/FieldAction.js +35 -13
- package/dist/Field/FieldInput.cjs +6 -6
- package/dist/Field/FieldInput.js +66 -46
- package/dist/Field/FieldLabel.cjs +3 -3
- package/dist/Field/FieldLabel.js +45 -25
- package/dist/Flex/FlexProps.cjs +1 -1
- package/dist/Flex/FlexProps.js +19 -10
- package/dist/FocusTrap/FocusTrap.cjs +1 -1
- package/dist/FocusTrap/FocusTrap.js +52 -32
- package/dist/Grid/Grid.cjs +3 -3
- package/dist/Grid/Grid.js +42 -20
- package/dist/Grid/GridItem.cjs +2 -2
- package/dist/Grid/GridItem.js +41 -22
- package/dist/Icon/Icon.cjs +2 -2
- package/dist/Icon/Icon.js +27 -17
- package/dist/IconButton/IconButton.cjs +4 -4
- package/dist/IconButton/IconButton.js +67 -47
- package/dist/KeyboardNavigable/KeyboardNavigable.cjs +1 -1
- package/dist/KeyboardNavigable/KeyboardNavigable.js +58 -38
- package/dist/Layout/HeaderLayout.cjs +2 -2
- package/dist/Layout/HeaderLayout.js +96 -78
- package/dist/Link/Link.cjs +6 -6
- package/dist/Link/Link.js +54 -34
- package/dist/LinkButton/LinkButton.cjs +10 -10
- package/dist/LinkButton/LinkButton.js +69 -47
- package/dist/Loader/Loader.cjs +4 -4
- package/dist/Loader/Loader.js +47 -25
- package/dist/Main/Main.cjs +2 -2
- package/dist/Main/Main.js +35 -15
- package/dist/MainNav/MainNav.cjs +2 -2
- package/dist/MainNav/MainNav.js +39 -17
- package/dist/MainNav/NavCondense.cjs +3 -3
- package/dist/MainNav/NavCondense.js +40 -20
- package/dist/MainNav/NavLink.cjs +9 -9
- package/dist/MainNav/NavLink.js +72 -53
- package/dist/MainNav/NavSection.cjs +1 -1
- package/dist/MainNav/NavSection.js +67 -46
- package/dist/MainNav/NavSections.cjs +1 -1
- package/dist/MainNav/NavSections.js +40 -18
- package/dist/MainNav/NavUser.cjs +2 -2
- package/dist/MainNav/NavUser.js +51 -31
- package/dist/ModalLayout/ModalBody.cjs +2 -2
- package/dist/ModalLayout/ModalBody.js +19 -9
- package/dist/ModalLayout/ModalLayout.cjs +3 -3
- package/dist/ModalLayout/ModalLayout.js +52 -30
- package/dist/NumberInput/NumberInput.cjs +6 -6
- package/dist/NumberInput/NumberInput.js +154 -120
- package/dist/Pagination/components.cjs +7 -7
- package/dist/Pagination/components.js +88 -65
- package/dist/Popover/Popover.cjs +3 -3
- package/dist/Popover/Popover.js +91 -65
- package/dist/Portal/Portal.cjs +1 -1
- package/dist/Portal/Portal.js +12 -11
- package/dist/ProgressBar/ProgressBar.cjs +2 -2
- package/dist/ProgressBar/ProgressBar.js +49 -27
- package/dist/Radio/Radio.cjs +2 -2
- package/dist/Radio/Radio.js +40 -19
- package/dist/RawTable/RawCell.cjs +1 -1
- package/dist/RawTable/RawCell.js +79 -59
- package/dist/RawTable/RawTable.cjs +1 -1
- package/dist/RawTable/RawTable.js +66 -46
- package/dist/RawTable/RawTbody.cjs +1 -1
- package/dist/RawTable/RawTbody.js +30 -11
- package/dist/RawTable/RawThead.cjs +1 -1
- package/dist/RawTable/RawThead.js +29 -10
- package/dist/RawTable/RawTr.cjs +1 -1
- package/dist/RawTable/RawTr.js +34 -14
- package/dist/Searchbar/SearchForm.cjs +1 -1
- package/dist/Searchbar/SearchForm.js +16 -5
- package/dist/Searchbar/Searchbar.cjs +7 -7
- package/dist/Searchbar/Searchbar.js +65 -45
- package/dist/Select/MultiSelectNested.cjs +1 -1
- package/dist/Select/MultiSelectNested.js +45 -23
- package/dist/Select/OptGroup.cjs +1 -1
- package/dist/Select/OptGroup.js +35 -15
- package/dist/Select/Option.cjs +7 -7
- package/dist/Select/Option.js +57 -37
- package/dist/Select/Select.cjs +2 -2
- package/dist/Select/Select.js +183 -144
- package/dist/Select/SelectButton.cjs +2 -2
- package/dist/Select/SelectButton.js +53 -33
- package/dist/SimpleMenu/SimpleMenu.cjs +7 -7
- package/dist/SimpleMenu/SimpleMenu.js +145 -119
- package/dist/Stack/Stack.cjs +3 -3
- package/dist/Stack/Stack.js +50 -29
- package/dist/Status/Status.cjs +4 -4
- package/dist/Status/Status.js +50 -30
- package/dist/SubNav/SubNav.cjs +3 -3
- package/dist/SubNav/SubNav.js +37 -15
- package/dist/SubNav/SubNavHeader.cjs +2 -2
- package/dist/SubNav/SubNavHeader.js +40 -39
- package/dist/SubNav/SubNavLink.cjs +6 -6
- package/dist/SubNav/SubNavLink.js +62 -40
- package/dist/SubNav/SubNavSections.cjs +1 -1
- package/dist/SubNav/SubNavSections.js +39 -17
- package/dist/Switch/Switch.cjs +5 -5
- package/dist/Switch/Switch.js +57 -35
- package/dist/Table/Cell.cjs +3 -3
- package/dist/Table/Cell.js +40 -20
- package/dist/Table/TFooter.cjs +3 -3
- package/dist/Table/TFooter.js +50 -28
- package/dist/Table/Table.cjs +5 -5
- package/dist/Table/Table.js +56 -36
- package/dist/Table/Tbody.cjs +2 -2
- package/dist/Table/Tbody.js +17 -8
- package/dist/Table/Thead.cjs +2 -2
- package/dist/Table/Thead.js +17 -8
- package/dist/Table/Tr.cjs +2 -2
- package/dist/Table/Tr.js +17 -8
- package/dist/Tabs/TabGroup.cjs +1 -1
- package/dist/Tabs/TabGroup.js +45 -26
- package/dist/Tabs/TabPanels.cjs +1 -1
- package/dist/Tabs/TabPanels.js +43 -24
- package/dist/Tabs/Tabs.cjs +2 -2
- package/dist/Tabs/Tabs.js +112 -94
- package/dist/Tag/Tag.cjs +4 -4
- package/dist/Tag/Tag.js +50 -27
- package/dist/TextButton/TextButton.cjs +6 -6
- package/dist/TextButton/TextButton.js +59 -39
- package/dist/TextInput/TextInput.cjs +1 -1
- package/dist/TextInput/TextInput.js +69 -49
- package/dist/Textarea/Textarea.cjs +3 -3
- package/dist/Textarea/Textarea.js +63 -43
- package/dist/Textarea/TextareaInput.cjs +4 -4
- package/dist/Textarea/TextareaInput.js +49 -29
- package/dist/TimePicker/TimePicker.cjs +3 -3
- package/dist/TimePicker/TimePicker.js +89 -58
- package/dist/ToggleCheckbox/ToggleCheckbox.cjs +8 -8
- package/dist/ToggleCheckbox/ToggleCheckbox.js +75 -53
- package/dist/ToggleInput/ToggleInput.cjs +3 -3
- package/dist/ToggleInput/ToggleInput.js +98 -66
- package/dist/Tooltip/Tooltip.cjs +2 -2
- package/dist/Tooltip/Tooltip.js +57 -38
- package/dist/Typography/TypographyProps.cjs +1 -1
- package/dist/Typography/TypographyProps.js +22 -13
- package/dist/helpers/getDefaultLocale.cjs +1 -1
- package/dist/helpers/getDefaultLocale.js +1 -1
- package/dist/helpers/handleResponsiveValues.cjs +5 -5
- package/dist/helpers/handleResponsiveValues.js +14 -14
- package/dist/themes/darkTheme/index.cjs +1 -1
- package/dist/themes/darkTheme/index.js +18 -8
- package/dist/themes/extendTheme.cjs +4 -4
- package/dist/themes/extendTheme.js +29 -18
- package/dist/themes/lightTheme/index.cjs +1 -1
- package/dist/themes/lightTheme/index.js +18 -8
- package/dist/v2/Breadcrumbs/Breadcrumbs.cjs +2 -2
- package/dist/v2/Breadcrumbs/Breadcrumbs.js +43 -23
- package/dist/v2/Breadcrumbs/Crumb.cjs +1 -1
- package/dist/v2/Breadcrumbs/Crumb.js +44 -22
- package/dist/v2/Breadcrumbs/CrumbLink.cjs +2 -2
- package/dist/v2/Breadcrumbs/CrumbLink.js +35 -14
- package/dist/v2/Breadcrumbs/CrumbSimpleMenu.cjs +2 -2
- package/dist/v2/Breadcrumbs/CrumbSimpleMenu.js +41 -19
- package/dist/v2/Link/Link.cjs +5 -5
- package/dist/v2/Link/Link.js +64 -42
- package/dist/v2/LinkButton/LinkButton.cjs +10 -10
- package/dist/v2/LinkButton/LinkButton.js +75 -51
- package/dist/v2/MainNav/MainNav.cjs +2 -2
- package/dist/v2/MainNav/MainNav.js +39 -17
- package/dist/v2/MainNav/NavBrand.cjs +3 -3
- package/dist/v2/MainNav/NavBrand.js +78 -57
- package/dist/v2/MainNav/NavCondense.cjs +3 -3
- package/dist/v2/MainNav/NavCondense.js +40 -20
- package/dist/v2/MainNav/NavLink.cjs +9 -9
- package/dist/v2/MainNav/NavLink.js +77 -56
- package/dist/v2/MainNav/NavSection.cjs +1 -1
- package/dist/v2/MainNav/NavSection.js +67 -46
- package/dist/v2/MainNav/NavSections.cjs +1 -1
- package/dist/v2/MainNav/NavSections.js +40 -18
- package/dist/v2/MainNav/NavUser.cjs +2 -2
- package/dist/v2/MainNav/NavUser.js +51 -31
- package/dist/v2/Pagination/components.cjs +7 -7
- package/dist/v2/Pagination/components.js +89 -65
- package/dist/v2/SimpleMenu/SimpleMenu.cjs +7 -7
- package/dist/v2/SimpleMenu/SimpleMenu.js +145 -119
- package/dist/v2/SubNav/SubNav.cjs +3 -3
- package/dist/v2/SubNav/SubNav.js +37 -15
- package/dist/v2/SubNav/SubNavHeader.cjs +2 -2
- package/dist/v2/SubNav/SubNavHeader.js +40 -39
- package/dist/v2/SubNav/SubNavLink.cjs +6 -6
- package/dist/v2/SubNav/SubNavLink.js +65 -43
- package/dist/v2/SubNav/SubNavSections.cjs +1 -1
- package/dist/v2/SubNav/SubNavSections.js +39 -17
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";var _=Object.defineProperty;var n=Object.getOwnPropertySymbols;var d=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;var i=(e,o,t)=>o in e?_(e,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[o]=t,s=(e,o)=>{for(var t in o||(o={}))d.call(o,t)&&i(e,t,o[t]);if(n)for(var t of n(o))a.call(o,t)&&i(e,t,o[t]);return e};var l=(e,o)=>{var t={};for(var c in e)d.call(e,c)&&o.indexOf(c)<0&&(t[c]=e[c]);if(e!=null&&n)for(var c of n(e))o.indexOf(c)<0&&a.call(e,c)&&(t[c]=e[c]);return t};Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const q=require("react"),A=require("prop-types"),C=require("./AccordionContext.cjs"),g=require("../Box/Box.cjs"),u=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},j=u(q),B=u(A),p=t=>{var c=t,{children:e}=c,o=l(c,["children"]);const{expanded:f,id:r}=C.useAccordion();if(!f)return null;const b=`accordion-content-${r}`,y=`accordion-label-${r}`,x=`accordion-desc-${r}`;return j.default.createElement(g.Box,s({role:"region",id:b,"aria-labelledby":y,"aria-describedby":x},o),e)};p.propTypes={children:B.default.node.isRequired};exports.AccordionContent=p;
|
|
@@ -1,23 +1,43 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
if (
|
|
1
|
+
var u = Object.defineProperty;
|
|
2
|
+
var i = Object.getOwnPropertySymbols;
|
|
3
|
+
var d = Object.prototype.hasOwnProperty, a = Object.prototype.propertyIsEnumerable;
|
|
4
|
+
var c = (o, e, r) => e in o ? u(o, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : o[e] = r, l = (o, e) => {
|
|
5
|
+
for (var r in e || (e = {}))
|
|
6
|
+
d.call(e, r) && c(o, r, e[r]);
|
|
7
|
+
if (i)
|
|
8
|
+
for (var r of i(e))
|
|
9
|
+
a.call(e, r) && c(o, r, e[r]);
|
|
10
|
+
return o;
|
|
11
|
+
};
|
|
12
|
+
var p = (o, e) => {
|
|
13
|
+
var r = {};
|
|
14
|
+
for (var n in o)
|
|
15
|
+
d.call(o, n) && e.indexOf(n) < 0 && (r[n] = o[n]);
|
|
16
|
+
if (o != null && i)
|
|
17
|
+
for (var n of i(o))
|
|
18
|
+
e.indexOf(n) < 0 && a.call(o, n) && (r[n] = o[n]);
|
|
19
|
+
return r;
|
|
20
|
+
};
|
|
21
|
+
import y from "react";
|
|
22
|
+
import x from "prop-types";
|
|
23
|
+
import { useAccordion as $ } from "./AccordionContext.js";
|
|
24
|
+
import { Box as A } from "../Box/Box.js";
|
|
25
|
+
const C = (r) => {
|
|
26
|
+
var n = r, { children: o } = n, e = p(n, ["children"]);
|
|
27
|
+
const { expanded: s, id: t } = $();
|
|
28
|
+
if (!s)
|
|
8
29
|
return null;
|
|
9
|
-
const
|
|
10
|
-
return /* @__PURE__ */
|
|
30
|
+
const m = `accordion-content-${t}`, b = `accordion-label-${t}`, f = `accordion-desc-${t}`;
|
|
31
|
+
return /* @__PURE__ */ y.createElement(A, l({
|
|
11
32
|
role: "region",
|
|
12
|
-
id:
|
|
13
|
-
"aria-labelledby":
|
|
14
|
-
"aria-describedby":
|
|
15
|
-
|
|
16
|
-
}, e);
|
|
33
|
+
id: m,
|
|
34
|
+
"aria-labelledby": b,
|
|
35
|
+
"aria-describedby": f
|
|
36
|
+
}, e), o);
|
|
17
37
|
};
|
|
18
|
-
|
|
19
|
-
children:
|
|
38
|
+
C.propTypes = {
|
|
39
|
+
children: x.node.isRequired
|
|
20
40
|
};
|
|
21
41
|
export {
|
|
22
|
-
|
|
42
|
+
C as AccordionContent
|
|
23
43
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";var O=Object.defineProperty;var u=Object.getOwnPropertySymbols;var j=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable;var $=(e,t,o)=>t in e?O(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,f=(e,t)=>{for(var o in t||(t={}))j.call(t,o)&&$(e,o,t[o]);if(u)for(var o of u(t))q.call(t,o)&&$(e,o,t[o]);return e};var _=(e,t)=>{var o={};for(var r in e)j.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(e!=null&&u)for(var r of u(e))t.indexOf(r)<0&&q.call(e,r)&&(o[r]=e[r]);return o};Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const A=require("react"),U=require("prop-types"),X=require("@strapi/icons/CarretDown"),Y=require("styled-components"),G=require("../TextButton/TextButton.cjs"),H=require("../Typography/Typography.cjs"),J=require("./Accordion.cjs"),K=require("./AccordionContext.cjs"),E=require("../Flex/Flex.cjs"),S=require("../Stack/Stack.cjs"),N=require("../Icon/Icon.cjs"),Q=require("./utils.cjs"),p=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},a=p(A),l=p(U),V=p(X),P=p(Y),Z=P.default(G.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
|
+
`,ee=P.default(E.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
|
+
`,y=te=>{var h=te,{title:e,description:t,as:o,togglePosition:r,action:m}=h,R=_(h,["title","description","as","togglePosition","action"]);const s=A.useRef(null),{onToggle:x,toggle:b,expanded:n,id:g,size:i,variant:B,disabled:c}=K.useAccordion(),F=`accordion-content-${g}`,T=`accordion-label-${g}`,I=`accordion-desc-${g}`,d=i==="M"?6:4,w=i==="M"?d:d-2,M=Q.getBackground({expanded:n,disabled:c,variant:B}),z={as:o,fontWeight:i==="S"?"bold":void 0,id:T,textColor:n?"primary600":"neutral700",ellipsis:!0,variant:i==="M"?"delta":void 0},D=n?"primary600":"neutral600",W=n?"primary200":"neutral200",C=i==="M"?`${32/16}rem`:`${24/16}rem`,L=()=>{c||(b&&!x?(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'),b()):x())},k=a.default.createElement(E.Flex,{justifyContent:"center",borderRadius:"50%",height:C,width:C,transform:n?"rotate(180deg)":void 0,"data-strapi-dropdown":!0,disabled:c,"aria-hidden":!0,as:"span",background:W,cursor:c?"not-allowed":"pointer",onClick:()=>{var v;return(v=s==null?void 0:s.current)==null?void 0:v.click()},shrink:0},a.default.createElement(N.Icon,{as:V.default,width:i==="M"?`${11/16}rem`:`${8/16}rem`,color:n?"primary600":"neutral600"}));return a.default.createElement(ee,{paddingBottom:w,paddingLeft:d,paddingRight:d,paddingTop:w,background:M,expanded:n,size:i,justifyContent:"space-between",cursor:c?"not-allowed":""},a.default.createElement(S.Stack,{horizontal:!0,spacing:3,flex:1,maxWidth:"100%"},r==="left"&&k,a.default.createElement(Z,f({ref:s,onClick:L,"aria-disabled":c,"aria-expanded":n,"aria-controls":F,"aria-labelledby":T,"data-strapi-accordion-toggle":!0,expanded:n,type:"button",flex:1,minWidth:0},R),a.default.createElement(a.default.Fragment,null,a.default.createElement(J.AccordionTypography,f({},z),e),t&&a.default.createElement(H.Typography,{as:"p",id:I,textColor:D},t))),r==="right"&&a.default.createElement(S.Stack,{horizontal:!0,spacing:3},k,m),r==="left"&&m))};y.defaultProps={action:void 0,as:"span",description:void 0,variant:"primary",togglePosition:"right"};y.propTypes={action:l.default.node,as:l.default.string,description:l.default.string,title:l.default.string.isRequired,togglePosition:l.default.oneOf(["right","left"]),variant:l.default.oneOf(["primary","secondary"])};exports.AccordionToggle=y;
|
|
@@ -1,16 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
var O = Object.defineProperty;
|
|
2
|
+
var p = Object.getOwnPropertySymbols;
|
|
3
|
+
var T = Object.prototype.hasOwnProperty, k = Object.prototype.propertyIsEnumerable;
|
|
4
|
+
var C = (o, e, r) => e in o ? O(o, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : o[e] = r, g = (o, e) => {
|
|
5
|
+
for (var r in e || (e = {}))
|
|
6
|
+
T.call(e, r) && C(o, r, e[r]);
|
|
7
|
+
if (p)
|
|
8
|
+
for (var r of p(e))
|
|
9
|
+
k.call(e, r) && C(o, r, e[r]);
|
|
10
|
+
return o;
|
|
11
|
+
};
|
|
12
|
+
var E = (o, e) => {
|
|
13
|
+
var r = {};
|
|
14
|
+
for (var t in o)
|
|
15
|
+
T.call(o, t) && e.indexOf(t) < 0 && (r[t] = o[t]);
|
|
16
|
+
if (o != null && p)
|
|
17
|
+
for (var t of p(o))
|
|
18
|
+
e.indexOf(t) < 0 && k.call(o, t) && (r[t] = o[t]);
|
|
19
|
+
return r;
|
|
20
|
+
};
|
|
21
|
+
import i, { useRef as _ } from "react";
|
|
22
|
+
import l from "prop-types";
|
|
23
|
+
import q from "@strapi/icons/CarretDown";
|
|
24
|
+
import z from "styled-components";
|
|
25
|
+
import { TextButton as U } from "../TextButton/TextButton.js";
|
|
26
|
+
import { Typography as X } from "../Typography/Typography.js";
|
|
27
|
+
import { AccordionTypography as Y } from "./Accordion.js";
|
|
28
|
+
import { useAccordion as G } from "./AccordionContext.js";
|
|
29
|
+
import { Flex as P } from "../Flex/Flex.js";
|
|
30
|
+
import { Stack as R } from "../Stack/Stack.js";
|
|
31
|
+
import { Icon as H } from "../Icon/Icon.js";
|
|
32
|
+
import { getBackground as J } from "./utils.js";
|
|
33
|
+
const K = z(U)`
|
|
14
34
|
text-align: left;
|
|
15
35
|
|
|
16
36
|
// necessary to make the ellipsis prop work on the title
|
|
@@ -23,12 +43,12 @@ const O = x(S)`
|
|
|
23
43
|
height: ${14 / 16}rem;
|
|
24
44
|
|
|
25
45
|
path {
|
|
26
|
-
fill: ${({ theme: o, expanded:
|
|
46
|
+
fill: ${({ theme: o, expanded: e }) => e ? o.colors.primary600 : o.colors.neutral500};
|
|
27
47
|
}
|
|
28
48
|
}
|
|
29
|
-
`,
|
|
30
|
-
min-height: ${({ theme: o, size:
|
|
31
|
-
border-radius: ${({ theme: o, expanded:
|
|
49
|
+
`, N = z(P)`
|
|
50
|
+
min-height: ${({ theme: o, size: e }) => o.sizes.accordions[e]};
|
|
51
|
+
border-radius: ${({ theme: o, expanded: e }) => e ? `${o.borderRadius} ${o.borderRadius} 0 0` : o.borderRadius};
|
|
32
52
|
|
|
33
53
|
&:hover {
|
|
34
54
|
svg {
|
|
@@ -37,91 +57,92 @@ const O = x(S)`
|
|
|
37
57
|
}
|
|
38
58
|
}
|
|
39
59
|
}
|
|
40
|
-
`,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
60
|
+
`, M = (Q) => {
|
|
61
|
+
var f = Q, { title: o, description: e, as: r, togglePosition: t, action: u } = f, A = E(f, ["title", "description", "as", "togglePosition", "action"]);
|
|
62
|
+
const s = _(null), { onToggle: h, toggle: y, expanded: n, id: m, size: a, variant: B, disabled: d } = G(), I = `accordion-content-${m}`, b = `accordion-label-${m}`, S = `accordion-desc-${m}`, c = a === "M" ? 6 : 4, x = a === "M" ? c : c - 2, W = J({ expanded: n, disabled: d, variant: B }), j = {
|
|
63
|
+
as: r,
|
|
64
|
+
fontWeight: a === "S" ? "bold" : void 0,
|
|
65
|
+
id: b,
|
|
66
|
+
textColor: n ? "primary600" : "neutral700",
|
|
46
67
|
ellipsis: !0,
|
|
47
|
-
variant:
|
|
48
|
-
},
|
|
49
|
-
|
|
68
|
+
variant: a === "M" ? "delta" : void 0
|
|
69
|
+
}, D = n ? "primary600" : "neutral600", F = n ? "primary200" : "neutral200", $ = a === "M" ? `${32 / 16}rem` : `${24 / 16}rem`, L = () => {
|
|
70
|
+
d || (y && !h ? (console.warn(
|
|
50
71
|
'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'
|
|
51
|
-
),
|
|
52
|
-
},
|
|
72
|
+
), y()) : h());
|
|
73
|
+
}, w = /* @__PURE__ */ i.createElement(P, {
|
|
53
74
|
justifyContent: "center",
|
|
54
75
|
borderRadius: "50%",
|
|
55
|
-
height:
|
|
56
|
-
width:
|
|
57
|
-
transform:
|
|
76
|
+
height: $,
|
|
77
|
+
width: $,
|
|
78
|
+
transform: n ? "rotate(180deg)" : void 0,
|
|
58
79
|
"data-strapi-dropdown": !0,
|
|
59
|
-
disabled:
|
|
80
|
+
disabled: d,
|
|
60
81
|
"aria-hidden": !0,
|
|
61
82
|
as: "span",
|
|
62
|
-
background:
|
|
63
|
-
cursor:
|
|
64
|
-
onClick: () =>
|
|
83
|
+
background: F,
|
|
84
|
+
cursor: d ? "not-allowed" : "pointer",
|
|
85
|
+
onClick: () => {
|
|
86
|
+
var v;
|
|
87
|
+
return (v = s == null ? void 0 : s.current) == null ? void 0 : v.click();
|
|
88
|
+
},
|
|
65
89
|
shrink: 0
|
|
66
|
-
}, /* @__PURE__ */
|
|
67
|
-
as:
|
|
68
|
-
width:
|
|
69
|
-
color:
|
|
90
|
+
}, /* @__PURE__ */ i.createElement(H, {
|
|
91
|
+
as: q,
|
|
92
|
+
width: a === "M" ? `${11 / 16}rem` : `${8 / 16}rem`,
|
|
93
|
+
color: n ? "primary600" : "neutral600"
|
|
70
94
|
}));
|
|
71
|
-
return /* @__PURE__ */
|
|
72
|
-
paddingBottom:
|
|
73
|
-
paddingLeft:
|
|
74
|
-
paddingRight:
|
|
75
|
-
paddingTop:
|
|
76
|
-
background:
|
|
77
|
-
expanded:
|
|
78
|
-
size:
|
|
95
|
+
return /* @__PURE__ */ i.createElement(N, {
|
|
96
|
+
paddingBottom: x,
|
|
97
|
+
paddingLeft: c,
|
|
98
|
+
paddingRight: c,
|
|
99
|
+
paddingTop: x,
|
|
100
|
+
background: W,
|
|
101
|
+
expanded: n,
|
|
102
|
+
size: a,
|
|
79
103
|
justifyContent: "space-between",
|
|
80
|
-
cursor:
|
|
81
|
-
}, /* @__PURE__ */
|
|
104
|
+
cursor: d ? "not-allowed" : ""
|
|
105
|
+
}, /* @__PURE__ */ i.createElement(R, {
|
|
82
106
|
horizontal: !0,
|
|
83
107
|
spacing: 3,
|
|
84
108
|
flex: 1,
|
|
85
109
|
maxWidth: "100%"
|
|
86
|
-
},
|
|
87
|
-
ref:
|
|
88
|
-
onClick:
|
|
89
|
-
"aria-disabled":
|
|
90
|
-
"aria-expanded":
|
|
91
|
-
"aria-controls":
|
|
92
|
-
"aria-labelledby":
|
|
110
|
+
}, t === "left" && w, /* @__PURE__ */ i.createElement(K, g({
|
|
111
|
+
ref: s,
|
|
112
|
+
onClick: L,
|
|
113
|
+
"aria-disabled": d,
|
|
114
|
+
"aria-expanded": n,
|
|
115
|
+
"aria-controls": I,
|
|
116
|
+
"aria-labelledby": b,
|
|
93
117
|
"data-strapi-accordion-toggle": !0,
|
|
94
|
-
expanded:
|
|
118
|
+
expanded: n,
|
|
95
119
|
type: "button",
|
|
96
120
|
flex: 1,
|
|
97
|
-
minWidth: 0
|
|
98
|
-
|
|
99
|
-
}, /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(j, {
|
|
100
|
-
...z
|
|
101
|
-
}, o), t && /* @__PURE__ */ e.createElement(W, {
|
|
121
|
+
minWidth: 0
|
|
122
|
+
}, A), /* @__PURE__ */ i.createElement(i.Fragment, null, /* @__PURE__ */ i.createElement(Y, g({}, j), o), e && /* @__PURE__ */ i.createElement(X, {
|
|
102
123
|
as: "p",
|
|
103
|
-
id:
|
|
104
|
-
textColor:
|
|
105
|
-
},
|
|
124
|
+
id: S,
|
|
125
|
+
textColor: D
|
|
126
|
+
}, e))), t === "right" && /* @__PURE__ */ i.createElement(R, {
|
|
106
127
|
horizontal: !0,
|
|
107
128
|
spacing: 3
|
|
108
|
-
},
|
|
129
|
+
}, w, u), t === "left" && u));
|
|
109
130
|
};
|
|
110
|
-
|
|
131
|
+
M.defaultProps = {
|
|
111
132
|
action: void 0,
|
|
112
133
|
as: "span",
|
|
113
134
|
description: void 0,
|
|
114
135
|
variant: "primary",
|
|
115
136
|
togglePosition: "right"
|
|
116
137
|
};
|
|
117
|
-
|
|
118
|
-
action:
|
|
119
|
-
as:
|
|
120
|
-
description:
|
|
121
|
-
title:
|
|
122
|
-
togglePosition:
|
|
123
|
-
variant:
|
|
138
|
+
M.propTypes = {
|
|
139
|
+
action: l.node,
|
|
140
|
+
as: l.string,
|
|
141
|
+
description: l.string,
|
|
142
|
+
title: l.string.isRequired,
|
|
143
|
+
togglePosition: l.oneOf(["right", "left"]),
|
|
144
|
+
variant: l.oneOf(["primary", "secondary"])
|
|
124
145
|
};
|
|
125
146
|
export {
|
|
126
|
-
|
|
147
|
+
M as AccordionToggle
|
|
127
148
|
};
|
package/dist/Alert/Alert.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";var b=Object.defineProperty;var u=Object.getOwnPropertySymbols;var x=Object.prototype.hasOwnProperty,y=Object.prototype.propertyIsEnumerable;var m=(e,a,t)=>a in e?b(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,d=(e,a)=>{for(var t in a||(a={}))x.call(a,t)&&m(e,t,a[t]);if(u)for(var t of u(a))y.call(a,t)&&m(e,t,a[t]);return e};var g=(e,a)=>{var t={};for(var l in e)x.call(e,l)&&a.indexOf(l)<0&&(t[l]=e[l]);if(e!=null&&u)for(var l of u(e))a.indexOf(l)<0&&y.call(e,l)&&(t[l]=e[l]);return t};Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const T=require("react"),$=require("prop-types"),k=require("styled-components"),R=require("@strapi/icons/Information"),A=require("@strapi/icons/CheckCircle"),I=require("@strapi/icons/ExclamationMarkCircle"),j=require("@strapi/icons/Cross"),s=require("../Box/Box.cjs"),C=require("../Typography/Typography.cjs"),w=require("../Flex/Flex.cjs"),i=require("./utils.cjs"),v=require("../themes/utils.cjs"),n=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},r=n(T),o=n($),c=n(k),F=n(R),M=n(A),P=n(I),S=n(j),L=c.default(s.Box)`
|
|
2
2
|
flex: 1;
|
|
3
3
|
flex-wrap: wrap;
|
|
4
4
|
display: flex;
|
|
5
5
|
flex-direction: row;
|
|
6
|
-
`,
|
|
7
|
-
border: 1px solid ${
|
|
8
|
-
background: ${
|
|
6
|
+
`,W=c.default(s.Box)`
|
|
7
|
+
border: 1px solid ${i.handleBorderColor};
|
|
8
|
+
background: ${i.handleBackgroundColor};
|
|
9
9
|
box-shadow: ${({theme:e})=>e.shadows.filterShadow};
|
|
10
|
-
`,
|
|
10
|
+
`,z=c.default.button`
|
|
11
11
|
border: none;
|
|
12
12
|
background: transparent;
|
|
13
13
|
font-size: ${12/16}rem;
|
|
@@ -15,21 +15,21 @@
|
|
|
15
15
|
fill: ${({theme:e})=>e.colors.neutral700};
|
|
16
16
|
}
|
|
17
17
|
margin-top: ${({theme:e})=>e.spaces[1]};
|
|
18
|
-
${
|
|
19
|
-
`,
|
|
18
|
+
${v.buttonFocusStyle};
|
|
19
|
+
`,O=c.default(s.Box)`
|
|
20
20
|
font-size: ${20/16}rem;
|
|
21
21
|
svg path {
|
|
22
|
-
fill: ${
|
|
22
|
+
fill: ${i.handleIconColor};
|
|
23
23
|
}
|
|
24
|
-
`,
|
|
24
|
+
`,E=t=>{var l=t,{variant:e}=l,a=g(l,["variant"]);return e==="success"?r.default.createElement(M.default,d({},a)):e==="danger"?r.default.createElement(P.default,d({},a)):r.default.createElement(F.default,d({},a))},D=c.default(s.Box)`
|
|
25
25
|
// Checked with the designers, validated
|
|
26
26
|
padding-top: 1px;
|
|
27
27
|
|
|
28
28
|
& a > span {
|
|
29
|
-
color: ${
|
|
29
|
+
color: ${i.handleIconColor};
|
|
30
30
|
|
|
31
31
|
svg path {
|
|
32
|
-
fill: ${
|
|
32
|
+
fill: ${i.handleIconColor};
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
`,
|
|
35
|
+
`,f=G=>{var h=G,{title:e,children:a,variant:t,onClose:l,closeLabel:B,titleAs:_,action:p}=h,q=g(h,["title","children","variant","onClose","closeLabel","titleAs","action"]);return r.default.createElement(W,d({hasRadius:!0,paddingLeft:5,paddingRight:6,paddingTop:5,variant:t},q),r.default.createElement(w.Flex,{alignItems:"flex-start"},r.default.createElement(O,{paddingRight:3,variant:t},r.default.createElement(E,{variant:t,"aria-hidden":!0})),r.default.createElement(L,{role:t==="danger"?"alert":"status"},r.default.createElement(s.Box,{paddingBottom:2,paddingRight:1},r.default.createElement(C.Typography,{fontWeight:"bold",textColor:"neutral800",as:_},e)),r.default.createElement(s.Box,{paddingBottom:p?2:5,paddingRight:2},r.default.createElement(C.Typography,{as:"p",textColor:"neutral800"},a)),p&&r.default.createElement(D,{paddingBottom:5,variant:t},p)),r.default.createElement(z,{onClick:l,"aria-label":B},r.default.createElement(S.default,{"aria-hidden":!0}))))};f.defaultProps={action:void 0,variant:"default",titleAs:"p"};f.propTypes={action:o.default.element,children:o.default.node.isRequired,closeLabel:o.default.string.isRequired,onClose:o.default.func.isRequired,title:o.default.string.isRequired,titleAs:o.default.string,variant:o.default.oneOf(["danger","success","default"])};E.propTypes={variant:f.propTypes.variant};exports.Alert=f;
|
package/dist/Alert/Alert.js
CHANGED
|
@@ -1,111 +1,130 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
var R = Object.defineProperty;
|
|
2
|
+
var s = Object.getOwnPropertySymbols;
|
|
3
|
+
var h = Object.prototype.hasOwnProperty, E = Object.prototype.propertyIsEnumerable;
|
|
4
|
+
var u = (e, r, t) => r in e ? R(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t, i = (e, r) => {
|
|
5
|
+
for (var t in r || (r = {}))
|
|
6
|
+
h.call(r, t) && u(e, t, r[t]);
|
|
7
|
+
if (s)
|
|
8
|
+
for (var t of s(r))
|
|
9
|
+
E.call(r, t) && u(e, t, r[t]);
|
|
10
|
+
return e;
|
|
11
|
+
};
|
|
12
|
+
var m = (e, r) => {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var n in e)
|
|
15
|
+
h.call(e, n) && r.indexOf(n) < 0 && (t[n] = e[n]);
|
|
16
|
+
if (e != null && s)
|
|
17
|
+
for (var n of s(e))
|
|
18
|
+
r.indexOf(n) < 0 && E.call(e, n) && (t[n] = e[n]);
|
|
19
|
+
return t;
|
|
20
|
+
};
|
|
21
|
+
import o from "react";
|
|
22
|
+
import a from "prop-types";
|
|
23
|
+
import d from "styled-components";
|
|
24
|
+
import B from "@strapi/icons/Information";
|
|
25
|
+
import A from "@strapi/icons/CheckCircle";
|
|
26
|
+
import k from "@strapi/icons/ExclamationMarkCircle";
|
|
27
|
+
import w from "@strapi/icons/Cross";
|
|
28
|
+
import { Box as l } from "../Box/Box.js";
|
|
29
|
+
import { Typography as x } from "../Typography/Typography.js";
|
|
30
|
+
import { Flex as T } from "../Flex/Flex.js";
|
|
31
|
+
import { handleBorderColor as I, handleBackgroundColor as q, handleIconColor as c } from "./utils.js";
|
|
32
|
+
import { buttonFocusStyle as v } from "../themes/utils.js";
|
|
33
|
+
const W = d(l)`
|
|
14
34
|
flex: 1;
|
|
15
35
|
flex-wrap: wrap;
|
|
16
36
|
display: flex;
|
|
17
37
|
flex-direction: row;
|
|
18
|
-
`,
|
|
19
|
-
border: 1px solid ${
|
|
20
|
-
background: ${
|
|
21
|
-
box-shadow: ${({ theme:
|
|
22
|
-
`,
|
|
38
|
+
`, z = d(l)`
|
|
39
|
+
border: 1px solid ${I};
|
|
40
|
+
background: ${q};
|
|
41
|
+
box-shadow: ${({ theme: e }) => e.shadows.filterShadow};
|
|
42
|
+
`, F = d.button`
|
|
23
43
|
border: none;
|
|
24
44
|
background: transparent;
|
|
25
45
|
font-size: ${12 / 16}rem;
|
|
26
46
|
svg path {
|
|
27
|
-
fill: ${({ theme:
|
|
47
|
+
fill: ${({ theme: e }) => e.colors.neutral700};
|
|
28
48
|
}
|
|
29
|
-
margin-top: ${({ theme:
|
|
30
|
-
${
|
|
31
|
-
`,
|
|
49
|
+
margin-top: ${({ theme: e }) => e.spaces[1]};
|
|
50
|
+
${v};
|
|
51
|
+
`, L = d(l)`
|
|
32
52
|
font-size: ${20 / 16}rem;
|
|
33
53
|
svg path {
|
|
34
|
-
fill: ${
|
|
54
|
+
fill: ${c};
|
|
35
55
|
}
|
|
36
|
-
`,
|
|
37
|
-
|
|
38
|
-
}) :
|
|
39
|
-
|
|
40
|
-
}) : /* @__PURE__ */ e.createElement(h, {
|
|
41
|
-
...n
|
|
42
|
-
}), T = l(o)`
|
|
56
|
+
`, C = (t) => {
|
|
57
|
+
var n = t, { variant: e } = n, r = m(n, ["variant"]);
|
|
58
|
+
return e === "success" ? /* @__PURE__ */ o.createElement(A, i({}, r)) : e === "danger" ? /* @__PURE__ */ o.createElement(k, i({}, r)) : /* @__PURE__ */ o.createElement(B, i({}, r));
|
|
59
|
+
}, P = d(l)`
|
|
43
60
|
// Checked with the designers, validated
|
|
44
61
|
padding-top: 1px;
|
|
45
62
|
|
|
46
63
|
& a > span {
|
|
47
|
-
color: ${
|
|
64
|
+
color: ${c};
|
|
48
65
|
|
|
49
66
|
svg path {
|
|
50
|
-
fill: ${
|
|
67
|
+
fill: ${c};
|
|
51
68
|
}
|
|
52
69
|
}
|
|
53
|
-
`,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
70
|
+
`, f = (S) => {
|
|
71
|
+
var g = S, { title: e, children: r, variant: t, onClose: n, closeLabel: $, titleAs: b, action: p } = g, y = m(g, ["title", "children", "variant", "onClose", "closeLabel", "titleAs", "action"]);
|
|
72
|
+
return /* @__PURE__ */ o.createElement(z, i({
|
|
73
|
+
hasRadius: !0,
|
|
74
|
+
paddingLeft: 5,
|
|
75
|
+
paddingRight: 6,
|
|
76
|
+
paddingTop: 5,
|
|
77
|
+
variant: t
|
|
78
|
+
}, y), /* @__PURE__ */ o.createElement(T, {
|
|
79
|
+
alignItems: "flex-start"
|
|
80
|
+
}, /* @__PURE__ */ o.createElement(L, {
|
|
81
|
+
paddingRight: 3,
|
|
82
|
+
variant: t
|
|
83
|
+
}, /* @__PURE__ */ o.createElement(C, {
|
|
84
|
+
variant: t,
|
|
85
|
+
"aria-hidden": !0
|
|
86
|
+
})), /* @__PURE__ */ o.createElement(W, {
|
|
87
|
+
role: t === "danger" ? "alert" : "status"
|
|
88
|
+
}, /* @__PURE__ */ o.createElement(l, {
|
|
89
|
+
paddingBottom: 2,
|
|
90
|
+
paddingRight: 1
|
|
91
|
+
}, /* @__PURE__ */ o.createElement(x, {
|
|
92
|
+
fontWeight: "bold",
|
|
93
|
+
textColor: "neutral800",
|
|
94
|
+
as: b
|
|
95
|
+
}, e)), /* @__PURE__ */ o.createElement(l, {
|
|
96
|
+
paddingBottom: p ? 2 : 5,
|
|
97
|
+
paddingRight: 2
|
|
98
|
+
}, /* @__PURE__ */ o.createElement(x, {
|
|
99
|
+
as: "p",
|
|
100
|
+
textColor: "neutral800"
|
|
101
|
+
}, r)), p && /* @__PURE__ */ o.createElement(P, {
|
|
102
|
+
paddingBottom: 5,
|
|
103
|
+
variant: t
|
|
104
|
+
}, p)), /* @__PURE__ */ o.createElement(F, {
|
|
105
|
+
onClick: n,
|
|
106
|
+
"aria-label": $
|
|
107
|
+
}, /* @__PURE__ */ o.createElement(w, {
|
|
108
|
+
"aria-hidden": !0
|
|
109
|
+
}))));
|
|
110
|
+
};
|
|
111
|
+
f.defaultProps = {
|
|
93
112
|
action: void 0,
|
|
94
113
|
variant: "default",
|
|
95
114
|
titleAs: "p"
|
|
96
115
|
};
|
|
97
|
-
|
|
98
|
-
action:
|
|
99
|
-
children:
|
|
100
|
-
closeLabel:
|
|
101
|
-
onClose:
|
|
102
|
-
title:
|
|
103
|
-
titleAs:
|
|
104
|
-
variant:
|
|
116
|
+
f.propTypes = {
|
|
117
|
+
action: a.element,
|
|
118
|
+
children: a.node.isRequired,
|
|
119
|
+
closeLabel: a.string.isRequired,
|
|
120
|
+
onClose: a.func.isRequired,
|
|
121
|
+
title: a.string.isRequired,
|
|
122
|
+
titleAs: a.string,
|
|
123
|
+
variant: a.oneOf(["danger", "success", "default"])
|
|
105
124
|
};
|
|
106
|
-
|
|
107
|
-
variant:
|
|
125
|
+
C.propTypes = {
|
|
126
|
+
variant: f.propTypes.variant
|
|
108
127
|
};
|
|
109
128
|
export {
|
|
110
|
-
|
|
129
|
+
f as Alert
|
|
111
130
|
};
|
package/dist/Badge/Badge.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";var b=Object.defineProperty;var l=Object.getOwnPropertySymbols;var d=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;var i=(e,r,t)=>r in e?b(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,c=(e,r)=>{for(var t in r||(r={}))d.call(r,t)&&i(e,t,r[t]);if(l)for(var t of l(r))s.call(r,t)&&i(e,t,r[t]);return e};var p=(e,r)=>{var t={};for(var a in e)d.call(e,a)&&r.indexOf(a)<0&&(t[a]=e[a]);if(e!=null&&l)for(var a of l(e))r.indexOf(a)<0&&s.call(e,a)&&(t[a]=e[a]);return t};Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const T=require("react"),h=require("prop-types"),x=require("../Flex/Flex.cjs"),_=require("../Typography/Typography.cjs"),y=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},f=y(T),o=y(h),n=C=>{var u=C,{active:e,textColor:r,backgroundColor:t,children:a,minWidth:g}=u,m=p(u,["active","textColor","backgroundColor","children","minWidth"]);return f.default.createElement(x.Flex,c({inline:!0,alignItem:"center",justifyContent:"center",minWidth:g,padding:1,background:e?"primary100":t,hasRadius:!0},m),f.default.createElement(_.Typography,{variant:"sigma",textColor:e?"primary600":r},a))};n.defaultProps={active:!1,backgroundColor:"neutral100",minWidth:5,textColor:"neutral600"};n.propTypes={active:o.default.bool,backgroundColor:o.default.string,children:o.default.oneOfType([o.default.number,o.default.string]).isRequired,minWidth:o.default.number,textColor:o.default.string};exports.Badge=n;
|