@clasing/ui 0.1.129 → 0.1.130

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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../jsx-runtime-CEDi24JD.cjs"),q=require("react"),I=require("react-phone-number-input"),P=require("react-phone-number-input/flags"),v=require("react-phone-number-input/locale/en"),O=require("react-phone-number-input/locale/es"),w=require("react-phone-number-input/locale/fr"),_=require("../button-Ha5yZjbm.cjs"),p=require("../command-8g6GQBZ9.cjs"),z=require("../input-DHz92pYC.cjs"),T=require("../label-DzIkWgU7.cjs"),g=require("../popover-DuG87bap.cjs"),A=require("../scroll-area-DWxaYCKb.cjs"),d=require("../index-DoxiiusW.cjs"),C=require("../icon-component-DuSAouum.cjs");function N(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const o in t)if(o!=="default"){const s=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(n,o,s.get?s:{enumerable:!0,get:()=>t[o]})}}return n.default=t,Object.freeze(n)}const j=N(q),y=N(I),b=j.forwardRef(({className:t,onChange:n,value:o,variant:s="md",rounded:r="default",label:c,helperText:a,locale:x="en",error:u,touched:m,...l},R)=>(console.log(s),e.jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-3",children:[c&&e.jsxRuntimeExports.jsx(T.Label,{htmlFor:l.id,className:d.cn({"text-neutral-700":l.disabled}),children:c}),e.jsxRuntimeExports.jsx(y.default,{ref:R,className:d.cn("flex",t),flagComponent:E,countrySelectComponent:D,inputComponent:S,smartCaret:!1,labels:x==="es"?O:x==="fr"?w:v,value:o||void 0,onChange:f=>n?.(f||""),countrySelectProps:{variant:s,rounded:r,error:u,touched:m},numberInputProps:{variant:s,rounded:r,error:u,touched:m},...l}),u&&m?e.jsxRuntimeExports.jsx("span",{id:l.id&&`${l.id}-error-text`,"aria-invalid":!0,className:"text-destructive text-label-md -mt-1",children:u}):a?e.jsxRuntimeExports.jsx("span",{id:l.id&&`${l.id}-helper-text`,className:d.cn("text-label-md -mt-1",{"text-muted-foreground":!u&&!m,"text-destructive":u&&m,"text-neutral-700":l.disabled}),children:a}):null]})));b.displayName="PhoneInput";const S=j.forwardRef(({className:t,rounded:n="default",error:o,touched:s,variant:r,...c},a)=>{const{"data-country":x,...u}=c;return e.jsxRuntimeExports.jsx(z.Input,{variant:r,className:d.cn(n==="default"?"rounded-s-none rounded-e-lg":"rounded-s-none rounded-e-full",{"border-destructive":o&&s,"border-blue-800":s&&!o,"rounded-e-sm":r==="sm","rounded-e-md":r==="md","rounded-e-lg":r==="lg"},t),...u,ref:a})});S.displayName="InputComponent";const D=({disabled:t,value:n,options:o,onChange:s,variant:r="md",rounded:c="default",error:a,touched:x})=>{const u=j.useRef(null),[m,l]=j.useState(""),[R,f]=j.useState(!1);return e.jsxRuntimeExports.jsxs(g.Popover,{open:R,modal:!0,onOpenChange:i=>{f(i),i&&l("")},children:[e.jsxRuntimeExports.jsx(g.PopoverTrigger,{asChild:!0,children:e.jsxRuntimeExports.jsxs(_.Button,{type:"button",variant:"outline",className:d.cn("outline-r-0 outline-input text-secondary flex gap-1 px-3 focus:z-10",c==="default"?"rounded-e-none":"rounded-s-full rounded-e-none",{"outline-destructive":a&&x,"outline-blue-800":x&&!a,"h-8 rounded-s-sm":r==="sm","h-12 rounded-s-md":r==="md","h-16 rounded-s-lg":r==="lg"}),disabled:t,children:[e.jsxRuntimeExports.jsx(E,{country:n,countryName:n,disabled:t}),e.jsxRuntimeExports.jsx(C.IconComponent,{iconName:"IconChevronDown",className:d.cn("-mr-2 size-4 opacity-50",t?"hidden":"opacity-100")})]})}),e.jsxRuntimeExports.jsx(g.PopoverContent,{className:"w-[300px] p-0",children:e.jsxRuntimeExports.jsxs(p.Command,{children:[e.jsxRuntimeExports.jsx(p.CommandInput,{value:m,onValueChange:i=>{l(i),setTimeout(()=>{if(u.current){const h=u.current.querySelector("[data-radix-scroll-area-viewport]");h&&(h.scrollTop=0)}},0)},placeholder:"Search country..."}),e.jsxRuntimeExports.jsx(p.CommandList,{children:e.jsxRuntimeExports.jsxs(A.ScrollArea,{ref:u,className:"h-72",children:[e.jsxRuntimeExports.jsx(p.CommandEmpty,{children:"No country found."}),e.jsxRuntimeExports.jsx(p.CommandGroup,{children:o.map(({value:i,label:h})=>i?e.jsxRuntimeExports.jsx(F,{country:i,countryName:h,selectedCountry:n,onChange:s,onSelectComplete:()=>f(!1)},i):null)})]})})]})})]})},F=({country:t,countryName:n,selectedCountry:o,onChange:s,onSelectComplete:r})=>{const c=()=>{s(t),r()};return e.jsxRuntimeExports.jsxs(p.CommandItem,{className:"gap-2",onSelect:c,children:[e.jsxRuntimeExports.jsx(E,{country:t,countryName:n}),e.jsxRuntimeExports.jsx("span",{className:"flex-1 text-sm",children:n}),e.jsxRuntimeExports.jsx("span",{className:"text-foreground/50 text-sm",children:`+${y.getCountryCallingCode(t)}`}),e.jsxRuntimeExports.jsx(C.IconComponent,{iconName:"IconCheck",className:`ml-auto size-4 ${t===o?"opacity-100":"opacity-0"}`})]})},E=({country:t,countryName:n,disabled:o})=>{const s=P[t];return e.jsxRuntimeExports.jsx("span",{className:d.cn("bg-foreground/20 flex h-4 w-6 overflow-hidden rounded-[4px] [&_svg:not([class*='size-'])]:size-full",{"opacity-50":o}),children:s&&e.jsxRuntimeExports.jsx(s,{title:n})})};exports.PhoneInput=b;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../jsx-runtime-CEDi24JD.cjs"),S=require("react"),I=require("react-phone-number-input"),q=require("react-phone-number-input/flags"),w=require("react-phone-number-input/locale/en"),P=require("react-phone-number-input/locale/es"),O=require("react-phone-number-input/locale/fr"),p=require("../command-8g6GQBZ9.cjs"),_=require("../input-DHz92pYC.cjs"),T=require("../label-DzIkWgU7.cjs"),h=require("../popover-DuG87bap.cjs"),k=require("../scroll-area-DWxaYCKb.cjs"),m=require("../index-DoxiiusW.cjs"),y=require("../icon-component-DuSAouum.cjs");function C(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const s in t)if(s!=="default"){const o=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(n,s,o.get?o:{enumerable:!0,get:()=>t[s]})}}return n.default=t,Object.freeze(n)}const f=C(S),E=C(I),N=f.forwardRef(({className:t,onChange:n,value:s,size:o="md",rounded:r="default",label:a,helperText:c,locale:x="en",error:l,touched:d,...i},g)=>e.jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-3",children:[a&&e.jsxRuntimeExports.jsx(T.Label,{htmlFor:i.id,className:m.cn({"text-neutral-700":i.disabled}),children:a}),e.jsxRuntimeExports.jsx(E.default,{ref:g,className:m.cn("flex",t),flagComponent:R,countrySelectComponent:A,inputComponent:v,smartCaret:!1,labels:x==="es"?P:x==="fr"?O:w,value:s||void 0,onChange:j=>n?.(j||""),countrySelectProps:{size:o,rounded:r,error:l,touched:d},numberInputProps:{size:o,rounded:r,error:l,touched:d},...i}),l&&d?e.jsxRuntimeExports.jsx("span",{id:i.id&&`${i.id}-error-text`,"aria-invalid":!0,className:"text-destructive text-label-md -mt-1",children:l}):c?e.jsxRuntimeExports.jsx("span",{id:i.id&&`${i.id}-helper-text`,className:m.cn("text-label-md -mt-1",{"text-muted-foreground":!l&&!d,"text-destructive":l&&d,"text-neutral-700":i.disabled}),children:c}):null]}));N.displayName="PhoneInput";const v=f.forwardRef(({className:t,rounded:n="default",error:s,touched:o,size:r,...a},c)=>{const{"data-country":x,...l}=a;return e.jsxRuntimeExports.jsx(_.Input,{size:r,containerClassName:"w-full",className:m.cn("w-full",{"border-destructive":s&&o,"border-blue-800":o&&!s,"rounded-s-none rounded-e-lg":n!=="full","rounded-s-none rounded-e-full":n==="full","rounded-e-sm":r==="sm","rounded-e-md":r==="md","rounded-e-lg":r==="lg"},t),...l,ref:c})});v.displayName="InputComponent";const A=({disabled:t,value:n,options:s,onChange:o,size:r="md",rounded:a="default",error:c,touched:x})=>{const l=f.useRef(null),[d,i]=f.useState(""),[g,j]=f.useState(!1);return e.jsxRuntimeExports.jsxs(h.Popover,{open:g,modal:!0,onOpenChange:u=>{j(u),u&&i("")},children:[e.jsxRuntimeExports.jsx(h.PopoverTrigger,{asChild:!0,children:e.jsxRuntimeExports.jsxs("button",{type:"button",className:m.cn("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex w-fit items-center justify-center min-w-0 border bg-transparent text-base transition-[color,box-shadow] outline-none file:inline-flex file:border-0 file:bg-transparent file:text-sm file:font-semibold disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm border-r-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] focus-visible:z-1",a==="default"?"rounded-e-none":"rounded-s-full rounded-e-none",{"outline-destructive":c&&x,"outline-blue-800":x&&!c,"text-label-md h-8 rounded-s-sm px-2 py-1":r==="sm","text-label-lg h-12 rounded-s-md px-3 py-1":r==="md","text-label-xl h-16 rounded-s-lg px-4 py-2":r==="lg"}),disabled:t,children:[e.jsxRuntimeExports.jsx(R,{country:n,countryName:n,disabled:t}),e.jsxRuntimeExports.jsx(y.IconComponent,{iconName:"IconChevronDown",className:m.cn("-mr-2 size-4 opacity-50",t?"hidden":"opacity-100")})]})}),e.jsxRuntimeExports.jsx(h.PopoverContent,{className:"w-[300px] p-0",children:e.jsxRuntimeExports.jsxs(p.Command,{children:[e.jsxRuntimeExports.jsx(p.CommandInput,{value:d,onValueChange:u=>{i(u),setTimeout(()=>{if(l.current){const b=l.current.querySelector("[data-radix-scroll-area-viewport]");b&&(b.scrollTop=0)}},0)},placeholder:"Search country..."}),e.jsxRuntimeExports.jsx(p.CommandList,{children:e.jsxRuntimeExports.jsxs(k.ScrollArea,{ref:l,className:"h-72",children:[e.jsxRuntimeExports.jsx(p.CommandEmpty,{children:"No country found."}),e.jsxRuntimeExports.jsx(p.CommandGroup,{children:s.map(({value:u,label:b})=>u?e.jsxRuntimeExports.jsx(D,{country:u,countryName:b,selectedCountry:n,onChange:o,onSelectComplete:()=>j(!1)},u):null)})]})})]})})]})},D=({country:t,countryName:n,selectedCountry:s,onChange:o,onSelectComplete:r})=>{const a=()=>{o(t),r()};return e.jsxRuntimeExports.jsxs(p.CommandItem,{className:"gap-2",onSelect:a,children:[e.jsxRuntimeExports.jsx(R,{country:t,countryName:n}),e.jsxRuntimeExports.jsx("span",{className:"flex-1 text-sm",children:n}),e.jsxRuntimeExports.jsx("span",{className:"text-foreground/50 text-sm",children:`+${E.getCountryCallingCode(t)}`}),e.jsxRuntimeExports.jsx(y.IconComponent,{iconName:"IconCheck",className:`ml-auto size-4 ${t===s?"opacity-100":"opacity-0"}`})]})},R=({country:t,countryName:n,disabled:s})=>{const o=q[t];return e.jsxRuntimeExports.jsx("span",{className:m.cn("bg-foreground/20 flex h-4 w-6 overflow-hidden rounded-[4px] [&_svg:not([class*='size-'])]:size-full",{"opacity-50":s}),children:o&&e.jsxRuntimeExports.jsx(o,{title:n})})};exports.PhoneInput=N;
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  import * as RPNInput from 'react-phone-number-input';
3
3
  type PhoneInputProps = Omit<React.ComponentProps<'input'>, 'onChange' | 'value' | 'ref'> & Omit<RPNInput.Props<typeof RPNInput.default>, 'onChange'> & {
4
4
  onChange?: (value: RPNInput.Value) => void;
5
- variant?: 'sm' | 'md' | 'lg';
5
+ size?: 'sm' | 'md' | 'lg';
6
6
  rounded?: 'default' | 'full';
7
7
  label?: string;
8
8
  helperText?: string;
@@ -1,204 +1,205 @@
1
1
  import { j as e } from "../jsx-runtime-DywqP_6a.js";
2
2
  import * as f from "react";
3
- import * as g from "react-phone-number-input";
4
- import I from "react-phone-number-input/flags";
5
- import S from "react-phone-number-input/locale/en";
6
- import b from "react-phone-number-input/locale/es";
7
- import v from "react-phone-number-input/locale/fr";
8
- import { B as P } from "../button-DcSOP6sn.js";
9
- import { C as w, d as R, f as z, b as O, c as $, e as E } from "../command-pED95x7-.js";
3
+ import * as j from "react-phone-number-input";
4
+ import N from "react-phone-number-input/flags";
5
+ import v from "react-phone-number-input/locale/en";
6
+ import I from "react-phone-number-input/locale/es";
7
+ import w from "react-phone-number-input/locale/fr";
8
+ import { C as S, d as P, f as R, b as O, c as $, e as E } from "../command-pED95x7-.js";
10
9
  import { I as F } from "../input-CUSAqhCy.js";
11
10
  import { L } from "../label-_kG7WBoJ.js";
12
- import { P as V, c as A, b as B } from "../popover-CHAUhJda.js";
11
+ import { P as V, c as k, b as A } from "../popover-CHAUhJda.js";
13
12
  import { S as T } from "../scroll-area-DwBiu3Jn.js";
14
13
  import { c as u } from "../index-CRiPKpXj.js";
15
- import { I as N } from "../icon-component-CxQsODCa.js";
14
+ import { I as C } from "../icon-component-CxQsODCa.js";
16
15
  const _ = f.forwardRef(
17
16
  ({
18
- className: n,
19
- onChange: s,
20
- value: r,
21
- variant: t = "md",
17
+ className: t,
18
+ onChange: n,
19
+ value: a,
20
+ size: s = "md",
22
21
  rounded: o = "default",
23
- label: m,
24
- helperText: c,
22
+ label: i,
23
+ helperText: m,
25
24
  locale: p = "en",
26
25
  error: l,
27
- touched: i,
28
- ...a
29
- }, j) => (console.log(t), /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-3", children: [
30
- m && /* @__PURE__ */ e.jsx(
26
+ touched: c,
27
+ ...r
28
+ }, g) => /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-3", children: [
29
+ i && /* @__PURE__ */ e.jsx(
31
30
  L,
32
31
  {
33
- htmlFor: a.id,
32
+ htmlFor: r.id,
34
33
  className: u({
35
- "text-neutral-700": a.disabled
34
+ "text-neutral-700": r.disabled
36
35
  }),
37
- children: m
36
+ children: i
38
37
  }
39
38
  ),
40
39
  /* @__PURE__ */ e.jsx(
41
- g.default,
40
+ j.default,
42
41
  {
43
- ref: j,
44
- className: u("flex", n),
45
- flagComponent: C,
46
- countrySelectComponent: k,
42
+ ref: g,
43
+ className: u("flex", t),
44
+ flagComponent: h,
45
+ countrySelectComponent: q,
47
46
  inputComponent: y,
48
47
  smartCaret: !1,
49
- labels: p === "es" ? b : p === "fr" ? v : S,
50
- value: r || void 0,
51
- onChange: (x) => s?.(x || ""),
48
+ labels: p === "es" ? I : p === "fr" ? w : v,
49
+ value: a || void 0,
50
+ onChange: (x) => n?.(x || ""),
52
51
  countrySelectProps: {
53
- variant: t,
52
+ size: s,
54
53
  rounded: o,
55
54
  error: l,
56
- touched: i
55
+ touched: c
57
56
  },
58
57
  numberInputProps: {
59
- variant: t,
58
+ size: s,
60
59
  rounded: o,
61
60
  error: l,
62
- touched: i
61
+ touched: c
63
62
  },
64
- ...a
63
+ ...r
65
64
  }
66
65
  ),
67
- l && i ? /* @__PURE__ */ e.jsx(
66
+ l && c ? /* @__PURE__ */ e.jsx(
68
67
  "span",
69
68
  {
70
- id: a.id && `${a.id}-error-text`,
69
+ id: r.id && `${r.id}-error-text`,
71
70
  "aria-invalid": !0,
72
71
  className: "text-destructive text-label-md -mt-1",
73
72
  children: l
74
73
  }
75
- ) : c ? /* @__PURE__ */ e.jsx(
74
+ ) : m ? /* @__PURE__ */ e.jsx(
76
75
  "span",
77
76
  {
78
- id: a.id && `${a.id}-helper-text`,
77
+ id: r.id && `${r.id}-helper-text`,
79
78
  className: u("text-label-md -mt-1", {
80
- "text-muted-foreground": !l && !i,
81
- "text-destructive": l && i,
82
- "text-neutral-700": a.disabled
79
+ "text-muted-foreground": !l && !c,
80
+ "text-destructive": l && c,
81
+ "text-neutral-700": r.disabled
83
82
  }),
84
- children: c
83
+ children: m
85
84
  }
86
85
  ) : null
87
- ] }))
86
+ ] })
88
87
  );
