shadcn-glass-ui 1.0.7 → 1.0.8
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/CHANGELOG.md +45 -0
- package/README.md +19 -1
- package/dist/components.cjs +4 -4
- package/dist/components.d.ts +640 -10
- package/dist/components.js +1 -1
- package/dist/hooks.cjs +2 -2
- package/dist/index.cjs +5 -5
- package/dist/index.d.ts +640 -10
- package/dist/index.js +1 -1
- package/dist/r/registry.json +2 -0
- package/dist/shadcn-glass-ui.css +1 -1
- package/dist/{theme-context-e3yxC7A6.cjs → theme-context-BcTQdqsj.cjs} +2 -2
- package/dist/{theme-context-e3yxC7A6.cjs.map → theme-context-BcTQdqsj.cjs.map} +1 -1
- package/dist/themes.cjs +1 -1
- package/dist/{trust-score-card-glass-DWrcNoI2.js → trust-score-card-glass-CHzWGuko.js} +5 -5
- package/dist/trust-score-card-glass-CHzWGuko.js.map +1 -0
- package/dist/{trust-score-card-glass-CZeCRkHL.cjs → trust-score-card-glass-Dq28n8en.cjs} +8 -8
- package/dist/trust-score-card-glass-Dq28n8en.cjs.map +1 -0
- package/dist/{use-focus-CUkhhBRX.cjs → use-focus-CH8KNgcY.cjs} +2 -2
- package/dist/{use-focus-CUkhhBRX.cjs.map → use-focus-CH8KNgcY.cjs.map} +1 -1
- package/dist/{use-wallpaper-tint-b9KAZtoy.cjs → use-wallpaper-tint-DNecAf46.cjs} +2 -2
- package/dist/{use-wallpaper-tint-b9KAZtoy.cjs.map → use-wallpaper-tint-DNecAf46.cjs.map} +1 -1
- package/dist/{utils-Ba5INf7M.cjs → utils-3cDWhVvH.cjs} +2 -2
- package/dist/{utils-Ba5INf7M.cjs.map → utils-3cDWhVvH.cjs.map} +1 -1
- package/dist/utils.cjs +1 -1
- package/package.json +18 -4
- package/dist/trust-score-card-glass-CZeCRkHL.cjs.map +0 -1
- package/dist/trust-score-card-glass-DWrcNoI2.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -25,6 +25,71 @@ declare interface AICardGlassProps extends React.HTMLAttributes<HTMLDivElement>
|
|
|
25
25
|
|
|
26
26
|
export declare const AlertGlass: ForwardRefExoticComponent<AlertGlassProps & RefAttributes<HTMLDivElement>>;
|
|
27
27
|
|
|
28
|
+
/**
|
|
29
|
+
* Props for the AlertGlass component
|
|
30
|
+
*
|
|
31
|
+
* A glass-themed alert with semantic variants, dismissible option, and automatic icon selection.
|
|
32
|
+
* Features theme-aware styling and WCAG-compliant role attributes.
|
|
33
|
+
*
|
|
34
|
+
* @accessibility
|
|
35
|
+
* - **Keyboard Navigation:** Dismissible alerts include a keyboard-accessible close button (Tab + Enter/Space)
|
|
36
|
+
* - **Focus Management:** Close button receives visible focus ring (WCAG 2.4.7)
|
|
37
|
+
* - **Screen Readers:** Uses `role="alert"` for immediate announcement to screen readers (WCAG 4.1.3)
|
|
38
|
+
* - **Icon Semantics:** Icons are decorative and hidden from screen readers with `aria-hidden="true"`
|
|
39
|
+
* - **Variant Semantics:** Each variant uses distinct colors and icons for multi-modal communication (color + icon)
|
|
40
|
+
* - **Touch Targets:** Dismiss button meets minimum 44x44px touch target (WCAG 2.5.5)
|
|
41
|
+
* - **Color Contrast:** All variant text and backgrounds meet WCAG AA contrast ratio 4.5:1
|
|
42
|
+
* - **Motion:** Transitions respect `prefers-reduced-motion` settings
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```tsx
|
|
46
|
+
* // Basic alert (info/default variant)
|
|
47
|
+
* <AlertGlass title="Information" variant="default">
|
|
48
|
+
* This is an informational message
|
|
49
|
+
* </AlertGlass>
|
|
50
|
+
*
|
|
51
|
+
* // Error alert with aria-live for dynamic updates
|
|
52
|
+
* <AlertGlass variant="destructive" title="Error" aria-live="assertive">
|
|
53
|
+
* Your session has expired. Please log in again.
|
|
54
|
+
* </AlertGlass>
|
|
55
|
+
*
|
|
56
|
+
* // Success alert
|
|
57
|
+
* <AlertGlass variant="success" title="Success">
|
|
58
|
+
* Your changes have been saved successfully.
|
|
59
|
+
* </AlertGlass>
|
|
60
|
+
*
|
|
61
|
+
* // Warning alert
|
|
62
|
+
* <AlertGlass variant="warning" title="Warning">
|
|
63
|
+
* Your subscription expires in 3 days.
|
|
64
|
+
* </AlertGlass>
|
|
65
|
+
*
|
|
66
|
+
* // Dismissible alert with accessible close button
|
|
67
|
+
* <AlertGlass
|
|
68
|
+
* variant="default"
|
|
69
|
+
* title="Welcome"
|
|
70
|
+
* dismissible
|
|
71
|
+
* onDismiss={() => setShowAlert(false)}
|
|
72
|
+
* >
|
|
73
|
+
* Check out our new features!
|
|
74
|
+
* </AlertGlass>
|
|
75
|
+
*
|
|
76
|
+
* // Alert without title
|
|
77
|
+
* <AlertGlass variant="destructive">
|
|
78
|
+
* Quick error message without title
|
|
79
|
+
* </AlertGlass>
|
|
80
|
+
*
|
|
81
|
+
* // Form validation alert
|
|
82
|
+
* <form onSubmit={handleSubmit}>
|
|
83
|
+
* {formError && (
|
|
84
|
+
* <AlertGlass variant="destructive" title="Validation Error" role="alert">
|
|
85
|
+
* {formError}
|
|
86
|
+
* </AlertGlass>
|
|
87
|
+
* )}
|
|
88
|
+
* <InputGlass label="Email" />
|
|
89
|
+
* <ButtonGlass type="submit">Submit</ButtonGlass>
|
|
90
|
+
* </form>
|
|
91
|
+
* ```
|
|
92
|
+
*/
|
|
28
93
|
export declare interface AlertGlassProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'style' | 'title'>, VariantProps<typeof alertVariants> {
|
|
29
94
|
readonly title?: string;
|
|
30
95
|
readonly children: ReactNode;
|
|
@@ -117,6 +182,70 @@ export declare type AvatarStatus = 'online' | 'offline' | 'busy' | 'away';
|
|
|
117
182
|
|
|
118
183
|
export declare const BadgeGlass: ForwardRefExoticComponent<BadgeGlassProps & RefAttributes<HTMLSpanElement>>;
|
|
119
184
|
|
|
185
|
+
/**
|
|
186
|
+
* Props for the BadgeGlass component
|
|
187
|
+
*
|
|
188
|
+
* A glass-themed badge with semantic variants and optional animated status dot.
|
|
189
|
+
* Features shadcn/ui compatible variants plus extended Glass UI variants.
|
|
190
|
+
*
|
|
191
|
+
* @accessibility
|
|
192
|
+
* - **Keyboard Navigation:** Badges are non-interactive by default (display-only)
|
|
193
|
+
* - **Focus Management:** N/A - badges do not receive focus unless wrapped in interactive elements
|
|
194
|
+
* - **Screen Readers:** Semantic `<span>` element, content announced naturally
|
|
195
|
+
* - **Status Indicators:** Use `aria-label` to provide context for status badges (e.g., "Status: Active")
|
|
196
|
+
* - **Animated Dot:** Pulse animation respects `prefers-reduced-motion` settings
|
|
197
|
+
* - **Touch Targets:** N/A for display badges, ensure 44x44px if wrapping in button/link (WCAG 2.5.5)
|
|
198
|
+
* - **Color Contrast:** All variant text meets WCAG AA contrast ratio 4.5:1 against badge background
|
|
199
|
+
* - **Motion:** Dot pulse animation can be disabled for users with motion sensitivity
|
|
200
|
+
*
|
|
201
|
+
* @example
|
|
202
|
+
* ```tsx
|
|
203
|
+
* // Basic badge with variant
|
|
204
|
+
* <BadgeGlass variant="default">New</BadgeGlass>
|
|
205
|
+
*
|
|
206
|
+
* // Status badge with aria-label for screen readers
|
|
207
|
+
* <BadgeGlass variant="success" aria-label="Status: Active">
|
|
208
|
+
* Active
|
|
209
|
+
* </BadgeGlass>
|
|
210
|
+
*
|
|
211
|
+
* // Different variants (shadcn/ui compatible)
|
|
212
|
+
* <BadgeGlass variant="default">Default</BadgeGlass>
|
|
213
|
+
* <BadgeGlass variant="secondary">Secondary</BadgeGlass>
|
|
214
|
+
* <BadgeGlass variant="destructive">Error</BadgeGlass>
|
|
215
|
+
* <BadgeGlass variant="outline">Outline</BadgeGlass>
|
|
216
|
+
*
|
|
217
|
+
* // Extended Glass UI variants
|
|
218
|
+
* <BadgeGlass variant="success">Success</BadgeGlass>
|
|
219
|
+
* <BadgeGlass variant="warning">Warning</BadgeGlass>
|
|
220
|
+
* <BadgeGlass variant="info">Info</BadgeGlass>
|
|
221
|
+
*
|
|
222
|
+
* // With animated status dot
|
|
223
|
+
* <BadgeGlass variant="success" dot aria-label="Status: Online">
|
|
224
|
+
* Online
|
|
225
|
+
* </BadgeGlass>
|
|
226
|
+
* <BadgeGlass variant="destructive" dot aria-label="Status: Offline">
|
|
227
|
+
* Offline
|
|
228
|
+
* </BadgeGlass>
|
|
229
|
+
*
|
|
230
|
+
* // Size variants
|
|
231
|
+
* <BadgeGlass size="sm">Small</BadgeGlass>
|
|
232
|
+
* <BadgeGlass size="md">Medium</BadgeGlass>
|
|
233
|
+
* <BadgeGlass size="lg">Large</BadgeGlass>
|
|
234
|
+
*
|
|
235
|
+
* // Inside interactive elements (ensure accessible labels)
|
|
236
|
+
* <button aria-label="Filter by active status">
|
|
237
|
+
* Filter: <BadgeGlass variant="success">Active</BadgeGlass>
|
|
238
|
+
* </button>
|
|
239
|
+
*
|
|
240
|
+
* // Count badge with semantic meaning
|
|
241
|
+
* <div>
|
|
242
|
+
* <span>Notifications</span>
|
|
243
|
+
* <BadgeGlass variant="destructive" aria-label="3 unread notifications">
|
|
244
|
+
* 3
|
|
245
|
+
* </BadgeGlass>
|
|
246
|
+
* </div>
|
|
247
|
+
* ```
|
|
248
|
+
*/
|
|
120
249
|
export declare interface BadgeGlassProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, 'style'>, VariantProps<typeof badgeVariants> {
|
|
121
250
|
readonly children: ReactNode;
|
|
122
251
|
readonly variant?: BadgeVariant;
|
|
@@ -166,22 +295,33 @@ export declare const ButtonGlass: ForwardRefExoticComponent<ButtonGlassProps & R
|
|
|
166
295
|
* A glass-themed button with ripple effects, loading states, and icon support.
|
|
167
296
|
* Features theme-aware styling and hover animations.
|
|
168
297
|
*
|
|
298
|
+
* @accessibility
|
|
299
|
+
* - **Keyboard Navigation:** Fully keyboard accessible with native `<button>` element
|
|
300
|
+
* - **Focus Management:** Visible focus ring using `--focus-glow` CSS variable (WCAG 2.4.7)
|
|
301
|
+
* - **Screen Readers:** Semantic `<button>` element, disabled state announced automatically
|
|
302
|
+
* - **Loading State:** When loading=true, button is disabled and loading spinner is visible
|
|
303
|
+
* - **Touch Targets:** Minimum 44x44px touch target (WCAG 2.5.5) via size variants
|
|
304
|
+
* - **Color Contrast:** All variants meet WCAG AA contrast ratio 4.5:1 minimum
|
|
305
|
+
* - **Motion:** Respects `prefers-reduced-motion` for ripple/shine animations
|
|
306
|
+
*
|
|
169
307
|
* @example
|
|
170
308
|
* ```tsx
|
|
171
309
|
* // Basic button
|
|
172
310
|
* <ButtonGlass variant="primary">Click me</ButtonGlass>
|
|
173
311
|
*
|
|
174
|
-
* // With icon
|
|
312
|
+
* // With icon and aria-label for icon-only buttons
|
|
175
313
|
* <ButtonGlass icon={Check} iconPosition="left">Save</ButtonGlass>
|
|
314
|
+
* <ButtonGlass icon={X} size="icon" aria-label="Close dialog" />
|
|
176
315
|
*
|
|
177
|
-
* // Loading state
|
|
178
|
-
* <ButtonGlass loading>Processing...</ButtonGlass>
|
|
316
|
+
* // Loading state (automatically disables and shows spinner)
|
|
317
|
+
* <ButtonGlass loading aria-live="polite">Processing...</ButtonGlass>
|
|
179
318
|
*
|
|
180
319
|
* // Different variants
|
|
181
320
|
* <ButtonGlass variant="ghost">Cancel</ButtonGlass>
|
|
182
321
|
* <ButtonGlass variant="success">Confirm</ButtonGlass>
|
|
322
|
+
* <ButtonGlass variant="destructive">Delete</ButtonGlass>
|
|
183
323
|
*
|
|
184
|
-
* // As a link (asChild pattern)
|
|
324
|
+
* // As a link (asChild pattern) - maintains semantic HTML
|
|
185
325
|
* <ButtonGlass asChild variant="primary">
|
|
186
326
|
* <a href="/dashboard">Go to Dashboard</a>
|
|
187
327
|
* </ButtonGlass>
|
|
@@ -190,6 +330,11 @@ export declare const ButtonGlass: ForwardRefExoticComponent<ButtonGlassProps & R
|
|
|
190
330
|
* <ButtonGlass asChild variant="ghost">
|
|
191
331
|
* <Link href="/settings">Settings</Link>
|
|
192
332
|
* </ButtonGlass>
|
|
333
|
+
*
|
|
334
|
+
* // Form submit button
|
|
335
|
+
* <ButtonGlass type="submit" variant="primary">
|
|
336
|
+
* Submit Form
|
|
337
|
+
* </ButtonGlass>
|
|
193
338
|
* ```
|
|
194
339
|
*/
|
|
195
340
|
export declare interface ButtonGlassProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'style'>, VariantProps<typeof buttonGlassVariants> {
|
|
@@ -282,6 +427,79 @@ declare interface CareerStatsHeaderGlassProps extends HTMLAttributes<HTMLDivElem
|
|
|
282
427
|
|
|
283
428
|
export declare const CheckboxGlass: ForwardRefExoticComponent<CheckboxGlassProps & RefAttributes<HTMLInputElement>>;
|
|
284
429
|
|
|
430
|
+
/**
|
|
431
|
+
* Props for the CheckboxGlass component
|
|
432
|
+
*
|
|
433
|
+
* A glass-themed checkbox with accessible keyboard navigation, focus management,
|
|
434
|
+
* and touch-friendly targets. Features glow effects and theme-aware styling.
|
|
435
|
+
*
|
|
436
|
+
* @accessibility
|
|
437
|
+
* - **Keyboard Navigation:** Full keyboard support with Enter/Space to toggle, Tab to focus (WCAG 2.1.1)
|
|
438
|
+
* - **Focus Management:** Visible focus ring using `--focus-glow` CSS variable (WCAG 2.4.7)
|
|
439
|
+
* - **Screen Readers:** Dual implementation with native `<input type="checkbox">` (hidden) + visual `<div role="checkbox">`
|
|
440
|
+
* - **ARIA Attributes:** Uses `role="checkbox"` and `aria-checked` for proper state announcement
|
|
441
|
+
* - **Label Association:** Visual label automatically associated with checkbox via `<label>` wrapper
|
|
442
|
+
* - **Touch Targets:** 44x44px minimum touch area per Apple HIG (WCAG 2.5.5 compliance)
|
|
443
|
+
* - **Color Contrast:** Check mark and backgrounds meet WCAG AA contrast ratio 4.5:1
|
|
444
|
+
* - **Motion:** Transitions respect `prefers-reduced-motion` settings
|
|
445
|
+
*
|
|
446
|
+
* @example
|
|
447
|
+
* ```tsx
|
|
448
|
+
* // Basic checkbox with label
|
|
449
|
+
* <CheckboxGlass checked={agreed} onChange={setAgreed} label="I agree to terms" />
|
|
450
|
+
*
|
|
451
|
+
* // Checkbox with accessible name (no visual label)
|
|
452
|
+
* <CheckboxGlass
|
|
453
|
+
* checked={checked}
|
|
454
|
+
* onChange={setChecked}
|
|
455
|
+
* aria-label="Select all items"
|
|
456
|
+
* />
|
|
457
|
+
*
|
|
458
|
+
* // Form integration with validation
|
|
459
|
+
* <form onSubmit={handleSubmit}>
|
|
460
|
+
* <CheckboxGlass
|
|
461
|
+
* checked={newsletter}
|
|
462
|
+
* onChange={setNewsletter}
|
|
463
|
+
* label="Subscribe to newsletter"
|
|
464
|
+
* aria-describedby="newsletter-help"
|
|
465
|
+
* />
|
|
466
|
+
* <p id="newsletter-help">Receive weekly updates</p>
|
|
467
|
+
* <CheckboxGlass
|
|
468
|
+
* checked={terms}
|
|
469
|
+
* onChange={setTerms}
|
|
470
|
+
* label="Accept terms and conditions"
|
|
471
|
+
* required
|
|
472
|
+
* aria-invalid={submitted && !terms}
|
|
473
|
+
* />
|
|
474
|
+
* {submitted && !terms && (
|
|
475
|
+
* <span role="alert">You must accept the terms</span>
|
|
476
|
+
* )}
|
|
477
|
+
* </form>
|
|
478
|
+
*
|
|
479
|
+
* // Disabled checkbox (state announced to screen readers)
|
|
480
|
+
* <CheckboxGlass
|
|
481
|
+
* checked={true}
|
|
482
|
+
* onChange={() => {}}
|
|
483
|
+
* label="This option is locked"
|
|
484
|
+
* disabled
|
|
485
|
+
* />
|
|
486
|
+
*
|
|
487
|
+
* // Checkbox group with fieldset
|
|
488
|
+
* <fieldset>
|
|
489
|
+
* <legend>Select your interests</legend>
|
|
490
|
+
* <CheckboxGlass
|
|
491
|
+
* checked={interests.tech}
|
|
492
|
+
* onChange={(checked) => setInterests({ ...interests, tech: checked })}
|
|
493
|
+
* label="Technology"
|
|
494
|
+
* />
|
|
495
|
+
* <CheckboxGlass
|
|
496
|
+
* checked={interests.design}
|
|
497
|
+
* onChange={(checked) => setInterests({ ...interests, design: checked })}
|
|
498
|
+
* label="Design"
|
|
499
|
+
* />
|
|
500
|
+
* </fieldset>
|
|
501
|
+
* ```
|
|
502
|
+
*/
|
|
285
503
|
export declare interface CheckboxGlassProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onChange'> {
|
|
286
504
|
readonly checked: boolean;
|
|
287
505
|
readonly onChange?: (checked: boolean) => void;
|
|
@@ -446,6 +664,87 @@ export declare const dropdownAlign: (props?: ({
|
|
|
446
664
|
|
|
447
665
|
export declare const DropdownGlass: React_2.ForwardRefExoticComponent<DropdownGlassProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
448
666
|
|
|
667
|
+
/**
|
|
668
|
+
* Props for the DropdownGlass component
|
|
669
|
+
*
|
|
670
|
+
* A glass-themed dropdown menu with accessible keyboard navigation, based on Radix UI primitives.
|
|
671
|
+
* Features theme-aware styling, smooth animations, and WCAG-compliant interactions.
|
|
672
|
+
*
|
|
673
|
+
* @accessibility
|
|
674
|
+
* - **Keyboard Navigation:** Arrow keys navigate menu items, Enter/Space activates, Escape closes (WCAG 2.1.1)
|
|
675
|
+
* - **Focus Management:** Focus trapped within menu when open, returned to trigger on close (WCAG 2.4.3)
|
|
676
|
+
* - **Screen Readers:** Uses `role="menu"` and `role="menuitem"` for proper menu semantics (WCAG 4.1.3)
|
|
677
|
+
* - **ARIA Attributes:** Items marked with `data-highlighted` state for screen reader announcement
|
|
678
|
+
* - **Trigger Association:** Menu automatically associated with trigger button via Radix UI primitives
|
|
679
|
+
* - **Touch Targets:** All menu items meet minimum 44x44px touch target (WCAG 2.5.5)
|
|
680
|
+
* - **Color Contrast:** Menu text and backgrounds meet WCAG AA contrast ratio 4.5:1
|
|
681
|
+
* - **Motion:** Open/close animations respect `prefers-reduced-motion` settings
|
|
682
|
+
*
|
|
683
|
+
* @example
|
|
684
|
+
* ```tsx
|
|
685
|
+
* // Basic dropdown with icon items
|
|
686
|
+
* <DropdownGlass
|
|
687
|
+
* trigger={
|
|
688
|
+
* <button aria-label="Open menu">
|
|
689
|
+
* <MoreVertical className="w-5 h-5" />
|
|
690
|
+
* </button>
|
|
691
|
+
* }
|
|
692
|
+
* items={[
|
|
693
|
+
* { label: 'Edit', icon: Edit, onClick: handleEdit },
|
|
694
|
+
* { label: 'Delete', icon: Trash, onClick: handleDelete, danger: true }
|
|
695
|
+
* ]}
|
|
696
|
+
* />
|
|
697
|
+
*
|
|
698
|
+
* // Dropdown with dividers and alignment
|
|
699
|
+
* <DropdownGlass
|
|
700
|
+
* trigger={<ButtonGlass>Actions</ButtonGlass>}
|
|
701
|
+
* align="right"
|
|
702
|
+
* items={[
|
|
703
|
+
* { label: 'View', icon: Eye, onClick: () => navigate('/view') },
|
|
704
|
+
* { label: 'Edit', icon: Edit, onClick: () => setEditMode(true) },
|
|
705
|
+
* { divider: true },
|
|
706
|
+
* { label: 'Archive', icon: Archive, onClick: handleArchive },
|
|
707
|
+
* { divider: true },
|
|
708
|
+
* { label: 'Delete', icon: Trash, onClick: handleDelete, danger: true }
|
|
709
|
+
* ]}
|
|
710
|
+
* />
|
|
711
|
+
*
|
|
712
|
+
* // Dropdown in table row (ensure trigger has accessible label)
|
|
713
|
+
* <DropdownGlass
|
|
714
|
+
* trigger={
|
|
715
|
+
* <button aria-label={`Actions for ${user.name}`}>
|
|
716
|
+
* <MoreHorizontal />
|
|
717
|
+
* </button>
|
|
718
|
+
* }
|
|
719
|
+
* items={[
|
|
720
|
+
* { label: 'View Profile', onClick: () => viewProfile(user.id) },
|
|
721
|
+
* { label: 'Send Message', onClick: () => sendMessage(user.id) }
|
|
722
|
+
* ]}
|
|
723
|
+
* />
|
|
724
|
+
*
|
|
725
|
+
* // Dropdown with keyboard-friendly trigger
|
|
726
|
+
* <DropdownGlass
|
|
727
|
+
* trigger={
|
|
728
|
+
* <ButtonGlass
|
|
729
|
+
* icon={Settings}
|
|
730
|
+
* variant="ghost"
|
|
731
|
+
* aria-haspopup="menu"
|
|
732
|
+
* aria-label="Settings menu"
|
|
733
|
+
* >
|
|
734
|
+
* Settings
|
|
735
|
+
* </ButtonGlass>
|
|
736
|
+
* }
|
|
737
|
+
* items={[
|
|
738
|
+
* { label: 'Preferences', icon: Sliders, onClick: () => navigate('/settings/preferences') },
|
|
739
|
+
* { label: 'Security', icon: Lock, onClick: () => navigate('/settings/security') },
|
|
740
|
+
* { divider: true },
|
|
741
|
+
* { label: 'Log Out', icon: LogOut, onClick: handleLogout }
|
|
742
|
+
* ]}
|
|
743
|
+
* />
|
|
744
|
+
*
|
|
745
|
+
* // Advanced: Using Radix primitives directly (see component JSDoc for examples)
|
|
746
|
+
* ```
|
|
747
|
+
*/
|
|
449
748
|
export declare interface DropdownGlassProps {
|
|
450
749
|
readonly trigger: React_2.ReactNode;
|
|
451
750
|
readonly items: readonly DropdownItem[];
|
|
@@ -578,14 +877,56 @@ export declare const GlassCard: ForwardRefExoticComponent<GlassCardProps & RefAt
|
|
|
578
877
|
/**
|
|
579
878
|
* Props for the GlassCard component
|
|
580
879
|
*
|
|
880
|
+
* A glass-themed container with configurable blur, glow effects, and hover animations.
|
|
881
|
+
* Features polymorphic rendering via `asChild` for semantic HTML flexibility.
|
|
882
|
+
*
|
|
883
|
+
* @accessibility
|
|
884
|
+
* - **Keyboard Navigation:** When used with `asChild` as a link/button, inherits native keyboard support (Enter/Space activation)
|
|
885
|
+
* - **Focus Management:** Focus ring applied to child element when using `asChild` pattern with interactive elements
|
|
886
|
+
* - **Screen Readers:** Semantic HTML preserved via `asChild` - use appropriate elements (`<a>`, `<button>`, `<article>`)
|
|
887
|
+
* - **Hover State:** Hover effects are purely visual and do not affect functionality (progressive enhancement)
|
|
888
|
+
* - **Touch Targets:** When interactive, ensure child element meets minimum 44x44px touch target (WCAG 2.5.5)
|
|
889
|
+
* - **Color Contrast:** Card border and background meet WCAG AA contrast requirements, content contrast is consumer's responsibility
|
|
890
|
+
* - **Motion:** Hover scale animation respects `prefers-reduced-motion` settings via CSS transitions
|
|
891
|
+
*
|
|
581
892
|
* @example
|
|
582
893
|
* ```tsx
|
|
583
894
|
* // Basic card
|
|
584
895
|
* <GlassCard intensity="medium">Content</GlassCard>
|
|
585
896
|
*
|
|
586
|
-
* // As a clickable link
|
|
897
|
+
* // As a clickable link with accessible name
|
|
587
898
|
* <GlassCard asChild intensity="medium">
|
|
588
|
-
* <a href="/details"
|
|
899
|
+
* <a href="/details" aria-label="View product details">
|
|
900
|
+
* <h3>Product Title</h3>
|
|
901
|
+
* <p>Description</p>
|
|
902
|
+
* </a>
|
|
903
|
+
* </GlassCard>
|
|
904
|
+
*
|
|
905
|
+
* // Different intensity levels
|
|
906
|
+
* <GlassCard intensity="subtle">Subtle blur</GlassCard>
|
|
907
|
+
* <GlassCard intensity="medium">Standard blur</GlassCard>
|
|
908
|
+
* <GlassCard intensity="strong">Heavy blur</GlassCard>
|
|
909
|
+
*
|
|
910
|
+
* // With glow effects
|
|
911
|
+
* <GlassCard glow="blue">Blue glow card</GlassCard>
|
|
912
|
+
* <GlassCard glow="violet">Violet glow card</GlassCard>
|
|
913
|
+
* <GlassCard glow="cyan">Cyan glow card</GlassCard>
|
|
914
|
+
*
|
|
915
|
+
* // As a button (interactive) with role
|
|
916
|
+
* <GlassCard asChild hover intensity="medium">
|
|
917
|
+
* <button onClick={handleClick} aria-label="Open settings">
|
|
918
|
+
* <Settings className="w-6 h-6" />
|
|
919
|
+
* <span>Settings</span>
|
|
920
|
+
* </button>
|
|
921
|
+
* </GlassCard>
|
|
922
|
+
*
|
|
923
|
+
* // Article card with semantic HTML
|
|
924
|
+
* <GlassCard asChild intensity="medium" padding="lg">
|
|
925
|
+
* <article>
|
|
926
|
+
* <header><h2>Article Title</h2></header>
|
|
927
|
+
* <p>Article content...</p>
|
|
928
|
+
* <footer>Published: Jan 1, 2025</footer>
|
|
929
|
+
* </article>
|
|
589
930
|
* </GlassCard>
|
|
590
931
|
* ```
|
|
591
932
|
*/
|
|
@@ -662,18 +1003,61 @@ export declare const InputGlass: ForwardRefExoticComponent<InputGlassProps & Ref
|
|
|
662
1003
|
* A glass-themed input field with labels, validation states, and icon support.
|
|
663
1004
|
* Features focus glow effects and theme-aware styling.
|
|
664
1005
|
*
|
|
1006
|
+
* @accessibility
|
|
1007
|
+
* - **Keyboard Navigation:** Full keyboard support with native `<input>` element, standard tab navigation
|
|
1008
|
+
* - **Focus Management:** Visible focus ring using `--focus-glow` CSS variable (WCAG 2.4.7)
|
|
1009
|
+
* - **Screen Readers:** Semantic `<label>` elements properly associated via `htmlFor`, error/success messages announced with `aria-describedby`
|
|
1010
|
+
* - **Error State:** Red border and error message displayed below input, programmatically associated for screen readers
|
|
1011
|
+
* - **Success State:** Green border and success message displayed below input, programmatically associated for screen readers
|
|
1012
|
+
* - **Touch Targets:** Minimum 44x44px touch target on mobile devices (WCAG 2.5.5)
|
|
1013
|
+
* - **Color Contrast:** All text meets WCAG AA contrast ratio 4.5:1 minimum against backgrounds
|
|
1014
|
+
* - **Motion:** Icon color transitions respect `prefers-reduced-motion` settings
|
|
1015
|
+
*
|
|
665
1016
|
* @example
|
|
666
1017
|
* ```tsx
|
|
667
1018
|
* // Basic input with label
|
|
668
1019
|
* <InputGlass label="Email" placeholder="you@example.com" />
|
|
669
1020
|
*
|
|
670
|
-
* // With
|
|
1021
|
+
* // With aria-describedby for additional context
|
|
1022
|
+
* <InputGlass
|
|
1023
|
+
* label="Username"
|
|
1024
|
+
* placeholder="Enter username"
|
|
1025
|
+
* aria-describedby="username-help"
|
|
1026
|
+
* />
|
|
1027
|
+
* <span id="username-help">Must be 3-20 characters</span>
|
|
1028
|
+
*
|
|
1029
|
+
* // With validation states (automatically announced to screen readers)
|
|
671
1030
|
* <InputGlass label="Username" error="Username is required" />
|
|
672
1031
|
* <InputGlass label="Password" success="Strong password" type="password" />
|
|
673
1032
|
*
|
|
674
|
-
* // With icon
|
|
675
|
-
* <InputGlass
|
|
676
|
-
*
|
|
1033
|
+
* // With icon and accessible label
|
|
1034
|
+
* <InputGlass
|
|
1035
|
+
* icon={Search}
|
|
1036
|
+
* placeholder="Search..."
|
|
1037
|
+
* aria-label="Search products"
|
|
1038
|
+
* />
|
|
1039
|
+
* <InputGlass icon={Mail} iconPosition="right" type="email" />
|
|
1040
|
+
*
|
|
1041
|
+
* // Disabled state (automatically announced)
|
|
1042
|
+
* <InputGlass label="Email" disabled value="locked@example.com" />
|
|
1043
|
+
*
|
|
1044
|
+
* // Form integration with accessible error handling
|
|
1045
|
+
* <form onSubmit={handleSubmit}>
|
|
1046
|
+
* <InputGlass
|
|
1047
|
+
* label="Email"
|
|
1048
|
+
* type="email"
|
|
1049
|
+
* required
|
|
1050
|
+
* error={errors.email}
|
|
1051
|
+
* aria-invalid={!!errors.email}
|
|
1052
|
+
* />
|
|
1053
|
+
* <InputGlass
|
|
1054
|
+
* label="Password"
|
|
1055
|
+
* type="password"
|
|
1056
|
+
* icon={Lock}
|
|
1057
|
+
* error={errors.password}
|
|
1058
|
+
* />
|
|
1059
|
+
* <ButtonGlass type="submit">Sign In</ButtonGlass>
|
|
1060
|
+
* </form>
|
|
677
1061
|
* ```
|
|
678
1062
|
*/
|
|
679
1063
|
export declare interface InputGlassProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'>, VariantProps<typeof inputVariants> {
|
|
@@ -923,6 +1307,100 @@ declare interface ModalOverlayProps {
|
|
|
923
1307
|
className?: string;
|
|
924
1308
|
}
|
|
925
1309
|
|
|
1310
|
+
/**
|
|
1311
|
+
* Props for ModalGlass.Root component
|
|
1312
|
+
*
|
|
1313
|
+
* Root component that provides context and manages open/close state for the modal.
|
|
1314
|
+
* Handles keyboard events, body scroll lock, and accessibility attributes.
|
|
1315
|
+
*
|
|
1316
|
+
* @accessibility
|
|
1317
|
+
* - **Keyboard Navigation:** Escape key closes modal, Tab key traps focus within modal content
|
|
1318
|
+
* - **Focus Management:** Focus automatically moved to modal on open, returned to trigger on close (WCAG 2.4.3)
|
|
1319
|
+
* - **Screen Readers:** Uses `role="dialog"` and `aria-modal="true"` for proper modal semantics (WCAG 4.1.3)
|
|
1320
|
+
* - **Title Association:** Modal title automatically linked via `aria-labelledby="modal-title"`
|
|
1321
|
+
* - **Description Association:** Optional description linked via `aria-describedby="modal-description"`
|
|
1322
|
+
* - **Body Scroll Lock:** Prevents background scrolling when modal is open (improves UX and focus management)
|
|
1323
|
+
* - **Touch Targets:** All interactive elements (close button, action buttons) meet 44x44px minimum (WCAG 2.5.5)
|
|
1324
|
+
* - **Color Contrast:** Modal content and overlay meet WCAG AA contrast requirements
|
|
1325
|
+
* - **Motion:** Open/close animations respect `prefers-reduced-motion` settings
|
|
1326
|
+
*
|
|
1327
|
+
* @example
|
|
1328
|
+
* ```tsx
|
|
1329
|
+
* // Basic modal with title and description
|
|
1330
|
+
* <ModalGlass.Root open={open} onOpenChange={setOpen}>
|
|
1331
|
+
* <ModalGlass.Overlay />
|
|
1332
|
+
* <ModalGlass.Content>
|
|
1333
|
+
* <ModalGlass.Header>
|
|
1334
|
+
* <ModalGlass.Title>Confirm Action</ModalGlass.Title>
|
|
1335
|
+
* <ModalGlass.Description>
|
|
1336
|
+
* This action cannot be undone.
|
|
1337
|
+
* </ModalGlass.Description>
|
|
1338
|
+
* <ModalGlass.Close />
|
|
1339
|
+
* </ModalGlass.Header>
|
|
1340
|
+
* <ModalGlass.Body>
|
|
1341
|
+
* <p>Are you sure you want to proceed?</p>
|
|
1342
|
+
* </ModalGlass.Body>
|
|
1343
|
+
* <ModalGlass.Footer>
|
|
1344
|
+
* <ButtonGlass variant="ghost" onClick={() => setOpen(false)}>
|
|
1345
|
+
* Cancel
|
|
1346
|
+
* </ButtonGlass>
|
|
1347
|
+
* <ButtonGlass variant="destructive" onClick={handleConfirm}>
|
|
1348
|
+
* Confirm
|
|
1349
|
+
* </ButtonGlass>
|
|
1350
|
+
* </ModalGlass.Footer>
|
|
1351
|
+
* </ModalGlass.Content>
|
|
1352
|
+
* </ModalGlass.Root>
|
|
1353
|
+
*
|
|
1354
|
+
* // Different sizes
|
|
1355
|
+
* <ModalGlass.Root open={open} onOpenChange={setOpen} size="sm">
|
|
1356
|
+
* {// Small modal content}
|
|
1357
|
+
* </ModalGlass.Root>
|
|
1358
|
+
* <ModalGlass.Root open={open} onOpenChange={setOpen} size="lg">
|
|
1359
|
+
* {// Large modal content}
|
|
1360
|
+
* </ModalGlass.Root>
|
|
1361
|
+
*
|
|
1362
|
+
* // Form modal with proper focus management
|
|
1363
|
+
* <ModalGlass.Root open={open} onOpenChange={setOpen}>
|
|
1364
|
+
* <ModalGlass.Overlay />
|
|
1365
|
+
* <ModalGlass.Content>
|
|
1366
|
+
* <ModalGlass.Header>
|
|
1367
|
+
* <ModalGlass.Title>Create Account</ModalGlass.Title>
|
|
1368
|
+
* <ModalGlass.Close />
|
|
1369
|
+
* </ModalGlass.Header>
|
|
1370
|
+
* <ModalGlass.Body>
|
|
1371
|
+
* <form id="signup-form" onSubmit={handleSubmit}>
|
|
1372
|
+
* <InputGlass label="Email" type="email" required />
|
|
1373
|
+
* <InputGlass label="Password" type="password" required />
|
|
1374
|
+
* </form>
|
|
1375
|
+
* </ModalGlass.Body>
|
|
1376
|
+
* <ModalGlass.Footer>
|
|
1377
|
+
* <ButtonGlass variant="ghost" onClick={() => setOpen(false)}>
|
|
1378
|
+
* Cancel
|
|
1379
|
+
* </ButtonGlass>
|
|
1380
|
+
* <ButtonGlass type="submit" form="signup-form">
|
|
1381
|
+
* Sign Up
|
|
1382
|
+
* </ButtonGlass>
|
|
1383
|
+
* </ModalGlass.Footer>
|
|
1384
|
+
* </ModalGlass.Content>
|
|
1385
|
+
* </ModalGlass.Root>
|
|
1386
|
+
*
|
|
1387
|
+
* // Alert modal (no close button)
|
|
1388
|
+
* <ModalGlass.Root open={showAlert} onOpenChange={setShowAlert}>
|
|
1389
|
+
* <ModalGlass.Overlay />
|
|
1390
|
+
* <ModalGlass.Content>
|
|
1391
|
+
* <ModalGlass.Header>
|
|
1392
|
+
* <ModalGlass.Title>Session Expired</ModalGlass.Title>
|
|
1393
|
+
* </ModalGlass.Header>
|
|
1394
|
+
* <ModalGlass.Body>
|
|
1395
|
+
* Your session has expired. Please log in again.
|
|
1396
|
+
* </ModalGlass.Body>
|
|
1397
|
+
* <ModalGlass.Footer>
|
|
1398
|
+
* <ButtonGlass onClick={handleLogin}>Log In</ButtonGlass>
|
|
1399
|
+
* </ModalGlass.Footer>
|
|
1400
|
+
* </ModalGlass.Content>
|
|
1401
|
+
* </ModalGlass.Root>
|
|
1402
|
+
* ```
|
|
1403
|
+
*/
|
|
926
1404
|
declare interface ModalRootProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
927
1405
|
/** Open state */
|
|
928
1406
|
open: boolean;
|
|
@@ -1333,6 +1811,89 @@ declare interface TabsListProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
1333
1811
|
className?: string;
|
|
1334
1812
|
}
|
|
1335
1813
|
|
|
1814
|
+
/**
|
|
1815
|
+
* Props for TabsGlass.Root component
|
|
1816
|
+
*
|
|
1817
|
+
* Root component that manages tab state and provides context for child components.
|
|
1818
|
+
* Features accessible keyboard navigation and ARIA attributes.
|
|
1819
|
+
*
|
|
1820
|
+
* @accessibility
|
|
1821
|
+
* - **Keyboard Navigation:** Arrow keys navigate between tabs, Tab moves to tab panel content (WCAG 2.1.1)
|
|
1822
|
+
* - **Focus Management:** Visible focus ring on active tab using `--focus-glow` CSS variable (WCAG 2.4.7)
|
|
1823
|
+
* - **Screen Readers:** Uses `role="tablist"`, `role="tab"`, `role="tabpanel"` for proper tab semantics (WCAG 4.1.3)
|
|
1824
|
+
* - **ARIA Attributes:** Tabs marked with `aria-selected`, panels with `aria-hidden` for state announcement
|
|
1825
|
+
* - **Active State:** Visual indicator (underline) plus color change for multi-modal feedback
|
|
1826
|
+
* - **Touch Targets:** Tab triggers meet minimum 44x44px touch target (WCAG 2.5.5)
|
|
1827
|
+
* - **Color Contrast:** Active and inactive tab text meet WCAG AA contrast ratio 4.5:1
|
|
1828
|
+
* - **Motion:** Transitions and indicator animations respect `prefers-reduced-motion` settings
|
|
1829
|
+
*
|
|
1830
|
+
* @example
|
|
1831
|
+
* ```tsx
|
|
1832
|
+
* // Basic tabs
|
|
1833
|
+
* <TabsGlass.Root value={activeTab} onValueChange={setActiveTab}>
|
|
1834
|
+
* <TabsGlass.List>
|
|
1835
|
+
* <TabsGlass.Trigger value="overview">Overview</TabsGlass.Trigger>
|
|
1836
|
+
* <TabsGlass.Trigger value="analytics">Analytics</TabsGlass.Trigger>
|
|
1837
|
+
* <TabsGlass.Trigger value="settings">Settings</TabsGlass.Trigger>
|
|
1838
|
+
* </TabsGlass.List>
|
|
1839
|
+
* <TabsGlass.Content value="overview">
|
|
1840
|
+
* <h2>Overview</h2>
|
|
1841
|
+
* <p>Overview content here</p>
|
|
1842
|
+
* </TabsGlass.Content>
|
|
1843
|
+
* <TabsGlass.Content value="analytics">
|
|
1844
|
+
* <h2>Analytics</h2>
|
|
1845
|
+
* <p>Analytics content here</p>
|
|
1846
|
+
* </TabsGlass.Content>
|
|
1847
|
+
* <TabsGlass.Content value="settings">
|
|
1848
|
+
* <h2>Settings</h2>
|
|
1849
|
+
* <p>Settings content here</p>
|
|
1850
|
+
* </TabsGlass.Content>
|
|
1851
|
+
* </TabsGlass.Root>
|
|
1852
|
+
*
|
|
1853
|
+
* // Tabs with icons (ensure accessible labels)
|
|
1854
|
+
* <TabsGlass.Root value={activeTab} onValueChange={setActiveTab}>
|
|
1855
|
+
* <TabsGlass.List>
|
|
1856
|
+
* <TabsGlass.Trigger value="home" aria-label="Home dashboard">
|
|
1857
|
+
* <Home className="w-4 h-4" />
|
|
1858
|
+
* </TabsGlass.Trigger>
|
|
1859
|
+
* <TabsGlass.Trigger value="search" aria-label="Search">
|
|
1860
|
+
* <Search className="w-4 h-4" />
|
|
1861
|
+
* </TabsGlass.Trigger>
|
|
1862
|
+
* </TabsGlass.List>
|
|
1863
|
+
* <TabsGlass.Content value="home">Dashboard content</TabsGlass.Content>
|
|
1864
|
+
* <TabsGlass.Content value="search">Search content</TabsGlass.Content>
|
|
1865
|
+
* </TabsGlass.Root>
|
|
1866
|
+
*
|
|
1867
|
+
* // Disabled tab (announced to screen readers)
|
|
1868
|
+
* <TabsGlass.Root value={activeTab} onValueChange={setActiveTab}>
|
|
1869
|
+
* <TabsGlass.List>
|
|
1870
|
+
* <TabsGlass.Trigger value="tab1">Available Tab</TabsGlass.Trigger>
|
|
1871
|
+
* <TabsGlass.Trigger value="tab2" disabled>
|
|
1872
|
+
* Locked Tab
|
|
1873
|
+
* </TabsGlass.Trigger>
|
|
1874
|
+
* </TabsGlass.List>
|
|
1875
|
+
* <TabsGlass.Content value="tab1">Content 1</TabsGlass.Content>
|
|
1876
|
+
* </TabsGlass.Root>
|
|
1877
|
+
*
|
|
1878
|
+
* // Form tabs with proper focus management
|
|
1879
|
+
* <TabsGlass.Root value={currentStep} onValueChange={setCurrentStep}>
|
|
1880
|
+
* <TabsGlass.List aria-label="Registration steps">
|
|
1881
|
+
* <TabsGlass.Trigger value="account">Account Info</TabsGlass.Trigger>
|
|
1882
|
+
* <TabsGlass.Trigger value="profile">Profile Details</TabsGlass.Trigger>
|
|
1883
|
+
* <TabsGlass.Trigger value="confirm">Confirmation</TabsGlass.Trigger>
|
|
1884
|
+
* </TabsGlass.List>
|
|
1885
|
+
* <TabsGlass.Content value="account">
|
|
1886
|
+
* <InputGlass label="Email" type="email" />
|
|
1887
|
+
* </TabsGlass.Content>
|
|
1888
|
+
* <TabsGlass.Content value="profile">
|
|
1889
|
+
* <InputGlass label="Name" />
|
|
1890
|
+
* </TabsGlass.Content>
|
|
1891
|
+
* <TabsGlass.Content value="confirm">
|
|
1892
|
+
* <p>Review your information</p>
|
|
1893
|
+
* </TabsGlass.Content>
|
|
1894
|
+
* </TabsGlass.Root>
|
|
1895
|
+
* ```
|
|
1896
|
+
*/
|
|
1336
1897
|
declare interface TabsRootProps {
|
|
1337
1898
|
/** Current active tab value */
|
|
1338
1899
|
value: string;
|
|
@@ -1411,6 +1972,75 @@ export declare const toggleSizes: (props?: ({
|
|
|
1411
1972
|
|
|
1412
1973
|
export declare const TooltipGlass: ForwardRefExoticComponent<TooltipGlassProps & RefAttributes<HTMLDivElement>>;
|
|
1413
1974
|
|
|
1975
|
+
/**
|
|
1976
|
+
* Props for the TooltipGlass component
|
|
1977
|
+
*
|
|
1978
|
+
* A glass-themed tooltip with configurable positioning and unified dark design.
|
|
1979
|
+
* Features smooth animations and WCAG-compliant accessibility attributes.
|
|
1980
|
+
*
|
|
1981
|
+
* @accessibility
|
|
1982
|
+
* - **Keyboard Navigation:** Tooltip appears on focus for keyboard users (same as hover)
|
|
1983
|
+
* - **Focus Management:** Tooltip does not trap focus, allows normal navigation flow
|
|
1984
|
+
* - **Screen Readers:** Uses `aria-describedby` to associate tooltip with trigger element (WCAG 4.1.3)
|
|
1985
|
+
* - **ARIA Attributes:** Tooltip marked with `role="tooltip"` and unique ID for proper association
|
|
1986
|
+
* - **Dismissible:** Tooltip dismisses on mouse leave, focus blur, or Escape key
|
|
1987
|
+
* - **Touch Targets:** N/A - tooltips appear on hover/focus, do not require direct interaction
|
|
1988
|
+
* - **Color Contrast:** Tooltip text meets WCAG AA contrast ratio 4.5:1 against dark background
|
|
1989
|
+
* - **Motion:** Fade-in animation respects `prefers-reduced-motion` settings
|
|
1990
|
+
*
|
|
1991
|
+
* @example
|
|
1992
|
+
* ```tsx
|
|
1993
|
+
* // Basic tooltip
|
|
1994
|
+
* <TooltipGlass content="Click to edit">
|
|
1995
|
+
* <button><Edit className="w-4 h-4" /></button>
|
|
1996
|
+
* </TooltipGlass>
|
|
1997
|
+
*
|
|
1998
|
+
* // Different positions
|
|
1999
|
+
* <TooltipGlass content="Top tooltip" position="top">
|
|
2000
|
+
* <ButtonGlass>Hover me</ButtonGlass>
|
|
2001
|
+
* </TooltipGlass>
|
|
2002
|
+
* <TooltipGlass content="Bottom tooltip" position="bottom">
|
|
2003
|
+
* <ButtonGlass>Hover me</ButtonGlass>
|
|
2004
|
+
* </TooltipGlass>
|
|
2005
|
+
* <TooltipGlass content="Left tooltip" position="left">
|
|
2006
|
+
* <ButtonGlass>Hover me</ButtonGlass>
|
|
2007
|
+
* </TooltipGlass>
|
|
2008
|
+
* <TooltipGlass content="Right tooltip" position="right">
|
|
2009
|
+
* <ButtonGlass>Hover me</ButtonGlass>
|
|
2010
|
+
* </TooltipGlass>
|
|
2011
|
+
*
|
|
2012
|
+
* // Icon button with accessible tooltip (provides label)
|
|
2013
|
+
* <TooltipGlass content="Delete item">
|
|
2014
|
+
* <ButtonGlass
|
|
2015
|
+
* icon={Trash}
|
|
2016
|
+
* size="icon"
|
|
2017
|
+
* variant="ghost"
|
|
2018
|
+
* aria-label="Delete item"
|
|
2019
|
+
* />
|
|
2020
|
+
* </TooltipGlass>
|
|
2021
|
+
*
|
|
2022
|
+
* // Informational tooltip on text
|
|
2023
|
+
* <TooltipGlass content="This feature requires a Pro subscription">
|
|
2024
|
+
* <span className="underline decoration-dotted">Pro Feature</span>
|
|
2025
|
+
* </TooltipGlass>
|
|
2026
|
+
*
|
|
2027
|
+
* // Badge with tooltip for additional context
|
|
2028
|
+
* <TooltipGlass content="Last updated 2 hours ago" position="top">
|
|
2029
|
+
* <BadgeGlass variant="success" dot>
|
|
2030
|
+
* Active
|
|
2031
|
+
* </BadgeGlass>
|
|
2032
|
+
* </TooltipGlass>
|
|
2033
|
+
*
|
|
2034
|
+
* // Disabled button with explanation tooltip
|
|
2035
|
+
* <TooltipGlass content="Save your changes first to enable this action">
|
|
2036
|
+
* <span>
|
|
2037
|
+
* <ButtonGlass disabled aria-describedby="tooltip-id">
|
|
2038
|
+
* Export
|
|
2039
|
+
* </ButtonGlass>
|
|
2040
|
+
* </span>
|
|
2041
|
+
* </TooltipGlass>
|
|
2042
|
+
* ```
|
|
2043
|
+
*/
|
|
1414
2044
|
export declare interface TooltipGlassProps extends VariantProps<typeof tooltipPositions> {
|
|
1415
2045
|
readonly children: ReactNode;
|
|
1416
2046
|
readonly content: string;
|