glintly-ui 1.0.3 → 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 +862 -742
- package/dist/glintly-ui.d.ts +607 -74
- package/dist/glintly-ui.js +8726 -8145
- package/dist/glintly-ui.umd.cjs +871 -751
- 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,23 +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;
|
|
202
|
+
/** Optional CSS class for the wrapper. */
|
|
137
203
|
className?: string;
|
|
138
|
-
}
|
|
204
|
+
}
|
|
139
205
|
|
|
140
206
|
declare type BreakpointKey = "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
|
|
141
207
|
|
|
142
|
-
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;
|
|
143
215
|
[key: string]: string;
|
|
144
216
|
}
|
|
145
217
|
|
|
@@ -150,7 +222,12 @@ export declare interface ButtonProps extends Omit<default_2.ButtonHTMLAttributes
|
|
|
150
222
|
variant?: ButtonVariant;
|
|
151
223
|
size?: ButtonSize;
|
|
152
224
|
shade?: ShadeKey;
|
|
153
|
-
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;
|
|
154
231
|
shadow?: ButtonShadow;
|
|
155
232
|
border?: boolean;
|
|
156
233
|
fullWidth?: boolean;
|
|
@@ -217,6 +294,19 @@ declare interface CarouselSlide {
|
|
|
217
294
|
alt?: string;
|
|
218
295
|
}
|
|
219
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
|
+
|
|
220
310
|
export declare const CodeViewer: default_2.FC<CodeViewerProps>;
|
|
221
311
|
|
|
222
312
|
declare interface CodeViewerProps {
|
|
@@ -235,13 +325,27 @@ declare interface CodeViewerProps {
|
|
|
235
325
|
|
|
236
326
|
export declare const Col: default_2.FC<ColProps>;
|
|
237
327
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
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 {
|
|
245
349
|
50?: string;
|
|
246
350
|
100?: string;
|
|
247
351
|
200?: string;
|
|
@@ -252,25 +356,6 @@ declare type ColorScale = {
|
|
|
252
356
|
700?: string;
|
|
253
357
|
800?: string;
|
|
254
358
|
900?: string;
|
|
255
|
-
};
|
|
256
|
-
|
|
257
|
-
declare interface ColorVariant {
|
|
258
|
-
primary: ColorScale;
|
|
259
|
-
secondary: ColorScale;
|
|
260
|
-
background: string;
|
|
261
|
-
surface: string;
|
|
262
|
-
text: {
|
|
263
|
-
primary: string;
|
|
264
|
-
secondary: string;
|
|
265
|
-
disabled: string;
|
|
266
|
-
};
|
|
267
|
-
error: ColorScale;
|
|
268
|
-
success: ColorScale;
|
|
269
|
-
warning: ColorScale;
|
|
270
|
-
gray: ColorScale;
|
|
271
|
-
yellow: ColorScale;
|
|
272
|
-
iconButton: ColorScale;
|
|
273
|
-
info: ColorScale;
|
|
274
359
|
}
|
|
275
360
|
|
|
276
361
|
declare type ColProps = {
|
|
@@ -313,6 +398,39 @@ declare interface ContainerProps extends default_2.HTMLAttributes<HTMLDivElement
|
|
|
313
398
|
children?: default_2.ReactNode;
|
|
314
399
|
}
|
|
315
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
|
+
|
|
316
434
|
declare interface Data {
|
|
317
435
|
title?: string;
|
|
318
436
|
subTitle?: string;
|
|
@@ -410,6 +528,11 @@ declare const defaultFontSizes: {
|
|
|
410
528
|
|
|
411
529
|
declare const defaultLineHeights: Record<string, string>;
|
|
412
530
|
|
|
531
|
+
/**
|
|
532
|
+
* Default theme - Blue & Purple
|
|
533
|
+
*/
|
|
534
|
+
export declare const defaultTheme: ThemeSet;
|
|
535
|
+
|
|
413
536
|
export { Dropdown }
|
|
414
537
|
|
|
415
538
|
export { DropdownDivider }
|
|
@@ -428,6 +551,20 @@ export { DropdownText }
|
|
|
428
551
|
|
|
429
552
|
export { DropdownToggle }
|
|
430
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
|
+
|
|
431
568
|
export declare const ErrorPage: default_2.FC<ErrorPageProps>;
|
|
432
569
|
|
|
433
570
|
declare interface ErrorPageProps extends EyesVariantProps, ConnectionVariantsProp, ComingSoonProps, ConnectionErrorProps {
|
|
@@ -468,6 +605,68 @@ declare interface FilterField {
|
|
|
468
605
|
placeholder?: string;
|
|
469
606
|
}
|
|
470
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
|
+
|
|
471
670
|
declare type IconPosition = 'left' | 'right' | 'both' | "onlyIcon";
|
|
472
671
|
|
|
473
672
|
declare type IconPosition_2 = 'left' | 'right' | 'both' | "onlyIcon";
|
|
@@ -564,6 +763,16 @@ declare type InternalStepProps = StepProps & {
|
|
|
564
763
|
last?: boolean;
|
|
565
764
|
};
|
|
566
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
|
+
|
|
567
776
|
export { List }
|
|
568
777
|
|
|
569
778
|
export { ListDivider }
|
|
@@ -572,7 +781,63 @@ export { ListItem }
|
|
|
572
781
|
|
|
573
782
|
export { ListSectionHeader }
|
|
574
783
|
|
|
575
|
-
|
|
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
|
+
}
|
|
576
841
|
|
|
577
842
|
export declare interface ModalProps {
|
|
578
843
|
/** Whether the modal is open */
|
|
@@ -625,40 +890,97 @@ export declare interface ModalProps {
|
|
|
625
890
|
animationDuration?: number;
|
|
626
891
|
}
|
|
627
892
|
|
|
628
|
-
declare
|
|
893
|
+
declare interface ModalSectionProps {
|
|
894
|
+
children: default_2.ReactNode;
|
|
895
|
+
className?: string;
|
|
896
|
+
style?: default_2.CSSProperties;
|
|
897
|
+
}
|
|
629
898
|
|
|
630
899
|
export declare const Navbar: default_2.FC<NavbarProps>;
|
|
631
900
|
|
|
901
|
+
/**
|
|
902
|
+
* Navigation link item configuration
|
|
903
|
+
*/
|
|
632
904
|
declare interface NavbarLinkItem {
|
|
905
|
+
/** Link label text */
|
|
633
906
|
label: string;
|
|
907
|
+
/** URL for anchor links (if provided, renders as <a>) */
|
|
634
908
|
href?: string;
|
|
635
|
-
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 */
|
|
636
912
|
active?: boolean;
|
|
913
|
+
/** Whether this link is disabled */
|
|
637
914
|
disabled?: boolean;
|
|
915
|
+
/** Click handler (used when href is not provided) */
|
|
638
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;
|
|
639
921
|
}
|
|
640
922
|
|
|
641
923
|
declare type NavbarPosition = "static" | "sticky" | "fixed";
|
|
642
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
|
+
*/
|
|
643
936
|
declare interface NavbarProps {
|
|
937
|
+
/** Brand title text */
|
|
644
938
|
title?: string;
|
|
939
|
+
/** Brand logo image source */
|
|
645
940
|
logoSrc?: string;
|
|
941
|
+
/** Custom brand content (overrides title/logoSrc) */
|
|
942
|
+
brand?: default_2.ReactNode;
|
|
943
|
+
/** Click handler for brand area */
|
|
646
944
|
onBrandClick?: () => void;
|
|
945
|
+
/** Array of navigation link items */
|
|
647
946
|
links?: NavbarLinkItem[];
|
|
947
|
+
/** Action buttons or other content (rendered on the right side) */
|
|
648
948
|
actions?: default_2.ReactNode;
|
|
949
|
+
/** Alignment of navigation links */
|
|
649
950
|
align?: "left" | "center" | "right";
|
|
951
|
+
/** Whether navbar should span full width */
|
|
650
952
|
fullWidth?: boolean;
|
|
953
|
+
/** Visual variant */
|
|
651
954
|
variant?: NavbarVariant;
|
|
955
|
+
/** Position behavior */
|
|
652
956
|
position?: NavbarPosition;
|
|
957
|
+
/** Size preset */
|
|
653
958
|
size?: NavbarSize;
|
|
959
|
+
/** Breakpoint in pixels for collapsing into hamburger menu */
|
|
654
960
|
collapseAt?: number;
|
|
961
|
+
/** Custom CSS class */
|
|
655
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;
|
|
656
969
|
}
|
|
657
970
|
|
|
658
971
|
declare type NavbarSize = "sm" | "md" | "lg";
|
|
659
972
|
|
|
660
973
|
declare type NavbarVariant = "solid" | "transparent" | "elevated";
|
|
661
974
|
|
|
975
|
+
/**
|
|
976
|
+
* Neutral/gray color palette
|
|
977
|
+
*/
|
|
978
|
+
export declare interface NeutralColors {
|
|
979
|
+
gray: ColorScale;
|
|
980
|
+
slate?: ColorScale;
|
|
981
|
+
zinc?: ColorScale;
|
|
982
|
+
}
|
|
983
|
+
|
|
662
984
|
export declare const Offcanvas: default_2.FC<OffcanvasProps>;
|
|
663
985
|
|
|
664
986
|
declare interface OffcanvasProps {
|
|
@@ -677,8 +999,18 @@ declare type Option_2 = {
|
|
|
677
999
|
value: string | number;
|
|
678
1000
|
};
|
|
679
1001
|
|
|
1002
|
+
/**
|
|
1003
|
+
* Orange theme - Orange & Red
|
|
1004
|
+
*/
|
|
1005
|
+
export declare const orangeTheme: ThemeSet;
|
|
1006
|
+
|
|
680
1007
|
export { Pagination }
|
|
681
1008
|
|
|
1009
|
+
/**
|
|
1010
|
+
* Purple theme - Purple & Pink
|
|
1011
|
+
*/
|
|
1012
|
+
export declare const purpleTheme: ThemeSet;
|
|
1013
|
+
|
|
682
1014
|
export declare const Row: default_2.FC<RowProps>;
|
|
683
1015
|
|
|
684
1016
|
declare type RowProps = {
|
|
@@ -702,8 +1034,34 @@ declare interface SearchBarProps {
|
|
|
702
1034
|
onChange?: (value: string) => void;
|
|
703
1035
|
}
|
|
704
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
|
+
|
|
705
1051
|
declare type ShadeKey = keyof ColorScale;
|
|
706
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
|
+
|
|
707
1065
|
export declare const Sidebar: SidebarCompound;
|
|
708
1066
|
|
|
709
1067
|
declare interface SidebarCompound extends default_2.FC<SidebarProps> {
|
|
@@ -797,7 +1155,42 @@ declare interface SortState {
|
|
|
797
1155
|
direction: "asc" | "desc";
|
|
798
1156
|
}
|
|
799
1157
|
|
|
800
|
-
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;
|
|
801
1194
|
[key: string]: string;
|
|
802
1195
|
}
|
|
803
1196
|
|
|
@@ -934,42 +1327,123 @@ declare interface TabsProps {
|
|
|
934
1327
|
|
|
935
1328
|
declare type TabVariant = 'default' | 'button' | 'shadow' | 'underline' | 'pills';
|
|
936
1329
|
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
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 {
|
|
945
1373
|
theme: Theme;
|
|
946
|
-
|
|
1374
|
+
themeName: ThemeName;
|
|
1375
|
+
mode: ThemeMode;
|
|
1376
|
+
resolvedMode: 'light' | 'dark';
|
|
1377
|
+
setTheme: (name: ThemeName) => void;
|
|
1378
|
+
setMode: (mode: ThemeMode) => void;
|
|
947
1379
|
toggleMode: () => void;
|
|
948
|
-
|
|
949
|
-
}
|
|
950
|
-
|
|
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
|
+
*/
|
|
951
1413
|
export declare const ThemeProvider: default_2.FC<ThemeProviderProps>;
|
|
952
1414
|
|
|
953
1415
|
declare interface ThemeProviderProps {
|
|
954
1416
|
children: ReactNode;
|
|
955
|
-
|
|
956
|
-
}
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
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>;
|
|
973
1447
|
|
|
974
1448
|
export declare const toast: ((content: ReactNode, options?: ToastOptions) => string) & {
|
|
975
1449
|
success: (content: ReactNode, options?: ToastOptions) => string;
|
|
@@ -1033,21 +1507,26 @@ declare interface TooltipProps {
|
|
|
1033
1507
|
style?: default_2.CSSProperties;
|
|
1034
1508
|
}
|
|
1035
1509
|
|
|
1036
|
-
export declare
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1510
|
+
export declare interface Transitions {
|
|
1511
|
+
duration: {
|
|
1512
|
+
fast: string;
|
|
1513
|
+
base: string;
|
|
1514
|
+
slow: string;
|
|
1515
|
+
slower: string;
|
|
1041
1516
|
[key: string]: string;
|
|
1042
1517
|
};
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1518
|
+
timing: {
|
|
1519
|
+
linear: string;
|
|
1520
|
+
ease: string;
|
|
1521
|
+
easeIn: string;
|
|
1522
|
+
easeOut: string;
|
|
1523
|
+
easeInOut: string;
|
|
1047
1524
|
[key: string]: string;
|
|
1048
1525
|
};
|
|
1049
1526
|
}
|
|
1050
1527
|
|
|
1528
|
+
export declare const Typography: default_2.FC<TypographyProps>;
|
|
1529
|
+
|
|
1051
1530
|
declare type TypographyAlign = 'left' | 'center' | 'right' | 'justify';
|
|
1052
1531
|
|
|
1053
1532
|
declare interface TypographyProps extends default_2.HTMLAttributes<HTMLElement> {
|
|
@@ -1062,10 +1541,64 @@ declare interface TypographyProps extends default_2.HTMLAttributes<HTMLElement>
|
|
|
1062
1541
|
style?: default_2.CSSProperties;
|
|
1063
1542
|
}
|
|
1064
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
|
+
|
|
1065
1558
|
declare type TypographyVariant = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'subtitle1' | 'subtitle2' | 'body1' | 'body2' | 'caption' | 'overline';
|
|
1066
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
|
+
*/
|
|
1067
1586
|
export declare const useTheme: () => ThemeContextType;
|
|
1068
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
|
+
|
|
1069
1602
|
export { }
|
|
1070
1603
|
|
|
1071
1604
|
|