@expcat/tigercat-core 1.3.3 → 1.4.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/icons/registry.cjs +1 -3
- package/dist/icons/registry.js +1 -3
- package/dist/index.cjs +562 -197
- package/dist/index.d.cts +370 -268
- package/dist/index.d.ts +370 -268
- package/dist/index.js +543 -196
- package/dist/locale-9tTj1QdZ.d.ts +300 -0
- package/dist/locale-DxwhmqfF.d.cts +300 -0
- package/dist/locales/ar-SA.cjs +67 -4
- package/dist/locales/ar-SA.d.cts +1 -1
- package/dist/locales/ar-SA.d.ts +1 -1
- package/dist/locales/ar-SA.js +67 -4
- package/dist/locales/de-DE.cjs +67 -4
- package/dist/locales/de-DE.d.cts +1 -1
- package/dist/locales/de-DE.d.ts +1 -1
- package/dist/locales/de-DE.js +67 -4
- package/dist/locales/en-US.cjs +64 -2
- package/dist/locales/en-US.d.cts +1 -1
- package/dist/locales/en-US.d.ts +1 -1
- package/dist/locales/en-US.js +62 -2
- package/dist/locales/es-ES.cjs +67 -4
- package/dist/locales/es-ES.d.cts +1 -1
- package/dist/locales/es-ES.d.ts +1 -1
- package/dist/locales/es-ES.js +67 -4
- package/dist/locales/fr-FR.cjs +67 -4
- package/dist/locales/fr-FR.d.cts +1 -1
- package/dist/locales/fr-FR.d.ts +1 -1
- package/dist/locales/fr-FR.js +67 -4
- package/dist/locales/id-ID.cjs +5 -2
- package/dist/locales/id-ID.d.cts +1 -1
- package/dist/locales/id-ID.d.ts +1 -1
- package/dist/locales/id-ID.js +5 -2
- package/dist/locales/ja-JP.cjs +5 -2
- package/dist/locales/ja-JP.d.cts +1 -1
- package/dist/locales/ja-JP.d.ts +1 -1
- package/dist/locales/ja-JP.js +5 -2
- package/dist/locales/ko-KR.cjs +5 -2
- package/dist/locales/ko-KR.d.cts +1 -1
- package/dist/locales/ko-KR.d.ts +1 -1
- package/dist/locales/ko-KR.js +5 -2
- package/dist/locales/pt-BR.cjs +67 -4
- package/dist/locales/pt-BR.d.cts +1 -1
- package/dist/locales/pt-BR.d.ts +1 -1
- package/dist/locales/pt-BR.js +67 -4
- package/dist/locales/th-TH.cjs +5 -2
- package/dist/locales/th-TH.d.cts +1 -1
- package/dist/locales/th-TH.d.ts +1 -1
- package/dist/locales/th-TH.js +5 -2
- package/dist/locales/vi-VN.cjs +5 -2
- package/dist/locales/vi-VN.d.cts +1 -1
- package/dist/locales/vi-VN.d.ts +1 -1
- package/dist/locales/vi-VN.js +5 -2
- package/dist/locales/zh-CN.cjs +64 -2
- package/dist/locales/zh-CN.d.cts +1 -1
- package/dist/locales/zh-CN.d.ts +1 -1
- package/dist/locales/zh-CN.js +62 -2
- package/dist/locales/zh-TW.cjs +5 -2
- package/dist/locales/zh-TW.d.cts +1 -1
- package/dist/locales/zh-TW.d.ts +1 -1
- package/dist/locales/zh-TW.js +5 -2
- package/dist/{table-export-CwJR6vfP.d.cts → table-export-BMBH75rj.d.cts} +2 -2
- package/dist/{table-export-B4VAha5n.d.ts → table-export-GRimhvlM.d.ts} +2 -2
- package/dist/tailwind/modern.cjs +1 -1
- package/dist/tailwind/modern.js +1 -1
- package/dist/utils/table-export.cjs +7 -0
- package/dist/utils/table-export.d.cts +2 -2
- package/dist/utils/table-export.d.ts +2 -2
- package/dist/utils/table-export.js +7 -0
- package/package.json +2 -10
- package/tokens/tailwind-tokens.js +3 -6
- package/tokens/tokens.css +15 -30
- package/dist/locale-BRmojkDM.d.cts +0 -131
- package/dist/locale-BxSSFEo2.d.ts +0 -131
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
import { D as DatePickerLocalePreset } from './datepicker-DXzS_8l8.js';
|
|
2
|
+
|
|
3
|
+
/** TimePicker shared types */
|
|
4
|
+
|
|
5
|
+
type TimePickerSize = 'sm' | 'md' | 'lg';
|
|
6
|
+
type TimeFormat = '12' | '24';
|
|
7
|
+
type TimePickerSingleValue = string | null;
|
|
8
|
+
type TimePickerRangeValue = [string | null, string | null];
|
|
9
|
+
type TimePickerModelValue = TimePickerSingleValue | TimePickerRangeValue;
|
|
10
|
+
interface TimePickerLabels {
|
|
11
|
+
hour: string;
|
|
12
|
+
minute: string;
|
|
13
|
+
second: string;
|
|
14
|
+
now: string;
|
|
15
|
+
ok: string;
|
|
16
|
+
start: string;
|
|
17
|
+
end: string;
|
|
18
|
+
clear: string;
|
|
19
|
+
toggle: string;
|
|
20
|
+
dialog: string;
|
|
21
|
+
selectTime: string;
|
|
22
|
+
selectTimeRange: string;
|
|
23
|
+
}
|
|
24
|
+
interface TimePickerProps {
|
|
25
|
+
/**
|
|
26
|
+
* Locale used for UI labels (e.g. AM/PM) and display formatting.
|
|
27
|
+
* Example: 'zh-CN', 'en-US', or a Tigercat locale object.
|
|
28
|
+
*/
|
|
29
|
+
locale?: string | Partial<TigerLocale>;
|
|
30
|
+
/**
|
|
31
|
+
* UI labels for i18n.
|
|
32
|
+
* When provided, merges with locale-based defaults.
|
|
33
|
+
*/
|
|
34
|
+
labels?: Partial<TimePickerLabels>;
|
|
35
|
+
/**
|
|
36
|
+
* TimePicker size
|
|
37
|
+
* @default 'md'
|
|
38
|
+
*/
|
|
39
|
+
size?: TimePickerSize;
|
|
40
|
+
/** Controlled value. Format: 'HH:mm' or 'HH:mm:ss' */
|
|
41
|
+
value?: TimePickerModelValue;
|
|
42
|
+
/** Uncontrolled default value. Format: 'HH:mm' or 'HH:mm:ss' */
|
|
43
|
+
defaultValue?: TimePickerModelValue;
|
|
44
|
+
/**
|
|
45
|
+
* Enable range selection (start/end).
|
|
46
|
+
* When true, value/defaultValue use a tuple: [start, end].
|
|
47
|
+
* @default false
|
|
48
|
+
*/
|
|
49
|
+
range?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Time format (12-hour or 24-hour)
|
|
52
|
+
* @default '24'
|
|
53
|
+
*/
|
|
54
|
+
format?: TimeFormat;
|
|
55
|
+
/**
|
|
56
|
+
* Whether to show seconds
|
|
57
|
+
* @default false
|
|
58
|
+
*/
|
|
59
|
+
showSeconds?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Hour step
|
|
62
|
+
* @default 1
|
|
63
|
+
*/
|
|
64
|
+
hourStep?: number;
|
|
65
|
+
/**
|
|
66
|
+
* Minute step
|
|
67
|
+
* @default 1
|
|
68
|
+
*/
|
|
69
|
+
minuteStep?: number;
|
|
70
|
+
/**
|
|
71
|
+
* Second step
|
|
72
|
+
* @default 1
|
|
73
|
+
*/
|
|
74
|
+
secondStep?: number;
|
|
75
|
+
/**
|
|
76
|
+
* Placeholder text
|
|
77
|
+
* @default 'Select time'
|
|
78
|
+
*/
|
|
79
|
+
placeholder?: string;
|
|
80
|
+
/**
|
|
81
|
+
* Whether the timepicker is disabled
|
|
82
|
+
* @default false
|
|
83
|
+
*/
|
|
84
|
+
disabled?: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Whether the timepicker is readonly
|
|
87
|
+
* @default false
|
|
88
|
+
*/
|
|
89
|
+
readonly?: boolean;
|
|
90
|
+
/**
|
|
91
|
+
* Whether the timepicker is required
|
|
92
|
+
* @default false
|
|
93
|
+
*/
|
|
94
|
+
required?: boolean;
|
|
95
|
+
/**
|
|
96
|
+
* Minimum selectable time (HH:mm format)
|
|
97
|
+
*/
|
|
98
|
+
minTime?: string | null;
|
|
99
|
+
/**
|
|
100
|
+
* Maximum selectable time (HH:mm format)
|
|
101
|
+
*/
|
|
102
|
+
maxTime?: string | null;
|
|
103
|
+
/**
|
|
104
|
+
* Whether to show the clear button
|
|
105
|
+
* @default true
|
|
106
|
+
*/
|
|
107
|
+
clearable?: boolean;
|
|
108
|
+
/**
|
|
109
|
+
* Input name attribute
|
|
110
|
+
*/
|
|
111
|
+
name?: string;
|
|
112
|
+
/**
|
|
113
|
+
* Input id attribute
|
|
114
|
+
*/
|
|
115
|
+
id?: string;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
type TigerLocaleDirection = 'ltr' | 'rtl';
|
|
119
|
+
interface TigerLocaleCommon {
|
|
120
|
+
okText?: string;
|
|
121
|
+
cancelText?: string;
|
|
122
|
+
closeText?: string;
|
|
123
|
+
loadingText?: string;
|
|
124
|
+
emptyText?: string;
|
|
125
|
+
/** Default "no more items" text for infinite-scroll end state */
|
|
126
|
+
noMoreText?: string;
|
|
127
|
+
/** Default placeholder for in-component search inputs (Select/Tree/Transfer/Cascader…) */
|
|
128
|
+
searchPlaceholder?: string;
|
|
129
|
+
/** Default label for clear actions */
|
|
130
|
+
clearText?: string;
|
|
131
|
+
}
|
|
132
|
+
interface TigerLocaleModal {
|
|
133
|
+
closeAriaLabel?: string;
|
|
134
|
+
okText?: string;
|
|
135
|
+
cancelText?: string;
|
|
136
|
+
}
|
|
137
|
+
interface TigerLocaleDrawer {
|
|
138
|
+
closeAriaLabel?: string;
|
|
139
|
+
}
|
|
140
|
+
interface TigerLocaleUpload {
|
|
141
|
+
/** Drag area aria-label */
|
|
142
|
+
dragAreaAriaLabel?: string;
|
|
143
|
+
/** Upload button aria-label (non-drag mode) */
|
|
144
|
+
buttonAriaLabel?: string;
|
|
145
|
+
/** Main drag-area instruction (emphasized part) */
|
|
146
|
+
clickToUploadText?: string;
|
|
147
|
+
/** Secondary drag-area instruction */
|
|
148
|
+
dragAndDropText?: string;
|
|
149
|
+
/** Template: supports {accept} */
|
|
150
|
+
acceptInfoText?: string;
|
|
151
|
+
/** Template: supports {maxSize} */
|
|
152
|
+
maxSizeInfoText?: string;
|
|
153
|
+
/** Default non-drag button text */
|
|
154
|
+
selectFileText?: string;
|
|
155
|
+
/** File list aria-label */
|
|
156
|
+
uploadedFilesAriaLabel?: string;
|
|
157
|
+
/** Status aria-labels */
|
|
158
|
+
successAriaLabel?: string;
|
|
159
|
+
errorAriaLabel?: string;
|
|
160
|
+
uploadingAriaLabel?: string;
|
|
161
|
+
/** Templates: support {fileName} */
|
|
162
|
+
removeFileAriaLabel?: string;
|
|
163
|
+
previewFileAriaLabel?: string;
|
|
164
|
+
}
|
|
165
|
+
interface TigerLocalePagination {
|
|
166
|
+
/** Total text template: supports {total}, {start}, {end} */
|
|
167
|
+
totalText?: string;
|
|
168
|
+
/** Items per page text */
|
|
169
|
+
itemsPerPageText?: string;
|
|
170
|
+
/** Quick jumper label */
|
|
171
|
+
jumpToText?: string;
|
|
172
|
+
/** Page text (after number) */
|
|
173
|
+
pageText?: string;
|
|
174
|
+
/** Previous page button aria-label */
|
|
175
|
+
prevPageAriaLabel?: string;
|
|
176
|
+
/** Next page button aria-label */
|
|
177
|
+
nextPageAriaLabel?: string;
|
|
178
|
+
/** Page button aria-label template: supports {page} */
|
|
179
|
+
pageAriaLabel?: string;
|
|
180
|
+
/** Simple pagination page indicator template: supports {current}, {total} */
|
|
181
|
+
pageIndicatorText?: string;
|
|
182
|
+
}
|
|
183
|
+
interface TigerLocaleTable {
|
|
184
|
+
emptyText?: string;
|
|
185
|
+
loadingText?: string;
|
|
186
|
+
expandText?: string;
|
|
187
|
+
collapseText?: string;
|
|
188
|
+
selectAllText?: string;
|
|
189
|
+
/** Template: supports {row} */
|
|
190
|
+
selectRowAriaLabel?: string;
|
|
191
|
+
/** Template: supports {column} */
|
|
192
|
+
sortByText?: string;
|
|
193
|
+
clearSortText?: string;
|
|
194
|
+
toolbarAriaLabel?: string;
|
|
195
|
+
searchPlaceholder?: string;
|
|
196
|
+
searchButtonText?: string;
|
|
197
|
+
selectedText?: string;
|
|
198
|
+
selectedItemsText?: string;
|
|
199
|
+
/** Column-settings panel title / trigger label */
|
|
200
|
+
columnSettingsText?: string;
|
|
201
|
+
/** Aria label for the column-settings trigger button */
|
|
202
|
+
columnSettingsAriaLabel?: string;
|
|
203
|
+
/** Lock-column button aria-label. Template: supports {column} */
|
|
204
|
+
lockColumnAriaLabel?: string;
|
|
205
|
+
/** Unlock-column button aria-label. Template: supports {column} */
|
|
206
|
+
unlockColumnAriaLabel?: string;
|
|
207
|
+
}
|
|
208
|
+
interface TigerLocaleFormWizard {
|
|
209
|
+
prevText?: string;
|
|
210
|
+
nextText?: string;
|
|
211
|
+
finishText?: string;
|
|
212
|
+
}
|
|
213
|
+
type TigerLocaleTimePicker = Partial<TimePickerLabels>;
|
|
214
|
+
interface TigerLocaleTaskBoard {
|
|
215
|
+
/** Placeholder shown inside an empty column */
|
|
216
|
+
emptyColumnText?: string;
|
|
217
|
+
/** Label for the add-card button */
|
|
218
|
+
addCardText?: string;
|
|
219
|
+
/** Template: supports {limit} */
|
|
220
|
+
wipLimitText?: string;
|
|
221
|
+
/** Aria hint for draggable items */
|
|
222
|
+
dragHintText?: string;
|
|
223
|
+
/** Aria label for the board root region */
|
|
224
|
+
boardAriaLabel?: string;
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Built-in form-validation messages.
|
|
228
|
+
*
|
|
229
|
+
* Used by `validateRule`/`validateField`/`validateForm` to localize the
|
|
230
|
+
* default error messages. A per-rule `message` always takes precedence over
|
|
231
|
+
* these. Range messages support `{min}` / `{max}` placeholders.
|
|
232
|
+
*/
|
|
233
|
+
interface TigerLocaleFormValidation {
|
|
234
|
+
/** Required-field message */
|
|
235
|
+
required?: string;
|
|
236
|
+
/** Type errors */
|
|
237
|
+
typeString?: string;
|
|
238
|
+
typeNumber?: string;
|
|
239
|
+
typeBoolean?: string;
|
|
240
|
+
typeArray?: string;
|
|
241
|
+
typeObject?: string;
|
|
242
|
+
/** Preset type errors */
|
|
243
|
+
email?: string;
|
|
244
|
+
phone?: string;
|
|
245
|
+
url?: string;
|
|
246
|
+
date?: string;
|
|
247
|
+
idCard?: string;
|
|
248
|
+
/** Range errors — template: supports {min} */
|
|
249
|
+
minLength?: string;
|
|
250
|
+
/** Template: supports {max} */
|
|
251
|
+
maxLength?: string;
|
|
252
|
+
/** Template: supports {min} */
|
|
253
|
+
minValue?: string;
|
|
254
|
+
/** Template: supports {max} */
|
|
255
|
+
maxValue?: string;
|
|
256
|
+
/** Template: supports {min} */
|
|
257
|
+
minItems?: string;
|
|
258
|
+
/** Template: supports {max} */
|
|
259
|
+
maxItems?: string;
|
|
260
|
+
/** Pattern mismatch message */
|
|
261
|
+
patternMismatch?: string;
|
|
262
|
+
/** Custom validator returned false */
|
|
263
|
+
validatorFailed?: string;
|
|
264
|
+
/** Custom validator threw */
|
|
265
|
+
validatorError?: string;
|
|
266
|
+
}
|
|
267
|
+
interface TigerLocale {
|
|
268
|
+
/** BCP 47 locale identifier, for Intl formatting and direction inference. */
|
|
269
|
+
locale?: string;
|
|
270
|
+
/** Text/layout direction. RTL locales should set this to `rtl`. */
|
|
271
|
+
direction?: TigerLocaleDirection;
|
|
272
|
+
common?: TigerLocaleCommon;
|
|
273
|
+
modal?: TigerLocaleModal;
|
|
274
|
+
drawer?: TigerLocaleDrawer;
|
|
275
|
+
upload?: TigerLocaleUpload;
|
|
276
|
+
pagination?: TigerLocalePagination;
|
|
277
|
+
table?: TigerLocaleTable;
|
|
278
|
+
datePicker?: Partial<DatePickerLocalePreset>;
|
|
279
|
+
timePicker?: TigerLocaleTimePicker;
|
|
280
|
+
formWizard?: TigerLocaleFormWizard;
|
|
281
|
+
taskBoard?: TigerLocaleTaskBoard;
|
|
282
|
+
formValidation?: TigerLocaleFormValidation;
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* Flat custom-text overlay for single-language projects that do not need i18n.
|
|
286
|
+
*
|
|
287
|
+
* Same shape as `TigerLocale` but without the `locale` code / `direction`
|
|
288
|
+
* fields — it carries only the component text. Pass it to
|
|
289
|
+
* `<ConfigProvider locale={defineText({...})} />` for app-wide custom text, or
|
|
290
|
+
* to a component's `labels` prop for a one-off override. No locale data files
|
|
291
|
+
* are pulled in, so the bundle stays small.
|
|
292
|
+
*/
|
|
293
|
+
type TigerText = Omit<Partial<TigerLocale>, 'locale' | 'direction'>;
|
|
294
|
+
type TigerLocaleLazyModule = Partial<TigerLocale> | {
|
|
295
|
+
default?: Partial<TigerLocale>;
|
|
296
|
+
} | Record<string, unknown>;
|
|
297
|
+
type TigerLocaleLoader = () => PromiseLike<TigerLocaleLazyModule>;
|
|
298
|
+
type TigerLocaleInput = Partial<TigerLocale> | PromiseLike<TigerLocaleLazyModule> | TigerLocaleLoader;
|
|
299
|
+
|
|
300
|
+
export type { TigerLocale as T, TigerLocaleInput as a, TigerLocaleLazyModule as b, TigerLocaleLoader as c, TigerLocaleDirection as d, TigerLocalePagination as e, TigerLocaleFormWizard as f, TigerLocaleTable as g, TigerLocaleTaskBoard as h, TigerLocaleFormValidation as i, TimePickerLabels as j, TigerText as k, TimeFormat as l, TigerLocaleDrawer as m, TigerLocaleModal as n, TimePickerSize as o, TimePickerSingleValue as p, TimePickerRangeValue as q, TimePickerModelValue as r, TimePickerProps as s, TigerLocaleCommon as t, TigerLocaleUpload as u, TigerLocaleTimePicker as v };
|
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
import { D as DatePickerLocalePreset } from './datepicker-DXzS_8l8.cjs';
|
|
2
|
+
|
|
3
|
+
/** TimePicker shared types */
|
|
4
|
+
|
|
5
|
+
type TimePickerSize = 'sm' | 'md' | 'lg';
|
|
6
|
+
type TimeFormat = '12' | '24';
|
|
7
|
+
type TimePickerSingleValue = string | null;
|
|
8
|
+
type TimePickerRangeValue = [string | null, string | null];
|
|
9
|
+
type TimePickerModelValue = TimePickerSingleValue | TimePickerRangeValue;
|
|
10
|
+
interface TimePickerLabels {
|
|
11
|
+
hour: string;
|
|
12
|
+
minute: string;
|
|
13
|
+
second: string;
|
|
14
|
+
now: string;
|
|
15
|
+
ok: string;
|
|
16
|
+
start: string;
|
|
17
|
+
end: string;
|
|
18
|
+
clear: string;
|
|
19
|
+
toggle: string;
|
|
20
|
+
dialog: string;
|
|
21
|
+
selectTime: string;
|
|
22
|
+
selectTimeRange: string;
|
|
23
|
+
}
|
|
24
|
+
interface TimePickerProps {
|
|
25
|
+
/**
|
|
26
|
+
* Locale used for UI labels (e.g. AM/PM) and display formatting.
|
|
27
|
+
* Example: 'zh-CN', 'en-US', or a Tigercat locale object.
|
|
28
|
+
*/
|
|
29
|
+
locale?: string | Partial<TigerLocale>;
|
|
30
|
+
/**
|
|
31
|
+
* UI labels for i18n.
|
|
32
|
+
* When provided, merges with locale-based defaults.
|
|
33
|
+
*/
|
|
34
|
+
labels?: Partial<TimePickerLabels>;
|
|
35
|
+
/**
|
|
36
|
+
* TimePicker size
|
|
37
|
+
* @default 'md'
|
|
38
|
+
*/
|
|
39
|
+
size?: TimePickerSize;
|
|
40
|
+
/** Controlled value. Format: 'HH:mm' or 'HH:mm:ss' */
|
|
41
|
+
value?: TimePickerModelValue;
|
|
42
|
+
/** Uncontrolled default value. Format: 'HH:mm' or 'HH:mm:ss' */
|
|
43
|
+
defaultValue?: TimePickerModelValue;
|
|
44
|
+
/**
|
|
45
|
+
* Enable range selection (start/end).
|
|
46
|
+
* When true, value/defaultValue use a tuple: [start, end].
|
|
47
|
+
* @default false
|
|
48
|
+
*/
|
|
49
|
+
range?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Time format (12-hour or 24-hour)
|
|
52
|
+
* @default '24'
|
|
53
|
+
*/
|
|
54
|
+
format?: TimeFormat;
|
|
55
|
+
/**
|
|
56
|
+
* Whether to show seconds
|
|
57
|
+
* @default false
|
|
58
|
+
*/
|
|
59
|
+
showSeconds?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Hour step
|
|
62
|
+
* @default 1
|
|
63
|
+
*/
|
|
64
|
+
hourStep?: number;
|
|
65
|
+
/**
|
|
66
|
+
* Minute step
|
|
67
|
+
* @default 1
|
|
68
|
+
*/
|
|
69
|
+
minuteStep?: number;
|
|
70
|
+
/**
|
|
71
|
+
* Second step
|
|
72
|
+
* @default 1
|
|
73
|
+
*/
|
|
74
|
+
secondStep?: number;
|
|
75
|
+
/**
|
|
76
|
+
* Placeholder text
|
|
77
|
+
* @default 'Select time'
|
|
78
|
+
*/
|
|
79
|
+
placeholder?: string;
|
|
80
|
+
/**
|
|
81
|
+
* Whether the timepicker is disabled
|
|
82
|
+
* @default false
|
|
83
|
+
*/
|
|
84
|
+
disabled?: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Whether the timepicker is readonly
|
|
87
|
+
* @default false
|
|
88
|
+
*/
|
|
89
|
+
readonly?: boolean;
|
|
90
|
+
/**
|
|
91
|
+
* Whether the timepicker is required
|
|
92
|
+
* @default false
|
|
93
|
+
*/
|
|
94
|
+
required?: boolean;
|
|
95
|
+
/**
|
|
96
|
+
* Minimum selectable time (HH:mm format)
|
|
97
|
+
*/
|
|
98
|
+
minTime?: string | null;
|
|
99
|
+
/**
|
|
100
|
+
* Maximum selectable time (HH:mm format)
|
|
101
|
+
*/
|
|
102
|
+
maxTime?: string | null;
|
|
103
|
+
/**
|
|
104
|
+
* Whether to show the clear button
|
|
105
|
+
* @default true
|
|
106
|
+
*/
|
|
107
|
+
clearable?: boolean;
|
|
108
|
+
/**
|
|
109
|
+
* Input name attribute
|
|
110
|
+
*/
|
|
111
|
+
name?: string;
|
|
112
|
+
/**
|
|
113
|
+
* Input id attribute
|
|
114
|
+
*/
|
|
115
|
+
id?: string;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
type TigerLocaleDirection = 'ltr' | 'rtl';
|
|
119
|
+
interface TigerLocaleCommon {
|
|
120
|
+
okText?: string;
|
|
121
|
+
cancelText?: string;
|
|
122
|
+
closeText?: string;
|
|
123
|
+
loadingText?: string;
|
|
124
|
+
emptyText?: string;
|
|
125
|
+
/** Default "no more items" text for infinite-scroll end state */
|
|
126
|
+
noMoreText?: string;
|
|
127
|
+
/** Default placeholder for in-component search inputs (Select/Tree/Transfer/Cascader…) */
|
|
128
|
+
searchPlaceholder?: string;
|
|
129
|
+
/** Default label for clear actions */
|
|
130
|
+
clearText?: string;
|
|
131
|
+
}
|
|
132
|
+
interface TigerLocaleModal {
|
|
133
|
+
closeAriaLabel?: string;
|
|
134
|
+
okText?: string;
|
|
135
|
+
cancelText?: string;
|
|
136
|
+
}
|
|
137
|
+
interface TigerLocaleDrawer {
|
|
138
|
+
closeAriaLabel?: string;
|
|
139
|
+
}
|
|
140
|
+
interface TigerLocaleUpload {
|
|
141
|
+
/** Drag area aria-label */
|
|
142
|
+
dragAreaAriaLabel?: string;
|
|
143
|
+
/** Upload button aria-label (non-drag mode) */
|
|
144
|
+
buttonAriaLabel?: string;
|
|
145
|
+
/** Main drag-area instruction (emphasized part) */
|
|
146
|
+
clickToUploadText?: string;
|
|
147
|
+
/** Secondary drag-area instruction */
|
|
148
|
+
dragAndDropText?: string;
|
|
149
|
+
/** Template: supports {accept} */
|
|
150
|
+
acceptInfoText?: string;
|
|
151
|
+
/** Template: supports {maxSize} */
|
|
152
|
+
maxSizeInfoText?: string;
|
|
153
|
+
/** Default non-drag button text */
|
|
154
|
+
selectFileText?: string;
|
|
155
|
+
/** File list aria-label */
|
|
156
|
+
uploadedFilesAriaLabel?: string;
|
|
157
|
+
/** Status aria-labels */
|
|
158
|
+
successAriaLabel?: string;
|
|
159
|
+
errorAriaLabel?: string;
|
|
160
|
+
uploadingAriaLabel?: string;
|
|
161
|
+
/** Templates: support {fileName} */
|
|
162
|
+
removeFileAriaLabel?: string;
|
|
163
|
+
previewFileAriaLabel?: string;
|
|
164
|
+
}
|
|
165
|
+
interface TigerLocalePagination {
|
|
166
|
+
/** Total text template: supports {total}, {start}, {end} */
|
|
167
|
+
totalText?: string;
|
|
168
|
+
/** Items per page text */
|
|
169
|
+
itemsPerPageText?: string;
|
|
170
|
+
/** Quick jumper label */
|
|
171
|
+
jumpToText?: string;
|
|
172
|
+
/** Page text (after number) */
|
|
173
|
+
pageText?: string;
|
|
174
|
+
/** Previous page button aria-label */
|
|
175
|
+
prevPageAriaLabel?: string;
|
|
176
|
+
/** Next page button aria-label */
|
|
177
|
+
nextPageAriaLabel?: string;
|
|
178
|
+
/** Page button aria-label template: supports {page} */
|
|
179
|
+
pageAriaLabel?: string;
|
|
180
|
+
/** Simple pagination page indicator template: supports {current}, {total} */
|
|
181
|
+
pageIndicatorText?: string;
|
|
182
|
+
}
|
|
183
|
+
interface TigerLocaleTable {
|
|
184
|
+
emptyText?: string;
|
|
185
|
+
loadingText?: string;
|
|
186
|
+
expandText?: string;
|
|
187
|
+
collapseText?: string;
|
|
188
|
+
selectAllText?: string;
|
|
189
|
+
/** Template: supports {row} */
|
|
190
|
+
selectRowAriaLabel?: string;
|
|
191
|
+
/** Template: supports {column} */
|
|
192
|
+
sortByText?: string;
|
|
193
|
+
clearSortText?: string;
|
|
194
|
+
toolbarAriaLabel?: string;
|
|
195
|
+
searchPlaceholder?: string;
|
|
196
|
+
searchButtonText?: string;
|
|
197
|
+
selectedText?: string;
|
|
198
|
+
selectedItemsText?: string;
|
|
199
|
+
/** Column-settings panel title / trigger label */
|
|
200
|
+
columnSettingsText?: string;
|
|
201
|
+
/** Aria label for the column-settings trigger button */
|
|
202
|
+
columnSettingsAriaLabel?: string;
|
|
203
|
+
/** Lock-column button aria-label. Template: supports {column} */
|
|
204
|
+
lockColumnAriaLabel?: string;
|
|
205
|
+
/** Unlock-column button aria-label. Template: supports {column} */
|
|
206
|
+
unlockColumnAriaLabel?: string;
|
|
207
|
+
}
|
|
208
|
+
interface TigerLocaleFormWizard {
|
|
209
|
+
prevText?: string;
|
|
210
|
+
nextText?: string;
|
|
211
|
+
finishText?: string;
|
|
212
|
+
}
|
|
213
|
+
type TigerLocaleTimePicker = Partial<TimePickerLabels>;
|
|
214
|
+
interface TigerLocaleTaskBoard {
|
|
215
|
+
/** Placeholder shown inside an empty column */
|
|
216
|
+
emptyColumnText?: string;
|
|
217
|
+
/** Label for the add-card button */
|
|
218
|
+
addCardText?: string;
|
|
219
|
+
/** Template: supports {limit} */
|
|
220
|
+
wipLimitText?: string;
|
|
221
|
+
/** Aria hint for draggable items */
|
|
222
|
+
dragHintText?: string;
|
|
223
|
+
/** Aria label for the board root region */
|
|
224
|
+
boardAriaLabel?: string;
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Built-in form-validation messages.
|
|
228
|
+
*
|
|
229
|
+
* Used by `validateRule`/`validateField`/`validateForm` to localize the
|
|
230
|
+
* default error messages. A per-rule `message` always takes precedence over
|
|
231
|
+
* these. Range messages support `{min}` / `{max}` placeholders.
|
|
232
|
+
*/
|
|
233
|
+
interface TigerLocaleFormValidation {
|
|
234
|
+
/** Required-field message */
|
|
235
|
+
required?: string;
|
|
236
|
+
/** Type errors */
|
|
237
|
+
typeString?: string;
|
|
238
|
+
typeNumber?: string;
|
|
239
|
+
typeBoolean?: string;
|
|
240
|
+
typeArray?: string;
|
|
241
|
+
typeObject?: string;
|
|
242
|
+
/** Preset type errors */
|
|
243
|
+
email?: string;
|
|
244
|
+
phone?: string;
|
|
245
|
+
url?: string;
|
|
246
|
+
date?: string;
|
|
247
|
+
idCard?: string;
|
|
248
|
+
/** Range errors — template: supports {min} */
|
|
249
|
+
minLength?: string;
|
|
250
|
+
/** Template: supports {max} */
|
|
251
|
+
maxLength?: string;
|
|
252
|
+
/** Template: supports {min} */
|
|
253
|
+
minValue?: string;
|
|
254
|
+
/** Template: supports {max} */
|
|
255
|
+
maxValue?: string;
|
|
256
|
+
/** Template: supports {min} */
|
|
257
|
+
minItems?: string;
|
|
258
|
+
/** Template: supports {max} */
|
|
259
|
+
maxItems?: string;
|
|
260
|
+
/** Pattern mismatch message */
|
|
261
|
+
patternMismatch?: string;
|
|
262
|
+
/** Custom validator returned false */
|
|
263
|
+
validatorFailed?: string;
|
|
264
|
+
/** Custom validator threw */
|
|
265
|
+
validatorError?: string;
|
|
266
|
+
}
|
|
267
|
+
interface TigerLocale {
|
|
268
|
+
/** BCP 47 locale identifier, for Intl formatting and direction inference. */
|
|
269
|
+
locale?: string;
|
|
270
|
+
/** Text/layout direction. RTL locales should set this to `rtl`. */
|
|
271
|
+
direction?: TigerLocaleDirection;
|
|
272
|
+
common?: TigerLocaleCommon;
|
|
273
|
+
modal?: TigerLocaleModal;
|
|
274
|
+
drawer?: TigerLocaleDrawer;
|
|
275
|
+
upload?: TigerLocaleUpload;
|
|
276
|
+
pagination?: TigerLocalePagination;
|
|
277
|
+
table?: TigerLocaleTable;
|
|
278
|
+
datePicker?: Partial<DatePickerLocalePreset>;
|
|
279
|
+
timePicker?: TigerLocaleTimePicker;
|
|
280
|
+
formWizard?: TigerLocaleFormWizard;
|
|
281
|
+
taskBoard?: TigerLocaleTaskBoard;
|
|
282
|
+
formValidation?: TigerLocaleFormValidation;
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* Flat custom-text overlay for single-language projects that do not need i18n.
|
|
286
|
+
*
|
|
287
|
+
* Same shape as `TigerLocale` but without the `locale` code / `direction`
|
|
288
|
+
* fields — it carries only the component text. Pass it to
|
|
289
|
+
* `<ConfigProvider locale={defineText({...})} />` for app-wide custom text, or
|
|
290
|
+
* to a component's `labels` prop for a one-off override. No locale data files
|
|
291
|
+
* are pulled in, so the bundle stays small.
|
|
292
|
+
*/
|
|
293
|
+
type TigerText = Omit<Partial<TigerLocale>, 'locale' | 'direction'>;
|
|
294
|
+
type TigerLocaleLazyModule = Partial<TigerLocale> | {
|
|
295
|
+
default?: Partial<TigerLocale>;
|
|
296
|
+
} | Record<string, unknown>;
|
|
297
|
+
type TigerLocaleLoader = () => PromiseLike<TigerLocaleLazyModule>;
|
|
298
|
+
type TigerLocaleInput = Partial<TigerLocale> | PromiseLike<TigerLocaleLazyModule> | TigerLocaleLoader;
|
|
299
|
+
|
|
300
|
+
export type { TigerLocale as T, TigerLocaleInput as a, TigerLocaleLazyModule as b, TigerLocaleLoader as c, TigerLocaleDirection as d, TigerLocalePagination as e, TigerLocaleFormWizard as f, TigerLocaleTable as g, TigerLocaleTaskBoard as h, TigerLocaleFormValidation as i, TimePickerLabels as j, TigerText as k, TimeFormat as l, TigerLocaleDrawer as m, TigerLocaleModal as n, TimePickerSize as o, TimePickerSingleValue as p, TimePickerRangeValue as q, TimePickerModelValue as r, TimePickerProps as s, TigerLocaleCommon as t, TigerLocaleUpload as u, TigerLocaleTimePicker as v };
|