@redis-ui/components 42.7.0 → 43.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AutoCompleteSelect/AutoCompleteSelect.cjs +7 -1
- package/dist/AutoCompleteSelect/AutoCompleteSelect.js +7 -1
- package/dist/AutoCompleteSelect/hooks/useAutoCompleteSelect.cjs +7 -1
- package/dist/AutoCompleteSelect/hooks/useAutoCompleteSelect.d.ts +8 -1
- package/dist/AutoCompleteSelect/hooks/useAutoCompleteSelect.js +7 -1
- package/dist/BoxSelectionGroup/components/Item/components/BoxStateIndicator/BoxStateIndicator.cjs +8 -4
- package/dist/BoxSelectionGroup/components/Item/components/BoxStateIndicator/BoxStateIndicator.js +8 -4
- package/dist/BoxSelectionGroup/components/Item/components/Compose/Compose.style.cjs +18 -4
- package/dist/BoxSelectionGroup/components/Item/components/Compose/Compose.style.js +18 -4
- package/dist/BoxSelectionGroup/hooks/useBoxSelectionGroup.cjs +3 -1
- package/dist/BoxSelectionGroup/hooks/useBoxSelectionGroup.js +3 -1
- package/dist/Breadcrumbs/Breadcrumbs.cjs +51 -0
- package/dist/Breadcrumbs/Breadcrumbs.d.ts +10 -0
- package/dist/Breadcrumbs/Breadcrumbs.js +51 -0
- package/dist/Breadcrumbs/Breadcrumbs.types.d.ts +17 -0
- package/dist/Breadcrumbs/components/Compose/Compose.cjs +14 -0
- package/dist/Breadcrumbs/components/Compose/Compose.d.ts +3 -0
- package/dist/Breadcrumbs/components/Compose/Compose.js +14 -0
- package/dist/Breadcrumbs/components/Compose/Compose.style.cjs +10 -0
- package/dist/Breadcrumbs/components/Compose/Compose.style.d.ts +1 -0
- package/dist/Breadcrumbs/components/Compose/Compose.style.js +8 -0
- package/dist/Breadcrumbs/components/Compose/Compose.types.d.ts +5 -0
- package/dist/Breadcrumbs/components/Current/Current.cjs +13 -0
- package/dist/Breadcrumbs/components/Current/Current.d.ts +3 -0
- package/dist/Breadcrumbs/components/Current/Current.js +13 -0
- package/dist/Breadcrumbs/components/Current/Current.style.cjs +11 -0
- package/dist/Breadcrumbs/components/Current/Current.style.d.ts +1 -0
- package/dist/Breadcrumbs/components/Current/Current.style.js +9 -0
- package/dist/Breadcrumbs/components/Current/Current.types.d.ts +4 -0
- package/dist/Breadcrumbs/components/Item/Item.cjs +12 -0
- package/dist/Breadcrumbs/components/Item/Item.d.ts +3 -0
- package/dist/Breadcrumbs/components/Item/Item.js +12 -0
- package/dist/Breadcrumbs/components/Item/Item.style.cjs +11 -0
- package/dist/Breadcrumbs/components/Item/Item.style.d.ts +1 -0
- package/dist/Breadcrumbs/components/Item/Item.style.js +9 -0
- package/dist/Breadcrumbs/components/Item/Item.types.d.ts +2 -0
- package/dist/Breadcrumbs/components/Link/Link.cjs +52 -0
- package/dist/Breadcrumbs/components/Link/Link.d.ts +3 -0
- package/dist/Breadcrumbs/components/Link/Link.js +52 -0
- package/dist/Breadcrumbs/components/Link/Link.style.cjs +13 -0
- package/dist/Breadcrumbs/components/Link/Link.style.d.ts +1 -0
- package/dist/Breadcrumbs/components/Link/Link.style.js +11 -0
- package/dist/Breadcrumbs/components/Link/Link.types.d.ts +5 -0
- package/dist/Breadcrumbs/components/List/List.cjs +12 -0
- package/dist/Breadcrumbs/components/List/List.d.ts +3 -0
- package/dist/Breadcrumbs/components/List/List.js +12 -0
- package/dist/Breadcrumbs/components/List/List.style.cjs +11 -0
- package/dist/Breadcrumbs/components/List/List.style.d.ts +1 -0
- package/dist/Breadcrumbs/components/List/List.style.js +9 -0
- package/dist/Breadcrumbs/components/List/List.types.d.ts +2 -0
- package/dist/Breadcrumbs/components/Separator/Separator.cjs +13 -0
- package/dist/Breadcrumbs/components/Separator/Separator.d.ts +3 -0
- package/dist/Breadcrumbs/components/Separator/Separator.js +13 -0
- package/dist/Breadcrumbs/components/Separator/Separator.style.cjs +11 -0
- package/dist/Breadcrumbs/components/Separator/Separator.style.d.ts +1 -0
- package/dist/Breadcrumbs/components/Separator/Separator.style.js +9 -0
- package/dist/Breadcrumbs/components/Separator/Separator.types.d.ts +4 -0
- package/dist/Breadcrumbs/index.d.ts +5 -0
- package/dist/Button/Button.style.cjs +4 -1
- package/dist/Button/Button.style.js +4 -1
- package/dist/Button/Button.style.utils.cjs +16 -1
- package/dist/Button/Button.style.utils.js +16 -1
- package/dist/Button/Button.types.cjs +1 -1
- package/dist/Button/Button.types.d.ts +1 -1
- package/dist/Button/Button.types.js +1 -1
- package/dist/Button/CopyToClipboardButton/CopyToClipboardButton.cjs +59 -0
- package/dist/Button/CopyToClipboardButton/CopyToClipboardButton.d.ts +4 -0
- package/dist/Button/CopyToClipboardButton/CopyToClipboardButton.js +57 -0
- package/dist/Button/CopyToClipboardButton/CopyToClipboardButton.style.cjs +40 -0
- package/dist/Button/CopyToClipboardButton/CopyToClipboardButton.style.d.ts +8 -0
- package/dist/Button/CopyToClipboardButton/CopyToClipboardButton.style.js +38 -0
- package/dist/Button/CopyToClipboardButton/CopyToClipboardButton.types.d.ts +5 -0
- package/dist/Button/TextButton/TextButton.style.cjs +4 -1
- package/dist/Button/TextButton/TextButton.style.js +4 -1
- package/dist/Button/TextButton/TextButton.types.cjs +1 -1
- package/dist/Button/TextButton/TextButton.types.d.ts +1 -1
- package/dist/Button/TextButton/TextButton.types.js +1 -1
- package/dist/Button/index.d.ts +2 -0
- package/dist/Checkbox/components/Label/Label.style.cjs +15 -3
- package/dist/Checkbox/components/Label/Label.style.js +15 -3
- package/dist/Chip/components/CloseButton/CloseButton.cjs +3 -1
- package/dist/Chip/components/CloseButton/CloseButton.js +3 -1
- package/dist/Chip/components/Compose/Compose.style.cjs +4 -1
- package/dist/Chip/components/Compose/Compose.style.js +4 -1
- package/dist/Drawer/components/Description/Description.cjs +3 -1
- package/dist/Drawer/components/Description/Description.js +3 -1
- package/dist/Helpers/contexts/Popper/PopperCollisionBoundaryManager.cjs +3 -1
- package/dist/Helpers/contexts/Popper/PopperCollisionBoundaryManager.js +3 -1
- package/dist/Helpers/contexts/PrimitiveContextState.cjs +28 -16
- package/dist/Helpers/contexts/PrimitiveContextState.js +28 -16
- package/dist/Helpers/contexts/SharedId.context.cjs +9 -5
- package/dist/Helpers/contexts/SharedId.context.js +9 -5
- package/dist/Helpers/css.utils.cjs +18 -4
- package/dist/Helpers/css.utils.d.ts +15 -3
- package/dist/Helpers/css.utils.js +18 -4
- package/dist/Helpers/hooks/useScrollable.cjs +3 -1
- package/dist/Helpers/hooks/useScrollable.js +3 -1
- package/dist/Helpers/react.utils.cjs +6 -2
- package/dist/Helpers/react.utils.js +6 -2
- package/dist/Inputs/QuantityCounter/components/InputGroup/components/ValueLabel/ValueLabel.cjs +9 -5
- package/dist/Inputs/QuantityCounter/components/InputGroup/components/ValueLabel/ValueLabel.js +9 -5
- package/dist/Inputs/components/Compose/Compose.style.cjs +29 -6
- package/dist/Inputs/components/Compose/Compose.style.js +29 -6
- package/dist/Inputs/hooks/numericInput/numericInput.utils.cjs +12 -4
- package/dist/Inputs/hooks/numericInput/numericInput.utils.js +12 -4
- package/dist/Inputs/hooks/numericInput/useNumericInput.cjs +15 -3
- package/dist/Inputs/hooks/numericInput/useNumericInput.js +15 -3
- package/dist/Loader/Loader.cjs +1 -0
- package/dist/Loader/Loader.js +1 -0
- package/dist/Menu/components/Content/components/Item/Components/Compose/Compose.style.cjs +19 -4
- package/dist/Menu/components/Content/components/Item/Components/Compose/Compose.style.js +19 -4
- package/dist/Menu/components/Content/components/Label/components/Compose/Compose.style.cjs +4 -1
- package/dist/Menu/components/Content/components/Label/components/Compose/Compose.style.js +4 -1
- package/dist/Modal/components/Content/components/Compose/Compose.cjs +3 -1
- package/dist/Modal/components/Content/components/Compose/Compose.js +3 -1
- package/dist/Modal/components/Content/components/Description/Description.cjs +3 -1
- package/dist/Modal/components/Content/components/Description/Description.js +3 -1
- package/dist/MultiSelect/components/Compose/hooks/useMultiSelectContextApi.cjs +3 -1
- package/dist/MultiSelect/components/Compose/hooks/useMultiSelectContextApi.js +3 -1
- package/dist/MultiSelect/components/Trigger/components/MultiValue/MultiValue.cjs +3 -1
- package/dist/MultiSelect/components/Trigger/components/MultiValue/MultiValue.js +3 -1
- package/dist/Overflow/Overflow.cjs +3 -1
- package/dist/Overflow/Overflow.js +3 -1
- package/dist/Overflow/Overflow.utils.cjs +15 -6
- package/dist/Overflow/Overflow.utils.js +15 -6
- package/dist/Overflow/components/OverflowContainer/OverflowContainer.cjs +3 -1
- package/dist/Overflow/components/OverflowContainer/OverflowContainer.js +3 -1
- package/dist/Pagination/components/PageSizeSelect.cjs +3 -1
- package/dist/Pagination/components/PageSizeSelect.js +3 -1
- package/dist/Popover/components/Content/Content.cjs +3 -1
- package/dist/Popover/components/Content/Content.js +3 -1
- package/dist/Popover/components/Content/components/Footer/Footer.cjs +3 -1
- package/dist/Popover/components/Content/components/Footer/Footer.js +3 -1
- package/dist/RadioGroup/components/Item/components/Label/Label.style.cjs +15 -3
- package/dist/RadioGroup/components/Item/components/Label/Label.style.js +15 -3
- package/dist/ScreenReaderAnnounce/ScreenReaderAnnounce.cjs +3 -1
- package/dist/ScreenReaderAnnounce/ScreenReaderAnnounce.js +3 -1
- package/dist/Section/components/Header/components/CollapseButton/CollapseButton.cjs +3 -1
- package/dist/Section/components/Header/components/CollapseButton/CollapseButton.js +3 -1
- package/dist/Select/components/Content/components/Option/components/Compose/Compose.style.cjs +16 -4
- package/dist/Select/components/Content/components/Option/components/Compose/Compose.style.js +16 -4
- package/dist/Select/components/Content/components/OptionList/OptionList.cjs +6 -4
- package/dist/Select/components/Content/components/OptionList/OptionList.js +6 -4
- package/dist/Select/components/Content/components/OptionList/Virtual.cjs +9 -5
- package/dist/Select/components/Content/components/OptionList/Virtual.js +9 -5
- package/dist/Select/components/Context/hooks/useSearch.cjs +3 -1
- package/dist/Select/components/Context/hooks/useSearch.js +3 -1
- package/dist/Select/components/Trigger/components/Compose/Compose.style.cjs +33 -7
- package/dist/Select/components/Trigger/components/Compose/Compose.style.js +33 -7
- package/dist/SideBar/components/Item/Item.style.cjs +14 -3
- package/dist/SideBar/components/Item/Item.style.js +14 -3
- package/dist/Skeleton/components/Circle/Circle.cjs +1 -1
- package/dist/Skeleton/components/Circle/Circle.js +1 -1
- package/dist/Skeleton/components/Square/Square.cjs +1 -1
- package/dist/Skeleton/components/Square/Square.js +1 -1
- package/dist/Slider/components/Label/Compose/Compose.cjs +3 -1
- package/dist/Slider/components/Label/Compose/Compose.js +3 -1
- package/dist/Slider/components/Mark/Compose/Compose.cjs +3 -1
- package/dist/Slider/components/Mark/Compose/Compose.js +3 -1
- package/dist/Slider/hooks/useOffset.cjs +3 -1
- package/dist/Slider/hooks/useOffset.js +3 -1
- package/dist/Stepper/components/Step/components/Compose/Compose.cjs +3 -1
- package/dist/Stepper/components/Step/components/Compose/Compose.js +3 -1
- package/dist/Stepper/hooks/useStepperInteractive.cjs +12 -4
- package/dist/Stepper/hooks/useStepperInteractive.js +12 -4
- package/dist/Switch/components/Switcher/Switcher.cjs +3 -1
- package/dist/Switch/components/Switcher/Switcher.js +3 -1
- package/dist/Switch/components/Switcher/Switcher.style.cjs +31 -8
- package/dist/Switch/components/Switcher/Switcher.style.js +31 -8
- package/dist/Tabs/components/TabBar/components/Trigger/components/Marker/Marker.style.cjs +24 -5
- package/dist/Tabs/components/TabBar/components/Trigger/components/Marker/Marker.style.js +24 -5
- package/dist/Tabs/components/TabBar/components/Trigger/components/Tab/Tab.style.cjs +24 -5
- package/dist/Tabs/components/TabBar/components/Trigger/components/Tab/Tab.style.js +24 -5
- package/dist/ThemeModeSwitch/useThemeModeSwitch.cjs +6 -2
- package/dist/ThemeModeSwitch/useThemeModeSwitch.js +6 -2
- package/dist/Toast/core/content.helper.cjs +8 -4
- package/dist/Toast/core/content.helper.js +8 -4
- package/dist/Tooltip/components/Content/Content.cjs +3 -1
- package/dist/Tooltip/components/Content/Content.js +3 -1
- package/dist/TreeView/TreeView.cjs +3 -1
- package/dist/TreeView/TreeView.js +3 -1
- package/dist/TreeView/components/TreeItem/components/Compose/Compose.cjs +6 -4
- package/dist/TreeView/components/TreeItem/components/Compose/Compose.js +6 -4
- package/dist/Typography/Typography.types.cjs +4 -0
- package/dist/Typography/Typography.types.d.ts +2 -1
- package/dist/Typography/Typography.types.js +4 -0
- package/dist/index.cjs +6 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +110 -104
- package/package.json +10 -9
- package/skills/redis-ui-components/SKILL.md +128 -0
- package/skills/redis-ui-components/references/Button.md +169 -0
- package/skills/redis-ui-components/references/FlexDivider.md +152 -0
- package/skills/redis-ui-components/references/FlexGroup.md +149 -0
- package/skills/redis-ui-components/references/FlexItem.md +58 -0
- package/skills/redis-ui-components/references/FlexSplit.md +37 -0
- package/skills/redis-ui-components/references/Select.md +517 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { j as jsxRuntimeExports } from "../../../node_modules/react/jsx-runtime.js";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { BreadcrumbsLink } from "./Link.style.js";
|
|
4
|
+
const getFalse = () => false;
|
|
5
|
+
const Link = forwardRef(({
|
|
6
|
+
children,
|
|
7
|
+
href,
|
|
8
|
+
onClick,
|
|
9
|
+
disabled,
|
|
10
|
+
...restProps
|
|
11
|
+
}, ref) => {
|
|
12
|
+
const commonProps = {
|
|
13
|
+
ref,
|
|
14
|
+
tabIndex: disabled ? -1 : 0
|
|
15
|
+
};
|
|
16
|
+
const hrefProps = {
|
|
17
|
+
...href ? {
|
|
18
|
+
href
|
|
19
|
+
} : null,
|
|
20
|
+
...onClick ? {
|
|
21
|
+
role: href ? void 0 : "button",
|
|
22
|
+
onClick,
|
|
23
|
+
onKeyDown: (e) => {
|
|
24
|
+
var _a;
|
|
25
|
+
if (e.key === "Enter") {
|
|
26
|
+
e.preventDefault();
|
|
27
|
+
e.stopPropagation();
|
|
28
|
+
(_a = e.currentTarget) == null ? void 0 : _a.click();
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
} : null
|
|
32
|
+
};
|
|
33
|
+
const disabledProps = disabled ? {
|
|
34
|
+
disabled: true,
|
|
35
|
+
tabIndex: -1,
|
|
36
|
+
href: void 0,
|
|
37
|
+
onClick: getFalse,
|
|
38
|
+
onKeyDown: getFalse,
|
|
39
|
+
"aria-disabled": true
|
|
40
|
+
} : null;
|
|
41
|
+
return jsxRuntimeExports.jsx(BreadcrumbsLink, {
|
|
42
|
+
...commonProps,
|
|
43
|
+
...hrefProps,
|
|
44
|
+
...restProps,
|
|
45
|
+
...disabledProps,
|
|
46
|
+
children
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
Link.displayName = "Breadcrumbs.Link";
|
|
50
|
+
export {
|
|
51
|
+
Link as default
|
|
52
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
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 Button_style_utils = require("../../../Button/Button.style.utils.cjs");
|
|
6
|
+
const css_utils = require("../../../Helpers/css.utils.cjs");
|
|
7
|
+
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
8
|
+
const _styled__default = /* @__PURE__ */ _interopDefault(_styled);
|
|
9
|
+
const BreadcrumbsLink = _styled__default.default.a.withConfig({
|
|
10
|
+
displayName: "Linkstyle__BreadcrumbsLink",
|
|
11
|
+
componentId: "RedisUI__sc-19droq4-0"
|
|
12
|
+
})(["text-decoration:none;font-family:", ";font-size:", ";font-weight:inherit;cursor:pointer;", ";&:hover{text-decoration:underline;}&[aria-disabled='true']{cursor:not-allowed;text-decoration:none;}", ""], () => redisUiStyles.useTheme().components.typography.body.fontFamily, () => redisUiStyles.useTheme().components.typography.body.fontSizes.M, () => Button_style_utils.getButtonStatesStyle(redisUiStyles.useTheme().components.breadcrumbs.link.states, [css_utils.tokenMaps.textColor]), redisUiStyles.getFocusStyle());
|
|
13
|
+
exports.BreadcrumbsLink = BreadcrumbsLink;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const BreadcrumbsLink: import("styled-components").StyledComponent<"a", any, import("styled-components").ThemeProps<import("@redislabsdev/redis-ui-styles").Theme>, never>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import _styled from "styled-components";
|
|
2
|
+
import { useTheme, getFocusStyle } from "@redislabsdev/redis-ui-styles";
|
|
3
|
+
import { getButtonStatesStyle } from "../../../Button/Button.style.utils.js";
|
|
4
|
+
import { tokenMaps } from "../../../Helpers/css.utils.js";
|
|
5
|
+
const BreadcrumbsLink = _styled.a.withConfig({
|
|
6
|
+
displayName: "Linkstyle__BreadcrumbsLink",
|
|
7
|
+
componentId: "RedisUI__sc-19droq4-0"
|
|
8
|
+
})(["text-decoration:none;font-family:", ";font-size:", ";font-weight:inherit;cursor:pointer;", ";&:hover{text-decoration:underline;}&[aria-disabled='true']{cursor:not-allowed;text-decoration:none;}", ""], () => useTheme().components.typography.body.fontFamily, () => useTheme().components.typography.body.fontSizes.M, () => getButtonStatesStyle(useTheme().components.breadcrumbs.link.states, [tokenMaps.textColor]), getFocusStyle());
|
|
9
|
+
export {
|
|
10
|
+
BreadcrumbsLink
|
|
11
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
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 List_style = require("./List.style.cjs");
|
|
5
|
+
const List = ({
|
|
6
|
+
children,
|
|
7
|
+
...restProps
|
|
8
|
+
}) => jsxRuntime.jsxRuntimeExports.jsx(List_style.BreadcrumbsList, {
|
|
9
|
+
...restProps,
|
|
10
|
+
children
|
|
11
|
+
});
|
|
12
|
+
exports.default = List;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { j as jsxRuntimeExports } from "../../../node_modules/react/jsx-runtime.js";
|
|
2
|
+
import { BreadcrumbsList } from "./List.style.js";
|
|
3
|
+
const List = ({
|
|
4
|
+
children,
|
|
5
|
+
...restProps
|
|
6
|
+
}) => jsxRuntimeExports.jsx(BreadcrumbsList, {
|
|
7
|
+
...restProps,
|
|
8
|
+
children
|
|
9
|
+
});
|
|
10
|
+
export {
|
|
11
|
+
List as default
|
|
12
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
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 BreadcrumbsList = _styled__default.default.ol.withConfig({
|
|
8
|
+
displayName: "Liststyle__BreadcrumbsList",
|
|
9
|
+
componentId: "RedisUI__sc-11wutho-0"
|
|
10
|
+
})(["display:flex;align-items:center;list-style:none;margin:0;padding:0;gap:", ";"], () => redisUiStyles.useTheme().components.breadcrumbs.gap);
|
|
11
|
+
exports.BreadcrumbsList = BreadcrumbsList;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const BreadcrumbsList: import("styled-components").StyledComponent<"ol", any, {}, never>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import _styled from "styled-components";
|
|
2
|
+
import { useTheme } from "@redislabsdev/redis-ui-styles";
|
|
3
|
+
const BreadcrumbsList = _styled.ol.withConfig({
|
|
4
|
+
displayName: "Liststyle__BreadcrumbsList",
|
|
5
|
+
componentId: "RedisUI__sc-11wutho-0"
|
|
6
|
+
})(["display:flex;align-items:center;list-style:none;margin:0;padding:0;gap:", ";"], () => useTheme().components.breadcrumbs.gap);
|
|
7
|
+
export {
|
|
8
|
+
BreadcrumbsList
|
|
9
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
children = "/",
|
|
7
|
+
...restProps
|
|
8
|
+
}) => jsxRuntime.jsxRuntimeExports.jsx(Separator_style.BreadcrumbsSeparator, {
|
|
9
|
+
"aria-hidden": "true",
|
|
10
|
+
...restProps,
|
|
11
|
+
children
|
|
12
|
+
});
|
|
13
|
+
exports.default = Separator;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { j as jsxRuntimeExports } from "../../../node_modules/react/jsx-runtime.js";
|
|
2
|
+
import { BreadcrumbsSeparator } from "./Separator.style.js";
|
|
3
|
+
const Separator = ({
|
|
4
|
+
children = "/",
|
|
5
|
+
...restProps
|
|
6
|
+
}) => jsxRuntimeExports.jsx(BreadcrumbsSeparator, {
|
|
7
|
+
"aria-hidden": "true",
|
|
8
|
+
...restProps,
|
|
9
|
+
children
|
|
10
|
+
});
|
|
11
|
+
export {
|
|
12
|
+
Separator as default
|
|
13
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
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 BreadcrumbsSeparator = _styled__default.default.span.withConfig({
|
|
8
|
+
displayName: "Separatorstyle__BreadcrumbsSeparator",
|
|
9
|
+
componentId: "RedisUI__sc-1ltx191-0"
|
|
10
|
+
})(["display:flex;align-items:center;color:", ";font-family:", ";font-size:", ";user-select:none;"], () => redisUiStyles.useTheme().components.breadcrumbs.separator.textColor, () => redisUiStyles.useTheme().components.typography.body.fontFamily, () => redisUiStyles.useTheme().components.typography.body.fontSizes.M);
|
|
11
|
+
exports.BreadcrumbsSeparator = BreadcrumbsSeparator;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const BreadcrumbsSeparator: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import _styled from "styled-components";
|
|
2
|
+
import { useTheme } from "@redislabsdev/redis-ui-styles";
|
|
3
|
+
const BreadcrumbsSeparator = _styled.span.withConfig({
|
|
4
|
+
displayName: "Separatorstyle__BreadcrumbsSeparator",
|
|
5
|
+
componentId: "RedisUI__sc-1ltx191-0"
|
|
6
|
+
})(["display:flex;align-items:center;color:", ";font-family:", ";font-size:", ";user-select:none;"], () => useTheme().components.breadcrumbs.separator.textColor, () => useTheme().components.typography.body.fontFamily, () => useTheme().components.typography.body.fontSizes.M);
|
|
7
|
+
export {
|
|
8
|
+
BreadcrumbsSeparator
|
|
9
|
+
};
|
|
@@ -31,7 +31,10 @@ const Button = _styled__default.default.button.withConfig({
|
|
|
31
31
|
componentId: "RedisUI__sc-6zckac-0"
|
|
32
32
|
})(["", ";gap:", ";", ";", ";", ";"], baseButtonStyle, () => redisUiStyles.useTheme().components.button.gap, ({
|
|
33
33
|
size
|
|
34
|
-
}) => css_utils.styleFromTokens(
|
|
34
|
+
}) => css_utils.styleFromTokens({
|
|
35
|
+
tokenMaps: sizeTokenMaps,
|
|
36
|
+
tokens: redisUiStyles.useTheme().components.button.sizes[size]
|
|
37
|
+
}), ({
|
|
35
38
|
size
|
|
36
39
|
}) => Body_style.useBodyStyles(size === "small" ? {
|
|
37
40
|
$size: "S"
|
|
@@ -27,7 +27,10 @@ const Button = _styled.button.withConfig({
|
|
|
27
27
|
componentId: "RedisUI__sc-6zckac-0"
|
|
28
28
|
})(["", ";gap:", ";", ";", ";", ";"], baseButtonStyle, () => useTheme().components.button.gap, ({
|
|
29
29
|
size
|
|
30
|
-
}) => styleFromTokens(
|
|
30
|
+
}) => styleFromTokens({
|
|
31
|
+
tokenMaps: sizeTokenMaps,
|
|
32
|
+
tokens: useTheme().components.button.sizes[size]
|
|
33
|
+
}), ({
|
|
31
34
|
size
|
|
32
35
|
}) => useBodyStyles(size === "small" ? {
|
|
33
36
|
$size: "S"
|
|
@@ -6,7 +6,22 @@ const bgColorMap = css_utils.tokenMaps.bgColor;
|
|
|
6
6
|
const textColorMap = css_utils.tokenMaps.textColor;
|
|
7
7
|
const shadowBorderMap = css_utils.tokenMaps.shadowBorder;
|
|
8
8
|
const borderColorMap = css_utils.tokenMaps.borderColor;
|
|
9
|
-
const getButtonStatesStyle = (theme, maps) => theme ? _styled.css(["&{", "}&:hover{", "}&:active{", "}&[disabled],&:disabled{", "}"], css_utils.styleFromTokens(
|
|
9
|
+
const getButtonStatesStyle = (theme, maps) => theme ? _styled.css(["&{", "}&:hover{", "}&:active{", "}&[disabled],&:disabled{", "}"], css_utils.styleFromTokens({
|
|
10
|
+
tokenMaps: maps,
|
|
11
|
+
tokens: theme.normal
|
|
12
|
+
}), css_utils.styleFromTokens({
|
|
13
|
+
tokenMaps: maps,
|
|
14
|
+
tokens: theme.hover,
|
|
15
|
+
fallbackTokens: theme.normal
|
|
16
|
+
}), css_utils.styleFromTokens({
|
|
17
|
+
tokenMaps: maps,
|
|
18
|
+
tokens: theme.active,
|
|
19
|
+
fallbackTokens: theme.normal
|
|
20
|
+
}), css_utils.styleFromTokens({
|
|
21
|
+
tokenMaps: maps,
|
|
22
|
+
tokens: theme.disabled,
|
|
23
|
+
fallbackTokens: theme.normal
|
|
24
|
+
})) : null;
|
|
10
25
|
exports.bgColorMap = bgColorMap;
|
|
11
26
|
exports.borderColorMap = borderColorMap;
|
|
12
27
|
exports.getButtonStatesStyle = getButtonStatesStyle;
|
|
@@ -4,7 +4,22 @@ const bgColorMap = tokenMaps.bgColor;
|
|
|
4
4
|
const textColorMap = tokenMaps.textColor;
|
|
5
5
|
const shadowBorderMap = tokenMaps.shadowBorder;
|
|
6
6
|
const borderColorMap = tokenMaps.borderColor;
|
|
7
|
-
const getButtonStatesStyle = (theme, maps) => theme ? css(["&{", "}&:hover{", "}&:active{", "}&[disabled],&:disabled{", "}"], styleFromTokens(
|
|
7
|
+
const getButtonStatesStyle = (theme, maps) => theme ? css(["&{", "}&:hover{", "}&:active{", "}&[disabled],&:disabled{", "}"], styleFromTokens({
|
|
8
|
+
tokenMaps: maps,
|
|
9
|
+
tokens: theme.normal
|
|
10
|
+
}), styleFromTokens({
|
|
11
|
+
tokenMaps: maps,
|
|
12
|
+
tokens: theme.hover,
|
|
13
|
+
fallbackTokens: theme.normal
|
|
14
|
+
}), styleFromTokens({
|
|
15
|
+
tokenMaps: maps,
|
|
16
|
+
tokens: theme.active,
|
|
17
|
+
fallbackTokens: theme.normal
|
|
18
|
+
}), styleFromTokens({
|
|
19
|
+
tokenMaps: maps,
|
|
20
|
+
tokens: theme.disabled,
|
|
21
|
+
fallbackTokens: theme.normal
|
|
22
|
+
})) : null;
|
|
8
23
|
export {
|
|
9
24
|
bgColorMap,
|
|
10
25
|
borderColorMap,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const buttonSizes = ["large", "medium", "small"];
|
|
4
|
-
const buttonVariants = ["primary", "destructive", "secondary-fill", "secondary-invert", "secondary-ghost", "upsell"];
|
|
4
|
+
const buttonVariants = ["primary", "destructive", "secondary-fill", "secondary-invert", "secondary-ghost", "upsell", "upsell-invert", "upsell-ghost"];
|
|
5
5
|
exports.buttonSizes = buttonSizes;
|
|
6
6
|
exports.buttonVariants = buttonVariants;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { ButtonHTMLAttributes } from 'react';
|
|
2
2
|
import { Theme } from '@redislabsdev/redis-ui-styles';
|
|
3
3
|
export declare const buttonSizes: readonly ["large", "medium", "small"];
|
|
4
|
-
export declare const buttonVariants: readonly ["primary", "destructive", "secondary-fill", "secondary-invert", "secondary-ghost", "upsell"];
|
|
4
|
+
export declare const buttonVariants: readonly ["primary", "destructive", "secondary-fill", "secondary-invert", "secondary-ghost", "upsell", "upsell-invert", "upsell-ghost"];
|
|
5
5
|
export type ButtonSizes = (typeof buttonSizes)[number];
|
|
6
6
|
export type ButtonVariants = (typeof buttonVariants)[number];
|
|
7
7
|
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const buttonSizes = ["large", "medium", "small"];
|
|
2
|
-
const buttonVariants = ["primary", "destructive", "secondary-fill", "secondary-invert", "secondary-ghost", "upsell"];
|
|
2
|
+
const buttonVariants = ["primary", "destructive", "secondary-fill", "secondary-invert", "secondary-ghost", "upsell", "upsell-invert", "upsell-ghost"];
|
|
3
3
|
export {
|
|
4
4
|
buttonSizes,
|
|
5
5
|
buttonVariants
|
|
@@ -0,0 +1,59 @@
|
|
|
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 React = require("react");
|
|
5
|
+
const redisUiIcons = require("@redislabsdev/redis-ui-icons");
|
|
6
|
+
const CopyToClipboardButton_style = require("./CopyToClipboardButton.style.cjs");
|
|
7
|
+
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
8
|
+
const React__default = /* @__PURE__ */ _interopDefault(React);
|
|
9
|
+
const COPIED_STATE_DURATION = 1500;
|
|
10
|
+
const CopyToClipboardButton = React__default.default.forwardRef(({
|
|
11
|
+
textToCopy,
|
|
12
|
+
copiedLabel,
|
|
13
|
+
...restProps
|
|
14
|
+
}, ref) => {
|
|
15
|
+
const [isCopied, setIsCopied] = React.useState(false);
|
|
16
|
+
const timeoutRef = React.useRef();
|
|
17
|
+
React.useEffect(() => {
|
|
18
|
+
return () => {
|
|
19
|
+
if (timeoutRef.current) {
|
|
20
|
+
clearTimeout(timeoutRef.current);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
}, []);
|
|
24
|
+
const handleClick = React.useCallback(async () => {
|
|
25
|
+
try {
|
|
26
|
+
await navigator.clipboard.writeText(textToCopy);
|
|
27
|
+
setIsCopied(true);
|
|
28
|
+
if (timeoutRef.current) {
|
|
29
|
+
clearTimeout(timeoutRef.current);
|
|
30
|
+
}
|
|
31
|
+
timeoutRef.current = setTimeout(() => {
|
|
32
|
+
setIsCopied(false);
|
|
33
|
+
}, COPIED_STATE_DURATION);
|
|
34
|
+
} catch {
|
|
35
|
+
}
|
|
36
|
+
}, [textToCopy]);
|
|
37
|
+
const ariaLabel = isCopied && copiedLabel ? copiedLabel : restProps["aria-label"] || "Copy";
|
|
38
|
+
return jsxRuntime.jsxRuntimeExports.jsxs(CopyToClipboardButton_style.CopyToClipboardWrapper, {
|
|
39
|
+
children: [jsxRuntime.jsxRuntimeExports.jsx(CopyToClipboardButton_style.CopyToClipboardButton, {
|
|
40
|
+
type: "button",
|
|
41
|
+
ref,
|
|
42
|
+
onClick: handleClick,
|
|
43
|
+
"$isCopied": isCopied,
|
|
44
|
+
...restProps,
|
|
45
|
+
"aria-label": ariaLabel,
|
|
46
|
+
children: isCopied ? jsxRuntime.jsxRuntimeExports.jsx(redisUiIcons.ToastCheckIcon, {
|
|
47
|
+
size: "L",
|
|
48
|
+
"aria-hidden": true
|
|
49
|
+
}) : jsxRuntime.jsxRuntimeExports.jsx(redisUiIcons.CopyIcon, {
|
|
50
|
+
size: "L",
|
|
51
|
+
"aria-hidden": true
|
|
52
|
+
})
|
|
53
|
+
}), isCopied && copiedLabel && jsxRuntime.jsxRuntimeExports.jsx(CopyToClipboardButton_style.CopiedLabel, {
|
|
54
|
+
children: copiedLabel
|
|
55
|
+
})]
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
const CopyToClipboardButton$1 = CopyToClipboardButton;
|
|
59
|
+
exports.default = CopyToClipboardButton$1;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CopyToClipboardButtonProps } from './CopyToClipboardButton.types';
|
|
3
|
+
declare const CopyToClipboardButton: React.ForwardRefExoticComponent<CopyToClipboardButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
4
|
+
export default CopyToClipboardButton;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { j as jsxRuntimeExports } from "../../node_modules/react/jsx-runtime.js";
|
|
2
|
+
import React__default, { useState, useRef, useEffect, useCallback } from "react";
|
|
3
|
+
import { ToastCheckIcon, CopyIcon } from "@redislabsdev/redis-ui-icons";
|
|
4
|
+
import { CopyToClipboardWrapper, CopyToClipboardButton as CopyToClipboardButton$2, CopiedLabel } from "./CopyToClipboardButton.style.js";
|
|
5
|
+
const COPIED_STATE_DURATION = 1500;
|
|
6
|
+
const CopyToClipboardButton = React__default.forwardRef(({
|
|
7
|
+
textToCopy,
|
|
8
|
+
copiedLabel,
|
|
9
|
+
...restProps
|
|
10
|
+
}, ref) => {
|
|
11
|
+
const [isCopied, setIsCopied] = useState(false);
|
|
12
|
+
const timeoutRef = useRef();
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
return () => {
|
|
15
|
+
if (timeoutRef.current) {
|
|
16
|
+
clearTimeout(timeoutRef.current);
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
}, []);
|
|
20
|
+
const handleClick = useCallback(async () => {
|
|
21
|
+
try {
|
|
22
|
+
await navigator.clipboard.writeText(textToCopy);
|
|
23
|
+
setIsCopied(true);
|
|
24
|
+
if (timeoutRef.current) {
|
|
25
|
+
clearTimeout(timeoutRef.current);
|
|
26
|
+
}
|
|
27
|
+
timeoutRef.current = setTimeout(() => {
|
|
28
|
+
setIsCopied(false);
|
|
29
|
+
}, COPIED_STATE_DURATION);
|
|
30
|
+
} catch {
|
|
31
|
+
}
|
|
32
|
+
}, [textToCopy]);
|
|
33
|
+
const ariaLabel = isCopied && copiedLabel ? copiedLabel : restProps["aria-label"] || "Copy";
|
|
34
|
+
return jsxRuntimeExports.jsxs(CopyToClipboardWrapper, {
|
|
35
|
+
children: [jsxRuntimeExports.jsx(CopyToClipboardButton$2, {
|
|
36
|
+
type: "button",
|
|
37
|
+
ref,
|
|
38
|
+
onClick: handleClick,
|
|
39
|
+
"$isCopied": isCopied,
|
|
40
|
+
...restProps,
|
|
41
|
+
"aria-label": ariaLabel,
|
|
42
|
+
children: isCopied ? jsxRuntimeExports.jsx(ToastCheckIcon, {
|
|
43
|
+
size: "L",
|
|
44
|
+
"aria-hidden": true
|
|
45
|
+
}) : jsxRuntimeExports.jsx(CopyIcon, {
|
|
46
|
+
size: "L",
|
|
47
|
+
"aria-hidden": true
|
|
48
|
+
})
|
|
49
|
+
}), isCopied && copiedLabel && jsxRuntimeExports.jsx(CopiedLabel, {
|
|
50
|
+
children: copiedLabel
|
|
51
|
+
})]
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
const CopyToClipboardButton$1 = CopyToClipboardButton;
|
|
55
|
+
export {
|
|
56
|
+
CopyToClipboardButton$1 as default
|
|
57
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
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 Typography = require("../../Typography/Typography.cjs");
|
|
6
|
+
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
7
|
+
const _styled__default = /* @__PURE__ */ _interopDefault(_styled);
|
|
8
|
+
const CopyToClipboardWrapper = _styled__default.default.div.withConfig({
|
|
9
|
+
displayName: "CopyToClipboardButtonstyle__CopyToClipboardWrapper",
|
|
10
|
+
componentId: "RedisUI__sc-1qz6i4k-0"
|
|
11
|
+
})(["display:inline-flex;align-items:center;gap:", ";"], () => redisUiStyles.useTheme().core.space.space050);
|
|
12
|
+
const CopyToClipboardButton = _styled__default.default.button.withConfig({
|
|
13
|
+
displayName: "CopyToClipboardButtonstyle__CopyToClipboardButton",
|
|
14
|
+
componentId: "RedisUI__sc-1qz6i4k-1"
|
|
15
|
+
})(["display:inline-flex;align-items:center;justify-content:center;padding:0;border:none;background:transparent;cursor:pointer;border-radius:", ";color:", ";&:hover:not(:disabled){background-color:", ";}&:active:not(:disabled){background-color:", ";}&:disabled{cursor:not-allowed;color:", ";}", ""], () => redisUiStyles.useTheme().components.iconButton.borderRadius, ({
|
|
16
|
+
$isCopied
|
|
17
|
+
}) => {
|
|
18
|
+
var _a, _b;
|
|
19
|
+
const theme = redisUiStyles.useTheme();
|
|
20
|
+
return $isCopied ? theme.semantic.color.icon.success500 : (_b = (_a = theme.components.iconButton.states) == null ? void 0 : _a.normal) == null ? void 0 : _b.textColor;
|
|
21
|
+
}, () => {
|
|
22
|
+
var _a, _b;
|
|
23
|
+
return (_b = (_a = redisUiStyles.useTheme().components.iconButton.states) == null ? void 0 : _a.hover) == null ? void 0 : _b.bgColor;
|
|
24
|
+
}, () => {
|
|
25
|
+
var _a, _b;
|
|
26
|
+
return (_b = (_a = redisUiStyles.useTheme().components.iconButton.states) == null ? void 0 : _a.active) == null ? void 0 : _b.bgColor;
|
|
27
|
+
}, () => {
|
|
28
|
+
var _a, _b;
|
|
29
|
+
return (_b = (_a = redisUiStyles.useTheme().components.iconButton.states) == null ? void 0 : _a.disabled) == null ? void 0 : _b.textColor;
|
|
30
|
+
}, redisUiStyles.getFocusStyle());
|
|
31
|
+
const CopiedLabel = _styled__default.default(Typography.default.Body).attrs({
|
|
32
|
+
component: "span",
|
|
33
|
+
size: "S"
|
|
34
|
+
}).withConfig({
|
|
35
|
+
displayName: "CopyToClipboardButtonstyle__CopiedLabel",
|
|
36
|
+
componentId: "RedisUI__sc-1qz6i4k-2"
|
|
37
|
+
})(["color:", ";"], () => redisUiStyles.useTheme().semantic.color.text.success500);
|
|
38
|
+
exports.CopiedLabel = CopiedLabel;
|
|
39
|
+
exports.CopyToClipboardButton = CopyToClipboardButton;
|
|
40
|
+
exports.CopyToClipboardWrapper = CopyToClipboardWrapper;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const CopyToClipboardWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
|
+
export declare const CopyToClipboardButton: import("styled-components").StyledComponent<"button", any, {
|
|
3
|
+
$isCopied?: boolean;
|
|
4
|
+
}, never>;
|
|
5
|
+
export declare const CopiedLabel: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../Typography").TypographyBodyProps & import("react").RefAttributes<HTMLElement>>, any, {
|
|
6
|
+
component: "span";
|
|
7
|
+
size: "S";
|
|
8
|
+
}, "size" | "component">;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import _styled from "styled-components";
|
|
2
|
+
import { useTheme, getFocusStyle } from "@redislabsdev/redis-ui-styles";
|
|
3
|
+
import Typography from "../../Typography/Typography.js";
|
|
4
|
+
const CopyToClipboardWrapper = _styled.div.withConfig({
|
|
5
|
+
displayName: "CopyToClipboardButtonstyle__CopyToClipboardWrapper",
|
|
6
|
+
componentId: "RedisUI__sc-1qz6i4k-0"
|
|
7
|
+
})(["display:inline-flex;align-items:center;gap:", ";"], () => useTheme().core.space.space050);
|
|
8
|
+
const CopyToClipboardButton = _styled.button.withConfig({
|
|
9
|
+
displayName: "CopyToClipboardButtonstyle__CopyToClipboardButton",
|
|
10
|
+
componentId: "RedisUI__sc-1qz6i4k-1"
|
|
11
|
+
})(["display:inline-flex;align-items:center;justify-content:center;padding:0;border:none;background:transparent;cursor:pointer;border-radius:", ";color:", ";&:hover:not(:disabled){background-color:", ";}&:active:not(:disabled){background-color:", ";}&:disabled{cursor:not-allowed;color:", ";}", ""], () => useTheme().components.iconButton.borderRadius, ({
|
|
12
|
+
$isCopied
|
|
13
|
+
}) => {
|
|
14
|
+
var _a, _b;
|
|
15
|
+
const theme = useTheme();
|
|
16
|
+
return $isCopied ? theme.semantic.color.icon.success500 : (_b = (_a = theme.components.iconButton.states) == null ? void 0 : _a.normal) == null ? void 0 : _b.textColor;
|
|
17
|
+
}, () => {
|
|
18
|
+
var _a, _b;
|
|
19
|
+
return (_b = (_a = useTheme().components.iconButton.states) == null ? void 0 : _a.hover) == null ? void 0 : _b.bgColor;
|
|
20
|
+
}, () => {
|
|
21
|
+
var _a, _b;
|
|
22
|
+
return (_b = (_a = useTheme().components.iconButton.states) == null ? void 0 : _a.active) == null ? void 0 : _b.bgColor;
|
|
23
|
+
}, () => {
|
|
24
|
+
var _a, _b;
|
|
25
|
+
return (_b = (_a = useTheme().components.iconButton.states) == null ? void 0 : _a.disabled) == null ? void 0 : _b.textColor;
|
|
26
|
+
}, getFocusStyle());
|
|
27
|
+
const CopiedLabel = _styled(Typography.Body).attrs({
|
|
28
|
+
component: "span",
|
|
29
|
+
size: "S"
|
|
30
|
+
}).withConfig({
|
|
31
|
+
displayName: "CopyToClipboardButtonstyle__CopiedLabel",
|
|
32
|
+
componentId: "RedisUI__sc-1qz6i4k-2"
|
|
33
|
+
})(["color:", ";"], () => useTheme().semantic.color.text.success500);
|
|
34
|
+
export {
|
|
35
|
+
CopiedLabel,
|
|
36
|
+
CopyToClipboardButton,
|
|
37
|
+
CopyToClipboardWrapper
|
|
38
|
+
};
|
|
@@ -25,7 +25,10 @@ const TextButton = _styled__default.default.button.withConfig({
|
|
|
25
25
|
variant
|
|
26
26
|
}) => {
|
|
27
27
|
const layout = variant.includes("inline") ? "inline" : "block";
|
|
28
|
-
return css_utils.styleFromTokens(
|
|
28
|
+
return css_utils.styleFromTokens({
|
|
29
|
+
tokenMaps: sizeTokenMaps,
|
|
30
|
+
tokens: redisUiStyles.useTheme().components.textButton.layouts[layout].sizes[size]
|
|
31
|
+
});
|
|
29
32
|
}, ({
|
|
30
33
|
size
|
|
31
34
|
}) => Body_style.useBodyStyles({
|
|
@@ -21,7 +21,10 @@ const TextButton = _styled.button.withConfig({
|
|
|
21
21
|
variant
|
|
22
22
|
}) => {
|
|
23
23
|
const layout = variant.includes("inline") ? "inline" : "block";
|
|
24
|
-
return styleFromTokens(
|
|
24
|
+
return styleFromTokens({
|
|
25
|
+
tokenMaps: sizeTokenMaps,
|
|
26
|
+
tokens: useTheme().components.textButton.layouts[layout].sizes[size]
|
|
27
|
+
});
|
|
25
28
|
}, ({
|
|
26
29
|
size
|
|
27
30
|
}) => useBodyStyles({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const textButtonVariants = ["primary", "destructive", "primary-inline", "destructive-inline"];
|
|
3
|
+
const textButtonVariants = ["primary", "destructive", "secondary", "upsell", "primary-inline", "destructive-inline", "secondary-inline", "upsell-inline"];
|
|
4
4
|
exports.textButtonVariants = textButtonVariants;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ButtonHTMLAttributes } from 'react';
|
|
2
2
|
export type TextButtonSizes = 'medium' | 'small';
|
|
3
|
-
export declare const textButtonVariants: readonly ["primary", "destructive", "primary-inline", "destructive-inline"];
|
|
3
|
+
export declare const textButtonVariants: readonly ["primary", "destructive", "secondary", "upsell", "primary-inline", "destructive-inline", "secondary-inline", "upsell-inline"];
|
|
4
4
|
export type TextButtonVariants = (typeof textButtonVariants)[number];
|
|
5
5
|
export interface TextButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
6
6
|
size?: TextButtonSizes;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const textButtonVariants = ["primary", "destructive", "primary-inline", "destructive-inline"];
|
|
1
|
+
const textButtonVariants = ["primary", "destructive", "secondary", "upsell", "primary-inline", "destructive-inline", "secondary-inline", "upsell-inline"];
|
|
2
2
|
export {
|
|
3
3
|
textButtonVariants
|
|
4
4
|
};
|
package/dist/Button/index.d.ts
CHANGED
|
@@ -13,3 +13,5 @@ export * as ActionButtonWithIconStyles from './ActionIconButton/ActionIconButton
|
|
|
13
13
|
export { default as ToggleButton } from './ToggleButton/ToggleButton';
|
|
14
14
|
export * from './ToggleButton/ToggleButton.types';
|
|
15
15
|
export * as ToggleButtonStyles from './ToggleButton/ToggleButton.style';
|
|
16
|
+
export { default as CopyToClipboardButton } from './CopyToClipboardButton/CopyToClipboardButton';
|
|
17
|
+
export * from './CopyToClipboardButton/CopyToClipboardButton.types';
|