@redis-ui/components 43.0.2 → 44.0.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/Badge/Badge.types.cjs +1 -1
- package/dist/Badge/Badge.types.d.ts +1 -1
- package/dist/Badge/Badge.types.js +1 -1
- package/dist/Badge/BadgeIcon.cjs +1 -0
- package/dist/Badge/BadgeIcon.js +2 -1
- package/dist/BoxSelectionGroup/components/Item/components/Compose/Compose.style.cjs +1 -1
- package/dist/BoxSelectionGroup/components/Item/components/Compose/Compose.style.js +1 -1
- package/dist/Button/Button.style.cjs +4 -0
- package/dist/Button/Button.style.js +4 -0
- package/dist/ButtonGroup/components/Button/Button.style.cjs +1 -1
- package/dist/ButtonGroup/components/Button/Button.style.js +1 -1
- package/dist/Drawer/Drawer.cjs +12 -2
- package/dist/Drawer/Drawer.js +12 -2
- package/dist/Drawer/components/Content/Content.style.cjs +1 -1
- package/dist/Drawer/components/Content/Content.style.js +1 -1
- package/dist/Drawer/components/Overlay/Overlay.style.cjs +1 -1
- package/dist/Drawer/components/Overlay/Overlay.style.js +1 -1
- package/dist/Drawer/hooks/useReducedMotionLifecycleSync.cjs +41 -0
- package/dist/Drawer/hooks/useReducedMotionLifecycleSync.d.ts +15 -0
- package/dist/Drawer/hooks/useReducedMotionLifecycleSync.js +41 -0
- 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/components/Compose/Compose.style.cjs +1 -1
- package/dist/Inputs/components/Compose/Compose.style.js +1 -1
- package/dist/Loader/Loader.cjs +2 -2
- package/dist/Loader/Loader.js +2 -2
- package/dist/Loader/Loader.types.d.ts +2 -1
- package/dist/Loader/index.d.ts +1 -0
- package/dist/Menu/components/Trigger/components/Arrow/Arrow.style.cjs +1 -1
- package/dist/Menu/components/Trigger/components/Arrow/Arrow.style.js +1 -1
- package/dist/Popover/components/Content/components/WindowBar/WindowBar.types.d.ts +3 -2
- package/dist/Popover/components/Content/components/WindowBar/components/Compose/Compose.style.d.ts +2 -3
- package/dist/Popover/components/Content/components/WindowBar/components/Compose/Compose.types.d.ts +2 -2
- package/dist/ProgressBar/ProgressBar.style.cjs +1 -1
- package/dist/ProgressBar/ProgressBar.style.js +1 -1
- package/dist/SearchBar/components/FiltersSection/FiltersSection.style.cjs +1 -1
- package/dist/SearchBar/components/FiltersSection/FiltersSection.style.js +1 -1
- package/dist/SearchBar/components/SearchSection/components/Actions/components/ColumnSelector/ColumnSelector.cjs +2 -0
- package/dist/SearchBar/components/SearchSection/components/Actions/components/ColumnSelector/ColumnSelector.js +2 -0
- package/dist/Section/components/Header/components/CollapseButton/CollapseButton.style.cjs +1 -1
- package/dist/Section/components/Header/components/CollapseButton/CollapseButton.style.js +1 -1
- package/dist/Select/components/Trigger/components/Arrow/Arrow.style.cjs +1 -1
- package/dist/Select/components/Trigger/components/Arrow/Arrow.style.js +1 -1
- package/dist/Select/components/Trigger/components/Compose/Compose.style.cjs +1 -1
- package/dist/Select/components/Trigger/components/Compose/Compose.style.js +1 -1
- package/dist/SideBar/SideBar.cjs +3 -1
- package/dist/SideBar/SideBar.js +3 -1
- package/dist/SideBar/SideBar.style.cjs +1 -1
- package/dist/SideBar/SideBar.style.js +1 -1
- package/dist/SideBar/components/Button/Button.style.cjs +3 -3
- package/dist/SideBar/components/Button/Button.style.js +3 -3
- package/dist/SideBar/components/Divider/Divider.style.cjs +1 -1
- package/dist/SideBar/components/Divider/Divider.style.js +1 -1
- package/dist/SideBar/components/Header/Header.style.cjs +4 -0
- package/dist/SideBar/components/Header/Header.style.js +4 -0
- package/dist/SideBar/components/Item/Item.style.cjs +1 -1
- package/dist/SideBar/components/Item/Item.style.js +1 -1
- package/dist/SideBar/components/Item/components/Text/Text.style.cjs +1 -1
- package/dist/SideBar/components/Item/components/Text/Text.style.js +1 -1
- package/dist/SideBar/components/SideBarLogo/SideBarLogo.style.cjs +1 -1
- package/dist/SideBar/components/SideBarLogo/SideBarLogo.style.js +1 -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 +2 -9
- package/dist/Stepper/components/Step/components/Compose/Compose.js +2 -9
- package/dist/Stepper/components/Step/components/Icon/Icon.style.cjs +1 -1
- package/dist/Stepper/components/Step/components/Icon/Icon.style.js +1 -1
- 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/Switch/components/Switcher/Switcher.style.cjs +3 -0
- package/dist/Switch/components/Switcher/Switcher.style.js +3 -0
- package/dist/ThemeModeSwitch/ThemeModeSwitch.style.cjs +1 -1
- package/dist/ThemeModeSwitch/ThemeModeSwitch.style.js +1 -1
- package/dist/Toast/Toaster.cjs +30 -4
- package/dist/Toast/Toaster.js +30 -4
- package/dist/Toast/Toaster.style.cjs +1 -1
- package/dist/Toast/Toaster.style.js +1 -1
- package/dist/Toast/components/ReducedMotionTransition/ReducedMotionTransition.cjs +22 -0
- package/dist/Toast/components/ReducedMotionTransition/ReducedMotionTransition.d.ts +3 -0
- package/dist/Toast/components/ReducedMotionTransition/ReducedMotionTransition.js +22 -0
- package/dist/Toast/core/mapping.helpers.cjs +9 -0
- package/dist/Toast/core/mapping.helpers.js +9 -0
- package/dist/index.cjs +4 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +74 -70
- package/package.json +3 -3
- package/skills/redis-ui-components/SKILL.md +0 -2
- 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/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/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 +106 -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/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
package/dist/Popover/components/Content/components/WindowBar/components/Compose/Compose.types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { WindowBarVariant } from '@redislabsdev/redis-ui-styles';
|
|
2
2
|
export interface WindowBarComposeProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
-
variant?:
|
|
3
|
+
variant?: WindowBarVariant;
|
|
4
4
|
}
|
|
@@ -17,7 +17,7 @@ const Root = _styled__default.default(index.Root).withConfig({
|
|
|
17
17
|
const Indicator = _styled__default.default(index.Indicator).withConfig({
|
|
18
18
|
displayName: "ProgressBarstyle__Indicator",
|
|
19
19
|
componentId: "RedisUI__sc-cdzix5-1"
|
|
20
|
-
})(["width:100%;height:100%;background-color:", ";transform:", ";transition:transform 660ms cubic-bezier(0.65,0,0.35,1);"], ({
|
|
20
|
+
})(["width:100%;height:100%;background-color:", ";transform:", ";transition:transform 660ms cubic-bezier(0.65,0,0.35,1);@media (prefers-reduced-motion:reduce){transition:none;}"], ({
|
|
21
21
|
variant
|
|
22
22
|
}) => redisUiStyles.useTheme().components.progressBar.indicator.variant[variant].color, ({
|
|
23
23
|
value
|
|
@@ -13,7 +13,7 @@ const Root = _styled(Root$1).withConfig({
|
|
|
13
13
|
const Indicator = _styled(Indicator$1).withConfig({
|
|
14
14
|
displayName: "ProgressBarstyle__Indicator",
|
|
15
15
|
componentId: "RedisUI__sc-cdzix5-1"
|
|
16
|
-
})(["width:100%;height:100%;background-color:", ";transform:", ";transition:transform 660ms cubic-bezier(0.65,0,0.35,1);"], ({
|
|
16
|
+
})(["width:100%;height:100%;background-color:", ";transform:", ";transition:transform 660ms cubic-bezier(0.65,0,0.35,1);@media (prefers-reduced-motion:reduce){transition:none;}"], ({
|
|
17
17
|
variant
|
|
18
18
|
}) => useTheme().components.progressBar.indicator.variant[variant].color, ({
|
|
19
19
|
value
|
|
@@ -12,6 +12,6 @@ const FiltersContainer = _styled__default.default.div.withConfig({
|
|
|
12
12
|
const CollapsedFiltersContainer = _styled__default.default(index.Content).withConfig({
|
|
13
13
|
displayName: "FiltersSectionstyle__CollapsedFiltersContainer",
|
|
14
14
|
componentId: "RedisUI__sc-vf7bf2-1"
|
|
15
|
-
})(["overflow:hidden;&[data-state='open']{animation:slideDown 200ms ease-out;}&[data-state='closed']{animation:slideUp 200ms ease-out;}@keyframes slideDown{from{height:0;}to{height:var(--radix-collapsible-content-height);}}@keyframes slideUp{from{height:var(--radix-collapsible-content-height);}to{height:0;}}"]);
|
|
15
|
+
})(["overflow:hidden;&[data-state='open']{animation:slideDown 200ms ease-out;}&[data-state='closed']{animation:slideUp 200ms ease-out;}@keyframes slideDown{from{height:0;}to{height:var(--radix-collapsible-content-height);}}@keyframes slideUp{from{height:var(--radix-collapsible-content-height);}to{height:0;}}@media (prefers-reduced-motion:reduce){&[data-state='open'],&[data-state='closed']{animation:none;}}"]);
|
|
16
16
|
exports.CollapsedFiltersContainer = CollapsedFiltersContainer;
|
|
17
17
|
exports.FiltersContainer = FiltersContainer;
|
|
@@ -8,7 +8,7 @@ const FiltersContainer = _styled.div.withConfig({
|
|
|
8
8
|
const CollapsedFiltersContainer = _styled(Content).withConfig({
|
|
9
9
|
displayName: "FiltersSectionstyle__CollapsedFiltersContainer",
|
|
10
10
|
componentId: "RedisUI__sc-vf7bf2-1"
|
|
11
|
-
})(["overflow:hidden;&[data-state='open']{animation:slideDown 200ms ease-out;}&[data-state='closed']{animation:slideUp 200ms ease-out;}@keyframes slideDown{from{height:0;}to{height:var(--radix-collapsible-content-height);}}@keyframes slideUp{from{height:var(--radix-collapsible-content-height);}to{height:0;}}"]);
|
|
11
|
+
})(["overflow:hidden;&[data-state='open']{animation:slideDown 200ms ease-out;}&[data-state='closed']{animation:slideUp 200ms ease-out;}@keyframes slideDown{from{height:0;}to{height:var(--radix-collapsible-content-height);}}@keyframes slideUp{from{height:var(--radix-collapsible-content-height);}to{height:0;}}@media (prefers-reduced-motion:reduce){&[data-state='open'],&[data-state='closed']{animation:none;}}"]);
|
|
12
12
|
export {
|
|
13
13
|
CollapsedFiltersContainer,
|
|
14
14
|
FiltersContainer
|
|
@@ -26,6 +26,8 @@ const ColumnSelector = ({
|
|
|
26
26
|
customContainer: true,
|
|
27
27
|
children: jsxRuntime.jsxRuntimeExports.jsxs(ToggleButton.default, {
|
|
28
28
|
pressed: isOpen,
|
|
29
|
+
onPressedChange: () => {
|
|
30
|
+
},
|
|
29
31
|
"aria-description": shouldShowFilterIndication ? "Filter Active" : void 0,
|
|
30
32
|
children: [jsxRuntime.jsxRuntimeExports.jsx(Button.default.Icon, {
|
|
31
33
|
icon: redisUiIcons.ColumnsIcon
|
|
@@ -24,6 +24,8 @@ const ColumnSelector = ({
|
|
|
24
24
|
customContainer: true,
|
|
25
25
|
children: jsxRuntimeExports.jsxs(ToggleButton, {
|
|
26
26
|
pressed: isOpen,
|
|
27
|
+
onPressedChange: () => {
|
|
28
|
+
},
|
|
27
29
|
"aria-description": shouldShowFilterIndication ? "Filter Active" : void 0,
|
|
28
30
|
children: [jsxRuntimeExports.jsx(Button.Icon, {
|
|
29
31
|
icon: ColumnsIcon
|
|
@@ -25,6 +25,6 @@ const SectionCollapseButton = _styled__default.default(IconButton.default).withC
|
|
|
25
25
|
const SectionCollapseIcon = _styled__default.default(redisUiIcons.ChevronDownIcon).withConfig({
|
|
26
26
|
displayName: "CollapseButtonstyle__SectionCollapseIcon",
|
|
27
27
|
componentId: "RedisUI__sc-e7t43f-1"
|
|
28
|
-
})(["transition:transform 0.1s;button[data-state='open'] &{transform:rotate(180deg);}"]);
|
|
28
|
+
})(["transition:transform 0.1s;@media (prefers-reduced-motion:reduce){transition:none;}button[data-state='open'] &{transform:rotate(180deg);}"]);
|
|
29
29
|
exports.SectionCollapseButton = SectionCollapseButton;
|
|
30
30
|
exports.SectionCollapseIcon = SectionCollapseIcon;
|
|
@@ -21,7 +21,7 @@ const SectionCollapseButton = _styled(IconButton).withConfig({
|
|
|
21
21
|
const SectionCollapseIcon = _styled(ChevronDownIcon).withConfig({
|
|
22
22
|
displayName: "CollapseButtonstyle__SectionCollapseIcon",
|
|
23
23
|
componentId: "RedisUI__sc-e7t43f-1"
|
|
24
|
-
})(["transition:transform 0.1s;button[data-state='open'] &{transform:rotate(180deg);}"]);
|
|
24
|
+
})(["transition:transform 0.1s;@media (prefers-reduced-motion:reduce){transition:none;}button[data-state='open'] &{transform:rotate(180deg);}"]);
|
|
25
25
|
export {
|
|
26
26
|
SectionCollapseButton,
|
|
27
27
|
SectionCollapseIcon
|
|
@@ -7,5 +7,5 @@ const _styled__default = /* @__PURE__ */ _interopDefault(_styled);
|
|
|
7
7
|
const ArrowIconContainer = _styled__default.default(SelfContained.SelfContained).withConfig({
|
|
8
8
|
displayName: "Arrowstyle__ArrowIconContainer",
|
|
9
9
|
componentId: "RedisUI__sc-x3vprr-0"
|
|
10
|
-
})(["[data-state='open'] &{rotate:180deg;}[data-state='closed'] &{rotate:0deg;}transition:rotate 0.5s;flex:none;"]);
|
|
10
|
+
})(["[data-state='open'] &{rotate:180deg;}[data-state='closed'] &{rotate:0deg;}transition:rotate 0.5s;@media (prefers-reduced-motion:reduce){transition:none;}flex:none;"]);
|
|
11
11
|
exports.ArrowIconContainer = ArrowIconContainer;
|
|
@@ -3,7 +3,7 @@ import { SelfContained } from "../../../../../Helpers/SelfContained.js";
|
|
|
3
3
|
const ArrowIconContainer = _styled(SelfContained).withConfig({
|
|
4
4
|
displayName: "Arrowstyle__ArrowIconContainer",
|
|
5
5
|
componentId: "RedisUI__sc-x3vprr-0"
|
|
6
|
-
})(["[data-state='open'] &{rotate:180deg;}[data-state='closed'] &{rotate:0deg;}transition:rotate 0.5s;flex:none;"]);
|
|
6
|
+
})(["[data-state='open'] &{rotate:180deg;}[data-state='closed'] &{rotate:0deg;}transition:rotate 0.5s;@media (prefers-reduced-motion:reduce){transition:none;}flex:none;"]);
|
|
7
7
|
export {
|
|
8
8
|
ArrowIconContainer
|
|
9
9
|
};
|
|
@@ -82,7 +82,7 @@ const getStateStyle = (theme) => {
|
|
|
82
82
|
const TriggerContainer = _styled__default.default(index.Trigger).withConfig({
|
|
83
83
|
displayName: "Composestyle__TriggerContainer",
|
|
84
84
|
componentId: "RedisUI__sc-txq0dy-0"
|
|
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;", ";", ";"], () => {
|
|
85
|
+
})(["display:flex;flex-wrap:nowrap;overflow:hidden;align-items:center;box-sizing:border-box;transition:border-color 0.2s ease-in;@media (prefers-reduced-motion:reduce){transition:none;}width:100%;justify-content:start;text-align:start;", ";", ";"], () => {
|
|
86
86
|
const style = redisUiStyles.useTheme().components.select;
|
|
87
87
|
return _styled.css`
|
|
88
88
|
${css_utils.styleFromTokens({
|
|
@@ -78,7 +78,7 @@ const getStateStyle = (theme) => {
|
|
|
78
78
|
const TriggerContainer = _styled(Trigger).withConfig({
|
|
79
79
|
displayName: "Composestyle__TriggerContainer",
|
|
80
80
|
componentId: "RedisUI__sc-txq0dy-0"
|
|
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;", ";", ";"], () => {
|
|
81
|
+
})(["display:flex;flex-wrap:nowrap;overflow:hidden;align-items:center;box-sizing:border-box;transition:border-color 0.2s ease-in;@media (prefers-reduced-motion:reduce){transition:none;}width:100%;justify-content:start;text-align:start;", ";", ";"], () => {
|
|
82
82
|
const style = useTheme().components.select;
|
|
83
83
|
return css`
|
|
84
84
|
${styleFromTokens({
|
package/dist/SideBar/SideBar.cjs
CHANGED
|
@@ -3,6 +3,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
3
3
|
const jsxRuntime = require("../node_modules/react/jsx-runtime.cjs");
|
|
4
4
|
const React = require("react");
|
|
5
5
|
const index = require("../node_modules/@radix-ui/react-id/dist/index.cjs");
|
|
6
|
+
const redisUiStyles = require("@redislabsdev/redis-ui-styles");
|
|
6
7
|
const SideBar_context = require("./SideBar.context.cjs");
|
|
7
8
|
const Provider = require("../Tooltip/Provider/Provider.cjs");
|
|
8
9
|
const SideBarLogo = require("./components/SideBarLogo/SideBarLogo.cjs");
|
|
@@ -21,9 +22,10 @@ const SideBar = Object.assign(({
|
|
|
21
22
|
...rest
|
|
22
23
|
}) => {
|
|
23
24
|
const [transitionEnd, setTransitionEnd] = React.useState(true);
|
|
25
|
+
const prefersReducedMotion = redisUiStyles.usePrefersReducedMotion();
|
|
24
26
|
const sidebarId = index.useId();
|
|
25
27
|
const handleTransitionChange = (end) => {
|
|
26
|
-
setTransitionEnd(end);
|
|
28
|
+
setTransitionEnd(prefersReducedMotion ? true : end);
|
|
27
29
|
};
|
|
28
30
|
return jsxRuntime.jsxRuntimeExports.jsx(SideBarThemeProvider.SideBarThemeProvider, {
|
|
29
31
|
children: jsxRuntime.jsxRuntimeExports.jsx(SideBar_context.SideBarContextProvider, {
|
package/dist/SideBar/SideBar.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { j as jsxRuntimeExports } from "../node_modules/react/jsx-runtime.js";
|
|
2
2
|
import { useState } from "react";
|
|
3
3
|
import { useId } from "../node_modules/@radix-ui/react-id/dist/index.js";
|
|
4
|
+
import { usePrefersReducedMotion } from "@redislabsdev/redis-ui-styles";
|
|
4
5
|
import { SideBarContextProvider } from "./SideBar.context.js";
|
|
5
6
|
import TooltipProvider from "../Tooltip/Provider/Provider.js";
|
|
6
7
|
import SideBarLogo from "./components/SideBarLogo/SideBarLogo.js";
|
|
@@ -19,9 +20,10 @@ const SideBar = Object.assign(({
|
|
|
19
20
|
...rest
|
|
20
21
|
}) => {
|
|
21
22
|
const [transitionEnd, setTransitionEnd] = useState(true);
|
|
23
|
+
const prefersReducedMotion = usePrefersReducedMotion();
|
|
22
24
|
const sidebarId = useId();
|
|
23
25
|
const handleTransitionChange = (end) => {
|
|
24
|
-
setTransitionEnd(end);
|
|
26
|
+
setTransitionEnd(prefersReducedMotion ? true : end);
|
|
25
27
|
};
|
|
26
28
|
return jsxRuntimeExports.jsx(SideBarThemeProvider, {
|
|
27
29
|
children: jsxRuntimeExports.jsx(SideBarContextProvider, {
|
|
@@ -22,7 +22,7 @@ const useRootStateStyle = (getStyle) => {
|
|
|
22
22
|
const SideBarContainer = _styled__default.default(FlexGroup.FlexGroup).withConfig({
|
|
23
23
|
displayName: "SideBarstyle__SideBarContainer",
|
|
24
24
|
componentId: "RedisUI__sc-suwica-0"
|
|
25
|
-
})(["position:relative;height:100%;transition:width 0.6s;", ""], () => useRootStateStyle((theme) => _styled.css`
|
|
25
|
+
})(["position:relative;height:100%;transition:width 0.6s;@media (prefers-reduced-motion:reduce){transition:none;}", ""], () => useRootStateStyle((theme) => _styled.css`
|
|
26
26
|
box-shadow: ${theme.shadow};
|
|
27
27
|
background-color: ${theme.bgColor};
|
|
28
28
|
width: ${theme.width};
|
|
@@ -18,7 +18,7 @@ const useRootStateStyle = (getStyle) => {
|
|
|
18
18
|
const SideBarContainer = _styled(FlexGroup).withConfig({
|
|
19
19
|
displayName: "SideBarstyle__SideBarContainer",
|
|
20
20
|
componentId: "RedisUI__sc-suwica-0"
|
|
21
|
-
})(["position:relative;height:100%;transition:width 0.6s;", ""], () => useRootStateStyle((theme) => css`
|
|
21
|
+
})(["position:relative;height:100%;transition:width 0.6s;@media (prefers-reduced-motion:reduce){transition:none;}", ""], () => useRootStateStyle((theme) => css`
|
|
22
22
|
box-shadow: ${theme.shadow};
|
|
23
23
|
background-color: ${theme.bgColor};
|
|
24
24
|
width: ${theme.width};
|
|
@@ -9,7 +9,7 @@ const _styled__default = /* @__PURE__ */ _interopDefault(_styled);
|
|
|
9
9
|
const SideBarButton = _styled__default.default(Button.default).withConfig({
|
|
10
10
|
displayName: "Buttonstyle__SideBarButton",
|
|
11
11
|
componentId: "RedisUI__sc-ngkny4-0"
|
|
12
|
-
})(["flex-shrink:0;margin:0 auto;display:flex;position:relative;", " padding:0;transition:width 0.7s;min-width:unset;"], () => SideBar_utils.useStateStyle((theme) => _styled.css`
|
|
12
|
+
})(["flex-shrink:0;margin:0 auto;display:flex;position:relative;", " padding:0;transition:width 0.7s;min-width:unset;@media (prefers-reduced-motion:reduce){transition:none;}"], () => SideBar_utils.useStateStyle((theme) => _styled.css`
|
|
13
13
|
height: ${theme.button.height};
|
|
14
14
|
width: ${theme.button.width};
|
|
15
15
|
`));
|
|
@@ -25,11 +25,11 @@ const appear = _styled.keyframes`
|
|
|
25
25
|
const FadeInAnimationText = _styled__default.default.span.withConfig({
|
|
26
26
|
displayName: "Buttonstyle__FadeInAnimationText",
|
|
27
27
|
componentId: "RedisUI__sc-ngkny4-1"
|
|
28
|
-
})(["animation:", " 0.3s forwards;"], appear);
|
|
28
|
+
})(["animation:", " 0.3s forwards;@media (prefers-reduced-motion:reduce){animation:none;}"], appear);
|
|
29
29
|
const FadeInAnimationSvg = _styled__default.default.span.withConfig({
|
|
30
30
|
displayName: "Buttonstyle__FadeInAnimationSvg",
|
|
31
31
|
componentId: "RedisUI__sc-ngkny4-2"
|
|
32
|
-
})(["display:flex;animation:", " 0.5s forwards;"], appear);
|
|
32
|
+
})(["display:flex;animation:", " 0.5s forwards;@media (prefers-reduced-motion:reduce){animation:none;}"], appear);
|
|
33
33
|
const TooltipContent = _styled__default.default(Tooltip.default.Content.Text).withConfig({
|
|
34
34
|
displayName: "Buttonstyle__TooltipContent",
|
|
35
35
|
componentId: "RedisUI__sc-ngkny4-3"
|
|
@@ -5,7 +5,7 @@ import Tooltip from "../../../Tooltip/Tooltip.js";
|
|
|
5
5
|
const SideBarButton = _styled(Button).withConfig({
|
|
6
6
|
displayName: "Buttonstyle__SideBarButton",
|
|
7
7
|
componentId: "RedisUI__sc-ngkny4-0"
|
|
8
|
-
})(["flex-shrink:0;margin:0 auto;display:flex;position:relative;", " padding:0;transition:width 0.7s;min-width:unset;"], () => useStateStyle((theme) => css`
|
|
8
|
+
})(["flex-shrink:0;margin:0 auto;display:flex;position:relative;", " padding:0;transition:width 0.7s;min-width:unset;@media (prefers-reduced-motion:reduce){transition:none;}"], () => useStateStyle((theme) => css`
|
|
9
9
|
height: ${theme.button.height};
|
|
10
10
|
width: ${theme.button.width};
|
|
11
11
|
`));
|
|
@@ -21,11 +21,11 @@ const appear = keyframes`
|
|
|
21
21
|
const FadeInAnimationText = _styled.span.withConfig({
|
|
22
22
|
displayName: "Buttonstyle__FadeInAnimationText",
|
|
23
23
|
componentId: "RedisUI__sc-ngkny4-1"
|
|
24
|
-
})(["animation:", " 0.3s forwards;"], appear);
|
|
24
|
+
})(["animation:", " 0.3s forwards;@media (prefers-reduced-motion:reduce){animation:none;}"], appear);
|
|
25
25
|
const FadeInAnimationSvg = _styled.span.withConfig({
|
|
26
26
|
displayName: "Buttonstyle__FadeInAnimationSvg",
|
|
27
27
|
componentId: "RedisUI__sc-ngkny4-2"
|
|
28
|
-
})(["display:flex;animation:", " 0.5s forwards;"], appear);
|
|
28
|
+
})(["display:flex;animation:", " 0.5s forwards;@media (prefers-reduced-motion:reduce){animation:none;}"], appear);
|
|
29
29
|
const TooltipContent = _styled(Tooltip.Content.Text).withConfig({
|
|
30
30
|
displayName: "Buttonstyle__TooltipContent",
|
|
31
31
|
componentId: "RedisUI__sc-ngkny4-3"
|
|
@@ -7,7 +7,7 @@ const _styled__default = /* @__PURE__ */ _interopDefault(_styled);
|
|
|
7
7
|
const SideBarDivider = _styled__default.default.div.withConfig({
|
|
8
8
|
displayName: "Dividerstyle__SideBarDivider",
|
|
9
9
|
componentId: "RedisUI__sc-191o8ht-0"
|
|
10
|
-
})(["background-clip:content-box;transition:all 1s;flex:none;", ";"], ({
|
|
10
|
+
})(["background-clip:content-box;transition:all 1s;flex:none;@media (prefers-reduced-motion:reduce){transition:none;}", ";"], ({
|
|
11
11
|
fullWidthWhenExpanded,
|
|
12
12
|
fullWidth,
|
|
13
13
|
noMargin
|
|
@@ -3,7 +3,7 @@ import { useStateStyle } from "../../SideBar.utils.js";
|
|
|
3
3
|
const SideBarDivider = _styled.div.withConfig({
|
|
4
4
|
displayName: "Dividerstyle__SideBarDivider",
|
|
5
5
|
componentId: "RedisUI__sc-191o8ht-0"
|
|
6
|
-
})(["background-clip:content-box;transition:all 1s;flex:none;", ";"], ({
|
|
6
|
+
})(["background-clip:content-box;transition:all 1s;flex:none;@media (prefers-reduced-motion:reduce){transition:none;}", ";"], ({
|
|
7
7
|
fullWidthWhenExpanded,
|
|
8
8
|
fullWidth,
|
|
9
9
|
noMargin
|
|
@@ -28,6 +28,10 @@ const SideBarToggleButton = _styled__default.default.button.withConfig({
|
|
|
28
28
|
transition: all 0.3s ease;
|
|
29
29
|
right: ${isExpanded ? theme.collapseButton.rightExpanded : theme.collapseButton.rightCollapsed};
|
|
30
30
|
|
|
31
|
+
@media (prefers-reduced-motion: reduce) {
|
|
32
|
+
transition: none;
|
|
33
|
+
}
|
|
34
|
+
|
|
31
35
|
::before {
|
|
32
36
|
// half-width background + shadow
|
|
33
37
|
filter: drop-shadow(${theme.collapseButton.filterShadow});
|
|
@@ -24,6 +24,10 @@ const SideBarToggleButton = _styled.button.withConfig({
|
|
|
24
24
|
transition: all 0.3s ease;
|
|
25
25
|
right: ${isExpanded ? theme.collapseButton.rightExpanded : theme.collapseButton.rightCollapsed};
|
|
26
26
|
|
|
27
|
+
@media (prefers-reduced-motion: reduce) {
|
|
28
|
+
transition: none;
|
|
29
|
+
}
|
|
30
|
+
|
|
27
31
|
::before {
|
|
28
32
|
// half-width background + shadow
|
|
29
33
|
filter: drop-shadow(${theme.collapseButton.filterShadow});
|
|
@@ -11,7 +11,7 @@ const maps = [css_utils.tokenMaps.bgColor, css_utils.tokenMaps.textColor];
|
|
|
11
11
|
const SideBarItem = _styled__default.default.li.withConfig({
|
|
12
12
|
displayName: "Itemstyle__SideBarItem",
|
|
13
13
|
componentId: "RedisUI__sc-rtt1mk-0"
|
|
14
|
-
})(["position:relative;display:flex;justify-content:flex-start;align-items:center;cursor:pointer;text-decoration:none;transition:background 0.3s
|
|
14
|
+
})(["position:relative;display:flex;justify-content:flex-start;align-items:center;cursor:pointer;text-decoration:none;transition:background 0.3s;@media (prefers-reduced-motion:reduce){transition:none;}&:focus-visible{outline:", " solid ", ";outline-offset:-", ";}", ";& > svg{transition:inherit;}"], () => redisUiStyles.useTheme().core.focus.size, () => redisUiStyles.useTheme().core.focus.color, () => redisUiStyles.useTheme().core.focus.size, () => {
|
|
15
15
|
return SideBar_utils.useStateStyle(({
|
|
16
16
|
item: theme
|
|
17
17
|
}) => {
|
|
@@ -7,7 +7,7 @@ const maps = [tokenMaps.bgColor, tokenMaps.textColor];
|
|
|
7
7
|
const SideBarItem = _styled.li.withConfig({
|
|
8
8
|
displayName: "Itemstyle__SideBarItem",
|
|
9
9
|
componentId: "RedisUI__sc-rtt1mk-0"
|
|
10
|
-
})(["position:relative;display:flex;justify-content:flex-start;align-items:center;cursor:pointer;text-decoration:none;transition:background 0.3s
|
|
10
|
+
})(["position:relative;display:flex;justify-content:flex-start;align-items:center;cursor:pointer;text-decoration:none;transition:background 0.3s;@media (prefers-reduced-motion:reduce){transition:none;}&:focus-visible{outline:", " solid ", ";outline-offset:-", ";}", ";& > svg{transition:inherit;}"], () => useTheme().core.focus.size, () => useTheme().core.focus.color, () => useTheme().core.focus.size, () => {
|
|
11
11
|
return useStateStyle(({
|
|
12
12
|
item: theme
|
|
13
13
|
}) => {
|
|
@@ -8,7 +8,7 @@ const _styled__default = /* @__PURE__ */ _interopDefault(_styled);
|
|
|
8
8
|
const SideBarItemText = _styled__default.default(Typography.default.Body).withConfig({
|
|
9
9
|
displayName: "Textstyle__SideBarItemText",
|
|
10
10
|
componentId: "RedisUI__sc-17tjfvd-0"
|
|
11
|
-
})(["transition:width 0.6s,opacity 0.4s;opacity:", ";"], () => {
|
|
11
|
+
})(["transition:width 0.6s,opacity 0.4s;@media (prefers-reduced-motion:reduce){transition:none;}opacity:", ";"], () => {
|
|
12
12
|
const {
|
|
13
13
|
isExpanded,
|
|
14
14
|
transitionEnd
|
|
@@ -4,7 +4,7 @@ import Typography from "../../../../../Typography/Typography.js";
|
|
|
4
4
|
const SideBarItemText = _styled(Typography.Body).withConfig({
|
|
5
5
|
displayName: "Textstyle__SideBarItemText",
|
|
6
6
|
componentId: "RedisUI__sc-17tjfvd-0"
|
|
7
|
-
})(["transition:width 0.6s,opacity 0.4s;opacity:", ";"], () => {
|
|
7
|
+
})(["transition:width 0.6s,opacity 0.4s;@media (prefers-reduced-motion:reduce){transition:none;}opacity:", ";"], () => {
|
|
8
8
|
const {
|
|
9
9
|
isExpanded,
|
|
10
10
|
transitionEnd
|
|
@@ -7,7 +7,7 @@ const _styled__default = /* @__PURE__ */ _interopDefault(_styled);
|
|
|
7
7
|
const SideBarLogo = _styled__default.default.span.withConfig({
|
|
8
8
|
displayName: "SideBarLogostyle__SideBarLogo",
|
|
9
9
|
componentId: "RedisUI__sc-1u1jhxg-0"
|
|
10
|
-
})(["display:flex;z-index:1;transition:padding-left 0.2s;", ""], () => SideBar_utils.useStateStyle((theme) => _styled.css`
|
|
10
|
+
})(["display:flex;z-index:1;transition:padding-left 0.2s;@media (prefers-reduced-motion:reduce){transition:none;}", ""], () => SideBar_utils.useStateStyle((theme) => _styled.css`
|
|
11
11
|
padding-left: ${theme.logo.offset};
|
|
12
12
|
`));
|
|
13
13
|
exports.SideBarLogo = SideBarLogo;
|
|
@@ -3,7 +3,7 @@ import { useStateStyle } from "../../SideBar.utils.js";
|
|
|
3
3
|
const SideBarLogo = _styled.span.withConfig({
|
|
4
4
|
displayName: "SideBarLogostyle__SideBarLogo",
|
|
5
5
|
componentId: "RedisUI__sc-1u1jhxg-0"
|
|
6
|
-
})(["display:flex;z-index:1;transition:padding-left 0.2s;", ""], () => useStateStyle((theme) => css`
|
|
6
|
+
})(["display:flex;z-index:1;transition:padding-left 0.2s;@media (prefers-reduced-motion:reduce){transition:none;}", ""], () => useStateStyle((theme) => css`
|
|
7
7
|
padding-left: ${theme.logo.offset};
|
|
8
8
|
`));
|
|
9
9
|
export {
|
package/dist/Stepper/Stepper.cjs
CHANGED
|
@@ -1,21 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const jsxRuntime = require("../node_modules/react/jsx-runtime.cjs");
|
|
4
|
+
const React = require("react");
|
|
4
5
|
const Step = require("./components/Step/Step.cjs");
|
|
5
6
|
const Compose = require("./components/Compose/Compose.cjs");
|
|
7
|
+
const Stepper_utils = require("./Stepper.utils.cjs");
|
|
6
8
|
const Stepper = Object.assign(({
|
|
7
9
|
steps,
|
|
8
10
|
...restProps
|
|
9
11
|
}) => {
|
|
12
|
+
const {
|
|
13
|
+
currentStep = -1
|
|
14
|
+
} = restProps;
|
|
10
15
|
return jsxRuntime.jsxRuntimeExports.jsx(Stepper.Compose, {
|
|
11
16
|
...restProps,
|
|
12
17
|
children: steps.map((step, idx) => (
|
|
13
18
|
// eslint-disable-next-line react/no-array-index-key
|
|
14
|
-
jsxRuntime.jsxRuntimeExports.jsxs(
|
|
15
|
-
children: [jsxRuntime.jsxRuntimeExports.jsx(Step.default.
|
|
16
|
-
|
|
17
|
-
}), jsxRuntime.jsxRuntimeExports.
|
|
18
|
-
children:
|
|
19
|
+
jsxRuntime.jsxRuntimeExports.jsxs(React.Fragment, {
|
|
20
|
+
children: [idx > 0 && jsxRuntime.jsxRuntimeExports.jsx(Step.default.Separator, {
|
|
21
|
+
state: Stepper_utils.getStepState(idx, currentStep)
|
|
22
|
+
}), jsxRuntime.jsxRuntimeExports.jsxs(Step.default.Compose, {
|
|
23
|
+
children: [jsxRuntime.jsxRuntimeExports.jsx(Step.default.Icon, {
|
|
24
|
+
children: step.icon
|
|
25
|
+
}), jsxRuntime.jsxRuntimeExports.jsx(Step.default.Label, {
|
|
26
|
+
children: step.label
|
|
27
|
+
})]
|
|
19
28
|
})]
|
|
20
29
|
}, idx)
|
|
21
30
|
))
|
|
@@ -4,6 +4,7 @@ declare const Stepper: (({ steps, ...restProps }: StepperProps) => import("react
|
|
|
4
4
|
Compose: ({ onClick, ...restProps }: import("./components/Step/components/Compose/Compose.types").ComposeProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
5
5
|
Icon: ({ children, ...restProps }: import("./components/Step/components/Icon/Icon.types").IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
Label: ({ children, ...restProps }: import("./components/Step/components/Label/Label.types").LabelProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
7
|
+
Separator: ({ state, ...restProps }: import("./components/Step/components/Separator/Separator.types").SeparatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
8
|
useStepContext: () => import(".").StepperStepContextType;
|
|
8
9
|
};
|
|
9
10
|
Compose: (({ currentStep, getIsStepInteractive, onStepChange, onKeyDown, ...restProps }: import("./components/Compose/Compose.types").StepperComposeProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
@@ -11,6 +12,7 @@ declare const Stepper: (({ steps, ...restProps }: StepperProps) => import("react
|
|
|
11
12
|
Compose: ({ onClick, ...restProps }: import("./components/Step/components/Compose/Compose.types").ComposeProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
12
13
|
Icon: ({ children, ...restProps }: import("./components/Step/components/Icon/Icon.types").IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
14
|
Label: ({ children, ...restProps }: import("./components/Step/components/Label/Label.types").LabelProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
15
|
+
Separator: ({ state, ...restProps }: import("./components/Step/components/Separator/Separator.types").SeparatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
16
|
useStepContext: () => import(".").StepperStepContextType;
|
|
15
17
|
};
|
|
16
18
|
};
|
package/dist/Stepper/Stepper.js
CHANGED
|
@@ -1,19 +1,28 @@
|
|
|
1
1
|
import { j as jsxRuntimeExports } from "../node_modules/react/jsx-runtime.js";
|
|
2
|
+
import { Fragment } from "react";
|
|
2
3
|
import Step from "./components/Step/Step.js";
|
|
3
4
|
import StepperCompose from "./components/Compose/Compose.js";
|
|
5
|
+
import { getStepState } from "./Stepper.utils.js";
|
|
4
6
|
const Stepper = Object.assign(({
|
|
5
7
|
steps,
|
|
6
8
|
...restProps
|
|
7
9
|
}) => {
|
|
10
|
+
const {
|
|
11
|
+
currentStep = -1
|
|
12
|
+
} = restProps;
|
|
8
13
|
return jsxRuntimeExports.jsx(Stepper.Compose, {
|
|
9
14
|
...restProps,
|
|
10
15
|
children: steps.map((step, idx) => (
|
|
11
16
|
// eslint-disable-next-line react/no-array-index-key
|
|
12
|
-
jsxRuntimeExports.jsxs(
|
|
13
|
-
children: [jsxRuntimeExports.jsx(Step.
|
|
14
|
-
|
|
15
|
-
}), jsxRuntimeExports.
|
|
16
|
-
children:
|
|
17
|
+
jsxRuntimeExports.jsxs(Fragment, {
|
|
18
|
+
children: [idx > 0 && jsxRuntimeExports.jsx(Step.Separator, {
|
|
19
|
+
state: getStepState(idx, currentStep)
|
|
20
|
+
}), jsxRuntimeExports.jsxs(Step.Compose, {
|
|
21
|
+
children: [jsxRuntimeExports.jsx(Step.Icon, {
|
|
22
|
+
children: step.icon
|
|
23
|
+
}), jsxRuntimeExports.jsx(Step.Label, {
|
|
24
|
+
children: step.label
|
|
25
|
+
})]
|
|
17
26
|
})]
|
|
18
27
|
}, idx)
|
|
19
28
|
))
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const getStepState = (idx, currentStep) => {
|
|
4
|
+
if (idx < currentStep) {
|
|
5
|
+
return "completed";
|
|
6
|
+
}
|
|
7
|
+
if (idx === currentStep) {
|
|
8
|
+
return "focused";
|
|
9
|
+
}
|
|
10
|
+
return "idle";
|
|
11
|
+
};
|
|
12
|
+
exports.getStepState = getStepState;
|
|
@@ -4,6 +4,7 @@ declare const StepperCompose: (({ currentStep, getIsStepInteractive, onStepChang
|
|
|
4
4
|
Compose: ({ onClick, ...restProps }: import("../Step/components/Compose/Compose.types").ComposeProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
5
5
|
Icon: ({ children, ...restProps }: import("../Step/components/Icon/Icon.types").IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
Label: ({ children, ...restProps }: import("../Step/components/Label/Label.types").LabelProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
7
|
+
Separator: ({ state, ...restProps }: import("../Step/components/Separator/Separator.types").SeparatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
8
|
useStepContext: () => import("../..").StepperStepContextType;
|
|
8
9
|
};
|
|
9
10
|
};
|
|
@@ -4,6 +4,7 @@ const jsxRuntime = require("../../../node_modules/react/jsx-runtime.cjs");
|
|
|
4
4
|
const Compose = require("./components/Compose/Compose.cjs");
|
|
5
5
|
const Icon = require("./components/Icon/Icon.cjs");
|
|
6
6
|
const Label = require("./components/Label/Label.cjs");
|
|
7
|
+
const Separator = require("./components/Separator/Separator.cjs");
|
|
7
8
|
const Step_context = require("./Step.context.cjs");
|
|
8
9
|
const Step = Object.assign(({
|
|
9
10
|
children,
|
|
@@ -17,6 +18,7 @@ const Step = Object.assign(({
|
|
|
17
18
|
Compose: Compose.default,
|
|
18
19
|
Icon: Icon.default,
|
|
19
20
|
Label: Label.default,
|
|
21
|
+
Separator: Separator.default,
|
|
20
22
|
useStepContext: Step_context.useStepContext
|
|
21
23
|
});
|
|
22
24
|
exports.default = Step;
|
|
@@ -3,6 +3,7 @@ declare const Step: (({ children, ...restProps }: StepperStepProps) => import("r
|
|
|
3
3
|
Compose: ({ onClick, ...restProps }: import("./components/Compose/Compose.types").ComposeProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
4
4
|
Icon: ({ children, ...restProps }: import("./components/Icon/Icon.types").IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
Label: ({ children, ...restProps }: import("./components/Label/Label.types").LabelProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
6
|
+
Separator: ({ state, ...restProps }: import("./components/Separator/Separator.types").SeparatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
7
|
useStepContext: () => import("./Step.types").StepperStepContextType;
|
|
7
8
|
};
|
|
8
9
|
export default Step;
|
|
@@ -2,6 +2,7 @@ import { j as jsxRuntimeExports } from "../../../node_modules/react/jsx-runtime.
|
|
|
2
2
|
import Compose from "./components/Compose/Compose.js";
|
|
3
3
|
import Icon from "./components/Icon/Icon.js";
|
|
4
4
|
import Label from "./components/Label/Label.js";
|
|
5
|
+
import Separator from "./components/Separator/Separator.js";
|
|
5
6
|
import { useStepContext } from "./Step.context.js";
|
|
6
7
|
const Step = Object.assign(({
|
|
7
8
|
children,
|
|
@@ -15,6 +16,7 @@ const Step = Object.assign(({
|
|
|
15
16
|
Compose,
|
|
16
17
|
Icon,
|
|
17
18
|
Label,
|
|
19
|
+
Separator,
|
|
18
20
|
useStepContext
|
|
19
21
|
});
|
|
20
22
|
export {
|
|
@@ -3,11 +3,11 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
3
3
|
const jsxRuntime = require("../../../../../node_modules/react/jsx-runtime.cjs");
|
|
4
4
|
const React = require("react");
|
|
5
5
|
const Step_context = require("../../Step.context.cjs");
|
|
6
|
-
const Step_types = require("../../Step.types.cjs");
|
|
7
6
|
const useStepRegistration = require("../../../../hooks/useStepRegistration.cjs");
|
|
8
7
|
const Stepper_context = require("../../../../Stepper.context.cjs");
|
|
9
8
|
const Compose_style = require("./Compose.style.cjs");
|
|
10
9
|
const useStepperInteractive = require("../../../../hooks/useStepperInteractive.cjs");
|
|
10
|
+
const Stepper_utils = require("../../../../Stepper.utils.cjs");
|
|
11
11
|
const Compose = ({
|
|
12
12
|
onClick,
|
|
13
13
|
...restProps
|
|
@@ -20,14 +20,7 @@ const Compose = ({
|
|
|
20
20
|
const {
|
|
21
21
|
stepIndex
|
|
22
22
|
} = useStepRegistration.useStepRegistration();
|
|
23
|
-
|
|
24
|
-
if (stepIndex >= 0) {
|
|
25
|
-
if (stepIndex < currentStep) {
|
|
26
|
-
state = Step_types.StepperStepState.COMPLETED;
|
|
27
|
-
} else if (stepIndex === currentStep) {
|
|
28
|
-
state = Step_types.StepperStepState.FOCUSED;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
23
|
+
const state = stepIndex >= 0 ? Stepper_utils.getStepState(stepIndex, currentStep) : "idle";
|
|
31
24
|
const contextValue = React.useMemo(() => ({
|
|
32
25
|
state,
|
|
33
26
|
index: stepIndex
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { j as jsxRuntimeExports } from "../../../../../node_modules/react/jsx-runtime.js";
|
|
2
2
|
import { useMemo } from "react";
|
|
3
3
|
import { StepContextProvider } from "../../Step.context.js";
|
|
4
|
-
import { StepperStepState } from "../../Step.types.js";
|
|
5
4
|
import { useStepRegistration } from "../../../../hooks/useStepRegistration.js";
|
|
6
5
|
import { useStepperContext } from "../../../../Stepper.context.js";
|
|
7
6
|
import { StepCompose } from "./Compose.style.js";
|
|
8
7
|
import { getInteractiveStepProps } from "../../../../hooks/useStepperInteractive.js";
|
|
8
|
+
import { getStepState } from "../../../../Stepper.utils.js";
|
|
9
9
|
const Compose = ({
|
|
10
10
|
onClick,
|
|
11
11
|
...restProps
|
|
@@ -18,14 +18,7 @@ const Compose = ({
|
|
|
18
18
|
const {
|
|
19
19
|
stepIndex
|
|
20
20
|
} = useStepRegistration();
|
|
21
|
-
|
|
22
|
-
if (stepIndex >= 0) {
|
|
23
|
-
if (stepIndex < currentStep) {
|
|
24
|
-
state = StepperStepState.COMPLETED;
|
|
25
|
-
} else if (stepIndex === currentStep) {
|
|
26
|
-
state = StepperStepState.FOCUSED;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
21
|
+
const state = stepIndex >= 0 ? getStepState(stepIndex, currentStep) : "idle";
|
|
29
22
|
const contextValue = useMemo(() => ({
|
|
30
23
|
state,
|
|
31
24
|
index: stepIndex
|
|
@@ -9,7 +9,7 @@ const _styled__default = /* @__PURE__ */ _interopDefault(_styled);
|
|
|
9
9
|
const Container = _styled__default.default.div.withConfig({
|
|
10
10
|
displayName: "Iconstyle__Container",
|
|
11
11
|
componentId: "RedisUI__sc-1ojkwgp-0"
|
|
12
|
-
})(["display:flex;align-items:center;justify-content:center;flex:none;line-height:0;transition:all 0.3s ease;width:", ";height:", ";", ""], () => redisUiStyles.useTheme().components.stepper.step.indicator.size, () => redisUiStyles.useTheme().components.stepper.step.indicator.size, () => {
|
|
12
|
+
})(["display:flex;align-items:center;justify-content:center;flex:none;line-height:0;transition:all 0.3s ease;@media (prefers-reduced-motion:reduce){transition:none;}width:", ";height:", ";", ""], () => redisUiStyles.useTheme().components.stepper.step.indicator.size, () => redisUiStyles.useTheme().components.stepper.step.indicator.size, () => {
|
|
13
13
|
const {
|
|
14
14
|
states
|
|
15
15
|
} = redisUiStyles.useTheme().components.stepper.step;
|
|
@@ -5,7 +5,7 @@ import { StepperStepState } from "../../Step.types.js";
|
|
|
5
5
|
const Container = _styled.div.withConfig({
|
|
6
6
|
displayName: "Iconstyle__Container",
|
|
7
7
|
componentId: "RedisUI__sc-1ojkwgp-0"
|
|
8
|
-
})(["display:flex;align-items:center;justify-content:center;flex:none;line-height:0;transition:all 0.3s ease;width:", ";height:", ";", ""], () => useTheme().components.stepper.step.indicator.size, () => useTheme().components.stepper.step.indicator.size, () => {
|
|
8
|
+
})(["display:flex;align-items:center;justify-content:center;flex:none;line-height:0;transition:all 0.3s ease;@media (prefers-reduced-motion:reduce){transition:none;}width:", ";height:", ";", ""], () => useTheme().components.stepper.step.indicator.size, () => useTheme().components.stepper.step.indicator.size, () => {
|
|
9
9
|
const {
|
|
10
10
|
states
|
|
11
11
|
} = useTheme().components.stepper.step;
|