@rovula/ui 0.0.7 → 0.0.9
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/cjs/bundle.css +136 -33
- package/dist/cjs/bundle.js +1 -1
- package/dist/cjs/bundle.js.map +1 -1
- package/dist/cjs/types/components/Dropdown/Dropdown.d.ts +26 -0
- package/dist/cjs/types/components/Dropdown/Dropdown.stories.d.ts +367 -0
- package/dist/cjs/types/components/Dropdown/Dropdown.styles.d.ts +11 -0
- package/dist/cjs/types/components/TextInput/TextInput.d.ts +3 -2
- package/dist/cjs/types/components/TextInput/TextInput.stories.d.ts +2 -16
- package/dist/cjs/types/components/TextInput/TextInput.styles.d.ts +0 -1
- package/dist/cjs/types/index.d.ts +1 -0
- package/dist/components/Dropdown/Dropdown.js +58 -0
- package/dist/components/Dropdown/Dropdown.stories.js +43 -0
- package/dist/components/Dropdown/Dropdown.styles.js +47 -0
- package/dist/components/TextInput/TextInput.js +3 -5
- package/dist/components/TextInput/TextInput.stories.js +1 -1
- package/dist/components/TextInput/TextInput.styles.js +13 -21
- package/dist/esm/bundle.css +136 -33
- package/dist/esm/bundle.js +1 -1
- package/dist/esm/bundle.js.map +1 -1
- package/dist/esm/types/components/Dropdown/Dropdown.d.ts +26 -0
- package/dist/esm/types/components/Dropdown/Dropdown.stories.d.ts +367 -0
- package/dist/esm/types/components/Dropdown/Dropdown.styles.d.ts +11 -0
- package/dist/esm/types/components/TextInput/TextInput.d.ts +3 -2
- package/dist/esm/types/components/TextInput/TextInput.stories.d.ts +2 -16
- package/dist/esm/types/components/TextInput/TextInput.styles.d.ts +0 -1
- package/dist/esm/types/index.d.ts +1 -0
- package/dist/index.d.ts +29 -2
- package/dist/index.js +1 -0
- package/dist/src/theme/global.css +170 -38
- package/package.json +1 -1
- package/src/components/Dropdown/Dropdown.stories.tsx +49 -0
- package/src/components/Dropdown/Dropdown.styles.ts +54 -0
- package/src/components/Dropdown/Dropdown.tsx +151 -0
- package/src/components/TextInput/TextInput.stories.tsx +3 -3
- package/src/components/TextInput/TextInput.styles.ts +13 -21
- package/src/components/TextInput/TextInput.tsx +14 -5
- package/src/index.ts +1 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { InputProps } from "../TextInput/TextInput";
|
|
2
|
+
type Options = {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
};
|
|
6
|
+
type DropdownProps = {
|
|
7
|
+
id?: string;
|
|
8
|
+
label?: string;
|
|
9
|
+
size?: "sm" | "md" | "lg";
|
|
10
|
+
rounded?: "none" | "normal" | "full";
|
|
11
|
+
variant?: "flat" | "outline" | "underline";
|
|
12
|
+
helperText?: string;
|
|
13
|
+
errorMessage?: string;
|
|
14
|
+
filterMode?: boolean;
|
|
15
|
+
fullwidth?: boolean;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
error?: boolean;
|
|
18
|
+
required?: boolean;
|
|
19
|
+
className?: string;
|
|
20
|
+
options: Options[];
|
|
21
|
+
value?: Options;
|
|
22
|
+
onChangeText?: InputProps["onChange"];
|
|
23
|
+
onSelect?: (value: Options) => void;
|
|
24
|
+
} & Omit<InputProps, "value">;
|
|
25
|
+
declare const Dropdown: ({ id, options, value, label, size, rounded, variant, helperText, errorMessage, fullwidth, disabled, error, filterMode, required, onChangeText, onSelect, ...props }: DropdownProps) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export default Dropdown;
|
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ id, options, value, label, size, rounded, variant, helperText, errorMessage, fullwidth, disabled, error, filterMode, required, onChangeText, onSelect, ...props }: {
|
|
5
|
+
id?: string | undefined;
|
|
6
|
+
label?: string | undefined;
|
|
7
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
8
|
+
rounded?: "none" | "normal" | "full" | undefined;
|
|
9
|
+
variant?: "outline" | "flat" | "underline" | undefined;
|
|
10
|
+
helperText?: string | undefined;
|
|
11
|
+
errorMessage?: string | undefined;
|
|
12
|
+
filterMode?: boolean | undefined;
|
|
13
|
+
fullwidth?: boolean | undefined;
|
|
14
|
+
disabled?: boolean | undefined;
|
|
15
|
+
error?: boolean | undefined;
|
|
16
|
+
required?: boolean | undefined;
|
|
17
|
+
className?: string | undefined;
|
|
18
|
+
options: {
|
|
19
|
+
value: string;
|
|
20
|
+
label: string;
|
|
21
|
+
}[];
|
|
22
|
+
value?: {
|
|
23
|
+
value: string;
|
|
24
|
+
label: string;
|
|
25
|
+
} | undefined;
|
|
26
|
+
onChangeText?: React.ChangeEventHandler<HTMLInputElement> | undefined;
|
|
27
|
+
onSelect?: ((value: {
|
|
28
|
+
value: string;
|
|
29
|
+
label: string;
|
|
30
|
+
}) => void) | undefined;
|
|
31
|
+
} & Omit<import("../TextInput/TextInput").InputProps, "value">) => import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
tags: string[];
|
|
33
|
+
parameters: {
|
|
34
|
+
layout: string;
|
|
35
|
+
};
|
|
36
|
+
decorators: ((Story: import("@storybook/types").PartialStoryFn<import("@storybook/react").ReactRenderer, {
|
|
37
|
+
id?: string | undefined;
|
|
38
|
+
label?: string | undefined;
|
|
39
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
40
|
+
rounded?: "none" | "normal" | "full" | undefined;
|
|
41
|
+
variant?: "outline" | "flat" | "underline" | undefined;
|
|
42
|
+
helperText?: string | undefined;
|
|
43
|
+
errorMessage?: string | undefined;
|
|
44
|
+
filterMode?: boolean | undefined;
|
|
45
|
+
fullwidth?: boolean | undefined;
|
|
46
|
+
disabled?: boolean | undefined;
|
|
47
|
+
error?: boolean | undefined;
|
|
48
|
+
required?: boolean | undefined;
|
|
49
|
+
className?: string | undefined;
|
|
50
|
+
options: {
|
|
51
|
+
value: string;
|
|
52
|
+
label: string;
|
|
53
|
+
}[];
|
|
54
|
+
value?: {
|
|
55
|
+
value: string;
|
|
56
|
+
label: string;
|
|
57
|
+
} | undefined;
|
|
58
|
+
onChangeText?: React.ChangeEventHandler<HTMLInputElement> | undefined;
|
|
59
|
+
onSelect?: (((value: {
|
|
60
|
+
value: string;
|
|
61
|
+
label: string;
|
|
62
|
+
}) => void) & React.ReactEventHandler<HTMLInputElement>) | undefined;
|
|
63
|
+
color?: string | undefined;
|
|
64
|
+
title?: string | undefined;
|
|
65
|
+
children?: React.ReactNode;
|
|
66
|
+
endIcon?: React.ReactNode;
|
|
67
|
+
form?: string | undefined;
|
|
68
|
+
formAction?: string | undefined;
|
|
69
|
+
formEncType?: string | undefined;
|
|
70
|
+
formMethod?: string | undefined;
|
|
71
|
+
formNoValidate?: boolean | undefined;
|
|
72
|
+
formTarget?: string | undefined;
|
|
73
|
+
name?: string | undefined;
|
|
74
|
+
type?: React.HTMLInputTypeAttribute | undefined;
|
|
75
|
+
defaultChecked?: boolean | undefined;
|
|
76
|
+
defaultValue?: string | number | readonly string[] | undefined;
|
|
77
|
+
suppressContentEditableWarning?: boolean | undefined;
|
|
78
|
+
suppressHydrationWarning?: boolean | undefined;
|
|
79
|
+
accessKey?: string | undefined;
|
|
80
|
+
autoFocus?: boolean | undefined;
|
|
81
|
+
contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
82
|
+
contextMenu?: string | undefined;
|
|
83
|
+
dir?: string | undefined;
|
|
84
|
+
draggable?: (boolean | "true" | "false") | undefined;
|
|
85
|
+
hidden?: boolean | undefined;
|
|
86
|
+
lang?: string | undefined;
|
|
87
|
+
nonce?: string | undefined;
|
|
88
|
+
slot?: string | undefined;
|
|
89
|
+
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
90
|
+
style?: React.CSSProperties | undefined;
|
|
91
|
+
tabIndex?: number | undefined;
|
|
92
|
+
translate?: "yes" | "no" | undefined;
|
|
93
|
+
radioGroup?: string | undefined;
|
|
94
|
+
role?: React.AriaRole | undefined;
|
|
95
|
+
about?: string | undefined;
|
|
96
|
+
content?: string | undefined;
|
|
97
|
+
datatype?: string | undefined;
|
|
98
|
+
inlist?: any;
|
|
99
|
+
prefix?: string | undefined;
|
|
100
|
+
property?: string | undefined;
|
|
101
|
+
rel?: string | undefined;
|
|
102
|
+
resource?: string | undefined;
|
|
103
|
+
rev?: string | undefined;
|
|
104
|
+
typeof?: string | undefined;
|
|
105
|
+
vocab?: string | undefined;
|
|
106
|
+
autoCapitalize?: string | undefined;
|
|
107
|
+
autoCorrect?: string | undefined;
|
|
108
|
+
autoSave?: string | undefined;
|
|
109
|
+
itemProp?: string | undefined;
|
|
110
|
+
itemScope?: boolean | undefined;
|
|
111
|
+
itemType?: string | undefined;
|
|
112
|
+
itemID?: string | undefined;
|
|
113
|
+
itemRef?: string | undefined;
|
|
114
|
+
results?: number | undefined;
|
|
115
|
+
security?: string | undefined;
|
|
116
|
+
unselectable?: "on" | "off" | undefined;
|
|
117
|
+
inputMode?: "search" | "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
118
|
+
is?: string | undefined;
|
|
119
|
+
"aria-activedescendant"?: string | undefined;
|
|
120
|
+
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
121
|
+
"aria-autocomplete"?: "list" | "none" | "inline" | "both" | undefined;
|
|
122
|
+
"aria-braillelabel"?: string | undefined;
|
|
123
|
+
"aria-brailleroledescription"?: string | undefined;
|
|
124
|
+
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
125
|
+
"aria-checked"?: boolean | "true" | "false" | "mixed" | undefined;
|
|
126
|
+
"aria-colcount"?: number | undefined;
|
|
127
|
+
"aria-colindex"?: number | undefined;
|
|
128
|
+
"aria-colindextext"?: string | undefined;
|
|
129
|
+
"aria-colspan"?: number | undefined;
|
|
130
|
+
"aria-controls"?: string | undefined;
|
|
131
|
+
"aria-current"?: boolean | "true" | "false" | "date" | "time" | "step" | "page" | "location" | undefined;
|
|
132
|
+
"aria-describedby"?: string | undefined;
|
|
133
|
+
"aria-description"?: string | undefined;
|
|
134
|
+
"aria-details"?: string | undefined;
|
|
135
|
+
"aria-disabled"?: (boolean | "true" | "false") | undefined;
|
|
136
|
+
"aria-dropeffect"?: "link" | "none" | "copy" | "execute" | "move" | "popup" | undefined;
|
|
137
|
+
"aria-errormessage"?: string | undefined;
|
|
138
|
+
"aria-expanded"?: (boolean | "true" | "false") | undefined;
|
|
139
|
+
"aria-flowto"?: string | undefined;
|
|
140
|
+
"aria-grabbed"?: (boolean | "true" | "false") | undefined;
|
|
141
|
+
"aria-haspopup"?: boolean | "true" | "false" | "dialog" | "grid" | "listbox" | "menu" | "tree" | undefined;
|
|
142
|
+
"aria-hidden"?: (boolean | "true" | "false") | undefined;
|
|
143
|
+
"aria-invalid"?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
|
|
144
|
+
"aria-keyshortcuts"?: string | undefined;
|
|
145
|
+
"aria-label"?: string | undefined;
|
|
146
|
+
"aria-labelledby"?: string | undefined;
|
|
147
|
+
"aria-level"?: number | undefined;
|
|
148
|
+
"aria-live"?: "off" | "assertive" | "polite" | undefined;
|
|
149
|
+
"aria-modal"?: (boolean | "true" | "false") | undefined;
|
|
150
|
+
"aria-multiline"?: (boolean | "true" | "false") | undefined;
|
|
151
|
+
"aria-multiselectable"?: (boolean | "true" | "false") | undefined;
|
|
152
|
+
"aria-orientation"?: "horizontal" | "vertical" | undefined;
|
|
153
|
+
"aria-owns"?: string | undefined;
|
|
154
|
+
"aria-placeholder"?: string | undefined;
|
|
155
|
+
"aria-posinset"?: number | undefined;
|
|
156
|
+
"aria-pressed"?: boolean | "true" | "false" | "mixed" | undefined;
|
|
157
|
+
"aria-readonly"?: (boolean | "true" | "false") | undefined;
|
|
158
|
+
"aria-relevant"?: "text" | "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
|
|
159
|
+
"aria-required"?: (boolean | "true" | "false") | undefined;
|
|
160
|
+
"aria-roledescription"?: string | undefined;
|
|
161
|
+
"aria-rowcount"?: number | undefined;
|
|
162
|
+
"aria-rowindex"?: number | undefined;
|
|
163
|
+
"aria-rowindextext"?: string | undefined;
|
|
164
|
+
"aria-rowspan"?: number | undefined;
|
|
165
|
+
"aria-selected"?: (boolean | "true" | "false") | undefined;
|
|
166
|
+
"aria-setsize"?: number | undefined;
|
|
167
|
+
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
|
|
168
|
+
"aria-valuemax"?: number | undefined;
|
|
169
|
+
"aria-valuemin"?: number | undefined;
|
|
170
|
+
"aria-valuenow"?: number | undefined;
|
|
171
|
+
"aria-valuetext"?: string | undefined;
|
|
172
|
+
dangerouslySetInnerHTML?: {
|
|
173
|
+
__html: string | TrustedHTML;
|
|
174
|
+
} | undefined;
|
|
175
|
+
onCopy?: React.ClipboardEventHandler<HTMLInputElement> | undefined;
|
|
176
|
+
onCopyCapture?: React.ClipboardEventHandler<HTMLInputElement> | undefined;
|
|
177
|
+
onCut?: React.ClipboardEventHandler<HTMLInputElement> | undefined;
|
|
178
|
+
onCutCapture?: React.ClipboardEventHandler<HTMLInputElement> | undefined;
|
|
179
|
+
onPaste?: React.ClipboardEventHandler<HTMLInputElement> | undefined;
|
|
180
|
+
onPasteCapture?: React.ClipboardEventHandler<HTMLInputElement> | undefined;
|
|
181
|
+
onCompositionEnd?: React.CompositionEventHandler<HTMLInputElement> | undefined;
|
|
182
|
+
onCompositionEndCapture?: React.CompositionEventHandler<HTMLInputElement> | undefined;
|
|
183
|
+
onCompositionStart?: React.CompositionEventHandler<HTMLInputElement> | undefined;
|
|
184
|
+
onCompositionStartCapture?: React.CompositionEventHandler<HTMLInputElement> | undefined;
|
|
185
|
+
onCompositionUpdate?: React.CompositionEventHandler<HTMLInputElement> | undefined;
|
|
186
|
+
onCompositionUpdateCapture?: React.CompositionEventHandler<HTMLInputElement> | undefined;
|
|
187
|
+
onFocus?: React.FocusEventHandler<HTMLInputElement> | undefined;
|
|
188
|
+
onFocusCapture?: React.FocusEventHandler<HTMLInputElement> | undefined;
|
|
189
|
+
onBlur?: React.FocusEventHandler<HTMLInputElement> | undefined;
|
|
190
|
+
onBlurCapture?: React.FocusEventHandler<HTMLInputElement> | undefined;
|
|
191
|
+
onChange?: React.ChangeEventHandler<HTMLInputElement> | undefined;
|
|
192
|
+
onChangeCapture?: React.FormEventHandler<HTMLInputElement> | undefined;
|
|
193
|
+
onBeforeInput?: React.FormEventHandler<HTMLInputElement> | undefined;
|
|
194
|
+
onBeforeInputCapture?: React.FormEventHandler<HTMLInputElement> | undefined;
|
|
195
|
+
onInput?: React.FormEventHandler<HTMLInputElement> | undefined;
|
|
196
|
+
onInputCapture?: React.FormEventHandler<HTMLInputElement> | undefined;
|
|
197
|
+
onReset?: React.FormEventHandler<HTMLInputElement> | undefined;
|
|
198
|
+
onResetCapture?: React.FormEventHandler<HTMLInputElement> | undefined;
|
|
199
|
+
onSubmit?: React.FormEventHandler<HTMLInputElement> | undefined;
|
|
200
|
+
onSubmitCapture?: React.FormEventHandler<HTMLInputElement> | undefined;
|
|
201
|
+
onInvalid?: React.FormEventHandler<HTMLInputElement> | undefined;
|
|
202
|
+
onInvalidCapture?: React.FormEventHandler<HTMLInputElement> | undefined;
|
|
203
|
+
onLoad?: React.ReactEventHandler<HTMLInputElement> | undefined;
|
|
204
|
+
onLoadCapture?: React.ReactEventHandler<HTMLInputElement> | undefined;
|
|
205
|
+
onError?: React.ReactEventHandler<HTMLInputElement> | undefined;
|
|
206
|
+
onErrorCapture?: React.ReactEventHandler<HTMLInputElement> | undefined;
|
|
207
|
+
onKeyDown?: React.KeyboardEventHandler<HTMLInputElement> | undefined;
|
|
208
|
+
onKeyDownCapture?: React.KeyboardEventHandler<HTMLInputElement> | undefined;
|
|
209
|
+
onKeyPress?: React.KeyboardEventHandler<HTMLInputElement> | undefined;
|
|
210
|
+
onKeyPressCapture?: React.KeyboardEventHandler<HTMLInputElement> | undefined;
|
|
211
|
+
onKeyUp?: React.KeyboardEventHandler<HTMLInputElement> | undefined;
|
|
212
|
+
onKeyUpCapture?: React.KeyboardEventHandler<HTMLInputElement> | undefined;
|
|
213
|
+
onAbort?: React.ReactEventHandler<HTMLInputElement> | undefined;
|
|
214
|
+
onAbortCapture?: React.ReactEventHandler<HTMLInputElement> | undefined;
|
|
215
|
+
onCanPlay?: React.ReactEventHandler<HTMLInputElement> | undefined;
|
|
216
|
+
onCanPlayCapture?: React.ReactEventHandler<HTMLInputElement> | undefined;
|
|
217
|
+
onCanPlayThrough?: React.ReactEventHandler<HTMLInputElement> | undefined;
|
|
218
|
+
onCanPlayThroughCapture?: React.ReactEventHandler<HTMLInputElement> | undefined;
|
|
219
|
+
onDurationChange?: React.ReactEventHandler<HTMLInputElement> | undefined;
|
|
220
|
+
onDurationChangeCapture?: React.ReactEventHandler<HTMLInputElement> | undefined;
|
|
221
|
+
onEmptied?: React.ReactEventHandler<HTMLInputElement> | undefined;
|
|
222
|
+
onEmptiedCapture?: React.ReactEventHandler<HTMLInputElement> | undefined;
|
|
223
|
+
onEncrypted?: React.ReactEventHandler<HTMLInputElement> | undefined;
|
|
224
|
+
onEncryptedCapture?: React.ReactEventHandler<HTMLInputElement> | undefined;
|
|
225
|
+
onEnded?: React.ReactEventHandler<HTMLInputElement> | undefined;
|
|
226
|
+
onEndedCapture?: React.ReactEventHandler<HTMLInputElement> | undefined;
|
|
227
|
+
onLoadedData?: React.ReactEventHandler<HTMLInputElement> | undefined;
|
|
228
|
+
onLoadedDataCapture?: React.ReactEventHandler<HTMLInputElement> | undefined;
|
|
229
|
+
onLoadedMetadata?: React.ReactEventHandler<HTMLInputElement> | undefined;
|
|
230
|
+
onLoadedMetadataCapture?: React.ReactEventHandler<HTMLInputElement> | undefined;
|
|
231
|
+
onLoadStart?: React.ReactEventHandler<HTMLInputElement> | undefined;
|
|
232
|
+
onLoadStartCapture?: React.ReactEventHandler<HTMLInputElement> | undefined;
|
|
233
|
+
onPause?: React.ReactEventHandler<HTMLInputElement> | undefined;
|
|
234
|
+
onPauseCapture?: React.ReactEventHandler<HTMLInputElement> | undefined;
|
|
235
|
+
onPlay?: React.ReactEventHandler<HTMLInputElement> | undefined;
|
|
236
|
+
onPlayCapture?: React.ReactEventHandler<HTMLInputElement> | undefined;
|
|
237
|
+
onPlaying?: React.ReactEventHandler<HTMLInputElement> | undefined;
|
|
238
|
+
onPlayingCapture?: React.ReactEventHandler<HTMLInputElement> | undefined;
|
|
239
|
+
onProgress?: React.ReactEventHandler<HTMLInputElement> | undefined;
|
|
240
|
+
onProgressCapture?: React.ReactEventHandler<HTMLInputElement> | undefined;
|
|
241
|
+
onRateChange?: React.ReactEventHandler<HTMLInputElement> | undefined;
|
|
242
|
+
onRateChangeCapture?: React.ReactEventHandler<HTMLInputElement> | undefined;
|
|
243
|
+
onResize?: React.ReactEventHandler<HTMLInputElement> | undefined;
|
|
244
|
+
onResizeCapture?: React.ReactEventHandler<HTMLInputElement> | undefined;
|
|
245
|
+
onSeeked?: React.ReactEventHandler<HTMLInputElement> | undefined;
|
|
246
|
+
onSeekedCapture?: React.ReactEventHandler<HTMLInputElement> | undefined;
|
|
247
|
+
onSeeking?: React.ReactEventHandler<HTMLInputElement> | undefined;
|
|
248
|
+
onSeekingCapture?: React.ReactEventHandler<HTMLInputElement> | undefined;
|
|
249
|
+
onStalled?: React.ReactEventHandler<HTMLInputElement> | undefined;
|
|
250
|
+
onStalledCapture?: React.ReactEventHandler<HTMLInputElement> | undefined;
|
|
251
|
+
onSuspend?: React.ReactEventHandler<HTMLInputElement> | undefined;
|
|
252
|
+
onSuspendCapture?: React.ReactEventHandler<HTMLInputElement> | undefined;
|
|
253
|
+
onTimeUpdate?: React.ReactEventHandler<HTMLInputElement> | undefined;
|
|
254
|
+
onTimeUpdateCapture?: React.ReactEventHandler<HTMLInputElement> | undefined;
|
|
255
|
+
onVolumeChange?: React.ReactEventHandler<HTMLInputElement> | undefined;
|
|
256
|
+
onVolumeChangeCapture?: React.ReactEventHandler<HTMLInputElement> | undefined;
|
|
257
|
+
onWaiting?: React.ReactEventHandler<HTMLInputElement> | undefined;
|
|
258
|
+
onWaitingCapture?: React.ReactEventHandler<HTMLInputElement> | undefined;
|
|
259
|
+
onAuxClick?: React.MouseEventHandler<HTMLInputElement> | undefined;
|
|
260
|
+
onAuxClickCapture?: React.MouseEventHandler<HTMLInputElement> | undefined;
|
|
261
|
+
onClick?: React.MouseEventHandler<HTMLInputElement> | undefined;
|
|
262
|
+
onClickCapture?: React.MouseEventHandler<HTMLInputElement> | undefined;
|
|
263
|
+
onContextMenu?: React.MouseEventHandler<HTMLInputElement> | undefined;
|
|
264
|
+
onContextMenuCapture?: React.MouseEventHandler<HTMLInputElement> | undefined;
|
|
265
|
+
onDoubleClick?: React.MouseEventHandler<HTMLInputElement> | undefined;
|
|
266
|
+
onDoubleClickCapture?: React.MouseEventHandler<HTMLInputElement> | undefined;
|
|
267
|
+
onDrag?: React.DragEventHandler<HTMLInputElement> | undefined;
|
|
268
|
+
onDragCapture?: React.DragEventHandler<HTMLInputElement> | undefined;
|
|
269
|
+
onDragEnd?: React.DragEventHandler<HTMLInputElement> | undefined;
|
|
270
|
+
onDragEndCapture?: React.DragEventHandler<HTMLInputElement> | undefined;
|
|
271
|
+
onDragEnter?: React.DragEventHandler<HTMLInputElement> | undefined;
|
|
272
|
+
onDragEnterCapture?: React.DragEventHandler<HTMLInputElement> | undefined;
|
|
273
|
+
onDragExit?: React.DragEventHandler<HTMLInputElement> | undefined;
|
|
274
|
+
onDragExitCapture?: React.DragEventHandler<HTMLInputElement> | undefined;
|
|
275
|
+
onDragLeave?: React.DragEventHandler<HTMLInputElement> | undefined;
|
|
276
|
+
onDragLeaveCapture?: React.DragEventHandler<HTMLInputElement> | undefined;
|
|
277
|
+
onDragOver?: React.DragEventHandler<HTMLInputElement> | undefined;
|
|
278
|
+
onDragOverCapture?: React.DragEventHandler<HTMLInputElement> | undefined;
|
|
279
|
+
onDragStart?: React.DragEventHandler<HTMLInputElement> | undefined;
|
|
280
|
+
onDragStartCapture?: React.DragEventHandler<HTMLInputElement> | undefined;
|
|
281
|
+
onDrop?: React.DragEventHandler<HTMLInputElement> | undefined;
|
|
282
|
+
onDropCapture?: React.DragEventHandler<HTMLInputElement> | undefined;
|
|
283
|
+
onMouseDown?: React.MouseEventHandler<HTMLInputElement> | undefined;
|
|
284
|
+
onMouseDownCapture?: React.MouseEventHandler<HTMLInputElement> | undefined;
|
|
285
|
+
onMouseEnter?: React.MouseEventHandler<HTMLInputElement> | undefined;
|
|
286
|
+
onMouseLeave?: React.MouseEventHandler<HTMLInputElement> | undefined;
|
|
287
|
+
onMouseMove?: React.MouseEventHandler<HTMLInputElement> | undefined;
|
|
288
|
+
onMouseMoveCapture?: React.MouseEventHandler<HTMLInputElement> | undefined;
|
|
289
|
+
onMouseOut?: React.MouseEventHandler<HTMLInputElement> | undefined;
|
|
290
|
+
onMouseOutCapture?: React.MouseEventHandler<HTMLInputElement> | undefined;
|
|
291
|
+
onMouseOver?: React.MouseEventHandler<HTMLInputElement> | undefined;
|
|
292
|
+
onMouseOverCapture?: React.MouseEventHandler<HTMLInputElement> | undefined;
|
|
293
|
+
onMouseUp?: React.MouseEventHandler<HTMLInputElement> | undefined;
|
|
294
|
+
onMouseUpCapture?: React.MouseEventHandler<HTMLInputElement> | undefined;
|
|
295
|
+
onSelectCapture?: React.ReactEventHandler<HTMLInputElement> | undefined;
|
|
296
|
+
onTouchCancel?: React.TouchEventHandler<HTMLInputElement> | undefined;
|
|
297
|
+
onTouchCancelCapture?: React.TouchEventHandler<HTMLInputElement> | undefined;
|
|
298
|
+
onTouchEnd?: React.TouchEventHandler<HTMLInputElement> | undefined;
|
|
299
|
+
onTouchEndCapture?: React.TouchEventHandler<HTMLInputElement> | undefined;
|
|
300
|
+
onTouchMove?: React.TouchEventHandler<HTMLInputElement> | undefined;
|
|
301
|
+
onTouchMoveCapture?: React.TouchEventHandler<HTMLInputElement> | undefined;
|
|
302
|
+
onTouchStart?: React.TouchEventHandler<HTMLInputElement> | undefined;
|
|
303
|
+
onTouchStartCapture?: React.TouchEventHandler<HTMLInputElement> | undefined;
|
|
304
|
+
onPointerDown?: React.PointerEventHandler<HTMLInputElement> | undefined;
|
|
305
|
+
onPointerDownCapture?: React.PointerEventHandler<HTMLInputElement> | undefined;
|
|
306
|
+
onPointerMove?: React.PointerEventHandler<HTMLInputElement> | undefined;
|
|
307
|
+
onPointerMoveCapture?: React.PointerEventHandler<HTMLInputElement> | undefined;
|
|
308
|
+
onPointerUp?: React.PointerEventHandler<HTMLInputElement> | undefined;
|
|
309
|
+
onPointerUpCapture?: React.PointerEventHandler<HTMLInputElement> | undefined;
|
|
310
|
+
onPointerCancel?: React.PointerEventHandler<HTMLInputElement> | undefined;
|
|
311
|
+
onPointerCancelCapture?: React.PointerEventHandler<HTMLInputElement> | undefined;
|
|
312
|
+
onPointerEnter?: React.PointerEventHandler<HTMLInputElement> | undefined;
|
|
313
|
+
onPointerLeave?: React.PointerEventHandler<HTMLInputElement> | undefined;
|
|
314
|
+
onPointerOver?: React.PointerEventHandler<HTMLInputElement> | undefined;
|
|
315
|
+
onPointerOverCapture?: React.PointerEventHandler<HTMLInputElement> | undefined;
|
|
316
|
+
onPointerOut?: React.PointerEventHandler<HTMLInputElement> | undefined;
|
|
317
|
+
onPointerOutCapture?: React.PointerEventHandler<HTMLInputElement> | undefined;
|
|
318
|
+
onGotPointerCapture?: React.PointerEventHandler<HTMLInputElement> | undefined;
|
|
319
|
+
onGotPointerCaptureCapture?: React.PointerEventHandler<HTMLInputElement> | undefined;
|
|
320
|
+
onLostPointerCapture?: React.PointerEventHandler<HTMLInputElement> | undefined;
|
|
321
|
+
onLostPointerCaptureCapture?: React.PointerEventHandler<HTMLInputElement> | undefined;
|
|
322
|
+
onScroll?: React.UIEventHandler<HTMLInputElement> | undefined;
|
|
323
|
+
onScrollCapture?: React.UIEventHandler<HTMLInputElement> | undefined;
|
|
324
|
+
onWheel?: React.WheelEventHandler<HTMLInputElement> | undefined;
|
|
325
|
+
onWheelCapture?: React.WheelEventHandler<HTMLInputElement> | undefined;
|
|
326
|
+
onAnimationStart?: React.AnimationEventHandler<HTMLInputElement> | undefined;
|
|
327
|
+
onAnimationStartCapture?: React.AnimationEventHandler<HTMLInputElement> | undefined;
|
|
328
|
+
onAnimationEnd?: React.AnimationEventHandler<HTMLInputElement> | undefined;
|
|
329
|
+
onAnimationEndCapture?: React.AnimationEventHandler<HTMLInputElement> | undefined;
|
|
330
|
+
onAnimationIteration?: React.AnimationEventHandler<HTMLInputElement> | undefined;
|
|
331
|
+
onAnimationIterationCapture?: React.AnimationEventHandler<HTMLInputElement> | undefined;
|
|
332
|
+
onTransitionEnd?: React.TransitionEventHandler<HTMLInputElement> | undefined;
|
|
333
|
+
onTransitionEndCapture?: React.TransitionEventHandler<HTMLInputElement> | undefined;
|
|
334
|
+
list?: string | undefined;
|
|
335
|
+
hasClearIcon?: boolean | undefined;
|
|
336
|
+
accept?: string | undefined;
|
|
337
|
+
alt?: string | undefined;
|
|
338
|
+
autoComplete?: React.HTMLInputAutoCompleteAttribute | undefined;
|
|
339
|
+
capture?: boolean | "user" | "environment" | undefined;
|
|
340
|
+
checked?: boolean | undefined;
|
|
341
|
+
enterKeyHint?: "search" | "enter" | "done" | "go" | "next" | "previous" | "send" | undefined;
|
|
342
|
+
height?: string | number | undefined;
|
|
343
|
+
max?: string | number | undefined;
|
|
344
|
+
maxLength?: number | undefined;
|
|
345
|
+
min?: string | number | undefined;
|
|
346
|
+
minLength?: number | undefined;
|
|
347
|
+
multiple?: boolean | undefined;
|
|
348
|
+
pattern?: string | undefined;
|
|
349
|
+
placeholder?: string | undefined;
|
|
350
|
+
readOnly?: boolean | undefined;
|
|
351
|
+
src?: string | undefined;
|
|
352
|
+
step?: string | number | undefined;
|
|
353
|
+
width?: string | number | undefined;
|
|
354
|
+
}>) => import("react/jsx-runtime").JSX.Element)[];
|
|
355
|
+
};
|
|
356
|
+
export default meta;
|
|
357
|
+
export declare const Default: {
|
|
358
|
+
args: {
|
|
359
|
+
label: string;
|
|
360
|
+
fullwidth: boolean;
|
|
361
|
+
options: {
|
|
362
|
+
value: string;
|
|
363
|
+
label: string;
|
|
364
|
+
}[];
|
|
365
|
+
};
|
|
366
|
+
render: (args: {}) => import("react/jsx-runtime").JSX.Element;
|
|
367
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const iconWrapperVariant: (props?: ({
|
|
2
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
3
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
4
|
+
export declare const dropdownIconVariant: (props?: ({
|
|
5
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
6
|
+
disabled?: boolean | null | undefined;
|
|
7
|
+
isFocus?: boolean | null | undefined;
|
|
8
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
9
|
+
export declare const customInputVariant: (props?: ({
|
|
10
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
11
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React, { FC } from "react";
|
|
2
|
-
type InputProps = {
|
|
1
|
+
import React, { FC, ReactNode } from "react";
|
|
2
|
+
export type InputProps = {
|
|
3
3
|
id?: string;
|
|
4
4
|
label?: string;
|
|
5
5
|
size?: "sm" | "md" | "lg";
|
|
@@ -13,6 +13,7 @@ type InputProps = {
|
|
|
13
13
|
error?: boolean;
|
|
14
14
|
required?: boolean;
|
|
15
15
|
hasClearIcon?: boolean;
|
|
16
|
+
endIcon?: ReactNode;
|
|
16
17
|
className?: string;
|
|
17
18
|
} & Omit<React.InputHTMLAttributes<HTMLInputElement>, "size">;
|
|
18
19
|
declare const TextInput: FC<InputProps>;
|
|
@@ -1,22 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: React.FC<
|
|
5
|
-
id?: string | undefined;
|
|
6
|
-
label?: string | undefined;
|
|
7
|
-
size?: "sm" | "md" | "lg" | undefined;
|
|
8
|
-
rounded?: "none" | "normal" | "full" | undefined;
|
|
9
|
-
variant?: "outline" | "flat" | "underline" | undefined;
|
|
10
|
-
type?: React.HTMLInputTypeAttribute | undefined;
|
|
11
|
-
helperText?: string | undefined;
|
|
12
|
-
errorMessage?: string | undefined;
|
|
13
|
-
fullwidth?: boolean | undefined;
|
|
14
|
-
disabled?: boolean | undefined;
|
|
15
|
-
error?: boolean | undefined;
|
|
16
|
-
required?: boolean | undefined;
|
|
17
|
-
hasClearIcon?: boolean | undefined;
|
|
18
|
-
className?: string | undefined;
|
|
19
|
-
} & Omit<React.InputHTMLAttributes<HTMLInputElement>, "size">>;
|
|
4
|
+
component: React.FC<import("./TextInput").InputProps>;
|
|
20
5
|
tags: string[];
|
|
21
6
|
parameters: {
|
|
22
7
|
layout: string;
|
|
@@ -35,6 +20,7 @@ declare const meta: {
|
|
|
35
20
|
error?: boolean | undefined;
|
|
36
21
|
required?: boolean | undefined;
|
|
37
22
|
hasClearIcon?: boolean | undefined;
|
|
23
|
+
endIcon?: React.ReactNode;
|
|
38
24
|
className?: string | undefined;
|
|
39
25
|
color?: string | undefined;
|
|
40
26
|
title?: string | undefined;
|
|
@@ -11,7 +11,6 @@ export declare const labelVariant: (props?: ({
|
|
|
11
11
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
12
12
|
disabled?: boolean | null | undefined;
|
|
13
13
|
error?: boolean | null | undefined;
|
|
14
|
-
isFloating?: boolean | null | undefined;
|
|
15
14
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
16
15
|
export declare const helperTextVariant: (props?: ({
|
|
17
16
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
@@ -4,4 +4,5 @@ export { default as Table } from "./components/Table/Table";
|
|
|
4
4
|
export { default as TextInput } from "./components/TextInput/TextInput";
|
|
5
5
|
export { default as Text } from "./components/Text/Text";
|
|
6
6
|
export { default as Tabs } from "./components/Tabs/Tabs";
|
|
7
|
+
export { default as Dropdown } from "./components/Dropdown/Dropdown";
|
|
7
8
|
export { resloveTimestamp, getStartDateOfDay, getEndDateOfDay, getStartEndTimestampOfDay, getTimestampUTC, } from "./utils/datetime";
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
|
+
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
25
|
+
import TextInput from "../TextInput/TextInput";
|
|
26
|
+
import { customInputVariant, dropdownIconVariant, iconWrapperVariant, } from "./Dropdown.styles";
|
|
27
|
+
import { ChevronDownIcon } from "@heroicons/react/16/solid";
|
|
28
|
+
var Dropdown = function (_a) {
|
|
29
|
+
var id = _a.id, options = _a.options, value = _a.value, label = _a.label, _b = _a.size, size = _b === void 0 ? "md" : _b, _c = _a.rounded, rounded = _c === void 0 ? "normal" : _c, _d = _a.variant, variant = _d === void 0 ? "outline" : _d, helperText = _a.helperText, errorMessage = _a.errorMessage, _e = _a.fullwidth, fullwidth = _e === void 0 ? true : _e, _f = _a.disabled, disabled = _f === void 0 ? false : _f, _g = _a.error, error = _g === void 0 ? false : _g, _h = _a.filterMode, filterMode = _h === void 0 ? false : _h, _j = _a.required, required = _j === void 0 ? true : _j, onChangeText = _a.onChangeText, onSelect = _a.onSelect, props = __rest(_a, ["id", "options", "value", "label", "size", "rounded", "variant", "helperText", "errorMessage", "fullwidth", "disabled", "error", "filterMode", "required", "onChangeText", "onSelect"]);
|
|
30
|
+
var _id = id || "".concat(label, "-select");
|
|
31
|
+
var _k = useState(false), isFocused = _k[0], setIsFocused = _k[1];
|
|
32
|
+
var _l = useState(null), selectedOption = _l[0], setSelectedOption = _l[1];
|
|
33
|
+
var _m = useState(""), textValue = _m[0], setTextValue = _m[1];
|
|
34
|
+
useEffect(function () {
|
|
35
|
+
if (value && !selectedOption) {
|
|
36
|
+
setSelectedOption(value);
|
|
37
|
+
}
|
|
38
|
+
}, [value, selectedOption]);
|
|
39
|
+
var handleOnChangeText = useCallback(function (event) {
|
|
40
|
+
onChangeText === null || onChangeText === void 0 ? void 0 : onChangeText(event);
|
|
41
|
+
setTextValue(event.target.value);
|
|
42
|
+
}, [onChangeText]);
|
|
43
|
+
var handleOptionClick = useCallback(function (option) {
|
|
44
|
+
setSelectedOption(option);
|
|
45
|
+
setTextValue(option.label);
|
|
46
|
+
onSelect === null || onSelect === void 0 ? void 0 : onSelect(option);
|
|
47
|
+
}, [onSelect]);
|
|
48
|
+
var optionsFiltered = useMemo(function () {
|
|
49
|
+
return options.filter(function (option) {
|
|
50
|
+
var _a;
|
|
51
|
+
return !filterMode ||
|
|
52
|
+
((_a = option.label) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(textValue === null || textValue === void 0 ? void 0 : textValue.toLowerCase()));
|
|
53
|
+
});
|
|
54
|
+
}, [options, filterMode, textValue]);
|
|
55
|
+
var renderOptions = function () { return (_jsxs("ul", { className: "absolute mt-1 w-full bg-white border border-gray-300 rounded-md shadow-md z-10 max-h-60 overflow-y-auto", children: [optionsFiltered.map(function (option) { return (_jsx("li", { onMouseDown: function () { return handleOptionClick(option); }, className: "px-4 py-2 hover:bg-gray-100 cursor-pointer ".concat((selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.value) === option.value ? " bg-gray-200" : ""), children: option.label }, option.value)); }), optionsFiltered.length === 0 && (_jsx("li", { className: "px-4 py-14 text-center text-input-text", children: "Not found" }))] })); };
|
|
56
|
+
return (_jsxs("div", { className: "relative ".concat(fullwidth ? "w-full" : ""), children: [_jsx(TextInput, __assign({}, props, { readOnly: !filterMode, value: textValue, onChange: handleOnChangeText, label: label, placeholder: " ", type: "text", rounded: rounded, variant: variant, helperText: helperText, errorMessage: errorMessage, fullwidth: fullwidth, error: error, required: required, id: _id, disabled: disabled, hasClearIcon: false, size: size, className: customInputVariant({ size: size }), onFocus: function () { return setIsFocused(true); }, onBlur: function () { return setIsFocused(false); }, endIcon: _jsx("div", { className: iconWrapperVariant({ size: size }), children: _jsx(ChevronDownIcon, { className: dropdownIconVariant({ size: size, isFocus: isFocused }) }) }) })), isFocused && renderOptions()] }));
|
|
57
|
+
};
|
|
58
|
+
export default Dropdown;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import Dropdown from "./Dropdown";
|
|
14
|
+
// More on how to set up stories at: https://storybook.js.org/docs/7.0/react/writing-stories/introduction
|
|
15
|
+
var meta = {
|
|
16
|
+
title: "Components/Dropdown",
|
|
17
|
+
component: Dropdown,
|
|
18
|
+
tags: ["autodocs"],
|
|
19
|
+
parameters: {
|
|
20
|
+
// More on how to position stories at: https://storybook.js.org/docs/7.0/react/configure/story-layout
|
|
21
|
+
layout: "fullscreen",
|
|
22
|
+
},
|
|
23
|
+
decorators: [
|
|
24
|
+
function (Story) { return (_jsx("div", { className: "p-5 flex w-full", children: _jsx(Story, {}) })); },
|
|
25
|
+
],
|
|
26
|
+
};
|
|
27
|
+
export default meta;
|
|
28
|
+
var options = new Array(100).fill("").map(function (__, index) { return ({
|
|
29
|
+
value: "option".concat(index + 1),
|
|
30
|
+
label: "Option ".concat(index + 1),
|
|
31
|
+
}); });
|
|
32
|
+
export var Default = {
|
|
33
|
+
args: {
|
|
34
|
+
label: "Choose an option:",
|
|
35
|
+
fullwidth: true,
|
|
36
|
+
options: options,
|
|
37
|
+
},
|
|
38
|
+
render: function (args) {
|
|
39
|
+
console.log("args ", args);
|
|
40
|
+
var props = __assign({}, args);
|
|
41
|
+
return (_jsxs("div", { className: "flex flex-row gap-4 w-full", children: [_jsx(Dropdown, __assign({ id: "1", size: "lg", options: options }, args)), _jsx(Dropdown, __assign({ id: "2", size: "md", options: options }, args)), _jsx(Dropdown, __assign({ id: "3", size: "sm", options: options }, args))] }));
|
|
42
|
+
},
|
|
43
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { cva } from "class-variance-authority";
|
|
2
|
+
export var iconWrapperVariant = cva(["absolute inset-y-0 right-0 flex items-center justify-center"], {
|
|
3
|
+
variants: {
|
|
4
|
+
size: {
|
|
5
|
+
sm: "mr-2",
|
|
6
|
+
md: "mr-3",
|
|
7
|
+
lg: "mr-4",
|
|
8
|
+
},
|
|
9
|
+
},
|
|
10
|
+
defaultVariants: {
|
|
11
|
+
size: "md",
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
export var dropdownIconVariant = cva(["transition-all"], {
|
|
15
|
+
variants: {
|
|
16
|
+
size: {
|
|
17
|
+
sm: "size-[14px]",
|
|
18
|
+
md: "size-5",
|
|
19
|
+
lg: "size-6",
|
|
20
|
+
},
|
|
21
|
+
disabled: {
|
|
22
|
+
true: "fill-input-text-disabled",
|
|
23
|
+
false: "fill-input-text",
|
|
24
|
+
},
|
|
25
|
+
isFocus: {
|
|
26
|
+
true: "fill-input-text-active rotate-180",
|
|
27
|
+
false: "",
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
defaultVariants: {
|
|
31
|
+
size: "md",
|
|
32
|
+
disabled: false,
|
|
33
|
+
isFocus: false,
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
export var customInputVariant = cva([], {
|
|
37
|
+
variants: {
|
|
38
|
+
size: {
|
|
39
|
+
sm: "pe-[30px]",
|
|
40
|
+
md: "pe-[40px]",
|
|
41
|
+
lg: "pe-[48px]",
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
defaultVariants: {
|
|
45
|
+
size: "md",
|
|
46
|
+
},
|
|
47
|
+
});
|