@redis-ui/components 43.0.2 → 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/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/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/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/index.cjs +4 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +74 -70
- package/package.json +2 -2
- 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 +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/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
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const jsxRuntime = require("../node_modules/react/jsx-runtime.cjs");
|
|
4
|
+
const redisUiStyles = require("@redislabsdev/redis-ui-styles");
|
|
5
|
+
const HighlightedIcon_style = require("./HighlightedIcon.style.cjs");
|
|
6
|
+
const HighlightedIcon = ({
|
|
7
|
+
icon: IconComponent,
|
|
8
|
+
size = "M",
|
|
9
|
+
type = "primary",
|
|
10
|
+
...restProps
|
|
11
|
+
}) => {
|
|
12
|
+
const theme = redisUiStyles.useTheme();
|
|
13
|
+
const iconSize = theme.core.icon.size[size];
|
|
14
|
+
return jsxRuntime.jsxRuntimeExports.jsx(HighlightedIcon_style.HighlightedIconContainer, {
|
|
15
|
+
"$size": size,
|
|
16
|
+
"$type": type,
|
|
17
|
+
...restProps,
|
|
18
|
+
children: jsxRuntime.jsxRuntimeExports.jsx(IconComponent, {
|
|
19
|
+
customColor: "currentColor",
|
|
20
|
+
customSize: iconSize,
|
|
21
|
+
"aria-hidden": true
|
|
22
|
+
})
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
const HighlightedIcon$1 = HighlightedIcon;
|
|
26
|
+
exports.default = HighlightedIcon$1;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { j as jsxRuntimeExports } from "../node_modules/react/jsx-runtime.js";
|
|
2
|
+
import { useTheme } from "@redislabsdev/redis-ui-styles";
|
|
3
|
+
import { HighlightedIconContainer } from "./HighlightedIcon.style.js";
|
|
4
|
+
const HighlightedIcon = ({
|
|
5
|
+
icon: IconComponent,
|
|
6
|
+
size = "M",
|
|
7
|
+
type = "primary",
|
|
8
|
+
...restProps
|
|
9
|
+
}) => {
|
|
10
|
+
const theme = useTheme();
|
|
11
|
+
const iconSize = theme.core.icon.size[size];
|
|
12
|
+
return jsxRuntimeExports.jsx(HighlightedIconContainer, {
|
|
13
|
+
"$size": size,
|
|
14
|
+
"$type": type,
|
|
15
|
+
...restProps,
|
|
16
|
+
children: jsxRuntimeExports.jsx(IconComponent, {
|
|
17
|
+
customColor: "currentColor",
|
|
18
|
+
customSize: iconSize,
|
|
19
|
+
"aria-hidden": true
|
|
20
|
+
})
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
const HighlightedIcon$1 = HighlightedIcon;
|
|
24
|
+
export {
|
|
25
|
+
HighlightedIcon$1 as default
|
|
26
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const _styled = require("styled-components");
|
|
4
|
+
const redisUiStyles = require("@redislabsdev/redis-ui-styles");
|
|
5
|
+
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
6
|
+
const _styled__default = /* @__PURE__ */ _interopDefault(_styled);
|
|
7
|
+
const SIZE_MAP = {
|
|
8
|
+
XS: {
|
|
9
|
+
size: "1.6rem",
|
|
10
|
+
borderRadius: "0.3rem"
|
|
11
|
+
},
|
|
12
|
+
S: {
|
|
13
|
+
size: "2rem",
|
|
14
|
+
borderRadius: "0.3rem"
|
|
15
|
+
},
|
|
16
|
+
M: {
|
|
17
|
+
size: "2.4rem",
|
|
18
|
+
borderRadius: "0.5rem"
|
|
19
|
+
},
|
|
20
|
+
L: {
|
|
21
|
+
size: "3.2rem",
|
|
22
|
+
borderRadius: "0.5rem"
|
|
23
|
+
},
|
|
24
|
+
XL: {
|
|
25
|
+
size: "4rem",
|
|
26
|
+
borderRadius: "0.8rem"
|
|
27
|
+
},
|
|
28
|
+
XXL: {
|
|
29
|
+
size: "4.4rem",
|
|
30
|
+
borderRadius: "0.8rem"
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
const getColors = (type) => {
|
|
34
|
+
const theme = redisUiStyles.useTheme();
|
|
35
|
+
return theme.components.highlightedIcon.variants[type];
|
|
36
|
+
};
|
|
37
|
+
const HighlightedIconContainer = _styled__default.default.div.withConfig({
|
|
38
|
+
displayName: "HighlightedIconstyle__HighlightedIconContainer",
|
|
39
|
+
componentId: "RedisUI__sc-o2gs2e-0"
|
|
40
|
+
})(["display:inline-flex;align-items:center;justify-content:center;width:", ";aspect-ratio:1;background-color:", ";color:", ";border-radius:", ";flex-shrink:0;"], ({
|
|
41
|
+
$size
|
|
42
|
+
}) => SIZE_MAP[$size].size, ({
|
|
43
|
+
$type
|
|
44
|
+
}) => getColors($type).background, ({
|
|
45
|
+
$type
|
|
46
|
+
}) => getColors($type).text, ({
|
|
47
|
+
$size
|
|
48
|
+
}) => SIZE_MAP[$size].borderRadius);
|
|
49
|
+
exports.HighlightedIconContainer = HighlightedIconContainer;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import _styled from "styled-components";
|
|
2
|
+
import { useTheme } from "@redislabsdev/redis-ui-styles";
|
|
3
|
+
const SIZE_MAP = {
|
|
4
|
+
XS: {
|
|
5
|
+
size: "1.6rem",
|
|
6
|
+
borderRadius: "0.3rem"
|
|
7
|
+
},
|
|
8
|
+
S: {
|
|
9
|
+
size: "2rem",
|
|
10
|
+
borderRadius: "0.3rem"
|
|
11
|
+
},
|
|
12
|
+
M: {
|
|
13
|
+
size: "2.4rem",
|
|
14
|
+
borderRadius: "0.5rem"
|
|
15
|
+
},
|
|
16
|
+
L: {
|
|
17
|
+
size: "3.2rem",
|
|
18
|
+
borderRadius: "0.5rem"
|
|
19
|
+
},
|
|
20
|
+
XL: {
|
|
21
|
+
size: "4rem",
|
|
22
|
+
borderRadius: "0.8rem"
|
|
23
|
+
},
|
|
24
|
+
XXL: {
|
|
25
|
+
size: "4.4rem",
|
|
26
|
+
borderRadius: "0.8rem"
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
const getColors = (type) => {
|
|
30
|
+
const theme = useTheme();
|
|
31
|
+
return theme.components.highlightedIcon.variants[type];
|
|
32
|
+
};
|
|
33
|
+
const HighlightedIconContainer = _styled.div.withConfig({
|
|
34
|
+
displayName: "HighlightedIconstyle__HighlightedIconContainer",
|
|
35
|
+
componentId: "RedisUI__sc-o2gs2e-0"
|
|
36
|
+
})(["display:inline-flex;align-items:center;justify-content:center;width:", ";aspect-ratio:1;background-color:", ";color:", ";border-radius:", ";flex-shrink:0;"], ({
|
|
37
|
+
$size
|
|
38
|
+
}) => SIZE_MAP[$size].size, ({
|
|
39
|
+
$type
|
|
40
|
+
}) => getColors($type).background, ({
|
|
41
|
+
$type
|
|
42
|
+
}) => getColors($type).text, ({
|
|
43
|
+
$size
|
|
44
|
+
}) => SIZE_MAP[$size].borderRadius);
|
|
45
|
+
export {
|
|
46
|
+
HighlightedIconContainer
|
|
47
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
import { IconType as IconComponent } from '@redislabsdev/redis-ui-icons';
|
|
3
|
+
import { HighlightedIconType, IconSizeType } from '@redislabsdev/redis-ui-styles';
|
|
4
|
+
export interface HighlightedIconProps extends HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
icon: IconComponent;
|
|
6
|
+
size?: IconSizeType;
|
|
7
|
+
type?: HighlightedIconType;
|
|
8
|
+
}
|
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
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const jsxRuntime = require("../../../../../node_modules/react/jsx-runtime.cjs");
|
|
4
|
+
const Separator_style = require("./Separator.style.cjs");
|
|
5
|
+
const Separator = ({
|
|
6
|
+
state,
|
|
7
|
+
...restProps
|
|
8
|
+
}) => {
|
|
9
|
+
return jsxRuntime.jsxRuntimeExports.jsx(Separator_style.Separator, {
|
|
10
|
+
...restProps,
|
|
11
|
+
"data-state": state,
|
|
12
|
+
"aria-hidden": true
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
exports.default = Separator;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { j as jsxRuntimeExports } from "../../../../../node_modules/react/jsx-runtime.js";
|
|
2
|
+
import { Separator as Separator$1 } from "./Separator.style.js";
|
|
3
|
+
const Separator = ({
|
|
4
|
+
state,
|
|
5
|
+
...restProps
|
|
6
|
+
}) => {
|
|
7
|
+
return jsxRuntimeExports.jsx(Separator$1, {
|
|
8
|
+
...restProps,
|
|
9
|
+
"data-state": state,
|
|
10
|
+
"aria-hidden": true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
Separator as default
|
|
15
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const _styled = require("styled-components");
|
|
4
|
+
const redisUiStyles = require("@redislabsdev/redis-ui-styles");
|
|
5
|
+
const Step_types = require("../../Step.types.cjs");
|
|
6
|
+
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
7
|
+
const _styled__default = /* @__PURE__ */ _interopDefault(_styled);
|
|
8
|
+
const Separator = _styled__default.default.div.withConfig({
|
|
9
|
+
displayName: "Separatorstyle__Separator",
|
|
10
|
+
componentId: "RedisUI__sc-89iwun-0"
|
|
11
|
+
})(["width:1.6rem;height:", ";transition:background-color 0.3s ease;", ""], () => redisUiStyles.useTheme().components.stepper.step.separator.height, () => {
|
|
12
|
+
const {
|
|
13
|
+
states
|
|
14
|
+
} = redisUiStyles.useTheme().components.stepper.step;
|
|
15
|
+
return Object.values(Step_types.StepperStepState).map((state) => {
|
|
16
|
+
const theme = states[state].separator;
|
|
17
|
+
return _styled.css`
|
|
18
|
+
&[data-state='${state}'] {
|
|
19
|
+
background-color: ${theme.bgColor};
|
|
20
|
+
}
|
|
21
|
+
`;
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
exports.Separator = Separator;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Separator: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import _styled, { css } from "styled-components";
|
|
2
|
+
import { useTheme } from "@redislabsdev/redis-ui-styles";
|
|
3
|
+
import { StepperStepState } from "../../Step.types.js";
|
|
4
|
+
const Separator = _styled.div.withConfig({
|
|
5
|
+
displayName: "Separatorstyle__Separator",
|
|
6
|
+
componentId: "RedisUI__sc-89iwun-0"
|
|
7
|
+
})(["width:1.6rem;height:", ";transition:background-color 0.3s ease;", ""], () => useTheme().components.stepper.step.separator.height, () => {
|
|
8
|
+
const {
|
|
9
|
+
states
|
|
10
|
+
} = useTheme().components.stepper.step;
|
|
11
|
+
return Object.values(StepperStepState).map((state) => {
|
|
12
|
+
const theme = states[state].separator;
|
|
13
|
+
return css`
|
|
14
|
+
&[data-state='${state}'] {
|
|
15
|
+
background-color: ${theme.bgColor};
|
|
16
|
+
}
|
|
17
|
+
`;
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
export {
|
|
21
|
+
Separator
|
|
22
|
+
};
|
package/dist/index.cjs
CHANGED
|
@@ -1134,6 +1134,8 @@ const SelfContained = require("./Helpers/SelfContained.cjs");
|
|
|
1134
1134
|
const RestylableElement = require("./Helpers/RestylableElement.cjs");
|
|
1135
1135
|
const Popper_context = require("./Helpers/contexts/Popper/Popper.context.cjs");
|
|
1136
1136
|
const useScrollable = require("./Helpers/hooks/useScrollable.cjs");
|
|
1137
|
+
const HighlightedIcon = require("./HighlightedIcon/HighlightedIcon.cjs");
|
|
1138
|
+
const HighlightedIcon_style = require("./HighlightedIcon/HighlightedIcon.style.cjs");
|
|
1137
1139
|
const Input = require("./Inputs/Input/Input.cjs");
|
|
1138
1140
|
const NumericInput = require("./Inputs/NumericInput/NumericInput.cjs");
|
|
1139
1141
|
const PasswordInput = require("./Inputs/PasswordInput/PasswordInput.cjs");
|
|
@@ -1257,6 +1259,8 @@ exports.RestylableElement = RestylableElement.RestylableElement;
|
|
|
1257
1259
|
exports.PopperProvider = Popper_context.PopperProvider;
|
|
1258
1260
|
exports.usePopperContext = Popper_context.usePopperContext;
|
|
1259
1261
|
exports.useScrollable = useScrollable.useScrollable;
|
|
1262
|
+
exports.HighlightedIcon = HighlightedIcon.default;
|
|
1263
|
+
exports.HighlightedIconStyles = HighlightedIcon_style;
|
|
1260
1264
|
exports.Input = Input.default;
|
|
1261
1265
|
exports.NumericInput = NumericInput.default;
|
|
1262
1266
|
exports.PasswordInput = PasswordInput.default;
|
package/dist/index.d.ts
CHANGED