@redis-ui/components 42.8.0 → 43.2.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/AutoCompleteSelect/AutoCompleteSelect.cjs +7 -1
- package/dist/AutoCompleteSelect/AutoCompleteSelect.js +7 -1
- package/dist/AutoCompleteSelect/hooks/useAutoCompleteSelect.cjs +7 -1
- package/dist/AutoCompleteSelect/hooks/useAutoCompleteSelect.d.ts +8 -1
- package/dist/AutoCompleteSelect/hooks/useAutoCompleteSelect.js +7 -1
- package/dist/BoxSelectionGroup/components/Item/components/BoxStateIndicator/BoxStateIndicator.cjs +8 -4
- package/dist/BoxSelectionGroup/components/Item/components/BoxStateIndicator/BoxStateIndicator.js +8 -4
- package/dist/BoxSelectionGroup/components/Item/components/Compose/Compose.style.cjs +18 -4
- package/dist/BoxSelectionGroup/components/Item/components/Compose/Compose.style.js +18 -4
- package/dist/BoxSelectionGroup/hooks/useBoxSelectionGroup.cjs +3 -1
- package/dist/BoxSelectionGroup/hooks/useBoxSelectionGroup.js +3 -1
- package/dist/Button/Button.style.cjs +4 -1
- package/dist/Button/Button.style.js +4 -1
- package/dist/Button/Button.style.utils.cjs +16 -1
- package/dist/Button/Button.style.utils.js +16 -1
- package/dist/Button/Button.types.cjs +1 -1
- package/dist/Button/Button.types.d.ts +1 -1
- package/dist/Button/Button.types.js +1 -1
- package/dist/Button/CopyToClipboardButton/CopyToClipboardButton.cjs +59 -0
- package/dist/Button/CopyToClipboardButton/CopyToClipboardButton.d.ts +4 -0
- package/dist/Button/CopyToClipboardButton/CopyToClipboardButton.js +57 -0
- package/dist/Button/CopyToClipboardButton/CopyToClipboardButton.style.cjs +40 -0
- package/dist/Button/CopyToClipboardButton/CopyToClipboardButton.style.d.ts +8 -0
- package/dist/Button/CopyToClipboardButton/CopyToClipboardButton.style.js +38 -0
- package/dist/Button/CopyToClipboardButton/CopyToClipboardButton.types.d.ts +5 -0
- package/dist/Button/TextButton/TextButton.style.cjs +4 -1
- package/dist/Button/TextButton/TextButton.style.js +4 -1
- package/dist/Button/TextButton/TextButton.types.cjs +1 -1
- package/dist/Button/TextButton/TextButton.types.d.ts +1 -1
- package/dist/Button/TextButton/TextButton.types.js +1 -1
- package/dist/Button/index.d.ts +2 -0
- package/dist/Checkbox/components/Label/Label.style.cjs +15 -3
- package/dist/Checkbox/components/Label/Label.style.js +15 -3
- package/dist/Chip/components/CloseButton/CloseButton.cjs +3 -1
- package/dist/Chip/components/CloseButton/CloseButton.js +3 -1
- package/dist/Chip/components/Compose/Compose.style.cjs +4 -1
- package/dist/Chip/components/Compose/Compose.style.js +4 -1
- package/dist/Drawer/components/Description/Description.cjs +3 -1
- package/dist/Drawer/components/Description/Description.js +3 -1
- package/dist/Helpers/contexts/Popper/PopperCollisionBoundaryManager.cjs +3 -1
- package/dist/Helpers/contexts/Popper/PopperCollisionBoundaryManager.js +3 -1
- package/dist/Helpers/contexts/PrimitiveContextState.cjs +28 -16
- package/dist/Helpers/contexts/PrimitiveContextState.js +28 -16
- package/dist/Helpers/contexts/SharedId.context.cjs +9 -5
- package/dist/Helpers/contexts/SharedId.context.js +9 -5
- package/dist/Helpers/css.utils.cjs +18 -4
- package/dist/Helpers/css.utils.d.ts +15 -3
- package/dist/Helpers/css.utils.js +18 -4
- package/dist/Helpers/hooks/useScrollable.cjs +3 -1
- package/dist/Helpers/hooks/useScrollable.js +3 -1
- package/dist/Helpers/react.utils.cjs +6 -2
- package/dist/Helpers/react.utils.js +6 -2
- package/dist/HighlightedIcon/HighlightedIcon.cjs +26 -0
- package/dist/HighlightedIcon/HighlightedIcon.d.ts +3 -0
- package/dist/HighlightedIcon/HighlightedIcon.js +26 -0
- package/dist/HighlightedIcon/HighlightedIcon.style.cjs +49 -0
- package/dist/HighlightedIcon/HighlightedIcon.style.d.ts +5 -0
- package/dist/HighlightedIcon/HighlightedIcon.style.js +47 -0
- package/dist/HighlightedIcon/HighlightedIcon.types.d.ts +8 -0
- package/dist/HighlightedIcon/index.d.ts +3 -0
- package/dist/Inputs/QuantityCounter/components/InputGroup/components/ValueLabel/ValueLabel.cjs +9 -5
- package/dist/Inputs/QuantityCounter/components/InputGroup/components/ValueLabel/ValueLabel.js +9 -5
- package/dist/Inputs/components/Compose/Compose.style.cjs +29 -6
- package/dist/Inputs/components/Compose/Compose.style.js +29 -6
- package/dist/Inputs/hooks/numericInput/numericInput.utils.cjs +12 -4
- package/dist/Inputs/hooks/numericInput/numericInput.utils.js +12 -4
- package/dist/Inputs/hooks/numericInput/useNumericInput.cjs +15 -3
- package/dist/Inputs/hooks/numericInput/useNumericInput.js +15 -3
- package/dist/Loader/Loader.cjs +1 -0
- package/dist/Loader/Loader.js +1 -0
- package/dist/Menu/components/Content/components/Item/Components/Compose/Compose.style.cjs +19 -4
- package/dist/Menu/components/Content/components/Item/Components/Compose/Compose.style.js +19 -4
- package/dist/Menu/components/Content/components/Label/components/Compose/Compose.style.cjs +4 -1
- package/dist/Menu/components/Content/components/Label/components/Compose/Compose.style.js +4 -1
- package/dist/Modal/components/Content/components/Compose/Compose.cjs +3 -1
- package/dist/Modal/components/Content/components/Compose/Compose.js +3 -1
- package/dist/Modal/components/Content/components/Description/Description.cjs +3 -1
- package/dist/Modal/components/Content/components/Description/Description.js +3 -1
- package/dist/MultiSelect/components/Compose/hooks/useMultiSelectContextApi.cjs +3 -1
- package/dist/MultiSelect/components/Compose/hooks/useMultiSelectContextApi.js +3 -1
- package/dist/MultiSelect/components/Trigger/components/MultiValue/MultiValue.cjs +3 -1
- package/dist/MultiSelect/components/Trigger/components/MultiValue/MultiValue.js +3 -1
- package/dist/Overflow/Overflow.cjs +3 -1
- package/dist/Overflow/Overflow.js +3 -1
- package/dist/Overflow/Overflow.utils.cjs +15 -6
- package/dist/Overflow/Overflow.utils.js +15 -6
- package/dist/Overflow/components/OverflowContainer/OverflowContainer.cjs +3 -1
- package/dist/Overflow/components/OverflowContainer/OverflowContainer.js +3 -1
- package/dist/Pagination/components/PageSizeSelect.cjs +3 -1
- package/dist/Pagination/components/PageSizeSelect.js +3 -1
- package/dist/Popover/components/Content/Content.cjs +3 -1
- package/dist/Popover/components/Content/Content.js +3 -1
- package/dist/Popover/components/Content/components/Footer/Footer.cjs +3 -1
- package/dist/Popover/components/Content/components/Footer/Footer.js +3 -1
- package/dist/RadioGroup/components/Item/components/Label/Label.style.cjs +15 -3
- package/dist/RadioGroup/components/Item/components/Label/Label.style.js +15 -3
- package/dist/ScreenReaderAnnounce/ScreenReaderAnnounce.cjs +3 -1
- package/dist/ScreenReaderAnnounce/ScreenReaderAnnounce.js +3 -1
- package/dist/Section/components/Header/components/CollapseButton/CollapseButton.cjs +3 -1
- package/dist/Section/components/Header/components/CollapseButton/CollapseButton.js +3 -1
- package/dist/Select/components/Content/components/Option/components/Compose/Compose.style.cjs +16 -4
- package/dist/Select/components/Content/components/Option/components/Compose/Compose.style.js +16 -4
- package/dist/Select/components/Content/components/OptionList/OptionList.cjs +6 -4
- package/dist/Select/components/Content/components/OptionList/OptionList.js +6 -4
- package/dist/Select/components/Content/components/OptionList/Virtual.cjs +9 -5
- package/dist/Select/components/Content/components/OptionList/Virtual.js +9 -5
- package/dist/Select/components/Context/hooks/useSearch.cjs +3 -1
- package/dist/Select/components/Context/hooks/useSearch.js +3 -1
- package/dist/Select/components/Trigger/components/Compose/Compose.style.cjs +33 -7
- package/dist/Select/components/Trigger/components/Compose/Compose.style.js +33 -7
- package/dist/SideBar/components/Item/Item.style.cjs +14 -3
- package/dist/SideBar/components/Item/Item.style.js +14 -3
- package/dist/Skeleton/components/Circle/Circle.cjs +1 -1
- package/dist/Skeleton/components/Circle/Circle.js +1 -1
- package/dist/Skeleton/components/Square/Square.cjs +1 -1
- package/dist/Skeleton/components/Square/Square.js +1 -1
- package/dist/Slider/components/Label/Compose/Compose.cjs +3 -1
- package/dist/Slider/components/Label/Compose/Compose.js +3 -1
- package/dist/Slider/components/Mark/Compose/Compose.cjs +3 -1
- package/dist/Slider/components/Mark/Compose/Compose.js +3 -1
- package/dist/Slider/hooks/useOffset.cjs +3 -1
- package/dist/Slider/hooks/useOffset.js +3 -1
- package/dist/Stepper/Stepper.cjs +14 -5
- package/dist/Stepper/Stepper.d.ts +2 -0
- package/dist/Stepper/Stepper.js +14 -5
- package/dist/Stepper/Stepper.utils.cjs +12 -0
- package/dist/Stepper/Stepper.utils.d.ts +2 -0
- package/dist/Stepper/Stepper.utils.js +12 -0
- package/dist/Stepper/components/Compose/Compose.d.ts +1 -0
- package/dist/Stepper/components/Step/Step.cjs +2 -0
- package/dist/Stepper/components/Step/Step.d.ts +1 -0
- package/dist/Stepper/components/Step/Step.js +2 -0
- package/dist/Stepper/components/Step/components/Compose/Compose.cjs +5 -10
- package/dist/Stepper/components/Step/components/Compose/Compose.js +5 -10
- package/dist/Stepper/components/Step/components/Separator/Separator.cjs +15 -0
- package/dist/Stepper/components/Step/components/Separator/Separator.d.ts +3 -0
- package/dist/Stepper/components/Step/components/Separator/Separator.js +15 -0
- package/dist/Stepper/components/Step/components/Separator/Separator.style.cjs +24 -0
- package/dist/Stepper/components/Step/components/Separator/Separator.style.d.ts +1 -0
- package/dist/Stepper/components/Step/components/Separator/Separator.style.js +22 -0
- package/dist/Stepper/components/Step/components/Separator/Separator.types.d.ts +5 -0
- package/dist/Stepper/hooks/useStepperInteractive.cjs +12 -4
- package/dist/Stepper/hooks/useStepperInteractive.js +12 -4
- package/dist/Switch/components/Switcher/Switcher.cjs +3 -1
- package/dist/Switch/components/Switcher/Switcher.js +3 -1
- package/dist/Switch/components/Switcher/Switcher.style.cjs +31 -8
- package/dist/Switch/components/Switcher/Switcher.style.js +31 -8
- package/dist/Tabs/components/TabBar/components/Trigger/components/Marker/Marker.style.cjs +24 -5
- package/dist/Tabs/components/TabBar/components/Trigger/components/Marker/Marker.style.js +24 -5
- package/dist/Tabs/components/TabBar/components/Trigger/components/Tab/Tab.style.cjs +24 -5
- package/dist/Tabs/components/TabBar/components/Trigger/components/Tab/Tab.style.js +24 -5
- package/dist/ThemeModeSwitch/useThemeModeSwitch.cjs +6 -2
- package/dist/ThemeModeSwitch/useThemeModeSwitch.js +6 -2
- package/dist/Toast/core/content.helper.cjs +8 -4
- package/dist/Toast/core/content.helper.js +8 -4
- package/dist/Tooltip/components/Content/Content.cjs +3 -1
- package/dist/Tooltip/components/Content/Content.js +3 -1
- package/dist/TreeView/TreeView.cjs +3 -1
- package/dist/TreeView/TreeView.js +3 -1
- package/dist/TreeView/components/TreeItem/components/Compose/Compose.cjs +6 -4
- package/dist/TreeView/components/TreeItem/components/Compose/Compose.js +6 -4
- package/dist/Typography/Typography.types.cjs +4 -0
- package/dist/Typography/Typography.types.d.ts +2 -1
- package/dist/Typography/Typography.types.js +4 -0
- package/dist/index.cjs +8 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +98 -90
- package/package.json +10 -9
- package/skills/redis-ui-components/SKILL.md +126 -0
- package/skills/redis-ui-components/references/ActionIconButton.md +96 -0
- package/skills/redis-ui-components/references/AppBar.md +161 -0
- package/skills/redis-ui-components/references/AppSelectionMenu.md +184 -0
- package/skills/redis-ui-components/references/AutoCompleteSelect.md +193 -0
- package/skills/redis-ui-components/references/Badge.md +77 -0
- package/skills/redis-ui-components/references/Banner.md +563 -0
- package/skills/redis-ui-components/references/BoxSelectionGroup.md +487 -0
- package/skills/redis-ui-components/references/Breadcrumbs.md +214 -0
- package/skills/redis-ui-components/references/Button.md +169 -0
- package/skills/redis-ui-components/references/ButtonGroup.md +126 -0
- package/skills/redis-ui-components/references/Card.md +56 -0
- package/skills/redis-ui-components/references/Checkbox.md +171 -0
- package/skills/redis-ui-components/references/Chip.md +154 -0
- package/skills/redis-ui-components/references/ChipList.md +307 -0
- package/skills/redis-ui-components/references/CopyToClipboardButton.md +47 -0
- package/skills/redis-ui-components/references/CountryFlag.md +57 -0
- package/skills/redis-ui-components/references/Drawer.md +298 -0
- package/skills/redis-ui-components/references/Filters.md +162 -0
- package/skills/redis-ui-components/references/FlexDivider.md +152 -0
- package/skills/redis-ui-components/references/FlexGroup.md +149 -0
- package/skills/redis-ui-components/references/FlexItem.md +58 -0
- package/skills/redis-ui-components/references/FlexSplit.md +37 -0
- package/skills/redis-ui-components/references/FormField.md +678 -0
- package/skills/redis-ui-components/references/IconButton.md +63 -0
- package/skills/redis-ui-components/references/Input.md +295 -0
- package/skills/redis-ui-components/references/KeyValueList.md +501 -0
- package/skills/redis-ui-components/references/Label.md +238 -0
- package/skills/redis-ui-components/references/Link.md +402 -0
- package/skills/redis-ui-components/references/Loader.md +100 -0
- package/skills/redis-ui-components/references/Menu.md +988 -0
- package/skills/redis-ui-components/references/MidBar.md +358 -0
- package/skills/redis-ui-components/references/Modal.md +525 -0
- package/skills/redis-ui-components/references/MoreInfoIcon.md +119 -0
- package/skills/redis-ui-components/references/MultiSelect.md +558 -0
- package/skills/redis-ui-components/references/NumericInput.md +322 -0
- package/skills/redis-ui-components/references/Overflow.md +127 -0
- package/skills/redis-ui-components/references/Pagination.md +151 -0
- package/skills/redis-ui-components/references/PasswordInput.md +262 -0
- package/skills/redis-ui-components/references/Popover.md +868 -0
- package/skills/redis-ui-components/references/ProfileIcon.md +65 -0
- package/skills/redis-ui-components/references/ProgressBar.md +103 -0
- package/skills/redis-ui-components/references/QuantityCounter.md +555 -0
- package/skills/redis-ui-components/references/RadioGroup.md +265 -0
- package/skills/redis-ui-components/references/ScreenReaderAnnounce.md +147 -0
- package/skills/redis-ui-components/references/SearchBar.md +242 -0
- package/skills/redis-ui-components/references/SearchInput.md +213 -0
- package/skills/redis-ui-components/references/Section.md +349 -0
- package/skills/redis-ui-components/references/Select.md +517 -0
- package/skills/redis-ui-components/references/SideBar.md +468 -0
- package/skills/redis-ui-components/references/Slider.md +398 -0
- package/skills/redis-ui-components/references/Stepper.md +288 -0
- package/skills/redis-ui-components/references/Switch.md +193 -0
- package/skills/redis-ui-components/references/Tabs.md +383 -0
- package/skills/redis-ui-components/references/TextArea.md +139 -0
- package/skills/redis-ui-components/references/TextButton.md +217 -0
- package/skills/redis-ui-components/references/Toast.md +399 -0
- package/skills/redis-ui-components/references/ToggleButton.md +163 -0
- package/skills/redis-ui-components/references/Tooltip.md +636 -0
- package/skills/redis-ui-components/references/Typography.md +323 -0
|
@@ -14,7 +14,9 @@ const calcVisibleCount = ({
|
|
|
14
14
|
let indexInRow = 0;
|
|
15
15
|
itemKeys.some((key, index) => {
|
|
16
16
|
const size = itemSizes.get(key);
|
|
17
|
-
if (size === void 0)
|
|
17
|
+
if (size === void 0) {
|
|
18
|
+
return true;
|
|
19
|
+
}
|
|
18
20
|
const calcOverflow = () => {
|
|
19
21
|
const isLastRow = row === maxRows - 1;
|
|
20
22
|
const isFirstInRow = indexInRow === 0;
|
|
@@ -24,8 +26,9 @@ const calcVisibleCount = ({
|
|
|
24
26
|
summarySize += itemSize;
|
|
25
27
|
indexInRow += 1;
|
|
26
28
|
const isOverflow2 = summarySize + expectedExtraSize > containerSize;
|
|
27
|
-
if (!isOverflow2)
|
|
28
|
-
|
|
29
|
+
if (!isOverflow2) {
|
|
30
|
+
visibleCount += 1;
|
|
31
|
+
} else if (isFirstInRow && itemSize >= containerSize && (!isLastRow || isLastItem)) {
|
|
29
32
|
visibleCount += 1;
|
|
30
33
|
return false;
|
|
31
34
|
}
|
|
@@ -33,7 +36,9 @@ const calcVisibleCount = ({
|
|
|
33
36
|
};
|
|
34
37
|
const isOverflow = calcOverflow();
|
|
35
38
|
if (isOverflow) {
|
|
36
|
-
if (row === maxRows - 1)
|
|
39
|
+
if (row === maxRows - 1) {
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
37
42
|
row += 1;
|
|
38
43
|
indexInRow = 0;
|
|
39
44
|
summarySize = 0;
|
|
@@ -47,8 +52,12 @@ const calcVisibleCount = ({
|
|
|
47
52
|
const verifyChildren = (children) => {
|
|
48
53
|
const keysCheck = /* @__PURE__ */ new Set();
|
|
49
54
|
return Children.toArray(children).filter((child) => {
|
|
50
|
-
if (typeof child !== "object")
|
|
51
|
-
|
|
55
|
+
if (typeof child !== "object") {
|
|
56
|
+
throw new Error("Child must be ReactElement");
|
|
57
|
+
}
|
|
58
|
+
if (!("key" in child) || !child.key || keysCheck.has(child.key)) {
|
|
59
|
+
throw new Error("Each child element must have unique key");
|
|
60
|
+
}
|
|
52
61
|
keysCheck.add(child.key);
|
|
53
62
|
return true;
|
|
54
63
|
});
|
|
@@ -26,7 +26,9 @@ const OverflowContainer = ({
|
|
|
26
26
|
useResize.useResizeWidth((newSize = 0) => {
|
|
27
27
|
if (ref.current && newSize && onGapChange) {
|
|
28
28
|
const gap = Number.parseFloat(window.getComputedStyle(ref.current).columnGap);
|
|
29
|
-
if (!Number.isNaN(gap))
|
|
29
|
+
if (!Number.isNaN(gap)) {
|
|
30
|
+
onGapChange(gap);
|
|
31
|
+
}
|
|
30
32
|
}
|
|
31
33
|
if (size === void 0) {
|
|
32
34
|
onSizeChange(newSize);
|
|
@@ -24,7 +24,9 @@ const OverflowContainer = ({
|
|
|
24
24
|
useResizeWidth((newSize = 0) => {
|
|
25
25
|
if (ref.current && newSize && onGapChange) {
|
|
26
26
|
const gap = Number.parseFloat(window.getComputedStyle(ref.current).columnGap);
|
|
27
|
-
if (!Number.isNaN(gap))
|
|
27
|
+
if (!Number.isNaN(gap)) {
|
|
28
|
+
onGapChange(gap);
|
|
29
|
+
}
|
|
28
30
|
}
|
|
29
31
|
if (size === void 0) {
|
|
30
32
|
onSizeChange(newSize);
|
|
@@ -39,7 +39,9 @@ const PageSizeSelectLabel = ({
|
|
|
39
39
|
pageSizeSelectorId,
|
|
40
40
|
onPageSizeChange
|
|
41
41
|
} = Pagination_context.usePaginationContext();
|
|
42
|
-
if (!onPageSizeChange)
|
|
42
|
+
if (!onPageSizeChange) {
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
43
45
|
return jsxRuntime.jsxRuntimeExports.jsx(Typography.default.Body, {
|
|
44
46
|
component: "span",
|
|
45
47
|
size: "auto",
|
|
@@ -37,7 +37,9 @@ const PageSizeSelectLabel = ({
|
|
|
37
37
|
pageSizeSelectorId,
|
|
38
38
|
onPageSizeChange
|
|
39
39
|
} = usePaginationContext();
|
|
40
|
-
if (!onPageSizeChange)
|
|
40
|
+
if (!onPageSizeChange) {
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
41
43
|
return jsxRuntimeExports.jsx(Typography.Body, {
|
|
42
44
|
component: "span",
|
|
43
45
|
size: "auto",
|
|
@@ -35,7 +35,9 @@ const Content = Object.assign(({
|
|
|
35
35
|
})
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
|
-
if (!content)
|
|
38
|
+
if (!content) {
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
39
41
|
return jsxRuntime.jsxRuntimeExports.jsx(Content.Compose, {
|
|
40
42
|
...contentOptions,
|
|
41
43
|
children: typeof content === "string" ? jsxRuntime.jsxRuntimeExports.jsx(Content.Text, {
|
|
@@ -33,7 +33,9 @@ const Content = Object.assign(({
|
|
|
33
33
|
})
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
|
-
if (!content)
|
|
36
|
+
if (!content) {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
37
39
|
return jsxRuntimeExports.jsx(Content.Compose, {
|
|
38
40
|
...contentOptions,
|
|
39
41
|
children: typeof content === "string" ? jsxRuntimeExports.jsx(Content.Text, {
|
|
@@ -11,7 +11,9 @@ const Footer = Object.assign(({
|
|
|
11
11
|
linkText,
|
|
12
12
|
...restProps
|
|
13
13
|
}) => {
|
|
14
|
-
if (!link && !actionButtonHandler)
|
|
14
|
+
if (!link && !actionButtonHandler) {
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
15
17
|
return jsxRuntime.jsxRuntimeExports.jsxs(Footer.Compose, {
|
|
16
18
|
...restProps,
|
|
17
19
|
children: [link ? jsxRuntime.jsxRuntimeExports.jsx(Link.default, {
|
|
@@ -9,7 +9,9 @@ const Footer = Object.assign(({
|
|
|
9
9
|
linkText,
|
|
10
10
|
...restProps
|
|
11
11
|
}) => {
|
|
12
|
-
if (!link && !actionButtonHandler)
|
|
12
|
+
if (!link && !actionButtonHandler) {
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
13
15
|
return jsxRuntimeExports.jsxs(Footer.Compose, {
|
|
14
16
|
...restProps,
|
|
15
17
|
children: [link ? jsxRuntimeExports.jsx(Link, {
|
|
@@ -10,8 +10,16 @@ const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
|
10
10
|
const _styled__default = /* @__PURE__ */ _interopDefault(_styled);
|
|
11
11
|
const getStateStyles = (tokens) => {
|
|
12
12
|
const maps = [Button_style_utils.textColorMap];
|
|
13
|
-
const getLabelStateSelector = (state, stateTokens, fallbackTokens) => `${css_utils.getRelatedStateSelector(
|
|
14
|
-
|
|
13
|
+
const getLabelStateSelector = (state, stateTokens, fallbackTokens) => `${css_utils.getRelatedStateSelector({
|
|
14
|
+
inputSelector: Indicator_style.RadioGroupItemIndicator,
|
|
15
|
+
inputStateSelector: state,
|
|
16
|
+
commonContainer: Compose_style.RadioGroupItemCompose
|
|
17
|
+
})} {
|
|
18
|
+
${css_utils.styleFromTokens({
|
|
19
|
+
tokenMaps: maps,
|
|
20
|
+
tokens: stateTokens,
|
|
21
|
+
fallbackTokens
|
|
22
|
+
})};
|
|
15
23
|
}`;
|
|
16
24
|
return _styled.css`
|
|
17
25
|
${getLabelStateSelector("", tokens.off.normal)};
|
|
@@ -23,7 +31,11 @@ const getStateStyles = (tokens) => {
|
|
|
23
31
|
${getLabelStateSelector(":disabled", tokens.off.disabled)};
|
|
24
32
|
${getLabelStateSelector('[data-state="checked"]:disabled', tokens.on.disabled)};
|
|
25
33
|
|
|
26
|
-
${css_utils.getRelatedStateSelector(
|
|
34
|
+
${css_utils.getRelatedStateSelector({
|
|
35
|
+
inputSelector: Indicator_style.RadioGroupItemIndicator,
|
|
36
|
+
inputStateSelector: ":disabled",
|
|
37
|
+
commonContainer: Compose_style.RadioGroupItemCompose
|
|
38
|
+
})} {
|
|
27
39
|
cursor: not-allowed;
|
|
28
40
|
}
|
|
29
41
|
`;
|
|
@@ -6,8 +6,16 @@ import { RadioGroupItemCompose } from "../Compose/Compose.style.js";
|
|
|
6
6
|
import { RadioGroupItemIndicator } from "../Indicator/Indicator.style.js";
|
|
7
7
|
const getStateStyles = (tokens) => {
|
|
8
8
|
const maps = [textColorMap];
|
|
9
|
-
const getLabelStateSelector = (state, stateTokens, fallbackTokens) => `${getRelatedStateSelector(
|
|
10
|
-
|
|
9
|
+
const getLabelStateSelector = (state, stateTokens, fallbackTokens) => `${getRelatedStateSelector({
|
|
10
|
+
inputSelector: RadioGroupItemIndicator,
|
|
11
|
+
inputStateSelector: state,
|
|
12
|
+
commonContainer: RadioGroupItemCompose
|
|
13
|
+
})} {
|
|
14
|
+
${styleFromTokens({
|
|
15
|
+
tokenMaps: maps,
|
|
16
|
+
tokens: stateTokens,
|
|
17
|
+
fallbackTokens
|
|
18
|
+
})};
|
|
11
19
|
}`;
|
|
12
20
|
return css`
|
|
13
21
|
${getLabelStateSelector("", tokens.off.normal)};
|
|
@@ -19,7 +27,11 @@ const getStateStyles = (tokens) => {
|
|
|
19
27
|
${getLabelStateSelector(":disabled", tokens.off.disabled)};
|
|
20
28
|
${getLabelStateSelector('[data-state="checked"]:disabled', tokens.on.disabled)};
|
|
21
29
|
|
|
22
|
-
${getRelatedStateSelector(
|
|
30
|
+
${getRelatedStateSelector({
|
|
31
|
+
inputSelector: RadioGroupItemIndicator,
|
|
32
|
+
inputStateSelector: ":disabled",
|
|
33
|
+
commonContainer: RadioGroupItemCompose
|
|
34
|
+
})} {
|
|
23
35
|
cursor: not-allowed;
|
|
24
36
|
}
|
|
25
37
|
`;
|
|
@@ -21,7 +21,9 @@ const ScreenReaderAnnounce = ({
|
|
|
21
21
|
setEnabled(allowAnnounce);
|
|
22
22
|
}
|
|
23
23
|
}, [allowAnnounce, text]);
|
|
24
|
-
if (!enabled || !text)
|
|
24
|
+
if (!enabled || !text) {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
25
27
|
return jsxRuntime.jsxRuntimeExports.jsx(index.VisuallyHidden, {
|
|
26
28
|
"aria-atomic": true,
|
|
27
29
|
"aria-live": restProps.role === "alert" ? void 0 : "polite",
|
|
@@ -19,7 +19,9 @@ const ScreenReaderAnnounce = ({
|
|
|
19
19
|
setEnabled(allowAnnounce);
|
|
20
20
|
}
|
|
21
21
|
}, [allowAnnounce, text]);
|
|
22
|
-
if (!enabled || !text)
|
|
22
|
+
if (!enabled || !text) {
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
23
25
|
return jsxRuntimeExports.jsx(VisuallyHidden, {
|
|
24
26
|
"aria-atomic": true,
|
|
25
27
|
"aria-live": restProps.role === "alert" ? void 0 : "polite",
|
|
@@ -15,7 +15,9 @@ const CollapseButton = ({
|
|
|
15
15
|
labelId,
|
|
16
16
|
open
|
|
17
17
|
} = Section_context.useSectionContext();
|
|
18
|
-
if (!triggerId)
|
|
18
|
+
if (!triggerId) {
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
19
21
|
const trigger = jsxRuntime.jsxRuntimeExports.jsx(index.Trigger, {
|
|
20
22
|
asChild: true,
|
|
21
23
|
children: jsxRuntime.jsxRuntimeExports.jsx(CollapseButton_style.SectionCollapseButton, {
|
|
@@ -13,7 +13,9 @@ const CollapseButton = ({
|
|
|
13
13
|
labelId,
|
|
14
14
|
open
|
|
15
15
|
} = useSectionContext();
|
|
16
|
-
if (!triggerId)
|
|
16
|
+
if (!triggerId) {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
17
19
|
const trigger = jsxRuntimeExports.jsx(Trigger, {
|
|
18
20
|
asChild: true,
|
|
19
21
|
children: jsxRuntimeExports.jsx(SectionCollapseButton, {
|
package/dist/Select/components/Content/components/Option/components/Compose/Compose.style.cjs
CHANGED
|
@@ -27,21 +27,33 @@ const SelectOptionContainer = _styled__default.default(index.Item).withConfig({
|
|
|
27
27
|
gap: ${theme.gap};
|
|
28
28
|
|
|
29
29
|
& {
|
|
30
|
-
${css_utils.styleFromTokens(
|
|
30
|
+
${css_utils.styleFromTokens({
|
|
31
|
+
tokenMaps: maps,
|
|
32
|
+
tokens: theme.states.normal
|
|
33
|
+
})};
|
|
31
34
|
}
|
|
32
35
|
|
|
33
36
|
&[data-highlighted] {
|
|
34
|
-
${css_utils.styleFromTokens(
|
|
37
|
+
${css_utils.styleFromTokens({
|
|
38
|
+
tokenMaps: maps,
|
|
39
|
+
tokens: theme.states.highlighted
|
|
40
|
+
})};
|
|
35
41
|
}
|
|
36
42
|
|
|
37
43
|
&[data-state='checked'] {
|
|
38
|
-
${css_utils.styleFromTokens(
|
|
44
|
+
${css_utils.styleFromTokens({
|
|
45
|
+
tokenMaps: maps,
|
|
46
|
+
tokens: theme.states.checked
|
|
47
|
+
})};
|
|
39
48
|
}
|
|
40
49
|
|
|
41
50
|
&[data-disabled] {
|
|
42
51
|
&,
|
|
43
52
|
& * > span {
|
|
44
|
-
${css_utils.styleFromTokens(
|
|
53
|
+
${css_utils.styleFromTokens({
|
|
54
|
+
tokenMaps: maps,
|
|
55
|
+
tokens: theme.states.disabled
|
|
56
|
+
})};
|
|
45
57
|
cursor: not-allowed;
|
|
46
58
|
}
|
|
47
59
|
}
|
package/dist/Select/components/Content/components/Option/components/Compose/Compose.style.js
CHANGED
|
@@ -23,21 +23,33 @@ const SelectOptionContainer = _styled(Item).withConfig({
|
|
|
23
23
|
gap: ${theme.gap};
|
|
24
24
|
|
|
25
25
|
& {
|
|
26
|
-
${styleFromTokens(
|
|
26
|
+
${styleFromTokens({
|
|
27
|
+
tokenMaps: maps,
|
|
28
|
+
tokens: theme.states.normal
|
|
29
|
+
})};
|
|
27
30
|
}
|
|
28
31
|
|
|
29
32
|
&[data-highlighted] {
|
|
30
|
-
${styleFromTokens(
|
|
33
|
+
${styleFromTokens({
|
|
34
|
+
tokenMaps: maps,
|
|
35
|
+
tokens: theme.states.highlighted
|
|
36
|
+
})};
|
|
31
37
|
}
|
|
32
38
|
|
|
33
39
|
&[data-state='checked'] {
|
|
34
|
-
${styleFromTokens(
|
|
40
|
+
${styleFromTokens({
|
|
41
|
+
tokenMaps: maps,
|
|
42
|
+
tokens: theme.states.checked
|
|
43
|
+
})};
|
|
35
44
|
}
|
|
36
45
|
|
|
37
46
|
&[data-disabled] {
|
|
38
47
|
&,
|
|
39
48
|
& * > span {
|
|
40
|
-
${styleFromTokens(
|
|
49
|
+
${styleFromTokens({
|
|
50
|
+
tokenMaps: maps,
|
|
51
|
+
tokens: theme.states.disabled
|
|
52
|
+
})};
|
|
41
53
|
cursor: not-allowed;
|
|
42
54
|
}
|
|
43
55
|
}
|
|
@@ -34,10 +34,12 @@ const OptionList = ({
|
|
|
34
34
|
const validOptions = getValidOptions();
|
|
35
35
|
if (isSingleSelect && hasSelection && hasSearch && !validOptions.find(isOptionSelected)) {
|
|
36
36
|
const selectedOption = options.find(isOptionSelected);
|
|
37
|
-
if (selectedOption)
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
if (selectedOption) {
|
|
38
|
+
validOptions.push({
|
|
39
|
+
...selectedOption,
|
|
40
|
+
hidden: true
|
|
41
|
+
});
|
|
42
|
+
}
|
|
41
43
|
}
|
|
42
44
|
const listItems = validOptions.map((option) => jsxRuntime.jsxRuntimeExports.jsx(OptionComponent, {
|
|
43
45
|
option,
|
|
@@ -32,10 +32,12 @@ const OptionList = ({
|
|
|
32
32
|
const validOptions = getValidOptions();
|
|
33
33
|
if (isSingleSelect && hasSelection && hasSearch && !validOptions.find(isOptionSelected)) {
|
|
34
34
|
const selectedOption = options.find(isOptionSelected);
|
|
35
|
-
if (selectedOption)
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
if (selectedOption) {
|
|
36
|
+
validOptions.push({
|
|
37
|
+
...selectedOption,
|
|
38
|
+
hidden: true
|
|
39
|
+
});
|
|
40
|
+
}
|
|
39
41
|
}
|
|
40
42
|
const listItems = validOptions.map((option) => jsxRuntimeExports.jsx(OptionComponent, {
|
|
41
43
|
option,
|
|
@@ -22,13 +22,17 @@ const Virtual = ({
|
|
|
22
22
|
const scrollAndFocus = () => {
|
|
23
23
|
var _a;
|
|
24
24
|
const open = (viewport == null ? void 0 : viewport.closest("body")) != null;
|
|
25
|
-
if (!open || !validOptions.length)
|
|
25
|
+
if (!open || !validOptions.length) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
26
28
|
if (isSingleSelect && selectedIndex > -1) {
|
|
27
29
|
onHideContainer(false);
|
|
28
|
-
if (selectedIndex > 0)
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
if (selectedIndex > 0) {
|
|
31
|
+
(_a = virtualizerRef.current) == null ? void 0 : _a.scrollToIndex(selectedIndex, {
|
|
32
|
+
align: "end",
|
|
33
|
+
smooth: false
|
|
34
|
+
});
|
|
35
|
+
}
|
|
32
36
|
}
|
|
33
37
|
setTimeout(() => {
|
|
34
38
|
var _a2;
|
|
@@ -20,13 +20,17 @@ const Virtual = ({
|
|
|
20
20
|
const scrollAndFocus = () => {
|
|
21
21
|
var _a;
|
|
22
22
|
const open = (viewport == null ? void 0 : viewport.closest("body")) != null;
|
|
23
|
-
if (!open || !validOptions.length)
|
|
23
|
+
if (!open || !validOptions.length) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
24
26
|
if (isSingleSelect && selectedIndex > -1) {
|
|
25
27
|
onHideContainer(false);
|
|
26
|
-
if (selectedIndex > 0)
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
if (selectedIndex > 0) {
|
|
29
|
+
(_a = virtualizerRef.current) == null ? void 0 : _a.scrollToIndex(selectedIndex, {
|
|
30
|
+
align: "end",
|
|
31
|
+
smooth: false
|
|
32
|
+
});
|
|
33
|
+
}
|
|
30
34
|
}
|
|
31
35
|
setTimeout(() => {
|
|
32
36
|
var _a2;
|
|
@@ -9,7 +9,9 @@ const useSearch = ({
|
|
|
9
9
|
compareRef.current = customCompare || defaultCompare;
|
|
10
10
|
const [searchValue, setSearchValue] = React.useState("");
|
|
11
11
|
const search = React.useCallback((options) => {
|
|
12
|
-
if (!searchValue)
|
|
12
|
+
if (!searchValue) {
|
|
13
|
+
return options;
|
|
14
|
+
}
|
|
13
15
|
const compare = compareRef.current;
|
|
14
16
|
const searchValueLowerCase = searchValue.toLowerCase();
|
|
15
17
|
return options.filter((option) => compare(option, searchValueLowerCase));
|
|
@@ -7,7 +7,9 @@ const useSearch = ({
|
|
|
7
7
|
compareRef.current = customCompare || defaultCompare;
|
|
8
8
|
const [searchValue, setSearchValue] = useState("");
|
|
9
9
|
const search = useCallback((options) => {
|
|
10
|
-
if (!searchValue)
|
|
10
|
+
if (!searchValue) {
|
|
11
|
+
return options;
|
|
12
|
+
}
|
|
11
13
|
const compare = compareRef.current;
|
|
12
14
|
const searchValueLowerCase = searchValue.toLowerCase();
|
|
13
15
|
return options.filter((option) => compare(option, searchValueLowerCase));
|
|
@@ -17,29 +17,52 @@ const getStateStyle = (theme) => {
|
|
|
17
17
|
const maps = [bgColor, textColor, borderColor];
|
|
18
18
|
return _styled.css`
|
|
19
19
|
& {
|
|
20
|
-
${css_utils.styleFromTokens(
|
|
20
|
+
${css_utils.styleFromTokens({
|
|
21
|
+
tokenMaps: maps,
|
|
22
|
+
tokens: statesStyle.normal
|
|
23
|
+
})};
|
|
21
24
|
}
|
|
22
25
|
|
|
23
26
|
&:hover,
|
|
24
27
|
&:focus,
|
|
25
28
|
&:active {
|
|
26
|
-
${css_utils.styleFromTokens(
|
|
29
|
+
${css_utils.styleFromTokens({
|
|
30
|
+
tokenMaps: maps,
|
|
31
|
+
tokens: statesStyle.focused,
|
|
32
|
+
fallbackTokens: statesStyle.normal
|
|
33
|
+
})};
|
|
27
34
|
}
|
|
28
35
|
|
|
29
36
|
&[data-state='open'] {
|
|
30
|
-
${css_utils.styleFromTokens(
|
|
37
|
+
${css_utils.styleFromTokens({
|
|
38
|
+
tokenMaps: maps,
|
|
39
|
+
tokens: statesStyle.opened,
|
|
40
|
+
fallbackTokens: statesStyle.normal
|
|
41
|
+
})};
|
|
31
42
|
}
|
|
32
43
|
|
|
33
44
|
&[data-status='error'] {
|
|
34
|
-
${css_utils.styleFromTokens(
|
|
45
|
+
${css_utils.styleFromTokens({
|
|
46
|
+
tokenMaps: maps,
|
|
47
|
+
tokens: statesStyle.error,
|
|
48
|
+
fallbackTokens: statesStyle.normal
|
|
49
|
+
})};
|
|
35
50
|
}
|
|
36
51
|
|
|
37
52
|
&[data-status='success'] {
|
|
38
|
-
${css_utils.styleFromTokens(
|
|
53
|
+
${css_utils.styleFromTokens({
|
|
54
|
+
tokenMaps: maps,
|
|
55
|
+
tokens: statesStyle.success,
|
|
56
|
+
fallbackTokens: statesStyle.normal
|
|
57
|
+
})};
|
|
39
58
|
}
|
|
40
59
|
|
|
41
60
|
&:disabled {
|
|
42
|
-
${css_utils.styleFromTokens(
|
|
61
|
+
${css_utils.styleFromTokens({
|
|
62
|
+
tokenMaps: maps,
|
|
63
|
+
tokens: statesStyle.disabled,
|
|
64
|
+
fallbackTokens: statesStyle.normal
|
|
65
|
+
})};
|
|
43
66
|
|
|
44
67
|
cursor: no-drop;
|
|
45
68
|
& button {
|
|
@@ -62,7 +85,10 @@ const TriggerContainer = _styled__default.default(index.Trigger).withConfig({
|
|
|
62
85
|
})(["display:flex;flex-wrap:nowrap;overflow:hidden;align-items:center;box-sizing:border-box;transition:border-color 0.2s ease-in;width:100%;justify-content:start;text-align:start;", ";", ";"], () => {
|
|
63
86
|
const style = redisUiStyles.useTheme().components.select;
|
|
64
87
|
return _styled.css`
|
|
65
|
-
${css_utils.styleFromTokens(
|
|
88
|
+
${css_utils.styleFromTokens({
|
|
89
|
+
tokenMaps: [css_utils.tokenMaps.borderWidth],
|
|
90
|
+
tokens: style
|
|
91
|
+
})};
|
|
66
92
|
height: ${style.height};
|
|
67
93
|
font-family: ${style.fontFamily};
|
|
68
94
|
font-size: ${style.fontSize};
|
|
@@ -13,29 +13,52 @@ const getStateStyle = (theme) => {
|
|
|
13
13
|
const maps = [bgColor, textColor, borderColor];
|
|
14
14
|
return css`
|
|
15
15
|
& {
|
|
16
|
-
${styleFromTokens(
|
|
16
|
+
${styleFromTokens({
|
|
17
|
+
tokenMaps: maps,
|
|
18
|
+
tokens: statesStyle.normal
|
|
19
|
+
})};
|
|
17
20
|
}
|
|
18
21
|
|
|
19
22
|
&:hover,
|
|
20
23
|
&:focus,
|
|
21
24
|
&:active {
|
|
22
|
-
${styleFromTokens(
|
|
25
|
+
${styleFromTokens({
|
|
26
|
+
tokenMaps: maps,
|
|
27
|
+
tokens: statesStyle.focused,
|
|
28
|
+
fallbackTokens: statesStyle.normal
|
|
29
|
+
})};
|
|
23
30
|
}
|
|
24
31
|
|
|
25
32
|
&[data-state='open'] {
|
|
26
|
-
${styleFromTokens(
|
|
33
|
+
${styleFromTokens({
|
|
34
|
+
tokenMaps: maps,
|
|
35
|
+
tokens: statesStyle.opened,
|
|
36
|
+
fallbackTokens: statesStyle.normal
|
|
37
|
+
})};
|
|
27
38
|
}
|
|
28
39
|
|
|
29
40
|
&[data-status='error'] {
|
|
30
|
-
${styleFromTokens(
|
|
41
|
+
${styleFromTokens({
|
|
42
|
+
tokenMaps: maps,
|
|
43
|
+
tokens: statesStyle.error,
|
|
44
|
+
fallbackTokens: statesStyle.normal
|
|
45
|
+
})};
|
|
31
46
|
}
|
|
32
47
|
|
|
33
48
|
&[data-status='success'] {
|
|
34
|
-
${styleFromTokens(
|
|
49
|
+
${styleFromTokens({
|
|
50
|
+
tokenMaps: maps,
|
|
51
|
+
tokens: statesStyle.success,
|
|
52
|
+
fallbackTokens: statesStyle.normal
|
|
53
|
+
})};
|
|
35
54
|
}
|
|
36
55
|
|
|
37
56
|
&:disabled {
|
|
38
|
-
${styleFromTokens(
|
|
57
|
+
${styleFromTokens({
|
|
58
|
+
tokenMaps: maps,
|
|
59
|
+
tokens: statesStyle.disabled,
|
|
60
|
+
fallbackTokens: statesStyle.normal
|
|
61
|
+
})};
|
|
39
62
|
|
|
40
63
|
cursor: no-drop;
|
|
41
64
|
& button {
|
|
@@ -58,7 +81,10 @@ const TriggerContainer = _styled(Trigger).withConfig({
|
|
|
58
81
|
})(["display:flex;flex-wrap:nowrap;overflow:hidden;align-items:center;box-sizing:border-box;transition:border-color 0.2s ease-in;width:100%;justify-content:start;text-align:start;", ";", ";"], () => {
|
|
59
82
|
const style = useTheme().components.select;
|
|
60
83
|
return css`
|
|
61
|
-
${styleFromTokens(
|
|
84
|
+
${styleFromTokens({
|
|
85
|
+
tokenMaps: [tokenMaps.borderWidth],
|
|
86
|
+
tokens: style
|
|
87
|
+
})};
|
|
62
88
|
height: ${style.height};
|
|
63
89
|
font-family: ${style.fontFamily};
|
|
64
90
|
font-size: ${style.fontSize};
|
|
@@ -29,15 +29,26 @@ const SideBarItem = _styled__default.default.li.withConfig({
|
|
|
29
29
|
gap: ${theme.gap};
|
|
30
30
|
|
|
31
31
|
& {
|
|
32
|
-
${css_utils.styleFromTokens(
|
|
32
|
+
${css_utils.styleFromTokens({
|
|
33
|
+
tokenMaps: maps,
|
|
34
|
+
tokens: states.normal
|
|
35
|
+
})}
|
|
33
36
|
}
|
|
34
37
|
|
|
35
38
|
&:hover {
|
|
36
|
-
${css_utils.styleFromTokens(
|
|
39
|
+
${css_utils.styleFromTokens({
|
|
40
|
+
tokenMaps: maps,
|
|
41
|
+
tokens: states.hover,
|
|
42
|
+
fallbackTokens: states.normal
|
|
43
|
+
})}
|
|
37
44
|
}
|
|
38
45
|
|
|
39
46
|
&[data-state='active'] {
|
|
40
|
-
${css_utils.styleFromTokens(
|
|
47
|
+
${css_utils.styleFromTokens({
|
|
48
|
+
tokenMaps: maps,
|
|
49
|
+
tokens: states.active,
|
|
50
|
+
fallbackTokens: states.normal
|
|
51
|
+
})}
|
|
41
52
|
}
|
|
42
53
|
`;
|
|
43
54
|
});
|
|
@@ -25,15 +25,26 @@ const SideBarItem = _styled.li.withConfig({
|
|
|
25
25
|
gap: ${theme.gap};
|
|
26
26
|
|
|
27
27
|
& {
|
|
28
|
-
${styleFromTokens(
|
|
28
|
+
${styleFromTokens({
|
|
29
|
+
tokenMaps: maps,
|
|
30
|
+
tokens: states.normal
|
|
31
|
+
})}
|
|
29
32
|
}
|
|
30
33
|
|
|
31
34
|
&:hover {
|
|
32
|
-
${styleFromTokens(
|
|
35
|
+
${styleFromTokens({
|
|
36
|
+
tokenMaps: maps,
|
|
37
|
+
tokens: states.hover,
|
|
38
|
+
fallbackTokens: states.normal
|
|
39
|
+
})}
|
|
33
40
|
}
|
|
34
41
|
|
|
35
42
|
&[data-state='active'] {
|
|
36
|
-
${styleFromTokens(
|
|
43
|
+
${styleFromTokens({
|
|
44
|
+
tokenMaps: maps,
|
|
45
|
+
tokens: states.active,
|
|
46
|
+
fallbackTokens: states.normal
|
|
47
|
+
})}
|
|
37
48
|
}
|
|
38
49
|
`;
|
|
39
50
|
});
|