@blencm/ui 0.0.1
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/LICENSE +21 -0
- package/README.md +128 -0
- package/bin/blencm-ui.mjs +99 -0
- package/dist/components/Accordion/accordin.test.d.ts +1 -0
- package/dist/components/Accordion/accordion.d.ts +7 -0
- package/dist/components/Button/button.d.ts +26 -0
- package/dist/components/Button/button.test.d.ts +1 -0
- package/dist/components/Button/icon-button.d.ts +26 -0
- package/dist/components/Form/form-checkbox.d.ts +27 -0
- package/dist/components/Form/form-component.d.ts +44 -0
- package/dist/components/Form/form-date.d.ts +60 -0
- package/dist/components/Form/form-field.d.ts +33 -0
- package/dist/components/Form/form-select.d.ts +43 -0
- package/dist/components/Form/form-textarea.d.ts +31 -0
- package/dist/components/Form/form-time.d.ts +59 -0
- package/dist/components/Form/form.d.ts +11 -0
- package/dist/components/Form/form.test.d.ts +1 -0
- package/dist/components/Label/label.d.ts +5 -0
- package/dist/components/Label/label.test.d.ts +1 -0
- package/dist/components/alert-dialog.d.ts +20 -0
- package/dist/components/alert.d.ts +8 -0
- package/dist/components/aspect-ratio.d.ts +3 -0
- package/dist/components/avatar.d.ts +6 -0
- package/dist/components/badge.d.ts +9 -0
- package/dist/components/breadcrumb.d.ts +19 -0
- package/dist/components/calendar.d.ts +8 -0
- package/dist/components/card.d.ts +8 -0
- package/dist/components/carousel.d.ts +34 -0
- package/dist/components/checkbox.d.ts +12 -0
- package/dist/components/collapsible.d.ts +5 -0
- package/dist/components/command.d.ts +82 -0
- package/dist/components/context-menu.d.ts +27 -0
- package/dist/components/dialog.d.ts +19 -0
- package/dist/components/drawer.d.ts +22 -0
- package/dist/components/dropdown-menu.d.ts +27 -0
- package/dist/components/hover-card.d.ts +6 -0
- package/dist/components/icons.d.ts +2 -0
- package/dist/components/input-otp.d.ts +36 -0
- package/dist/components/input.d.ts +15 -0
- package/dist/components/menubar.d.ts +28 -0
- package/dist/components/modal.d.ts +11 -0
- package/dist/components/navigation-menu.d.ts +12 -0
- package/dist/components/pagination.d.ts +36 -0
- package/dist/components/popover.d.ts +7 -0
- package/dist/components/progress.d.ts +4 -0
- package/dist/components/radio-group.d.ts +5 -0
- package/dist/components/resizable.d.ts +8 -0
- package/dist/components/scroll-area.d.ts +5 -0
- package/dist/components/scroll-view.d.ts +21 -0
- package/dist/components/search-input.d.ts +9 -0
- package/dist/components/searchable-select.d.ts +33 -0
- package/dist/components/select.d.ts +69 -0
- package/dist/components/separator.d.ts +4 -0
- package/dist/components/sheet.d.ts +25 -0
- package/dist/components/skeleton.d.ts +3 -0
- package/dist/components/slider.d.ts +4 -0
- package/dist/components/sonner.d.ts +5 -0
- package/dist/components/switch.d.ts +4 -0
- package/dist/components/table.d.ts +12 -0
- package/dist/components/tabs.d.ts +7 -0
- package/dist/components/textarea.d.ts +13 -0
- package/dist/components/toast.d.ts +15 -0
- package/dist/components/toaster.d.ts +2 -0
- package/dist/components/toggle-group.d.ts +12 -0
- package/dist/components/toggle.d.ts +12 -0
- package/dist/components/tooltip.d.ts +7 -0
- package/dist/components/ui/input.d.ts +14 -0
- package/dist/components/ui/select.d.ts +37 -0
- package/dist/components/ui/ui-checkbox.d.ts +17 -0
- package/dist/components/ui/ui-date.d.ts +44 -0
- package/dist/components/ui/ui-textarea.d.ts +14 -0
- package/dist/components/ui/ui-time.d.ts +58 -0
- package/dist/components/use-toast.d.ts +44 -0
- package/dist/helper/time.d.ts +1 -0
- package/dist/hooks/use-sidebar.d.ts +8 -0
- package/dist/index.cjs +12723 -0
- package/dist/index.d.ts +78 -0
- package/dist/index.js +12514 -0
- package/dist/interface/icon.d.ts +30 -0
- package/dist/shared/alert-modal.d.ts +15 -0
- package/dist/shared/breadcrumbs.d.ts +14 -0
- package/dist/shared/data-table-skeleton.d.ts +10 -0
- package/dist/shared/data-table.d.ts +175 -0
- package/dist/shared/dropzone.d.ts +19 -0
- package/dist/shared/fileupload.d.ts +15 -0
- package/dist/shared/heading.d.ts +7 -0
- package/dist/shared/page-head.d.ts +5 -0
- package/dist/shared/pagination-section.d.ts +8 -0
- package/dist/style.css +4350 -0
- package/dist/types/input.d.ts +4 -0
- package/dist/types/select.d.ts +4 -0
- package/dist/utils/date-formats.d.ts +387 -0
- package/dist/utils/form-utils.d.ts +43 -0
- package/dist/utils/time-formats.d.ts +157 -0
- package/dist/utils/utils.d.ts +2 -0
- package/package.json +210 -0
- package/templates/vscode-settings.json +11 -0
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type InputVariantProps = 'outline' | 'soft' | 'ghost' | 'filled' | 'flushed' | 'unstyled' | 'link';
|
|
2
|
+
export declare const inputVariants: Record<InputVariantProps, string>;
|
|
3
|
+
export type InputVariant = keyof typeof inputVariants;
|
|
4
|
+
export declare const variants: Record<InputVariant, string>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type SelectVariantProps = 'outline' | 'soft' | 'ghost' | 'filled' | 'flushed' | 'unstyled' | 'link';
|
|
2
|
+
export declare const selectVariants: Record<SelectVariantProps, string>;
|
|
3
|
+
export type SelectVariant = keyof typeof selectVariants;
|
|
4
|
+
export declare const variants: Record<SelectVariant, string>;
|
|
@@ -0,0 +1,387 @@
|
|
|
1
|
+
export declare const dateFormats: {
|
|
2
|
+
/**
|
|
3
|
+
* Localized short date.
|
|
4
|
+
* Example with en-US: 06/04/2026
|
|
5
|
+
*/
|
|
6
|
+
readonly short: "P";
|
|
7
|
+
/**
|
|
8
|
+
* Localized medium date.
|
|
9
|
+
* Example with en-US: Jun 4, 2026
|
|
10
|
+
*/
|
|
11
|
+
readonly medium: "PP";
|
|
12
|
+
/**
|
|
13
|
+
* Localized long date.
|
|
14
|
+
* Example with en-US: June 4th, 2026
|
|
15
|
+
*/
|
|
16
|
+
readonly long: "PPP";
|
|
17
|
+
/**
|
|
18
|
+
* Localized full date.
|
|
19
|
+
* Example with en-US: Thursday, June 4th, 2026
|
|
20
|
+
*/
|
|
21
|
+
readonly full: "PPPP";
|
|
22
|
+
/**
|
|
23
|
+
* Alias for the localized long date format.
|
|
24
|
+
* Example with en-US: June 4th, 2026
|
|
25
|
+
*/
|
|
26
|
+
readonly demo: "PPP";
|
|
27
|
+
/**
|
|
28
|
+
* ISO date format, recommended for APIs and databases.
|
|
29
|
+
* Example: 2026-06-04
|
|
30
|
+
*/
|
|
31
|
+
readonly iso: "yyyy-MM-dd";
|
|
32
|
+
/**
|
|
33
|
+
* ISO-like date and time format without timezone.
|
|
34
|
+
* Example: 2026-06-04T14:30:00
|
|
35
|
+
*/
|
|
36
|
+
readonly isoDateTime: "yyyy-MM-dd'T'HH:mm:ss";
|
|
37
|
+
/**
|
|
38
|
+
* ISO-like date and time format with timezone offset.
|
|
39
|
+
* Example: 2026-06-04T14:30:00-05:00
|
|
40
|
+
*/
|
|
41
|
+
readonly isoDateTimeWithZone: "yyyy-MM-dd'T'HH:mm:ssXXX";
|
|
42
|
+
/**
|
|
43
|
+
* SQL-style date and time format.
|
|
44
|
+
* Example: 2026-06-04 14:30:00
|
|
45
|
+
*/
|
|
46
|
+
readonly sqlDateTime: "yyyy-MM-dd HH:mm:ss";
|
|
47
|
+
/**
|
|
48
|
+
* Compact numeric date format.
|
|
49
|
+
* Example: 20260604
|
|
50
|
+
*/
|
|
51
|
+
readonly compact: "yyyyMMdd";
|
|
52
|
+
/**
|
|
53
|
+
* Compact numeric date and time format.
|
|
54
|
+
* Example: 20260604143000
|
|
55
|
+
*/
|
|
56
|
+
readonly compactDateTime: "yyyyMMddHHmmss";
|
|
57
|
+
/**
|
|
58
|
+
* Latin America date format.
|
|
59
|
+
* Example: 04/06/2026
|
|
60
|
+
*/
|
|
61
|
+
readonly latam: "dd/MM/yyyy";
|
|
62
|
+
/**
|
|
63
|
+
* United States date format.
|
|
64
|
+
* Example: 06/04/2026
|
|
65
|
+
*/
|
|
66
|
+
readonly us: "MM/dd/yyyy";
|
|
67
|
+
/**
|
|
68
|
+
* Year, month, and day with slashes.
|
|
69
|
+
* Example: 2026/06/04
|
|
70
|
+
*/
|
|
71
|
+
readonly ymdSlash: "yyyy/MM/dd";
|
|
72
|
+
/**
|
|
73
|
+
* Day, month, and year with slashes.
|
|
74
|
+
* Example: 04/06/2026
|
|
75
|
+
*/
|
|
76
|
+
readonly dmySlash: "dd/MM/yyyy";
|
|
77
|
+
/**
|
|
78
|
+
* Month, day, and year with slashes.
|
|
79
|
+
* Example: 06/04/2026
|
|
80
|
+
*/
|
|
81
|
+
readonly mdySlash: "MM/dd/yyyy";
|
|
82
|
+
/**
|
|
83
|
+
* Year, month, and day with dashes.
|
|
84
|
+
* Example: 2026-06-04
|
|
85
|
+
*/
|
|
86
|
+
readonly ymdDash: "yyyy-MM-dd";
|
|
87
|
+
/**
|
|
88
|
+
* Day, month, and year with dashes.
|
|
89
|
+
* Example: 04-06-2026
|
|
90
|
+
*/
|
|
91
|
+
readonly dmyDash: "dd-MM-yyyy";
|
|
92
|
+
/**
|
|
93
|
+
* Month, day, and year with dashes.
|
|
94
|
+
* Example: 06-04-2026
|
|
95
|
+
*/
|
|
96
|
+
readonly mdyDash: "MM-dd-yyyy";
|
|
97
|
+
/**
|
|
98
|
+
* Alias for day, month, and year with dashes.
|
|
99
|
+
* Example: 04-06-2026
|
|
100
|
+
*/
|
|
101
|
+
readonly dash: "dd-MM-yyyy";
|
|
102
|
+
/**
|
|
103
|
+
* Year, month, and day with dots.
|
|
104
|
+
* Example: 2026.06.04
|
|
105
|
+
*/
|
|
106
|
+
readonly ymdDot: "yyyy.MM.dd";
|
|
107
|
+
/**
|
|
108
|
+
* Day, month, and year with dots.
|
|
109
|
+
* Example: 04.06.2026
|
|
110
|
+
*/
|
|
111
|
+
readonly dmyDot: "dd.MM.yyyy";
|
|
112
|
+
/**
|
|
113
|
+
* Month, day, and year with dots.
|
|
114
|
+
* Example: 06.04.2026
|
|
115
|
+
*/
|
|
116
|
+
readonly mdyDot: "MM.dd.yyyy";
|
|
117
|
+
/**
|
|
118
|
+
* Alias for day, month, and year with dots.
|
|
119
|
+
* Example: 04.06.2026
|
|
120
|
+
*/
|
|
121
|
+
readonly dot: "dd.MM.yyyy";
|
|
122
|
+
/**
|
|
123
|
+
* Short year with slashes.
|
|
124
|
+
* Example: 04/06/26
|
|
125
|
+
*/
|
|
126
|
+
readonly shortYearSlash: "dd/MM/yy";
|
|
127
|
+
/**
|
|
128
|
+
* Short year with dashes.
|
|
129
|
+
* Example: 04-06-26
|
|
130
|
+
*/
|
|
131
|
+
readonly shortYearDash: "dd-MM-yy";
|
|
132
|
+
/**
|
|
133
|
+
* Short year with dots.
|
|
134
|
+
* Example: 04.06.26
|
|
135
|
+
*/
|
|
136
|
+
readonly shortYearDot: "dd.MM.yy";
|
|
137
|
+
/**
|
|
138
|
+
* Date with abbreviated month name.
|
|
139
|
+
* Example: 04 Jun 2026
|
|
140
|
+
*/
|
|
141
|
+
readonly shortMonth: "dd MMM yyyy";
|
|
142
|
+
/**
|
|
143
|
+
* Date with full month name.
|
|
144
|
+
* Example: 04 June 2026
|
|
145
|
+
*/
|
|
146
|
+
readonly longMonth: "dd MMMM yyyy";
|
|
147
|
+
/**
|
|
148
|
+
* Month name first with abbreviated month.
|
|
149
|
+
* Example: Jun 04, 2026
|
|
150
|
+
*/
|
|
151
|
+
readonly shortMonthFirst: "MMM dd, yyyy";
|
|
152
|
+
/**
|
|
153
|
+
* Month name first with full month.
|
|
154
|
+
* Example: June 04, 2026
|
|
155
|
+
*/
|
|
156
|
+
readonly longMonthFirst: "MMMM dd, yyyy";
|
|
157
|
+
/**
|
|
158
|
+
* Ordinal day with abbreviated month.
|
|
159
|
+
* Example: 4th Jun 2026
|
|
160
|
+
*/
|
|
161
|
+
readonly ordinalShortMonth: "do MMM yyyy";
|
|
162
|
+
/**
|
|
163
|
+
* Ordinal day with full month.
|
|
164
|
+
* Example: 4th June 2026
|
|
165
|
+
*/
|
|
166
|
+
readonly ordinalLongMonth: "do MMMM yyyy";
|
|
167
|
+
/**
|
|
168
|
+
* Month and year with abbreviated month.
|
|
169
|
+
* Example: Jun 2026
|
|
170
|
+
*/
|
|
171
|
+
readonly shortMonthYear: "MMM yyyy";
|
|
172
|
+
/**
|
|
173
|
+
* Month and year with full month.
|
|
174
|
+
* Example: June 2026
|
|
175
|
+
*/
|
|
176
|
+
readonly monthYear: "MMMM yyyy";
|
|
177
|
+
/**
|
|
178
|
+
* Numeric month and year.
|
|
179
|
+
* Example: 06/2026
|
|
180
|
+
*/
|
|
181
|
+
readonly numericMonthYear: "MM/yyyy";
|
|
182
|
+
/**
|
|
183
|
+
* Year and numeric month.
|
|
184
|
+
* Example: 2026-06
|
|
185
|
+
*/
|
|
186
|
+
readonly yearMonth: "yyyy-MM";
|
|
187
|
+
/**
|
|
188
|
+
* Full month only.
|
|
189
|
+
* Example: June
|
|
190
|
+
*/
|
|
191
|
+
readonly month: "MMMM";
|
|
192
|
+
/**
|
|
193
|
+
* Abbreviated month only.
|
|
194
|
+
* Example: Jun
|
|
195
|
+
*/
|
|
196
|
+
readonly monthShort: "MMM";
|
|
197
|
+
/**
|
|
198
|
+
* Numeric month only.
|
|
199
|
+
* Example: 06
|
|
200
|
+
*/
|
|
201
|
+
readonly monthNumber: "MM";
|
|
202
|
+
/**
|
|
203
|
+
* Numeric month only without leading zero.
|
|
204
|
+
* Example: 6
|
|
205
|
+
*/
|
|
206
|
+
readonly monthNumberPlain: "M";
|
|
207
|
+
/**
|
|
208
|
+
* Date with abbreviated weekday and month names.
|
|
209
|
+
* Example: Thu, 04 Jun 2026
|
|
210
|
+
*/
|
|
211
|
+
readonly weekdayShort: "EEE, dd MMM yyyy";
|
|
212
|
+
/**
|
|
213
|
+
* Date with full weekday and month names.
|
|
214
|
+
* Example: Thursday, 04 June 2026
|
|
215
|
+
*/
|
|
216
|
+
readonly weekdayLong: "EEEE, dd MMMM yyyy";
|
|
217
|
+
/**
|
|
218
|
+
* Full weekday with localized long date.
|
|
219
|
+
* Example: Thursday, June 4th, 2026
|
|
220
|
+
*/
|
|
221
|
+
readonly weekdayFullLocalized: "EEEE, PPP";
|
|
222
|
+
/**
|
|
223
|
+
* Abbreviated weekday only.
|
|
224
|
+
* Example: Thu
|
|
225
|
+
*/
|
|
226
|
+
readonly weekdayNameShort: "EEE";
|
|
227
|
+
/**
|
|
228
|
+
* Full weekday only.
|
|
229
|
+
* Example: Thursday
|
|
230
|
+
*/
|
|
231
|
+
readonly weekdayNameLong: "EEEE";
|
|
232
|
+
/**
|
|
233
|
+
* Numeric ISO day of week.
|
|
234
|
+
* Example: 4
|
|
235
|
+
*/
|
|
236
|
+
readonly weekdayNumber: "i";
|
|
237
|
+
/**
|
|
238
|
+
* Day of month with leading zero.
|
|
239
|
+
* Example: 04
|
|
240
|
+
*/
|
|
241
|
+
readonly day: "dd";
|
|
242
|
+
/**
|
|
243
|
+
* Day of month without leading zero.
|
|
244
|
+
* Example: 4
|
|
245
|
+
*/
|
|
246
|
+
readonly dayPlain: "d";
|
|
247
|
+
/**
|
|
248
|
+
* Ordinal day of month.
|
|
249
|
+
* Example: 4th
|
|
250
|
+
*/
|
|
251
|
+
readonly dayOrdinal: "do";
|
|
252
|
+
/**
|
|
253
|
+
* Day of year.
|
|
254
|
+
* Example: 155
|
|
255
|
+
*/
|
|
256
|
+
readonly dayOfYear: "D";
|
|
257
|
+
/**
|
|
258
|
+
* Full year.
|
|
259
|
+
* Example: 2026
|
|
260
|
+
*/
|
|
261
|
+
readonly year: "yyyy";
|
|
262
|
+
/**
|
|
263
|
+
* Short year.
|
|
264
|
+
* Example: 26
|
|
265
|
+
*/
|
|
266
|
+
readonly yearShort: "yy";
|
|
267
|
+
/**
|
|
268
|
+
* Time using 24-hour format.
|
|
269
|
+
* Example: 14:30
|
|
270
|
+
*/
|
|
271
|
+
readonly time24: "HH:mm";
|
|
272
|
+
/**
|
|
273
|
+
* Time using 24-hour format with seconds.
|
|
274
|
+
* Example: 14:30:45
|
|
275
|
+
*/
|
|
276
|
+
readonly time24Seconds: "HH:mm:ss";
|
|
277
|
+
/**
|
|
278
|
+
* Time using 12-hour format.
|
|
279
|
+
* Example: 02:30 PM
|
|
280
|
+
*/
|
|
281
|
+
readonly time12: "hh:mm a";
|
|
282
|
+
/**
|
|
283
|
+
* Time using 12-hour format with seconds.
|
|
284
|
+
* Example: 02:30:45 PM
|
|
285
|
+
*/
|
|
286
|
+
readonly time12Seconds: "hh:mm:ss a";
|
|
287
|
+
/**
|
|
288
|
+
* Localized short time.
|
|
289
|
+
* Example with en-US: 2:30 PM
|
|
290
|
+
*/
|
|
291
|
+
readonly timeLocalizedShort: "p";
|
|
292
|
+
/**
|
|
293
|
+
* Localized long time.
|
|
294
|
+
* Example with en-US: 2:30:45 PM
|
|
295
|
+
*/
|
|
296
|
+
readonly timeLocalizedLong: "pp";
|
|
297
|
+
/**
|
|
298
|
+
* Date and time using 24-hour format.
|
|
299
|
+
* Example: 04/06/2026 14:30
|
|
300
|
+
*/
|
|
301
|
+
readonly dateTime24: "dd/MM/yyyy HH:mm";
|
|
302
|
+
/**
|
|
303
|
+
* Date and time using 24-hour format with seconds.
|
|
304
|
+
* Example: 04/06/2026 14:30:45
|
|
305
|
+
*/
|
|
306
|
+
readonly dateTime24Seconds: "dd/MM/yyyy HH:mm:ss";
|
|
307
|
+
/**
|
|
308
|
+
* Date and time using 12-hour format.
|
|
309
|
+
* Example: 04/06/2026 02:30 PM
|
|
310
|
+
*/
|
|
311
|
+
readonly dateTime12: "dd/MM/yyyy hh:mm a";
|
|
312
|
+
/**
|
|
313
|
+
* Date and time using 12-hour format with seconds.
|
|
314
|
+
* Example: 04/06/2026 02:30:45 PM
|
|
315
|
+
*/
|
|
316
|
+
readonly dateTime12Seconds: "dd/MM/yyyy hh:mm:ss a";
|
|
317
|
+
/**
|
|
318
|
+
* Month name date and 24-hour time.
|
|
319
|
+
* Example: 04 June 2026 14:30
|
|
320
|
+
*/
|
|
321
|
+
readonly longDateTime24: "dd MMMM yyyy HH:mm";
|
|
322
|
+
/**
|
|
323
|
+
* Month name date and 12-hour time.
|
|
324
|
+
* Example: 04 June 2026 02:30 PM
|
|
325
|
+
*/
|
|
326
|
+
readonly longDateTime12: "dd MMMM yyyy hh:mm a";
|
|
327
|
+
/**
|
|
328
|
+
* Full weekday date and 24-hour time.
|
|
329
|
+
* Example: Thursday, 04 June 2026 14:30
|
|
330
|
+
*/
|
|
331
|
+
readonly weekdayDateTime24: "EEEE, dd MMMM yyyy HH:mm";
|
|
332
|
+
/**
|
|
333
|
+
* Full weekday date and 12-hour time.
|
|
334
|
+
* Example: Thursday, 04 June 2026 02:30 PM
|
|
335
|
+
*/
|
|
336
|
+
readonly weekdayDateTime12: "EEEE, dd MMMM yyyy hh:mm a";
|
|
337
|
+
/**
|
|
338
|
+
* Localized short date and time.
|
|
339
|
+
* Example with en-US: 06/04/2026, 2:30 PM
|
|
340
|
+
*/
|
|
341
|
+
readonly localizedDateTimeShort: "Pp";
|
|
342
|
+
/**
|
|
343
|
+
* Localized medium date and time.
|
|
344
|
+
* Example with en-US: Jun 4, 2026, 2:30 PM
|
|
345
|
+
*/
|
|
346
|
+
readonly localizedDateTimeMedium: "PPp";
|
|
347
|
+
/**
|
|
348
|
+
* Localized long date and time.
|
|
349
|
+
* Example with en-US: June 4th, 2026 at 2:30 PM
|
|
350
|
+
*/
|
|
351
|
+
readonly localizedDateTimeLong: "PPPp";
|
|
352
|
+
/**
|
|
353
|
+
* Localized full date and time.
|
|
354
|
+
* Example with en-US: Thursday, June 4th, 2026 at 2:30 PM
|
|
355
|
+
*/
|
|
356
|
+
readonly localizedDateTimeFull: "PPPPp";
|
|
357
|
+
/**
|
|
358
|
+
* Numeric quarter.
|
|
359
|
+
* Example: 2
|
|
360
|
+
*/
|
|
361
|
+
readonly quarter: "Q";
|
|
362
|
+
/**
|
|
363
|
+
* Ordinal quarter.
|
|
364
|
+
* Example: 2nd quarter
|
|
365
|
+
*/
|
|
366
|
+
readonly quarterOrdinal: "Qo 'quarter'";
|
|
367
|
+
/**
|
|
368
|
+
* Quarter and year.
|
|
369
|
+
* Example: Q2 2026
|
|
370
|
+
*/
|
|
371
|
+
readonly quarterYear: "'Q'Q yyyy";
|
|
372
|
+
/**
|
|
373
|
+
* Ordinal quarter and year.
|
|
374
|
+
* Example: 2nd quarter 2026
|
|
375
|
+
*/
|
|
376
|
+
readonly quarterOrdinalYear: "Qo 'quarter' yyyy";
|
|
377
|
+
};
|
|
378
|
+
export type DateFormatKey = keyof typeof dateFormats;
|
|
379
|
+
export type DateFormatValue = DateFormatKey | (string & {});
|
|
380
|
+
export type DateFormatItem = {
|
|
381
|
+
value: DateFormatKey;
|
|
382
|
+
label: string;
|
|
383
|
+
description: string;
|
|
384
|
+
pattern: string;
|
|
385
|
+
};
|
|
386
|
+
export declare const dateFormatItems: DateFormatItem[];
|
|
387
|
+
export declare function resolveDateFormat(value?: DateFormatValue | null, fallback?: DateFormatKey): "'Q'Q yyyy" | "D" | "EEE" | "EEE, dd MMM yyyy" | "EEEE" | "EEEE, PPP" | "EEEE, dd MMMM yyyy" | "EEEE, dd MMMM yyyy HH:mm" | "EEEE, dd MMMM yyyy hh:mm a" | "HH:mm" | "HH:mm:ss" | "M" | "MM" | "MM-dd-yyyy" | "MM.dd.yyyy" | "MM/dd/yyyy" | "MM/yyyy" | "MMM" | "MMM dd, yyyy" | "MMM yyyy" | "MMMM" | "MMMM dd, yyyy" | "MMMM yyyy" | "P" | "PP" | "PPP" | "PPPP" | "PPPPp" | "PPPp" | "PPp" | "Pp" | "Q" | "Qo 'quarter'" | "Qo 'quarter' yyyy" | "d" | "dd" | "dd MMM yyyy" | "dd MMMM yyyy" | "dd MMMM yyyy HH:mm" | "dd MMMM yyyy hh:mm a" | "dd-MM-yy" | "dd-MM-yyyy" | "dd.MM.yy" | "dd.MM.yyyy" | "dd/MM/yy" | "dd/MM/yyyy" | "dd/MM/yyyy HH:mm" | "dd/MM/yyyy HH:mm:ss" | "dd/MM/yyyy hh:mm a" | "dd/MM/yyyy hh:mm:ss a" | "do" | "do MMM yyyy" | "do MMMM yyyy" | "hh:mm a" | "hh:mm:ss a" | "i" | "p" | "pp" | "yy" | "yyyy" | "yyyy-MM" | "yyyy-MM-dd" | "yyyy-MM-dd HH:mm:ss" | "yyyy-MM-dd'T'HH:mm:ss" | "yyyy-MM-dd'T'HH:mm:ssXXX" | "yyyy.MM.dd" | "yyyy/MM/dd" | "yyyyMMdd" | "yyyyMMddHHmmss";
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type SelectOption<TData = unknown> = {
|
|
3
|
+
value: string;
|
|
4
|
+
label: React.ReactNode;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
data?: TData;
|
|
7
|
+
};
|
|
8
|
+
export type FormInputVariantProps = "outline" | "soft" | "ghost" | "filled" | "flushed" | "unstyled" | "link";
|
|
9
|
+
export declare const formInputVariants: Record<FormInputVariantProps, string>;
|
|
10
|
+
export type InputVariant = keyof typeof formInputVariants;
|
|
11
|
+
/**
|
|
12
|
+
* Variantes equivalentes para controles compuestos:
|
|
13
|
+
* SearchableSelect, combobox, wrappers con input interno, etc.
|
|
14
|
+
* Usan focus-within porque el foco real vive dentro del wrapper.
|
|
15
|
+
*/
|
|
16
|
+
export declare const formCompositeVariants: Record<InputVariant, string>;
|
|
17
|
+
export declare const variants: Record<InputVariant, string>;
|
|
18
|
+
export type SizeProps = "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
|
|
19
|
+
export type VariantProps = InputVariant;
|
|
20
|
+
/**
|
|
21
|
+
* Backward-compatible aliases.
|
|
22
|
+
*/
|
|
23
|
+
export type FormSizeProps = SizeProps;
|
|
24
|
+
export type FormVariantProps = VariantProps;
|
|
25
|
+
export type SizeClasses = {
|
|
26
|
+
control: string;
|
|
27
|
+
flushedControl: string;
|
|
28
|
+
linkControl: string;
|
|
29
|
+
selectItem: string;
|
|
30
|
+
searchInput: string;
|
|
31
|
+
checkbox: string;
|
|
32
|
+
label: string;
|
|
33
|
+
description: string;
|
|
34
|
+
message: string;
|
|
35
|
+
};
|
|
36
|
+
export type CustomSize = Partial<SizeClasses>;
|
|
37
|
+
export declare const formSizeVariants: Record<SizeProps, SizeClasses>;
|
|
38
|
+
export declare const formControlBase = "relative inline-flex w-full items-center justify-between gap-2 text-foreground outline-none transition data-[placeholder]:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50";
|
|
39
|
+
export declare const formCompositeControlBase = "relative flex w-full items-center gap-2 text-foreground outline-none transition";
|
|
40
|
+
export declare const formControlErrorClass = "border-destructive focus:border-destructive focus:ring-destructive/20";
|
|
41
|
+
export declare const formCompositeControlErrorClass = "border-destructive focus-within:border-destructive focus-within:ring-destructive/20";
|
|
42
|
+
export declare function getFormSizeClasses(size?: SizeProps, customSize?: CustomSize): SizeClasses;
|
|
43
|
+
export declare function getFormControlSizeClass(variant: VariantProps, sizeClasses: SizeClasses): string;
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
export declare const timeFormats: {
|
|
2
|
+
/**
|
|
3
|
+
* Localized short time.
|
|
4
|
+
* Example with en-US: 2:30 PM
|
|
5
|
+
*/
|
|
6
|
+
readonly short: "p";
|
|
7
|
+
/**
|
|
8
|
+
* Localized medium time.
|
|
9
|
+
* Example with en-US: 2:30:45 PM
|
|
10
|
+
*/
|
|
11
|
+
readonly medium: "pp";
|
|
12
|
+
/**
|
|
13
|
+
* Localized long time.
|
|
14
|
+
* Example with en-US: 2:30:45 PM GMT-5
|
|
15
|
+
*/
|
|
16
|
+
readonly long: "ppp";
|
|
17
|
+
/**
|
|
18
|
+
* Localized full time.
|
|
19
|
+
* Example with en-US: 2:30:45 PM GMT-05:00
|
|
20
|
+
*/
|
|
21
|
+
readonly full: "pppp";
|
|
22
|
+
/**
|
|
23
|
+
* Default time picker format.
|
|
24
|
+
* Example: 14:30
|
|
25
|
+
*/
|
|
26
|
+
readonly demo: "HH:mm";
|
|
27
|
+
/**
|
|
28
|
+
* Recommended format for APIs when seconds are not required.
|
|
29
|
+
* Example: 14:30
|
|
30
|
+
*/
|
|
31
|
+
readonly api: "HH:mm";
|
|
32
|
+
/**
|
|
33
|
+
* Recommended database time format.
|
|
34
|
+
* Example: 14:30:00
|
|
35
|
+
*/
|
|
36
|
+
readonly database: "HH:mm:ss";
|
|
37
|
+
/**
|
|
38
|
+
* HTML time input compatible format.
|
|
39
|
+
* Example: 14:30
|
|
40
|
+
*/
|
|
41
|
+
readonly input: "HH:mm";
|
|
42
|
+
/**
|
|
43
|
+
* ISO-like time format without timezone.
|
|
44
|
+
* Example: 14:30:00
|
|
45
|
+
*/
|
|
46
|
+
readonly iso: "HH:mm:ss";
|
|
47
|
+
/**
|
|
48
|
+
* ISO-like time format with milliseconds.
|
|
49
|
+
* Example: 14:30:00.000
|
|
50
|
+
*/
|
|
51
|
+
readonly isoMilliseconds: "HH:mm:ss.SSS";
|
|
52
|
+
/**
|
|
53
|
+
* Time using 24-hour format.
|
|
54
|
+
* Example: 14:30
|
|
55
|
+
*/
|
|
56
|
+
readonly time24: "HH:mm";
|
|
57
|
+
/**
|
|
58
|
+
* Time using 24-hour format with seconds.
|
|
59
|
+
* Example: 14:30:45
|
|
60
|
+
*/
|
|
61
|
+
readonly time24Seconds: "HH:mm:ss";
|
|
62
|
+
/**
|
|
63
|
+
* Time using 24-hour format with milliseconds.
|
|
64
|
+
* Example: 14:30:45.123
|
|
65
|
+
*/
|
|
66
|
+
readonly time24Milliseconds: "HH:mm:ss.SSS";
|
|
67
|
+
/**
|
|
68
|
+
* Hour only using 24-hour format with leading zero.
|
|
69
|
+
* Example: 09
|
|
70
|
+
*/
|
|
71
|
+
readonly hour24: "HH";
|
|
72
|
+
/**
|
|
73
|
+
* Hour only using 24-hour format without leading zero.
|
|
74
|
+
* Example: 9
|
|
75
|
+
*/
|
|
76
|
+
readonly hour24Plain: "H";
|
|
77
|
+
/**
|
|
78
|
+
* Hour and minutes using 24-hour format.
|
|
79
|
+
* Example: 14:30
|
|
80
|
+
*/
|
|
81
|
+
readonly hourMinute24: "HH:mm";
|
|
82
|
+
/**
|
|
83
|
+
* Hour, minutes, and seconds using 24-hour format.
|
|
84
|
+
* Example: 14:30:45
|
|
85
|
+
*/
|
|
86
|
+
readonly hourMinuteSecond24: "HH:mm:ss";
|
|
87
|
+
/**
|
|
88
|
+
* Time using 12-hour format.
|
|
89
|
+
* Example: 02:30 PM
|
|
90
|
+
*/
|
|
91
|
+
readonly time12: "hh:mm a";
|
|
92
|
+
/**
|
|
93
|
+
* Time using 12-hour format with seconds.
|
|
94
|
+
* Example: 02:30:45 PM
|
|
95
|
+
*/
|
|
96
|
+
readonly time12Seconds: "hh:mm:ss a";
|
|
97
|
+
/**
|
|
98
|
+
* Time using 12-hour format with milliseconds.
|
|
99
|
+
* Example: 02:30:45.123 PM
|
|
100
|
+
*/
|
|
101
|
+
readonly time12Milliseconds: "hh:mm:ss.SSS a";
|
|
102
|
+
/**
|
|
103
|
+
* Hour only using 12-hour format with leading zero.
|
|
104
|
+
* Example: 02 PM
|
|
105
|
+
*/
|
|
106
|
+
readonly hour12: "hh a";
|
|
107
|
+
/**
|
|
108
|
+
* Hour only using 12-hour format without leading zero.
|
|
109
|
+
* Example: 2 PM
|
|
110
|
+
*/
|
|
111
|
+
readonly hour12Plain: "h a";
|
|
112
|
+
/**
|
|
113
|
+
* Hour and minutes using 12-hour format.
|
|
114
|
+
* Example: 02:30 PM
|
|
115
|
+
*/
|
|
116
|
+
readonly hourMinute12: "hh:mm a";
|
|
117
|
+
/**
|
|
118
|
+
* Hour, minutes, and seconds using 12-hour format.
|
|
119
|
+
* Example: 02:30:45 PM
|
|
120
|
+
*/
|
|
121
|
+
readonly hourMinuteSecond12: "hh:mm:ss a";
|
|
122
|
+
/**
|
|
123
|
+
* Compact 24-hour time without separator.
|
|
124
|
+
* Example: 1430
|
|
125
|
+
*/
|
|
126
|
+
readonly compact: "HHmm";
|
|
127
|
+
/**
|
|
128
|
+
* Compact 24-hour time with seconds.
|
|
129
|
+
* Example: 143045
|
|
130
|
+
*/
|
|
131
|
+
readonly compactSeconds: "HHmmss";
|
|
132
|
+
/**
|
|
133
|
+
* Minutes only.
|
|
134
|
+
* Example: 30
|
|
135
|
+
*/
|
|
136
|
+
readonly minutes: "mm";
|
|
137
|
+
/**
|
|
138
|
+
* Seconds only.
|
|
139
|
+
* Example: 45
|
|
140
|
+
*/
|
|
141
|
+
readonly seconds: "ss";
|
|
142
|
+
/**
|
|
143
|
+
* AM/PM marker.
|
|
144
|
+
* Example: PM
|
|
145
|
+
*/
|
|
146
|
+
readonly period: "a";
|
|
147
|
+
};
|
|
148
|
+
export type TimeFormatKey = keyof typeof timeFormats;
|
|
149
|
+
export type TimeFormatValue = TimeFormatKey | (string & {});
|
|
150
|
+
export type TimeFormatItem = {
|
|
151
|
+
value: TimeFormatKey;
|
|
152
|
+
label: string;
|
|
153
|
+
description: string;
|
|
154
|
+
pattern: string;
|
|
155
|
+
};
|
|
156
|
+
export declare const timeFormatItems: TimeFormatItem[];
|
|
157
|
+
export declare function resolveTimeFormat(value?: TimeFormatValue | null, fallback?: TimeFormatKey): "H" | "HH" | "HH:mm" | "HH:mm:ss" | "HH:mm:ss.SSS" | "HHmm" | "HHmmss" | "a" | "h a" | "hh a" | "hh:mm a" | "hh:mm:ss a" | "hh:mm:ss.SSS a" | "mm" | "p" | "pp" | "ppp" | "pppp" | "ss";
|