@clasing/ui 2.6.0 → 2.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/badge-DK9gdPpu.cjs +91 -0
- package/dist/badge-aFyTFGVU.js +173 -0
- package/dist/button-2VesFn_C.js +256 -0
- package/dist/button-DWBp81pk.cjs +70 -0
- package/dist/card-DkYKwjsA.cjs +12 -0
- package/dist/{card-Cv2M4wv8.js → card-aAzRmGVH.js} +19 -5
- package/dist/chip-BlWb6w16.cjs +17 -0
- package/dist/chip-BmqvnZuy.js +116 -0
- package/dist/{clasing-icon-Bym32_-4.cjs → clasing-icon-CHt2Otn8.cjs} +1 -1
- package/dist/{clasing-icon-BIYMLc8o.js → clasing-icon-CJQQN554.js} +1 -1
- package/dist/command-DNjJookC.cjs +35 -0
- package/dist/command-peXi2dFX.js +209 -0
- package/dist/components/accordion.cjs.js +20 -1
- package/dist/components/accordion.es.js +38 -16
- package/dist/components/alert-dialog.cjs.js +17 -1
- package/dist/components/alert-dialog.es.js +23 -7
- package/dist/components/alert.cjs.js +6 -1
- package/dist/components/alert.d.ts +1 -2
- package/dist/components/alert.es.js +54 -50
- package/dist/components/avatar.cjs.js +1 -1
- package/dist/components/avatar.es.js +1 -1
- package/dist/components/badge.cjs.js +1 -1
- package/dist/components/badge.d.ts +1 -1
- package/dist/components/badge.es.js +1 -1
- package/dist/components/blocks/interactive-card.cjs.js +5 -1
- package/dist/components/blocks/interactive-card.es.js +60 -56
- package/dist/components/blocks/selectable-chips.cjs.js +1 -1
- package/dist/components/blocks/selectable-chips.d.ts +6 -6
- package/dist/components/blocks/selectable-chips.es.js +88 -55
- package/dist/components/breadcrumb.cjs.js +1 -1
- package/dist/components/breadcrumb.es.js +1 -1
- package/dist/components/button-group.cjs.js +1 -1
- package/dist/components/button-group.es.js +3 -3
- package/dist/components/button.cjs.js +1 -1
- package/dist/components/button.d.ts +8 -17
- package/dist/components/button.es.js +2 -4
- package/dist/components/calendar.cjs.js +73 -1
- package/dist/components/calendar.es.js +120 -42
- package/dist/components/card.cjs.js +1 -1
- package/dist/components/card.es.js +1 -1
- package/dist/components/chart.cjs.js +27 -2
- package/dist/components/chart.es.js +38 -7
- package/dist/components/checkbox.cjs.js +15 -1
- package/dist/components/checkbox.es.js +28 -14
- package/dist/components/chip.cjs.js +1 -1
- package/dist/components/chip.d.ts +3 -3
- package/dist/components/chip.es.js +1 -1
- package/dist/components/clasing-icon.cjs.js +1 -1
- package/dist/components/clasing-icon.es.js +1 -1
- package/dist/components/collapsible.cjs.js +10 -1
- package/dist/components/collapsible.es.js +17 -8
- package/dist/components/command.cjs.js +1 -1
- package/dist/components/command.es.js +1 -1
- package/dist/components/context-menu.cjs.js +70 -1
- package/dist/components/context-menu.es.js +95 -14
- package/dist/components/dialog.cjs.js +1 -1
- package/dist/components/dialog.es.js +1 -1
- package/dist/components/divider.cjs.js +1 -1
- package/dist/components/divider.es.js +1 -1
- package/dist/components/drawer.cjs.js +42 -1
- package/dist/components/drawer.es.js +63 -17
- package/dist/components/dropdown-menu.cjs.js +70 -1
- package/dist/components/dropdown-menu.es.js +133 -52
- package/dist/components/form.cjs.js +1 -1
- package/dist/components/form.es.js +21 -21
- package/dist/components/hover-card.cjs.js +13 -1
- package/dist/components/hover-card.es.js +14 -2
- package/dist/components/input-otp.cjs.js +19 -1
- package/dist/components/input-otp.es.js +49 -25
- package/dist/components/input.cjs.js +1 -1
- package/dist/components/input.es.js +1 -1
- package/dist/components/kbd.cjs.js +9 -1
- package/dist/components/kbd.es.js +11 -3
- package/dist/components/label.cjs.js +1 -1
- package/dist/components/label.es.js +1 -1
- package/dist/components/menubar.cjs.js +74 -1
- package/dist/components/menubar.es.js +121 -36
- package/dist/components/multi-select.cjs.js +22 -1
- package/dist/components/multi-select.es.js +54 -27
- package/dist/components/navigation-menu.cjs.js +70 -1
- package/dist/components/navigation-menu.es.js +85 -11
- package/dist/components/phone-input.cjs.js +21 -1
- package/dist/components/phone-input.es.js +267 -174
- package/dist/components/popover.cjs.js +1 -1
- package/dist/components/popover.es.js +1 -1
- package/dist/components/progress.cjs.js +1 -1
- package/dist/components/progress.es.js +3 -3
- package/dist/components/resizable.cjs.js +22 -1
- package/dist/components/resizable.d.ts +1 -1
- package/dist/components/resizable.es.js +52 -17
- package/dist/components/scroll-area.cjs.js +1 -1
- package/dist/components/scroll-area.es.js +1 -1
- package/dist/components/select.cjs.js +56 -1
- package/dist/components/select.d.ts +2 -1
- package/dist/components/select.es.js +86 -27
- package/dist/components/sheet.cjs.js +36 -1
- package/dist/components/sheet.es.js +75 -34
- package/dist/components/skeleton.cjs.js +1 -1
- package/dist/components/skeleton.es.js +1 -1
- package/dist/components/slider.cjs.js +23 -1
- package/dist/components/slider.es.js +46 -24
- package/dist/components/sonner.cjs.js +15 -1
- package/dist/components/sonner.es.js +67 -41
- package/dist/components/switch.cjs.js +19 -1
- package/dist/components/switch.es.js +29 -11
- package/dist/components/table.cjs.js +20 -1
- package/dist/components/table.es.js +56 -34
- package/dist/components/textarea.cjs.js +22 -1
- package/dist/components/textarea.es.js +46 -25
- package/dist/components/toggle-group.cjs.js +12 -1
- package/dist/components/toggle-group.es.js +15 -4
- package/dist/components/toggle.cjs.js +1 -1
- package/dist/components/toggle.es.js +1 -1
- package/dist/components/tooltip.cjs.js +1 -1
- package/dist/components/tooltip.es.js +1 -1
- package/dist/dialog-BUaX7IId.cjs +28 -0
- package/dist/{dialog-CH4VxKX4.js → dialog-CdmsVmRe.js} +41 -14
- package/dist/divider-D4EfIlt3.cjs +1 -0
- package/dist/{divider-BMxVoyPg.js → divider-DumyhJI_.js} +6 -6
- package/dist/entries/button.d.ts +2 -2
- package/dist/index-Bfismeyo.cjs +6 -0
- package/dist/{index-ECyCsPX0.cjs → index-BmhzhLcV.cjs} +1 -1
- package/dist/{index-DEha_UuN.js → index-CnqageB2.js} +1 -1
- package/dist/{index-BCEGphus.js → index-CwFDnnd3.js} +678 -519
- package/dist/input-kOA9xJIa.js +122 -0
- package/dist/input-u-OTHOPe.cjs +28 -0
- package/dist/label-BteX4MEt.js +27 -0
- package/dist/label-O3mSiGyx.cjs +7 -0
- package/dist/popover-A1-x5q-F.cjs +13 -0
- package/dist/{popover-BzUZg2od.js → popover-eQq2Is-I.js} +14 -2
- package/dist/{scroll-area-CxpVQq0v.js → scroll-area-CJy_EOqT.js} +10 -5
- package/dist/scroll-area-DFyIQG6Z.cjs +6 -0
- package/dist/toggle-BdWGPLza.cjs +21 -0
- package/dist/toggle-DuhnqdDT.js +63 -0
- package/dist/tooltip-BYeLeBei.js +74 -0
- package/dist/tooltip-BZWEHWmU.cjs +14 -0
- package/dist/ui.css +210 -210
- package/package.json +32 -28
- package/dist/badge-C29hQNIG.js +0 -84
- package/dist/badge-Da_xHgvC.cjs +0 -1
- package/dist/button-BIGg5o8m.js +0 -213
- package/dist/button-BsQuxg6u.cjs +0 -1
- package/dist/card-COFAc2zN.cjs +0 -1
- package/dist/chip-C_Uh7fe6.cjs +0 -1
- package/dist/chip-ZryYiiU1.js +0 -89
- package/dist/command-CGrOI2Z9.js +0 -169
- package/dist/command-CrtCQpi_.cjs +0 -1
- package/dist/dialog-DHZARK1o.cjs +0 -1
- package/dist/divider-BcIwJzm7.cjs +0 -1
- package/dist/index-9HRzXEQf.cjs +0 -6
- package/dist/input-BdGPpUZ8.js +0 -82
- package/dist/input-DDgYyRSP.cjs +0 -1
- package/dist/label-Bl6V6esj.js +0 -21
- package/dist/label-D3iN3bzS.cjs +0 -1
- package/dist/popover-Cj78cvz1.cjs +0 -1
- package/dist/scroll-area-D74XszlE.cjs +0 -1
- package/dist/toggle-99EXLQgX.js +0 -43
- package/dist/toggle-CtoQhQby.cjs +0 -1
- package/dist/tooltip-CHBabriJ.js +0 -56
- package/dist/tooltip-Dd6ylN0m.cjs +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { j as e, c as o } from "../index-
|
|
1
|
+
import { j as e, c as o } from "../index-CwFDnnd3.js";
|
|
2
2
|
import * as n from "@radix-ui/react-navigation-menu";
|
|
3
|
-
import { c as s } from "../index-
|
|
3
|
+
import { c as s } from "../index-CnqageB2.js";
|
|
4
4
|
import { CaretDownIcon as u } from "@phosphor-icons/react";
|
|
5
5
|
function v({
|
|
6
6
|
className: t,
|
|
@@ -14,7 +14,10 @@ function v({
|
|
|
14
14
|
"data-slot": "navigation-menu",
|
|
15
15
|
"data-viewport": i,
|
|
16
16
|
className: o(
|
|
17
|
-
|
|
17
|
+
`
|
|
18
|
+
group/navigation-menu relative flex max-w-max flex-1 items-center
|
|
19
|
+
justify-center
|
|
20
|
+
`,
|
|
18
21
|
t
|
|
19
22
|
),
|
|
20
23
|
...r,
|
|
@@ -55,7 +58,18 @@ function p({
|
|
|
55
58
|
);
|
|
56
59
|
}
|
|
57
60
|
const d = s(
|
|
58
|
-
|
|
61
|
+
`
|
|
62
|
+
group inline-flex h-9 w-max items-center justify-center rounded-md
|
|
63
|
+
bg-background px-4 py-2 paragraph-sm font-medium
|
|
64
|
+
transition-[color,box-shadow] outline-none
|
|
65
|
+
hover:bg-accent hover:text-accent-foreground
|
|
66
|
+
focus:bg-accent focus:text-accent-foreground
|
|
67
|
+
focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1
|
|
68
|
+
disabled:pointer-events-none disabled:opacity-50
|
|
69
|
+
data-[state=open]:bg-accent/50 data-[state=open]:text-accent-foreground
|
|
70
|
+
data-[state=open]:hover:bg-accent
|
|
71
|
+
data-[state=open]:focus:bg-accent
|
|
72
|
+
`
|
|
59
73
|
);
|
|
60
74
|
function x({
|
|
61
75
|
className: t,
|
|
@@ -74,7 +88,10 @@ function x({
|
|
|
74
88
|
/* @__PURE__ */ e.jsx(
|
|
75
89
|
u,
|
|
76
90
|
{
|
|
77
|
-
className:
|
|
91
|
+
className: `\r
|
|
92
|
+
relative top-px ml-1 size-3 transition duration-300\r
|
|
93
|
+
group-data-[state=open]:rotate-180\r
|
|
94
|
+
`,
|
|
78
95
|
"aria-hidden": "true"
|
|
79
96
|
}
|
|
80
97
|
)
|
|
@@ -91,8 +108,35 @@ function w({
|
|
|
91
108
|
{
|
|
92
109
|
"data-slot": "navigation-menu-content",
|
|
93
110
|
className: o(
|
|
94
|
-
|
|
95
|
-
|
|
111
|
+
`
|
|
112
|
+
top-0 left-0 w-full p-2 pr-2.5
|
|
113
|
+
data-[motion=from-end]:slide-in-from-right-52
|
|
114
|
+
data-[motion=from-start]:slide-in-from-left-52
|
|
115
|
+
data-[motion=to-end]:slide-out-to-right-52
|
|
116
|
+
data-[motion=to-start]:slide-out-to-left-52
|
|
117
|
+
data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in
|
|
118
|
+
data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out
|
|
119
|
+
md:absolute md:w-auto
|
|
120
|
+
`,
|
|
121
|
+
`
|
|
122
|
+
group-data-[viewport=false]/navigation-menu:top-full
|
|
123
|
+
group-data-[viewport=false]/navigation-menu:mt-1.5
|
|
124
|
+
group-data-[viewport=false]/navigation-menu:overflow-hidden
|
|
125
|
+
group-data-[viewport=false]/navigation-menu:rounded-md
|
|
126
|
+
group-data-[viewport=false]/navigation-menu:border
|
|
127
|
+
group-data-[viewport=false]/navigation-menu:bg-popover
|
|
128
|
+
group-data-[viewport=false]/navigation-menu:text-popover-foreground
|
|
129
|
+
group-data-[viewport=false]/navigation-menu:shadow-sm
|
|
130
|
+
group-data-[viewport=false]/navigation-menu:duration-200
|
|
131
|
+
**:data-[slot=navigation-menu-link]:focus:ring-0
|
|
132
|
+
**:data-[slot=navigation-menu-link]:focus:outline-none
|
|
133
|
+
group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out
|
|
134
|
+
group-data-[viewport=false]/navigation-menu:data-[state=closed]:fade-out-0
|
|
135
|
+
group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95
|
|
136
|
+
group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in
|
|
137
|
+
group-data-[viewport=false]/navigation-menu:data-[state=open]:fade-in-0
|
|
138
|
+
group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95
|
|
139
|
+
`,
|
|
96
140
|
t
|
|
97
141
|
),
|
|
98
142
|
...a
|
|
@@ -114,7 +158,14 @@ function l({
|
|
|
114
158
|
{
|
|
115
159
|
"data-slot": "navigation-menu-viewport",
|
|
116
160
|
className: o(
|
|
117
|
-
|
|
161
|
+
`
|
|
162
|
+
relative mt-1.5 h-(--radix-navigation-menu-viewport-height) w-full
|
|
163
|
+
origin-top overflow-hidden rounded-md border bg-popover
|
|
164
|
+
text-popover-foreground shadow-sm
|
|
165
|
+
data-[state=closed]:animate-out data-[state=closed]:zoom-out-95
|
|
166
|
+
data-[state=open]:animate-in data-[state=open]:zoom-in-90
|
|
167
|
+
md:w-(--radix-navigation-menu-viewport-width)
|
|
168
|
+
`,
|
|
118
169
|
t
|
|
119
170
|
),
|
|
120
171
|
...a
|
|
@@ -132,7 +183,19 @@ function b({
|
|
|
132
183
|
{
|
|
133
184
|
"data-slot": "navigation-menu-link",
|
|
134
185
|
className: o(
|
|
135
|
-
|
|
186
|
+
`
|
|
187
|
+
flex flex-col gap-1 rounded-sm p-2 paragraph-sm transition-all
|
|
188
|
+
outline-none
|
|
189
|
+
hover:bg-accent hover:text-accent-foreground
|
|
190
|
+
focus:bg-accent focus:text-accent-foreground
|
|
191
|
+
focus-visible:ring-[3px] focus-visible:ring-ring/50
|
|
192
|
+
focus-visible:outline-1
|
|
193
|
+
data-[active=true]:bg-accent/50
|
|
194
|
+
data-[active=true]:text-accent-foreground
|
|
195
|
+
data-[active=true]:hover:bg-accent
|
|
196
|
+
data-[active=true]:focus:bg-accent
|
|
197
|
+
[&_svg:not([class*='size-'])]:size-4
|
|
198
|
+
`,
|
|
136
199
|
t
|
|
137
200
|
),
|
|
138
201
|
...a
|
|
@@ -148,11 +211,22 @@ function h({
|
|
|
148
211
|
{
|
|
149
212
|
"data-slot": "navigation-menu-indicator",
|
|
150
213
|
className: o(
|
|
151
|
-
|
|
214
|
+
`
|
|
215
|
+
top-full z-1 flex h-1.5 items-end justify-center overflow-hidden
|
|
216
|
+
data-[state=hidden]:animate-out data-[state=hidden]:fade-out
|
|
217
|
+
data-[state=visible]:animate-in data-[state=visible]:fade-in
|
|
218
|
+
`,
|
|
152
219
|
t
|
|
153
220
|
),
|
|
154
221
|
...a,
|
|
155
|
-
children: /* @__PURE__ */ e.jsx(
|
|
222
|
+
children: /* @__PURE__ */ e.jsx(
|
|
223
|
+
"div",
|
|
224
|
+
{
|
|
225
|
+
className: `\r
|
|
226
|
+
relative top-[60%] size-2 rotate-45 rounded-tl-sm bg-border shadow-md\r
|
|
227
|
+
`
|
|
228
|
+
}
|
|
229
|
+
)
|
|
156
230
|
}
|
|
157
231
|
);
|
|
158
232
|
}
|
|
@@ -1 +1,21 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-Bfismeyo.cjs"),m=require("../command-DNjJookC.cjs"),D=require("../input-u-OTHOPe.cjs"),C=require("../popover-A1-x5q-F.cjs"),M=require("../scroll-area-DFyIQG6Z.cjs"),S=require("@phosphor-icons/react"),F=require("react"),L=require("react-phone-number-input"),H=require("react-phone-number-input/flags"),G=require("react-phone-number-input/locale/en"),W=require("react-phone-number-input/locale/es"),$=require("react-phone-number-input/locale/fr");function N(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,o.get?o:{enumerable:!0,get:()=>t[n]})}}return r.default=t,Object.freeze(r)}const s=N(F),I=N(L);function z(t,r){const[n,o]=s.useState(t);return s.useEffect(()=>{const l=setTimeout(()=>{o(t)},r);return()=>{clearTimeout(l)}},[t,r]),n}const P=s.forwardRef(({className:t,onChange:r,value:n,size:o="md",rounded:l="default",locale:c="en",...u},d)=>e.jsxRuntimeExports.jsx(I.default,{ref:d,className:e.cn("flex",t),flagComponent:B,countrySelectComponent:O,inputComponent:q,smartCaret:!1,labels:c==="es"?W:c==="fr"?$:G,value:n||void 0,onChange:f=>r?.(f||""),countrySelectProps:{size:o,rounded:l,...u},numberInputProps:{size:o,rounded:l,...u},...u}));P.displayName="PhoneInput";const q=s.forwardRef(({className:t,rounded:r="default",size:n,...o},l)=>{const{"data-country":c,...u}=o;return e.jsxRuntimeExports.jsx(D.Input,{size:n,className:e.cn("w-full",{"rounded-s-none rounded-e-lg":r!=="full","rounded-s-none rounded-e-full":r==="full","rounded-e-sm":n==="sm","rounded-e-md":n==="md","rounded-e-lg":n==="lg"},t),...u,ref:l})});q.displayName="InputComponent";const O=s.memo(({disabled:t,value:r,options:n,onChange:o,size:l="md",rounded:c="default",...u})=>{const d=s.useRef(null),[f,E]=s.useState(""),[b,R]=s.useState(!1),[y,v]=s.useState(20),x=z(f,100),p=s.useMemo(()=>x?n.filter(({label:a,value:i})=>i&&(a.toLowerCase().includes(x.toLowerCase())||i.toLowerCase().includes(x.toLowerCase()))):n,[n,x]),g=s.useMemo(()=>p.slice(0,y),[p,y]);return s.useEffect(()=>{v(20)},[x]),s.useEffect(()=>{if(!b)return;const a=setTimeout(()=>{if(!d.current)return;const h=d.current.querySelector("[data-radix-scroll-area-viewport]");if(!h)return;const w=()=>{const{scrollTop:_,scrollHeight:V,clientHeight:k}=h;_+k>=V-100&&v(A=>Math.min(A+20,p.length))};h.addEventListener("scroll",w,{passive:!0}),window.__scrollCleanup=()=>{h.removeEventListener("scroll",w)}},100);return()=>{clearTimeout(a);const i=window.__scrollCleanup;i&&i()}},[b,p.length]),e.jsxRuntimeExports.jsxs(C.Popover,{open:b,modal:!0,onOpenChange:a=>{R(a),a&&E("")},children:[e.jsxRuntimeExports.jsx(C.PopoverTrigger,{asChild:!0,children:e.jsxRuntimeExports.jsxs("button",{type:"button","aria-invalid":u["aria-invalid"],className:e.cn(`
|
|
2
|
+
flex w-fit min-w-0 items-center justify-center border border-r-0
|
|
3
|
+
border-input bg-transparent paragraph-md
|
|
4
|
+
transition-[color,box-shadow] outline-none
|
|
5
|
+
selection:bg-primary selection:text-primary-foreground
|
|
6
|
+
file:inline-flex file:border-0 file:bg-transparent
|
|
7
|
+
file:paragraph-sm file:font-semibold file:text-foreground
|
|
8
|
+
placeholder:text-muted-foreground
|
|
9
|
+
focus-visible:z-1 focus-visible:border-ring
|
|
10
|
+
focus-visible:ring-[3px] focus-visible:ring-ring/50
|
|
11
|
+
disabled:pointer-events-none disabled:cursor-not-allowed
|
|
12
|
+
disabled:opacity-50
|
|
13
|
+
aria-invalid:border-destructive-foreground
|
|
14
|
+
aria-invalid:ring-destructive-foreground/20
|
|
15
|
+
md:paragraph-sm
|
|
16
|
+
dark:bg-input/30
|
|
17
|
+
dark:aria-invalid:ring-destructive-foreground/40
|
|
18
|
+
`,c==="default"?"rounded-e-none":"rounded-s-full rounded-e-none",{"h-8 rounded-s-sm px-2 py-1 label-md":l==="sm","h-12 rounded-s-md px-3 py-1 label-lg":l==="md","h-16 rounded-s-lg px-4 py-2 label-xl":l==="lg"}),disabled:t,...u,children:[e.jsxRuntimeExports.jsx(j,{country:r,countryName:r,disabled:t}),e.jsxRuntimeExports.jsx(S.CaretDownIcon,{className:e.cn("-mr-2 size-4 opacity-50",t?"hidden":"opacity-100")})]})}),e.jsxRuntimeExports.jsx(C.PopoverContent,{className:"w-[300px] p-0",children:e.jsxRuntimeExports.jsxs(m.Command,{children:[e.jsxRuntimeExports.jsx(m.CommandInput,{value:f,onValueChange:a=>{E(a),setTimeout(()=>{if(d.current){const i=d.current.querySelector("[data-radix-scroll-area-viewport]");i&&(i.scrollTop=0)}},0)},placeholder:"Search country..."}),e.jsxRuntimeExports.jsx(m.CommandList,{children:e.jsxRuntimeExports.jsxs(M.ScrollArea,{ref:d,className:"h-72",children:[e.jsxRuntimeExports.jsx(m.CommandEmpty,{children:g.length===0&&n.length>20?"Too many results. Please refine your search.":"No country found."}),e.jsxRuntimeExports.jsxs(m.CommandGroup,{children:[g.map(({value:a,label:i})=>a?e.jsxRuntimeExports.jsx(T,{country:a,countryName:i,selectedCountry:r,onChange:o,onSelectComplete:()=>R(!1)},a):null),g.length<p.length&&e.jsxRuntimeExports.jsxs(m.CommandItem,{disabled:!0,className:"paragraph-xs text-muted-foreground",children:["Showing ",g.length," of"," ",p.length," countries"]})]})]})})]})})]})});O.displayName="CountrySelect";const T=s.memo(({country:t,countryName:r,selectedCountry:n,onChange:o,onSelectComplete:l})=>{const c=s.useCallback(()=>{o(t),l()},[t,o,l]);return e.jsxRuntimeExports.jsxs(m.CommandItem,{className:"gap-2",onSelect:c,children:[e.jsxRuntimeExports.jsx(j,{country:t,countryName:r}),e.jsxRuntimeExports.jsx("span",{className:"flex-1 paragraph-sm",children:r}),e.jsxRuntimeExports.jsx("span",{className:"paragraph-sm text-foreground/50",children:`+${I.getCountryCallingCode(t)}`}),e.jsxRuntimeExports.jsx(S.CheckIcon,{className:e.cn("ml-auto size-4",t===n?"opacity-100":"opacity-0")})]})});T.displayName="CountrySelectOption";const j=s.memo(({country:t,countryName:r,disabled:n})=>{const o=H[t];return e.jsxRuntimeExports.jsx("span",{className:e.cn(`
|
|
19
|
+
flex h-4 w-6 overflow-hidden rounded-[4px] bg-foreground/20
|
|
20
|
+
[&_svg:not([class*='size-'])]:size-full
|
|
21
|
+
`,{"opacity-50":n}),children:o?e.jsxRuntimeExports.jsx(o,{title:r}):null})}),B=t=>e.jsxRuntimeExports.jsx(j,{...t});j.displayName="FlagComponent";exports.PhoneInput=P;
|