shadcn-glass-ui 1.0.7 → 1.0.9
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 +56 -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/components.d.ts
CHANGED
|
@@ -21,6 +21,71 @@ declare interface AICardGlassProps extends React.HTMLAttributes<HTMLDivElement>
|
|
|
21
21
|
|
|
22
22
|
export declare const AlertGlass: ForwardRefExoticComponent<AlertGlassProps & RefAttributes<HTMLDivElement>>;
|
|
23
23
|
|
|
24
|
+
/**
|
|
25
|
+
* Props for the AlertGlass component
|
|
26
|
+
*
|
|
27
|
+
* A glass-themed alert with semantic variants, dismissible option, and automatic icon selection.
|
|
28
|
+
* Features theme-aware styling and WCAG-compliant role attributes.
|
|
29
|
+
*
|
|
30
|
+
* @accessibility
|
|
31
|
+
* - **Keyboard Navigation:** Dismissible alerts include a keyboard-accessible close button (Tab + Enter/Space)
|
|
32
|
+
* - **Focus Management:** Close button receives visible focus ring (WCAG 2.4.7)
|
|
33
|
+
* - **Screen Readers:** Uses `role="alert"` for immediate announcement to screen readers (WCAG 4.1.3)
|
|
34
|
+
* - **Icon Semantics:** Icons are decorative and hidden from screen readers with `aria-hidden="true"`
|
|
35
|
+
* - **Variant Semantics:** Each variant uses distinct colors and icons for multi-modal communication (color + icon)
|
|
36
|
+
* - **Touch Targets:** Dismiss button meets minimum 44x44px touch target (WCAG 2.5.5)
|
|
37
|
+
* - **Color Contrast:** All variant text and backgrounds meet WCAG AA contrast ratio 4.5:1
|
|
38
|
+
* - **Motion:** Transitions respect `prefers-reduced-motion` settings
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```tsx
|
|
42
|
+
* // Basic alert (info/default variant)
|
|
43
|
+
* <AlertGlass title="Information" variant="default">
|
|
44
|
+
* This is an informational message
|
|
45
|
+
* </AlertGlass>
|
|
46
|
+
*
|
|
47
|
+
* // Error alert with aria-live for dynamic updates
|
|
48
|
+
* <AlertGlass variant="destructive" title="Error" aria-live="assertive">
|
|
49
|
+
* Your session has expired. Please log in again.
|
|
50
|
+
* </AlertGlass>
|
|
51
|
+
*
|
|
52
|
+
* // Success alert
|
|
53
|
+
* <AlertGlass variant="success" title="Success">
|
|
54
|
+
* Your changes have been saved successfully.
|
|
55
|
+
* </AlertGlass>
|
|
56
|
+
*
|
|
57
|
+
* // Warning alert
|
|
58
|
+
* <AlertGlass variant="warning" title="Warning">
|
|
59
|
+
* Your subscription expires in 3 days.
|
|
60
|
+
* </AlertGlass>
|
|
61
|
+
*
|
|
62
|
+
* // Dismissible alert with accessible close button
|
|
63
|
+
* <AlertGlass
|
|
64
|
+
* variant="default"
|
|
65
|
+
* title="Welcome"
|
|
66
|
+
* dismissible
|
|
67
|
+
* onDismiss={() => setShowAlert(false)}
|
|
68
|
+
* >
|
|
69
|
+
* Check out our new features!
|
|
70
|
+
* </AlertGlass>
|
|
71
|
+
*
|
|
72
|
+
* // Alert without title
|
|
73
|
+
* <AlertGlass variant="destructive">
|
|
74
|
+
* Quick error message without title
|
|
75
|
+
* </AlertGlass>
|
|
76
|
+
*
|
|
77
|
+
* // Form validation alert
|
|
78
|
+
* <form onSubmit={handleSubmit}>
|
|
79
|
+
* {formError && (
|
|
80
|
+
* <AlertGlass variant="destructive" title="Validation Error" role="alert">
|
|
81
|
+
* {formError}
|
|
82
|
+
* </AlertGlass>
|
|
83
|
+
* )}
|
|
84
|
+
* <InputGlass label="Email" />
|
|
85
|
+
* <ButtonGlass type="submit">Submit</ButtonGlass>
|
|
86
|
+
* </form>
|
|
87
|
+
* ```
|
|
88
|
+
*/
|
|
24
89
|
declare interface AlertGlassProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'style' | 'title'>, VariantProps<typeof alertVariants> {
|
|
25
90
|
readonly title?: string;
|
|
26
91
|
readonly children: ReactNode;
|
|
@@ -99,6 +164,70 @@ declare type AvatarStatus = 'online' | 'offline' | 'busy' | 'away';
|
|
|
99
164
|
|
|
100
165
|
export declare const BadgeGlass: ForwardRefExoticComponent<BadgeGlassProps & RefAttributes<HTMLSpanElement>>;
|
|
101
166
|
|
|
167
|
+
/**
|
|
168
|
+
* Props for the BadgeGlass component
|
|
169
|
+
*
|
|
170
|
+
* A glass-themed badge with semantic variants and optional animated status dot.
|
|
171
|
+
* Features shadcn/ui compatible variants plus extended Glass UI variants.
|
|
172
|
+
*
|
|
173
|
+
* @accessibility
|
|
174
|
+
* - **Keyboard Navigation:** Badges are non-interactive by default (display-only)
|
|
175
|
+
* - **Focus Management:** N/A - badges do not receive focus unless wrapped in interactive elements
|
|
176
|
+
* - **Screen Readers:** Semantic `<span>` element, content announced naturally
|
|
177
|
+
* - **Status Indicators:** Use `aria-label` to provide context for status badges (e.g., "Status: Active")
|
|
178
|
+
* - **Animated Dot:** Pulse animation respects `prefers-reduced-motion` settings
|
|
179
|
+
* - **Touch Targets:** N/A for display badges, ensure 44x44px if wrapping in button/link (WCAG 2.5.5)
|
|
180
|
+
* - **Color Contrast:** All variant text meets WCAG AA contrast ratio 4.5:1 against badge background
|
|
181
|
+
* - **Motion:** Dot pulse animation can be disabled for users with motion sensitivity
|
|
182
|
+
*
|
|
183
|
+
* @example
|
|
184
|
+
* ```tsx
|
|
185
|
+
* // Basic badge with variant
|
|
186
|
+
* <BadgeGlass variant="default">New</BadgeGlass>
|
|
187
|
+
*
|
|
188
|
+
* // Status badge with aria-label for screen readers
|
|
189
|
+
* <BadgeGlass variant="success" aria-label="Status: Active">
|
|
190
|
+
* Active
|
|
191
|
+
* </BadgeGlass>
|
|
192
|
+
*
|
|
193
|
+
* // Different variants (shadcn/ui compatible)
|
|
194
|
+
* <BadgeGlass variant="default">Default</BadgeGlass>
|
|
195
|
+
* <BadgeGlass variant="secondary">Secondary</BadgeGlass>
|
|
196
|
+
* <BadgeGlass variant="destructive">Error</BadgeGlass>
|
|
197
|
+
* <BadgeGlass variant="outline">Outline</BadgeGlass>
|
|
198
|
+
*
|
|
199
|
+
* // Extended Glass UI variants
|
|
200
|
+
* <BadgeGlass variant="success">Success</BadgeGlass>
|
|
201
|
+
* <BadgeGlass variant="warning">Warning</BadgeGlass>
|
|
202
|
+
* <BadgeGlass variant="info">Info</BadgeGlass>
|
|
203
|
+
*
|
|
204
|
+
* // With animated status dot
|
|
205
|
+
* <BadgeGlass variant="success" dot aria-label="Status: Online">
|
|
206
|
+
* Online
|
|
207
|
+
* </BadgeGlass>
|
|
208
|
+
* <BadgeGlass variant="destructive" dot aria-label="Status: Offline">
|
|
209
|
+
* Offline
|
|
210
|
+
* </BadgeGlass>
|
|
211
|
+
*
|
|
212
|
+
* // Size variants
|
|
213
|
+
* <BadgeGlass size="sm">Small</BadgeGlass>
|
|
214
|
+
* <BadgeGlass size="md">Medium</BadgeGlass>
|
|
215
|
+
* <BadgeGlass size="lg">Large</BadgeGlass>
|
|
216
|
+
*
|
|
217
|
+
* // Inside interactive elements (ensure accessible labels)
|
|
218
|
+
* <button aria-label="Filter by active status">
|
|
219
|
+
* Filter: <BadgeGlass variant="success">Active</BadgeGlass>
|
|
220
|
+
* </button>
|
|
221
|
+
*
|
|
222
|
+
* // Count badge with semantic meaning
|
|
223
|
+
* <div>
|
|
224
|
+
* <span>Notifications</span>
|
|
225
|
+
* <BadgeGlass variant="destructive" aria-label="3 unread notifications">
|
|
226
|
+
* 3
|
|
227
|
+
* </BadgeGlass>
|
|
228
|
+
* </div>
|
|
229
|
+
* ```
|
|
230
|
+
*/
|
|
102
231
|
declare interface BadgeGlassProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, 'style'>, VariantProps<typeof badgeVariants> {
|
|
103
232
|
readonly children: ReactNode;
|
|
104
233
|
readonly variant?: BadgeVariant;
|
|
@@ -131,22 +260,33 @@ export declare const ButtonGlass: ForwardRefExoticComponent<ButtonGlassProps & R
|
|
|
131
260
|
* A glass-themed button with ripple effects, loading states, and icon support.
|
|
132
261
|
* Features theme-aware styling and hover animations.
|
|
133
262
|
*
|
|
263
|
+
* @accessibility
|
|
264
|
+
* - **Keyboard Navigation:** Fully keyboard accessible with native `<button>` element
|
|
265
|
+
* - **Focus Management:** Visible focus ring using `--focus-glow` CSS variable (WCAG 2.4.7)
|
|
266
|
+
* - **Screen Readers:** Semantic `<button>` element, disabled state announced automatically
|
|
267
|
+
* - **Loading State:** When loading=true, button is disabled and loading spinner is visible
|
|
268
|
+
* - **Touch Targets:** Minimum 44x44px touch target (WCAG 2.5.5) via size variants
|
|
269
|
+
* - **Color Contrast:** All variants meet WCAG AA contrast ratio 4.5:1 minimum
|
|
270
|
+
* - **Motion:** Respects `prefers-reduced-motion` for ripple/shine animations
|
|
271
|
+
*
|
|
134
272
|
* @example
|
|
135
273
|
* ```tsx
|
|
136
274
|
* // Basic button
|
|
137
275
|
* <ButtonGlass variant="primary">Click me</ButtonGlass>
|
|
138
276
|
*
|
|
139
|
-
* // With icon
|
|
277
|
+
* // With icon and aria-label for icon-only buttons
|
|
140
278
|
* <ButtonGlass icon={Check} iconPosition="left">Save</ButtonGlass>
|
|
279
|
+
* <ButtonGlass icon={X} size="icon" aria-label="Close dialog" />
|
|
141
280
|
*
|
|
142
|
-
* // Loading state
|
|
143
|
-
* <ButtonGlass loading>Processing...</ButtonGlass>
|
|
281
|
+
* // Loading state (automatically disables and shows spinner)
|
|
282
|
+
* <ButtonGlass loading aria-live="polite">Processing...</ButtonGlass>
|
|
144
283
|
*
|
|
145
284
|
* // Different variants
|
|
146
285
|
* <ButtonGlass variant="ghost">Cancel</ButtonGlass>
|
|
147
286
|
* <ButtonGlass variant="success">Confirm</ButtonGlass>
|
|
287
|
+
* <ButtonGlass variant="destructive">Delete</ButtonGlass>
|
|
148
288
|
*
|
|
149
|
-
* // As a link (asChild pattern)
|
|
289
|
+
* // As a link (asChild pattern) - maintains semantic HTML
|
|
150
290
|
* <ButtonGlass asChild variant="primary">
|
|
151
291
|
* <a href="/dashboard">Go to Dashboard</a>
|
|
152
292
|
* </ButtonGlass>
|
|
@@ -155,6 +295,11 @@ export declare const ButtonGlass: ForwardRefExoticComponent<ButtonGlassProps & R
|
|
|
155
295
|
* <ButtonGlass asChild variant="ghost">
|
|
156
296
|
* <Link href="/settings">Settings</Link>
|
|
157
297
|
* </ButtonGlass>
|
|
298
|
+
*
|
|
299
|
+
* // Form submit button
|
|
300
|
+
* <ButtonGlass type="submit" variant="primary">
|
|
301
|
+
* Submit Form
|
|
302
|
+
* </ButtonGlass>
|
|
158
303
|
* ```
|
|
159
304
|
*/
|
|
160
305
|
declare interface ButtonGlassProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'style'>, VariantProps<typeof buttonGlassVariants> {
|
|
@@ -245,6 +390,79 @@ declare interface CareerStatsHeaderGlassProps extends HTMLAttributes<HTMLDivElem
|
|
|
245
390
|
|
|
246
391
|
export declare const CheckboxGlass: ForwardRefExoticComponent<CheckboxGlassProps & RefAttributes<HTMLInputElement>>;
|
|
247
392
|
|
|
393
|
+
/**
|
|
394
|
+
* Props for the CheckboxGlass component
|
|
395
|
+
*
|
|
396
|
+
* A glass-themed checkbox with accessible keyboard navigation, focus management,
|
|
397
|
+
* and touch-friendly targets. Features glow effects and theme-aware styling.
|
|
398
|
+
*
|
|
399
|
+
* @accessibility
|
|
400
|
+
* - **Keyboard Navigation:** Full keyboard support with Enter/Space to toggle, Tab to focus (WCAG 2.1.1)
|
|
401
|
+
* - **Focus Management:** Visible focus ring using `--focus-glow` CSS variable (WCAG 2.4.7)
|
|
402
|
+
* - **Screen Readers:** Dual implementation with native `<input type="checkbox">` (hidden) + visual `<div role="checkbox">`
|
|
403
|
+
* - **ARIA Attributes:** Uses `role="checkbox"` and `aria-checked` for proper state announcement
|
|
404
|
+
* - **Label Association:** Visual label automatically associated with checkbox via `<label>` wrapper
|
|
405
|
+
* - **Touch Targets:** 44x44px minimum touch area per Apple HIG (WCAG 2.5.5 compliance)
|
|
406
|
+
* - **Color Contrast:** Check mark and backgrounds meet WCAG AA contrast ratio 4.5:1
|
|
407
|
+
* - **Motion:** Transitions respect `prefers-reduced-motion` settings
|
|
408
|
+
*
|
|
409
|
+
* @example
|
|
410
|
+
* ```tsx
|
|
411
|
+
* // Basic checkbox with label
|
|
412
|
+
* <CheckboxGlass checked={agreed} onChange={setAgreed} label="I agree to terms" />
|
|
413
|
+
*
|
|
414
|
+
* // Checkbox with accessible name (no visual label)
|
|
415
|
+
* <CheckboxGlass
|
|
416
|
+
* checked={checked}
|
|
417
|
+
* onChange={setChecked}
|
|
418
|
+
* aria-label="Select all items"
|
|
419
|
+
* />
|
|
420
|
+
*
|
|
421
|
+
* // Form integration with validation
|
|
422
|
+
* <form onSubmit={handleSubmit}>
|
|
423
|
+
* <CheckboxGlass
|
|
424
|
+
* checked={newsletter}
|
|
425
|
+
* onChange={setNewsletter}
|
|
426
|
+
* label="Subscribe to newsletter"
|
|
427
|
+
* aria-describedby="newsletter-help"
|
|
428
|
+
* />
|
|
429
|
+
* <p id="newsletter-help">Receive weekly updates</p>
|
|
430
|
+
* <CheckboxGlass
|
|
431
|
+
* checked={terms}
|
|
432
|
+
* onChange={setTerms}
|
|
433
|
+
* label="Accept terms and conditions"
|
|
434
|
+
* required
|
|
435
|
+
* aria-invalid={submitted && !terms}
|
|
436
|
+
* />
|
|
437
|
+
* {submitted && !terms && (
|
|
438
|
+
* <span role="alert">You must accept the terms</span>
|
|
439
|
+
* )}
|
|
440
|
+
* </form>
|
|
441
|
+
*
|
|
442
|
+
* // Disabled checkbox (state announced to screen readers)
|
|
443
|
+
* <CheckboxGlass
|
|
444
|
+
* checked={true}
|
|
445
|
+
* onChange={() => {}}
|
|
446
|
+
* label="This option is locked"
|
|
447
|
+
* disabled
|
|
448
|
+
* />
|
|
449
|
+
*
|
|
450
|
+
* // Checkbox group with fieldset
|
|
451
|
+
* <fieldset>
|
|
452
|
+
* <legend>Select your interests</legend>
|
|
453
|
+
* <CheckboxGlass
|
|
454
|
+
* checked={interests.tech}
|
|
455
|
+
* onChange={(checked) => setInterests({ ...interests, tech: checked })}
|
|
456
|
+
* label="Technology"
|
|
457
|
+
* />
|
|
458
|
+
* <CheckboxGlass
|
|
459
|
+
* checked={interests.design}
|
|
460
|
+
* onChange={(checked) => setInterests({ ...interests, design: checked })}
|
|
461
|
+
* label="Design"
|
|
462
|
+
* />
|
|
463
|
+
* </fieldset>
|
|
464
|
+
* ```
|
|
465
|
+
*/
|
|
248
466
|
declare interface CheckboxGlassProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onChange'> {
|
|
249
467
|
readonly checked: boolean;
|
|
250
468
|
readonly onChange?: (checked: boolean) => void;
|
|
@@ -392,6 +610,87 @@ declare interface ContributionMetricsGlassProps extends HTMLAttributes<HTMLDivEl
|
|
|
392
610
|
|
|
393
611
|
export declare const DropdownGlass: React_2.ForwardRefExoticComponent<DropdownGlassProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
394
612
|
|
|
613
|
+
/**
|
|
614
|
+
* Props for the DropdownGlass component
|
|
615
|
+
*
|
|
616
|
+
* A glass-themed dropdown menu with accessible keyboard navigation, based on Radix UI primitives.
|
|
617
|
+
* Features theme-aware styling, smooth animations, and WCAG-compliant interactions.
|
|
618
|
+
*
|
|
619
|
+
* @accessibility
|
|
620
|
+
* - **Keyboard Navigation:** Arrow keys navigate menu items, Enter/Space activates, Escape closes (WCAG 2.1.1)
|
|
621
|
+
* - **Focus Management:** Focus trapped within menu when open, returned to trigger on close (WCAG 2.4.3)
|
|
622
|
+
* - **Screen Readers:** Uses `role="menu"` and `role="menuitem"` for proper menu semantics (WCAG 4.1.3)
|
|
623
|
+
* - **ARIA Attributes:** Items marked with `data-highlighted` state for screen reader announcement
|
|
624
|
+
* - **Trigger Association:** Menu automatically associated with trigger button via Radix UI primitives
|
|
625
|
+
* - **Touch Targets:** All menu items meet minimum 44x44px touch target (WCAG 2.5.5)
|
|
626
|
+
* - **Color Contrast:** Menu text and backgrounds meet WCAG AA contrast ratio 4.5:1
|
|
627
|
+
* - **Motion:** Open/close animations respect `prefers-reduced-motion` settings
|
|
628
|
+
*
|
|
629
|
+
* @example
|
|
630
|
+
* ```tsx
|
|
631
|
+
* // Basic dropdown with icon items
|
|
632
|
+
* <DropdownGlass
|
|
633
|
+
* trigger={
|
|
634
|
+
* <button aria-label="Open menu">
|
|
635
|
+
* <MoreVertical className="w-5 h-5" />
|
|
636
|
+
* </button>
|
|
637
|
+
* }
|
|
638
|
+
* items={[
|
|
639
|
+
* { label: 'Edit', icon: Edit, onClick: handleEdit },
|
|
640
|
+
* { label: 'Delete', icon: Trash, onClick: handleDelete, danger: true }
|
|
641
|
+
* ]}
|
|
642
|
+
* />
|
|
643
|
+
*
|
|
644
|
+
* // Dropdown with dividers and alignment
|
|
645
|
+
* <DropdownGlass
|
|
646
|
+
* trigger={<ButtonGlass>Actions</ButtonGlass>}
|
|
647
|
+
* align="right"
|
|
648
|
+
* items={[
|
|
649
|
+
* { label: 'View', icon: Eye, onClick: () => navigate('/view') },
|
|
650
|
+
* { label: 'Edit', icon: Edit, onClick: () => setEditMode(true) },
|
|
651
|
+
* { divider: true },
|
|
652
|
+
* { label: 'Archive', icon: Archive, onClick: handleArchive },
|
|
653
|
+
* { divider: true },
|
|
654
|
+
* { label: 'Delete', icon: Trash, onClick: handleDelete, danger: true }
|
|
655
|
+
* ]}
|
|
656
|
+
* />
|
|
657
|
+
*
|
|
658
|
+
* // Dropdown in table row (ensure trigger has accessible label)
|
|
659
|
+
* <DropdownGlass
|
|
660
|
+
* trigger={
|
|
661
|
+
* <button aria-label={`Actions for ${user.name}`}>
|
|
662
|
+
* <MoreHorizontal />
|
|
663
|
+
* </button>
|
|
664
|
+
* }
|
|
665
|
+
* items={[
|
|
666
|
+
* { label: 'View Profile', onClick: () => viewProfile(user.id) },
|
|
667
|
+
* { label: 'Send Message', onClick: () => sendMessage(user.id) }
|
|
668
|
+
* ]}
|
|
669
|
+
* />
|
|
670
|
+
*
|
|
671
|
+
* // Dropdown with keyboard-friendly trigger
|
|
672
|
+
* <DropdownGlass
|
|
673
|
+
* trigger={
|
|
674
|
+
* <ButtonGlass
|
|
675
|
+
* icon={Settings}
|
|
676
|
+
* variant="ghost"
|
|
677
|
+
* aria-haspopup="menu"
|
|
678
|
+
* aria-label="Settings menu"
|
|
679
|
+
* >
|
|
680
|
+
* Settings
|
|
681
|
+
* </ButtonGlass>
|
|
682
|
+
* }
|
|
683
|
+
* items={[
|
|
684
|
+
* { label: 'Preferences', icon: Sliders, onClick: () => navigate('/settings/preferences') },
|
|
685
|
+
* { label: 'Security', icon: Lock, onClick: () => navigate('/settings/security') },
|
|
686
|
+
* { divider: true },
|
|
687
|
+
* { label: 'Log Out', icon: LogOut, onClick: handleLogout }
|
|
688
|
+
* ]}
|
|
689
|
+
* />
|
|
690
|
+
*
|
|
691
|
+
* // Advanced: Using Radix primitives directly (see component JSDoc for examples)
|
|
692
|
+
* ```
|
|
693
|
+
*/
|
|
395
694
|
declare interface DropdownGlassProps {
|
|
396
695
|
readonly trigger: React_2.ReactNode;
|
|
397
696
|
readonly items: readonly DropdownItem[];
|
|
@@ -520,14 +819,56 @@ export declare const GlassCard: ForwardRefExoticComponent<GlassCardProps & RefAt
|
|
|
520
819
|
/**
|
|
521
820
|
* Props for the GlassCard component
|
|
522
821
|
*
|
|
822
|
+
* A glass-themed container with configurable blur, glow effects, and hover animations.
|
|
823
|
+
* Features polymorphic rendering via `asChild` for semantic HTML flexibility.
|
|
824
|
+
*
|
|
825
|
+
* @accessibility
|
|
826
|
+
* - **Keyboard Navigation:** When used with `asChild` as a link/button, inherits native keyboard support (Enter/Space activation)
|
|
827
|
+
* - **Focus Management:** Focus ring applied to child element when using `asChild` pattern with interactive elements
|
|
828
|
+
* - **Screen Readers:** Semantic HTML preserved via `asChild` - use appropriate elements (`<a>`, `<button>`, `<article>`)
|
|
829
|
+
* - **Hover State:** Hover effects are purely visual and do not affect functionality (progressive enhancement)
|
|
830
|
+
* - **Touch Targets:** When interactive, ensure child element meets minimum 44x44px touch target (WCAG 2.5.5)
|
|
831
|
+
* - **Color Contrast:** Card border and background meet WCAG AA contrast requirements, content contrast is consumer's responsibility
|
|
832
|
+
* - **Motion:** Hover scale animation respects `prefers-reduced-motion` settings via CSS transitions
|
|
833
|
+
*
|
|
523
834
|
* @example
|
|
524
835
|
* ```tsx
|
|
525
836
|
* // Basic card
|
|
526
837
|
* <GlassCard intensity="medium">Content</GlassCard>
|
|
527
838
|
*
|
|
528
|
-
* // As a clickable link
|
|
839
|
+
* // As a clickable link with accessible name
|
|
529
840
|
* <GlassCard asChild intensity="medium">
|
|
530
|
-
* <a href="/details"
|
|
841
|
+
* <a href="/details" aria-label="View product details">
|
|
842
|
+
* <h3>Product Title</h3>
|
|
843
|
+
* <p>Description</p>
|
|
844
|
+
* </a>
|
|
845
|
+
* </GlassCard>
|
|
846
|
+
*
|
|
847
|
+
* // Different intensity levels
|
|
848
|
+
* <GlassCard intensity="subtle">Subtle blur</GlassCard>
|
|
849
|
+
* <GlassCard intensity="medium">Standard blur</GlassCard>
|
|
850
|
+
* <GlassCard intensity="strong">Heavy blur</GlassCard>
|
|
851
|
+
*
|
|
852
|
+
* // With glow effects
|
|
853
|
+
* <GlassCard glow="blue">Blue glow card</GlassCard>
|
|
854
|
+
* <GlassCard glow="violet">Violet glow card</GlassCard>
|
|
855
|
+
* <GlassCard glow="cyan">Cyan glow card</GlassCard>
|
|
856
|
+
*
|
|
857
|
+
* // As a button (interactive) with role
|
|
858
|
+
* <GlassCard asChild hover intensity="medium">
|
|
859
|
+
* <button onClick={handleClick} aria-label="Open settings">
|
|
860
|
+
* <Settings className="w-6 h-6" />
|
|
861
|
+
* <span>Settings</span>
|
|
862
|
+
* </button>
|
|
863
|
+
* </GlassCard>
|
|
864
|
+
*
|
|
865
|
+
* // Article card with semantic HTML
|
|
866
|
+
* <GlassCard asChild intensity="medium" padding="lg">
|
|
867
|
+
* <article>
|
|
868
|
+
* <header><h2>Article Title</h2></header>
|
|
869
|
+
* <p>Article content...</p>
|
|
870
|
+
* <footer>Published: Jan 1, 2025</footer>
|
|
871
|
+
* </article>
|
|
531
872
|
* </GlassCard>
|
|
532
873
|
* ```
|
|
533
874
|
*/
|
|
@@ -604,18 +945,61 @@ export declare const InputGlass: ForwardRefExoticComponent<InputGlassProps & Ref
|
|
|
604
945
|
* A glass-themed input field with labels, validation states, and icon support.
|
|
605
946
|
* Features focus glow effects and theme-aware styling.
|
|
606
947
|
*
|
|
948
|
+
* @accessibility
|
|
949
|
+
* - **Keyboard Navigation:** Full keyboard support with native `<input>` element, standard tab navigation
|
|
950
|
+
* - **Focus Management:** Visible focus ring using `--focus-glow` CSS variable (WCAG 2.4.7)
|
|
951
|
+
* - **Screen Readers:** Semantic `<label>` elements properly associated via `htmlFor`, error/success messages announced with `aria-describedby`
|
|
952
|
+
* - **Error State:** Red border and error message displayed below input, programmatically associated for screen readers
|
|
953
|
+
* - **Success State:** Green border and success message displayed below input, programmatically associated for screen readers
|
|
954
|
+
* - **Touch Targets:** Minimum 44x44px touch target on mobile devices (WCAG 2.5.5)
|
|
955
|
+
* - **Color Contrast:** All text meets WCAG AA contrast ratio 4.5:1 minimum against backgrounds
|
|
956
|
+
* - **Motion:** Icon color transitions respect `prefers-reduced-motion` settings
|
|
957
|
+
*
|
|
607
958
|
* @example
|
|
608
959
|
* ```tsx
|
|
609
960
|
* // Basic input with label
|
|
610
961
|
* <InputGlass label="Email" placeholder="you@example.com" />
|
|
611
962
|
*
|
|
612
|
-
* // With
|
|
963
|
+
* // With aria-describedby for additional context
|
|
964
|
+
* <InputGlass
|
|
965
|
+
* label="Username"
|
|
966
|
+
* placeholder="Enter username"
|
|
967
|
+
* aria-describedby="username-help"
|
|
968
|
+
* />
|
|
969
|
+
* <span id="username-help">Must be 3-20 characters</span>
|
|
970
|
+
*
|
|
971
|
+
* // With validation states (automatically announced to screen readers)
|
|
613
972
|
* <InputGlass label="Username" error="Username is required" />
|
|
614
973
|
* <InputGlass label="Password" success="Strong password" type="password" />
|
|
615
974
|
*
|
|
616
|
-
* // With icon
|
|
617
|
-
* <InputGlass
|
|
618
|
-
*
|
|
975
|
+
* // With icon and accessible label
|
|
976
|
+
* <InputGlass
|
|
977
|
+
* icon={Search}
|
|
978
|
+
* placeholder="Search..."
|
|
979
|
+
* aria-label="Search products"
|
|
980
|
+
* />
|
|
981
|
+
* <InputGlass icon={Mail} iconPosition="right" type="email" />
|
|
982
|
+
*
|
|
983
|
+
* // Disabled state (automatically announced)
|
|
984
|
+
* <InputGlass label="Email" disabled value="locked@example.com" />
|
|
985
|
+
*
|
|
986
|
+
* // Form integration with accessible error handling
|
|
987
|
+
* <form onSubmit={handleSubmit}>
|
|
988
|
+
* <InputGlass
|
|
989
|
+
* label="Email"
|
|
990
|
+
* type="email"
|
|
991
|
+
* required
|
|
992
|
+
* error={errors.email}
|
|
993
|
+
* aria-invalid={!!errors.email}
|
|
994
|
+
* />
|
|
995
|
+
* <InputGlass
|
|
996
|
+
* label="Password"
|
|
997
|
+
* type="password"
|
|
998
|
+
* icon={Lock}
|
|
999
|
+
* error={errors.password}
|
|
1000
|
+
* />
|
|
1001
|
+
* <ButtonGlass type="submit">Sign In</ButtonGlass>
|
|
1002
|
+
* </form>
|
|
619
1003
|
* ```
|
|
620
1004
|
*/
|
|
621
1005
|
declare interface InputGlassProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'>, VariantProps<typeof inputVariants> {
|
|
@@ -863,6 +1247,100 @@ declare interface ModalOverlayProps {
|
|
|
863
1247
|
className?: string;
|
|
864
1248
|
}
|
|
865
1249
|
|
|
1250
|
+
/**
|
|
1251
|
+
* Props for ModalGlass.Root component
|
|
1252
|
+
*
|
|
1253
|
+
* Root component that provides context and manages open/close state for the modal.
|
|
1254
|
+
* Handles keyboard events, body scroll lock, and accessibility attributes.
|
|
1255
|
+
*
|
|
1256
|
+
* @accessibility
|
|
1257
|
+
* - **Keyboard Navigation:** Escape key closes modal, Tab key traps focus within modal content
|
|
1258
|
+
* - **Focus Management:** Focus automatically moved to modal on open, returned to trigger on close (WCAG 2.4.3)
|
|
1259
|
+
* - **Screen Readers:** Uses `role="dialog"` and `aria-modal="true"` for proper modal semantics (WCAG 4.1.3)
|
|
1260
|
+
* - **Title Association:** Modal title automatically linked via `aria-labelledby="modal-title"`
|
|
1261
|
+
* - **Description Association:** Optional description linked via `aria-describedby="modal-description"`
|
|
1262
|
+
* - **Body Scroll Lock:** Prevents background scrolling when modal is open (improves UX and focus management)
|
|
1263
|
+
* - **Touch Targets:** All interactive elements (close button, action buttons) meet 44x44px minimum (WCAG 2.5.5)
|
|
1264
|
+
* - **Color Contrast:** Modal content and overlay meet WCAG AA contrast requirements
|
|
1265
|
+
* - **Motion:** Open/close animations respect `prefers-reduced-motion` settings
|
|
1266
|
+
*
|
|
1267
|
+
* @example
|
|
1268
|
+
* ```tsx
|
|
1269
|
+
* // Basic modal with title and description
|
|
1270
|
+
* <ModalGlass.Root open={open} onOpenChange={setOpen}>
|
|
1271
|
+
* <ModalGlass.Overlay />
|
|
1272
|
+
* <ModalGlass.Content>
|
|
1273
|
+
* <ModalGlass.Header>
|
|
1274
|
+
* <ModalGlass.Title>Confirm Action</ModalGlass.Title>
|
|
1275
|
+
* <ModalGlass.Description>
|
|
1276
|
+
* This action cannot be undone.
|
|
1277
|
+
* </ModalGlass.Description>
|
|
1278
|
+
* <ModalGlass.Close />
|
|
1279
|
+
* </ModalGlass.Header>
|
|
1280
|
+
* <ModalGlass.Body>
|
|
1281
|
+
* <p>Are you sure you want to proceed?</p>
|
|
1282
|
+
* </ModalGlass.Body>
|
|
1283
|
+
* <ModalGlass.Footer>
|
|
1284
|
+
* <ButtonGlass variant="ghost" onClick={() => setOpen(false)}>
|
|
1285
|
+
* Cancel
|
|
1286
|
+
* </ButtonGlass>
|
|
1287
|
+
* <ButtonGlass variant="destructive" onClick={handleConfirm}>
|
|
1288
|
+
* Confirm
|
|
1289
|
+
* </ButtonGlass>
|
|
1290
|
+
* </ModalGlass.Footer>
|
|
1291
|
+
* </ModalGlass.Content>
|
|
1292
|
+
* </ModalGlass.Root>
|
|
1293
|
+
*
|
|
1294
|
+
* // Different sizes
|
|
1295
|
+
* <ModalGlass.Root open={open} onOpenChange={setOpen} size="sm">
|
|
1296
|
+
* {// Small modal content}
|
|
1297
|
+
* </ModalGlass.Root>
|
|
1298
|
+
* <ModalGlass.Root open={open} onOpenChange={setOpen} size="lg">
|
|
1299
|
+
* {// Large modal content}
|
|
1300
|
+
* </ModalGlass.Root>
|
|
1301
|
+
*
|
|
1302
|
+
* // Form modal with proper focus management
|
|
1303
|
+
* <ModalGlass.Root open={open} onOpenChange={setOpen}>
|
|
1304
|
+
* <ModalGlass.Overlay />
|
|
1305
|
+
* <ModalGlass.Content>
|
|
1306
|
+
* <ModalGlass.Header>
|
|
1307
|
+
* <ModalGlass.Title>Create Account</ModalGlass.Title>
|
|
1308
|
+
* <ModalGlass.Close />
|
|
1309
|
+
* </ModalGlass.Header>
|
|
1310
|
+
* <ModalGlass.Body>
|
|
1311
|
+
* <form id="signup-form" onSubmit={handleSubmit}>
|
|
1312
|
+
* <InputGlass label="Email" type="email" required />
|
|
1313
|
+
* <InputGlass label="Password" type="password" required />
|
|
1314
|
+
* </form>
|
|
1315
|
+
* </ModalGlass.Body>
|
|
1316
|
+
* <ModalGlass.Footer>
|
|
1317
|
+
* <ButtonGlass variant="ghost" onClick={() => setOpen(false)}>
|
|
1318
|
+
* Cancel
|
|
1319
|
+
* </ButtonGlass>
|
|
1320
|
+
* <ButtonGlass type="submit" form="signup-form">
|
|
1321
|
+
* Sign Up
|
|
1322
|
+
* </ButtonGlass>
|
|
1323
|
+
* </ModalGlass.Footer>
|
|
1324
|
+
* </ModalGlass.Content>
|
|
1325
|
+
* </ModalGlass.Root>
|
|
1326
|
+
*
|
|
1327
|
+
* // Alert modal (no close button)
|
|
1328
|
+
* <ModalGlass.Root open={showAlert} onOpenChange={setShowAlert}>
|
|
1329
|
+
* <ModalGlass.Overlay />
|
|
1330
|
+
* <ModalGlass.Content>
|
|
1331
|
+
* <ModalGlass.Header>
|
|
1332
|
+
* <ModalGlass.Title>Session Expired</ModalGlass.Title>
|
|
1333
|
+
* </ModalGlass.Header>
|
|
1334
|
+
* <ModalGlass.Body>
|
|
1335
|
+
* Your session has expired. Please log in again.
|
|
1336
|
+
* </ModalGlass.Body>
|
|
1337
|
+
* <ModalGlass.Footer>
|
|
1338
|
+
* <ButtonGlass onClick={handleLogin}>Log In</ButtonGlass>
|
|
1339
|
+
* </ModalGlass.Footer>
|
|
1340
|
+
* </ModalGlass.Content>
|
|
1341
|
+
* </ModalGlass.Root>
|
|
1342
|
+
* ```
|
|
1343
|
+
*/
|
|
866
1344
|
declare interface ModalRootProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
867
1345
|
/** Open state */
|
|
868
1346
|
open: boolean;
|
|
@@ -1223,6 +1701,89 @@ declare interface TabsListProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
1223
1701
|
className?: string;
|
|
1224
1702
|
}
|
|
1225
1703
|
|
|
1704
|
+
/**
|
|
1705
|
+
* Props for TabsGlass.Root component
|
|
1706
|
+
*
|
|
1707
|
+
* Root component that manages tab state and provides context for child components.
|
|
1708
|
+
* Features accessible keyboard navigation and ARIA attributes.
|
|
1709
|
+
*
|
|
1710
|
+
* @accessibility
|
|
1711
|
+
* - **Keyboard Navigation:** Arrow keys navigate between tabs, Tab moves to tab panel content (WCAG 2.1.1)
|
|
1712
|
+
* - **Focus Management:** Visible focus ring on active tab using `--focus-glow` CSS variable (WCAG 2.4.7)
|
|
1713
|
+
* - **Screen Readers:** Uses `role="tablist"`, `role="tab"`, `role="tabpanel"` for proper tab semantics (WCAG 4.1.3)
|
|
1714
|
+
* - **ARIA Attributes:** Tabs marked with `aria-selected`, panels with `aria-hidden` for state announcement
|
|
1715
|
+
* - **Active State:** Visual indicator (underline) plus color change for multi-modal feedback
|
|
1716
|
+
* - **Touch Targets:** Tab triggers meet minimum 44x44px touch target (WCAG 2.5.5)
|
|
1717
|
+
* - **Color Contrast:** Active and inactive tab text meet WCAG AA contrast ratio 4.5:1
|
|
1718
|
+
* - **Motion:** Transitions and indicator animations respect `prefers-reduced-motion` settings
|
|
1719
|
+
*
|
|
1720
|
+
* @example
|
|
1721
|
+
* ```tsx
|
|
1722
|
+
* // Basic tabs
|
|
1723
|
+
* <TabsGlass.Root value={activeTab} onValueChange={setActiveTab}>
|
|
1724
|
+
* <TabsGlass.List>
|
|
1725
|
+
* <TabsGlass.Trigger value="overview">Overview</TabsGlass.Trigger>
|
|
1726
|
+
* <TabsGlass.Trigger value="analytics">Analytics</TabsGlass.Trigger>
|
|
1727
|
+
* <TabsGlass.Trigger value="settings">Settings</TabsGlass.Trigger>
|
|
1728
|
+
* </TabsGlass.List>
|
|
1729
|
+
* <TabsGlass.Content value="overview">
|
|
1730
|
+
* <h2>Overview</h2>
|
|
1731
|
+
* <p>Overview content here</p>
|
|
1732
|
+
* </TabsGlass.Content>
|
|
1733
|
+
* <TabsGlass.Content value="analytics">
|
|
1734
|
+
* <h2>Analytics</h2>
|
|
1735
|
+
* <p>Analytics content here</p>
|
|
1736
|
+
* </TabsGlass.Content>
|
|
1737
|
+
* <TabsGlass.Content value="settings">
|
|
1738
|
+
* <h2>Settings</h2>
|
|
1739
|
+
* <p>Settings content here</p>
|
|
1740
|
+
* </TabsGlass.Content>
|
|
1741
|
+
* </TabsGlass.Root>
|
|
1742
|
+
*
|
|
1743
|
+
* // Tabs with icons (ensure accessible labels)
|
|
1744
|
+
* <TabsGlass.Root value={activeTab} onValueChange={setActiveTab}>
|
|
1745
|
+
* <TabsGlass.List>
|
|
1746
|
+
* <TabsGlass.Trigger value="home" aria-label="Home dashboard">
|
|
1747
|
+
* <Home className="w-4 h-4" />
|
|
1748
|
+
* </TabsGlass.Trigger>
|
|
1749
|
+
* <TabsGlass.Trigger value="search" aria-label="Search">
|
|
1750
|
+
* <Search className="w-4 h-4" />
|
|
1751
|
+
* </TabsGlass.Trigger>
|
|
1752
|
+
* </TabsGlass.List>
|
|
1753
|
+
* <TabsGlass.Content value="home">Dashboard content</TabsGlass.Content>
|
|
1754
|
+
* <TabsGlass.Content value="search">Search content</TabsGlass.Content>
|
|
1755
|
+
* </TabsGlass.Root>
|
|
1756
|
+
*
|
|
1757
|
+
* // Disabled tab (announced to screen readers)
|
|
1758
|
+
* <TabsGlass.Root value={activeTab} onValueChange={setActiveTab}>
|
|
1759
|
+
* <TabsGlass.List>
|
|
1760
|
+
* <TabsGlass.Trigger value="tab1">Available Tab</TabsGlass.Trigger>
|
|
1761
|
+
* <TabsGlass.Trigger value="tab2" disabled>
|
|
1762
|
+
* Locked Tab
|
|
1763
|
+
* </TabsGlass.Trigger>
|
|
1764
|
+
* </TabsGlass.List>
|
|
1765
|
+
* <TabsGlass.Content value="tab1">Content 1</TabsGlass.Content>
|
|
1766
|
+
* </TabsGlass.Root>
|
|
1767
|
+
*
|
|
1768
|
+
* // Form tabs with proper focus management
|
|
1769
|
+
* <TabsGlass.Root value={currentStep} onValueChange={setCurrentStep}>
|
|
1770
|
+
* <TabsGlass.List aria-label="Registration steps">
|
|
1771
|
+
* <TabsGlass.Trigger value="account">Account Info</TabsGlass.Trigger>
|
|
1772
|
+
* <TabsGlass.Trigger value="profile">Profile Details</TabsGlass.Trigger>
|
|
1773
|
+
* <TabsGlass.Trigger value="confirm">Confirmation</TabsGlass.Trigger>
|
|
1774
|
+
* </TabsGlass.List>
|
|
1775
|
+
* <TabsGlass.Content value="account">
|
|
1776
|
+
* <InputGlass label="Email" type="email" />
|
|
1777
|
+
* </TabsGlass.Content>
|
|
1778
|
+
* <TabsGlass.Content value="profile">
|
|
1779
|
+
* <InputGlass label="Name" />
|
|
1780
|
+
* </TabsGlass.Content>
|
|
1781
|
+
* <TabsGlass.Content value="confirm">
|
|
1782
|
+
* <p>Review your information</p>
|
|
1783
|
+
* </TabsGlass.Content>
|
|
1784
|
+
* </TabsGlass.Root>
|
|
1785
|
+
* ```
|
|
1786
|
+
*/
|
|
1226
1787
|
declare interface TabsRootProps {
|
|
1227
1788
|
/** Current active tab value */
|
|
1228
1789
|
value: string;
|
|
@@ -1270,6 +1831,75 @@ declare const toggleSizes: (props?: ({
|
|
|
1270
1831
|
|
|
1271
1832
|
export declare const TooltipGlass: ForwardRefExoticComponent<TooltipGlassProps & RefAttributes<HTMLDivElement>>;
|
|
1272
1833
|
|
|
1834
|
+
/**
|
|
1835
|
+
* Props for the TooltipGlass component
|
|
1836
|
+
*
|
|
1837
|
+
* A glass-themed tooltip with configurable positioning and unified dark design.
|
|
1838
|
+
* Features smooth animations and WCAG-compliant accessibility attributes.
|
|
1839
|
+
*
|
|
1840
|
+
* @accessibility
|
|
1841
|
+
* - **Keyboard Navigation:** Tooltip appears on focus for keyboard users (same as hover)
|
|
1842
|
+
* - **Focus Management:** Tooltip does not trap focus, allows normal navigation flow
|
|
1843
|
+
* - **Screen Readers:** Uses `aria-describedby` to associate tooltip with trigger element (WCAG 4.1.3)
|
|
1844
|
+
* - **ARIA Attributes:** Tooltip marked with `role="tooltip"` and unique ID for proper association
|
|
1845
|
+
* - **Dismissible:** Tooltip dismisses on mouse leave, focus blur, or Escape key
|
|
1846
|
+
* - **Touch Targets:** N/A - tooltips appear on hover/focus, do not require direct interaction
|
|
1847
|
+
* - **Color Contrast:** Tooltip text meets WCAG AA contrast ratio 4.5:1 against dark background
|
|
1848
|
+
* - **Motion:** Fade-in animation respects `prefers-reduced-motion` settings
|
|
1849
|
+
*
|
|
1850
|
+
* @example
|
|
1851
|
+
* ```tsx
|
|
1852
|
+
* // Basic tooltip
|
|
1853
|
+
* <TooltipGlass content="Click to edit">
|
|
1854
|
+
* <button><Edit className="w-4 h-4" /></button>
|
|
1855
|
+
* </TooltipGlass>
|
|
1856
|
+
*
|
|
1857
|
+
* // Different positions
|
|
1858
|
+
* <TooltipGlass content="Top tooltip" position="top">
|
|
1859
|
+
* <ButtonGlass>Hover me</ButtonGlass>
|
|
1860
|
+
* </TooltipGlass>
|
|
1861
|
+
* <TooltipGlass content="Bottom tooltip" position="bottom">
|
|
1862
|
+
* <ButtonGlass>Hover me</ButtonGlass>
|
|
1863
|
+
* </TooltipGlass>
|
|
1864
|
+
* <TooltipGlass content="Left tooltip" position="left">
|
|
1865
|
+
* <ButtonGlass>Hover me</ButtonGlass>
|
|
1866
|
+
* </TooltipGlass>
|
|
1867
|
+
* <TooltipGlass content="Right tooltip" position="right">
|
|
1868
|
+
* <ButtonGlass>Hover me</ButtonGlass>
|
|
1869
|
+
* </TooltipGlass>
|
|
1870
|
+
*
|
|
1871
|
+
* // Icon button with accessible tooltip (provides label)
|
|
1872
|
+
* <TooltipGlass content="Delete item">
|
|
1873
|
+
* <ButtonGlass
|
|
1874
|
+
* icon={Trash}
|
|
1875
|
+
* size="icon"
|
|
1876
|
+
* variant="ghost"
|
|
1877
|
+
* aria-label="Delete item"
|
|
1878
|
+
* />
|
|
1879
|
+
* </TooltipGlass>
|
|
1880
|
+
*
|
|
1881
|
+
* // Informational tooltip on text
|
|
1882
|
+
* <TooltipGlass content="This feature requires a Pro subscription">
|
|
1883
|
+
* <span className="underline decoration-dotted">Pro Feature</span>
|
|
1884
|
+
* </TooltipGlass>
|
|
1885
|
+
*
|
|
1886
|
+
* // Badge with tooltip for additional context
|
|
1887
|
+
* <TooltipGlass content="Last updated 2 hours ago" position="top">
|
|
1888
|
+
* <BadgeGlass variant="success" dot>
|
|
1889
|
+
* Active
|
|
1890
|
+
* </BadgeGlass>
|
|
1891
|
+
* </TooltipGlass>
|
|
1892
|
+
*
|
|
1893
|
+
* // Disabled button with explanation tooltip
|
|
1894
|
+
* <TooltipGlass content="Save your changes first to enable this action">
|
|
1895
|
+
* <span>
|
|
1896
|
+
* <ButtonGlass disabled aria-describedby="tooltip-id">
|
|
1897
|
+
* Export
|
|
1898
|
+
* </ButtonGlass>
|
|
1899
|
+
* </span>
|
|
1900
|
+
* </TooltipGlass>
|
|
1901
|
+
* ```
|
|
1902
|
+
*/
|
|
1273
1903
|
declare interface TooltipGlassProps extends VariantProps<typeof tooltipPositions> {
|
|
1274
1904
|
readonly children: ReactNode;
|
|
1275
1905
|
readonly content: string;
|