@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
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { NotificationSignButton as
|
|
4
|
-
const
|
|
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:
|
|
7
|
-
variant:
|
|
8
|
-
...
|
|
9
|
-
},
|
|
10
|
-
return /* @__PURE__ */
|
|
11
|
-
|
|
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:
|
|
15
|
-
className:
|
|
15
|
+
$variant: r,
|
|
16
|
+
className: n ? "flex" : "hidden",
|
|
16
17
|
"data-testid": "notification-sign",
|
|
17
|
-
ref:
|
|
18
|
-
...
|
|
19
|
-
children: i && /* @__PURE__ */
|
|
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
|
-
|
|
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