@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
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const badgeVariants = ["white", "light", "default", "informative", "success", "notice", "danger", "attention", "disabled"];
|
|
3
|
+
const badgeVariants = ["white", "light", "default", "informative", "success", "notice", "danger", "attention", "upsell", "disabled"];
|
|
4
4
|
exports.badgeVariants = badgeVariants;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IconType } from '@redislabsdev/redis-ui-icons';
|
|
2
2
|
import { Theme } from '@redislabsdev/redis-ui-styles';
|
|
3
|
-
export declare const badgeVariants: readonly ["white", "light", "default", "informative", "success", "notice", "danger", "attention", "disabled"];
|
|
3
|
+
export declare const badgeVariants: readonly ["white", "light", "default", "informative", "success", "notice", "danger", "attention", "upsell", "disabled"];
|
|
4
4
|
export type BadgeVariants = (typeof badgeVariants)[number];
|
|
5
5
|
export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
6
6
|
label: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const badgeVariants = ["white", "light", "default", "informative", "success", "notice", "danger", "attention", "disabled"];
|
|
1
|
+
const badgeVariants = ["white", "light", "default", "informative", "success", "notice", "danger", "attention", "upsell", "disabled"];
|
|
2
2
|
export {
|
|
3
3
|
badgeVariants
|
|
4
4
|
};
|
package/dist/Badge/BadgeIcon.cjs
CHANGED
|
@@ -11,6 +11,7 @@ const BADGE_ICON_RECORD = {
|
|
|
11
11
|
notice: redisUiIcons.ToastNotificationIcon,
|
|
12
12
|
danger: redisUiIcons.ToastDangerIcon,
|
|
13
13
|
attention: redisUiIcons.ToastPendingIcon,
|
|
14
|
+
upsell: redisUiIcons.CrownIcon,
|
|
14
15
|
disabled: redisUiIcons.ToastCheckIcon
|
|
15
16
|
};
|
|
16
17
|
const BadgeIcon = ({
|
package/dist/Badge/BadgeIcon.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { j as jsxRuntimeExports } from "../node_modules/react/jsx-runtime.js";
|
|
2
|
-
import { ToastCheckIcon, ToastInfoIcon, ToastNotificationIcon, ToastDangerIcon, ToastPendingIcon } from "@redislabsdev/redis-ui-icons";
|
|
2
|
+
import { ToastCheckIcon, ToastInfoIcon, ToastNotificationIcon, ToastDangerIcon, ToastPendingIcon, CrownIcon } from "@redislabsdev/redis-ui-icons";
|
|
3
3
|
const BADGE_ICON_RECORD = {
|
|
4
4
|
white: ToastCheckIcon,
|
|
5
5
|
light: ToastCheckIcon,
|
|
@@ -9,6 +9,7 @@ const BADGE_ICON_RECORD = {
|
|
|
9
9
|
notice: ToastNotificationIcon,
|
|
10
10
|
danger: ToastDangerIcon,
|
|
11
11
|
attention: ToastPendingIcon,
|
|
12
|
+
upsell: CrownIcon,
|
|
12
13
|
disabled: ToastCheckIcon
|
|
13
14
|
};
|
|
14
15
|
const BadgeIcon = ({
|
|
@@ -59,7 +59,7 @@ const getStateStyle = (theme, isChecked = false) => {
|
|
|
59
59
|
const BoxSelectionGroupItemCompose = _styled__default.default(index.Root).withConfig({
|
|
60
60
|
displayName: "Composestyle__BoxSelectionGroupItemCompose",
|
|
61
61
|
componentId: "RedisUI__sc-17mo3lu-1"
|
|
62
|
-
})(["align-items:unset;justify-content:center;line-height:1.25;text-align:unset;position:relative;padding-inline:0;padding-block:0;flex:1;white-space:nowrap;cursor:", ";overflow:hidden;transition:all 0.1s;border-radius:", ";border-width:", ";border-style:", ";", ";", ";"], ({
|
|
62
|
+
})(["align-items:unset;justify-content:center;line-height:1.25;text-align:unset;position:relative;padding-inline:0;padding-block:0;flex:1;white-space:nowrap;cursor:", ";overflow:hidden;transition:all 0.1s;@media (prefers-reduced-motion:reduce){transition:none;}border-radius:", ";border-width:", ";border-style:", ";", ";", ";"], ({
|
|
63
63
|
disabled
|
|
64
64
|
}) => !disabled ? "pointer" : "not-allowed", () => redisUiStyles.useTheme().components.boxSelectionGroup.item.borderRadius, () => redisUiStyles.useTheme().components.boxSelectionGroup.item.borderWidth, () => redisUiStyles.useTheme().components.boxSelectionGroup.item.borderStyle, ({
|
|
65
65
|
pressed
|
|
@@ -55,7 +55,7 @@ const getStateStyle = (theme, isChecked = false) => {
|
|
|
55
55
|
const BoxSelectionGroupItemCompose = _styled(Root).withConfig({
|
|
56
56
|
displayName: "Composestyle__BoxSelectionGroupItemCompose",
|
|
57
57
|
componentId: "RedisUI__sc-17mo3lu-1"
|
|
58
|
-
})(["align-items:unset;justify-content:center;line-height:1.25;text-align:unset;position:relative;padding-inline:0;padding-block:0;flex:1;white-space:nowrap;cursor:", ";overflow:hidden;transition:all 0.1s;border-radius:", ";border-width:", ";border-style:", ";", ";", ";"], ({
|
|
58
|
+
})(["align-items:unset;justify-content:center;line-height:1.25;text-align:unset;position:relative;padding-inline:0;padding-block:0;flex:1;white-space:nowrap;cursor:", ";overflow:hidden;transition:all 0.1s;@media (prefers-reduced-motion:reduce){transition:none;}border-radius:", ";border-width:", ";border-style:", ";", ";", ";"], ({
|
|
59
59
|
disabled
|
|
60
60
|
}) => !disabled ? "pointer" : "not-allowed", () => useTheme().components.boxSelectionGroup.item.borderRadius, () => useTheme().components.boxSelectionGroup.item.borderWidth, () => useTheme().components.boxSelectionGroup.item.borderStyle, ({
|
|
61
61
|
pressed
|
|
@@ -18,6 +18,10 @@ const baseButtonStyle = _styled.css`
|
|
|
18
18
|
transition: all 130ms ease-in-out, outline-offset 0ms, outline 0ms;
|
|
19
19
|
cursor: pointer;
|
|
20
20
|
|
|
21
|
+
@media (prefers-reduced-motion: reduce) {
|
|
22
|
+
transition: none;
|
|
23
|
+
}
|
|
24
|
+
|
|
21
25
|
${redisUiStyles.getFocusStyle()};
|
|
22
26
|
|
|
23
27
|
&:disabled {
|
|
@@ -9,7 +9,7 @@ const _styled__default = /* @__PURE__ */ _interopDefault(_styled);
|
|
|
9
9
|
const Button = _styled__default.default.button.withConfig({
|
|
10
10
|
displayName: "Buttonstyle__Button",
|
|
11
11
|
componentId: "RedisUI__sc-m6kucg-0"
|
|
12
|
-
})(["cursor:pointer;border:none;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;line-height:1.25;max-width:100%;min-width:", ";text-align:center;text-decoration:none;transition:color 0.13s ease-in-out,background-color 0.13s ease-in-out,border-color 0.13s ease-in-out,box-shadow 0.13s ease-in-out;user-select:none;vertical-align:middle;white-space:nowrap;display:flex;border-radius:", ";padding:", ";justify-content:center;align-items:center;gap:", ";&:not(:last-child){border-inline-end:", ";}&:disabled{cursor:not-allowed;}", " ", ";"], () => redisUiStyles.useTheme().components.buttonGroup.button.minWidth, () => redisUiStyles.useTheme().components.buttonGroup.button.borderRadius, () => redisUiStyles.useTheme().components.buttonGroup.button.padding, () => redisUiStyles.useTheme().components.buttonGroup.button.gap, () => redisUiStyles.useTheme().components.buttonGroup.button.border, ({
|
|
12
|
+
})(["cursor:pointer;border:none;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;line-height:1.25;max-width:100%;min-width:", ";text-align:center;text-decoration:none;transition:color 0.13s ease-in-out,background-color 0.13s ease-in-out,border-color 0.13s ease-in-out,box-shadow 0.13s ease-in-out;@media (prefers-reduced-motion:reduce){transition:none;}user-select:none;vertical-align:middle;white-space:nowrap;display:flex;border-radius:", ";padding:", ";justify-content:center;align-items:center;gap:", ";&:not(:last-child){border-inline-end:", ";}&:disabled{cursor:not-allowed;}", " ", ";"], () => redisUiStyles.useTheme().components.buttonGroup.button.minWidth, () => redisUiStyles.useTheme().components.buttonGroup.button.borderRadius, () => redisUiStyles.useTheme().components.buttonGroup.button.padding, () => redisUiStyles.useTheme().components.buttonGroup.button.gap, () => redisUiStyles.useTheme().components.buttonGroup.button.border, ({
|
|
13
13
|
isSelected
|
|
14
14
|
}) => Button_style_utils.getButtonStatesStyle(redisUiStyles.useTheme().components.buttonGroup.button.toggleStates[isSelected ? "on" : "off"], [css_utils.tokenMaps.bgColor, css_utils.tokenMaps.textColor]), redisUiStyles.getFocusStyle("-2px"));
|
|
15
15
|
exports.Button = Button;
|
|
@@ -5,7 +5,7 @@ import { tokenMaps } from "../../../Helpers/css.utils.js";
|
|
|
5
5
|
const Button = _styled.button.withConfig({
|
|
6
6
|
displayName: "Buttonstyle__Button",
|
|
7
7
|
componentId: "RedisUI__sc-m6kucg-0"
|
|
8
|
-
})(["cursor:pointer;border:none;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;line-height:1.25;max-width:100%;min-width:", ";text-align:center;text-decoration:none;transition:color 0.13s ease-in-out,background-color 0.13s ease-in-out,border-color 0.13s ease-in-out,box-shadow 0.13s ease-in-out;user-select:none;vertical-align:middle;white-space:nowrap;display:flex;border-radius:", ";padding:", ";justify-content:center;align-items:center;gap:", ";&:not(:last-child){border-inline-end:", ";}&:disabled{cursor:not-allowed;}", " ", ";"], () => useTheme().components.buttonGroup.button.minWidth, () => useTheme().components.buttonGroup.button.borderRadius, () => useTheme().components.buttonGroup.button.padding, () => useTheme().components.buttonGroup.button.gap, () => useTheme().components.buttonGroup.button.border, ({
|
|
8
|
+
})(["cursor:pointer;border:none;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;line-height:1.25;max-width:100%;min-width:", ";text-align:center;text-decoration:none;transition:color 0.13s ease-in-out,background-color 0.13s ease-in-out,border-color 0.13s ease-in-out,box-shadow 0.13s ease-in-out;@media (prefers-reduced-motion:reduce){transition:none;}user-select:none;vertical-align:middle;white-space:nowrap;display:flex;border-radius:", ";padding:", ";justify-content:center;align-items:center;gap:", ";&:not(:last-child){border-inline-end:", ";}&:disabled{cursor:not-allowed;}", " ", ";"], () => useTheme().components.buttonGroup.button.minWidth, () => useTheme().components.buttonGroup.button.borderRadius, () => useTheme().components.buttonGroup.button.padding, () => useTheme().components.buttonGroup.button.gap, () => useTheme().components.buttonGroup.button.border, ({
|
|
9
9
|
isSelected
|
|
10
10
|
}) => getButtonStatesStyle(useTheme().components.buttonGroup.button.toggleStates[isSelected ? "on" : "off"], [tokenMaps.bgColor, tokenMaps.textColor]), getFocusStyle("-2px"));
|
|
11
11
|
export {
|
package/dist/Drawer/Drawer.cjs
CHANGED
|
@@ -4,6 +4,7 @@ const jsxRuntime = require("../node_modules/react/jsx-runtime.cjs");
|
|
|
4
4
|
const index = require("../node_modules/@radix-ui/react-dialog/dist/index.cjs");
|
|
5
5
|
const redisUiStyles = require("@redislabsdev/redis-ui-styles");
|
|
6
6
|
const Drawer_context = require("./Drawer.context.cjs");
|
|
7
|
+
const useReducedMotionLifecycleSync = require("./hooks/useReducedMotionLifecycleSync.cjs");
|
|
7
8
|
const Overlay = require("./components/Overlay/Overlay.cjs");
|
|
8
9
|
const Content = require("./components/Content/Content.cjs");
|
|
9
10
|
const Header = require("./components/Header/Header.cjs");
|
|
@@ -24,6 +25,15 @@ const Drawer = Object.assign(({
|
|
|
24
25
|
...props
|
|
25
26
|
}) => {
|
|
26
27
|
const theme = redisUiStyles.useTheme();
|
|
28
|
+
const {
|
|
29
|
+
prefersReducedMotion
|
|
30
|
+
} = useReducedMotionLifecycleSync.useReducedMotionLifecycleSync({
|
|
31
|
+
open,
|
|
32
|
+
onDrawerWillOpen,
|
|
33
|
+
onDrawerDidOpen,
|
|
34
|
+
onDrawerWillClose,
|
|
35
|
+
onDrawerDidClose
|
|
36
|
+
});
|
|
27
37
|
const handleOnAnimationStart = () => {
|
|
28
38
|
if (open) {
|
|
29
39
|
onDrawerWillOpen == null ? void 0 : onDrawerWillOpen();
|
|
@@ -52,8 +62,8 @@ const Drawer = Object.assign(({
|
|
|
52
62
|
children: jsxRuntime.jsxRuntimeExports.jsxs(index.Portal, {
|
|
53
63
|
container: containerElement,
|
|
54
64
|
children: [persistent && jsxRuntime.jsxRuntimeExports.jsx(Overlay.default, {}), jsxRuntime.jsxRuntimeExports.jsx(Content.default, {
|
|
55
|
-
onAnimationStart: handleOnAnimationStart,
|
|
56
|
-
onAnimationEndCapture: handleOnAnimationEnd,
|
|
65
|
+
onAnimationStart: prefersReducedMotion ? void 0 : handleOnAnimationStart,
|
|
66
|
+
onAnimationEndCapture: prefersReducedMotion ? void 0 : handleOnAnimationEnd,
|
|
57
67
|
...props,
|
|
58
68
|
children
|
|
59
69
|
})]
|
package/dist/Drawer/Drawer.js
CHANGED
|
@@ -2,6 +2,7 @@ import { j as jsxRuntimeExports } from "../node_modules/react/jsx-runtime.js";
|
|
|
2
2
|
import { Root, Portal } from "../node_modules/@radix-ui/react-dialog/dist/index.js";
|
|
3
3
|
import { useTheme } from "@redislabsdev/redis-ui-styles";
|
|
4
4
|
import { DrawerContext } from "./Drawer.context.js";
|
|
5
|
+
import { useReducedMotionLifecycleSync } from "./hooks/useReducedMotionLifecycleSync.js";
|
|
5
6
|
import Overlay from "./components/Overlay/Overlay.js";
|
|
6
7
|
import Content from "./components/Content/Content.js";
|
|
7
8
|
import Header from "./components/Header/Header.js";
|
|
@@ -22,6 +23,15 @@ const Drawer = Object.assign(({
|
|
|
22
23
|
...props
|
|
23
24
|
}) => {
|
|
24
25
|
const theme = useTheme();
|
|
26
|
+
const {
|
|
27
|
+
prefersReducedMotion
|
|
28
|
+
} = useReducedMotionLifecycleSync({
|
|
29
|
+
open,
|
|
30
|
+
onDrawerWillOpen,
|
|
31
|
+
onDrawerDidOpen,
|
|
32
|
+
onDrawerWillClose,
|
|
33
|
+
onDrawerDidClose
|
|
34
|
+
});
|
|
25
35
|
const handleOnAnimationStart = () => {
|
|
26
36
|
if (open) {
|
|
27
37
|
onDrawerWillOpen == null ? void 0 : onDrawerWillOpen();
|
|
@@ -50,8 +60,8 @@ const Drawer = Object.assign(({
|
|
|
50
60
|
children: jsxRuntimeExports.jsxs(Portal, {
|
|
51
61
|
container: containerElement,
|
|
52
62
|
children: [persistent && jsxRuntimeExports.jsx(Overlay, {}), jsxRuntimeExports.jsx(Content, {
|
|
53
|
-
onAnimationStart: handleOnAnimationStart,
|
|
54
|
-
onAnimationEndCapture: handleOnAnimationEnd,
|
|
63
|
+
onAnimationStart: prefersReducedMotion ? void 0 : handleOnAnimationStart,
|
|
64
|
+
onAnimationEndCapture: prefersReducedMotion ? void 0 : handleOnAnimationEnd,
|
|
55
65
|
...props,
|
|
56
66
|
children
|
|
57
67
|
})]
|
|
@@ -20,7 +20,7 @@ const slideOut = _styled.keyframes`
|
|
|
20
20
|
const DrawerContent = _styled__default.default(index.Content).withConfig({
|
|
21
21
|
displayName: "Contentstyle__DrawerContent",
|
|
22
22
|
componentId: "RedisUI__sc-19kw0pf-1"
|
|
23
|
-
})(["pointer-events:all;display:flex;z-index:", ";flex-direction:column;background-color:", ";box-shadow:", ";position:", ";top:0;bottom:0;right:0;width:", ";&[data-state='open']{animation:", " 200ms ease-in-out;}&[data-state='closed']{animation:", " 200ms ease-in-out;}"], ({
|
|
23
|
+
})(["pointer-events:all;display:flex;z-index:", ";flex-direction:column;background-color:", ";box-shadow:", ";position:", ";top:0;bottom:0;right:0;width:", ";&[data-state='open']{animation:", " 200ms ease-in-out;}&[data-state='closed']{animation:", " 200ms ease-in-out;}@media (prefers-reduced-motion:reduce){&[data-state='open'],&[data-state='closed']{animation:none;}}"], ({
|
|
24
24
|
$zIndex
|
|
25
25
|
}) => $zIndex, () => redisUiStyles.useTheme().components.drawer.bgColor, () => redisUiStyles.useTheme().components.drawer.shadow, ({
|
|
26
26
|
$isRenderedInsideContainer
|
|
@@ -16,7 +16,7 @@ const slideOut = keyframes`
|
|
|
16
16
|
const DrawerContent = _styled(Content).withConfig({
|
|
17
17
|
displayName: "Contentstyle__DrawerContent",
|
|
18
18
|
componentId: "RedisUI__sc-19kw0pf-1"
|
|
19
|
-
})(["pointer-events:all;display:flex;z-index:", ";flex-direction:column;background-color:", ";box-shadow:", ";position:", ";top:0;bottom:0;right:0;width:", ";&[data-state='open']{animation:", " 200ms ease-in-out;}&[data-state='closed']{animation:", " 200ms ease-in-out;}"], ({
|
|
19
|
+
})(["pointer-events:all;display:flex;z-index:", ";flex-direction:column;background-color:", ";box-shadow:", ";position:", ";top:0;bottom:0;right:0;width:", ";&[data-state='open']{animation:", " 200ms ease-in-out;}&[data-state='closed']{animation:", " 200ms ease-in-out;}@media (prefers-reduced-motion:reduce){&[data-state='open'],&[data-state='closed']{animation:none;}}"], ({
|
|
20
20
|
$zIndex
|
|
21
21
|
}) => $zIndex, () => useTheme().components.drawer.bgColor, () => useTheme().components.drawer.shadow, ({
|
|
22
22
|
$isRenderedInsideContainer
|
|
@@ -15,7 +15,7 @@ const fadeOut = _styled.keyframes`
|
|
|
15
15
|
const DrawerOverlay = _styled__default.default.div.withConfig({
|
|
16
16
|
displayName: "Overlaystyle__DrawerOverlay",
|
|
17
17
|
componentId: "RedisUI__sc-1afbvm0-0"
|
|
18
|
-
})(["z-index:", ";position:absolute;top:0;right:0;bottom:0;left:0;background-color:", ";&[data-state='open']{animation:", " 150ms cubic-bezier(0.22,1,0.36,1);}&[data-state='closed']{animation:", " 150ms cubic-bezier(0.22,1,0.36,1);}"], ({
|
|
18
|
+
})(["z-index:", ";position:absolute;top:0;right:0;bottom:0;left:0;background-color:", ";&[data-state='open']{animation:", " 150ms cubic-bezier(0.22,1,0.36,1);}&[data-state='closed']{animation:", " 150ms cubic-bezier(0.22,1,0.36,1);}@media (prefers-reduced-motion:reduce){&[data-state='open'],&[data-state='closed']{animation:none;}}"], ({
|
|
19
19
|
$zIndex
|
|
20
20
|
}) => $zIndex - 1, () => redisUiStyles.useTheme().components.drawer.overlay.bgColor, fadeIn, fadeOut);
|
|
21
21
|
exports.DrawerOverlay = DrawerOverlay;
|
|
@@ -11,7 +11,7 @@ const fadeOut = keyframes`
|
|
|
11
11
|
const DrawerOverlay = _styled.div.withConfig({
|
|
12
12
|
displayName: "Overlaystyle__DrawerOverlay",
|
|
13
13
|
componentId: "RedisUI__sc-1afbvm0-0"
|
|
14
|
-
})(["z-index:", ";position:absolute;top:0;right:0;bottom:0;left:0;background-color:", ";&[data-state='open']{animation:", " 150ms cubic-bezier(0.22,1,0.36,1);}&[data-state='closed']{animation:", " 150ms cubic-bezier(0.22,1,0.36,1);}"], ({
|
|
14
|
+
})(["z-index:", ";position:absolute;top:0;right:0;bottom:0;left:0;background-color:", ";&[data-state='open']{animation:", " 150ms cubic-bezier(0.22,1,0.36,1);}&[data-state='closed']{animation:", " 150ms cubic-bezier(0.22,1,0.36,1);}@media (prefers-reduced-motion:reduce){&[data-state='open'],&[data-state='closed']{animation:none;}}"], ({
|
|
15
15
|
$zIndex
|
|
16
16
|
}) => $zIndex - 1, () => useTheme().components.drawer.overlay.bgColor, fadeIn, fadeOut);
|
|
17
17
|
export {
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const React = require("react");
|
|
4
|
+
const redisUiStyles = require("@redislabsdev/redis-ui-styles");
|
|
5
|
+
const useReducedMotionLifecycleSync = ({
|
|
6
|
+
open,
|
|
7
|
+
onDrawerWillOpen,
|
|
8
|
+
onDrawerDidOpen,
|
|
9
|
+
onDrawerWillClose,
|
|
10
|
+
onDrawerDidClose
|
|
11
|
+
}) => {
|
|
12
|
+
const prefersReducedMotion = redisUiStyles.usePrefersReducedMotion();
|
|
13
|
+
const isInitialRender = React.useRef(true);
|
|
14
|
+
React.useEffect(() => {
|
|
15
|
+
if (isInitialRender.current) {
|
|
16
|
+
isInitialRender.current = false;
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
let rafId;
|
|
20
|
+
if (prefersReducedMotion) {
|
|
21
|
+
rafId = requestAnimationFrame(() => {
|
|
22
|
+
if (open) {
|
|
23
|
+
onDrawerWillOpen == null ? void 0 : onDrawerWillOpen();
|
|
24
|
+
onDrawerDidOpen == null ? void 0 : onDrawerDidOpen();
|
|
25
|
+
} else {
|
|
26
|
+
onDrawerWillClose == null ? void 0 : onDrawerWillClose();
|
|
27
|
+
onDrawerDidClose == null ? void 0 : onDrawerDidClose();
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
return () => {
|
|
32
|
+
if (rafId !== void 0) {
|
|
33
|
+
cancelAnimationFrame(rafId);
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
}, [open, prefersReducedMotion, onDrawerWillOpen, onDrawerDidOpen, onDrawerWillClose, onDrawerDidClose]);
|
|
37
|
+
return {
|
|
38
|
+
prefersReducedMotion
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
exports.useReducedMotionLifecycleSync = useReducedMotionLifecycleSync;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
interface UseReducedMotionLifecycleSyncOptions {
|
|
2
|
+
open: boolean;
|
|
3
|
+
onDrawerWillOpen?: () => void;
|
|
4
|
+
onDrawerDidOpen?: () => void;
|
|
5
|
+
onDrawerWillClose?: () => void;
|
|
6
|
+
onDrawerDidClose?: () => void;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* When reduced motion is enabled, CSS animations are disabled and animation events won't fire.
|
|
10
|
+
* This hook ensures lifecycle callbacks are still invoked immediately when the open state changes.
|
|
11
|
+
*/
|
|
12
|
+
export declare const useReducedMotionLifecycleSync: ({ open, onDrawerWillOpen, onDrawerDidOpen, onDrawerWillClose, onDrawerDidClose }: UseReducedMotionLifecycleSyncOptions) => {
|
|
13
|
+
prefersReducedMotion: boolean;
|
|
14
|
+
};
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { useRef, useEffect } from "react";
|
|
2
|
+
import { usePrefersReducedMotion } from "@redislabsdev/redis-ui-styles";
|
|
3
|
+
const useReducedMotionLifecycleSync = ({
|
|
4
|
+
open,
|
|
5
|
+
onDrawerWillOpen,
|
|
6
|
+
onDrawerDidOpen,
|
|
7
|
+
onDrawerWillClose,
|
|
8
|
+
onDrawerDidClose
|
|
9
|
+
}) => {
|
|
10
|
+
const prefersReducedMotion = usePrefersReducedMotion();
|
|
11
|
+
const isInitialRender = useRef(true);
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
if (isInitialRender.current) {
|
|
14
|
+
isInitialRender.current = false;
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
let rafId;
|
|
18
|
+
if (prefersReducedMotion) {
|
|
19
|
+
rafId = requestAnimationFrame(() => {
|
|
20
|
+
if (open) {
|
|
21
|
+
onDrawerWillOpen == null ? void 0 : onDrawerWillOpen();
|
|
22
|
+
onDrawerDidOpen == null ? void 0 : onDrawerDidOpen();
|
|
23
|
+
} else {
|
|
24
|
+
onDrawerWillClose == null ? void 0 : onDrawerWillClose();
|
|
25
|
+
onDrawerDidClose == null ? void 0 : onDrawerDidClose();
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
return () => {
|
|
30
|
+
if (rafId !== void 0) {
|
|
31
|
+
cancelAnimationFrame(rafId);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
}, [open, prefersReducedMotion, onDrawerWillOpen, onDrawerDidOpen, onDrawerWillClose, onDrawerDidClose]);
|
|
35
|
+
return {
|
|
36
|
+
prefersReducedMotion
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
export {
|
|
40
|
+
useReducedMotionLifecycleSync
|
|
41
|
+
};
|
|
@@ -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
|
+
variant = "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
|
+
"$variant": variant,
|
|
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
|
+
variant = "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
|
+
"$variant": variant,
|
|
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 = (variant) => {
|
|
34
|
+
const theme = redisUiStyles.useTheme();
|
|
35
|
+
return theme.components.highlightedIcon.variants[variant];
|
|
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
|
+
$variant
|
|
44
|
+
}) => getColors($variant).background, ({
|
|
45
|
+
$variant
|
|
46
|
+
}) => getColors($variant).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 = (variant) => {
|
|
30
|
+
const theme = useTheme();
|
|
31
|
+
return theme.components.highlightedIcon.variants[variant];
|
|
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
|
+
$variant
|
|
40
|
+
}) => getColors($variant).background, ({
|
|
41
|
+
$variant
|
|
42
|
+
}) => getColors($variant).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 { HighlightedIconVariant, IconSizeType } from '@redislabsdev/redis-ui-styles';
|
|
4
|
+
export interface HighlightedIconProps extends HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
icon: IconComponent;
|
|
6
|
+
size?: IconSizeType;
|
|
7
|
+
variant?: HighlightedIconVariant;
|
|
8
|
+
}
|
|
@@ -68,7 +68,7 @@ const CommonInputCompose = _styled__default.default.div.attrs(() => ({
|
|
|
68
68
|
})).withConfig({
|
|
69
69
|
displayName: "Composestyle__CommonInputCompose",
|
|
70
70
|
componentId: "RedisUI__sc-1vsempl-0"
|
|
71
|
-
})(["display:flex;align-items:center;box-sizing:border-box;transition:border-color 0.2s ease-in;", ";", ";&{", ";}&&&{", ";}"], () => {
|
|
71
|
+
})(["display:flex;align-items:center;box-sizing:border-box;transition:border-color 0.2s ease-in;@media (prefers-reduced-motion:reduce){transition:none;}", ";", ";&{", ";}&&&{", ";}"], () => {
|
|
72
72
|
const style = redisUiStyles.useTheme().components.input;
|
|
73
73
|
return _styled.css`
|
|
74
74
|
height: ${style.height};
|
|
@@ -64,7 +64,7 @@ const CommonInputCompose = _styled.div.attrs(() => ({
|
|
|
64
64
|
})).withConfig({
|
|
65
65
|
displayName: "Composestyle__CommonInputCompose",
|
|
66
66
|
componentId: "RedisUI__sc-1vsempl-0"
|
|
67
|
-
})(["display:flex;align-items:center;box-sizing:border-box;transition:border-color 0.2s ease-in;", ";", ";&{", ";}&&&{", ";}"], () => {
|
|
67
|
+
})(["display:flex;align-items:center;box-sizing:border-box;transition:border-color 0.2s ease-in;@media (prefers-reduced-motion:reduce){transition:none;}", ";", ";&{", ";}&&&{", ";}"], () => {
|
|
68
68
|
const style = useTheme().components.input;
|
|
69
69
|
return css`
|
|
70
70
|
height: ${style.height};
|
package/dist/Loader/Loader.cjs
CHANGED
|
@@ -5,7 +5,7 @@ const redisUiStyles = require("@redislabsdev/redis-ui-styles");
|
|
|
5
5
|
const index = require("../node_modules/@radix-ui/react-visually-hidden/dist/index.cjs");
|
|
6
6
|
const Loader_style = require("./Loader.style.cjs");
|
|
7
7
|
const Loader = ({
|
|
8
|
-
size,
|
|
8
|
+
size = "XL",
|
|
9
9
|
inline = false,
|
|
10
10
|
dataTestId,
|
|
11
11
|
loaderText,
|
|
@@ -24,7 +24,7 @@ const Loader = ({
|
|
|
24
24
|
children: [jsxRuntime.jsxRuntimeExports.jsx(Loader_style.LoaderSVG, {
|
|
25
25
|
"$variant": variant,
|
|
26
26
|
title,
|
|
27
|
-
customSize:
|
|
27
|
+
customSize: theme.sizes[size],
|
|
28
28
|
"data-testid": dataTestId,
|
|
29
29
|
"aria-hidden": true
|
|
30
30
|
}), loaderText ? jsxRuntime.jsxRuntimeExports.jsx(Loader_style.MessageText, {
|
package/dist/Loader/Loader.js
CHANGED
|
@@ -3,7 +3,7 @@ import { useTheme } from "@redislabsdev/redis-ui-styles";
|
|
|
3
3
|
import { VisuallyHidden } from "../node_modules/@radix-ui/react-visually-hidden/dist/index.js";
|
|
4
4
|
import { Container, InnerFlexContainer, LoaderSVG, MessageText } from "./Loader.style.js";
|
|
5
5
|
const Loader = ({
|
|
6
|
-
size,
|
|
6
|
+
size = "XL",
|
|
7
7
|
inline = false,
|
|
8
8
|
dataTestId,
|
|
9
9
|
loaderText,
|
|
@@ -22,7 +22,7 @@ const Loader = ({
|
|
|
22
22
|
children: [jsxRuntimeExports.jsx(LoaderSVG, {
|
|
23
23
|
"$variant": variant,
|
|
24
24
|
title,
|
|
25
|
-
customSize:
|
|
25
|
+
customSize: theme.sizes[size],
|
|
26
26
|
"data-testid": dataTestId,
|
|
27
27
|
"aria-hidden": true
|
|
28
28
|
}), loaderText ? jsxRuntimeExports.jsx(MessageText, {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import type { LoaderSize } from '@redislabsdev/redis-ui-styles';
|
|
1
2
|
export type LoaderVariants = 'regular' | 'pending' | 'inverse';
|
|
2
3
|
export interface LoaderProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
-
size?:
|
|
4
|
+
size?: LoaderSize;
|
|
4
5
|
inline?: boolean;
|
|
5
6
|
loaderText?: string;
|
|
6
7
|
/**
|
package/dist/Loader/index.d.ts
CHANGED
|
@@ -7,5 +7,5 @@ const _styled__default = /* @__PURE__ */ _interopDefault(_styled);
|
|
|
7
7
|
const ArrowDownIconWrapper = _styled__default.default(redisUiIcons.ChevronDownIcon).withConfig({
|
|
8
8
|
displayName: "Arrowstyle__ArrowDownIconWrapper",
|
|
9
9
|
componentId: "RedisUI__sc-mwk54p-0"
|
|
10
|
-
})(["[data-state='open'] &{rotate:180deg;}[data-state='closed'] &{rotate:0deg;}transition:rotate 0.5s;"]);
|
|
10
|
+
})(["[data-state='open'] &{rotate:180deg;}[data-state='closed'] &{rotate:0deg;}transition:rotate 0.5s;@media (prefers-reduced-motion:reduce){transition:none;}"]);
|
|
11
11
|
exports.ArrowDownIconWrapper = ArrowDownIconWrapper;
|
|
@@ -3,7 +3,7 @@ import { ChevronDownIcon } from "@redislabsdev/redis-ui-icons";
|
|
|
3
3
|
const ArrowDownIconWrapper = _styled(ChevronDownIcon).withConfig({
|
|
4
4
|
displayName: "Arrowstyle__ArrowDownIconWrapper",
|
|
5
5
|
componentId: "RedisUI__sc-mwk54p-0"
|
|
6
|
-
})(["[data-state='open'] &{rotate:180deg;}[data-state='closed'] &{rotate:0deg;}transition:rotate 0.5s;"]);
|
|
6
|
+
})(["[data-state='open'] &{rotate:180deg;}[data-state='closed'] &{rotate:0deg;}transition:rotate 0.5s;@media (prefers-reduced-motion:reduce){transition:none;}"]);
|
|
7
7
|
export {
|
|
8
8
|
ArrowDownIconWrapper
|
|
9
9
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { IconType } from '@redislabsdev/redis-ui-icons';
|
|
2
|
+
import { WindowBarVariant } from '@redislabsdev/redis-ui-styles';
|
|
2
3
|
import { WindowBarComposeProps } from './components/Compose/Compose.types';
|
|
3
|
-
import { BadgeProps
|
|
4
|
+
import { BadgeProps } from '../../../../../Badge';
|
|
4
5
|
export interface WindowBarProps extends WindowBarComposeProps, Pick<BadgeProps, 'icon'> {
|
|
5
6
|
title?: string;
|
|
6
|
-
variant?:
|
|
7
|
+
variant?: WindowBarVariant;
|
|
7
8
|
hideCloseButton?: boolean;
|
|
8
9
|
withIcon?: boolean;
|
|
9
10
|
icon?: IconType;
|
package/dist/Popover/components/Content/components/WindowBar/components/Compose/Compose.style.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { Theme } from '@redislabsdev/redis-ui-styles';
|
|
1
|
+
import { Theme, WindowBarVariant } from '@redislabsdev/redis-ui-styles';
|
|
2
2
|
import { WindowBarComposeProps } from './Compose.types';
|
|
3
|
-
|
|
4
|
-
export declare const getVariantStyle: (theme: Theme, variant: BadgeVariants) => import("@redislabsdev/redis-ui-styles").WindowBarVariantStyle;
|
|
3
|
+
export declare const getVariantStyle: (theme: Theme, variant: WindowBarVariant) => import("@redislabsdev/redis-ui-styles").WindowBarVariantStyle;
|
|
5
4
|
export declare const Container: import("styled-components").StyledComponent<"div", any, WindowBarComposeProps, never>;
|