arco-clone-react 1.3.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/LICENSE +21 -0
- package/README.md +245 -0
- package/dist/index.css +1258 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.mts +1383 -0
- package/dist/index.d.ts +1383 -0
- package/dist/index.js +9294 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +9212 -0
- package/dist/index.mjs.map +1 -0
- package/dist/styles/global.css +30 -0
- package/package.json +114 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,1383 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import React$1, { SVGProps, ReactNode, ButtonHTMLAttributes, HTMLAttributes } from 'react';
|
|
3
|
+
|
|
4
|
+
interface ColorScale {
|
|
5
|
+
1: string;
|
|
6
|
+
2: string;
|
|
7
|
+
3: string;
|
|
8
|
+
4: string;
|
|
9
|
+
5: string;
|
|
10
|
+
6: string;
|
|
11
|
+
7: string;
|
|
12
|
+
8: string;
|
|
13
|
+
9: string;
|
|
14
|
+
10: string;
|
|
15
|
+
}
|
|
16
|
+
interface ColorPalette {
|
|
17
|
+
primary: ColorScale;
|
|
18
|
+
blue: ColorScale;
|
|
19
|
+
cyan: ColorScale;
|
|
20
|
+
gold: ColorScale;
|
|
21
|
+
gray: ColorScale;
|
|
22
|
+
green: ColorScale;
|
|
23
|
+
lime: ColorScale;
|
|
24
|
+
magenta: ColorScale;
|
|
25
|
+
orange: ColorScale;
|
|
26
|
+
'orange-red': ColorScale;
|
|
27
|
+
'pink-purple': ColorScale;
|
|
28
|
+
purple: ColorScale;
|
|
29
|
+
red: ColorScale;
|
|
30
|
+
yellow: ColorScale;
|
|
31
|
+
black: string;
|
|
32
|
+
white: string;
|
|
33
|
+
}
|
|
34
|
+
declare const lightColors: ColorPalette;
|
|
35
|
+
declare const darkColors: ColorPalette;
|
|
36
|
+
type ThemeMode = 'light' | 'dark';
|
|
37
|
+
declare const colors: {
|
|
38
|
+
light: ColorPalette;
|
|
39
|
+
dark: ColorPalette;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
interface TypographyStyle {
|
|
43
|
+
fontSize: number;
|
|
44
|
+
fontFamily: string;
|
|
45
|
+
fontWeight: number;
|
|
46
|
+
lineHeight: number;
|
|
47
|
+
letterSpacing: number;
|
|
48
|
+
}
|
|
49
|
+
interface FontSizeScale {
|
|
50
|
+
regular?: TypographyStyle;
|
|
51
|
+
medium?: TypographyStyle;
|
|
52
|
+
bold?: TypographyStyle;
|
|
53
|
+
}
|
|
54
|
+
interface TypographyTokens {
|
|
55
|
+
fontFamily: {
|
|
56
|
+
base: string;
|
|
57
|
+
heading: string;
|
|
58
|
+
monospace: string;
|
|
59
|
+
};
|
|
60
|
+
fontSize: {
|
|
61
|
+
xs: FontSizeScale;
|
|
62
|
+
sm: FontSizeScale;
|
|
63
|
+
base: FontSizeScale;
|
|
64
|
+
md: FontSizeScale;
|
|
65
|
+
lg: FontSizeScale;
|
|
66
|
+
xl: FontSizeScale;
|
|
67
|
+
'2xl': FontSizeScale;
|
|
68
|
+
'3xl': FontSizeScale;
|
|
69
|
+
'4xl': FontSizeScale;
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
declare const typography: TypographyTokens;
|
|
73
|
+
declare const fontWeights: {
|
|
74
|
+
readonly regular: 400;
|
|
75
|
+
readonly medium: 600;
|
|
76
|
+
readonly bold: 700;
|
|
77
|
+
};
|
|
78
|
+
declare function pxToRem(px: number): string;
|
|
79
|
+
declare function getLineHeight(lineHeight: number, fontSize: number): number;
|
|
80
|
+
declare function createTypographyStyle(style: TypographyStyle): {
|
|
81
|
+
fontFamily: string;
|
|
82
|
+
fontSize: string;
|
|
83
|
+
fontWeight: number;
|
|
84
|
+
lineHeight: number;
|
|
85
|
+
letterSpacing: string;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Design System Shadow Tokens
|
|
90
|
+
* Generated from Figma design tokens
|
|
91
|
+
*/
|
|
92
|
+
interface Shadow {
|
|
93
|
+
offsetX: number;
|
|
94
|
+
offsetY: number;
|
|
95
|
+
blur: number;
|
|
96
|
+
spread: number;
|
|
97
|
+
color: string;
|
|
98
|
+
inset?: boolean;
|
|
99
|
+
}
|
|
100
|
+
interface ShadowTokens {
|
|
101
|
+
none: string;
|
|
102
|
+
xs: string;
|
|
103
|
+
sm: string;
|
|
104
|
+
md: string;
|
|
105
|
+
lg: string;
|
|
106
|
+
xl: string;
|
|
107
|
+
'2xl': string;
|
|
108
|
+
inner: string;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Elevation-based shadow system
|
|
112
|
+
* Following a consistent elevation scale for UI depth
|
|
113
|
+
*/
|
|
114
|
+
declare const shadows: ShadowTokens;
|
|
115
|
+
/**
|
|
116
|
+
* Component-specific shadows from Figma
|
|
117
|
+
* These are exact shadows defined in the design system
|
|
118
|
+
*/
|
|
119
|
+
declare const componentShadows: {
|
|
120
|
+
dropdown: {
|
|
121
|
+
level1: string;
|
|
122
|
+
level2: string;
|
|
123
|
+
};
|
|
124
|
+
backToTop: string;
|
|
125
|
+
handle: string;
|
|
126
|
+
tabs: {
|
|
127
|
+
innerTop: string;
|
|
128
|
+
innerBottom: string;
|
|
129
|
+
innerLeft: string;
|
|
130
|
+
innerRight: string;
|
|
131
|
+
dividerTop: string;
|
|
132
|
+
dividerBottom: string;
|
|
133
|
+
dividerLeft: string;
|
|
134
|
+
dividerRight: string;
|
|
135
|
+
};
|
|
136
|
+
dropShadow: {
|
|
137
|
+
top: string;
|
|
138
|
+
bottom: string;
|
|
139
|
+
left: string;
|
|
140
|
+
right: string;
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
/**
|
|
144
|
+
* Helper function to create a custom shadow
|
|
145
|
+
*/
|
|
146
|
+
declare function createShadow(shadow: Shadow): string;
|
|
147
|
+
/**
|
|
148
|
+
* Helper function to combine multiple shadows
|
|
149
|
+
*/
|
|
150
|
+
declare function combineShadows(...shadows: string[]): string;
|
|
151
|
+
/**
|
|
152
|
+
* Helper to convert hex color with alpha to rgba
|
|
153
|
+
*/
|
|
154
|
+
declare function hexToRgba(hex: string): string;
|
|
155
|
+
/**
|
|
156
|
+
* Raw shadow values from Figma
|
|
157
|
+
* These preserve the exact values from the design tokens
|
|
158
|
+
*/
|
|
159
|
+
declare const rawShadows: {
|
|
160
|
+
dropdown: {
|
|
161
|
+
level1: {
|
|
162
|
+
offsetX: number;
|
|
163
|
+
offsetY: number;
|
|
164
|
+
blur: number;
|
|
165
|
+
spread: number;
|
|
166
|
+
color: string;
|
|
167
|
+
};
|
|
168
|
+
level2: {
|
|
169
|
+
offsetX: number;
|
|
170
|
+
offsetY: number;
|
|
171
|
+
blur: number;
|
|
172
|
+
spread: number;
|
|
173
|
+
color: string;
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
backToTop: {
|
|
177
|
+
offsetX: number;
|
|
178
|
+
offsetY: number;
|
|
179
|
+
blur: number;
|
|
180
|
+
spread: number;
|
|
181
|
+
color: string;
|
|
182
|
+
};
|
|
183
|
+
handle: {
|
|
184
|
+
offsetX: number;
|
|
185
|
+
offsetY: number;
|
|
186
|
+
blur: number;
|
|
187
|
+
spread: number;
|
|
188
|
+
color: string;
|
|
189
|
+
};
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Spacing Tokens
|
|
194
|
+
* Based on Arco Design System 4px baseline grid
|
|
195
|
+
*
|
|
196
|
+
* Spacing scale derived from Arco's Space component sizes:
|
|
197
|
+
* - mini (xs): 4px
|
|
198
|
+
* - small (sm): 8px
|
|
199
|
+
* - medium (md): 16px
|
|
200
|
+
* - large (lg): 24px
|
|
201
|
+
*
|
|
202
|
+
* Extended with additional scales for larger spacing needs.
|
|
203
|
+
*/
|
|
204
|
+
interface SpacingTokens {
|
|
205
|
+
0: number;
|
|
206
|
+
xs: number;
|
|
207
|
+
sm: number;
|
|
208
|
+
md: number;
|
|
209
|
+
lg: number;
|
|
210
|
+
xl: number;
|
|
211
|
+
'2xl': number;
|
|
212
|
+
'3xl': number;
|
|
213
|
+
'4xl': number;
|
|
214
|
+
'5xl': number;
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Spacing scale values in pixels
|
|
218
|
+
*/
|
|
219
|
+
declare const spacing: SpacingTokens;
|
|
220
|
+
type SpacingKey = keyof SpacingTokens;
|
|
221
|
+
type SpacingValue = SpacingTokens[SpacingKey];
|
|
222
|
+
/**
|
|
223
|
+
* Get spacing value in pixels
|
|
224
|
+
* @param key - The spacing key
|
|
225
|
+
* @returns The spacing value in pixels
|
|
226
|
+
*
|
|
227
|
+
* @example
|
|
228
|
+
* ```ts
|
|
229
|
+
* getSpacing('md') // 16
|
|
230
|
+
* getSpacing('lg') // 24
|
|
231
|
+
* ```
|
|
232
|
+
*/
|
|
233
|
+
declare function getSpacing(key: SpacingKey): number;
|
|
234
|
+
/**
|
|
235
|
+
* Get spacing value in rem units (base 16px)
|
|
236
|
+
* @param key - The spacing key
|
|
237
|
+
* @returns The spacing value in rem
|
|
238
|
+
*
|
|
239
|
+
* @example
|
|
240
|
+
* ```ts
|
|
241
|
+
* getSpacingRem('md') // '1rem'
|
|
242
|
+
* getSpacingRem('lg') // '1.5rem'
|
|
243
|
+
* ```
|
|
244
|
+
*/
|
|
245
|
+
declare function getSpacingRem(key: SpacingKey): string;
|
|
246
|
+
/**
|
|
247
|
+
* Create a spacing style object for a given property
|
|
248
|
+
* @param property - The CSS property (margin or padding)
|
|
249
|
+
* @param value - The spacing key or number value
|
|
250
|
+
* @returns A style object with the spacing applied
|
|
251
|
+
*
|
|
252
|
+
* @example
|
|
253
|
+
* ```ts
|
|
254
|
+
* createSpacingStyle('margin', 'md') // { margin: '16px' }
|
|
255
|
+
* createSpacingStyle('padding', 32) // { padding: '32px' }
|
|
256
|
+
* ```
|
|
257
|
+
*/
|
|
258
|
+
declare function createSpacingStyle(property: 'margin' | 'padding', value: SpacingKey | number): Record<string, string>;
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* Breakpoint Tokens
|
|
262
|
+
* Based on Arco Design System responsive breakpoints
|
|
263
|
+
*
|
|
264
|
+
* Breakpoint values:
|
|
265
|
+
* - xs: < 576px (Extra small devices - phones)
|
|
266
|
+
* - sm: ≥ 576px (Small devices - large phones, small tablets)
|
|
267
|
+
* - md: ≥ 768px (Medium devices - tablets)
|
|
268
|
+
* - lg: ≥ 992px (Large devices - small desktops)
|
|
269
|
+
* - xl: ≥ 1200px (Extra large devices - desktops)
|
|
270
|
+
* - xxl: ≥ 1600px (Extra extra large devices - large desktops)
|
|
271
|
+
* - xxxl: ≥ 2000px (Triple extra large devices - ultra-wide displays)
|
|
272
|
+
*/
|
|
273
|
+
interface BreakpointTokens {
|
|
274
|
+
xs: number;
|
|
275
|
+
sm: number;
|
|
276
|
+
md: number;
|
|
277
|
+
lg: number;
|
|
278
|
+
xl: number;
|
|
279
|
+
xxl: number;
|
|
280
|
+
xxxl: number;
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* Breakpoint values in pixels
|
|
284
|
+
* Following Arco Design System's 7-level responsive system
|
|
285
|
+
*/
|
|
286
|
+
declare const breakpoints: BreakpointTokens;
|
|
287
|
+
type Breakpoint = keyof BreakpointTokens;
|
|
288
|
+
type BreakpointValue = BreakpointTokens[Breakpoint];
|
|
289
|
+
/**
|
|
290
|
+
* Breakpoint order from smallest to largest
|
|
291
|
+
* Used for resolving responsive values
|
|
292
|
+
*/
|
|
293
|
+
declare const breakpointOrder: Breakpoint[];
|
|
294
|
+
/**
|
|
295
|
+
* Get a media query string for a given breakpoint
|
|
296
|
+
* @param breakpoint - The breakpoint key
|
|
297
|
+
* @returns A media query string, or empty string for 'xs'
|
|
298
|
+
*
|
|
299
|
+
* @example
|
|
300
|
+
* ```ts
|
|
301
|
+
* getMediaQuery('md') // '@media (min-width: 768px)'
|
|
302
|
+
* getMediaQuery('xs') // ''
|
|
303
|
+
* ```
|
|
304
|
+
*/
|
|
305
|
+
declare function getMediaQuery(breakpoint: Breakpoint): string;
|
|
306
|
+
/**
|
|
307
|
+
* Check if a breakpoint is currently active (client-side only)
|
|
308
|
+
* @param breakpoint - The breakpoint key
|
|
309
|
+
* @returns Whether the breakpoint is active
|
|
310
|
+
*
|
|
311
|
+
* @example
|
|
312
|
+
* ```ts
|
|
313
|
+
* isBreakpointActive('md') // true if window width >= 768px
|
|
314
|
+
* ```
|
|
315
|
+
*/
|
|
316
|
+
declare function isBreakpointActive(breakpoint: Breakpoint): boolean;
|
|
317
|
+
/**
|
|
318
|
+
* Get the current active breakpoint (client-side only)
|
|
319
|
+
* Returns the largest breakpoint that matches the current window width
|
|
320
|
+
*
|
|
321
|
+
* @returns The current breakpoint
|
|
322
|
+
*
|
|
323
|
+
* @example
|
|
324
|
+
* ```ts
|
|
325
|
+
* getCurrentBreakpoint() // 'lg' if window width is 1100px
|
|
326
|
+
* ```
|
|
327
|
+
*/
|
|
328
|
+
declare function getCurrentBreakpoint(): Breakpoint;
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* Layout Tokens
|
|
332
|
+
* Container max-widths, padding, and grid configuration
|
|
333
|
+
* Based on Arco Design System grid specifications
|
|
334
|
+
*/
|
|
335
|
+
|
|
336
|
+
interface ContainerTokens {
|
|
337
|
+
xs: string;
|
|
338
|
+
sm: string;
|
|
339
|
+
md: string;
|
|
340
|
+
lg: string;
|
|
341
|
+
xl: string;
|
|
342
|
+
xxl: string;
|
|
343
|
+
xxxl: string;
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* Container max-widths at each breakpoint
|
|
347
|
+
* Values are slightly smaller than breakpoint to provide comfortable margins
|
|
348
|
+
*
|
|
349
|
+
* Strategy:
|
|
350
|
+
* - xs: Full width on mobile
|
|
351
|
+
* - sm: 540px (576 - 36px margin)
|
|
352
|
+
* - md: 720px (768 - 48px margin)
|
|
353
|
+
* - lg: 960px (992 - 32px margin)
|
|
354
|
+
* - xl: 1152px (1200 - 48px margin)
|
|
355
|
+
* - xxl: 1536px (1600 - 64px margin)
|
|
356
|
+
* - xxxl: 1920px (2000 - 80px margin)
|
|
357
|
+
*/
|
|
358
|
+
declare const containerMaxWidths: ContainerTokens;
|
|
359
|
+
/**
|
|
360
|
+
* Container padding at each breakpoint (in pixels)
|
|
361
|
+
* Provides breathing room on smaller screens
|
|
362
|
+
*/
|
|
363
|
+
declare const containerPadding: BreakpointTokens;
|
|
364
|
+
/**
|
|
365
|
+
* Grid configuration interface
|
|
366
|
+
*/
|
|
367
|
+
interface GridConfig {
|
|
368
|
+
columns: number;
|
|
369
|
+
gutterBase: number;
|
|
370
|
+
gutterSizes: Record<string, number>;
|
|
371
|
+
}
|
|
372
|
+
/**
|
|
373
|
+
* Grid configuration
|
|
374
|
+
* Arco Design uses a 24-column grid system
|
|
375
|
+
*/
|
|
376
|
+
declare const gridConfig: GridConfig;
|
|
377
|
+
|
|
378
|
+
/**
|
|
379
|
+
* Responsive Type Definitions
|
|
380
|
+
* Types for responsive properties and layout system
|
|
381
|
+
*/
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* Responsive value type
|
|
385
|
+
* Can be a single value or an object with breakpoint-specific values
|
|
386
|
+
*
|
|
387
|
+
* @example
|
|
388
|
+
* ```ts
|
|
389
|
+
* // Single value
|
|
390
|
+
* const gutter: ResponsiveValue<number> = 16;
|
|
391
|
+
*
|
|
392
|
+
* // Responsive object
|
|
393
|
+
* const gutter: ResponsiveValue<number> = { xs: 8, md: 16, lg: 24 };
|
|
394
|
+
* ```
|
|
395
|
+
*/
|
|
396
|
+
type ResponsiveValue<T> = T | Partial<Record<Breakpoint, T>>;
|
|
397
|
+
/**
|
|
398
|
+
* Responsive number type
|
|
399
|
+
* For numeric values that can be responsive (span, offset, etc.)
|
|
400
|
+
*/
|
|
401
|
+
type ResponsiveNumber = ResponsiveValue<number>;
|
|
402
|
+
/**
|
|
403
|
+
* Responsive spacing type
|
|
404
|
+
* For spacing values using spacing tokens or numbers
|
|
405
|
+
*/
|
|
406
|
+
type ResponsiveSpacing = ResponsiveValue<SpacingKey | number>;
|
|
407
|
+
/**
|
|
408
|
+
* Responsive boolean type
|
|
409
|
+
* For boolean flags that can be responsive
|
|
410
|
+
*/
|
|
411
|
+
type ResponsiveBoolean = ResponsiveValue<boolean>;
|
|
412
|
+
/**
|
|
413
|
+
* Alignment types for flexbox and grid
|
|
414
|
+
*/
|
|
415
|
+
type AlignItems = 'start' | 'center' | 'end' | 'stretch' | 'baseline';
|
|
416
|
+
/**
|
|
417
|
+
* Justify content types for flexbox and grid
|
|
418
|
+
*/
|
|
419
|
+
type JustifyContent = 'start' | 'center' | 'end' | 'space-between' | 'space-around' | 'space-evenly';
|
|
420
|
+
/**
|
|
421
|
+
* Flex direction types
|
|
422
|
+
*/
|
|
423
|
+
type FlexDirection = 'row' | 'row-reverse' | 'column' | 'column-reverse';
|
|
424
|
+
/**
|
|
425
|
+
* Flex wrap types
|
|
426
|
+
*/
|
|
427
|
+
type FlexWrap = 'nowrap' | 'wrap' | 'wrap-reverse';
|
|
428
|
+
/**
|
|
429
|
+
* Common props interface for layout components
|
|
430
|
+
*/
|
|
431
|
+
interface ResponsiveProps {
|
|
432
|
+
/** Additional CSS class name */
|
|
433
|
+
className?: string;
|
|
434
|
+
/** Inline styles */
|
|
435
|
+
style?: React.CSSProperties;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* Responsive Utilities
|
|
440
|
+
* Helper functions for working with responsive values
|
|
441
|
+
*/
|
|
442
|
+
|
|
443
|
+
/**
|
|
444
|
+
* Resolve a responsive value to a single value based on current breakpoint
|
|
445
|
+
* Finds the nearest defined value at or below the current breakpoint
|
|
446
|
+
*
|
|
447
|
+
* @param value - The responsive value to resolve
|
|
448
|
+
* @param currentBreakpoint - Optional specific breakpoint to resolve for (defaults to current)
|
|
449
|
+
* @returns The resolved value
|
|
450
|
+
*
|
|
451
|
+
* @example
|
|
452
|
+
* ```ts
|
|
453
|
+
* resolveResponsiveValue({ xs: 8, md: 16, lg: 24 }, 'lg') // 24
|
|
454
|
+
* resolveResponsiveValue({ xs: 8, lg: 24 }, 'md') // 8 (nearest defined)
|
|
455
|
+
* resolveResponsiveValue(16) // 16 (not responsive)
|
|
456
|
+
* ```
|
|
457
|
+
*/
|
|
458
|
+
declare function resolveResponsiveValue<T>(value: ResponsiveValue<T>, currentBreakpoint?: Breakpoint): T;
|
|
459
|
+
/**
|
|
460
|
+
* Generate responsive CSS properties with media queries
|
|
461
|
+
*
|
|
462
|
+
* @param property - The CSS property name
|
|
463
|
+
* @param value - The responsive value
|
|
464
|
+
* @param formatter - Optional formatter function to convert value to CSS string
|
|
465
|
+
* @returns An object with the base value and responsive properties
|
|
466
|
+
*
|
|
467
|
+
* @example
|
|
468
|
+
* ```ts
|
|
469
|
+
* generateResponsiveStyles('gap', { xs: 8, md: 16 }, (v) => `${v}px`)
|
|
470
|
+
* // Returns: { 'gap-xs': '8px', 'gap-md': '16px' }
|
|
471
|
+
* ```
|
|
472
|
+
*/
|
|
473
|
+
declare function generateResponsiveStyles<T>(property: string, value: ResponsiveValue<T>, formatter?: (val: T) => string): Record<string, string>;
|
|
474
|
+
/**
|
|
475
|
+
* Get all defined breakpoints from a responsive value
|
|
476
|
+
*
|
|
477
|
+
* @param value - The responsive value
|
|
478
|
+
* @returns Array of breakpoints that have defined values
|
|
479
|
+
*
|
|
480
|
+
* @example
|
|
481
|
+
* ```ts
|
|
482
|
+
* getDefinedBreakpoints({ xs: 8, md: 16, xl: 24 })
|
|
483
|
+
* // Returns: ['xs', 'md', 'xl']
|
|
484
|
+
* ```
|
|
485
|
+
*/
|
|
486
|
+
declare function getDefinedBreakpoints<T>(value: ResponsiveValue<T>): Breakpoint[];
|
|
487
|
+
|
|
488
|
+
/**
|
|
489
|
+
* Classname Utilities
|
|
490
|
+
* Helper functions for working with CSS class names
|
|
491
|
+
*/
|
|
492
|
+
/**
|
|
493
|
+
* Combine multiple class names, filtering out falsy values
|
|
494
|
+
* Similar to the popular 'classnames' or 'clsx' libraries
|
|
495
|
+
*
|
|
496
|
+
* @param classes - Array of class names (can include undefined, null, false)
|
|
497
|
+
* @returns A single space-separated string of valid class names
|
|
498
|
+
*
|
|
499
|
+
* @example
|
|
500
|
+
* ```ts
|
|
501
|
+
* classNames('foo', 'bar') // 'foo bar'
|
|
502
|
+
* classNames('foo', undefined, 'bar', null, false) // 'foo bar'
|
|
503
|
+
* classNames('foo', condition && 'bar') // 'foo bar' or 'foo'
|
|
504
|
+
* ```
|
|
505
|
+
*/
|
|
506
|
+
declare function classNames(...classes: (string | undefined | null | false)[]): string;
|
|
507
|
+
/**
|
|
508
|
+
* Create responsive class names by appending breakpoint modifiers
|
|
509
|
+
*
|
|
510
|
+
* @param baseClass - The base class name
|
|
511
|
+
* @param breakpoints - Array of breakpoint suffixes
|
|
512
|
+
* @returns A space-separated string of responsive class names
|
|
513
|
+
*
|
|
514
|
+
* @example
|
|
515
|
+
* ```ts
|
|
516
|
+
* responsiveClassName('grid', ['xs', 'md'])
|
|
517
|
+
* // Returns: 'grid grid--xs grid--md'
|
|
518
|
+
* ```
|
|
519
|
+
*/
|
|
520
|
+
declare function responsiveClassName(baseClass: string, breakpoints: string[]): string;
|
|
521
|
+
|
|
522
|
+
/**
|
|
523
|
+
* Style Utilities
|
|
524
|
+
* Helper functions for working with CSS styles
|
|
525
|
+
*/
|
|
526
|
+
|
|
527
|
+
/**
|
|
528
|
+
* Convert spacing key or number to pixel string
|
|
529
|
+
*
|
|
530
|
+
* @param value - Spacing token key or number
|
|
531
|
+
* @returns Pixel value as a string
|
|
532
|
+
*
|
|
533
|
+
* @example
|
|
534
|
+
* ```ts
|
|
535
|
+
* toPixels('md') // '16px'
|
|
536
|
+
* toPixels(32) // '32px'
|
|
537
|
+
* ```
|
|
538
|
+
*/
|
|
539
|
+
declare function toPixels(value: SpacingKey | number): string;
|
|
540
|
+
/**
|
|
541
|
+
* Merge multiple style objects into one
|
|
542
|
+
* Later objects override earlier ones
|
|
543
|
+
*
|
|
544
|
+
* @param styles - Array of style objects (can include undefined)
|
|
545
|
+
* @returns Merged style object
|
|
546
|
+
*
|
|
547
|
+
* @example
|
|
548
|
+
* ```ts
|
|
549
|
+
* mergeStyles({ color: 'red' }, { fontSize: '16px' })
|
|
550
|
+
* // Returns: { color: 'red', fontSize: '16px' }
|
|
551
|
+
*
|
|
552
|
+
* mergeStyles({ color: 'red' }, undefined, { color: 'blue' })
|
|
553
|
+
* // Returns: { color: 'blue' }
|
|
554
|
+
* ```
|
|
555
|
+
*/
|
|
556
|
+
declare function mergeStyles(...styles: (React.CSSProperties | undefined)[]): React.CSSProperties;
|
|
557
|
+
/**
|
|
558
|
+
* Create a CSS custom property (CSS variable) object
|
|
559
|
+
*
|
|
560
|
+
* @param name - The variable name (without -- prefix)
|
|
561
|
+
* @param value - The variable value
|
|
562
|
+
* @returns An object with the CSS variable
|
|
563
|
+
*
|
|
564
|
+
* @example
|
|
565
|
+
* ```ts
|
|
566
|
+
* cssVar('grid-gutter', 16)
|
|
567
|
+
* // Returns: { '--grid-gutter': '16' }
|
|
568
|
+
* ```
|
|
569
|
+
*/
|
|
570
|
+
declare function cssVar(name: string, value: string | number): Record<string, string>;
|
|
571
|
+
|
|
572
|
+
/**
|
|
573
|
+
* Container Component Types
|
|
574
|
+
*/
|
|
575
|
+
interface ContainerProps {
|
|
576
|
+
/** Content to be contained */
|
|
577
|
+
children: React.ReactNode;
|
|
578
|
+
/** Full width without max-width constraint */
|
|
579
|
+
fluid?: boolean;
|
|
580
|
+
/** Custom max-width (overrides responsive max-widths) */
|
|
581
|
+
maxWidth?: string | number;
|
|
582
|
+
/** Remove default padding */
|
|
583
|
+
disablePadding?: boolean;
|
|
584
|
+
/** Additional CSS class name */
|
|
585
|
+
className?: string;
|
|
586
|
+
/** Inline styles */
|
|
587
|
+
style?: React.CSSProperties;
|
|
588
|
+
/** Element type to render as */
|
|
589
|
+
as?: React.ElementType;
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
declare function Container({ children, fluid, maxWidth, disablePadding, className, style, as: Component, }: ContainerProps): react_jsx_runtime.JSX.Element;
|
|
593
|
+
|
|
594
|
+
/**
|
|
595
|
+
* Grid Component Types
|
|
596
|
+
*/
|
|
597
|
+
|
|
598
|
+
interface GridProps {
|
|
599
|
+
/** Grid items */
|
|
600
|
+
children: React.ReactNode;
|
|
601
|
+
/**
|
|
602
|
+
* Gutter spacing between grid items
|
|
603
|
+
* Can be a single value or [horizontal, vertical] tuple
|
|
604
|
+
*/
|
|
605
|
+
gutter?: ResponsiveSpacing | [ResponsiveSpacing, ResponsiveSpacing];
|
|
606
|
+
/** Vertical alignment of grid items */
|
|
607
|
+
align?: AlignItems;
|
|
608
|
+
/** Horizontal distribution of grid items */
|
|
609
|
+
justify?: JustifyContent;
|
|
610
|
+
/** Full width without constraints */
|
|
611
|
+
fluid?: boolean;
|
|
612
|
+
/** Additional CSS class name */
|
|
613
|
+
className?: string;
|
|
614
|
+
/** Inline styles */
|
|
615
|
+
style?: React.CSSProperties;
|
|
616
|
+
/** Element type to render as */
|
|
617
|
+
as?: React.ElementType;
|
|
618
|
+
}
|
|
619
|
+
interface GridItemProps {
|
|
620
|
+
/** Grid item content */
|
|
621
|
+
children?: React.ReactNode;
|
|
622
|
+
/**
|
|
623
|
+
* Number of columns to span (out of 24)
|
|
624
|
+
* Can be responsive: { xs: 24, md: 12, lg: 8 }
|
|
625
|
+
*/
|
|
626
|
+
span?: ResponsiveNumber;
|
|
627
|
+
/**
|
|
628
|
+
* Number of columns to offset
|
|
629
|
+
* Can be responsive: { xs: 0, md: 2 }
|
|
630
|
+
*/
|
|
631
|
+
offset?: ResponsiveNumber;
|
|
632
|
+
/**
|
|
633
|
+
* Order of the grid item
|
|
634
|
+
* Can be responsive: { xs: 2, md: 1 }
|
|
635
|
+
*/
|
|
636
|
+
order?: ResponsiveNumber;
|
|
637
|
+
/** Flex property override */
|
|
638
|
+
flex?: string | number;
|
|
639
|
+
/** Responsive span shortcuts */
|
|
640
|
+
xs?: number;
|
|
641
|
+
sm?: number;
|
|
642
|
+
md?: number;
|
|
643
|
+
lg?: number;
|
|
644
|
+
xl?: number;
|
|
645
|
+
xxl?: number;
|
|
646
|
+
xxxl?: number;
|
|
647
|
+
/** Additional CSS class name */
|
|
648
|
+
className?: string;
|
|
649
|
+
/** Inline styles */
|
|
650
|
+
style?: React.CSSProperties;
|
|
651
|
+
/** Element type to render as */
|
|
652
|
+
as?: React.ElementType;
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
declare function Grid({ children, gutter, align, justify, className, style, as: Component, }: GridProps): react_jsx_runtime.JSX.Element;
|
|
656
|
+
|
|
657
|
+
declare function GridItem({ children, span, offset, order, flex, xs, sm, md, lg, xl, xxl, xxxl, className, style, as: Component, }: GridItemProps): react_jsx_runtime.JSX.Element;
|
|
658
|
+
|
|
659
|
+
/**
|
|
660
|
+
* Stack Component Types
|
|
661
|
+
*/
|
|
662
|
+
|
|
663
|
+
interface StackProps {
|
|
664
|
+
/** Stack items */
|
|
665
|
+
children: React.ReactNode;
|
|
666
|
+
/** Stack direction */
|
|
667
|
+
direction?: 'vertical' | 'horizontal';
|
|
668
|
+
/** Spacing between items */
|
|
669
|
+
spacing?: ResponsiveSpacing;
|
|
670
|
+
/** Vertical alignment of items */
|
|
671
|
+
align?: AlignItems;
|
|
672
|
+
/** Horizontal distribution of items */
|
|
673
|
+
justify?: JustifyContent;
|
|
674
|
+
/** Allow items to wrap */
|
|
675
|
+
wrap?: boolean;
|
|
676
|
+
/** Divider to render between items */
|
|
677
|
+
divider?: React.ReactNode;
|
|
678
|
+
/** Additional CSS class name */
|
|
679
|
+
className?: string;
|
|
680
|
+
/** Inline styles */
|
|
681
|
+
style?: React.CSSProperties;
|
|
682
|
+
/** Element type to render as */
|
|
683
|
+
as?: React.ElementType;
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
declare function Stack({ children, direction, spacing, align, justify, wrap, divider, className, style, as: Component, }: StackProps): react_jsx_runtime.JSX.Element;
|
|
687
|
+
|
|
688
|
+
/**
|
|
689
|
+
* Inline Component Types
|
|
690
|
+
*/
|
|
691
|
+
|
|
692
|
+
interface InlineProps {
|
|
693
|
+
/** Inline items */
|
|
694
|
+
children: React.ReactNode;
|
|
695
|
+
/** Spacing between items */
|
|
696
|
+
spacing?: ResponsiveSpacing;
|
|
697
|
+
/** Vertical alignment of items */
|
|
698
|
+
align?: AlignItems;
|
|
699
|
+
/** Horizontal distribution of items */
|
|
700
|
+
justify?: JustifyContent;
|
|
701
|
+
/** Additional CSS class name */
|
|
702
|
+
className?: string;
|
|
703
|
+
/** Inline styles */
|
|
704
|
+
style?: React.CSSProperties;
|
|
705
|
+
/** Element type to render as */
|
|
706
|
+
as?: React.ElementType;
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
declare function Inline({ children, spacing, align, justify, className, style, as: Component, }: InlineProps): react_jsx_runtime.JSX.Element;
|
|
710
|
+
|
|
711
|
+
/**
|
|
712
|
+
* Flex Component Types
|
|
713
|
+
*/
|
|
714
|
+
|
|
715
|
+
interface FlexProps {
|
|
716
|
+
/** Flex items */
|
|
717
|
+
children: React.ReactNode;
|
|
718
|
+
/** Flex direction */
|
|
719
|
+
direction?: FlexDirection;
|
|
720
|
+
/** Flex wrap behavior */
|
|
721
|
+
wrap?: FlexWrap;
|
|
722
|
+
/** Vertical alignment of items */
|
|
723
|
+
align?: AlignItems;
|
|
724
|
+
/** Horizontal distribution of items */
|
|
725
|
+
justify?: JustifyContent;
|
|
726
|
+
/** Gap between items */
|
|
727
|
+
gap?: ResponsiveSpacing;
|
|
728
|
+
/** Render as inline-flex instead of flex */
|
|
729
|
+
inline?: boolean;
|
|
730
|
+
/** Additional CSS class name */
|
|
731
|
+
className?: string;
|
|
732
|
+
/** Inline styles */
|
|
733
|
+
style?: React.CSSProperties;
|
|
734
|
+
/** Element type to render as */
|
|
735
|
+
as?: React.ElementType;
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
declare function Flex({ children, direction, wrap, align, justify, gap, inline, className, style, as: Component, }: FlexProps): react_jsx_runtime.JSX.Element;
|
|
739
|
+
|
|
740
|
+
/**
|
|
741
|
+
* Icon Component Types
|
|
742
|
+
*
|
|
743
|
+
* Shared types for all icon components in the design system.
|
|
744
|
+
*/
|
|
745
|
+
|
|
746
|
+
/**
|
|
747
|
+
* Supported icon sizes based on design system specifications
|
|
748
|
+
*/
|
|
749
|
+
type IconSize = 10 | 12 | 14 | 16 | 18 | 20 | 22 | 24 | 32 | 48;
|
|
750
|
+
/**
|
|
751
|
+
* Props for icon components
|
|
752
|
+
*/
|
|
753
|
+
interface IconProps extends Omit<SVGProps<SVGSVGElement>, 'width' | 'height'> {
|
|
754
|
+
/**
|
|
755
|
+
* Size of the icon in pixels
|
|
756
|
+
* @default 24
|
|
757
|
+
*/
|
|
758
|
+
size?: IconSize;
|
|
759
|
+
/**
|
|
760
|
+
* Fill color for the icon
|
|
761
|
+
* @default '#4E5969'
|
|
762
|
+
*/
|
|
763
|
+
color?: string;
|
|
764
|
+
/**
|
|
765
|
+
* Additional CSS class name
|
|
766
|
+
*/
|
|
767
|
+
className?: string;
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
/**
|
|
771
|
+
* Generic Icon Component
|
|
772
|
+
*
|
|
773
|
+
* A higher-order component that accepts an icon name and renders
|
|
774
|
+
* the corresponding icon component with dynamic size and color props.
|
|
775
|
+
*
|
|
776
|
+
* Usage:
|
|
777
|
+
* <Icon name="ArrowDown" size={32} color="#FF5733" />
|
|
778
|
+
*/
|
|
779
|
+
|
|
780
|
+
/**
|
|
781
|
+
* All available icon names
|
|
782
|
+
*/
|
|
783
|
+
type IconName = 'ArrowDown' | 'ArrowFall' | 'ArrowLeft' | 'ArrowRight' | 'ArrowRise' | 'ArrowUp' | 'CaretDown' | 'CaretLeft' | 'CaretRight' | 'CaretUp' | 'DoubleDown' | 'DoubleLeft' | 'DoubleRight' | 'DoubleUp' | 'Down' | 'DownCircle' | 'DragArrow' | 'Expand' | 'Left' | 'LeftCircle' | 'MenuFold' | 'MenuUnfold' | 'Right' | 'RightCircle' | 'RotateLeft' | 'RotateRight' | 'Shrink' | 'Swap' | 'ToBottom' | 'ToLeft' | 'ToRight' | 'ToTop' | 'Up' | 'UpCircle' | 'AlignCenter' | 'AlignLeft' | 'AlignRight' | 'BgColors' | 'Bold' | 'Brush' | 'Circular' | 'Copy' | 'Delete' | 'Edit' | 'Eraser' | 'Filter' | 'FindReplace' | 'FontColors' | 'Formula' | 'H1' | 'H2' | 'H3' | 'H4' | 'H5' | 'H6' | 'H7' | 'Highlight' | 'Italic' | 'LineHeight' | 'Link' | 'ObliqueLine' | 'OrderedList' | 'OriginalSize' | 'Paste' | 'Quote' | 'Redo' | 'Scissor' | 'Sort' | 'SortAscending' | 'SortDescending' | 'Strikethrough' | 'Underline' | 'Undo' | 'UnorderedList' | 'ZoomIn' | 'ZoomOut' | 'Application' | 'Apps' | 'Archive' | 'Book' | 'Branch' | 'Bug' | 'Bulb' | 'Calendar' | 'Camera' | 'Cloud' | 'Command' | 'Common' | 'Compass' | 'Copyright' | 'Dashboard' | 'Desktop' | 'Dice' | 'DragDot' | 'DragDotVertical' | 'DriveFile' | 'Ear' | 'Email' | 'Empty' | 'Experiment' | 'FaceFrownFill' | 'FaceMehFill' | 'File' | 'FileAudio' | 'FileImage' | 'FilePdf' | 'FileVideo' | 'Fire' | 'Folder' | 'FolderAdd' | 'FolderDelete' | 'Gift' | 'Idcard' | 'Image' | 'ImageClose' | 'Interaction' | 'Language' | 'Layout' | 'Loading' | 'Location' | 'Lock' | 'Loop' | 'Man' | 'Menu' | 'MindMapping' | 'Mobile' | 'Moon' | 'MoonFill' | 'Mosaic' | 'Nav' | 'Notification' | 'NotificationClose' | 'OldVersion' | 'Pen' | 'PenFill' | 'Phone' | 'Printer' | 'Public' | 'Pushpin' | 'Qrcode' | 'Robot' | 'RobotAdd' | 'Safe' | 'Schedule' | 'Shake' | 'Skin' | 'Stamp' | 'Storage' | 'Subscribe' | 'SubscribeAdd' | 'Subscribed' | 'Sun' | 'SunFill' | 'Tag' | 'Tags' | 'Thunderbolt' | 'Tool' | 'Trophy' | 'Unlock' | 'User' | 'UserAdd' | 'UserGroup' | 'VideoCamera' | 'Wifi' | 'Woman' | 'At' | 'CloudDownload' | 'Code' | 'CodeBlock' | 'CodeSquare' | 'CustomerService' | 'Download' | 'Export' | 'Eye' | 'EyeInvisible' | 'Heart' | 'History' | 'Home' | 'Import' | 'Launch' | 'List' | 'Message' | 'MessageBanned' | 'More' | 'MoreVertical' | 'Poweroff' | 'Refresh' | 'Reply' | 'Save' | 'Scan' | 'Search' | 'SelectAll' | 'Send' | 'Settings' | 'ShareAlt' | 'ShareExternal' | 'ShareInternal' | 'Star' | 'StarFill' | 'Sync' | 'ThumbDown' | 'ThumbDownFill' | 'ThumbUp' | 'ThumbUpFill' | 'Translate' | 'Upload' | 'Voice' | 'Backward' | 'Forward' | 'Fullscreen' | 'FullscreenExit' | 'LiveBroadcast' | 'Music' | 'Mute' | 'MuteFill' | 'PauseCircle' | 'PauseCircleFill' | 'PlayArrow' | 'PlayArrowFill' | 'PlayCircle' | 'PlayCircleFill' | 'Record' | 'RecordStop' | 'SkipNextFill' | 'SkipPreviousFill' | 'Sound' | 'SoundFill' | 'Check' | 'CheckCircle' | 'CheckCircleFill' | 'CheckSquare' | 'ClockCircle' | 'Close' | 'CloseCircle' | 'CloseCircleFill' | 'Exclamation' | 'ExclamationCircle' | 'ExclamationCircleFill' | 'ExclamationPolygonFill' | 'Info' | 'InfoCircle' | 'InfoCircleFill' | 'Minus' | 'MinusCircle' | 'MinusCircleFill' | 'Plus' | 'PlusCircle' | 'PlusCircleFill' | 'Question' | 'QuestionCircle' | 'QuestionCircleFill' | 'Stop';
|
|
784
|
+
/**
|
|
785
|
+
* Props for the generic Icon component
|
|
786
|
+
*/
|
|
787
|
+
interface GenericIconProps extends IconProps {
|
|
788
|
+
/**
|
|
789
|
+
* Name of the icon to render
|
|
790
|
+
*/
|
|
791
|
+
name: IconName;
|
|
792
|
+
}
|
|
793
|
+
/**
|
|
794
|
+
* Icon Component
|
|
795
|
+
*
|
|
796
|
+
* Generic icon component that dynamically renders the specified icon.
|
|
797
|
+
*
|
|
798
|
+
* @example
|
|
799
|
+
* // Basic usage
|
|
800
|
+
* <Icon name="ArrowDown" />
|
|
801
|
+
*
|
|
802
|
+
* @example
|
|
803
|
+
* // With custom size and color
|
|
804
|
+
* <Icon name="Settings" size={32} color="#FF5733" />
|
|
805
|
+
*/
|
|
806
|
+
declare const Icon: React$1.FC<GenericIconProps>;
|
|
807
|
+
|
|
808
|
+
/**
|
|
809
|
+
* Badge Component Types
|
|
810
|
+
*
|
|
811
|
+
* Types for the Badge component based on design system specifications.
|
|
812
|
+
*/
|
|
813
|
+
|
|
814
|
+
/**
|
|
815
|
+
* Badge color variants based on semantic design tokens
|
|
816
|
+
*/
|
|
817
|
+
type BadgeVariant = 'primary' | 'success' | 'warning' | 'danger' | 'default';
|
|
818
|
+
/**
|
|
819
|
+
* Badge size options
|
|
820
|
+
*/
|
|
821
|
+
type BadgeSize = 'small' | 'medium' | 'large';
|
|
822
|
+
/**
|
|
823
|
+
* Props for the Badge component
|
|
824
|
+
*/
|
|
825
|
+
interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
826
|
+
/**
|
|
827
|
+
* Content to display inside the badge
|
|
828
|
+
*/
|
|
829
|
+
children?: ReactNode;
|
|
830
|
+
/**
|
|
831
|
+
* Visual variant of the badge
|
|
832
|
+
* @default 'default'
|
|
833
|
+
*/
|
|
834
|
+
variant?: BadgeVariant;
|
|
835
|
+
/**
|
|
836
|
+
* Size of the badge
|
|
837
|
+
* @default 'medium'
|
|
838
|
+
*/
|
|
839
|
+
size?: BadgeSize;
|
|
840
|
+
/**
|
|
841
|
+
* Whether to show the badge as a dot (without text)
|
|
842
|
+
* @default false
|
|
843
|
+
*/
|
|
844
|
+
dot?: boolean;
|
|
845
|
+
/**
|
|
846
|
+
* Additional CSS class name
|
|
847
|
+
*/
|
|
848
|
+
className?: string;
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
/**
|
|
852
|
+
* Badge Component
|
|
853
|
+
*
|
|
854
|
+
* A badge component for displaying status, counts, or labels.
|
|
855
|
+
*/
|
|
856
|
+
|
|
857
|
+
/**
|
|
858
|
+
* Badge component for displaying status indicators, counts, or labels
|
|
859
|
+
*
|
|
860
|
+
* @example
|
|
861
|
+
* ```tsx
|
|
862
|
+
* <Badge variant="primary">New</Badge>
|
|
863
|
+
* <Badge variant="success" size="small">99+</Badge>
|
|
864
|
+
* <Badge variant="danger" dot />
|
|
865
|
+
* ```
|
|
866
|
+
*/
|
|
867
|
+
declare const Badge: React$1.FC<BadgeProps>;
|
|
868
|
+
|
|
869
|
+
/**
|
|
870
|
+
* Button Component Types
|
|
871
|
+
*
|
|
872
|
+
* Types for the Button component based on design system specifications.
|
|
873
|
+
*/
|
|
874
|
+
|
|
875
|
+
/**
|
|
876
|
+
* Button variants based on semantic design tokens
|
|
877
|
+
*/
|
|
878
|
+
type ButtonVariant = 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'ghost';
|
|
879
|
+
/**
|
|
880
|
+
* Button size options
|
|
881
|
+
*/
|
|
882
|
+
type ButtonSize = 'small' | 'medium' | 'large';
|
|
883
|
+
/**
|
|
884
|
+
* Props for the Button component
|
|
885
|
+
*/
|
|
886
|
+
interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'type'> {
|
|
887
|
+
/**
|
|
888
|
+
* Content to display inside the button
|
|
889
|
+
*/
|
|
890
|
+
children?: ReactNode;
|
|
891
|
+
/**
|
|
892
|
+
* Visual variant of the button
|
|
893
|
+
* @default 'primary'
|
|
894
|
+
*/
|
|
895
|
+
variant?: ButtonVariant;
|
|
896
|
+
/**
|
|
897
|
+
* Size of the button
|
|
898
|
+
* @default 'medium'
|
|
899
|
+
*/
|
|
900
|
+
size?: ButtonSize;
|
|
901
|
+
/**
|
|
902
|
+
* Whether the button is disabled
|
|
903
|
+
* @default false
|
|
904
|
+
*/
|
|
905
|
+
disabled?: boolean;
|
|
906
|
+
/**
|
|
907
|
+
* Whether the button should take full width
|
|
908
|
+
* @default false
|
|
909
|
+
*/
|
|
910
|
+
fullWidth?: boolean;
|
|
911
|
+
/**
|
|
912
|
+
* Whether the button is in loading state
|
|
913
|
+
* @default false
|
|
914
|
+
*/
|
|
915
|
+
loading?: boolean;
|
|
916
|
+
/**
|
|
917
|
+
* HTML button type
|
|
918
|
+
* @default 'button'
|
|
919
|
+
*/
|
|
920
|
+
type?: 'button' | 'submit' | 'reset';
|
|
921
|
+
/**
|
|
922
|
+
* Additional CSS class name
|
|
923
|
+
*/
|
|
924
|
+
className?: string;
|
|
925
|
+
/**
|
|
926
|
+
* Click event handler
|
|
927
|
+
*/
|
|
928
|
+
onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
/**
|
|
932
|
+
* Button Component
|
|
933
|
+
*
|
|
934
|
+
* A button component for user interactions with various styles and states.
|
|
935
|
+
*/
|
|
936
|
+
|
|
937
|
+
/**
|
|
938
|
+
* Button component for user interactions
|
|
939
|
+
*
|
|
940
|
+
* @example
|
|
941
|
+
* ```tsx
|
|
942
|
+
* <Button variant="primary" onClick={() => console.log('clicked')}>
|
|
943
|
+
* Click me
|
|
944
|
+
* </Button>
|
|
945
|
+
* <Button variant="success" size="large" fullWidth>
|
|
946
|
+
* Submit
|
|
947
|
+
* </Button>
|
|
948
|
+
* <Button variant="danger" loading>
|
|
949
|
+
* Loading...
|
|
950
|
+
* </Button>
|
|
951
|
+
* ```
|
|
952
|
+
*/
|
|
953
|
+
declare const Button: React$1.FC<ButtonProps>;
|
|
954
|
+
|
|
955
|
+
/**
|
|
956
|
+
* Collapse Component Types
|
|
957
|
+
*
|
|
958
|
+
* Types for the Collapse component based on design system specifications.
|
|
959
|
+
*/
|
|
960
|
+
|
|
961
|
+
/**
|
|
962
|
+
* Collapse size options
|
|
963
|
+
*/
|
|
964
|
+
type CollapseSize = 'small' | 'medium' | 'large';
|
|
965
|
+
/**
|
|
966
|
+
* Props for the Collapse component
|
|
967
|
+
*/
|
|
968
|
+
interface CollapseProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title' | 'onChange'> {
|
|
969
|
+
/**
|
|
970
|
+
* Content to display in the collapse header
|
|
971
|
+
*/
|
|
972
|
+
header: ReactNode;
|
|
973
|
+
/**
|
|
974
|
+
* Content to display when expanded
|
|
975
|
+
*/
|
|
976
|
+
children: ReactNode;
|
|
977
|
+
/**
|
|
978
|
+
* Whether the collapse is expanded (controlled mode)
|
|
979
|
+
*/
|
|
980
|
+
expanded?: boolean;
|
|
981
|
+
/**
|
|
982
|
+
* Default expanded state (uncontrolled mode)
|
|
983
|
+
* @default false
|
|
984
|
+
*/
|
|
985
|
+
defaultExpanded?: boolean;
|
|
986
|
+
/**
|
|
987
|
+
* Whether the collapse is disabled
|
|
988
|
+
* @default false
|
|
989
|
+
*/
|
|
990
|
+
disabled?: boolean;
|
|
991
|
+
/**
|
|
992
|
+
* Size of the collapse
|
|
993
|
+
* @default 'medium'
|
|
994
|
+
*/
|
|
995
|
+
size?: CollapseSize;
|
|
996
|
+
/**
|
|
997
|
+
* Whether to show the border
|
|
998
|
+
* @default true
|
|
999
|
+
*/
|
|
1000
|
+
bordered?: boolean;
|
|
1001
|
+
/**
|
|
1002
|
+
* Callback when expand state changes
|
|
1003
|
+
*/
|
|
1004
|
+
onChange?: (expanded: boolean) => void;
|
|
1005
|
+
/**
|
|
1006
|
+
* Additional CSS class name
|
|
1007
|
+
*/
|
|
1008
|
+
className?: string;
|
|
1009
|
+
/**
|
|
1010
|
+
* Additional CSS class name for header
|
|
1011
|
+
*/
|
|
1012
|
+
headerClassName?: string;
|
|
1013
|
+
/**
|
|
1014
|
+
* Additional CSS class name for content
|
|
1015
|
+
*/
|
|
1016
|
+
contentClassName?: string;
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
/**
|
|
1020
|
+
* Collapse Component
|
|
1021
|
+
*
|
|
1022
|
+
* A collapse/accordion component for expandable content sections.
|
|
1023
|
+
*/
|
|
1024
|
+
|
|
1025
|
+
/**
|
|
1026
|
+
* Collapse component for expandable content sections
|
|
1027
|
+
*
|
|
1028
|
+
* @example
|
|
1029
|
+
* ```tsx
|
|
1030
|
+
* <Collapse header="Click to expand">
|
|
1031
|
+
* Hidden content here
|
|
1032
|
+
* </Collapse>
|
|
1033
|
+
* <Collapse header="Controlled" expanded={isOpen} onChange={setIsOpen}>
|
|
1034
|
+
* Controlled content
|
|
1035
|
+
* </Collapse>
|
|
1036
|
+
* <Collapse header="Large size" size="large" defaultExpanded>
|
|
1037
|
+
* Pre-expanded content
|
|
1038
|
+
* </Collapse>
|
|
1039
|
+
* ```
|
|
1040
|
+
*/
|
|
1041
|
+
declare const Collapse: React$1.FC<CollapseProps>;
|
|
1042
|
+
|
|
1043
|
+
/**
|
|
1044
|
+
* Tabs Component Types
|
|
1045
|
+
*
|
|
1046
|
+
* Types for the Tabs component based on design system specifications.
|
|
1047
|
+
*/
|
|
1048
|
+
|
|
1049
|
+
/**
|
|
1050
|
+
* Tabs size options
|
|
1051
|
+
*/
|
|
1052
|
+
type TabsSize = 'small' | 'medium' | 'large';
|
|
1053
|
+
/**
|
|
1054
|
+
* Tabs variant options
|
|
1055
|
+
*/
|
|
1056
|
+
type TabsVariant = 'line' | 'card' | 'pill';
|
|
1057
|
+
/**
|
|
1058
|
+
* Tab item configuration
|
|
1059
|
+
*/
|
|
1060
|
+
interface TabItem {
|
|
1061
|
+
/**
|
|
1062
|
+
* Unique key for the tab
|
|
1063
|
+
*/
|
|
1064
|
+
key: string;
|
|
1065
|
+
/**
|
|
1066
|
+
* Label to display in the tab
|
|
1067
|
+
*/
|
|
1068
|
+
label: ReactNode;
|
|
1069
|
+
/**
|
|
1070
|
+
* Content to display when tab is active
|
|
1071
|
+
*/
|
|
1072
|
+
content: ReactNode;
|
|
1073
|
+
/**
|
|
1074
|
+
* Whether the tab is disabled
|
|
1075
|
+
* @default false
|
|
1076
|
+
*/
|
|
1077
|
+
disabled?: boolean;
|
|
1078
|
+
/**
|
|
1079
|
+
* Icon to display in the tab (optional)
|
|
1080
|
+
*/
|
|
1081
|
+
icon?: ReactNode;
|
|
1082
|
+
}
|
|
1083
|
+
/**
|
|
1084
|
+
* Props for the Tabs component
|
|
1085
|
+
*/
|
|
1086
|
+
interface TabsProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
1087
|
+
/**
|
|
1088
|
+
* Array of tab items
|
|
1089
|
+
*/
|
|
1090
|
+
items: TabItem[];
|
|
1091
|
+
/**
|
|
1092
|
+
* Active tab key (controlled mode)
|
|
1093
|
+
*/
|
|
1094
|
+
activeKey?: string;
|
|
1095
|
+
/**
|
|
1096
|
+
* Default active tab key (uncontrolled mode)
|
|
1097
|
+
*/
|
|
1098
|
+
defaultActiveKey?: string;
|
|
1099
|
+
/**
|
|
1100
|
+
* Callback when active tab changes
|
|
1101
|
+
*/
|
|
1102
|
+
onChange?: (activeKey: string) => void;
|
|
1103
|
+
/**
|
|
1104
|
+
* Size of the tabs
|
|
1105
|
+
* @default 'medium'
|
|
1106
|
+
*/
|
|
1107
|
+
size?: TabsSize;
|
|
1108
|
+
/**
|
|
1109
|
+
* Visual variant of the tabs
|
|
1110
|
+
* @default 'line'
|
|
1111
|
+
*/
|
|
1112
|
+
variant?: TabsVariant;
|
|
1113
|
+
/**
|
|
1114
|
+
* Whether tabs should take full width
|
|
1115
|
+
* @default false
|
|
1116
|
+
*/
|
|
1117
|
+
fullWidth?: boolean;
|
|
1118
|
+
/**
|
|
1119
|
+
* Additional CSS class name
|
|
1120
|
+
*/
|
|
1121
|
+
className?: string;
|
|
1122
|
+
/**
|
|
1123
|
+
* Additional CSS class name for tab list
|
|
1124
|
+
*/
|
|
1125
|
+
tabListClassName?: string;
|
|
1126
|
+
/**
|
|
1127
|
+
* Additional CSS class name for tab content
|
|
1128
|
+
*/
|
|
1129
|
+
contentClassName?: string;
|
|
1130
|
+
/**
|
|
1131
|
+
* Whether to animate tab changes
|
|
1132
|
+
* @default true
|
|
1133
|
+
*/
|
|
1134
|
+
animated?: boolean;
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1137
|
+
/**
|
|
1138
|
+
* Tabs Component
|
|
1139
|
+
*
|
|
1140
|
+
* A tabs component for organizing content into switchable panels.
|
|
1141
|
+
*/
|
|
1142
|
+
|
|
1143
|
+
/**
|
|
1144
|
+
* Tabs component for organizing content into switchable panels
|
|
1145
|
+
*
|
|
1146
|
+
* @example
|
|
1147
|
+
* ```tsx
|
|
1148
|
+
* <Tabs items={[
|
|
1149
|
+
* { key: '1', label: 'Tab 1', content: <div>Content 1</div> },
|
|
1150
|
+
* { key: '2', label: 'Tab 2', content: <div>Content 2</div> }
|
|
1151
|
+
* ]} />
|
|
1152
|
+
*
|
|
1153
|
+
* <Tabs
|
|
1154
|
+
* variant="card"
|
|
1155
|
+
* size="large"
|
|
1156
|
+
* activeKey={activeKey}
|
|
1157
|
+
* onChange={setActiveKey}
|
|
1158
|
+
* items={items}
|
|
1159
|
+
* />
|
|
1160
|
+
* ```
|
|
1161
|
+
*/
|
|
1162
|
+
declare const Tabs: React$1.FC<TabsProps>;
|
|
1163
|
+
|
|
1164
|
+
/**
|
|
1165
|
+
* Carousel Component Types
|
|
1166
|
+
*
|
|
1167
|
+
* Types for the Carousel component based on design system specifications.
|
|
1168
|
+
*/
|
|
1169
|
+
|
|
1170
|
+
/**
|
|
1171
|
+
* Carousel size options
|
|
1172
|
+
*/
|
|
1173
|
+
type CarouselSize = 'small' | 'medium' | 'large';
|
|
1174
|
+
/**
|
|
1175
|
+
* Carousel item configuration
|
|
1176
|
+
*/
|
|
1177
|
+
interface CarouselItem {
|
|
1178
|
+
/**
|
|
1179
|
+
* Unique key for the carousel item
|
|
1180
|
+
*/
|
|
1181
|
+
key: string;
|
|
1182
|
+
/**
|
|
1183
|
+
* Content to display in the carousel item
|
|
1184
|
+
*/
|
|
1185
|
+
content: ReactNode;
|
|
1186
|
+
/**
|
|
1187
|
+
* Alternative text for accessibility
|
|
1188
|
+
*/
|
|
1189
|
+
alt?: string;
|
|
1190
|
+
}
|
|
1191
|
+
/**
|
|
1192
|
+
* Props for the Carousel component
|
|
1193
|
+
*/
|
|
1194
|
+
interface CarouselProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
1195
|
+
/**
|
|
1196
|
+
* Array of carousel items
|
|
1197
|
+
*/
|
|
1198
|
+
items: CarouselItem[];
|
|
1199
|
+
/**
|
|
1200
|
+
* Active item index (controlled mode)
|
|
1201
|
+
*/
|
|
1202
|
+
activeIndex?: number;
|
|
1203
|
+
/**
|
|
1204
|
+
* Default active item index (uncontrolled mode)
|
|
1205
|
+
* @default 0
|
|
1206
|
+
*/
|
|
1207
|
+
defaultActiveIndex?: number;
|
|
1208
|
+
/**
|
|
1209
|
+
* Callback when active item changes
|
|
1210
|
+
*/
|
|
1211
|
+
onChange?: (index: number) => void;
|
|
1212
|
+
/**
|
|
1213
|
+
* Size of the carousel
|
|
1214
|
+
* @default 'medium'
|
|
1215
|
+
*/
|
|
1216
|
+
size?: CarouselSize;
|
|
1217
|
+
/**
|
|
1218
|
+
* Whether to show navigation arrows
|
|
1219
|
+
* @default true
|
|
1220
|
+
*/
|
|
1221
|
+
showArrows?: boolean;
|
|
1222
|
+
/**
|
|
1223
|
+
* Whether to show dot indicators
|
|
1224
|
+
* @default true
|
|
1225
|
+
*/
|
|
1226
|
+
showDots?: boolean;
|
|
1227
|
+
/**
|
|
1228
|
+
* Whether to enable infinite loop
|
|
1229
|
+
* @default true
|
|
1230
|
+
*/
|
|
1231
|
+
infinite?: boolean;
|
|
1232
|
+
/**
|
|
1233
|
+
* Whether to enable autoplay
|
|
1234
|
+
* @default false
|
|
1235
|
+
*/
|
|
1236
|
+
autoplay?: boolean;
|
|
1237
|
+
/**
|
|
1238
|
+
* Autoplay interval in milliseconds
|
|
1239
|
+
* @default 3000
|
|
1240
|
+
*/
|
|
1241
|
+
autoplayInterval?: number;
|
|
1242
|
+
/**
|
|
1243
|
+
* Whether to pause autoplay on hover
|
|
1244
|
+
* @default true
|
|
1245
|
+
*/
|
|
1246
|
+
pauseOnHover?: boolean;
|
|
1247
|
+
/**
|
|
1248
|
+
* Whether to enable swipe/drag gestures
|
|
1249
|
+
* @default true
|
|
1250
|
+
*/
|
|
1251
|
+
swipeable?: boolean;
|
|
1252
|
+
/**
|
|
1253
|
+
* Whether to animate transitions
|
|
1254
|
+
* @default true
|
|
1255
|
+
*/
|
|
1256
|
+
animated?: boolean;
|
|
1257
|
+
/**
|
|
1258
|
+
* Animation duration in milliseconds
|
|
1259
|
+
* @default 300
|
|
1260
|
+
*/
|
|
1261
|
+
animationDuration?: number;
|
|
1262
|
+
/**
|
|
1263
|
+
* Additional CSS class name
|
|
1264
|
+
*/
|
|
1265
|
+
className?: string;
|
|
1266
|
+
/**
|
|
1267
|
+
* Additional CSS class name for carousel items
|
|
1268
|
+
*/
|
|
1269
|
+
itemClassName?: string;
|
|
1270
|
+
/**
|
|
1271
|
+
* Additional CSS class name for navigation arrows
|
|
1272
|
+
*/
|
|
1273
|
+
arrowClassName?: string;
|
|
1274
|
+
/**
|
|
1275
|
+
* Additional CSS class name for dot indicators
|
|
1276
|
+
*/
|
|
1277
|
+
dotsClassName?: string;
|
|
1278
|
+
}
|
|
1279
|
+
|
|
1280
|
+
/**
|
|
1281
|
+
* Carousel Component
|
|
1282
|
+
*
|
|
1283
|
+
* A carousel component for displaying a rotating set of content.
|
|
1284
|
+
*/
|
|
1285
|
+
|
|
1286
|
+
/**
|
|
1287
|
+
* Carousel component for displaying a rotating set of content
|
|
1288
|
+
*
|
|
1289
|
+
* @example
|
|
1290
|
+
* ```tsx
|
|
1291
|
+
* <Carousel items={[
|
|
1292
|
+
* { key: '1', content: <div>Slide 1</div>, alt: 'First slide' },
|
|
1293
|
+
* { key: '2', content: <div>Slide 2</div>, alt: 'Second slide' }
|
|
1294
|
+
* ]} />
|
|
1295
|
+
*
|
|
1296
|
+
* <Carousel
|
|
1297
|
+
* items={items}
|
|
1298
|
+
* autoplay
|
|
1299
|
+
* infinite
|
|
1300
|
+
* showArrows
|
|
1301
|
+
* showDots
|
|
1302
|
+
* />
|
|
1303
|
+
* ```
|
|
1304
|
+
*/
|
|
1305
|
+
declare const Carousel: React$1.FC<CarouselProps>;
|
|
1306
|
+
|
|
1307
|
+
/**
|
|
1308
|
+
* useSwipe Hook
|
|
1309
|
+
*
|
|
1310
|
+
* A reusable hook for handling swipe/drag gestures on both touch and mouse devices.
|
|
1311
|
+
*/
|
|
1312
|
+
interface UseSwipeOptions {
|
|
1313
|
+
/**
|
|
1314
|
+
* Whether swipe/drag is enabled
|
|
1315
|
+
* @default true
|
|
1316
|
+
*/
|
|
1317
|
+
enabled?: boolean;
|
|
1318
|
+
/**
|
|
1319
|
+
* Minimum distance in pixels to trigger a swipe
|
|
1320
|
+
* @default 50
|
|
1321
|
+
*/
|
|
1322
|
+
threshold?: number;
|
|
1323
|
+
/**
|
|
1324
|
+
* Callback when swiping/dragging left
|
|
1325
|
+
*/
|
|
1326
|
+
onSwipeLeft?: () => void;
|
|
1327
|
+
/**
|
|
1328
|
+
* Callback when swiping/dragging right
|
|
1329
|
+
*/
|
|
1330
|
+
onSwipeRight?: () => void;
|
|
1331
|
+
/**
|
|
1332
|
+
* Callback when swiping/dragging up
|
|
1333
|
+
*/
|
|
1334
|
+
onSwipeUp?: () => void;
|
|
1335
|
+
/**
|
|
1336
|
+
* Callback when swiping/dragging down
|
|
1337
|
+
*/
|
|
1338
|
+
onSwipeDown?: () => void;
|
|
1339
|
+
/**
|
|
1340
|
+
* Whether to prevent default behavior during swipe
|
|
1341
|
+
* @default false
|
|
1342
|
+
*/
|
|
1343
|
+
preventDefault?: boolean;
|
|
1344
|
+
}
|
|
1345
|
+
interface UseSwipeReturn {
|
|
1346
|
+
/**
|
|
1347
|
+
* Whether the user is currently dragging
|
|
1348
|
+
*/
|
|
1349
|
+
isDragging: boolean;
|
|
1350
|
+
/**
|
|
1351
|
+
* Handlers for touch events
|
|
1352
|
+
*/
|
|
1353
|
+
handlers: {
|
|
1354
|
+
onTouchStart: (e: React.TouchEvent) => void;
|
|
1355
|
+
onTouchMove: (e: React.TouchEvent) => void;
|
|
1356
|
+
onTouchEnd: () => void;
|
|
1357
|
+
onMouseDown: (e: React.MouseEvent) => void;
|
|
1358
|
+
onMouseMove: (e: React.MouseEvent) => void;
|
|
1359
|
+
onMouseUp: (e: React.MouseEvent) => void;
|
|
1360
|
+
onMouseLeave: () => void;
|
|
1361
|
+
};
|
|
1362
|
+
/**
|
|
1363
|
+
* Reset the swipe state
|
|
1364
|
+
*/
|
|
1365
|
+
reset: () => void;
|
|
1366
|
+
}
|
|
1367
|
+
/**
|
|
1368
|
+
* Hook for handling swipe/drag gestures
|
|
1369
|
+
*
|
|
1370
|
+
* @example
|
|
1371
|
+
* ```tsx
|
|
1372
|
+
* const { handlers, isDragging } = useSwipe({
|
|
1373
|
+
* onSwipeLeft: () => console.log('Swiped left'),
|
|
1374
|
+
* onSwipeRight: () => console.log('Swiped right'),
|
|
1375
|
+
* threshold: 50,
|
|
1376
|
+
* });
|
|
1377
|
+
*
|
|
1378
|
+
* return <div {...handlers}>Swipeable content</div>;
|
|
1379
|
+
* ```
|
|
1380
|
+
*/
|
|
1381
|
+
declare const useSwipe: (options?: UseSwipeOptions) => UseSwipeReturn;
|
|
1382
|
+
|
|
1383
|
+
export { type AlignItems, Badge, type BadgeProps, type BadgeSize, type BadgeVariant, type Breakpoint, type BreakpointTokens, type BreakpointValue, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Carousel, type CarouselItem, type CarouselProps, type CarouselSize, Collapse, type CollapseProps, type CollapseSize, type ColorPalette, type ColorScale, Container, type ContainerProps, type ContainerTokens, Flex, type FlexDirection, type FlexProps, type FlexWrap, type FontSizeScale, type GenericIconProps, Grid, type GridConfig, GridItem, type GridItemProps, type GridProps, Icon, type IconName, type IconProps, type IconSize, Inline, type InlineProps, type JustifyContent, type ResponsiveBoolean, type ResponsiveNumber, type ResponsiveProps, type ResponsiveSpacing, type ResponsiveValue, type Shadow, type ShadowTokens, type SpacingKey, type SpacingTokens, type SpacingValue, Stack, type StackProps, type TabItem, Tabs, type TabsProps, type TabsSize, type TabsVariant, type ThemeMode, type TypographyStyle, type TypographyTokens, type UseSwipeOptions, type UseSwipeReturn, breakpointOrder, breakpoints, classNames, colors, combineShadows, componentShadows, containerMaxWidths, containerPadding, createShadow, createSpacingStyle, createTypographyStyle, cssVar, darkColors, fontWeights, generateResponsiveStyles, getCurrentBreakpoint, getDefinedBreakpoints, getLineHeight, getMediaQuery, getSpacing, getSpacingRem, gridConfig, hexToRgba, isBreakpointActive, lightColors, mergeStyles, pxToRem, rawShadows, resolveResponsiveValue, responsiveClassName, shadows, spacing, toPixels, typography, useSwipe };
|