@plyaz/ui 0.8.3 → 0.8.5
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/{Textarea-CS65LAew.js → Textarea-BfrJwucE.js} +33 -33
- package/dist/{Textarea-CN7GN2Hu.cjs → Textarea-DIEPzlTz.cjs} +3 -3
- package/dist/client/calendar.cjs.js +1 -1
- package/dist/client/calendar.es.js +1 -1
- package/dist/client/carousel.cjs.js +1 -1
- package/dist/client/carousel.es.js +1 -1
- package/dist/client/combobox.cjs.js +1 -1
- package/dist/client/combobox.es.js +1 -1
- package/dist/client/input-otp.cjs.js +1 -1
- package/dist/client/input-otp.es.js +31 -23
- package/dist/client/reveal-text.cjs.js +1 -1
- package/dist/client/reveal-text.es.js +276 -276
- package/dist/client/slider.cjs.js +1 -1
- package/dist/client/slider.es.js +11 -11
- package/dist/client/toaster.cjs.js +1 -1
- package/dist/client/toaster.es.js +34 -8
- package/dist/client.cjs.js +1 -1
- package/dist/client.es.js +1 -1
- package/dist/index.cjs.js +27 -6
- package/dist/index.es.js +2139 -439
- package/dist/types/components/Badge/Badge.d.ts.map +1 -1
- package/dist/types/components/DataTable/DataTable.d.ts +8 -0
- package/dist/types/components/DataTable/DataTable.d.ts.map +1 -0
- package/dist/types/components/DataTable/DataTable.stories.d.ts +27 -0
- package/dist/types/components/DataTable/DataTable.stories.d.ts.map +1 -0
- package/dist/types/components/InputOTP/InputOTP.d.ts.map +1 -1
- package/dist/types/components/Table/Table.stories.d.ts.map +1 -1
- package/dist/types/components/Toaster/Toaster.d.ts +1 -1
- package/dist/types/components/Toaster/Toaster.d.ts.map +1 -1
- package/dist/types/components/Toaster/Toaster.stories.d.ts.map +1 -1
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/components/index.d.ts.map +1 -1
- package/dist/ui.css +1 -1
- package/package.json +2 -1
|
@@ -229,10 +229,10 @@ const de = 10, _e = se(
|
|
|
229
229
|
);
|
|
230
230
|
_e.displayName = "AuroraText";
|
|
231
231
|
var fe = Object.defineProperty, n = (e, t) => fe(e, "name", { value: t, configurable: !0 }), O = /* @__PURE__ */ new Map(), S = /* @__PURE__ */ new Map();
|
|
232
|
-
function
|
|
232
|
+
function C(e, t) {
|
|
233
233
|
return `${e}:${JSON.stringify(t ?? {})}`;
|
|
234
234
|
}
|
|
235
|
-
n(
|
|
235
|
+
n(C, "getFormatterKey");
|
|
236
236
|
function $(e) {
|
|
237
237
|
const t = typeof e == "string" || typeof e == "number" ? new Date(e) : e;
|
|
238
238
|
return t instanceof Date && !Number.isNaN(t.getTime()) ? t : null;
|
|
@@ -243,7 +243,7 @@ function ge(e, t = "en", a) {
|
|
|
243
243
|
const r = $(e);
|
|
244
244
|
if (!r)
|
|
245
245
|
return "";
|
|
246
|
-
const i =
|
|
246
|
+
const i = C(t, a);
|
|
247
247
|
return O.has(i) || O.set(i, new Intl.DateTimeFormat(t, a)), ((s = O.get(i)) == null ? void 0 : s.format(r)) ?? "";
|
|
248
248
|
}
|
|
249
249
|
n(ge, "formatDate");
|
|
@@ -251,7 +251,7 @@ function pe(e, t = "en", a) {
|
|
|
251
251
|
var i;
|
|
252
252
|
if (typeof e != "number" || Number.isNaN(e))
|
|
253
253
|
return "";
|
|
254
|
-
const r =
|
|
254
|
+
const r = C(t, a);
|
|
255
255
|
return S.has(r) || S.set(r, new Intl.NumberFormat(t, a)), ((i = S.get(r)) == null ? void 0 : i.format(e)) ?? "";
|
|
256
256
|
}
|
|
257
257
|
n(pe, "formatNumber");
|
|
@@ -260,22 +260,22 @@ var I = {
|
|
|
260
260
|
supportedLocales: ["en", "es", "fr", "it", "pt-BR", "pt-PT"],
|
|
261
261
|
fallbackLocale: "en"
|
|
262
262
|
};
|
|
263
|
-
function
|
|
263
|
+
function me() {
|
|
264
264
|
return I.supportedLocales;
|
|
265
265
|
}
|
|
266
|
-
n(
|
|
267
|
-
function
|
|
266
|
+
n(me, "getSupportedLanguages");
|
|
267
|
+
function ve() {
|
|
268
268
|
return I.defaultLocale;
|
|
269
269
|
}
|
|
270
|
-
n(
|
|
271
|
-
function
|
|
270
|
+
n(ve, "getDefaultLanguage");
|
|
271
|
+
function he() {
|
|
272
272
|
return I.fallbackLocale;
|
|
273
273
|
}
|
|
274
|
-
n(
|
|
275
|
-
function
|
|
274
|
+
n(he, "getFallbackLanguage");
|
|
275
|
+
function be(e) {
|
|
276
276
|
return I.supportedLocales.includes(e);
|
|
277
277
|
}
|
|
278
|
-
n(
|
|
278
|
+
n(be, "isSupportedLanguage");
|
|
279
279
|
var g = /* @__PURE__ */ new Map();
|
|
280
280
|
function xe({
|
|
281
281
|
value: e,
|
|
@@ -291,10 +291,10 @@ function xe({
|
|
|
291
291
|
return o ? L(o, e) : "";
|
|
292
292
|
}
|
|
293
293
|
n(xe, "pluralize");
|
|
294
|
-
function
|
|
294
|
+
function y(e, t) {
|
|
295
295
|
return `${e}:${t}`;
|
|
296
296
|
}
|
|
297
|
-
n(
|
|
297
|
+
n(y, "getPluralRulesKey");
|
|
298
298
|
var Ee = /{count}|#/g;
|
|
299
299
|
function q(e, t) {
|
|
300
300
|
switch (t) {
|
|
@@ -324,7 +324,7 @@ function L(e, t) {
|
|
|
324
324
|
}
|
|
325
325
|
n(L, "replacePlaceholders");
|
|
326
326
|
function J(e, t) {
|
|
327
|
-
const a =
|
|
327
|
+
const a = y(e, t);
|
|
328
328
|
if (!g.has(a))
|
|
329
329
|
try {
|
|
330
330
|
g.set(a, new Intl.PluralRules(e, { type: t }));
|
|
@@ -335,7 +335,7 @@ function J(e, t) {
|
|
|
335
335
|
}
|
|
336
336
|
n(J, "getPluralRules");
|
|
337
337
|
function A(e, t) {
|
|
338
|
-
const a =
|
|
338
|
+
const a = y("en", t);
|
|
339
339
|
g.has(a) || g.set(a, new Intl.PluralRules("en", { type: t }));
|
|
340
340
|
const r = g.get(a) ?? A(a, t);
|
|
341
341
|
return g.set(e, r), r;
|
|
@@ -482,26 +482,26 @@ var X = /* @__PURE__ */ ((e) => (e.AUTH_INVALID_CREDENTIALS = "auth.invalid_cred
|
|
|
482
482
|
const r = new p(a.type);
|
|
483
483
|
return Object.assign(r, a), r;
|
|
484
484
|
}
|
|
485
|
-
}, n(p, "BaseError"), p),
|
|
485
|
+
}, n(p, "BaseError"), p), m, Re = (m = class extends u {
|
|
486
486
|
constructor(t, a = {}) {
|
|
487
487
|
super(t, a);
|
|
488
488
|
}
|
|
489
|
-
}, n(
|
|
489
|
+
}, n(m, "ValidationError"), m), v, Ae = (v = class extends u {
|
|
490
490
|
constructor(t, a = {}) {
|
|
491
491
|
super(t, a);
|
|
492
492
|
}
|
|
493
|
-
}, n(
|
|
494
|
-
|
|
493
|
+
}, n(v, "AuthError"), v), h;
|
|
494
|
+
h = class extends u {
|
|
495
495
|
constructor(t, a = {}) {
|
|
496
496
|
super(t, a);
|
|
497
497
|
}
|
|
498
|
-
}, n(
|
|
499
|
-
var
|
|
500
|
-
|
|
498
|
+
}, n(h, "ApiError");
|
|
499
|
+
var b;
|
|
500
|
+
b = class extends u {
|
|
501
501
|
constructor(t, a = {}) {
|
|
502
502
|
super(t, a);
|
|
503
503
|
}
|
|
504
|
-
}, n(
|
|
504
|
+
}, n(b, "BusinessError");
|
|
505
505
|
var x, ke = (x = class extends u {
|
|
506
506
|
constructor(t, a = {}) {
|
|
507
507
|
super(t, a);
|
|
@@ -586,11 +586,11 @@ function De(e) {
|
|
|
586
586
|
return e.toJSON();
|
|
587
587
|
}
|
|
588
588
|
n(De, "serializeError");
|
|
589
|
-
function
|
|
589
|
+
function Ce(e) {
|
|
590
590
|
return u.fromJSON(e);
|
|
591
591
|
}
|
|
592
|
-
n(
|
|
593
|
-
function
|
|
592
|
+
n(Ce, "deserializeError");
|
|
593
|
+
function ye(e) {
|
|
594
594
|
return e.map((t) => ({
|
|
595
595
|
field: t.field,
|
|
596
596
|
message: t.message,
|
|
@@ -601,7 +601,7 @@ function Ce(e) {
|
|
|
601
601
|
}
|
|
602
602
|
}));
|
|
603
603
|
}
|
|
604
|
-
n(
|
|
604
|
+
n(ye, "createValidationErrorDetails");
|
|
605
605
|
var f;
|
|
606
606
|
f = class {
|
|
607
607
|
constructor() {
|
|
@@ -782,14 +782,14 @@ function rt({ className: e, ...t }) {
|
|
|
782
782
|
);
|
|
783
783
|
}
|
|
784
784
|
const Ue = k(
|
|
785
|
-
"inline-flex items-center justify-center rounded-
|
|
785
|
+
"inline-flex items-center justify-center rounded-full border px-2 py-1 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden hover:opacity-80",
|
|
786
786
|
{
|
|
787
787
|
variants: {
|
|
788
788
|
variant: {
|
|
789
|
-
default: "
|
|
790
|
-
secondary: "border-transparent bg-
|
|
791
|
-
destructive: "
|
|
792
|
-
outline: "
|
|
789
|
+
default: "bg-orange-gradient text-white",
|
|
790
|
+
secondary: "border-transparent bg-primary text-secondary",
|
|
791
|
+
destructive: "bg-destructive text-white",
|
|
792
|
+
outline: "border-subtle text-secondary"
|
|
793
793
|
}
|
|
794
794
|
},
|
|
795
795
|
defaultVariants: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var oe=Object.defineProperty;var le=(e,t,
|
|
1
|
+
"use strict";var oe=Object.defineProperty;var le=(e,t,a)=>t in e?oe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a;var d=(e,t,a)=>le(e,typeof t!="symbol"?t+"":t,a);const l=require("react/jsx-runtime"),I=require("class-variance-authority"),_=require("./utils-IjLH3w2e.cjs"),ce=require("./Button-BoTQH4v8.cjs"),ue=require("react");require("@radix-ui/react-select");require("lucide-react");require("next-intl");const de=require("@radix-ui/react-slot");require("@radix-ui/react-separator");function Y({className:e,type:t,...a}){return l.jsx("input",{type:t,"data-slot":"input",className:_.cn(`
|
|
2
2
|
flex h-10 w-full min-w-0 rounded-sm border border-subtle bg-transparent
|
|
3
3
|
px-3 py-2 text-base transition-[color,box-shadow]
|
|
4
4
|
outline-none
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
focus-visible:ring-ring/50
|
|
16
16
|
`,`
|
|
17
17
|
aria-invalid:border-destructive aria-invalid:ring-destructive/20
|
|
18
|
-
`,e),...
|
|
18
|
+
`,e),...a,"data-testid":"input"})}function _e({className:e,...t}){return l.jsx("div",{"data-slot":"input-group",role:"group",className:_.cn("group/input-group border-subtle dark:bg-input/30 relative flex w-full items-center rounded-sm border transition-[color,box-shadow] outline-none","h-10 min-w-0 has-[>textarea]:h-auto","has-[>[data-align=inline-start]]:[&>input]:pl-3","has-[>[data-align=inline-end]]:[&>input]:pr-3","has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-2","has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-2","has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot=input-group-control]:focus-visible]:ring-[3px]","has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40","has-[[data-slot=input-group-control]:disabled]:opacity-50 has-[[data-slot=input-group-control]:disabled]:pointer-events-none has-[[data-slot=input-group-control]:disabled]:cursor-not-allowed",e),...t})}const fe=I.cva("text-muted-foreground flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium select-none [&>svg:not([class*='size-'])]:size-4 [&>kbd]:rounded-[calc(var(--radius)-5px)] group-data-[disabled=true]/input-group:opacity-50",{variants:{align:{"inline-start":"order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]","inline-end":"order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]","block-start":"order-first w-full justify-start px-3 pt-3 [.border-b]:pb-3 group-has-[>input]/input-group:pt-2.5","block-end":"order-last w-full justify-start px-3 pb-3 [.border-t]:pt-3 group-has-[>input]/input-group:pb-2.5"}},defaultVariants:{align:"inline-start"}});function ge({className:e,align:t="inline-start",...a}){const r=s=>{var o,c;s.target.closest("button")||(c=(o=s.currentTarget.parentElement)==null?void 0:o.querySelector("input"))==null||c.focus()},i=s=>{var o,c;if(s.key==="Enter"||s.key===" "){if(s.preventDefault(),s.target.closest("button"))return;(c=(o=s.currentTarget.parentElement)==null?void 0:o.querySelector("input"))==null||c.focus()}};return l.jsx("div",{role:"button",tabIndex:0,"data-slot":"input-group-addon","data-align":t,className:_.cn(fe({align:t}),e),onClick:r,onKeyDown:i,"aria-label":"Focus input field",...a})}const pe=I.cva("text-sm shadow-none flex gap-2 items-center",{variants:{size:{xs:"h-6 gap-1 px-2 rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-3.5 has-[>svg]:px-2",sm:"h-8 px-2.5 gap-1.5 rounded-md has-[>svg]:px-2.5","icon-xs":"size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}});function ve({className:e,type:t="button",variant:a="default",size:r="xs",...i}){return l.jsx(ce.Button,{type:t,"data-size":r,variant:a,className:_.cn(pe({size:r}),e),...i})}function me({className:e,...t}){return l.jsx("span",{className:_.cn("text-muted-foreground flex items-center gap-2 text-sm [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",e),...t})}function he({className:e,...t}){return l.jsx(Y,{"data-slot":"input-group-control",className:_.cn("flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent",e),...t})}function be({className:e,...t}){return l.jsx(se,{"data-slot":"input-group-control",className:_.cn("flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent",e),...t})}const xe=10,$=ue.memo(({children:e,className:t="",colors:a=["#FF0080","#7928CA","#0070F3","#38bdf8"],speed:r=1})=>{const i={backgroundImage:`linear-gradient(135deg, ${a.join(", ")}, ${a[0]})`,WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",animationDuration:`${xe/r}s`};return l.jsxs("span",{className:`
|
|
19
19
|
relative inline-block
|
|
20
20
|
${t}
|
|
21
21
|
`,"data-testid":"auroraText",children:[l.jsx("span",{className:"sr-only",children:e}),l.jsx("span",{className:`
|
|
22
22
|
relative animate-aurora bg-clip-text text-transparent
|
|
23
23
|
bg-[length:200%_auto]
|
|
24
|
-
`,style:i,"aria-hidden":"true",children:e})]})});$.displayName="AuroraText";var Ee=Object.defineProperty,n=(e,t)=>Ee(e,"name",{value:t,configurable:!0}),O=new Map,S=new Map;function y(e,t){return`${e}:${JSON.stringify(t??{})}`}n(y,"getFormatterKey");function W(e){const t=typeof e=="string"||typeof e=="number"?new Date(e):e;return t instanceof Date&&!Number.isNaN(t.getTime())?t:null}n(W,"parseDate");function J(e,t="en",r){var s;const a=W(e);if(!a)return"";const i=y(t,r);return O.has(i)||O.set(i,new Intl.DateTimeFormat(t,r)),((s=O.get(i))==null?void 0:s.format(a))??""}n(J,"formatDate");function Q(e,t="en",r){var i;if(typeof e!="number"||Number.isNaN(e))return"";const a=y(t,r);return S.has(a)||S.set(a,new Intl.NumberFormat(t,r)),((i=S.get(a))==null?void 0:i.format(e))??""}n(Q,"formatNumber");var k={defaultLocale:"en",supportedLocales:["en","es","fr","it","pt-BR","pt-PT"],fallbackLocale:"en"};function Ne(){return k.supportedLocales}n(Ne,"getSupportedLanguages");function Ae(){return k.defaultLocale}n(Ae,"getDefaultLanguage");function Re(){return k.fallbackLocale}n(Re,"getFallbackLanguage");function Ie(e){return k.supportedLocales.includes(e)}n(Ie,"isSupportedLanguage");var f=new Map;function ke({value:e,forms:t,lang:r,type:a="cardinal"}){if(!Z(e,t))return"";if(e===0&&t.zero)return L(t.zero,e);const s=ee(r,a).select(e),o=X(t,s)??t.other??Object.values(t)[0];return o?L(o,e):""}n(ke,"pluralize");function C(e,t){return`${e}:${t}`}n(C,"getPluralRulesKey");var Oe=/{count}|#/g;function X(e,t){switch(t){case"zero":return e.zero;case"one":return e.one;case"two":return e.two;case"few":return e.few;case"many":return e.many;case"other":return e.other;default:return}}n(X,"selectTemplate");function Z(e,t){return typeof e=="number"&&t&&typeof t=="object"}n(Z,"isValidInput");function L(e,t){return e.replaceAll(Oe,t.toString())}n(L,"replacePlaceholders");function ee(e,t){const r=C(e,t);if(!f.has(r))try{f.set(r,new Intl.PluralRules(e,{type:t}))}catch{return R(r,t)}return f.get(r)??R(r,t)}n(ee,"getPluralRules");function R(e,t){const r=C("en",t);f.has(r)||f.set(r,new Intl.PluralRules("en",{type:t}));const a=f.get(r)??R(r,t);return f.set(e,a),a}n(R,"getFallbackPluralRules");var D=null;function Se(e){D=e}n(Se,"setTranslationService");function w(){if(!D)throw new Error("Translation service not initialized. Make sure to call setTranslationService() first.");return D}n(w,"getTranslationService");function te(e,t){return t?e.replace(/\{(\w+)\}/g,(r,a)=>t[a]!==void 0?String(t[a]):r):e}n(te,"format");var re=(e=>(e.AUTH_INVALID_CREDENTIALS="auth.invalid_credentials",e.AUTH_ACCOUNT_LOCKED="auth.account_locked",e.AUTH_EMAIL_NOT_VERIFIED="auth.email_not_verified",e.AUTH_TOKEN_EXPIRED="auth.token_expired",e.AUTH_TOKEN_INVALID="auth.token_invalid",e.AUTH_INSUFFICIENT_PERMISSIONS="auth.insufficient_permissions",e.AUTH_EMAIL_TAKEN="auth.email_taken",e.AUTH_USERNAME_TAKEN="auth.username_taken",e.AUTH_WALLET_SIGNATURE_INVALID="auth.wallet_signature_invalid",e.VALIDATION_ERROR="validation.error",e.REQUIRED_FIELD_MISSING="validation.required_field_missing",e.INVALID_FORMAT="validation.invalid_format",e.INVALID_ENUM_VALUE="validation.invalid_enum_value",e.STRING_TOO_SHORT="validation.string_too_short",e.STRING_TOO_LONG="validation.string_too_long",e.NUMBER_TOO_SMALL="validation.number_too_small",e.NUMBER_TOO_LARGE="validation.number_too_large",e.ARRAY_TOO_SHORT="validation.array_too_short",e.ARRAY_TOO_LONG="validation.array_too_long",e.FILE_TOO_LARGE="validation.file_too_large",e.UNSUPPORTED_FILE_TYPE="validation.unsupported_file_type",e.DB_ENTITY_NOT_FOUND="database.entity_not_found",e.DB_DUPLICATE_ENTRY="database.duplicate_entry",e.DB_RELATION_VIOLATION="database.relation_violation",e.DB_CONNECTION_ERROR="database.connection_error",e.DB_TRANSACTION_FAILED="database.transaction_failed",e.BLOCKCHAIN_CONNECTION_ERROR="blockchain.connection_error",e.TRANSACTION_FAILED="blockchain.transaction_failed",e.WALLET_CONNECTION_ERROR="blockchain.wallet_connection_error",e.CONTRACT_INTERACTION_ERROR="blockchain.contract_interaction_error",e.INSUFFICIENT_FUNDS="blockchain.insufficient_funds",e.INTERNAL_SERVER_ERROR="system.internal_server_error",e.SERVICE_UNAVAILABLE="system.service_unavailable",e.EXTERNAL_SERVICE_ERROR="system.external_service_error",e.RATE_LIMIT_EXCEEDED="system.rate_limit_exceeded",e.FEATURE_DISABLED="system.feature_disabled",e.GENERIC_ERROR="generic.error",e.NOT_FOUND="generic.not_found",e.CONFLICT="generic.conflict",e.TIMEOUT="generic.timeout",e))(re||{}),U={"auth.invalid_credentials":"errors.auth.invalid_credentials","auth.account_locked":"errors.auth.account_locked","auth.email_not_verified":"errors.auth.email_not_verified","auth.token_expired":"errors.auth.token_expired","auth.token_invalid":"errors.auth.token_invalid","auth.insufficient_permissions":"errors.auth.insufficient_permissions","auth.email_taken":"errors.auth.email_taken","auth.username_taken":"errors.auth.username_taken","auth.wallet_signature_invalid":"errors.auth.wallet_signature_invalid"},V={"validation.error":"errors.validation.error","validation.required_field_missing":"errors.validation.required_field_missing","validation.invalid_format":"errors.validation.invalid_format","validation.invalid_enum_value":"errors.validation.invalid_enum_value","validation.string_too_short":"errors.validation.string_too_short","validation.string_too_long":"errors.validation.string_too_long","validation.number_too_small":"errors.validation.number_too_small","validation.number_too_large":"errors.validation.number_too_large","validation.array_too_short":"errors.validation.array_too_short","validation.array_too_long":"errors.validation.array_too_long","validation.file_too_large":"errors.validation.file_too_large","validation.unsupported_file_type":"errors.validation.unsupported_file_type"},B={"database.entity_not_found":"errors.database.entity_not_found","database.duplicate_entry":"errors.database.duplicate_entry","database.relation_violation":"errors.database.relation_violation","database.connection_error":"errors.database.connection_error","database.transaction_failed":"errors.database.transaction_failed"},j={"blockchain.connection_error":"errors.blockchain.connection_error","blockchain.transaction_failed":"errors.blockchain.transaction_failed","blockchain.wallet_connection_error":"errors.blockchain.wallet_connection_error","blockchain.contract_interaction_error":"errors.blockchain.contract_interaction_error","blockchain.insufficient_funds":"errors.blockchain.insufficient_funds"},G={"system.internal_server_error":"errors.system.internal_server_error","system.service_unavailable":"errors.system.service_unavailable","system.external_service_error":"errors.system.external_service_error","system.rate_limit_exceeded":"errors.system.rate_limit_exceeded","system.feature_disabled":"errors.system.feature_disabled"},z={"generic.error":"errors.general.internal_error","generic.not_found":"errors.general.not_found","generic.conflict":"errors.general.conflict","generic.timeout":"errors.general.timeout"},K={"auth.invalid_credentials":401,"auth.account_locked":423,"auth.email_not_verified":403,"auth.token_expired":401,"auth.token_invalid":401,"auth.insufficient_permissions":403,"auth.email_taken":409,"auth.username_taken":409,"auth.wallet_signature_invalid":401},M={"validation.error":400,"validation.required_field_missing":400,"validation.invalid_format":400,"validation.invalid_enum_value":400,"validation.string_too_short":400,"validation.string_too_long":400,"validation.number_too_small":400,"validation.number_too_large":400,"validation.array_too_short":400,"validation.array_too_long":400,"validation.file_too_large":400,"validation.unsupported_file_type":400},P={"database.entity_not_found":404,"database.duplicate_entry":409,"database.relation_violation":400,"database.connection_error":503,"database.transaction_failed":500},q={"blockchain.connection_error":503,"blockchain.transaction_failed":400,"blockchain.wallet_connection_error":503,"blockchain.contract_interaction_error":400,"blockchain.insufficient_funds":400},H={"system.internal_server_error":500,"system.service_unavailable":503,"system.external_service_error":502,"system.rate_limit_exceeded":429,"system.feature_disabled":503},T={"generic.error":500,"generic.not_found":404,"generic.conflict":409,"generic.timeout":408},p,u=(p=class extends Error{constructor(r,a={}){const{locale:i="en",params:s,details:o,cause:c}=a,A=F(r,i,s);super(A);d(this,"name");d(this,"type");d(this,"code");d(this,"statusCode");d(this,"timestamp");d(this,"details");d(this,"cause");d(this,"correlationId");this.name=this.constructor.name,this.type=r,this.message=A,this.code=r.replace(/\./g,"_").toUpperCase(),this.statusCode=ne(r),this.timestamp=new Date().toISOString(),this.details=o,this.cause=c,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}toJSON(){return{name:this.name,message:this.message,type:this.type,code:this.code,statusCode:this.statusCode,timestamp:this.timestamp,details:this.details,correlationId:this.correlationId}}static fromJSON(r){const a=new p(r.type);return Object.assign(a,r),a}},n(p,"BaseError"),p),v,Te=(v=class extends u{constructor(t,r={}){super(t,r)}},n(v,"ValidationError"),v),m,Le=(m=class extends u{constructor(t,r={}){super(t,r)}},n(m,"AuthError"),m),b;b=class extends u{constructor(t,r={}){super(t,r)}},n(b,"ApiError");var h;h=class extends u{constructor(t,r={}){super(t,r)}},n(h,"BusinessError");var x,De=(x=class extends u{constructor(t,r={}){super(t,r)}},n(x,"BlockchainError"),x),E;E=class extends u{constructor(t="generic.error",r={}){super(t,r)}},n(E,"GenericError");function F(e,t="en",r){try{const a=ae(e);return w().t(a,{lang:t,interpolation:r,defaultValue:`Error: ${e}`})}catch{return w().t("errors.general.internal_error",{lang:t,interpolation:r,defaultValue:"An internal server error occurred"})}}n(F,"translateError");function ae(e){return e in U?U[e]:e in V?V[e]:e in B?B[e]:e in j?j[e]:e in G?G[e]:e in z?z[e]:"errors.general.internal_error"}n(ae,"getTranslationKeyForErrorType");function ne(e){return e in K?K[e]:e in M?M[e]:e in P?P[e]:e in q?q[e]:e in H?H[e]:e in T?T[e]:T["system.internal_server_error"]}n(ne,"getStatusCodeForType");function we(e,t="en",r){if(typeof e=="string")return te(e,r);if(e instanceof u)return e.message;const a=e;return a.type&&Object.values(re).includes(a.type)?F(a.type,t,r):e.message||"An unknown error occurred"}n(we,"formatErrorMessage");function ye(e,t){const r=new Date().toISOString();return e instanceof u?{statusCode:e.statusCode,errorCode:e.code,message:e.message,correlationId:t??e.correlationId,timestamp:e.timestamp||r}:{statusCode:500,errorCode:"INTERNAL_SERVER_ERROR",message:e.message||"An internal server error occurred",correlationId:t,timestamp:r}}n(ye,"createErrorResponse");function Ce(e,t){return e instanceof u&&e.type===t}n(Ce,"isErrorType");function Fe(e){return e instanceof Te||e instanceof u&&e.type.startsWith("validation.")}n(Fe,"isValidationError");function Ue(e){return e instanceof Le||e instanceof u&&e.type.startsWith("auth.")}n(Ue,"isAuthError");function Ve(e){return e instanceof De||e instanceof u&&e.type.startsWith("blockchain.")}n(Ve,"isBlockchainError");function Be(e){return e.toJSON()}n(Be,"serializeError");function je(e){return u.fromJSON(e)}n(je,"deserializeError");function Ge(e){return e.map(t=>({field:t.field,message:t.message,errorCode:"VALIDATION_ERROR",context:{valueGiven:t.value,constraints:t.constraints}}))}n(Ge,"createValidationErrorDetails");var g;g=class{constructor(){d(this,"fallbackLocale");this.fallbackLocale="en"}static getInstance(){return g.instance||(g.instance=new g),g.instance}detectLocale(t){return t?this.detectFromRequest(t):this.fallbackLocale}detectFromRequest(t){var s,o,c;const r=(s=t.url.split("?")[1])==null?void 0:s.split("=")[1],a=t.headers.get("accept-language"),i=(c=(o=t.headers.get("cookie"))==null?void 0:o.split("; ").find(A=>A.startsWith("locale=")))==null?void 0:c.split("=")[1];return r??i??this.parseAcceptLanguage(a??"")??this.fallbackLocale}parseAcceptLanguage(t){if(!t)return null;let r=null,a=0;for(const i of t.split(",")){const{lang:s,q:o}=this.parseLangAndQ(i.trim());if(o>a&&(a=o,r=s,o===1))break}return r}parseLangAndQ(t){const r=t.indexOf(";"),a=r===-1?t:t.slice(0,Math.max(0,r));let i=1;if(r!==-1){const s=/q=(?<q>[\d.]+)/.exec(t.slice(r+1));i=s!=null&&s.groups?Number.parseFloat(s.groups.q)||0:1}return{lang:a,q:i}}setFallbackLocale(t){this.fallbackLocale=t}},n(g,"LocaleDetector"),d(g,"instance");var N;N=class{constructor(t){d(this,"namespaces");this.namespaces=t?new Map(t):new Map}addNamespace(t,r){if(!ie(t))throw new Error("Invalid namespace name");this.namespaces.set(t,r)}getNamespace(t){return this.namespaces.get(t)}getAllNamespaces(){return[...this.namespaces.keys()]}mergeNamespaces(t,r){const a=this.namespaces.get(t)??{},i=this.namespaces.get(r)??{};this.namespaces.set(t,{...a,...i})}validateNamespace(t,r){const a=this.namespaces.get(t);return a?r?Object.entries(r).every(([i,s])=>{var c;const o=(c=Object.getOwnPropertyDescriptor(a,i))==null?void 0:c.value;return o!==void 0&&typeof o===s}):!0:!1}},n(N,"NamespaceManager");function ie(e){return/^\w+$/.test(e)}n(ie,"isSafeKey");const ze=I.cva("relative w-full rounded-sm border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-5 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive border-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"}},defaultVariants:{variant:"default"}});function Ke({className:e,variant:t,...r}){return l.jsx("div",{"data-slot":"alert",role:"alert",className:_.cn(ze({variant:t}),e),...r})}function Me({className:e,...t}){return l.jsx("div",{"data-slot":"alert-title",className:_.cn("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",e),...t})}function Pe({className:e,...t}){return l.jsx("div",{"data-slot":"alert-description",className:_.cn("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",e),...t})}const qe=I.cva("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function He({className:e,variant:t,asChild:r=!1,...a}){const i=r?de.Slot:"span";return l.jsx(i,{"data-slot":"badge",className:_.cn(qe({variant:t}),e),...a})}function se({className:e,...t}){return l.jsx("textarea",{"data-slot":"textarea",className:_.cn("border-subtle text-secondary bg-background placeholder:text-accent-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 aria-invalid:border-destructive flex field-sizing-content min-h-16 w-full rounded-sm border px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 disabled:placeholder:text-secondary-foreground md:text-sm",e),...t})}exports.Alert=Ke;exports.AlertDescription=Pe;exports.AlertTitle=Me;exports.AuroraText=$;exports.Badge=He;exports.Input=Y;exports.InputGroup=_e;exports.InputGroupAddon=fe;exports.InputGroupButton=ve;exports.InputGroupInput=be;exports.InputGroupText=me;exports.InputGroupTextarea=he;exports.Textarea=se;exports.formatDate=J;exports.formatNumber=Q;
|
|
24
|
+
`,style:i,"aria-hidden":"true",children:e})]})});$.displayName="AuroraText";var Ee=Object.defineProperty,n=(e,t)=>Ee(e,"name",{value:t,configurable:!0}),O=new Map,S=new Map;function y(e,t){return`${e}:${JSON.stringify(t??{})}`}n(y,"getFormatterKey");function W(e){const t=typeof e=="string"||typeof e=="number"?new Date(e):e;return t instanceof Date&&!Number.isNaN(t.getTime())?t:null}n(W,"parseDate");function J(e,t="en",a){var s;const r=W(e);if(!r)return"";const i=y(t,a);return O.has(i)||O.set(i,new Intl.DateTimeFormat(t,a)),((s=O.get(i))==null?void 0:s.format(r))??""}n(J,"formatDate");function Q(e,t="en",a){var i;if(typeof e!="number"||Number.isNaN(e))return"";const r=y(t,a);return S.has(r)||S.set(r,new Intl.NumberFormat(t,a)),((i=S.get(r))==null?void 0:i.format(e))??""}n(Q,"formatNumber");var k={defaultLocale:"en",supportedLocales:["en","es","fr","it","pt-BR","pt-PT"],fallbackLocale:"en"};function Ne(){return k.supportedLocales}n(Ne,"getSupportedLanguages");function Ae(){return k.defaultLocale}n(Ae,"getDefaultLanguage");function Re(){return k.fallbackLocale}n(Re,"getFallbackLanguage");function Ie(e){return k.supportedLocales.includes(e)}n(Ie,"isSupportedLanguage");var g=new Map;function ke({value:e,forms:t,lang:a,type:r="cardinal"}){if(!Z(e,t))return"";if(e===0&&t.zero)return L(t.zero,e);const s=ee(a,r).select(e),o=X(t,s)??t.other??Object.values(t)[0];return o?L(o,e):""}n(ke,"pluralize");function C(e,t){return`${e}:${t}`}n(C,"getPluralRulesKey");var Oe=/{count}|#/g;function X(e,t){switch(t){case"zero":return e.zero;case"one":return e.one;case"two":return e.two;case"few":return e.few;case"many":return e.many;case"other":return e.other;default:return}}n(X,"selectTemplate");function Z(e,t){return typeof e=="number"&&t&&typeof t=="object"}n(Z,"isValidInput");function L(e,t){return e.replaceAll(Oe,t.toString())}n(L,"replacePlaceholders");function ee(e,t){const a=C(e,t);if(!g.has(a))try{g.set(a,new Intl.PluralRules(e,{type:t}))}catch{return R(a,t)}return g.get(a)??R(a,t)}n(ee,"getPluralRules");function R(e,t){const a=C("en",t);g.has(a)||g.set(a,new Intl.PluralRules("en",{type:t}));const r=g.get(a)??R(a,t);return g.set(e,r),r}n(R,"getFallbackPluralRules");var D=null;function Se(e){D=e}n(Se,"setTranslationService");function w(){if(!D)throw new Error("Translation service not initialized. Make sure to call setTranslationService() first.");return D}n(w,"getTranslationService");function te(e,t){return t?e.replace(/\{(\w+)\}/g,(a,r)=>t[r]!==void 0?String(t[r]):a):e}n(te,"format");var ae=(e=>(e.AUTH_INVALID_CREDENTIALS="auth.invalid_credentials",e.AUTH_ACCOUNT_LOCKED="auth.account_locked",e.AUTH_EMAIL_NOT_VERIFIED="auth.email_not_verified",e.AUTH_TOKEN_EXPIRED="auth.token_expired",e.AUTH_TOKEN_INVALID="auth.token_invalid",e.AUTH_INSUFFICIENT_PERMISSIONS="auth.insufficient_permissions",e.AUTH_EMAIL_TAKEN="auth.email_taken",e.AUTH_USERNAME_TAKEN="auth.username_taken",e.AUTH_WALLET_SIGNATURE_INVALID="auth.wallet_signature_invalid",e.VALIDATION_ERROR="validation.error",e.REQUIRED_FIELD_MISSING="validation.required_field_missing",e.INVALID_FORMAT="validation.invalid_format",e.INVALID_ENUM_VALUE="validation.invalid_enum_value",e.STRING_TOO_SHORT="validation.string_too_short",e.STRING_TOO_LONG="validation.string_too_long",e.NUMBER_TOO_SMALL="validation.number_too_small",e.NUMBER_TOO_LARGE="validation.number_too_large",e.ARRAY_TOO_SHORT="validation.array_too_short",e.ARRAY_TOO_LONG="validation.array_too_long",e.FILE_TOO_LARGE="validation.file_too_large",e.UNSUPPORTED_FILE_TYPE="validation.unsupported_file_type",e.DB_ENTITY_NOT_FOUND="database.entity_not_found",e.DB_DUPLICATE_ENTRY="database.duplicate_entry",e.DB_RELATION_VIOLATION="database.relation_violation",e.DB_CONNECTION_ERROR="database.connection_error",e.DB_TRANSACTION_FAILED="database.transaction_failed",e.BLOCKCHAIN_CONNECTION_ERROR="blockchain.connection_error",e.TRANSACTION_FAILED="blockchain.transaction_failed",e.WALLET_CONNECTION_ERROR="blockchain.wallet_connection_error",e.CONTRACT_INTERACTION_ERROR="blockchain.contract_interaction_error",e.INSUFFICIENT_FUNDS="blockchain.insufficient_funds",e.INTERNAL_SERVER_ERROR="system.internal_server_error",e.SERVICE_UNAVAILABLE="system.service_unavailable",e.EXTERNAL_SERVICE_ERROR="system.external_service_error",e.RATE_LIMIT_EXCEEDED="system.rate_limit_exceeded",e.FEATURE_DISABLED="system.feature_disabled",e.GENERIC_ERROR="generic.error",e.NOT_FOUND="generic.not_found",e.CONFLICT="generic.conflict",e.TIMEOUT="generic.timeout",e))(ae||{}),U={"auth.invalid_credentials":"errors.auth.invalid_credentials","auth.account_locked":"errors.auth.account_locked","auth.email_not_verified":"errors.auth.email_not_verified","auth.token_expired":"errors.auth.token_expired","auth.token_invalid":"errors.auth.token_invalid","auth.insufficient_permissions":"errors.auth.insufficient_permissions","auth.email_taken":"errors.auth.email_taken","auth.username_taken":"errors.auth.username_taken","auth.wallet_signature_invalid":"errors.auth.wallet_signature_invalid"},V={"validation.error":"errors.validation.error","validation.required_field_missing":"errors.validation.required_field_missing","validation.invalid_format":"errors.validation.invalid_format","validation.invalid_enum_value":"errors.validation.invalid_enum_value","validation.string_too_short":"errors.validation.string_too_short","validation.string_too_long":"errors.validation.string_too_long","validation.number_too_small":"errors.validation.number_too_small","validation.number_too_large":"errors.validation.number_too_large","validation.array_too_short":"errors.validation.array_too_short","validation.array_too_long":"errors.validation.array_too_long","validation.file_too_large":"errors.validation.file_too_large","validation.unsupported_file_type":"errors.validation.unsupported_file_type"},B={"database.entity_not_found":"errors.database.entity_not_found","database.duplicate_entry":"errors.database.duplicate_entry","database.relation_violation":"errors.database.relation_violation","database.connection_error":"errors.database.connection_error","database.transaction_failed":"errors.database.transaction_failed"},j={"blockchain.connection_error":"errors.blockchain.connection_error","blockchain.transaction_failed":"errors.blockchain.transaction_failed","blockchain.wallet_connection_error":"errors.blockchain.wallet_connection_error","blockchain.contract_interaction_error":"errors.blockchain.contract_interaction_error","blockchain.insufficient_funds":"errors.blockchain.insufficient_funds"},G={"system.internal_server_error":"errors.system.internal_server_error","system.service_unavailable":"errors.system.service_unavailable","system.external_service_error":"errors.system.external_service_error","system.rate_limit_exceeded":"errors.system.rate_limit_exceeded","system.feature_disabled":"errors.system.feature_disabled"},z={"generic.error":"errors.general.internal_error","generic.not_found":"errors.general.not_found","generic.conflict":"errors.general.conflict","generic.timeout":"errors.general.timeout"},K={"auth.invalid_credentials":401,"auth.account_locked":423,"auth.email_not_verified":403,"auth.token_expired":401,"auth.token_invalid":401,"auth.insufficient_permissions":403,"auth.email_taken":409,"auth.username_taken":409,"auth.wallet_signature_invalid":401},M={"validation.error":400,"validation.required_field_missing":400,"validation.invalid_format":400,"validation.invalid_enum_value":400,"validation.string_too_short":400,"validation.string_too_long":400,"validation.number_too_small":400,"validation.number_too_large":400,"validation.array_too_short":400,"validation.array_too_long":400,"validation.file_too_large":400,"validation.unsupported_file_type":400},P={"database.entity_not_found":404,"database.duplicate_entry":409,"database.relation_violation":400,"database.connection_error":503,"database.transaction_failed":500},q={"blockchain.connection_error":503,"blockchain.transaction_failed":400,"blockchain.wallet_connection_error":503,"blockchain.contract_interaction_error":400,"blockchain.insufficient_funds":400},H={"system.internal_server_error":500,"system.service_unavailable":503,"system.external_service_error":502,"system.rate_limit_exceeded":429,"system.feature_disabled":503},T={"generic.error":500,"generic.not_found":404,"generic.conflict":409,"generic.timeout":408},p,u=(p=class extends Error{constructor(a,r={}){const{locale:i="en",params:s,details:o,cause:c}=r,A=F(a,i,s);super(A);d(this,"name");d(this,"type");d(this,"code");d(this,"statusCode");d(this,"timestamp");d(this,"details");d(this,"cause");d(this,"correlationId");this.name=this.constructor.name,this.type=a,this.message=A,this.code=a.replace(/\./g,"_").toUpperCase(),this.statusCode=ne(a),this.timestamp=new Date().toISOString(),this.details=o,this.cause=c,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}toJSON(){return{name:this.name,message:this.message,type:this.type,code:this.code,statusCode:this.statusCode,timestamp:this.timestamp,details:this.details,correlationId:this.correlationId}}static fromJSON(a){const r=new p(a.type);return Object.assign(r,a),r}},n(p,"BaseError"),p),v,Te=(v=class extends u{constructor(t,a={}){super(t,a)}},n(v,"ValidationError"),v),m,Le=(m=class extends u{constructor(t,a={}){super(t,a)}},n(m,"AuthError"),m),h;h=class extends u{constructor(t,a={}){super(t,a)}},n(h,"ApiError");var b;b=class extends u{constructor(t,a={}){super(t,a)}},n(b,"BusinessError");var x,De=(x=class extends u{constructor(t,a={}){super(t,a)}},n(x,"BlockchainError"),x),E;E=class extends u{constructor(t="generic.error",a={}){super(t,a)}},n(E,"GenericError");function F(e,t="en",a){try{const r=re(e);return w().t(r,{lang:t,interpolation:a,defaultValue:`Error: ${e}`})}catch{return w().t("errors.general.internal_error",{lang:t,interpolation:a,defaultValue:"An internal server error occurred"})}}n(F,"translateError");function re(e){return e in U?U[e]:e in V?V[e]:e in B?B[e]:e in j?j[e]:e in G?G[e]:e in z?z[e]:"errors.general.internal_error"}n(re,"getTranslationKeyForErrorType");function ne(e){return e in K?K[e]:e in M?M[e]:e in P?P[e]:e in q?q[e]:e in H?H[e]:e in T?T[e]:T["system.internal_server_error"]}n(ne,"getStatusCodeForType");function we(e,t="en",a){if(typeof e=="string")return te(e,a);if(e instanceof u)return e.message;const r=e;return r.type&&Object.values(ae).includes(r.type)?F(r.type,t,a):e.message||"An unknown error occurred"}n(we,"formatErrorMessage");function ye(e,t){const a=new Date().toISOString();return e instanceof u?{statusCode:e.statusCode,errorCode:e.code,message:e.message,correlationId:t??e.correlationId,timestamp:e.timestamp||a}:{statusCode:500,errorCode:"INTERNAL_SERVER_ERROR",message:e.message||"An internal server error occurred",correlationId:t,timestamp:a}}n(ye,"createErrorResponse");function Ce(e,t){return e instanceof u&&e.type===t}n(Ce,"isErrorType");function Fe(e){return e instanceof Te||e instanceof u&&e.type.startsWith("validation.")}n(Fe,"isValidationError");function Ue(e){return e instanceof Le||e instanceof u&&e.type.startsWith("auth.")}n(Ue,"isAuthError");function Ve(e){return e instanceof De||e instanceof u&&e.type.startsWith("blockchain.")}n(Ve,"isBlockchainError");function Be(e){return e.toJSON()}n(Be,"serializeError");function je(e){return u.fromJSON(e)}n(je,"deserializeError");function Ge(e){return e.map(t=>({field:t.field,message:t.message,errorCode:"VALIDATION_ERROR",context:{valueGiven:t.value,constraints:t.constraints}}))}n(Ge,"createValidationErrorDetails");var f;f=class{constructor(){d(this,"fallbackLocale");this.fallbackLocale="en"}static getInstance(){return f.instance||(f.instance=new f),f.instance}detectLocale(t){return t?this.detectFromRequest(t):this.fallbackLocale}detectFromRequest(t){var s,o,c;const a=(s=t.url.split("?")[1])==null?void 0:s.split("=")[1],r=t.headers.get("accept-language"),i=(c=(o=t.headers.get("cookie"))==null?void 0:o.split("; ").find(A=>A.startsWith("locale=")))==null?void 0:c.split("=")[1];return a??i??this.parseAcceptLanguage(r??"")??this.fallbackLocale}parseAcceptLanguage(t){if(!t)return null;let a=null,r=0;for(const i of t.split(",")){const{lang:s,q:o}=this.parseLangAndQ(i.trim());if(o>r&&(r=o,a=s,o===1))break}return a}parseLangAndQ(t){const a=t.indexOf(";"),r=a===-1?t:t.slice(0,Math.max(0,a));let i=1;if(a!==-1){const s=/q=(?<q>[\d.]+)/.exec(t.slice(a+1));i=s!=null&&s.groups?Number.parseFloat(s.groups.q)||0:1}return{lang:r,q:i}}setFallbackLocale(t){this.fallbackLocale=t}},n(f,"LocaleDetector"),d(f,"instance");var N;N=class{constructor(t){d(this,"namespaces");this.namespaces=t?new Map(t):new Map}addNamespace(t,a){if(!ie(t))throw new Error("Invalid namespace name");this.namespaces.set(t,a)}getNamespace(t){return this.namespaces.get(t)}getAllNamespaces(){return[...this.namespaces.keys()]}mergeNamespaces(t,a){const r=this.namespaces.get(t)??{},i=this.namespaces.get(a)??{};this.namespaces.set(t,{...r,...i})}validateNamespace(t,a){const r=this.namespaces.get(t);return r?a?Object.entries(a).every(([i,s])=>{var c;const o=(c=Object.getOwnPropertyDescriptor(r,i))==null?void 0:c.value;return o!==void 0&&typeof o===s}):!0:!1}},n(N,"NamespaceManager");function ie(e){return/^\w+$/.test(e)}n(ie,"isSafeKey");const ze=I.cva("relative w-full rounded-sm border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-5 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive border-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"}},defaultVariants:{variant:"default"}});function Ke({className:e,variant:t,...a}){return l.jsx("div",{"data-slot":"alert",role:"alert",className:_.cn(ze({variant:t}),e),...a})}function Me({className:e,...t}){return l.jsx("div",{"data-slot":"alert-title",className:_.cn("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",e),...t})}function Pe({className:e,...t}){return l.jsx("div",{"data-slot":"alert-description",className:_.cn("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",e),...t})}const qe=I.cva("inline-flex items-center justify-center rounded-full border px-2 py-1 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden hover:opacity-80",{variants:{variant:{default:"bg-orange-gradient text-white",secondary:"border-transparent bg-primary text-secondary",destructive:"bg-destructive text-white",outline:"border-subtle text-secondary"}},defaultVariants:{variant:"default"}});function He({className:e,variant:t,asChild:a=!1,...r}){const i=a?de.Slot:"span";return l.jsx(i,{"data-slot":"badge",className:_.cn(qe({variant:t}),e),...r})}function se({className:e,...t}){return l.jsx("textarea",{"data-slot":"textarea",className:_.cn("border-subtle text-secondary bg-background placeholder:text-accent-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 aria-invalid:border-destructive flex field-sizing-content min-h-16 w-full rounded-sm border px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 disabled:placeholder:text-secondary-foreground md:text-sm",e),...t})}exports.Alert=Ke;exports.AlertDescription=Pe;exports.AlertTitle=Me;exports.AuroraText=$;exports.Badge=He;exports.Input=Y;exports.InputGroup=_e;exports.InputGroupAddon=ge;exports.InputGroupButton=ve;exports.InputGroupInput=he;exports.InputGroupText=me;exports.InputGroupTextarea=be;exports.Textarea=se;exports.formatDate=J;exports.formatNumber=Q;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),y=require("react"),m=require("lucide-react"),f=require("react-day-picker"),e=require("../utils-IjLH3w2e.cjs");require("../Textarea-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),y=require("react"),m=require("lucide-react"),f=require("react-day-picker"),e=require("../utils-IjLH3w2e.cjs");require("../Textarea-DIEPzlTz.cjs");const p=require("../Button-BoTQH4v8.cjs");require("@radix-ui/react-select");require("next-intl");require("@radix-ui/react-slot");require("@radix-ui/react-separator");function _(n){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const r in n)if(r!=="default"){const s=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(o,r,s.get?s:{enumerable:!0,get:()=>n[r]})}}return o.default=n,Object.freeze(o)}const b=_(y);function w({className:n,classNames:o,showOutsideDays:r=!0,captionLayout:s="label",formatters:g,components:c,...i}){const t=f.getDefaultClassNames();return d.jsx(f.DayPicker,{showOutsideDays:r,className:e.cn("bg-background group/calendar p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,n),captionLayout:s,formatters:{formatMonthDropdown:a=>a.toLocaleString("default",{month:"short"}),...g},classNames:{root:e.cn("w-fit",t.root),months:e.cn("flex gap-4 flex-col md:flex-row relative",t.months),month:e.cn("flex flex-col w-full gap-4",t.month),nav:e.cn("flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between",t.nav),button_previous:e.cn(p.buttonVariants({variant:"outline"}),"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none rounded-sm border-subtle text-tertiary-foreground",t.button_previous),button_next:e.cn(p.buttonVariants({variant:"outline"}),"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none rounded-sm border-subtle text-tertiary-foreground",t.button_next),month_caption:e.cn("flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)",t.month_caption),dropdowns:e.cn("w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5",t.dropdowns),dropdown_root:e.cn("relative has-focus:border-ring border border-subtle shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md",t.dropdown_root),dropdown:e.cn("absolute bg-popover inset-0 opacity-0",t.dropdown),caption_label:e.cn("select-none font-medium",s==="label"?"text-sm":"text-secondary rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5",t.caption_label),table:"w-full border-collapse",weekdays:e.cn("flex",t.weekdays),weekday:e.cn("text-muted-foreground rounded-md flex-1 font-normal text-[0.8rem] select-none",t.weekday),week:e.cn("flex w-full mt-2",t.week),week_number_header:e.cn("select-none w-(--cell-size)",t.week_number_header),week_number:e.cn("text-[0.8rem] select-none text-muted-foreground",t.week_number),day:e.cn("relative w-full h-full p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none",t.day),range_start:e.cn("bg-primary !rounded-l-sm",t.range_start),range_middle:e.cn("rounded-none",t.range_middle),range_end:e.cn("bg-primary !rounded-r-sm",t.range_end),today:e.cn("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",t.today),outside:e.cn("text-muted-foreground aria-selected:text-muted-foreground",t.outside),disabled:e.cn("text-secondary opacity-40",t.disabled),hidden:e.cn("invisible",t.hidden),...o},components:{Root:({className:a,rootRef:u,...l})=>d.jsx("div",{"data-slot":"calendar",ref:u,className:e.cn(a),...l}),Chevron:({className:a,orientation:u,...l})=>u==="left"?d.jsx(m.ChevronLeftIcon,{className:e.cn("size-4",a),...l}):u==="right"?d.jsx(m.ChevronRightIcon,{className:e.cn("size-4",a),...l}):d.jsx(m.ChevronDownIcon,{className:e.cn("size-4",a),...l}),DayButton:x,WeekNumber:({children:a,...u})=>d.jsx("td",{...u,children:d.jsx("div",{className:"flex size-(--cell-size) items-center justify-center text-center",children:a})}),...c},...i})}function x({className:n,day:o,modifiers:r,...s}){const g=f.getDefaultClassNames(),c=b.useRef(null);return b.useEffect(()=>{var i;r.focused&&((i=c.current)==null||i.focus())},[r.focused]),d.jsx(p.Button,{ref:c,variant:"ghost",size:"icon","data-day":o.date.toLocaleDateString(),"data-selected-single":r.selected&&!r.range_start&&!r.range_end&&!r.range_middle,"data-range-start":r.range_start,"data-range-end":r.range_end,"data-range-middle":r.range_middle,className:e.cn("rounded-sm hover:shadow-none hover:bg-primary data-[selected-single=true]:bg-orange-gradient data-[selected-single=true]:text-primary data-[range-middle=true]:bg-primary data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-orange-gradient data-[range-start=true]:text-primary data-[range-end=true]:bg-orange-gradient data-[range-end=true]:text-primary group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70",g.day,n),...s})}exports.Calendar=w;exports.CalendarDayButton=x;
|
|
@@ -3,7 +3,7 @@ import * as m from "react";
|
|
|
3
3
|
import { ChevronLeftIcon as b, ChevronRightIcon as x, ChevronDownIcon as y } from "lucide-react";
|
|
4
4
|
import { getDefaultClassNames as p, DayPicker as h } from "react-day-picker";
|
|
5
5
|
import { c as e } from "../utils-B6yFEsav.js";
|
|
6
|
-
import "../Textarea-
|
|
6
|
+
import "../Textarea-BfrJwucE.js";
|
|
7
7
|
import { b as f, B as w } from "../Button-B7sEajdG.js";
|
|
8
8
|
import "@radix-ui/react-select";
|
|
9
9
|
import "next-intl";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),q=require("react"),w=require("embla-carousel-react"),m=require("lucide-react"),d=require("../utils-IjLH3w2e.cjs");require("../Textarea-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),q=require("react"),w=require("embla-carousel-react"),m=require("lucide-react"),d=require("../utils-IjLH3w2e.cjs");require("../Textarea-DIEPzlTz.cjs");const v=require("../Button-BoTQH4v8.cjs");require("@radix-ui/react-select");require("next-intl");require("@radix-ui/react-slot");require("@radix-ui/react-separator");function k(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const o in t)if(o!=="default"){const n=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(r,o,n.get?n:{enumerable:!0,get:()=>t[o]})}}return r.default=t,Object.freeze(r)}const s=k(q),b=s.createContext(null);function x(){const t=s.useContext(b);if(!t)throw new Error("useCarousel must be used within a <Carousel />");return t}function z({orientation:t="horizontal",opts:r,setApi:o,plugins:n,className:c,children:u,...i}){const[N,e]=w({...r,axis:t==="horizontal"?"x":"y"},n),[j,y]=s.useState(!1),[S,P]=s.useState(!1),f=s.useCallback(a=>{a&&(y(a.canScrollPrev()),P(a.canScrollNext()))},[]),C=s.useCallback(()=>{e==null||e.scrollPrev()},[e]),h=s.useCallback(()=>{e==null||e.scrollNext()},[e]),g=s.useCallback(a=>{a.key==="ArrowLeft"?(a.preventDefault(),C()):a.key==="ArrowRight"&&(a.preventDefault(),h())},[C,h]);return s.useEffect(()=>{!e||!o||o(e)},[e,o]),s.useEffect(()=>{if(e)return f(e),e.on("reInit",f),e.on("select",f),()=>{e==null||e.off("select",f)}},[e,f]),l.jsx(b.Provider,{value:{carouselRef:N,api:e,opts:r,orientation:t||((r==null?void 0:r.axis)==="y"?"vertical":"horizontal"),scrollPrev:C,scrollNext:h,canScrollPrev:j,canScrollNext:S},children:l.jsx("div",{onKeyDownCapture:g,className:d.cn("relative",c),role:"region","aria-roledescription":"carousel","data-slot":"carousel",...i,children:u})})}function R({className:t,...r}){const{carouselRef:o,orientation:n}=x();return l.jsx("div",{ref:o,className:"overflow-hidden","data-slot":"carousel-content",children:l.jsx("div",{className:d.cn("flex",n==="horizontal"?"-ml-4":"-mt-4 flex-col",t),...r})})}function p({className:t,...r}){const{orientation:o}=x();return l.jsx("div",{role:"group","aria-roledescription":"slide","data-slot":"carousel-item",className:d.cn("min-w-0 shrink-0 grow-0 basis-full",o==="horizontal"?"pl-4":"pt-4",t),...r})}function D({className:t,variant:r="outline",size:o="icon",...n}){const{orientation:c,scrollPrev:u,canScrollPrev:i}=x();return l.jsxs(v.Button,{"data-slot":"carousel-previous",variant:r,size:o,className:d.cn("absolute size-8 rounded-full",c==="horizontal"?"top-1/2 -left-12 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",t),disabled:!i,onClick:u,...n,children:[l.jsx(m.ChevronLeft,{}),l.jsx("span",{className:"sr-only",children:"Previous slide"})]})}function O({className:t,variant:r="outline",size:o="icon",...n}){const{orientation:c,scrollNext:u,canScrollNext:i}=x();return l.jsxs(v.Button,{"data-slot":"carousel-next",variant:r,size:o,className:d.cn("absolute size-8 rounded-full",c==="horizontal"?"top-1/2 -right-12 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",t),disabled:!i,onClick:u,...n,children:[l.jsx(m.ChevronRight,{}),l.jsx("span",{className:"sr-only",children:"Next slide"})]})}exports.Carousel=z;exports.CarouselContent=R;exports.CarouselItem=p;exports.CarouselNext=O;exports.CarouselPrevious=D;
|
|
@@ -3,7 +3,7 @@ import * as l from "react";
|
|
|
3
3
|
import k from "embla-carousel-react";
|
|
4
4
|
import { ChevronLeft as z, ChevronRight as g } from "lucide-react";
|
|
5
5
|
import { c as d } from "../utils-B6yFEsav.js";
|
|
6
|
-
import "../Textarea-
|
|
6
|
+
import "../Textarea-BfrJwucE.js";
|
|
7
7
|
import { B as v } from "../Button-B7sEajdG.js";
|
|
8
8
|
import "@radix-ui/react-select";
|
|
9
9
|
import "next-intl";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),C=require("react"),m=require("lucide-react"),l=require("../utils-IjLH3w2e.cjs");require("../Textarea-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),C=require("react"),m=require("lucide-react"),l=require("../utils-IjLH3w2e.cjs");require("../Textarea-DIEPzlTz.cjs");const O=require("../Button-BoTQH4v8.cjs");require("@radix-ui/react-select");require("next-intl");require("@radix-ui/react-slot");require("@radix-ui/react-separator");const o=require("./command.cjs.js"),a=require("./popover.cjs.js");function S(r){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const n in r)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(c,n,s.get?s:{enumerable:!0,get:()=>r[n]})}}return c.default=r,Object.freeze(c)}const w=S(C);function g({options:r,value:c,onValueChange:n,placeholder:s="Select option...",searchPlaceholder:p="Search...",emptyText:f="No option found.",disabled:b=!1,triggerClassName:j,contentClassName:x,buttonVariant:h="outline",buttonSize:q="default"}){const[i,u]=w.useState(!1),d=r.find(t=>t.value===c),v=t=>{const y=t===c?"":t;n==null||n(y),u(!1)};return e.jsxs(a.Popover,{open:i,onOpenChange:u,children:[e.jsx(a.PopoverTrigger,{asChild:!0,children:e.jsxs(O.Button,{variant:h,size:q,role:"combobox","aria-expanded":i,disabled:b,className:l.cn("w-full justify-between",j),children:[d?d.label:s,e.jsx(m.ChevronsUpDownIcon,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),e.jsx(a.PopoverContent,{className:l.cn("w-full p-0",x),children:e.jsxs(o.Command,{children:[e.jsx(o.CommandInput,{placeholder:p}),e.jsxs(o.CommandList,{children:[e.jsx(o.CommandEmpty,{children:f}),e.jsx(o.CommandGroup,{children:r.map(t=>e.jsxs(o.CommandItem,{value:t.value,disabled:t.disabled,onSelect:()=>v(t.value),children:[e.jsx(m.CheckIcon,{className:l.cn("mr-2 h-4 w-4",c===t.value?"opacity-100":"opacity-0")}),t.label]},t.value))})]})]})})]})}exports.Combobox=g;
|
|
@@ -2,7 +2,7 @@ import { jsxs as r, jsx as o } from "react/jsx-runtime";
|
|
|
2
2
|
import * as x from "react";
|
|
3
3
|
import { ChevronsUpDownIcon as y, CheckIcon as N } from "lucide-react";
|
|
4
4
|
import { c as l } from "../utils-B6yFEsav.js";
|
|
5
|
-
import "../Textarea-
|
|
5
|
+
import "../Textarea-BfrJwucE.js";
|
|
6
6
|
import { B as S } from "../Button-B7sEajdG.js";
|
|
7
7
|
import "@radix-ui/react-select";
|
|
8
8
|
import "next-intl";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),d=require("react"),s=require("input-otp"),i=require("../utils-IjLH3w2e.cjs");function l(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const a=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,a.get?a:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const p=l(d);function v({className:t,containerClassName:e,...r}){return n.jsx(s.OTPInput,{"data-slot":"input-otp",containerClassName:i.cn("flex items-center gap-2 has-disabled:opacity-50",e),className:i.cn("disabled:cursor-not-allowed",t),...r})}function f({className:t,...e}){return n.jsx("div",{"data-slot":"input-otp-group",className:i.cn("flex items-center",t),...e})}function b({index:t,className:e,...r}){const a=p.useContext(s.OTPInputContext),{char:o,hasFakeCaret:c,isActive:u}=(a==null?void 0:a.slots[t])??{};return n.jsxs("div",{"data-slot":"input-otp-slot","data-active":u,className:i.cn("text-secondary data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 border-subtle relative flex h-10 w-10 items-center justify-center border-y border-r text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]",e),...r,children:[o,c&&n.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:n.jsx("div",{className:"animate-caret-blink bg-foreground h-4 w-px duration-1000"})})]})}function m({...t}){return n.jsx("div",{"data-slot":"input-otp-separator",role:"separator",className:"text-secondary size-5 flex items-center justify-center",...t,children:"•"})}exports.InputOTP=v;exports.InputOTPGroup=f;exports.InputOTPSeparator=m;exports.InputOTPSlot=b;
|
|
@@ -1,55 +1,63 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
1
|
+
import { jsx as r, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import * as u from "react";
|
|
3
3
|
import { OTPInput as l, OTPInputContext as p } from "input-otp";
|
|
4
|
-
import { MinusIcon as m } from "lucide-react";
|
|
5
4
|
import { c as a } from "../utils-B6yFEsav.js";
|
|
6
|
-
function
|
|
5
|
+
function x({
|
|
7
6
|
className: t,
|
|
8
|
-
containerClassName:
|
|
7
|
+
containerClassName: e,
|
|
9
8
|
...i
|
|
10
9
|
}) {
|
|
11
|
-
return /* @__PURE__ */
|
|
10
|
+
return /* @__PURE__ */ r(
|
|
12
11
|
l,
|
|
13
12
|
{
|
|
14
13
|
"data-slot": "input-otp",
|
|
15
|
-
containerClassName: a("flex items-center gap-2 has-disabled:opacity-50",
|
|
14
|
+
containerClassName: a("flex items-center gap-2 has-disabled:opacity-50", e),
|
|
16
15
|
className: a("disabled:cursor-not-allowed", t),
|
|
17
16
|
...i
|
|
18
17
|
}
|
|
19
18
|
);
|
|
20
19
|
}
|
|
21
|
-
function
|
|
22
|
-
return /* @__PURE__ */
|
|
20
|
+
function b({ className: t, ...e }) {
|
|
21
|
+
return /* @__PURE__ */ r("div", { "data-slot": "input-otp-group", className: a("flex items-center", t), ...e });
|
|
23
22
|
}
|
|
24
|
-
function
|
|
23
|
+
function g({
|
|
25
24
|
index: t,
|
|
26
|
-
className:
|
|
25
|
+
className: e,
|
|
27
26
|
...i
|
|
28
27
|
}) {
|
|
29
|
-
const n =
|
|
30
|
-
return /* @__PURE__ */
|
|
28
|
+
const n = u.useContext(p), { char: s, hasFakeCaret: o, isActive: d } = (n == null ? void 0 : n.slots[t]) ?? {};
|
|
29
|
+
return /* @__PURE__ */ c(
|
|
31
30
|
"div",
|
|
32
31
|
{
|
|
33
32
|
"data-slot": "input-otp-slot",
|
|
34
33
|
"data-active": d,
|
|
35
34
|
className: a(
|
|
36
|
-
"data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 border-
|
|
37
|
-
|
|
35
|
+
"text-secondary data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 border-subtle relative flex h-10 w-10 items-center justify-center border-y border-r text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]",
|
|
36
|
+
e
|
|
38
37
|
),
|
|
39
38
|
...i,
|
|
40
39
|
children: [
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
s,
|
|
41
|
+
o && /* @__PURE__ */ r("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ r("div", { className: "animate-caret-blink bg-foreground h-4 w-px duration-1000" }) })
|
|
43
42
|
]
|
|
44
43
|
}
|
|
45
44
|
);
|
|
46
45
|
}
|
|
47
|
-
function
|
|
48
|
-
return /* @__PURE__ */
|
|
46
|
+
function h({ ...t }) {
|
|
47
|
+
return /* @__PURE__ */ r(
|
|
48
|
+
"div",
|
|
49
|
+
{
|
|
50
|
+
"data-slot": "input-otp-separator",
|
|
51
|
+
role: "separator",
|
|
52
|
+
className: "text-secondary size-5 flex items-center justify-center",
|
|
53
|
+
...t,
|
|
54
|
+
children: "•"
|
|
55
|
+
}
|
|
56
|
+
);
|
|
49
57
|
}
|
|
50
58
|
export {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
59
|
+
x as InputOTP,
|
|
60
|
+
b as InputOTPGroup,
|
|
61
|
+
h as InputOTPSeparator,
|
|
62
|
+
g as InputOTPSlot
|
|
55
63
|
};
|