@fluidattacks/design 3.0.0 → 3.1.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.
- package/dist/button.js +1 -2
- package/dist/button.mjs +2 -3
- package/dist/design.css +1 -0
- package/dist/{index-B8peEiF9.mjs → index-D-jCNmFw.mjs} +5 -5
- package/dist/{index-DeLYVJmb.js → index-DYyBrKJW.js} +1 -1
- package/dist/index.js +152 -148
- package/dist/index.mjs +10063 -8811
- package/dist/types/components/accordion/accordion-content/index.d.ts +1 -1
- package/dist/types/components/accordion/types.d.ts +0 -2
- package/dist/types/components/checkbox/styles.d.ts +1 -6
- package/dist/types/components/checkbox/types.d.ts +1 -4
- package/dist/types/components/inputs/fields/combobox/index.d.ts +4 -0
- package/dist/types/components/inputs/fields/combobox/option/index.d.ts +3 -0
- package/dist/types/components/inputs/fields/combobox/styles.d.ts +3 -0
- package/dist/types/components/inputs/fields/combobox/types.d.ts +40 -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/index.d.ts +2 -1
- 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/popover/index.d.ts +1 -1
- package/dist/types/components/inputs/utils/types.d.ts +6 -10
- package/dist/types/components/radio-button/styles.d.ts +1 -3
- package/dist/types/components/slider/types.d.ts +2 -2
- package/package.json +22 -25
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { IAccordionContentProps } from "../types";
|
|
2
|
-
declare const AccordionContent: ({
|
|
2
|
+
declare const AccordionContent: ({ item, }: Readonly<IAccordionContentProps>) => JSX.Element;
|
|
3
3
|
export { AccordionContent };
|
|
@@ -14,11 +14,9 @@ interface IAccordionItemProps {
|
|
|
14
14
|
/**
|
|
15
15
|
* Accordion Content props
|
|
16
16
|
* @interface IAccordionContentProps
|
|
17
|
-
* @property {boolean} isSelectedAndOpen If item in accordion is selected and open.
|
|
18
17
|
* @property {IAccordionItemProps} item Accordion item.
|
|
19
18
|
*/
|
|
20
19
|
interface IAccordionContentProps {
|
|
21
|
-
isSelectedAndOpen: boolean;
|
|
22
20
|
item: IAccordionItemProps;
|
|
23
21
|
}
|
|
24
22
|
/**
|
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
declare const InputContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, {
|
|
3
|
-
$alert?: boolean;
|
|
4
|
-
$disabled: boolean;
|
|
5
|
-
$variant: TVariant;
|
|
6
|
-
}>> & string;
|
|
1
|
+
declare const InputContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, never>> & string;
|
|
7
2
|
export { InputContainer };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { HTMLAttributes } from "react";
|
|
2
|
-
type TVariant = "web" | "platform";
|
|
3
2
|
/**
|
|
4
3
|
* Checkbox props.
|
|
5
4
|
* @interface ICheckboxProps
|
|
@@ -8,13 +7,11 @@ type TVariant = "web" | "platform";
|
|
|
8
7
|
* @property {string} name - Input name.
|
|
9
8
|
* @property {string} [label] - Checkbox label.
|
|
10
9
|
* @property {string} [value] - Checkbox value.
|
|
11
|
-
* @property {Function} [variant] - Checkbox variant type.
|
|
12
10
|
*/
|
|
13
11
|
interface ICheckboxProps extends HTMLAttributes<HTMLInputElement> {
|
|
14
12
|
disabled?: boolean;
|
|
15
13
|
label?: string;
|
|
16
14
|
name: string;
|
|
17
15
|
value?: string;
|
|
18
|
-
variant?: TVariant;
|
|
19
16
|
}
|
|
20
|
-
export type { ICheckboxProps
|
|
17
|
+
export type { ICheckboxProps };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const StyledDropdown: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, never>> & string;
|
|
2
|
+
declare const StyledOption: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, never>> & string;
|
|
3
|
+
export { StyledDropdown, StyledOption };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { Key } from "react-aria";
|
|
2
|
+
import type { ComboBoxState } from "react-stately";
|
|
3
|
+
import type { IOutlineContainerProps } from "../../types";
|
|
4
|
+
/**
|
|
5
|
+
* Props for the item component.
|
|
6
|
+
* @interface IItem
|
|
7
|
+
* @property { string } name - The name of the item.
|
|
8
|
+
* @property { string } value - The value of the item.
|
|
9
|
+
*/
|
|
10
|
+
interface IItem {
|
|
11
|
+
name: string;
|
|
12
|
+
value: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Props for the option component.
|
|
16
|
+
* @interface IOptionProps
|
|
17
|
+
* @property { IItem } item - The item to be rendered as an option.
|
|
18
|
+
* @property { ComboBoxState<T> } state - The state of the ComboBox.
|
|
19
|
+
*/
|
|
20
|
+
interface IOptionProps<T> {
|
|
21
|
+
item: IItem;
|
|
22
|
+
state: ComboBoxState<T>;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Props for the Select component.
|
|
26
|
+
* @interface IComboBoxProps
|
|
27
|
+
* @property { boolean } [disabled] - Whether the Select is disabled.
|
|
28
|
+
* @property { string } name - The name of the Select.
|
|
29
|
+
* @property { IItem[] } items - The items to be rendered as options.
|
|
30
|
+
* @property { Function } onChange - The callback function to be called when the value of the Select changes.
|
|
31
|
+
* @property { string } value - The value of the Select.
|
|
32
|
+
*/
|
|
33
|
+
interface IComboBoxProps extends Partial<Omit<IOutlineContainerProps, "maxLength" | "value">> {
|
|
34
|
+
disabled?: boolean;
|
|
35
|
+
name: string;
|
|
36
|
+
items: IItem[];
|
|
37
|
+
onChange: (key: Key | null) => void;
|
|
38
|
+
value: string;
|
|
39
|
+
}
|
|
40
|
+
export type { IItem, IOptionProps, IComboBoxProps };
|
|
@@ -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,3 +1,4 @@
|
|
|
1
|
+
import { ComboBox } from "./fields/combobox";
|
|
1
2
|
import { InputDate } from "./fields/date";
|
|
2
3
|
import { InputDateRange } from "./fields/date-range";
|
|
3
4
|
import { InputDateTime } from "./fields/date-time";
|
|
@@ -10,4 +11,4 @@ import { InputNumberRange } from "./fields/number-range";
|
|
|
10
11
|
import { PhoneInput } from "./fields/phone";
|
|
11
12
|
import { TextArea } from "./fields/text-area";
|
|
12
13
|
import { OutlineContainer } from "./outline-container";
|
|
13
|
-
export { OutlineContainer, PhoneInput, Input, InputDate, InputDateRange, InputDateTime, InputFile, InputNumber, InputTags, InputNumberRange, TextArea, Editable, };
|
|
14
|
+
export { OutlineContainer, PhoneInput, ComboBox, Input, InputDate, InputDateRange, InputDateTime, InputFile, InputNumber, InputTags, InputNumberRange, TextArea, Editable, };
|
|
@@ -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,4 +1,4 @@
|
|
|
1
1
|
import { PropsWithChildren } from "react";
|
|
2
2
|
import type { IPopoverProps } from "../types";
|
|
3
|
-
declare const Popover: ({ children, isFilter, state, ...props }: Readonly<PropsWithChildren<IPopoverProps>>) => JSX.Element;
|
|
3
|
+
declare const Popover: ({ className, children, isFilter, popoverRef, state, triggerRef, ...props }: Readonly<PropsWithChildren<IPopoverProps>>) => JSX.Element;
|
|
4
4
|
export { Popover };
|
|
@@ -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.
|
|
@@ -23,11 +21,15 @@ interface IActionButtonProps extends Pick<IIconModifiable, "icon">, IBorderModif
|
|
|
23
21
|
* Popover component props.
|
|
24
22
|
* @interface IPopoverProps
|
|
25
23
|
* @extends AriaPopoverProps
|
|
24
|
+
* @property {string} [className] - The class name of the popover.
|
|
26
25
|
* @property {boolean} [isFilter] - Indicates if the popover is a filter.
|
|
27
26
|
* @property {OverlayTriggerState} state - The state of the overlay trigger.
|
|
27
|
+
* @property {RefObject} [popoverRef] - The ref of the popover.
|
|
28
28
|
*/
|
|
29
29
|
interface IPopoverProps extends Omit<AriaPopoverProps, "popoverRef"> {
|
|
30
|
+
className?: string;
|
|
30
31
|
isFilter?: boolean;
|
|
32
|
+
popoverRef?: React.MutableRefObject<HTMLDivElement | null>;
|
|
31
33
|
state: OverlayTriggerState;
|
|
32
34
|
}
|
|
33
35
|
/**
|
|
@@ -38,21 +40,15 @@ interface IPopoverProps extends Omit<AriaPopoverProps, "popoverRef"> {
|
|
|
38
40
|
* @property {string} [error] - The error message.
|
|
39
41
|
* @property {React.MutableRefObject<null>} datePickerRef - The ref of the date picker.
|
|
40
42
|
* @property {boolean} [disabled] - Indicates if the date selector is disabled.
|
|
41
|
-
* @property {Function} [handleOnChange] - The function to be called when the date is changed.
|
|
42
43
|
* @property {React.Ref<HTMLInputElement>} inputRef - The ref of the input.
|
|
43
|
-
* @property {boolean} isOpen - Indicates if the date selector is open.
|
|
44
44
|
* @property {string} name - The name of the date selector.
|
|
45
|
-
* @property {string} [variant] - The variant of the date selector.
|
|
46
45
|
*/
|
|
47
46
|
interface IDateSelectorProps extends Pick<DatePickerAria, "buttonProps" | "fieldProps" | "groupProps">, Pick<AriaDatePickerProps<DateValue>, "granularity"> {
|
|
48
47
|
error?: string;
|
|
49
48
|
datePickerRef: React.MutableRefObject<null>;
|
|
50
49
|
disabled?: boolean;
|
|
51
|
-
handleOnChange?: (value: DateValue) => void;
|
|
52
50
|
inputRef: React.Ref<HTMLInputElement>;
|
|
53
|
-
isOpen: boolean;
|
|
54
51
|
name: string;
|
|
55
|
-
variant?: "range";
|
|
56
52
|
}
|
|
57
53
|
/**
|
|
58
54
|
* Date segment component props.
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
declare const LabelContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components
|
|
2
|
-
$disabled: boolean;
|
|
3
|
-
}>> & string;
|
|
1
|
+
declare const LabelContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, never>> & string;
|
|
4
2
|
declare const CheckMark: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
5
3
|
ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
|
|
6
4
|
}>, never>, never>> & string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { AriaSliderThumbOptions } from "
|
|
2
|
-
import type { SliderState, SliderStateOptions } from "
|
|
1
|
+
import type { AriaSliderThumbOptions } from "react-aria";
|
|
2
|
+
import type { SliderState, SliderStateOptions } from "react-stately";
|
|
3
3
|
/**
|
|
4
4
|
* Slider thumb component props.
|
|
5
5
|
* @interface ISliderThumbProps
|
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",
|
|
@@ -47,8 +53,7 @@
|
|
|
47
53
|
"tailwindcss": "3.4.16",
|
|
48
54
|
"typescript": "5.7.2",
|
|
49
55
|
"typescript-eslint": "8.18.0",
|
|
50
|
-
"vite": "6.0.3"
|
|
51
|
-
"vite-plugin-css-injected-by-js": "3.5.2"
|
|
56
|
+
"vite": "6.0.3"
|
|
52
57
|
},
|
|
53
58
|
"eslintConfig": {
|
|
54
59
|
"extends": [
|
|
@@ -56,8 +61,16 @@
|
|
|
56
61
|
]
|
|
57
62
|
},
|
|
58
63
|
"exports": {
|
|
59
|
-
".":
|
|
60
|
-
|
|
64
|
+
".": {
|
|
65
|
+
"types": "./dist/types/index.d.ts",
|
|
66
|
+
"import": "./dist/index.mjs",
|
|
67
|
+
"require": "./dist/index.js"
|
|
68
|
+
},
|
|
69
|
+
"./button": {
|
|
70
|
+
"types": "./dist/types/components/button/types.d.ts",
|
|
71
|
+
"import": "./dist/button.mjs",
|
|
72
|
+
"require": "./dist/button.js"
|
|
73
|
+
}
|
|
61
74
|
},
|
|
62
75
|
"files": [
|
|
63
76
|
"README.md",
|
|
@@ -70,36 +83,20 @@
|
|
|
70
83
|
"fluidattacks"
|
|
71
84
|
],
|
|
72
85
|
"license": "MPL-2.0",
|
|
73
|
-
"main": "dist/index.
|
|
74
|
-
"module": "dist/index.
|
|
86
|
+
"main": "dist/index.js",
|
|
87
|
+
"module": "dist/index.mjs",
|
|
75
88
|
"name": "@fluidattacks/design",
|
|
76
89
|
"peerDependencies": {
|
|
77
90
|
"@cloudinary/react": "1.13.1",
|
|
78
91
|
"@cloudinary/url-gen": "1.21.0",
|
|
79
92
|
"@floating-ui/react-dom": "2.1.2",
|
|
80
|
-
"@fortawesome/free-solid-svg-icons": "6.7.
|
|
93
|
+
"@fortawesome/free-solid-svg-icons": "6.7.2",
|
|
81
94
|
"@fortawesome/react-fontawesome": "0.2.2",
|
|
82
|
-
"@internationalized/date": "3.6.0",
|
|
83
|
-
"@react-aria/button": "3.11.0",
|
|
84
|
-
"@react-aria/calendar": "3.6.0",
|
|
85
|
-
"@react-aria/datepicker": "3.12.0",
|
|
86
|
-
"@react-aria/dialog": "3.5.20",
|
|
87
|
-
"@react-aria/focus": "3.19.0",
|
|
88
|
-
"@react-aria/i18n": "3.12.4",
|
|
89
|
-
"@react-aria/overlays": "3.24.0",
|
|
90
|
-
"@react-aria/slider": "3.7.14",
|
|
91
|
-
"@react-stately/calendar": "3.6.0",
|
|
92
|
-
"@react-stately/datepicker": "3.11.0",
|
|
93
|
-
"@react-stately/overlays": "3.6.12",
|
|
94
|
-
"@react-stately/slider": "3.6.0",
|
|
95
|
-
"@react-types/shared": "3.26.0",
|
|
96
95
|
"dayjs": "1.11.13",
|
|
97
96
|
"lottie-light-react": "2.4.0",
|
|
98
97
|
"motion": "11.15.0",
|
|
99
98
|
"prismjs": "1.29.0",
|
|
100
|
-
"react-hook-form": "7.53.2",
|
|
101
99
|
"react-international-phone": "4.3.0",
|
|
102
|
-
"react-router-dom": "6.28.0",
|
|
103
100
|
"react-joyride": "2.9.3",
|
|
104
101
|
"react-tooltip": "5.28.0"
|
|
105
102
|
},
|
|
@@ -118,6 +115,6 @@
|
|
|
118
115
|
"storybook": "storybook dev",
|
|
119
116
|
"test-storybook": "test-storybook"
|
|
120
117
|
},
|
|
121
|
-
"
|
|
122
|
-
"version": "3.
|
|
118
|
+
"typings": "dist/types/index.d.ts",
|
|
119
|
+
"version": "3.1.0"
|
|
123
120
|
}
|