@redis-ui/components 51.1.0 → 51.2.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.
@@ -12,7 +12,8 @@ var buttonVariants = [
12
12
  "secondary-ghost",
13
13
  "upsell",
14
14
  "upsell-invert",
15
- "upsell-ghost"
15
+ "upsell-ghost",
16
+ "notice"
16
17
  ];
17
18
  //#endregion
18
19
  exports.buttonSizes = buttonSizes;
@@ -1,7 +1,7 @@
1
1
  import React, { ButtonHTMLAttributes } from 'react';
2
2
  import { Theme } from '@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", "upsell-invert", "upsell-ghost"];
4
+ export declare const buttonVariants: readonly ["primary", "destructive", "secondary-fill", "secondary-invert", "secondary-ghost", "upsell", "upsell-invert", "upsell-ghost", "notice"];
5
5
  export type ButtonSizes = (typeof buttonSizes)[number];
6
6
  export type ButtonVariants = (typeof buttonVariants)[number];
7
7
  export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
@@ -12,7 +12,8 @@ var buttonVariants = [
12
12
  "secondary-ghost",
13
13
  "upsell",
14
14
  "upsell-invert",
15
- "upsell-ghost"
15
+ "upsell-ghost",
16
+ "notice"
16
17
  ];
17
18
  //#endregion
18
19
  export { buttonSizes, buttonVariants };
@@ -4,7 +4,6 @@ let styled_components = require("styled-components");
4
4
  styled_components = require_runtime.__toESM(styled_components, 1);
5
5
  let _redislabsdev_redis_ui_styles = require("@redis-ui/styles");
6
6
  //#region src/Gauge/Gauge.style.ts
7
- var RING_CENTERLINE_INSET_PERCENTAGE = 10;
8
7
  var Gauge = styled_components.default.div.withConfig({
9
8
  displayName: "Gaugestyle__Gauge",
10
9
  componentId: "RedisUI__sc-165b3be-0"
@@ -45,8 +44,8 @@ var Label = (0, styled_components.default)(require_Typography.default.Body).with
45
44
  "position:absolute;inset:0 ",
46
45
  "%;display:flex;align-items:center;justify-content:center;overflow:hidden;color:",
47
46
  ";font-size:",
48
- ";"
49
- ], ({ $size }) => RING_CENTERLINE_INSET_PERCENTAGE + Number((0, _redislabsdev_redis_ui_styles.useTheme)().components.gauge.size[$size].strokeWidth) / 2, ({ $variant }) => (0, _redislabsdev_redis_ui_styles.useTheme)().components.gauge.variant[$variant].textColor, ({ $size }) => (0, _redislabsdev_redis_ui_styles.useTheme)().components.gauge.size[$size].fontSize);
47
+ ";text-align:center;line-height:1;"
48
+ ], ({ $size }) => 14 + Number((0, _redislabsdev_redis_ui_styles.useTheme)().components.gauge.size[$size].strokeWidth) / 2, ({ $variant }) => (0, _redislabsdev_redis_ui_styles.useTheme)().components.gauge.variant[$variant].textColor, ({ $size }) => (0, _redislabsdev_redis_ui_styles.useTheme)().components.gauge.size[$size].fontSize);
50
49
  //#endregion
51
50
  exports.Arc = Arc;
52
51
  exports.Gauge = Gauge;
@@ -2,7 +2,6 @@ import Typography from "../Typography/Typography.js";
2
2
  import _styled, { css } from "styled-components";
3
3
  import { useTheme } from "@redis-ui/styles";
4
4
  //#region src/Gauge/Gauge.style.ts
5
- var RING_CENTERLINE_INSET_PERCENTAGE = 10;
6
5
  var Gauge = _styled.div.withConfig({
7
6
  displayName: "Gaugestyle__Gauge",
8
7
  componentId: "RedisUI__sc-165b3be-0"
@@ -43,7 +42,7 @@ var Label = _styled(Typography.Body).withConfig({
43
42
  "position:absolute;inset:0 ",
44
43
  "%;display:flex;align-items:center;justify-content:center;overflow:hidden;color:",
45
44
  ";font-size:",
46
- ";"
47
- ], ({ $size }) => RING_CENTERLINE_INSET_PERCENTAGE + Number(useTheme().components.gauge.size[$size].strokeWidth) / 2, ({ $variant }) => useTheme().components.gauge.variant[$variant].textColor, ({ $size }) => useTheme().components.gauge.size[$size].fontSize);
45
+ ";text-align:center;line-height:1;"
46
+ ], ({ $size }) => 14 + Number(useTheme().components.gauge.size[$size].strokeWidth) / 2, ({ $variant }) => useTheme().components.gauge.variant[$variant].textColor, ({ $size }) => useTheme().components.gauge.size[$size].fontSize);
48
47
  //#endregion
49
48
  export { Arc, Gauge, Label, Svg, Track };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@redis-ui/components",
3
3
  "license": "UNLICENSED",
4
- "version": "51.1.0",
4
+ "version": "51.2.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.0.0",
33
+ "@redis-ui/styles": "^21.2.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"
@@ -11,7 +11,7 @@ import { Button } from '@redis-ui/components';
11
11
  | Prop | Type | Default | Description |
12
12
  |------|------|---------|-------------|
13
13
  | size | `'large' \| 'medium' \| 'small'` | `'medium'` | The size of the button |
14
- | variant | `'primary' \| 'destructive' \| 'secondary-fill' \| 'secondary-invert' \| 'secondary-ghost' \| 'upsell' \| 'upsell-invert' \| 'upsell-ghost'` | `'primary'` | The visual style variant of the button |
14
+ | variant | `'primary' \| 'destructive' \| 'secondary-fill' \| 'secondary-invert' \| 'secondary-ghost' \| 'upsell' \| 'upsell-invert' \| 'upsell-ghost' \| 'notice'` | `'primary'` | The visual style variant of the button |
15
15
  | disabled | `boolean` | `false` | Whether the button is disabled |
16
16
  | onClick | `(e: React.MouseEvent<HTMLButtonElement>) => void` | - | Click event handler |
17
17
  | theme | `Theme` | - | Theme override from `@redis-ui/styles` |
@@ -42,7 +42,7 @@ import { Button } from '@redis-ui/components';
42
42
  ```
43
43
 
44
44
  ### Variants
45
- > Demonstrates all button sizes, variants, and disabled states in a comprehensive grid. The grid shows each size and state vertically against each variant horizontally. 3 sizes are supported (large, medium, small) with `medium` being the default. 8 total variants are supported: 1 primary, 3 secondary, a destructive variant, and 3 upsell variants, with `primary` as the default. The disabled row shows each variant in its disabled state.
45
+ > Demonstrates all button sizes, variants, and disabled states in a comprehensive grid. The grid shows each size and state vertically against each variant horizontally. 3 sizes are supported (large, medium, small) with `medium` being the default. 9 total variants are supported: 1 primary, 3 secondary, a destructive variant, 3 upsell variants, and a notice variant, with `primary` as the default. The disabled row shows each variant in its disabled state.
46
46
  ```tsx
47
47
  import { Button, buttonSizes, buttonVariants } from '@redis-ui/components';
48
48
  import { Fragment } from 'react';