shadcn-glass-ui 2.0.12 → 2.1.1
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 +218 -5
- package/README.md +132 -43
- package/context7.json +2 -1
- package/dist/cli/index.cjs +1 -1
- package/dist/components.cjs +4 -4
- package/dist/components.d.ts +103 -29
- package/dist/components.js +1 -1
- package/dist/demo-screenshot-aurora.png +0 -0
- package/dist/demo-screenshot.png +0 -0
- package/dist/demo-screenshot.png.zip +0 -0
- package/dist/hooks.cjs +2 -2
- package/dist/index.cjs +5 -5
- package/dist/index.js +28 -28
- package/dist/index.js.map +1 -1
- package/dist/r/ai-card-glass.json +1 -1
- package/dist/r/avatar-glass.json +1 -1
- package/dist/r/badge-glass.json +1 -1
- package/dist/r/button-glass.json +1 -1
- package/dist/r/combobox-glass.json +1 -1
- package/dist/r/registry.json +2 -2
- package/dist/r/repository-card-glass.json +2 -1
- package/dist/r/slider-glass.json +4 -5
- package/dist/r/toggle-glass.json +2 -2
- package/dist/r/year-card-glass.json +1 -1
- package/dist/shadcn-glass-ui.css +1 -1
- package/dist/{theme-context-DNe_2vWJ.cjs → theme-context-BHXYJ4RE.cjs} +2 -2
- package/dist/{theme-context-DNe_2vWJ.cjs.map → theme-context-BHXYJ4RE.cjs.map} +1 -1
- package/dist/themes.cjs +1 -1
- package/dist/{trust-score-card-glass-Dgu46oWI.cjs → trust-score-card-glass-CGXmOIfq.cjs} +850 -150
- package/dist/trust-score-card-glass-CGXmOIfq.cjs.map +1 -0
- package/dist/{trust-score-card-glass-A7kas5OS.js → trust-score-card-glass-L9g0qamo.js} +1182 -482
- package/dist/trust-score-card-glass-L9g0qamo.js.map +1 -0
- package/dist/{use-focus-BRkQtQCj.cjs → use-focus-CeNHOiBa.cjs} +2 -2
- package/dist/{use-focus-BRkQtQCj.cjs.map → use-focus-CeNHOiBa.cjs.map} +1 -1
- package/dist/{use-wallpaper-tint-CfShPBo2.cjs → use-wallpaper-tint-Bt2G3g1v.cjs} +2 -2
- package/dist/{use-wallpaper-tint-CfShPBo2.cjs.map → use-wallpaper-tint-Bt2G3g1v.cjs.map} +1 -1
- package/dist/{utils-BXN7AcRu.cjs → utils-LYxxWvUn.cjs} +2 -2
- package/dist/{utils-BXN7AcRu.cjs.map → utils-LYxxWvUn.cjs.map} +1 -1
- package/dist/utils.cjs +1 -1
- package/docs/ADVANCED_PATTERNS.md +584 -0
- package/docs/AI_USAGE.md +135 -611
- package/docs/BEST_PRACTICES.md +2 -2
- package/docs/BREAKING_CHANGES.md +242 -0
- package/docs/COMPONENTS_CATALOG.md +8 -8
- package/docs/EXPORTS_STRUCTURE.md +3 -3
- package/docs/GETTING_STARTED.md +13 -8
- package/docs/PUBLISHING.md +1 -1
- package/docs/REGISTRY_SUMMARY.md +2 -2
- package/docs/REGISTRY_USAGE.md +1 -1
- package/docs/api/README.md +11 -11
- package/docs/api/interfaces/BadgeGlassProps.md +21 -14
- package/docs/api/interfaces/ButtonGlassProps.md +37 -30
- package/package.json +4 -3
- package/dist/trust-score-card-glass-A7kas5OS.js.map +0 -1
- package/dist/trust-score-card-glass-Dgu46oWI.cjs.map +0 -1
- package/dist/vite.svg +0 -1
- package/docs/migration/modal-glass-compound-api.md +0 -458
- package/docs/migration/select-to-combobox.md +0 -386
- package/docs/migration/tabs-glass-compound-api.md +0 -579
package/dist/components.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
2
2
|
import { ButtonHTMLAttributes } from 'react';
|
|
3
3
|
import { ClassProp } from 'class-variance-authority/types';
|
|
4
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
4
5
|
import { default as default_2 } from 'react';
|
|
5
6
|
import { FC } from 'react';
|
|
6
7
|
import { ForwardRefExoticComponent } from 'react';
|
|
@@ -12,6 +13,7 @@ import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
|
12
13
|
import * as React_2 from 'react';
|
|
13
14
|
import { ReactNode } from 'react';
|
|
14
15
|
import { RefAttributes } from 'react';
|
|
16
|
+
import * as SliderPrimitive from '@radix-ui/react-slider';
|
|
15
17
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
16
18
|
import { VariantProps } from 'class-variance-authority';
|
|
17
19
|
|
|
@@ -95,7 +97,7 @@ export declare const BadgeGlass: ForwardRefExoticComponent<BadgeGlassProps & Ref
|
|
|
95
97
|
*
|
|
96
98
|
* // Size variants
|
|
97
99
|
* <BadgeGlass size="sm">Small</BadgeGlass>
|
|
98
|
-
* <BadgeGlass size="
|
|
100
|
+
* <BadgeGlass size="default">Medium</BadgeGlass>
|
|
99
101
|
* <BadgeGlass size="lg">Large</BadgeGlass>
|
|
100
102
|
*
|
|
101
103
|
* // Inside interactive elements (ensure accessible labels)
|
|
@@ -144,6 +146,15 @@ export declare const ButtonGlass: ForwardRefExoticComponent<ButtonGlassProps & R
|
|
|
144
146
|
* A glass-themed button with ripple effects, loading states, and icon support.
|
|
145
147
|
* Features theme-aware styling and hover animations.
|
|
146
148
|
*
|
|
149
|
+
* **shadcn/ui compatible variants:**
|
|
150
|
+
* - `default` - Primary action button with glow effects
|
|
151
|
+
* - `secondary` - Secondary action with border
|
|
152
|
+
* - `ghost` - Minimal visual presence
|
|
153
|
+
* - `destructive` - Dangerous/delete actions (red)
|
|
154
|
+
* - `outline` - Border with transparent background
|
|
155
|
+
* - `link` - Text-only button with underline on hover
|
|
156
|
+
* - `success` - Positive feedback (glass-ui extension)
|
|
157
|
+
*
|
|
147
158
|
* @accessibility
|
|
148
159
|
* - **Keyboard Navigation:** Fully keyboard accessible with native `<button>` element
|
|
149
160
|
* - **Focus Management:** Visible focus ring using `--focus-glow` CSS variable (WCAG 2.4.7)
|
|
@@ -155,8 +166,9 @@ export declare const ButtonGlass: ForwardRefExoticComponent<ButtonGlassProps & R
|
|
|
155
166
|
*
|
|
156
167
|
* @example
|
|
157
168
|
* ```tsx
|
|
158
|
-
* // Basic button
|
|
159
|
-
* <ButtonGlass
|
|
169
|
+
* // Basic button (default variant)
|
|
170
|
+
* <ButtonGlass>Click me</ButtonGlass>
|
|
171
|
+
* <ButtonGlass variant="default">Primary action</ButtonGlass>
|
|
160
172
|
*
|
|
161
173
|
* // With icon and aria-label for icon-only buttons
|
|
162
174
|
* <ButtonGlass icon={Check} iconPosition="left">Save</ButtonGlass>
|
|
@@ -165,13 +177,16 @@ export declare const ButtonGlass: ForwardRefExoticComponent<ButtonGlassProps & R
|
|
|
165
177
|
* // Loading state (automatically disables and shows spinner)
|
|
166
178
|
* <ButtonGlass loading aria-live="polite">Processing...</ButtonGlass>
|
|
167
179
|
*
|
|
168
|
-
* // Different variants
|
|
180
|
+
* // Different variants (shadcn/ui compatible)
|
|
181
|
+
* <ButtonGlass variant="secondary">Secondary</ButtonGlass>
|
|
169
182
|
* <ButtonGlass variant="ghost">Cancel</ButtonGlass>
|
|
170
|
-
* <ButtonGlass variant="
|
|
183
|
+
* <ButtonGlass variant="outline">Outline</ButtonGlass>
|
|
171
184
|
* <ButtonGlass variant="destructive">Delete</ButtonGlass>
|
|
185
|
+
* <ButtonGlass variant="link">Learn more</ButtonGlass>
|
|
186
|
+
* <ButtonGlass variant="success">Confirm</ButtonGlass>
|
|
172
187
|
*
|
|
173
188
|
* // As a link (asChild pattern) - maintains semantic HTML
|
|
174
|
-
* <ButtonGlass asChild
|
|
189
|
+
* <ButtonGlass asChild>
|
|
175
190
|
* <a href="/dashboard">Go to Dashboard</a>
|
|
176
191
|
* </ButtonGlass>
|
|
177
192
|
*
|
|
@@ -181,7 +196,7 @@ export declare const ButtonGlass: ForwardRefExoticComponent<ButtonGlassProps & R
|
|
|
181
196
|
* </ButtonGlass>
|
|
182
197
|
*
|
|
183
198
|
* // Form submit button
|
|
184
|
-
* <ButtonGlass type="submit"
|
|
199
|
+
* <ButtonGlass type="submit">
|
|
185
200
|
* Submit Form
|
|
186
201
|
* </ButtonGlass>
|
|
187
202
|
* ```
|
|
@@ -205,8 +220,8 @@ declare interface ButtonGlassProps extends Omit<React.ButtonHTMLAttributes<HTMLB
|
|
|
205
220
|
*/
|
|
206
221
|
readonly asChild?: boolean;
|
|
207
222
|
/**
|
|
208
|
-
* Visual style variant of the button
|
|
209
|
-
* @default "
|
|
223
|
+
* Visual style variant of the button (shadcn/ui compatible)
|
|
224
|
+
* @default "default"
|
|
210
225
|
*/
|
|
211
226
|
readonly variant?: ButtonGlassVariant;
|
|
212
227
|
/**
|
|
@@ -225,21 +240,31 @@ declare interface ButtonGlassProps extends Omit<React.ButtonHTMLAttributes<HTMLB
|
|
|
225
240
|
*/
|
|
226
241
|
readonly iconPosition?: 'left' | 'right';
|
|
227
242
|
/**
|
|
228
|
-
* Size variant of the button
|
|
229
|
-
* @default "
|
|
243
|
+
* Size variant of the button (shadcn/ui compatible)
|
|
244
|
+
* @default "default"
|
|
230
245
|
*/
|
|
231
|
-
readonly size?: '
|
|
246
|
+
readonly size?: 'default' | 'sm' | 'lg' | 'xl' | 'icon';
|
|
232
247
|
}
|
|
233
248
|
|
|
234
249
|
/**
|
|
235
250
|
* ButtonGlass CVA Variants
|
|
236
251
|
* Extracted for Fast Refresh compatibility
|
|
237
252
|
*/
|
|
238
|
-
|
|
253
|
+
/**
|
|
254
|
+
* ButtonGlass variant types (shadcn/ui compatible)
|
|
255
|
+
* - default: Primary action (was 'primary')
|
|
256
|
+
* - secondary: Secondary action
|
|
257
|
+
* - ghost: Minimal visual presence
|
|
258
|
+
* - destructive: Dangerous/delete actions
|
|
259
|
+
* - outline: Border with transparent background (shadcn/ui standard)
|
|
260
|
+
* - success: Positive feedback (glass-ui extension)
|
|
261
|
+
* - link: Text-only button (was 'text', shadcn/ui standard name)
|
|
262
|
+
*/
|
|
263
|
+
declare type ButtonGlassVariant = 'default' | 'secondary' | 'ghost' | 'destructive' | 'outline' | 'success' | 'link';
|
|
239
264
|
|
|
240
265
|
declare const buttonGlassVariants: (props?: ({
|
|
241
|
-
variant?: "destructive" | "success" | "
|
|
242
|
-
size?: "
|
|
266
|
+
variant?: "default" | "destructive" | "success" | "link" | "secondary" | "outline" | "ghost" | null | undefined;
|
|
267
|
+
size?: "default" | "sm" | "lg" | "xl" | "icon" | null | undefined;
|
|
243
268
|
} & ClassProp) | undefined) => string;
|
|
244
269
|
|
|
245
270
|
declare const cardIntensity: (props?: ({
|
|
@@ -420,7 +445,7 @@ export declare const ComboBoxGlass: <T = string>(props: ComboBoxGlassProps<T> &
|
|
|
420
445
|
ref?: React.ForwardedRef<HTMLButtonElement>;
|
|
421
446
|
}) => ReturnType<typeof ComboBoxGlassInner>;
|
|
422
447
|
|
|
423
|
-
declare function ComboBoxGlassInner<T = string>({ options, value,
|
|
448
|
+
declare function ComboBoxGlassInner<T = string>({ options, value, onValueChange, placeholder, emptyText, searchPlaceholder, glassVariant, disabled, className, popoverClassName, clearable, side, align, label, error, success, required, size, searchable, icon: TriggerIcon, }: ComboBoxGlassProps<T>, ref: React.ForwardedRef<HTMLButtonElement>): JSX.Element;
|
|
424
449
|
|
|
425
450
|
declare namespace ComboBoxGlassInner {
|
|
426
451
|
var displayName: string;
|
|
@@ -432,7 +457,7 @@ declare interface ComboBoxGlassProps<T = string> {
|
|
|
432
457
|
/** Currently selected value */
|
|
433
458
|
readonly value?: T;
|
|
434
459
|
/** Callback when value changes */
|
|
435
|
-
readonly
|
|
460
|
+
readonly onValueChange?: (value: T | undefined) => void;
|
|
436
461
|
/** Placeholder text for trigger button */
|
|
437
462
|
readonly placeholder?: string;
|
|
438
463
|
/** Text shown when no results found */
|
|
@@ -1439,7 +1464,7 @@ declare interface RepositoryCardGlassProps extends React.HTMLAttributes<HTMLDivE
|
|
|
1439
1464
|
readonly onAIAnalysisClick?: () => void;
|
|
1440
1465
|
}
|
|
1441
1466
|
|
|
1442
|
-
declare type RepositoryFlagType =
|
|
1467
|
+
declare type RepositoryFlagType = 'green' | 'yellow' | 'red';
|
|
1443
1468
|
|
|
1444
1469
|
declare type RepositoryFlagType_2 = 'green' | 'yellow' | 'red';
|
|
1445
1470
|
|
|
@@ -1512,17 +1537,40 @@ declare const skeletonVariants: (props?: ({
|
|
|
1512
1537
|
variant?: "title" | "text" | "avatar" | "thumbnail" | "card" | null | undefined;
|
|
1513
1538
|
} & ClassProp) | undefined) => string;
|
|
1514
1539
|
|
|
1515
|
-
export declare const SliderGlass: ForwardRefExoticComponent<SliderGlassProps & RefAttributes<
|
|
1540
|
+
export declare const SliderGlass: ForwardRefExoticComponent<SliderGlassProps & RefAttributes<HTMLSpanElement>>;
|
|
1516
1541
|
|
|
1517
|
-
declare interface SliderGlassProps extends Omit<
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
readonly
|
|
1522
|
-
|
|
1542
|
+
declare interface SliderGlassProps extends Omit<ComponentPropsWithoutRef<typeof SliderPrimitive.Root>, 'value' | 'defaultValue' | 'onValueChange'> {
|
|
1543
|
+
/**
|
|
1544
|
+
* Controlled value (shadcn/ui compatible - array for range support)
|
|
1545
|
+
*/
|
|
1546
|
+
readonly value?: number[];
|
|
1547
|
+
/**
|
|
1548
|
+
* Default value for uncontrolled usage (array for range support)
|
|
1549
|
+
*/
|
|
1550
|
+
readonly defaultValue?: number[];
|
|
1551
|
+
/**
|
|
1552
|
+
* Callback when value changes (shadcn/ui compatible)
|
|
1553
|
+
*/
|
|
1554
|
+
readonly onValueChange?: (value: number[]) => void;
|
|
1555
|
+
/**
|
|
1556
|
+
* Callback when interaction ends (mouse up / touch end)
|
|
1557
|
+
*/
|
|
1558
|
+
readonly onValueCommit?: (value: number[]) => void;
|
|
1559
|
+
/**
|
|
1560
|
+
* Show current value(s) next to label
|
|
1561
|
+
*/
|
|
1523
1562
|
readonly showValue?: boolean;
|
|
1563
|
+
/**
|
|
1564
|
+
* Optional label text
|
|
1565
|
+
*/
|
|
1524
1566
|
readonly label?: string;
|
|
1567
|
+
/**
|
|
1568
|
+
* Error message to display
|
|
1569
|
+
*/
|
|
1525
1570
|
readonly error?: string;
|
|
1571
|
+
/**
|
|
1572
|
+
* Success message to display
|
|
1573
|
+
*/
|
|
1526
1574
|
readonly success?: string;
|
|
1527
1575
|
}
|
|
1528
1576
|
|
|
@@ -1736,14 +1784,40 @@ declare interface ThemeToggleGlassProps extends ButtonHTMLAttributes<HTMLButtonE
|
|
|
1736
1784
|
|
|
1737
1785
|
export declare const ToggleGlass: ForwardRefExoticComponent<ToggleGlassProps & RefAttributes<HTMLButtonElement>>;
|
|
1738
1786
|
|
|
1739
|
-
declare interface ToggleGlassProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'onChange'>, VariantProps<typeof toggleSizes> {
|
|
1740
|
-
|
|
1741
|
-
|
|
1787
|
+
declare interface ToggleGlassProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'onChange' | 'defaultValue'>, VariantProps<typeof toggleSizes> {
|
|
1788
|
+
/**
|
|
1789
|
+
* Controlled pressed state (shadcn/ui compatible)
|
|
1790
|
+
*/
|
|
1791
|
+
readonly pressed?: boolean;
|
|
1792
|
+
/**
|
|
1793
|
+
* Default pressed state for uncontrolled usage
|
|
1794
|
+
*/
|
|
1795
|
+
readonly defaultPressed?: boolean;
|
|
1796
|
+
/**
|
|
1797
|
+
* Callback when pressed state changes (shadcn/ui compatible)
|
|
1798
|
+
*/
|
|
1799
|
+
readonly onPressedChange?: (pressed: boolean) => void;
|
|
1800
|
+
/**
|
|
1801
|
+
* Visual variant (shadcn/ui compatible)
|
|
1802
|
+
* @default "default"
|
|
1803
|
+
*/
|
|
1804
|
+
readonly variant?: ToggleGlassVariant;
|
|
1805
|
+
/**
|
|
1806
|
+
* Optional label text
|
|
1807
|
+
*/
|
|
1742
1808
|
readonly label?: string;
|
|
1743
1809
|
}
|
|
1744
1810
|
|
|
1811
|
+
/**
|
|
1812
|
+
* Toggle variant types (shadcn/ui compatible)
|
|
1813
|
+
* - default: Filled toggle with glass effect
|
|
1814
|
+
* - outline: Border only toggle
|
|
1815
|
+
*/
|
|
1816
|
+
declare type ToggleGlassVariant = 'default' | 'outline';
|
|
1817
|
+
|
|
1745
1818
|
declare const toggleSizes: (props?: ({
|
|
1746
|
-
size?: "
|
|
1819
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
1820
|
+
variant?: "default" | "outline" | null | undefined;
|
|
1747
1821
|
} & ClassProp) | undefined) => string;
|
|
1748
1822
|
|
|
1749
1823
|
export declare const TooltipGlass: React_2.FC<TooltipPrimitive.TooltipProps>;
|
package/dist/components.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as BaseProgressGlass, At as GlassCard, Dt as ModalGlass, G as SegmentedControlGlass, Jt as ComboBoxGlass, K as RainbowProgressGlass, Mt as DropdownGlass, Q as StatusIndicatorGlass, Qt as ButtonGlass, Tt as NotificationGlass, X as LanguageBarGlass, Xt as CircularProgressGlass, Y as ProfileAvatarGlass, Z as FlagAlertGlass, Zt as CheckboxGlass, _ as ContributionMetricsGlass, _t as SliderGlass, a as HeaderBrandingGlass, b as AICardGlass, bt as PopoverGlass, c as YearCardGlass, cn as AlertGlass, ct as ExpandableHeaderGlass, d as TrustScoreDisplayGlass, dn as InteractiveCard, en as BadgeGlass, et as ThemeToggleGlass, f as RepositoryMetadataGlass, fn as FormFieldWrapper, g as MetricCardGlass, gt as TabsGlass, h as MetricsGridGlass, i as HeaderNavGlass, kt as InputGlass, l as UserStatsLineGlass, lt as TooltipGlass, m as RepositoryCardGlass, mt as ToggleGlass, n as ProjectsListGlass, nn as AvatarGlass, nt as SortDropdownGlass, o as FlagsSectionGlass, p as RepositoryHeaderGlass, pn as TouchTarget, q as ProgressGlass, r as ProfileHeaderGlass, rt as SearchBoxGlass, s as CareerStatsGlass, st as IconButtonGlass, t as TrustScoreCardGlass, tt as StatItemGlass, u as UserInfoGlass, v as CircularMetricGlass, vt as SkeletonGlass, y as CareerStatsHeaderGlass } from "./trust-score-card-glass-
|
|
1
|
+
import { $ as BaseProgressGlass, At as GlassCard, Dt as ModalGlass, G as SegmentedControlGlass, Jt as ComboBoxGlass, K as RainbowProgressGlass, Mt as DropdownGlass, Q as StatusIndicatorGlass, Qt as ButtonGlass, Tt as NotificationGlass, X as LanguageBarGlass, Xt as CircularProgressGlass, Y as ProfileAvatarGlass, Z as FlagAlertGlass, Zt as CheckboxGlass, _ as ContributionMetricsGlass, _t as SliderGlass, a as HeaderBrandingGlass, b as AICardGlass, bt as PopoverGlass, c as YearCardGlass, cn as AlertGlass, ct as ExpandableHeaderGlass, d as TrustScoreDisplayGlass, dn as InteractiveCard, en as BadgeGlass, et as ThemeToggleGlass, f as RepositoryMetadataGlass, fn as FormFieldWrapper, g as MetricCardGlass, gt as TabsGlass, h as MetricsGridGlass, i as HeaderNavGlass, kt as InputGlass, l as UserStatsLineGlass, lt as TooltipGlass, m as RepositoryCardGlass, mt as ToggleGlass, n as ProjectsListGlass, nn as AvatarGlass, nt as SortDropdownGlass, o as FlagsSectionGlass, p as RepositoryHeaderGlass, pn as TouchTarget, q as ProgressGlass, r as ProfileHeaderGlass, rt as SearchBoxGlass, s as CareerStatsGlass, st as IconButtonGlass, t as TrustScoreCardGlass, tt as StatItemGlass, u as UserInfoGlass, v as CircularMetricGlass, vt as SkeletonGlass, y as CareerStatsHeaderGlass } from "./trust-score-card-glass-L9g0qamo.js";
|
|
2
2
|
import "./utils-CcyeqpKQ.js";
|
|
3
3
|
import "./use-focus-CX0TJJIj.js";
|
|
4
4
|
import "./theme-context-_T5r1KG4.js";
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/hooks.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_use_focus = require("./use-focus-
|
|
2
|
-
const require_use_wallpaper_tint = require("./use-wallpaper-tint-
|
|
1
|
+
const require_use_focus = require("./use-focus-CeNHOiBa.cjs");
|
|
2
|
+
const require_use_wallpaper_tint = require("./use-wallpaper-tint-Bt2G3g1v.cjs");
|
|
3
3
|
exports.useFocus = require_use_focus.useFocus;
|
|
4
4
|
exports.useHover = require_use_focus.useHover;
|
|
5
5
|
exports.useResponsive = require_use_wallpaper_tint.useResponsive;
|
package/dist/index.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const require_trust_score_card_glass = require("./trust-score-card-glass-
|
|
2
|
-
const require_utils = require("./utils-
|
|
3
|
-
const require_use_focus = require("./use-focus-
|
|
4
|
-
const require_theme_context = require("./theme-context-
|
|
5
|
-
const require_use_wallpaper_tint = require("./use-wallpaper-tint-
|
|
1
|
+
const require_trust_score_card_glass = require("./trust-score-card-glass-CGXmOIfq.cjs");
|
|
2
|
+
const require_utils = require("./utils-LYxxWvUn.cjs");
|
|
3
|
+
const require_use_focus = require("./use-focus-CeNHOiBa.cjs");
|
|
4
|
+
const require_theme_context = require("./theme-context-BHXYJ4RE.cjs");
|
|
5
|
+
const require_use_wallpaper_tint = require("./use-wallpaper-tint-Bt2G3g1v.cjs");
|
|
6
6
|
let react = require("react");
|
|
7
7
|
react = require_trust_score_card_glass.__toESM(react);
|
|
8
8
|
let lucide_react = require("lucide-react");
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { $ as BaseProgressGlass, $t as buttonGlassVariants, A as useChartHeight, At as GlassCard, B as adaptEventsOfChild, Bt as DropdownMenuGlassRadioGroup, C as sparklineContainerVariants, Ct as PopoverGlassLegacy, D as Tooltip, Dt as ModalGlass, E as Cell, Et as notificationVariants, F as selectLegendPayload, Ft as DropdownMenuGlassContent, G as SegmentedControlGlass, Gt as DropdownMenuGlassSubContent, H as isNumber, Ht as DropdownMenuGlassSeparator, I as useAppDispatch, It as DropdownMenuGlassGroup, J as progressSizes, Jt as ComboBoxGlass, K as RainbowProgressGlass, Kt as DropdownMenuGlassSubTrigger, L as useAppSelector, Lt as DropdownMenuGlassItem, M as useMargin, Mt as DropdownGlass, N as ResponsiveContainer, Nt as DropdownMenuGlass, O as setLegendSettings, Ot as modalSizes, P as useElementOffset, Pt as DropdownMenuGlassCheckboxItem, Q as StatusIndicatorGlass, Qt as ButtonGlass, R as getUniqPayload, Rt as DropdownMenuGlassLabel, S as sparklineBarVariants, St as PopoverGlassContent, T as Bar, Tt as NotificationGlass, U as useLegendPortal, Ut as DropdownMenuGlassShortcut, V as Symbols, Vt as DropdownMenuGlassRadioItem, W as Surface, Wt as DropdownMenuGlassSub, X as LanguageBarGlass, Xt as CircularProgressGlass, Y as ProfileAvatarGlass, Yt as inputVariants, Z as FlagAlertGlass, Zt as CheckboxGlass, _ as ContributionMetricsGlass, _t as SliderGlass, a as HeaderBrandingGlass, an as AvatarGlassSimple, at as insightCardVariants, b as AICardGlass, bt as PopoverGlass, c as YearCardGlass, cn as AlertGlass, ct as ExpandableHeaderGlass, d as TrustScoreDisplayGlass, dn as InteractiveCard, dt as TooltipGlassProvider, en as BadgeGlass, et as ThemeToggleGlass, f as RepositoryMetadataGlass, fn as FormFieldWrapper, ft as TooltipGlassSimple, g as MetricCardGlass, gt as TabsGlass, h as MetricsGridGlass, ht as toggleSizes, i as HeaderNavGlass, in as AvatarGlassImage, it as InsightCardGlass, j as useChartWidth, jt as cardIntensity, k as setLegendSize, kt as InputGlass, l as UserStatsLineGlass, ln as AlertGlassDescription, lt as TooltipGlass, m as RepositoryCardGlass, mn as alertVariants, mt as ToggleGlass, n as ProjectsListGlass, nn as AvatarGlass, nt as SortDropdownGlass, o as FlagsSectionGlass, on as avatarSizes, ot as insightVariantConfig, p as RepositoryHeaderGlass, pn as TouchTarget, pt as TooltipGlassTrigger, q as ProgressGlass, qt as DropdownMenuGlassTrigger, r as ProfileHeaderGlass, rn as AvatarGlassFallback, rt as SearchBoxGlass, s as CareerStatsGlass, sn as statusSizes, st as IconButtonGlass, t as TrustScoreCardGlass, tn as badgeVariants, tt as StatItemGlass, u as UserInfoGlass, un as AlertGlassTitle, ut as TooltipGlassContent, v as CircularMetricGlass, vt as SkeletonGlass, w as BarChart, wt as PopoverGlassTrigger, x as SparklineGlass, xt as PopoverGlassAnchor, y as CareerStatsHeaderGlass, yt as skeletonVariants, z as resolveDefaultProps, zt as DropdownMenuGlassPortal } from "./trust-score-card-glass-
|
|
1
|
+
import { $ as BaseProgressGlass, $t as buttonGlassVariants, A as useChartHeight, At as GlassCard, B as adaptEventsOfChild, Bt as DropdownMenuGlassRadioGroup, C as sparklineContainerVariants, Ct as PopoverGlassLegacy, D as Tooltip, Dt as ModalGlass, E as Cell, Et as notificationVariants, F as selectLegendPayload, Ft as DropdownMenuGlassContent, G as SegmentedControlGlass, Gt as DropdownMenuGlassSubContent, H as isNumber, Ht as DropdownMenuGlassSeparator, I as useAppDispatch, It as DropdownMenuGlassGroup, J as progressSizes, Jt as ComboBoxGlass, K as RainbowProgressGlass, Kt as DropdownMenuGlassSubTrigger, L as useAppSelector, Lt as DropdownMenuGlassItem, M as useMargin, Mt as DropdownGlass, N as ResponsiveContainer, Nt as DropdownMenuGlass, O as setLegendSettings, Ot as modalSizes, P as useElementOffset, Pt as DropdownMenuGlassCheckboxItem, Q as StatusIndicatorGlass, Qt as ButtonGlass, R as getUniqPayload, Rt as DropdownMenuGlassLabel, S as sparklineBarVariants, St as PopoverGlassContent, T as Bar, Tt as NotificationGlass, U as useLegendPortal, Ut as DropdownMenuGlassShortcut, V as Symbols, Vt as DropdownMenuGlassRadioItem, W as Surface, Wt as DropdownMenuGlassSub, X as LanguageBarGlass, Xt as CircularProgressGlass, Y as ProfileAvatarGlass, Yt as inputVariants, Z as FlagAlertGlass, Zt as CheckboxGlass, _ as ContributionMetricsGlass, _t as SliderGlass, a as HeaderBrandingGlass, an as AvatarGlassSimple, at as insightCardVariants, b as AICardGlass, bt as PopoverGlass, c as YearCardGlass, cn as AlertGlass, ct as ExpandableHeaderGlass, d as TrustScoreDisplayGlass, dn as InteractiveCard, dt as TooltipGlassProvider, en as BadgeGlass, et as ThemeToggleGlass, f as RepositoryMetadataGlass, fn as FormFieldWrapper, ft as TooltipGlassSimple, g as MetricCardGlass, gt as TabsGlass, h as MetricsGridGlass, ht as toggleSizes, i as HeaderNavGlass, in as AvatarGlassImage, it as InsightCardGlass, j as useChartWidth, jt as cardIntensity, k as setLegendSize, kt as InputGlass, l as UserStatsLineGlass, ln as AlertGlassDescription, lt as TooltipGlass, m as RepositoryCardGlass, mn as alertVariants, mt as ToggleGlass, n as ProjectsListGlass, nn as AvatarGlass, nt as SortDropdownGlass, o as FlagsSectionGlass, on as avatarSizes, ot as insightVariantConfig, p as RepositoryHeaderGlass, pn as TouchTarget, pt as TooltipGlassTrigger, q as ProgressGlass, qt as DropdownMenuGlassTrigger, r as ProfileHeaderGlass, rn as AvatarGlassFallback, rt as SearchBoxGlass, s as CareerStatsGlass, sn as statusSizes, st as IconButtonGlass, t as TrustScoreCardGlass, tn as badgeVariants, tt as StatItemGlass, u as UserInfoGlass, un as AlertGlassTitle, ut as TooltipGlassContent, v as CircularMetricGlass, vt as SkeletonGlass, w as BarChart, wt as PopoverGlassTrigger, x as SparklineGlass, xt as PopoverGlassAnchor, y as CareerStatsHeaderGlass, yt as skeletonVariants, z as resolveDefaultProps, zt as DropdownMenuGlassPortal } from "./trust-score-card-glass-L9g0qamo.js";
|
|
2
2
|
import { t as cn } from "./utils-CcyeqpKQ.js";
|
|
3
3
|
import { n as useHover, t as useFocus } from "./use-focus-CX0TJJIj.js";
|
|
4
4
|
import { a as getThemeConfig, i as getNextTheme, n as THEME_CONFIG, o as useTheme, r as ThemeProvider, t as THEMES } from "./theme-context-_T5r1KG4.js";
|
|
5
5
|
import { n as useResponsive, t as useWallpaperTint } from "./use-wallpaper-tint-DUgmytlY.js";
|
|
6
|
-
import * as React from "react";
|
|
6
|
+
import * as React$1 from "react";
|
|
7
7
|
import { createContext, forwardRef, useCallback, useContext, useEffect, useLayoutEffect, useMemo, useState } from "react";
|
|
8
8
|
import { Check } from "lucide-react";
|
|
9
9
|
import { clsx } from "clsx";
|
|
@@ -440,7 +440,7 @@ function Icon(_ref) {
|
|
|
440
440
|
if (preferredIcon === "none") return null;
|
|
441
441
|
if (preferredIcon === "plainline") {
|
|
442
442
|
var _data$payload;
|
|
443
|
-
return /* @__PURE__ */ React.createElement("line", {
|
|
443
|
+
return /* @__PURE__ */ React$1.createElement("line", {
|
|
444
444
|
strokeWidth: 4,
|
|
445
445
|
fill: "none",
|
|
446
446
|
stroke: color,
|
|
@@ -452,25 +452,25 @@ function Icon(_ref) {
|
|
|
452
452
|
className: "recharts-legend-icon"
|
|
453
453
|
});
|
|
454
454
|
}
|
|
455
|
-
if (preferredIcon === "line") return /* @__PURE__ */ React.createElement("path", {
|
|
455
|
+
if (preferredIcon === "line") return /* @__PURE__ */ React$1.createElement("path", {
|
|
456
456
|
strokeWidth: 4,
|
|
457
457
|
fill: "none",
|
|
458
458
|
stroke: color,
|
|
459
459
|
d: "M0,".concat(halfSize, "h").concat(thirdSize, "\n A").concat(sixthSize, ",").concat(sixthSize, ",0,1,1,").concat(2 * thirdSize, ",").concat(halfSize, "\n H").concat(SIZE, "M").concat(2 * thirdSize, ",").concat(halfSize, "\n A").concat(sixthSize, ",").concat(sixthSize, ",0,1,1,").concat(thirdSize, ",").concat(halfSize),
|
|
460
460
|
className: "recharts-legend-icon"
|
|
461
461
|
});
|
|
462
|
-
if (preferredIcon === "rect") return /* @__PURE__ */ React.createElement("path", {
|
|
462
|
+
if (preferredIcon === "rect") return /* @__PURE__ */ React$1.createElement("path", {
|
|
463
463
|
stroke: "none",
|
|
464
464
|
fill: color,
|
|
465
465
|
d: "M0,".concat(SIZE / 8, "h").concat(SIZE, "v").concat(SIZE * 3 / 4, "h").concat(-SIZE, "z"),
|
|
466
466
|
className: "recharts-legend-icon"
|
|
467
467
|
});
|
|
468
|
-
if (/* @__PURE__ */ React.isValidElement(data.legendIcon)) {
|
|
468
|
+
if (/* @__PURE__ */ React$1.isValidElement(data.legendIcon)) {
|
|
469
469
|
var iconProps = _objectSpread$1({}, data);
|
|
470
470
|
delete iconProps.legendIcon;
|
|
471
|
-
return /* @__PURE__ */ React.cloneElement(data.legendIcon, iconProps);
|
|
471
|
+
return /* @__PURE__ */ React$1.cloneElement(data.legendIcon, iconProps);
|
|
472
472
|
}
|
|
473
|
-
return /* @__PURE__ */ React.createElement(Symbols, {
|
|
473
|
+
return /* @__PURE__ */ React$1.createElement(Symbols, {
|
|
474
474
|
fill: color,
|
|
475
475
|
cx: halfSize,
|
|
476
476
|
cy: halfSize,
|
|
@@ -506,21 +506,21 @@ function Items(props) {
|
|
|
506
506
|
if (entry.type === "none") return null;
|
|
507
507
|
var color = entry.inactive ? inactiveColor : entry.color;
|
|
508
508
|
var finalValue = finalFormatter ? finalFormatter(entry.value, entry, i) : entry.value;
|
|
509
|
-
return /* @__PURE__ */ React.createElement("li", _extends$1({
|
|
509
|
+
return /* @__PURE__ */ React$1.createElement("li", _extends$1({
|
|
510
510
|
className,
|
|
511
511
|
style: itemStyle,
|
|
512
512
|
key: "legend-item-".concat(i)
|
|
513
|
-
}, adaptEventsOfChild(props, entry, i)), /* @__PURE__ */ React.createElement(Surface, {
|
|
513
|
+
}, adaptEventsOfChild(props, entry, i)), /* @__PURE__ */ React$1.createElement(Surface, {
|
|
514
514
|
width: iconSize,
|
|
515
515
|
height: iconSize,
|
|
516
516
|
viewBox,
|
|
517
517
|
style: svgStyle,
|
|
518
518
|
"aria-label": "".concat(finalValue, " legend icon")
|
|
519
|
-
}, /* @__PURE__ */ React.createElement(Icon, {
|
|
519
|
+
}, /* @__PURE__ */ React$1.createElement(Icon, {
|
|
520
520
|
data: entry,
|
|
521
521
|
iconType,
|
|
522
522
|
inactiveColor
|
|
523
|
-
})), /* @__PURE__ */ React.createElement("span", {
|
|
523
|
+
})), /* @__PURE__ */ React$1.createElement("span", {
|
|
524
524
|
className: "recharts-legend-item-text",
|
|
525
525
|
style: { color }
|
|
526
526
|
}, finalValue));
|
|
@@ -535,10 +535,10 @@ var DefaultLegendContent = (outsideProps) => {
|
|
|
535
535
|
margin: 0,
|
|
536
536
|
textAlign: layout === "horizontal" ? align : "left"
|
|
537
537
|
};
|
|
538
|
-
return /* @__PURE__ */ React.createElement("ul", {
|
|
538
|
+
return /* @__PURE__ */ React$1.createElement("ul", {
|
|
539
539
|
className: "recharts-default-legend",
|
|
540
540
|
style: finalStyle
|
|
541
|
-
}, /* @__PURE__ */ React.createElement(Items, _extends$1({}, props, { payload })));
|
|
541
|
+
}, /* @__PURE__ */ React$1.createElement(Items, _extends$1({}, props, { payload })));
|
|
542
542
|
};
|
|
543
543
|
function useLegendPayload() {
|
|
544
544
|
return useAppSelector(selectLegendPayload);
|
|
@@ -621,9 +621,9 @@ function LegendContent(props) {
|
|
|
621
621
|
var { contextPayload } = props, otherProps = _objectWithoutProperties(props, _excluded);
|
|
622
622
|
var finalPayload = getUniqPayload(contextPayload, props.payloadUniqBy, defaultUniqBy);
|
|
623
623
|
var contentProps = _objectSpread(_objectSpread({}, otherProps), {}, { payload: finalPayload });
|
|
624
|
-
if (/* @__PURE__ */ React.isValidElement(props.content)) return /* @__PURE__ */ React.cloneElement(props.content, contentProps);
|
|
625
|
-
if (typeof props.content === "function") return /* @__PURE__ */ React.createElement(props.content, contentProps);
|
|
626
|
-
return /* @__PURE__ */ React.createElement(DefaultLegendContent, contentProps);
|
|
624
|
+
if (/* @__PURE__ */ React$1.isValidElement(props.content)) return /* @__PURE__ */ React$1.cloneElement(props.content, contentProps);
|
|
625
|
+
if (typeof props.content === "function") return /* @__PURE__ */ React$1.createElement(props.content, contentProps);
|
|
626
|
+
return /* @__PURE__ */ React$1.createElement(DefaultLegendContent, contentProps);
|
|
627
627
|
}
|
|
628
628
|
function getDefaultPosition(style, props, margin, chartWidth, chartHeight, box) {
|
|
629
629
|
var { layout, align, verticalAlign } = props;
|
|
@@ -685,19 +685,19 @@ function Legend(outsideProps) {
|
|
|
685
685
|
}, getDefaultPosition(wrapperStyle, props, margin, chartWidth, chartHeight, lastBoundingBox)), wrapperStyle);
|
|
686
686
|
var legendPortal = portalFromProps !== null && portalFromProps !== void 0 ? portalFromProps : legendPortalFromContext;
|
|
687
687
|
if (legendPortal == null || contextPayload == null) return null;
|
|
688
|
-
return /* @__PURE__ */ createPortal(/* @__PURE__ */ React.createElement("div", {
|
|
688
|
+
return /* @__PURE__ */ createPortal(/* @__PURE__ */ React$1.createElement("div", {
|
|
689
689
|
className: "recharts-legend-wrapper",
|
|
690
690
|
style: outerStyle,
|
|
691
691
|
ref: updateBoundingBox
|
|
692
|
-
}, /* @__PURE__ */ React.createElement(LegendSettingsDispatcher, {
|
|
692
|
+
}, /* @__PURE__ */ React$1.createElement(LegendSettingsDispatcher, {
|
|
693
693
|
layout: props.layout,
|
|
694
694
|
align: props.align,
|
|
695
695
|
verticalAlign: props.verticalAlign,
|
|
696
696
|
itemSorter: props.itemSorter
|
|
697
|
-
}), !portalFromProps && /* @__PURE__ */ React.createElement(LegendSizeDispatcher, {
|
|
697
|
+
}), !portalFromProps && /* @__PURE__ */ React$1.createElement(LegendSizeDispatcher, {
|
|
698
698
|
width: lastBoundingBox.width,
|
|
699
699
|
height: lastBoundingBox.height
|
|
700
|
-
}), /* @__PURE__ */ React.createElement(LegendContent, _extends({}, props, widthOrHeight, {
|
|
700
|
+
}), /* @__PURE__ */ React$1.createElement(LegendContent, _extends({}, props, widthOrHeight, {
|
|
701
701
|
margin,
|
|
702
702
|
chartWidth,
|
|
703
703
|
chartHeight,
|
|
@@ -705,14 +705,14 @@ function Legend(outsideProps) {
|
|
|
705
705
|
}))), legendPortal);
|
|
706
706
|
}
|
|
707
707
|
Legend.displayName = "Legend";
|
|
708
|
-
var ChartContext = React.createContext(null);
|
|
708
|
+
var ChartContext = React$1.createContext(null);
|
|
709
709
|
function useChart() {
|
|
710
|
-
const context = React.useContext(ChartContext);
|
|
710
|
+
const context = React$1.useContext(ChartContext);
|
|
711
711
|
if (!context) throw new Error("useChart must be used within a <ChartContainer />");
|
|
712
712
|
return context;
|
|
713
713
|
}
|
|
714
|
-
var ChartContainer = React.forwardRef(({ id, className, children, config, ...props }, ref) => {
|
|
715
|
-
const uniqueId = React.useId();
|
|
714
|
+
var ChartContainer = React$1.forwardRef(({ id, className, children, config, ...props }, ref) => {
|
|
715
|
+
const uniqueId = React$1.useId();
|
|
716
716
|
const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`;
|
|
717
717
|
return /* @__PURE__ */ jsx(ChartContext.Provider, {
|
|
718
718
|
value: { config },
|
|
@@ -750,9 +750,9 @@ ${colorConfig.map(([key, itemConfig]) => {
|
|
|
750
750
|
` } });
|
|
751
751
|
};
|
|
752
752
|
var ChartTooltip = Tooltip;
|
|
753
|
-
var ChartTooltipContent = React.forwardRef(({ active, payload, className, indicator = "dot", hideLabel = false, hideIndicator = false, label, labelFormatter, labelClassName, nameKey, labelKey, valueFormatter }, ref) => {
|
|
753
|
+
var ChartTooltipContent = React$1.forwardRef(({ active, payload, className, indicator = "dot", hideLabel = false, hideIndicator = false, label, labelFormatter, labelClassName, nameKey, labelKey, valueFormatter }, ref) => {
|
|
754
754
|
const { config } = useChart();
|
|
755
|
-
const tooltipLabel = React.useMemo(() => {
|
|
755
|
+
const tooltipLabel = React$1.useMemo(() => {
|
|
756
756
|
if (hideLabel || !payload?.length) return null;
|
|
757
757
|
const [item] = payload;
|
|
758
758
|
const itemConfig = getPayloadConfigFromPayload(config, item, `${labelKey || item?.dataKey || item?.name || "value"}`);
|
|
@@ -818,7 +818,7 @@ var ChartTooltipContent = React.forwardRef(({ active, payload, className, indica
|
|
|
818
818
|
});
|
|
819
819
|
ChartTooltipContent.displayName = "ChartTooltipContent";
|
|
820
820
|
var ChartLegend = Legend;
|
|
821
|
-
var ChartLegendContent = React.forwardRef(({ className, hideIcon = false, payload, verticalAlign = "bottom", nameKey }, ref) => {
|
|
821
|
+
var ChartLegendContent = React$1.forwardRef(({ className, hideIcon = false, payload, verticalAlign = "bottom", nameKey }, ref) => {
|
|
822
822
|
const { config } = useChart();
|
|
823
823
|
if (!payload?.length) return null;
|
|
824
824
|
return /* @__PURE__ */ jsx("div", {
|