@expcat/tigercat-core 2.1.2 → 2.1.4
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/README.md +10 -0
- package/dist/{data-export-CLWdsrRn.d.ts → data-export-D01yjggE.d.ts} +18 -7
- package/dist/datepicker-locales/ar-SA.d.ts +2 -1
- package/dist/datepicker-locales/ar-SA.js +8 -1
- package/dist/datepicker-locales/de-DE.d.ts +2 -1
- package/dist/datepicker-locales/de-DE.js +8 -1
- package/dist/datepicker-locales/en-US.d.ts +2 -1
- package/dist/datepicker-locales/en-US.js +3 -1
- package/dist/datepicker-locales/es-ES.d.ts +2 -1
- package/dist/datepicker-locales/es-ES.js +8 -1
- package/dist/datepicker-locales/fr-FR.d.ts +2 -1
- package/dist/datepicker-locales/fr-FR.js +8 -1
- package/dist/datepicker-locales/id-ID.d.ts +2 -1
- package/dist/datepicker-locales/id-ID.js +8 -1
- package/dist/datepicker-locales/ja-JP.d.ts +2 -1
- package/dist/datepicker-locales/ja-JP.js +8 -1
- package/dist/datepicker-locales/ko-KR.d.ts +2 -1
- package/dist/datepicker-locales/ko-KR.js +8 -1
- package/dist/datepicker-locales/pt-BR.d.ts +2 -1
- package/dist/datepicker-locales/pt-BR.js +8 -1
- package/dist/datepicker-locales/registry.d.ts +2 -1
- package/dist/datepicker-locales/registry.js +94 -13
- package/dist/datepicker-locales/th-TH.d.ts +2 -1
- package/dist/datepicker-locales/th-TH.js +8 -1
- package/dist/datepicker-locales/vi-VN.d.ts +2 -1
- package/dist/datepicker-locales/vi-VN.js +8 -1
- package/dist/datepicker-locales/zh-CN.d.ts +2 -1
- package/dist/datepicker-locales/zh-CN.js +3 -1
- package/dist/datepicker-locales/zh-TW.d.ts +2 -1
- package/dist/datepicker-locales/zh-TW.js +8 -1
- package/dist/icons/common.d.ts +2 -2
- package/dist/icons/common.js +14 -8
- package/dist/index.d.ts +10303 -5381
- package/dist/index.js +30994 -16436
- package/dist/locale-qoiGEqe_.d.ts +1507 -0
- package/dist/locales/ar-SA.d.ts +2 -2
- package/dist/locales/ar-SA.js +448 -442
- package/dist/locales/de-DE.d.ts +2 -2
- package/dist/locales/de-DE.js +456 -450
- package/dist/locales/en-US.d.ts +2 -2
- package/dist/locales/en-US.js +259 -62
- package/dist/locales/es-ES.d.ts +2 -2
- package/dist/locales/es-ES.js +450 -444
- package/dist/locales/fr-FR.d.ts +2 -2
- package/dist/locales/fr-FR.js +453 -447
- package/dist/locales/id-ID.d.ts +3 -3
- package/dist/locales/id-ID.js +471 -448
- package/dist/locales/ja-JP.d.ts +3 -3
- package/dist/locales/ja-JP.js +465 -442
- package/dist/locales/ko-KR.d.ts +3 -3
- package/dist/locales/ko-KR.js +465 -442
- package/dist/locales/pt-BR.d.ts +2 -2
- package/dist/locales/pt-BR.js +452 -446
- package/dist/locales/th-TH.d.ts +3 -3
- package/dist/locales/th-TH.js +467 -444
- package/dist/locales/vi-VN.d.ts +3 -3
- package/dist/locales/vi-VN.js +467 -444
- package/dist/locales/zh-CN.d.ts +2 -2
- package/dist/locales/zh-CN.js +257 -60
- package/dist/locales/zh-TW.d.ts +3 -3
- package/dist/locales/zh-TW.js +467 -444
- package/dist/{table-CHeBgM_2.d.ts → table-R9Yp1aVa.d.ts} +77 -54
- package/dist/tailwind/modern.js +1364 -150
- package/dist/{tailwind-entry-nnuviNxx.d.ts → tailwind-entry-C26Y3TZG.d.ts} +13 -10
- package/dist/tailwind.d.ts +1 -1
- package/dist/tailwind.js +1406 -136
- package/dist/utils/data-export.d.ts +19 -5
- package/dist/utils/data-export.js +138 -13
- package/dist/utils/table-export.d.ts +21 -12
- package/dist/utils/table-export.js +75 -46
- package/package.json +1 -1
- package/tokens/figma-variables.json +223 -147
- package/tokens/tokens.css +224 -57
- package/tokens/tokens.json +205 -31
- package/dist/datepicker-Digy7Stt.d.ts +0 -201
- package/dist/locale-KMGxL6bT.d.ts +0 -625
- package/tokens/tailwind-tokens.js +0 -145
package/tokens/tokens.json
CHANGED
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
"primitive": {
|
|
3
3
|
"color": {
|
|
4
4
|
"primary": {
|
|
5
|
-
"50": "#
|
|
6
|
-
"100": "#
|
|
7
|
-
"200": "#
|
|
8
|
-
"300": "#
|
|
9
|
-
"400": "#
|
|
10
|
-
"500": "#
|
|
11
|
-
"600": "#
|
|
12
|
-
"700": "#
|
|
13
|
-
"800": "#
|
|
14
|
-
"950": "#
|
|
5
|
+
"50": "#eff6ff",
|
|
6
|
+
"100": "#dbeafe",
|
|
7
|
+
"200": "#bfdbfe",
|
|
8
|
+
"300": "#93c5fd",
|
|
9
|
+
"400": "#60a5fa",
|
|
10
|
+
"500": "#3b82f6",
|
|
11
|
+
"600": "#2563eb",
|
|
12
|
+
"700": "#1d4ed8",
|
|
13
|
+
"800": "#1e40af",
|
|
14
|
+
"950": "#172554"
|
|
15
15
|
},
|
|
16
16
|
"secondary": {
|
|
17
17
|
"50": "#f8fafc",
|
|
@@ -84,6 +84,18 @@
|
|
|
84
84
|
"700": "#404040",
|
|
85
85
|
"800": "#262626",
|
|
86
86
|
"950": "#0a0a0a"
|
|
87
|
+
},
|
|
88
|
+
"gray": {
|
|
89
|
+
"50": "#f9fafb",
|
|
90
|
+
"100": "#f3f4f6",
|
|
91
|
+
"200": "#e5e7eb",
|
|
92
|
+
"300": "#d1d5db",
|
|
93
|
+
"400": "#9ca3af",
|
|
94
|
+
"500": "#6b7280",
|
|
95
|
+
"600": "#4b5563",
|
|
96
|
+
"700": "#374151",
|
|
97
|
+
"800": "#1f2937",
|
|
98
|
+
"950": "#111827"
|
|
87
99
|
}
|
|
88
100
|
},
|
|
89
101
|
"space": {
|
|
@@ -98,10 +110,10 @@
|
|
|
98
110
|
},
|
|
99
111
|
"radius": {
|
|
100
112
|
"none": "0",
|
|
101
|
-
"sm": "
|
|
102
|
-
"md": "
|
|
103
|
-
"lg": "
|
|
104
|
-
"xl": "
|
|
113
|
+
"sm": "4px",
|
|
114
|
+
"md": "6px",
|
|
115
|
+
"lg": "10px",
|
|
116
|
+
"xl": "14px",
|
|
105
117
|
"full": "9999px"
|
|
106
118
|
},
|
|
107
119
|
"shadow": {
|
|
@@ -164,19 +176,19 @@
|
|
|
164
176
|
"bg-surface": "primitive.color.neutral.50",
|
|
165
177
|
"bg-surface-raised": "#ffffff",
|
|
166
178
|
"bg-overlay": "rgba(0,0,0,0.45)",
|
|
167
|
-
"text-primary": "primitive.color.
|
|
168
|
-
"text-secondary": "primitive.color.
|
|
169
|
-
"text-tertiary": "primitive.color.
|
|
170
|
-
"text-disabled": "primitive.color.
|
|
179
|
+
"text-primary": "primitive.color.gray.950",
|
|
180
|
+
"text-secondary": "primitive.color.gray.500",
|
|
181
|
+
"text-tertiary": "primitive.color.gray.400",
|
|
182
|
+
"text-disabled": "primitive.color.gray.300",
|
|
171
183
|
"text-inverse": "#ffffff",
|
|
172
184
|
"text-link": "primitive.color.primary.600",
|
|
173
185
|
"text-link-hover": "primitive.color.primary.700",
|
|
174
186
|
"text-success": "primitive.color.success.700",
|
|
175
187
|
"text-warning": "primitive.color.warning.700",
|
|
176
188
|
"text-error": "primitive.color.error.600",
|
|
177
|
-
"border-default": "primitive.color.
|
|
178
|
-
"border-strong": "primitive.color.
|
|
179
|
-
"border-focus": "primitive.color.primary.
|
|
189
|
+
"border-default": "primitive.color.gray.200",
|
|
190
|
+
"border-strong": "primitive.color.gray.400",
|
|
191
|
+
"border-focus": "primitive.color.primary.600",
|
|
180
192
|
"border-error": "primitive.color.error.500",
|
|
181
193
|
"border-success": "primitive.color.success.500",
|
|
182
194
|
"icon-primary": "primitive.color.neutral.700",
|
|
@@ -185,11 +197,11 @@
|
|
|
185
197
|
"interactive-primary": "primitive.color.primary.600",
|
|
186
198
|
"interactive-primary-hover": "primitive.color.primary.700",
|
|
187
199
|
"interactive-primary-active": "primitive.color.primary.800",
|
|
188
|
-
"interactive-secondary": "primitive.color.
|
|
189
|
-
"interactive-secondary-hover": "primitive.color.
|
|
200
|
+
"interactive-secondary": "primitive.color.gray.600",
|
|
201
|
+
"interactive-secondary-hover": "primitive.color.gray.700",
|
|
190
202
|
"interactive-danger": "primitive.color.error.600",
|
|
191
203
|
"interactive-danger-hover": "primitive.color.error.700",
|
|
192
|
-
"focus-ring": "primitive.color.primary.
|
|
204
|
+
"focus-ring": "primitive.color.primary.600"
|
|
193
205
|
},
|
|
194
206
|
"space": {
|
|
195
207
|
"component-gap": "primitive.space.md",
|
|
@@ -371,13 +383,6 @@
|
|
|
371
383
|
"border-radius": "semantic.radius.card",
|
|
372
384
|
"shadow": "primitive.shadow.lg"
|
|
373
385
|
},
|
|
374
|
-
"menu": {
|
|
375
|
-
"item-height": "40px",
|
|
376
|
-
"item-padding-x": "primitive.space.lg",
|
|
377
|
-
"group-title-padding": "primitive.space.md",
|
|
378
|
-
"indent-width": "primitive.space.xl",
|
|
379
|
-
"border-radius": "semantic.radius.component"
|
|
380
|
-
},
|
|
381
386
|
"notification": {
|
|
382
387
|
"width": "384px",
|
|
383
388
|
"padding": "primitive.space.lg",
|
|
@@ -392,5 +397,174 @@
|
|
|
392
397
|
"shadow": "primitive.shadow.lg",
|
|
393
398
|
"max-width": "320px"
|
|
394
399
|
}
|
|
400
|
+
},
|
|
401
|
+
"runtime": {
|
|
402
|
+
"breakpoints": {
|
|
403
|
+
"xs": "0px",
|
|
404
|
+
"sm": "640px",
|
|
405
|
+
"md": "768px",
|
|
406
|
+
"lg": "1024px",
|
|
407
|
+
"xl": "1280px"
|
|
408
|
+
},
|
|
409
|
+
"light": {
|
|
410
|
+
"colors": {
|
|
411
|
+
"primary": "primitive.color.primary.600",
|
|
412
|
+
"primaryHover": "primitive.color.primary.700",
|
|
413
|
+
"primaryActive": "primitive.color.primary.800",
|
|
414
|
+
"primaryDisabled": "primitive.color.primary.300",
|
|
415
|
+
"primaryForeground": "#ffffff",
|
|
416
|
+
"secondary": "primitive.color.gray.600",
|
|
417
|
+
"secondaryHover": "primitive.color.gray.700",
|
|
418
|
+
"secondaryActive": "primitive.color.gray.800",
|
|
419
|
+
"secondaryDisabled": "primitive.color.gray.400",
|
|
420
|
+
"secondaryForeground": "#ffffff",
|
|
421
|
+
"outlineBgHover": "primitive.color.primary.50",
|
|
422
|
+
"ghostBgHover": "primitive.color.primary.50",
|
|
423
|
+
"focusRing": "primitive.color.primary.600",
|
|
424
|
+
"surface": "#ffffff",
|
|
425
|
+
"surfaceMuted": "primitive.color.gray.50",
|
|
426
|
+
"surfaceRaised": "#ffffff",
|
|
427
|
+
"text": "primitive.color.gray.950",
|
|
428
|
+
"textSecondary": "primitive.color.gray.500",
|
|
429
|
+
"textDisabled": "primitive.color.gray.300",
|
|
430
|
+
"border": "primitive.color.gray.200",
|
|
431
|
+
"borderStrong": "primitive.color.gray.400",
|
|
432
|
+
"success": "primitive.color.success.600",
|
|
433
|
+
"warning": "primitive.color.warning.600",
|
|
434
|
+
"error": "primitive.color.error.600",
|
|
435
|
+
"errorForeground": "#ffffff",
|
|
436
|
+
"errorHover": "primitive.color.error.700",
|
|
437
|
+
"errorDisabled": "primitive.color.error.300",
|
|
438
|
+
"errorBgHover": "primitive.color.error.50",
|
|
439
|
+
"info": "primitive.color.info.500",
|
|
440
|
+
"chart1": "primitive.color.primary.600",
|
|
441
|
+
"chart2": "primitive.color.success.600",
|
|
442
|
+
"chart3": "primitive.color.warning.600",
|
|
443
|
+
"chart4": "#a855f7",
|
|
444
|
+
"chart5": "#0ea5e9",
|
|
445
|
+
"chart6": "primitive.color.error.500"
|
|
446
|
+
},
|
|
447
|
+
"typography": {
|
|
448
|
+
"fontFamily": "primitive.font.family.base",
|
|
449
|
+
"fontFamilyMono": "primitive.font.family.mono",
|
|
450
|
+
"fontSizeBase": "primitive.font.size.base",
|
|
451
|
+
"fontSizeSm": "primitive.font.size.sm",
|
|
452
|
+
"fontSizeLg": "primitive.font.size.lg",
|
|
453
|
+
"fontWeightNormal": "primitive.font.weight.normal",
|
|
454
|
+
"fontWeightMedium": "primitive.font.weight.medium",
|
|
455
|
+
"fontWeightSemibold": "primitive.font.weight.semibold",
|
|
456
|
+
"fontWeightBold": "primitive.font.weight.bold",
|
|
457
|
+
"lineHeightNormal": "primitive.font.lineHeight.normal",
|
|
458
|
+
"lineHeightTight": "primitive.font.lineHeight.tight"
|
|
459
|
+
},
|
|
460
|
+
"radius": {
|
|
461
|
+
"none": "primitive.radius.none",
|
|
462
|
+
"sm": "primitive.radius.sm",
|
|
463
|
+
"md": "primitive.radius.md",
|
|
464
|
+
"lg": "primitive.radius.lg",
|
|
465
|
+
"xl": "primitive.radius.xl",
|
|
466
|
+
"full": "primitive.radius.full"
|
|
467
|
+
},
|
|
468
|
+
"shadows": {
|
|
469
|
+
"xs": "primitive.shadow.xs",
|
|
470
|
+
"sm": "primitive.shadow.sm",
|
|
471
|
+
"md": "primitive.shadow.md",
|
|
472
|
+
"lg": "primitive.shadow.lg",
|
|
473
|
+
"xl": "primitive.shadow.xl"
|
|
474
|
+
},
|
|
475
|
+
"spacing": {
|
|
476
|
+
"xs": "primitive.space.xs",
|
|
477
|
+
"sm": "primitive.space.sm",
|
|
478
|
+
"md": "primitive.space.md",
|
|
479
|
+
"lg": "primitive.space.lg",
|
|
480
|
+
"xl": "primitive.space.xl"
|
|
481
|
+
},
|
|
482
|
+
"motion": {
|
|
483
|
+
"durationFast": "150ms",
|
|
484
|
+
"durationBase": "primitive.duration.base",
|
|
485
|
+
"durationSlow": "primitive.duration.slow",
|
|
486
|
+
"easing": "primitive.easing.in-out"
|
|
487
|
+
}
|
|
488
|
+
},
|
|
489
|
+
"dark": {
|
|
490
|
+
"colors": {
|
|
491
|
+
"primary": "primitive.color.primary.400",
|
|
492
|
+
"primaryHover": "primitive.color.primary.300",
|
|
493
|
+
"primaryActive": "primitive.color.primary.200",
|
|
494
|
+
"primaryDisabled": "primitive.color.primary.800",
|
|
495
|
+
"primaryForeground": "primitive.color.gray.950",
|
|
496
|
+
"secondary": "primitive.color.gray.400",
|
|
497
|
+
"secondaryHover": "primitive.color.gray.300",
|
|
498
|
+
"secondaryActive": "primitive.color.gray.200",
|
|
499
|
+
"secondaryDisabled": "primitive.color.gray.600",
|
|
500
|
+
"secondaryForeground": "primitive.color.gray.950",
|
|
501
|
+
"outlineBgHover": "#1e3a5f",
|
|
502
|
+
"ghostBgHover": "#1e3a5f",
|
|
503
|
+
"focusRing": "primitive.color.primary.400",
|
|
504
|
+
"surface": "primitive.color.gray.950",
|
|
505
|
+
"surfaceMuted": "primitive.color.gray.800",
|
|
506
|
+
"surfaceRaised": "primitive.color.gray.800",
|
|
507
|
+
"text": "primitive.color.gray.50",
|
|
508
|
+
"textSecondary": "primitive.color.gray.300",
|
|
509
|
+
"textDisabled": "primitive.color.gray.600",
|
|
510
|
+
"border": "primitive.color.gray.700",
|
|
511
|
+
"borderStrong": "primitive.color.gray.500",
|
|
512
|
+
"success": "primitive.color.success.400",
|
|
513
|
+
"warning": "primitive.color.warning.400",
|
|
514
|
+
"error": "primitive.color.error.400",
|
|
515
|
+
"errorForeground": "primitive.color.gray.950",
|
|
516
|
+
"errorHover": "primitive.color.error.300",
|
|
517
|
+
"errorDisabled": "primitive.color.error.800",
|
|
518
|
+
"errorBgHover": "primitive.color.gray.800",
|
|
519
|
+
"info": "primitive.color.info.400",
|
|
520
|
+
"chart1": "primitive.color.primary.400",
|
|
521
|
+
"chart2": "primitive.color.success.400",
|
|
522
|
+
"chart3": "primitive.color.warning.400",
|
|
523
|
+
"chart4": "#c084fc",
|
|
524
|
+
"chart5": "#38bdf8",
|
|
525
|
+
"chart6": "primitive.color.error.400"
|
|
526
|
+
},
|
|
527
|
+
"typography": {
|
|
528
|
+
"fontFamily": "primitive.font.family.base",
|
|
529
|
+
"fontFamilyMono": "primitive.font.family.mono",
|
|
530
|
+
"fontSizeBase": "primitive.font.size.base",
|
|
531
|
+
"fontSizeSm": "primitive.font.size.sm",
|
|
532
|
+
"fontSizeLg": "primitive.font.size.lg",
|
|
533
|
+
"fontWeightNormal": "primitive.font.weight.normal",
|
|
534
|
+
"fontWeightMedium": "primitive.font.weight.medium",
|
|
535
|
+
"fontWeightSemibold": "primitive.font.weight.semibold",
|
|
536
|
+
"fontWeightBold": "primitive.font.weight.bold",
|
|
537
|
+
"lineHeightNormal": "primitive.font.lineHeight.normal",
|
|
538
|
+
"lineHeightTight": "primitive.font.lineHeight.tight"
|
|
539
|
+
},
|
|
540
|
+
"radius": {
|
|
541
|
+
"none": "primitive.radius.none",
|
|
542
|
+
"sm": "primitive.radius.sm",
|
|
543
|
+
"md": "primitive.radius.md",
|
|
544
|
+
"lg": "primitive.radius.lg",
|
|
545
|
+
"xl": "primitive.radius.xl",
|
|
546
|
+
"full": "primitive.radius.full"
|
|
547
|
+
},
|
|
548
|
+
"shadows": {
|
|
549
|
+
"xs": "0 1px 2px 0 rgba(0,0,0,0.2)",
|
|
550
|
+
"sm": "0 1px 3px 0 rgba(0,0,0,0.3), 0 1px 2px -1px rgba(0,0,0,0.25)",
|
|
551
|
+
"md": "0 4px 6px -1px rgba(0,0,0,0.3), 0 2px 4px -2px rgba(0,0,0,0.25)",
|
|
552
|
+
"lg": "0 10px 15px -3px rgba(0,0,0,0.3), 0 4px 6px -4px rgba(0,0,0,0.25)",
|
|
553
|
+
"xl": "0 20px 25px -5px rgba(0,0,0,0.3), 0 8px 10px -6px rgba(0,0,0,0.25)"
|
|
554
|
+
},
|
|
555
|
+
"spacing": {
|
|
556
|
+
"xs": "primitive.space.xs",
|
|
557
|
+
"sm": "primitive.space.sm",
|
|
558
|
+
"md": "primitive.space.md",
|
|
559
|
+
"lg": "primitive.space.lg",
|
|
560
|
+
"xl": "primitive.space.xl"
|
|
561
|
+
},
|
|
562
|
+
"motion": {
|
|
563
|
+
"durationFast": "150ms",
|
|
564
|
+
"durationBase": "primitive.duration.base",
|
|
565
|
+
"durationSlow": "primitive.duration.slow",
|
|
566
|
+
"easing": "primitive.easing.in-out"
|
|
567
|
+
}
|
|
568
|
+
}
|
|
395
569
|
}
|
|
396
570
|
}
|
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Base shared prop interfaces
|
|
3
|
-
*
|
|
4
|
-
* These provide common prop shapes for interactive, form-control,
|
|
5
|
-
* and layout components. Component-specific Props should extend or
|
|
6
|
-
* pick from these as needed.
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* ```ts
|
|
10
|
-
* import type { BaseInteractiveProps } from '@expcat/tigercat-core'
|
|
11
|
-
*
|
|
12
|
-
* export interface MyButtonProps extends BaseInteractiveProps {
|
|
13
|
-
* variant?: 'primary' | 'secondary'
|
|
14
|
-
* }
|
|
15
|
-
* ```
|
|
16
|
-
*/
|
|
17
|
-
/**
|
|
18
|
-
* Standard component size values.
|
|
19
|
-
* Individual components may extend this union (e.g. add 'xs' | 'xl').
|
|
20
|
-
*/
|
|
21
|
-
type ComponentSize = 'sm' | 'md' | 'lg';
|
|
22
|
-
/**
|
|
23
|
-
* Base props shared by interactive (clickable / focusable) components.
|
|
24
|
-
*
|
|
25
|
-
* Covers: Button, Link, Tag, Card, Badge, etc.
|
|
26
|
-
*/
|
|
27
|
-
interface BaseInteractiveProps {
|
|
28
|
-
/** Whether the component is disabled */
|
|
29
|
-
disabled?: boolean;
|
|
30
|
-
/** Component size */
|
|
31
|
-
size?: ComponentSize;
|
|
32
|
-
/** Whether the component shows a loading indicator */
|
|
33
|
-
loading?: boolean;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Base props shared by form-control components.
|
|
37
|
-
*
|
|
38
|
-
* Covers: Input, Select, Checkbox, Radio, Switch, DatePicker, etc.
|
|
39
|
-
*
|
|
40
|
-
* Uses generics so each component can specify its own value type.
|
|
41
|
-
*/
|
|
42
|
-
interface BaseFormControlProps<T = unknown> {
|
|
43
|
-
/** Controlled value */
|
|
44
|
-
value?: T;
|
|
45
|
-
/** Default (uncontrolled) value */
|
|
46
|
-
defaultValue?: T;
|
|
47
|
-
/** Form field name attribute */
|
|
48
|
-
name?: string;
|
|
49
|
-
/** Whether the field is required */
|
|
50
|
-
required?: boolean;
|
|
51
|
-
/** Whether the field is disabled */
|
|
52
|
-
disabled?: boolean;
|
|
53
|
-
/** Component size */
|
|
54
|
-
size?: ComponentSize;
|
|
55
|
-
/** Placeholder text */
|
|
56
|
-
placeholder?: string;
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Base props shared by layout / spacing components.
|
|
60
|
-
*
|
|
61
|
-
* Covers: Space, Row/Col, Container, etc.
|
|
62
|
-
*/
|
|
63
|
-
interface BaseLayoutProps {
|
|
64
|
-
/** Layout direction */
|
|
65
|
-
direction?: 'horizontal' | 'vertical';
|
|
66
|
-
/** Cross-axis alignment */
|
|
67
|
-
align?: 'start' | 'end' | 'center' | 'baseline' | 'stretch';
|
|
68
|
-
/** Main-axis justification */
|
|
69
|
-
justify?: 'start' | 'end' | 'center' | 'space-around' | 'space-between' | 'space-evenly';
|
|
70
|
-
/** Whether children should wrap */
|
|
71
|
-
wrap?: boolean;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* DatePicker component types and interfaces
|
|
76
|
-
*/
|
|
77
|
-
|
|
78
|
-
type DatePickerInputDate = Date | string;
|
|
79
|
-
type DatePickerModelValue = DatePickerInputDate | null | [DatePickerInputDate | null, DatePickerInputDate | null];
|
|
80
|
-
interface DatePickerLabels {
|
|
81
|
-
placeholder: string;
|
|
82
|
-
rangePlaceholder: string;
|
|
83
|
-
today: string;
|
|
84
|
-
ok: string;
|
|
85
|
-
calendar: string;
|
|
86
|
-
toggleCalendar: string;
|
|
87
|
-
clearDate: string;
|
|
88
|
-
previousMonth: string;
|
|
89
|
-
nextMonth: string;
|
|
90
|
-
year: string;
|
|
91
|
-
month: string;
|
|
92
|
-
day: string;
|
|
93
|
-
}
|
|
94
|
-
interface DatePickerLocalePreset {
|
|
95
|
-
locale: string;
|
|
96
|
-
labels: Partial<DatePickerLabels>;
|
|
97
|
-
}
|
|
98
|
-
interface DatePickerLocaleConfig {
|
|
99
|
-
datePicker?: Partial<DatePickerLocalePreset>;
|
|
100
|
-
}
|
|
101
|
-
type DatePickerLocaleInput = string | Partial<DatePickerLocalePreset> | DatePickerLocaleConfig;
|
|
102
|
-
/**
|
|
103
|
-
* Date format types
|
|
104
|
-
*/
|
|
105
|
-
type DateFormat = 'yyyy-MM-dd' | 'MM/dd/yyyy' | 'dd/MM/yyyy' | 'yyyy/MM/dd';
|
|
106
|
-
/**
|
|
107
|
-
* Base DatePicker props interface
|
|
108
|
-
*/
|
|
109
|
-
interface DatePickerProps {
|
|
110
|
-
/**
|
|
111
|
-
* Locale used for month/day names in the calendar UI.
|
|
112
|
-
* Example: 'zh-CN', 'en-US'
|
|
113
|
-
*/
|
|
114
|
-
locale?: DatePickerLocaleInput;
|
|
115
|
-
/**
|
|
116
|
-
* UI labels for i18n.
|
|
117
|
-
* When provided, merges with locale-based defaults.
|
|
118
|
-
*/
|
|
119
|
-
labels?: Partial<DatePickerLabels>;
|
|
120
|
-
/**
|
|
121
|
-
* DatePicker size
|
|
122
|
-
* @default 'md'
|
|
123
|
-
*/
|
|
124
|
-
size?: ComponentSize;
|
|
125
|
-
/**
|
|
126
|
-
* Selected date value (for controlled mode)
|
|
127
|
-
*/
|
|
128
|
-
value?: DatePickerModelValue | null;
|
|
129
|
-
/**
|
|
130
|
-
* Default date value (for uncontrolled mode)
|
|
131
|
-
*/
|
|
132
|
-
defaultValue?: DatePickerModelValue | null;
|
|
133
|
-
/**
|
|
134
|
-
* Enable range selection (start/end).
|
|
135
|
-
* When true, value/defaultValue use a tuple: [start, end].
|
|
136
|
-
* @default false
|
|
137
|
-
*/
|
|
138
|
-
range?: boolean;
|
|
139
|
-
/**
|
|
140
|
-
* Date format string
|
|
141
|
-
* @default 'yyyy-MM-dd'
|
|
142
|
-
*/
|
|
143
|
-
format?: DateFormat;
|
|
144
|
-
/**
|
|
145
|
-
* Placeholder text
|
|
146
|
-
* @default 'Select date'
|
|
147
|
-
*/
|
|
148
|
-
placeholder?: string;
|
|
149
|
-
/**
|
|
150
|
-
* Whether the datepicker is disabled
|
|
151
|
-
* @default false
|
|
152
|
-
*/
|
|
153
|
-
disabled?: boolean;
|
|
154
|
-
/**
|
|
155
|
-
* Whether the datepicker is readonly
|
|
156
|
-
* @default false
|
|
157
|
-
*/
|
|
158
|
-
readonly?: boolean;
|
|
159
|
-
/**
|
|
160
|
-
* Whether the datepicker is required
|
|
161
|
-
* @default false
|
|
162
|
-
*/
|
|
163
|
-
required?: boolean;
|
|
164
|
-
/**
|
|
165
|
-
* Minimum selectable date
|
|
166
|
-
*/
|
|
167
|
-
minDate?: DatePickerInputDate | null;
|
|
168
|
-
/**
|
|
169
|
-
* Maximum selectable date
|
|
170
|
-
*/
|
|
171
|
-
maxDate?: DatePickerInputDate | null;
|
|
172
|
-
/**
|
|
173
|
-
* Whether to show the clear button
|
|
174
|
-
* @default true
|
|
175
|
-
*/
|
|
176
|
-
clearable?: boolean;
|
|
177
|
-
/**
|
|
178
|
-
* Input name attribute
|
|
179
|
-
*/
|
|
180
|
-
name?: string;
|
|
181
|
-
/**
|
|
182
|
-
* Input id attribute
|
|
183
|
-
*/
|
|
184
|
-
id?: string;
|
|
185
|
-
/**
|
|
186
|
-
* Shortcut presets for quick date selection.
|
|
187
|
-
* Each shortcut has a label and a value (or getter function).
|
|
188
|
-
*/
|
|
189
|
-
shortcuts?: DatePickerShortcut[];
|
|
190
|
-
}
|
|
191
|
-
/**
|
|
192
|
-
* DatePicker shortcut preset
|
|
193
|
-
*/
|
|
194
|
-
interface DatePickerShortcut {
|
|
195
|
-
/** Display label */
|
|
196
|
-
label: string;
|
|
197
|
-
/** Date value or getter function returning a date value */
|
|
198
|
-
value: DatePickerModelValue | (() => DatePickerModelValue);
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
export type { BaseLayoutProps as B, ComponentSize as C, DatePickerLocalePreset as D, DatePickerLabels as a, DatePickerLocaleInput as b, DateFormat as c, BaseFormControlProps as d, BaseInteractiveProps as e, DatePickerInputDate as f, DatePickerLocaleConfig as g, DatePickerModelValue as h, DatePickerProps as i, DatePickerShortcut as j };
|