infinity-ui-elements 1.8.12 → 1.8.14

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.
@@ -0,0 +1,73 @@
1
+ import * as React from "react";
2
+ import { type TextFieldProps } from "../TextField";
3
+ import type { SelectOption } from "../Select";
4
+ export interface SelectTextFieldProps extends Omit<TextFieldProps, "suffix" | "onChange" | "value" | "defaultValue"> {
5
+ /**
6
+ * Text input value (controlled)
7
+ */
8
+ textValue?: string;
9
+ /**
10
+ * Default text input value (uncontrolled)
11
+ */
12
+ defaultTextValue?: string;
13
+ /**
14
+ * Callback when text input changes
15
+ */
16
+ onTextChange?: (value: string) => void;
17
+ /**
18
+ * Options for the select dropdown
19
+ */
20
+ selectOptions?: SelectOption[];
21
+ /**
22
+ * Selected value for the select (controlled)
23
+ */
24
+ selectValue?: string | number;
25
+ /**
26
+ * Default selected value for the select (uncontrolled)
27
+ */
28
+ defaultSelectValue?: string | number;
29
+ /**
30
+ * Callback when select value changes
31
+ */
32
+ onSelectChange?: (value: string | number, option: SelectOption) => void;
33
+ /**
34
+ * Placeholder for the select dropdown
35
+ */
36
+ selectPlaceholder?: string;
37
+ /**
38
+ * Custom class for the select trigger
39
+ */
40
+ selectTriggerClassName?: string;
41
+ /**
42
+ * Custom class for the select dropdown menu
43
+ */
44
+ selectMenuClassName?: string;
45
+ /**
46
+ * Width of the select dropdown menu
47
+ */
48
+ selectMenuWidth?: "auto" | "full" | string;
49
+ /**
50
+ * Section heading for the select dropdown
51
+ */
52
+ selectSectionHeading?: string;
53
+ /**
54
+ * Empty state title for select
55
+ */
56
+ selectEmptyTitle?: string;
57
+ /**
58
+ * Empty state description for select
59
+ */
60
+ selectEmptyDescription?: string;
61
+ /**
62
+ * Empty state icon for select
63
+ */
64
+ selectEmptyIcon?: React.ReactNode;
65
+ }
66
+ declare const selectTriggerVariants: (props?: ({
67
+ size?: "medium" | "large" | "small" | null | undefined;
68
+ validationState?: "none" | "positive" | "negative" | null | undefined;
69
+ isDisabled?: boolean | null | undefined;
70
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
71
+ export declare const SelectTextField: React.ForwardRefExoticComponent<SelectTextFieldProps & React.RefAttributes<HTMLInputElement>>;
72
+ export { selectTriggerVariants };
73
+ //# sourceMappingURL=SelectTextField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectTextField.d.ts","sourceRoot":"","sources":["../../../src/components/SelectTextField/SelectTextField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAI9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE9C,MAAM,WAAW,oBACf,SAAQ,IAAI,CACV,cAAc,EACd,QAAQ,GAAG,UAAU,GAAG,OAAO,GAAG,cAAc,CACjD;IACD;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC;;OAEG;IACH,aAAa,CAAC,EAAE,YAAY,EAAE,CAAC;IAC/B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC9B;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACrC;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,MAAM,EAAE,YAAY,KAAK,IAAI,CAAC;IACxE;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;OAEG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IAC3C;;OAEG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC;;OAEG;IACH,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACnC;AAED,QAAA,MAAM,qBAAqB;;;;mFAyB1B,CAAC;AAEF,eAAO,MAAM,eAAe,+FAqW3B,CAAC;AAIF,OAAO,EAAE,qBAAqB,EAAE,CAAC"}
@@ -0,0 +1,21 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { SelectTextField } from "./SelectTextField";
3
+ declare const meta: Meta<typeof SelectTextField>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof SelectTextField>;
6
+ export declare const Default: Story;
7
+ export declare const WithValues: Story;
8
+ export declare const Currency: Story;
9
+ export declare const Weight: Story;
10
+ export declare const Success: Story;
11
+ export declare const Error: Story;
12
+ export declare const Disabled: Story;
13
+ export declare const Small: Story;
14
+ export declare const Medium: Story;
15
+ export declare const Large: Story;
16
+ export declare const Controlled: Story;
17
+ export declare const TimeTracking: Story;
18
+ export declare const Quantity: Story;
19
+ export declare const AllStates: Story;
20
+ export declare const SizeComparison: Story;
21
+ //# sourceMappingURL=SelectTextField.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectTextField.stories.d.ts","sourceRoot":"","sources":["../../../src/components/SelectTextField/SelectTextField.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGpD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,eAAe,CAuBtC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,eAAe,CAAC,CAAC;AA4B9C,eAAO,MAAM,OAAO,EAAE,KASrB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAWxB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAWtB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KASpB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAWrB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KASnB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAYtB,CAAC;AAGF,eAAO,MAAM,KAAK,EAAE,KASnB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KASpB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KASnB,CAAC;AAGF,eAAO,MAAM,UAAU,EAAE,KAgCxB,CAAC;AAGF,eAAO,MAAM,YAAY,EAAE,KAa1B,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAatB,CAAC;AAGF,eAAO,MAAM,SAAS,EAAE,KAoEvB,CAAC;AAGF,eAAO,MAAM,cAAc,EAAE,KA0C5B,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { SelectTextField, selectTriggerVariants } from "./SelectTextField";
2
+ export type { SelectTextFieldProps } from "./SelectTextField";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SelectTextField/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC3E,YAAY,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,49 @@
1
+ import * as React from "react";
2
+ declare const uploadBoxVariants: (props?: ({
3
+ size?: "medium" | "large" | "small" | null | undefined;
4
+ validationState?: "none" | "positive" | "negative" | null | undefined;
5
+ isDisabled?: boolean | null | undefined;
6
+ isDragging?: boolean | null | undefined;
7
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
8
+ export interface UploadedFile {
9
+ file?: File;
10
+ url?: string;
11
+ name?: string;
12
+ size?: number;
13
+ preview?: string;
14
+ id: string;
15
+ }
16
+ export interface UploadBoxProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> {
17
+ label?: string;
18
+ helperText?: string;
19
+ errorText?: string;
20
+ successText?: string;
21
+ size?: "small" | "medium" | "large";
22
+ validationState?: "none" | "positive" | "negative";
23
+ isDisabled?: boolean;
24
+ isRequired?: boolean;
25
+ isOptional?: boolean;
26
+ accept?: string;
27
+ multiple?: boolean;
28
+ maxSize?: number;
29
+ maxFiles?: number;
30
+ value?: File | File[] | UploadedFile | UploadedFile[] | string | string[];
31
+ onChange?: (files: File | File[] | null) => void;
32
+ onFileRemove?: (file: File | UploadedFile) => void;
33
+ containerClassName?: string;
34
+ labelClassName?: string;
35
+ uploadAreaClassName?: string;
36
+ previewClassName?: string;
37
+ infoHeading?: string;
38
+ infoDescription?: string;
39
+ LinkComponent?: React.ReactNode;
40
+ linkText?: string;
41
+ linkHref?: string;
42
+ onLinkClick?: (e: React.MouseEvent<HTMLAnchorElement>) => void;
43
+ uploadText?: string;
44
+ dragText?: string;
45
+ showPreview?: boolean;
46
+ }
47
+ declare const UploadBox: React.ForwardRefExoticComponent<UploadBoxProps & React.RefAttributes<HTMLDivElement>>;
48
+ export { UploadBox, uploadBoxVariants };
49
+ //# sourceMappingURL=UploadBox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UploadBox.d.ts","sourceRoot":"","sources":["../../../src/components/UploadBox/UploadBox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,QAAA,MAAM,iBAAiB;;;;;mFAoDtB,CAAC;AAEF,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CA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MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAC/D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAgFD,QAAA,MAAM,SAAS,uFA+ed,CAAC;AAIF,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC"}
@@ -0,0 +1,29 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { UploadBox } from "./UploadBox";
3
+ declare const meta: Meta<typeof UploadBox>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof UploadBox>;
6
+ export declare const Default: Story;
7
+ export declare const WithLabel: Story;
8
+ export declare const MultipleFiles: Story;
9
+ export declare const ImageOnly: Story;
10
+ export declare const WithMaxSize: Story;
11
+ export declare const Success: Story;
12
+ export declare const Error: Story;
13
+ export declare const Disabled: Story;
14
+ export declare const Small: Story;
15
+ export declare const Medium: Story;
16
+ export declare const Large: Story;
17
+ export declare const Interactive: Story;
18
+ export declare const WithImagePreview: Story;
19
+ export declare const WithPdfPreview: Story;
20
+ export declare const AllStates: Story;
21
+ export declare const SizeComparison: Story;
22
+ export declare const MinimalWithoutLabel: Story;
23
+ export declare const WithCustomText: Story;
24
+ export declare const WithFileTypeRestrictions: Story;
25
+ export declare const WithImageUrl: Story;
26
+ export declare const WithMultipleUrls: Story;
27
+ export declare const WithPdfUrl: Story;
28
+ export declare const WithUrlAndFile: Story;
29
+ //# sourceMappingURL=UploadBox.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UploadBox.stories.d.ts","sourceRoot":"","sources":["../../../src/components/UploadBox/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AAEF,eAAO,MAAM,UAAU,EAAE,KAexB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAiC5B,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { UploadBox, uploadBoxVariants } from "./UploadBox";
2
+ export type { UploadBoxProps, UploadedFile } from "./UploadBox";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/UploadBox/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC3D,YAAY,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC"}