infinity-ui-elements 1.8.8 → 1.8.10
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/components/DatePicker/DatePicker.d.ts +124 -0
- package/dist/components/DatePicker/DatePicker.d.ts.map +1 -0
- package/dist/components/DatePicker/DatePicker.stories.d.ts +26 -0
- package/dist/components/DatePicker/DatePicker.stories.d.ts.map +1 -0
- package/dist/components/DatePicker/index.d.ts +3 -0
- package/dist/components/DatePicker/index.d.ts.map +1 -0
- package/dist/components/SearchableDropdown/SearchableDropdown.stories.d.ts +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +586 -354
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +586 -352
- package/dist/index.js.map +1 -1
- package/package.json +4 -1
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import "react-calendar/dist/Calendar.css";
|
|
3
|
+
declare const datePickerVariants: (props?: ({
|
|
4
|
+
size?: "medium" | "large" | "small" | null | undefined;
|
|
5
|
+
validationState?: "none" | "positive" | "negative" | null | undefined;
|
|
6
|
+
isDisabled?: boolean | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
8
|
+
export interface DatePickerProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue"> {
|
|
9
|
+
/**
|
|
10
|
+
* Selected date (controlled)
|
|
11
|
+
*/
|
|
12
|
+
value?: Date | string | null;
|
|
13
|
+
/**
|
|
14
|
+
* Default selected date (uncontrolled)
|
|
15
|
+
*/
|
|
16
|
+
defaultValue?: Date | string | null;
|
|
17
|
+
/**
|
|
18
|
+
* Callback when date changes
|
|
19
|
+
*/
|
|
20
|
+
onChange?: (date: Date | null) => void;
|
|
21
|
+
/**
|
|
22
|
+
* Placeholder text when no date is selected
|
|
23
|
+
*/
|
|
24
|
+
placeholder?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Label for the date picker
|
|
27
|
+
*/
|
|
28
|
+
label?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Helper text below the date picker
|
|
31
|
+
*/
|
|
32
|
+
helperText?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Error text (overrides helperText when present)
|
|
35
|
+
*/
|
|
36
|
+
errorText?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Success text (overrides helperText when present)
|
|
39
|
+
*/
|
|
40
|
+
successText?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Validation state for the date picker
|
|
43
|
+
*/
|
|
44
|
+
validationState?: "none" | "positive" | "negative";
|
|
45
|
+
/**
|
|
46
|
+
* Whether the date picker is disabled
|
|
47
|
+
*/
|
|
48
|
+
isDisabled?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Whether the date picker is required
|
|
51
|
+
*/
|
|
52
|
+
isRequired?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Whether the date picker is optional
|
|
55
|
+
*/
|
|
56
|
+
isOptional?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Size of the date picker
|
|
59
|
+
*/
|
|
60
|
+
size?: "small" | "medium" | "large";
|
|
61
|
+
/**
|
|
62
|
+
* Show clear button when value is selected
|
|
63
|
+
*/
|
|
64
|
+
showClearButton?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Callback when clear button is clicked
|
|
67
|
+
*/
|
|
68
|
+
onClear?: () => void;
|
|
69
|
+
/**
|
|
70
|
+
* Custom class for the container
|
|
71
|
+
*/
|
|
72
|
+
containerClassName?: string;
|
|
73
|
+
/**
|
|
74
|
+
* Custom class for the label
|
|
75
|
+
*/
|
|
76
|
+
labelClassName?: string;
|
|
77
|
+
/**
|
|
78
|
+
* Custom class for the trigger button
|
|
79
|
+
*/
|
|
80
|
+
triggerClassName?: string;
|
|
81
|
+
/**
|
|
82
|
+
* Custom class for the calendar popup
|
|
83
|
+
*/
|
|
84
|
+
calendarClassName?: string;
|
|
85
|
+
/**
|
|
86
|
+
* Minimum selectable date
|
|
87
|
+
*/
|
|
88
|
+
minDate?: Date | string;
|
|
89
|
+
/**
|
|
90
|
+
* Maximum selectable date
|
|
91
|
+
*/
|
|
92
|
+
maxDate?: Date | string;
|
|
93
|
+
/**
|
|
94
|
+
* Date format function
|
|
95
|
+
*/
|
|
96
|
+
formatDate?: (date: Date) => string;
|
|
97
|
+
/**
|
|
98
|
+
* Info heading for tooltip
|
|
99
|
+
*/
|
|
100
|
+
infoHeading?: string;
|
|
101
|
+
/**
|
|
102
|
+
* Info description for tooltip
|
|
103
|
+
*/
|
|
104
|
+
infoDescription?: string;
|
|
105
|
+
/**
|
|
106
|
+
* Custom Link component to render on the right side
|
|
107
|
+
*/
|
|
108
|
+
LinkComponent?: React.ReactNode;
|
|
109
|
+
/**
|
|
110
|
+
* Link text
|
|
111
|
+
*/
|
|
112
|
+
linkText?: string;
|
|
113
|
+
/**
|
|
114
|
+
* Link href
|
|
115
|
+
*/
|
|
116
|
+
linkHref?: string;
|
|
117
|
+
/**
|
|
118
|
+
* Link click handler
|
|
119
|
+
*/
|
|
120
|
+
onLinkClick?: (e: React.MouseEvent<HTMLAnchorElement>) => void;
|
|
121
|
+
}
|
|
122
|
+
export declare const DatePicker: React.ForwardRefExoticComponent<DatePickerProps & React.RefAttributes<HTMLDivElement>>;
|
|
123
|
+
export { datePickerVariants };
|
|
124
|
+
//# sourceMappingURL=DatePicker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../../src/components/DatePicker/DatePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,kCAAkC,CAAC;AAU1C,QAAA,MAAM,kBAAkB;;;;mFAyCvB,CAAC;AAEF,MAAM,WAAW,eACf,SAAQ,IAAI,CACV,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,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AEG;IACH,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,MAAM,CAAC;IACpC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;OAEG;IACH,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,WAAW,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;CAChE;AAqBD,eAAO,MAAM,UAAU,wFA6VtB,CAAC;AAIF,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { DatePicker } from "./DatePicker";
|
|
3
|
+
declare const meta: Meta<typeof DatePicker>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof DatePicker>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithValue: Story;
|
|
8
|
+
export declare const Success: Story;
|
|
9
|
+
export declare const Error: Story;
|
|
10
|
+
export declare const Disabled: Story;
|
|
11
|
+
export declare const WithClearButton: Story;
|
|
12
|
+
export declare const Small: Story;
|
|
13
|
+
export declare const Medium: Story;
|
|
14
|
+
export declare const Large: Story;
|
|
15
|
+
export declare const WithMinDate: Story;
|
|
16
|
+
export declare const WithMaxDate: Story;
|
|
17
|
+
export declare const WithDateRange: Story;
|
|
18
|
+
export declare const CustomDateFormat: Story;
|
|
19
|
+
export declare const Controlled: Story;
|
|
20
|
+
export declare const AllStates: Story;
|
|
21
|
+
export declare const SizeComparison: Story;
|
|
22
|
+
export declare const CompleteMatrix: Story;
|
|
23
|
+
export declare const MinimalWithoutLabel: Story;
|
|
24
|
+
export declare const OptionalField: Story;
|
|
25
|
+
export declare const WithInfoTooltip: Story;
|
|
26
|
+
//# sourceMappingURL=DatePicker.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatePicker.stories.d.ts","sourceRoot":"","sources":["../../../src/components/DatePicker/DatePicker.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,UAAU,CAwBjC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,UAAU,CAAC,CAAC;AAGzC,eAAO,MAAM,OAAO,EAAE,KAOrB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAOvB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAOrB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAOnB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAQtB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAQ7B,CAAC;AAGF,eAAO,MAAM,KAAK,EAAE,KAOnB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAOpB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAOnB,CAAC;AAGF,eAAO,MAAM,WAAW,EAAE,KAQzB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAQzB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAS3B,CAAC;AAGF,eAAO,MAAM,gBAAgB,EAAE,KAe9B,CAAC;AAGF,eAAO,MAAM,UAAU,EAAE,KAqBxB,CAAC;AAGF,eAAO,MAAM,SAAS,EAAE,KAoEvB,CAAC;AAGF,eAAO,MAAM,cAAc,EAAE,KAoC5B,CAAC;AAGF,eAAO,MAAM,cAAc,EAAE,KA2F5B,CAAC;AAGF,eAAO,MAAM,mBAAmB,EAAE,KAIjC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAO3B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAU7B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DatePicker/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAC9D,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -345,9 +345,9 @@ declare const meta: {
|
|
|
345
345
|
linkHref?: string | undefined;
|
|
346
346
|
onLinkClick?: ((e: React.MouseEvent<HTMLAnchorElement>) => void) | undefined;
|
|
347
347
|
successText?: string | undefined;
|
|
348
|
-
suffix?: React.ReactNode;
|
|
349
348
|
showClearButton?: boolean | undefined;
|
|
350
349
|
onClear?: (() => void) | undefined;
|
|
350
|
+
suffix?: React.ReactNode;
|
|
351
351
|
inputClassName?: string | undefined;
|
|
352
352
|
ref?: React.LegacyRef<HTMLInputElement> | undefined;
|
|
353
353
|
key?: React.Key | null | undefined;
|