@fluidattacks/design 2.7.0 → 3.0.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.
- package/dist/button.js +2 -0
- package/dist/button.mjs +6 -0
- package/dist/index-B8peEiF9.mjs +2056 -0
- package/dist/index-DeLYVJmb.js +63 -0
- package/dist/index.js +181 -227
- package/dist/index.mjs +7166 -8799
- package/dist/types/components/@core/types.d.ts +3 -2
- package/dist/types/components/divider/types.d.ts +2 -2
- package/dist/types/components/icon/styles.d.ts +1 -0
- package/dist/types/components/icon/types.d.ts +3 -0
- package/dist/types/components/info-sidebar/index.d.ts +4 -0
- package/dist/types/components/info-sidebar/types.d.ts +32 -0
- package/dist/types/components/inputs/fields/date/calendar/index.d.ts +1 -1
- package/dist/types/components/inputs/fields/date/types.d.ts +2 -4
- package/dist/types/components/inputs/fields/date-range/calendar/index.d.ts +1 -1
- package/dist/types/components/inputs/fields/date-time/calendar/index.d.ts +2 -3
- package/dist/types/components/inputs/utils/calendar-button/index.d.ts +1 -1
- package/dist/types/components/inputs/utils/dialog/index.d.ts +1 -1
- package/dist/types/components/inputs/utils/types.d.ts +2 -4
- package/dist/types/components/priority-score/index.d.ts +3 -0
- package/dist/types/components/priority-score/types.d.ts +9 -0
- package/dist/types/components/severity-badge/types.d.ts +2 -2
- package/dist/types/components/slider/index.d.ts +3 -0
- package/dist/types/components/slider/styles.d.ts +7 -0
- package/dist/types/components/slider/thumb/index.d.ts +3 -0
- package/dist/types/components/slider/types.d.ts +13 -0
- package/dist/types/components/slider/utils.d.ts +2 -0
- package/dist/types/index.d.ts +3 -0
- package/package.json +14 -17
|
@@ -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,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 };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CalendarStateOptions } from "
|
|
1
|
+
import type { CalendarStateOptions } from "react-stately";
|
|
2
2
|
declare const Calendar: ({ onClose, props, }: Readonly<{
|
|
3
3
|
onClose: () => void;
|
|
4
4
|
props: Omit<CalendarStateOptions, "createCalendar" | "locale">;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import type { AriaCalendarCellProps, AriaCalendarGridProps, CalendarAria } from "@react-aria/calendar";
|
|
2
|
-
import type { DateValue } from "@react-aria/datepicker";
|
|
3
|
-
import type { CalendarState, RangeCalendarState } from "@react-stately/calendar";
|
|
4
|
-
import type { DatePickerStateOptions, DateRangePickerStateOptions } from "@react-stately/datepicker";
|
|
5
1
|
import { InputHTMLAttributes } from "react";
|
|
2
|
+
import type { AriaCalendarCellProps, AriaCalendarGridProps, CalendarAria, DateValue } from "react-aria";
|
|
3
|
+
import type { CalendarState, DatePickerStateOptions, DateRangePickerStateOptions, RangeCalendarState } from "react-stately";
|
|
6
4
|
/**
|
|
7
5
|
* Calendar state props.
|
|
8
6
|
* @interface ICalendarState
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RangeCalendarStateOptions } from "
|
|
1
|
+
import type { RangeCalendarStateOptions } from "react-stately";
|
|
2
2
|
declare const Calendar: ({ onClose, props, }: Readonly<{
|
|
3
3
|
onClose: () => void;
|
|
4
4
|
props: Omit<RangeCalendarStateOptions, "createCalendar" | "locale">;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import type { TimeValue } from "
|
|
2
|
-
import type { CalendarStateOptions } from "
|
|
3
|
-
import type { DatePickerState } from "@react-stately/datepicker";
|
|
1
|
+
import type { TimeValue } from "react-aria";
|
|
2
|
+
import type { CalendarStateOptions, DatePickerState } from "react-stately";
|
|
4
3
|
declare const Calendar: ({ handleTimeChange, onClose, props, timeState, }: Readonly<{
|
|
5
4
|
handleTimeChange: (selectedValue: TimeValue | null) => void;
|
|
6
5
|
onClose: () => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IconName } from "@fortawesome/free-solid-svg-icons";
|
|
2
|
-
import type { AriaButtonOptions } from "
|
|
2
|
+
import type { AriaButtonOptions } from "react-aria";
|
|
3
3
|
declare const Button: ({ disabled, icon, props, }: Readonly<{
|
|
4
4
|
disabled?: boolean;
|
|
5
5
|
icon: IconName;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AriaDialogProps } from "@react-aria/dialog";
|
|
2
1
|
import { PropsWithChildren } from "react";
|
|
2
|
+
import type { AriaDialogProps } from "react-aria";
|
|
3
3
|
declare const Dialog: ({ children, ...props }: Readonly<PropsWithChildren<AriaDialogProps>>) => JSX.Element;
|
|
4
4
|
export { Dialog };
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import type { AriaDatePickerProps, DatePickerAria, DateValue } from "@react-aria/datepicker";
|
|
2
|
-
import type { AriaPopoverProps } from "@react-aria/overlays";
|
|
3
|
-
import type { DateFieldState, DateFieldStateOptions, DateSegment, TimeFieldStateOptions } from "@react-stately/datepicker";
|
|
4
|
-
import type { OverlayTriggerState } from "@react-stately/overlays";
|
|
5
1
|
import type { Property } from "csstype";
|
|
2
|
+
import type { AriaDatePickerProps, AriaPopoverProps, DatePickerAria, DateValue } from "react-aria";
|
|
3
|
+
import type { DateFieldState, DateFieldStateOptions, DateSegment, OverlayTriggerState, TimeFieldStateOptions } from "react-stately";
|
|
6
4
|
import { IBorderModifiable, IIconModifiable, IPaddingModifiable } from "components/@core";
|
|
7
5
|
/**
|
|
8
6
|
* Action button component props.
|
|
@@ -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
|
|
22
|
+
textL?: string;
|
|
23
23
|
textR: string;
|
|
24
24
|
variant: TSeverityBadgeVariant;
|
|
25
25
|
}
|
|
@@ -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,13 @@
|
|
|
1
|
+
import type { AriaSliderThumbOptions } from "react-aria";
|
|
2
|
+
import type { SliderState, SliderStateOptions } from "react-stately";
|
|
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 };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -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
|
@@ -4,8 +4,14 @@
|
|
|
4
4
|
"url": "https://gitlab.com/fluidattacks/universe/issues"
|
|
5
5
|
},
|
|
6
6
|
"dependencies": {
|
|
7
|
+
"@internationalized/date": "3.6.0",
|
|
8
|
+
"@react-types/shared": "3.26.0",
|
|
7
9
|
"react": "18.2.0",
|
|
10
|
+
"react-aria": "3.36.0",
|
|
8
11
|
"react-dom": "18.2.0",
|
|
12
|
+
"react-hook-form": "7.53.2",
|
|
13
|
+
"react-router-dom": "6.28.0",
|
|
14
|
+
"react-stately": "3.34.0",
|
|
9
15
|
"styled-components": "6.1.13"
|
|
10
16
|
},
|
|
11
17
|
"description": "Fluidattacks core components library",
|
|
@@ -42,7 +48,7 @@
|
|
|
42
48
|
"remark-gfm": "4.0.0",
|
|
43
49
|
"rollup-plugin-visualizer": "5.12.0",
|
|
44
50
|
"storybook": "8.4.7",
|
|
45
|
-
"stylelint": "16.
|
|
51
|
+
"stylelint": "16.12.0",
|
|
46
52
|
"stylelint-config-standard": "36.0.1",
|
|
47
53
|
"tailwindcss": "3.4.16",
|
|
48
54
|
"typescript": "5.7.2",
|
|
@@ -55,6 +61,10 @@
|
|
|
55
61
|
"plugin:storybook/recommended"
|
|
56
62
|
]
|
|
57
63
|
},
|
|
64
|
+
"exports": {
|
|
65
|
+
".": "./dist/index.js",
|
|
66
|
+
"./button": "./dist/button.js"
|
|
67
|
+
},
|
|
58
68
|
"files": [
|
|
59
69
|
"README.md",
|
|
60
70
|
"dist"
|
|
@@ -73,26 +83,13 @@
|
|
|
73
83
|
"@cloudinary/react": "1.13.1",
|
|
74
84
|
"@cloudinary/url-gen": "1.21.0",
|
|
75
85
|
"@floating-ui/react-dom": "2.1.2",
|
|
76
|
-
"@fortawesome/free-solid-svg-icons": "6.7.
|
|
86
|
+
"@fortawesome/free-solid-svg-icons": "6.7.2",
|
|
77
87
|
"@fortawesome/react-fontawesome": "0.2.2",
|
|
78
|
-
"@internationalized/date": "3.6.0",
|
|
79
|
-
"@react-aria/button": "3.11.0",
|
|
80
|
-
"@react-aria/calendar": "3.6.0",
|
|
81
|
-
"@react-aria/datepicker": "3.12.0",
|
|
82
|
-
"@react-aria/dialog": "3.5.20",
|
|
83
|
-
"@react-aria/i18n": "3.12.4",
|
|
84
|
-
"@react-aria/overlays": "3.24.0",
|
|
85
|
-
"@react-stately/calendar": "3.6.0",
|
|
86
|
-
"@react-stately/datepicker": "3.11.0",
|
|
87
|
-
"@react-stately/overlays": "3.6.12",
|
|
88
|
-
"@react-types/shared": "3.26.0",
|
|
89
88
|
"dayjs": "1.11.13",
|
|
90
89
|
"lottie-light-react": "2.4.0",
|
|
91
|
-
"motion": "11.
|
|
90
|
+
"motion": "11.15.0",
|
|
92
91
|
"prismjs": "1.29.0",
|
|
93
|
-
"react-hook-form": "7.53.2",
|
|
94
92
|
"react-international-phone": "4.3.0",
|
|
95
|
-
"react-router-dom": "6.28.0",
|
|
96
93
|
"react-joyride": "2.9.3",
|
|
97
94
|
"react-tooltip": "5.28.0"
|
|
98
95
|
},
|
|
@@ -112,5 +109,5 @@
|
|
|
112
109
|
"test-storybook": "test-storybook"
|
|
113
110
|
},
|
|
114
111
|
"types": "dist/types/index.d.ts",
|
|
115
|
-
"version": "
|
|
112
|
+
"version": "3.0.1"
|
|
116
113
|
}
|