@redis-ui/components 51.12.0 → 51.14.0

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.
@@ -3,9 +3,11 @@ const require_TextButton = require("../../../../../Button/TextButton/TextButton.
3
3
  const require_Compose = require("./components/Compose/Compose.cjs");
4
4
  const require_Footer_style = require("./Footer.style.cjs");
5
5
  const require_Closable = require("../../../Closable/Closable.cjs");
6
+ let _redislabsdev_redis_ui_styles = require("@redis-ui/styles");
6
7
  let react_jsx_runtime = require("react/jsx-runtime");
7
8
  //#region src/Modal/components/Content/components/Footer/Footer.tsx
8
9
  var Footer = Object.assign(({ primaryButtonText, secondaryButtonText, tertiaryButtonText, tertiaryButtonIcon, primaryButtonDisabled, secondaryButtonDisabled, tertiaryButtonDisabled, onPrimaryButtonClick, onSecondaryButtonClick, onTertiaryButtonClick, ...restProps }) => {
10
+ const { secondaryButtonVariant = "secondary-ghost" } = (0, _redislabsdev_redis_ui_styles.useTheme)().components.modal.footer;
9
11
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Footer.Compose, {
10
12
  ...restProps,
11
13
  children: [tertiaryButtonText && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Closable.default, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_TextButton.default, {
@@ -17,7 +19,7 @@ var Footer = Object.assign(({ primaryButtonText, secondaryButtonText, tertiaryBu
17
19
  "aria-label": secondaryButtonText,
18
20
  disabled: secondaryButtonDisabled,
19
21
  onClick: onSecondaryButtonClick,
20
- variant: "secondary-ghost",
22
+ variant: secondaryButtonVariant,
21
23
  size: "large",
22
24
  children: secondaryButtonText
23
25
  }) }), primaryButtonText && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Closable.default, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Button.default, {
@@ -3,9 +3,11 @@ import TextButton from "../../../../../Button/TextButton/TextButton.js";
3
3
  import Compose from "./components/Compose/Compose.js";
4
4
  import { FooterGroup } from "./Footer.style.js";
5
5
  import Closable from "../../../Closable/Closable.js";
6
+ import { useTheme } from "@redis-ui/styles";
6
7
  import { jsx, jsxs } from "react/jsx-runtime";
7
8
  //#region src/Modal/components/Content/components/Footer/Footer.tsx
8
9
  var Footer = Object.assign(({ primaryButtonText, secondaryButtonText, tertiaryButtonText, tertiaryButtonIcon, primaryButtonDisabled, secondaryButtonDisabled, tertiaryButtonDisabled, onPrimaryButtonClick, onSecondaryButtonClick, onTertiaryButtonClick, ...restProps }) => {
10
+ const { secondaryButtonVariant = "secondary-ghost" } = useTheme().components.modal.footer;
9
11
  return /* @__PURE__ */ jsxs(Footer.Compose, {
10
12
  ...restProps,
11
13
  children: [tertiaryButtonText && /* @__PURE__ */ jsx(Closable, { children: /* @__PURE__ */ jsxs(TextButton, {
@@ -17,7 +19,7 @@ var Footer = Object.assign(({ primaryButtonText, secondaryButtonText, tertiaryBu
17
19
  "aria-label": secondaryButtonText,
18
20
  disabled: secondaryButtonDisabled,
19
21
  onClick: onSecondaryButtonClick,
20
- variant: "secondary-ghost",
22
+ variant: secondaryButtonVariant,
21
23
  size: "large",
22
24
  children: secondaryButtonText
23
25
  }) }), primaryButtonText && /* @__PURE__ */ jsx(Closable, { children: /* @__PURE__ */ jsx(Button, {
@@ -1,4 +1,3 @@
1
- const require_Typography = require("../../../../../Typography/Typography.cjs");
2
1
  const require_Step_context = require("../../Step.context.cjs");
3
2
  const require_Stepper_context = require("../../../../Stepper.context.cjs");
4
3
  const require_Step_types = require("../../Step.types.cjs");
@@ -12,7 +11,7 @@ var Icon = ({ children, ...restProps }) => {
12
11
  ...restProps,
13
12
  "data-state": state,
14
13
  "aria-hidden": true,
15
- children: state === require_Step_types.StepperStepState.COMPLETED && !isCompact ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Icon_style.IconCheck, {}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Typography.default.Body, {
14
+ children: state === require_Step_types.StepperStepState.COMPLETED && !isCompact ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Icon_style.IconCheck, {}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Icon_style.Number, {
16
15
  size: "S",
17
16
  component: "div",
18
17
  children: !isCompact && children || index + 1
@@ -1,8 +1,7 @@
1
- import Typography from "../../../../../Typography/Typography.js";
2
1
  import { useStepContext } from "../../Step.context.js";
3
2
  import { useStepperContext } from "../../../../Stepper.context.js";
4
3
  import { StepperStepState } from "../../Step.types.js";
5
- import { Container, IconCheck } from "./Icon.style.js";
4
+ import { Container, IconCheck, Number } from "./Icon.style.js";
6
5
  import { jsx } from "react/jsx-runtime";
7
6
  //#region src/Stepper/components/Step/components/Icon/Icon.tsx
8
7
  var Icon = ({ children, ...restProps }) => {
@@ -12,7 +11,7 @@ var Icon = ({ children, ...restProps }) => {
12
11
  ...restProps,
13
12
  "data-state": state,
14
13
  "aria-hidden": true,
15
- children: state === StepperStepState.COMPLETED && !isCompact ? /* @__PURE__ */ jsx(IconCheck, {}) : /* @__PURE__ */ jsx(Typography.Body, {
14
+ children: state === StepperStepState.COMPLETED && !isCompact ? /* @__PURE__ */ jsx(IconCheck, {}) : /* @__PURE__ */ jsx(Number, {
16
15
  size: "S",
17
16
  component: "div",
18
17
  children: !isCompact && children || index + 1
@@ -1,4 +1,5 @@
1
1
  const require_runtime = require("../../../../../_virtual/_rolldown/runtime.cjs");
2
+ const require_Typography = require("../../../../../Typography/Typography.cjs");
2
3
  const require_Step_types = require("../../Step.types.cjs");
3
4
  const require_Compose_style = require("../../../Compose/Compose.style.cjs");
4
5
  let styled_components = require("styled-components");
@@ -10,11 +11,11 @@ var Container = styled_components.default.div.withConfig({
10
11
  displayName: "Iconstyle__Container",
11
12
  componentId: "RedisUI__sc-1ojkwgp-0"
12
13
  })([
13
- "display:flex;align-items:center;justify-content:center;flex:none;line-height:0;transition:all 0.3s ease;@media (prefers-reduced-motion:reduce){transition:none;}width:",
14
+ "display:flex;align-items:center;justify-content:center;flex:none;box-sizing:border-box;line-height:0;transition:all 0.3s ease;@media (prefers-reduced-motion:reduce){transition:none;}width:",
14
15
  ";height:",
15
16
  ";",
16
17
  " ",
17
- "[data-variant='compact'] &&{width:auto;height:auto;padding:0;border-radius:0;background-color:transparent;line-height:inherit;> *{font-family:inherit;font-size:inherit;}}",
18
+ "[data-variant='compact'] &&{width:auto;height:auto;padding:0;border:none;border-radius:0;background-color:transparent;line-height:inherit;> *{font-family:inherit;font-size:inherit;font-weight:inherit;}}",
18
19
  ""
19
20
  ], () => (0, _redislabsdev_redis_ui_styles.useTheme)().components.stepper.step.indicator.size, () => (0, _redislabsdev_redis_ui_styles.useTheme)().components.stepper.step.indicator.size, () => {
20
21
  const { states } = (0, _redislabsdev_redis_ui_styles.useTheme)().components.stepper.step;
@@ -24,16 +25,29 @@ var Container = styled_components.default.div.withConfig({
24
25
  &[data-state='${state}'] {
25
26
  background-color: ${theme.bgColor};
26
27
  color: ${theme.iconColor};
28
+ border: ${theme.border};
27
29
  border-radius: ${theme.borderRadius};
28
30
  padding: ${theme.padding};
29
31
  }
30
32
  `;
31
33
  });
32
34
  }, require_Compose_style.StepperCompose, require_Compose_style.useCompactStateStyle);
35
+ var Number = (0, styled_components.default)(require_Typography.default.Body).withConfig({
36
+ displayName: "Iconstyle__Number",
37
+ componentId: "RedisUI__sc-1ojkwgp-1"
38
+ })(["", ""], () => {
39
+ const { fontFamily, fontSize, fontWeight } = (0, _redislabsdev_redis_ui_styles.useTheme)().components.stepper.step.indicator;
40
+ return styled_components.css`
41
+ font-family: ${fontFamily};
42
+ font-size: ${fontSize};
43
+ font-weight: ${fontWeight};
44
+ `;
45
+ });
33
46
  var IconCheck = (0, styled_components.default)(_redislabsdev_redis_ui_icons.CheckBoldIcon).withConfig({
34
47
  displayName: "Iconstyle__IconCheck",
35
- componentId: "RedisUI__sc-1ojkwgp-1"
36
- })(["&,> *{fill:currentColor;}"]);
48
+ componentId: "RedisUI__sc-1ojkwgp-2"
49
+ })(["width:100%;height:100%;&,> *{fill:currentColor;}"]);
37
50
  //#endregion
38
51
  exports.Container = Container;
39
52
  exports.IconCheck = IconCheck;
53
+ exports.Number = Number;
@@ -1,2 +1,3 @@
1
1
  export declare const Container: import("styled-components").StyledComponent<"div", any, {}, never>;
2
+ export declare const Number: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../../../..").TypographyBodyProps & import("react").RefAttributes<HTMLElement>>, any, {}, never>;
2
3
  export declare const IconCheck: import("styled-components").StyledComponent<({ size, customSize, variant, title: titleProp, ...rest }: import("@redis-ui/icons").MonochromeIconProps) => import("react/jsx-runtime").JSX.Element, any, {}, never>;
@@ -1,3 +1,4 @@
1
+ import Typography from "../../../../../Typography/Typography.js";
1
2
  import { StepperStepState } from "../../Step.types.js";
2
3
  import { StepperCompose, useCompactStateStyle } from "../../../Compose/Compose.style.js";
3
4
  import _styled, { css } from "styled-components";
@@ -8,11 +9,11 @@ var Container = _styled.div.withConfig({
8
9
  displayName: "Iconstyle__Container",
9
10
  componentId: "RedisUI__sc-1ojkwgp-0"
10
11
  })([
11
- "display:flex;align-items:center;justify-content:center;flex:none;line-height:0;transition:all 0.3s ease;@media (prefers-reduced-motion:reduce){transition:none;}width:",
12
+ "display:flex;align-items:center;justify-content:center;flex:none;box-sizing:border-box;line-height:0;transition:all 0.3s ease;@media (prefers-reduced-motion:reduce){transition:none;}width:",
12
13
  ";height:",
13
14
  ";",
14
15
  " ",
15
- "[data-variant='compact'] &&{width:auto;height:auto;padding:0;border-radius:0;background-color:transparent;line-height:inherit;> *{font-family:inherit;font-size:inherit;}}",
16
+ "[data-variant='compact'] &&{width:auto;height:auto;padding:0;border:none;border-radius:0;background-color:transparent;line-height:inherit;> *{font-family:inherit;font-size:inherit;font-weight:inherit;}}",
16
17
  ""
17
18
  ], () => useTheme().components.stepper.step.indicator.size, () => useTheme().components.stepper.step.indicator.size, () => {
18
19
  const { states } = useTheme().components.stepper.step;
@@ -22,15 +23,27 @@ var Container = _styled.div.withConfig({
22
23
  &[data-state='${state}'] {
23
24
  background-color: ${theme.bgColor};
24
25
  color: ${theme.iconColor};
26
+ border: ${theme.border};
25
27
  border-radius: ${theme.borderRadius};
26
28
  padding: ${theme.padding};
27
29
  }
28
30
  `;
29
31
  });
30
32
  }, StepperCompose, useCompactStateStyle);
33
+ var Number = _styled(Typography.Body).withConfig({
34
+ displayName: "Iconstyle__Number",
35
+ componentId: "RedisUI__sc-1ojkwgp-1"
36
+ })(["", ""], () => {
37
+ const { fontFamily, fontSize, fontWeight } = useTheme().components.stepper.step.indicator;
38
+ return css`
39
+ font-family: ${fontFamily};
40
+ font-size: ${fontSize};
41
+ font-weight: ${fontWeight};
42
+ `;
43
+ });
31
44
  var IconCheck = _styled(CheckBoldIcon).withConfig({
32
45
  displayName: "Iconstyle__IconCheck",
33
- componentId: "RedisUI__sc-1ojkwgp-1"
34
- })(["&,> *{fill:currentColor;}"]);
46
+ componentId: "RedisUI__sc-1ojkwgp-2"
47
+ })(["width:100%;height:100%;&,> *{fill:currentColor;}"]);
35
48
  //#endregion
36
- export { Container, IconCheck };
49
+ export { Container, IconCheck, Number };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@redis-ui/components",
3
3
  "license": "UNLICENSED",
4
- "version": "51.12.0",
4
+ "version": "51.14.0",
5
5
  "type": "module",
6
6
  "sideEffects": false,
7
7
  "repository": "git@github.com:redislabsdev/redis-ui.git",
@@ -30,7 +30,7 @@
30
30
  },
31
31
  "peerDependencies": {
32
32
  "@redis-ui/icons": "^8.0.0 || ^9.0.0 || ^10.0.0",
33
- "@redis-ui/styles": "^21.18.0",
33
+ "@redis-ui/styles": "^21.20.0",
34
34
  "react": "^18.0.0 || ^19.0.0",
35
35
  "react-dom": "^18.0.0 || ^19.0.0",
36
36
  "styled-components": "^5.0.0"
@@ -62,7 +62,7 @@ import { Modal } from '@redis-ui/components';
62
62
  | `Modal.Content.Body.Compose` | `width` | `string` | - | Optional width for the body container |
63
63
  | `Modal.Content.Body.Text` | `Typography.Body props` | - | - | Typography wrapper for body text |
64
64
  | `Modal.Content.Footer` | `primaryButtonText` | `string` | - | Label for the primary action button |
65
- | `Modal.Content.Footer` | `secondaryButtonText` | `string` | - | Label for the secondary action button |
65
+ | `Modal.Content.Footer` | `secondaryButtonText` | `string` | - | Label for the secondary action button. Its variant comes from the theme `modal.footer.secondaryButtonVariant` (`secondary-ghost` classic, `secondary-fill` next) |
66
66
  | `Modal.Content.Footer` | `tertiaryButtonText` | `string` | - | Label for the tertiary action button |
67
67
  | `Modal.Content.Footer` | `tertiaryButtonIcon` | `IconType` | - | Icon shown inside the tertiary action button |
68
68
  | `Modal.Content.Footer` | `primaryButtonDisabled` | `boolean` | `false` | Disables the primary action button |