@fluidattacks/design 11.1.0 → 11.1.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.
@@ -1,25 +1,26 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { forwardRef as a } from "react";
3
- import { NotificationSignButton as e, NumberIndicator as c } from "./styles.js";
4
- const g = a(function({
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { forwardRef as e } from "react";
3
+ import { NotificationSignButton as c, NumberIndicator as d } from "./styles.js";
4
+ const l = e(function({
5
+ max: t = 9,
5
6
  numberIndicator: i,
6
- show: o,
7
- variant: n = "error",
8
- ...r
9
- }, f) {
10
- return /* @__PURE__ */ t(
11
- e,
7
+ show: n,
8
+ variant: r = "error",
9
+ ...f
10
+ }, a) {
11
+ return /* @__PURE__ */ o(
12
+ c,
12
13
  {
13
14
  $numberIndicator: i,
14
- $variant: n,
15
- className: o ? "flex" : "hidden",
15
+ $variant: r,
16
+ className: n ? "flex" : "hidden",
16
17
  "data-testid": "notification-sign",
17
- ref: f,
18
- ...r,
19
- children: i && /* @__PURE__ */ t(c, { children: i <= 9 ? i : 9 })
18
+ ref: a,
19
+ ...f,
20
+ children: i && /* @__PURE__ */ o(d, { children: i > t ? `${t}+` : i })
20
21
  }
21
22
  );
22
23
  });
23
24
  export {
24
- g as NotificationSign
25
+ l as NotificationSign
25
26
  };
@@ -2,6 +2,7 @@ import { Meta } from '@storybook/react-vite';
2
2
  import { INotificationSignProps } from './types';
3
3
  declare const config: Meta;
4
4
  declare const NumberedBadge: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, Readonly<INotificationSignProps>>;
5
+ declare const OverflowBadge: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, Readonly<INotificationSignProps>>;
5
6
  declare const Dot: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, Readonly<INotificationSignProps>>;
6
- export { NumberedBadge, Dot };
7
+ export { NumberedBadge, OverflowBadge, Dot };
7
8
  export default config;
@@ -0,0 +1 @@
1
+ export {};
@@ -4,11 +4,14 @@ type TVariant = "error" | "warning";
4
4
  * Notification sign component props.
5
5
  * @interface INotificationSignProps
6
6
  * @extends IPositionModifiable
7
+ * @property {number} [max] - The highest count shown as is; larger counts
8
+ * show as `{max}+`. Defaults to 9.
7
9
  * @property {number} [numberIndicator] - The number of notifications.
8
10
  * @property {boolean} [show] - The visibility of notification sign.
9
11
  * @property {TVariant} [variant] - The notification custom variant.
10
12
  */
11
13
  interface INotificationSignProps extends Pick<IPositionModifiable, "left" | "top"> {
14
+ max?: number;
12
15
  numberIndicator?: number;
13
16
  show?: boolean;
14
17
  variant?: TVariant;
package/package.json CHANGED
@@ -135,5 +135,5 @@
135
135
  "./dist/index.js"
136
136
  ],
137
137
  "typings": "./dist/index.d.ts",
138
- "version": "11.1.0"
138
+ "version": "11.1.1"
139
139
  }