@strapi/design-system 1.4.0-beta.0 → 1.4.0-beta.2
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 +8 -8
- package/dist/Accordion/Accordion.js +11 -12
- 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 +4 -1
- package/dist/Badge/Badge.js +56 -26
- 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 +56 -36
- 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 +84 -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 +262 -194
- package/dist/Combobox/ComboboxList.cjs +1 -1
- package/dist/Combobox/ComboboxList.js +5 -5
- package/dist/Combobox/ComboboxOption.cjs +1 -1
- package/dist/Combobox/ComboboxOption.js +47 -25
- package/dist/Combobox/components.cjs +2 -2
- package/dist/Combobox/components.js +1 -1
- package/dist/Combobox/utils.cjs +1 -1
- package/dist/Combobox/utils.js +21 -21
- package/dist/DatePicker/DatePicker.cjs +1 -1
- package/dist/DatePicker/DatePicker.js +110 -80
- package/dist/DatePicker/DatePickerCalendar.cjs +1 -1
- package/dist/DatePicker/DatePickerCalendar.js +18 -13
- 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/DateTimePicker/DateTimePicker.cjs +1 -1
- package/dist/DateTimePicker/DateTimePicker.js +124 -89
- package/dist/DateTimePicker/DateTimePickerProps.cjs +1 -1
- package/dist/DateTimePicker/DateTimePickerProps.js +19 -10
- package/dist/Dialog/Dialog.cjs +5 -5
- package/dist/Dialog/Dialog.js +58 -39
- package/dist/Dialog/DialogBody.cjs +2 -2
- package/dist/Dialog/DialogBody.js +14 -11
- package/dist/DismissibleLayer/DismissibleLayer.cjs +1 -1
- package/dist/DismissibleLayer/DismissibleLayer.js +22 -27
- 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 +67 -47
- 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 +20 -10
- package/dist/FocusTrap/ExampleComponent.cjs +1 -1
- package/dist/FocusTrap/ExampleComponent.js +3 -2
- package/dist/FocusTrap/FocusTrap.cjs +1 -1
- package/dist/FocusTrap/FocusTrap.js +56 -35
- 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 +68 -49
- 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 +59 -37
- package/dist/LinkButton/LinkButton.cjs +10 -10
- package/dist/LinkButton/LinkButton.js +71 -49
- 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 +149 -117
- 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 +93 -66
- 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 +97 -62
- package/dist/RawTable/RawTable.cjs +1 -1
- package/dist/RawTable/RawTable.js +67 -46
- package/dist/RawTable/RawTableContext.cjs +1 -1
- package/dist/RawTable/RawTableContext.js +1 -1
- 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 +187 -148
- 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 +143 -102
- 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 +44 -43
- package/dist/SubNav/SubNavLink.cjs +6 -6
- package/dist/SubNav/SubNavLink.js +61 -40
- package/dist/SubNav/SubNavLinkSection.cjs +4 -4
- package/dist/SubNav/SubNavLinkSection.js +8 -7
- package/dist/SubNav/SubNavSection.cjs +2 -2
- package/dist/SubNav/SubNavSection.js +11 -10
- package/dist/SubNav/SubNavSectionLabel.cjs +1 -1
- package/dist/SubNav/SubNavSectionLabel.js +1 -1
- 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 +59 -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 +46 -27
- 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/Tabs/useTabsFocus.cjs +1 -1
- package/dist/Tabs/useTabsFocus.js +12 -11
- 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 +93 -60
- 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/Tooltip/hooks/useTooltipLayout.cjs +1 -1
- package/dist/Tooltip/hooks/useTooltipLayout.js +9 -9
- 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/helpers/useIntersection.cjs +1 -1
- package/dist/helpers/useIntersection.js +13 -11
- package/dist/helpers/useResizeObserver.cjs +1 -1
- package/dist/helpers/useResizeObserver.js +10 -8
- package/dist/hooks/useControllableState.cjs +1 -0
- package/dist/hooks/useControllableState.js +25 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +285 -284
- package/dist/themes/ColorButton.cjs +2 -2
- package/dist/themes/ColorButton.js +4 -4
- package/dist/themes/darkTheme/index.cjs +1 -1
- package/dist/themes/darkTheme/index.js +18 -8
- package/dist/themes/extendTheme.cjs +5 -5
- package/dist/themes/extendTheme.js +30 -19
- package/dist/themes/lightTheme/index.cjs +1 -1
- package/dist/themes/lightTheme/index.js +18 -8
- package/dist/themes/sizes.cjs +1 -1
- package/dist/themes/sizes.js +4 -0
- 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 +77 -53
- 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 +155 -120
- 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 +44 -43
- package/dist/v2/SubNav/SubNavLink.cjs +6 -6
- package/dist/v2/SubNav/SubNavLink.js +64 -43
- package/dist/v2/SubNav/SubNavLinkSection.cjs +4 -4
- package/dist/v2/SubNav/SubNavLinkSection.js +8 -8
- package/dist/v2/SubNav/SubNavSection.cjs +2 -2
- package/dist/v2/SubNav/SubNavSection.js +1 -1
- package/dist/v2/SubNav/SubNavSectionLabel.cjs +1 -1
- package/dist/v2/SubNav/SubNavSectionLabel.js +1 -1
- package/dist/v2/SubNav/SubNavSections.cjs +1 -1
- package/dist/v2/SubNav/SubNavSections.js +39 -17
- package/package.json +8 -15
package/dist/Card/CardTimer.js
CHANGED
|
@@ -1,26 +1,48 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
var l = Object.defineProperty;
|
|
2
|
+
var a = Object.getOwnPropertySymbols;
|
|
3
|
+
var i = Object.prototype.hasOwnProperty, m = Object.prototype.propertyIsEnumerable;
|
|
4
|
+
var p = (r, e, o) => e in r ? l(r, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : r[e] = o, s = (r, e) => {
|
|
5
|
+
for (var o in e || (e = {}))
|
|
6
|
+
i.call(e, o) && p(r, o, e[o]);
|
|
7
|
+
if (a)
|
|
8
|
+
for (var o of a(e))
|
|
9
|
+
m.call(e, o) && p(r, o, e[o]);
|
|
10
|
+
return r;
|
|
11
|
+
};
|
|
12
|
+
var n = (r, e) => {
|
|
13
|
+
var o = {};
|
|
14
|
+
for (var t in r)
|
|
15
|
+
i.call(r, t) && e.indexOf(t) < 0 && (o[t] = r[t]);
|
|
16
|
+
if (r != null && a)
|
|
17
|
+
for (var t of a(r))
|
|
18
|
+
e.indexOf(t) < 0 && m.call(r, t) && (o[t] = r[t]);
|
|
19
|
+
return o;
|
|
20
|
+
};
|
|
21
|
+
import d from "react";
|
|
22
|
+
import c from "prop-types";
|
|
23
|
+
import u from "styled-components";
|
|
24
|
+
import { Box as f } from "../Box/Box.js";
|
|
25
|
+
import { Typography as y } from "../Typography/Typography.js";
|
|
26
|
+
const T = u(f)`
|
|
7
27
|
position: absolute;
|
|
8
28
|
bottom: ${({ theme: r }) => r.spaces[1]};
|
|
9
29
|
right: ${({ theme: r }) => r.spaces[1]};
|
|
10
|
-
`,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
30
|
+
`, g = (o) => {
|
|
31
|
+
var t = o, { children: r } = t, e = n(t, ["children"]);
|
|
32
|
+
return /* @__PURE__ */ d.createElement(T, s({
|
|
33
|
+
padding: 1,
|
|
34
|
+
background: "neutral800",
|
|
35
|
+
color: "neutral0",
|
|
36
|
+
as: "time",
|
|
37
|
+
hasRadius: !0
|
|
38
|
+
}, e), /* @__PURE__ */ d.createElement(y, {
|
|
39
|
+
variant: "pi",
|
|
40
|
+
textColor: "neutral0"
|
|
41
|
+
}, r));
|
|
42
|
+
};
|
|
43
|
+
g.propTypes = {
|
|
44
|
+
children: c.node.isRequired
|
|
23
45
|
};
|
|
24
46
|
export {
|
|
25
|
-
|
|
47
|
+
g as CardTimer
|
|
26
48
|
};
|
package/dist/Card/CardTitle.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";var d=Object.defineProperty,c=Object.defineProperties;var s=Object.getOwnPropertyDescriptors;var o=Object.getOwnPropertySymbols;var p=Object.prototype.hasOwnProperty,y=Object.prototype.propertyIsEnumerable;var i=(t,e,r)=>e in t?d(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,a=(t,e)=>{for(var r in e||(e={}))p.call(e,r)&&i(t,r,e[r]);if(o)for(var r of o(e))y.call(e,r)&&i(t,r,e[r]);return t},l=(t,e)=>c(t,s(e));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const C=require("react"),n=require("../Typography/Typography.cjs"),f=require("./CardContext.cjs"),g=t=>t&&typeof t=="object"&&"default"in t?t:{default:t},u=g(C),T=t=>{const{id:e}=f.useCard();return u.default.createElement(n.Typography,a({variant:"pi",id:`${e}-title`,textColor:"neutral800",fontWeight:"bold",as:"div"},t))},b=t=>u.default.createElement(n.Typography,l(a({variant:"pi"},t),{textColor:"neutral600",as:"div"}));exports.CardSubtitle=b;exports.CardTitle=T;
|
package/dist/Card/CardTitle.js
CHANGED
|
@@ -1,23 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
var m = Object.defineProperty, p = Object.defineProperties;
|
|
2
|
+
var u = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var a = Object.getOwnPropertySymbols;
|
|
4
|
+
var c = Object.prototype.hasOwnProperty, s = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var i = (r, t, e) => t in r ? m(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e, o = (r, t) => {
|
|
6
|
+
for (var e in t || (t = {}))
|
|
7
|
+
c.call(t, e) && i(r, e, t[e]);
|
|
8
|
+
if (a)
|
|
9
|
+
for (var e of a(t))
|
|
10
|
+
s.call(t, e) && i(r, e, t[e]);
|
|
11
|
+
return r;
|
|
12
|
+
}, n = (r, t) => p(r, u(t));
|
|
13
|
+
import l from "react";
|
|
14
|
+
import { Typography as d } from "../Typography/Typography.js";
|
|
15
|
+
import { useCard as f } from "./CardContext.js";
|
|
16
|
+
const g = (r) => {
|
|
17
|
+
const { id: t } = f();
|
|
18
|
+
return /* @__PURE__ */ l.createElement(d, o({
|
|
7
19
|
variant: "pi",
|
|
8
|
-
id: `${
|
|
20
|
+
id: `${t}-title`,
|
|
9
21
|
textColor: "neutral800",
|
|
10
22
|
fontWeight: "bold",
|
|
11
|
-
as: "div"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
...t,
|
|
23
|
+
as: "div"
|
|
24
|
+
}, r));
|
|
25
|
+
}, h = (r) => /* @__PURE__ */ l.createElement(d, n(o({
|
|
26
|
+
variant: "pi"
|
|
27
|
+
}, r), {
|
|
17
28
|
textColor: "neutral600",
|
|
18
29
|
as: "div"
|
|
19
|
-
});
|
|
30
|
+
}));
|
|
20
31
|
export {
|
|
21
|
-
|
|
22
|
-
|
|
32
|
+
h as CardSubtitle,
|
|
33
|
+
g as CardTitle
|
|
23
34
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";var D=Object.defineProperty,F=Object.defineProperties;var P=Object.getOwnPropertyDescriptors;var u=Object.getOwnPropertySymbols;var x=Object.prototype.hasOwnProperty,C=Object.prototype.propertyIsEnumerable;var R=(e,t,r)=>t in e?D(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,T=(e,t)=>{for(var r in t||(t={}))x.call(t,r)&&R(e,r,t[r]);if(u)for(var r of u(t))C.call(t,r)&&R(e,r,t[r]);return e},E=(e,t)=>F(e,P(t));var _=(e,t)=>{var r={};for(var l in e)x.call(e,l)&&t.indexOf(l)<0&&(r[l]=e[l]);if(e!=null&&u)for(var l of u(e))t.indexOf(l)<0&&C.call(e,l)&&(r[l]=e[l]);return r};Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("react"),S=require("prop-types"),O=require("styled-components"),G=require("@strapi/icons/ChevronRight"),M=require("@strapi/icons/ChevronLeft"),j=require("../Icon/Icon.cjs"),d=require("../Box/Box.cjs"),$=require("../Typography/Typography.cjs"),H=require("../Flex/Flex.cjs"),z=require("../Tooltip/Tooltip.cjs"),A=require("../helpers/keyboardKeys.cjs"),s=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},o=s(i),a=s(S),f=s(O),J=s(G),N=s(M),Q=f.default(d.Box)`
|
|
2
2
|
display: grid;
|
|
3
3
|
grid-template-columns: auto 1fr auto;
|
|
4
4
|
grid-template-areas: 'startAction slides endAction';
|
|
5
|
-
`,
|
|
5
|
+
`,U=f.default(d.Box)`
|
|
6
6
|
grid-area: slides;
|
|
7
|
-
`,
|
|
8
|
-
grid-area: ${({area:
|
|
7
|
+
`,L=f.default.button`
|
|
8
|
+
grid-area: ${({area:e})=>e};
|
|
9
9
|
|
|
10
10
|
&:focus svg path,
|
|
11
11
|
&:hover svg path {
|
|
12
|
-
fill: ${({theme:
|
|
12
|
+
fill: ${({theme:e})=>e.colors.neutral900};
|
|
13
13
|
}
|
|
14
|
-
`,
|
|
14
|
+
`,p=V=>{var g=V,{actions:e,children:t,label:r,nextLabel:l,onNext:h,onPrevious:y,previousLabel:k,secondaryLabel:c,selectedSlide:B}=g,K=_(g,["actions","children","label","nextLabel","onNext","onPrevious","previousLabel","secondaryLabel","selectedSlide"]);const b=i.useRef(null),v=i.useRef(null),m=i.Children.toArray(t).map((n,I)=>i.cloneElement(n,{selected:I===B})),w=n=>{switch(n.key){case A.KeyboardKeys.RIGHT:{n.preventDefault(),v.current.focus(),h();break}case A.KeyboardKeys.LEFT:{n.preventDefault(),b.current.focus(),y();break}}},q=m.length>1;return o.default.createElement(d.Box,E(T({},K),{onKeyDown:w}),o.default.createElement(d.Box,{padding:2,borderColor:"neutral200",hasRadius:!0,background:"neutral100"},o.default.createElement(Q,{as:"section","aria-roledescription":"carousel","aria-label":r,position:"relative"},q&&o.default.createElement(L,{onClick:y,area:"startAction",ref:b,"aria-label":k,type:"button"},o.default.createElement(j.Icon,{as:N.default,"aria-hidden":!0,width:"6px",height:"10px",color:"neutral600"})),q&&o.default.createElement(L,{onClick:h,area:"endAction",ref:v,"aria-label":l,type:"button"},o.default.createElement(j.Icon,{as:J.default,"aria-hidden":!0,width:"6px",height:"10px",color:"neutral600"})),o.default.createElement(U,{"aria-live":"polite",paddingLeft:2,paddingRight:2,width:"100%",overflow:"hidden"},m),e),c&&o.default.createElement(d.Box,{paddingTop:2,paddingLeft:4,paddingRight:4},o.default.createElement(z.Tooltip,{label:c},o.default.createElement(H.Flex,{justifyContent:"center"},o.default.createElement($.Typography,{variant:"pi",textColor:"neutral600",ellipsis:!0},c))))))};p.defaultProps={actions:void 0,error:void 0,hint:void 0,required:!1,secondaryLabel:void 0};p.propTypes={actions:a.default.node,children:a.default.node.isRequired,error:a.default.string,hint:a.default.oneOfType([a.default.string,a.default.node,a.default.arrayOf(a.default.node)]),label:a.default.string.isRequired,nextLabel:a.default.string.isRequired,onNext:a.default.func.isRequired,onPrevious:a.default.func.isRequired,previousLabel:a.default.string.isRequired,required:a.default.bool,secondaryLabel:a.default.string,selectedSlide:a.default.number.isRequired};exports.Carousel=p;
|
|
@@ -1,131 +1,161 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
var I = Object.defineProperty, O = Object.defineProperties;
|
|
2
|
+
var P = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var s = Object.getOwnPropertySymbols;
|
|
4
|
+
var v = Object.prototype.hasOwnProperty, R = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var b = (e, r, t) => r in e ? I(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t, E = (e, r) => {
|
|
6
|
+
for (var t in r || (r = {}))
|
|
7
|
+
v.call(r, t) && b(e, t, r[t]);
|
|
8
|
+
if (s)
|
|
9
|
+
for (var t of s(r))
|
|
10
|
+
R.call(r, t) && b(e, t, r[t]);
|
|
11
|
+
return e;
|
|
12
|
+
}, C = (e, r) => O(e, P(r));
|
|
13
|
+
var x = (e, r) => {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var n in e)
|
|
16
|
+
v.call(e, n) && r.indexOf(n) < 0 && (t[n] = e[n]);
|
|
17
|
+
if (e != null && s)
|
|
18
|
+
for (var n of s(e))
|
|
19
|
+
r.indexOf(n) < 0 && R.call(e, n) && (t[n] = e[n]);
|
|
20
|
+
return t;
|
|
21
|
+
};
|
|
22
|
+
import i, { useRef as q, Children as S, cloneElement as _ } from "react";
|
|
23
|
+
import o from "prop-types";
|
|
24
|
+
import c from "styled-components";
|
|
25
|
+
import $ from "@strapi/icons/ChevronRight";
|
|
26
|
+
import j from "@strapi/icons/ChevronLeft";
|
|
27
|
+
import { Icon as A } from "../Icon/Icon.js";
|
|
28
|
+
import { Box as l } from "../Box/Box.js";
|
|
29
|
+
import { Typography as B } from "../Typography/Typography.js";
|
|
30
|
+
import { Flex as H } from "../Flex/Flex.js";
|
|
31
|
+
import { Tooltip as z } from "../Tooltip/Tooltip.js";
|
|
32
|
+
import { KeyboardKeys as T } from "../helpers/keyboardKeys.js";
|
|
33
|
+
const J = c(l)`
|
|
13
34
|
display: grid;
|
|
14
35
|
grid-template-columns: auto 1fr auto;
|
|
15
36
|
grid-template-areas: 'startAction slides endAction';
|
|
16
|
-
`,
|
|
37
|
+
`, M = c(l)`
|
|
17
38
|
grid-area: slides;
|
|
18
|
-
`,
|
|
19
|
-
grid-area: ${({ area:
|
|
39
|
+
`, w = c.button`
|
|
40
|
+
grid-area: ${({ area: e }) => e};
|
|
20
41
|
|
|
21
42
|
&:focus svg path,
|
|
22
43
|
&:hover svg path {
|
|
23
|
-
fill: ${({ theme:
|
|
44
|
+
fill: ${({ theme: e }) => e.colors.neutral900};
|
|
24
45
|
}
|
|
25
|
-
`,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
46
|
+
`, k = (N) => {
|
|
47
|
+
var m = N, {
|
|
48
|
+
actions: e,
|
|
49
|
+
children: r,
|
|
50
|
+
label: t,
|
|
51
|
+
nextLabel: n,
|
|
52
|
+
onNext: p,
|
|
53
|
+
onPrevious: u,
|
|
54
|
+
previousLabel: L,
|
|
55
|
+
secondaryLabel: d,
|
|
56
|
+
selectedSlide: D
|
|
57
|
+
} = m, K = x(m, [
|
|
58
|
+
"actions",
|
|
59
|
+
"children",
|
|
60
|
+
"label",
|
|
61
|
+
"nextLabel",
|
|
62
|
+
"onNext",
|
|
63
|
+
"onPrevious",
|
|
64
|
+
"previousLabel",
|
|
65
|
+
"secondaryLabel",
|
|
66
|
+
"selectedSlide"
|
|
67
|
+
]);
|
|
68
|
+
const f = q(null), h = q(null), g = S.toArray(r).map(
|
|
69
|
+
(a, G) => _(a, { selected: G === D })
|
|
70
|
+
), F = (a) => {
|
|
71
|
+
switch (a.key) {
|
|
72
|
+
case T.RIGHT: {
|
|
73
|
+
a.preventDefault(), h.current.focus(), p();
|
|
43
74
|
break;
|
|
44
75
|
}
|
|
45
|
-
case
|
|
46
|
-
|
|
76
|
+
case T.LEFT: {
|
|
77
|
+
a.preventDefault(), f.current.focus(), u();
|
|
47
78
|
break;
|
|
48
79
|
}
|
|
49
80
|
}
|
|
50
|
-
},
|
|
51
|
-
return /* @__PURE__ */
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}, /* @__PURE__ */ r.createElement(i, {
|
|
81
|
+
}, y = g.length > 1;
|
|
82
|
+
return /* @__PURE__ */ i.createElement(l, C(E({}, K), {
|
|
83
|
+
onKeyDown: F
|
|
84
|
+
}), /* @__PURE__ */ i.createElement(l, {
|
|
55
85
|
padding: 2,
|
|
56
86
|
borderColor: "neutral200",
|
|
57
87
|
hasRadius: !0,
|
|
58
88
|
background: "neutral100"
|
|
59
|
-
}, /* @__PURE__ */
|
|
89
|
+
}, /* @__PURE__ */ i.createElement(J, {
|
|
60
90
|
as: "section",
|
|
61
91
|
"aria-roledescription": "carousel",
|
|
62
|
-
"aria-label":
|
|
92
|
+
"aria-label": t,
|
|
63
93
|
position: "relative"
|
|
64
|
-
},
|
|
65
|
-
onClick:
|
|
94
|
+
}, y && /* @__PURE__ */ i.createElement(w, {
|
|
95
|
+
onClick: u,
|
|
66
96
|
area: "startAction",
|
|
67
|
-
ref:
|
|
68
|
-
"aria-label":
|
|
97
|
+
ref: f,
|
|
98
|
+
"aria-label": L,
|
|
69
99
|
type: "button"
|
|
70
|
-
}, /* @__PURE__ */
|
|
71
|
-
as:
|
|
100
|
+
}, /* @__PURE__ */ i.createElement(A, {
|
|
101
|
+
as: j,
|
|
72
102
|
"aria-hidden": !0,
|
|
73
103
|
width: "6px",
|
|
74
104
|
height: "10px",
|
|
75
105
|
color: "neutral600"
|
|
76
|
-
})),
|
|
77
|
-
onClick:
|
|
106
|
+
})), y && /* @__PURE__ */ i.createElement(w, {
|
|
107
|
+
onClick: p,
|
|
78
108
|
area: "endAction",
|
|
79
|
-
ref:
|
|
80
|
-
"aria-label":
|
|
109
|
+
ref: h,
|
|
110
|
+
"aria-label": n,
|
|
81
111
|
type: "button"
|
|
82
|
-
}, /* @__PURE__ */
|
|
83
|
-
as:
|
|
112
|
+
}, /* @__PURE__ */ i.createElement(A, {
|
|
113
|
+
as: $,
|
|
84
114
|
"aria-hidden": !0,
|
|
85
115
|
width: "6px",
|
|
86
116
|
height: "10px",
|
|
87
117
|
color: "neutral600"
|
|
88
|
-
})), /* @__PURE__ */
|
|
118
|
+
})), /* @__PURE__ */ i.createElement(M, {
|
|
89
119
|
"aria-live": "polite",
|
|
90
120
|
paddingLeft: 2,
|
|
91
121
|
paddingRight: 2,
|
|
92
122
|
width: "100%",
|
|
93
123
|
overflow: "hidden"
|
|
94
|
-
},
|
|
124
|
+
}, g), e), d && /* @__PURE__ */ i.createElement(l, {
|
|
95
125
|
paddingTop: 2,
|
|
96
126
|
paddingLeft: 4,
|
|
97
127
|
paddingRight: 4
|
|
98
|
-
}, /* @__PURE__ */
|
|
99
|
-
label:
|
|
100
|
-
}, /* @__PURE__ */
|
|
128
|
+
}, /* @__PURE__ */ i.createElement(z, {
|
|
129
|
+
label: d
|
|
130
|
+
}, /* @__PURE__ */ i.createElement(H, {
|
|
101
131
|
justifyContent: "center"
|
|
102
|
-
}, /* @__PURE__ */
|
|
132
|
+
}, /* @__PURE__ */ i.createElement(B, {
|
|
103
133
|
variant: "pi",
|
|
104
134
|
textColor: "neutral600",
|
|
105
135
|
ellipsis: !0
|
|
106
|
-
},
|
|
136
|
+
}, d))))));
|
|
107
137
|
};
|
|
108
|
-
|
|
138
|
+
k.defaultProps = {
|
|
109
139
|
actions: void 0,
|
|
110
140
|
error: void 0,
|
|
111
141
|
hint: void 0,
|
|
112
142
|
required: !1,
|
|
113
143
|
secondaryLabel: void 0
|
|
114
144
|
};
|
|
115
|
-
|
|
116
|
-
actions:
|
|
117
|
-
children:
|
|
118
|
-
error:
|
|
119
|
-
hint:
|
|
120
|
-
label:
|
|
121
|
-
nextLabel:
|
|
122
|
-
onNext:
|
|
123
|
-
onPrevious:
|
|
124
|
-
previousLabel:
|
|
125
|
-
required:
|
|
126
|
-
secondaryLabel:
|
|
127
|
-
selectedSlide:
|
|
145
|
+
k.propTypes = {
|
|
146
|
+
actions: o.node,
|
|
147
|
+
children: o.node.isRequired,
|
|
148
|
+
error: o.string,
|
|
149
|
+
hint: o.oneOfType([o.string, o.node, o.arrayOf(o.node)]),
|
|
150
|
+
label: o.string.isRequired,
|
|
151
|
+
nextLabel: o.string.isRequired,
|
|
152
|
+
onNext: o.func.isRequired,
|
|
153
|
+
onPrevious: o.func.isRequired,
|
|
154
|
+
previousLabel: o.string.isRequired,
|
|
155
|
+
required: o.bool,
|
|
156
|
+
secondaryLabel: o.string,
|
|
157
|
+
selectedSlide: o.number.isRequired
|
|
128
158
|
};
|
|
129
159
|
export {
|
|
130
|
-
|
|
160
|
+
k as Carousel
|
|
131
161
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";var s=Object.defineProperty;var a=Object.getOwnPropertySymbols;var u=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;var c=(t,e,o)=>e in t?s(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,n=(t,e)=>{for(var o in e||(e={}))u.call(e,o)&&c(t,o,e[o]);if(a)for(var o of a(e))r.call(e,o)&&c(t,o,e[o]);return t};Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("react"),l=require("../Stack/Stack.cjs"),d=t=>t&&typeof t=="object"&&"default"in t?t:{default:t},f=d(i),S=t=>f.default.createElement(l.Stack,n({justifyContent:"center",horizontal:!0,spacing:1,position:"absolute",width:"100%",bottom:1},t));exports.CarouselActions=S;
|
|
@@ -1,14 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
var a = Object.defineProperty;
|
|
2
|
+
var r = Object.getOwnPropertySymbols;
|
|
3
|
+
var c = Object.prototype.hasOwnProperty, s = Object.prototype.propertyIsEnumerable;
|
|
4
|
+
var i = (e, t, o) => t in e ? a(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o, n = (e, t) => {
|
|
5
|
+
for (var o in t || (t = {}))
|
|
6
|
+
c.call(t, o) && i(e, o, t[o]);
|
|
7
|
+
if (r)
|
|
8
|
+
for (var o of r(t))
|
|
9
|
+
s.call(t, o) && i(e, o, t[o]);
|
|
10
|
+
return e;
|
|
11
|
+
};
|
|
12
|
+
import m from "react";
|
|
13
|
+
import { Stack as l } from "../Stack/Stack.js";
|
|
14
|
+
const b = (e) => /* @__PURE__ */ m.createElement(l, n({
|
|
4
15
|
justifyContent: "center",
|
|
5
16
|
horizontal: !0,
|
|
6
17
|
spacing: 1,
|
|
7
18
|
position: "absolute",
|
|
8
19
|
width: "100%",
|
|
9
|
-
bottom: 1
|
|
10
|
-
|
|
11
|
-
});
|
|
20
|
+
bottom: 1
|
|
21
|
+
}, e));
|
|
12
22
|
export {
|
|
13
|
-
|
|
23
|
+
b as CarouselActions
|
|
14
24
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";var g=Object.defineProperty,m=Object.defineProperties;var T=Object.getOwnPropertyDescriptors;var i=Object.getOwnPropertySymbols;var _=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable;var c=(e,t,r)=>t in e?g(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,o=(e,t)=>{for(var r in t||(t={}))_.call(t,r)&&c(e,r,t[r]);if(i)for(var r of i(t))E.call(t,r)&&c(e,r,t[r]);return e},n=(e,t)=>m(e,T(t));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const f=require("react"),q=require("prop-types"),j=require("styled-components"),I=require("../Box/Box.cjs"),S=require("../Tooltip/Tooltip.cjs"),h=require("../Typography/utils.cjs"),l=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},s=l(f),d=l(q),v=l(j),p=v.default(I.Box)`
|
|
2
2
|
height: 100%;
|
|
3
|
-
${
|
|
4
|
-
`,
|
|
3
|
+
${h.ellipsisStyle({ellipsis:!0})}
|
|
4
|
+
`,a=e=>{var u;const[t,r]=f.useState(!1),y=()=>{r(!0)};return t?s.default.createElement(S.Tooltip,{description:(u=e.alt)!=null?u:""},s.default.createElement(p,o({as:"img"},e))):s.default.createElement(p,n(o({as:"img"},e),{onError:y}))};a.defaultProps={src:void 0,alt:void 0};a.propTypes={alt:d.default.string,src:d.default.string};exports.CarouselImage=a;
|
|
@@ -1,35 +1,47 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
var d = Object.defineProperty, g = Object.defineProperties;
|
|
2
|
+
var u = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var m = Object.getOwnPropertySymbols;
|
|
4
|
+
var E = Object.prototype.hasOwnProperty, y = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var l = (e, r, t) => r in e ? d(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t, o = (e, r) => {
|
|
6
|
+
for (var t in r || (r = {}))
|
|
7
|
+
E.call(r, t) && l(e, t, r[t]);
|
|
8
|
+
if (m)
|
|
9
|
+
for (var t of m(r))
|
|
10
|
+
y.call(r, t) && l(e, t, r[t]);
|
|
11
|
+
return e;
|
|
12
|
+
}, a = (e, r) => g(e, u(r));
|
|
13
|
+
import s, { useState as I } from "react";
|
|
14
|
+
import n from "prop-types";
|
|
15
|
+
import h from "styled-components";
|
|
16
|
+
import { Box as S } from "../Box/Box.js";
|
|
17
|
+
import { Tooltip as T } from "../Tooltip/Tooltip.js";
|
|
18
|
+
import { ellipsisStyle as v } from "../Typography/utils.js";
|
|
19
|
+
const p = h(S)`
|
|
8
20
|
height: 100%;
|
|
9
|
-
${
|
|
10
|
-
`,
|
|
11
|
-
|
|
12
|
-
|
|
21
|
+
${v({ ellipsis: !0 })}
|
|
22
|
+
`, c = (e) => {
|
|
23
|
+
var i;
|
|
24
|
+
const [r, t] = I(!1), f = () => {
|
|
25
|
+
t(!0);
|
|
13
26
|
};
|
|
14
|
-
return
|
|
15
|
-
description:
|
|
16
|
-
}, /* @__PURE__ */
|
|
17
|
-
as: "img"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
});
|
|
27
|
+
return r ? /* @__PURE__ */ s.createElement(T, {
|
|
28
|
+
description: (i = e.alt) != null ? i : ""
|
|
29
|
+
}, /* @__PURE__ */ s.createElement(p, o({
|
|
30
|
+
as: "img"
|
|
31
|
+
}, e))) : /* @__PURE__ */ s.createElement(p, a(o({
|
|
32
|
+
as: "img"
|
|
33
|
+
}, e), {
|
|
34
|
+
onError: f
|
|
35
|
+
}));
|
|
24
36
|
};
|
|
25
|
-
|
|
37
|
+
c.defaultProps = {
|
|
26
38
|
src: void 0,
|
|
27
39
|
alt: void 0
|
|
28
40
|
};
|
|
29
|
-
|
|
30
|
-
alt:
|
|
31
|
-
src:
|
|
41
|
+
c.propTypes = {
|
|
42
|
+
alt: n.string,
|
|
43
|
+
src: n.string
|
|
32
44
|
};
|
|
33
45
|
export {
|
|
34
|
-
|
|
46
|
+
c as CarouselImage
|
|
35
47
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";var _=Object.defineProperty;var u=Object.getOwnPropertySymbols;var f=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable;var c=(e,i,r)=>i in e?_(e,i,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[i]=r,F=(e,i)=>{for(var r in i||(i={}))f.call(i,r)&&c(e,r,i[r]);if(u)for(var r of u(i))p.call(i,r)&&c(e,r,i[r]);return e};var q=(e,i)=>{var r={};for(var l in e)f.call(e,l)&&i.indexOf(l)<0&&(r[l]=e[l]);if(e!=null&&u)for(var l of u(e))i.indexOf(l)<0&&p.call(e,l)&&(r[l]=e[l]);return r};Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const C=require("react"),P=require("prop-types"),T=require("./Carousel.cjs"),h=require("../Field/Field.cjs"),k=require("../Field/FieldLabel.cjs");require("../Field/FieldInput.cjs");const x=require("../Field/FieldHint.cjs"),A=require("../Field/FieldError.cjs");require("../Field/FieldContext.cjs");require("../Field/FieldAction.cjs");const H=require("../Stack/Stack.cjs"),O=require("../helpers/useId.cjs"),b=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},d=b(C),t=b(P),n=M=>{var s=M,{actions:e,children:i,error:r,hint:l,label:a,labelAction:g,nextLabel:j,onNext:y,onPrevious:v,previousLabel:m,required:E,secondaryLabel:R,selectedSlide:L,id:I}=s,S=q(s,["actions","children","error","hint","label","labelAction","nextLabel","onNext","onPrevious","previousLabel","required","secondaryLabel","selectedSlide","id"]);const o=O.useId("carouselinput",I);return d.default.createElement(h.Field,{hint:l,error:r,id:o},d.default.createElement(H.Stack,{spacing:1},a&&d.default.createElement(k.FieldLabel,{required:E,action:g},a),d.default.createElement(T.Carousel,F({actions:e,label:a,nextLabel:j,onNext:y,onPrevious:v,previousLabel:m,secondaryLabel:R,selectedSlide:L,id:o},S),i),d.default.createElement(x.FieldHint,null),d.default.createElement(A.FieldError,null)))};n.defaultProps={actions:void 0,error:void 0,hint:void 0,id:void 0,labelAction:void 0,required:!1,secondaryLabel:void 0};n.propTypes={actions:t.default.node,children:t.default.node.isRequired,error:t.default.string,hint:t.default.oneOfType([t.default.string,t.default.node,t.default.arrayOf(t.default.node)]),id:t.default.string,label:t.default.string.isRequired,labelAction:t.default.element,nextLabel:t.default.string.isRequired,onNext:t.default.func.isRequired,onPrevious:t.default.func.isRequired,previousLabel:t.default.string.isRequired,required:t.default.bool,secondaryLabel:t.default.string,selectedSlide:t.default.number.isRequired};exports.CarouselInput=n;
|