shadcn-glass-ui 2.1.5 → 2.2.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/README.md +5 -6
- package/context7.json +2 -2
- package/dist/cli/index.cjs +1 -1
- package/dist/components.cjs +4 -4
- package/dist/components.d.ts +87 -144
- package/dist/components.js +1 -1
- package/dist/hooks.cjs +2 -2
- package/dist/index.cjs +5 -5
- package/dist/index.js +1 -1
- package/dist/r/alert-glass.json +1 -1
- package/dist/r/badge-glass.json +1 -1
- package/dist/r/button-glass.json +1 -1
- package/dist/r/card-glass.json +40 -0
- package/dist/r/input-glass.json +1 -1
- package/dist/r/modal-glass.json +5 -5
- package/dist/r/registry.json +7 -1
- package/dist/r/tooltip-glass.json +1 -1
- package/dist/shadcn-glass-ui.css +1 -1
- package/dist/{theme-context-Y98bGvcm.cjs → theme-context-BEA8K_rq.cjs} +2 -2
- package/dist/{theme-context-Y98bGvcm.cjs.map → theme-context-BEA8K_rq.cjs.map} +1 -1
- package/dist/themes.cjs +1 -1
- package/dist/{trust-score-card-glass-2rjz00d_.cjs → trust-score-card-glass-DTS1RdIt.cjs} +172 -181
- package/dist/trust-score-card-glass-DTS1RdIt.cjs.map +1 -0
- package/dist/{trust-score-card-glass-zjkx4OC2.js → trust-score-card-glass-Dg4_b_g_.js} +158 -167
- package/dist/trust-score-card-glass-Dg4_b_g_.js.map +1 -0
- package/dist/{use-focus-DbpBEuee.cjs → use-focus-CdoUzFQ8.cjs} +2 -2
- package/dist/{use-focus-DbpBEuee.cjs.map → use-focus-CdoUzFQ8.cjs.map} +1 -1
- package/dist/{use-wallpaper-tint-DbawS9zh.cjs → use-wallpaper-tint-Rq5UgY9L.cjs} +2 -2
- package/dist/{use-wallpaper-tint-DbawS9zh.cjs.map → use-wallpaper-tint-Rq5UgY9L.cjs.map} +1 -1
- package/dist/{utils-XlyXIhuP.cjs → utils-NLnOCttr.cjs} +2 -2
- package/dist/{utils-XlyXIhuP.cjs.map → utils-NLnOCttr.cjs.map} +1 -1
- package/dist/utils.cjs +1 -1
- package/docs/ADVANCED_PATTERNS.md +7 -5
- package/docs/AI_USAGE.md +0 -1
- package/docs/BEST_PRACTICES.md +0 -2
- package/docs/BREAKING_CHANGES.md +0 -1
- package/docs/COMPONENTS_CATALOG.md +1 -4
- package/docs/COMPONENT_PATTERNS.md +325 -0
- package/docs/GETTING_STARTED.md +52 -28
- package/docs/api/README.md +0 -2
- package/docs/api/variables/ModalGlass.md +5 -4
- package/package.json +1 -1
- package/dist/trust-score-card-glass-2rjz00d_.cjs.map +0 -1
- package/dist/trust-score-card-glass-zjkx4OC2.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_trust_score_card_glass = require("./trust-score-card-glass-
|
|
1
|
+
const require_trust_score_card_glass = require("./trust-score-card-glass-DTS1RdIt.cjs");
|
|
2
2
|
let react = require("react");
|
|
3
3
|
let lucide_react = require("lucide-react");
|
|
4
4
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -99,4 +99,4 @@ Object.defineProperty(exports, "useTheme", {
|
|
|
99
99
|
}
|
|
100
100
|
});
|
|
101
101
|
|
|
102
|
-
//# sourceMappingURL=theme-context-
|
|
102
|
+
//# sourceMappingURL=theme-context-BEA8K_rq.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme-context-
|
|
1
|
+
{"version":3,"file":"theme-context-BEA8K_rq.cjs","names":["THEMES: readonly Theme[]","THEME_CONFIG: Record<Theme, ThemeConfig>","DEFAULT_THEME: Theme","value: ThemeContextValue"],"sources":["../src/lib/theme-context.tsx"],"sourcesContent":["/**\n * Theme System for Glass UI Components\n *\n * Multi-theme support with CSS variables for glass, light, and aurora themes.\n * Provides ThemeProvider context and useTheme hook for theme management.\n *\n * @module theme-context\n *\n * @example\n * ```tsx\n * // Wrap your app with ThemeProvider\n * import { ThemeProvider } from 'shadcn-glass-ui';\n *\n * function App() {\n * return (\n * <ThemeProvider defaultTheme=\"glass\">\n * <YourApp />\n * </ThemeProvider>\n * );\n * }\n * ```\n *\n * @example\n * ```tsx\n * // Use the theme hook in components\n * import { useTheme } from 'shadcn-glass-ui';\n *\n * function ThemeSwitcher() {\n * const { theme, setTheme, cycleTheme } = useTheme();\n *\n * return (\n * <div>\n * <p>Current theme: {theme}</p>\n * <button onClick={cycleTheme}>Cycle Theme</button>\n * <button onClick={() => setTheme('glass')}>Set Glass</button>\n * </div>\n * );\n * }\n * ```\n *\n * @see {@link docs/THEME_CREATION_GUIDE.md} for creating custom themes\n * @see {@link docs/TOKEN_ARCHITECTURE.md} for CSS variable system\n */\n\nimport { createContext, useContext, useState, useEffect, useCallback, type ReactNode } from 'react';\nimport { Sun, Moon, Palette, type LucideIcon } from 'lucide-react';\n\n// ========================================\n// TYPES\n// ========================================\n\n/**\n * Available theme options for Glass UI components.\n * - `light` - Light theme with subtle glass effects\n * - `aurora` - Gradient theme with aurora/northern lights effects\n * - `glass` - Dark glassmorphism theme (default)\n */\nexport type Theme = 'light' | 'aurora' | 'glass';\n\n/** @deprecated Use Theme instead */\nexport type ThemeName = Theme;\n\n/**\n * Configuration for a single theme including display label and icon.\n */\nexport interface ThemeConfig {\n /** Human-readable theme name for UI display */\n readonly label: string;\n /** Lucide icon component for theme toggle buttons */\n readonly icon: LucideIcon;\n}\n\n/**\n * Context value returned by useTheme hook.\n */\nexport interface ThemeContextValue {\n /** Current active theme */\n readonly theme: Theme;\n /** Set a specific theme */\n readonly setTheme: (theme: Theme) => void;\n /** Cycle to next theme in order: light → aurora → glass → light */\n readonly cycleTheme: () => void;\n}\n\n// ========================================\n// CONSTANTS\n// ========================================\n\n/** Array of all available themes in cycle order */\nexport const THEMES: readonly Theme[] = ['light', 'aurora', 'glass'] as const;\n\n/**\n * Theme configuration map with labels and icons.\n * Used by ThemeToggleGlass and other theme switching components.\n */\n// eslint-disable-next-line react-refresh/only-export-components\nexport const THEME_CONFIG: Record<Theme, ThemeConfig> = {\n light: { label: 'Light', icon: Sun },\n aurora: { label: 'Aurora', icon: Moon },\n glass: { label: 'Glass', icon: Palette },\n} as const;\n\nconst STORAGE_KEY = 'glass-ui-theme';\nconst DEFAULT_THEME: Theme = 'glass';\n\n// ========================================\n// CONTEXT\n// ========================================\n\nconst ThemeContext = createContext<ThemeContextValue | null>(null);\n\n// ========================================\n// PROVIDER\n// ========================================\n\ninterface ThemeProviderProps {\n /** Child components to wrap with theme context */\n readonly children: ReactNode;\n /** Initial theme to use (default: \"glass\") */\n readonly defaultTheme?: Theme;\n /** localStorage key for persistence (default: \"glass-ui-theme\") */\n readonly storageKey?: string;\n}\n\n/**\n * Theme provider component that manages theme state and persistence.\n *\n * Wraps your application to provide theme context to all child components.\n * Theme is automatically persisted to localStorage and applied to document.\n *\n * @param props - Provider configuration\n * @param props.children - Child components to wrap\n * @param props.defaultTheme - Initial theme (default: \"glass\")\n * @param props.storageKey - localStorage key (default: \"glass-ui-theme\")\n *\n * @example\n * ```tsx\n * <ThemeProvider defaultTheme=\"glass\">\n * <App />\n * </ThemeProvider>\n * ```\n */\nexport function ThemeProvider({\n children,\n defaultTheme = DEFAULT_THEME,\n storageKey = STORAGE_KEY,\n}: ThemeProviderProps) {\n const [theme, setThemeState] = useState<Theme>(() => {\n if (typeof window === 'undefined') {\n return defaultTheme;\n }\n\n const stored = localStorage.getItem(storageKey);\n if (stored && THEMES.includes(stored as Theme)) {\n return stored as Theme;\n }\n\n return defaultTheme;\n });\n\n // Apply theme to document\n useEffect(() => {\n const root = document.documentElement;\n root.setAttribute('data-theme', theme);\n localStorage.setItem(storageKey, theme);\n }, [theme, storageKey]);\n\n const setTheme = useCallback((newTheme: Theme) => {\n if (THEMES.includes(newTheme)) {\n setThemeState(newTheme);\n }\n }, []);\n\n const cycleTheme = useCallback(() => {\n setThemeState((current) => {\n const currentIndex = THEMES.indexOf(current);\n const nextIndex = (currentIndex + 1) % THEMES.length;\n return THEMES[nextIndex];\n });\n }, []);\n\n const value: ThemeContextValue = {\n theme,\n setTheme,\n cycleTheme,\n };\n\n return <ThemeContext.Provider value={value}>{children}</ThemeContext.Provider>;\n}\n\n// ========================================\n// HOOK\n// ========================================\n\n/**\n * Hook to access theme context values.\n *\n * Must be used within a ThemeProvider. Returns the current theme,\n * a setter function, and a cycle function.\n *\n * @returns Theme context value with theme, setTheme, and cycleTheme\n * @throws Error if used outside of ThemeProvider\n *\n * @example\n * ```tsx\n * function MyComponent() {\n * const { theme, setTheme, cycleTheme } = useTheme();\n *\n * return (\n * <button onClick={cycleTheme}>\n * Current: {theme}\n * </button>\n * );\n * }\n * ```\n */\n// eslint-disable-next-line react-refresh/only-export-components\nexport function useTheme(): ThemeContextValue {\n const context = useContext(ThemeContext);\n\n if (!context) {\n throw new Error('useTheme must be used within a ThemeProvider');\n }\n\n return context;\n}\n\n// ========================================\n// UTILITIES\n// ========================================\n\n/**\n * Get the next theme in the cycle order.\n *\n * @param current - Current theme\n * @returns Next theme in cycle (light → aurora → glass → light)\n *\n * @example\n * ```tsx\n * const next = getNextTheme('glass'); // returns 'light'\n * ```\n */\n// eslint-disable-next-line react-refresh/only-export-components\nexport function getNextTheme(current: Theme): Theme {\n const currentIndex = THEMES.indexOf(current);\n const nextIndex = (currentIndex + 1) % THEMES.length;\n return THEMES[nextIndex];\n}\n\n/**\n * Get configuration for a specific theme.\n *\n * @param theme - Theme to get configuration for\n * @returns Theme configuration with label and icon\n *\n * @example\n * ```tsx\n * const config = getThemeConfig('glass');\n * // { label: 'Glass', icon: Palette }\n * ```\n */\n// eslint-disable-next-line react-refresh/only-export-components\nexport function getThemeConfig(theme: Theme): ThemeConfig {\n return THEME_CONFIG[theme];\n}\n"],"mappings":";;;;AAyFA,MAAaA,SAA2B;CAAC;CAAS;CAAU;CAAQ;AAOpE,MAAaC,eAA2C;CACtD,OAAO;EAAE,OAAO;EAAS,MAAM,aAAA;EAAK;CACpC,QAAQ;EAAE,OAAO;EAAU,MAAM,aAAA;EAAM;CACvC,OAAO;EAAE,OAAO;EAAS,MAAM,aAAA;EAAS;CACzC;AAED,IAAM,cAAc;AACpB,IAAMC,gBAAuB;AAM7B,IAAM,gBAAA,GAAA,MAAA,eAAuD,KAAK;AAiClE,SAAgB,cAAc,EAC5B,UACA,eAAe,eACf,aAAa,eACQ;CACrB,MAAM,CAAC,OAAO,kBAAA,GAAA,MAAA,gBAAuC;AACnD,MAAI,OAAO,WAAW,YACpB,QAAO;EAGT,MAAM,SAAS,aAAa,QAAQ,WAAW;AAC/C,MAAI,UAAU,OAAO,SAAS,OAAgB,CAC5C,QAAO;AAGT,SAAO;GACP;AAGF,EAAA,GAAA,MAAA,iBAAgB;AACD,WAAS,gBACjB,aAAa,cAAc,MAAM;AACtC,eAAa,QAAQ,YAAY,MAAM;IACtC,CAAC,OAAO,WAAW,CAAC;CAgBvB,MAAMC,QAA2B;EAC/B;EACA,WAAA,GAAA,MAAA,cAhB4B,aAAoB;AAChD,OAAI,OAAO,SAAS,SAAS,CAC3B,eAAc,SAAS;KAExB,EAAE,CAAC;EAaJ,aAAA,GAAA,MAAA,mBAXmC;AACnC,kBAAe,YAAY;AAGzB,WAAO,QAFc,OAAO,QAAQ,QAAQ,GACV,KAAK,OAAO;KAE9C;KACD,EAAE,CAAC;EAML;AAED,QAAO,iBAAA,GAAA,kBAAA,KAAC,aAAa,UAAA;EAAgB;EAAQ;GAAiC;;AA8BhF,SAAgB,WAA8B;CAC5C,MAAM,WAAA,GAAA,MAAA,YAAqB,aAAa;AAExC,KAAI,CAAC,QACH,OAAM,IAAI,MAAM,+CAA+C;AAGjE,QAAO;;AAmBT,SAAgB,aAAa,SAAuB;AAGlD,QAAO,QAFc,OAAO,QAAQ,QAAQ,GACV,KAAK,OAAO;;AAiBhD,SAAgB,eAAe,OAA2B;AACxD,QAAO,aAAa"}
|
package/dist/themes.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_theme_context = require("./theme-context-
|
|
1
|
+
const require_theme_context = require("./theme-context-BEA8K_rq.cjs");
|
|
2
2
|
exports.THEMES = require_theme_context.THEMES;
|
|
3
3
|
exports.THEME_CONFIG = require_theme_context.THEME_CONFIG;
|
|
4
4
|
exports.ThemeProvider = require_theme_context.ThemeProvider;
|
|
@@ -27,9 +27,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
value: mod,
|
|
28
28
|
enumerable: true
|
|
29
29
|
}) : target, mod));
|
|
30
|
-
const require_utils = require("./utils-
|
|
31
|
-
const require_use_focus = require("./use-focus-
|
|
32
|
-
const require_theme_context = require("./theme-context-
|
|
30
|
+
const require_utils = require("./utils-NLnOCttr.cjs");
|
|
31
|
+
const require_use_focus = require("./use-focus-CdoUzFQ8.cjs");
|
|
32
|
+
const require_theme_context = require("./theme-context-BEA8K_rq.cjs");
|
|
33
33
|
let react = require("react");
|
|
34
34
|
react = __toESM(react);
|
|
35
35
|
let lucide_react = require("lucide-react");
|
|
@@ -184,6 +184,7 @@ var AlertGlassRoot = (0, react.forwardRef)(({ className, variant = "default", di
|
|
|
184
184
|
const config = variantStyles$2[effectiveVariant];
|
|
185
185
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
186
186
|
ref,
|
|
187
|
+
"data-slot": "alert",
|
|
187
188
|
className: require_utils.cn(alertVariants({ variant: effectiveVariant }), className),
|
|
188
189
|
style: getAlertStyles(effectiveVariant),
|
|
189
190
|
role: "alert",
|
|
@@ -212,8 +213,9 @@ var AlertGlassRoot = (0, react.forwardRef)(({ className, variant = "default", di
|
|
|
212
213
|
});
|
|
213
214
|
AlertGlassRoot.displayName = "AlertGlass";
|
|
214
215
|
var AlertGlassTitle = (0, react.forwardRef)(({ className, style, ...props }, ref) => {
|
|
215
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("
|
|
216
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
216
217
|
ref,
|
|
218
|
+
"data-slot": "alert-title",
|
|
217
219
|
className: require_utils.cn("font-medium text-xs md:text-sm mb-0.5 md:mb-1", className),
|
|
218
220
|
style: {
|
|
219
221
|
color: "inherit",
|
|
@@ -224,8 +226,9 @@ var AlertGlassTitle = (0, react.forwardRef)(({ className, style, ...props }, ref
|
|
|
224
226
|
});
|
|
225
227
|
AlertGlassTitle.displayName = "AlertGlassTitle";
|
|
226
228
|
var AlertGlassDescription = (0, react.forwardRef)(({ className, style, ...props }, ref) => {
|
|
227
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("
|
|
229
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
228
230
|
ref,
|
|
231
|
+
"data-slot": "alert-description",
|
|
229
232
|
className: require_utils.cn("text-xs md:text-sm opacity-80", className),
|
|
230
233
|
style: {
|
|
231
234
|
color: "inherit",
|
|
@@ -399,6 +402,7 @@ const BadgeGlass = (0, react.forwardRef)(({ children, className, variant = "defa
|
|
|
399
402
|
const v$1 = variantStyles$1[variant];
|
|
400
403
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
401
404
|
ref,
|
|
405
|
+
"data-slot": "badge",
|
|
402
406
|
className: require_utils.cn(badgeVariants({ size: size$3 }), className),
|
|
403
407
|
style: getBadgeStyles(variant),
|
|
404
408
|
...props,
|
|
@@ -507,6 +511,7 @@ const ButtonGlass = (0, react.forwardRef)(({ asChild = false, className, variant
|
|
|
507
511
|
}, [isDisabled, onClick]);
|
|
508
512
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(asChild ? __radix_ui_react_slot.Slot : "button", {
|
|
509
513
|
ref,
|
|
514
|
+
"data-slot": "button",
|
|
510
515
|
className: require_utils.cn(buttonGlassVariants({
|
|
511
516
|
variant,
|
|
512
517
|
size: size$3
|
|
@@ -5313,6 +5318,7 @@ const InputGlass = (0, react.forwardRef)(({ className, size: size$3, inputSize,
|
|
|
5313
5318
|
}),
|
|
5314
5319
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
5315
5320
|
ref,
|
|
5321
|
+
"data-slot": "input",
|
|
5316
5322
|
className: require_utils.cn(inputVariants({ size: sizeValue }), paddingLeft, paddingRight),
|
|
5317
5323
|
style: getInputStyles(isFocused, error, success),
|
|
5318
5324
|
disabled,
|
|
@@ -5329,178 +5335,142 @@ const InputGlass = (0, react.forwardRef)(({ className, size: size$3, inputSize,
|
|
|
5329
5335
|
});
|
|
5330
5336
|
});
|
|
5331
5337
|
InputGlass.displayName = "InputGlass";
|
|
5332
|
-
const modalSizes = (0, class_variance_authority.cva)("relative w-full rounded-2xl p-6 transition-all duration-300", {
|
|
5338
|
+
const modalSizes = (0, class_variance_authority.cva)("relative w-full max-w-[calc(100%-2rem)] rounded-2xl p-6 transition-all duration-300", {
|
|
5333
5339
|
variants: { size: {
|
|
5334
|
-
sm: "max-w-[480px]",
|
|
5335
|
-
md: "max-w-[640px]",
|
|
5336
|
-
lg: "max-w-[800px]",
|
|
5337
|
-
xl: "max-w-xl",
|
|
5338
|
-
full: "max-w-4xl"
|
|
5340
|
+
sm: "sm:max-w-[480px]",
|
|
5341
|
+
md: "sm:max-w-[640px]",
|
|
5342
|
+
lg: "sm:max-w-[800px]",
|
|
5343
|
+
xl: "sm:max-w-xl",
|
|
5344
|
+
full: "sm:max-w-4xl"
|
|
5339
5345
|
} },
|
|
5340
|
-
defaultVariants: { size: "
|
|
5346
|
+
defaultVariants: { size: "sm" }
|
|
5341
5347
|
});
|
|
5342
|
-
var
|
|
5343
|
-
var
|
|
5344
|
-
|
|
5345
|
-
document.body.style.overflow = "hidden";
|
|
5346
|
-
};
|
|
5347
|
-
var unlockBodyScroll = () => {
|
|
5348
|
-
if (typeof document === "undefined") return;
|
|
5349
|
-
document.body.style.overflow = "";
|
|
5350
|
-
};
|
|
5351
|
-
var delay = (ms) => {
|
|
5352
|
-
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
5353
|
-
};
|
|
5354
|
-
var ModalContext = (0, react.createContext)(null);
|
|
5355
|
-
var useModalContext = () => {
|
|
5356
|
-
const context = (0, react.useContext)(ModalContext);
|
|
5357
|
-
if (!context) throw new Error("Modal compound components must be used within ModalGlass.Root");
|
|
5358
|
-
return context;
|
|
5359
|
-
};
|
|
5360
|
-
var ModalRoot = ({ open, onOpenChange, size: size$3 = "md", children, ...props }) => {
|
|
5361
|
-
const [isClosing, setIsClosing] = (0, react.useState)(false);
|
|
5362
|
-
const handleClose = (0, react.useCallback)(async () => {
|
|
5363
|
-
setIsClosing(true);
|
|
5364
|
-
await delay(MODAL_ANIMATION_DURATION);
|
|
5365
|
-
setIsClosing(false);
|
|
5366
|
-
onOpenChange?.(false);
|
|
5367
|
-
}, [onOpenChange]);
|
|
5368
|
-
(0, react.useEffect)(() => {
|
|
5369
|
-
if (open) lockBodyScroll();
|
|
5370
|
-
else unlockBodyScroll();
|
|
5371
|
-
return () => {
|
|
5372
|
-
unlockBodyScroll();
|
|
5373
|
-
};
|
|
5374
|
-
}, [open]);
|
|
5375
|
-
(0, react.useEffect)(() => {
|
|
5376
|
-
if (!open) return;
|
|
5377
|
-
const handleEscape = (event) => {
|
|
5378
|
-
if (event.key === "Escape") handleClose();
|
|
5379
|
-
};
|
|
5380
|
-
document.addEventListener("keydown", handleEscape);
|
|
5381
|
-
return () => {
|
|
5382
|
-
document.removeEventListener("keydown", handleEscape);
|
|
5383
|
-
};
|
|
5384
|
-
}, [open, handleClose]);
|
|
5385
|
-
if (!open) return null;
|
|
5348
|
+
var ModalContext = react.createContext({ size: "sm" });
|
|
5349
|
+
var useModalContext = () => react.useContext(ModalContext);
|
|
5350
|
+
function ModalRoot({ size: size$3 = "sm", children, ...props }) {
|
|
5386
5351
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ModalContext.Provider, {
|
|
5387
|
-
value: {
|
|
5388
|
-
|
|
5389
|
-
|
|
5390
|
-
size: size$3,
|
|
5391
|
-
isClosing
|
|
5392
|
-
},
|
|
5393
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
5394
|
-
className: "fixed inset-0 z-50 flex items-center justify-center p-2 sm:p-4",
|
|
5395
|
-
role: "dialog",
|
|
5396
|
-
"aria-modal": "true",
|
|
5397
|
-
"aria-labelledby": "modal-title",
|
|
5398
|
-
"aria-describedby": "modal-description",
|
|
5352
|
+
value: { size: size$3 },
|
|
5353
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dialog.Root, {
|
|
5354
|
+
"data-slot": "dialog",
|
|
5399
5355
|
...props,
|
|
5400
5356
|
children
|
|
5401
5357
|
})
|
|
5402
5358
|
});
|
|
5403
|
-
}
|
|
5404
|
-
|
|
5405
|
-
|
|
5406
|
-
|
|
5359
|
+
}
|
|
5360
|
+
function ModalTrigger({ ...props }) {
|
|
5361
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dialog.Trigger, {
|
|
5362
|
+
"data-slot": "dialog-trigger",
|
|
5363
|
+
...props
|
|
5364
|
+
});
|
|
5365
|
+
}
|
|
5366
|
+
function ModalPortal({ ...props }) {
|
|
5367
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dialog.Portal, {
|
|
5368
|
+
"data-slot": "dialog-portal",
|
|
5369
|
+
...props
|
|
5370
|
+
});
|
|
5371
|
+
}
|
|
5372
|
+
var ModalOverlay = react.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dialog.Overlay, {
|
|
5373
|
+
ref,
|
|
5374
|
+
"data-slot": "dialog-overlay",
|
|
5375
|
+
className: require_utils.cn("fixed inset-0 z-50", "data-[state=open]:animate-in data-[state=closed]:animate-out", "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", className),
|
|
5376
|
+
style: {
|
|
5407
5377
|
background: "var(--modal-overlay)",
|
|
5408
5378
|
backdropFilter: "blur(var(--blur-sm))",
|
|
5409
|
-
WebkitBackdropFilter: "blur(var(--blur-sm))"
|
|
5410
|
-
|
|
5411
|
-
|
|
5412
|
-
|
|
5413
|
-
|
|
5414
|
-
|
|
5415
|
-
|
|
5416
|
-
|
|
5417
|
-
|
|
5418
|
-
});
|
|
5419
|
-
};
|
|
5420
|
-
var ModalContent = (0, react.forwardRef)(({ children, className }, ref) => {
|
|
5421
|
-
const { size: size$3, isClosing } = useModalContext();
|
|
5422
|
-
const modalStyles = (0, react.useMemo)(() => ({
|
|
5423
|
-
background: "var(--modal-bg)",
|
|
5424
|
-
border: "1px solid var(--modal-border)",
|
|
5425
|
-
boxShadow: "var(--modal-glow)",
|
|
5426
|
-
backdropFilter: "blur(var(--blur-lg))",
|
|
5427
|
-
WebkitBackdropFilter: "blur(var(--blur-lg))",
|
|
5428
|
-
transform: isClosing ? "scale(0.95) translateY(10px)" : "scale(1) translateY(0)",
|
|
5429
|
-
opacity: isClosing ? 0 : 1,
|
|
5430
|
-
animation: !isClosing ? "modalFadeIn 0.3s ease-out" : "none"
|
|
5431
|
-
}), [isClosing]);
|
|
5432
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5379
|
+
WebkitBackdropFilter: "blur(var(--blur-sm))"
|
|
5380
|
+
},
|
|
5381
|
+
...props
|
|
5382
|
+
}));
|
|
5383
|
+
ModalOverlay.displayName = "ModalOverlay";
|
|
5384
|
+
var ModalContent = react.forwardRef(({ className, children, showCloseButton = true, size: sizeProp, ...props }, ref) => {
|
|
5385
|
+
const { size: contextSize } = useModalContext();
|
|
5386
|
+
const size$3 = sizeProp ?? contextSize;
|
|
5387
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(ModalPortal, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ModalOverlay, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__radix_ui_react_dialog.Content, {
|
|
5433
5388
|
ref,
|
|
5434
|
-
|
|
5435
|
-
|
|
5436
|
-
|
|
5437
|
-
|
|
5438
|
-
|
|
5439
|
-
|
|
5440
|
-
|
|
5389
|
+
"data-slot": "dialog-content",
|
|
5390
|
+
className: require_utils.cn(modalSizes({ size: size$3 }), "fixed top-[50%] left-[50%] z-50", "translate-x-[-50%] translate-y-[-50%]", "data-[state=open]:animate-in data-[state=closed]:animate-out", "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", "data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95", "data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%]", "data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]", "duration-200", className),
|
|
5391
|
+
style: {
|
|
5392
|
+
background: "var(--modal-bg)",
|
|
5393
|
+
border: "1px solid var(--modal-border)",
|
|
5394
|
+
boxShadow: "var(--modal-glow)",
|
|
5395
|
+
backdropFilter: "blur(var(--blur-lg))",
|
|
5396
|
+
WebkitBackdropFilter: "blur(var(--blur-lg))"
|
|
5397
|
+
},
|
|
5398
|
+
...props,
|
|
5399
|
+
children: [
|
|
5400
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
5401
|
+
className: "absolute inset-0 rounded-3xl pointer-events-none",
|
|
5402
|
+
style: { background: "var(--modal-glow-effect)" },
|
|
5403
|
+
"aria-hidden": "true"
|
|
5404
|
+
}),
|
|
5405
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
5406
|
+
className: "relative",
|
|
5407
|
+
children
|
|
5408
|
+
}),
|
|
5409
|
+
showCloseButton && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__radix_ui_react_dialog.Close, {
|
|
5410
|
+
"data-slot": "dialog-close",
|
|
5411
|
+
className: require_utils.cn("absolute top-4 right-4", "p-1.5 md:p-2 rounded-xl", "transition-all duration-300", "ring-offset-background", "focus:outline-none focus:ring-2 focus:ring-(--semantic-primary) focus:ring-offset-2", "hover:opacity-100 opacity-70", "disabled:pointer-events-none"),
|
|
5412
|
+
style: {
|
|
5413
|
+
background: "var(--modal-close-btn-bg)",
|
|
5414
|
+
border: "var(--modal-close-btn-border)",
|
|
5415
|
+
color: "var(--text-muted)"
|
|
5416
|
+
},
|
|
5417
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.X, { className: ICON_SIZES.md }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5418
|
+
className: "sr-only",
|
|
5419
|
+
children: "Close"
|
|
5420
|
+
})]
|
|
5421
|
+
})
|
|
5422
|
+
]
|
|
5423
|
+
})] });
|
|
5441
5424
|
});
|
|
5442
5425
|
ModalContent.displayName = "ModalContent";
|
|
5443
|
-
|
|
5426
|
+
function ModalHeader({ className, ...props }) {
|
|
5444
5427
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
5445
|
-
|
|
5446
|
-
|
|
5428
|
+
"data-slot": "dialog-header",
|
|
5429
|
+
className: require_utils.cn("flex flex-col gap-2 text-center sm:text-left mb-4", className),
|
|
5430
|
+
...props
|
|
5447
5431
|
});
|
|
5448
|
-
}
|
|
5449
|
-
|
|
5432
|
+
}
|
|
5433
|
+
function ModalBody({ className, ...props }) {
|
|
5450
5434
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
5435
|
+
"data-slot": "dialog-body",
|
|
5451
5436
|
className: require_utils.cn("relative", className),
|
|
5452
5437
|
style: { color: "var(--text-secondary)" },
|
|
5453
|
-
|
|
5438
|
+
...props
|
|
5454
5439
|
});
|
|
5455
|
-
}
|
|
5456
|
-
|
|
5440
|
+
}
|
|
5441
|
+
function ModalFooter({ className, ...props }) {
|
|
5457
5442
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
5458
|
-
|
|
5459
|
-
|
|
5460
|
-
|
|
5461
|
-
};
|
|
5462
|
-
var ModalTitle = ({ children, className }) => {
|
|
5463
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", {
|
|
5464
|
-
id: "modal-title",
|
|
5465
|
-
className: require_utils.cn("text-lg md:text-xl font-semibold", className),
|
|
5466
|
-
style: { color: "var(--text-primary)" },
|
|
5467
|
-
children
|
|
5468
|
-
});
|
|
5469
|
-
};
|
|
5470
|
-
var ModalDescription = ({ children, className }) => {
|
|
5471
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
5472
|
-
id: "modal-description",
|
|
5473
|
-
className: require_utils.cn("text-sm md:text-base mt-1", className),
|
|
5474
|
-
style: { color: "var(--text-muted)" },
|
|
5475
|
-
children
|
|
5443
|
+
"data-slot": "dialog-footer",
|
|
5444
|
+
className: require_utils.cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end mt-4", className),
|
|
5445
|
+
...props
|
|
5476
5446
|
});
|
|
5477
|
-
}
|
|
5478
|
-
var
|
|
5479
|
-
|
|
5480
|
-
|
|
5481
|
-
|
|
5482
|
-
|
|
5483
|
-
|
|
5484
|
-
|
|
5485
|
-
|
|
5486
|
-
|
|
5487
|
-
|
|
5488
|
-
|
|
5489
|
-
|
|
5490
|
-
|
|
5491
|
-
|
|
5492
|
-
|
|
5493
|
-
|
|
5494
|
-
|
|
5495
|
-
|
|
5496
|
-
|
|
5497
|
-
|
|
5498
|
-
"aria-label": "Close modal",
|
|
5499
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.X, { className: ICON_SIZES.md })
|
|
5447
|
+
}
|
|
5448
|
+
var ModalTitle = react.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dialog.Title, {
|
|
5449
|
+
ref,
|
|
5450
|
+
"data-slot": "dialog-title",
|
|
5451
|
+
className: require_utils.cn("text-lg md:text-xl font-semibold leading-none tracking-tight", className),
|
|
5452
|
+
style: { color: "var(--text-primary)" },
|
|
5453
|
+
...props
|
|
5454
|
+
}));
|
|
5455
|
+
ModalTitle.displayName = "ModalTitle";
|
|
5456
|
+
var ModalDescription = react.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dialog.Description, {
|
|
5457
|
+
ref,
|
|
5458
|
+
"data-slot": "dialog-description",
|
|
5459
|
+
className: require_utils.cn("text-sm", className),
|
|
5460
|
+
style: { color: "var(--text-muted)" },
|
|
5461
|
+
...props
|
|
5462
|
+
}));
|
|
5463
|
+
ModalDescription.displayName = "ModalDescription";
|
|
5464
|
+
function ModalClose({ ...props }) {
|
|
5465
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dialog.Close, {
|
|
5466
|
+
"data-slot": "dialog-close",
|
|
5467
|
+
...props
|
|
5500
5468
|
});
|
|
5501
|
-
}
|
|
5469
|
+
}
|
|
5502
5470
|
const ModalGlass = {
|
|
5503
5471
|
Root: ModalRoot,
|
|
5472
|
+
Trigger: ModalTrigger,
|
|
5473
|
+
Portal: ModalPortal,
|
|
5504
5474
|
Overlay: ModalOverlay,
|
|
5505
5475
|
Content: ModalContent,
|
|
5506
5476
|
Header: ModalHeader,
|
|
@@ -6642,26 +6612,47 @@ const ToggleGlass = (0, react.forwardRef)(({ className, size: size$3 = "default"
|
|
|
6642
6612
|
ToggleGlass.displayName = "ToggleGlass";
|
|
6643
6613
|
var TooltipGlassProvider = ({ delayDuration = 0, ...props }) => {
|
|
6644
6614
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_tooltip.Provider, {
|
|
6615
|
+
"data-slot": "tooltip-provider",
|
|
6645
6616
|
delayDuration,
|
|
6646
6617
|
...props
|
|
6647
6618
|
});
|
|
6648
6619
|
};
|
|
6649
|
-
|
|
6650
|
-
|
|
6651
|
-
|
|
6652
|
-
|
|
6620
|
+
TooltipGlassProvider.displayName = "TooltipGlassProvider";
|
|
6621
|
+
function TooltipGlassRoot({ ...props }) {
|
|
6622
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TooltipGlassProvider, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_tooltip.Root, {
|
|
6623
|
+
"data-slot": "tooltip",
|
|
6624
|
+
...props
|
|
6625
|
+
}) });
|
|
6626
|
+
}
|
|
6627
|
+
var TooltipGlassTrigger = react.forwardRef(({ ...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_tooltip.Trigger, {
|
|
6628
|
+
ref,
|
|
6629
|
+
"data-slot": "tooltip-trigger",
|
|
6630
|
+
...props
|
|
6631
|
+
}));
|
|
6632
|
+
TooltipGlassTrigger.displayName = "TooltipGlassTrigger";
|
|
6633
|
+
var TooltipGlassContent = react.forwardRef(({ className, sideOffset = 0, children, ...props }, ref) => {
|
|
6634
|
+
const tooltipStyles = {
|
|
6635
|
+
background: "var(--tooltip-bg)",
|
|
6636
|
+
color: "var(--tooltip-text)",
|
|
6637
|
+
border: "1px solid var(--tooltip-border)",
|
|
6638
|
+
boxShadow: "var(--tooltip-shadow)",
|
|
6639
|
+
backdropFilter: "blur(var(--blur-xl))",
|
|
6640
|
+
WebkitBackdropFilter: "blur(var(--blur-xl))"
|
|
6641
|
+
};
|
|
6642
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_tooltip.Portal, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__radix_ui_react_tooltip.Content, {
|
|
6653
6643
|
ref,
|
|
6654
6644
|
sideOffset,
|
|
6655
|
-
|
|
6656
|
-
|
|
6657
|
-
|
|
6658
|
-
|
|
6659
|
-
|
|
6660
|
-
|
|
6661
|
-
|
|
6662
|
-
|
|
6663
|
-
|
|
6664
|
-
|
|
6645
|
+
"data-slot": "tooltip-content",
|
|
6646
|
+
className: require_utils.cn("z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance", "animate-in fade-in-0 zoom-in-95", "data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95", "data-[side=bottom]:slide-in-from-top-2", "data-[side=left]:slide-in-from-right-2", "data-[side=right]:slide-in-from-left-2", "data-[side=top]:slide-in-from-bottom-2", className),
|
|
6647
|
+
style: tooltipStyles,
|
|
6648
|
+
...props,
|
|
6649
|
+
children: [children, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_tooltip.Arrow, {
|
|
6650
|
+
className: "z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-xs",
|
|
6651
|
+
style: {
|
|
6652
|
+
fill: "var(--tooltip-bg)",
|
|
6653
|
+
background: "var(--tooltip-bg)"
|
|
6654
|
+
}
|
|
6655
|
+
})]
|
|
6665
6656
|
}) });
|
|
6666
6657
|
});
|
|
6667
6658
|
TooltipGlassContent.displayName = "TooltipGlassContent";
|
|
@@ -9932,13 +9923,13 @@ var require_use_sync_external_store_shim_development = /* @__PURE__ */ __commonJ
|
|
|
9932
9923
|
return x$2 === y$2 && (0 !== x$2 || 1 / x$2 === 1 / y$2) || x$2 !== x$2 && y$2 !== y$2;
|
|
9933
9924
|
}
|
|
9934
9925
|
function useSyncExternalStore$2$1(subscribe, getSnapshot) {
|
|
9935
|
-
didWarnOld18Alpha || void 0 === React$
|
|
9926
|
+
didWarnOld18Alpha || void 0 === React$4.startTransition || (didWarnOld18Alpha = !0, console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));
|
|
9936
9927
|
var value = getSnapshot();
|
|
9937
9928
|
if (!didWarnUncachedGetSnapshot) {
|
|
9938
9929
|
var cachedValue = getSnapshot();
|
|
9939
9930
|
objectIs$3(value, cachedValue) || (console.error("The result of getSnapshot should be cached to avoid an infinite loop"), didWarnUncachedGetSnapshot = !0);
|
|
9940
9931
|
}
|
|
9941
|
-
cachedValue = useState$
|
|
9932
|
+
cachedValue = useState$19({ inst: {
|
|
9942
9933
|
value,
|
|
9943
9934
|
getSnapshot
|
|
9944
9935
|
} });
|
|
@@ -9952,7 +9943,7 @@ var require_use_sync_external_store_shim_development = /* @__PURE__ */ __commonJ
|
|
|
9952
9943
|
value,
|
|
9953
9944
|
getSnapshot
|
|
9954
9945
|
]);
|
|
9955
|
-
useEffect$
|
|
9946
|
+
useEffect$17(function() {
|
|
9956
9947
|
checkIfSnapshotChanged$1(inst) && forceUpdate({ inst });
|
|
9957
9948
|
return subscribe(function() {
|
|
9958
9949
|
checkIfSnapshotChanged$1(inst) && forceUpdate({ inst });
|
|
@@ -9975,8 +9966,8 @@ var require_use_sync_external_store_shim_development = /* @__PURE__ */ __commonJ
|
|
|
9975
9966
|
return getSnapshot();
|
|
9976
9967
|
}
|
|
9977
9968
|
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
9978
|
-
var React$
|
|
9979
|
-
exports.useSyncExternalStore = void 0 !== React$
|
|
9969
|
+
var React$4 = require("react"), objectIs$3 = "function" === typeof Object.is ? Object.is : is$6, useState$19 = React$4.useState, useEffect$17 = React$4.useEffect, useLayoutEffect$7 = React$4.useLayoutEffect, useDebugValue$3 = React$4.useDebugValue, didWarnOld18Alpha = !1, didWarnUncachedGetSnapshot = !1, shim$2 = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1$2 : useSyncExternalStore$2$1;
|
|
9970
|
+
exports.useSyncExternalStore = void 0 !== React$4.useSyncExternalStore ? React$4.useSyncExternalStore : shim$2;
|
|
9980
9971
|
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
9981
9972
|
})();
|
|
9982
9973
|
}));
|
|
@@ -10063,7 +10054,7 @@ var require_with_selector_development = /* @__PURE__ */ __commonJSMin(((exports)
|
|
|
10063
10054
|
return x$2 === y$2 && (0 !== x$2 || 1 / x$2 === 1 / y$2) || x$2 !== x$2 && y$2 !== y$2;
|
|
10064
10055
|
}
|
|
10065
10056
|
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
10066
|
-
var React$
|
|
10057
|
+
var React$4 = require("react"), shim$2 = require_shim(), objectIs$3 = "function" === typeof Object.is ? Object.is : is$6, useSyncExternalStore$3 = shim$2.useSyncExternalStore, useRef$15 = React$4.useRef, useEffect$17 = React$4.useEffect, useMemo$11 = React$4.useMemo, useDebugValue$3 = React$4.useDebugValue;
|
|
10067
10058
|
exports.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
|
|
10068
10059
|
var instRef = useRef$15(null);
|
|
10069
10060
|
if (null === instRef.current) {
|
|
@@ -10073,7 +10064,7 @@ var require_with_selector_development = /* @__PURE__ */ __commonJSMin(((exports)
|
|
|
10073
10064
|
};
|
|
10074
10065
|
instRef.current = inst;
|
|
10075
10066
|
} else inst = instRef.current;
|
|
10076
|
-
instRef = useMemo$
|
|
10067
|
+
instRef = useMemo$11(function() {
|
|
10077
10068
|
function memoizedSelector(nextSnapshot) {
|
|
10078
10069
|
if (!hasMemo) {
|
|
10079
10070
|
hasMemo = !0;
|
|
@@ -10105,7 +10096,7 @@ var require_with_selector_development = /* @__PURE__ */ __commonJSMin(((exports)
|
|
|
10105
10096
|
isEqual
|
|
10106
10097
|
]);
|
|
10107
10098
|
var value = useSyncExternalStore$3(subscribe, instRef[0], instRef[1]);
|
|
10108
|
-
useEffect$
|
|
10099
|
+
useEffect$17(function() {
|
|
10109
10100
|
inst.hasValue = !0;
|
|
10110
10101
|
inst.value = value;
|
|
10111
10102
|
}, [value]);
|
|
@@ -14823,11 +14814,11 @@ function createAnimateManager(timeoutController) {
|
|
|
14823
14814
|
}
|
|
14824
14815
|
var RequestAnimationFrameTimeoutController = class {
|
|
14825
14816
|
setTimeout(callback) {
|
|
14826
|
-
var delay
|
|
14817
|
+
var delay = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
|
|
14827
14818
|
var startTime = performance.now();
|
|
14828
14819
|
var requestId = null;
|
|
14829
14820
|
var executeCallback = (now) => {
|
|
14830
|
-
if (now - startTime >= delay
|
|
14821
|
+
if (now - startTime >= delay) callback(now);
|
|
14831
14822
|
else if (typeof requestAnimationFrame === "function") requestId = requestAnimationFrame(executeCallback);
|
|
14832
14823
|
};
|
|
14833
14824
|
requestId = requestAnimationFrame(executeCallback);
|
|
@@ -24272,7 +24263,7 @@ var require_use_sync_external_store_with_selector_development = /* @__PURE__ */
|
|
|
24272
24263
|
return x$2 === y$2 && (0 !== x$2 || 1 / x$2 === 1 / y$2) || x$2 !== x$2 && y$2 !== y$2;
|
|
24273
24264
|
}
|
|
24274
24265
|
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
24275
|
-
var React$
|
|
24266
|
+
var React$4 = require("react"), objectIs$3 = "function" === typeof Object.is ? Object.is : is$6, useSyncExternalStore$3 = React$4.useSyncExternalStore, useRef$15 = React$4.useRef, useEffect$17 = React$4.useEffect, useMemo$11 = React$4.useMemo, useDebugValue$3 = React$4.useDebugValue;
|
|
24276
24267
|
exports.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
|
|
24277
24268
|
var instRef = useRef$15(null);
|
|
24278
24269
|
if (null === instRef.current) {
|
|
@@ -24282,7 +24273,7 @@ var require_use_sync_external_store_with_selector_development = /* @__PURE__ */
|
|
|
24282
24273
|
};
|
|
24283
24274
|
instRef.current = inst;
|
|
24284
24275
|
} else inst = instRef.current;
|
|
24285
|
-
instRef = useMemo$
|
|
24276
|
+
instRef = useMemo$11(function() {
|
|
24286
24277
|
function memoizedSelector(nextSnapshot) {
|
|
24287
24278
|
if (!hasMemo) {
|
|
24288
24279
|
hasMemo = !0;
|
|
@@ -24314,7 +24305,7 @@ var require_use_sync_external_store_with_selector_development = /* @__PURE__ */
|
|
|
24314
24305
|
isEqual
|
|
24315
24306
|
]);
|
|
24316
24307
|
var value = useSyncExternalStore$3(subscribe, instRef[0], instRef[1]);
|
|
24317
|
-
useEffect$
|
|
24308
|
+
useEffect$17(function() {
|
|
24318
24309
|
inst.hasValue = !0;
|
|
24319
24310
|
inst.value = value;
|
|
24320
24311
|
}, [value]);
|
|
@@ -28666,4 +28657,4 @@ Object.defineProperty(exports, "useMargin", {
|
|
|
28666
28657
|
}
|
|
28667
28658
|
});
|
|
28668
28659
|
|
|
28669
|
-
//# sourceMappingURL=trust-score-card-glass-
|
|
28660
|
+
//# sourceMappingURL=trust-score-card-glass-DTS1RdIt.cjs.map
|