89
88
  _.displayName = "PhoneInput";
90
89
  const y = f.forwardRef(
91
- ({ className: n, rounded: s = "default", error: r, touched: t, variant: o, ...m }, c) => {
92
- const { "data-country": p, ...l } = m;
90
+ ({ className: t, rounded: n = "default", error: a, touched: s, size: o, ...i }, m) => {
91
+ const { "data-country": p, ...l } = i;
93
92
  return /* @__PURE__ */ e.jsx(
94
93
  F,
95
94
  {
96
- variant: o,
95
+ size: o,
96
+ containerClassName: "w-full",
97
97
  className: u(
98
- s === "default" ? "rounded-s-none rounded-e-lg" : "rounded-s-none rounded-e-full",
98
+ "w-full",
99
99
  {
100
- "border-destructive": r && t,
101
- "border-blue-800": t && !r,
100
+ "border-destructive": a && s,
101
+ "border-blue-800": s && !a,
102
+ "rounded-s-none rounded-e-lg": n !== "full",
103
+ "rounded-s-none rounded-e-full": n === "full",
102
104
  "rounded-e-sm": o === "sm",
103
105
  "rounded-e-md": o === "md",
104
106
  "rounded-e-lg": o === "lg"
105
107
  },
106
- n
108
+ t
107
109
  ),
108
110
  ...l,
109
- ref: c
111
+ ref: m
110
112
  }
111
113
  );
112
114
  }
113
115
  );
114
116
  y.displayName = "InputComponent";
115
- const k = ({
116
- disabled: n,
117
- value: s,
118
- options: r,
119
- onChange: t,
120
- variant: o = "md",
121
- rounded: m = "default",
122
- error: c,
117
+ const q = ({
118
+ disabled: t,
119
+ value: n,
120
+ options: a,
121
+ onChange: s,
122
+ size: o = "md",
123
+ rounded: i = "default",
124
+ error: m,
123
125
  touched: p
124
126
  }) => {
125
- const l = f.useRef(null), [i, a] = f.useState(""), [j, x] = f.useState(!1);
127
+ const l = f.useRef(null), [c, r] = f.useState(""), [g, x] = f.useState(!1);
126
128
  return /* @__PURE__ */ e.jsxs(
127
129
  V,
128
130
  {
129
- open: j,
131
+ open: g,
130
132
  modal: !0,
131
133
  onOpenChange: (d) => {
132
- x(d), d && a("");
134
+ x(d), d && r("");
133
135
  },
134
136
  children: [
135
- /* @__PURE__ */ e.jsx(A, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
136
- P,
137
+ /* @__PURE__ */ e.jsx(k, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
138
+ "button",
137
139
  {
138
140
  type: "button",
139
- variant: "outline",
140
141
  className: u(
141
- "outline-r-0 outline-input text-secondary flex gap-1 px-3 focus:z-10",
142
- m === "default" ? "rounded-e-none" : "rounded-s-full rounded-e-none",
142
+ "file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex w-fit items-center justify-center min-w-0 border bg-transparent text-base transition-[color,box-shadow] outline-none file:inline-flex file:border-0 file:bg-transparent file:text-sm file:font-semibold disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm border-r-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] focus-visible:z-1",
143
+ i === "default" ? "rounded-e-none" : "rounded-s-full rounded-e-none",
143
144
  {
144
- "outline-destructive": c && p,
145
- "outline-blue-800": p && !c,
146
- "h-8 rounded-s-sm": o === "sm",
147
- "h-12 rounded-s-md": o === "md",
148
- "h-16 rounded-s-lg": o === "lg"
145
+ "outline-destructive": m && p,
146
+ "outline-blue-800": p && !m,
147
+ "text-label-md h-8 rounded-s-sm px-2 py-1": o === "sm",
148
+ "text-label-lg h-12 rounded-s-md px-3 py-1": o === "md",
149
+ "text-label-xl h-16 rounded-s-lg px-4 py-2": o === "lg"
149
150
  }
150
151
  ),
151
- disabled: n,
152
+ disabled: t,
152
153
  children: [
153
154
  /* @__PURE__ */ e.jsx(
154
- C,
155
+ h,
155
156
  {
156
- country: s,
157
- countryName: s,
158
- disabled: n
157
+ country: n,
158
+ countryName: n,
159
+ disabled: t
159
160
  }
160
161
  ),
161
162
  /* @__PURE__ */ e.jsx(
162
- N,
163
+ C,
163
164
  {
164
165
  iconName: "IconChevronDown",
165
166
  className: u(
166
167
  "-mr-2 size-4 opacity-50",
167
- n ? "hidden" : "opacity-100"
168
+ t ? "hidden" : "opacity-100"
168
169
  )
169
170
  }
170
171
  )
171
172
  ]
172
173
  }
173
174
  ) }),
174
- /* @__PURE__ */ e.jsx(B, { className: "w-[300px] p-0", children: /* @__PURE__ */ e.jsxs(w, { children: [
175
+ /* @__PURE__ */ e.jsx(A, { className: "w-[300px] p-0", children: /* @__PURE__ */ e.jsxs(S, { children: [
175
176
  /* @__PURE__ */ e.jsx(
176
- R,
177
+ P,
177
178
  {
178
- value: i,
179
+ value: c,
179
180
  onValueChange: (d) => {
180
- a(d), setTimeout(() => {
181
+ r(d), setTimeout(() => {
181
182
  if (l.current) {
182
- const h = l.current.querySelector(
183
+ const b = l.current.querySelector(
183
184
  "[data-radix-scroll-area-viewport]"
184
185
  );
185
- h && (h.scrollTop = 0);
186
+ b && (b.scrollTop = 0);
186
187
  }
187
188
  }, 0);
188
189
  },
189
190
  placeholder: "Search country..."
190
191
  }
191
192
  ),
192
- /* @__PURE__ */ e.jsx(z, { children: /* @__PURE__ */ e.jsxs(T, { ref: l, className: "h-72", children: [
193
+ /* @__PURE__ */ e.jsx(R, { children: /* @__PURE__ */ e.jsxs(T, { ref: l, className: "h-72", children: [
193
194
  /* @__PURE__ */ e.jsx(O, { children: "No country found." }),
194
- /* @__PURE__ */ e.jsx($, { children: r.map(
195
- ({ value: d, label: h }) => d ? /* @__PURE__ */ e.jsx(
196
- q,
195
+ /* @__PURE__ */ e.jsx($, { children: a.map(
196
+ ({ value: d, label: b }) => d ? /* @__PURE__ */ e.jsx(
197
+ D,
197
198
  {
198
199
  country: d,
199
- countryName: h,
200
- selectedCountry: s,
201
- onChange: t,
200
+ countryName: b,
201
+ selectedCountry: n,
202
+ onChange: s,
202
203
  onSelectComplete: () => x(!1)
203
204
  },
204
205
  d
@@ -209,42 +210,42 @@ const k = ({
209
210
  ]
210
211
  }
211
212
  );
212
- }, q = ({
213
- country: n,
214
- countryName: s,
215
- selectedCountry: r,
216
- onChange: t,
213
+ }, D = ({
214
+ country: t,
215
+ countryName: n,
216
+ selectedCountry: a,
217
+ onChange: s,
217
218
  onSelectComplete: o
218
219
  }) => {
219
- const m = () => {
220
- t(n), o();
220
+ const i = () => {
221
+ s(t), o();
221
222
  };
222
- return /* @__PURE__ */ e.jsxs(E, { className: "gap-2", onSelect: m, children: [
223
- /* @__PURE__ */ e.jsx(C, { country: n, countryName: s }),
224
- /* @__PURE__ */ e.jsx("span", { className: "flex-1 text-sm", children: s }),
225
- /* @__PURE__ */ e.jsx("span", { className: "text-foreground/50 text-sm", children: `+${g.getCountryCallingCode(n)}` }),
223
+ return /* @__PURE__ */ e.jsxs(E, { className: "gap-2", onSelect: i, children: [
224
+ /* @__PURE__ */ e.jsx(h, { country: t, countryName: n }),
225
+ /* @__PURE__ */ e.jsx("span", { className: "flex-1 text-sm", children: n }),
226
+ /* @__PURE__ */ e.jsx("span", { className: "text-foreground/50 text-sm", children: `+${j.getCountryCallingCode(t)}` }),
226
227
  /* @__PURE__ */ e.jsx(
227
- N,
228
+ C,
228
229
  {
229
230
  iconName: "IconCheck",
230
- className: `ml-auto size-4 ${n === r ? "opacity-100" : "opacity-0"}`
231
+ className: `ml-auto size-4 ${t === a ? "opacity-100" : "opacity-0"}`
231
232
  }
232
233
  )
233
234
  ] });
234
- }, C = ({
235
- country: n,
236
- countryName: s,
237
- disabled: r
235
+ }, h = ({
236
+ country: t,
237
+ countryName: n,
238
+ disabled: a
238
239
  }) => {
239
- const t = I[n];
240
+ const s = N[t];
240
241
  return /* @__PURE__ */ e.jsx(
241
242
  "span",
242
243
  {
243
244
  className: u(
244
245
  "bg-foreground/20 flex h-4 w-6 overflow-hidden rounded-[4px] [&_svg:not([class*='size-'])]:size-full",
245
- { "opacity-50": r }
246
+ { "opacity-50": a }
246
247
  ),
247
- children: t && /* @__PURE__ */ e.jsx(t, { title: s })
248
+ children: s && /* @__PURE__ */ e.jsx(s, { title: n })
248
249
  }
249
250
  );
250
251
  };
package/dist/ui.css CHANGED
@@ -1,6 +1,8 @@
1
1
  @import 'tailwindcss';
2
2
  @import 'tw-animate-css';
3
3
 
4
+ @source "./**/*.{js,jsx,ts,tsx}";
5
+
4
6
  @custom-variant dark (&:is(.dark *));
5
7
 
6
8
  @custom-variant fixed (&:is(.layout-fixed *));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clasing/ui",
3
- "version": "0.1.129",
3
+ "version": "0.1.130",
4
4
  "type": "module",
5
5
  "main": "./dist/index.umd.js",
6
6
  "module": "./dist/index.es.js",