@redis-ui/components 51.12.0 → 51.13.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, {
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.13.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.19.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 |