@clasing/ui 2.2.0 → 2.4.0
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/{button-CUrfGF3Y.js → button-3Q4mqjFF.js} +68 -68
- package/dist/button-BekvnyS7.cjs +1 -0
- package/dist/clasing-icon-CMe7j64k.cjs +1 -0
- package/dist/clasing-icon-XjkVWhKg.js +99 -0
- package/dist/components/alert-dialog.cjs.js +1 -1
- package/dist/components/alert-dialog.es.js +1 -1
- package/dist/components/badge.d.ts +1 -1
- package/dist/components/button.cjs.js +1 -1
- package/dist/components/button.es.js +1 -1
- package/dist/components/calendar.cjs.js +1 -1
- package/dist/components/calendar.es.js +1 -1
- package/dist/components/clasing-icon.cjs.js +1 -0
- package/dist/components/clasing-icon.d.ts +6 -0
- package/dist/components/clasing-icon.es.js +4 -0
- package/dist/components/input.cjs.js +1 -1
- package/dist/components/input.es.js +1 -1
- package/dist/components/multi-select.cjs.js +1 -1
- package/dist/components/multi-select.es.js +95 -94
- package/dist/components/phone-input.cjs.js +1 -1
- package/dist/components/phone-input.es.js +1 -1
- package/dist/components/toggle.d.ts +1 -1
- package/dist/entries/clasing-icon.d.ts +2 -0
- package/dist/{input-C144z_Is.cjs → input-D3AVygkb.cjs} +1 -1
- package/dist/{input-fvzEG6zH.js → input-SV4tkGu9.js} +1 -1
- package/dist/ui.css +81 -35
- package/package.json +357 -352
- package/dist/button-B4yT3Gcz.cjs +0 -1
|
@@ -1,71 +1,72 @@
|
|
|
1
1
|
import { j as e, c as I } from "../index-D5lmpham.js";
|
|
2
2
|
import { B as z } from "../badge-Cprh3bik.js";
|
|
3
3
|
import { C as E, f as P, d as O, b as _, c as A, e as F, g as L } from "../command-ev4m9IoQ.js";
|
|
4
|
-
import { P as
|
|
5
|
-
import {
|
|
6
|
-
import { createContext as
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
import { P as T, b as W, c as G } from "../popover-BdDS9aoy.js";
|
|
5
|
+
import { CheckIcon as B, CaretUpDownIcon as D, XIcon as U } from "@phosphor-icons/react";
|
|
6
|
+
import { createContext as X, useState as y, useCallback as V, useEffect as k, useRef as M, useLayoutEffect as q, useContext as H } from "react";
|
|
7
|
+
import { C as J } from "../clasing-icon-XjkVWhKg.js";
|
|
8
|
+
const R = X(null);
|
|
9
|
+
function ne({
|
|
9
10
|
children: t,
|
|
10
11
|
values: r,
|
|
11
12
|
defaultValues: o,
|
|
12
|
-
onValuesChange:
|
|
13
|
-
isLoading:
|
|
14
|
-
onSearchChange:
|
|
15
|
-
loadingText:
|
|
16
|
-
noResultsText:
|
|
13
|
+
onValuesChange: a,
|
|
14
|
+
isLoading: c,
|
|
15
|
+
onSearchChange: l,
|
|
16
|
+
loadingText: f = "Loading...",
|
|
17
|
+
noResultsText: u = "No results found"
|
|
17
18
|
}) {
|
|
18
|
-
const [
|
|
19
|
+
const [d, p] = y(!1), [b, x] = y(
|
|
19
20
|
new Set(r ?? o)
|
|
20
|
-
), [v,
|
|
21
|
+
), [v, m] = y(/* @__PURE__ */ new Map()), [g, j] = y("");
|
|
21
22
|
function s(n) {
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
return
|
|
23
|
+
const h = (w) => {
|
|
24
|
+
const S = new Set(w);
|
|
25
|
+
return S.has(n) ? S.delete(n) : S.add(n), S;
|
|
25
26
|
};
|
|
26
|
-
|
|
27
|
+
x(h), a?.([...h(b)]);
|
|
27
28
|
}
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
}, []),
|
|
29
|
+
const i = V((n, h) => {
|
|
30
|
+
m((w) => w.get(n) === h ? w : new Map(w).set(n, h));
|
|
31
|
+
}, []), C = V(
|
|
31
32
|
(n) => {
|
|
32
|
-
j(n),
|
|
33
|
+
j(n), l?.(n);
|
|
33
34
|
},
|
|
34
|
-
[
|
|
35
|
+
[l]
|
|
35
36
|
);
|
|
36
37
|
return /* @__PURE__ */ e.jsx(
|
|
37
38
|
R,
|
|
38
39
|
{
|
|
39
40
|
value: {
|
|
40
|
-
open:
|
|
41
|
-
setOpen:
|
|
41
|
+
open: d,
|
|
42
|
+
setOpen: p,
|
|
42
43
|
selectedValues: r ? new Set(r) : b,
|
|
43
44
|
toggleValue: s,
|
|
44
45
|
items: v,
|
|
45
|
-
onItemAdded:
|
|
46
|
-
isLoading:
|
|
46
|
+
onItemAdded: i,
|
|
47
|
+
isLoading: c,
|
|
47
48
|
searchValue: g,
|
|
48
|
-
onSearchChange:
|
|
49
|
-
loadingText:
|
|
50
|
-
noResultsText:
|
|
49
|
+
onSearchChange: C,
|
|
50
|
+
loadingText: f,
|
|
51
|
+
noResultsText: u
|
|
51
52
|
},
|
|
52
|
-
children: /* @__PURE__ */ e.jsx(
|
|
53
|
+
children: /* @__PURE__ */ e.jsx(T, { open: d, onOpenChange: p, children: t })
|
|
53
54
|
}
|
|
54
55
|
);
|
|
55
56
|
}
|
|
56
|
-
function
|
|
57
|
+
function re({
|
|
57
58
|
className: t,
|
|
58
59
|
children: r,
|
|
59
60
|
size: o = "md",
|
|
60
|
-
...
|
|
61
|
+
...a
|
|
61
62
|
}) {
|
|
62
|
-
const { open:
|
|
63
|
-
return /* @__PURE__ */ e.jsx(
|
|
63
|
+
const { open: c } = N();
|
|
64
|
+
return /* @__PURE__ */ e.jsx(G, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
|
|
64
65
|
"button",
|
|
65
66
|
{
|
|
66
|
-
...
|
|
67
|
-
role:
|
|
68
|
-
"aria-expanded":
|
|
67
|
+
...a,
|
|
68
|
+
role: a.role ?? "combobox",
|
|
69
|
+
"aria-expanded": a["aria-expanded"] ?? c,
|
|
69
70
|
"data-size": o,
|
|
70
71
|
className: I(
|
|
71
72
|
"border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:ring-destructive/40 [&_svg:not([class*='text-'])]:text-muted-foreground flex w-fit items-center justify-between gap-2 overflow-hidden rounded-md border bg-transparent whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
@@ -77,69 +78,69 @@ function ne({
|
|
|
77
78
|
),
|
|
78
79
|
children: [
|
|
79
80
|
r,
|
|
80
|
-
/* @__PURE__ */ e.jsx(
|
|
81
|
+
/* @__PURE__ */ e.jsx(D, { className: "size-4 shrink-0 opacity-50" })
|
|
81
82
|
]
|
|
82
83
|
}
|
|
83
84
|
) });
|
|
84
85
|
}
|
|
85
|
-
function
|
|
86
|
+
function se({
|
|
86
87
|
placeholder: t,
|
|
87
88
|
clickToRemove: r = !0,
|
|
88
89
|
className: o,
|
|
89
|
-
overflowBehavior:
|
|
90
|
-
...
|
|
90
|
+
overflowBehavior: a = "wrap-when-open",
|
|
91
|
+
...c
|
|
91
92
|
}) {
|
|
92
|
-
const { selectedValues:
|
|
93
|
+
const { selectedValues: l, toggleValue: f, items: u, open: d } = N(), [p, b] = y(0), x = M(null), v = M(null), m = M(/* @__PURE__ */ new Set()), g = a === "wrap" || a === "wrap-when-open" && d;
|
|
93
94
|
k(() => {
|
|
94
|
-
g &&
|
|
95
|
+
g && m.current.forEach((s) => s.style.removeProperty("display"));
|
|
95
96
|
}, [g]);
|
|
96
97
|
const j = V(() => {
|
|
97
|
-
if (
|
|
98
|
-
const s =
|
|
99
|
-
|
|
100
|
-
let
|
|
101
|
-
for (let n =
|
|
102
|
-
const
|
|
98
|
+
if (x.current == null) return;
|
|
99
|
+
const s = x.current, i = v.current;
|
|
100
|
+
i != null && (i.style.display = "none"), m.current.forEach((n) => n.style.removeProperty("display"));
|
|
101
|
+
let C = 0;
|
|
102
|
+
for (let n = m.current.size - 1; n >= 0; n--) {
|
|
103
|
+
const h = [...m.current][n];
|
|
103
104
|
if (s.scrollWidth <= s.clientWidth)
|
|
104
105
|
break;
|
|
105
|
-
|
|
106
|
+
C = m.current.size - n, h.style.display = "none", i?.style.removeProperty("display");
|
|
106
107
|
}
|
|
107
|
-
b(
|
|
108
|
+
b(C);
|
|
108
109
|
}, []);
|
|
109
110
|
return k(() => {
|
|
110
|
-
if (
|
|
111
|
+
if (x.current == null) return;
|
|
111
112
|
const s = new ResizeObserver(j);
|
|
112
|
-
return s.observe(
|
|
113
|
-
}, [j]),
|
|
113
|
+
return s.observe(x.current), () => s.disconnect();
|
|
114
|
+
}, [j]), q(() => {
|
|
114
115
|
j();
|
|
115
|
-
}, [
|
|
116
|
+
}, [l, j]), l.size === 0 && t ? /* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground font-normal", children: t }) : /* @__PURE__ */ e.jsxs(
|
|
116
117
|
"div",
|
|
117
118
|
{
|
|
118
|
-
...
|
|
119
|
-
ref:
|
|
119
|
+
...c,
|
|
120
|
+
ref: x,
|
|
120
121
|
className: I(
|
|
121
122
|
"flex min-h-7 w-full gap-1.5 overflow-hidden",
|
|
122
123
|
g && "flex-wrap",
|
|
123
124
|
o
|
|
124
125
|
),
|
|
125
126
|
children: [
|
|
126
|
-
[...
|
|
127
|
+
[...l].filter((s) => u.has(s)).map((s) => /* @__PURE__ */ e.jsxs(
|
|
127
128
|
z,
|
|
128
129
|
{
|
|
129
|
-
ref: (
|
|
130
|
-
if (
|
|
131
|
-
return
|
|
132
|
-
|
|
130
|
+
ref: (i) => {
|
|
131
|
+
if (i != null)
|
|
132
|
+
return m.current.add(i), () => {
|
|
133
|
+
m.current.delete(i);
|
|
133
134
|
};
|
|
134
135
|
},
|
|
135
136
|
variant: "outline",
|
|
136
137
|
className: "group flex items-center gap-1",
|
|
137
|
-
onClick: r ? (
|
|
138
|
-
|
|
138
|
+
onClick: r ? (i) => {
|
|
139
|
+
i.stopPropagation(), f(s);
|
|
139
140
|
} : void 0,
|
|
140
141
|
children: [
|
|
141
|
-
|
|
142
|
-
r && /* @__PURE__ */ e.jsx(
|
|
142
|
+
u.get(s),
|
|
143
|
+
r && /* @__PURE__ */ e.jsx(U, { className: "text-muted-foreground group-hover:text-destructive size-2" })
|
|
143
144
|
]
|
|
144
145
|
},
|
|
145
146
|
s
|
|
@@ -148,13 +149,13 @@ function re({
|
|
|
148
149
|
z,
|
|
149
150
|
{
|
|
150
151
|
style: {
|
|
151
|
-
display:
|
|
152
|
+
display: p > 0 && !g ? "block" : "none"
|
|
152
153
|
},
|
|
153
154
|
variant: "outline",
|
|
154
155
|
ref: v,
|
|
155
156
|
children: [
|
|
156
157
|
"+",
|
|
157
|
-
|
|
158
|
+
p
|
|
158
159
|
]
|
|
159
160
|
}
|
|
160
161
|
)
|
|
@@ -162,56 +163,56 @@ function re({
|
|
|
162
163
|
}
|
|
163
164
|
);
|
|
164
165
|
}
|
|
165
|
-
function
|
|
166
|
+
function oe({
|
|
166
167
|
search: t = !0,
|
|
167
168
|
children: r,
|
|
168
169
|
...o
|
|
169
170
|
}) {
|
|
170
|
-
const { isLoading:
|
|
171
|
+
const { isLoading: a, onSearchChange: c, searchValue: l, noResultsText: f, loadingText: u } = N(), d = typeof t == "object" ? !0 : t;
|
|
171
172
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
172
173
|
/* @__PURE__ */ e.jsx("div", { style: { display: "none" }, children: /* @__PURE__ */ e.jsx(E, { children: /* @__PURE__ */ e.jsx(P, { children: r }) }) }),
|
|
173
|
-
/* @__PURE__ */ e.jsx(
|
|
174
|
-
|
|
174
|
+
/* @__PURE__ */ e.jsx(W, { className: "min-w-(--radix-popover-trigger-width) p-0", children: /* @__PURE__ */ e.jsxs(E, { ...o, children: [
|
|
175
|
+
d ? /* @__PURE__ */ e.jsx(
|
|
175
176
|
O,
|
|
176
177
|
{
|
|
177
178
|
placeholder: typeof t == "object" ? t.placeholder : void 0,
|
|
178
|
-
value:
|
|
179
|
-
onValueChange:
|
|
179
|
+
value: l,
|
|
180
|
+
onValueChange: c
|
|
180
181
|
}
|
|
181
182
|
) : /* @__PURE__ */ e.jsx("button", { autoFocus: !0, "aria-hidden": "true", className: "sr-only" }),
|
|
182
|
-
/* @__PURE__ */ e.jsx(P, { children:
|
|
183
|
-
/* @__PURE__ */ e.jsx(
|
|
184
|
-
/* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground ml-2
|
|
183
|
+
/* @__PURE__ */ e.jsx(P, { children: a ? /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-center py-6", children: [
|
|
184
|
+
/* @__PURE__ */ e.jsx(J, { className: "text-muted-foreground size-4 animate-spin" }),
|
|
185
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground paragraph-sm ml-2", children: u })
|
|
185
186
|
] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
186
|
-
|
|
187
|
+
d && /* @__PURE__ */ e.jsx(_, { children: f }),
|
|
187
188
|
r
|
|
188
189
|
] }) })
|
|
189
190
|
] }) })
|
|
190
191
|
] });
|
|
191
192
|
}
|
|
192
|
-
function
|
|
193
|
+
function ae({
|
|
193
194
|
value: t,
|
|
194
195
|
children: r,
|
|
195
196
|
badgeLabel: o,
|
|
196
|
-
onSelect:
|
|
197
|
-
...
|
|
197
|
+
onSelect: a,
|
|
198
|
+
...c
|
|
198
199
|
}) {
|
|
199
|
-
const { toggleValue:
|
|
200
|
+
const { toggleValue: l, selectedValues: f, onItemAdded: u } = N(), d = f.has(t);
|
|
200
201
|
return k(() => {
|
|
201
|
-
|
|
202
|
-
}, [t, r,
|
|
202
|
+
u(t, o ?? r);
|
|
203
|
+
}, [t, r, u, o]), /* @__PURE__ */ e.jsxs(
|
|
203
204
|
F,
|
|
204
205
|
{
|
|
205
|
-
...
|
|
206
|
+
...c,
|
|
206
207
|
value: t,
|
|
207
|
-
onSelect: (
|
|
208
|
-
|
|
208
|
+
onSelect: (p) => {
|
|
209
|
+
l(p), a?.(p);
|
|
209
210
|
},
|
|
210
211
|
children: [
|
|
211
212
|
/* @__PURE__ */ e.jsx(
|
|
212
|
-
|
|
213
|
+
B,
|
|
213
214
|
{
|
|
214
|
-
className: I("mr-2 size-4",
|
|
215
|
+
className: I("mr-2 size-4", d ? "opacity-100" : "opacity-0")
|
|
215
216
|
}
|
|
216
217
|
),
|
|
217
218
|
r
|
|
@@ -226,7 +227,7 @@ function le(t) {
|
|
|
226
227
|
return /* @__PURE__ */ e.jsx(L, { ...t });
|
|
227
228
|
}
|
|
228
229
|
function N() {
|
|
229
|
-
const t =
|
|
230
|
+
const t = H(R);
|
|
230
231
|
if (t == null)
|
|
231
232
|
throw new Error(
|
|
232
233
|
"useMultiSelectContext must be used within a MultiSelectContext"
|
|
@@ -234,11 +235,11 @@ function N() {
|
|
|
234
235
|
return t;
|
|
235
236
|
}
|
|
236
237
|
export {
|
|
237
|
-
|
|
238
|
-
|
|
238
|
+
ne as MultiSelect,
|
|
239
|
+
oe as MultiSelectContent,
|
|
239
240
|
ie as MultiSelectGroup,
|
|
240
|
-
|
|
241
|
+
ae as MultiSelectItem,
|
|
241
242
|
le as MultiSelectSeparator,
|
|
242
|
-
|
|
243
|
-
|
|
243
|
+
re as MultiSelectTrigger,
|
|
244
|
+
se as MultiSelectValue
|
|
244
245
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-9HRzXEQf.cjs"),c=require("../command-CrtCQpi_.cjs"),N=require("../input-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-9HRzXEQf.cjs"),c=require("../command-CrtCQpi_.cjs"),N=require("../input-D3AVygkb.cjs"),x=require("../popover-CeOAAwBQ.cjs"),S=require("../scroll-area-D74XszlE.cjs"),h=require("@phosphor-icons/react"),w=require("react"),I=require("react-phone-number-input"),P=require("react-phone-number-input/flags"),q=require("react-phone-number-input/locale/en"),O=require("react-phone-number-input/locale/es"),_=require("react-phone-number-input/locale/fr");function b(n){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const r in n)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:()=>n[r]})}}return t.default=n,Object.freeze(t)}const d=b(w),R=b(I),y=d.forwardRef(({className:n,onChange:t,value:r,size:o="md",rounded:s="default",locale:l="en",...i},p)=>e.jsxRuntimeExports.jsx(R.default,{ref:p,className:e.cn("flex",n),flagComponent:f,countrySelectComponent:T,inputComponent:C,smartCaret:!1,labels:l==="es"?O:l==="fr"?_:q,value:r||void 0,onChange:u=>t?.(u||""),countrySelectProps:{size:o,rounded:s},numberInputProps:{size:o,rounded:s},...i}));y.displayName="PhoneInput";const C=d.forwardRef(({className:n,rounded:t="default",error:r,touched:o,size:s,...l},i)=>{const{"data-country":p,...u}=l;return e.jsxRuntimeExports.jsx(N.Input,{size:s,className:e.cn("w-full",{"border-destructive":r&&o,"border-blue-800":o&&!r,"rounded-s-none rounded-e-lg":t!=="full","rounded-s-none rounded-e-full":t==="full","rounded-e-sm":s==="sm","rounded-e-md":s==="md","rounded-e-lg":s==="lg"},n),...u,ref:i})});C.displayName="InputComponent";const T=({disabled:n,value:t,options:r,onChange:o,size:s="md",rounded:l="default",error:i,touched:p})=>{const u=d.useRef(null),[E,j]=d.useState(""),[v,g]=d.useState(!1);return e.jsxRuntimeExports.jsxs(x.Popover,{open:v,modal:!0,onOpenChange:a=>{g(a),a&&j("")},children:[e.jsxRuntimeExports.jsx(x.PopoverTrigger,{asChild:!0,children:e.jsxRuntimeExports.jsxs("button",{type:"button",className:e.cn("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/50 file:paragraph-sm md:paragraph-sm paragraph-md flex w-fit min-w-0 items-center justify-center border border-r-0 bg-transparent transition-[color,box-shadow] outline-none file:inline-flex file:border-0 file:bg-transparent file:font-semibold focus-visible:z-1 focus-visible:ring-[3px] disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",l==="default"?"rounded-e-none":"rounded-s-full rounded-e-none",{"outline-destructive":i&&p,"outline-blue-800":p&&!i,"label-md h-8 rounded-s-sm px-2 py-1":s==="sm","label-lg h-12 rounded-s-md px-3 py-1":s==="md","label-xl h-16 rounded-s-lg px-4 py-2":s==="lg"}),disabled:n,children:[e.jsxRuntimeExports.jsx(f,{country:t,countryName:t,disabled:n}),e.jsxRuntimeExports.jsx(h.CaretDownIcon,{className:e.cn("-mr-2 size-4 opacity-50",n?"hidden":"opacity-100")})]})}),e.jsxRuntimeExports.jsx(x.PopoverContent,{className:"w-[300px] p-0",children:e.jsxRuntimeExports.jsxs(c.Command,{children:[e.jsxRuntimeExports.jsx(c.CommandInput,{value:E,onValueChange:a=>{j(a),setTimeout(()=>{if(u.current){const m=u.current.querySelector("[data-radix-scroll-area-viewport]");m&&(m.scrollTop=0)}},0)},placeholder:"Search country..."}),e.jsxRuntimeExports.jsx(c.CommandList,{children:e.jsxRuntimeExports.jsxs(S.ScrollArea,{ref:u,className:"h-72",children:[e.jsxRuntimeExports.jsx(c.CommandEmpty,{children:"No country found."}),e.jsxRuntimeExports.jsx(c.CommandGroup,{children:r.map(({value:a,label:m})=>a?e.jsxRuntimeExports.jsx(k,{country:a,countryName:m,selectedCountry:t,onChange:o,onSelectComplete:()=>g(!1)},a):null)})]})})]})})]})},k=({country:n,countryName:t,selectedCountry:r,onChange:o,onSelectComplete:s})=>{const l=()=>{o(n),s()};return e.jsxRuntimeExports.jsxs(c.CommandItem,{className:"gap-2",onSelect:l,children:[e.jsxRuntimeExports.jsx(f,{country:n,countryName:t}),e.jsxRuntimeExports.jsx("span",{className:"paragraph-sm flex-1",children:t}),e.jsxRuntimeExports.jsx("span",{className:"text-foreground/50 paragraph-sm",children:`+${R.getCountryCallingCode(n)}`}),e.jsxRuntimeExports.jsx(h.CheckIcon,{className:`ml-auto size-4 ${n===r?"opacity-100":"opacity-0"}`})]})},f=({country:n,countryName:t,disabled:r})=>{const o=P[n];return e.jsxRuntimeExports.jsx("span",{className:e.cn("bg-foreground/20 flex h-4 w-6 overflow-hidden rounded-[4px] [&_svg:not([class*='size-'])]:size-full",{"opacity-50":r}),children:o&&e.jsxRuntimeExports.jsx(o,{title:t})})};exports.PhoneInput=y;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as e, c as u } from "../index-D5lmpham.js";
|
|
2
2
|
import { C as y, d as v, f as N, b as S, c as w, e as I } from "../command-ev4m9IoQ.js";
|
|
3
|
-
import { I as P } from "../input-
|
|
3
|
+
import { I as P } from "../input-SV4tkGu9.js";
|
|
4
4
|
import { P as R, c as O, b as E } from "../popover-BdDS9aoy.js";
|
|
5
5
|
import { S as T } from "../scroll-area-oS6ZJIMN.js";
|
|
6
6
|
import { CaretDownIcon as V, CheckIcon as k } from "@phosphor-icons/react";
|
|
@@ -2,7 +2,7 @@ import * as TogglePrimitive from '@radix-ui/react-toggle';
|
|
|
2
2
|
import { type VariantProps } from 'class-variance-authority';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
declare const toggleVariants: (props?: ({
|
|
5
|
-
variant?: "
|
|
5
|
+
variant?: "default" | "outline" | null | undefined;
|
|
6
6
|
size?: "lg" | "md" | "sm" | "xs" | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
8
|
declare function Toggle({ className, variant, size, ...props }: React.ComponentProps<typeof TogglePrimitive.Root> & VariantProps<typeof toggleVariants>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const r=require("./index-9HRzXEQf.cjs"),o=require("@phosphor-icons/react"),c=require("./index-ECyCsPX0.cjs"),x=require("react"),b=require("./button-
|
|
1
|
+
"use strict";const r=require("./index-9HRzXEQf.cjs"),o=require("@phosphor-icons/react"),c=require("./index-ECyCsPX0.cjs"),x=require("react"),b=require("./button-BekvnyS7.cjs");function f(i){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const s in i)if(s!=="default"){const t=Object.getOwnPropertyDescriptor(i,s);Object.defineProperty(e,s,t.get?t:{enumerable:!0,get:()=>i[s]})}}return e.default=i,Object.freeze(e)}const g=f(x),d=c.cva("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input file:paragraph-sm flex w-full min-w-0 rounded-md border bg-transparent transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{xs:"label-sm h-7 px-2 py-1",sm:"label-md h-8 px-2 py-1",md:"label-lg h-12 px-3 py-1",lg:"label-xl h-16 px-4 py-2"}},defaultVariants:{size:"md"}});function m({className:i,type:e,size:s,icon:t,iconPosition:a="left",...l}){const[n,u]=g.useState(!1),p=()=>{u(!n)};return!t&&e!=="password"?r.jsxRuntimeExports.jsx("input",{type:e,"data-slot":"input",className:r.cn(d({size:s}),"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",i),...l}):r.jsxRuntimeExports.jsxs("div",{className:"relative w-full",children:[t&&a==="left"&&r.jsxRuntimeExports.jsx("span",{className:"text-muted-foreground absolute top-1/2 left-3 -translate-y-1/2",children:t}),r.jsxRuntimeExports.jsx("input",{type:e==="password"?n?"text":"password":e,"data-slot":"input",className:r.cn(d({size:s}),"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",t&&a==="left"?"pl-10":"",t&&a==="right"||e==="password"?"pr-10":"",i),...l}),e==="password"&&r.jsxRuntimeExports.jsx(b.Button,{variant:"inverse",type:"button",size:s==="xs"||s==="sm"?"xs":"md",tabIndex:-1,"aria-label":n?"Hide password":"Show password",className:"absolute top-1/2 right-3 -translate-y-1/2",onClick:p,children:n?r.jsxRuntimeExports.jsx(o.EyeSlashIcon,{}):r.jsxRuntimeExports.jsx(o.EyeIcon,{})}),t&&a==="right"&&e!=="password"&&r.jsxRuntimeExports.jsx("span",{className:"text-muted-foreground absolute top-1/2 right-3 -translate-y-1/2",children:t})]})}exports.Input=m;
|
|
@@ -2,7 +2,7 @@ import { j as e, c as n } from "./index-D5lmpham.js";
|
|
|
2
2
|
import { EyeSlashIcon as f, EyeIcon as b } from "@phosphor-icons/react";
|
|
3
3
|
import { c as m } from "./index-DN28Pf0m.js";
|
|
4
4
|
import * as x from "react";
|
|
5
|
-
import { B as c } from "./button-
|
|
5
|
+
import { B as c } from "./button-3Q4mqjFF.js";
|
|
6
6
|
const o = m(
|
|
7
7
|
"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input file:paragraph-sm flex w-full min-w-0 rounded-md border bg-transparent transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
8
8
|
{
|
package/dist/ui.css
CHANGED
|
@@ -46,18 +46,16 @@
|
|
|
46
46
|
--tracking-widest: 10px;
|
|
47
47
|
|
|
48
48
|
--font-*: initial;
|
|
49
|
-
--font-display:
|
|
50
|
-
--font-title:
|
|
51
|
-
--font-text:
|
|
52
|
-
--font-label:
|
|
53
|
-
--font-overline:
|
|
49
|
+
--font-display: 'DM Sans', sans-serif;
|
|
50
|
+
--font-title: 'DM Sans', sans-serif;
|
|
51
|
+
--font-text: 'DM Sans', sans-serif;
|
|
52
|
+
--font-label: 'DM Sans', sans-serif;
|
|
53
|
+
--font-overline: 'DM Sans', sans-serif;
|
|
54
54
|
|
|
55
55
|
--font-weight-*: initial;
|
|
56
|
-
--font-weight-light: 300;
|
|
57
56
|
--font-weight-regular: 400;
|
|
58
57
|
--font-weight-medium: 500;
|
|
59
58
|
--font-weight-semibold: 600;
|
|
60
|
-
--font-weight-bold: 700;
|
|
61
59
|
|
|
62
60
|
--color-*: initial;
|
|
63
61
|
--color-black: oklch(0.2 0.0102 248.34);
|
|
@@ -429,7 +427,7 @@
|
|
|
429
427
|
@apply relative;
|
|
430
428
|
|
|
431
429
|
&:before {
|
|
432
|
-
@apply text-muted-foreground right-0 mr-2 hidden size-7 items-center justify-center rounded-full text-center -indent-px font-mono
|
|
430
|
+
@apply text-muted-foreground paragraph-sm right-0 mr-2 hidden size-7 items-center justify-center rounded-full text-center -indent-px font-mono font-semibold md:absolute;
|
|
433
431
|
content: counter(step);
|
|
434
432
|
}
|
|
435
433
|
}
|
|
@@ -440,88 +438,136 @@
|
|
|
440
438
|
}
|
|
441
439
|
}
|
|
442
440
|
|
|
443
|
-
@utility display-xs {
|
|
444
|
-
@apply leading-lg text-lg tracking-tight;
|
|
445
|
-
}
|
|
446
|
-
|
|
447
441
|
@utility display-sm {
|
|
448
|
-
|
|
442
|
+
font-size: 44px;
|
|
443
|
+
line-height: 110%;
|
|
444
|
+
letter-spacing: -0.03em;
|
|
449
445
|
}
|
|
450
446
|
|
|
451
447
|
@utility display-lg {
|
|
452
|
-
|
|
448
|
+
font-size: 52px;
|
|
449
|
+
line-height: 110%;
|
|
450
|
+
letter-spacing: -0.03em;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
@utility title-2xs {
|
|
454
|
+
font-size: 20px;
|
|
455
|
+
line-height: 120%;
|
|
456
|
+
letter-spacing: -0.02em;
|
|
453
457
|
}
|
|
454
458
|
|
|
455
459
|
@utility title-xs {
|
|
456
|
-
|
|
460
|
+
font-size: 24px;
|
|
461
|
+
line-height: 120%;
|
|
462
|
+
letter-spacing: -0.03em;
|
|
457
463
|
}
|
|
458
464
|
|
|
459
465
|
@utility title-sm {
|
|
460
|
-
|
|
466
|
+
font-size: 28px;
|
|
467
|
+
line-height: 120%;
|
|
468
|
+
letter-spacing: -0.03em;
|
|
461
469
|
}
|
|
462
470
|
|
|
463
471
|
@utility title-md {
|
|
464
|
-
|
|
472
|
+
font-size: 32px;
|
|
473
|
+
line-height: 120%;
|
|
474
|
+
letter-spacing: -0.03em;
|
|
465
475
|
}
|
|
466
476
|
|
|
467
477
|
@utility title-lg {
|
|
468
|
-
|
|
478
|
+
font-size: 36px;
|
|
479
|
+
line-height: 120%;
|
|
480
|
+
letter-spacing: -0.03em;
|
|
469
481
|
}
|
|
470
482
|
|
|
471
483
|
@utility title-xl {
|
|
472
|
-
|
|
484
|
+
font-size: 40px;
|
|
485
|
+
line-height: 120%;
|
|
486
|
+
letter-spacing: -0.03em;
|
|
473
487
|
}
|
|
474
488
|
|
|
475
489
|
@utility label-xs {
|
|
476
|
-
|
|
490
|
+
font-size: 10px;
|
|
491
|
+
line-height: 110%;
|
|
492
|
+
letter-spacing: -0.01em;
|
|
477
493
|
}
|
|
478
494
|
|
|
479
495
|
@utility label-sm {
|
|
480
|
-
|
|
496
|
+
font-size: 12px;
|
|
497
|
+
line-height: 110%;
|
|
498
|
+
letter-spacing: -0.01em;
|
|
481
499
|
}
|
|
482
500
|
|
|
483
501
|
@utility label-md {
|
|
484
|
-
|
|
502
|
+
font-size: 14px;
|
|
503
|
+
line-height: 110%;
|
|
504
|
+
letter-spacing: -0.01em;
|
|
485
505
|
}
|
|
486
506
|
|
|
487
507
|
@utility label-lg {
|
|
488
|
-
|
|
508
|
+
font-size: 16px;
|
|
509
|
+
line-height: 110%;
|
|
510
|
+
letter-spacing: -0.01em;
|
|
489
511
|
}
|
|
490
512
|
|
|
491
513
|
@utility label-xl {
|
|
492
|
-
|
|
514
|
+
font-size: 18px;
|
|
515
|
+
line-height: 110%;
|
|
516
|
+
letter-spacing: -0.01em;
|
|
493
517
|
}
|
|
494
518
|
|
|
495
519
|
@utility label-2xl {
|
|
496
|
-
|
|
520
|
+
font-size: 20px;
|
|
521
|
+
line-height: 110%;
|
|
522
|
+
letter-spacing: -0.02em;
|
|
497
523
|
}
|
|
498
524
|
|
|
499
525
|
@utility label-3xl {
|
|
500
|
-
|
|
526
|
+
font-size: 24px;
|
|
527
|
+
line-height: 110%;
|
|
528
|
+
letter-spacing: -0.03em;
|
|
501
529
|
}
|
|
502
530
|
|
|
503
531
|
@utility paragraph-xs {
|
|
504
|
-
|
|
532
|
+
font-size: 12px;
|
|
533
|
+
line-height: 140%;
|
|
534
|
+
letter-spacing: -0.01em;
|
|
505
535
|
}
|
|
506
536
|
|
|
507
537
|
@utility paragraph-sm {
|
|
508
|
-
|
|
538
|
+
font-size: 14px;
|
|
539
|
+
line-height: 140%;
|
|
540
|
+
letter-spacing: -0.01em;
|
|
509
541
|
}
|
|
510
542
|
|
|
511
543
|
@utility paragraph-md {
|
|
512
|
-
|
|
544
|
+
font-size: 16px;
|
|
545
|
+
line-height: 140%;
|
|
546
|
+
letter-spacing: -0.01em;
|
|
513
547
|
}
|
|
514
548
|
|
|
515
549
|
@utility paragraph-lg {
|
|
516
|
-
|
|
550
|
+
font-size: 18px;
|
|
551
|
+
line-height: 140%;
|
|
552
|
+
letter-spacing: -0.01em;
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
@utility button-text-sm {
|
|
556
|
+
font-size: 12px;
|
|
557
|
+
line-height: 14px;
|
|
558
|
+
letter-spacing: -0.01em;
|
|
517
559
|
}
|
|
518
560
|
|
|
519
|
-
@utility
|
|
520
|
-
|
|
561
|
+
@utility button-text-md {
|
|
562
|
+
font-size: 14px;
|
|
563
|
+
line-height: 16px;
|
|
564
|
+
letter-spacing: -0.01em;
|
|
521
565
|
}
|
|
522
566
|
|
|
523
|
-
@utility
|
|
524
|
-
|
|
567
|
+
@utility button-text-lg {
|
|
568
|
+
font-size: 16px;
|
|
569
|
+
line-height: 20px;
|
|
570
|
+
letter-spacing: -0.01em;
|
|
525
571
|
}
|
|
526
572
|
|
|
527
573
|
@layer components {
|
|
@@ -654,7 +700,7 @@
|
|
|
654
700
|
}
|
|
655
701
|
body {
|
|
656
702
|
font-family:
|
|
657
|
-
'
|
|
703
|
+
'DM Sans',
|
|
658
704
|
sans-serif,
|
|
659
705
|
system-ui,
|
|
660
706
|
-apple-system;
|