@fluidattacks/design 3.0.1 → 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 +9377 -8124
- 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/index.d.ts +2 -1
- package/dist/types/components/inputs/utils/popover/index.d.ts +1 -1
- package/dist/types/components/inputs/utils/types.d.ts +4 -6
- package/dist/types/components/radio-button/styles.d.ts +1 -3
- package/package.json +15 -8
|
@@ -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,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,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 };
|
|
@@ -21,11 +21,15 @@ interface IActionButtonProps extends Pick<IIconModifiable, "icon">, IBorderModif
|
|
|
21
21
|
* Popover component props.
|
|
22
22
|
* @interface IPopoverProps
|
|
23
23
|
* @extends AriaPopoverProps
|
|
24
|
+
* @property {string} [className] - The class name of the popover.
|
|
24
25
|
* @property {boolean} [isFilter] - Indicates if the popover is a filter.
|
|
25
26
|
* @property {OverlayTriggerState} state - The state of the overlay trigger.
|
|
27
|
+
* @property {RefObject} [popoverRef] - The ref of the popover.
|
|
26
28
|
*/
|
|
27
29
|
interface IPopoverProps extends Omit<AriaPopoverProps, "popoverRef"> {
|
|
30
|
+
className?: string;
|
|
28
31
|
isFilter?: boolean;
|
|
32
|
+
popoverRef?: React.MutableRefObject<HTMLDivElement | null>;
|
|
29
33
|
state: OverlayTriggerState;
|
|
30
34
|
}
|
|
31
35
|
/**
|
|
@@ -36,21 +40,15 @@ interface IPopoverProps extends Omit<AriaPopoverProps, "popoverRef"> {
|
|
|
36
40
|
* @property {string} [error] - The error message.
|
|
37
41
|
* @property {React.MutableRefObject<null>} datePickerRef - The ref of the date picker.
|
|
38
42
|
* @property {boolean} [disabled] - Indicates if the date selector is disabled.
|
|
39
|
-
* @property {Function} [handleOnChange] - The function to be called when the date is changed.
|
|
40
43
|
* @property {React.Ref<HTMLInputElement>} inputRef - The ref of the input.
|
|
41
|
-
* @property {boolean} isOpen - Indicates if the date selector is open.
|
|
42
44
|
* @property {string} name - The name of the date selector.
|
|
43
|
-
* @property {string} [variant] - The variant of the date selector.
|
|
44
45
|
*/
|
|
45
46
|
interface IDateSelectorProps extends Pick<DatePickerAria, "buttonProps" | "fieldProps" | "groupProps">, Pick<AriaDatePickerProps<DateValue>, "granularity"> {
|
|
46
47
|
error?: string;
|
|
47
48
|
datePickerRef: React.MutableRefObject<null>;
|
|
48
49
|
disabled?: boolean;
|
|
49
|
-
handleOnChange?: (value: DateValue) => void;
|
|
50
50
|
inputRef: React.Ref<HTMLInputElement>;
|
|
51
|
-
isOpen: boolean;
|
|
52
51
|
name: string;
|
|
53
|
-
variant?: "range";
|
|
54
52
|
}
|
|
55
53
|
/**
|
|
56
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;
|
package/package.json
CHANGED
|
@@ -53,8 +53,7 @@
|
|
|
53
53
|
"tailwindcss": "3.4.16",
|
|
54
54
|
"typescript": "5.7.2",
|
|
55
55
|
"typescript-eslint": "8.18.0",
|
|
56
|
-
"vite": "6.0.3"
|
|
57
|
-
"vite-plugin-css-injected-by-js": "3.5.2"
|
|
56
|
+
"vite": "6.0.3"
|
|
58
57
|
},
|
|
59
58
|
"eslintConfig": {
|
|
60
59
|
"extends": [
|
|
@@ -62,8 +61,16 @@
|
|
|
62
61
|
]
|
|
63
62
|
},
|
|
64
63
|
"exports": {
|
|
65
|
-
".":
|
|
66
|
-
|
|
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
|
+
}
|
|
67
74
|
},
|
|
68
75
|
"files": [
|
|
69
76
|
"README.md",
|
|
@@ -76,8 +83,8 @@
|
|
|
76
83
|
"fluidattacks"
|
|
77
84
|
],
|
|
78
85
|
"license": "MPL-2.0",
|
|
79
|
-
"main": "dist/index.
|
|
80
|
-
"module": "dist/index.
|
|
86
|
+
"main": "dist/index.js",
|
|
87
|
+
"module": "dist/index.mjs",
|
|
81
88
|
"name": "@fluidattacks/design",
|
|
82
89
|
"peerDependencies": {
|
|
83
90
|
"@cloudinary/react": "1.13.1",
|
|
@@ -108,6 +115,6 @@
|
|
|
108
115
|
"storybook": "storybook dev",
|
|
109
116
|
"test-storybook": "test-storybook"
|
|
110
117
|
},
|
|
111
|
-
"
|
|
112
|
-
"version": "3.0
|
|
118
|
+
"typings": "dist/types/index.d.ts",
|
|
119
|
+
"version": "3.1.0"
|
|
113
120
|
}
|