@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
package/dist/Field/FieldInput.js
CHANGED
|
@@ -1,33 +1,96 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
const u = {
|
|
1
|
+
import { jsxs as y, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as w } from "react";
|
|
3
|
+
import p, { css as R } from "styled-components";
|
|
4
|
+
import { useField as I } from "./FieldContext.js";
|
|
5
|
+
import { Box as l } from "../Box/Box.js";
|
|
6
|
+
import { Flex as k } from "../Flex/Flex.js";
|
|
7
|
+
import { inputFocusStyle as B } from "../themes/utils.js";
|
|
8
|
+
const c = {
|
|
10
9
|
S: 6.5,
|
|
11
10
|
M: 10.5
|
|
12
|
-
},
|
|
11
|
+
}, M = w(({
|
|
12
|
+
endAction: r,
|
|
13
|
+
startAction: o,
|
|
14
|
+
disabled: e = !1,
|
|
15
|
+
onChange: d,
|
|
16
|
+
size: u = "M",
|
|
17
|
+
...f
|
|
18
|
+
}, $) => {
|
|
19
|
+
const {
|
|
20
|
+
id: i,
|
|
21
|
+
error: t,
|
|
22
|
+
hint: h,
|
|
23
|
+
name: g,
|
|
24
|
+
required: m
|
|
25
|
+
} = I();
|
|
26
|
+
let n;
|
|
27
|
+
t ? n = `${i}-error` : h && (n = `${i}-hint`);
|
|
28
|
+
const s = Boolean(t), b = (x) => {
|
|
29
|
+
!e && d && d(x);
|
|
30
|
+
};
|
|
31
|
+
return y(j, {
|
|
32
|
+
justifyContent: "space-between",
|
|
33
|
+
hasError: s,
|
|
34
|
+
disabled: e,
|
|
35
|
+
children: [o ? a(l, {
|
|
36
|
+
paddingLeft: 3,
|
|
37
|
+
paddingRight: 2,
|
|
38
|
+
children: o
|
|
39
|
+
}) : null, a(F, {
|
|
40
|
+
id: i,
|
|
41
|
+
name: g,
|
|
42
|
+
ref: $,
|
|
43
|
+
"aria-describedby": n,
|
|
44
|
+
"aria-invalid": s,
|
|
45
|
+
"aria-disabled": e,
|
|
46
|
+
disabled: e,
|
|
47
|
+
"data-disabled": e ? "" : void 0,
|
|
48
|
+
hasLeftAction: Boolean(o),
|
|
49
|
+
hasRightAction: Boolean(r),
|
|
50
|
+
onChange: b,
|
|
51
|
+
"aria-required": m,
|
|
52
|
+
$size: u,
|
|
53
|
+
...f
|
|
54
|
+
}), r ? a(l, {
|
|
55
|
+
paddingLeft: 2,
|
|
56
|
+
paddingRight: 3,
|
|
57
|
+
children: r
|
|
58
|
+
}) : null]
|
|
59
|
+
});
|
|
60
|
+
}), F = p.input`
|
|
13
61
|
border: none;
|
|
14
|
-
border-radius: ${({
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
padding-
|
|
18
|
-
|
|
19
|
-
|
|
62
|
+
border-radius: ${({
|
|
63
|
+
theme: r
|
|
64
|
+
}) => r.borderRadius};
|
|
65
|
+
padding-bottom: ${({
|
|
66
|
+
$size: r
|
|
67
|
+
}) => `${c[r] / 16}rem`};
|
|
68
|
+
padding-left: ${({
|
|
69
|
+
theme: r,
|
|
70
|
+
hasLeftAction: o
|
|
71
|
+
}) => o ? 0 : r.spaces[4]};
|
|
72
|
+
padding-right: ${({
|
|
73
|
+
theme: r,
|
|
74
|
+
hasRightAction: o
|
|
75
|
+
}) => o ? 0 : r.spaces[4]};
|
|
76
|
+
padding-top: ${({
|
|
77
|
+
$size: r
|
|
78
|
+
}) => `${c[r] / 16}rem`};
|
|
79
|
+
cursor: ${(r) => r["aria-disabled"] ? "not-allowed" : void 0};
|
|
20
80
|
|
|
21
|
-
color: ${({
|
|
81
|
+
color: ${({
|
|
82
|
+
theme: r
|
|
83
|
+
}) => r.colors.neutral800};
|
|
22
84
|
font-weight: 400;
|
|
23
|
-
|
|
24
|
-
font-size: ${14 / 16}rem;
|
|
85
|
+
font-size: ${(r) => r.theme.fontSizes[2]};
|
|
25
86
|
display: block;
|
|
26
87
|
width: 100%;
|
|
27
88
|
background: inherit;
|
|
28
89
|
|
|
29
90
|
::placeholder {
|
|
30
|
-
color: ${({
|
|
91
|
+
color: ${({
|
|
92
|
+
theme: r
|
|
93
|
+
}) => r.colors.neutral500};
|
|
31
94
|
opacity: 1;
|
|
32
95
|
}
|
|
33
96
|
|
|
@@ -40,67 +103,28 @@ const u = {
|
|
|
40
103
|
outline: none;
|
|
41
104
|
box-shadow: none;
|
|
42
105
|
}
|
|
43
|
-
`,
|
|
44
|
-
border: 1px solid ${({
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
106
|
+
`, j = p(k)`
|
|
107
|
+
border: 1px solid ${({
|
|
108
|
+
theme: r,
|
|
109
|
+
hasError: o
|
|
110
|
+
}) => o ? r.colors.danger600 : r.colors.neutral200};
|
|
111
|
+
border-radius: ${({
|
|
112
|
+
theme: r
|
|
113
|
+
}) => r.borderRadius};
|
|
114
|
+
background: ${({
|
|
115
|
+
theme: r
|
|
116
|
+
}) => r.colors.neutral0};
|
|
117
|
+
${B()}
|
|
48
118
|
|
|
49
|
-
${({
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
l ? i = `${n}-error` : h && (i = `${n}-hint`);
|
|
58
|
-
const p = Boolean(l), w = (R) => {
|
|
59
|
-
a || f(R);
|
|
60
|
-
};
|
|
61
|
-
return /* @__PURE__ */ t.createElement(F, {
|
|
62
|
-
size: s,
|
|
63
|
-
justifyContent: "space-between",
|
|
64
|
-
hasError: p,
|
|
65
|
-
disabled: a
|
|
66
|
-
}, o && /* @__PURE__ */ t.createElement(c, {
|
|
67
|
-
paddingLeft: 3,
|
|
68
|
-
paddingRight: 2
|
|
69
|
-
}, o), /* @__PURE__ */ t.createElement(E, {
|
|
70
|
-
id: n,
|
|
71
|
-
name: $,
|
|
72
|
-
ref: b,
|
|
73
|
-
"aria-describedby": i,
|
|
74
|
-
"aria-invalid": p,
|
|
75
|
-
"aria-disabled": a,
|
|
76
|
-
hasLeftAction: Boolean(o),
|
|
77
|
-
hasRightAction: Boolean(e),
|
|
78
|
-
onChange: w,
|
|
79
|
-
"aria-required": y,
|
|
80
|
-
size: s,
|
|
81
|
-
...g
|
|
82
|
-
}), e && /* @__PURE__ */ t.createElement(c, {
|
|
83
|
-
paddingLeft: 2,
|
|
84
|
-
paddingRight: 3
|
|
85
|
-
}, e));
|
|
86
|
-
});
|
|
87
|
-
d.displayName = "FieldInput";
|
|
88
|
-
d.defaultProps = {
|
|
89
|
-
disabled: !1,
|
|
90
|
-
endAction: void 0,
|
|
91
|
-
size: "M",
|
|
92
|
-
startAction: void 0,
|
|
93
|
-
onChange() {
|
|
94
|
-
}
|
|
95
|
-
};
|
|
96
|
-
d.propTypes = {
|
|
97
|
-
disabled: r.bool,
|
|
98
|
-
endAction: r.element,
|
|
99
|
-
onChange: r.func,
|
|
100
|
-
size: r.oneOf(Object.keys(I.input)),
|
|
101
|
-
startAction: r.element
|
|
102
|
-
};
|
|
119
|
+
${({
|
|
120
|
+
theme: r,
|
|
121
|
+
disabled: o
|
|
122
|
+
}) => o ? R`
|
|
123
|
+
color: ${r.colors.neutral600};
|
|
124
|
+
background: ${r.colors.neutral150};
|
|
125
|
+
` : void 0}
|
|
126
|
+
`;
|
|
103
127
|
export {
|
|
104
|
-
|
|
105
|
-
|
|
128
|
+
M as FieldInput,
|
|
129
|
+
j as InputWrapper
|
|
106
130
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react/jsx-runtime"),p=require("react"),h=require("styled-components"),g=require("./FieldContext.cjs"),o=require("../Flex/Flex.cjs"),y=require("../helpers/deprecations.cjs"),i=require("../Typography/Typography.cjs"),f=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},l=f(h),x=y.once(console.warn),F=p.forwardRef(({children:e,action:t,required:n,...s},a)=>{const{id:c,required:d}=g.useField(),u=d||n;return n!==void 0&&x('Deprecation warning: Usage of "required" prop in FieldLabel component is deprecated. This is discouraged and will be removed in the next major release. Please use the Field component to share the required prop.'),r.jsx(i.Typography,{ref:a,variant:"pi",textColor:"neutral800",htmlFor:c,fontWeight:"bold",as:"label",...s,children:r.jsxs(o.Flex,{alignItems:"center",children:[e,u&&r.jsx(j,{textColor:"danger600",children:"*"}),t&&r.jsx(q,{marginLeft:1,children:t})]})})}),j=l.default(i.Typography)`
|
|
2
2
|
line-height: 0;
|
|
3
|
-
`,
|
|
3
|
+
`,q=l.default(o.Flex)`
|
|
4
4
|
line-height: 0;
|
|
5
5
|
|
|
6
6
|
svg path {
|
|
7
7
|
fill: ${({theme:e})=>e.colors.neutral500};
|
|
8
8
|
}
|
|
9
|
-
|
|
9
|
+
`;exports.FieldLabel=F;
|
package/dist/Field/FieldLabel.js
CHANGED
|
@@ -1,45 +1,50 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
1
|
+
import { jsx as r, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as h } from "react";
|
|
3
|
+
import t from "styled-components";
|
|
4
|
+
import { useField as f } from "./FieldContext.js";
|
|
5
|
+
import { Flex as n } from "../Flex/Flex.js";
|
|
6
|
+
import { once as g } from "../helpers/deprecations.js";
|
|
7
|
+
import { Typography as l } from "../Typography/Typography.js";
|
|
8
|
+
const u = g(console.warn), T = h(({
|
|
9
|
+
children: e,
|
|
10
|
+
action: o,
|
|
11
|
+
required: i,
|
|
12
|
+
...s
|
|
13
|
+
}, d) => {
|
|
14
|
+
const {
|
|
15
|
+
id: a,
|
|
16
|
+
required: m
|
|
17
|
+
} = f(), p = m || i;
|
|
18
|
+
return i !== void 0 && u('Deprecation warning: Usage of "required" prop in FieldLabel component is deprecated. This is discouraged and will be removed in the next major release. Please use the Field component to share the required prop.'), r(l, {
|
|
19
|
+
ref: d,
|
|
20
|
+
variant: "pi",
|
|
21
|
+
textColor: "neutral800",
|
|
22
|
+
htmlFor: a,
|
|
23
|
+
fontWeight: "bold",
|
|
24
|
+
as: "label",
|
|
25
|
+
...s,
|
|
26
|
+
children: c(n, {
|
|
27
|
+
alignItems: "center",
|
|
28
|
+
children: [e, p && r(x, {
|
|
29
|
+
textColor: "danger600",
|
|
30
|
+
children: "*"
|
|
31
|
+
}), o && r(F, {
|
|
32
|
+
marginLeft: 1,
|
|
33
|
+
children: o
|
|
34
|
+
})]
|
|
35
|
+
})
|
|
36
|
+
});
|
|
37
|
+
}), x = t(l)`
|
|
8
38
|
line-height: 0;
|
|
9
|
-
`,
|
|
39
|
+
`, F = t(n)`
|
|
10
40
|
line-height: 0;
|
|
11
41
|
|
|
12
42
|
svg path {
|
|
13
|
-
fill: ${({
|
|
43
|
+
fill: ${({
|
|
44
|
+
theme: e
|
|
45
|
+
}) => e.colors.neutral500};
|
|
14
46
|
}
|
|
15
|
-
|
|
16
|
-
const { id: p, required: m } = u(), c = m || i;
|
|
17
|
-
return i !== void 0 && console.warn(
|
|
18
|
-
'Deprecation warning: Usage of "required" prop in FieldLabel component is deprecated. This is discouraged and will be removed in the next major release. Please use the Field component to share the required prop.'
|
|
19
|
-
), /* @__PURE__ */ e.createElement(a, {
|
|
20
|
-
variant: "pi",
|
|
21
|
-
textColor: "neutral800",
|
|
22
|
-
htmlFor: p,
|
|
23
|
-
fontWeight: "bold",
|
|
24
|
-
as: "label",
|
|
25
|
-
...s
|
|
26
|
-
}, /* @__PURE__ */ e.createElement(l, {
|
|
27
|
-
alignItems: "center"
|
|
28
|
-
}, r, c && /* @__PURE__ */ e.createElement(h, {
|
|
29
|
-
textColor: "danger600"
|
|
30
|
-
}, "*"), t && /* @__PURE__ */ e.createElement(f, {
|
|
31
|
-
marginLeft: 1
|
|
32
|
-
}, t)));
|
|
33
|
-
};
|
|
34
|
-
d.defaultProps = {
|
|
35
|
-
action: void 0,
|
|
36
|
-
required: void 0
|
|
37
|
-
};
|
|
38
|
-
d.propTypes = {
|
|
39
|
-
action: o.element,
|
|
40
|
-
children: o.node.isRequired,
|
|
41
|
-
required: o.bool
|
|
42
|
-
};
|
|
47
|
+
`;
|
|
43
48
|
export {
|
|
44
|
-
|
|
49
|
+
T as FieldLabel
|
|
45
50
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("react/jsx-runtime"),r=require("react"),l=require("../helpers/getFocusableNodes.cjs"),a=require("../helpers/keyboardKeys.cjs"),m=({onEscape:n,restoreFocus:o=!0,...f})=>{const s=r.useRef(null);r.useEffect(()=>{let e=null;return o&&(e=document.activeElement),()=>{e&&e.focus()}},[o]),r.useEffect(()=>{if(!s.current)return;const e=l.getFocusableNodes(s.current);e.length>0?e[0].focus():console.warn("[FocusTrap]: it seems there are no focusable elements in the focus trap tree. Make sure there s at least one.")},[]);const i=e=>{if(e.key===a.KeyboardKeys.ESCAPE&&n){n();return}if(e.key!==a.KeyboardKeys.TAB)return;const t=l.getFocusableNodes(s.current);if(t.length>0){const u=t[0],c=t[t.length-1];e.shiftKey?u===document.activeElement&&(e.preventDefault(),c.focus()):c===document.activeElement&&(e.preventDefault(),u.focus())}};return d.jsx("div",{ref:s,onKeyDown:i,...f})};exports.FocusTrap=m;
|
|
@@ -1,49 +1,41 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { getFocusableNodes as
|
|
4
|
-
import { KeyboardKeys as
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as m, useEffect as l } from "react";
|
|
3
|
+
import { getFocusableNodes as u } from "../helpers/getFocusableNodes.js";
|
|
4
|
+
import { KeyboardKeys as c } from "../helpers/keyboardKeys.js";
|
|
5
|
+
const v = ({
|
|
6
|
+
onEscape: r,
|
|
7
|
+
restoreFocus: o = !0,
|
|
8
|
+
...i
|
|
9
|
+
}) => {
|
|
10
|
+
const n = m(null);
|
|
11
|
+
return l(() => {
|
|
8
12
|
let e = null;
|
|
9
|
-
return
|
|
13
|
+
return o && (e = document.activeElement), () => {
|
|
10
14
|
e && e.focus();
|
|
11
15
|
};
|
|
12
|
-
}, [
|
|
13
|
-
if (!
|
|
16
|
+
}, [o]), l(() => {
|
|
17
|
+
if (!n.current)
|
|
14
18
|
return;
|
|
15
|
-
const e =
|
|
16
|
-
e.length > 0 ? e[0].focus() : console.warn(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
return /* @__PURE__ */ d.createElement("div", {
|
|
34
|
-
ref: r,
|
|
35
|
-
onKeyDown: p,
|
|
36
|
-
...m
|
|
19
|
+
const e = u(n.current);
|
|
20
|
+
e.length > 0 ? e[0].focus() : console.warn("[FocusTrap]: it seems there are no focusable elements in the focus trap tree. Make sure there s at least one.");
|
|
21
|
+
}, []), a("div", {
|
|
22
|
+
ref: n,
|
|
23
|
+
onKeyDown: (e) => {
|
|
24
|
+
if (e.key === c.ESCAPE && r) {
|
|
25
|
+
r();
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
if (e.key !== c.TAB)
|
|
29
|
+
return;
|
|
30
|
+
const t = u(n.current);
|
|
31
|
+
if (t.length > 0) {
|
|
32
|
+
const s = t[0], f = t[t.length - 1];
|
|
33
|
+
e.shiftKey ? s === document.activeElement && (e.preventDefault(), f.focus()) : f === document.activeElement && (e.preventDefault(), s.focus());
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
...i
|
|
37
37
|
});
|
|
38
38
|
};
|
|
39
|
-
a.defaultProps = {
|
|
40
|
-
onEscape: void 0,
|
|
41
|
-
restoreFocus: !0
|
|
42
|
-
};
|
|
43
|
-
a.propTypes = {
|
|
44
|
-
onEscape: u.func,
|
|
45
|
-
restoreFocus: u.bool
|
|
46
|
-
};
|
|
47
39
|
export {
|
|
48
|
-
|
|
40
|
+
v as FocusTrap
|
|
49
41
|
};
|
package/dist/Grid/Grid.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("react"),l=require("prop-types"),d=require("styled-components"),i=require("./GridContext.cjs"),p=require("../Box/Box.cjs"),f=require("../helpers/handleResponsiveValues.cjs"),a=e=>e&&typeof e=="object"&&"default"in e?e:{default:e};function y(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const s=y(c),o=a(l),m=a(d),b=m.default(p.Box)`
|
|
2
2
|
display: grid;
|
|
3
3
|
grid-template-columns: repeat(${({gridCols:e})=>e}, 1fr);
|
|
4
|
-
${({theme:e,gap:
|
|
5
|
-
`,
|
|
4
|
+
${({theme:e,gap:t})=>f("gap",t,e)}
|
|
5
|
+
`,u=({gap:e,gridCols:t,...r})=>{const n=s.useMemo(()=>({gap:e,gridCols:t}),[e,t]);return s.createElement(i.GridContext.Provider,{value:n},s.createElement(b,{gap:e,gridCols:t,...r}))};u.defaultProps={gap:0,gridCols:12};u.propTypes={gap:o.default.oneOfType([o.default.number,o.default.arrayOf(o.default.number)]),gridCols:o.default.number};exports.Grid=u;
|
package/dist/Grid/Grid.js
CHANGED
|
@@ -1,27 +1,24 @@
|
|
|
1
|
-
import t from "react";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import * as t from "react";
|
|
2
|
+
import o from "prop-types";
|
|
3
|
+
import n from "styled-components";
|
|
4
4
|
import { GridContext as i } from "./GridContext.js";
|
|
5
|
-
import { Box as
|
|
5
|
+
import { Box as s } from "../Box/Box.js";
|
|
6
6
|
import d from "../helpers/handleResponsiveValues.js";
|
|
7
|
-
const
|
|
7
|
+
const f = n(s)`
|
|
8
8
|
display: grid;
|
|
9
9
|
grid-template-columns: repeat(${({ gridCols: r }) => r}, 1fr);
|
|
10
|
-
${({ theme: r, gap:
|
|
11
|
-
`, p = ({ gap: r, gridCols:
|
|
12
|
-
|
|
13
|
-
}, /* @__PURE__ */ t.createElement(
|
|
14
|
-
|
|
15
|
-
gridCols: o,
|
|
16
|
-
...m
|
|
17
|
-
}));
|
|
10
|
+
${({ theme: r, gap: e }) => d("gap", e, r)}
|
|
11
|
+
`, p = ({ gap: r, gridCols: e, ...m }) => {
|
|
12
|
+
const a = t.useMemo(() => ({ gap: r, gridCols: e }), [r, e]);
|
|
13
|
+
return /* @__PURE__ */ t.createElement(i.Provider, { value: a }, /* @__PURE__ */ t.createElement(f, { gap: r, gridCols: e, ...m }));
|
|
14
|
+
};
|
|
18
15
|
p.defaultProps = {
|
|
19
16
|
gap: 0,
|
|
20
17
|
gridCols: 12
|
|
21
18
|
};
|
|
22
19
|
p.propTypes = {
|
|
23
|
-
gap:
|
|
24
|
-
gridCols:
|
|
20
|
+
gap: o.oneOfType([o.number, o.arrayOf(o.number)]),
|
|
21
|
+
gridCols: o.number
|
|
25
22
|
};
|
|
26
23
|
export {
|
|
27
24
|
p as Grid
|
package/dist/Grid/GridItem.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("react"),c=require("
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("react"),c=require("prop-types"),p=require("styled-components"),m=require("./GridContext.cjs"),f=require("../Box/Box.cjs"),o=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},s=o(l),t=o(c),y=o(p),x=y.default.div`
|
|
2
2
|
grid-column: span ${({col:e})=>e};
|
|
3
3
|
max-width: 100%;
|
|
4
4
|
|
|
@@ -9,4 +9,4 @@
|
|
|
9
9
|
${({theme:e})=>e.mediaQueries.mobile} {
|
|
10
10
|
grid-column: span ${({xs:e})=>e};
|
|
11
11
|
}
|
|
12
|
-
`,r=({col:e,xs:d,s:u,...n})=>{const{gap:a,gridCols:i}=
|
|
12
|
+
`,r=({col:e,xs:d,s:u,...n})=>{const{gap:a,gridCols:i}=m.useGrid();return s.default.createElement(x,{gap:a,gridCols:i,col:e,xs:d,s:u},s.default.createElement(f.Box,{...n}))};r.defaultProps={col:void 0,s:void 0,xs:void 0};r.propTypes={col:t.default.number,s:t.default.number,xs:t.default.number};exports.GridItem=r;
|
package/dist/Grid/GridItem.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import o from "react";
|
|
2
|
-
import n from "styled-components";
|
|
3
2
|
import e from "prop-types";
|
|
4
|
-
import
|
|
5
|
-
import { useGrid as
|
|
3
|
+
import n from "styled-components";
|
|
4
|
+
import { useGrid as a } from "./GridContext.js";
|
|
5
|
+
import { Box as l } from "../Box/Box.js";
|
|
6
6
|
const u = n.div`
|
|
7
7
|
grid-column: span ${({ col: r }) => r};
|
|
8
8
|
max-width: 100%;
|
|
@@ -15,16 +15,8 @@ const u = n.div`
|
|
|
15
15
|
grid-column: span ${({ xs: r }) => r};
|
|
16
16
|
}
|
|
17
17
|
`, m = ({ col: r, xs: t, s: i, ...p }) => {
|
|
18
|
-
const { gap: s, gridCols: d } =
|
|
19
|
-
return /* @__PURE__ */ o.createElement(u, {
|
|
20
|
-
gap: s,
|
|
21
|
-
gridCols: d,
|
|
22
|
-
col: r,
|
|
23
|
-
xs: t,
|
|
24
|
-
s: i
|
|
25
|
-
}, /* @__PURE__ */ o.createElement(a, {
|
|
26
|
-
...p
|
|
27
|
-
}));
|
|
18
|
+
const { gap: s, gridCols: d } = a();
|
|
19
|
+
return /* @__PURE__ */ o.createElement(u, { gap: s, gridCols: d, col: r, xs: t, s: i }, /* @__PURE__ */ o.createElement(l, { ...p }));
|
|
28
20
|
};
|
|
29
21
|
m.defaultProps = {
|
|
30
22
|
col: void 0,
|
|
@@ -1,16 +1,11 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
2
|
-
display: flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
justify-content: center;
|
|
5
|
-
height: ${32/16}rem;
|
|
6
|
-
width: ${32/16}rem;
|
|
7
|
-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("react/jsx-runtime"),$=require("react"),h=require("styled-components"),j=require("../BaseButton/BaseButton.cjs"),v=require("../Flex/Flex.cjs"),y=require("../Tooltip/Tooltip.cjs"),B=require("../VisuallyHidden/VisuallyHidden.cjs"),m=e=>e&&typeof e=="object"&&"default"in e?e:{default:e};function x(e){if(e&&e.__esModule)return e;const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const u=x($),i=m(h),_=u.forwardRef(({label:e,noBorder:r=!1,children:t,icon:o,disabled:l=!1,onClick:a,"aria-label":d,...f},p)=>{const b=g=>{!l&&a&&a(g)},s=n.jsxs(c,{"aria-disabled":l,background:l?"neutral150":void 0,borderWidth:r?0:void 0,justifyContent:"center",height:`${2}rem`,width:`${2}rem`,...f,ref:p,onClick:b,children:[n.jsx(B.VisuallyHidden,{as:"span",children:e??d}),u.cloneElement(o||t,{"aria-hidden":!0,focusable:!1})]});return e?n.jsx(y.Tooltip,{label:e,children:s}):s}),c=i.default(j.BaseButton)`
|
|
8
2
|
svg {
|
|
9
3
|
> g,
|
|
10
4
|
path {
|
|
11
5
|
fill: ${({theme:e})=>e.colors.neutral500};
|
|
12
6
|
}
|
|
13
7
|
}
|
|
8
|
+
|
|
14
9
|
&:hover {
|
|
15
10
|
svg {
|
|
16
11
|
> g,
|
|
@@ -19,6 +14,7 @@
|
|
|
19
14
|
}
|
|
20
15
|
}
|
|
21
16
|
}
|
|
17
|
+
|
|
22
18
|
&:active {
|
|
23
19
|
svg {
|
|
24
20
|
> g,
|
|
@@ -27,16 +23,15 @@
|
|
|
27
23
|
}
|
|
28
24
|
}
|
|
29
25
|
}
|
|
26
|
+
|
|
30
27
|
&[aria-disabled='true'] {
|
|
31
|
-
background-color: ${({theme:e})=>e.colors.neutral150};
|
|
32
28
|
svg {
|
|
33
29
|
path {
|
|
34
30
|
fill: ${({theme:e})=>e.colors.neutral600};
|
|
35
31
|
}
|
|
36
32
|
}
|
|
37
33
|
}
|
|
38
|
-
|
|
39
|
-
`,j=v.default(_.Flex)`
|
|
34
|
+
`,R=i.default(v.Flex)`
|
|
40
35
|
& span:first-child button {
|
|
41
36
|
border-left: 1px solid ${({theme:e})=>e.colors.neutral200};
|
|
42
37
|
border-radius: ${({theme:e})=>`${e.borderRadius} 0 0 ${e.borderRadius}`};
|
|
@@ -46,7 +41,7 @@
|
|
|
46
41
|
border-radius: ${({theme:e})=>`0 ${e.borderRadius} ${e.borderRadius} 0`};
|
|
47
42
|
}
|
|
48
43
|
|
|
49
|
-
& ${
|
|
44
|
+
& ${c} {
|
|
50
45
|
border-radius: 0;
|
|
51
46
|
border-left: none;
|
|
52
47
|
|
|
@@ -83,4 +78,4 @@
|
|
|
83
78
|
}
|
|
84
79
|
}
|
|
85
80
|
}
|
|
86
|
-
|
|
81
|
+
`;exports.IconButton=_;exports.IconButtonGroup=R;
|