@volr/react-ui 0.1.44 → 0.1.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +175 -102
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +107 -34
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var React5 = require('react');
|
|
4
4
|
var reactDom = require('react-dom');
|
|
5
5
|
var react = require('@volr/react');
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -9,7 +9,7 @@ var tailwindMerge = require('tailwind-merge');
|
|
|
9
9
|
|
|
10
10
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var React5__default = /*#__PURE__*/_interopDefault(React5);
|
|
13
13
|
|
|
14
14
|
// src/providers/VolrUIProvider.tsx
|
|
15
15
|
|
|
@@ -207,13 +207,13 @@ var translations = {
|
|
|
207
207
|
function getTranslations(locale = "en") {
|
|
208
208
|
return translations[locale] || translations.en;
|
|
209
209
|
}
|
|
210
|
-
var I18nContext =
|
|
210
|
+
var I18nContext = React5.createContext(null);
|
|
211
211
|
function interpolate(text, params) {
|
|
212
212
|
if (!params) return text;
|
|
213
213
|
return text.replace(/\{\{(\w+)\}\}/g, (_, key) => params[key] ?? `{{${key}}}`);
|
|
214
214
|
}
|
|
215
215
|
function useI18n() {
|
|
216
|
-
const context =
|
|
216
|
+
const context = React5.useContext(I18nContext);
|
|
217
217
|
if (!context) {
|
|
218
218
|
return {
|
|
219
219
|
locale: "en",
|
|
@@ -248,9 +248,9 @@ function detectLocale() {
|
|
|
248
248
|
return lang.startsWith("ko") ? "ko" : "en";
|
|
249
249
|
}
|
|
250
250
|
function I18nProvider({ children }) {
|
|
251
|
-
const [locale, setLocale] =
|
|
252
|
-
const translations2 =
|
|
253
|
-
const t =
|
|
251
|
+
const [locale, setLocale] = React5.useState(detectLocale());
|
|
252
|
+
const translations2 = React5.useMemo(() => getTranslations(locale), [locale]);
|
|
253
|
+
const t = React5.useMemo(() => {
|
|
254
254
|
return (key, params) => {
|
|
255
255
|
const keys = key.split(".");
|
|
256
256
|
let value2 = translations2;
|
|
@@ -267,7 +267,7 @@ function I18nProvider({ children }) {
|
|
|
267
267
|
return typeof value2 === "string" ? interpolate(value2, params) : key;
|
|
268
268
|
};
|
|
269
269
|
}, [translations2]);
|
|
270
|
-
const value =
|
|
270
|
+
const value = React5.useMemo(
|
|
271
271
|
() => ({
|
|
272
272
|
locale,
|
|
273
273
|
translations: translations2,
|
|
@@ -279,9 +279,9 @@ function I18nProvider({ children }) {
|
|
|
279
279
|
return /* @__PURE__ */ jsxRuntime.jsx(I18nContext.Provider, { value, children });
|
|
280
280
|
}
|
|
281
281
|
var useTranslation = useI18n;
|
|
282
|
-
var VolrModalContext =
|
|
282
|
+
var VolrModalContext = React5.createContext(null);
|
|
283
283
|
var useVolrModal = () => {
|
|
284
|
-
const context =
|
|
284
|
+
const context = React5.useContext(VolrModalContext);
|
|
285
285
|
if (!context) {
|
|
286
286
|
throw new Error("useVolrModal must be used within VolrUIProvider");
|
|
287
287
|
}
|
|
@@ -290,17 +290,17 @@ var useVolrModal = () => {
|
|
|
290
290
|
var VolrModalProvider = ({
|
|
291
291
|
children
|
|
292
292
|
}) => {
|
|
293
|
-
const [isOpen, setIsOpen] =
|
|
294
|
-
const [mode, setMode] =
|
|
293
|
+
const [isOpen, setIsOpen] = React5.useState(false);
|
|
294
|
+
const [mode, setMode] = React5.useState("auth");
|
|
295
295
|
const { user } = react.useVolr();
|
|
296
|
-
const open =
|
|
296
|
+
const open = React5.useCallback(() => {
|
|
297
297
|
setMode(user ? "deposit" : "auth");
|
|
298
298
|
setIsOpen(true);
|
|
299
299
|
}, [user]);
|
|
300
|
-
const close =
|
|
300
|
+
const close = React5.useCallback(() => {
|
|
301
301
|
setIsOpen(false);
|
|
302
302
|
}, []);
|
|
303
|
-
const toggle =
|
|
303
|
+
const toggle = React5.useCallback(() => {
|
|
304
304
|
setIsOpen((prev) => !prev);
|
|
305
305
|
}, []);
|
|
306
306
|
return /* @__PURE__ */ jsxRuntime.jsx(VolrModalContext.Provider, { value: { isOpen, mode, open, close, toggle }, children });
|
|
@@ -312,11 +312,11 @@ function cn(...inputs) {
|
|
|
312
312
|
return twMerge(clsx.clsx(inputs));
|
|
313
313
|
}
|
|
314
314
|
function useMediaQuery(query) {
|
|
315
|
-
const [matches, setMatches] =
|
|
315
|
+
const [matches, setMatches] = React5.useState(() => {
|
|
316
316
|
if (typeof window === "undefined") return false;
|
|
317
317
|
return window.matchMedia(query).matches;
|
|
318
318
|
});
|
|
319
|
-
|
|
319
|
+
React5.useEffect(() => {
|
|
320
320
|
if (typeof window === "undefined") return;
|
|
321
321
|
const mql = window.matchMedia(query);
|
|
322
322
|
const handler = (event) => setMatches(event.matches);
|
|
@@ -326,6 +326,95 @@ function useMediaQuery(query) {
|
|
|
326
326
|
}, [query]);
|
|
327
327
|
return matches;
|
|
328
328
|
}
|
|
329
|
+
|
|
330
|
+
// src/generated/volr-sdk-css.ts
|
|
331
|
+
var VOLR_SDK_CSS = '/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */\n@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--volr-tw-translate-x:0;--volr-tw-translate-y:0;--volr-tw-translate-z:0;--volr-tw-space-y-reverse:0;--volr-tw-border-style:solid;--volr-tw-gradient-position:initial;--volr-tw-gradient-from:#0000;--volr-tw-gradient-via:#0000;--volr-tw-gradient-to:#0000;--volr-tw-gradient-stops:initial;--volr-tw-gradient-via-stops:initial;--volr-tw-gradient-from-position:0%;--volr-tw-gradient-via-position:50%;--volr-tw-gradient-to-position:100%;--volr-tw-leading:initial;--volr-tw-font-weight:initial;--volr-tw-shadow:0 0 #0000;--volr-tw-shadow-color:initial;--volr-tw-shadow-alpha:100%;--volr-tw-inset-shadow:0 0 #0000;--volr-tw-inset-shadow-color:initial;--volr-tw-inset-shadow-alpha:100%;--volr-tw-ring-color:initial;--volr-tw-ring-shadow:0 0 #0000;--volr-tw-inset-ring-color:initial;--volr-tw-inset-ring-shadow:0 0 #0000;--volr-tw-ring-inset:initial;--volr-tw-ring-offset-width:0px;--volr-tw-ring-offset-color:#fff;--volr-tw-ring-offset-shadow:0 0 #0000;--volr-tw-blur:initial;--volr-tw-brightness:initial;--volr-tw-contrast:initial;--volr-tw-grayscale:initial;--volr-tw-hue-rotate:initial;--volr-tw-invert:initial;--volr-tw-opacity:initial;--volr-tw-saturate:initial;--volr-tw-sepia:initial;--volr-tw-drop-shadow:initial;--volr-tw-drop-shadow-color:initial;--volr-tw-drop-shadow-alpha:100%;--volr-tw-drop-shadow-size:initial;--volr-tw-duration:initial;--volr-tw-ease:initial}}}@layer theme{:root,:host{--volr-font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--volr-font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--volr-color-red-50:oklch(97.1% .013 17.38);--volr-color-red-200:oklch(88.5% .062 18.334);--volr-color-red-500:oklch(63.7% .237 25.331);--volr-color-red-600:oklch(57.7% .245 27.325);--volr-color-red-700:oklch(50.5% .213 27.518);--volr-color-green-600:oklch(62.7% .194 149.214);--volr-color-emerald-300:oklch(84.5% .143 164.978);--volr-color-emerald-400:oklch(76.5% .177 163.223);--volr-color-emerald-500:oklch(69.6% .17 162.48);--volr-color-teal-400:oklch(77.7% .152 181.912);--volr-color-teal-500:oklch(70.4% .14 182.503);--volr-color-cyan-400:oklch(78.9% .154 211.53);--volr-color-blue-500:oklch(62.3% .214 259.815);--volr-color-purple-600:oklch(55.8% .288 302.321);--volr-color-rose-50:oklch(96.9% .015 12.422);--volr-color-rose-200:oklch(89.2% .058 10.001);--volr-color-rose-700:oklch(51.4% .222 16.935);--volr-color-rose-800:oklch(45.5% .188 13.697);--volr-color-slate-50:oklch(98.4% .003 247.858);--volr-color-slate-100:oklch(96.8% .007 247.896);--volr-color-slate-200:oklch(92.9% .013 255.508);--volr-color-slate-300:oklch(86.9% .022 252.894);--volr-color-slate-400:oklch(70.4% .04 256.788);--volr-color-slate-500:oklch(55.4% .046 257.417);--volr-color-slate-600:oklch(44.6% .043 257.281);--volr-color-slate-700:oklch(37.2% .044 257.287);--volr-color-slate-900:oklch(20.8% .042 265.755);--volr-color-gray-100:oklch(96.7% .003 264.542);--volr-color-gray-400:oklch(70.7% .022 261.325);--volr-color-gray-500:oklch(55.1% .027 264.364);--volr-color-gray-900:oklch(21% .034 264.665);--volr-color-black:#000;--volr-color-white:#fff;--volr-spacing:.25rem;--volr-container-md:28rem;--volr-container-4xl:56rem;--volr-text-xs:.75rem;--volr-text-xs--line-height:calc(1/.75);--volr-text-sm:.875rem;--volr-text-sm--line-height:calc(1.25/.875);--volr-text-base:1rem;--volr-text-base--line-height:calc(1.5/1);--volr-text-lg:1.125rem;--volr-text-lg--line-height:calc(1.75/1.125);--volr-text-xl:1.25rem;--volr-text-xl--line-height:calc(1.75/1.25);--volr-text-2xl:1.5rem;--volr-text-2xl--line-height:calc(2/1.5);--volr-text-8xl:6rem;--volr-text-8xl--line-height:1;--volr-font-weight-medium:500;--volr-font-weight-semibold:600;--volr-font-weight-bold:700;--volr-leading-relaxed:1.625;--volr-radius-lg:.5rem;--volr-radius-xl:.75rem;--volr-radius-2xl:1rem;--volr-radius-3xl:1.5rem;--volr-ease-out:cubic-bezier(0,0,.2,1);--volr-animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--volr-blur-2xl:40px;--volr-default-transition-duration:.15s;--volr-default-transition-timing-function:cubic-bezier(.4,0,.2,1);--volr-default-font-family:var(--volr-font-sans);--volr-default-mono-font-family:var(--volr-font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--volr-default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--volr-default-font-feature-settings,normal);font-variation-settings:var(--volr-default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--volr-default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--volr-default-mono-font-feature-settings,normal);font-variation-settings:var(--volr-default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}:host{--volr-primary-color:var(--volr-accent-color,#303030);--volr-font-family:var(--volr-custom-font,inherit)}*,:before,:after{box-sizing:border-box}*{font-family:var(--volr-font-family)}button,input,select,textarea{color:inherit;background-color:#0000}button{cursor:pointer;background-color:#0000}input::placeholder{color:#94a3b8}h1,h2,h3{color:#0f172a;margin:0;font-weight:700}h1{font-size:1.875rem;line-height:2.25rem}h2{font-size:1.5rem;line-height:2rem}h3{font-size:1.25rem;line-height:1.75rem}p{margin:0}}@layer components{.volr-dialog-overlay{inset:calc(var(--volr-spacing)*0);z-index:40;background-color:var(--volr-color-black);position:fixed}@supports (color:color-mix(in lab, red, red)){.volr-dialog-overlay{background-color:color-mix(in oklab,var(--volr-color-black)45%,transparent)}}.volr-dialog-content{z-index:50;border-radius:var(--volr-radius-2xl);border-style:var(--volr-tw-border-style);border-width:1px;border-color:var(--volr-color-slate-300);background-color:var(--volr-color-white);padding:calc(var(--volr-spacing)*7);--volr-tw-shadow:0 20px 25px -5px var(--volr-tw-shadow-color,#0000001a),0 8px 10px -6px var(--volr-tw-shadow-color,#0000001a);box-shadow:var(--volr-tw-inset-shadow),var(--volr-tw-inset-ring-shadow),var(--volr-tw-ring-offset-shadow),var(--volr-tw-ring-shadow),var(--volr-tw-shadow);width:calc(100% - 2rem);max-width:28rem;max-height:85vh;position:fixed;top:50%;left:50%;overflow-y:auto;transform:translate(-50%,-50%)}@media (max-width:640px){.volr-dialog-content{top:auto;right:calc(var(--volr-spacing)*0);bottom:calc(var(--volr-spacing)*0);left:calc(var(--volr-spacing)*0);border-radius:1.25rem 1.25rem 0 0;width:100%;max-width:100%;margin:0 auto;transform:translateY(0)}}.volr-dialog-close{top:calc(var(--volr-spacing)*4);right:calc(var(--volr-spacing)*4);height:calc(var(--volr-spacing)*8);width:calc(var(--volr-spacing)*8);color:var(--volr-color-slate-400);cursor:pointer;background-color:#0000;border:none;border-radius:3.40282e38px;justify-content:center;align-items:center;display:inline-flex;position:absolute}.volr-dialog-close:hover{color:#475569;background-color:#f1f5f9}.volr-dialog-close:focus-visible{outline:none;box-shadow:0 0 0 2px #94a3b8b3}.volr-dialog-close-icon{height:calc(var(--volr-spacing)*4);width:calc(var(--volr-spacing)*4)}.volr-email-input{width:100%;color:inherit;background-color:#fff;border:1px solid #cbd5e1;border-radius:.5rem;outline:none;padding:.75rem .75rem .75rem 2.75rem;font-size:1rem;line-height:1.5}.volr-email-input::placeholder{color:#94a3b8}.volr-email-input:focus{border-color:#cbd5e1;box-shadow:0 0 0 2px #94a3b8b3}.volr-option-button{cursor:pointer;background-color:#fff;border:1px solid #e2e8f0;border-radius:.5rem;align-items:center;gap:.75rem;width:100%;padding:.75rem;transition:background-color .15s ease-out,border-color .15s ease-out,box-shadow .15s ease-out;display:flex}.volr-option-button:hover{background-color:#f8fafc;border-color:#e2e8f0}.volr-option-button:focus-visible{outline:none;box-shadow:0 0 0 2px #94a3b8b3}}@layer utilities{.volr\\:pointer-events-none{pointer-events:none}.volr\\:sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.volr\\:absolute{position:absolute}.volr\\:fixed{position:fixed}.volr\\:relative{position:relative}.volr\\:inset-0{inset:calc(var(--volr-spacing)*0)}.volr\\:-top-3{top:calc(var(--volr-spacing)*-3)}.volr\\:top-1\\/2{top:50%}.volr\\:-right-3{right:calc(var(--volr-spacing)*-3)}.volr\\:right-0{right:calc(var(--volr-spacing)*0)}.volr\\:right-2{right:calc(var(--volr-spacing)*2)}.volr\\:bottom-0{bottom:calc(var(--volr-spacing)*0)}.volr\\:left-0{left:calc(var(--volr-spacing)*0)}.volr\\:left-3{left:calc(var(--volr-spacing)*3)}.volr\\:-z-10{z-index:calc(10*-1)}.volr\\:z-10{z-index:10}.volr\\:z-20{z-index:20}.volr\\:z-40{z-index:40}.volr\\:z-50{z-index:50}.volr\\:mx-auto{margin-inline:auto}.volr\\:my-6{margin-block:calc(var(--volr-spacing)*6)}.volr\\:my-8{margin-block:calc(var(--volr-spacing)*8)}.volr\\:mt-0\\.5{margin-top:calc(var(--volr-spacing)*.5)}.volr\\:mt-1{margin-top:calc(var(--volr-spacing)*1)}.volr\\:mt-2{margin-top:calc(var(--volr-spacing)*2)}.volr\\:mt-3{margin-top:calc(var(--volr-spacing)*3)}.volr\\:mt-6{margin-top:calc(var(--volr-spacing)*6)}.volr\\:mt-8{margin-top:calc(var(--volr-spacing)*8)}.volr\\:mb-1{margin-bottom:calc(var(--volr-spacing)*1)}.volr\\:mb-2{margin-bottom:calc(var(--volr-spacing)*2)}.volr\\:mb-3{margin-bottom:calc(var(--volr-spacing)*3)}.volr\\:mb-4{margin-bottom:calc(var(--volr-spacing)*4)}.volr\\:mb-5{margin-bottom:calc(var(--volr-spacing)*5)}.volr\\:mb-6{margin-bottom:calc(var(--volr-spacing)*6)}.volr\\:mb-8{margin-bottom:calc(var(--volr-spacing)*8)}.volr\\:-ml-2{margin-left:calc(var(--volr-spacing)*-2)}.volr\\:flex{display:flex}.volr\\:grid{display:grid}.volr\\:inline-block{display:inline-block}.volr\\:inline-flex{display:inline-flex}.volr\\:h-1\\.5{height:calc(var(--volr-spacing)*1.5)}.volr\\:h-2{height:calc(var(--volr-spacing)*2)}.volr\\:h-8{height:calc(var(--volr-spacing)*8)}.volr\\:h-10{height:calc(var(--volr-spacing)*10)}.volr\\:h-14{height:calc(var(--volr-spacing)*14)}.volr\\:h-24{height:calc(var(--volr-spacing)*24)}.volr\\:h-40{height:calc(var(--volr-spacing)*40)}.volr\\:h-44{height:calc(var(--volr-spacing)*44)}.volr\\:h-48{height:calc(var(--volr-spacing)*48)}.volr\\:h-full{height:100%}.volr\\:h-px{height:1px}.volr\\:max-h-24{max-height:calc(var(--volr-spacing)*24)}.volr\\:max-h-96{max-height:calc(var(--volr-spacing)*96)}.volr\\:max-h-\\[85vh\\]{max-height:85vh}.volr\\:max-h-\\[90vh\\]{max-height:90vh}.volr\\:min-h-\\[120px\\]{min-height:120px}.volr\\:w-1\\.5{width:calc(var(--volr-spacing)*1.5)}.volr\\:w-2{width:calc(var(--volr-spacing)*2)}.volr\\:w-8{width:calc(var(--volr-spacing)*8)}.volr\\:w-10{width:calc(var(--volr-spacing)*10)}.volr\\:w-12{width:calc(var(--volr-spacing)*12)}.volr\\:w-24{width:calc(var(--volr-spacing)*24)}.volr\\:w-40{width:calc(var(--volr-spacing)*40)}.volr\\:w-44{width:calc(var(--volr-spacing)*44)}.volr\\:w-48{width:calc(var(--volr-spacing)*48)}.volr\\:w-full{width:100%}.volr\\:max-w-4xl{max-width:var(--volr-container-4xl)}.volr\\:max-w-full{max-width:100%}.volr\\:max-w-md{max-width:var(--volr-container-md)}.volr\\:max-w-none{max-width:none}.volr\\:min-w-0{min-width:calc(var(--volr-spacing)*0)}.volr\\:flex-1{flex:1}.volr\\:flex-shrink-0{flex-shrink:0}.volr\\:-translate-y-1\\/2{--volr-tw-translate-y:calc(calc(1/2*100%)*-1);translate:var(--volr-tw-translate-x)var(--volr-tw-translate-y)}.volr\\:animate-\\[volrFadeIn_0\\.2s_ease-out\\]{animation:.2s ease-out volrFadeIn}.volr\\:animate-pulse{animation:var(--volr-animate-pulse)}.volr\\:cursor-not-allowed{cursor:not-allowed}.volr\\:cursor-pointer{cursor:pointer}.volr\\:grid-cols-\\[minmax\\(0\\,1\\.1fr\\)_minmax\\(0\\,1fr\\)\\]{grid-template-columns:minmax(0,1.1fr) minmax(0,1fr)}.volr\\:flex-col{flex-direction:column}.volr\\:items-baseline{align-items:baseline}.volr\\:items-center{align-items:center}.volr\\:items-end{align-items:flex-end}.volr\\:items-start{align-items:flex-start}.volr\\:justify-between{justify-content:space-between}.volr\\:justify-center{justify-content:center}.volr\\:gap-1{gap:calc(var(--volr-spacing)*1)}.volr\\:gap-2{gap:calc(var(--volr-spacing)*2)}.volr\\:gap-3{gap:calc(var(--volr-spacing)*3)}.volr\\:gap-4{gap:calc(var(--volr-spacing)*4)}:where(.volr\\:space-y-2>:not(:last-child)){--volr-tw-space-y-reverse:0;margin-block-start:calc(calc(var(--volr-spacing)*2)*var(--volr-tw-space-y-reverse));margin-block-end:calc(calc(var(--volr-spacing)*2)*calc(1 - var(--volr-tw-space-y-reverse)))}:where(.volr\\:space-y-3>:not(:last-child)){--volr-tw-space-y-reverse:0;margin-block-start:calc(calc(var(--volr-spacing)*3)*var(--volr-tw-space-y-reverse));margin-block-end:calc(calc(var(--volr-spacing)*3)*calc(1 - var(--volr-tw-space-y-reverse)))}.volr\\:truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.volr\\:overflow-hidden{overflow:hidden}.volr\\:overflow-visible{overflow:visible}.volr\\:overflow-y-auto{overflow-y:auto}.volr\\:rounded-2xl{border-radius:var(--volr-radius-2xl)}.volr\\:rounded-full{border-radius:3.40282e38px}.volr\\:rounded-lg{border-radius:var(--volr-radius-lg)}.volr\\:rounded-xl{border-radius:var(--volr-radius-xl)}.volr\\:rounded-t-3xl{border-top-left-radius:var(--volr-radius-3xl);border-top-right-radius:var(--volr-radius-3xl)}.volr\\:border{border-style:var(--volr-tw-border-style);border-width:1px}.volr\\:border-2{border-style:var(--volr-tw-border-style);border-width:2px}.volr\\:border-4{border-style:var(--volr-tw-border-style);border-width:4px}.volr\\:border-t{border-top-style:var(--volr-tw-border-style);border-top-width:1px}.volr\\:border-none{--volr-tw-border-style:none;border-style:none}.volr\\:border-red-200{border-color:var(--volr-color-red-200)}.volr\\:border-rose-200{border-color:var(--volr-color-rose-200)}.volr\\:border-slate-100{border-color:var(--volr-color-slate-100)}.volr\\:border-slate-200,.volr\\:border-slate-200\\/50{border-color:var(--volr-color-slate-200)}@supports (color:color-mix(in lab, red, red)){.volr\\:border-slate-200\\/50{border-color:color-mix(in oklab,var(--volr-color-slate-200)50%,transparent)}}.volr\\:border-slate-300{border-color:var(--volr-color-slate-300)}.volr\\:border-white{border-color:var(--volr-color-white)}.volr\\:bg-black\\/45{background-color:var(--volr-color-black)}@supports (color:color-mix(in lab, red, red)){.volr\\:bg-black\\/45{background-color:color-mix(in oklab,var(--volr-color-black)45%,transparent)}}.volr\\:bg-blue-500{background-color:var(--volr-color-blue-500)}.volr\\:bg-cyan-400{background-color:var(--volr-color-cyan-400)}.volr\\:bg-emerald-300{background-color:var(--volr-color-emerald-300)}.volr\\:bg-emerald-400{background-color:var(--volr-color-emerald-400)}.volr\\:bg-gray-100{background-color:var(--volr-color-gray-100)}.volr\\:bg-gray-400{background-color:var(--volr-color-gray-400)}.volr\\:bg-red-50{background-color:var(--volr-color-red-50)}.volr\\:bg-rose-50{background-color:var(--volr-color-rose-50)}.volr\\:bg-slate-50,.volr\\:bg-slate-50\\/50{background-color:var(--volr-color-slate-50)}@supports (color:color-mix(in lab, red, red)){.volr\\:bg-slate-50\\/50{background-color:color-mix(in oklab,var(--volr-color-slate-50)50%,transparent)}}.volr\\:bg-slate-100{background-color:var(--volr-color-slate-100)}.volr\\:bg-slate-200{background-color:var(--volr-color-slate-200)}.volr\\:bg-teal-400{background-color:var(--volr-color-teal-400)}.volr\\:bg-transparent{background-color:#0000}.volr\\:bg-white{background-color:var(--volr-color-white)}.volr\\:bg-gradient-to-br{--volr-tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--volr-tw-gradient-stops))}.volr\\:from-blue-500{--volr-tw-gradient-from:var(--volr-color-blue-500);--volr-tw-gradient-stops:var(--volr-tw-gradient-via-stops,var(--volr-tw-gradient-position),var(--volr-tw-gradient-from)var(--volr-tw-gradient-from-position),var(--volr-tw-gradient-to)var(--volr-tw-gradient-to-position))}.volr\\:from-emerald-400{--volr-tw-gradient-from:var(--volr-color-emerald-400);--volr-tw-gradient-stops:var(--volr-tw-gradient-via-stops,var(--volr-tw-gradient-position),var(--volr-tw-gradient-from)var(--volr-tw-gradient-from-position),var(--volr-tw-gradient-to)var(--volr-tw-gradient-to-position))}.volr\\:from-emerald-500{--volr-tw-gradient-from:var(--volr-color-emerald-500);--volr-tw-gradient-stops:var(--volr-tw-gradient-via-stops,var(--volr-tw-gradient-position),var(--volr-tw-gradient-from)var(--volr-tw-gradient-from-position),var(--volr-tw-gradient-to)var(--volr-tw-gradient-to-position))}.volr\\:to-purple-600{--volr-tw-gradient-to:var(--volr-color-purple-600);--volr-tw-gradient-stops:var(--volr-tw-gradient-via-stops,var(--volr-tw-gradient-position),var(--volr-tw-gradient-from)var(--volr-tw-gradient-from-position),var(--volr-tw-gradient-to)var(--volr-tw-gradient-to-position))}.volr\\:to-teal-500{--volr-tw-gradient-to:var(--volr-color-teal-500);--volr-tw-gradient-stops:var(--volr-tw-gradient-via-stops,var(--volr-tw-gradient-position),var(--volr-tw-gradient-from)var(--volr-tw-gradient-from-position),var(--volr-tw-gradient-to)var(--volr-tw-gradient-to-position))}.volr\\:p-1{padding:calc(var(--volr-spacing)*1)}.volr\\:p-2{padding:calc(var(--volr-spacing)*2)}.volr\\:p-3{padding:calc(var(--volr-spacing)*3)}.volr\\:p-4{padding:calc(var(--volr-spacing)*4)}.volr\\:p-5{padding:calc(var(--volr-spacing)*5)}.volr\\:p-8{padding:calc(var(--volr-spacing)*8)}.volr\\:px-2{padding-inline:calc(var(--volr-spacing)*2)}.volr\\:px-3{padding-inline:calc(var(--volr-spacing)*3)}.volr\\:px-4{padding-inline:calc(var(--volr-spacing)*4)}.volr\\:px-5{padding-inline:calc(var(--volr-spacing)*5)}.volr\\:px-6{padding-inline:calc(var(--volr-spacing)*6)}.volr\\:py-0\\.5{padding-block:calc(var(--volr-spacing)*.5)}.volr\\:py-1\\.5{padding-block:calc(var(--volr-spacing)*1.5)}.volr\\:py-2{padding-block:calc(var(--volr-spacing)*2)}.volr\\:py-3{padding-block:calc(var(--volr-spacing)*3)}.volr\\:py-6{padding-block:calc(var(--volr-spacing)*6)}.volr\\:py-8{padding-block:calc(var(--volr-spacing)*8)}.volr\\:py-12{padding-block:calc(var(--volr-spacing)*12)}.volr\\:pt-4{padding-top:calc(var(--volr-spacing)*4)}.volr\\:pb-5{padding-bottom:calc(var(--volr-spacing)*5)}.volr\\:pb-6{padding-bottom:calc(var(--volr-spacing)*6)}.volr\\:text-center{text-align:center}.volr\\:text-left{text-align:left}.volr\\:font-mono{font-family:var(--volr-font-mono)}.volr\\:text-2xl{font-size:var(--volr-text-2xl);line-height:var(--volr-tw-leading,var(--volr-text-2xl--line-height))}.volr\\:text-8xl{font-size:var(--volr-text-8xl);line-height:var(--volr-tw-leading,var(--volr-text-8xl--line-height))}.volr\\:text-base{font-size:var(--volr-text-base);line-height:var(--volr-tw-leading,var(--volr-text-base--line-height))}.volr\\:text-lg{font-size:var(--volr-text-lg);line-height:var(--volr-tw-leading,var(--volr-text-lg--line-height))}.volr\\:text-sm{font-size:var(--volr-text-sm);line-height:var(--volr-tw-leading,var(--volr-text-sm--line-height))}.volr\\:text-xl{font-size:var(--volr-text-xl);line-height:var(--volr-tw-leading,var(--volr-text-xl--line-height))}.volr\\:text-xs{font-size:var(--volr-text-xs);line-height:var(--volr-tw-leading,var(--volr-text-xs--line-height))}.volr\\:leading-relaxed{--volr-tw-leading:var(--volr-leading-relaxed);line-height:var(--volr-leading-relaxed)}.volr\\:font-bold{--volr-tw-font-weight:var(--volr-font-weight-bold);font-weight:var(--volr-font-weight-bold)}.volr\\:font-medium{--volr-tw-font-weight:var(--volr-font-weight-medium);font-weight:var(--volr-font-weight-medium)}.volr\\:font-semibold{--volr-tw-font-weight:var(--volr-font-weight-semibold);font-weight:var(--volr-font-weight-semibold)}.volr\\:break-all{word-break:break-all}.volr\\:text-gray-500{color:var(--volr-color-gray-500)}.volr\\:text-gray-900{color:var(--volr-color-gray-900)}.volr\\:text-green-600{color:var(--volr-color-green-600)}.volr\\:text-red-500{color:var(--volr-color-red-500)}.volr\\:text-red-600{color:var(--volr-color-red-600)}.volr\\:text-red-700{color:var(--volr-color-red-700)}.volr\\:text-rose-700{color:var(--volr-color-rose-700)}.volr\\:text-rose-800{color:var(--volr-color-rose-800)}.volr\\:text-slate-400{color:var(--volr-color-slate-400)}.volr\\:text-slate-500{color:var(--volr-color-slate-500)}.volr\\:text-slate-600{color:var(--volr-color-slate-600)}.volr\\:text-slate-700{color:var(--volr-color-slate-700)}.volr\\:text-slate-900{color:var(--volr-color-slate-900)}.volr\\:text-white{color:var(--volr-color-white)}.volr\\:capitalize{text-transform:capitalize}.volr\\:underline{text-decoration-line:underline}.volr\\:opacity-0{opacity:0}.volr\\:opacity-30{opacity:.3}.volr\\:shadow-2xl{--volr-tw-shadow:0 25px 50px -12px var(--volr-tw-shadow-color,#00000040);box-shadow:var(--volr-tw-inset-shadow),var(--volr-tw-inset-ring-shadow),var(--volr-tw-ring-offset-shadow),var(--volr-tw-ring-shadow),var(--volr-tw-shadow)}.volr\\:shadow-lg{--volr-tw-shadow:0 10px 15px -3px var(--volr-tw-shadow-color,#0000001a),0 4px 6px -4px var(--volr-tw-shadow-color,#0000001a);box-shadow:var(--volr-tw-inset-shadow),var(--volr-tw-inset-ring-shadow),var(--volr-tw-ring-offset-shadow),var(--volr-tw-ring-shadow),var(--volr-tw-shadow)}.volr\\:shadow-sm{--volr-tw-shadow:0 1px 3px 0 var(--volr-tw-shadow-color,#0000001a),0 1px 2px -1px var(--volr-tw-shadow-color,#0000001a);box-shadow:var(--volr-tw-inset-shadow),var(--volr-tw-inset-ring-shadow),var(--volr-tw-ring-offset-shadow),var(--volr-tw-ring-shadow),var(--volr-tw-shadow)}.volr\\:shadow-xl{--volr-tw-shadow:0 20px 25px -5px var(--volr-tw-shadow-color,#0000001a),0 8px 10px -6px var(--volr-tw-shadow-color,#0000001a);box-shadow:var(--volr-tw-inset-shadow),var(--volr-tw-inset-ring-shadow),var(--volr-tw-ring-offset-shadow),var(--volr-tw-ring-shadow),var(--volr-tw-shadow)}.volr\\:shadow-emerald-500\\/50{--volr-tw-shadow-color:var(--volr-color-emerald-500)}@supports (color:color-mix(in lab, red, red)){.volr\\:shadow-emerald-500\\/50{--volr-tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--volr-color-emerald-500)50%,transparent)var(--volr-tw-shadow-alpha),transparent)}}.volr\\:blur-2xl{--volr-tw-blur:blur(var(--volr-blur-2xl));filter:var(--volr-tw-blur,)var(--volr-tw-brightness,)var(--volr-tw-contrast,)var(--volr-tw-grayscale,)var(--volr-tw-hue-rotate,)var(--volr-tw-invert,)var(--volr-tw-saturate,)var(--volr-tw-sepia,)var(--volr-tw-drop-shadow,)}.volr\\:transition-all{transition-property:all;transition-timing-function:var(--volr-tw-ease,var(--volr-default-transition-timing-function));transition-duration:var(--volr-tw-duration,var(--volr-default-transition-duration))}.volr\\:transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--volr-tw-gradient-from,--volr-tw-gradient-via,--volr-tw-gradient-to;transition-timing-function:var(--volr-tw-ease,var(--volr-default-transition-timing-function));transition-duration:var(--volr-tw-duration,var(--volr-default-transition-duration))}.volr\\:duration-200{--volr-tw-duration:.2s;transition-duration:.2s}.volr\\:duration-300{--volr-tw-duration:.3s;transition-duration:.3s}.volr\\:duration-500{--volr-tw-duration:.5s;transition-duration:.5s}.volr\\:ease-out{--volr-tw-ease:var(--volr-ease-out);transition-timing-function:var(--volr-ease-out)}.volr\\:outline-none{--volr-tw-outline-style:none;outline-style:none}@media (hover:hover){.volr\\:hover\\:border-slate-200:hover{border-color:var(--volr-color-slate-200)}.volr\\:hover\\:bg-slate-50:hover{background-color:var(--volr-color-slate-50)}}.volr\\:disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.volr\\:disabled\\:bg-slate-50:disabled{background-color:var(--volr-color-slate-50)}.volr-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}}@property --volr-tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --volr-tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --volr-tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --volr-tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --volr-tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --volr-tw-gradient-position{syntax:"*";inherits:false}@property --volr-tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --volr-tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --volr-tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --volr-tw-gradient-stops{syntax:"*";inherits:false}@property --volr-tw-gradient-via-stops{syntax:"*";inherits:false}@property --volr-tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --volr-tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --volr-tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --volr-tw-leading{syntax:"*";inherits:false}@property --volr-tw-font-weight{syntax:"*";inherits:false}@property --volr-tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --volr-tw-shadow-color{syntax:"*";inherits:false}@property --volr-tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --volr-tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --volr-tw-inset-shadow-color{syntax:"*";inherits:false}@property --volr-tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --volr-tw-ring-color{syntax:"*";inherits:false}@property --volr-tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --volr-tw-inset-ring-color{syntax:"*";inherits:false}@property --volr-tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --volr-tw-ring-inset{syntax:"*";inherits:false}@property --volr-tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --volr-tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --volr-tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --volr-tw-blur{syntax:"*";inherits:false}@property --volr-tw-brightness{syntax:"*";inherits:false}@property --volr-tw-contrast{syntax:"*";inherits:false}@property --volr-tw-grayscale{syntax:"*";inherits:false}@property --volr-tw-hue-rotate{syntax:"*";inherits:false}@property --volr-tw-invert{syntax:"*";inherits:false}@property --volr-tw-opacity{syntax:"*";inherits:false}@property --volr-tw-saturate{syntax:"*";inherits:false}@property --volr-tw-sepia{syntax:"*";inherits:false}@property --volr-tw-drop-shadow{syntax:"*";inherits:false}@property --volr-tw-drop-shadow-color{syntax:"*";inherits:false}@property --volr-tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --volr-tw-drop-shadow-size{syntax:"*";inherits:false}@property --volr-tw-duration{syntax:"*";inherits:false}@property --volr-tw-ease{syntax:"*";inherits:false}@keyframes pulse{50%{opacity:.5}}';
|
|
332
|
+
function ShadowPortal({ children }) {
|
|
333
|
+
const [shadowHost, setShadowHost] = React5.useState(null);
|
|
334
|
+
const [mountNode, setMountNode] = React5.useState(null);
|
|
335
|
+
React5.useEffect(() => {
|
|
336
|
+
const host = document.createElement("div");
|
|
337
|
+
host.id = "volr-shadow-portal";
|
|
338
|
+
host.style.position = "fixed";
|
|
339
|
+
host.style.top = "0";
|
|
340
|
+
host.style.left = "0";
|
|
341
|
+
host.style.width = "0";
|
|
342
|
+
host.style.height = "0";
|
|
343
|
+
host.style.zIndex = "9999";
|
|
344
|
+
document.body.appendChild(host);
|
|
345
|
+
setShadowHost(host);
|
|
346
|
+
const shadowRoot = host.attachShadow({ mode: "open" });
|
|
347
|
+
const styleEl = document.createElement("style");
|
|
348
|
+
styleEl.textContent = VOLR_SDK_CSS;
|
|
349
|
+
shadowRoot.appendChild(styleEl);
|
|
350
|
+
const container = document.createElement("div");
|
|
351
|
+
container.setAttribute("data-volr-root", "true");
|
|
352
|
+
shadowRoot.appendChild(container);
|
|
353
|
+
setMountNode(container);
|
|
354
|
+
return () => {
|
|
355
|
+
document.body.removeChild(host);
|
|
356
|
+
};
|
|
357
|
+
}, []);
|
|
358
|
+
if (!mountNode) return null;
|
|
359
|
+
return reactDom.createPortal(children, mountNode);
|
|
360
|
+
}
|
|
361
|
+
function useFocusTrap(isActive, containerRef) {
|
|
362
|
+
const previousActiveElement = React5.useRef(null);
|
|
363
|
+
const focusableSelector = [
|
|
364
|
+
"button:not([disabled])",
|
|
365
|
+
"input:not([disabled])",
|
|
366
|
+
"select:not([disabled])",
|
|
367
|
+
"textarea:not([disabled])",
|
|
368
|
+
"a[href]",
|
|
369
|
+
'[tabindex]:not([tabindex="-1"])'
|
|
370
|
+
].join(", ");
|
|
371
|
+
const getFocusableElements = React5.useCallback(() => {
|
|
372
|
+
if (!containerRef.current) return [];
|
|
373
|
+
return Array.from(
|
|
374
|
+
containerRef.current.querySelectorAll(focusableSelector)
|
|
375
|
+
).filter((el) => {
|
|
376
|
+
return el.offsetParent !== null;
|
|
377
|
+
});
|
|
378
|
+
}, [containerRef, focusableSelector]);
|
|
379
|
+
const handleKeyDown = React5.useCallback(
|
|
380
|
+
(event) => {
|
|
381
|
+
if (event.key !== "Tab") return;
|
|
382
|
+
const focusableElements = getFocusableElements();
|
|
383
|
+
if (focusableElements.length === 0) return;
|
|
384
|
+
const firstElement = focusableElements[0];
|
|
385
|
+
const lastElement = focusableElements[focusableElements.length - 1];
|
|
386
|
+
if (event.shiftKey) {
|
|
387
|
+
if (document.activeElement === firstElement) {
|
|
388
|
+
event.preventDefault();
|
|
389
|
+
lastElement.focus();
|
|
390
|
+
}
|
|
391
|
+
} else {
|
|
392
|
+
if (document.activeElement === lastElement) {
|
|
393
|
+
event.preventDefault();
|
|
394
|
+
firstElement.focus();
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
},
|
|
398
|
+
[getFocusableElements]
|
|
399
|
+
);
|
|
400
|
+
React5.useEffect(() => {
|
|
401
|
+
if (!isActive) return;
|
|
402
|
+
previousActiveElement.current = document.activeElement;
|
|
403
|
+
const focusableElements = getFocusableElements();
|
|
404
|
+
if (focusableElements.length > 0) {
|
|
405
|
+
requestAnimationFrame(() => {
|
|
406
|
+
focusableElements[0].focus();
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
document.addEventListener("keydown", handleKeyDown);
|
|
410
|
+
return () => {
|
|
411
|
+
document.removeEventListener("keydown", handleKeyDown);
|
|
412
|
+
if (previousActiveElement.current && previousActiveElement.current.focus) {
|
|
413
|
+
previousActiveElement.current.focus();
|
|
414
|
+
}
|
|
415
|
+
};
|
|
416
|
+
}, [isActive, getFocusableElements, handleKeyDown]);
|
|
417
|
+
}
|
|
329
418
|
var Modal = ({
|
|
330
419
|
open,
|
|
331
420
|
onOpenChange,
|
|
@@ -334,11 +423,15 @@ var Modal = ({
|
|
|
334
423
|
onPointerDownOutside,
|
|
335
424
|
onEscapeKeyDown,
|
|
336
425
|
variant: explicitVariant,
|
|
337
|
-
contentClassName
|
|
426
|
+
contentClassName,
|
|
427
|
+
ariaLabel = "Dialog"
|
|
338
428
|
}) => {
|
|
339
429
|
const isMobile = useMediaQuery("(max-width: 500px)");
|
|
340
430
|
const variant = explicitVariant ?? (isMobile ? "bottom-sheet" : "centered");
|
|
341
|
-
|
|
431
|
+
const dialogRef = React5.useRef(null);
|
|
432
|
+
const dialogId = React5.useId();
|
|
433
|
+
useFocusTrap(open, dialogRef);
|
|
434
|
+
React5.useEffect(() => {
|
|
342
435
|
const handleEscape = (e) => {
|
|
343
436
|
if (e.key === "Escape" && open) {
|
|
344
437
|
if (onEscapeKeyDown) {
|
|
@@ -355,11 +448,12 @@ var Modal = ({
|
|
|
355
448
|
}, [open, onOpenChange, onEscapeKeyDown]);
|
|
356
449
|
if (!open) return null;
|
|
357
450
|
const isBottomSheet = variant === "bottom-sheet";
|
|
358
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
451
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(ShadowPortal, { children: [
|
|
359
452
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
360
453
|
"div",
|
|
361
454
|
{
|
|
362
455
|
className: "volr:fixed volr:inset-0 volr:z-40 volr:bg-black/45",
|
|
456
|
+
"aria-hidden": "true",
|
|
363
457
|
onClick: (e) => {
|
|
364
458
|
if (onPointerDownOutside) {
|
|
365
459
|
onPointerDownOutside(e);
|
|
@@ -379,6 +473,12 @@ var Modal = ({
|
|
|
379
473
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
380
474
|
"div",
|
|
381
475
|
{
|
|
476
|
+
ref: dialogRef,
|
|
477
|
+
id: dialogId,
|
|
478
|
+
role: "dialog",
|
|
479
|
+
"aria-modal": "true",
|
|
480
|
+
"aria-label": ariaLabel,
|
|
481
|
+
tabIndex: -1,
|
|
382
482
|
className: cn(
|
|
383
483
|
"volr:bg-white volr:border volr:border-slate-300 volr:shadow-xl volr:overflow-y-auto volr:relative volr:w-full",
|
|
384
484
|
isBottomSheet ? "volr:max-w-full volr:max-h-[85vh] volr:rounded-t-3xl volr:px-4 volr:py-6 volr:shadow-2xl" : "volr:rounded-2xl volr:p-5 volr:max-w-md volr:w-full volr:max-h-[90vh]",
|
|
@@ -830,12 +930,12 @@ function PasskeyEnrollView({
|
|
|
830
930
|
isEnrolling,
|
|
831
931
|
error: enrollmentError
|
|
832
932
|
} = react.usePasskeyEnrollment();
|
|
833
|
-
const [hasStarted, setHasStarted] =
|
|
834
|
-
const [errorMessage, setErrorMessage] =
|
|
835
|
-
const [isRefreshing, setIsRefreshing] =
|
|
933
|
+
const [hasStarted, setHasStarted] = React5.useState(false);
|
|
934
|
+
const [errorMessage, setErrorMessage] = React5.useState(null);
|
|
935
|
+
const [isRefreshing, setIsRefreshing] = React5.useState(false);
|
|
836
936
|
const biometricType = getBiometricType();
|
|
837
937
|
const hasPasskey = user?.keyStorageType === "passkey";
|
|
838
|
-
|
|
938
|
+
React5.useEffect(() => {
|
|
839
939
|
console.log("[PasskeyEnrollView] User state:", {
|
|
840
940
|
user,
|
|
841
941
|
keyStorageType: user?.keyStorageType,
|
|
@@ -843,7 +943,7 @@ function PasskeyEnrollView({
|
|
|
843
943
|
hasPasskey
|
|
844
944
|
});
|
|
845
945
|
}, [user, hasPasskey]);
|
|
846
|
-
|
|
946
|
+
React5.useEffect(() => {
|
|
847
947
|
if (hasPasskey && !user?.evmAddress && !isRefreshing) {
|
|
848
948
|
const refreshUserData = async () => {
|
|
849
949
|
try {
|
|
@@ -874,7 +974,7 @@ function PasskeyEnrollView({
|
|
|
874
974
|
refreshUserData();
|
|
875
975
|
}
|
|
876
976
|
}, [hasPasskey, user?.evmAddress, isRefreshing, client, setUser, user]);
|
|
877
|
-
|
|
977
|
+
React5.useEffect(() => {
|
|
878
978
|
if (!user?.id) {
|
|
879
979
|
const error = new Error("User ID is required for passkey enrollment");
|
|
880
980
|
setErrorMessage(getUserFriendlyError(error, t));
|
|
@@ -890,7 +990,7 @@ function PasskeyEnrollView({
|
|
|
890
990
|
}
|
|
891
991
|
}
|
|
892
992
|
}, [user, onError, t]);
|
|
893
|
-
|
|
993
|
+
React5.useEffect(() => {
|
|
894
994
|
if (enrollmentError) {
|
|
895
995
|
const friendlyMessage = getUserFriendlyError(enrollmentError, t);
|
|
896
996
|
setErrorMessage(friendlyMessage);
|
|
@@ -1045,8 +1145,8 @@ function MpcConnectView({
|
|
|
1045
1145
|
isConnecting,
|
|
1046
1146
|
error: connectionError
|
|
1047
1147
|
} = react.useMpcConnection();
|
|
1048
|
-
const [errorMessage, setErrorMessage] =
|
|
1049
|
-
|
|
1148
|
+
const [errorMessage, setErrorMessage] = React5.useState(null);
|
|
1149
|
+
React5.useEffect(() => {
|
|
1050
1150
|
if (connectionError) {
|
|
1051
1151
|
setErrorMessage(connectionError.message);
|
|
1052
1152
|
if (onError) {
|
|
@@ -1054,7 +1154,7 @@ function MpcConnectView({
|
|
|
1054
1154
|
}
|
|
1055
1155
|
}
|
|
1056
1156
|
}, [connectionError, onError]);
|
|
1057
|
-
|
|
1157
|
+
React5.useEffect(() => {
|
|
1058
1158
|
handleConnect();
|
|
1059
1159
|
}, []);
|
|
1060
1160
|
const handleConnect = async () => {
|
|
@@ -1294,7 +1394,7 @@ var variantMap = {
|
|
|
1294
1394
|
ghost: { backgroundColor: "transparent", color: "#475569", border: "none" },
|
|
1295
1395
|
outline: { backgroundColor: "transparent", color: "#475569", border: "1px solid #e2e8f0" }
|
|
1296
1396
|
};
|
|
1297
|
-
var Button =
|
|
1397
|
+
var Button = React5__default.default.forwardRef(
|
|
1298
1398
|
({ variant = "primary", size = "md", fullWidth, className, style, disabled, children, ...props }, ref) => {
|
|
1299
1399
|
const { accentColor } = useVolrUI();
|
|
1300
1400
|
const sizeStyle = sizeMap[size];
|
|
@@ -1368,9 +1468,9 @@ var EmailIcon = () => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
|
1368
1468
|
);
|
|
1369
1469
|
function EmailInlineInput({ onSubmit, accentColor }) {
|
|
1370
1470
|
const { t } = useI18n();
|
|
1371
|
-
const [email, setEmail] =
|
|
1372
|
-
const [error, setError] =
|
|
1373
|
-
const [isLoading, setIsLoading] =
|
|
1471
|
+
const [email, setEmail] = React5.useState("");
|
|
1472
|
+
const [error, setError] = React5.useState(null);
|
|
1473
|
+
const [isLoading, setIsLoading] = React5.useState(false);
|
|
1374
1474
|
const handleSubmit = async (e) => {
|
|
1375
1475
|
e.preventDefault();
|
|
1376
1476
|
setError(null);
|
|
@@ -1485,14 +1585,14 @@ function SigninSelectScreen({
|
|
|
1485
1585
|
function CodeInputScreen({ email, onSubmit, onResend }) {
|
|
1486
1586
|
const { t } = useI18n();
|
|
1487
1587
|
const { accentColor } = useVolrUI();
|
|
1488
|
-
const [digits, setDigits] =
|
|
1489
|
-
const [error, setError] =
|
|
1490
|
-
const [isLoading, setIsLoading] =
|
|
1491
|
-
const inputRefs =
|
|
1492
|
-
|
|
1588
|
+
const [digits, setDigits] = React5.useState(Array(6).fill(""));
|
|
1589
|
+
const [error, setError] = React5.useState(null);
|
|
1590
|
+
const [isLoading, setIsLoading] = React5.useState(false);
|
|
1591
|
+
const inputRefs = React5.useRef([]);
|
|
1592
|
+
React5.useEffect(() => {
|
|
1493
1593
|
inputRefs.current[0]?.focus();
|
|
1494
1594
|
}, []);
|
|
1495
|
-
|
|
1595
|
+
React5.useEffect(() => {
|
|
1496
1596
|
const code = digits.join("");
|
|
1497
1597
|
if (code.length === 6 && !isLoading) {
|
|
1498
1598
|
handleSubmit(code);
|
|
@@ -1615,11 +1715,11 @@ function SiweLoginScreen({
|
|
|
1615
1715
|
const { t } = useI18n();
|
|
1616
1716
|
const { accentColor } = useVolrUI();
|
|
1617
1717
|
const { requestSiweNonce, verifySiweSignature } = react.useVolrLogin();
|
|
1618
|
-
const [isLoading, setIsLoading] =
|
|
1619
|
-
const [step, setStep] =
|
|
1620
|
-
const [account, setAccount] =
|
|
1621
|
-
const [error, setError] =
|
|
1622
|
-
const [walletConnector, setWalletConnector] =
|
|
1718
|
+
const [isLoading, setIsLoading] = React5.useState(false);
|
|
1719
|
+
const [step, setStep] = React5.useState("connect");
|
|
1720
|
+
const [account, setAccount] = React5.useState(null);
|
|
1721
|
+
const [error, setError] = React5.useState(null);
|
|
1722
|
+
const [walletConnector, setWalletConnector] = React5.useState(
|
|
1623
1723
|
void 0
|
|
1624
1724
|
);
|
|
1625
1725
|
const detectWalletConnector = () => {
|
|
@@ -1638,7 +1738,7 @@ function SiweLoginScreen({
|
|
|
1638
1738
|
if (provider.isBraveWallet) return "com.brave.wallet";
|
|
1639
1739
|
return "unknown";
|
|
1640
1740
|
};
|
|
1641
|
-
|
|
1741
|
+
React5.useEffect(() => {
|
|
1642
1742
|
if (typeof window !== "undefined" && window.ethereum) {
|
|
1643
1743
|
window.ethereum.request({ method: "eth_accounts" }).then((accounts) => {
|
|
1644
1744
|
if (accounts.length > 0) {
|
|
@@ -1789,7 +1889,7 @@ function LoginSuccessScreen({
|
|
|
1789
1889
|
}) {
|
|
1790
1890
|
const { t } = useI18n();
|
|
1791
1891
|
const { accentColor } = useVolrUI();
|
|
1792
|
-
|
|
1892
|
+
React5.useEffect(() => {
|
|
1793
1893
|
const timer = setTimeout(() => {
|
|
1794
1894
|
onClose();
|
|
1795
1895
|
}, delay);
|
|
@@ -1919,13 +2019,13 @@ function SigninModal({ isOpen, onClose, onError }) {
|
|
|
1919
2019
|
const { logout, user } = react.useVolr();
|
|
1920
2020
|
const { appName, branding } = useVolrUI();
|
|
1921
2021
|
const { requestEmailCode, verifyEmailCode, handleSocialLogin } = react.useVolrLogin();
|
|
1922
|
-
const [currentScreen, setCurrentScreen] =
|
|
1923
|
-
const [email, setEmail] =
|
|
2022
|
+
const [currentScreen, setCurrentScreen] = React5.useState("method-select");
|
|
2023
|
+
const [email, setEmail] = React5.useState("");
|
|
1924
2024
|
const hasPasskey = user?.keyStorageType === "passkey";
|
|
1925
2025
|
const isMobile = useMediaQuery("(max-width: 500px)");
|
|
1926
2026
|
const isWideViewport = useMediaQuery("(min-width: 864px)");
|
|
1927
2027
|
const shouldUseWideLayout = !isMobile && isWideViewport && Boolean(branding) && currentScreen === "method-select";
|
|
1928
|
-
|
|
2028
|
+
React5.useEffect(() => {
|
|
1929
2029
|
if (!isOpen) {
|
|
1930
2030
|
setCurrentScreen("method-select");
|
|
1931
2031
|
setEmail("");
|
|
@@ -2141,7 +2241,7 @@ function AssetSelectView({
|
|
|
2141
2241
|
] });
|
|
2142
2242
|
}
|
|
2143
2243
|
var CopyButton = ({ text, className, onCopy }) => {
|
|
2144
|
-
const [copied, setCopied] =
|
|
2244
|
+
const [copied, setCopied] = React5.useState(false);
|
|
2145
2245
|
const handleCopy = async () => {
|
|
2146
2246
|
try {
|
|
2147
2247
|
await navigator.clipboard.writeText(text);
|
|
@@ -2168,7 +2268,7 @@ var CopyButton = ({ text, className, onCopy }) => {
|
|
|
2168
2268
|
}
|
|
2169
2269
|
);
|
|
2170
2270
|
};
|
|
2171
|
-
var TextLinkButton =
|
|
2271
|
+
var TextLinkButton = React5__default.default.forwardRef(({ showArrow = false, className, children, ...props }, ref) => {
|
|
2172
2272
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2173
2273
|
"button",
|
|
2174
2274
|
{
|
|
@@ -2427,7 +2527,7 @@ var DepositCompletedToast = ({
|
|
|
2427
2527
|
symbol
|
|
2428
2528
|
}) => {
|
|
2429
2529
|
const { t } = useI18n();
|
|
2430
|
-
const [expanded, setExpanded] =
|
|
2530
|
+
const [expanded, setExpanded] = React5.useState(false);
|
|
2431
2531
|
const formatAmount = (amount) => {
|
|
2432
2532
|
const divisor = BigInt(10 ** decimals);
|
|
2433
2533
|
const whole = amount / divisor;
|
|
@@ -2556,10 +2656,10 @@ function DepositQRView(props) {
|
|
|
2556
2656
|
const { t } = useI18n();
|
|
2557
2657
|
const { config } = react.useVolr();
|
|
2558
2658
|
const { client } = react.useInternalAuth();
|
|
2559
|
-
const [chainName, setChainName] =
|
|
2560
|
-
const [showOtherTokenModal, setShowOtherTokenModal] =
|
|
2561
|
-
const [showToast, setShowToast] =
|
|
2562
|
-
const eip681 =
|
|
2659
|
+
const [chainName, setChainName] = React5.useState(null);
|
|
2660
|
+
const [showOtherTokenModal, setShowOtherTokenModal] = React5.useState(false);
|
|
2661
|
+
const [showToast, setShowToast] = React5.useState(false);
|
|
2662
|
+
const eip681 = React5.useMemo(() => {
|
|
2563
2663
|
return `ethereum:${props.address}`;
|
|
2564
2664
|
}, [props.address]);
|
|
2565
2665
|
const status = react.useDepositListener({
|
|
@@ -2573,17 +2673,17 @@ function DepositQRView(props) {
|
|
|
2573
2673
|
},
|
|
2574
2674
|
address: props.address
|
|
2575
2675
|
});
|
|
2576
|
-
|
|
2676
|
+
React5.useEffect(() => {
|
|
2577
2677
|
console.log("[DepositQRView] Status changed:", status);
|
|
2578
2678
|
if (status.state === "detected") {
|
|
2579
2679
|
setShowToast(true);
|
|
2580
2680
|
}
|
|
2581
2681
|
}, [status.state]);
|
|
2582
|
-
const getNetworkInfo =
|
|
2682
|
+
const getNetworkInfo = React5.useCallback(
|
|
2583
2683
|
react.createGetNetworkInfo({ client, rpcOverrides: config.rpcOverrides }),
|
|
2584
2684
|
[client, config.rpcOverrides]
|
|
2585
2685
|
);
|
|
2586
|
-
|
|
2686
|
+
React5.useEffect(() => {
|
|
2587
2687
|
let cancelled = false;
|
|
2588
2688
|
const loadChainName = async () => {
|
|
2589
2689
|
try {
|
|
@@ -2690,16 +2790,16 @@ var DepositModal = ({
|
|
|
2690
2790
|
const { config, user } = react.useVolr();
|
|
2691
2791
|
const supportedAssets = config.deposit?.supportedAssets ?? [];
|
|
2692
2792
|
const hasAssets = supportedAssets.length > 0;
|
|
2693
|
-
const [selectedIdx, setSelectedIdx] =
|
|
2793
|
+
const [selectedIdx, setSelectedIdx] = React5.useState(
|
|
2694
2794
|
supportedAssets.length === 1 ? 0 : -1
|
|
2695
2795
|
);
|
|
2696
|
-
const selected =
|
|
2796
|
+
const selected = React5.useMemo(
|
|
2697
2797
|
() => supportedAssets[selectedIdx],
|
|
2698
2798
|
[supportedAssets, selectedIdx]
|
|
2699
2799
|
);
|
|
2700
2800
|
const showSelector = hasAssets && supportedAssets.length > 1 && selectedIdx === -1;
|
|
2701
2801
|
const showQR = hasAssets && user?.evmAddress && selectedIdx >= 0;
|
|
2702
|
-
const body =
|
|
2802
|
+
const body = React5.useMemo(() => {
|
|
2703
2803
|
if (!hasAssets) {
|
|
2704
2804
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "volr:text-center volr:py-8", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "volr:text-sm volr:text-slate-600", children: "No deposit assets configured. Please contact the app developer." }) });
|
|
2705
2805
|
}
|
|
@@ -2755,33 +2855,9 @@ var DepositModal = ({
|
|
|
2755
2855
|
body
|
|
2756
2856
|
] });
|
|
2757
2857
|
};
|
|
2758
|
-
|
|
2759
|
-
// src/generated/volr-sdk-css.ts
|
|
2760
|
-
var VOLR_SDK_CSS = '/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */\n@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){[data-volr-root] *,[data-volr-root] :before,[data-volr-root] :after,[data-volr-root] ::backdrop{--volr-tw-translate-x:0;--volr-tw-translate-y:0;--volr-tw-translate-z:0;--volr-tw-space-y-reverse:0;--volr-tw-border-style:solid;--volr-tw-gradient-position:initial;--volr-tw-gradient-from:#0000;--volr-tw-gradient-via:#0000;--volr-tw-gradient-to:#0000;--volr-tw-gradient-stops:initial;--volr-tw-gradient-via-stops:initial;--volr-tw-gradient-from-position:0%;--volr-tw-gradient-via-position:50%;--volr-tw-gradient-to-position:100%;--volr-tw-leading:initial;--volr-tw-font-weight:initial;--volr-tw-shadow:0 0 #0000;--volr-tw-shadow-color:initial;--volr-tw-shadow-alpha:100%;--volr-tw-inset-shadow:0 0 #0000;--volr-tw-inset-shadow-color:initial;--volr-tw-inset-shadow-alpha:100%;--volr-tw-ring-color:initial;--volr-tw-ring-shadow:0 0 #0000;--volr-tw-inset-ring-color:initial;--volr-tw-inset-ring-shadow:0 0 #0000;--volr-tw-ring-inset:initial;--volr-tw-ring-offset-width:0px;--volr-tw-ring-offset-color:#fff;--volr-tw-ring-offset-shadow:0 0 #0000;--volr-tw-blur:initial;--volr-tw-brightness:initial;--volr-tw-contrast:initial;--volr-tw-grayscale:initial;--volr-tw-hue-rotate:initial;--volr-tw-invert:initial;--volr-tw-opacity:initial;--volr-tw-saturate:initial;--volr-tw-sepia:initial;--volr-tw-drop-shadow:initial;--volr-tw-drop-shadow-color:initial;--volr-tw-drop-shadow-alpha:100%;--volr-tw-drop-shadow-size:initial;--volr-tw-duration:initial;--volr-tw-ease:initial}}}[data-volr-root],[data-volr-root] :host{--volr-font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--volr-color-red-50:oklch(97.1% .013 17.38);--volr-color-red-200:oklch(88.5% .062 18.334);--volr-color-red-500:oklch(63.7% .237 25.331);--volr-color-red-600:oklch(57.7% .245 27.325);--volr-color-red-700:oklch(50.5% .213 27.518);--volr-color-green-600:oklch(62.7% .194 149.214);--volr-color-emerald-300:oklch(84.5% .143 164.978);--volr-color-emerald-400:oklch(76.5% .177 163.223);--volr-color-emerald-500:oklch(69.6% .17 162.48);--volr-color-teal-400:oklch(77.7% .152 181.912);--volr-color-teal-500:oklch(70.4% .14 182.503);--volr-color-cyan-400:oklch(78.9% .154 211.53);--volr-color-blue-500:oklch(62.3% .214 259.815);--volr-color-purple-600:oklch(55.8% .288 302.321);--volr-color-rose-50:oklch(96.9% .015 12.422);--volr-color-rose-200:oklch(89.2% .058 10.001);--volr-color-rose-700:oklch(51.4% .222 16.935);--volr-color-rose-800:oklch(45.5% .188 13.697);--volr-color-slate-50:oklch(98.4% .003 247.858);--volr-color-slate-100:oklch(96.8% .007 247.896);--volr-color-slate-200:oklch(92.9% .013 255.508);--volr-color-slate-300:oklch(86.9% .022 252.894);--volr-color-slate-400:oklch(70.4% .04 256.788);--volr-color-slate-500:oklch(55.4% .046 257.417);--volr-color-slate-600:oklch(44.6% .043 257.281);--volr-color-slate-700:oklch(37.2% .044 257.287);--volr-color-slate-900:oklch(20.8% .042 265.755);--volr-color-gray-100:oklch(96.7% .003 264.542);--volr-color-gray-400:oklch(70.7% .022 261.325);--volr-color-gray-500:oklch(55.1% .027 264.364);--volr-color-gray-900:oklch(21% .034 264.665);--volr-color-black:#000;--volr-color-white:#fff;--volr-spacing:.25rem;--volr-container-md:28rem;--volr-container-4xl:56rem;--volr-text-xs:.75rem;--volr-text-xs--line-height:calc(1/.75);--volr-text-sm:.875rem;--volr-text-sm--line-height:calc(1.25/.875);--volr-text-base:1rem;--volr-text-base--line-height:calc(1.5/1);--volr-text-lg:1.125rem;--volr-text-lg--line-height:calc(1.75/1.125);--volr-text-xl:1.25rem;--volr-text-xl--line-height:calc(1.75/1.25);--volr-text-2xl:1.5rem;--volr-text-2xl--line-height:calc(2/1.5);--volr-text-8xl:6rem;--volr-text-8xl--line-height:1;--volr-font-weight-medium:500;--volr-font-weight-semibold:600;--volr-font-weight-bold:700;--volr-leading-relaxed:1.625;--volr-radius-lg:.5rem;--volr-radius-xl:.75rem;--volr-radius-2xl:1rem;--volr-radius-3xl:1.5rem;--volr-ease-out:cubic-bezier(0,0,.2,1);--volr-animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--volr-blur-2xl:40px;--volr-default-transition-duration:.15s;--volr-default-transition-timing-function:cubic-bezier(.4,0,.2,1)}[data-volr-root] .volr\\:pointer-events-none{pointer-events:none}[data-volr-root] .volr\\:sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}[data-volr-root] .volr\\:absolute{position:absolute}[data-volr-root] .volr\\:fixed{position:fixed}[data-volr-root] .volr\\:relative{position:relative}[data-volr-root] .volr\\:inset-0{inset:calc(var(--volr-spacing)*0)}[data-volr-root] .volr\\:-top-3{top:calc(var(--volr-spacing)*-3)}[data-volr-root] .volr\\:top-1\\/2{top:50%}[data-volr-root] .volr\\:-right-3{right:calc(var(--volr-spacing)*-3)}[data-volr-root] .volr\\:right-0{right:calc(var(--volr-spacing)*0)}[data-volr-root] .volr\\:right-2{right:calc(var(--volr-spacing)*2)}[data-volr-root] .volr\\:bottom-0{bottom:calc(var(--volr-spacing)*0)}[data-volr-root] .volr\\:left-0{left:calc(var(--volr-spacing)*0)}[data-volr-root] .volr\\:left-3{left:calc(var(--volr-spacing)*3)}[data-volr-root] .volr\\:-z-10{z-index:calc(10*-1)}[data-volr-root] .volr\\:z-10{z-index:10}[data-volr-root] .volr\\:z-20{z-index:20}[data-volr-root] .volr\\:z-40{z-index:40}[data-volr-root] .volr\\:z-50{z-index:50}[data-volr-root] .volr\\:mx-auto{margin-inline:auto}[data-volr-root] .volr\\:my-6{margin-block:calc(var(--volr-spacing)*6)}[data-volr-root] .volr\\:my-8{margin-block:calc(var(--volr-spacing)*8)}[data-volr-root] .volr\\:mt-0\\.5{margin-top:calc(var(--volr-spacing)*.5)}[data-volr-root] .volr\\:mt-1{margin-top:calc(var(--volr-spacing)*1)}[data-volr-root] .volr\\:mt-2{margin-top:calc(var(--volr-spacing)*2)}[data-volr-root] .volr\\:mt-3{margin-top:calc(var(--volr-spacing)*3)}[data-volr-root] .volr\\:mt-6{margin-top:calc(var(--volr-spacing)*6)}[data-volr-root] .volr\\:mt-8{margin-top:calc(var(--volr-spacing)*8)}[data-volr-root] .volr\\:mb-1{margin-bottom:calc(var(--volr-spacing)*1)}[data-volr-root] .volr\\:mb-2{margin-bottom:calc(var(--volr-spacing)*2)}[data-volr-root] .volr\\:mb-3{margin-bottom:calc(var(--volr-spacing)*3)}[data-volr-root] .volr\\:mb-4{margin-bottom:calc(var(--volr-spacing)*4)}[data-volr-root] .volr\\:mb-5{margin-bottom:calc(var(--volr-spacing)*5)}[data-volr-root] .volr\\:mb-6{margin-bottom:calc(var(--volr-spacing)*6)}[data-volr-root] .volr\\:mb-8{margin-bottom:calc(var(--volr-spacing)*8)}[data-volr-root] .volr\\:-ml-2{margin-left:calc(var(--volr-spacing)*-2)}[data-volr-root] .volr\\:flex{display:flex}[data-volr-root] .volr\\:grid{display:grid}[data-volr-root] .volr\\:inline-block{display:inline-block}[data-volr-root] .volr\\:inline-flex{display:inline-flex}[data-volr-root] .volr\\:h-1\\.5{height:calc(var(--volr-spacing)*1.5)}[data-volr-root] .volr\\:h-2{height:calc(var(--volr-spacing)*2)}[data-volr-root] .volr\\:h-8{height:calc(var(--volr-spacing)*8)}[data-volr-root] .volr\\:h-10{height:calc(var(--volr-spacing)*10)}[data-volr-root] .volr\\:h-14{height:calc(var(--volr-spacing)*14)}[data-volr-root] .volr\\:h-24{height:calc(var(--volr-spacing)*24)}[data-volr-root] .volr\\:h-40{height:calc(var(--volr-spacing)*40)}[data-volr-root] .volr\\:h-44{height:calc(var(--volr-spacing)*44)}[data-volr-root] .volr\\:h-48{height:calc(var(--volr-spacing)*48)}[data-volr-root] .volr\\:h-full{height:100%}[data-volr-root] .volr\\:h-px{height:1px}[data-volr-root] .volr\\:max-h-24{max-height:calc(var(--volr-spacing)*24)}[data-volr-root] .volr\\:max-h-96{max-height:calc(var(--volr-spacing)*96)}[data-volr-root] .volr\\:max-h-\\[85vh\\]{max-height:85vh}[data-volr-root] .volr\\:max-h-\\[90vh\\]{max-height:90vh}[data-volr-root] .volr\\:min-h-\\[120px\\]{min-height:120px}[data-volr-root] .volr\\:w-1\\.5{width:calc(var(--volr-spacing)*1.5)}[data-volr-root] .volr\\:w-2{width:calc(var(--volr-spacing)*2)}[data-volr-root] .volr\\:w-8{width:calc(var(--volr-spacing)*8)}[data-volr-root] .volr\\:w-10{width:calc(var(--volr-spacing)*10)}[data-volr-root] .volr\\:w-12{width:calc(var(--volr-spacing)*12)}[data-volr-root] .volr\\:w-24{width:calc(var(--volr-spacing)*24)}[data-volr-root] .volr\\:w-40{width:calc(var(--volr-spacing)*40)}[data-volr-root] .volr\\:w-44{width:calc(var(--volr-spacing)*44)}[data-volr-root] .volr\\:w-48{width:calc(var(--volr-spacing)*48)}[data-volr-root] .volr\\:w-full{width:100%}[data-volr-root] .volr\\:max-w-4xl{max-width:var(--volr-container-4xl)}[data-volr-root] .volr\\:max-w-full{max-width:100%}[data-volr-root] .volr\\:max-w-md{max-width:var(--volr-container-md)}[data-volr-root] .volr\\:max-w-none{max-width:none}[data-volr-root] .volr\\:min-w-0{min-width:calc(var(--volr-spacing)*0)}[data-volr-root] .volr\\:flex-1{flex:1}[data-volr-root] .volr\\:flex-shrink-0{flex-shrink:0}[data-volr-root] .volr\\:-translate-y-1\\/2{--volr-tw-translate-y:calc(calc(1/2*100%)*-1);translate:var(--volr-tw-translate-x)var(--volr-tw-translate-y)}[data-volr-root] .volr\\:animate-\\[volrFadeIn_0\\.2s_ease-out\\]{animation:.2s ease-out volrFadeIn}[data-volr-root] .volr\\:animate-pulse{animation:var(--volr-animate-pulse)}[data-volr-root] .volr\\:cursor-not-allowed{cursor:not-allowed}[data-volr-root] .volr\\:cursor-pointer{cursor:pointer}[data-volr-root] .volr\\:grid-cols-\\[minmax\\(0\\,1\\.1fr\\)_minmax\\(0\\,1fr\\)\\]{grid-template-columns:minmax(0,1.1fr) minmax(0,1fr)}[data-volr-root] .volr\\:flex-col{flex-direction:column}[data-volr-root] .volr\\:items-baseline{align-items:baseline}[data-volr-root] .volr\\:items-center{align-items:center}[data-volr-root] .volr\\:items-end{align-items:flex-end}[data-volr-root] .volr\\:items-start{align-items:flex-start}[data-volr-root] .volr\\:justify-between{justify-content:space-between}[data-volr-root] .volr\\:justify-center{justify-content:center}[data-volr-root] .volr\\:gap-1{gap:calc(var(--volr-spacing)*1)}[data-volr-root] .volr\\:gap-2{gap:calc(var(--volr-spacing)*2)}[data-volr-root] .volr\\:gap-3{gap:calc(var(--volr-spacing)*3)}[data-volr-root] .volr\\:gap-4{gap:calc(var(--volr-spacing)*4)}[data-volr-root] :where(.volr\\:space-y-2>:not(:last-child)){--volr-tw-space-y-reverse:0;margin-block-start:calc(calc(var(--volr-spacing)*2)*var(--volr-tw-space-y-reverse));margin-block-end:calc(calc(var(--volr-spacing)*2)*calc(1 - var(--volr-tw-space-y-reverse)))}[data-volr-root] :where(.volr\\:space-y-3>:not(:last-child)){--volr-tw-space-y-reverse:0;margin-block-start:calc(calc(var(--volr-spacing)*3)*var(--volr-tw-space-y-reverse));margin-block-end:calc(calc(var(--volr-spacing)*3)*calc(1 - var(--volr-tw-space-y-reverse)))}[data-volr-root] .volr\\:truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}[data-volr-root] .volr\\:overflow-hidden{overflow:hidden}[data-volr-root] .volr\\:overflow-visible{overflow:visible}[data-volr-root] .volr\\:overflow-y-auto{overflow-y:auto}[data-volr-root] .volr\\:rounded-2xl{border-radius:var(--volr-radius-2xl)}[data-volr-root] .volr\\:rounded-full{border-radius:3.40282e38px}[data-volr-root] .volr\\:rounded-lg{border-radius:var(--volr-radius-lg)}[data-volr-root] .volr\\:rounded-xl{border-radius:var(--volr-radius-xl)}[data-volr-root] .volr\\:rounded-t-3xl{border-top-left-radius:var(--volr-radius-3xl);border-top-right-radius:var(--volr-radius-3xl)}[data-volr-root] .volr\\:border{border-style:var(--volr-tw-border-style);border-width:1px}[data-volr-root] .volr\\:border-2{border-style:var(--volr-tw-border-style);border-width:2px}[data-volr-root] .volr\\:border-4{border-style:var(--volr-tw-border-style);border-width:4px}[data-volr-root] .volr\\:border-t{border-top-style:var(--volr-tw-border-style);border-top-width:1px}[data-volr-root] .volr\\:border-none{--volr-tw-border-style:none;border-style:none}[data-volr-root] .volr\\:border-red-200{border-color:var(--volr-color-red-200)}[data-volr-root] .volr\\:border-rose-200{border-color:var(--volr-color-rose-200)}[data-volr-root] .volr\\:border-slate-100{border-color:var(--volr-color-slate-100)}[data-volr-root] .volr\\:border-slate-200,[data-volr-root] .volr\\:border-slate-200\\/50{border-color:var(--volr-color-slate-200)}@supports (color:color-mix(in lab, red, red)){[data-volr-root] .volr\\:border-slate-200\\/50{border-color:color-mix(in oklab,var(--volr-color-slate-200)50%,transparent)}}[data-volr-root] .volr\\:border-slate-300{border-color:var(--volr-color-slate-300)}[data-volr-root] .volr\\:border-white{border-color:var(--volr-color-white)}[data-volr-root] .volr\\:bg-black\\/45{background-color:var(--volr-color-black)}@supports (color:color-mix(in lab, red, red)){[data-volr-root] .volr\\:bg-black\\/45{background-color:color-mix(in oklab,var(--volr-color-black)45%,transparent)}}[data-volr-root] .volr\\:bg-blue-500{background-color:var(--volr-color-blue-500)}[data-volr-root] .volr\\:bg-cyan-400{background-color:var(--volr-color-cyan-400)}[data-volr-root] .volr\\:bg-emerald-300{background-color:var(--volr-color-emerald-300)}[data-volr-root] .volr\\:bg-emerald-400{background-color:var(--volr-color-emerald-400)}[data-volr-root] .volr\\:bg-gray-100{background-color:var(--volr-color-gray-100)}[data-volr-root] .volr\\:bg-gray-400{background-color:var(--volr-color-gray-400)}[data-volr-root] .volr\\:bg-red-50{background-color:var(--volr-color-red-50)}[data-volr-root] .volr\\:bg-rose-50{background-color:var(--volr-color-rose-50)}[data-volr-root] .volr\\:bg-slate-50,[data-volr-root] .volr\\:bg-slate-50\\/50{background-color:var(--volr-color-slate-50)}@supports (color:color-mix(in lab, red, red)){[data-volr-root] .volr\\:bg-slate-50\\/50{background-color:color-mix(in oklab,var(--volr-color-slate-50)50%,transparent)}}[data-volr-root] .volr\\:bg-slate-100{background-color:var(--volr-color-slate-100)}[data-volr-root] .volr\\:bg-slate-200{background-color:var(--volr-color-slate-200)}[data-volr-root] .volr\\:bg-teal-400{background-color:var(--volr-color-teal-400)}[data-volr-root] .volr\\:bg-transparent{background-color:#0000}[data-volr-root] .volr\\:bg-white{background-color:var(--volr-color-white)}[data-volr-root] .volr\\:bg-gradient-to-br{--volr-tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--volr-tw-gradient-stops))}[data-volr-root] .volr\\:from-blue-500{--volr-tw-gradient-from:var(--volr-color-blue-500);--volr-tw-gradient-stops:var(--volr-tw-gradient-via-stops,var(--volr-tw-gradient-position),var(--volr-tw-gradient-from)var(--volr-tw-gradient-from-position),var(--volr-tw-gradient-to)var(--volr-tw-gradient-to-position))}[data-volr-root] .volr\\:from-emerald-400{--volr-tw-gradient-from:var(--volr-color-emerald-400);--volr-tw-gradient-stops:var(--volr-tw-gradient-via-stops,var(--volr-tw-gradient-position),var(--volr-tw-gradient-from)var(--volr-tw-gradient-from-position),var(--volr-tw-gradient-to)var(--volr-tw-gradient-to-position))}[data-volr-root] .volr\\:from-emerald-500{--volr-tw-gradient-from:var(--volr-color-emerald-500);--volr-tw-gradient-stops:var(--volr-tw-gradient-via-stops,var(--volr-tw-gradient-position),var(--volr-tw-gradient-from)var(--volr-tw-gradient-from-position),var(--volr-tw-gradient-to)var(--volr-tw-gradient-to-position))}[data-volr-root] .volr\\:to-purple-600{--volr-tw-gradient-to:var(--volr-color-purple-600);--volr-tw-gradient-stops:var(--volr-tw-gradient-via-stops,var(--volr-tw-gradient-position),var(--volr-tw-gradient-from)var(--volr-tw-gradient-from-position),var(--volr-tw-gradient-to)var(--volr-tw-gradient-to-position))}[data-volr-root] .volr\\:to-teal-500{--volr-tw-gradient-to:var(--volr-color-teal-500);--volr-tw-gradient-stops:var(--volr-tw-gradient-via-stops,var(--volr-tw-gradient-position),var(--volr-tw-gradient-from)var(--volr-tw-gradient-from-position),var(--volr-tw-gradient-to)var(--volr-tw-gradient-to-position))}[data-volr-root] .volr\\:p-1{padding:calc(var(--volr-spacing)*1)}[data-volr-root] .volr\\:p-2{padding:calc(var(--volr-spacing)*2)}[data-volr-root] .volr\\:p-3{padding:calc(var(--volr-spacing)*3)}[data-volr-root] .volr\\:p-4{padding:calc(var(--volr-spacing)*4)}[data-volr-root] .volr\\:p-5{padding:calc(var(--volr-spacing)*5)}[data-volr-root] .volr\\:p-8{padding:calc(var(--volr-spacing)*8)}[data-volr-root] .volr\\:px-2{padding-inline:calc(var(--volr-spacing)*2)}[data-volr-root] .volr\\:px-3{padding-inline:calc(var(--volr-spacing)*3)}[data-volr-root] .volr\\:px-4{padding-inline:calc(var(--volr-spacing)*4)}[data-volr-root] .volr\\:px-5{padding-inline:calc(var(--volr-spacing)*5)}[data-volr-root] .volr\\:px-6{padding-inline:calc(var(--volr-spacing)*6)}[data-volr-root] .volr\\:py-0\\.5{padding-block:calc(var(--volr-spacing)*.5)}[data-volr-root] .volr\\:py-1\\.5{padding-block:calc(var(--volr-spacing)*1.5)}[data-volr-root] .volr\\:py-2{padding-block:calc(var(--volr-spacing)*2)}[data-volr-root] .volr\\:py-3{padding-block:calc(var(--volr-spacing)*3)}[data-volr-root] .volr\\:py-6{padding-block:calc(var(--volr-spacing)*6)}[data-volr-root] .volr\\:py-8{padding-block:calc(var(--volr-spacing)*8)}[data-volr-root] .volr\\:py-12{padding-block:calc(var(--volr-spacing)*12)}[data-volr-root] .volr\\:pt-4{padding-top:calc(var(--volr-spacing)*4)}[data-volr-root] .volr\\:pb-5{padding-bottom:calc(var(--volr-spacing)*5)}[data-volr-root] .volr\\:pb-6{padding-bottom:calc(var(--volr-spacing)*6)}[data-volr-root] .volr\\:text-center{text-align:center}[data-volr-root] .volr\\:text-left{text-align:left}[data-volr-root] .volr\\:font-mono{font-family:var(--volr-font-mono)}[data-volr-root] .volr\\:text-2xl{font-size:var(--volr-text-2xl);line-height:var(--volr-tw-leading,var(--volr-text-2xl--line-height))}[data-volr-root] .volr\\:text-8xl{font-size:var(--volr-text-8xl);line-height:var(--volr-tw-leading,var(--volr-text-8xl--line-height))}[data-volr-root] .volr\\:text-base{font-size:var(--volr-text-base);line-height:var(--volr-tw-leading,var(--volr-text-base--line-height))}[data-volr-root] .volr\\:text-lg{font-size:var(--volr-text-lg);line-height:var(--volr-tw-leading,var(--volr-text-lg--line-height))}[data-volr-root] .volr\\:text-sm{font-size:var(--volr-text-sm);line-height:var(--volr-tw-leading,var(--volr-text-sm--line-height))}[data-volr-root] .volr\\:text-xl{font-size:var(--volr-text-xl);line-height:var(--volr-tw-leading,var(--volr-text-xl--line-height))}[data-volr-root] .volr\\:text-xs{font-size:var(--volr-text-xs);line-height:var(--volr-tw-leading,var(--volr-text-xs--line-height))}[data-volr-root] .volr\\:leading-relaxed{--volr-tw-leading:var(--volr-leading-relaxed);line-height:var(--volr-leading-relaxed)}[data-volr-root] .volr\\:font-bold{--volr-tw-font-weight:var(--volr-font-weight-bold);font-weight:var(--volr-font-weight-bold)}[data-volr-root] .volr\\:font-medium{--volr-tw-font-weight:var(--volr-font-weight-medium);font-weight:var(--volr-font-weight-medium)}[data-volr-root] .volr\\:font-semibold{--volr-tw-font-weight:var(--volr-font-weight-semibold);font-weight:var(--volr-font-weight-semibold)}[data-volr-root] .volr\\:break-all{word-break:break-all}[data-volr-root] .volr\\:text-gray-500{color:var(--volr-color-gray-500)}[data-volr-root] .volr\\:text-gray-900{color:var(--volr-color-gray-900)}[data-volr-root] .volr\\:text-green-600{color:var(--volr-color-green-600)}[data-volr-root] .volr\\:text-red-500{color:var(--volr-color-red-500)}[data-volr-root] .volr\\:text-red-600{color:var(--volr-color-red-600)}[data-volr-root] .volr\\:text-red-700{color:var(--volr-color-red-700)}[data-volr-root] .volr\\:text-rose-700{color:var(--volr-color-rose-700)}[data-volr-root] .volr\\:text-rose-800{color:var(--volr-color-rose-800)}[data-volr-root] .volr\\:text-slate-400{color:var(--volr-color-slate-400)}[data-volr-root] .volr\\:text-slate-500{color:var(--volr-color-slate-500)}[data-volr-root] .volr\\:text-slate-600{color:var(--volr-color-slate-600)}[data-volr-root] .volr\\:text-slate-700{color:var(--volr-color-slate-700)}[data-volr-root] .volr\\:text-slate-900{color:var(--volr-color-slate-900)}[data-volr-root] .volr\\:text-white{color:var(--volr-color-white)}[data-volr-root] .volr\\:capitalize{text-transform:capitalize}[data-volr-root] .volr\\:underline{text-decoration-line:underline}[data-volr-root] .volr\\:opacity-0{opacity:0}[data-volr-root] .volr\\:opacity-30{opacity:.3}[data-volr-root] .volr\\:shadow-2xl{--volr-tw-shadow:0 25px 50px -12px var(--volr-tw-shadow-color,#00000040);box-shadow:var(--volr-tw-inset-shadow),var(--volr-tw-inset-ring-shadow),var(--volr-tw-ring-offset-shadow),var(--volr-tw-ring-shadow),var(--volr-tw-shadow)}[data-volr-root] .volr\\:shadow-lg{--volr-tw-shadow:0 10px 15px -3px var(--volr-tw-shadow-color,#0000001a),0 4px 6px -4px var(--volr-tw-shadow-color,#0000001a);box-shadow:var(--volr-tw-inset-shadow),var(--volr-tw-inset-ring-shadow),var(--volr-tw-ring-offset-shadow),var(--volr-tw-ring-shadow),var(--volr-tw-shadow)}[data-volr-root] .volr\\:shadow-sm{--volr-tw-shadow:0 1px 3px 0 var(--volr-tw-shadow-color,#0000001a),0 1px 2px -1px var(--volr-tw-shadow-color,#0000001a);box-shadow:var(--volr-tw-inset-shadow),var(--volr-tw-inset-ring-shadow),var(--volr-tw-ring-offset-shadow),var(--volr-tw-ring-shadow),var(--volr-tw-shadow)}[data-volr-root] .volr\\:shadow-xl{--volr-tw-shadow:0 20px 25px -5px var(--volr-tw-shadow-color,#0000001a),0 8px 10px -6px var(--volr-tw-shadow-color,#0000001a);box-shadow:var(--volr-tw-inset-shadow),var(--volr-tw-inset-ring-shadow),var(--volr-tw-ring-offset-shadow),var(--volr-tw-ring-shadow),var(--volr-tw-shadow)}[data-volr-root] .volr\\:shadow-emerald-500\\/50{--volr-tw-shadow-color:var(--volr-color-emerald-500)}@supports (color:color-mix(in lab, red, red)){[data-volr-root] .volr\\:shadow-emerald-500\\/50{--volr-tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--volr-color-emerald-500)50%,transparent)var(--volr-tw-shadow-alpha),transparent)}}[data-volr-root] .volr\\:blur-2xl{--volr-tw-blur:blur(var(--volr-blur-2xl));filter:var(--volr-tw-blur,)var(--volr-tw-brightness,)var(--volr-tw-contrast,)var(--volr-tw-grayscale,)var(--volr-tw-hue-rotate,)var(--volr-tw-invert,)var(--volr-tw-saturate,)var(--volr-tw-sepia,)var(--volr-tw-drop-shadow,)}[data-volr-root] .volr\\:transition-all{transition-property:all;transition-timing-function:var(--volr-tw-ease,var(--volr-default-transition-timing-function));transition-duration:var(--volr-tw-duration,var(--volr-default-transition-duration))}[data-volr-root] .volr\\:transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--volr-tw-gradient-from,--volr-tw-gradient-via,--volr-tw-gradient-to;transition-timing-function:var(--volr-tw-ease,var(--volr-default-transition-timing-function));transition-duration:var(--volr-tw-duration,var(--volr-default-transition-duration))}[data-volr-root] .volr\\:duration-200{--volr-tw-duration:.2s;transition-duration:.2s}[data-volr-root] .volr\\:duration-300{--volr-tw-duration:.3s;transition-duration:.3s}[data-volr-root] .volr\\:duration-500{--volr-tw-duration:.5s;transition-duration:.5s}[data-volr-root] .volr\\:ease-out{--volr-tw-ease:var(--volr-ease-out);transition-timing-function:var(--volr-ease-out)}[data-volr-root] .volr\\:outline-none{--volr-tw-outline-style:none;outline-style:none}@media (hover:hover){[data-volr-root] .volr\\:hover\\:border-slate-200:hover{border-color:var(--volr-color-slate-200)}[data-volr-root] .volr\\:hover\\:bg-slate-50:hover{background-color:var(--volr-color-slate-50)}}[data-volr-root] .volr\\:disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}[data-volr-root] .volr\\:disabled\\:bg-slate-50:disabled{background-color:var(--volr-color-slate-50)}@layer base{[data-volr-root]{color:inherit;font-family:inherit;font-size:1rem;line-height:1.5}[data-volr-root],[data-volr-root] *,[data-volr-root] :before,[data-volr-root] :after{box-sizing:border-box}[data-volr-root] *{font-family:inherit}[data-volr-root] button,[data-volr-root] input,[data-volr-root] select,[data-volr-root] textarea{color:inherit;background-color:#0000}[data-volr-root] button{cursor:pointer;background-color:#0000}[data-volr-root] input::placeholder{color:#94a3b8}[data-volr-root] h1,[data-volr-root] h2,[data-volr-root] h3{color:#0f172a;margin:0;font-weight:700}[data-volr-root] h1{font-size:1.875rem;line-height:2.25rem}[data-volr-root] h2{font-size:1.5rem;line-height:2rem}[data-volr-root] h3{font-size:1.25rem;line-height:1.75rem}[data-volr-root] p{margin:0}}@layer components{[data-volr-root] .volr-dialog-overlay{inset:calc(var(--volr-spacing)*0);z-index:40;background-color:var(--volr-color-black);position:fixed}@supports (color:color-mix(in lab, red, red)){[data-volr-root] .volr-dialog-overlay{background-color:color-mix(in oklab,var(--volr-color-black)45%,transparent)}}[data-volr-root] .volr-dialog-content{z-index:50;border-radius:var(--volr-radius-2xl);border-style:var(--volr-tw-border-style);border-width:1px;border-color:var(--volr-color-slate-300);background-color:var(--volr-color-white);padding:calc(var(--volr-spacing)*7);--volr-tw-shadow:0 20px 25px -5px var(--volr-tw-shadow-color,#0000001a),0 8px 10px -6px var(--volr-tw-shadow-color,#0000001a);box-shadow:var(--volr-tw-inset-shadow),var(--volr-tw-inset-ring-shadow),var(--volr-tw-ring-offset-shadow),var(--volr-tw-ring-shadow),var(--volr-tw-shadow);width:calc(100% - 2rem);max-width:28rem;max-height:85vh;position:fixed;top:50%;left:50%;overflow-y:auto;transform:translate(-50%,-50%)}@media (max-width:640px){[data-volr-root] .volr-dialog-content{top:auto;right:calc(var(--volr-spacing)*0);bottom:calc(var(--volr-spacing)*0);left:calc(var(--volr-spacing)*0);border-radius:1.25rem 1.25rem 0 0;width:100%;max-width:100%;margin:0 auto;transform:translateY(0)}}[data-volr-root] .volr-dialog-close{top:calc(var(--volr-spacing)*4);right:calc(var(--volr-spacing)*4);height:calc(var(--volr-spacing)*8);width:calc(var(--volr-spacing)*8);color:var(--volr-color-slate-400);cursor:pointer;background-color:#0000;border:none;border-radius:3.40282e38px;justify-content:center;align-items:center;display:inline-flex;position:absolute}[data-volr-root] .volr-dialog-close:hover{color:#475569;background-color:#f1f5f9}[data-volr-root] .volr-dialog-close:focus-visible{outline:none;box-shadow:0 0 0 2px #94a3b8b3}[data-volr-root] .volr-dialog-close-icon{height:calc(var(--volr-spacing)*4);width:calc(var(--volr-spacing)*4)}[data-volr-root] .volr-email-input{width:100%;color:inherit;background-color:#fff;border:1px solid #cbd5e1;border-radius:.5rem;outline:none;padding:.75rem .75rem .75rem 2.75rem;font-size:1rem;line-height:1.5}[data-volr-root] .volr-email-input::placeholder{color:#94a3b8}[data-volr-root] .volr-email-input:focus{border-color:#cbd5e1;box-shadow:0 0 0 2px #94a3b8b3}[data-volr-root] .volr-option-button{cursor:pointer;background-color:#fff;border:1px solid #e2e8f0;border-radius:.5rem;align-items:center;gap:.75rem;width:100%;padding:.75rem;transition:background-color .15s ease-out,border-color .15s ease-out,box-shadow .15s ease-out;display:flex}[data-volr-root] .volr-option-button:hover{background-color:#f8fafc;border-color:#e2e8f0}[data-volr-root] .volr-option-button:focus-visible{outline:none;box-shadow:0 0 0 2px #94a3b8b3}}@layer utilities{[data-volr-root] .volr-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}}@property --volr-tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --volr-tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --volr-tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --volr-tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --volr-tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --volr-tw-gradient-position{syntax:"*";inherits:false}@property --volr-tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --volr-tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --volr-tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --volr-tw-gradient-stops{syntax:"*";inherits:false}@property --volr-tw-gradient-via-stops{syntax:"*";inherits:false}@property --volr-tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --volr-tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --volr-tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --volr-tw-leading{syntax:"*";inherits:false}@property --volr-tw-font-weight{syntax:"*";inherits:false}@property --volr-tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --volr-tw-shadow-color{syntax:"*";inherits:false}@property --volr-tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --volr-tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --volr-tw-inset-shadow-color{syntax:"*";inherits:false}@property --volr-tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --volr-tw-ring-color{syntax:"*";inherits:false}@property --volr-tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --volr-tw-inset-ring-color{syntax:"*";inherits:false}@property --volr-tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --volr-tw-ring-inset{syntax:"*";inherits:false}@property --volr-tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --volr-tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --volr-tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --volr-tw-blur{syntax:"*";inherits:false}@property --volr-tw-brightness{syntax:"*";inherits:false}@property --volr-tw-contrast{syntax:"*";inherits:false}@property --volr-tw-grayscale{syntax:"*";inherits:false}@property --volr-tw-hue-rotate{syntax:"*";inherits:false}@property --volr-tw-invert{syntax:"*";inherits:false}@property --volr-tw-opacity{syntax:"*";inherits:false}@property --volr-tw-saturate{syntax:"*";inherits:false}@property --volr-tw-sepia{syntax:"*";inherits:false}@property --volr-tw-drop-shadow{syntax:"*";inherits:false}@property --volr-tw-drop-shadow-color{syntax:"*";inherits:false}@property --volr-tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --volr-tw-drop-shadow-size{syntax:"*";inherits:false}@property --volr-tw-duration{syntax:"*";inherits:false}@property --volr-tw-ease{syntax:"*";inherits:false}@keyframes pulse{50%{opacity:.5}}';
|
|
2761
|
-
|
|
2762
|
-
// src/styles/inject-volr-styles.ts
|
|
2763
|
-
var injected = false;
|
|
2764
|
-
function ensureVolrStylesInjected() {
|
|
2765
|
-
if (typeof document === "undefined") return;
|
|
2766
|
-
if (injected) return;
|
|
2767
|
-
const id = "volr-sdk-styles";
|
|
2768
|
-
if (document.getElementById(id)) {
|
|
2769
|
-
injected = true;
|
|
2770
|
-
return;
|
|
2771
|
-
}
|
|
2772
|
-
const style = document.createElement("style");
|
|
2773
|
-
style.id = id;
|
|
2774
|
-
style.textContent = VOLR_SDK_CSS;
|
|
2775
|
-
if (document.body) {
|
|
2776
|
-
document.body.appendChild(style);
|
|
2777
|
-
} else {
|
|
2778
|
-
document.head.appendChild(style);
|
|
2779
|
-
}
|
|
2780
|
-
injected = true;
|
|
2781
|
-
}
|
|
2782
|
-
var VolrUIContext = React3__default.default.createContext(null);
|
|
2858
|
+
var VolrUIContext = React5__default.default.createContext(null);
|
|
2783
2859
|
var useVolrUI = () => {
|
|
2784
|
-
const context =
|
|
2860
|
+
const context = React5.useContext(VolrUIContext);
|
|
2785
2861
|
if (!context) {
|
|
2786
2862
|
throw new Error("useVolrUI must be used within VolrUIProvider");
|
|
2787
2863
|
}
|
|
@@ -2841,14 +2917,11 @@ var VolrUIProvider = ({
|
|
|
2841
2917
|
const providerPolicy = config.providerPolicy ?? {
|
|
2842
2918
|
enforceOnFirstLogin: true
|
|
2843
2919
|
};
|
|
2844
|
-
const [showOnboarding, setShowOnboarding] =
|
|
2845
|
-
const [keyStorageTypeError, setKeyStorageTypeError] =
|
|
2920
|
+
const [showOnboarding, setShowOnboarding] = React5.useState(false);
|
|
2921
|
+
const [keyStorageTypeError, setKeyStorageTypeError] = React5.useState(
|
|
2846
2922
|
null
|
|
2847
2923
|
);
|
|
2848
|
-
|
|
2849
|
-
ensureVolrStylesInjected();
|
|
2850
|
-
}, []);
|
|
2851
|
-
React3.useEffect(() => {
|
|
2924
|
+
React5.useEffect(() => {
|
|
2852
2925
|
if (providerPolicy.enforceOnFirstLogin !== false && !keyStorageType) {
|
|
2853
2926
|
const errorMessage = "keyStorageType must be specified in VolrUIProvider props. Please set keyStorageType prop in VolrUIProvider.";
|
|
2854
2927
|
console.error(errorMessage);
|
|
@@ -2912,9 +2985,9 @@ var VolrUIProvider = ({
|
|
|
2912
2985
|
};
|
|
2913
2986
|
function LoginModalPortal() {
|
|
2914
2987
|
const { isOpen, mode, close } = useVolrModal();
|
|
2915
|
-
const [portalRoot, setPortalRoot] =
|
|
2916
|
-
const [error, setError] =
|
|
2917
|
-
|
|
2988
|
+
const [portalRoot, setPortalRoot] = React5.useState(null);
|
|
2989
|
+
const [error, setError] = React5.useState(null);
|
|
2990
|
+
React5.useEffect(() => {
|
|
2918
2991
|
if (typeof window === "undefined") return;
|
|
2919
2992
|
let root = document.getElementById("volr-modal-root");
|
|
2920
2993
|
if (!root) {
|
|
@@ -2973,8 +3046,8 @@ function LoginModalPortal() {
|
|
|
2973
3046
|
}
|
|
2974
3047
|
function DepositModalPortal() {
|
|
2975
3048
|
const { isOpen, mode, close } = useVolrModal();
|
|
2976
|
-
const [portalRoot, setPortalRoot] =
|
|
2977
|
-
|
|
3049
|
+
const [portalRoot, setPortalRoot] = React5.useState(null);
|
|
3050
|
+
React5.useEffect(() => {
|
|
2978
3051
|
if (typeof window === "undefined") return;
|
|
2979
3052
|
let root = document.getElementById("volr-modal-root");
|
|
2980
3053
|
if (!root) {
|
|
@@ -3003,7 +3076,7 @@ function OnboardingChecker({
|
|
|
3003
3076
|
}) {
|
|
3004
3077
|
const { user, provider, isLoading } = react.useVolr();
|
|
3005
3078
|
const { isOpen: isLoginModalOpen } = useVolrModal();
|
|
3006
|
-
|
|
3079
|
+
React5.useEffect(() => {
|
|
3007
3080
|
if (isLoading) {
|
|
3008
3081
|
return;
|
|
3009
3082
|
}
|
|
@@ -3042,7 +3115,7 @@ function OnboardingChecker({
|
|
|
3042
3115
|
}
|
|
3043
3116
|
function useSwitchNetwork() {
|
|
3044
3117
|
const { client } = react.useInternalAuth();
|
|
3045
|
-
return
|
|
3118
|
+
return React5.useCallback(
|
|
3046
3119
|
async (chainId) => {
|
|
3047
3120
|
if (typeof window === "undefined" || !window.ethereum) {
|
|
3048
3121
|
throw new Error("No wallet found");
|