@fluidattacks/design 2.7.0 → 3.0.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.
@@ -16,6 +16,7 @@ interface DefaultTheme {
16
16
  spacing: {
17
17
  0: "0rem";
18
18
  0.125: "0.125rem";
19
+ 0.188: "0.188rem";
19
20
  0.25: "0.25rem";
20
21
  0.5: "0.5rem";
21
22
  0.625: "0.625rem";
@@ -84,7 +85,7 @@ type TSize = keyof DefaultTheme["typography"]["heading"];
84
85
  type TSpacing = keyof DefaultTheme["spacing"];
85
86
  type TShadows = keyof DefaultTheme["shadows"];
86
87
  type TIconSize = "xl" | "lg" | "md" | "sm" | "xs" | "xxs" | "xxss";
87
- type TIconType = "fa-brands" | "fa-light" | "fa-regular" | "fa-solid";
88
+ type TIconType = "fa-brands" | "fa-kit" | "fa-light" | "fa-regular" | "fa-solid";
88
89
  type TMode = "dark" | "light";
89
90
  interface IPaddingModifiable {
90
91
  padding?: [TSpacing, TSpacing, TSpacing, TSpacing];
@@ -122,7 +123,7 @@ interface IBorderModifiable {
122
123
  borderRadius?: string;
123
124
  }
124
125
  interface IIconModifiable {
125
- icon: IconName;
126
+ icon: IconName | "priority-bars-high" | "priority-bars-low" | "priority-bars-medium";
126
127
  iconColor?: string;
127
128
  iconSize: TIconSize;
128
129
  iconType?: TIconType;
@@ -1,11 +1,11 @@
1
- import type { IMarginModifiable } from "components/@core/types";
1
+ import type { IDisplayModifiable, IMarginModifiable } from "components/@core/types";
2
2
  /**
3
3
  * Divider component props.
4
4
  * @interface IDividerProps
5
5
  * @extends IMarginModifiable
6
6
  * @property {string} [color] - The divider color.
7
7
  */
8
- interface IDividerProps extends IMarginModifiable {
8
+ interface IDividerProps extends Pick<IDisplayModifiable, "height" | "width">, IMarginModifiable {
9
9
  color?: string;
10
10
  }
11
11
  export type { IDividerProps };
@@ -6,6 +6,7 @@ interface IStyledIconWrapProps {
6
6
  $disabled?: IIconWrapProps["disabled"];
7
7
  $rotation?: IIconWrapProps["rotation"];
8
8
  $size: IIconWrapProps["iconSize"];
9
+ $secondaryColor: IIconWrapProps["secondaryColor"];
9
10
  }
10
11
  declare const IconWrap: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, keyof import("components/@core").IPaddingModifiable | keyof import("components/@core").IMarginModifiable | keyof import("components/@core").IPositionModifiable | keyof import("components/@core").IBorderModifiable | keyof import("components/@core").IDisplayModifiable | keyof import("components/@core").ITextModifiable | keyof import("components/@core").IInteractionModifiable> & import("components/@core").IBorderModifiable & import("components/@core").IDisplayModifiable & import("components/@core").IInteractionModifiable & import("components/@core").IMarginModifiable & import("components/@core").IPaddingModifiable & import("components/@core").IPositionModifiable & import("components/@core").ITextModifiable, "ref"> & {
11
12
  ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
@@ -17,6 +17,7 @@ interface IIconWrapProps extends IIconModifiable, IMarginModifiable {
17
17
  onClick?: MouseEventHandler<HTMLSpanElement>;
18
18
  disabled?: boolean;
19
19
  rotation?: number;
20
+ secondaryColor?: string;
20
21
  }
21
22
  /**
22
23
  * Icon component props.
@@ -24,9 +25,11 @@ interface IIconWrapProps extends IIconModifiable, IMarginModifiable {
24
25
  * @extends IIconWrapProps
25
26
  * @property {string} [iconClass] - The icon class from fontawesome.
26
27
  * @property {string} [iconMask] - The data-fa-mask prop of icon.
28
+ * @property {string} [spanClass] - The icon span class.
27
29
  */
28
30
  interface IIconProps extends IIconWrapProps {
29
31
  iconClass?: string;
30
32
  iconMask?: string;
33
+ spanClass?: string;
31
34
  }
32
35
  export type { IIconProps, IIconWrapProps };
@@ -0,0 +1,4 @@
1
+ import { PropsWithChildren } from "react";
2
+ import { IInfoSidebarProps } from "./types";
3
+ declare const InfoSidebar: ({ actions, children, header, title, tabs, footer, }: Readonly<PropsWithChildren<IInfoSidebarProps>>) => JSX.Element;
4
+ export { InfoSidebar };
@@ -0,0 +1,32 @@
1
+ import { IIconModifiable } from "components/@core";
2
+ import { ITabProps } from "components/tabs/types";
3
+ /**
4
+ * Button empty state props.
5
+ * @interface IButtonProps
6
+ * @extends IIconModifiable
7
+ * @property { string } [id] - Button id.
8
+ * @property { string } [text] - Button text.
9
+ * @property { Function } [onClick] - Button click handler.
10
+ */
11
+ interface IButtonProps extends Partial<IIconModifiable> {
12
+ id?: string;
13
+ onClick?: () => void;
14
+ text?: string;
15
+ }
16
+ /**
17
+ * Info sidebar component props.
18
+ * @interface IInfoSidebarProps
19
+ * @property { IButtonProps[] } [actions] - Sidebar actions.
20
+ * @property { React.ReactNode } [header] - Sidebar header.
21
+ * @property { string } title - Sidebar title.
22
+ * @property { ITabProps[] } tabs - Sidebar tabs.
23
+ * @property { IButtonProps[] } [footer] - Sidebar footer.
24
+ */
25
+ interface IInfoSidebarProps {
26
+ actions?: IButtonProps[];
27
+ header?: React.ReactNode;
28
+ title: string;
29
+ tabs: ITabProps[];
30
+ footer?: IButtonProps[];
31
+ }
32
+ export type { IInfoSidebarProps };
@@ -0,0 +1,3 @@
1
+ import { IPriorityScoreProps } from "./types";
2
+ declare const PriorityScore: ({ score, }: Readonly<IPriorityScoreProps>) => JSX.Element;
3
+ export { PriorityScore };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Priority score component props.
3
+ * @interface IPriorityScoreProps
4
+ * @property { number } score - The priority score.
5
+ */
6
+ interface IPriorityScoreProps {
7
+ score: number;
8
+ }
9
+ export type { IPriorityScoreProps };
@@ -14,12 +14,12 @@ interface IVariant {
14
14
  /**
15
15
  * Severity badge component props.
16
16
  * @interface ISeverityBadgeProps
17
- * @property { string } textL - Left text of the badge.
17
+ * @property { string } [textL] - Left text of the badge.
18
18
  * @property { string } textR - Right text of the badge.
19
19
  * @property { TSeverityBadgeVariant } variant - Variant of the badge.
20
20
  */
21
21
  interface ISeverityBadgeProps {
22
- textL: string;
22
+ textL?: string;
23
23
  textR: string;
24
24
  variant: TSeverityBadgeVariant;
25
25
  }
@@ -0,0 +1,3 @@
1
+ import { TSliderProps } from "./types";
2
+ declare const Slider: (props: Readonly<TSliderProps>) => JSX.Element;
3
+ export { Slider };
@@ -0,0 +1,7 @@
1
+ declare const StyledSlider: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
2
+ $min: number;
3
+ $value: number;
4
+ }>> & string;
5
+ declare const LimitValues: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
6
+ declare const Output: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").OutputHTMLAttributes<HTMLOutputElement>, HTMLOutputElement>, never>> & string;
7
+ export { StyledSlider, LimitValues, Output };
@@ -0,0 +1,3 @@
1
+ import { ISliderThumbProps } from "../types";
2
+ declare const Thumb: ({ state, trackRef, index, }: Readonly<ISliderThumbProps>) => JSX.Element;
3
+ export { Thumb };
@@ -0,0 +1,13 @@
1
+ import type { AriaSliderThumbOptions } from "@react-aria/slider";
2
+ import type { SliderState, SliderStateOptions } from "@react-stately/slider";
3
+ /**
4
+ * Slider thumb component props.
5
+ * @interface ISliderThumbProps
6
+ * @extends AriaSliderThumbOptions
7
+ * @property { SliderState } state - The slider state.
8
+ */
9
+ interface ISliderThumbProps extends Omit<AriaSliderThumbOptions, "inputRef"> {
10
+ state: SliderState;
11
+ }
12
+ type TSliderProps = SliderStateOptions<number>;
13
+ export type { ISliderThumbProps, TSliderProps };
@@ -0,0 +1,2 @@
1
+ declare const normalizeValue: (min: number, max: number, value: number) => number;
2
+ export { normalizeValue };
@@ -22,6 +22,7 @@ export * from "components/group-selector";
22
22
  export * from "components/icon";
23
23
  export * from "components/icon-button";
24
24
  export * from "components/indicator-card";
25
+ export * from "components/info-sidebar";
25
26
  export * from "components/inputs";
26
27
  export * from "components/interactive-card";
27
28
  export * from "components/language-selector";
@@ -40,6 +41,7 @@ export * from "components/notification-sign";
40
41
  export * from "components/number-input";
41
42
  export * from "components/oauth-selector";
42
43
  export * from "components/premium-feature";
44
+ export * from "components/priority-score";
43
45
  export * from "components/progress";
44
46
  export * from "components/pop-up";
45
47
  export * from "components/radio-button";
@@ -50,6 +52,7 @@ export * from "components/severity-badge";
50
52
  export * from "components/severity-overview";
51
53
  export * from "components/show-on-hover";
52
54
  export * from "components/slide-out-menu";
55
+ export * from "components/slider";
53
56
  export * from "components/step-lapse";
54
57
  export * from "components/table-button";
55
58
  export * from "components/tabs";
package/package.json CHANGED
@@ -42,7 +42,7 @@
42
42
  "remark-gfm": "4.0.0",
43
43
  "rollup-plugin-visualizer": "5.12.0",
44
44
  "storybook": "8.4.7",
45
- "stylelint": "16.11.0",
45
+ "stylelint": "16.12.0",
46
46
  "stylelint-config-standard": "36.0.1",
47
47
  "tailwindcss": "3.4.16",
48
48
  "typescript": "5.7.2",
@@ -55,6 +55,10 @@
55
55
  "plugin:storybook/recommended"
56
56
  ]
57
57
  },
58
+ "exports": {
59
+ ".": "./dist/index.js",
60
+ "./button": "./dist/button.js"
61
+ },
58
62
  "files": [
59
63
  "README.md",
60
64
  "dist"
@@ -80,15 +84,18 @@
80
84
  "@react-aria/calendar": "3.6.0",
81
85
  "@react-aria/datepicker": "3.12.0",
82
86
  "@react-aria/dialog": "3.5.20",
87
+ "@react-aria/focus": "3.19.0",
83
88
  "@react-aria/i18n": "3.12.4",
84
89
  "@react-aria/overlays": "3.24.0",
90
+ "@react-aria/slider": "3.7.14",
85
91
  "@react-stately/calendar": "3.6.0",
86
92
  "@react-stately/datepicker": "3.11.0",
87
93
  "@react-stately/overlays": "3.6.12",
94
+ "@react-stately/slider": "3.6.0",
88
95
  "@react-types/shared": "3.26.0",
89
96
  "dayjs": "1.11.13",
90
97
  "lottie-light-react": "2.4.0",
91
- "motion": "11.13.5",
98
+ "motion": "11.15.0",
92
99
  "prismjs": "1.29.0",
93
100
  "react-hook-form": "7.53.2",
94
101
  "react-international-phone": "4.3.0",
@@ -112,5 +119,5 @@
112
119
  "test-storybook": "test-storybook"
113
120
  },
114
121
  "types": "dist/types/index.d.ts",
115
- "version": "2.7.0"
122
+ "version": "3.0.0"
116
123
  }