@mdigital_ui/ui 0.2.5 → 0.2.6
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/accordion/index.js +3 -3
- package/dist/badge/index.js +3 -3
- package/dist/breadcrumbs/index.js +5 -5
- package/dist/button/index.js +4 -4
- package/dist/button-group/index.js +2 -2
- package/dist/card/index.js +2 -2
- package/dist/carousel/index.js +2 -1
- package/dist/cascader/index.js +2 -2
- package/dist/chart/index.js +2 -2
- package/dist/checkbox/index.js +3 -3
- package/dist/checkbox-group/index.js +2 -2
- package/dist/chunk-22FIGRGO.js +312 -0
- package/dist/chunk-22FIGRGO.js.map +1 -0
- package/dist/{chunk-GEWR5ROK.js → chunk-23BPDLT4.js} +9 -16
- package/dist/chunk-23BPDLT4.js.map +1 -0
- package/dist/{chunk-YNNAOXU5.js → chunk-2OGZENFC.js} +3 -4
- package/dist/chunk-2OGZENFC.js.map +1 -0
- package/dist/{chunk-SOV4PE3P.js → chunk-35K7N4JT.js} +11 -4
- package/dist/chunk-35K7N4JT.js.map +1 -0
- package/dist/chunk-3QKPSJTV.js +120 -0
- package/dist/chunk-3QKPSJTV.js.map +1 -0
- package/dist/chunk-3WVJE5MF.js +735 -0
- package/dist/chunk-3WVJE5MF.js.map +1 -0
- package/dist/chunk-555KXZRK.js +73 -0
- package/dist/chunk-555KXZRK.js.map +1 -0
- package/dist/{chunk-FYHQDFKE.js → chunk-6IPISGTP.js} +31 -9
- package/dist/chunk-6IPISGTP.js.map +1 -0
- package/dist/chunk-6MYKJE6A.js +312 -0
- package/dist/chunk-6MYKJE6A.js.map +1 -0
- package/dist/{chunk-6V5I5HJ2.js → chunk-6PFBSVLK.js} +4 -4
- package/dist/{chunk-6V5I5HJ2.js.map → chunk-6PFBSVLK.js.map} +1 -1
- package/dist/{chunk-267WNY3E.js → chunk-77YTCM7G.js} +53 -60
- package/dist/chunk-77YTCM7G.js.map +1 -0
- package/dist/{chunk-XMAH5PDW.js → chunk-7BUNJYZO.js} +11 -10
- package/dist/chunk-7BUNJYZO.js.map +1 -0
- package/dist/chunk-7ODPSHIQ.js +78 -0
- package/dist/chunk-7ODPSHIQ.js.map +1 -0
- package/dist/{chunk-ZNJ7M5QK.js → chunk-7TN4PGYF.js} +29 -22
- package/dist/chunk-7TN4PGYF.js.map +1 -0
- package/dist/{chunk-RPAQAZTI.js → chunk-7YPX6NJK.js} +3 -3
- package/dist/{chunk-RPAQAZTI.js.map → chunk-7YPX6NJK.js.map} +1 -1
- package/dist/{chunk-LEKLQR4I.js → chunk-ARK3EROZ.js} +55 -38
- package/dist/chunk-ARK3EROZ.js.map +1 -0
- package/dist/chunk-AVPPV5OM.js +203 -0
- package/dist/chunk-AVPPV5OM.js.map +1 -0
- package/dist/{chunk-NNSS366W.js → chunk-BYWYC7RC.js} +38 -5
- package/dist/chunk-BYWYC7RC.js.map +1 -0
- package/dist/{chunk-R225A5II.js → chunk-C2MZL644.js} +3 -3
- package/dist/{chunk-R225A5II.js.map → chunk-C2MZL644.js.map} +1 -1
- package/dist/{chunk-7PKVBUGL.js → chunk-CPPFXCNB.js} +3 -3
- package/dist/{chunk-7PKVBUGL.js.map → chunk-CPPFXCNB.js.map} +1 -1
- package/dist/chunk-DP6AWUH5.js +93 -0
- package/dist/chunk-DP6AWUH5.js.map +1 -0
- package/dist/{chunk-D3JWPGCA.js → chunk-DV5J5NLI.js} +6 -55
- package/dist/chunk-DV5J5NLI.js.map +1 -0
- package/dist/chunk-EFMKUCGX.js +104 -0
- package/dist/chunk-EFMKUCGX.js.map +1 -0
- package/dist/chunk-GFQXGLFD.js +256 -0
- package/dist/chunk-GFQXGLFD.js.map +1 -0
- package/dist/{chunk-SK5ECBBK.js → chunk-GGREAJO5.js} +8 -4
- package/dist/chunk-GGREAJO5.js.map +1 -0
- package/dist/{chunk-S5XJXU52.js → chunk-GH3CNX5N.js} +3 -3
- package/dist/{chunk-S5XJXU52.js.map → chunk-GH3CNX5N.js.map} +1 -1
- package/dist/{chunk-FCMVKFVV.js → chunk-HBEJ4S2Y.js} +11 -11
- package/dist/chunk-HBEJ4S2Y.js.map +1 -0
- package/dist/{chunk-SAVE5ACL.js → chunk-HWSLJGT7.js} +3 -3
- package/dist/{chunk-SAVE5ACL.js.map → chunk-HWSLJGT7.js.map} +1 -1
- package/dist/{chunk-BNILRB4T.js → chunk-IHKPZOE5.js} +10 -7
- package/dist/chunk-IHKPZOE5.js.map +1 -0
- package/dist/{chunk-I5ANSIDK.js → chunk-INH7KYCK.js} +17 -17
- package/dist/chunk-INH7KYCK.js.map +1 -0
- package/dist/{chunk-Y5A26EGR.js → chunk-IRNJZ754.js} +9 -9
- package/dist/{chunk-Y5A26EGR.js.map → chunk-IRNJZ754.js.map} +1 -1
- package/dist/{chunk-MLDX3Z67.js → chunk-IUUEYOMN.js} +3 -3
- package/dist/{chunk-MLDX3Z67.js.map → chunk-IUUEYOMN.js.map} +1 -1
- package/dist/chunk-JFGLDCAK.js +225 -0
- package/dist/chunk-JFGLDCAK.js.map +1 -0
- package/dist/{chunk-C7SXY3ZV.js → chunk-JGQOEAWL.js} +3 -3
- package/dist/{chunk-C7SXY3ZV.js.map → chunk-JGQOEAWL.js.map} +1 -1
- package/dist/{chunk-75XESYGN.js → chunk-L6EVOPWH.js} +5 -13
- package/dist/chunk-L6EVOPWH.js.map +1 -0
- package/dist/{chunk-XMKNYG7I.js → chunk-LSQLUYTD.js} +35 -24
- package/dist/chunk-LSQLUYTD.js.map +1 -0
- package/dist/{chunk-QPJL66S7.js → chunk-MDY3HCRC.js} +80 -41
- package/dist/chunk-MDY3HCRC.js.map +1 -0
- package/dist/chunk-MLNIKNLI.js +150 -0
- package/dist/chunk-MLNIKNLI.js.map +1 -0
- package/dist/{chunk-J3G5WWGR.js → chunk-NQB4V5P7.js} +6 -14
- package/dist/chunk-NQB4V5P7.js.map +1 -0
- package/dist/chunk-NZA526GC.js +106 -0
- package/dist/chunk-NZA526GC.js.map +1 -0
- package/dist/{chunk-FGWSUPVW.js → chunk-O2VJ6KP4.js} +8 -3
- package/dist/chunk-O2VJ6KP4.js.map +1 -0
- package/dist/{chunk-OALOWWO7.js → chunk-PQZB43VJ.js} +32 -36
- package/dist/chunk-PQZB43VJ.js.map +1 -0
- package/dist/{chunk-UAMFKX6L.js → chunk-QVCGNOBE.js} +34 -20
- package/dist/chunk-QVCGNOBE.js.map +1 -0
- package/dist/{chunk-ASW7TEAN.js → chunk-R2FZO7AM.js} +14 -14
- package/dist/chunk-R2FZO7AM.js.map +1 -0
- package/dist/{chunk-HUVXKOJC.js → chunk-SGMIDNPI.js} +13 -9
- package/dist/chunk-SGMIDNPI.js.map +1 -0
- package/dist/{chunk-DOKTHDG3.js → chunk-SMVVCZNM.js} +3 -3
- package/dist/{chunk-DOKTHDG3.js.map → chunk-SMVVCZNM.js.map} +1 -1
- package/dist/{chunk-FPOXTCYV.js → chunk-SOIF4SHB.js} +8 -8
- package/dist/chunk-SOIF4SHB.js.map +1 -0
- package/dist/{chunk-RMGIO27V.js → chunk-SYDNDYZJ.js} +20 -4
- package/dist/chunk-SYDNDYZJ.js.map +1 -0
- package/dist/chunk-TG2AECIN.js +446 -0
- package/dist/chunk-TG2AECIN.js.map +1 -0
- package/dist/{chunk-JLTDJ3VZ.js → chunk-TIMRHEKH.js} +4 -4
- package/dist/{chunk-JLTDJ3VZ.js.map → chunk-TIMRHEKH.js.map} +1 -1
- package/dist/chunk-TUTOU4X6.js +574 -0
- package/dist/chunk-TUTOU4X6.js.map +1 -0
- package/dist/chunk-TWZ5LXLL.js +254 -0
- package/dist/chunk-TWZ5LXLL.js.map +1 -0
- package/dist/{chunk-DPOSWW22.js → chunk-XG3KLPPS.js} +5 -3
- package/dist/chunk-XG3KLPPS.js.map +1 -0
- package/dist/{chunk-BP434VYV.js → chunk-Y2CXG3PT.js} +12 -12
- package/dist/chunk-Y2CXG3PT.js.map +1 -0
- package/dist/{chunk-ROR4E6IE.js → chunk-YII4K64U.js} +5 -5
- package/dist/{chunk-ROR4E6IE.js.map → chunk-YII4K64U.js.map} +1 -1
- package/dist/clipboard/index.js +2 -2
- package/dist/collapse/index.js +2 -2
- package/dist/command/index.js +3 -3
- package/dist/date-picker/index.js +4 -3
- package/dist/descriptions/index.js +2 -2
- package/dist/drawer/index.js +2 -2
- package/dist/dropdown/index.js +4 -3
- package/dist/empty/index.js +2 -2
- package/dist/fetching-overlay/index.js +4 -3
- package/dist/grid/index.js +2 -2
- package/dist/image/index.js +2 -2
- package/dist/index.d.ts +1358 -156
- package/dist/index.js +762 -65
- package/dist/index.js.map +1 -1
- package/dist/input/index.js +4 -3
- package/dist/input-group/index.js +2 -2
- package/dist/input-otp/index.js +2 -2
- package/dist/input-password/index.js +5 -4
- package/dist/kbd/index.js +3 -2
- package/dist/modal/index.js +2 -2
- package/dist/multi-select/index.js +4 -3
- package/dist/notification/index.js +3 -2
- package/dist/pagination/index.js +2 -2
- package/dist/popover/index.js +3 -2
- package/dist/progress/index.js +2 -2
- package/dist/radio/index.js +3 -2
- package/dist/radio-group/index.js +2 -2
- package/dist/rating/index.js +2 -2
- package/dist/ribbon/index.js +2 -2
- package/dist/select/index.js +5 -4
- package/dist/skeleton/index.js +3 -2
- package/dist/slider/index.js +2 -2
- package/dist/spinner/index.js +3 -2
- package/dist/stepper/index.js +2 -2
- package/dist/styles/base.css +2033 -1313
- package/dist/styles/global.css +1242 -459
- package/dist/switch/index.js +3 -2
- package/dist/table/index.js +10 -10
- package/dist/tabs/index.js +3 -3
- package/dist/textarea/index.js +2 -2
- package/dist/toggle/index.js +2 -2
- package/dist/toggle-group/index.js +2 -2
- package/dist/tooltip/index.js +3 -2
- package/dist/transfer/index.js +4 -4
- package/dist/tree/index.js +2 -2
- package/dist/tree-select/index.js +5 -4
- package/dist/upload/index.js +2 -2
- package/package.json +3 -1
- package/dist/chunk-267WNY3E.js.map +0 -1
- package/dist/chunk-2EKAF6EJ.js +0 -128
- package/dist/chunk-2EKAF6EJ.js.map +0 -1
- package/dist/chunk-3PFA3YG6.js +0 -228
- package/dist/chunk-3PFA3YG6.js.map +0 -1
- package/dist/chunk-56IXGP5C.js +0 -56
- package/dist/chunk-56IXGP5C.js.map +0 -1
- package/dist/chunk-5UEWVFF6.js +0 -212
- package/dist/chunk-5UEWVFF6.js.map +0 -1
- package/dist/chunk-75XESYGN.js.map +0 -1
- package/dist/chunk-ASW7TEAN.js.map +0 -1
- package/dist/chunk-AWPKZYHT.js +0 -152
- package/dist/chunk-AWPKZYHT.js.map +0 -1
- package/dist/chunk-BFO3ARVJ.js +0 -104
- package/dist/chunk-BFO3ARVJ.js.map +0 -1
- package/dist/chunk-BNILRB4T.js.map +0 -1
- package/dist/chunk-BP434VYV.js.map +0 -1
- package/dist/chunk-C3MX5EXL.js +0 -95
- package/dist/chunk-C3MX5EXL.js.map +0 -1
- package/dist/chunk-D3JWPGCA.js.map +0 -1
- package/dist/chunk-DPOSWW22.js.map +0 -1
- package/dist/chunk-FCMVKFVV.js.map +0 -1
- package/dist/chunk-FGWSUPVW.js.map +0 -1
- package/dist/chunk-FPOXTCYV.js.map +0 -1
- package/dist/chunk-FYHQDFKE.js.map +0 -1
- package/dist/chunk-G6TAVRTJ.js +0 -640
- package/dist/chunk-G6TAVRTJ.js.map +0 -1
- package/dist/chunk-GEWR5ROK.js.map +0 -1
- package/dist/chunk-HUVXKOJC.js.map +0 -1
- package/dist/chunk-I5ANSIDK.js.map +0 -1
- package/dist/chunk-J3G5WWGR.js.map +0 -1
- package/dist/chunk-KBCBVH7B.js +0 -51
- package/dist/chunk-KBCBVH7B.js.map +0 -1
- package/dist/chunk-KNQ7UQ2W.js +0 -143
- package/dist/chunk-KNQ7UQ2W.js.map +0 -1
- package/dist/chunk-KTAIRCOL.js +0 -100
- package/dist/chunk-KTAIRCOL.js.map +0 -1
- package/dist/chunk-LEKLQR4I.js.map +0 -1
- package/dist/chunk-NNSS366W.js.map +0 -1
- package/dist/chunk-OALOWWO7.js.map +0 -1
- package/dist/chunk-OOS3B7YZ.js +0 -94
- package/dist/chunk-OOS3B7YZ.js.map +0 -1
- package/dist/chunk-OQANRZPV.js +0 -197
- package/dist/chunk-OQANRZPV.js.map +0 -1
- package/dist/chunk-OW5A5IIF.js +0 -175
- package/dist/chunk-OW5A5IIF.js.map +0 -1
- package/dist/chunk-QPJL66S7.js.map +0 -1
- package/dist/chunk-RMGIO27V.js.map +0 -1
- package/dist/chunk-SK5ECBBK.js.map +0 -1
- package/dist/chunk-SOV4PE3P.js.map +0 -1
- package/dist/chunk-UAMFKX6L.js.map +0 -1
- package/dist/chunk-XMAH5PDW.js.map +0 -1
- package/dist/chunk-XMKNYG7I.js.map +0 -1
- package/dist/chunk-YNNAOXU5.js.map +0 -1
- package/dist/chunk-YZ6V6BQ7.js +0 -134
- package/dist/chunk-YZ6V6BQ7.js.map +0 -1
- package/dist/chunk-YZVSDRJD.js +0 -253
- package/dist/chunk-YZVSDRJD.js.map +0 -1
- package/dist/chunk-ZNJ7M5QK.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -2,9 +2,9 @@ import { ClassValue } from 'clsx';
|
|
|
2
2
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
|
4
4
|
import * as React$1 from 'react';
|
|
5
|
-
import React__default, { ReactNode
|
|
6
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
|
+
import React__default, { ReactNode } from 'react';
|
|
7
6
|
import { SwiperProps } from 'swiper/react';
|
|
7
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
8
8
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
9
9
|
import { ColumnDef, Row } from '@tanstack/react-table';
|
|
10
10
|
import { Command as Command$1 } from 'cmdk';
|
|
@@ -19,13 +19,13 @@ declare function cn(...inputs: ClassValue[]): string;
|
|
|
19
19
|
/**
|
|
20
20
|
* Shared icon sizes for consistent sizing across components
|
|
21
21
|
* Used in Button, Input, Checkbox, Select, MultiSelect, DatePicker, TimePicker, etc.
|
|
22
|
+
* Standardized to 4-size scale: xs, sm, md, lg
|
|
22
23
|
*/
|
|
23
24
|
declare const iconSizes: {
|
|
24
25
|
readonly xs: "h-3 w-3";
|
|
25
26
|
readonly sm: "h-3.5 w-3.5";
|
|
26
27
|
readonly md: "h-4 w-4";
|
|
27
28
|
readonly lg: "h-5 w-5";
|
|
28
|
-
readonly xl: "h-6 w-6";
|
|
29
29
|
};
|
|
30
30
|
/**
|
|
31
31
|
* Validation status types for form components
|
|
@@ -60,7 +60,7 @@ declare function getValidationStatus(messages: StatusMessages): {
|
|
|
60
60
|
/**
|
|
61
61
|
* Shared TypeScript type definitions for the UI library
|
|
62
62
|
*/
|
|
63
|
-
type ComponentSize = 'xs' | 'sm' | 'md' | 'lg'
|
|
63
|
+
type ComponentSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
64
64
|
type ButtonColor$1 = 'primary' | 'secondary' | 'accent' | 'success' | 'error' | 'warning' | 'info';
|
|
65
65
|
type ComponentColor = 'default' | 'primary' | 'secondary' | 'accent' | 'success' | 'error' | 'warning' | 'info';
|
|
66
66
|
type ComponentVariant = 'solid' | 'outline' | 'ghost';
|
|
@@ -200,15 +200,173 @@ declare function createGhostColorVariants(colors: readonly string[]): {
|
|
|
200
200
|
* compoundVariants: createAllColorVariants(buttonColors, ['solid', 'outline', 'ghost'])
|
|
201
201
|
* })
|
|
202
202
|
*/
|
|
203
|
-
|
|
203
|
+
/**
|
|
204
|
+
* Supported variant types for compound variant generation
|
|
205
|
+
*/
|
|
206
|
+
type StyleVariantType = 'default' | 'solid' | 'outline' | 'soft' | 'dashed' | 'link' | 'ghost';
|
|
207
|
+
/**
|
|
208
|
+
* Shape of a generated compound variant object
|
|
209
|
+
* Uses 'any' for CVA compatibility - CVA's compound variants type is complex
|
|
210
|
+
* and using specific types causes type inference issues
|
|
211
|
+
*/
|
|
212
|
+
declare function createAllColorVariants<V extends StyleVariantType>(colors: readonly string[], variants: V[]): any[];
|
|
213
|
+
/**
|
|
214
|
+
* Text color classes for all component colors
|
|
215
|
+
* Used by: Checkbox icons, Spinner, text elements
|
|
216
|
+
*/
|
|
217
|
+
declare const textColorClasses: {
|
|
218
|
+
readonly default: "text-text-primary";
|
|
219
|
+
readonly primary: "text-primary";
|
|
220
|
+
readonly secondary: "text-secondary";
|
|
221
|
+
readonly accent: "text-accent";
|
|
222
|
+
readonly success: "text-success";
|
|
223
|
+
readonly error: "text-error";
|
|
224
|
+
readonly warning: "text-warning";
|
|
225
|
+
readonly info: "text-info";
|
|
226
|
+
};
|
|
227
|
+
/**
|
|
228
|
+
* Foreground text color classes for solid backgrounds (contrast colors)
|
|
229
|
+
* Used by: Solid buttons, badges, notifications - text that sits on colored backgrounds
|
|
230
|
+
* Note: Uses 'text-background' for semantic colors as they typically have white/light foreground
|
|
231
|
+
*/
|
|
232
|
+
declare const textForegroundColorClasses: {
|
|
233
|
+
readonly default: "text-text-primary";
|
|
234
|
+
readonly primary: "text-background";
|
|
235
|
+
readonly secondary: "text-background";
|
|
236
|
+
readonly accent: "text-background";
|
|
237
|
+
readonly success: "text-background";
|
|
238
|
+
readonly error: "text-background";
|
|
239
|
+
readonly warning: "text-background";
|
|
240
|
+
readonly info: "text-background";
|
|
241
|
+
};
|
|
242
|
+
/**
|
|
243
|
+
* Background color classes (solid)
|
|
244
|
+
* Used by: Solid buttons, badges, checked states
|
|
245
|
+
*/
|
|
246
|
+
declare const bgColorClasses: {
|
|
247
|
+
readonly default: "bg-surface";
|
|
248
|
+
readonly primary: "bg-primary";
|
|
249
|
+
readonly secondary: "bg-secondary";
|
|
250
|
+
readonly accent: "bg-accent";
|
|
251
|
+
readonly success: "bg-success";
|
|
252
|
+
readonly error: "bg-error";
|
|
253
|
+
readonly warning: "bg-warning";
|
|
254
|
+
readonly info: "bg-info";
|
|
255
|
+
};
|
|
256
|
+
/**
|
|
257
|
+
* Background color classes (soft/muted - 10% opacity)
|
|
258
|
+
* Used by: Soft variants, hover states
|
|
259
|
+
*/
|
|
260
|
+
declare const bgSoftColorClasses: {
|
|
261
|
+
readonly default: "bg-surface";
|
|
262
|
+
readonly primary: "bg-primary/10";
|
|
263
|
+
readonly secondary: "bg-secondary/10";
|
|
264
|
+
readonly accent: "bg-accent/10";
|
|
265
|
+
readonly success: "bg-success/10";
|
|
266
|
+
readonly error: "bg-error/10";
|
|
267
|
+
readonly warning: "bg-warning/10";
|
|
268
|
+
readonly info: "bg-info/10";
|
|
269
|
+
};
|
|
270
|
+
/**
|
|
271
|
+
* Background color classes for skeleton/placeholder (50% opacity)
|
|
272
|
+
* Used by: Skeleton component
|
|
273
|
+
*/
|
|
274
|
+
declare const bgSkeletonColorClasses: {
|
|
275
|
+
readonly default: "bg-surface";
|
|
276
|
+
readonly primary: "bg-primary/50";
|
|
277
|
+
readonly secondary: "bg-secondary/50";
|
|
278
|
+
readonly accent: "bg-accent/50";
|
|
279
|
+
readonly success: "bg-success/50";
|
|
280
|
+
readonly error: "bg-error/50";
|
|
281
|
+
readonly warning: "bg-warning/50";
|
|
282
|
+
readonly info: "bg-info/50";
|
|
283
|
+
};
|
|
284
|
+
/**
|
|
285
|
+
* Border color classes
|
|
286
|
+
* Used by: Checkbox, Radio, Input borders
|
|
287
|
+
*/
|
|
288
|
+
declare const borderColorClasses: {
|
|
289
|
+
readonly default: "border-border";
|
|
290
|
+
readonly primary: "border-primary";
|
|
291
|
+
readonly secondary: "border-secondary";
|
|
292
|
+
readonly accent: "border-accent";
|
|
293
|
+
readonly success: "border-success";
|
|
294
|
+
readonly error: "border-error";
|
|
295
|
+
readonly warning: "border-warning";
|
|
296
|
+
readonly info: "border-info";
|
|
297
|
+
};
|
|
298
|
+
/**
|
|
299
|
+
* Focus ring color classes
|
|
300
|
+
* Used by: Button, Switch, form elements
|
|
301
|
+
*/
|
|
302
|
+
declare const focusRingColorClasses: {
|
|
303
|
+
readonly default: "focus-visible:ring-border";
|
|
304
|
+
readonly primary: "focus-visible:ring-primary";
|
|
305
|
+
readonly secondary: "focus-visible:ring-secondary";
|
|
306
|
+
readonly accent: "focus-visible:ring-accent";
|
|
307
|
+
readonly success: "focus-visible:ring-success";
|
|
308
|
+
readonly error: "focus-visible:ring-error";
|
|
309
|
+
readonly warning: "focus-visible:ring-warning";
|
|
310
|
+
readonly info: "focus-visible:ring-info";
|
|
311
|
+
};
|
|
312
|
+
/**
|
|
313
|
+
* Combined background + border for checked/selected state
|
|
314
|
+
* Used by: Checkbox, Radio checked states
|
|
315
|
+
*/
|
|
316
|
+
declare const checkedColorClasses: {
|
|
317
|
+
readonly primary: "bg-primary border-primary";
|
|
318
|
+
readonly secondary: "bg-secondary border-secondary";
|
|
319
|
+
readonly accent: "bg-accent border-accent";
|
|
320
|
+
readonly success: "bg-success border-success";
|
|
321
|
+
readonly error: "bg-error border-error";
|
|
322
|
+
readonly warning: "bg-warning border-warning";
|
|
323
|
+
readonly info: "bg-info border-info";
|
|
324
|
+
};
|
|
325
|
+
/**
|
|
326
|
+
* Switch track colors (unchecked -> checked)
|
|
327
|
+
* Used by: Switch component
|
|
328
|
+
*/
|
|
329
|
+
declare const switchTrackColorClasses: {
|
|
330
|
+
readonly primary: "bg-border peer-checked:bg-primary peer-focus-visible:ring-primary";
|
|
331
|
+
readonly secondary: "bg-border peer-checked:bg-secondary peer-focus-visible:ring-secondary";
|
|
332
|
+
readonly accent: "bg-border peer-checked:bg-accent peer-focus-visible:ring-accent";
|
|
333
|
+
readonly success: "bg-border peer-checked:bg-success peer-focus-visible:ring-success";
|
|
334
|
+
readonly error: "bg-border peer-checked:bg-error peer-focus-visible:ring-error";
|
|
335
|
+
readonly warning: "bg-border peer-checked:bg-warning peer-focus-visible:ring-warning";
|
|
336
|
+
readonly info: "bg-border peer-checked:bg-info peer-focus-visible:ring-info";
|
|
337
|
+
};
|
|
338
|
+
/**
|
|
339
|
+
* Checkbox border colors (default -> checked)
|
|
340
|
+
* Used by: Checkbox component
|
|
341
|
+
*/
|
|
342
|
+
declare const checkboxBorderColorClasses: {
|
|
343
|
+
readonly primary: "border-border checked:border-primary";
|
|
344
|
+
readonly secondary: "border-border checked:border-secondary";
|
|
345
|
+
readonly accent: "border-border checked:border-accent";
|
|
346
|
+
readonly success: "border-border checked:border-success";
|
|
347
|
+
readonly error: "border-border checked:border-error";
|
|
348
|
+
readonly warning: "border-border checked:border-warning";
|
|
349
|
+
readonly info: "border-border checked:border-info";
|
|
350
|
+
};
|
|
351
|
+
/**
|
|
352
|
+
* Radio button inset shadow colors for checked state
|
|
353
|
+
* Used by: Radio component
|
|
354
|
+
*/
|
|
355
|
+
declare const radioCheckedColorClasses: {
|
|
356
|
+
readonly primary: "checked:border-primary checked:shadow-[inset_0_0_0_2px_var(--color-background),inset_0_0_0_13px_var(--color-primary)]";
|
|
357
|
+
readonly secondary: "checked:border-secondary checked:shadow-[inset_0_0_0_2px_var(--color-background),inset_0_0_0_13px_var(--color-secondary)]";
|
|
358
|
+
readonly accent: "checked:border-accent checked:shadow-[inset_0_0_0_2px_var(--color-background),inset_0_0_0_13px_var(--color-accent)]";
|
|
359
|
+
readonly success: "checked:border-success checked:shadow-[inset_0_0_0_2px_var(--color-background),inset_0_0_0_13px_var(--color-success)]";
|
|
360
|
+
readonly error: "checked:border-error checked:shadow-[inset_0_0_0_2px_var(--color-background),inset_0_0_0_13px_var(--color-error)]";
|
|
361
|
+
readonly warning: "checked:border-warning checked:shadow-[inset_0_0_0_2px_var(--color-background),inset_0_0_0_13px_var(--color-warning)]";
|
|
362
|
+
readonly info: "checked:border-info checked:shadow-[inset_0_0_0_2px_var(--color-background),inset_0_0_0_13px_var(--color-info)]";
|
|
363
|
+
};
|
|
204
364
|
/**
|
|
205
365
|
* Icon color variants mapped to component colors
|
|
206
|
-
*
|
|
207
|
-
*
|
|
208
|
-
* Maps to Tailwind utilities: text-primary, text-secondary, etc.
|
|
209
|
-
* Generated from theme variables: --color-primary, --color-secondary, etc.
|
|
366
|
+
* @deprecated Use textColorClasses instead
|
|
210
367
|
*/
|
|
211
368
|
declare const iconColorClasses: {
|
|
369
|
+
readonly default: "text-text-primary";
|
|
212
370
|
readonly primary: "text-primary";
|
|
213
371
|
readonly secondary: "text-secondary";
|
|
214
372
|
readonly accent: "text-accent";
|
|
@@ -219,6 +377,7 @@ declare const iconColorClasses: {
|
|
|
219
377
|
};
|
|
220
378
|
/**
|
|
221
379
|
* Helper to get icon color class for a given color
|
|
380
|
+
* @deprecated Use textColorClasses[color] instead
|
|
222
381
|
*/
|
|
223
382
|
declare function getIconColorClass(color: ButtonColor$1): string;
|
|
224
383
|
/**
|
|
@@ -230,25 +389,14 @@ declare const textColorVariants: (props?: ({
|
|
|
230
389
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
231
390
|
type TextColorVariants = VariantProps<typeof textColorVariants>;
|
|
232
391
|
/**
|
|
233
|
-
* Standard component size scale (4 sizes)
|
|
234
|
-
* Used by:
|
|
392
|
+
* Standard component size scale (4 sizes: xs, sm, md, lg)
|
|
393
|
+
* Used by: All components - this is the standardized size scale
|
|
235
394
|
*/
|
|
236
395
|
declare const componentSizeVariants: {
|
|
237
|
-
readonly sm: "sm";
|
|
238
|
-
readonly md: "md";
|
|
239
|
-
readonly lg: "lg";
|
|
240
|
-
readonly xl: "xl";
|
|
241
|
-
};
|
|
242
|
-
/**
|
|
243
|
-
* Extended component size scale (5 sizes)
|
|
244
|
-
* Used by: Components that need extra small sizing
|
|
245
|
-
*/
|
|
246
|
-
declare const extendedComponentSizeVariants: {
|
|
247
396
|
readonly xs: "xs";
|
|
248
397
|
readonly sm: "sm";
|
|
249
398
|
readonly md: "md";
|
|
250
399
|
readonly lg: "lg";
|
|
251
|
-
readonly xl: "xl";
|
|
252
400
|
};
|
|
253
401
|
/**
|
|
254
402
|
* Common spacing values for consistent gaps, padding, and margins
|
|
@@ -286,9 +434,137 @@ declare function getAccordionColorClass(color: ComponentColor, variant: 'default
|
|
|
286
434
|
* @returns Background class string
|
|
287
435
|
*/
|
|
288
436
|
declare function getCheckboxColorClass(color: ButtonColor$1): string;
|
|
437
|
+
/**
|
|
438
|
+
* Generates compound variants for notification solid style (with foreground text)
|
|
439
|
+
* Used by: Notification, Alert components
|
|
440
|
+
*/
|
|
441
|
+
declare function createNotificationSolidColorVariants(colors: readonly string[]): {
|
|
442
|
+
variant: "solid";
|
|
443
|
+
color: ComponentColor;
|
|
444
|
+
class: string;
|
|
445
|
+
}[];
|
|
446
|
+
/**
|
|
447
|
+
* Generates compound variants for notification outlined style (border with thick left border)
|
|
448
|
+
* Used by: Notification, Alert components
|
|
449
|
+
*/
|
|
450
|
+
declare function createNotificationOutlinedColorVariants(colors: readonly string[]): {
|
|
451
|
+
variant: "outlined";
|
|
452
|
+
color: ComponentColor;
|
|
453
|
+
class: string;
|
|
454
|
+
}[];
|
|
455
|
+
/**
|
|
456
|
+
* Generates compound variants for notification soft style (subtle bg with left border)
|
|
457
|
+
* Used by: Notification, Alert components
|
|
458
|
+
*/
|
|
459
|
+
declare function createNotificationSoftColorVariants(colors: readonly string[]): {
|
|
460
|
+
variant: "soft";
|
|
461
|
+
color: ComponentColor;
|
|
462
|
+
class: string;
|
|
463
|
+
}[];
|
|
464
|
+
/**
|
|
465
|
+
* Notification variant type
|
|
466
|
+
*/
|
|
467
|
+
type NotificationVariantType = 'default' | 'solid' | 'outlined' | 'soft';
|
|
468
|
+
/**
|
|
469
|
+
* Complete notification color variant generator
|
|
470
|
+
*/
|
|
471
|
+
declare function createNotificationColorVariants(colors: readonly string[], variants: NotificationVariantType[]): any[];
|
|
472
|
+
/**
|
|
473
|
+
* Tooltip solid color classes (background with contrasting text)
|
|
474
|
+
* Used by: Tooltip component solid variant
|
|
475
|
+
*/
|
|
476
|
+
declare const tooltipSolidColorClasses: {
|
|
477
|
+
readonly default: "bg-text-primary text-background";
|
|
478
|
+
readonly primary: "bg-primary text-background";
|
|
479
|
+
readonly secondary: "bg-secondary text-background";
|
|
480
|
+
readonly accent: "bg-accent text-background";
|
|
481
|
+
readonly success: "bg-success text-background";
|
|
482
|
+
readonly error: "bg-error text-background";
|
|
483
|
+
readonly warning: "bg-warning text-background";
|
|
484
|
+
readonly info: "bg-info text-background";
|
|
485
|
+
};
|
|
486
|
+
/**
|
|
487
|
+
* Generates compound variants for tooltip soft style
|
|
488
|
+
* Used by: Tooltip component soft variant
|
|
489
|
+
*/
|
|
490
|
+
declare function createTooltipSoftColorVariants(colors: readonly string[]): {
|
|
491
|
+
variant: "soft";
|
|
492
|
+
color: ComponentColor;
|
|
493
|
+
className: string;
|
|
494
|
+
}[];
|
|
495
|
+
/**
|
|
496
|
+
* Generates compound variants for Kbd solid style
|
|
497
|
+
* Used by: Kbd component
|
|
498
|
+
*/
|
|
499
|
+
declare function createKbdSolidColorVariants(colors: readonly string[]): {
|
|
500
|
+
variant: "solid";
|
|
501
|
+
color: ComponentColor;
|
|
502
|
+
class: string;
|
|
503
|
+
}[];
|
|
504
|
+
/**
|
|
505
|
+
* Generates compound variants for Kbd outline style
|
|
506
|
+
* Used by: Kbd component
|
|
507
|
+
*/
|
|
508
|
+
declare function createKbdOutlineColorVariants(colors: readonly string[]): {
|
|
509
|
+
variant: "outline";
|
|
510
|
+
color: ComponentColor;
|
|
511
|
+
class: string;
|
|
512
|
+
}[];
|
|
513
|
+
/**
|
|
514
|
+
* Generates compound variants for Kbd soft style
|
|
515
|
+
* Used by: Kbd component
|
|
516
|
+
*/
|
|
517
|
+
declare function createKbdSoftColorVariants(colors: readonly string[]): {
|
|
518
|
+
variant: "soft";
|
|
519
|
+
color: ComponentColor;
|
|
520
|
+
class: string;
|
|
521
|
+
}[];
|
|
522
|
+
/**
|
|
523
|
+
* Kbd variant type
|
|
524
|
+
*/
|
|
525
|
+
type KbdVariantType = 'solid' | 'outline' | 'soft';
|
|
526
|
+
/**
|
|
527
|
+
* Complete Kbd color variant generator
|
|
528
|
+
*/
|
|
529
|
+
declare function createKbdColorVariants(colors: readonly string[], variants: KbdVariantType[]): any[];
|
|
530
|
+
/**
|
|
531
|
+
* Generates compound variants for Popover default style
|
|
532
|
+
* Used by: Popover component
|
|
533
|
+
*/
|
|
534
|
+
declare function createPopoverDefaultColorVariants(colors: readonly string[]): {
|
|
535
|
+
variant: "default";
|
|
536
|
+
color: ComponentColor;
|
|
537
|
+
class: string;
|
|
538
|
+
}[];
|
|
539
|
+
/**
|
|
540
|
+
* Generates compound variants for Popover solid style
|
|
541
|
+
* Used by: Popover component
|
|
542
|
+
*/
|
|
543
|
+
declare function createPopoverSolidColorVariants(colors: readonly string[]): {
|
|
544
|
+
variant: "solid";
|
|
545
|
+
color: ComponentColor;
|
|
546
|
+
class: string;
|
|
547
|
+
}[];
|
|
548
|
+
/**
|
|
549
|
+
* Generates compound variants for Popover soft style (with backdrop blur)
|
|
550
|
+
* Used by: Popover component
|
|
551
|
+
*/
|
|
552
|
+
declare function createPopoverSoftColorVariants(colors: readonly string[]): {
|
|
553
|
+
variant: "soft";
|
|
554
|
+
color: ComponentColor;
|
|
555
|
+
class: string;
|
|
556
|
+
}[];
|
|
557
|
+
/**
|
|
558
|
+
* Popover variant type
|
|
559
|
+
*/
|
|
560
|
+
type PopoverVariantType = 'default' | 'solid' | 'soft';
|
|
561
|
+
/**
|
|
562
|
+
* Complete Popover color variant generator
|
|
563
|
+
*/
|
|
564
|
+
declare function createPopoverColorVariants(colors: readonly string[], variants: PopoverVariantType[]): any[];
|
|
289
565
|
|
|
290
|
-
type AccordionVariant =
|
|
291
|
-
type AccordionSize =
|
|
566
|
+
type AccordionVariant = "default" | "solid" | "soft" | "bordered" | "splitted";
|
|
567
|
+
type AccordionSize = "xs" | "sm" | "md" | "lg";
|
|
292
568
|
interface AccordionItem {
|
|
293
569
|
/**
|
|
294
570
|
* Unique key for the accordion item
|
|
@@ -307,9 +583,17 @@ interface AccordionItem {
|
|
|
307
583
|
*/
|
|
308
584
|
disabled?: boolean;
|
|
309
585
|
/**
|
|
310
|
-
* Custom icon for the item
|
|
586
|
+
* Custom icon for the item (displayed before title)
|
|
311
587
|
*/
|
|
312
588
|
icon?: React.ReactNode;
|
|
589
|
+
/**
|
|
590
|
+
* Subtitle displayed below title
|
|
591
|
+
*/
|
|
592
|
+
subtitle?: React.ReactNode;
|
|
593
|
+
/**
|
|
594
|
+
* Extra content displayed on the right side of the header (before expand icon)
|
|
595
|
+
*/
|
|
596
|
+
extra?: React.ReactNode;
|
|
313
597
|
}
|
|
314
598
|
interface AccordionProps {
|
|
315
599
|
/**
|
|
@@ -318,14 +602,22 @@ interface AccordionProps {
|
|
|
318
602
|
items: AccordionItem[];
|
|
319
603
|
/**
|
|
320
604
|
* Theme color
|
|
605
|
+
* @default 'default'
|
|
321
606
|
*/
|
|
322
607
|
color?: ComponentColor;
|
|
323
608
|
/**
|
|
324
|
-
* Size variant
|
|
609
|
+
* Size variant
|
|
610
|
+
* @default 'md'
|
|
325
611
|
*/
|
|
326
612
|
size?: AccordionSize;
|
|
327
613
|
/**
|
|
328
614
|
* Visual style variant
|
|
615
|
+
* - default: subtle background on hover
|
|
616
|
+
* - solid: filled background
|
|
617
|
+
* - soft: light colored background
|
|
618
|
+
* - bordered: outline border only
|
|
619
|
+
* - splitted: separated cards with gap
|
|
620
|
+
* @default 'default'
|
|
329
621
|
*/
|
|
330
622
|
variant?: AccordionVariant;
|
|
331
623
|
/**
|
|
@@ -342,30 +634,305 @@ interface AccordionProps {
|
|
|
342
634
|
onChange?: (activeKey: string | string[]) => void;
|
|
343
635
|
/**
|
|
344
636
|
* Allow multiple panels to be open simultaneously
|
|
637
|
+
* @default false
|
|
345
638
|
*/
|
|
346
639
|
multiple?: boolean;
|
|
640
|
+
/**
|
|
641
|
+
* Custom expand/collapse icon or false to hide
|
|
642
|
+
*/
|
|
643
|
+
expandIcon?: React.ReactNode | ((isExpanded: boolean) => React.ReactNode) | false;
|
|
644
|
+
/**
|
|
645
|
+
* Position of expand icon
|
|
646
|
+
* @default 'right'
|
|
647
|
+
*/
|
|
648
|
+
expandIconPosition?: "left" | "right";
|
|
649
|
+
/**
|
|
650
|
+
* Whether at least one panel must remain open
|
|
651
|
+
* Only works when multiple is false
|
|
652
|
+
* @default false
|
|
653
|
+
*/
|
|
654
|
+
collapsible?: boolean;
|
|
655
|
+
/**
|
|
656
|
+
* Unmount content when panel is collapsed (for performance)
|
|
657
|
+
* @default false
|
|
658
|
+
*/
|
|
659
|
+
destroyOnClose?: boolean;
|
|
660
|
+
/**
|
|
661
|
+
* Show divider between items (only for non-splitted variants)
|
|
662
|
+
* @default true
|
|
663
|
+
*/
|
|
664
|
+
showDivider?: boolean;
|
|
347
665
|
/**
|
|
348
666
|
* Additional CSS class
|
|
349
667
|
*/
|
|
350
668
|
className?: string;
|
|
669
|
+
/**
|
|
670
|
+
* Additional CSS class for each item
|
|
671
|
+
*/
|
|
672
|
+
itemClassName?: string;
|
|
673
|
+
/**
|
|
674
|
+
* Reference to the accordion container
|
|
675
|
+
*/
|
|
676
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
351
677
|
}
|
|
352
678
|
|
|
353
679
|
declare const Accordion: React__default.NamedExoticComponent<AccordionProps>;
|
|
354
680
|
|
|
681
|
+
/**
|
|
682
|
+
* Size variants for Avatar component
|
|
683
|
+
*/
|
|
684
|
+
type AvatarSize = ComponentSize;
|
|
685
|
+
/**
|
|
686
|
+
* Shape variants for Avatar component
|
|
687
|
+
*/
|
|
688
|
+
type AvatarShape = "circle" | "square";
|
|
689
|
+
/**
|
|
690
|
+
* Status indicator states for Avatar
|
|
691
|
+
*/
|
|
692
|
+
type AvatarStatus = "online" | "offline" | "away" | "busy";
|
|
693
|
+
/**
|
|
694
|
+
* Color variants for Avatar background (used with fallback/initials)
|
|
695
|
+
*/
|
|
696
|
+
type AvatarColor = "default" | "primary" | "secondary" | "accent" | "success" | "error" | "warning" | "info";
|
|
697
|
+
interface AvatarProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
698
|
+
/**
|
|
699
|
+
* Image source URL
|
|
700
|
+
*/
|
|
701
|
+
src?: string;
|
|
702
|
+
/**
|
|
703
|
+
* Alternative text for the image
|
|
704
|
+
*/
|
|
705
|
+
alt?: string;
|
|
706
|
+
/**
|
|
707
|
+
* Fallback text (initials) when image fails to load
|
|
708
|
+
* If not provided, will try to generate from `name` prop
|
|
709
|
+
*/
|
|
710
|
+
fallback?: string;
|
|
711
|
+
/**
|
|
712
|
+
* User's name - used to auto-generate initials if fallback not provided
|
|
713
|
+
*/
|
|
714
|
+
name?: string;
|
|
715
|
+
/**
|
|
716
|
+
* Avatar size
|
|
717
|
+
* @default 'md'
|
|
718
|
+
*/
|
|
719
|
+
size?: AvatarSize;
|
|
720
|
+
/**
|
|
721
|
+
* Avatar shape
|
|
722
|
+
* @default 'circle'
|
|
723
|
+
*/
|
|
724
|
+
shape?: AvatarShape;
|
|
725
|
+
/**
|
|
726
|
+
* Status indicator
|
|
727
|
+
*/
|
|
728
|
+
status?: AvatarStatus;
|
|
729
|
+
/**
|
|
730
|
+
* Background color for fallback/initials
|
|
731
|
+
* @default 'default'
|
|
732
|
+
*/
|
|
733
|
+
color?: AvatarColor;
|
|
734
|
+
/**
|
|
735
|
+
* Show border/ring around avatar
|
|
736
|
+
* @default false
|
|
737
|
+
*/
|
|
738
|
+
bordered?: boolean;
|
|
739
|
+
/**
|
|
740
|
+
* Custom icon to show as fallback instead of initials
|
|
741
|
+
*/
|
|
742
|
+
icon?: React.ReactNode;
|
|
743
|
+
/**
|
|
744
|
+
* Badge content (number, icon, or custom element)
|
|
745
|
+
* Displayed at top-right corner
|
|
746
|
+
*/
|
|
747
|
+
badge?: React.ReactNode;
|
|
748
|
+
/**
|
|
749
|
+
* Whether avatar is in disabled state
|
|
750
|
+
* @default false
|
|
751
|
+
*/
|
|
752
|
+
disabled?: boolean;
|
|
753
|
+
/**
|
|
754
|
+
* Callback when image fails to load
|
|
755
|
+
*/
|
|
756
|
+
onError?: (event: React.SyntheticEvent<HTMLImageElement>) => void;
|
|
757
|
+
/**
|
|
758
|
+
* Additional CSS class
|
|
759
|
+
*/
|
|
760
|
+
className?: string;
|
|
761
|
+
/**
|
|
762
|
+
* Reference to the avatar element
|
|
763
|
+
*/
|
|
764
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
765
|
+
}
|
|
766
|
+
interface AvatarGroupProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
767
|
+
/**
|
|
768
|
+
* Avatar children
|
|
769
|
+
*/
|
|
770
|
+
children: React.ReactNode;
|
|
771
|
+
/**
|
|
772
|
+
* Maximum number of avatars to display
|
|
773
|
+
*/
|
|
774
|
+
max?: number;
|
|
775
|
+
/**
|
|
776
|
+
* Size for all avatars in group
|
|
777
|
+
* @default 'md'
|
|
778
|
+
*/
|
|
779
|
+
size?: AvatarSize;
|
|
780
|
+
/**
|
|
781
|
+
* Shape for all avatars in group
|
|
782
|
+
* @default 'circle'
|
|
783
|
+
*/
|
|
784
|
+
shape?: AvatarShape;
|
|
785
|
+
/**
|
|
786
|
+
* Show total count instead of remaining count
|
|
787
|
+
* @default false
|
|
788
|
+
*/
|
|
789
|
+
showTotal?: boolean;
|
|
790
|
+
/**
|
|
791
|
+
* Custom render function for surplus count
|
|
792
|
+
*/
|
|
793
|
+
renderSurplus?: (surplus: number) => React.ReactNode;
|
|
794
|
+
/**
|
|
795
|
+
* Whether avatars are bordered
|
|
796
|
+
* @default false
|
|
797
|
+
*/
|
|
798
|
+
bordered?: boolean;
|
|
799
|
+
/**
|
|
800
|
+
* Additional CSS class
|
|
801
|
+
*/
|
|
802
|
+
className?: string;
|
|
803
|
+
/**
|
|
804
|
+
* Reference to the group element
|
|
805
|
+
*/
|
|
806
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
/**
|
|
810
|
+
* Avatar Component
|
|
811
|
+
*/
|
|
812
|
+
declare const Avatar: React__default.NamedExoticComponent<AvatarProps>;
|
|
813
|
+
/**
|
|
814
|
+
* AvatarGroup Component
|
|
815
|
+
*/
|
|
816
|
+
declare const AvatarGroup: React__default.NamedExoticComponent<AvatarGroupProps>;
|
|
817
|
+
|
|
355
818
|
type BadgeVariant = 'default' | 'solid' | 'outline' | 'soft';
|
|
356
819
|
type BadgeColor = ComponentColor;
|
|
357
820
|
type BadgeSize = Exclude<ComponentSize, 'xl'>;
|
|
821
|
+
type BadgeShape = 'rounded' | 'pill' | 'circle';
|
|
822
|
+
type BadgePlacement = 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left';
|
|
358
823
|
interface BadgeProps {
|
|
824
|
+
/**
|
|
825
|
+
* Content to wrap with the badge (when provided, badge floats over it)
|
|
826
|
+
*/
|
|
359
827
|
children?: React.ReactNode;
|
|
828
|
+
/**
|
|
829
|
+
* Visual style variant
|
|
830
|
+
* @default 'solid'
|
|
831
|
+
*/
|
|
360
832
|
variant?: BadgeVariant;
|
|
833
|
+
/**
|
|
834
|
+
* Theme color
|
|
835
|
+
* @default 'primary'
|
|
836
|
+
*/
|
|
361
837
|
color?: BadgeColor;
|
|
838
|
+
/**
|
|
839
|
+
* Badge size
|
|
840
|
+
* @default 'sm'
|
|
841
|
+
*/
|
|
362
842
|
size?: BadgeSize;
|
|
843
|
+
/**
|
|
844
|
+
* Badge shape
|
|
845
|
+
* @default 'rounded'
|
|
846
|
+
*/
|
|
847
|
+
shape?: BadgeShape;
|
|
848
|
+
/**
|
|
849
|
+
* Display as a dot indicator instead of content
|
|
850
|
+
* @default false
|
|
851
|
+
*/
|
|
363
852
|
dot?: boolean;
|
|
853
|
+
/**
|
|
854
|
+
* Numeric count to display
|
|
855
|
+
*/
|
|
364
856
|
count?: number;
|
|
857
|
+
/**
|
|
858
|
+
* Maximum count to show before displaying overflow indicator
|
|
859
|
+
* @default 99
|
|
860
|
+
*/
|
|
861
|
+
maxCount?: number;
|
|
862
|
+
/**
|
|
863
|
+
* Whether to show badge when count is 0
|
|
864
|
+
* @default false
|
|
865
|
+
*/
|
|
365
866
|
showZero?: boolean;
|
|
867
|
+
/**
|
|
868
|
+
* Icon to display in the badge (before text)
|
|
869
|
+
*/
|
|
870
|
+
icon?: React.ReactNode;
|
|
871
|
+
/**
|
|
872
|
+
* Placement of floating badge relative to children
|
|
873
|
+
* @default 'top-right'
|
|
874
|
+
*/
|
|
875
|
+
placement?: BadgePlacement;
|
|
876
|
+
/**
|
|
877
|
+
* Custom offset for floating badge position [x, y] in pixels
|
|
878
|
+
* Positive values move towards center, negative values move away
|
|
879
|
+
*/
|
|
880
|
+
offset?: [number, number];
|
|
881
|
+
/**
|
|
882
|
+
* Show pulsing animation (useful for notification indicators)
|
|
883
|
+
* @default false
|
|
884
|
+
*/
|
|
885
|
+
processing?: boolean;
|
|
886
|
+
/**
|
|
887
|
+
* Hide the badge visually while keeping it in the DOM
|
|
888
|
+
* @default false
|
|
889
|
+
*/
|
|
890
|
+
invisible?: boolean;
|
|
891
|
+
/**
|
|
892
|
+
* Force standalone rendering even when children are present
|
|
893
|
+
* @default false
|
|
894
|
+
*/
|
|
895
|
+
standalone?: boolean;
|
|
896
|
+
/**
|
|
897
|
+
* Badge content (alternative to count, renders custom content)
|
|
898
|
+
*/
|
|
899
|
+
content?: React.ReactNode;
|
|
900
|
+
/**
|
|
901
|
+
* Additional CSS class
|
|
902
|
+
*/
|
|
366
903
|
className?: string;
|
|
904
|
+
/**
|
|
905
|
+
* Additional CSS class for the badge wrapper (when floating)
|
|
906
|
+
*/
|
|
907
|
+
wrapperClassName?: string;
|
|
908
|
+
/**
|
|
909
|
+
* Reference to the badge element
|
|
910
|
+
*/
|
|
911
|
+
ref?: React.Ref<HTMLSpanElement>;
|
|
367
912
|
}
|
|
368
913
|
|
|
914
|
+
/**
|
|
915
|
+
* Badge Component
|
|
916
|
+
*
|
|
917
|
+
* A versatile badge component for displaying counts, status indicators, or labels.
|
|
918
|
+
* Can be used standalone or as a floating indicator over other elements.
|
|
919
|
+
*
|
|
920
|
+
* @example
|
|
921
|
+
* // Standalone badge
|
|
922
|
+
* <Badge>New</Badge>
|
|
923
|
+
*
|
|
924
|
+
* @example
|
|
925
|
+
* // Badge with count floating over an icon
|
|
926
|
+
* <Badge count={5}>
|
|
927
|
+
* <BellIcon />
|
|
928
|
+
* </Badge>
|
|
929
|
+
*
|
|
930
|
+
* @example
|
|
931
|
+
* // Dot indicator with pulse
|
|
932
|
+
* <Badge dot processing color="success">
|
|
933
|
+
* <Avatar />
|
|
934
|
+
* </Badge>
|
|
935
|
+
*/
|
|
369
936
|
declare const Badge: React__default.NamedExoticComponent<BadgeProps>;
|
|
370
937
|
|
|
371
938
|
type BreadcrumbsColor = 'default' | 'primary' | 'secondary' | 'accent' | 'success' | 'error' | 'warning' | 'info';
|
|
@@ -392,114 +959,349 @@ interface BreadcrumbItemData {
|
|
|
392
959
|
*/
|
|
393
960
|
rightIcon?: ReactNode;
|
|
394
961
|
/**
|
|
395
|
-
* Whether this item should be shown as an ellipsis dropdown
|
|
962
|
+
* Whether this item should be shown as an ellipsis dropdown
|
|
963
|
+
*/
|
|
964
|
+
ellipsis?: boolean;
|
|
965
|
+
/**
|
|
966
|
+
* Orientation of ellipsis icon
|
|
967
|
+
*/
|
|
968
|
+
ellipsisOrientation?: 'horizontal' | 'vertical';
|
|
969
|
+
/**
|
|
970
|
+
* Items to show in the ellipsis dropdown
|
|
971
|
+
*/
|
|
972
|
+
ellipsisItems?: Array<{
|
|
973
|
+
label: string;
|
|
974
|
+
href?: string;
|
|
975
|
+
onClick?: () => void;
|
|
976
|
+
}>;
|
|
977
|
+
}
|
|
978
|
+
interface BreadcrumbProps {
|
|
979
|
+
/**
|
|
980
|
+
* Breadcrumb items to render
|
|
981
|
+
*/
|
|
982
|
+
items?: BreadcrumbItemData[];
|
|
983
|
+
/**
|
|
984
|
+
* Manual children (alternative to items prop)
|
|
985
|
+
*/
|
|
986
|
+
children?: ReactNode;
|
|
987
|
+
/**
|
|
988
|
+
* Theme color
|
|
989
|
+
*/
|
|
990
|
+
color?: BreadcrumbsColor;
|
|
991
|
+
/**
|
|
992
|
+
* Size variant
|
|
993
|
+
*/
|
|
994
|
+
size?: BreadcrumbsSize;
|
|
995
|
+
/**
|
|
996
|
+
* Custom separator element
|
|
997
|
+
*/
|
|
998
|
+
separator?: ReactNode;
|
|
999
|
+
/**
|
|
1000
|
+
* Additional CSS class
|
|
1001
|
+
*/
|
|
1002
|
+
className?: string;
|
|
1003
|
+
}
|
|
1004
|
+
|
|
1005
|
+
declare const Breadcrumb: React__default.NamedExoticComponent<BreadcrumbProps>;
|
|
1006
|
+
|
|
1007
|
+
type ButtonVariant = ComponentVariantExtended | "soft";
|
|
1008
|
+
type ButtonColor = ButtonColor$1;
|
|
1009
|
+
type ButtonSize = "xs" | "sm" | "md" | "lg";
|
|
1010
|
+
type ButtonShape = "rounded" | "pill" | "square";
|
|
1011
|
+
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
1012
|
+
/**
|
|
1013
|
+
* Visual style variant
|
|
1014
|
+
* @default 'solid'
|
|
1015
|
+
*/
|
|
1016
|
+
variant?: ButtonVariant;
|
|
1017
|
+
/**
|
|
1018
|
+
* Theme color
|
|
1019
|
+
* @default 'primary'
|
|
1020
|
+
*/
|
|
1021
|
+
color?: ButtonColor;
|
|
1022
|
+
/**
|
|
1023
|
+
* Button size
|
|
1024
|
+
* @default 'md'
|
|
1025
|
+
*/
|
|
1026
|
+
size?: ButtonSize;
|
|
1027
|
+
/**
|
|
1028
|
+
* Button shape
|
|
1029
|
+
* @default 'rounded'
|
|
1030
|
+
*/
|
|
1031
|
+
shape?: ButtonShape;
|
|
1032
|
+
/**
|
|
1033
|
+
* Whether button is in loading state
|
|
1034
|
+
* @default false
|
|
1035
|
+
*/
|
|
1036
|
+
loading?: boolean;
|
|
1037
|
+
/**
|
|
1038
|
+
* Text to display while loading (replaces children)
|
|
1039
|
+
*/
|
|
1040
|
+
loadingText?: string;
|
|
1041
|
+
/**
|
|
1042
|
+
* Position of loading spinner when loadingText is provided
|
|
1043
|
+
* @default 'left'
|
|
1044
|
+
*/
|
|
1045
|
+
loadingPosition?: "left" | "right";
|
|
1046
|
+
/**
|
|
1047
|
+
* Icon to display on the left side
|
|
1048
|
+
*/
|
|
1049
|
+
leftIcon?: React.ReactNode;
|
|
1050
|
+
/**
|
|
1051
|
+
* Icon to display on the right side
|
|
1052
|
+
*/
|
|
1053
|
+
rightIcon?: React.ReactNode;
|
|
1054
|
+
/**
|
|
1055
|
+
* Whether button takes full width of container
|
|
1056
|
+
* @default false
|
|
1057
|
+
*/
|
|
1058
|
+
fullWidth?: boolean;
|
|
1059
|
+
/**
|
|
1060
|
+
* Whether this is an icon-only button (square aspect ratio)
|
|
1061
|
+
* @default false
|
|
1062
|
+
*/
|
|
1063
|
+
iconOnly?: boolean;
|
|
1064
|
+
/**
|
|
1065
|
+
* Reference to the button element
|
|
1066
|
+
*/
|
|
1067
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
declare const Button: React__default.NamedExoticComponent<ButtonProps>;
|
|
1071
|
+
|
|
1072
|
+
interface ButtonGroupProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
1073
|
+
/**
|
|
1074
|
+
* Children elements (typically Button components)
|
|
1075
|
+
*/
|
|
1076
|
+
children: React.ReactNode;
|
|
1077
|
+
/**
|
|
1078
|
+
* Display buttons vertically instead of horizontally
|
|
1079
|
+
* @default false
|
|
1080
|
+
*/
|
|
1081
|
+
vertical?: boolean;
|
|
1082
|
+
/**
|
|
1083
|
+
* Whether buttons are visually attached (connected) or separated
|
|
1084
|
+
* When true, buttons share borders and have no gap
|
|
1085
|
+
* When false, buttons are separated with a gap
|
|
1086
|
+
* @default true
|
|
1087
|
+
*/
|
|
1088
|
+
attached?: boolean;
|
|
1089
|
+
/**
|
|
1090
|
+
* Gap size between buttons when not attached
|
|
1091
|
+
* @default 'md'
|
|
1092
|
+
*/
|
|
1093
|
+
gap?: 'sm' | 'md' | 'lg';
|
|
1094
|
+
/**
|
|
1095
|
+
* Make buttons take full width of container
|
|
1096
|
+
* @default false
|
|
1097
|
+
*/
|
|
1098
|
+
fullWidth?: boolean;
|
|
1099
|
+
/**
|
|
1100
|
+
* Size to apply to all child buttons
|
|
1101
|
+
* Individual button size props will override this
|
|
1102
|
+
*/
|
|
1103
|
+
size?: ButtonSize;
|
|
1104
|
+
/**
|
|
1105
|
+
* Variant to apply to all child buttons
|
|
1106
|
+
* Individual button variant props will override this
|
|
1107
|
+
*/
|
|
1108
|
+
variant?: ButtonVariant;
|
|
1109
|
+
/**
|
|
1110
|
+
* Color to apply to all child buttons
|
|
1111
|
+
* Individual button color props will override this
|
|
1112
|
+
*/
|
|
1113
|
+
color?: ButtonColor;
|
|
1114
|
+
/**
|
|
1115
|
+
* Disable all buttons in the group
|
|
1116
|
+
* @default false
|
|
1117
|
+
*/
|
|
1118
|
+
disabled?: boolean;
|
|
1119
|
+
/**
|
|
1120
|
+
* Accessible label for the button group
|
|
1121
|
+
*/
|
|
1122
|
+
'aria-label'?: string;
|
|
1123
|
+
/**
|
|
1124
|
+
* Additional CSS class
|
|
1125
|
+
*/
|
|
1126
|
+
className?: string;
|
|
1127
|
+
/**
|
|
1128
|
+
* Reference to the div element
|
|
1129
|
+
*/
|
|
1130
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
1131
|
+
}
|
|
1132
|
+
|
|
1133
|
+
/**
|
|
1134
|
+
* ButtonGroup Component
|
|
1135
|
+
*
|
|
1136
|
+
* Groups multiple buttons together with consistent styling and spacing.
|
|
1137
|
+
* Can propagate common props (size, variant, color, disabled) to all child buttons.
|
|
1138
|
+
*
|
|
1139
|
+
* @example
|
|
1140
|
+
* // Basic horizontal group
|
|
1141
|
+
* <ButtonGroup>
|
|
1142
|
+
* <Button>Save</Button>
|
|
1143
|
+
* <Button>Cancel</Button>
|
|
1144
|
+
* </ButtonGroup>
|
|
1145
|
+
*
|
|
1146
|
+
* @example
|
|
1147
|
+
* // Vertical group with uniform styling
|
|
1148
|
+
* <ButtonGroup vertical variant="outline" size="sm">
|
|
1149
|
+
* <Button>Option 1</Button>
|
|
1150
|
+
* <Button>Option 2</Button>
|
|
1151
|
+
* </ButtonGroup>
|
|
1152
|
+
*
|
|
1153
|
+
* @example
|
|
1154
|
+
* // Separated buttons with gap
|
|
1155
|
+
* <ButtonGroup attached={false} gap="md">
|
|
1156
|
+
* <Button>A</Button>
|
|
1157
|
+
* <Button>B</Button>
|
|
1158
|
+
* <Button>C</Button>
|
|
1159
|
+
* </ButtonGroup>
|
|
1160
|
+
*/
|
|
1161
|
+
declare const ButtonGroup: React__default.NamedExoticComponent<ButtonGroupProps>;
|
|
1162
|
+
|
|
1163
|
+
type CardVariant = 'default' | 'solid' | 'outline' | 'soft' | 'ghost' | 'elevated';
|
|
1164
|
+
type CardColor = 'default' | 'primary' | 'secondary' | 'accent' | 'success' | 'error' | 'warning' | 'info';
|
|
1165
|
+
type CardSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
1166
|
+
type CardShadow = 'none' | 'sm' | 'md' | 'lg';
|
|
1167
|
+
interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
1168
|
+
/**
|
|
1169
|
+
* Visual style variant
|
|
1170
|
+
* @default 'default'
|
|
1171
|
+
*/
|
|
1172
|
+
variant?: CardVariant;
|
|
1173
|
+
/**
|
|
1174
|
+
* Semantic color for the card border/accent
|
|
1175
|
+
* @default 'default'
|
|
1176
|
+
*/
|
|
1177
|
+
color?: CardColor;
|
|
1178
|
+
/**
|
|
1179
|
+
* Card size affecting padding
|
|
1180
|
+
* @default 'md'
|
|
1181
|
+
*/
|
|
1182
|
+
size?: CardSize;
|
|
1183
|
+
/**
|
|
1184
|
+
* Shadow/elevation level
|
|
1185
|
+
* @default 'none'
|
|
1186
|
+
*/
|
|
1187
|
+
shadow?: CardShadow;
|
|
1188
|
+
/**
|
|
1189
|
+
* Show hover effect on the card
|
|
1190
|
+
* @default false
|
|
1191
|
+
*/
|
|
1192
|
+
hoverable?: boolean;
|
|
1193
|
+
/**
|
|
1194
|
+
* Make card clickable with proper accessibility
|
|
1195
|
+
* When true, card becomes a button element
|
|
1196
|
+
* @default false
|
|
1197
|
+
*/
|
|
1198
|
+
clickable?: boolean;
|
|
1199
|
+
/**
|
|
1200
|
+
* Show border around the card
|
|
1201
|
+
* @default true
|
|
396
1202
|
*/
|
|
397
|
-
|
|
1203
|
+
bordered?: boolean;
|
|
398
1204
|
/**
|
|
399
|
-
*
|
|
1205
|
+
* Show loading skeleton state
|
|
1206
|
+
* @default false
|
|
400
1207
|
*/
|
|
401
|
-
|
|
1208
|
+
loading?: boolean;
|
|
402
1209
|
/**
|
|
403
|
-
*
|
|
1210
|
+
* Reference to the card element
|
|
404
1211
|
*/
|
|
405
|
-
|
|
406
|
-
label: string;
|
|
407
|
-
href?: string;
|
|
408
|
-
onClick?: () => void;
|
|
409
|
-
}>;
|
|
1212
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
410
1213
|
}
|
|
411
|
-
interface
|
|
1214
|
+
interface CardHeaderProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
412
1215
|
/**
|
|
413
|
-
*
|
|
1216
|
+
* Reference to the header element
|
|
414
1217
|
*/
|
|
415
|
-
|
|
1218
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
1219
|
+
}
|
|
1220
|
+
interface CardTitleProps extends React.HTMLAttributes<HTMLHeadingElement> {
|
|
416
1221
|
/**
|
|
417
|
-
*
|
|
1222
|
+
* HTML heading level
|
|
1223
|
+
* @default 3
|
|
418
1224
|
*/
|
|
419
|
-
|
|
1225
|
+
as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
420
1226
|
/**
|
|
421
|
-
*
|
|
1227
|
+
* Reference to the title element
|
|
422
1228
|
*/
|
|
423
|
-
|
|
1229
|
+
ref?: React.Ref<HTMLHeadingElement>;
|
|
1230
|
+
}
|
|
1231
|
+
interface CardDescriptionProps extends React.HTMLAttributes<HTMLParagraphElement> {
|
|
424
1232
|
/**
|
|
425
|
-
*
|
|
1233
|
+
* Reference to the description element
|
|
426
1234
|
*/
|
|
427
|
-
|
|
1235
|
+
ref?: React.Ref<HTMLParagraphElement>;
|
|
1236
|
+
}
|
|
1237
|
+
interface CardContentProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
428
1238
|
/**
|
|
429
|
-
*
|
|
1239
|
+
* Reference to the content element
|
|
430
1240
|
*/
|
|
431
|
-
|
|
1241
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
1242
|
+
}
|
|
1243
|
+
interface CardFooterProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
432
1244
|
/**
|
|
433
|
-
*
|
|
1245
|
+
* Reference to the footer element
|
|
434
1246
|
*/
|
|
435
|
-
|
|
1247
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
436
1248
|
}
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
type ButtonSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
443
|
-
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
444
|
-
variant?: ButtonVariant;
|
|
445
|
-
color?: ButtonColor;
|
|
446
|
-
size?: ButtonSize;
|
|
447
|
-
loading?: boolean;
|
|
448
|
-
loadingText?: string;
|
|
449
|
-
leftIcon?: React.ReactNode;
|
|
450
|
-
rightIcon?: React.ReactNode;
|
|
451
|
-
fullWidth?: boolean;
|
|
452
|
-
ref?: React.Ref<HTMLButtonElement>;
|
|
1249
|
+
interface CardActionProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
1250
|
+
/**
|
|
1251
|
+
* Reference to the action element
|
|
1252
|
+
*/
|
|
1253
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
453
1254
|
}
|
|
454
|
-
|
|
455
|
-
declare const Button: React__default.NamedExoticComponent<ButtonProps>;
|
|
456
|
-
|
|
457
|
-
interface ButtonGroupProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
1255
|
+
interface CardImageProps extends React.ImgHTMLAttributes<HTMLImageElement> {
|
|
458
1256
|
/**
|
|
459
|
-
*
|
|
1257
|
+
* Image source URL
|
|
460
1258
|
*/
|
|
461
|
-
|
|
1259
|
+
src: string;
|
|
462
1260
|
/**
|
|
463
|
-
*
|
|
1261
|
+
* Alt text for accessibility
|
|
464
1262
|
*/
|
|
465
|
-
|
|
1263
|
+
alt: string;
|
|
466
1264
|
/**
|
|
467
|
-
*
|
|
1265
|
+
* Position of the image in the card
|
|
1266
|
+
* @default 'top'
|
|
468
1267
|
*/
|
|
469
|
-
|
|
1268
|
+
position?: 'top' | 'bottom';
|
|
470
1269
|
/**
|
|
471
|
-
*
|
|
1270
|
+
* Aspect ratio of the image container
|
|
1271
|
+
* @default 'video' (16:9)
|
|
472
1272
|
*/
|
|
473
|
-
|
|
1273
|
+
aspectRatio?: 'square' | 'video' | 'wide' | 'auto';
|
|
474
1274
|
/**
|
|
475
|
-
*
|
|
1275
|
+
* How the image should fit its container
|
|
1276
|
+
* @default 'cover'
|
|
476
1277
|
*/
|
|
477
|
-
|
|
1278
|
+
objectFit?: 'cover' | 'contain' | 'fill' | 'none';
|
|
478
1279
|
/**
|
|
479
|
-
* Reference to the
|
|
1280
|
+
* Reference to the image element
|
|
480
1281
|
*/
|
|
481
|
-
ref?: React.Ref<
|
|
1282
|
+
ref?: React.Ref<HTMLImageElement>;
|
|
482
1283
|
}
|
|
483
1284
|
|
|
484
|
-
declare const
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
1285
|
+
declare const CardWithSubComponents: React__default.NamedExoticComponent<CardProps> & {
|
|
1286
|
+
Header: React__default.NamedExoticComponent<CardHeaderProps>;
|
|
1287
|
+
Footer: React__default.NamedExoticComponent<CardFooterProps>;
|
|
1288
|
+
Title: React__default.NamedExoticComponent<CardTitleProps>;
|
|
1289
|
+
Description: React__default.NamedExoticComponent<CardDescriptionProps>;
|
|
1290
|
+
Content: React__default.NamedExoticComponent<CardContentProps>;
|
|
1291
|
+
Action: React__default.NamedExoticComponent<CardActionProps>;
|
|
1292
|
+
Image: React__default.NamedExoticComponent<CardImageProps>;
|
|
1293
|
+
};
|
|
493
1294
|
|
|
494
1295
|
interface CarouselProps extends SwiperProps {
|
|
495
1296
|
withArrows?: boolean;
|
|
496
1297
|
withPagination?: boolean;
|
|
497
|
-
children:
|
|
1298
|
+
children: React__default.ReactNode;
|
|
498
1299
|
}
|
|
499
|
-
declare
|
|
1300
|
+
declare const Carousel: React__default.NamedExoticComponent<CarouselProps>;
|
|
500
1301
|
|
|
501
1302
|
type CascaderSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
502
|
-
type
|
|
1303
|
+
type CascaderExpandTrigger = 'click' | 'hover';
|
|
1304
|
+
type CascaderPlacement = 'bottomLeft' | 'bottomRight' | 'topLeft' | 'topRight';
|
|
503
1305
|
interface CascaderOption {
|
|
504
1306
|
/**
|
|
505
1307
|
* Display label for the option
|
|
@@ -517,6 +1319,16 @@ interface CascaderOption {
|
|
|
517
1319
|
* Whether the option is disabled
|
|
518
1320
|
*/
|
|
519
1321
|
disabled?: boolean;
|
|
1322
|
+
/**
|
|
1323
|
+
* Whether this node is a leaf (no children to load)
|
|
1324
|
+
* Used with loadData for async loading
|
|
1325
|
+
*/
|
|
1326
|
+
isLeaf?: boolean;
|
|
1327
|
+
/**
|
|
1328
|
+
* Whether children are currently loading
|
|
1329
|
+
* @internal
|
|
1330
|
+
*/
|
|
1331
|
+
loading?: boolean;
|
|
520
1332
|
}
|
|
521
1333
|
interface CascaderProps {
|
|
522
1334
|
/**
|
|
@@ -535,8 +1347,13 @@ interface CascaderProps {
|
|
|
535
1347
|
* Callback when value changes
|
|
536
1348
|
*/
|
|
537
1349
|
onChange?: (value: string[] | string[][], selectedOptions: CascaderOption[] | CascaderOption[][]) => void;
|
|
1350
|
+
/**
|
|
1351
|
+
* Callback when selection is complete (after closing in single mode)
|
|
1352
|
+
*/
|
|
1353
|
+
onSelect?: (value: string[], selectedOptions: CascaderOption[]) => void;
|
|
538
1354
|
/**
|
|
539
1355
|
* Placeholder text
|
|
1356
|
+
* @default 'Please select'
|
|
540
1357
|
*/
|
|
541
1358
|
placeholder?: string;
|
|
542
1359
|
/**
|
|
@@ -549,30 +1366,32 @@ interface CascaderProps {
|
|
|
549
1366
|
helperText?: string;
|
|
550
1367
|
/**
|
|
551
1368
|
* Position of validation/helper messages
|
|
1369
|
+
* @default 'bottom'
|
|
552
1370
|
*/
|
|
553
1371
|
messagePosition?: MessagePosition;
|
|
554
1372
|
/**
|
|
555
1373
|
* Theme color
|
|
1374
|
+
* @default 'default'
|
|
556
1375
|
*/
|
|
557
1376
|
color?: ComponentColor;
|
|
558
1377
|
/**
|
|
559
|
-
*
|
|
560
|
-
|
|
561
|
-
variant?: CascaderVariant;
|
|
562
|
-
/**
|
|
563
|
-
* Size variant (cascader only supports xs, sm, md, lg)
|
|
1378
|
+
* Size variant
|
|
1379
|
+
* @default 'md'
|
|
564
1380
|
*/
|
|
565
1381
|
size?: CascaderSize;
|
|
566
1382
|
/**
|
|
567
|
-
* Dropdown
|
|
1383
|
+
* Dropdown placement relative to trigger
|
|
1384
|
+
* @default 'bottomLeft'
|
|
568
1385
|
*/
|
|
569
|
-
|
|
1386
|
+
placement?: CascaderPlacement;
|
|
570
1387
|
/**
|
|
571
1388
|
* Whether cascader is disabled
|
|
1389
|
+
* @default false
|
|
572
1390
|
*/
|
|
573
1391
|
disabled?: boolean;
|
|
574
1392
|
/**
|
|
575
1393
|
* Whether cascader is in loading state
|
|
1394
|
+
* @default false
|
|
576
1395
|
*/
|
|
577
1396
|
loading?: boolean;
|
|
578
1397
|
/**
|
|
@@ -593,34 +1412,107 @@ interface CascaderProps {
|
|
|
593
1412
|
success?: string;
|
|
594
1413
|
/**
|
|
595
1414
|
* Whether cascader should take full width
|
|
1415
|
+
* @default true
|
|
596
1416
|
*/
|
|
597
1417
|
fullWidth?: boolean;
|
|
598
1418
|
/**
|
|
599
|
-
*
|
|
1419
|
+
* How to expand child options
|
|
1420
|
+
* @default 'click'
|
|
600
1421
|
*/
|
|
601
|
-
|
|
1422
|
+
expandTrigger?: CascaderExpandTrigger;
|
|
602
1423
|
/**
|
|
603
1424
|
* Enable multiple selection mode
|
|
1425
|
+
* @default false
|
|
604
1426
|
*/
|
|
605
1427
|
multiple?: boolean;
|
|
606
1428
|
/**
|
|
607
|
-
* Maximum number of
|
|
1429
|
+
* Maximum number of tags visible in multiple mode
|
|
1430
|
+
* @default 3
|
|
608
1431
|
*/
|
|
609
|
-
|
|
1432
|
+
maxTagCount?: number;
|
|
1433
|
+
/**
|
|
1434
|
+
* Show clear button when value is selected
|
|
1435
|
+
* @default true
|
|
1436
|
+
*/
|
|
1437
|
+
clearable?: boolean;
|
|
1438
|
+
/**
|
|
1439
|
+
* Show full path in selection display
|
|
1440
|
+
* @default true
|
|
1441
|
+
*/
|
|
1442
|
+
showPath?: boolean;
|
|
1443
|
+
/**
|
|
1444
|
+
* Path separator for display
|
|
1445
|
+
* @default ' / '
|
|
1446
|
+
*/
|
|
1447
|
+
pathSeparator?: string;
|
|
1448
|
+
/**
|
|
1449
|
+
* Allow selecting parent nodes (not just leaves)
|
|
1450
|
+
* @default false
|
|
1451
|
+
*/
|
|
1452
|
+
changeOnSelect?: boolean;
|
|
1453
|
+
/**
|
|
1454
|
+
* Load data asynchronously
|
|
1455
|
+
* Called when expanding a node that has no children and isLeaf is not true
|
|
1456
|
+
*/
|
|
1457
|
+
loadData?: (selectedOptions: CascaderOption[]) => Promise<void>;
|
|
610
1458
|
/**
|
|
611
1459
|
* Custom render function for display value
|
|
612
1460
|
*/
|
|
613
|
-
displayRender?: (labels: string[] | string[][]) => React.ReactNode;
|
|
1461
|
+
displayRender?: (labels: string[] | string[][], selectedOptions?: CascaderOption[] | CascaderOption[][]) => React.ReactNode;
|
|
1462
|
+
/**
|
|
1463
|
+
* Custom render function for tags in multiple mode
|
|
1464
|
+
*/
|
|
1465
|
+
tagRender?: (props: {
|
|
1466
|
+
label: string;
|
|
1467
|
+
value: string[];
|
|
1468
|
+
closable: boolean;
|
|
1469
|
+
onClose: () => void;
|
|
1470
|
+
}) => React.ReactNode;
|
|
1471
|
+
/**
|
|
1472
|
+
* Content to show when options array is empty
|
|
1473
|
+
* @default 'No options'
|
|
1474
|
+
*/
|
|
1475
|
+
emptyContent?: React.ReactNode;
|
|
614
1476
|
/**
|
|
615
1477
|
* Additional CSS class
|
|
616
1478
|
*/
|
|
617
1479
|
className?: string;
|
|
618
1480
|
/**
|
|
619
1481
|
* Whether the field is required
|
|
1482
|
+
* @default false
|
|
620
1483
|
*/
|
|
621
1484
|
required?: boolean;
|
|
1485
|
+
/**
|
|
1486
|
+
* Reference to the cascader container element
|
|
1487
|
+
*/
|
|
1488
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
1489
|
+
/**
|
|
1490
|
+
* Callback when dropdown open state changes
|
|
1491
|
+
*/
|
|
1492
|
+
onOpenChange?: (open: boolean) => void;
|
|
622
1493
|
}
|
|
623
1494
|
|
|
1495
|
+
/**
|
|
1496
|
+
* Cascader Component
|
|
1497
|
+
*
|
|
1498
|
+
* A hierarchical selection component for selecting from nested options.
|
|
1499
|
+
*
|
|
1500
|
+
* @example
|
|
1501
|
+
* // Basic usage
|
|
1502
|
+
* <Cascader
|
|
1503
|
+
* options={options}
|
|
1504
|
+
* placeholder="Select location"
|
|
1505
|
+
* onChange={(value, options) => console.log(value)}
|
|
1506
|
+
* />
|
|
1507
|
+
*
|
|
1508
|
+
* @example
|
|
1509
|
+
* // Multiple selection
|
|
1510
|
+
* <Cascader
|
|
1511
|
+
* options={options}
|
|
1512
|
+
* multiple
|
|
1513
|
+
* placeholder="Select categories"
|
|
1514
|
+
* />
|
|
1515
|
+
*/
|
|
624
1516
|
declare const Cascader: React__default.NamedExoticComponent<CascaderProps>;
|
|
625
1517
|
|
|
626
1518
|
type CheckboxColor = 'primary' | 'secondary' | 'accent' | 'success' | 'error' | 'warning' | 'info';
|
|
@@ -698,6 +1590,11 @@ interface ClipboardProps {
|
|
|
698
1590
|
* Duration to show success icon (in milliseconds)
|
|
699
1591
|
*/
|
|
700
1592
|
successDuration?: number;
|
|
1593
|
+
/**
|
|
1594
|
+
* Whether the clipboard is disabled
|
|
1595
|
+
* @default false
|
|
1596
|
+
*/
|
|
1597
|
+
disabled?: boolean;
|
|
701
1598
|
/**
|
|
702
1599
|
* Callback when text is copied
|
|
703
1600
|
*/
|
|
@@ -706,6 +1603,10 @@ interface ClipboardProps {
|
|
|
706
1603
|
* Additional CSS class
|
|
707
1604
|
*/
|
|
708
1605
|
className?: string;
|
|
1606
|
+
/**
|
|
1607
|
+
* Reference to the element
|
|
1608
|
+
*/
|
|
1609
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
709
1610
|
}
|
|
710
1611
|
|
|
711
1612
|
declare const Clipboard: React__default.NamedExoticComponent<ClipboardProps>;
|
|
@@ -753,10 +1654,105 @@ interface CollapseProps {
|
|
|
753
1654
|
* Additional CSS class
|
|
754
1655
|
*/
|
|
755
1656
|
className?: string;
|
|
1657
|
+
/**
|
|
1658
|
+
* Reference to the element
|
|
1659
|
+
*/
|
|
1660
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
756
1661
|
}
|
|
757
1662
|
|
|
758
1663
|
declare const Collapse: React__default.NamedExoticComponent<CollapseProps>;
|
|
759
1664
|
|
|
1665
|
+
/**
|
|
1666
|
+
* Context menu item
|
|
1667
|
+
*/
|
|
1668
|
+
interface ContextMenuItem {
|
|
1669
|
+
/** Unique item key */
|
|
1670
|
+
key: string;
|
|
1671
|
+
/** Item text (required if not separator) */
|
|
1672
|
+
label?: React__default.ReactNode;
|
|
1673
|
+
/** Icon displayed to the left of the text */
|
|
1674
|
+
icon?: React__default.ReactNode;
|
|
1675
|
+
/** Keyboard shortcut (displayed on the right) */
|
|
1676
|
+
shortcut?: string;
|
|
1677
|
+
/** Whether the item is disabled */
|
|
1678
|
+
disabled?: boolean;
|
|
1679
|
+
/** Click handler */
|
|
1680
|
+
onClick?: () => void;
|
|
1681
|
+
/** Nested items (submenu) */
|
|
1682
|
+
children?: ContextMenuItem[];
|
|
1683
|
+
/** Separator (if true, other properties are ignored) */
|
|
1684
|
+
separator?: boolean;
|
|
1685
|
+
}
|
|
1686
|
+
/**
|
|
1687
|
+
* ContextMenu component props
|
|
1688
|
+
*/
|
|
1689
|
+
interface ContextMenuProps {
|
|
1690
|
+
/** Child elements that will trigger the context menu */
|
|
1691
|
+
children: React__default.ReactNode;
|
|
1692
|
+
/** Menu items */
|
|
1693
|
+
items: ContextMenuItem[];
|
|
1694
|
+
/** Additional CSS class */
|
|
1695
|
+
className?: string;
|
|
1696
|
+
/** Whether to disable the context menu */
|
|
1697
|
+
disabled?: boolean;
|
|
1698
|
+
/** Handler called when menu opens or closes */
|
|
1699
|
+
onOpenChange?: (open: boolean) => void;
|
|
1700
|
+
/** Controlled open state */
|
|
1701
|
+
open?: boolean;
|
|
1702
|
+
}
|
|
1703
|
+
|
|
1704
|
+
/**
|
|
1705
|
+
* ContextMenu component based on Popover
|
|
1706
|
+
*
|
|
1707
|
+
* A context menu that opens on right-click.
|
|
1708
|
+
* Uses @radix-ui/react-popover for positioning and state management.
|
|
1709
|
+
* Supports nested submenus, separators, disabled items, and keyboard navigation.
|
|
1710
|
+
*
|
|
1711
|
+
* @example
|
|
1712
|
+
* ```tsx
|
|
1713
|
+
* import ContextMenu from '@mdigital_ui/ui/context-menu'
|
|
1714
|
+
* import { Copy, Paste, Trash } from 'lucide-react'
|
|
1715
|
+
*
|
|
1716
|
+
* function MyComponent() {
|
|
1717
|
+
* return (
|
|
1718
|
+
* <ContextMenu
|
|
1719
|
+
* items={[
|
|
1720
|
+
* {
|
|
1721
|
+
* key: 'copy',
|
|
1722
|
+
* label: 'Copy',
|
|
1723
|
+
* icon: <Copy />,
|
|
1724
|
+
* shortcut: 'Ctrl+C',
|
|
1725
|
+
* onClick: () => console.log('Copy'),
|
|
1726
|
+
* },
|
|
1727
|
+
* {
|
|
1728
|
+
* key: 'paste',
|
|
1729
|
+
* label: 'Paste',
|
|
1730
|
+
* icon: <Paste />,
|
|
1731
|
+
* shortcut: 'Ctrl+V',
|
|
1732
|
+
* onClick: () => console.log('Paste'),
|
|
1733
|
+
* },
|
|
1734
|
+
* { key: 'sep1', separator: true },
|
|
1735
|
+
* {
|
|
1736
|
+
* key: 'delete',
|
|
1737
|
+
* label: 'Delete',
|
|
1738
|
+
* icon: <Trash />,
|
|
1739
|
+
* onClick: () => console.log('Delete'),
|
|
1740
|
+
* },
|
|
1741
|
+
* ]}
|
|
1742
|
+
* >
|
|
1743
|
+
* <div className="p-4 border">
|
|
1744
|
+
* Right click me!
|
|
1745
|
+
* </div>
|
|
1746
|
+
* </ContextMenu>
|
|
1747
|
+
* )
|
|
1748
|
+
* }
|
|
1749
|
+
* ```
|
|
1750
|
+
*/
|
|
1751
|
+
declare const ContextMenu: {
|
|
1752
|
+
({ children, items, className, disabled, onOpenChange, open: controlledOpen, }: ContextMenuProps): react_jsx_runtime.JSX.Element;
|
|
1753
|
+
displayName: string;
|
|
1754
|
+
};
|
|
1755
|
+
|
|
760
1756
|
interface DescriptionsItem {
|
|
761
1757
|
key: string;
|
|
762
1758
|
label: React.ReactNode;
|
|
@@ -993,7 +1989,7 @@ interface FetchingOverlayProps extends SpinnerProps {
|
|
|
993
1989
|
fullscreen?: boolean;
|
|
994
1990
|
backdropOpacity?: number;
|
|
995
1991
|
}
|
|
996
|
-
declare const FetchingOverlay:
|
|
1992
|
+
declare const FetchingOverlay: React__default.NamedExoticComponent<FetchingOverlayProps>;
|
|
997
1993
|
|
|
998
1994
|
type GridGap = 'xs' | 'sm' | 'md' | 'lg';
|
|
999
1995
|
type GridColumns = 1 | 2 | 3 | 4 | 5 | 6;
|
|
@@ -1049,7 +2045,7 @@ interface ImageProps extends React.ImgHTMLAttributes<HTMLImageElement> {
|
|
|
1049
2045
|
height?: number;
|
|
1050
2046
|
}
|
|
1051
2047
|
|
|
1052
|
-
declare
|
|
2048
|
+
declare const Image: React__default.NamedExoticComponent<ImageProps>;
|
|
1053
2049
|
|
|
1054
2050
|
type InputVariant = 'outline' | 'filled';
|
|
1055
2051
|
type InputSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
@@ -1057,7 +2053,6 @@ interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, '
|
|
|
1057
2053
|
variant?: InputVariant;
|
|
1058
2054
|
size?: InputSize;
|
|
1059
2055
|
label?: string;
|
|
1060
|
-
floatingLabel?: boolean;
|
|
1061
2056
|
messagePosition?: MessagePosition;
|
|
1062
2057
|
clearable?: boolean;
|
|
1063
2058
|
onClear?: () => void;
|
|
@@ -1069,18 +2064,25 @@ interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, '
|
|
|
1069
2064
|
|
|
1070
2065
|
declare const Input: React__default.NamedExoticComponent<InputProps>;
|
|
1071
2066
|
|
|
2067
|
+
type InputGroupSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
1072
2068
|
interface InputGroupProps {
|
|
1073
2069
|
/**
|
|
1074
|
-
* Children elements (
|
|
2070
|
+
* Children elements (InputGroupAddon and InputGroupInput)
|
|
2071
|
+
* Order determines layout - addons and input flow naturally with flexbox
|
|
1075
2072
|
*/
|
|
1076
2073
|
children: React.ReactNode;
|
|
2074
|
+
/**
|
|
2075
|
+
* Size of the input group - affects height, padding, and text size
|
|
2076
|
+
* @default 'md'
|
|
2077
|
+
*/
|
|
2078
|
+
size?: InputGroupSize;
|
|
1077
2079
|
/**
|
|
1078
2080
|
* Additional CSS class
|
|
1079
2081
|
*/
|
|
1080
2082
|
className?: string;
|
|
1081
2083
|
}
|
|
1082
2084
|
|
|
1083
|
-
declare const InputGroup:
|
|
2085
|
+
declare const InputGroup: React__default.NamedExoticComponent<InputGroupProps>;
|
|
1084
2086
|
|
|
1085
2087
|
type InputOTPSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
1086
2088
|
interface InputOTPProps {
|
|
@@ -1767,21 +2769,29 @@ interface StepperProps {
|
|
|
1767
2769
|
|
|
1768
2770
|
declare const Stepper: React__default.NamedExoticComponent<StepperProps>;
|
|
1769
2771
|
|
|
1770
|
-
type SwitchColor =
|
|
1771
|
-
type SwitchSize =
|
|
1772
|
-
|
|
2772
|
+
type SwitchColor = "primary" | "secondary" | "accent" | "success" | "error" | "warning" | "info";
|
|
2773
|
+
type SwitchSize = "xs" | "sm" | "md" | "lg";
|
|
2774
|
+
type SwitchLabelPosition = "left" | "right";
|
|
2775
|
+
interface SwitchProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type" | "ref"> {
|
|
1773
2776
|
/**
|
|
1774
2777
|
* Theme color
|
|
2778
|
+
* @default 'primary'
|
|
1775
2779
|
*/
|
|
1776
2780
|
color?: SwitchColor;
|
|
1777
2781
|
/**
|
|
1778
2782
|
* Size variant
|
|
2783
|
+
* @default 'md'
|
|
1779
2784
|
*/
|
|
1780
2785
|
size?: SwitchSize;
|
|
1781
2786
|
/**
|
|
1782
2787
|
* Label text
|
|
1783
2788
|
*/
|
|
1784
|
-
label?:
|
|
2789
|
+
label?: React.ReactNode;
|
|
2790
|
+
/**
|
|
2791
|
+
* Position of the label relative to the switch
|
|
2792
|
+
* @default 'right'
|
|
2793
|
+
*/
|
|
2794
|
+
labelPosition?: SwitchLabelPosition;
|
|
1785
2795
|
/**
|
|
1786
2796
|
* Helper text or instructions
|
|
1787
2797
|
*/
|
|
@@ -1792,8 +2802,31 @@ interface SwitchProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>,
|
|
|
1792
2802
|
error?: string;
|
|
1793
2803
|
/**
|
|
1794
2804
|
* Whether switch is in loading state
|
|
2805
|
+
* @default false
|
|
1795
2806
|
*/
|
|
1796
2807
|
loading?: boolean;
|
|
2808
|
+
/**
|
|
2809
|
+
* Icon to show inside thumb when checked
|
|
2810
|
+
*/
|
|
2811
|
+
thumbIcon?: React.ReactNode;
|
|
2812
|
+
/**
|
|
2813
|
+
* Content to show on the left side of track (visible when unchecked)
|
|
2814
|
+
*/
|
|
2815
|
+
startContent?: React.ReactNode;
|
|
2816
|
+
/**
|
|
2817
|
+
* Content to show on the right side of track (visible when checked)
|
|
2818
|
+
*/
|
|
2819
|
+
endContent?: React.ReactNode;
|
|
2820
|
+
/**
|
|
2821
|
+
* Whether the switch is required
|
|
2822
|
+
* Shows an asterisk next to the label
|
|
2823
|
+
* @default false
|
|
2824
|
+
*/
|
|
2825
|
+
required?: boolean;
|
|
2826
|
+
/**
|
|
2827
|
+
* Additional CSS class for the label text
|
|
2828
|
+
*/
|
|
2829
|
+
labelClassName?: string;
|
|
1797
2830
|
/**
|
|
1798
2831
|
* Additional CSS class
|
|
1799
2832
|
*/
|
|
@@ -1929,6 +2962,67 @@ interface TabsProps {
|
|
|
1929
2962
|
|
|
1930
2963
|
declare const Tabs: React__default.NamedExoticComponent<TabsProps>;
|
|
1931
2964
|
|
|
2965
|
+
type TagVariant = 'default' | 'solid' | 'outline' | 'soft';
|
|
2966
|
+
type TagColor = ComponentColor;
|
|
2967
|
+
type TagSize = Exclude<ComponentSize, 'xl'>;
|
|
2968
|
+
interface TagProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, 'onClick'> {
|
|
2969
|
+
children?: React.ReactNode;
|
|
2970
|
+
variant?: TagVariant;
|
|
2971
|
+
color?: TagColor;
|
|
2972
|
+
size?: TagSize;
|
|
2973
|
+
closable?: boolean;
|
|
2974
|
+
onClose?: (e: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLSpanElement>) => void;
|
|
2975
|
+
onClick?: (e: React.MouseEvent<HTMLSpanElement> | React.KeyboardEvent<HTMLSpanElement>) => void;
|
|
2976
|
+
icon?: React.ReactNode;
|
|
2977
|
+
className?: string;
|
|
2978
|
+
disableKeyboardRemoval?: boolean;
|
|
2979
|
+
}
|
|
2980
|
+
|
|
2981
|
+
/**
|
|
2982
|
+
* Tag Component
|
|
2983
|
+
*
|
|
2984
|
+
* An interactive badge variant that can be used for labels, categories, or removable items.
|
|
2985
|
+
* Supports multiple variants, colors, sizes, icons, and close functionality.
|
|
2986
|
+
*
|
|
2987
|
+
* @component
|
|
2988
|
+
* @example
|
|
2989
|
+
* // Basic tag
|
|
2990
|
+
* <Tag>Label</Tag>
|
|
2991
|
+
*
|
|
2992
|
+
* @example
|
|
2993
|
+
* // Tag with close button
|
|
2994
|
+
* <Tag closable onClose={(e) => console.log('Tag removed')}>
|
|
2995
|
+
* Removable Tag
|
|
2996
|
+
* </Tag>
|
|
2997
|
+
*
|
|
2998
|
+
* @example
|
|
2999
|
+
* // Tag with icon
|
|
3000
|
+
* <Tag icon={<Star />} color="warning">
|
|
3001
|
+
* Featured
|
|
3002
|
+
* </Tag>
|
|
3003
|
+
*
|
|
3004
|
+
* @example
|
|
3005
|
+
* // Different variants
|
|
3006
|
+
* <Tag variant="outline" color="success">Outline Tag</Tag>
|
|
3007
|
+
* <Tag variant="soft" color="info">Soft Tag</Tag>
|
|
3008
|
+
*
|
|
3009
|
+
* @example
|
|
3010
|
+
* // Disable keyboard removal (Backspace/Delete on tag)
|
|
3011
|
+
* <Tag closable disableKeyboardRemoval onClose={(e) => console.log('Tag removed')}>
|
|
3012
|
+
* No keyboard removal
|
|
3013
|
+
* </Tag>
|
|
3014
|
+
*
|
|
3015
|
+
* @example
|
|
3016
|
+
* // Tag with keyboard removal enabled (focus on tag and press Delete/Backspace)
|
|
3017
|
+
* <Tag closable onClose={(e) => console.log('Tag removed')}>
|
|
3018
|
+
* Press Delete or Backspace to remove
|
|
3019
|
+
* </Tag>
|
|
3020
|
+
*
|
|
3021
|
+
* @param {TagProps} props - Component props
|
|
3022
|
+
* @returns {JSX.Element} Rendered tag component
|
|
3023
|
+
*/
|
|
3024
|
+
declare const Tag: React__default.NamedExoticComponent<TagProps>;
|
|
3025
|
+
|
|
1932
3026
|
type TextareaVariant = 'outline' | 'filled';
|
|
1933
3027
|
type TextareaSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
1934
3028
|
type TextareaResize = 'none' | 'vertical' | 'horizontal' | 'both';
|
|
@@ -2447,7 +3541,7 @@ interface UploadProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>,
|
|
|
2447
3541
|
|
|
2448
3542
|
declare const Upload: React__default.NamedExoticComponent<UploadProps>;
|
|
2449
3543
|
|
|
2450
|
-
type ChartSize = '
|
|
3544
|
+
type ChartSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
2451
3545
|
interface ChartDataPoint {
|
|
2452
3546
|
[key: string]: string | number;
|
|
2453
3547
|
}
|
|
@@ -2503,39 +3597,66 @@ declare const PieChart: React__default.NamedExoticComponent<PieChartProps>;
|
|
|
2503
3597
|
* Note: Most command components use React.ComponentProps with the underlying
|
|
2504
3598
|
* cmdk primitives and add a size prop
|
|
2505
3599
|
*/
|
|
2506
|
-
type CommandSize = 'sm' | 'md' | 'lg';
|
|
3600
|
+
type CommandSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
2507
3601
|
|
|
2508
|
-
declare
|
|
2509
|
-
size
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
showCloseButton
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
}
|
|
2524
|
-
declare
|
|
2525
|
-
size
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
}
|
|
2530
|
-
declare
|
|
2531
|
-
size
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
}
|
|
2536
|
-
declare
|
|
2537
|
-
size
|
|
2538
|
-
|
|
3602
|
+
declare const Command: {
|
|
3603
|
+
({ className, size, ...props }: React$1.ComponentProps<typeof Command$1> & {
|
|
3604
|
+
size?: CommandSize;
|
|
3605
|
+
}): react_jsx_runtime.JSX.Element;
|
|
3606
|
+
displayName: string;
|
|
3607
|
+
};
|
|
3608
|
+
declare const CommandModal: {
|
|
3609
|
+
({ title, description, children, className, showCloseButton, size, ...props }: React$1.ComponentProps<typeof Modal> & {
|
|
3610
|
+
title?: string;
|
|
3611
|
+
description?: string;
|
|
3612
|
+
className?: string;
|
|
3613
|
+
showCloseButton?: boolean;
|
|
3614
|
+
size?: CommandSize;
|
|
3615
|
+
}): react_jsx_runtime.JSX.Element;
|
|
3616
|
+
displayName: string;
|
|
3617
|
+
};
|
|
3618
|
+
declare const CommandInput: {
|
|
3619
|
+
({ className, size, ...props }: Omit<React$1.ComponentProps<typeof Command$1.Input>, "size"> & {
|
|
3620
|
+
size?: CommandSize;
|
|
3621
|
+
}): react_jsx_runtime.JSX.Element;
|
|
3622
|
+
displayName: string;
|
|
3623
|
+
};
|
|
3624
|
+
declare const CommandList: {
|
|
3625
|
+
({ className, size, ...props }: React$1.ComponentProps<typeof Command$1.List> & {
|
|
3626
|
+
size?: CommandSize;
|
|
3627
|
+
}): react_jsx_runtime.JSX.Element;
|
|
3628
|
+
displayName: string;
|
|
3629
|
+
};
|
|
3630
|
+
declare const CommandEmpty: {
|
|
3631
|
+
({ size, ...props }: React$1.ComponentProps<typeof Command$1.Empty> & {
|
|
3632
|
+
size?: CommandSize;
|
|
3633
|
+
}): react_jsx_runtime.JSX.Element;
|
|
3634
|
+
displayName: string;
|
|
3635
|
+
};
|
|
3636
|
+
declare const CommandGroup: {
|
|
3637
|
+
({ className, size, ...props }: React$1.ComponentProps<typeof Command$1.Group> & {
|
|
3638
|
+
size?: CommandSize;
|
|
3639
|
+
}): react_jsx_runtime.JSX.Element;
|
|
3640
|
+
displayName: string;
|
|
3641
|
+
};
|
|
3642
|
+
declare const CommandSeparator: {
|
|
3643
|
+
({ className, size, ...props }: React$1.ComponentProps<typeof Command$1.Separator> & {
|
|
3644
|
+
size?: CommandSize;
|
|
3645
|
+
}): react_jsx_runtime.JSX.Element;
|
|
3646
|
+
displayName: string;
|
|
3647
|
+
};
|
|
3648
|
+
declare const CommandItem: {
|
|
3649
|
+
({ className, size, ...props }: React$1.ComponentProps<typeof Command$1.Item> & {
|
|
3650
|
+
size?: CommandSize;
|
|
3651
|
+
}): react_jsx_runtime.JSX.Element;
|
|
3652
|
+
displayName: string;
|
|
3653
|
+
};
|
|
3654
|
+
declare const CommandShortcut: {
|
|
3655
|
+
({ className, size, ...props }: React$1.ComponentProps<"span"> & {
|
|
3656
|
+
size?: CommandSize;
|
|
3657
|
+
}): react_jsx_runtime.JSX.Element;
|
|
3658
|
+
displayName: string;
|
|
3659
|
+
};
|
|
2539
3660
|
|
|
2540
3661
|
type DatePickerVariant = 'outline' | 'filled';
|
|
2541
3662
|
type DatePickerSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
@@ -2590,7 +3711,8 @@ declare const DatePicker: React__default.NamedExoticComponent<DatePickerProps> &
|
|
|
2590
3711
|
TimePicker: React__default.NamedExoticComponent<TimePickerProps>;
|
|
2591
3712
|
};
|
|
2592
3713
|
|
|
2593
|
-
type DrawerDirection =
|
|
3714
|
+
type DrawerDirection = "bottom" | "top" | "left" | "right";
|
|
3715
|
+
type DrawerSize = "xs" | "sm" | "md" | "lg" | "full";
|
|
2594
3716
|
interface DrawerProps {
|
|
2595
3717
|
/**
|
|
2596
3718
|
* Controlled open state
|
|
@@ -2602,12 +3724,34 @@ interface DrawerProps {
|
|
|
2602
3724
|
onOpenChange?: (open: boolean) => void;
|
|
2603
3725
|
/**
|
|
2604
3726
|
* Direction from which drawer slides in
|
|
3727
|
+
* @default 'bottom'
|
|
2605
3728
|
*/
|
|
2606
3729
|
direction?: DrawerDirection;
|
|
2607
3730
|
/**
|
|
2608
3731
|
* Whether drawer should be modal (blocking interaction with content behind)
|
|
3732
|
+
* @default true
|
|
2609
3733
|
*/
|
|
2610
3734
|
modal?: boolean;
|
|
3735
|
+
/**
|
|
3736
|
+
* Whether the drawer should close when clicking the overlay
|
|
3737
|
+
* @default true
|
|
3738
|
+
*/
|
|
3739
|
+
closeOnOverlayClick?: boolean;
|
|
3740
|
+
/**
|
|
3741
|
+
* Whether pressing the Escape key should close the drawer
|
|
3742
|
+
* @default true
|
|
3743
|
+
*/
|
|
3744
|
+
closeOnEscape?: boolean;
|
|
3745
|
+
/**
|
|
3746
|
+
* Whether the drawer can be dismissed by dragging
|
|
3747
|
+
* @default true
|
|
3748
|
+
*/
|
|
3749
|
+
dismissible?: boolean;
|
|
3750
|
+
/**
|
|
3751
|
+
* Snap points for drawer positioning (0-1 values)
|
|
3752
|
+
* e.g., [0.5, 1] allows snapping to 50% and 100%
|
|
3753
|
+
*/
|
|
3754
|
+
snapPoints?: (number | string)[];
|
|
2611
3755
|
/**
|
|
2612
3756
|
* Children elements
|
|
2613
3757
|
*/
|
|
@@ -2620,18 +3764,57 @@ interface DrawerTriggerProps {
|
|
|
2620
3764
|
children: React.ReactNode;
|
|
2621
3765
|
/**
|
|
2622
3766
|
* Whether to render children as child component
|
|
3767
|
+
* @default false
|
|
2623
3768
|
*/
|
|
2624
3769
|
asChild?: boolean;
|
|
3770
|
+
/**
|
|
3771
|
+
* Additional CSS class
|
|
3772
|
+
*/
|
|
3773
|
+
className?: string;
|
|
3774
|
+
/**
|
|
3775
|
+
* Reference to the trigger element
|
|
3776
|
+
*/
|
|
3777
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
2625
3778
|
}
|
|
2626
3779
|
interface DrawerContentProps {
|
|
2627
3780
|
/**
|
|
2628
3781
|
* Children elements
|
|
2629
3782
|
*/
|
|
2630
3783
|
children: React.ReactNode;
|
|
3784
|
+
/**
|
|
3785
|
+
* Direction from which drawer slides in
|
|
3786
|
+
* @default 'bottom'
|
|
3787
|
+
*/
|
|
3788
|
+
direction?: DrawerDirection;
|
|
3789
|
+
/**
|
|
3790
|
+
* Drawer size
|
|
3791
|
+
* @default 'md'
|
|
3792
|
+
*/
|
|
3793
|
+
size?: DrawerSize;
|
|
3794
|
+
/**
|
|
3795
|
+
* Whether to show a close button in the corner
|
|
3796
|
+
* @default false
|
|
3797
|
+
*/
|
|
3798
|
+
showCloseButton?: boolean;
|
|
3799
|
+
/**
|
|
3800
|
+
* Whether to show the drag handle
|
|
3801
|
+
* @default true for bottom/top, false for left/right
|
|
3802
|
+
*/
|
|
3803
|
+
showHandle?: boolean;
|
|
2631
3804
|
/**
|
|
2632
3805
|
* Additional CSS class
|
|
2633
3806
|
*/
|
|
2634
3807
|
className?: string;
|
|
3808
|
+
/**
|
|
3809
|
+
* Reference to the content element
|
|
3810
|
+
*/
|
|
3811
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
3812
|
+
}
|
|
3813
|
+
interface DrawerOverlayProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3814
|
+
/**
|
|
3815
|
+
* Reference to the overlay element
|
|
3816
|
+
*/
|
|
3817
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
2635
3818
|
}
|
|
2636
3819
|
interface DrawerHeaderProps {
|
|
2637
3820
|
/**
|
|
@@ -2642,6 +3825,10 @@ interface DrawerHeaderProps {
|
|
|
2642
3825
|
* Additional CSS class
|
|
2643
3826
|
*/
|
|
2644
3827
|
className?: string;
|
|
3828
|
+
/**
|
|
3829
|
+
* Reference to the header element
|
|
3830
|
+
*/
|
|
3831
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
2645
3832
|
}
|
|
2646
3833
|
interface DrawerFooterProps {
|
|
2647
3834
|
/**
|
|
@@ -2652,6 +3839,10 @@ interface DrawerFooterProps {
|
|
|
2652
3839
|
* Additional CSS class
|
|
2653
3840
|
*/
|
|
2654
3841
|
className?: string;
|
|
3842
|
+
/**
|
|
3843
|
+
* Reference to the footer element
|
|
3844
|
+
*/
|
|
3845
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
2655
3846
|
}
|
|
2656
3847
|
interface DrawerTitleProps {
|
|
2657
3848
|
/**
|
|
@@ -2662,6 +3853,10 @@ interface DrawerTitleProps {
|
|
|
2662
3853
|
* Additional CSS class
|
|
2663
3854
|
*/
|
|
2664
3855
|
className?: string;
|
|
3856
|
+
/**
|
|
3857
|
+
* Reference to the title element
|
|
3858
|
+
*/
|
|
3859
|
+
ref?: React.Ref<HTMLHeadingElement>;
|
|
2665
3860
|
}
|
|
2666
3861
|
interface DrawerDescriptionProps {
|
|
2667
3862
|
/**
|
|
@@ -2672,6 +3867,10 @@ interface DrawerDescriptionProps {
|
|
|
2672
3867
|
* Additional CSS class
|
|
2673
3868
|
*/
|
|
2674
3869
|
className?: string;
|
|
3870
|
+
/**
|
|
3871
|
+
* Reference to the description element
|
|
3872
|
+
*/
|
|
3873
|
+
ref?: React.Ref<HTMLParagraphElement>;
|
|
2675
3874
|
}
|
|
2676
3875
|
interface DrawerCloseProps {
|
|
2677
3876
|
/**
|
|
@@ -2680,21 +3879,24 @@ interface DrawerCloseProps {
|
|
|
2680
3879
|
children: React.ReactNode;
|
|
2681
3880
|
/**
|
|
2682
3881
|
* Whether to render children as child component
|
|
3882
|
+
* @default false
|
|
2683
3883
|
*/
|
|
2684
3884
|
asChild?: boolean;
|
|
3885
|
+
/**
|
|
3886
|
+
* Additional CSS class
|
|
3887
|
+
*/
|
|
3888
|
+
className?: string;
|
|
3889
|
+
/**
|
|
3890
|
+
* Reference to the close element
|
|
3891
|
+
*/
|
|
3892
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
2685
3893
|
}
|
|
2686
3894
|
|
|
2687
3895
|
declare const Drawer: React__default.NamedExoticComponent<DrawerProps>;
|
|
2688
3896
|
declare const DrawerTrigger: React__default.NamedExoticComponent<DrawerTriggerProps>;
|
|
2689
3897
|
declare const DrawerPortal: typeof vaul.Portal;
|
|
2690
|
-
interface DrawerOverlayProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
2691
|
-
ref?: React__default.Ref<HTMLDivElement>;
|
|
2692
|
-
}
|
|
2693
3898
|
declare const DrawerOverlay: React__default.NamedExoticComponent<DrawerOverlayProps>;
|
|
2694
|
-
declare const DrawerContent: React__default.NamedExoticComponent<DrawerContentProps
|
|
2695
|
-
direction?: "bottom" | "top" | "left" | "right";
|
|
2696
|
-
size?: "xs" | "sm" | "md" | "lg";
|
|
2697
|
-
}>;
|
|
3899
|
+
declare const DrawerContent: React__default.NamedExoticComponent<DrawerContentProps>;
|
|
2698
3900
|
declare const DrawerHeader: React__default.NamedExoticComponent<DrawerHeaderProps>;
|
|
2699
3901
|
declare const DrawerFooter: React__default.NamedExoticComponent<DrawerFooterProps>;
|
|
2700
3902
|
declare const DrawerTitle: React__default.NamedExoticComponent<DrawerTitleProps>;
|
|
@@ -2752,4 +3954,4 @@ interface TransferProps {
|
|
|
2752
3954
|
|
|
2753
3955
|
declare const Transfer: React__default.NamedExoticComponent<TransferProps>;
|
|
2754
3956
|
|
|
2755
|
-
export { Accordion, AreaChart, Badge, BarChart, type BaseOption, Breadcrumb as Breadcrumbs, Button, type ButtonColor$1 as ButtonColor, ButtonGroup, Card, Carousel, Cascader, Checkbox, CheckboxGroup, Clipboard, Collapse, Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandModal, CommandSeparator, CommandShortcut, type ComponentColor, type ComponentSize, type ComponentVariant, type ComponentVariantExtended, type ComponentVariantInput, ComposedChart, DatePicker, Descriptions, type DisableableProps, Divider, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, Dropdown, Empty, FetchingOverlay, type FullWidthProps, Grid, type IconProps, Image, Input, InputGroup, InputOTP, Input as InputPassword, Kbd, LineChart, type LoadingProps, type MessagePosition, ComposedModal as Modal, MultiSelect, Notification, Pagination, PieChart, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, Radio, RadioGroup, RangePickerComponent as RangePicker, Rating, type RequiredProps, Ribbon, Select, Skeleton, Slider, Spinner, Stepper, Switch, Table, Tabs, type TextColorVariants, Textarea, TimePickerComponent as TimePicker, Toggle, ToggleGroup, Tooltip, Transfer, Tree, TreeSelect, Upload, type ValidationMessages, buttonColors, cn, commonSpacing, componentColors, componentSizeVariants, createAllColorVariants, createDashedColorVariants, createDefaultColorVariants, createGhostColorVariants, createLinkColorVariants, createOutlineColorVariants, createSoftColorVariants, createSolidColorVariants,
|
|
3957
|
+
export { Accordion, AreaChart, Avatar, AvatarGroup, Badge, BarChart, type BaseOption, Breadcrumb as Breadcrumbs, Button, type ButtonColor$1 as ButtonColor, ButtonGroup, CardWithSubComponents as Card, Carousel, Cascader, Checkbox, CheckboxGroup, Clipboard, Collapse, Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandModal, CommandSeparator, CommandShortcut, type ComponentColor, type ComponentSize, type ComponentVariant, type ComponentVariantExtended, type ComponentVariantInput, ComposedChart, ContextMenu, DatePicker, Descriptions, type DisableableProps, Divider, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, Dropdown, Empty, FetchingOverlay, type FullWidthProps, Grid, type IconProps, Image, Input, InputGroup, InputOTP, Input as InputPassword, Kbd, type KbdVariantType, LineChart, type LoadingProps, type MessagePosition, ComposedModal as Modal, MultiSelect, Notification, type NotificationVariantType, Pagination, PieChart, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, type PopoverVariantType, Progress, Radio, RadioGroup, RangePickerComponent as RangePicker, Rating, type RequiredProps, Ribbon, Select, Skeleton, Slider, Spinner, Stepper, type StyleVariantType, Switch, Table, Tabs, Tag, type TextColorVariants, Textarea, TimePickerComponent as TimePicker, Toggle, ToggleGroup, Tooltip, Transfer, Tree, TreeSelect, Upload, type ValidationMessages, bgColorClasses, bgSkeletonColorClasses, bgSoftColorClasses, borderColorClasses, buttonColors, checkboxBorderColorClasses, checkedColorClasses, cn, commonSpacing, componentColors, componentSizeVariants, createAllColorVariants, createDashedColorVariants, createDefaultColorVariants, createGhostColorVariants, createKbdColorVariants, createKbdOutlineColorVariants, createKbdSoftColorVariants, createKbdSolidColorVariants, createLinkColorVariants, createNotificationColorVariants, createNotificationOutlinedColorVariants, createNotificationSoftColorVariants, createNotificationSolidColorVariants, createOutlineColorVariants, createPopoverColorVariants, createPopoverDefaultColorVariants, createPopoverSoftColorVariants, createPopoverSolidColorVariants, createSoftColorVariants, createSolidColorVariants, createTooltipSoftColorVariants, focusRingColorClasses, getAccordionColorClass, getCheckboxColorClass, getIconColorClass, getValidationStatus, iconColorClasses, iconSizes, radioCheckedColorClasses, switchTrackColorClasses, textColorClasses, textColorVariants, textForegroundColorClasses, tooltipSolidColorClasses };
|