@expcat/tigercat-core 0.1.8 → 0.2.0
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/index.cjs +1917 -839
- package/dist/index.d.cts +6535 -4553
- package/dist/index.d.ts +6535 -4553
- package/dist/index.js +1827 -839
- package/package.json +4 -1
package/dist/index.cjs
CHANGED
|
@@ -101,14 +101,40 @@ var require_plugin = __commonJS({
|
|
|
101
101
|
// src/index.ts
|
|
102
102
|
var index_exports = {};
|
|
103
103
|
__export(index_exports, {
|
|
104
|
+
ANIMATION_DURATION_FAST_MS: () => ANIMATION_DURATION_FAST_MS,
|
|
105
|
+
ANIMATION_DURATION_MS: () => ANIMATION_DURATION_MS,
|
|
106
|
+
ANIMATION_DURATION_SLOW_MS: () => ANIMATION_DURATION_SLOW_MS,
|
|
104
107
|
CalendarIconPath: () => CalendarIconPath,
|
|
105
108
|
ChevronLeftIconPath: () => ChevronLeftIconPath,
|
|
106
109
|
ChevronRightIconPath: () => ChevronRightIconPath,
|
|
107
110
|
ClockIconPath: () => ClockIconPath,
|
|
108
111
|
CloseIconPath: () => CloseIconPath,
|
|
112
|
+
DEFAULT_CHART_COLORS: () => DEFAULT_CHART_COLORS,
|
|
113
|
+
DEFAULT_PAGINATION_LABELS: () => DEFAULT_PAGINATION_LABELS,
|
|
114
|
+
DURATION_CLASS: () => DURATION_CLASS,
|
|
115
|
+
DURATION_FAST_CLASS: () => DURATION_FAST_CLASS,
|
|
116
|
+
DURATION_SLOW_CLASS: () => DURATION_SLOW_CLASS,
|
|
117
|
+
EASING_DEFAULT: () => EASING_DEFAULT,
|
|
118
|
+
EASING_ENTER: () => EASING_ENTER,
|
|
119
|
+
EASING_LEAVE: () => EASING_LEAVE,
|
|
109
120
|
SHAKE_CLASS: () => SHAKE_CLASS,
|
|
121
|
+
SPACE_BASE_CLASS: () => SPACE_BASE_CLASS,
|
|
122
|
+
SVG_ANIMATION_CLASSES: () => SVG_ANIMATION_CLASSES,
|
|
123
|
+
SVG_ANIMATION_VARS: () => SVG_ANIMATION_VARS,
|
|
124
|
+
SVG_DEFAULT_FILL: () => SVG_DEFAULT_FILL,
|
|
125
|
+
SVG_DEFAULT_STROKE: () => SVG_DEFAULT_STROKE,
|
|
126
|
+
SVG_DEFAULT_VIEWBOX_20: () => SVG_DEFAULT_VIEWBOX_20,
|
|
127
|
+
SVG_DEFAULT_VIEWBOX_24: () => SVG_DEFAULT_VIEWBOX_24,
|
|
128
|
+
SVG_DEFAULT_XMLNS: () => SVG_DEFAULT_XMLNS,
|
|
129
|
+
SVG_PATH_ANIMATION_CSS: () => SVG_PATH_ANIMATION_CSS,
|
|
110
130
|
THEME_CSS_VARS: () => THEME_CSS_VARS,
|
|
131
|
+
TRANSITION_BASE: () => TRANSITION_BASE,
|
|
132
|
+
TRANSITION_OPACITY: () => TRANSITION_OPACITY,
|
|
133
|
+
TRANSITION_TRANSFORM: () => TRANSITION_TRANSFORM,
|
|
111
134
|
TimePickerCloseIconPath: () => TimePickerCloseIconPath,
|
|
135
|
+
ZH_CN_PAGINATION_LABELS: () => ZH_CN_PAGINATION_LABELS,
|
|
136
|
+
activeOpacityClasses: () => activeOpacityClasses,
|
|
137
|
+
activePressClasses: () => activePressClasses,
|
|
112
138
|
alertBaseClasses: () => alertBaseClasses,
|
|
113
139
|
alertCloseButtonBaseClasses: () => alertCloseButtonBaseClasses,
|
|
114
140
|
alertCloseIconPath: () => alertCloseIconPath,
|
|
@@ -124,7 +150,9 @@ __export(index_exports, {
|
|
|
124
150
|
alertWarningIconPath: () => alertWarningIconPath,
|
|
125
151
|
animationDelayClasses: () => animationDelayClasses,
|
|
126
152
|
animationDelayStyles: () => animationDelayStyles,
|
|
153
|
+
applyFloatingStyles: () => applyFloatingStyles,
|
|
127
154
|
autoResizeTextarea: () => autoResizeTextarea,
|
|
155
|
+
autoUpdateFloating: () => autoUpdateFloating,
|
|
128
156
|
avatarBaseClasses: () => avatarBaseClasses,
|
|
129
157
|
avatarDefaultBgColor: () => avatarDefaultBgColor,
|
|
130
158
|
avatarDefaultTextColor: () => avatarDefaultTextColor,
|
|
@@ -161,8 +189,17 @@ __export(index_exports, {
|
|
|
161
189
|
cardHoverClasses: () => cardHoverClasses,
|
|
162
190
|
cardSizeClasses: () => cardSizeClasses,
|
|
163
191
|
cardVariantClasses: () => cardVariantClasses,
|
|
192
|
+
chartAxisLabelClasses: () => chartAxisLabelClasses,
|
|
193
|
+
chartAxisLineClasses: () => chartAxisLineClasses,
|
|
194
|
+
chartAxisTickLineClasses: () => chartAxisTickLineClasses,
|
|
195
|
+
chartAxisTickTextClasses: () => chartAxisTickTextClasses,
|
|
196
|
+
chartCanvasBaseClasses: () => chartCanvasBaseClasses,
|
|
197
|
+
chartGridLineClasses: () => chartGridLineClasses,
|
|
198
|
+
chartInteractiveClasses: () => chartInteractiveClasses,
|
|
199
|
+
checkSolidIcon20PathD: () => checkSolidIcon20PathD,
|
|
164
200
|
checkboxLabelSizeClasses: () => checkboxLabelSizeClasses,
|
|
165
201
|
checkboxSizeClasses: () => checkboxSizeClasses,
|
|
202
|
+
chevronDownSolidIcon20PathD: () => chevronDownSolidIcon20PathD,
|
|
166
203
|
chevronLeftSolidIcon20PathD: () => chevronLeftSolidIcon20PathD,
|
|
167
204
|
chevronRightSolidIcon20PathD: () => chevronRightSolidIcon20PathD,
|
|
168
205
|
clampPercentage: () => clampPercentage,
|
|
@@ -181,12 +218,21 @@ __export(index_exports, {
|
|
|
181
218
|
codeBlockPreClasses: () => codeBlockPreClasses,
|
|
182
219
|
coerceClassValue: () => coerceClassValue,
|
|
183
220
|
coerceStyleValue: () => coerceStyleValue,
|
|
221
|
+
computeFloatingPosition: () => computeFloatingPosition,
|
|
184
222
|
containerBaseClasses: () => containerBaseClasses,
|
|
185
223
|
containerCenteredClasses: () => containerCenteredClasses,
|
|
186
224
|
containerMaxWidthClasses: () => containerMaxWidthClasses,
|
|
187
225
|
containerPaddingClasses: () => containerPaddingClasses,
|
|
188
226
|
copyTextToClipboard: () => copyTextToClipboard,
|
|
227
|
+
createAreaPath: () => createAreaPath,
|
|
189
228
|
createAriaId: () => createAriaId,
|
|
229
|
+
createBandScale: () => createBandScale,
|
|
230
|
+
createChartInteractionHandlers: () => createChartInteractionHandlers,
|
|
231
|
+
createLinePath: () => createLinePath,
|
|
232
|
+
createLinearScale: () => createLinearScale,
|
|
233
|
+
createPieArcPath: () => createPieArcPath,
|
|
234
|
+
createPointScale: () => createPointScale,
|
|
235
|
+
createPolygonPath: () => createPolygonPath,
|
|
190
236
|
datePickerBaseClasses: () => datePickerBaseClasses,
|
|
191
237
|
datePickerCalendarClasses: () => datePickerCalendarClasses,
|
|
192
238
|
datePickerCalendarGridClasses: () => datePickerCalendarGridClasses,
|
|
@@ -210,6 +256,7 @@ __export(index_exports, {
|
|
|
210
256
|
defaultSortFn: () => defaultSortFn,
|
|
211
257
|
defaultTagThemeColors: () => defaultTagThemeColors,
|
|
212
258
|
defaultThemeColors: () => defaultThemeColors,
|
|
259
|
+
defaultTooltipFormatter: () => defaultTooltipFormatter,
|
|
213
260
|
defaultTotalText: () => defaultTotalText,
|
|
214
261
|
descriptionsBaseClasses: () => descriptionsBaseClasses,
|
|
215
262
|
descriptionsCellSizeClasses: () => descriptionsCellSizeClasses,
|
|
@@ -240,10 +287,14 @@ __export(index_exports, {
|
|
|
240
287
|
flattenTree: () => flattenTree,
|
|
241
288
|
focusElement: () => focusElement,
|
|
242
289
|
focusFirst: () => focusFirst,
|
|
290
|
+
focusRingClasses: () => focusRingClasses,
|
|
291
|
+
focusRingInsetClasses: () => focusRingInsetClasses,
|
|
243
292
|
formatBadgeContent: () => formatBadgeContent,
|
|
244
293
|
formatDate: () => formatDate,
|
|
245
294
|
formatFileSize: () => formatFileSize,
|
|
246
295
|
formatMonthYear: () => formatMonthYear,
|
|
296
|
+
formatPageAriaLabel: () => formatPageAriaLabel,
|
|
297
|
+
formatPaginationTotal: () => formatPaginationTotal,
|
|
247
298
|
formatProgressText: () => formatProgressText,
|
|
248
299
|
formatTime: () => formatTime,
|
|
249
300
|
formatTimeDisplay: () => formatTimeDisplay,
|
|
@@ -254,18 +305,27 @@ __export(index_exports, {
|
|
|
254
305
|
generateMinutes: () => generateMinutes,
|
|
255
306
|
generateSeconds: () => generateSeconds,
|
|
256
307
|
getActiveElement: () => getActiveElement,
|
|
308
|
+
getActiveIndex: () => getActiveIndex,
|
|
257
309
|
getAlertIconPath: () => getAlertIconPath,
|
|
258
310
|
getAlertTypeClasses: () => getAlertTypeClasses,
|
|
259
311
|
getAlignClasses: () => getAlignClasses,
|
|
260
312
|
getAllKeys: () => getAllKeys,
|
|
313
|
+
getArrowStyles: () => getArrowStyles,
|
|
261
314
|
getAutoExpandKeys: () => getAutoExpandKeys,
|
|
262
315
|
getBadgeVariantClasses: () => getBadgeVariantClasses,
|
|
316
|
+
getBarGrowAnimationStyle: () => getBarGrowAnimationStyle,
|
|
263
317
|
getBreadcrumbItemClasses: () => getBreadcrumbItemClasses,
|
|
264
318
|
getBreadcrumbLinkClasses: () => getBreadcrumbLinkClasses,
|
|
265
319
|
getBreadcrumbSeparatorClasses: () => getBreadcrumbSeparatorClasses,
|
|
266
320
|
getButtonVariantClasses: () => getButtonVariantClasses,
|
|
267
321
|
getCalendarDays: () => getCalendarDays,
|
|
268
322
|
getCardClasses: () => getCardClasses,
|
|
323
|
+
getChartAnimationStyle: () => getChartAnimationStyle,
|
|
324
|
+
getChartAxisTicks: () => getChartAxisTicks,
|
|
325
|
+
getChartElementOpacity: () => getChartElementOpacity,
|
|
326
|
+
getChartEntranceTransform: () => getChartEntranceTransform,
|
|
327
|
+
getChartGridLineDasharray: () => getChartGridLineDasharray,
|
|
328
|
+
getChartInnerRect: () => getChartInnerRect,
|
|
269
329
|
getCheckboxCellClasses: () => getCheckboxCellClasses,
|
|
270
330
|
getCheckboxClasses: () => getCheckboxClasses,
|
|
271
331
|
getCheckboxLabelClasses: () => getCheckboxLabelClasses,
|
|
@@ -343,6 +403,7 @@ __export(index_exports, {
|
|
|
343
403
|
getNextActiveKey: () => getNextActiveKey,
|
|
344
404
|
getNotificationIconPath: () => getNotificationIconPath,
|
|
345
405
|
getNotificationTypeClasses: () => getNotificationTypeClasses,
|
|
406
|
+
getNumberExtent: () => getNumberExtent,
|
|
346
407
|
getOffsetClasses: () => getOffsetClasses,
|
|
347
408
|
getOrderClasses: () => getOrderClasses,
|
|
348
409
|
getPageNumbers: () => getPageNumbers,
|
|
@@ -352,10 +413,17 @@ __export(index_exports, {
|
|
|
352
413
|
getPaginationButtonBaseClasses: () => getPaginationButtonBaseClasses,
|
|
353
414
|
getPaginationContainerClasses: () => getPaginationContainerClasses,
|
|
354
415
|
getPaginationEllipsisClasses: () => getPaginationEllipsisClasses,
|
|
416
|
+
getPaginationLabels: () => getPaginationLabels,
|
|
355
417
|
getParagraphRowWidth: () => getParagraphRowWidth,
|
|
356
418
|
getParentKeys: () => getParentKeys,
|
|
419
|
+
getPathDrawAnimationStyle: () => getPathDrawAnimationStyle,
|
|
420
|
+
getPathDrawStyles: () => getPathDrawStyles,
|
|
421
|
+
getPathLength: () => getPathLength,
|
|
357
422
|
getPendingDotClasses: () => getPendingDotClasses,
|
|
358
423
|
getPictureCardClasses: () => getPictureCardClasses,
|
|
424
|
+
getPieArcs: () => getPieArcs,
|
|
425
|
+
getPieDrawAnimationStyle: () => getPieDrawAnimationStyle,
|
|
426
|
+
getPlacementSide: () => getPlacementSide,
|
|
359
427
|
getPopconfirmArrowClasses: () => getPopconfirmArrowClasses,
|
|
360
428
|
getPopconfirmButtonBaseClasses: () => getPopconfirmButtonBaseClasses,
|
|
361
429
|
getPopconfirmButtonsClasses: () => getPopconfirmButtonsClasses,
|
|
@@ -376,6 +444,8 @@ __export(index_exports, {
|
|
|
376
444
|
getProgressTextColorClasses: () => getProgressTextColorClasses,
|
|
377
445
|
getProgressVariantClasses: () => getProgressVariantClasses,
|
|
378
446
|
getQuickJumperInputClasses: () => getQuickJumperInputClasses,
|
|
447
|
+
getRadarAngles: () => getRadarAngles,
|
|
448
|
+
getRadarPoints: () => getRadarPoints,
|
|
379
449
|
getRadioColorClasses: () => getRadioColorClasses,
|
|
380
450
|
getRadioDotClasses: () => getRadioDotClasses,
|
|
381
451
|
getRadioGroupClasses: () => getRadioGroupClasses,
|
|
@@ -389,6 +459,13 @@ __export(index_exports, {
|
|
|
389
459
|
getSeparatorContent: () => getSeparatorContent,
|
|
390
460
|
getShortDayNames: () => getShortDayNames,
|
|
391
461
|
getShortMonthNames: () => getShortMonthNames,
|
|
462
|
+
getSimplePaginationButtonClasses: () => getSimplePaginationButtonClasses,
|
|
463
|
+
getSimplePaginationButtonsWrapperClasses: () => getSimplePaginationButtonsWrapperClasses,
|
|
464
|
+
getSimplePaginationContainerClasses: () => getSimplePaginationContainerClasses,
|
|
465
|
+
getSimplePaginationControlsClasses: () => getSimplePaginationControlsClasses,
|
|
466
|
+
getSimplePaginationPageIndicatorClasses: () => getSimplePaginationPageIndicatorClasses,
|
|
467
|
+
getSimplePaginationSelectClasses: () => getSimplePaginationSelectClasses,
|
|
468
|
+
getSimplePaginationTotalClasses: () => getSimplePaginationTotalClasses,
|
|
392
469
|
getSkeletonClasses: () => getSkeletonClasses,
|
|
393
470
|
getSkeletonDimensions: () => getSkeletonDimensions,
|
|
394
471
|
getSliderThumbClasses: () => getSliderThumbClasses,
|
|
@@ -410,6 +487,7 @@ __export(index_exports, {
|
|
|
410
487
|
getStepsContainerClasses: () => getStepsContainerClasses,
|
|
411
488
|
getSubMenuExpandIconClasses: () => getSubMenuExpandIconClasses,
|
|
412
489
|
getSubMenuTitleClasses: () => getSubMenuTitleClasses,
|
|
490
|
+
getSvgDefaultAttrs: () => getSvgDefaultAttrs,
|
|
413
491
|
getSwitchClasses: () => getSwitchClasses,
|
|
414
492
|
getSwitchThumbClasses: () => getSwitchThumbClasses,
|
|
415
493
|
getTabItemClasses: () => getTabItemClasses,
|
|
@@ -443,6 +521,7 @@ __export(index_exports, {
|
|
|
443
521
|
getTooltipTriggerClasses: () => getTooltipTriggerClasses,
|
|
444
522
|
getTotalPages: () => getTotalPages,
|
|
445
523
|
getTotalTextClasses: () => getTotalTextClasses,
|
|
524
|
+
getTransformOrigin: () => getTransformOrigin,
|
|
446
525
|
getTreeNodeClasses: () => getTreeNodeClasses,
|
|
447
526
|
getTreeNodeExpandIconClasses: () => getTreeNodeExpandIconClasses,
|
|
448
527
|
getUploadButtonClasses: () => getUploadButtonClasses,
|
|
@@ -453,6 +532,7 @@ __export(index_exports, {
|
|
|
453
532
|
groupItemsIntoRows: () => groupItemsIntoRows,
|
|
454
533
|
handleNodeCheck: () => handleNodeCheck,
|
|
455
534
|
hasErrors: () => hasErrors,
|
|
535
|
+
icon16ViewBox: () => icon16ViewBox,
|
|
456
536
|
icon20ViewBox: () => icon20ViewBox,
|
|
457
537
|
icon24PathStrokeLinecap: () => icon24PathStrokeLinecap,
|
|
458
538
|
icon24PathStrokeLinejoin: () => icon24PathStrokeLinejoin,
|
|
@@ -463,6 +543,9 @@ __export(index_exports, {
|
|
|
463
543
|
iconWrapperClasses: () => iconWrapperClasses,
|
|
464
544
|
injectLoadingAnimationStyles: () => injectLoadingAnimationStyles,
|
|
465
545
|
injectShakeStyle: () => injectShakeStyle,
|
|
546
|
+
injectSvgAnimationStyles: () => injectSvgAnimationStyles,
|
|
547
|
+
inputFocusClasses: () => inputFocusClasses,
|
|
548
|
+
interactiveClasses: () => interactiveClasses,
|
|
466
549
|
interpolateUploadLabel: () => interpolateUploadLabel,
|
|
467
550
|
isActivationKey: () => isActivationKey,
|
|
468
551
|
isBrowser: () => isBrowser,
|
|
@@ -520,12 +603,15 @@ __export(index_exports, {
|
|
|
520
603
|
loadingSizeClasses: () => loadingSizeClasses,
|
|
521
604
|
loadingSpinnerBaseClasses: () => loadingSpinnerBaseClasses,
|
|
522
605
|
loadingTextSizeClasses: () => loadingTextSizeClasses,
|
|
606
|
+
lockClosedIcon24PathD: () => lockClosedIcon24PathD,
|
|
607
|
+
lockOpenIcon24PathD: () => lockOpenIcon24PathD,
|
|
523
608
|
menuBaseClasses: () => menuBaseClasses,
|
|
524
609
|
menuCollapsedClasses: () => menuCollapsedClasses,
|
|
525
610
|
menuCollapsedItemClasses: () => menuCollapsedItemClasses,
|
|
526
611
|
menuDarkThemeClasses: () => menuDarkThemeClasses,
|
|
527
612
|
menuItemBaseClasses: () => menuItemBaseClasses,
|
|
528
613
|
menuItemDisabledClasses: () => menuItemDisabledClasses,
|
|
614
|
+
menuItemFocusClasses: () => menuItemFocusClasses,
|
|
529
615
|
menuItemGroupTitleClasses: () => menuItemGroupTitleClasses,
|
|
530
616
|
menuItemHoverDarkClasses: () => menuItemHoverDarkClasses,
|
|
531
617
|
menuItemHoverLightClasses: () => menuItemHoverLightClasses,
|
|
@@ -558,6 +644,7 @@ __export(index_exports, {
|
|
|
558
644
|
modalSizeClasses: () => modalSizeClasses,
|
|
559
645
|
modalTitleClasses: () => modalTitleClasses,
|
|
560
646
|
modalWrapperClasses: () => modalWrapperClasses,
|
|
647
|
+
normalizeChartPadding: () => normalizeChartPadding,
|
|
561
648
|
normalizeDate: () => normalizeDate,
|
|
562
649
|
normalizeSvgAttrs: () => normalizeSvgAttrs,
|
|
563
650
|
notificationBaseClasses: () => notificationBaseClasses,
|
|
@@ -575,6 +662,7 @@ __export(index_exports, {
|
|
|
575
662
|
parseDate: () => parseDate,
|
|
576
663
|
parseTime: () => parseTime,
|
|
577
664
|
parseWidthToPx: () => parseWidthToPx,
|
|
665
|
+
polarToCartesian: () => polarToCartesian,
|
|
578
666
|
popconfirmErrorIconPath: () => popconfirmErrorIconPath,
|
|
579
667
|
popconfirmIconPathStrokeLinecap: () => popconfirmIconPathStrokeLinecap,
|
|
580
668
|
popconfirmIconPathStrokeLinejoin: () => popconfirmIconPathStrokeLinejoin,
|
|
@@ -625,12 +713,20 @@ __export(index_exports, {
|
|
|
625
713
|
skeletonVariantDefaults: () => skeletonVariantDefaults,
|
|
626
714
|
sliderBaseClasses: () => sliderBaseClasses,
|
|
627
715
|
sliderDisabledClasses: () => sliderDisabledClasses,
|
|
716
|
+
sliderGetKeyboardValue: () => sliderGetKeyboardValue,
|
|
717
|
+
sliderGetPercentage: () => sliderGetPercentage,
|
|
718
|
+
sliderGetValueFromPosition: () => sliderGetValueFromPosition,
|
|
719
|
+
sliderNormalizeValue: () => sliderNormalizeValue,
|
|
628
720
|
sliderRangeClasses: () => sliderRangeClasses,
|
|
629
721
|
sliderSizeClasses: () => sliderSizeClasses,
|
|
630
722
|
sliderThumbClasses: () => sliderThumbClasses,
|
|
631
723
|
sliderTooltipClasses: () => sliderTooltipClasses,
|
|
632
724
|
sliderTrackClasses: () => sliderTrackClasses,
|
|
725
|
+
sortAscIcon16PathD: () => sortAscIcon16PathD,
|
|
726
|
+
sortBothIcon16PathD: () => sortBothIcon16PathD,
|
|
633
727
|
sortData: () => sortData,
|
|
728
|
+
sortDescIcon16PathD: () => sortDescIcon16PathD,
|
|
729
|
+
stackSeriesData: () => stackSeriesData,
|
|
634
730
|
statusErrorIconPath: () => statusErrorIconPath,
|
|
635
731
|
statusIconPaths: () => statusIconPaths,
|
|
636
732
|
statusInfoIconPath: () => statusInfoIconPath,
|
|
@@ -657,6 +753,7 @@ __export(index_exports, {
|
|
|
657
753
|
tabAddButtonClasses: () => tabAddButtonClasses,
|
|
658
754
|
tabCloseButtonClasses: () => tabCloseButtonClasses,
|
|
659
755
|
tabContentBaseClasses: () => tabContentBaseClasses,
|
|
756
|
+
tabFocusClasses: () => tabFocusClasses,
|
|
660
757
|
tabItemBaseClasses: () => tabItemBaseClasses,
|
|
661
758
|
tabItemCardActiveClasses: () => tabItemCardActiveClasses,
|
|
662
759
|
tabItemCardClasses: () => tabItemCardClasses,
|
|
@@ -780,6 +877,345 @@ function isBrowser() {
|
|
|
780
877
|
return typeof window !== "undefined" && typeof document !== "undefined";
|
|
781
878
|
}
|
|
782
879
|
|
|
880
|
+
// src/utils/style-values.ts
|
|
881
|
+
var isRecord2 = (val) => typeof val === "object" && val !== null;
|
|
882
|
+
var isStyleObject = (val) => {
|
|
883
|
+
if (!isRecord2(val)) return false;
|
|
884
|
+
for (const key of Object.keys(val)) {
|
|
885
|
+
const v = val[key];
|
|
886
|
+
if (v === void 0) continue;
|
|
887
|
+
if (typeof v !== "string" && typeof v !== "number") return false;
|
|
888
|
+
}
|
|
889
|
+
return true;
|
|
890
|
+
};
|
|
891
|
+
function coerceStyleValue(input) {
|
|
892
|
+
if (!input) return void 0;
|
|
893
|
+
if (typeof input === "string") return input;
|
|
894
|
+
if (Array.isArray(input)) {
|
|
895
|
+
const parts = [];
|
|
896
|
+
for (const item of input) {
|
|
897
|
+
const coerced = coerceStyleValue(item);
|
|
898
|
+
if (!coerced) continue;
|
|
899
|
+
if (Array.isArray(coerced)) {
|
|
900
|
+
parts.push(...coerced);
|
|
901
|
+
} else {
|
|
902
|
+
parts.push(coerced);
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
if (parts.length === 0) return void 0;
|
|
906
|
+
return parts;
|
|
907
|
+
}
|
|
908
|
+
if (isStyleObject(input)) return input;
|
|
909
|
+
return void 0;
|
|
910
|
+
}
|
|
911
|
+
function mergeStyleValues(...inputs) {
|
|
912
|
+
const parts = [];
|
|
913
|
+
for (const input of inputs) {
|
|
914
|
+
const coerced = coerceStyleValue(input);
|
|
915
|
+
if (!coerced) continue;
|
|
916
|
+
if (Array.isArray(coerced)) {
|
|
917
|
+
parts.push(...coerced);
|
|
918
|
+
} else {
|
|
919
|
+
parts.push(coerced);
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
if (parts.length === 0) return void 0;
|
|
923
|
+
if (parts.length === 1) return parts[0];
|
|
924
|
+
return parts;
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
// src/utils/copy-text.ts
|
|
928
|
+
var copyTextToClipboard = async (text) => {
|
|
929
|
+
if (typeof text !== "string") return false;
|
|
930
|
+
if (typeof navigator !== "undefined" && navigator.clipboard?.writeText) {
|
|
931
|
+
try {
|
|
932
|
+
await navigator.clipboard.writeText(text);
|
|
933
|
+
return true;
|
|
934
|
+
} catch {
|
|
935
|
+
}
|
|
936
|
+
}
|
|
937
|
+
if (typeof document === "undefined") return false;
|
|
938
|
+
try {
|
|
939
|
+
const textarea = document.createElement("textarea");
|
|
940
|
+
textarea.value = text;
|
|
941
|
+
textarea.setAttribute("readonly", "");
|
|
942
|
+
textarea.style.position = "fixed";
|
|
943
|
+
textarea.style.left = "-9999px";
|
|
944
|
+
textarea.style.top = "0";
|
|
945
|
+
document.body.appendChild(textarea);
|
|
946
|
+
textarea.select();
|
|
947
|
+
textarea.setSelectionRange(0, textarea.value.length);
|
|
948
|
+
const ok = document.execCommand("copy");
|
|
949
|
+
document.body.removeChild(textarea);
|
|
950
|
+
return ok;
|
|
951
|
+
} catch {
|
|
952
|
+
return false;
|
|
953
|
+
}
|
|
954
|
+
};
|
|
955
|
+
|
|
956
|
+
// src/utils/animation.ts
|
|
957
|
+
var ANIMATION_DURATION_MS = 300;
|
|
958
|
+
var ANIMATION_DURATION_FAST_MS = 150;
|
|
959
|
+
var ANIMATION_DURATION_SLOW_MS = 500;
|
|
960
|
+
var DURATION_CLASS = "duration-300";
|
|
961
|
+
var DURATION_FAST_CLASS = "duration-150";
|
|
962
|
+
var DURATION_SLOW_CLASS = "duration-500";
|
|
963
|
+
var EASING_DEFAULT = "ease-in-out";
|
|
964
|
+
var EASING_ENTER = "ease-out";
|
|
965
|
+
var EASING_LEAVE = "ease-in";
|
|
966
|
+
var TRANSITION_BASE = `transition-all ${DURATION_CLASS} ${EASING_DEFAULT}`;
|
|
967
|
+
var TRANSITION_OPACITY = `transition-opacity ${DURATION_CLASS} ${EASING_DEFAULT}`;
|
|
968
|
+
var TRANSITION_TRANSFORM = `transition-transform ${DURATION_CLASS} ${EASING_DEFAULT}`;
|
|
969
|
+
var SHAKE_ANIMATION_CSS = `
|
|
970
|
+
@keyframes tiger-shake {
|
|
971
|
+
0%, 100% { transform: translateX(0); }
|
|
972
|
+
20% { transform: translateX(-4px); }
|
|
973
|
+
40% { transform: translateX(4px); }
|
|
974
|
+
60% { transform: translateX(-2px); }
|
|
975
|
+
80% { transform: translateX(2px); }
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
.tiger-animate-shake {
|
|
979
|
+
animation: tiger-shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
|
|
980
|
+
}
|
|
981
|
+
`;
|
|
982
|
+
var isStyleInjected = false;
|
|
983
|
+
function injectShakeStyle() {
|
|
984
|
+
if (typeof document === "undefined" || isStyleInjected) return;
|
|
985
|
+
const styleId = "tiger-ui-animation-styles";
|
|
986
|
+
if (document.getElementById(styleId)) {
|
|
987
|
+
isStyleInjected = true;
|
|
988
|
+
return;
|
|
989
|
+
}
|
|
990
|
+
const style = document.createElement("style");
|
|
991
|
+
style.id = styleId;
|
|
992
|
+
style.textContent = SHAKE_ANIMATION_CSS;
|
|
993
|
+
document.head.appendChild(style);
|
|
994
|
+
isStyleInjected = true;
|
|
995
|
+
}
|
|
996
|
+
var SHAKE_CLASS = "tiger-animate-shake";
|
|
997
|
+
function getPathLength(pathElement) {
|
|
998
|
+
return pathElement.getTotalLength();
|
|
999
|
+
}
|
|
1000
|
+
function getPathDrawStyles(length, progress) {
|
|
1001
|
+
return {
|
|
1002
|
+
strokeDasharray: `${length}`,
|
|
1003
|
+
strokeDashoffset: `${length * (1 - progress)}`
|
|
1004
|
+
};
|
|
1005
|
+
}
|
|
1006
|
+
var SVG_PATH_ANIMATION_CSS = `
|
|
1007
|
+
@keyframes tiger-path-draw {
|
|
1008
|
+
from {
|
|
1009
|
+
stroke-dashoffset: var(--tiger-path-length);
|
|
1010
|
+
}
|
|
1011
|
+
to {
|
|
1012
|
+
stroke-dashoffset: 0;
|
|
1013
|
+
}
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
.tiger-animate-path-draw {
|
|
1017
|
+
animation: tiger-path-draw var(--tiger-path-duration, 1s) ease-out forwards;
|
|
1018
|
+
stroke-dasharray: var(--tiger-path-length);
|
|
1019
|
+
stroke-dashoffset: var(--tiger-path-length);
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1022
|
+
@keyframes tiger-fade-in {
|
|
1023
|
+
from { opacity: 0; }
|
|
1024
|
+
to { opacity: 1; }
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1027
|
+
.tiger-animate-fade-in {
|
|
1028
|
+
animation: tiger-fade-in var(--tiger-fade-duration, 0.5s) ease-out forwards;
|
|
1029
|
+
}
|
|
1030
|
+
|
|
1031
|
+
@keyframes tiger-scale-in {
|
|
1032
|
+
from { transform: scale(0); opacity: 0; }
|
|
1033
|
+
to { transform: scale(1); opacity: 1; }
|
|
1034
|
+
}
|
|
1035
|
+
|
|
1036
|
+
.tiger-animate-scale-in {
|
|
1037
|
+
animation: tiger-scale-in var(--tiger-scale-duration, 0.3s) ease-out forwards;
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
@keyframes tiger-bar-grow {
|
|
1041
|
+
from { transform: scaleY(0); }
|
|
1042
|
+
to { transform: scaleY(1); }
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
.tiger-animate-bar-grow {
|
|
1046
|
+
transform-origin: bottom;
|
|
1047
|
+
animation: tiger-bar-grow var(--tiger-bar-duration, 0.5s) ease-out forwards;
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
@keyframes tiger-pie-draw {
|
|
1051
|
+
from {
|
|
1052
|
+
stroke-dashoffset: var(--tiger-circumference);
|
|
1053
|
+
}
|
|
1054
|
+
to {
|
|
1055
|
+
stroke-dashoffset: var(--tiger-target-offset);
|
|
1056
|
+
}
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
.tiger-animate-pie-draw {
|
|
1060
|
+
animation: tiger-pie-draw var(--tiger-pie-duration, 0.8s) ease-out forwards;
|
|
1061
|
+
}
|
|
1062
|
+
`;
|
|
1063
|
+
var isSvgStyleInjected = false;
|
|
1064
|
+
function injectSvgAnimationStyles() {
|
|
1065
|
+
if (typeof document === "undefined" || isSvgStyleInjected) return;
|
|
1066
|
+
const styleId = "tiger-ui-svg-animation-styles";
|
|
1067
|
+
if (document.getElementById(styleId)) {
|
|
1068
|
+
isSvgStyleInjected = true;
|
|
1069
|
+
return;
|
|
1070
|
+
}
|
|
1071
|
+
const style = document.createElement("style");
|
|
1072
|
+
style.id = styleId;
|
|
1073
|
+
style.textContent = SVG_PATH_ANIMATION_CSS;
|
|
1074
|
+
document.head.appendChild(style);
|
|
1075
|
+
isSvgStyleInjected = true;
|
|
1076
|
+
}
|
|
1077
|
+
var SVG_ANIMATION_CLASSES = {
|
|
1078
|
+
pathDraw: "tiger-animate-path-draw",
|
|
1079
|
+
fadeIn: "tiger-animate-fade-in",
|
|
1080
|
+
scaleIn: "tiger-animate-scale-in",
|
|
1081
|
+
barGrow: "tiger-animate-bar-grow",
|
|
1082
|
+
pieDraw: "tiger-animate-pie-draw"
|
|
1083
|
+
};
|
|
1084
|
+
var SVG_ANIMATION_VARS = {
|
|
1085
|
+
pathLength: "--tiger-path-length",
|
|
1086
|
+
pathDuration: "--tiger-path-duration",
|
|
1087
|
+
fadeDuration: "--tiger-fade-duration",
|
|
1088
|
+
scaleDuration: "--tiger-scale-duration",
|
|
1089
|
+
barDuration: "--tiger-bar-duration",
|
|
1090
|
+
pieDuration: "--tiger-pie-duration",
|
|
1091
|
+
circumference: "--tiger-circumference",
|
|
1092
|
+
targetOffset: "--tiger-target-offset"
|
|
1093
|
+
};
|
|
1094
|
+
function getPathDrawAnimationStyle(pathLength, durationMs = 1e3) {
|
|
1095
|
+
return {
|
|
1096
|
+
[SVG_ANIMATION_VARS.pathLength]: `${pathLength}`,
|
|
1097
|
+
[SVG_ANIMATION_VARS.pathDuration]: `${durationMs}ms`
|
|
1098
|
+
};
|
|
1099
|
+
}
|
|
1100
|
+
function getBarGrowAnimationStyle(index, durationMs = 500, staggerMs = 50) {
|
|
1101
|
+
return {
|
|
1102
|
+
[SVG_ANIMATION_VARS.barDuration]: `${durationMs}ms`,
|
|
1103
|
+
animationDelay: `${index * staggerMs}ms`
|
|
1104
|
+
};
|
|
1105
|
+
}
|
|
1106
|
+
function getPieDrawAnimationStyle(circumference, targetOffset, durationMs = 800) {
|
|
1107
|
+
return {
|
|
1108
|
+
[SVG_ANIMATION_VARS.circumference]: `${circumference}`,
|
|
1109
|
+
[SVG_ANIMATION_VARS.targetOffset]: `${targetOffset}`,
|
|
1110
|
+
[SVG_ANIMATION_VARS.pieDuration]: `${durationMs}ms`
|
|
1111
|
+
};
|
|
1112
|
+
}
|
|
1113
|
+
|
|
1114
|
+
// src/utils/helpers/slider-utils.ts
|
|
1115
|
+
function sliderNormalizeValue(value, min, max, step = 1) {
|
|
1116
|
+
const clamped = Math.min(Math.max(value, min), max);
|
|
1117
|
+
const stepped = Math.round((clamped - min) / step) * step + min;
|
|
1118
|
+
return Math.min(stepped, max);
|
|
1119
|
+
}
|
|
1120
|
+
function sliderGetPercentage(value, min, max) {
|
|
1121
|
+
if (max === min) return 0;
|
|
1122
|
+
return (value - min) / (max - min) * 100;
|
|
1123
|
+
}
|
|
1124
|
+
function sliderGetValueFromPosition(position, trackWidth, min, max, step = 1) {
|
|
1125
|
+
if (trackWidth === 0) return min;
|
|
1126
|
+
const ratio = position / trackWidth;
|
|
1127
|
+
const rawValue = ratio * (max - min) + min;
|
|
1128
|
+
return sliderNormalizeValue(rawValue, min, max, step);
|
|
1129
|
+
}
|
|
1130
|
+
function sliderGetKeyboardValue(key, currentValue, min, max, step = 1, largeStep) {
|
|
1131
|
+
const bigStep = largeStep ?? step * 10;
|
|
1132
|
+
switch (key) {
|
|
1133
|
+
case "ArrowRight":
|
|
1134
|
+
case "ArrowUp":
|
|
1135
|
+
return sliderNormalizeValue(currentValue + step, min, max, step);
|
|
1136
|
+
case "ArrowLeft":
|
|
1137
|
+
case "ArrowDown":
|
|
1138
|
+
return sliderNormalizeValue(currentValue - step, min, max, step);
|
|
1139
|
+
case "PageUp":
|
|
1140
|
+
return sliderNormalizeValue(currentValue + bigStep, min, max, step);
|
|
1141
|
+
case "PageDown":
|
|
1142
|
+
return sliderNormalizeValue(currentValue - bigStep, min, max, step);
|
|
1143
|
+
case "Home":
|
|
1144
|
+
return min;
|
|
1145
|
+
case "End":
|
|
1146
|
+
return max;
|
|
1147
|
+
default:
|
|
1148
|
+
return null;
|
|
1149
|
+
}
|
|
1150
|
+
}
|
|
1151
|
+
|
|
1152
|
+
// src/utils/common-icons.ts
|
|
1153
|
+
var closeIconViewBox = "0 0 24 24";
|
|
1154
|
+
var closeIconPathD = "M6 18L18 6M6 6l12 12";
|
|
1155
|
+
var closeIconPathStrokeLinecap = "round";
|
|
1156
|
+
var closeIconPathStrokeLinejoin = "round";
|
|
1157
|
+
var closeIconPathStrokeWidth = 2;
|
|
1158
|
+
var icon24ViewBox = "0 0 24 24";
|
|
1159
|
+
var icon24PathStrokeLinecap = "round";
|
|
1160
|
+
var icon24PathStrokeLinejoin = "round";
|
|
1161
|
+
var icon24StrokeWidth = 2;
|
|
1162
|
+
var icon20ViewBox = "0 0 20 20";
|
|
1163
|
+
var closeSolidIcon20PathD = "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z";
|
|
1164
|
+
var calendarSolidIcon20PathD = "M6 2a1 1 0 00-1 1v1H4a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V6a2 2 0 00-2-2h-1V3a1 1 0 10-2 0v1H7V3a1 1 0 00-1-1zm0 5a1 1 0 000 2h8a1 1 0 100-2H6z";
|
|
1165
|
+
var clockSolidIcon20PathD = "M10 18a8 8 0 100-16 8 8 0 000 16zm1-12a1 1 0 10-2 0v4a1 1 0 00.293.707l2.828 2.829a1 1 0 101.415-1.415L11 9.586V6z";
|
|
1166
|
+
var chevronLeftSolidIcon20PathD = "M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z";
|
|
1167
|
+
var chevronRightSolidIcon20PathD = "M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z";
|
|
1168
|
+
var chevronDownSolidIcon20PathD = "M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z";
|
|
1169
|
+
var checkSolidIcon20PathD = "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z";
|
|
1170
|
+
var successCircleSolidIcon20PathD = "M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z";
|
|
1171
|
+
var errorCircleSolidIcon20PathD = "M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z";
|
|
1172
|
+
var statusSuccessIconPath = "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z";
|
|
1173
|
+
var statusWarningIconPath = "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z";
|
|
1174
|
+
var statusErrorIconPath = "M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z";
|
|
1175
|
+
var statusInfoIconPath = "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z";
|
|
1176
|
+
var statusIconPaths = {
|
|
1177
|
+
success: statusSuccessIconPath,
|
|
1178
|
+
warning: statusWarningIconPath,
|
|
1179
|
+
error: statusErrorIconPath,
|
|
1180
|
+
info: statusInfoIconPath
|
|
1181
|
+
};
|
|
1182
|
+
var icon16ViewBox = "0 0 16 16";
|
|
1183
|
+
var sortAscIcon16PathD = "M8 3l4 4H4l4-4z";
|
|
1184
|
+
var sortDescIcon16PathD = "M8 13l-4-4h8l-4 4z";
|
|
1185
|
+
var sortBothIcon16PathD = "M8 3l4 4H4l4-4zM8 13l-4-4h8l-4 4z";
|
|
1186
|
+
var lockClosedIcon24PathD = "M17 8h-1V6a4 4 0 10-8 0v2H7a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2V10a2 2 0 00-2-2zm-7-2a2 2 0 114 0v2h-4V6z";
|
|
1187
|
+
var lockOpenIcon24PathD = "M17 8h-1V6a4 4 0 00-7.75-1.41 1 1 0 101.9.62A2 2 0 0114 6v2H7a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2V10a2 2 0 00-2-2zm0 12H7V10h10v10z";
|
|
1188
|
+
var CalendarIconPath = calendarSolidIcon20PathD;
|
|
1189
|
+
var CloseIconPath = closeSolidIcon20PathD;
|
|
1190
|
+
var ChevronLeftIconPath = chevronLeftSolidIcon20PathD;
|
|
1191
|
+
var ChevronRightIconPath = chevronRightSolidIcon20PathD;
|
|
1192
|
+
var ClockIconPath = clockSolidIcon20PathD;
|
|
1193
|
+
var TimePickerCloseIconPath = closeSolidIcon20PathD;
|
|
1194
|
+
|
|
1195
|
+
// src/utils/svg-attrs.ts
|
|
1196
|
+
var SVG_DEFAULT_XMLNS = "http://www.w3.org/2000/svg";
|
|
1197
|
+
var SVG_DEFAULT_VIEWBOX_24 = "0 0 24 24";
|
|
1198
|
+
var SVG_DEFAULT_VIEWBOX_20 = "0 0 20 20";
|
|
1199
|
+
var SVG_DEFAULT_FILL = "none";
|
|
1200
|
+
var SVG_DEFAULT_STROKE = "currentColor";
|
|
1201
|
+
function getSvgDefaultAttrs(size = 24) {
|
|
1202
|
+
return {
|
|
1203
|
+
xmlns: SVG_DEFAULT_XMLNS,
|
|
1204
|
+
viewBox: size === 20 ? SVG_DEFAULT_VIEWBOX_20 : SVG_DEFAULT_VIEWBOX_24,
|
|
1205
|
+
fill: SVG_DEFAULT_FILL
|
|
1206
|
+
};
|
|
1207
|
+
}
|
|
1208
|
+
function normalizeSvgAttrs(svgAttrs) {
|
|
1209
|
+
if ("className" in svgAttrs && !("class" in svgAttrs)) {
|
|
1210
|
+
const { className, ...rest } = svgAttrs;
|
|
1211
|
+
return {
|
|
1212
|
+
...rest,
|
|
1213
|
+
class: className
|
|
1214
|
+
};
|
|
1215
|
+
}
|
|
1216
|
+
return svgAttrs;
|
|
1217
|
+
}
|
|
1218
|
+
|
|
783
1219
|
// src/utils/a11y-utils.ts
|
|
784
1220
|
function isEnterKey(event) {
|
|
785
1221
|
if (event.key === "Enter" || event.code === "Enter") return true;
|
|
@@ -812,6 +1248,42 @@ function createAriaId(options = {}) {
|
|
|
812
1248
|
return `${prefix}${separator}${ariaIdCounter}`;
|
|
813
1249
|
}
|
|
814
1250
|
|
|
1251
|
+
// src/utils/focus-utils.ts
|
|
1252
|
+
function isHTMLElement(value) {
|
|
1253
|
+
if (typeof HTMLElement === "undefined") return false;
|
|
1254
|
+
return value instanceof HTMLElement;
|
|
1255
|
+
}
|
|
1256
|
+
function getActiveElement(doc) {
|
|
1257
|
+
const active = doc?.activeElement;
|
|
1258
|
+
return isHTMLElement(active) ? active : null;
|
|
1259
|
+
}
|
|
1260
|
+
function captureActiveElement(doc = document) {
|
|
1261
|
+
return getActiveElement(doc);
|
|
1262
|
+
}
|
|
1263
|
+
function focusElement(element, options) {
|
|
1264
|
+
if (!element) return false;
|
|
1265
|
+
if (typeof element.focus !== "function") return false;
|
|
1266
|
+
try {
|
|
1267
|
+
if (options) {
|
|
1268
|
+
element.focus(options);
|
|
1269
|
+
} else {
|
|
1270
|
+
element.focus();
|
|
1271
|
+
}
|
|
1272
|
+
return true;
|
|
1273
|
+
} catch {
|
|
1274
|
+
return false;
|
|
1275
|
+
}
|
|
1276
|
+
}
|
|
1277
|
+
function focusFirst(candidates, options) {
|
|
1278
|
+
for (const el of candidates) {
|
|
1279
|
+
if (focusElement(el, options)) return el ?? null;
|
|
1280
|
+
}
|
|
1281
|
+
return null;
|
|
1282
|
+
}
|
|
1283
|
+
function restoreFocus(previous, options) {
|
|
1284
|
+
return focusElement(previous, options);
|
|
1285
|
+
}
|
|
1286
|
+
|
|
815
1287
|
// src/utils/overlay-utils.ts
|
|
816
1288
|
function getComposedPath(event) {
|
|
817
1289
|
const eventWithPath = event;
|
|
@@ -880,110 +1352,347 @@ function getFocusTrapNavigation(event, focusables, activeElement) {
|
|
|
880
1352
|
return { shouldHandle: false };
|
|
881
1353
|
}
|
|
882
1354
|
|
|
883
|
-
// src/utils/
|
|
884
|
-
function
|
|
885
|
-
|
|
886
|
-
|
|
1355
|
+
// src/utils/locale-utils.ts
|
|
1356
|
+
function resolveLocaleText(fallback, ...candidates) {
|
|
1357
|
+
for (const candidate of candidates) {
|
|
1358
|
+
if (typeof candidate === "string" && candidate.trim().length > 0) {
|
|
1359
|
+
return candidate;
|
|
1360
|
+
}
|
|
1361
|
+
}
|
|
1362
|
+
return fallback;
|
|
887
1363
|
}
|
|
888
|
-
function
|
|
889
|
-
|
|
890
|
-
return
|
|
1364
|
+
function mergeTigerLocale(base, override) {
|
|
1365
|
+
if (!base && !override) return void 0;
|
|
1366
|
+
return {
|
|
1367
|
+
common: { ...base?.common, ...override?.common },
|
|
1368
|
+
modal: { ...base?.modal, ...override?.modal },
|
|
1369
|
+
drawer: { ...base?.drawer, ...override?.drawer },
|
|
1370
|
+
upload: { ...base?.upload, ...override?.upload },
|
|
1371
|
+
pagination: { ...base?.pagination, ...override?.pagination }
|
|
1372
|
+
};
|
|
891
1373
|
}
|
|
892
|
-
|
|
893
|
-
|
|
1374
|
+
var DEFAULT_PAGINATION_LABELS = {
|
|
1375
|
+
totalText: "Total {total} items",
|
|
1376
|
+
itemsPerPageText: "/ page",
|
|
1377
|
+
jumpToText: "Go to",
|
|
1378
|
+
pageText: "page",
|
|
1379
|
+
prevPageAriaLabel: "Previous page",
|
|
1380
|
+
nextPageAriaLabel: "Next page",
|
|
1381
|
+
pageAriaLabel: "Page {page}"
|
|
1382
|
+
};
|
|
1383
|
+
var ZH_CN_PAGINATION_LABELS = {
|
|
1384
|
+
totalText: "\u5171 {total} \u6761",
|
|
1385
|
+
itemsPerPageText: "\u6761/\u9875",
|
|
1386
|
+
jumpToText: "\u8DF3\u81F3",
|
|
1387
|
+
pageText: "\u9875",
|
|
1388
|
+
prevPageAriaLabel: "\u4E0A\u4E00\u9875",
|
|
1389
|
+
nextPageAriaLabel: "\u4E0B\u4E00\u9875",
|
|
1390
|
+
pageAriaLabel: "\u7B2C {page} \u9875"
|
|
1391
|
+
};
|
|
1392
|
+
function getPaginationLabels(locale) {
|
|
1393
|
+
return {
|
|
1394
|
+
totalText: locale?.pagination?.totalText ?? DEFAULT_PAGINATION_LABELS.totalText,
|
|
1395
|
+
itemsPerPageText: locale?.pagination?.itemsPerPageText ?? DEFAULT_PAGINATION_LABELS.itemsPerPageText,
|
|
1396
|
+
jumpToText: locale?.pagination?.jumpToText ?? DEFAULT_PAGINATION_LABELS.jumpToText,
|
|
1397
|
+
pageText: locale?.pagination?.pageText ?? DEFAULT_PAGINATION_LABELS.pageText,
|
|
1398
|
+
prevPageAriaLabel: locale?.pagination?.prevPageAriaLabel ?? DEFAULT_PAGINATION_LABELS.prevPageAriaLabel,
|
|
1399
|
+
nextPageAriaLabel: locale?.pagination?.nextPageAriaLabel ?? DEFAULT_PAGINATION_LABELS.nextPageAriaLabel,
|
|
1400
|
+
pageAriaLabel: locale?.pagination?.pageAriaLabel ?? DEFAULT_PAGINATION_LABELS.pageAriaLabel
|
|
1401
|
+
};
|
|
894
1402
|
}
|
|
895
|
-
function
|
|
896
|
-
|
|
897
|
-
if (typeof element.focus !== "function") return false;
|
|
898
|
-
try {
|
|
899
|
-
if (options) {
|
|
900
|
-
element.focus(options);
|
|
901
|
-
} else {
|
|
902
|
-
element.focus();
|
|
903
|
-
}
|
|
904
|
-
return true;
|
|
905
|
-
} catch {
|
|
906
|
-
return false;
|
|
907
|
-
}
|
|
1403
|
+
function formatPaginationTotal(template, total, range) {
|
|
1404
|
+
return template.replace("{total}", String(total)).replace("{start}", String(range[0])).replace("{end}", String(range[1]));
|
|
908
1405
|
}
|
|
909
|
-
function
|
|
910
|
-
|
|
911
|
-
if (focusElement(el, options)) return el ?? null;
|
|
912
|
-
}
|
|
913
|
-
return null;
|
|
1406
|
+
function formatPageAriaLabel(template, page) {
|
|
1407
|
+
return template.replace("{page}", String(page));
|
|
914
1408
|
}
|
|
915
|
-
|
|
916
|
-
|
|
1409
|
+
|
|
1410
|
+
// src/utils/datepicker-i18n.ts
|
|
1411
|
+
function getDatePickerLabels(locale, overrides) {
|
|
1412
|
+
const lc = (locale ?? "").toLowerCase();
|
|
1413
|
+
const base = lc.startsWith("zh") ? {
|
|
1414
|
+
today: "\u4ECA\u5929",
|
|
1415
|
+
ok: "\u786E\u5B9A",
|
|
1416
|
+
calendar: "\u65E5\u5386",
|
|
1417
|
+
toggleCalendar: "\u6253\u5F00\u65E5\u5386",
|
|
1418
|
+
clearDate: "\u6E05\u9664\u65E5\u671F",
|
|
1419
|
+
previousMonth: "\u4E0A\u4E2A\u6708",
|
|
1420
|
+
nextMonth: "\u4E0B\u4E2A\u6708"
|
|
1421
|
+
} : {
|
|
1422
|
+
today: "Today",
|
|
1423
|
+
ok: "OK",
|
|
1424
|
+
calendar: "Calendar",
|
|
1425
|
+
toggleCalendar: "Toggle calendar",
|
|
1426
|
+
clearDate: "Clear date",
|
|
1427
|
+
previousMonth: "Previous month",
|
|
1428
|
+
nextMonth: "Next month"
|
|
1429
|
+
};
|
|
1430
|
+
return { ...base, ...overrides ?? {} };
|
|
917
1431
|
}
|
|
918
1432
|
|
|
919
|
-
// src/utils/
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
1433
|
+
// src/utils/timepicker-utils.ts
|
|
1434
|
+
var ZH_LABELS = {
|
|
1435
|
+
hour: "\u65F6",
|
|
1436
|
+
minute: "\u5206",
|
|
1437
|
+
second: "\u79D2",
|
|
1438
|
+
now: "\u73B0\u5728",
|
|
1439
|
+
ok: "\u786E\u5B9A",
|
|
1440
|
+
start: "\u5F00\u59CB",
|
|
1441
|
+
end: "\u7ED3\u675F",
|
|
1442
|
+
clear: "\u6E05\u9664\u65F6\u95F4",
|
|
1443
|
+
toggle: "\u6253\u5F00\u65F6\u95F4\u9009\u62E9\u5668",
|
|
1444
|
+
dialog: "\u65F6\u95F4\u9009\u62E9\u5668",
|
|
1445
|
+
selectTime: "\u8BF7\u9009\u62E9\u65F6\u95F4",
|
|
1446
|
+
selectTimeRange: "\u8BF7\u9009\u62E9\u65F6\u95F4\u8303\u56F4"
|
|
1447
|
+
};
|
|
1448
|
+
var EN_LABELS = {
|
|
1449
|
+
hour: "Hour",
|
|
1450
|
+
minute: "Min",
|
|
1451
|
+
second: "Sec",
|
|
1452
|
+
now: "Now",
|
|
1453
|
+
ok: "OK",
|
|
1454
|
+
start: "Start",
|
|
1455
|
+
end: "End",
|
|
1456
|
+
clear: "Clear time",
|
|
1457
|
+
toggle: "Toggle time picker",
|
|
1458
|
+
dialog: "Time picker",
|
|
1459
|
+
selectTime: "Select time",
|
|
1460
|
+
selectTimeRange: "Select time range"
|
|
1461
|
+
};
|
|
1462
|
+
function isZhLocale(locale) {
|
|
1463
|
+
return (locale ?? "").toLowerCase().startsWith("zh");
|
|
1464
|
+
}
|
|
1465
|
+
function getTimePickerLabels(locale, overrides) {
|
|
1466
|
+
const base = isZhLocale(locale) ? ZH_LABELS : EN_LABELS;
|
|
1467
|
+
return { ...base, ...overrides ?? {} };
|
|
1468
|
+
}
|
|
1469
|
+
function pluralizeEn(value, singular) {
|
|
1470
|
+
return value === 1 ? singular : `${singular}s`;
|
|
1471
|
+
}
|
|
1472
|
+
function getTimePickerOptionAriaLabel(value, unit, locale, labelOverrides) {
|
|
1473
|
+
const labels = getTimePickerLabels(locale, labelOverrides);
|
|
1474
|
+
if (isZhLocale(locale)) {
|
|
1475
|
+
const suffix = unit === "hour" ? labels.hour : unit === "minute" ? labels.minute : labels.second;
|
|
1476
|
+
return `${value}${suffix}`;
|
|
925
1477
|
}
|
|
926
|
-
|
|
1478
|
+
const lc = (locale ?? "").toLowerCase();
|
|
1479
|
+
const useEnglishPlural = lc.length === 0 ? labelOverrides == null : lc.startsWith("en");
|
|
1480
|
+
if (useEnglishPlural) {
|
|
1481
|
+
if (unit === "hour") return `${value} ${pluralizeEn(value, "hour")}`;
|
|
1482
|
+
if (unit === "minute") return `${value} ${pluralizeEn(value, "minute")}`;
|
|
1483
|
+
return `${value} ${pluralizeEn(value, "second")}`;
|
|
1484
|
+
}
|
|
1485
|
+
const unitLabel = unit === "hour" ? labels.hour : unit === "minute" ? labels.minute : labels.second;
|
|
1486
|
+
return `${value} ${unitLabel}`;
|
|
927
1487
|
}
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
1488
|
+
var timePickerBaseClasses = "relative inline-block w-full max-w-xs";
|
|
1489
|
+
var timePickerInputWrapperClasses = "relative flex items-center";
|
|
1490
|
+
function getTimePickerInputClasses(size, disabled) {
|
|
1491
|
+
const baseClasses = [
|
|
1492
|
+
"w-full rounded-md border border-gray-300",
|
|
1493
|
+
"focus:outline-none focus:ring-2 focus:ring-[var(--tiger-primary,#2563eb)] focus:border-transparent",
|
|
1494
|
+
"transition-colors duration-200",
|
|
1495
|
+
"pr-16"
|
|
1496
|
+
// Space for clear + clock buttons
|
|
1497
|
+
];
|
|
1498
|
+
const sizeClasses = {
|
|
1499
|
+
sm: "px-2 py-1 text-sm",
|
|
1500
|
+
md: "px-3 py-2 text-base",
|
|
1501
|
+
lg: "px-4 py-3 text-lg"
|
|
935
1502
|
};
|
|
1503
|
+
const stateClasses = disabled ? "bg-gray-100 text-gray-400 cursor-not-allowed" : "bg-white text-gray-900 cursor-pointer hover:border-gray-400";
|
|
1504
|
+
return [...baseClasses, sizeClasses[size], stateClasses].join(" ");
|
|
936
1505
|
}
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
1506
|
+
function getTimePickerIconButtonClasses(size) {
|
|
1507
|
+
const baseClasses = [
|
|
1508
|
+
"absolute right-1 flex items-center justify-center",
|
|
1509
|
+
"text-gray-400 hover:text-gray-600",
|
|
1510
|
+
"focus:outline-none focus:ring-2 focus:ring-[var(--tiger-primary,#2563eb)] focus:ring-offset-1",
|
|
1511
|
+
"rounded transition-colors duration-200",
|
|
1512
|
+
"disabled:cursor-not-allowed disabled:opacity-50"
|
|
1513
|
+
];
|
|
1514
|
+
const sizeClasses = {
|
|
1515
|
+
sm: "w-6 h-6",
|
|
1516
|
+
md: "w-8 h-8",
|
|
1517
|
+
lg: "w-10 h-10"
|
|
1518
|
+
};
|
|
1519
|
+
return [...baseClasses, sizeClasses[size]].join(" ");
|
|
1520
|
+
}
|
|
1521
|
+
var timePickerClearButtonClasses = [
|
|
1522
|
+
"absolute right-10 flex items-center justify-center",
|
|
1523
|
+
"w-6 h-6 text-gray-400 hover:text-gray-600",
|
|
1524
|
+
"focus:outline-none focus:ring-2 focus:ring-[var(--tiger-primary,#2563eb)] focus:ring-offset-1",
|
|
1525
|
+
"rounded transition-colors duration-200"
|
|
1526
|
+
].join(" ");
|
|
1527
|
+
var timePickerPanelClasses = [
|
|
1528
|
+
"absolute z-10 mt-1 bg-white border border-gray-200 rounded-lg shadow-lg",
|
|
1529
|
+
"w-max"
|
|
1530
|
+
].join(" ");
|
|
1531
|
+
var timePickerPanelContentClasses = "flex divide-x divide-gray-200";
|
|
1532
|
+
var timePickerRangeHeaderClasses = [
|
|
1533
|
+
"px-3 py-2 border-b border-gray-200 bg-gray-50",
|
|
1534
|
+
"flex items-center gap-2"
|
|
1535
|
+
].join(" ");
|
|
1536
|
+
function getTimePickerRangeTabButtonClasses(isActive) {
|
|
1537
|
+
const baseClasses = [
|
|
1538
|
+
"px-3 py-1 text-xs font-medium rounded",
|
|
1539
|
+
"border border-gray-300",
|
|
1540
|
+
"focus:outline-none focus:ring-2 focus:ring-[var(--tiger-primary,#2563eb)] focus:ring-offset-1",
|
|
1541
|
+
"transition-colors duration-150"
|
|
1542
|
+
];
|
|
1543
|
+
if (isActive) {
|
|
1544
|
+
return [...baseClasses, "bg-[var(--tiger-primary,#2563eb)] text-white border-transparent"].join(
|
|
1545
|
+
" "
|
|
1546
|
+
);
|
|
946
1547
|
}
|
|
947
|
-
return
|
|
948
|
-
}
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
1548
|
+
return [...baseClasses, "bg-white hover:bg-gray-50 text-gray-700"].join(" ");
|
|
1549
|
+
}
|
|
1550
|
+
var timePickerColumnClasses = "flex flex-col overflow-hidden shrink-0 w-16";
|
|
1551
|
+
var timePickerColumnHeaderClasses = [
|
|
1552
|
+
"px-2 py-1 text-xs font-semibold text-gray-500 text-center",
|
|
1553
|
+
"bg-gray-50 border-b border-gray-200"
|
|
1554
|
+
].join(" ");
|
|
1555
|
+
var timePickerColumnListClasses = [
|
|
1556
|
+
"overflow-y-auto max-h-48 scrollbar-thin scrollbar-thumb-gray-300 scrollbar-track-gray-100"
|
|
1557
|
+
].join(" ");
|
|
1558
|
+
function getTimePickerItemClasses(isSelected, isDisabled) {
|
|
1559
|
+
const baseClasses = [
|
|
1560
|
+
"w-full px-3 py-1.5 text-sm text-center",
|
|
1561
|
+
"hover:bg-gray-100 focus:outline-none focus:bg-gray-100",
|
|
1562
|
+
"transition-colors duration-150",
|
|
1563
|
+
"cursor-pointer"
|
|
1564
|
+
];
|
|
1565
|
+
if (isDisabled) {
|
|
1566
|
+
return [...baseClasses, "text-gray-300 cursor-not-allowed hover:bg-transparent"].join(" ");
|
|
965
1567
|
}
|
|
966
|
-
if (
|
|
967
|
-
|
|
1568
|
+
if (isSelected) {
|
|
1569
|
+
return [
|
|
1570
|
+
...baseClasses,
|
|
1571
|
+
"bg-[var(--tiger-primary,#2563eb)] text-white",
|
|
1572
|
+
"hover:bg-[var(--tiger-primary-hover,#1d4ed8)]",
|
|
1573
|
+
"font-medium"
|
|
1574
|
+
].join(" ");
|
|
1575
|
+
}
|
|
1576
|
+
return [...baseClasses, "text-gray-700"].join(" ");
|
|
968
1577
|
}
|
|
969
|
-
function
|
|
970
|
-
const
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
1578
|
+
function getTimePickerPeriodButtonClasses(isSelected) {
|
|
1579
|
+
const baseClasses = [
|
|
1580
|
+
"w-full px-3 py-2 text-sm font-medium text-center",
|
|
1581
|
+
"hover:bg-gray-100 focus:outline-none focus:bg-gray-100",
|
|
1582
|
+
"transition-colors duration-150",
|
|
1583
|
+
"cursor-pointer"
|
|
1584
|
+
];
|
|
1585
|
+
if (isSelected) {
|
|
1586
|
+
return [
|
|
1587
|
+
...baseClasses,
|
|
1588
|
+
"bg-[var(--tiger-primary,#2563eb)] text-white",
|
|
1589
|
+
"hover:bg-[var(--tiger-primary-hover,#1d4ed8)]"
|
|
1590
|
+
].join(" ");
|
|
979
1591
|
}
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
1592
|
+
return [...baseClasses, "text-gray-700"].join(" ");
|
|
1593
|
+
}
|
|
1594
|
+
var timePickerFooterClasses = [
|
|
1595
|
+
"px-3 py-2 border-t border-gray-200",
|
|
1596
|
+
"flex items-center justify-between gap-2"
|
|
1597
|
+
].join(" ");
|
|
1598
|
+
var timePickerFooterButtonClasses = [
|
|
1599
|
+
"px-3 py-1 text-xs font-medium rounded",
|
|
1600
|
+
"border border-gray-300 hover:border-gray-400",
|
|
1601
|
+
"bg-white hover:bg-gray-50",
|
|
1602
|
+
"text-gray-700",
|
|
1603
|
+
"focus:outline-none focus:ring-2 focus:ring-[var(--tiger-primary,#2563eb)] focus:ring-offset-1",
|
|
1604
|
+
"transition-colors duration-150"
|
|
1605
|
+
].join(" ");
|
|
1606
|
+
|
|
1607
|
+
// src/utils/upload-labels.ts
|
|
1608
|
+
function interpolateUploadLabel(template, params) {
|
|
1609
|
+
return template.replace(/\{(\w+)\}/g, (_match, key) => {
|
|
1610
|
+
const value = params[key];
|
|
1611
|
+
return typeof value === "string" ? value : "";
|
|
1612
|
+
});
|
|
1613
|
+
}
|
|
1614
|
+
function getUploadLabels(locale, overrides) {
|
|
1615
|
+
return {
|
|
1616
|
+
dragAreaAriaLabel: resolveLocaleText(
|
|
1617
|
+
"Upload file by clicking or dragging",
|
|
1618
|
+
overrides?.dragAreaAriaLabel,
|
|
1619
|
+
locale?.upload?.dragAreaAriaLabel
|
|
1620
|
+
),
|
|
1621
|
+
buttonAriaLabel: resolveLocaleText(
|
|
1622
|
+
"Upload file",
|
|
1623
|
+
overrides?.buttonAriaLabel,
|
|
1624
|
+
locale?.upload?.buttonAriaLabel
|
|
1625
|
+
),
|
|
1626
|
+
clickToUploadText: resolveLocaleText(
|
|
1627
|
+
"Click to upload",
|
|
1628
|
+
overrides?.clickToUploadText,
|
|
1629
|
+
locale?.upload?.clickToUploadText
|
|
1630
|
+
),
|
|
1631
|
+
dragAndDropText: resolveLocaleText(
|
|
1632
|
+
"or drag and drop",
|
|
1633
|
+
overrides?.dragAndDropText,
|
|
1634
|
+
locale?.upload?.dragAndDropText
|
|
1635
|
+
),
|
|
1636
|
+
acceptInfoText: resolveLocaleText(
|
|
1637
|
+
"Accepted: {accept}",
|
|
1638
|
+
overrides?.acceptInfoText,
|
|
1639
|
+
locale?.upload?.acceptInfoText
|
|
1640
|
+
),
|
|
1641
|
+
maxSizeInfoText: resolveLocaleText(
|
|
1642
|
+
"Max size: {maxSize}",
|
|
1643
|
+
overrides?.maxSizeInfoText,
|
|
1644
|
+
locale?.upload?.maxSizeInfoText
|
|
1645
|
+
),
|
|
1646
|
+
selectFileText: resolveLocaleText(
|
|
1647
|
+
"Select File",
|
|
1648
|
+
overrides?.selectFileText,
|
|
1649
|
+
locale?.upload?.selectFileText
|
|
1650
|
+
),
|
|
1651
|
+
uploadedFilesAriaLabel: resolveLocaleText(
|
|
1652
|
+
"Uploaded files",
|
|
1653
|
+
overrides?.uploadedFilesAriaLabel,
|
|
1654
|
+
locale?.upload?.uploadedFilesAriaLabel
|
|
1655
|
+
),
|
|
1656
|
+
successAriaLabel: resolveLocaleText(
|
|
1657
|
+
"Success",
|
|
1658
|
+
overrides?.successAriaLabel,
|
|
1659
|
+
locale?.upload?.successAriaLabel
|
|
1660
|
+
),
|
|
1661
|
+
errorAriaLabel: resolveLocaleText(
|
|
1662
|
+
"Error",
|
|
1663
|
+
overrides?.errorAriaLabel,
|
|
1664
|
+
locale?.upload?.errorAriaLabel
|
|
1665
|
+
),
|
|
1666
|
+
uploadingAriaLabel: resolveLocaleText(
|
|
1667
|
+
"Uploading",
|
|
1668
|
+
overrides?.uploadingAriaLabel,
|
|
1669
|
+
locale?.upload?.uploadingAriaLabel
|
|
1670
|
+
),
|
|
1671
|
+
removeFileAriaLabel: resolveLocaleText(
|
|
1672
|
+
"Remove {fileName}",
|
|
1673
|
+
overrides?.removeFileAriaLabel,
|
|
1674
|
+
locale?.upload?.removeFileAriaLabel
|
|
1675
|
+
),
|
|
1676
|
+
previewFileAriaLabel: resolveLocaleText(
|
|
1677
|
+
"Preview {fileName}",
|
|
1678
|
+
overrides?.previewFileAriaLabel,
|
|
1679
|
+
locale?.upload?.previewFileAriaLabel
|
|
1680
|
+
)
|
|
1681
|
+
};
|
|
983
1682
|
}
|
|
984
1683
|
|
|
1684
|
+
// src/utils/interaction-styles.ts
|
|
1685
|
+
var focusRingClasses = "focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--tiger-focus-ring,var(--tiger-primary,#2563eb))] focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--tiger-surface,#ffffff)]";
|
|
1686
|
+
var focusRingInsetClasses = "focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--tiger-focus-ring,var(--tiger-primary,#2563eb))] focus-visible:ring-inset";
|
|
1687
|
+
var activePressClasses = "active:scale-[0.98] active:transition-transform";
|
|
1688
|
+
var activeOpacityClasses = "active:opacity-90";
|
|
1689
|
+
var interactiveClasses = `transition-all duration-150 ${focusRingClasses} ${activePressClasses}`;
|
|
1690
|
+
var inputFocusClasses = "focus:outline-none focus:ring-2 focus:ring-[var(--tiger-focus-ring,var(--tiger-primary,#2563eb))] focus:border-transparent";
|
|
1691
|
+
var tabFocusClasses = "focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--tiger-focus-ring,var(--tiger-primary,#2563eb))] focus-visible:ring-offset-2";
|
|
1692
|
+
var menuItemFocusClasses = "focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--tiger-focus-ring,var(--tiger-primary,#2563eb))] focus-visible:ring-inset";
|
|
1693
|
+
|
|
985
1694
|
// src/utils/button-utils.ts
|
|
986
|
-
var buttonBaseClasses = "inline-flex items-center justify-center font-medium rounded-md transition-
|
|
1695
|
+
var buttonBaseClasses = "inline-flex items-center justify-center font-medium rounded-md transition-all duration-150 focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-[var(--tiger-focus-ring,var(--tiger-primary,#2563eb))] active:scale-[0.98]";
|
|
987
1696
|
var buttonSizeClasses = {
|
|
988
1697
|
sm: "px-3 py-1.5 text-sm",
|
|
989
1698
|
md: "px-4 py-2 text-base",
|
|
@@ -991,94 +1700,6 @@ var buttonSizeClasses = {
|
|
|
991
1700
|
};
|
|
992
1701
|
var buttonDisabledClasses = "cursor-not-allowed opacity-60";
|
|
993
1702
|
|
|
994
|
-
// src/utils/select-utils.ts
|
|
995
|
-
var selectBaseClasses = "relative inline-block w-full";
|
|
996
|
-
var SELECT_TRIGGER_BASE_CLASSES = [
|
|
997
|
-
"w-full",
|
|
998
|
-
"flex",
|
|
999
|
-
"items-center",
|
|
1000
|
-
"justify-between",
|
|
1001
|
-
"gap-2",
|
|
1002
|
-
"px-3",
|
|
1003
|
-
"py-2",
|
|
1004
|
-
"bg-[var(--tiger-select-trigger-bg,var(--tiger-surface,#ffffff))]",
|
|
1005
|
-
"border",
|
|
1006
|
-
"border-[var(--tiger-select-trigger-border,var(--tiger-border,#d1d5db))]",
|
|
1007
|
-
"text-[var(--tiger-select-trigger-text,var(--tiger-text,#111827))]",
|
|
1008
|
-
"rounded-md",
|
|
1009
|
-
"shadow-sm",
|
|
1010
|
-
"cursor-pointer",
|
|
1011
|
-
"transition-colors",
|
|
1012
|
-
"focus:outline-none",
|
|
1013
|
-
"focus:ring-2",
|
|
1014
|
-
"focus:ring-[var(--tiger-select-ring,var(--tiger-primary,#2563eb))]",
|
|
1015
|
-
"focus:border-[var(--tiger-select-trigger-border-focus,var(--tiger-primary,#2563eb))]"
|
|
1016
|
-
];
|
|
1017
|
-
var SELECT_TRIGGER_DISABLED_CLASSES_STRING = [
|
|
1018
|
-
"disabled:bg-[var(--tiger-select-trigger-bg-disabled,var(--tiger-surface-muted,#f3f4f6))]",
|
|
1019
|
-
"disabled:text-[var(--tiger-select-trigger-text-disabled,var(--tiger-text-muted,#6b7280))]",
|
|
1020
|
-
"disabled:cursor-not-allowed",
|
|
1021
|
-
"disabled:border-[var(--tiger-select-trigger-border-disabled,var(--tiger-border,#e5e7eb))]"
|
|
1022
|
-
].join(" ");
|
|
1023
|
-
var selectDropdownBaseClasses = "absolute z-50 w-full mt-1 bg-[var(--tiger-select-dropdown-bg,var(--tiger-surface,#ffffff))] border border-[var(--tiger-select-dropdown-border,var(--tiger-border,#e5e7eb))] rounded-md shadow-lg max-h-60 overflow-auto";
|
|
1024
|
-
var selectOptionBaseClasses = "w-full px-3 py-2 text-left cursor-pointer transition-colors text-[var(--tiger-select-option-text,var(--tiger-text,#111827))] hover:bg-[var(--tiger-select-option-bg-hover,var(--tiger-outline-bg-hover,#eff6ff))]";
|
|
1025
|
-
var selectOptionSelectedClasses = "bg-[var(--tiger-select-option-bg-selected,var(--tiger-outline-bg-hover,#eff6ff))] text-[var(--tiger-select-option-text-selected,var(--tiger-primary,#2563eb))] font-medium";
|
|
1026
|
-
var selectOptionDisabledClasses = "opacity-50 cursor-not-allowed hover:bg-[var(--tiger-select-dropdown-bg,var(--tiger-surface,#ffffff))]";
|
|
1027
|
-
var selectGroupLabelClasses = "px-3 py-2 text-xs font-semibold text-[var(--tiger-select-group-label-text,var(--tiger-text-muted,#6b7280))] uppercase bg-[var(--tiger-select-group-label-bg,var(--tiger-surface-muted,#f9fafb))]";
|
|
1028
|
-
var selectSearchInputClasses = "w-full px-3 py-2 bg-[var(--tiger-select-dropdown-bg,var(--tiger-surface,#ffffff))] text-[var(--tiger-select-search-text,var(--tiger-text,#111827))] placeholder:text-[var(--tiger-select-search-placeholder,var(--tiger-text-muted,#9ca3af))] border-b border-[var(--tiger-select-dropdown-border,var(--tiger-border,#e5e7eb))] focus:outline-none focus:ring-0";
|
|
1029
|
-
var selectEmptyStateClasses = "px-3 py-8 text-center text-[var(--tiger-select-empty-text,var(--tiger-text-muted,#6b7280))] text-sm";
|
|
1030
|
-
var SELECT_SIZE_CLASSES = {
|
|
1031
|
-
sm: "text-sm py-1.5",
|
|
1032
|
-
md: "text-base py-2",
|
|
1033
|
-
lg: "text-lg py-2.5"
|
|
1034
|
-
};
|
|
1035
|
-
function getSelectSizeClasses(size) {
|
|
1036
|
-
return SELECT_SIZE_CLASSES[size];
|
|
1037
|
-
}
|
|
1038
|
-
function getSelectTriggerClasses(size, disabled, isOpen) {
|
|
1039
|
-
return classNames(
|
|
1040
|
-
...SELECT_TRIGGER_BASE_CLASSES,
|
|
1041
|
-
getSelectSizeClasses(size),
|
|
1042
|
-
disabled && SELECT_TRIGGER_DISABLED_CLASSES_STRING,
|
|
1043
|
-
isOpen && "ring-2 ring-[var(--tiger-select-ring,var(--tiger-primary,#2563eb))] border-[var(--tiger-select-trigger-border-focus,var(--tiger-primary,#2563eb))]"
|
|
1044
|
-
);
|
|
1045
|
-
}
|
|
1046
|
-
function getSelectOptionClasses(isSelected, isDisabled, size) {
|
|
1047
|
-
return classNames(
|
|
1048
|
-
selectOptionBaseClasses,
|
|
1049
|
-
getSelectSizeClasses(size),
|
|
1050
|
-
isSelected && selectOptionSelectedClasses,
|
|
1051
|
-
isDisabled && selectOptionDisabledClasses
|
|
1052
|
-
);
|
|
1053
|
-
}
|
|
1054
|
-
function isOptionGroup(option) {
|
|
1055
|
-
return !!option && typeof option === "object" && "options" in option && Array.isArray(option.options);
|
|
1056
|
-
}
|
|
1057
|
-
function filterOptions(options, query) {
|
|
1058
|
-
if (!query) {
|
|
1059
|
-
return options;
|
|
1060
|
-
}
|
|
1061
|
-
const searchLower = query.toLowerCase();
|
|
1062
|
-
return options.reduce((filtered, option) => {
|
|
1063
|
-
if (isOptionGroup(option)) {
|
|
1064
|
-
const filteredGroupOptions = option.options.filter(
|
|
1065
|
-
(opt) => opt.label.toLowerCase().includes(searchLower)
|
|
1066
|
-
);
|
|
1067
|
-
if (filteredGroupOptions.length > 0) {
|
|
1068
|
-
filtered.push({
|
|
1069
|
-
...option,
|
|
1070
|
-
options: filteredGroupOptions
|
|
1071
|
-
});
|
|
1072
|
-
}
|
|
1073
|
-
} else {
|
|
1074
|
-
if (option.label.toLowerCase().includes(searchLower)) {
|
|
1075
|
-
filtered.push(option);
|
|
1076
|
-
}
|
|
1077
|
-
}
|
|
1078
|
-
return filtered;
|
|
1079
|
-
}, []);
|
|
1080
|
-
}
|
|
1081
|
-
|
|
1082
1703
|
// src/utils/input-styles.ts
|
|
1083
1704
|
var BASE_INPUT_CLASSES = [
|
|
1084
1705
|
"w-full",
|
|
@@ -1163,35 +1784,95 @@ function getInputErrorClasses(size = "md") {
|
|
|
1163
1784
|
);
|
|
1164
1785
|
}
|
|
1165
1786
|
|
|
1166
|
-
// src/utils/
|
|
1167
|
-
var
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1787
|
+
// src/utils/select-utils.ts
|
|
1788
|
+
var selectBaseClasses = "relative inline-block w-full";
|
|
1789
|
+
var SELECT_TRIGGER_BASE_CLASSES = [
|
|
1790
|
+
"w-full",
|
|
1791
|
+
"flex",
|
|
1792
|
+
"items-center",
|
|
1793
|
+
"justify-between",
|
|
1794
|
+
"gap-2",
|
|
1795
|
+
"px-3",
|
|
1796
|
+
"py-2",
|
|
1797
|
+
"bg-[var(--tiger-select-trigger-bg,var(--tiger-surface,#ffffff))]",
|
|
1798
|
+
"border",
|
|
1799
|
+
"border-[var(--tiger-select-trigger-border,var(--tiger-border,#d1d5db))]",
|
|
1800
|
+
"text-[var(--tiger-select-trigger-text,var(--tiger-text,#111827))]",
|
|
1801
|
+
"rounded-md",
|
|
1802
|
+
"shadow-sm",
|
|
1803
|
+
"cursor-pointer",
|
|
1804
|
+
"transition-all",
|
|
1805
|
+
"duration-150",
|
|
1806
|
+
"focus:outline-none",
|
|
1807
|
+
"focus-visible:ring-2",
|
|
1808
|
+
"focus-visible:ring-[var(--tiger-select-ring,var(--tiger-primary,#2563eb))]",
|
|
1809
|
+
"focus-visible:border-[var(--tiger-select-trigger-border-focus,var(--tiger-primary,#2563eb))]",
|
|
1810
|
+
"active:scale-[0.99]"
|
|
1811
|
+
];
|
|
1812
|
+
var SELECT_TRIGGER_DISABLED_CLASSES_STRING = [
|
|
1813
|
+
"disabled:bg-[var(--tiger-select-trigger-bg-disabled,var(--tiger-surface-muted,#f3f4f6))]",
|
|
1814
|
+
"disabled:text-[var(--tiger-select-trigger-text-disabled,var(--tiger-text-muted,#6b7280))]",
|
|
1815
|
+
"disabled:cursor-not-allowed",
|
|
1816
|
+
"disabled:border-[var(--tiger-select-trigger-border-disabled,var(--tiger-border,#e5e7eb))]"
|
|
1817
|
+
].join(" ");
|
|
1818
|
+
var selectDropdownBaseClasses = "absolute z-50 w-full mt-1 bg-[var(--tiger-select-dropdown-bg,var(--tiger-surface,#ffffff))] border border-[var(--tiger-select-dropdown-border,var(--tiger-border,#e5e7eb))] rounded-md shadow-lg max-h-60 overflow-auto";
|
|
1819
|
+
var selectOptionBaseClasses = "w-full px-3 py-2 text-left cursor-pointer transition-colors text-[var(--tiger-select-option-text,var(--tiger-text,#111827))] hover:bg-[var(--tiger-select-option-bg-hover,var(--tiger-outline-bg-hover,#eff6ff))]";
|
|
1820
|
+
var selectOptionSelectedClasses = "bg-[var(--tiger-select-option-bg-selected,var(--tiger-outline-bg-hover,#eff6ff))] text-[var(--tiger-select-option-text-selected,var(--tiger-primary,#2563eb))] font-medium";
|
|
1821
|
+
var selectOptionDisabledClasses = "opacity-50 cursor-not-allowed hover:bg-[var(--tiger-select-dropdown-bg,var(--tiger-surface,#ffffff))]";
|
|
1822
|
+
var selectGroupLabelClasses = "px-3 py-2 text-xs font-semibold text-[var(--tiger-select-group-label-text,var(--tiger-text-muted,#6b7280))] uppercase bg-[var(--tiger-select-group-label-bg,var(--tiger-surface-muted,#f9fafb))]";
|
|
1823
|
+
var selectSearchInputClasses = "w-full px-3 py-2 bg-[var(--tiger-select-dropdown-bg,var(--tiger-surface,#ffffff))] text-[var(--tiger-select-search-text,var(--tiger-text,#111827))] placeholder:text-[var(--tiger-select-search-placeholder,var(--tiger-text-muted,#9ca3af))] border-b border-[var(--tiger-select-dropdown-border,var(--tiger-border,#e5e7eb))] focus:outline-none focus:ring-0";
|
|
1824
|
+
var selectEmptyStateClasses = "px-3 py-8 text-center text-[var(--tiger-select-empty-text,var(--tiger-text-muted,#6b7280))] text-sm";
|
|
1825
|
+
var SELECT_SIZE_CLASSES = {
|
|
1826
|
+
sm: "text-sm py-1.5",
|
|
1827
|
+
md: "text-base py-2",
|
|
1828
|
+
lg: "text-lg py-2.5"
|
|
1829
|
+
};
|
|
1830
|
+
function getSelectSizeClasses(size) {
|
|
1831
|
+
return SELECT_SIZE_CLASSES[size];
|
|
1174
1832
|
}
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1833
|
+
function getSelectTriggerClasses(size, disabled, isOpen) {
|
|
1834
|
+
return classNames(
|
|
1835
|
+
...SELECT_TRIGGER_BASE_CLASSES,
|
|
1836
|
+
getSelectSizeClasses(size),
|
|
1837
|
+
disabled && SELECT_TRIGGER_DISABLED_CLASSES_STRING,
|
|
1838
|
+
isOpen && "ring-2 ring-[var(--tiger-select-ring,var(--tiger-primary,#2563eb))] border-[var(--tiger-select-trigger-border-focus,var(--tiger-primary,#2563eb))]"
|
|
1839
|
+
);
|
|
1178
1840
|
}
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1841
|
+
function getSelectOptionClasses(isSelected, isDisabled, size) {
|
|
1842
|
+
return classNames(
|
|
1843
|
+
selectOptionBaseClasses,
|
|
1844
|
+
getSelectSizeClasses(size),
|
|
1845
|
+
isSelected && selectOptionSelectedClasses,
|
|
1846
|
+
isDisabled && selectOptionDisabledClasses
|
|
1847
|
+
);
|
|
1848
|
+
}
|
|
1849
|
+
function isOptionGroup(option) {
|
|
1850
|
+
return !!option && typeof option === "object" && "options" in option && Array.isArray(option.options);
|
|
1851
|
+
}
|
|
1852
|
+
function filterOptions(options, query) {
|
|
1853
|
+
if (!query) {
|
|
1854
|
+
return options;
|
|
1187
1855
|
}
|
|
1188
|
-
const
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1856
|
+
const searchLower = query.toLowerCase();
|
|
1857
|
+
return options.reduce((filtered, option) => {
|
|
1858
|
+
if (isOptionGroup(option)) {
|
|
1859
|
+
const filteredGroupOptions = option.options.filter(
|
|
1860
|
+
(opt) => opt.label.toLowerCase().includes(searchLower)
|
|
1861
|
+
);
|
|
1862
|
+
if (filteredGroupOptions.length > 0) {
|
|
1863
|
+
filtered.push({
|
|
1864
|
+
...option,
|
|
1865
|
+
options: filteredGroupOptions
|
|
1866
|
+
});
|
|
1867
|
+
}
|
|
1868
|
+
} else {
|
|
1869
|
+
if (option.label.toLowerCase().includes(searchLower)) {
|
|
1870
|
+
filtered.push(option);
|
|
1871
|
+
}
|
|
1872
|
+
}
|
|
1873
|
+
return filtered;
|
|
1874
|
+
}, []);
|
|
1193
1875
|
}
|
|
1194
|
-
var SHAKE_CLASS = "tiger-animate-shake";
|
|
1195
1876
|
|
|
1196
1877
|
// src/utils/textarea-auto-resize.ts
|
|
1197
1878
|
function autoResizeTextarea(textarea, { minRows, maxRows } = {}) {
|
|
@@ -1404,206 +2085,69 @@ function getErrorFields(errors) {
|
|
|
1404
2085
|
return errors.map((error) => error.field);
|
|
1405
2086
|
}
|
|
1406
2087
|
|
|
1407
|
-
// src/utils/
|
|
1408
|
-
var
|
|
1409
|
-
var
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
var
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
function toPercentage(value) {
|
|
1431
|
-
return (value / 24 * 100).toFixed(6).replace(/\.?0+$/, "");
|
|
1432
|
-
}
|
|
1433
|
-
var colSpanClasses = "w-[var(--tiger-col-span)] sm:w-[var(--tiger-col-span-sm,var(--tiger-col-span))] md:w-[var(--tiger-col-span-md,var(--tiger-col-span))] lg:w-[var(--tiger-col-span-lg,var(--tiger-col-span))] xl:w-[var(--tiger-col-span-xl,var(--tiger-col-span))] 2xl:w-[var(--tiger-col-span-2xl,var(--tiger-col-span))]";
|
|
1434
|
-
var colOffsetClasses = "ml-[var(--tiger-col-offset)] sm:ml-[var(--tiger-col-offset-sm,var(--tiger-col-offset))] md:ml-[var(--tiger-col-offset-md,var(--tiger-col-offset))] lg:ml-[var(--tiger-col-offset-lg,var(--tiger-col-offset))] xl:ml-[var(--tiger-col-offset-xl,var(--tiger-col-offset))] 2xl:ml-[var(--tiger-col-offset-2xl,var(--tiger-col-offset))]";
|
|
1435
|
-
var colFlexClasses = "flex-[var(--tiger-col-flex)]";
|
|
1436
|
-
var colOrderClasses = "order-[var(--tiger-col-order)] sm:order-[var(--tiger-col-order-sm,var(--tiger-col-order))] md:order-[var(--tiger-col-order-md,var(--tiger-col-order))] lg:order-[var(--tiger-col-order-lg,var(--tiger-col-order))] xl:order-[var(--tiger-col-order-xl,var(--tiger-col-order))] 2xl:order-[var(--tiger-col-order-2xl,var(--tiger-col-order))]";
|
|
1437
|
-
function hasNonZeroOffset(offset) {
|
|
1438
|
-
if (typeof offset === "number") return offset !== 0;
|
|
1439
|
-
return BREAKPOINT_ORDER.some((bp) => (offset[bp] ?? 0) !== 0);
|
|
1440
|
-
}
|
|
1441
|
-
function setSpanVars(vars, span) {
|
|
1442
|
-
if (typeof span === "number") {
|
|
1443
|
-
if (validateGridValue(span, "span")) vars["--tiger-col-span"] = `${toPercentage(span)}%`;
|
|
1444
|
-
return;
|
|
1445
|
-
}
|
|
1446
|
-
vars["--tiger-col-span"] = "100%";
|
|
1447
|
-
BREAKPOINT_ORDER.forEach((bp) => {
|
|
1448
|
-
const value = span[bp];
|
|
1449
|
-
if (value === void 0) return;
|
|
1450
|
-
if (!validateGridValue(value, `span.${bp}`)) return;
|
|
1451
|
-
const percentage = `${toPercentage(value)}%`;
|
|
1452
|
-
if (bp === "xs") {
|
|
1453
|
-
vars["--tiger-col-span"] = percentage;
|
|
1454
|
-
return;
|
|
1455
|
-
}
|
|
1456
|
-
vars[`--tiger-col-span-${bp}`] = percentage;
|
|
1457
|
-
});
|
|
1458
|
-
}
|
|
1459
|
-
function setOffsetVars(vars, offset) {
|
|
1460
|
-
if (typeof offset === "number") {
|
|
1461
|
-
if (offset === 0) return;
|
|
1462
|
-
if (validateGridValue(offset, "offset")) vars["--tiger-col-offset"] = `${toPercentage(offset)}%`;
|
|
1463
|
-
return;
|
|
1464
|
-
}
|
|
1465
|
-
vars["--tiger-col-offset"] = "0%";
|
|
1466
|
-
BREAKPOINT_ORDER.forEach((bp) => {
|
|
1467
|
-
const value = offset[bp];
|
|
1468
|
-
if (value === void 0) return;
|
|
1469
|
-
if (value === 0) return;
|
|
1470
|
-
if (!validateGridValue(value, `offset.${bp}`)) return;
|
|
1471
|
-
const percentage = `${toPercentage(value)}%`;
|
|
1472
|
-
if (bp === "xs") {
|
|
1473
|
-
vars["--tiger-col-offset"] = percentage;
|
|
1474
|
-
return;
|
|
1475
|
-
}
|
|
1476
|
-
vars[`--tiger-col-offset-${bp}`] = percentage;
|
|
1477
|
-
});
|
|
1478
|
-
}
|
|
1479
|
-
function getColStyleVars(span, offset) {
|
|
1480
|
-
const vars = {};
|
|
1481
|
-
if (span !== void 0 && span !== null) setSpanVars(vars, span);
|
|
1482
|
-
if (offset !== void 0 && offset !== null) setOffsetVars(vars, offset);
|
|
1483
|
-
return vars;
|
|
1484
|
-
}
|
|
1485
|
-
function setOrderVars(vars, order) {
|
|
1486
|
-
if (typeof order === "number") {
|
|
1487
|
-
vars["--tiger-col-order"] = String(order);
|
|
1488
|
-
return;
|
|
1489
|
-
}
|
|
1490
|
-
vars["--tiger-col-order"] = "0";
|
|
1491
|
-
BREAKPOINT_ORDER.forEach((bp) => {
|
|
1492
|
-
const value = order[bp];
|
|
1493
|
-
if (value === void 0) return;
|
|
1494
|
-
if (bp === "xs") {
|
|
1495
|
-
vars["--tiger-col-order"] = String(value);
|
|
1496
|
-
return;
|
|
1497
|
-
}
|
|
1498
|
-
vars[`--tiger-col-order-${bp}`] = String(value);
|
|
1499
|
-
});
|
|
1500
|
-
}
|
|
1501
|
-
function getColOrderStyleVars(order) {
|
|
1502
|
-
if (order === void 0 || order === null) return {};
|
|
1503
|
-
const vars = {};
|
|
1504
|
-
setOrderVars(vars, order);
|
|
1505
|
-
return vars;
|
|
1506
|
-
}
|
|
1507
|
-
function getAlignClasses(align) {
|
|
1508
|
-
return ALIGN_MAP[align] || "items-start";
|
|
1509
|
-
}
|
|
1510
|
-
function getJustifyClasses(justify) {
|
|
1511
|
-
return JUSTIFY_MAP[justify] || "justify-start";
|
|
1512
|
-
}
|
|
1513
|
-
function getGutterStyles(gutter) {
|
|
1514
|
-
if (gutter === void 0 || gutter === null || gutter === 0) return {};
|
|
1515
|
-
const [horizontal, vertical] = Array.isArray(gutter) ? gutter : [gutter, gutter];
|
|
1516
|
-
const rowStyle = {};
|
|
1517
|
-
const colStyle = {};
|
|
1518
|
-
if (horizontal > 0) {
|
|
1519
|
-
rowStyle.marginLeft = `-${horizontal / 2}px`;
|
|
1520
|
-
rowStyle.marginRight = `-${horizontal / 2}px`;
|
|
1521
|
-
colStyle.paddingLeft = `${horizontal / 2}px`;
|
|
1522
|
-
colStyle.paddingRight = `${horizontal / 2}px`;
|
|
1523
|
-
}
|
|
1524
|
-
if (vertical > 0) {
|
|
1525
|
-
rowStyle.marginTop = `-${vertical / 2}px`;
|
|
1526
|
-
rowStyle.marginBottom = `-${vertical / 2}px`;
|
|
1527
|
-
colStyle.paddingTop = `${vertical / 2}px`;
|
|
1528
|
-
colStyle.paddingBottom = `${vertical / 2}px`;
|
|
2088
|
+
// src/utils/radio-utils.ts
|
|
2089
|
+
var radioRootBaseClasses = "inline-flex items-center";
|
|
2090
|
+
var radioVisualBaseClasses = "relative inline-flex items-center justify-center rounded-full border-2 cursor-pointer transition-all";
|
|
2091
|
+
var radioFocusVisibleClasses = "peer-focus-visible:ring-2 peer-focus-visible:ring-offset-2 peer-focus-visible:ring-[var(--tiger-primary,#2563eb)] peer-focus-visible:ring-offset-[var(--tiger-surface,#ffffff)]";
|
|
2092
|
+
var radioDotBaseClasses = "rounded-full transition-all";
|
|
2093
|
+
var radioLabelBaseClasses = "ml-2 cursor-pointer select-none";
|
|
2094
|
+
var radioDisabledCursorClasses = "cursor-not-allowed";
|
|
2095
|
+
var radioHoverBorderClasses = "hover:border-[var(--tiger-primary,#2563eb)]";
|
|
2096
|
+
var radioSizeClasses = {
|
|
2097
|
+
sm: {
|
|
2098
|
+
radio: "w-4 h-4",
|
|
2099
|
+
dot: "w-1.5 h-1.5",
|
|
2100
|
+
label: "text-sm"
|
|
2101
|
+
},
|
|
2102
|
+
md: {
|
|
2103
|
+
radio: "w-5 h-5",
|
|
2104
|
+
dot: "w-2 h-2",
|
|
2105
|
+
label: "text-base"
|
|
2106
|
+
},
|
|
2107
|
+
lg: {
|
|
2108
|
+
radio: "w-6 h-6",
|
|
2109
|
+
dot: "w-2.5 h-2.5",
|
|
2110
|
+
label: "text-lg"
|
|
1529
2111
|
}
|
|
1530
|
-
return { rowStyle, colStyle };
|
|
1531
|
-
}
|
|
1532
|
-
function getSpanClasses(span) {
|
|
1533
|
-
if (span === void 0 || span === null) return "w-full";
|
|
1534
|
-
return colSpanClasses;
|
|
1535
|
-
}
|
|
1536
|
-
function getOffsetClasses(offset) {
|
|
1537
|
-
if (offset === void 0 || offset === null) return "";
|
|
1538
|
-
if (!hasNonZeroOffset(offset)) return "";
|
|
1539
|
-
return colOffsetClasses;
|
|
1540
|
-
}
|
|
1541
|
-
function getOrderClasses(order) {
|
|
1542
|
-
if (order === void 0) return "";
|
|
1543
|
-
return colOrderClasses;
|
|
1544
|
-
}
|
|
1545
|
-
function getFlexClasses(flex) {
|
|
1546
|
-
if (flex === void 0) return "";
|
|
1547
|
-
return colFlexClasses;
|
|
1548
|
-
}
|
|
1549
|
-
|
|
1550
|
-
// src/utils/divider.ts
|
|
1551
|
-
var SPACING_MAP = {
|
|
1552
|
-
none: { horizontal: "", vertical: "" },
|
|
1553
|
-
xs: { horizontal: "my-1", vertical: "mx-1" },
|
|
1554
|
-
sm: { horizontal: "my-2", vertical: "mx-2" },
|
|
1555
|
-
md: { horizontal: "my-4", vertical: "mx-4" },
|
|
1556
|
-
lg: { horizontal: "my-6", vertical: "mx-6" },
|
|
1557
|
-
xl: { horizontal: "my-8", vertical: "mx-8" }
|
|
1558
|
-
};
|
|
1559
|
-
var LINE_STYLE_MAP = {
|
|
1560
|
-
solid: "border-solid",
|
|
1561
|
-
dashed: "border-dashed",
|
|
1562
|
-
dotted: "border-dotted"
|
|
1563
|
-
};
|
|
1564
|
-
var DEFAULT_BORDER_COLOR_CLASS = "border-[var(--tiger-border,#e5e7eb)]";
|
|
1565
|
-
function getDividerSpacingClasses(spacing, orientation) {
|
|
1566
|
-
return SPACING_MAP[spacing][orientation];
|
|
1567
|
-
}
|
|
1568
|
-
function getDividerLineStyleClasses(lineStyle) {
|
|
1569
|
-
return LINE_STYLE_MAP[lineStyle];
|
|
1570
|
-
}
|
|
1571
|
-
function getDividerOrientationClasses(orientation) {
|
|
1572
|
-
return orientation === "horizontal" ? `w-full border-t ${DEFAULT_BORDER_COLOR_CLASS}` : `h-full border-l ${DEFAULT_BORDER_COLOR_CLASS}`;
|
|
1573
|
-
}
|
|
1574
|
-
|
|
1575
|
-
// src/utils/layout-utils.ts
|
|
1576
|
-
var layoutRootClasses = "tiger-layout flex flex-col min-h-screen";
|
|
1577
|
-
var layoutHeaderClasses = "tiger-header bg-[var(--tiger-surface,#ffffff)] border-b border-[var(--tiger-border,#e5e7eb)]";
|
|
1578
|
-
var layoutSidebarClasses = "tiger-sidebar bg-[var(--tiger-surface,#ffffff)] border-r border-[var(--tiger-border,#e5e7eb)] transition-all duration-300";
|
|
1579
|
-
var layoutContentClasses = "tiger-content flex-1 bg-[var(--tiger-layout-content-bg,#f9fafb)] p-6";
|
|
1580
|
-
var layoutFooterClasses = "tiger-footer bg-[var(--tiger-surface,#ffffff)] border-t border-[var(--tiger-border,#e5e7eb)] p-4";
|
|
1581
|
-
|
|
1582
|
-
// src/utils/container-utils.ts
|
|
1583
|
-
var containerBaseClasses = "w-full";
|
|
1584
|
-
var containerCenteredClasses = "mx-auto";
|
|
1585
|
-
var containerPaddingClasses = "px-4 sm:px-6 lg:px-8";
|
|
1586
|
-
var containerMaxWidthClasses = {
|
|
1587
|
-
sm: "max-w-screen-sm",
|
|
1588
|
-
md: "max-w-screen-md",
|
|
1589
|
-
lg: "max-w-screen-lg",
|
|
1590
|
-
xl: "max-w-screen-xl",
|
|
1591
|
-
"2xl": "max-w-screen-2xl",
|
|
1592
|
-
full: "w-full"
|
|
1593
2112
|
};
|
|
1594
|
-
var
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
}
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
2113
|
+
var getRadioVisualClasses = ({
|
|
2114
|
+
size,
|
|
2115
|
+
checked,
|
|
2116
|
+
disabled,
|
|
2117
|
+
colors
|
|
2118
|
+
}) => classNames(
|
|
2119
|
+
radioVisualBaseClasses,
|
|
2120
|
+
radioFocusVisibleClasses,
|
|
2121
|
+
radioSizeClasses[size].radio,
|
|
2122
|
+
checked ? colors.borderChecked : colors.border,
|
|
2123
|
+
checked ? colors.bgChecked : colors.bg,
|
|
2124
|
+
disabled && colors.disabled,
|
|
2125
|
+
disabled && radioDisabledCursorClasses,
|
|
2126
|
+
!disabled && radioHoverBorderClasses
|
|
2127
|
+
);
|
|
2128
|
+
var getRadioDotClasses = ({ size, checked, colors }) => classNames(
|
|
2129
|
+
radioDotBaseClasses,
|
|
2130
|
+
radioSizeClasses[size].dot,
|
|
2131
|
+
colors.innerDot,
|
|
2132
|
+
checked ? "scale-100" : "scale-0"
|
|
2133
|
+
);
|
|
2134
|
+
var getRadioLabelClasses = ({ size, disabled, colors }) => classNames(
|
|
2135
|
+
radioLabelBaseClasses,
|
|
2136
|
+
radioSizeClasses[size].label,
|
|
2137
|
+
disabled ? colors.textDisabled : "text-[var(--tiger-text,#111827)]",
|
|
2138
|
+
disabled && radioDisabledCursorClasses
|
|
1605
2139
|
);
|
|
1606
2140
|
|
|
2141
|
+
// src/utils/radio-group-utils.ts
|
|
2142
|
+
var radioGroupDefaultClasses = "space-y-2";
|
|
2143
|
+
var getRadioGroupClasses = ({
|
|
2144
|
+
className,
|
|
2145
|
+
hasCustomClass
|
|
2146
|
+
} = {}) => {
|
|
2147
|
+
const effectiveHasCustomClass = hasCustomClass ?? !!className;
|
|
2148
|
+
return classNames(className, !effectiveHasCustomClass && radioGroupDefaultClasses);
|
|
2149
|
+
};
|
|
2150
|
+
|
|
1607
2151
|
// src/utils/date-utils.ts
|
|
1608
2152
|
function isValidDate(value) {
|
|
1609
2153
|
if (!value) return false;
|
|
@@ -1932,64 +2476,6 @@ var datePickerFooterButtonClasses = classNames(
|
|
|
1932
2476
|
"duration-150"
|
|
1933
2477
|
);
|
|
1934
2478
|
|
|
1935
|
-
// src/utils/common-icons.ts
|
|
1936
|
-
var closeIconViewBox = "0 0 24 24";
|
|
1937
|
-
var closeIconPathD = "M6 18L18 6M6 6l12 12";
|
|
1938
|
-
var closeIconPathStrokeLinecap = "round";
|
|
1939
|
-
var closeIconPathStrokeLinejoin = "round";
|
|
1940
|
-
var closeIconPathStrokeWidth = 2;
|
|
1941
|
-
var icon24ViewBox = "0 0 24 24";
|
|
1942
|
-
var icon24PathStrokeLinecap = "round";
|
|
1943
|
-
var icon24PathStrokeLinejoin = "round";
|
|
1944
|
-
var icon24StrokeWidth = 2;
|
|
1945
|
-
var icon20ViewBox = "0 0 20 20";
|
|
1946
|
-
var closeSolidIcon20PathD = "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z";
|
|
1947
|
-
var calendarSolidIcon20PathD = "M6 2a1 1 0 00-1 1v1H4a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V6a2 2 0 00-2-2h-1V3a1 1 0 10-2 0v1H7V3a1 1 0 00-1-1zm0 5a1 1 0 000 2h8a1 1 0 100-2H6z";
|
|
1948
|
-
var clockSolidIcon20PathD = "M10 18a8 8 0 100-16 8 8 0 000 16zm1-12a1 1 0 10-2 0v4a1 1 0 00.293.707l2.828 2.829a1 1 0 101.415-1.415L11 9.586V6z";
|
|
1949
|
-
var chevronLeftSolidIcon20PathD = "M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z";
|
|
1950
|
-
var chevronRightSolidIcon20PathD = "M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z";
|
|
1951
|
-
var successCircleSolidIcon20PathD = "M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z";
|
|
1952
|
-
var errorCircleSolidIcon20PathD = "M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z";
|
|
1953
|
-
var statusSuccessIconPath = "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z";
|
|
1954
|
-
var statusWarningIconPath = "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z";
|
|
1955
|
-
var statusErrorIconPath = "M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z";
|
|
1956
|
-
var statusInfoIconPath = "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z";
|
|
1957
|
-
var statusIconPaths = {
|
|
1958
|
-
success: statusSuccessIconPath,
|
|
1959
|
-
warning: statusWarningIconPath,
|
|
1960
|
-
error: statusErrorIconPath,
|
|
1961
|
-
info: statusInfoIconPath
|
|
1962
|
-
};
|
|
1963
|
-
|
|
1964
|
-
// src/utils/datepicker-icons.ts
|
|
1965
|
-
var CalendarIconPath = calendarSolidIcon20PathD;
|
|
1966
|
-
var CloseIconPath = closeSolidIcon20PathD;
|
|
1967
|
-
var ChevronLeftIconPath = chevronLeftSolidIcon20PathD;
|
|
1968
|
-
var ChevronRightIconPath = chevronRightSolidIcon20PathD;
|
|
1969
|
-
|
|
1970
|
-
// src/utils/datepicker-i18n.ts
|
|
1971
|
-
function getDatePickerLabels(locale, overrides) {
|
|
1972
|
-
const lc = (locale ?? "").toLowerCase();
|
|
1973
|
-
const base = lc.startsWith("zh") ? {
|
|
1974
|
-
today: "\u4ECA\u5929",
|
|
1975
|
-
ok: "\u786E\u5B9A",
|
|
1976
|
-
calendar: "\u65E5\u5386",
|
|
1977
|
-
toggleCalendar: "\u6253\u5F00\u65E5\u5386",
|
|
1978
|
-
clearDate: "\u6E05\u9664\u65E5\u671F",
|
|
1979
|
-
previousMonth: "\u4E0A\u4E2A\u6708",
|
|
1980
|
-
nextMonth: "\u4E0B\u4E2A\u6708"
|
|
1981
|
-
} : {
|
|
1982
|
-
today: "Today",
|
|
1983
|
-
ok: "OK",
|
|
1984
|
-
calendar: "Calendar",
|
|
1985
|
-
toggleCalendar: "Toggle calendar",
|
|
1986
|
-
clearDate: "Clear date",
|
|
1987
|
-
previousMonth: "Previous month",
|
|
1988
|
-
nextMonth: "Next month"
|
|
1989
|
-
};
|
|
1990
|
-
return { ...base, ...overrides ?? {} };
|
|
1991
|
-
}
|
|
1992
|
-
|
|
1993
2479
|
// src/utils/time-utils.ts
|
|
1994
2480
|
function isValidTimeValue(value, min, max) {
|
|
1995
2481
|
return !isNaN(value) && value >= min && value <= max;
|
|
@@ -2117,191 +2603,11 @@ function generateSeconds(step = 1) {
|
|
|
2117
2603
|
for (let i = 0; i < 60; i += validStep) {
|
|
2118
2604
|
seconds.push(i);
|
|
2119
2605
|
}
|
|
2120
|
-
return seconds;
|
|
2121
|
-
}
|
|
2122
|
-
function getCurrentTime(showSeconds = false) {
|
|
2123
|
-
const now = /* @__PURE__ */ new Date();
|
|
2124
|
-
return formatTime(now.getHours(), now.getMinutes(), now.getSeconds(), showSeconds);
|
|
2125
|
-
}
|
|
2126
|
-
|
|
2127
|
-
// src/utils/timepicker-styles.ts
|
|
2128
|
-
var timePickerBaseClasses = "relative inline-block w-full max-w-xs";
|
|
2129
|
-
var timePickerInputWrapperClasses = "relative flex items-center";
|
|
2130
|
-
function getTimePickerInputClasses(size, disabled) {
|
|
2131
|
-
const baseClasses = [
|
|
2132
|
-
"w-full rounded-md border border-gray-300",
|
|
2133
|
-
"focus:outline-none focus:ring-2 focus:ring-[var(--tiger-primary,#2563eb)] focus:border-transparent",
|
|
2134
|
-
"transition-colors duration-200",
|
|
2135
|
-
"pr-16"
|
|
2136
|
-
// Space for clear + clock buttons
|
|
2137
|
-
];
|
|
2138
|
-
const sizeClasses = {
|
|
2139
|
-
sm: "px-2 py-1 text-sm",
|
|
2140
|
-
md: "px-3 py-2 text-base",
|
|
2141
|
-
lg: "px-4 py-3 text-lg"
|
|
2142
|
-
};
|
|
2143
|
-
const stateClasses = disabled ? "bg-gray-100 text-gray-400 cursor-not-allowed" : "bg-white text-gray-900 cursor-pointer hover:border-gray-400";
|
|
2144
|
-
return [...baseClasses, sizeClasses[size], stateClasses].join(" ");
|
|
2145
|
-
}
|
|
2146
|
-
function getTimePickerIconButtonClasses(size) {
|
|
2147
|
-
const baseClasses = [
|
|
2148
|
-
"absolute right-1 flex items-center justify-center",
|
|
2149
|
-
"text-gray-400 hover:text-gray-600",
|
|
2150
|
-
"focus:outline-none focus:ring-2 focus:ring-[var(--tiger-primary,#2563eb)] focus:ring-offset-1",
|
|
2151
|
-
"rounded transition-colors duration-200",
|
|
2152
|
-
"disabled:cursor-not-allowed disabled:opacity-50"
|
|
2153
|
-
];
|
|
2154
|
-
const sizeClasses = {
|
|
2155
|
-
sm: "w-6 h-6",
|
|
2156
|
-
md: "w-8 h-8",
|
|
2157
|
-
lg: "w-10 h-10"
|
|
2158
|
-
};
|
|
2159
|
-
return [...baseClasses, sizeClasses[size]].join(" ");
|
|
2160
|
-
}
|
|
2161
|
-
var timePickerClearButtonClasses = [
|
|
2162
|
-
"absolute right-10 flex items-center justify-center",
|
|
2163
|
-
"w-6 h-6 text-gray-400 hover:text-gray-600",
|
|
2164
|
-
"focus:outline-none focus:ring-2 focus:ring-[var(--tiger-primary,#2563eb)] focus:ring-offset-1",
|
|
2165
|
-
"rounded transition-colors duration-200"
|
|
2166
|
-
].join(" ");
|
|
2167
|
-
var timePickerPanelClasses = [
|
|
2168
|
-
"absolute z-10 mt-1 bg-white border border-gray-200 rounded-lg shadow-lg",
|
|
2169
|
-
"w-max"
|
|
2170
|
-
].join(" ");
|
|
2171
|
-
var timePickerPanelContentClasses = "flex divide-x divide-gray-200";
|
|
2172
|
-
var timePickerRangeHeaderClasses = [
|
|
2173
|
-
"px-3 py-2 border-b border-gray-200 bg-gray-50",
|
|
2174
|
-
"flex items-center gap-2"
|
|
2175
|
-
].join(" ");
|
|
2176
|
-
function getTimePickerRangeTabButtonClasses(isActive) {
|
|
2177
|
-
const baseClasses = [
|
|
2178
|
-
"px-3 py-1 text-xs font-medium rounded",
|
|
2179
|
-
"border border-gray-300",
|
|
2180
|
-
"focus:outline-none focus:ring-2 focus:ring-[var(--tiger-primary,#2563eb)] focus:ring-offset-1",
|
|
2181
|
-
"transition-colors duration-150"
|
|
2182
|
-
];
|
|
2183
|
-
if (isActive) {
|
|
2184
|
-
return [...baseClasses, "bg-[var(--tiger-primary,#2563eb)] text-white border-transparent"].join(
|
|
2185
|
-
" "
|
|
2186
|
-
);
|
|
2187
|
-
}
|
|
2188
|
-
return [...baseClasses, "bg-white hover:bg-gray-50 text-gray-700"].join(" ");
|
|
2189
|
-
}
|
|
2190
|
-
var timePickerColumnClasses = "flex flex-col overflow-hidden shrink-0 w-16";
|
|
2191
|
-
var timePickerColumnHeaderClasses = [
|
|
2192
|
-
"px-2 py-1 text-xs font-semibold text-gray-500 text-center",
|
|
2193
|
-
"bg-gray-50 border-b border-gray-200"
|
|
2194
|
-
].join(" ");
|
|
2195
|
-
var timePickerColumnListClasses = [
|
|
2196
|
-
"overflow-y-auto max-h-48 scrollbar-thin scrollbar-thumb-gray-300 scrollbar-track-gray-100"
|
|
2197
|
-
].join(" ");
|
|
2198
|
-
function getTimePickerItemClasses(isSelected, isDisabled) {
|
|
2199
|
-
const baseClasses = [
|
|
2200
|
-
"w-full px-3 py-1.5 text-sm text-center",
|
|
2201
|
-
"hover:bg-gray-100 focus:outline-none focus:bg-gray-100",
|
|
2202
|
-
"transition-colors duration-150",
|
|
2203
|
-
"cursor-pointer"
|
|
2204
|
-
];
|
|
2205
|
-
if (isDisabled) {
|
|
2206
|
-
return [...baseClasses, "text-gray-300 cursor-not-allowed hover:bg-transparent"].join(" ");
|
|
2207
|
-
}
|
|
2208
|
-
if (isSelected) {
|
|
2209
|
-
return [
|
|
2210
|
-
...baseClasses,
|
|
2211
|
-
"bg-[var(--tiger-primary,#2563eb)] text-white",
|
|
2212
|
-
"hover:bg-[var(--tiger-primary-hover,#1d4ed8)]",
|
|
2213
|
-
"font-medium"
|
|
2214
|
-
].join(" ");
|
|
2215
|
-
}
|
|
2216
|
-
return [...baseClasses, "text-gray-700"].join(" ");
|
|
2217
|
-
}
|
|
2218
|
-
function getTimePickerPeriodButtonClasses(isSelected) {
|
|
2219
|
-
const baseClasses = [
|
|
2220
|
-
"w-full px-3 py-2 text-sm font-medium text-center",
|
|
2221
|
-
"hover:bg-gray-100 focus:outline-none focus:bg-gray-100",
|
|
2222
|
-
"transition-colors duration-150",
|
|
2223
|
-
"cursor-pointer"
|
|
2224
|
-
];
|
|
2225
|
-
if (isSelected) {
|
|
2226
|
-
return [
|
|
2227
|
-
...baseClasses,
|
|
2228
|
-
"bg-[var(--tiger-primary,#2563eb)] text-white",
|
|
2229
|
-
"hover:bg-[var(--tiger-primary-hover,#1d4ed8)]"
|
|
2230
|
-
].join(" ");
|
|
2231
|
-
}
|
|
2232
|
-
return [...baseClasses, "text-gray-700"].join(" ");
|
|
2233
|
-
}
|
|
2234
|
-
var timePickerFooterClasses = [
|
|
2235
|
-
"px-3 py-2 border-t border-gray-200",
|
|
2236
|
-
"flex items-center justify-between gap-2"
|
|
2237
|
-
].join(" ");
|
|
2238
|
-
var timePickerFooterButtonClasses = [
|
|
2239
|
-
"px-3 py-1 text-xs font-medium rounded",
|
|
2240
|
-
"border border-gray-300 hover:border-gray-400",
|
|
2241
|
-
"bg-white hover:bg-gray-50",
|
|
2242
|
-
"text-gray-700",
|
|
2243
|
-
"focus:outline-none focus:ring-2 focus:ring-[var(--tiger-primary,#2563eb)] focus:ring-offset-1",
|
|
2244
|
-
"transition-colors duration-150"
|
|
2245
|
-
].join(" ");
|
|
2246
|
-
|
|
2247
|
-
// src/utils/timepicker-icons.ts
|
|
2248
|
-
var ClockIconPath = clockSolidIcon20PathD;
|
|
2249
|
-
var TimePickerCloseIconPath = closeSolidIcon20PathD;
|
|
2250
|
-
|
|
2251
|
-
// src/utils/timepicker-labels.ts
|
|
2252
|
-
var ZH_LABELS = {
|
|
2253
|
-
hour: "\u65F6",
|
|
2254
|
-
minute: "\u5206",
|
|
2255
|
-
second: "\u79D2",
|
|
2256
|
-
now: "\u73B0\u5728",
|
|
2257
|
-
ok: "\u786E\u5B9A",
|
|
2258
|
-
start: "\u5F00\u59CB",
|
|
2259
|
-
end: "\u7ED3\u675F",
|
|
2260
|
-
clear: "\u6E05\u9664\u65F6\u95F4",
|
|
2261
|
-
toggle: "\u6253\u5F00\u65F6\u95F4\u9009\u62E9\u5668",
|
|
2262
|
-
dialog: "\u65F6\u95F4\u9009\u62E9\u5668",
|
|
2263
|
-
selectTime: "\u8BF7\u9009\u62E9\u65F6\u95F4",
|
|
2264
|
-
selectTimeRange: "\u8BF7\u9009\u62E9\u65F6\u95F4\u8303\u56F4"
|
|
2265
|
-
};
|
|
2266
|
-
var EN_LABELS = {
|
|
2267
|
-
hour: "Hour",
|
|
2268
|
-
minute: "Min",
|
|
2269
|
-
second: "Sec",
|
|
2270
|
-
now: "Now",
|
|
2271
|
-
ok: "OK",
|
|
2272
|
-
start: "Start",
|
|
2273
|
-
end: "End",
|
|
2274
|
-
clear: "Clear time",
|
|
2275
|
-
toggle: "Toggle time picker",
|
|
2276
|
-
dialog: "Time picker",
|
|
2277
|
-
selectTime: "Select time",
|
|
2278
|
-
selectTimeRange: "Select time range"
|
|
2279
|
-
};
|
|
2280
|
-
function isZhLocale(locale) {
|
|
2281
|
-
return (locale ?? "").toLowerCase().startsWith("zh");
|
|
2282
|
-
}
|
|
2283
|
-
function getTimePickerLabels(locale, overrides) {
|
|
2284
|
-
const base = isZhLocale(locale) ? ZH_LABELS : EN_LABELS;
|
|
2285
|
-
return { ...base, ...overrides ?? {} };
|
|
2286
|
-
}
|
|
2287
|
-
function pluralizeEn(value, singular) {
|
|
2288
|
-
return value === 1 ? singular : `${singular}s`;
|
|
2289
|
-
}
|
|
2290
|
-
function getTimePickerOptionAriaLabel(value, unit, locale, labelOverrides) {
|
|
2291
|
-
const labels = getTimePickerLabels(locale, labelOverrides);
|
|
2292
|
-
if (isZhLocale(locale)) {
|
|
2293
|
-
const suffix = unit === "hour" ? labels.hour : unit === "minute" ? labels.minute : labels.second;
|
|
2294
|
-
return `${value}${suffix}`;
|
|
2295
|
-
}
|
|
2296
|
-
const lc = (locale ?? "").toLowerCase();
|
|
2297
|
-
const useEnglishPlural = lc.length === 0 ? labelOverrides == null : lc.startsWith("en");
|
|
2298
|
-
if (useEnglishPlural) {
|
|
2299
|
-
if (unit === "hour") return `${value} ${pluralizeEn(value, "hour")}`;
|
|
2300
|
-
if (unit === "minute") return `${value} ${pluralizeEn(value, "minute")}`;
|
|
2301
|
-
return `${value} ${pluralizeEn(value, "second")}`;
|
|
2302
|
-
}
|
|
2303
|
-
const unitLabel = unit === "hour" ? labels.hour : unit === "minute" ? labels.minute : labels.second;
|
|
2304
|
-
return `${value} ${unitLabel}`;
|
|
2606
|
+
return seconds;
|
|
2607
|
+
}
|
|
2608
|
+
function getCurrentTime(showSeconds = false) {
|
|
2609
|
+
const now = /* @__PURE__ */ new Date();
|
|
2610
|
+
return formatTime(now.getHours(), now.getMinutes(), now.getSeconds(), showSeconds);
|
|
2305
2611
|
}
|
|
2306
2612
|
|
|
2307
2613
|
// src/utils/upload-utils.ts
|
|
@@ -2551,84 +2857,208 @@ function getPictureCardClasses(status) {
|
|
|
2551
2857
|
return classNames(...baseClasses, ...stateClasses);
|
|
2552
2858
|
}
|
|
2553
2859
|
|
|
2554
|
-
// src/utils/
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2860
|
+
// src/utils/grid.ts
|
|
2861
|
+
var BREAKPOINT_ORDER = ["xs", "sm", "md", "lg", "xl", "2xl"];
|
|
2862
|
+
var ALIGN_MAP = {
|
|
2863
|
+
top: "items-start",
|
|
2864
|
+
middle: "items-center",
|
|
2865
|
+
bottom: "items-end",
|
|
2866
|
+
stretch: "items-stretch"
|
|
2867
|
+
};
|
|
2868
|
+
var JUSTIFY_MAP = {
|
|
2869
|
+
start: "justify-start",
|
|
2870
|
+
end: "justify-end",
|
|
2871
|
+
center: "justify-center",
|
|
2872
|
+
"space-around": "justify-around",
|
|
2873
|
+
"space-between": "justify-between",
|
|
2874
|
+
"space-evenly": "justify-evenly"
|
|
2875
|
+
};
|
|
2876
|
+
function validateGridValue(value, fieldName) {
|
|
2877
|
+
if (value < 0 || value > 24) {
|
|
2878
|
+
console.warn(`Invalid ${fieldName} value: ${value}. ${fieldName} should be between 0 and 24.`);
|
|
2879
|
+
return false;
|
|
2880
|
+
}
|
|
2881
|
+
return true;
|
|
2882
|
+
}
|
|
2883
|
+
function toPercentage(value) {
|
|
2884
|
+
return (value / 24 * 100).toFixed(6).replace(/\.?0+$/, "");
|
|
2885
|
+
}
|
|
2886
|
+
var colSpanClasses = "w-[var(--tiger-col-span)] sm:w-[var(--tiger-col-span-sm,var(--tiger-col-span))] md:w-[var(--tiger-col-span-md,var(--tiger-col-span))] lg:w-[var(--tiger-col-span-lg,var(--tiger-col-span))] xl:w-[var(--tiger-col-span-xl,var(--tiger-col-span))] 2xl:w-[var(--tiger-col-span-2xl,var(--tiger-col-span))]";
|
|
2887
|
+
var colOffsetClasses = "ml-[var(--tiger-col-offset)] sm:ml-[var(--tiger-col-offset-sm,var(--tiger-col-offset))] md:ml-[var(--tiger-col-offset-md,var(--tiger-col-offset))] lg:ml-[var(--tiger-col-offset-lg,var(--tiger-col-offset))] xl:ml-[var(--tiger-col-offset-xl,var(--tiger-col-offset))] 2xl:ml-[var(--tiger-col-offset-2xl,var(--tiger-col-offset))]";
|
|
2888
|
+
var colFlexClasses = "flex-[var(--tiger-col-flex)]";
|
|
2889
|
+
var colOrderClasses = "order-[var(--tiger-col-order)] sm:order-[var(--tiger-col-order-sm,var(--tiger-col-order))] md:order-[var(--tiger-col-order-md,var(--tiger-col-order))] lg:order-[var(--tiger-col-order-lg,var(--tiger-col-order))] xl:order-[var(--tiger-col-order-xl,var(--tiger-col-order))] 2xl:order-[var(--tiger-col-order-2xl,var(--tiger-col-order))]";
|
|
2890
|
+
function hasNonZeroOffset(offset2) {
|
|
2891
|
+
if (typeof offset2 === "number") return offset2 !== 0;
|
|
2892
|
+
return BREAKPOINT_ORDER.some((bp) => (offset2[bp] ?? 0) !== 0);
|
|
2893
|
+
}
|
|
2894
|
+
function setSpanVars(vars, span) {
|
|
2895
|
+
if (typeof span === "number") {
|
|
2896
|
+
if (validateGridValue(span, "span")) vars["--tiger-col-span"] = `${toPercentage(span)}%`;
|
|
2897
|
+
return;
|
|
2898
|
+
}
|
|
2899
|
+
vars["--tiger-col-span"] = "100%";
|
|
2900
|
+
BREAKPOINT_ORDER.forEach((bp) => {
|
|
2901
|
+
const value = span[bp];
|
|
2902
|
+
if (value === void 0) return;
|
|
2903
|
+
if (!validateGridValue(value, `span.${bp}`)) return;
|
|
2904
|
+
const percentage = `${toPercentage(value)}%`;
|
|
2905
|
+
if (bp === "xs") {
|
|
2906
|
+
vars["--tiger-col-span"] = percentage;
|
|
2907
|
+
return;
|
|
2908
|
+
}
|
|
2909
|
+
vars[`--tiger-col-span-${bp}`] = percentage;
|
|
2559
2910
|
});
|
|
2560
2911
|
}
|
|
2561
|
-
function
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
)
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2912
|
+
function setOffsetVars(vars, offset2) {
|
|
2913
|
+
if (typeof offset2 === "number") {
|
|
2914
|
+
if (offset2 === 0) return;
|
|
2915
|
+
if (validateGridValue(offset2, "offset")) vars["--tiger-col-offset"] = `${toPercentage(offset2)}%`;
|
|
2916
|
+
return;
|
|
2917
|
+
}
|
|
2918
|
+
vars["--tiger-col-offset"] = "0%";
|
|
2919
|
+
BREAKPOINT_ORDER.forEach((bp) => {
|
|
2920
|
+
const value = offset2[bp];
|
|
2921
|
+
if (value === void 0) return;
|
|
2922
|
+
if (value === 0) return;
|
|
2923
|
+
if (!validateGridValue(value, `offset.${bp}`)) return;
|
|
2924
|
+
const percentage = `${toPercentage(value)}%`;
|
|
2925
|
+
if (bp === "xs") {
|
|
2926
|
+
vars["--tiger-col-offset"] = percentage;
|
|
2927
|
+
return;
|
|
2928
|
+
}
|
|
2929
|
+
vars[`--tiger-col-offset-${bp}`] = percentage;
|
|
2930
|
+
});
|
|
2931
|
+
}
|
|
2932
|
+
function getColStyleVars(span, offset2) {
|
|
2933
|
+
const vars = {};
|
|
2934
|
+
if (span !== void 0 && span !== null) setSpanVars(vars, span);
|
|
2935
|
+
if (offset2 !== void 0 && offset2 !== null) setOffsetVars(vars, offset2);
|
|
2936
|
+
return vars;
|
|
2937
|
+
}
|
|
2938
|
+
function setOrderVars(vars, order) {
|
|
2939
|
+
if (typeof order === "number") {
|
|
2940
|
+
vars["--tiger-col-order"] = String(order);
|
|
2941
|
+
return;
|
|
2942
|
+
}
|
|
2943
|
+
vars["--tiger-col-order"] = "0";
|
|
2944
|
+
BREAKPOINT_ORDER.forEach((bp) => {
|
|
2945
|
+
const value = order[bp];
|
|
2946
|
+
if (value === void 0) return;
|
|
2947
|
+
if (bp === "xs") {
|
|
2948
|
+
vars["--tiger-col-order"] = String(value);
|
|
2949
|
+
return;
|
|
2950
|
+
}
|
|
2951
|
+
vars[`--tiger-col-order-${bp}`] = String(value);
|
|
2952
|
+
});
|
|
2953
|
+
}
|
|
2954
|
+
function getColOrderStyleVars(order) {
|
|
2955
|
+
if (order === void 0 || order === null) return {};
|
|
2956
|
+
const vars = {};
|
|
2957
|
+
setOrderVars(vars, order);
|
|
2958
|
+
return vars;
|
|
2959
|
+
}
|
|
2960
|
+
function getAlignClasses(align) {
|
|
2961
|
+
return ALIGN_MAP[align] || "items-start";
|
|
2962
|
+
}
|
|
2963
|
+
function getJustifyClasses(justify) {
|
|
2964
|
+
return JUSTIFY_MAP[justify] || "justify-start";
|
|
2965
|
+
}
|
|
2966
|
+
function getGutterStyles(gutter) {
|
|
2967
|
+
if (gutter === void 0 || gutter === null || gutter === 0) return {};
|
|
2968
|
+
const [horizontal, vertical] = Array.isArray(gutter) ? gutter : [gutter, gutter];
|
|
2969
|
+
const rowStyle = {};
|
|
2970
|
+
const colStyle = {};
|
|
2971
|
+
if (horizontal > 0) {
|
|
2972
|
+
rowStyle.marginLeft = `-${horizontal / 2}px`;
|
|
2973
|
+
rowStyle.marginRight = `-${horizontal / 2}px`;
|
|
2974
|
+
colStyle.paddingLeft = `${horizontal / 2}px`;
|
|
2975
|
+
colStyle.paddingRight = `${horizontal / 2}px`;
|
|
2976
|
+
}
|
|
2977
|
+
if (vertical > 0) {
|
|
2978
|
+
rowStyle.marginTop = `-${vertical / 2}px`;
|
|
2979
|
+
rowStyle.marginBottom = `-${vertical / 2}px`;
|
|
2980
|
+
colStyle.paddingTop = `${vertical / 2}px`;
|
|
2981
|
+
colStyle.paddingBottom = `${vertical / 2}px`;
|
|
2982
|
+
}
|
|
2983
|
+
return { rowStyle, colStyle };
|
|
2984
|
+
}
|
|
2985
|
+
function getSpanClasses(span) {
|
|
2986
|
+
if (span === void 0 || span === null) return "w-full";
|
|
2987
|
+
return colSpanClasses;
|
|
2988
|
+
}
|
|
2989
|
+
function getOffsetClasses(offset2) {
|
|
2990
|
+
if (offset2 === void 0 || offset2 === null) return "";
|
|
2991
|
+
if (!hasNonZeroOffset(offset2)) return "";
|
|
2992
|
+
return colOffsetClasses;
|
|
2993
|
+
}
|
|
2994
|
+
function getOrderClasses(order) {
|
|
2995
|
+
if (order === void 0) return "";
|
|
2996
|
+
return colOrderClasses;
|
|
2997
|
+
}
|
|
2998
|
+
function getFlexClasses(flex) {
|
|
2999
|
+
if (flex === void 0) return "";
|
|
3000
|
+
return colFlexClasses;
|
|
3001
|
+
}
|
|
3002
|
+
|
|
3003
|
+
// src/utils/divider.ts
|
|
3004
|
+
var SPACING_MAP = {
|
|
3005
|
+
none: { horizontal: "", vertical: "" },
|
|
3006
|
+
xs: { horizontal: "my-1", vertical: "mx-1" },
|
|
3007
|
+
sm: { horizontal: "my-2", vertical: "mx-2" },
|
|
3008
|
+
md: { horizontal: "my-4", vertical: "mx-4" },
|
|
3009
|
+
lg: { horizontal: "my-6", vertical: "mx-6" },
|
|
3010
|
+
xl: { horizontal: "my-8", vertical: "mx-8" }
|
|
3011
|
+
};
|
|
3012
|
+
var LINE_STYLE_MAP = {
|
|
3013
|
+
solid: "border-solid",
|
|
3014
|
+
dashed: "border-dashed",
|
|
3015
|
+
dotted: "border-dotted"
|
|
3016
|
+
};
|
|
3017
|
+
var DEFAULT_BORDER_COLOR_CLASS = "border-[var(--tiger-border,#e5e7eb)]";
|
|
3018
|
+
function getDividerSpacingClasses(spacing, orientation) {
|
|
3019
|
+
return SPACING_MAP[spacing][orientation];
|
|
3020
|
+
}
|
|
3021
|
+
function getDividerLineStyleClasses(lineStyle) {
|
|
3022
|
+
return LINE_STYLE_MAP[lineStyle];
|
|
3023
|
+
}
|
|
3024
|
+
function getDividerOrientationClasses(orientation) {
|
|
3025
|
+
return orientation === "horizontal" ? `w-full border-t ${DEFAULT_BORDER_COLOR_CLASS}` : `h-full border-l ${DEFAULT_BORDER_COLOR_CLASS}`;
|
|
2629
3026
|
}
|
|
2630
3027
|
|
|
3028
|
+
// src/utils/layout-utils.ts
|
|
3029
|
+
var layoutRootClasses = "tiger-layout flex flex-col min-h-screen";
|
|
3030
|
+
var layoutHeaderClasses = "tiger-header bg-[var(--tiger-surface,#ffffff)] border-b border-[var(--tiger-border,#e5e7eb)]";
|
|
3031
|
+
var layoutSidebarClasses = "tiger-sidebar bg-[var(--tiger-surface,#ffffff)] border-r border-[var(--tiger-border,#e5e7eb)] transition-all duration-300";
|
|
3032
|
+
var layoutContentClasses = "tiger-content flex-1 bg-[var(--tiger-layout-content-bg,#f9fafb)] p-6";
|
|
3033
|
+
var layoutFooterClasses = "tiger-footer bg-[var(--tiger-surface,#ffffff)] border-t border-[var(--tiger-border,#e5e7eb)] p-4";
|
|
3034
|
+
|
|
3035
|
+
// src/utils/container-utils.ts
|
|
3036
|
+
var containerBaseClasses = "w-full";
|
|
3037
|
+
var containerCenteredClasses = "mx-auto";
|
|
3038
|
+
var containerPaddingClasses = "px-4 sm:px-6 lg:px-8";
|
|
3039
|
+
var containerMaxWidthClasses = {
|
|
3040
|
+
sm: "max-w-screen-sm",
|
|
3041
|
+
md: "max-w-screen-md",
|
|
3042
|
+
lg: "max-w-screen-lg",
|
|
3043
|
+
xl: "max-w-screen-xl",
|
|
3044
|
+
"2xl": "max-w-screen-2xl",
|
|
3045
|
+
full: "w-full"
|
|
3046
|
+
};
|
|
3047
|
+
var getContainerClasses = ({
|
|
3048
|
+
maxWidth = false,
|
|
3049
|
+
center = true,
|
|
3050
|
+
padding = true,
|
|
3051
|
+
className
|
|
3052
|
+
} = {}) => classNames(
|
|
3053
|
+
containerBaseClasses,
|
|
3054
|
+
maxWidth !== false && containerMaxWidthClasses[maxWidth],
|
|
3055
|
+
center && containerCenteredClasses,
|
|
3056
|
+
padding && containerPaddingClasses,
|
|
3057
|
+
className
|
|
3058
|
+
);
|
|
3059
|
+
|
|
2631
3060
|
// src/utils/space.ts
|
|
3061
|
+
var SPACE_BASE_CLASS = "inline-flex";
|
|
2632
3062
|
function getSpaceGapSize(size = "md") {
|
|
2633
3063
|
if (typeof size === "number") {
|
|
2634
3064
|
return { style: `${size}px` };
|
|
@@ -2925,19 +3355,6 @@ function getCardClasses(variant, hoverable) {
|
|
|
2925
3355
|
return classes.join(" ");
|
|
2926
3356
|
}
|
|
2927
3357
|
|
|
2928
|
-
// src/utils/link-utils.ts
|
|
2929
|
-
var linkBaseClasses = "inline-flex items-center transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 cursor-pointer no-underline";
|
|
2930
|
-
var linkSizeClasses = {
|
|
2931
|
-
sm: "text-sm",
|
|
2932
|
-
md: "text-base",
|
|
2933
|
-
lg: "text-lg"
|
|
2934
|
-
};
|
|
2935
|
-
var linkDisabledClasses = "cursor-not-allowed opacity-60 pointer-events-none";
|
|
2936
|
-
function getSecureRel(target, rel) {
|
|
2937
|
-
if (target === "_blank" && !rel) return "noopener noreferrer";
|
|
2938
|
-
return rel;
|
|
2939
|
-
}
|
|
2940
|
-
|
|
2941
3358
|
// src/utils/avatar-utils.ts
|
|
2942
3359
|
var avatarBaseClasses = "inline-flex items-center justify-center overflow-hidden shrink-0 select-none";
|
|
2943
3360
|
var avatarSizeClasses = {
|
|
@@ -2960,7 +3377,7 @@ function getInitials(name) {
|
|
|
2960
3377
|
if (words.length === 0) return "";
|
|
2961
3378
|
if (words.length === 1) {
|
|
2962
3379
|
const firstWord = words[0];
|
|
2963
|
-
const hasNonASCII = /[^\
|
|
3380
|
+
const hasNonASCII = /[^\x20-\x7E]/.test(firstWord);
|
|
2964
3381
|
return hasNonASCII ? firstWord.slice(0, 2).toUpperCase() : firstWord.charAt(0).toUpperCase();
|
|
2965
3382
|
}
|
|
2966
3383
|
return (words[0].charAt(0) + words[1].charAt(0)).toUpperCase();
|
|
@@ -2990,16 +3407,6 @@ function generateAvatarColor(str) {
|
|
|
2990
3407
|
return colors[index];
|
|
2991
3408
|
}
|
|
2992
3409
|
|
|
2993
|
-
// src/utils/icon-utils.ts
|
|
2994
|
-
var iconWrapperClasses = "inline-flex align-middle";
|
|
2995
|
-
var iconSvgBaseClasses = "inline-block";
|
|
2996
|
-
var iconSizeClasses = {
|
|
2997
|
-
sm: "w-4 h-4",
|
|
2998
|
-
md: "w-5 h-5",
|
|
2999
|
-
lg: "w-6 h-6",
|
|
3000
|
-
xl: "w-8 h-8"
|
|
3001
|
-
};
|
|
3002
|
-
|
|
3003
3410
|
// src/utils/list-utils.ts
|
|
3004
3411
|
var listBaseClasses = "bg-[var(--tiger-surface,#ffffff)] rounded-lg overflow-hidden";
|
|
3005
3412
|
var listWrapperClasses = "w-full";
|
|
@@ -3672,11 +4079,11 @@ function clampPercentage(percentage) {
|
|
|
3672
4079
|
}
|
|
3673
4080
|
function calculateCirclePath(radius, strokeWidth, percentage) {
|
|
3674
4081
|
const circumference = 2 * Math.PI * radius;
|
|
3675
|
-
const
|
|
4082
|
+
const offset2 = circumference - percentage / 100 * circumference;
|
|
3676
4083
|
return {
|
|
3677
4084
|
circumference,
|
|
3678
4085
|
strokeDasharray: `${circumference}`,
|
|
3679
|
-
strokeDashoffset:
|
|
4086
|
+
strokeDashoffset: offset2
|
|
3680
4087
|
};
|
|
3681
4088
|
}
|
|
3682
4089
|
function getCircleSize(size, strokeWidth) {
|
|
@@ -3700,14 +4107,14 @@ var menuModeClasses = {
|
|
|
3700
4107
|
};
|
|
3701
4108
|
var menuLightThemeClasses = "[--tiger-surface:#ffffff] [--tiger-text:#111827] [--tiger-text-muted:#6b7280] [--tiger-border:#e5e7eb] [--tiger-surface-muted:#f9fafb]";
|
|
3702
4109
|
var menuDarkThemeClasses = "[--tiger-surface:#111827] [--tiger-text:#f9fafb] [--tiger-text-muted:#9ca3af] [--tiger-border:#374151] [--tiger-surface-muted:#1f2937] [--tiger-outline-bg-hover:#2563eb1a] [--tiger-ghost-bg-hover:#2563eb1a]";
|
|
3703
|
-
var menuItemBaseClasses = "flex w-full items-center px-4 py-2 text-left bg-transparent border-0 cursor-pointer transition-colors duration-200 select-none appearance-none";
|
|
4110
|
+
var menuItemBaseClasses = "flex w-full items-center px-4 py-2 text-left bg-transparent border-0 cursor-pointer transition-colors duration-200 select-none appearance-none focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--tiger-focus-ring,var(--tiger-primary,#2563eb))] focus-visible:ring-inset active:opacity-90";
|
|
3704
4111
|
var menuItemHoverLightClasses = "hover:bg-[var(--tiger-surface-muted,#f9fafb)]";
|
|
3705
4112
|
var menuItemHoverDarkClasses = "hover:bg-[var(--tiger-surface-muted,#1f2937)]";
|
|
3706
4113
|
var menuItemSelectedLightClasses = "bg-[var(--tiger-outline-bg-hover,#eff6ff)] text-[var(--tiger-primary,#2563eb)] font-medium";
|
|
3707
4114
|
var menuItemSelectedDarkClasses = "bg-[var(--tiger-outline-bg-hover,#2563eb1a)] text-[var(--tiger-primary,#60a5fa)] font-medium";
|
|
3708
4115
|
var menuItemDisabledClasses = "opacity-50 cursor-not-allowed pointer-events-none";
|
|
3709
4116
|
var menuItemIconClasses = "mr-2 flex-shrink-0";
|
|
3710
|
-
var submenuTitleClasses = "flex w-full items-center justify-between px-4 py-2 text-left bg-transparent border-0 cursor-pointer transition-colors duration-200 select-none appearance-none";
|
|
4117
|
+
var submenuTitleClasses = "flex w-full items-center justify-between px-4 py-2 text-left bg-transparent border-0 cursor-pointer transition-colors duration-200 select-none appearance-none focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--tiger-focus-ring,var(--tiger-primary,#2563eb))] focus-visible:ring-inset active:opacity-90";
|
|
3711
4118
|
var submenuExpandIconClasses = "ml-2 transition-transform duration-200";
|
|
3712
4119
|
var submenuExpandIconExpandedClasses = "transform rotate-180";
|
|
3713
4120
|
var submenuContentHorizontalClasses = "absolute left-0 top-full mt-0 min-w-[160px] bg-[var(--tiger-surface,#ffffff)] text-[var(--tiger-text,#111827)] border border-[var(--tiger-border,#e5e7eb)] rounded shadow-lg z-50";
|
|
@@ -3803,7 +4210,7 @@ var tabNavListPositionClasses = {
|
|
|
3803
4210
|
right: "flex-col"
|
|
3804
4211
|
};
|
|
3805
4212
|
var tabNavListCenteredClasses = "justify-center";
|
|
3806
|
-
var tabItemBaseClasses = "relative px-4 py-2 cursor-pointer transition-all duration-200 select-none flex items-center gap-2";
|
|
4213
|
+
var tabItemBaseClasses = "relative px-4 py-2 cursor-pointer transition-all duration-200 select-none flex items-center gap-2 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--tiger-focus-ring,var(--tiger-primary,#2563eb))] focus-visible:ring-offset-2 active:opacity-90";
|
|
3807
4214
|
var tabItemSizeClasses = {
|
|
3808
4215
|
small: "text-sm px-3 py-1.5",
|
|
3809
4216
|
medium: "text-base px-4 py-2",
|
|
@@ -4151,6 +4558,43 @@ function getTotalTextClasses(size = "medium") {
|
|
|
4151
4558
|
};
|
|
4152
4559
|
return classNames("text-[var(--tiger-text-muted,#6b7280)]", "mr-2", sizeClasses[size]);
|
|
4153
4560
|
}
|
|
4561
|
+
function getSimplePaginationContainerClasses() {
|
|
4562
|
+
return classNames(
|
|
4563
|
+
"flex items-center justify-between",
|
|
4564
|
+
"px-4 py-3",
|
|
4565
|
+
"border-t border-[var(--tiger-border,#e5e7eb)]"
|
|
4566
|
+
);
|
|
4567
|
+
}
|
|
4568
|
+
function getSimplePaginationTotalClasses() {
|
|
4569
|
+
return "text-sm text-[var(--tiger-text,#111827)]";
|
|
4570
|
+
}
|
|
4571
|
+
function getSimplePaginationControlsClasses() {
|
|
4572
|
+
return "flex items-center gap-2";
|
|
4573
|
+
}
|
|
4574
|
+
function getSimplePaginationSelectClasses() {
|
|
4575
|
+
return classNames(
|
|
4576
|
+
"px-3 py-1",
|
|
4577
|
+
"border border-[var(--tiger-border,#e5e7eb)] rounded",
|
|
4578
|
+
"text-sm",
|
|
4579
|
+
"bg-[var(--tiger-surface,#ffffff)]",
|
|
4580
|
+
"text-[var(--tiger-text,#111827)]"
|
|
4581
|
+
);
|
|
4582
|
+
}
|
|
4583
|
+
function getSimplePaginationButtonClasses(disabled) {
|
|
4584
|
+
return classNames(
|
|
4585
|
+
"px-3 py-1",
|
|
4586
|
+
"border border-[var(--tiger-border,#e5e7eb)] rounded",
|
|
4587
|
+
"text-sm",
|
|
4588
|
+
"bg-[var(--tiger-surface,#ffffff)]",
|
|
4589
|
+
disabled ? "text-[var(--tiger-text-muted,#6b7280)] cursor-not-allowed" : "hover:bg-[var(--tiger-surface-muted,#f9fafb)] text-[var(--tiger-text,#111827)]"
|
|
4590
|
+
);
|
|
4591
|
+
}
|
|
4592
|
+
function getSimplePaginationPageIndicatorClasses() {
|
|
4593
|
+
return "px-3 py-1 text-sm text-[var(--tiger-text,#111827)]";
|
|
4594
|
+
}
|
|
4595
|
+
function getSimplePaginationButtonsWrapperClasses() {
|
|
4596
|
+
return "flex gap-1";
|
|
4597
|
+
}
|
|
4154
4598
|
|
|
4155
4599
|
// src/utils/dropdown-utils.ts
|
|
4156
4600
|
function getDropdownContainerClasses() {
|
|
@@ -4728,18 +5172,6 @@ function injectLoadingAnimationStyles() {
|
|
|
4728
5172
|
}
|
|
4729
5173
|
}
|
|
4730
5174
|
|
|
4731
|
-
// src/utils/svg-attrs.ts
|
|
4732
|
-
function normalizeSvgAttrs(svgAttrs) {
|
|
4733
|
-
if ("className" in svgAttrs && !("class" in svgAttrs)) {
|
|
4734
|
-
const { className, ...rest } = svgAttrs;
|
|
4735
|
-
return {
|
|
4736
|
-
...rest,
|
|
4737
|
-
class: className
|
|
4738
|
-
};
|
|
4739
|
-
}
|
|
4740
|
-
return svgAttrs;
|
|
4741
|
-
}
|
|
4742
|
-
|
|
4743
5175
|
// src/utils/popconfirm-utils.ts
|
|
4744
5176
|
function getPopconfirmContainerClasses() {
|
|
4745
5177
|
return classNames("tiger-popconfirm", "relative", "inline-block", "w-fit", "justify-self-start");
|
|
@@ -4969,67 +5401,27 @@ function getTooltipContentClasses() {
|
|
|
4969
5401
|
);
|
|
4970
5402
|
}
|
|
4971
5403
|
|
|
4972
|
-
// src/utils/
|
|
4973
|
-
var
|
|
4974
|
-
var
|
|
4975
|
-
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
var radioDisabledCursorClasses = "cursor-not-allowed";
|
|
4979
|
-
var radioHoverBorderClasses = "hover:border-[var(--tiger-primary,#2563eb)]";
|
|
4980
|
-
var radioSizeClasses = {
|
|
4981
|
-
sm: {
|
|
4982
|
-
radio: "w-4 h-4",
|
|
4983
|
-
dot: "w-1.5 h-1.5",
|
|
4984
|
-
label: "text-sm"
|
|
4985
|
-
},
|
|
4986
|
-
md: {
|
|
4987
|
-
radio: "w-5 h-5",
|
|
4988
|
-
dot: "w-2 h-2",
|
|
4989
|
-
label: "text-base"
|
|
4990
|
-
},
|
|
4991
|
-
lg: {
|
|
4992
|
-
radio: "w-6 h-6",
|
|
4993
|
-
dot: "w-2.5 h-2.5",
|
|
4994
|
-
label: "text-lg"
|
|
4995
|
-
}
|
|
5404
|
+
// src/utils/link-utils.ts
|
|
5405
|
+
var linkBaseClasses = "inline-flex items-center transition-all duration-150 focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-[var(--tiger-focus-ring,var(--tiger-primary,#2563eb))] cursor-pointer no-underline active:opacity-80";
|
|
5406
|
+
var linkSizeClasses = {
|
|
5407
|
+
sm: "text-sm",
|
|
5408
|
+
md: "text-base",
|
|
5409
|
+
lg: "text-lg"
|
|
4996
5410
|
};
|
|
4997
|
-
var
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
|
|
5002
|
-
}) => classNames(
|
|
5003
|
-
radioVisualBaseClasses,
|
|
5004
|
-
radioFocusVisibleClasses,
|
|
5005
|
-
radioSizeClasses[size].radio,
|
|
5006
|
-
checked ? colors.borderChecked : colors.border,
|
|
5007
|
-
checked ? colors.bgChecked : colors.bg,
|
|
5008
|
-
disabled && colors.disabled,
|
|
5009
|
-
disabled && radioDisabledCursorClasses,
|
|
5010
|
-
!disabled && radioHoverBorderClasses
|
|
5011
|
-
);
|
|
5012
|
-
var getRadioDotClasses = ({ size, checked, colors }) => classNames(
|
|
5013
|
-
radioDotBaseClasses,
|
|
5014
|
-
radioSizeClasses[size].dot,
|
|
5015
|
-
colors.innerDot,
|
|
5016
|
-
checked ? "scale-100" : "scale-0"
|
|
5017
|
-
);
|
|
5018
|
-
var getRadioLabelClasses = ({ size, disabled, colors }) => classNames(
|
|
5019
|
-
radioLabelBaseClasses,
|
|
5020
|
-
radioSizeClasses[size].label,
|
|
5021
|
-
disabled ? colors.textDisabled : "text-[var(--tiger-text,#111827)]",
|
|
5022
|
-
disabled && radioDisabledCursorClasses
|
|
5023
|
-
);
|
|
5411
|
+
var linkDisabledClasses = "cursor-not-allowed opacity-60 pointer-events-none";
|
|
5412
|
+
function getSecureRel(target, rel) {
|
|
5413
|
+
if (target === "_blank" && !rel) return "noopener noreferrer";
|
|
5414
|
+
return rel;
|
|
5415
|
+
}
|
|
5024
5416
|
|
|
5025
|
-
// src/utils/
|
|
5026
|
-
var
|
|
5027
|
-
var
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5417
|
+
// src/utils/icon-utils.ts
|
|
5418
|
+
var iconWrapperClasses = "inline-flex align-middle";
|
|
5419
|
+
var iconSvgBaseClasses = "inline-block";
|
|
5420
|
+
var iconSizeClasses = {
|
|
5421
|
+
sm: "w-4 h-4",
|
|
5422
|
+
md: "w-5 h-5",
|
|
5423
|
+
lg: "w-6 h-6",
|
|
5424
|
+
xl: "w-8 h-8"
|
|
5033
5425
|
};
|
|
5034
5426
|
|
|
5035
5427
|
// src/utils/code-utils.ts
|
|
@@ -5038,34 +5430,615 @@ var codeBlockPreClasses = "m-0 overflow-auto p-4 text-sm leading-relaxed font-mo
|
|
|
5038
5430
|
var codeBlockCopyButtonBaseClasses = "absolute right-3 top-0 -translate-y-1/2 inline-flex items-center rounded-md border border-gray-200 bg-white/90 px-1.5 py-0.5 text-[10px] text-gray-600 shadow-sm transition-colors hover:bg-white hover:text-gray-900 dark:border-gray-700 dark:bg-gray-900/90 dark:text-gray-200 dark:hover:bg-gray-800";
|
|
5039
5431
|
var codeBlockCopyButtonCopiedClasses = "border-[var(--tiger-primary,#2563eb)] text-[var(--tiger-primary,#2563eb)]";
|
|
5040
5432
|
|
|
5041
|
-
// src/utils/
|
|
5042
|
-
var
|
|
5043
|
-
|
|
5044
|
-
|
|
5045
|
-
|
|
5046
|
-
|
|
5047
|
-
|
|
5048
|
-
|
|
5433
|
+
// src/utils/chart-utils.ts
|
|
5434
|
+
var chartCanvasBaseClasses = "block";
|
|
5435
|
+
var chartAxisLineClasses = "stroke-[color:var(--tiger-border,#e5e7eb)]";
|
|
5436
|
+
var chartAxisTickLineClasses = "stroke-[color:var(--tiger-border,#e5e7eb)]";
|
|
5437
|
+
var chartAxisTickTextClasses = "fill-[color:var(--tiger-text-secondary,#6b7280)] text-xs";
|
|
5438
|
+
var chartAxisLabelClasses = "fill-[color:var(--tiger-text,#374151)] text-xs font-medium";
|
|
5439
|
+
var chartGridLineClasses = "stroke-[color:var(--tiger-border,#e5e7eb)]";
|
|
5440
|
+
var DEFAULT_CHART_COLORS = [
|
|
5441
|
+
"var(--tiger-chart-1,#2563eb)",
|
|
5442
|
+
"var(--tiger-chart-2,#22c55e)",
|
|
5443
|
+
"var(--tiger-chart-3,#f97316)",
|
|
5444
|
+
"var(--tiger-chart-4,#a855f7)",
|
|
5445
|
+
"var(--tiger-chart-5,#0ea5e9)",
|
|
5446
|
+
"var(--tiger-chart-6,#ef4444)"
|
|
5447
|
+
];
|
|
5448
|
+
var clampNumber = (value, min, max) => Math.min(max, Math.max(min, value));
|
|
5449
|
+
function normalizeChartPadding(padding) {
|
|
5450
|
+
if (typeof padding === "number") {
|
|
5451
|
+
return {
|
|
5452
|
+
top: padding,
|
|
5453
|
+
right: padding,
|
|
5454
|
+
bottom: padding,
|
|
5455
|
+
left: padding
|
|
5456
|
+
};
|
|
5457
|
+
}
|
|
5458
|
+
return {
|
|
5459
|
+
top: padding?.top ?? 0,
|
|
5460
|
+
right: padding?.right ?? 0,
|
|
5461
|
+
bottom: padding?.bottom ?? 0,
|
|
5462
|
+
left: padding?.left ?? 0
|
|
5463
|
+
};
|
|
5464
|
+
}
|
|
5465
|
+
function getChartInnerRect(width, height, padding) {
|
|
5466
|
+
const resolvedPadding = normalizeChartPadding(padding);
|
|
5467
|
+
const innerWidth = Math.max(0, width - resolvedPadding.left - resolvedPadding.right);
|
|
5468
|
+
const innerHeight = Math.max(0, height - resolvedPadding.top - resolvedPadding.bottom);
|
|
5469
|
+
return {
|
|
5470
|
+
x: resolvedPadding.left,
|
|
5471
|
+
y: resolvedPadding.top,
|
|
5472
|
+
width: innerWidth,
|
|
5473
|
+
height: innerHeight
|
|
5474
|
+
};
|
|
5475
|
+
}
|
|
5476
|
+
function createLinearScale(domain, range) {
|
|
5477
|
+
const [d0, d1] = domain;
|
|
5478
|
+
const [r0, r1] = range;
|
|
5479
|
+
const span = d1 - d0;
|
|
5480
|
+
return {
|
|
5481
|
+
type: "linear",
|
|
5482
|
+
domain: [d0, d1],
|
|
5483
|
+
range: [r0, r1],
|
|
5484
|
+
map: (value) => {
|
|
5485
|
+
const numeric = typeof value === "number" ? value : Number(value);
|
|
5486
|
+
if (span === 0) return (r0 + r1) / 2;
|
|
5487
|
+
return r0 + (numeric - d0) / span * (r1 - r0);
|
|
5488
|
+
}
|
|
5489
|
+
};
|
|
5490
|
+
}
|
|
5491
|
+
function createPointScale(domain, range, options = {}) {
|
|
5492
|
+
const padding = clampNumber(options.padding ?? 0.5, 0, 1);
|
|
5493
|
+
const [rangeStart, rangeEnd] = range;
|
|
5494
|
+
const span = rangeEnd - rangeStart;
|
|
5495
|
+
const length = Math.abs(span);
|
|
5496
|
+
const direction = span >= 0 ? 1 : -1;
|
|
5497
|
+
const n = domain.length;
|
|
5498
|
+
const step = n > 1 ? length / Math.max(1, n - 1 + padding * 2) : 0;
|
|
5499
|
+
const offset2 = n <= 1 ? length / 2 : step * padding;
|
|
5500
|
+
const indexMap = new Map(domain.map((value, index) => [value, index]));
|
|
5501
|
+
return {
|
|
5502
|
+
type: "point",
|
|
5503
|
+
domain,
|
|
5504
|
+
range: [rangeStart, rangeEnd],
|
|
5505
|
+
step,
|
|
5506
|
+
map: (value) => {
|
|
5507
|
+
const key = String(value);
|
|
5508
|
+
const index = indexMap.get(key) ?? 0;
|
|
5509
|
+
return rangeStart + direction * (offset2 + step * index);
|
|
5510
|
+
}
|
|
5511
|
+
};
|
|
5512
|
+
}
|
|
5513
|
+
function createBandScale(domain, range, options = {}) {
|
|
5514
|
+
const paddingInner = clampNumber(options.paddingInner ?? 0.1, 0, 1);
|
|
5515
|
+
const paddingOuter = clampNumber(options.paddingOuter ?? 0.1, 0, 1);
|
|
5516
|
+
const align = clampNumber(options.align ?? 0.5, 0, 1);
|
|
5517
|
+
const [rangeStart, rangeEnd] = range;
|
|
5518
|
+
const span = rangeEnd - rangeStart;
|
|
5519
|
+
const length = Math.abs(span);
|
|
5520
|
+
const direction = span >= 0 ? 1 : -1;
|
|
5521
|
+
const n = domain.length;
|
|
5522
|
+
const step = n > 0 ? length / Math.max(1, n - paddingInner + paddingOuter * 2) : 0;
|
|
5523
|
+
const bandwidth = step * (1 - paddingInner);
|
|
5524
|
+
const offset2 = (length - step * (n - paddingInner)) * align;
|
|
5525
|
+
const indexMap = new Map(domain.map((value, index) => [value, index]));
|
|
5526
|
+
return {
|
|
5527
|
+
type: "band",
|
|
5528
|
+
domain,
|
|
5529
|
+
range: [rangeStart, rangeEnd],
|
|
5530
|
+
step,
|
|
5531
|
+
bandwidth,
|
|
5532
|
+
map: (value) => {
|
|
5533
|
+
const key = String(value);
|
|
5534
|
+
const index = indexMap.get(key) ?? 0;
|
|
5535
|
+
return rangeStart + direction * (offset2 + step * index);
|
|
5049
5536
|
}
|
|
5537
|
+
};
|
|
5538
|
+
}
|
|
5539
|
+
function getChartAxisTicks(scale, options = {}) {
|
|
5540
|
+
const { tickCount = 5, tickValues, tickFormat } = options;
|
|
5541
|
+
const format = tickFormat ?? ((value) => `${value}`);
|
|
5542
|
+
const resolvedTickValues = tickValues ?? (scale.type === "linear" ? getLinearTicks(scale.domain, tickCount) : scale.domain);
|
|
5543
|
+
return resolvedTickValues.map((value) => {
|
|
5544
|
+
const basePosition = scale.map(value);
|
|
5545
|
+
const position = scale.type === "band" && typeof scale.bandwidth === "number" ? basePosition + scale.bandwidth / 2 : basePosition;
|
|
5546
|
+
return {
|
|
5547
|
+
value,
|
|
5548
|
+
position,
|
|
5549
|
+
label: format(value)
|
|
5550
|
+
};
|
|
5551
|
+
});
|
|
5552
|
+
}
|
|
5553
|
+
function getLinearTicks(domain, count) {
|
|
5554
|
+
const min = Math.min(domain[0], domain[1]);
|
|
5555
|
+
const max = Math.max(domain[0], domain[1]);
|
|
5556
|
+
if (min === max || !Number.isFinite(min) || !Number.isFinite(max)) {
|
|
5557
|
+
return [min];
|
|
5558
|
+
}
|
|
5559
|
+
const step = getNiceStep((max - min) / Math.max(1, count));
|
|
5560
|
+
const start = Math.ceil(min / step) * step;
|
|
5561
|
+
const end = Math.floor(max / step) * step;
|
|
5562
|
+
const ticks = [];
|
|
5563
|
+
for (let value = start; value <= end + step / 2; value += step) {
|
|
5564
|
+
ticks.push(roundTick(value, step));
|
|
5565
|
+
}
|
|
5566
|
+
return ticks;
|
|
5567
|
+
}
|
|
5568
|
+
function getNiceStep(step) {
|
|
5569
|
+
if (!Number.isFinite(step) || step <= 0) return 1;
|
|
5570
|
+
const exponent = Math.floor(Math.log10(step));
|
|
5571
|
+
const fraction = step / Math.pow(10, exponent);
|
|
5572
|
+
const niceFraction = fraction >= 5 ? 5 : fraction >= 2 ? 2 : fraction >= 1 ? 1 : 0.5;
|
|
5573
|
+
return niceFraction * Math.pow(10, exponent);
|
|
5574
|
+
}
|
|
5575
|
+
function roundTick(value, step) {
|
|
5576
|
+
const precision = Math.max(0, -Math.floor(Math.log10(step)) + 1);
|
|
5577
|
+
return Number(value.toFixed(precision));
|
|
5578
|
+
}
|
|
5579
|
+
function getChartGridLineDasharray(lineStyle) {
|
|
5580
|
+
if (lineStyle === "dashed") return "4 4";
|
|
5581
|
+
if (lineStyle === "dotted") return "1 4";
|
|
5582
|
+
return void 0;
|
|
5583
|
+
}
|
|
5584
|
+
function getNumberExtent(values, options = {}) {
|
|
5585
|
+
const fallback = options.fallback ?? [0, 1];
|
|
5586
|
+
if (values.length === 0) return fallback;
|
|
5587
|
+
let min = Math.min(...values);
|
|
5588
|
+
let max = Math.max(...values);
|
|
5589
|
+
if (options.includeZero) {
|
|
5590
|
+
min = Math.min(min, 0);
|
|
5591
|
+
max = Math.max(max, 0);
|
|
5592
|
+
}
|
|
5593
|
+
if (min === max) {
|
|
5594
|
+
const pad = Math.abs(min) * 0.1 || 1;
|
|
5595
|
+
return [min - pad, max + pad];
|
|
5596
|
+
}
|
|
5597
|
+
const padding = options.padding ?? 0;
|
|
5598
|
+
if (padding > 0) {
|
|
5599
|
+
const span = max - min;
|
|
5600
|
+
min -= span * padding;
|
|
5601
|
+
max += span * padding;
|
|
5602
|
+
}
|
|
5603
|
+
return [min, max];
|
|
5604
|
+
}
|
|
5605
|
+
function getPieArcs(data, options = {}) {
|
|
5606
|
+
const startAngle = options.startAngle ?? 0;
|
|
5607
|
+
const endAngle = options.endAngle ?? Math.PI * 2;
|
|
5608
|
+
const padAngle = Math.max(0, options.padAngle ?? 0);
|
|
5609
|
+
const values = data.map((item) => Math.max(0, item.value));
|
|
5610
|
+
const total = values.reduce((sum, value) => sum + value, 0);
|
|
5611
|
+
if (total <= 0) return [];
|
|
5612
|
+
const totalAngle = endAngle - startAngle;
|
|
5613
|
+
const totalPadding = padAngle * data.length;
|
|
5614
|
+
const availableAngle = Math.max(0, totalAngle - totalPadding);
|
|
5615
|
+
let current = startAngle;
|
|
5616
|
+
return data.map((item, index) => {
|
|
5617
|
+
const value = values[index];
|
|
5618
|
+
const sliceAngle = availableAngle * (value / total);
|
|
5619
|
+
const sliceStart = current;
|
|
5620
|
+
const sliceEnd = sliceStart + sliceAngle;
|
|
5621
|
+
current = sliceEnd + padAngle;
|
|
5622
|
+
return {
|
|
5623
|
+
data: item,
|
|
5624
|
+
value,
|
|
5625
|
+
startAngle: sliceStart,
|
|
5626
|
+
endAngle: sliceEnd,
|
|
5627
|
+
padAngle,
|
|
5628
|
+
index
|
|
5629
|
+
};
|
|
5630
|
+
});
|
|
5631
|
+
}
|
|
5632
|
+
function polarToCartesian(cx, cy, radius, angle) {
|
|
5633
|
+
return {
|
|
5634
|
+
x: cx + radius * Math.cos(angle),
|
|
5635
|
+
y: cy + radius * Math.sin(angle)
|
|
5636
|
+
};
|
|
5637
|
+
}
|
|
5638
|
+
function createPieArcPath(options) {
|
|
5639
|
+
const { cx, cy, outerRadius } = options;
|
|
5640
|
+
const innerRadius = Math.max(0, options.innerRadius ?? 0);
|
|
5641
|
+
let startAngle = options.startAngle;
|
|
5642
|
+
let endAngle = options.endAngle;
|
|
5643
|
+
const fullCircle = Math.PI * 2;
|
|
5644
|
+
if (endAngle - startAngle >= fullCircle) {
|
|
5645
|
+
endAngle = startAngle + fullCircle - 1e-4;
|
|
5646
|
+
}
|
|
5647
|
+
if (endAngle <= startAngle) return "";
|
|
5648
|
+
const startOuter = polarToCartesian(cx, cy, outerRadius, startAngle);
|
|
5649
|
+
const endOuter = polarToCartesian(cx, cy, outerRadius, endAngle);
|
|
5650
|
+
const largeArcFlag = endAngle - startAngle > Math.PI ? 1 : 0;
|
|
5651
|
+
if (innerRadius <= 0) {
|
|
5652
|
+
return [
|
|
5653
|
+
`M ${cx} ${cy}`,
|
|
5654
|
+
`L ${startOuter.x} ${startOuter.y}`,
|
|
5655
|
+
`A ${outerRadius} ${outerRadius} 0 ${largeArcFlag} 1 ${endOuter.x} ${endOuter.y}`,
|
|
5656
|
+
"Z"
|
|
5657
|
+
].join(" ");
|
|
5050
5658
|
}
|
|
5051
|
-
|
|
5052
|
-
|
|
5053
|
-
|
|
5054
|
-
|
|
5055
|
-
|
|
5056
|
-
|
|
5057
|
-
|
|
5058
|
-
|
|
5059
|
-
|
|
5060
|
-
|
|
5061
|
-
|
|
5062
|
-
|
|
5063
|
-
|
|
5064
|
-
|
|
5065
|
-
|
|
5066
|
-
|
|
5659
|
+
const startInner = polarToCartesian(cx, cy, innerRadius, startAngle);
|
|
5660
|
+
const endInner = polarToCartesian(cx, cy, innerRadius, endAngle);
|
|
5661
|
+
return [
|
|
5662
|
+
`M ${startOuter.x} ${startOuter.y}`,
|
|
5663
|
+
`A ${outerRadius} ${outerRadius} 0 ${largeArcFlag} 1 ${endOuter.x} ${endOuter.y}`,
|
|
5664
|
+
`L ${endInner.x} ${endInner.y}`,
|
|
5665
|
+
`A ${innerRadius} ${innerRadius} 0 ${largeArcFlag} 0 ${startInner.x} ${startInner.y}`,
|
|
5666
|
+
"Z"
|
|
5667
|
+
].join(" ");
|
|
5668
|
+
}
|
|
5669
|
+
function getRadarAngles(count, startAngle = -Math.PI / 2) {
|
|
5670
|
+
if (count <= 0) return [];
|
|
5671
|
+
const step = Math.PI * 2 / count;
|
|
5672
|
+
return Array.from({ length: count }, (_, index) => startAngle + step * index);
|
|
5673
|
+
}
|
|
5674
|
+
function getRadarPoints(data, options) {
|
|
5675
|
+
if (data.length === 0) return [];
|
|
5676
|
+
const startAngle = options.startAngle ?? -Math.PI / 2;
|
|
5677
|
+
const maxValue = Math.max(0, options.maxValue ?? Math.max(...data.map((datum) => datum.value)));
|
|
5678
|
+
const resolvedMax = maxValue > 0 ? maxValue : 1;
|
|
5679
|
+
const step = Math.PI * 2 / data.length;
|
|
5680
|
+
return data.map((datum, index) => {
|
|
5681
|
+
const value = Math.max(0, datum.value);
|
|
5682
|
+
const ratio = value / resolvedMax;
|
|
5683
|
+
const radius = options.radius * ratio;
|
|
5684
|
+
const angle = startAngle + step * index;
|
|
5685
|
+
const point = polarToCartesian(options.cx, options.cy, radius, angle);
|
|
5686
|
+
return {
|
|
5687
|
+
data: datum,
|
|
5688
|
+
value,
|
|
5689
|
+
angle,
|
|
5690
|
+
radius,
|
|
5691
|
+
x: point.x,
|
|
5692
|
+
y: point.y,
|
|
5693
|
+
index
|
|
5694
|
+
};
|
|
5695
|
+
});
|
|
5696
|
+
}
|
|
5697
|
+
function createPolygonPath(points) {
|
|
5698
|
+
if (points.length === 0) return "";
|
|
5699
|
+
const [first, ...rest] = points;
|
|
5700
|
+
return [`M ${first.x} ${first.y}`, ...rest.map((point) => `L ${point.x} ${point.y}`), "Z"].join(
|
|
5701
|
+
" "
|
|
5702
|
+
);
|
|
5703
|
+
}
|
|
5704
|
+
function createLinePath(points, curve = "linear") {
|
|
5705
|
+
if (points.length === 0) return "";
|
|
5706
|
+
if (points.length === 1) return `M ${points[0].x} ${points[0].y}`;
|
|
5707
|
+
switch (curve) {
|
|
5708
|
+
case "step":
|
|
5709
|
+
return createStepPath(points, 0.5);
|
|
5710
|
+
case "stepBefore":
|
|
5711
|
+
return createStepPath(points, 0);
|
|
5712
|
+
case "stepAfter":
|
|
5713
|
+
return createStepPath(points, 1);
|
|
5714
|
+
case "monotone":
|
|
5715
|
+
return createMonotonePath(points);
|
|
5716
|
+
case "natural":
|
|
5717
|
+
return createNaturalPath(points);
|
|
5718
|
+
case "linear":
|
|
5719
|
+
default:
|
|
5720
|
+
return createLinearPath(points);
|
|
5721
|
+
}
|
|
5722
|
+
}
|
|
5723
|
+
function createAreaPath(points, baseline, curve = "linear") {
|
|
5724
|
+
if (points.length === 0) return "";
|
|
5725
|
+
const linePath = createLinePath(points, curve);
|
|
5726
|
+
if (!linePath) return "";
|
|
5727
|
+
const lastPoint = points[points.length - 1];
|
|
5728
|
+
const firstPoint = points[0];
|
|
5729
|
+
return `${linePath} L ${lastPoint.x} ${baseline} L ${firstPoint.x} ${baseline} Z`;
|
|
5730
|
+
}
|
|
5731
|
+
function createLinearPath(points) {
|
|
5732
|
+
const [first, ...rest] = points;
|
|
5733
|
+
return [`M ${first.x} ${first.y}`, ...rest.map((p) => `L ${p.x} ${p.y}`)].join(" ");
|
|
5734
|
+
}
|
|
5735
|
+
function createStepPath(points, t) {
|
|
5736
|
+
const [first, ...rest] = points;
|
|
5737
|
+
const commands = [`M ${first.x} ${first.y}`];
|
|
5738
|
+
let prev = first;
|
|
5739
|
+
for (const point of rest) {
|
|
5740
|
+
if (t === 0) {
|
|
5741
|
+
commands.push(`V ${point.y}`, `H ${point.x}`);
|
|
5742
|
+
} else if (t === 1) {
|
|
5743
|
+
commands.push(`H ${point.x}`, `V ${point.y}`);
|
|
5744
|
+
} else {
|
|
5745
|
+
const midX = prev.x + (point.x - prev.x) * t;
|
|
5746
|
+
commands.push(`H ${midX}`, `V ${point.y}`, `H ${point.x}`);
|
|
5747
|
+
}
|
|
5748
|
+
prev = point;
|
|
5749
|
+
}
|
|
5750
|
+
return commands.join(" ");
|
|
5751
|
+
}
|
|
5752
|
+
function createMonotonePath(points) {
|
|
5753
|
+
if (points.length < 2) return createLinearPath(points);
|
|
5754
|
+
const n = points.length;
|
|
5755
|
+
const tangents = [];
|
|
5756
|
+
for (let i = 0; i < n; i++) {
|
|
5757
|
+
if (i === 0) {
|
|
5758
|
+
tangents.push((points[1].y - points[0].y) / (points[1].x - points[0].x));
|
|
5759
|
+
} else if (i === n - 1) {
|
|
5760
|
+
tangents.push((points[n - 1].y - points[n - 2].y) / (points[n - 1].x - points[n - 2].x));
|
|
5761
|
+
} else {
|
|
5762
|
+
const d0 = (points[i].y - points[i - 1].y) / (points[i].x - points[i - 1].x);
|
|
5763
|
+
const d1 = (points[i + 1].y - points[i].y) / (points[i + 1].x - points[i].x);
|
|
5764
|
+
if (d0 * d1 <= 0) {
|
|
5765
|
+
tangents.push(0);
|
|
5766
|
+
} else {
|
|
5767
|
+
tangents.push(3 * (d0 + d1) / (2 / d0 + 2 / d1 + 2 / ((d0 + d1) / 2)));
|
|
5768
|
+
}
|
|
5769
|
+
}
|
|
5770
|
+
}
|
|
5771
|
+
for (let i = 0; i < n - 1; i++) {
|
|
5772
|
+
const d = (points[i + 1].y - points[i].y) / (points[i + 1].x - points[i].x);
|
|
5773
|
+
if (Math.abs(d) < 1e-10) {
|
|
5774
|
+
tangents[i] = 0;
|
|
5775
|
+
tangents[i + 1] = 0;
|
|
5776
|
+
} else {
|
|
5777
|
+
const alpha = tangents[i] / d;
|
|
5778
|
+
const beta = tangents[i + 1] / d;
|
|
5779
|
+
const s = alpha * alpha + beta * beta;
|
|
5780
|
+
if (s > 9) {
|
|
5781
|
+
const t = 3 / Math.sqrt(s);
|
|
5782
|
+
tangents[i] = t * alpha * d;
|
|
5783
|
+
tangents[i + 1] = t * beta * d;
|
|
5784
|
+
}
|
|
5785
|
+
}
|
|
5786
|
+
}
|
|
5787
|
+
const commands = [`M ${points[0].x} ${points[0].y}`];
|
|
5788
|
+
for (let i = 0; i < n - 1; i++) {
|
|
5789
|
+
const p0 = points[i];
|
|
5790
|
+
const p1 = points[i + 1];
|
|
5791
|
+
const dx = p1.x - p0.x;
|
|
5792
|
+
const cp1x = p0.x + dx / 3;
|
|
5793
|
+
const cp1y = p0.y + tangents[i] * dx / 3;
|
|
5794
|
+
const cp2x = p1.x - dx / 3;
|
|
5795
|
+
const cp2y = p1.y - tangents[i + 1] * dx / 3;
|
|
5796
|
+
commands.push(`C ${cp1x} ${cp1y}, ${cp2x} ${cp2y}, ${p1.x} ${p1.y}`);
|
|
5797
|
+
}
|
|
5798
|
+
return commands.join(" ");
|
|
5799
|
+
}
|
|
5800
|
+
function createNaturalPath(points) {
|
|
5801
|
+
if (points.length < 2) return createLinearPath(points);
|
|
5802
|
+
if (points.length === 2) return createLinearPath(points);
|
|
5803
|
+
const n = points.length - 1;
|
|
5804
|
+
const a = new Array(n + 1).fill(0);
|
|
5805
|
+
const b = new Array(n + 1).fill(0);
|
|
5806
|
+
const c = new Array(n + 1).fill(0);
|
|
5807
|
+
const d = new Array(n + 1).fill(0);
|
|
5808
|
+
b[0] = 1;
|
|
5809
|
+
b[n] = 1;
|
|
5810
|
+
for (let i = 1; i < n; i++) {
|
|
5811
|
+
const h0 = points[i].x - points[i - 1].x;
|
|
5812
|
+
const h1 = points[i + 1].x - points[i].x;
|
|
5813
|
+
a[i] = h0;
|
|
5814
|
+
b[i] = 2 * (h0 + h1);
|
|
5815
|
+
c[i] = h1;
|
|
5816
|
+
d[i] = 3 * (points[i + 1].y - points[i].y) / h1 - 3 * (points[i].y - points[i - 1].y) / h0;
|
|
5817
|
+
}
|
|
5818
|
+
const m = new Array(n + 1).fill(0);
|
|
5819
|
+
const z = new Array(n + 1).fill(0);
|
|
5820
|
+
for (let i = 1; i <= n; i++) {
|
|
5821
|
+
const l = b[i] - a[i] * m[i - 1];
|
|
5822
|
+
m[i] = c[i] / l;
|
|
5823
|
+
z[i] = (d[i] - a[i] * z[i - 1]) / l;
|
|
5824
|
+
}
|
|
5825
|
+
const M = new Array(n + 1).fill(0);
|
|
5826
|
+
for (let i = n - 1; i >= 0; i--) {
|
|
5827
|
+
M[i] = z[i] - m[i] * M[i + 1];
|
|
5828
|
+
}
|
|
5829
|
+
const commands = [`M ${points[0].x} ${points[0].y}`];
|
|
5830
|
+
for (let i = 0; i < n; i++) {
|
|
5831
|
+
const h = points[i + 1].x - points[i].x;
|
|
5832
|
+
const p0 = points[i];
|
|
5833
|
+
const p1 = points[i + 1];
|
|
5834
|
+
const cp1x = p0.x + h / 3;
|
|
5835
|
+
const cp1y = p0.y + h / 3 * ((p1.y - p0.y) / h - h * (M[i + 1] + 2 * M[i]) / 6);
|
|
5836
|
+
const cp2x = p1.x - h / 3;
|
|
5837
|
+
const cp2y = p1.y - h / 3 * ((p1.y - p0.y) / h + h * (2 * M[i + 1] + M[i]) / 6);
|
|
5838
|
+
commands.push(`C ${cp1x} ${cp1y}, ${cp2x} ${cp2y}, ${p1.x} ${p1.y}`);
|
|
5839
|
+
}
|
|
5840
|
+
return commands.join(" ");
|
|
5841
|
+
}
|
|
5842
|
+
function stackSeriesData(seriesData) {
|
|
5843
|
+
if (seriesData.length === 0) return [];
|
|
5844
|
+
const result = [];
|
|
5845
|
+
const stackedValues = /* @__PURE__ */ new Map();
|
|
5846
|
+
for (const series of seriesData) {
|
|
5847
|
+
const stackedSeries = [];
|
|
5848
|
+
for (const datum of series) {
|
|
5849
|
+
const prevY = stackedValues.get(datum.x) ?? 0;
|
|
5850
|
+
const y0 = prevY;
|
|
5851
|
+
const y1 = prevY + datum.y;
|
|
5852
|
+
stackedSeries.push({ original: datum, y0, y1 });
|
|
5853
|
+
stackedValues.set(datum.x, y1);
|
|
5854
|
+
}
|
|
5855
|
+
result.push(stackedSeries);
|
|
5856
|
+
}
|
|
5857
|
+
return result;
|
|
5858
|
+
}
|
|
5859
|
+
|
|
5860
|
+
// src/utils/chart-interaction.ts
|
|
5861
|
+
function createChartInteractionHandlers(data, state, options) {
|
|
5862
|
+
const { hoverable, selectable, onHoverChange, onSelectChange, onItemClick } = options;
|
|
5863
|
+
const handleMouseEnter = (index, datum) => {
|
|
5864
|
+
if (!hoverable) return;
|
|
5865
|
+
if (options.hoveredIndex !== void 0) {
|
|
5866
|
+
onHoverChange?.(index, datum);
|
|
5867
|
+
} else {
|
|
5868
|
+
state.hoveredIndex = index;
|
|
5869
|
+
}
|
|
5870
|
+
};
|
|
5871
|
+
const handleMouseLeave = () => {
|
|
5872
|
+
if (!hoverable) return;
|
|
5873
|
+
if (options.hoveredIndex !== void 0) {
|
|
5874
|
+
onHoverChange?.(null, null);
|
|
5875
|
+
} else {
|
|
5876
|
+
state.hoveredIndex = null;
|
|
5877
|
+
}
|
|
5878
|
+
};
|
|
5879
|
+
const handleClick = (index, datum) => {
|
|
5880
|
+
onItemClick?.(index, datum);
|
|
5881
|
+
if (!selectable) return;
|
|
5882
|
+
const nextIndex = state.selectedIndex === index ? null : index;
|
|
5883
|
+
const nextDatum = nextIndex !== null ? data[nextIndex] : null;
|
|
5884
|
+
if (options.selectedIndex !== void 0) {
|
|
5885
|
+
onSelectChange?.(nextIndex, nextDatum);
|
|
5886
|
+
} else {
|
|
5887
|
+
state.selectedIndex = nextIndex;
|
|
5888
|
+
onSelectChange?.(nextIndex, nextDatum);
|
|
5889
|
+
}
|
|
5890
|
+
};
|
|
5891
|
+
const handleKeyDown = (event, index, datum) => {
|
|
5892
|
+
if (!selectable) return;
|
|
5893
|
+
if (event.key !== "Enter" && event.key !== " ") return;
|
|
5894
|
+
event.preventDefault();
|
|
5895
|
+
handleClick(index, datum);
|
|
5896
|
+
};
|
|
5897
|
+
return {
|
|
5898
|
+
onMouseEnter: handleMouseEnter,
|
|
5899
|
+
onMouseLeave: handleMouseLeave,
|
|
5900
|
+
onClick: handleClick,
|
|
5901
|
+
onKeyDown: handleKeyDown
|
|
5902
|
+
};
|
|
5903
|
+
}
|
|
5904
|
+
function getActiveIndex(hoveredIndex, selectedIndex, controlledHovered, controlledSelected) {
|
|
5905
|
+
if (controlledSelected !== void 0 && controlledSelected !== null) {
|
|
5906
|
+
return controlledSelected;
|
|
5067
5907
|
}
|
|
5908
|
+
if (selectedIndex !== null) {
|
|
5909
|
+
return selectedIndex;
|
|
5910
|
+
}
|
|
5911
|
+
if (controlledHovered !== void 0 && controlledHovered !== null) {
|
|
5912
|
+
return controlledHovered;
|
|
5913
|
+
}
|
|
5914
|
+
return hoveredIndex;
|
|
5915
|
+
}
|
|
5916
|
+
function getChartElementOpacity(index, activeIndex, options = {}) {
|
|
5917
|
+
const { activeOpacity = 1, inactiveOpacity = 0.25, defaultOpacity } = options;
|
|
5918
|
+
if (activeIndex === null) {
|
|
5919
|
+
return defaultOpacity;
|
|
5920
|
+
}
|
|
5921
|
+
return index === activeIndex ? activeOpacity : inactiveOpacity;
|
|
5922
|
+
}
|
|
5923
|
+
function defaultTooltipFormatter(label, value, seriesName, index) {
|
|
5924
|
+
const displayLabel = label ?? (index !== void 0 ? `#${index + 1}` : "");
|
|
5925
|
+
const prefix = seriesName ? `${seriesName} \xB7 ` : "";
|
|
5926
|
+
return `${prefix}${displayLabel}: ${value}`;
|
|
5927
|
+
}
|
|
5928
|
+
var chartInteractiveClasses = {
|
|
5929
|
+
hoverable: "cursor-pointer transition-opacity duration-150",
|
|
5930
|
+
selectable: "cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-1",
|
|
5931
|
+
active: "ring-2 ring-[color:var(--tiger-primary,#2563eb)] ring-offset-1"
|
|
5068
5932
|
};
|
|
5933
|
+
function getChartAnimationStyle(config, index = 0) {
|
|
5934
|
+
if (!config.animated) return "";
|
|
5935
|
+
const duration = config.duration ?? 300;
|
|
5936
|
+
const easing = config.easing ?? "ease-out";
|
|
5937
|
+
const stagger = config.stagger ?? 50;
|
|
5938
|
+
const delay = index * stagger;
|
|
5939
|
+
return `transition: all ${duration}ms ${easing} ${delay}ms`;
|
|
5940
|
+
}
|
|
5941
|
+
function getChartEntranceTransform(type, progress, options = {}) {
|
|
5942
|
+
const { originX = 0, originY = 0 } = options;
|
|
5943
|
+
switch (type) {
|
|
5944
|
+
case "scale":
|
|
5945
|
+
return `translate(${originX * (1 - progress)}, ${originY * (1 - progress)}) scale(${progress})`;
|
|
5946
|
+
case "slide-up":
|
|
5947
|
+
return `translate(0, ${20 * (1 - progress)})`;
|
|
5948
|
+
case "slide-left":
|
|
5949
|
+
return `translate(${20 * (1 - progress)}, 0)`;
|
|
5950
|
+
case "fade":
|
|
5951
|
+
default:
|
|
5952
|
+
return "";
|
|
5953
|
+
}
|
|
5954
|
+
}
|
|
5955
|
+
|
|
5956
|
+
// src/utils/floating.ts
|
|
5957
|
+
var import_dom = require("@floating-ui/dom");
|
|
5958
|
+
async function computeFloatingPosition(reference, floating, options = {}) {
|
|
5959
|
+
const {
|
|
5960
|
+
placement = "bottom",
|
|
5961
|
+
offset: offsetDistance = 8,
|
|
5962
|
+
flip: enableFlip = true,
|
|
5963
|
+
shift: enableShift = true,
|
|
5964
|
+
shiftPadding = 8,
|
|
5965
|
+
arrowElement = null,
|
|
5966
|
+
arrowPadding = 8
|
|
5967
|
+
} = options;
|
|
5968
|
+
const middleware = [(0, import_dom.offset)(offsetDistance)];
|
|
5969
|
+
if (enableFlip) {
|
|
5970
|
+
middleware.push((0, import_dom.flip)({ padding: shiftPadding }));
|
|
5971
|
+
}
|
|
5972
|
+
if (enableShift) {
|
|
5973
|
+
middleware.push((0, import_dom.shift)({ padding: shiftPadding }));
|
|
5974
|
+
}
|
|
5975
|
+
if (arrowElement) {
|
|
5976
|
+
middleware.push((0, import_dom.arrow)({ element: arrowElement, padding: arrowPadding }));
|
|
5977
|
+
}
|
|
5978
|
+
const result = await (0, import_dom.computePosition)(reference, floating, {
|
|
5979
|
+
placement,
|
|
5980
|
+
middleware
|
|
5981
|
+
});
|
|
5982
|
+
return {
|
|
5983
|
+
x: result.x,
|
|
5984
|
+
y: result.y,
|
|
5985
|
+
placement: result.placement,
|
|
5986
|
+
arrow: result.middlewareData.arrow,
|
|
5987
|
+
middlewareData: result.middlewareData
|
|
5988
|
+
};
|
|
5989
|
+
}
|
|
5990
|
+
function autoUpdateFloating(reference, floating, update) {
|
|
5991
|
+
return (0, import_dom.autoUpdate)(reference, floating, update, {
|
|
5992
|
+
ancestorScroll: true,
|
|
5993
|
+
ancestorResize: true,
|
|
5994
|
+
elementResize: true,
|
|
5995
|
+
layoutShift: true
|
|
5996
|
+
});
|
|
5997
|
+
}
|
|
5998
|
+
function getTransformOrigin(placement) {
|
|
5999
|
+
const origins = {
|
|
6000
|
+
top: "bottom center",
|
|
6001
|
+
"top-start": "bottom left",
|
|
6002
|
+
"top-end": "bottom right",
|
|
6003
|
+
bottom: "top center",
|
|
6004
|
+
"bottom-start": "top left",
|
|
6005
|
+
"bottom-end": "top right",
|
|
6006
|
+
left: "right center",
|
|
6007
|
+
"left-start": "right top",
|
|
6008
|
+
"left-end": "right bottom",
|
|
6009
|
+
right: "left center",
|
|
6010
|
+
"right-start": "left top",
|
|
6011
|
+
"right-end": "left bottom"
|
|
6012
|
+
};
|
|
6013
|
+
return origins[placement] || "center center";
|
|
6014
|
+
}
|
|
6015
|
+
function getPlacementSide(placement) {
|
|
6016
|
+
return placement.split("-")[0];
|
|
6017
|
+
}
|
|
6018
|
+
function getArrowStyles(placement, arrowData) {
|
|
6019
|
+
const side = getPlacementSide(placement);
|
|
6020
|
+
const staticSide = {
|
|
6021
|
+
top: "bottom",
|
|
6022
|
+
bottom: "top",
|
|
6023
|
+
left: "right",
|
|
6024
|
+
right: "left"
|
|
6025
|
+
};
|
|
6026
|
+
const styles = {
|
|
6027
|
+
position: "absolute",
|
|
6028
|
+
[staticSide[side]]: "-4px"
|
|
6029
|
+
};
|
|
6030
|
+
if (arrowData?.x != null) {
|
|
6031
|
+
styles.left = `${arrowData.x}px`;
|
|
6032
|
+
}
|
|
6033
|
+
if (arrowData?.y != null) {
|
|
6034
|
+
styles.top = `${arrowData.y}px`;
|
|
6035
|
+
}
|
|
6036
|
+
return styles;
|
|
6037
|
+
}
|
|
6038
|
+
function applyFloatingStyles(element, result) {
|
|
6039
|
+
element.style.left = `${result.x}px`;
|
|
6040
|
+
element.style.top = `${result.y}px`;
|
|
6041
|
+
}
|
|
5069
6042
|
|
|
5070
6043
|
// src/theme/colors.ts
|
|
5071
6044
|
var defaultThemeColors = {
|
|
@@ -5378,7 +6351,7 @@ var checkboxLabelSizeClasses = {
|
|
|
5378
6351
|
lg: "text-lg"
|
|
5379
6352
|
};
|
|
5380
6353
|
function getCheckboxClasses(size = "md", disabled = false) {
|
|
5381
|
-
const baseClasses = "rounded border-2 transition-
|
|
6354
|
+
const baseClasses = "rounded border-2 transition-all duration-150 cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-[var(--tiger-focus-ring,var(--tiger-primary,#2563eb))] active:scale-95";
|
|
5382
6355
|
const sizeClass = checkboxSizeClasses[size];
|
|
5383
6356
|
const colorClasses = [
|
|
5384
6357
|
"border-[var(--tiger-primary,#2563eb)]",
|
|
@@ -5401,7 +6374,7 @@ function getCheckboxLabelClasses(size = "md", disabled = false) {
|
|
|
5401
6374
|
}
|
|
5402
6375
|
|
|
5403
6376
|
// src/theme/switch.ts
|
|
5404
|
-
var switchBaseClasses = "relative inline-flex items-center rounded-full transition-
|
|
6377
|
+
var switchBaseClasses = "relative inline-flex items-center rounded-full transition-all duration-150 focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-[var(--tiger-focus-ring,var(--tiger-primary,#2563eb))] active:scale-[0.98]";
|
|
5405
6378
|
var switchSizeClasses = {
|
|
5406
6379
|
sm: "h-5 w-9",
|
|
5407
6380
|
md: "h-6 w-11",
|
|
@@ -5475,14 +6448,22 @@ function getSliderTooltipClasses(size = "md") {
|
|
|
5475
6448
|
|
|
5476
6449
|
// src/theme/index.ts
|
|
5477
6450
|
var THEME_CSS_VARS = {
|
|
6451
|
+
// Primary colors
|
|
5478
6452
|
primary: "--tiger-primary",
|
|
5479
6453
|
primaryHover: "--tiger-primary-hover",
|
|
6454
|
+
primaryActive: "--tiger-primary-active",
|
|
5480
6455
|
primaryDisabled: "--tiger-primary-disabled",
|
|
6456
|
+
// Secondary colors
|
|
5481
6457
|
secondary: "--tiger-secondary",
|
|
5482
6458
|
secondaryHover: "--tiger-secondary-hover",
|
|
6459
|
+
secondaryActive: "--tiger-secondary-active",
|
|
5483
6460
|
secondaryDisabled: "--tiger-secondary-disabled",
|
|
6461
|
+
// Background hover states
|
|
5484
6462
|
outlineBgHover: "--tiger-outline-bg-hover",
|
|
5485
|
-
ghostBgHover: "--tiger-ghost-bg-hover"
|
|
6463
|
+
ghostBgHover: "--tiger-ghost-bg-hover",
|
|
6464
|
+
// Interaction states (0.2.0+)
|
|
6465
|
+
focusRing: "--tiger-focus-ring",
|
|
6466
|
+
surface: "--tiger-surface"
|
|
5486
6467
|
};
|
|
5487
6468
|
function setThemeColors(colors, element) {
|
|
5488
6469
|
const target = element || (typeof document !== "undefined" ? document.documentElement : null);
|
|
@@ -5542,17 +6523,43 @@ var tigercatPlugin = (0, import_plugin.default)(function({ addBase }) {
|
|
|
5542
6523
|
});
|
|
5543
6524
|
|
|
5544
6525
|
// src/index.ts
|
|
5545
|
-
var version = "0.0
|
|
6526
|
+
var version = "0.2.0";
|
|
5546
6527
|
// Annotate the CommonJS export names for ESM import in node:
|
|
5547
6528
|
0 && (module.exports = {
|
|
6529
|
+
ANIMATION_DURATION_FAST_MS,
|
|
6530
|
+
ANIMATION_DURATION_MS,
|
|
6531
|
+
ANIMATION_DURATION_SLOW_MS,
|
|
5548
6532
|
CalendarIconPath,
|
|
5549
6533
|
ChevronLeftIconPath,
|
|
5550
6534
|
ChevronRightIconPath,
|
|
5551
6535
|
ClockIconPath,
|
|
5552
6536
|
CloseIconPath,
|
|
6537
|
+
DEFAULT_CHART_COLORS,
|
|
6538
|
+
DEFAULT_PAGINATION_LABELS,
|
|
6539
|
+
DURATION_CLASS,
|
|
6540
|
+
DURATION_FAST_CLASS,
|
|
6541
|
+
DURATION_SLOW_CLASS,
|
|
6542
|
+
EASING_DEFAULT,
|
|
6543
|
+
EASING_ENTER,
|
|
6544
|
+
EASING_LEAVE,
|
|
5553
6545
|
SHAKE_CLASS,
|
|
6546
|
+
SPACE_BASE_CLASS,
|
|
6547
|
+
SVG_ANIMATION_CLASSES,
|
|
6548
|
+
SVG_ANIMATION_VARS,
|
|
6549
|
+
SVG_DEFAULT_FILL,
|
|
6550
|
+
SVG_DEFAULT_STROKE,
|
|
6551
|
+
SVG_DEFAULT_VIEWBOX_20,
|
|
6552
|
+
SVG_DEFAULT_VIEWBOX_24,
|
|
6553
|
+
SVG_DEFAULT_XMLNS,
|
|
6554
|
+
SVG_PATH_ANIMATION_CSS,
|
|
5554
6555
|
THEME_CSS_VARS,
|
|
6556
|
+
TRANSITION_BASE,
|
|
6557
|
+
TRANSITION_OPACITY,
|
|
6558
|
+
TRANSITION_TRANSFORM,
|
|
5555
6559
|
TimePickerCloseIconPath,
|
|
6560
|
+
ZH_CN_PAGINATION_LABELS,
|
|
6561
|
+
activeOpacityClasses,
|
|
6562
|
+
activePressClasses,
|
|
5556
6563
|
alertBaseClasses,
|
|
5557
6564
|
alertCloseButtonBaseClasses,
|
|
5558
6565
|
alertCloseIconPath,
|
|
@@ -5568,7 +6575,9 @@ var version = "0.0.1";
|
|
|
5568
6575
|
alertWarningIconPath,
|
|
5569
6576
|
animationDelayClasses,
|
|
5570
6577
|
animationDelayStyles,
|
|
6578
|
+
applyFloatingStyles,
|
|
5571
6579
|
autoResizeTextarea,
|
|
6580
|
+
autoUpdateFloating,
|
|
5572
6581
|
avatarBaseClasses,
|
|
5573
6582
|
avatarDefaultBgColor,
|
|
5574
6583
|
avatarDefaultTextColor,
|
|
@@ -5605,8 +6614,17 @@ var version = "0.0.1";
|
|
|
5605
6614
|
cardHoverClasses,
|
|
5606
6615
|
cardSizeClasses,
|
|
5607
6616
|
cardVariantClasses,
|
|
6617
|
+
chartAxisLabelClasses,
|
|
6618
|
+
chartAxisLineClasses,
|
|
6619
|
+
chartAxisTickLineClasses,
|
|
6620
|
+
chartAxisTickTextClasses,
|
|
6621
|
+
chartCanvasBaseClasses,
|
|
6622
|
+
chartGridLineClasses,
|
|
6623
|
+
chartInteractiveClasses,
|
|
6624
|
+
checkSolidIcon20PathD,
|
|
5608
6625
|
checkboxLabelSizeClasses,
|
|
5609
6626
|
checkboxSizeClasses,
|
|
6627
|
+
chevronDownSolidIcon20PathD,
|
|
5610
6628
|
chevronLeftSolidIcon20PathD,
|
|
5611
6629
|
chevronRightSolidIcon20PathD,
|
|
5612
6630
|
clampPercentage,
|
|
@@ -5625,12 +6643,21 @@ var version = "0.0.1";
|
|
|
5625
6643
|
codeBlockPreClasses,
|
|
5626
6644
|
coerceClassValue,
|
|
5627
6645
|
coerceStyleValue,
|
|
6646
|
+
computeFloatingPosition,
|
|
5628
6647
|
containerBaseClasses,
|
|
5629
6648
|
containerCenteredClasses,
|
|
5630
6649
|
containerMaxWidthClasses,
|
|
5631
6650
|
containerPaddingClasses,
|
|
5632
6651
|
copyTextToClipboard,
|
|
6652
|
+
createAreaPath,
|
|
5633
6653
|
createAriaId,
|
|
6654
|
+
createBandScale,
|
|
6655
|
+
createChartInteractionHandlers,
|
|
6656
|
+
createLinePath,
|
|
6657
|
+
createLinearScale,
|
|
6658
|
+
createPieArcPath,
|
|
6659
|
+
createPointScale,
|
|
6660
|
+
createPolygonPath,
|
|
5634
6661
|
datePickerBaseClasses,
|
|
5635
6662
|
datePickerCalendarClasses,
|
|
5636
6663
|
datePickerCalendarGridClasses,
|
|
@@ -5654,6 +6681,7 @@ var version = "0.0.1";
|
|
|
5654
6681
|
defaultSortFn,
|
|
5655
6682
|
defaultTagThemeColors,
|
|
5656
6683
|
defaultThemeColors,
|
|
6684
|
+
defaultTooltipFormatter,
|
|
5657
6685
|
defaultTotalText,
|
|
5658
6686
|
descriptionsBaseClasses,
|
|
5659
6687
|
descriptionsCellSizeClasses,
|
|
@@ -5684,10 +6712,14 @@ var version = "0.0.1";
|
|
|
5684
6712
|
flattenTree,
|
|
5685
6713
|
focusElement,
|
|
5686
6714
|
focusFirst,
|
|
6715
|
+
focusRingClasses,
|
|
6716
|
+
focusRingInsetClasses,
|
|
5687
6717
|
formatBadgeContent,
|
|
5688
6718
|
formatDate,
|
|
5689
6719
|
formatFileSize,
|
|
5690
6720
|
formatMonthYear,
|
|
6721
|
+
formatPageAriaLabel,
|
|
6722
|
+
formatPaginationTotal,
|
|
5691
6723
|
formatProgressText,
|
|
5692
6724
|
formatTime,
|
|
5693
6725
|
formatTimeDisplay,
|
|
@@ -5698,18 +6730,27 @@ var version = "0.0.1";
|
|
|
5698
6730
|
generateMinutes,
|
|
5699
6731
|
generateSeconds,
|
|
5700
6732
|
getActiveElement,
|
|
6733
|
+
getActiveIndex,
|
|
5701
6734
|
getAlertIconPath,
|
|
5702
6735
|
getAlertTypeClasses,
|
|
5703
6736
|
getAlignClasses,
|
|
5704
6737
|
getAllKeys,
|
|
6738
|
+
getArrowStyles,
|
|
5705
6739
|
getAutoExpandKeys,
|
|
5706
6740
|
getBadgeVariantClasses,
|
|
6741
|
+
getBarGrowAnimationStyle,
|
|
5707
6742
|
getBreadcrumbItemClasses,
|
|
5708
6743
|
getBreadcrumbLinkClasses,
|
|
5709
6744
|
getBreadcrumbSeparatorClasses,
|
|
5710
6745
|
getButtonVariantClasses,
|
|
5711
6746
|
getCalendarDays,
|
|
5712
6747
|
getCardClasses,
|
|
6748
|
+
getChartAnimationStyle,
|
|
6749
|
+
getChartAxisTicks,
|
|
6750
|
+
getChartElementOpacity,
|
|
6751
|
+
getChartEntranceTransform,
|
|
6752
|
+
getChartGridLineDasharray,
|
|
6753
|
+
getChartInnerRect,
|
|
5713
6754
|
getCheckboxCellClasses,
|
|
5714
6755
|
getCheckboxClasses,
|
|
5715
6756
|
getCheckboxLabelClasses,
|
|
@@ -5787,6 +6828,7 @@ var version = "0.0.1";
|
|
|
5787
6828
|
getNextActiveKey,
|
|
5788
6829
|
getNotificationIconPath,
|
|
5789
6830
|
getNotificationTypeClasses,
|
|
6831
|
+
getNumberExtent,
|
|
5790
6832
|
getOffsetClasses,
|
|
5791
6833
|
getOrderClasses,
|
|
5792
6834
|
getPageNumbers,
|
|
@@ -5796,10 +6838,17 @@ var version = "0.0.1";
|
|
|
5796
6838
|
getPaginationButtonBaseClasses,
|
|
5797
6839
|
getPaginationContainerClasses,
|
|
5798
6840
|
getPaginationEllipsisClasses,
|
|
6841
|
+
getPaginationLabels,
|
|
5799
6842
|
getParagraphRowWidth,
|
|
5800
6843
|
getParentKeys,
|
|
6844
|
+
getPathDrawAnimationStyle,
|
|
6845
|
+
getPathDrawStyles,
|
|
6846
|
+
getPathLength,
|
|
5801
6847
|
getPendingDotClasses,
|
|
5802
6848
|
getPictureCardClasses,
|
|
6849
|
+
getPieArcs,
|
|
6850
|
+
getPieDrawAnimationStyle,
|
|
6851
|
+
getPlacementSide,
|
|
5803
6852
|
getPopconfirmArrowClasses,
|
|
5804
6853
|
getPopconfirmButtonBaseClasses,
|
|
5805
6854
|
getPopconfirmButtonsClasses,
|
|
@@ -5820,6 +6869,8 @@ var version = "0.0.1";
|
|
|
5820
6869
|
getProgressTextColorClasses,
|
|
5821
6870
|
getProgressVariantClasses,
|
|
5822
6871
|
getQuickJumperInputClasses,
|
|
6872
|
+
getRadarAngles,
|
|
6873
|
+
getRadarPoints,
|
|
5823
6874
|
getRadioColorClasses,
|
|
5824
6875
|
getRadioDotClasses,
|
|
5825
6876
|
getRadioGroupClasses,
|
|
@@ -5833,6 +6884,13 @@ var version = "0.0.1";
|
|
|
5833
6884
|
getSeparatorContent,
|
|
5834
6885
|
getShortDayNames,
|
|
5835
6886
|
getShortMonthNames,
|
|
6887
|
+
getSimplePaginationButtonClasses,
|
|
6888
|
+
getSimplePaginationButtonsWrapperClasses,
|
|
6889
|
+
getSimplePaginationContainerClasses,
|
|
6890
|
+
getSimplePaginationControlsClasses,
|
|
6891
|
+
getSimplePaginationPageIndicatorClasses,
|
|
6892
|
+
getSimplePaginationSelectClasses,
|
|
6893
|
+
getSimplePaginationTotalClasses,
|
|
5836
6894
|
getSkeletonClasses,
|
|
5837
6895
|
getSkeletonDimensions,
|
|
5838
6896
|
getSliderThumbClasses,
|
|
@@ -5854,6 +6912,7 @@ var version = "0.0.1";
|
|
|
5854
6912
|
getStepsContainerClasses,
|
|
5855
6913
|
getSubMenuExpandIconClasses,
|
|
5856
6914
|
getSubMenuTitleClasses,
|
|
6915
|
+
getSvgDefaultAttrs,
|
|
5857
6916
|
getSwitchClasses,
|
|
5858
6917
|
getSwitchThumbClasses,
|
|
5859
6918
|
getTabItemClasses,
|
|
@@ -5887,6 +6946,7 @@ var version = "0.0.1";
|
|
|
5887
6946
|
getTooltipTriggerClasses,
|
|
5888
6947
|
getTotalPages,
|
|
5889
6948
|
getTotalTextClasses,
|
|
6949
|
+
getTransformOrigin,
|
|
5890
6950
|
getTreeNodeClasses,
|
|
5891
6951
|
getTreeNodeExpandIconClasses,
|
|
5892
6952
|
getUploadButtonClasses,
|
|
@@ -5897,6 +6957,7 @@ var version = "0.0.1";
|
|
|
5897
6957
|
groupItemsIntoRows,
|
|
5898
6958
|
handleNodeCheck,
|
|
5899
6959
|
hasErrors,
|
|
6960
|
+
icon16ViewBox,
|
|
5900
6961
|
icon20ViewBox,
|
|
5901
6962
|
icon24PathStrokeLinecap,
|
|
5902
6963
|
icon24PathStrokeLinejoin,
|
|
@@ -5907,6 +6968,9 @@ var version = "0.0.1";
|
|
|
5907
6968
|
iconWrapperClasses,
|
|
5908
6969
|
injectLoadingAnimationStyles,
|
|
5909
6970
|
injectShakeStyle,
|
|
6971
|
+
injectSvgAnimationStyles,
|
|
6972
|
+
inputFocusClasses,
|
|
6973
|
+
interactiveClasses,
|
|
5910
6974
|
interpolateUploadLabel,
|
|
5911
6975
|
isActivationKey,
|
|
5912
6976
|
isBrowser,
|
|
@@ -5964,12 +7028,15 @@ var version = "0.0.1";
|
|
|
5964
7028
|
loadingSizeClasses,
|
|
5965
7029
|
loadingSpinnerBaseClasses,
|
|
5966
7030
|
loadingTextSizeClasses,
|
|
7031
|
+
lockClosedIcon24PathD,
|
|
7032
|
+
lockOpenIcon24PathD,
|
|
5967
7033
|
menuBaseClasses,
|
|
5968
7034
|
menuCollapsedClasses,
|
|
5969
7035
|
menuCollapsedItemClasses,
|
|
5970
7036
|
menuDarkThemeClasses,
|
|
5971
7037
|
menuItemBaseClasses,
|
|
5972
7038
|
menuItemDisabledClasses,
|
|
7039
|
+
menuItemFocusClasses,
|
|
5973
7040
|
menuItemGroupTitleClasses,
|
|
5974
7041
|
menuItemHoverDarkClasses,
|
|
5975
7042
|
menuItemHoverLightClasses,
|
|
@@ -6002,6 +7069,7 @@ var version = "0.0.1";
|
|
|
6002
7069
|
modalSizeClasses,
|
|
6003
7070
|
modalTitleClasses,
|
|
6004
7071
|
modalWrapperClasses,
|
|
7072
|
+
normalizeChartPadding,
|
|
6005
7073
|
normalizeDate,
|
|
6006
7074
|
normalizeSvgAttrs,
|
|
6007
7075
|
notificationBaseClasses,
|
|
@@ -6019,6 +7087,7 @@ var version = "0.0.1";
|
|
|
6019
7087
|
parseDate,
|
|
6020
7088
|
parseTime,
|
|
6021
7089
|
parseWidthToPx,
|
|
7090
|
+
polarToCartesian,
|
|
6022
7091
|
popconfirmErrorIconPath,
|
|
6023
7092
|
popconfirmIconPathStrokeLinecap,
|
|
6024
7093
|
popconfirmIconPathStrokeLinejoin,
|
|
@@ -6069,12 +7138,20 @@ var version = "0.0.1";
|
|
|
6069
7138
|
skeletonVariantDefaults,
|
|
6070
7139
|
sliderBaseClasses,
|
|
6071
7140
|
sliderDisabledClasses,
|
|
7141
|
+
sliderGetKeyboardValue,
|
|
7142
|
+
sliderGetPercentage,
|
|
7143
|
+
sliderGetValueFromPosition,
|
|
7144
|
+
sliderNormalizeValue,
|
|
6072
7145
|
sliderRangeClasses,
|
|
6073
7146
|
sliderSizeClasses,
|
|
6074
7147
|
sliderThumbClasses,
|
|
6075
7148
|
sliderTooltipClasses,
|
|
6076
7149
|
sliderTrackClasses,
|
|
7150
|
+
sortAscIcon16PathD,
|
|
7151
|
+
sortBothIcon16PathD,
|
|
6077
7152
|
sortData,
|
|
7153
|
+
sortDescIcon16PathD,
|
|
7154
|
+
stackSeriesData,
|
|
6078
7155
|
statusErrorIconPath,
|
|
6079
7156
|
statusIconPaths,
|
|
6080
7157
|
statusInfoIconPath,
|
|
@@ -6101,6 +7178,7 @@ var version = "0.0.1";
|
|
|
6101
7178
|
tabAddButtonClasses,
|
|
6102
7179
|
tabCloseButtonClasses,
|
|
6103
7180
|
tabContentBaseClasses,
|
|
7181
|
+
tabFocusClasses,
|
|
6104
7182
|
tabItemBaseClasses,
|
|
6105
7183
|
tabItemCardActiveClasses,
|
|
6106
7184
|
tabItemCardClasses,
|