glintly-ui 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/glintly-ui.cjs +947 -758
- package/dist/glintly-ui.d.ts +653 -80
- package/dist/glintly-ui.js +8991 -8252
- package/dist/glintly-ui.umd.cjs +948 -759
- package/package.json +12 -3
package/dist/glintly-ui.d.ts
CHANGED
|
@@ -79,6 +79,16 @@ declare type AvatarTheme = 'default' | 'gradient-blue' | 'gradient-purple' | 'gr
|
|
|
79
79
|
|
|
80
80
|
declare type AvatarVariant = 'circle' | 'square';
|
|
81
81
|
|
|
82
|
+
/**
|
|
83
|
+
* Background colors for different surface levels
|
|
84
|
+
*/
|
|
85
|
+
export declare interface BackgroundColors {
|
|
86
|
+
base: string;
|
|
87
|
+
surface: string;
|
|
88
|
+
elevated: string;
|
|
89
|
+
overlay: string;
|
|
90
|
+
}
|
|
91
|
+
|
|
82
92
|
export declare const Badge: default_2.FC<BadgeProps_2>;
|
|
83
93
|
|
|
84
94
|
export declare const BadgeGroup: default_2.FC<BadgeGroupProps>;
|
|
@@ -123,22 +133,85 @@ declare type BadgeSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
|
123
133
|
|
|
124
134
|
declare type BadgeVariant = 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'info' | 'gray';
|
|
125
135
|
|
|
126
|
-
|
|
136
|
+
/**
|
|
137
|
+
* Border colors
|
|
138
|
+
*/
|
|
139
|
+
export declare interface BorderColors {
|
|
140
|
+
default: string;
|
|
141
|
+
hover: string;
|
|
142
|
+
focus: string;
|
|
143
|
+
disabled: string;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export declare interface BorderRadius {
|
|
147
|
+
none: string;
|
|
148
|
+
sm: string;
|
|
149
|
+
base: string;
|
|
150
|
+
md: string;
|
|
151
|
+
lg: string;
|
|
152
|
+
xl: string;
|
|
153
|
+
'2xl': string;
|
|
154
|
+
'3xl': string;
|
|
155
|
+
full: string;
|
|
156
|
+
[key: string]: string;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export declare interface BorderWidth {
|
|
160
|
+
0: string;
|
|
161
|
+
1: string;
|
|
162
|
+
2: string;
|
|
163
|
+
4: string;
|
|
164
|
+
8: string;
|
|
127
165
|
[key: string]: string;
|
|
128
166
|
}
|
|
129
167
|
|
|
130
|
-
export declare const BoxIcon: default_2.FC<
|
|
168
|
+
export declare const BoxIcon: default_2.FC<BoxIconProps>;
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* BoxIcon
|
|
172
|
+
*
|
|
173
|
+
* Public, framework-agnostic icon component (similar to react-icons).
|
|
174
|
+
*
|
|
175
|
+
* - If `name` matches a built-in SVG icon key, it renders the inline SVG.
|
|
176
|
+
* - Otherwise, it falls back to the `<box-icon>` web component (Boxicons).
|
|
177
|
+
*
|
|
178
|
+
* **Color Inheritance (like react-icons):**
|
|
179
|
+
* - If no `color` prop is provided, icons use `currentColor` and inherit color from CSS.
|
|
180
|
+
* - If `color` prop is provided, it overrides the inherited color.
|
|
181
|
+
*
|
|
182
|
+
* You can use either:
|
|
183
|
+
* - `name="home"` (preferred for public usage)
|
|
184
|
+
* - `name="lib-home"` (backwards-compatible alias, still supported)
|
|
185
|
+
*/
|
|
186
|
+
declare interface BoxIconProps {
|
|
187
|
+
/** Icon name. Matches built-in SVG keys or Boxicons names. */
|
|
131
188
|
name: string;
|
|
189
|
+
/**
|
|
190
|
+
* Optional color applied to SVG fill or Boxicon color.
|
|
191
|
+
* If not provided, icon will use `currentColor` and inherit from parent CSS.
|
|
192
|
+
*/
|
|
132
193
|
color?: string;
|
|
194
|
+
/** Boxicons type (e.g., 'solid', 'regular', 'logo') for web component fallback. */
|
|
133
195
|
type?: string;
|
|
196
|
+
/** Explicit height for the icon (e.g., '20', '20px'). */
|
|
134
197
|
height?: string;
|
|
198
|
+
/** Explicit width for the icon (e.g., '20', '20px'). */
|
|
135
199
|
width?: string;
|
|
200
|
+
/** Additional inline styles applied to the wrapper / SVG. */
|
|
136
201
|
style?: default_2.CSSProperties;
|
|
137
|
-
|
|
202
|
+
/** Optional CSS class for the wrapper. */
|
|
203
|
+
className?: string;
|
|
204
|
+
}
|
|
138
205
|
|
|
139
206
|
declare type BreakpointKey = "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
|
|
140
207
|
|
|
141
|
-
declare interface Breakpoints {
|
|
208
|
+
export declare interface Breakpoints {
|
|
209
|
+
xs: string;
|
|
210
|
+
sm: string;
|
|
211
|
+
md: string;
|
|
212
|
+
lg: string;
|
|
213
|
+
xl: string;
|
|
214
|
+
'2xl': string;
|
|
142
215
|
[key: string]: string;
|
|
143
216
|
}
|
|
144
217
|
|
|
@@ -149,7 +222,12 @@ export declare interface ButtonProps extends Omit<default_2.ButtonHTMLAttributes
|
|
|
149
222
|
variant?: ButtonVariant;
|
|
150
223
|
size?: ButtonSize;
|
|
151
224
|
shade?: ShadeKey;
|
|
152
|
-
icon
|
|
225
|
+
/** Optional icon rendered before the children */
|
|
226
|
+
startIcon?: default_2.ReactNode;
|
|
227
|
+
/** Optional icon rendered after the children */
|
|
228
|
+
endIcon?: default_2.ReactNode;
|
|
229
|
+
/** When true, button renders only the icon (no text padding) */
|
|
230
|
+
iconOnly?: boolean;
|
|
153
231
|
shadow?: ButtonShadow;
|
|
154
232
|
border?: boolean;
|
|
155
233
|
fullWidth?: boolean;
|
|
@@ -158,9 +236,9 @@ export declare interface ButtonProps extends Omit<default_2.ButtonHTMLAttributes
|
|
|
158
236
|
|
|
159
237
|
declare type ButtonShadow = "sm" | "md" | "lg";
|
|
160
238
|
|
|
161
|
-
declare type ButtonSize = "xs" | "sm" | "md" | "lg" | "xl";
|
|
239
|
+
export declare type ButtonSize = "xs" | "sm" | "md" | "lg" | "xl";
|
|
162
240
|
|
|
163
|
-
declare type ButtonVariant = "primary" | "
|
|
241
|
+
export declare type ButtonVariant = "primary" | "outline" | "gray" | "ghost" | "danger";
|
|
164
242
|
|
|
165
243
|
export declare const Card: default_2.FC<CardProps>;
|
|
166
244
|
|
|
@@ -216,6 +294,19 @@ declare interface CarouselSlide {
|
|
|
216
294
|
alt?: string;
|
|
217
295
|
}
|
|
218
296
|
|
|
297
|
+
/**
|
|
298
|
+
* Check if a color meets WCAG contrast requirements
|
|
299
|
+
*
|
|
300
|
+
* @param foreground - Foreground color (hex)
|
|
301
|
+
* @param background - Background color (hex)
|
|
302
|
+
* @param level - WCAG level ('AA' or 'AAA')
|
|
303
|
+
* @param size - 'normal' or 'large' text
|
|
304
|
+
*/
|
|
305
|
+
export declare function checkContrast(foreground: string, background: string, level?: 'AA' | 'AAA', size?: 'normal' | 'large'): {
|
|
306
|
+
pass: boolean;
|
|
307
|
+
ratio: number;
|
|
308
|
+
};
|
|
309
|
+
|
|
219
310
|
export declare const CodeViewer: default_2.FC<CodeViewerProps>;
|
|
220
311
|
|
|
221
312
|
declare interface CodeViewerProps {
|
|
@@ -234,13 +325,27 @@ declare interface CodeViewerProps {
|
|
|
234
325
|
|
|
235
326
|
export declare const Col: default_2.FC<ColProps>;
|
|
236
327
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
328
|
+
/**
|
|
329
|
+
* Complete color palette for a theme
|
|
330
|
+
*/
|
|
331
|
+
export declare interface Colors {
|
|
332
|
+
semantic: SemanticColors;
|
|
333
|
+
neutral: NeutralColors;
|
|
334
|
+
background: BackgroundColors;
|
|
335
|
+
text: TextColors;
|
|
336
|
+
border: BorderColors;
|
|
337
|
+
[key: string]: any;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* Glintly UI Theme System
|
|
342
|
+
* A flexible, type-safe theme system for React applications
|
|
343
|
+
*/
|
|
344
|
+
/**
|
|
345
|
+
* Color scale with semantic intensity levels
|
|
346
|
+
* Common pattern: 50 (lightest) to 900 (darkest)
|
|
347
|
+
*/
|
|
348
|
+
export declare interface ColorScale {
|
|
244
349
|
50?: string;
|
|
245
350
|
100?: string;
|
|
246
351
|
200?: string;
|
|
@@ -251,25 +356,6 @@ declare type ColorScale = {
|
|
|
251
356
|
700?: string;
|
|
252
357
|
800?: string;
|
|
253
358
|
900?: string;
|
|
254
|
-
};
|
|
255
|
-
|
|
256
|
-
declare interface ColorVariant {
|
|
257
|
-
primary: ColorScale;
|
|
258
|
-
secondary: ColorScale;
|
|
259
|
-
background: string;
|
|
260
|
-
surface: string;
|
|
261
|
-
text: {
|
|
262
|
-
primary: string;
|
|
263
|
-
secondary: string;
|
|
264
|
-
disabled: string;
|
|
265
|
-
};
|
|
266
|
-
error: ColorScale;
|
|
267
|
-
success: ColorScale;
|
|
268
|
-
warning: ColorScale;
|
|
269
|
-
gray: ColorScale;
|
|
270
|
-
yellow: ColorScale;
|
|
271
|
-
iconButton: ColorScale;
|
|
272
|
-
info: ColorScale;
|
|
273
359
|
}
|
|
274
360
|
|
|
275
361
|
declare type ColProps = {
|
|
@@ -312,6 +398,39 @@ declare interface ContainerProps extends default_2.HTMLAttributes<HTMLDivElement
|
|
|
312
398
|
children?: default_2.ReactNode;
|
|
313
399
|
}
|
|
314
400
|
|
|
401
|
+
/**
|
|
402
|
+
* Create a color scale from a single base color
|
|
403
|
+
* Generates lighter and darker shades
|
|
404
|
+
*
|
|
405
|
+
* @param baseColor - The base color in hex format
|
|
406
|
+
* @param adjustments - Optional custom adjustments for each shade
|
|
407
|
+
*/
|
|
408
|
+
export declare function createColorScale(baseColor: string, adjustments?: Partial<ColorScale>): ColorScale;
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* Create a custom theme from scratch
|
|
412
|
+
*
|
|
413
|
+
* @example
|
|
414
|
+
* ```ts
|
|
415
|
+
* import { createTheme } from 'glintly-ui/themes';
|
|
416
|
+
*
|
|
417
|
+
* const myTheme = createTheme({
|
|
418
|
+
* colors: {
|
|
419
|
+
* semantic: {
|
|
420
|
+
* primary: createColorScale('#ff0000'),
|
|
421
|
+
* // ... other colors
|
|
422
|
+
* },
|
|
423
|
+
* },
|
|
424
|
+
* });
|
|
425
|
+
* ```
|
|
426
|
+
*/
|
|
427
|
+
export declare function createTheme(config: Partial<Theme>, baseTheme?: Theme): Theme;
|
|
428
|
+
|
|
429
|
+
/**
|
|
430
|
+
* Cyan theme - Cyan & Blue
|
|
431
|
+
*/
|
|
432
|
+
export declare const cyanTheme: ThemeSet;
|
|
433
|
+
|
|
315
434
|
declare interface Data {
|
|
316
435
|
title?: string;
|
|
317
436
|
subTitle?: string;
|
|
@@ -409,6 +528,11 @@ declare const defaultFontSizes: {
|
|
|
409
528
|
|
|
410
529
|
declare const defaultLineHeights: Record<string, string>;
|
|
411
530
|
|
|
531
|
+
/**
|
|
532
|
+
* Default theme - Blue & Purple
|
|
533
|
+
*/
|
|
534
|
+
export declare const defaultTheme: ThemeSet;
|
|
535
|
+
|
|
412
536
|
export { Dropdown }
|
|
413
537
|
|
|
414
538
|
export { DropdownDivider }
|
|
@@ -427,6 +551,20 @@ export { DropdownText }
|
|
|
427
551
|
|
|
428
552
|
export { DropdownToggle }
|
|
429
553
|
|
|
554
|
+
export declare interface Effects {
|
|
555
|
+
blur: {
|
|
556
|
+
[key: string]: string;
|
|
557
|
+
};
|
|
558
|
+
opacity: {
|
|
559
|
+
[key: string]: string;
|
|
560
|
+
};
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
/**
|
|
564
|
+
* Emerald theme - Green & Teal
|
|
565
|
+
*/
|
|
566
|
+
export declare const emeraldTheme: ThemeSet;
|
|
567
|
+
|
|
430
568
|
export declare const ErrorPage: default_2.FC<ErrorPageProps>;
|
|
431
569
|
|
|
432
570
|
declare interface ErrorPageProps extends EyesVariantProps, ConnectionVariantsProp, ComingSoonProps, ConnectionErrorProps {
|
|
@@ -467,6 +605,68 @@ declare interface FilterField {
|
|
|
467
605
|
placeholder?: string;
|
|
468
606
|
}
|
|
469
607
|
|
|
608
|
+
export declare interface FontSizes {
|
|
609
|
+
xs: string;
|
|
610
|
+
sm: string;
|
|
611
|
+
base: string;
|
|
612
|
+
lg: string;
|
|
613
|
+
xl: string;
|
|
614
|
+
'2xl': string;
|
|
615
|
+
'3xl': string;
|
|
616
|
+
'4xl': string;
|
|
617
|
+
'5xl': string;
|
|
618
|
+
[key: string]: string;
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
export declare interface FontWeights {
|
|
622
|
+
thin: number;
|
|
623
|
+
extralight: number;
|
|
624
|
+
light: number;
|
|
625
|
+
normal: number;
|
|
626
|
+
medium: number;
|
|
627
|
+
semibold: number;
|
|
628
|
+
bold: number;
|
|
629
|
+
extrabold: number;
|
|
630
|
+
black: number;
|
|
631
|
+
[key: string]: number;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
/**
|
|
635
|
+
* Generate CSS string from theme variables
|
|
636
|
+
*
|
|
637
|
+
* @example
|
|
638
|
+
* ```ts
|
|
639
|
+
* import { generateCSSString, getTheme } from 'glintly-ui/themes';
|
|
640
|
+
*
|
|
641
|
+
* const theme = getTheme('default', 'light');
|
|
642
|
+
* const cssString = generateCSSString(theme);
|
|
643
|
+
* // Inject into <style> tag or write to file
|
|
644
|
+
* ```
|
|
645
|
+
*/
|
|
646
|
+
export declare function generateCSSString(theme: Theme, selector?: string, prefix?: string): string;
|
|
647
|
+
|
|
648
|
+
/**
|
|
649
|
+
* Get a color from the theme with fallback
|
|
650
|
+
*
|
|
651
|
+
* @example
|
|
652
|
+
* ```ts
|
|
653
|
+
* import { getColor } from 'glintly-ui/themes';
|
|
654
|
+
*
|
|
655
|
+
* const primaryColor = getColor(theme, 'semantic.primary.500', '#3b82f6');
|
|
656
|
+
* ```
|
|
657
|
+
*/
|
|
658
|
+
export declare function getColor(theme: Theme, path: string, fallback?: string): string;
|
|
659
|
+
|
|
660
|
+
/**
|
|
661
|
+
* Get the default theme
|
|
662
|
+
*/
|
|
663
|
+
export declare function getDefaultTheme(mode?: 'light' | 'dark'): Theme;
|
|
664
|
+
|
|
665
|
+
/**
|
|
666
|
+
* Get a theme by name and mode
|
|
667
|
+
*/
|
|
668
|
+
export declare function getTheme(themeName: string, mode: 'light' | 'dark'): Theme;
|
|
669
|
+
|
|
470
670
|
declare type IconPosition = 'left' | 'right' | 'both' | "onlyIcon";
|
|
471
671
|
|
|
472
672
|
declare type IconPosition_2 = 'left' | 'right' | 'both' | "onlyIcon";
|
|
@@ -563,6 +763,16 @@ declare type InternalStepProps = StepProps & {
|
|
|
563
763
|
last?: boolean;
|
|
564
764
|
};
|
|
565
765
|
|
|
766
|
+
export declare interface LineHeights {
|
|
767
|
+
none: string;
|
|
768
|
+
tight: string;
|
|
769
|
+
snug: string;
|
|
770
|
+
normal: string;
|
|
771
|
+
relaxed: string;
|
|
772
|
+
loose: string;
|
|
773
|
+
[key: string]: string;
|
|
774
|
+
}
|
|
775
|
+
|
|
566
776
|
export { List }
|
|
567
777
|
|
|
568
778
|
export { ListDivider }
|
|
@@ -571,54 +781,206 @@ export { ListItem }
|
|
|
571
781
|
|
|
572
782
|
export { ListSectionHeader }
|
|
573
783
|
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
784
|
+
/**
|
|
785
|
+
* Merge a custom theme with a base theme
|
|
786
|
+
*
|
|
787
|
+
* @example
|
|
788
|
+
* ```ts
|
|
789
|
+
* import { mergeTheme, getTheme } from 'glintly-ui/themes';
|
|
790
|
+
*
|
|
791
|
+
* const customTheme = mergeTheme(
|
|
792
|
+
* getTheme('default', 'light'),
|
|
793
|
+
* {
|
|
794
|
+
* colors: {
|
|
795
|
+
* semantic: {
|
|
796
|
+
* primary: {
|
|
797
|
+
* 500: '#ff0000',
|
|
798
|
+
* },
|
|
799
|
+
* },
|
|
800
|
+
* },
|
|
801
|
+
* }
|
|
802
|
+
* );
|
|
803
|
+
* ```
|
|
804
|
+
*/
|
|
805
|
+
export declare function mergeTheme(baseTheme: Theme, customTheme: Partial<Theme>): Theme;
|
|
806
|
+
|
|
807
|
+
/**
|
|
808
|
+
* Merge a theme set (light and dark variants)
|
|
809
|
+
*
|
|
810
|
+
* @example
|
|
811
|
+
* ```ts
|
|
812
|
+
* import { mergeThemeSet, themes } from 'glintly-ui/themes';
|
|
813
|
+
*
|
|
814
|
+
* const customThemeSet = mergeThemeSet(themes.default, {
|
|
815
|
+
* light: {
|
|
816
|
+
* colors: {
|
|
817
|
+
* semantic: {
|
|
818
|
+
* primary: myCustomColorScale,
|
|
819
|
+
* },
|
|
820
|
+
* },
|
|
821
|
+
* },
|
|
822
|
+
* dark: {
|
|
823
|
+
* colors: {
|
|
824
|
+
* semantic: {
|
|
825
|
+
* primary: myCustomColorScale,
|
|
826
|
+
* },
|
|
827
|
+
* },
|
|
828
|
+
* },
|
|
829
|
+
* });
|
|
830
|
+
* ```
|
|
831
|
+
*/
|
|
832
|
+
export declare function mergeThemeSet(baseThemeSet: ThemeSet, customThemeSet: Partial<ThemeSet>): ThemeSet;
|
|
833
|
+
|
|
834
|
+
export declare const Modal: ModalCompound;
|
|
835
|
+
|
|
836
|
+
declare interface ModalCompound extends default_2.FC<ModalProps> {
|
|
837
|
+
Header: default_2.FC<ModalSectionProps>;
|
|
838
|
+
Body: default_2.FC<ModalSectionProps>;
|
|
839
|
+
Footer: default_2.FC<ModalSectionProps>;
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
export declare interface ModalProps {
|
|
843
|
+
/** Whether the modal is open */
|
|
577
844
|
isOpen: boolean;
|
|
578
|
-
title
|
|
845
|
+
/** Modal title */
|
|
846
|
+
title?: default_2.ReactNode;
|
|
847
|
+
/** Modal content */
|
|
579
848
|
children: default_2.ReactNode;
|
|
849
|
+
/** Callback when modal is closed */
|
|
580
850
|
onClose: () => void;
|
|
851
|
+
/** Callback when confirm button is clicked */
|
|
581
852
|
onConfirm?: () => void;
|
|
853
|
+
/** Whether to show footer with confirm/cancel buttons */
|
|
582
854
|
showFooter?: boolean;
|
|
855
|
+
/** Confirm button text */
|
|
583
856
|
confirmText?: string;
|
|
857
|
+
/** Cancel button text */
|
|
584
858
|
cancelText?: string;
|
|
585
|
-
|
|
859
|
+
/** Modal size */
|
|
860
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "fullWidth";
|
|
861
|
+
/** Background color of the modal */
|
|
862
|
+
backgroundColor?: string;
|
|
863
|
+
/** Background color of the overlay/backdrop */
|
|
864
|
+
overlayColor?: string;
|
|
865
|
+
/** Custom className for the modal container */
|
|
866
|
+
className?: string;
|
|
867
|
+
/** Custom className for the overlay */
|
|
868
|
+
overlayClassName?: string;
|
|
869
|
+
/** Whether to center the modal vertically */
|
|
870
|
+
centered?: boolean;
|
|
871
|
+
/** Whether to show close button */
|
|
872
|
+
closable?: boolean;
|
|
873
|
+
/** Whether to close modal when clicking mask/overlay */
|
|
874
|
+
maskClosable?: boolean;
|
|
875
|
+
/** Custom close icon */
|
|
876
|
+
closeIcon?: default_2.ReactNode;
|
|
877
|
+
/** Custom footer */
|
|
878
|
+
footer?: default_2.ReactNode | null;
|
|
879
|
+
/** Z-index of the modal */
|
|
880
|
+
zIndex?: number;
|
|
881
|
+
/** Custom styles for modal container */
|
|
882
|
+
style?: default_2.CSSProperties;
|
|
883
|
+
/** Custom styles for overlay */
|
|
884
|
+
overlayStyle?: default_2.CSSProperties;
|
|
885
|
+
/** Width of the modal */
|
|
886
|
+
width?: string | number;
|
|
887
|
+
/** Whether to destroy modal on close */
|
|
888
|
+
destroyOnClose?: boolean;
|
|
889
|
+
/** Animation duration in milliseconds */
|
|
890
|
+
animationDuration?: number;
|
|
586
891
|
}
|
|
587
892
|
|
|
588
|
-
declare
|
|
893
|
+
declare interface ModalSectionProps {
|
|
894
|
+
children: default_2.ReactNode;
|
|
895
|
+
className?: string;
|
|
896
|
+
style?: default_2.CSSProperties;
|
|
897
|
+
}
|
|
589
898
|
|
|
590
899
|
export declare const Navbar: default_2.FC<NavbarProps>;
|
|
591
900
|
|
|
901
|
+
/**
|
|
902
|
+
* Navigation link item configuration
|
|
903
|
+
*/
|
|
592
904
|
declare interface NavbarLinkItem {
|
|
905
|
+
/** Link label text */
|
|
593
906
|
label: string;
|
|
907
|
+
/** URL for anchor links (if provided, renders as <a>) */
|
|
594
908
|
href?: string;
|
|
595
|
-
icon
|
|
909
|
+
/** Icon name (uses BoxIcon) or React node for custom icon */
|
|
910
|
+
icon?: string | default_2.ReactNode;
|
|
911
|
+
/** Whether this link is currently active */
|
|
596
912
|
active?: boolean;
|
|
913
|
+
/** Whether this link is disabled */
|
|
597
914
|
disabled?: boolean;
|
|
915
|
+
/** Click handler (used when href is not provided) */
|
|
598
916
|
onClick?: (e: default_2.MouseEvent<HTMLButtonElement | HTMLAnchorElement>) => void;
|
|
917
|
+
/** Additional CSS class */
|
|
918
|
+
className?: string;
|
|
919
|
+
/** Additional inline styles */
|
|
920
|
+
style?: default_2.CSSProperties;
|
|
599
921
|
}
|
|
600
922
|
|
|
601
923
|
declare type NavbarPosition = "static" | "sticky" | "fixed";
|
|
602
924
|
|
|
925
|
+
/**
|
|
926
|
+
* Navbar component props
|
|
927
|
+
*
|
|
928
|
+
* A flexible, responsive navigation bar component with support for:
|
|
929
|
+
* - Multiple variants (solid, transparent, elevated)
|
|
930
|
+
* - Responsive collapse to hamburger menu
|
|
931
|
+
* - Custom branding (logo and/or text)
|
|
932
|
+
* - Navigation links with icons
|
|
933
|
+
* - Action buttons/items
|
|
934
|
+
* - Full theme integration
|
|
935
|
+
*/
|
|
603
936
|
declare interface NavbarProps {
|
|
937
|
+
/** Brand title text */
|
|
604
938
|
title?: string;
|
|
939
|
+
/** Brand logo image source */
|
|
605
940
|
logoSrc?: string;
|
|
941
|
+
/** Custom brand content (overrides title/logoSrc) */
|
|
942
|
+
brand?: default_2.ReactNode;
|
|
943
|
+
/** Click handler for brand area */
|
|
606
944
|
onBrandClick?: () => void;
|
|
945
|
+
/** Array of navigation link items */
|
|
607
946
|
links?: NavbarLinkItem[];
|
|
947
|
+
/** Action buttons or other content (rendered on the right side) */
|
|
608
948
|
actions?: default_2.ReactNode;
|
|
949
|
+
/** Alignment of navigation links */
|
|
609
950
|
align?: "left" | "center" | "right";
|
|
951
|
+
/** Whether navbar should span full width */
|
|
610
952
|
fullWidth?: boolean;
|
|
953
|
+
/** Visual variant */
|
|
611
954
|
variant?: NavbarVariant;
|
|
955
|
+
/** Position behavior */
|
|
612
956
|
position?: NavbarPosition;
|
|
957
|
+
/** Size preset */
|
|
613
958
|
size?: NavbarSize;
|
|
959
|
+
/** Breakpoint in pixels for collapsing into hamburger menu */
|
|
614
960
|
collapseAt?: number;
|
|
961
|
+
/** Custom CSS class */
|
|
615
962
|
className?: string;
|
|
963
|
+
/** Custom inline styles */
|
|
964
|
+
style?: default_2.CSSProperties;
|
|
965
|
+
/** Custom icon for menu toggle (open state) */
|
|
966
|
+
menuOpenIcon?: string | default_2.ReactNode;
|
|
967
|
+
/** Custom icon for menu toggle (closed state) */
|
|
968
|
+
menuCloseIcon?: string | default_2.ReactNode;
|
|
616
969
|
}
|
|
617
970
|
|
|
618
971
|
declare type NavbarSize = "sm" | "md" | "lg";
|
|
619
972
|
|
|
620
973
|
declare type NavbarVariant = "solid" | "transparent" | "elevated";
|
|
621
974
|
|
|
975
|
+
/**
|
|
976
|
+
* Neutral/gray color palette
|
|
977
|
+
*/
|
|
978
|
+
export declare interface NeutralColors {
|
|
979
|
+
gray: ColorScale;
|
|
980
|
+
slate?: ColorScale;
|
|
981
|
+
zinc?: ColorScale;
|
|
982
|
+
}
|
|
983
|
+
|
|
622
984
|
export declare const Offcanvas: default_2.FC<OffcanvasProps>;
|
|
623
985
|
|
|
624
986
|
declare interface OffcanvasProps {
|
|
@@ -637,8 +999,18 @@ declare type Option_2 = {
|
|
|
637
999
|
value: string | number;
|
|
638
1000
|
};
|
|
639
1001
|
|
|
1002
|
+
/**
|
|
1003
|
+
* Orange theme - Orange & Red
|
|
1004
|
+
*/
|
|
1005
|
+
export declare const orangeTheme: ThemeSet;
|
|
1006
|
+
|
|
640
1007
|
export { Pagination }
|
|
641
1008
|
|
|
1009
|
+
/**
|
|
1010
|
+
* Purple theme - Purple & Pink
|
|
1011
|
+
*/
|
|
1012
|
+
export declare const purpleTheme: ThemeSet;
|
|
1013
|
+
|
|
642
1014
|
export declare const Row: default_2.FC<RowProps>;
|
|
643
1015
|
|
|
644
1016
|
declare type RowProps = {
|
|
@@ -662,8 +1034,34 @@ declare interface SearchBarProps {
|
|
|
662
1034
|
onChange?: (value: string) => void;
|
|
663
1035
|
}
|
|
664
1036
|
|
|
1037
|
+
/**
|
|
1038
|
+
* Semantic color palette
|
|
1039
|
+
* Provides meaning through color (success, error, warning, etc.)
|
|
1040
|
+
*/
|
|
1041
|
+
export declare interface SemanticColors {
|
|
1042
|
+
primary: ColorScale;
|
|
1043
|
+
secondary?: ColorScale;
|
|
1044
|
+
accent?: ColorScale;
|
|
1045
|
+
success: ColorScale;
|
|
1046
|
+
warning: ColorScale;
|
|
1047
|
+
error: ColorScale;
|
|
1048
|
+
info: ColorScale;
|
|
1049
|
+
}
|
|
1050
|
+
|
|
665
1051
|
declare type ShadeKey = keyof ColorScale;
|
|
666
1052
|
|
|
1053
|
+
export declare interface Shadows {
|
|
1054
|
+
none: string;
|
|
1055
|
+
sm: string;
|
|
1056
|
+
base: string;
|
|
1057
|
+
md: string;
|
|
1058
|
+
lg: string;
|
|
1059
|
+
xl: string;
|
|
1060
|
+
'2xl': string;
|
|
1061
|
+
inner: string;
|
|
1062
|
+
[key: string]: string;
|
|
1063
|
+
}
|
|
1064
|
+
|
|
667
1065
|
export declare const Sidebar: SidebarCompound;
|
|
668
1066
|
|
|
669
1067
|
declare interface SidebarCompound extends default_2.FC<SidebarProps> {
|
|
@@ -757,7 +1155,42 @@ declare interface SortState {
|
|
|
757
1155
|
direction: "asc" | "desc";
|
|
758
1156
|
}
|
|
759
1157
|
|
|
760
|
-
declare interface Spacing {
|
|
1158
|
+
export declare interface Spacing {
|
|
1159
|
+
0: string;
|
|
1160
|
+
px: string;
|
|
1161
|
+
0.5: string;
|
|
1162
|
+
1: string;
|
|
1163
|
+
1.5: string;
|
|
1164
|
+
2: string;
|
|
1165
|
+
2.5: string;
|
|
1166
|
+
3: string;
|
|
1167
|
+
3.5: string;
|
|
1168
|
+
4: string;
|
|
1169
|
+
5: string;
|
|
1170
|
+
6: string;
|
|
1171
|
+
7: string;
|
|
1172
|
+
8: string;
|
|
1173
|
+
9: string;
|
|
1174
|
+
10: string;
|
|
1175
|
+
11: string;
|
|
1176
|
+
12: string;
|
|
1177
|
+
14: string;
|
|
1178
|
+
16: string;
|
|
1179
|
+
20: string;
|
|
1180
|
+
24: string;
|
|
1181
|
+
28: string;
|
|
1182
|
+
32: string;
|
|
1183
|
+
36: string;
|
|
1184
|
+
40: string;
|
|
1185
|
+
44: string;
|
|
1186
|
+
48: string;
|
|
1187
|
+
52: string;
|
|
1188
|
+
56: string;
|
|
1189
|
+
60: string;
|
|
1190
|
+
64: string;
|
|
1191
|
+
72: string;
|
|
1192
|
+
80: string;
|
|
1193
|
+
96: string;
|
|
761
1194
|
[key: string]: string;
|
|
762
1195
|
}
|
|
763
1196
|
|
|
@@ -894,42 +1327,123 @@ declare interface TabsProps {
|
|
|
894
1327
|
|
|
895
1328
|
declare type TabVariant = 'default' | 'button' | 'shadow' | 'underline' | 'pills';
|
|
896
1329
|
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
1330
|
+
/**
|
|
1331
|
+
* Text colors for different emphasis levels
|
|
1332
|
+
*/
|
|
1333
|
+
export declare interface TextColors {
|
|
1334
|
+
primary: string;
|
|
1335
|
+
secondary: string;
|
|
1336
|
+
tertiary: string;
|
|
1337
|
+
disabled: string;
|
|
1338
|
+
inverse: string;
|
|
1339
|
+
}
|
|
1340
|
+
|
|
1341
|
+
/**
|
|
1342
|
+
* Complete theme configuration
|
|
1343
|
+
*/
|
|
1344
|
+
export declare interface Theme {
|
|
1345
|
+
colors: Colors;
|
|
1346
|
+
typography: TypographyType;
|
|
1347
|
+
spacing: Spacing;
|
|
1348
|
+
borderRadius: BorderRadius;
|
|
1349
|
+
borderWidth: BorderWidth;
|
|
1350
|
+
shadows: Shadows;
|
|
1351
|
+
effects?: Effects;
|
|
1352
|
+
breakpoints: Breakpoints;
|
|
1353
|
+
transitions: Transitions;
|
|
1354
|
+
zIndex: ZIndex;
|
|
1355
|
+
[key: string]: any;
|
|
1356
|
+
}
|
|
1357
|
+
|
|
1358
|
+
/**
|
|
1359
|
+
* Theme configuration options
|
|
1360
|
+
*/
|
|
1361
|
+
export declare interface ThemeConfig {
|
|
1362
|
+
defaultTheme?: ThemeName;
|
|
1363
|
+
defaultMode?: ThemeMode;
|
|
1364
|
+
themes: Record<ThemeName, ThemeSet>;
|
|
1365
|
+
storageKey?: string;
|
|
1366
|
+
enableSystem?: boolean;
|
|
1367
|
+
}
|
|
1368
|
+
|
|
1369
|
+
/**
|
|
1370
|
+
* Theme context type for React Context
|
|
1371
|
+
*/
|
|
1372
|
+
export declare interface ThemeContextType {
|
|
905
1373
|
theme: Theme;
|
|
906
|
-
|
|
1374
|
+
themeName: ThemeName;
|
|
1375
|
+
mode: ThemeMode;
|
|
1376
|
+
resolvedMode: 'light' | 'dark';
|
|
1377
|
+
setTheme: (name: ThemeName) => void;
|
|
1378
|
+
setMode: (mode: ThemeMode) => void;
|
|
907
1379
|
toggleMode: () => void;
|
|
908
|
-
|
|
909
|
-
}
|
|
910
|
-
|
|
1380
|
+
availableThemes: ThemeName[];
|
|
1381
|
+
}
|
|
1382
|
+
|
|
1383
|
+
/**
|
|
1384
|
+
* Theme mode
|
|
1385
|
+
*/
|
|
1386
|
+
export declare type ThemeMode = 'light' | 'dark' | 'system';
|
|
1387
|
+
|
|
1388
|
+
/**
|
|
1389
|
+
* Theme name identifier
|
|
1390
|
+
*/
|
|
1391
|
+
export declare type ThemeName = string;
|
|
1392
|
+
|
|
1393
|
+
/**
|
|
1394
|
+
* Theme Provider Component
|
|
1395
|
+
*
|
|
1396
|
+
* @example
|
|
1397
|
+
* ```tsx
|
|
1398
|
+
* import { ThemeProvider } from 'glintly-ui/themes';
|
|
1399
|
+
*
|
|
1400
|
+
* function App() {
|
|
1401
|
+
* return (
|
|
1402
|
+
* <ThemeProvider config={{
|
|
1403
|
+
* defaultTheme: 'emerald',
|
|
1404
|
+
* defaultMode: 'dark',
|
|
1405
|
+
* enableSystem: true
|
|
1406
|
+
* }}>
|
|
1407
|
+
* <YourApp />
|
|
1408
|
+
* </ThemeProvider>
|
|
1409
|
+
* );
|
|
1410
|
+
* }
|
|
1411
|
+
* ```
|
|
1412
|
+
*/
|
|
911
1413
|
export declare const ThemeProvider: default_2.FC<ThemeProviderProps>;
|
|
912
1414
|
|
|
913
1415
|
declare interface ThemeProviderProps {
|
|
914
1416
|
children: ReactNode;
|
|
915
|
-
|
|
916
|
-
}
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
1417
|
+
config?: Partial<ThemeConfig>;
|
|
1418
|
+
}
|
|
1419
|
+
|
|
1420
|
+
/**
|
|
1421
|
+
* All available themes
|
|
1422
|
+
*/
|
|
1423
|
+
export declare const themes: Record<string, ThemeSet>;
|
|
1424
|
+
|
|
1425
|
+
/**
|
|
1426
|
+
* Theme with light and dark mode variants
|
|
1427
|
+
*/
|
|
1428
|
+
export declare interface ThemeSet {
|
|
1429
|
+
light: Theme;
|
|
1430
|
+
dark: Theme;
|
|
1431
|
+
}
|
|
1432
|
+
|
|
1433
|
+
/**
|
|
1434
|
+
* Convert theme to CSS variables
|
|
1435
|
+
* Useful for integrating with CSS-in-JS or generating CSS files
|
|
1436
|
+
*
|
|
1437
|
+
* @example
|
|
1438
|
+
* ```ts
|
|
1439
|
+
* import { themeToCSSVariables, getTheme } from 'glintly-ui/themes';
|
|
1440
|
+
*
|
|
1441
|
+
* const theme = getTheme('default', 'light');
|
|
1442
|
+
* const cssVars = themeToCSSVariables(theme, 'my-prefix');
|
|
1443
|
+
* // Output: { '--my-prefix-primary-500': '#3b82f6', ... }
|
|
1444
|
+
* ```
|
|
1445
|
+
*/
|
|
1446
|
+
export declare function themeToCSSVariables(theme: Theme, prefix?: string): Record<string, string>;
|
|
933
1447
|
|
|
934
1448
|
export declare const toast: ((content: ReactNode, options?: ToastOptions) => string) & {
|
|
935
1449
|
success: (content: ReactNode, options?: ToastOptions) => string;
|
|
@@ -993,21 +1507,26 @@ declare interface TooltipProps {
|
|
|
993
1507
|
style?: default_2.CSSProperties;
|
|
994
1508
|
}
|
|
995
1509
|
|
|
996
|
-
export declare
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1510
|
+
export declare interface Transitions {
|
|
1511
|
+
duration: {
|
|
1512
|
+
fast: string;
|
|
1513
|
+
base: string;
|
|
1514
|
+
slow: string;
|
|
1515
|
+
slower: string;
|
|
1001
1516
|
[key: string]: string;
|
|
1002
1517
|
};
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1518
|
+
timing: {
|
|
1519
|
+
linear: string;
|
|
1520
|
+
ease: string;
|
|
1521
|
+
easeIn: string;
|
|
1522
|
+
easeOut: string;
|
|
1523
|
+
easeInOut: string;
|
|
1007
1524
|
[key: string]: string;
|
|
1008
1525
|
};
|
|
1009
1526
|
}
|
|
1010
1527
|
|
|
1528
|
+
export declare const Typography: default_2.FC<TypographyProps>;
|
|
1529
|
+
|
|
1011
1530
|
declare type TypographyAlign = 'left' | 'center' | 'right' | 'justify';
|
|
1012
1531
|
|
|
1013
1532
|
declare interface TypographyProps extends default_2.HTMLAttributes<HTMLElement> {
|
|
@@ -1022,10 +1541,64 @@ declare interface TypographyProps extends default_2.HTMLAttributes<HTMLElement>
|
|
|
1022
1541
|
style?: default_2.CSSProperties;
|
|
1023
1542
|
}
|
|
1024
1543
|
|
|
1544
|
+
export declare interface TypographyType {
|
|
1545
|
+
fontFamily: {
|
|
1546
|
+
sans: string;
|
|
1547
|
+
serif: string;
|
|
1548
|
+
mono: string;
|
|
1549
|
+
};
|
|
1550
|
+
fontSize: FontSizes;
|
|
1551
|
+
fontWeight: FontWeights;
|
|
1552
|
+
lineHeight: LineHeights;
|
|
1553
|
+
letterSpacing?: {
|
|
1554
|
+
[key: string]: string;
|
|
1555
|
+
};
|
|
1556
|
+
}
|
|
1557
|
+
|
|
1025
1558
|
declare type TypographyVariant = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'subtitle1' | 'subtitle2' | 'body1' | 'body2' | 'caption' | 'overline';
|
|
1026
1559
|
|
|
1560
|
+
/**
|
|
1561
|
+
* Hook to use theme context
|
|
1562
|
+
*
|
|
1563
|
+
* @example
|
|
1564
|
+
* ```tsx
|
|
1565
|
+
* import { useTheme } from 'glintly-ui/themes';
|
|
1566
|
+
*
|
|
1567
|
+
* function MyComponent() {
|
|
1568
|
+
* const { theme, mode, setMode } = useTheme();
|
|
1569
|
+
*
|
|
1570
|
+
* return (
|
|
1571
|
+
* <button
|
|
1572
|
+
* style={{
|
|
1573
|
+
* backgroundColor: theme.colors.semantic.primary[500],
|
|
1574
|
+
* color: theme.colors.text.inverse,
|
|
1575
|
+
* padding: theme.spacing[4],
|
|
1576
|
+
* borderRadius: theme.borderRadius.md,
|
|
1577
|
+
* }}
|
|
1578
|
+
* onClick={() => setMode(mode === 'light' ? 'dark' : 'light')}
|
|
1579
|
+
* >
|
|
1580
|
+
* Toggle Theme
|
|
1581
|
+
* </button>
|
|
1582
|
+
* );
|
|
1583
|
+
* }
|
|
1584
|
+
* ```
|
|
1585
|
+
*/
|
|
1027
1586
|
export declare const useTheme: () => ThemeContextType;
|
|
1028
1587
|
|
|
1588
|
+
export declare interface ZIndex {
|
|
1589
|
+
hide: number;
|
|
1590
|
+
base: number;
|
|
1591
|
+
dropdown: number;
|
|
1592
|
+
sticky: number;
|
|
1593
|
+
fixed: number;
|
|
1594
|
+
modalBackdrop: number;
|
|
1595
|
+
modal: number;
|
|
1596
|
+
popover: number;
|
|
1597
|
+
tooltip: number;
|
|
1598
|
+
toast: number;
|
|
1599
|
+
[key: string]: number;
|
|
1600
|
+
}
|
|
1601
|
+
|
|
1029
1602
|
export { }
|
|
1030
1603
|
|
|
1031
1604
|
|