@clasing/ui 2.3.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-D6LWWLE8.js → button-3Q4mqjFF.js} +15 -15
- 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-DeItm2eC.cjs → input-D3AVygkb.cjs} +1 -1
- package/dist/{input-DjbpoQwv.js → input-SV4tkGu9.js} +1 -1
- package/dist/ui.css +1 -1
- package/package.json +10 -5
- package/dist/button-BT7pXfhd.cjs +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { c as g, j as t } from "./index-D5lmpham.js";
|
|
2
|
-
import {
|
|
3
|
-
import { Slot as B } from "@radix-ui/react-slot";
|
|
2
|
+
import { Slot as S } from "@radix-ui/react-slot";
|
|
4
3
|
import { c as u } from "./index-DN28Pf0m.js";
|
|
5
|
-
import
|
|
4
|
+
import T from "react";
|
|
5
|
+
import { C as B } from "./clasing-icon-XjkVWhKg.js";
|
|
6
6
|
import { b as v, T as c, c as y, a as f } from "./tooltip-rv-jVOxy.js";
|
|
7
7
|
const b = "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] relative flex items-center justify-center outline-1 transition-[color,background-color,box-shadow] [&_svg]:shrink-0", R = u(b, {
|
|
8
8
|
variants: {
|
|
@@ -124,7 +124,7 @@ const b = "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ri
|
|
|
124
124
|
weight: "semibold",
|
|
125
125
|
rounded: "full"
|
|
126
126
|
}
|
|
127
|
-
}), E =
|
|
127
|
+
}), E = T.forwardRef(
|
|
128
128
|
({
|
|
129
129
|
className: i,
|
|
130
130
|
variant: s,
|
|
@@ -133,28 +133,28 @@ const b = "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ri
|
|
|
133
133
|
rounded: d,
|
|
134
134
|
children: p,
|
|
135
135
|
isLoading: e,
|
|
136
|
-
isActive:
|
|
136
|
+
isActive: _,
|
|
137
137
|
disabled: x,
|
|
138
138
|
tooltip: a,
|
|
139
139
|
tooltipPlacement: m = "top",
|
|
140
140
|
asChild: h,
|
|
141
141
|
iconOnly: l,
|
|
142
|
-
...
|
|
143
|
-
},
|
|
144
|
-
const j = h ?
|
|
142
|
+
...w
|
|
143
|
+
}, z) => {
|
|
144
|
+
const j = h ? S : "button", k = l ? {
|
|
145
145
|
xl: "w-12 px-0",
|
|
146
146
|
lg: "w-10 px-0",
|
|
147
147
|
md: "w-8 px-0",
|
|
148
148
|
sm: "w-7 px-0",
|
|
149
149
|
xs: "w-6 px-0"
|
|
150
|
-
}[r || "xl"] : "",
|
|
150
|
+
}[r || "xl"] : "", C = g(
|
|
151
151
|
e ? V({
|
|
152
152
|
variant: s,
|
|
153
153
|
weight: o,
|
|
154
154
|
size: r,
|
|
155
155
|
rounded: d,
|
|
156
156
|
className: i
|
|
157
|
-
}) :
|
|
157
|
+
}) : _ ? A({
|
|
158
158
|
variant: s,
|
|
159
159
|
weight: o,
|
|
160
160
|
size: r,
|
|
@@ -170,12 +170,12 @@ const b = "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ri
|
|
|
170
170
|
k
|
|
171
171
|
), N = h ? p : /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
172
172
|
e && /* @__PURE__ */ t.jsx(
|
|
173
|
-
|
|
173
|
+
B,
|
|
174
174
|
{
|
|
175
175
|
className: g(
|
|
176
176
|
"pointer-events-none absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2",
|
|
177
177
|
{
|
|
178
|
-
"visible animate-
|
|
178
|
+
"visible animate-[spin_2s_linear_infinite] opacity-100": e
|
|
179
179
|
}
|
|
180
180
|
)
|
|
181
181
|
}
|
|
@@ -193,10 +193,10 @@ const b = "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ri
|
|
|
193
193
|
] }), n = /* @__PURE__ */ t.jsx(
|
|
194
194
|
j,
|
|
195
195
|
{
|
|
196
|
-
ref:
|
|
197
|
-
className:
|
|
196
|
+
ref: z,
|
|
197
|
+
className: C,
|
|
198
198
|
disabled: x || e,
|
|
199
|
-
...
|
|
199
|
+
...w,
|
|
200
200
|
children: N
|
|
201
201
|
}
|
|
202
202
|
);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("./index-9HRzXEQf.cjs"),S=require("@radix-ui/react-slot"),g=require("./index-ECyCsPX0.cjs"),T=require("react"),C=require("./clasing-icon-CMe7j64k.cjs"),e=require("./tooltip-BccdAn4x.cjs"),x="focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] relative flex items-center justify-center outline-1 transition-[color,background-color,box-shadow] [&_svg]:shrink-0",c=g.cva(x,{variants:{variant:{primary:["bg-primary-600 lg:hover:bg-primary-800 text-white outline-transparent disabled:bg-neutral-100 disabled:text-neutral-700 disabled:lg:hover:bg-neutral-100 disabled:lg:hover:text-neutral-700"],secondary:["bg-black text-white outline-transparent disabled:bg-neutral-100 disabled:text-neutral-700 lg:hover:bg-neutral-900 disabled:lg:hover:bg-neutral-100 disabled:lg:hover:text-neutral-700"],inverse:["lg:hover:bg-neutral-000 bg-white text-black outline-transparent disabled:bg-neutral-100 disabled:text-neutral-700 disabled:lg:hover:bg-neutral-100 disabled:lg:hover:text-neutral-700"],outline:["text-primary-600 outline-primary-600 lg:hover:bg-primary-050 bg-white disabled:bg-neutral-100 disabled:text-neutral-700 disabled:outline-transparent disabled:lg:hover:bg-neutral-100 disabled:lg:hover:text-neutral-700"],ghost:["bg-primary-050 text-primary-600 lg:hover:bg-primary-100 outline-transparent disabled:bg-neutral-100 disabled:text-neutral-700 disabled:lg:hover:bg-neutral-100 disabled:lg:hover:text-neutral-700"],destructive:["bg-error-light text-error-main outline-transparent disabled:bg-neutral-100 disabled:text-neutral-700 disabled:lg:hover:bg-neutral-100 disabled:lg:hover:text-neutral-700"],link:["text-primary-600 lg:hover:bg-primary-050 bg-transparent outline-transparent disabled:bg-neutral-100 disabled:text-neutral-700 disabled:lg:hover:bg-neutral-100 disabled:lg:hover:text-neutral-700"]},size:{xl:"button-text-lg h-12 gap-2 px-6 py-1 leading-[100%] [&_svg]:size-5",lg:"button-text-md h-10 gap-2 px-5 py-1 leading-[100%] [&_svg]:size-4",md:"button-text-sm h-8 gap-1.5 px-4 py-1 leading-[100%] [&_svg]:size-3.5",sm:"button-text-sm h-7 gap-1 px-3 py-1 leading-[100%] [&_svg]:size-3.5",xs:"button-text-sm h-6 gap-1 px-3 py-1 leading-[100%] [&_svg]:size-3.5"},rounded:{default:"rounded-2xl",full:"rounded-full"},weight:{light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"}},defaultVariants:{variant:"primary",size:"xl",weight:"semibold",rounded:"full"}}),v=g.cva(`${x} cursor-default`,{variants:{variant:{primary:["bg-primary-800 text-white outline-transparent"],secondary:["bg-neutral-900 text-white outline-transparent"],inverse:["bg-neutral-000 text-black outline-transparent"],ghost:["bg-primary-100 text-primary-600 outline-transparent"],outline:["bg-primary-100 text-primary-600 outline-primary-600"],destructive:["bg-error-light text-error-main outline-transparent"],link:["bg-primary-050 text-primary-600 outline-transparent"]},size:{xl:"button-text-lg h-12 gap-2 px-6 py-1 leading-[100%] [&_svg]:size-5",lg:"button-text-md h-10 gap-2 px-5 py-1 leading-[100%] [&_svg]:size-4",md:"button-text-sm h-8 gap-1.5 px-4 py-1 leading-[100%] [&_svg]:size-3.5",sm:"button-text-sm h-7 gap-1 px-3 py-1 leading-[100%] [&_svg]:size-3.5",xs:"button-text-sm h-6 gap-1 px-3 py-1 leading-[100%] [&_svg]:size-3.5"},rounded:{default:"rounded-2xl",full:"rounded-full"},weight:{light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"}},defaultVariants:{variant:"primary",size:"xl",weight:"semibold",rounded:"full"}}),y=g.cva(x,{variants:{variant:{primary:["bg-primary-800 text-white outline-transparent"],secondary:["bg-neutral-900 text-white outline-transparent"],inverse:["bg-neutral-000 text-black outline-transparent"],ghost:["bg-primary-100 text-primary-600 outline-transparent"],outline:["bg-primary-100 text-primary-600 outline-primary-600"],destructive:["bg-error-light text-error-main outline-transparent"],link:["bg-primary-050 text-primary-600 outline-transparent"]},size:{xl:"button-text-lg h-12 gap-2 px-6 leading-[100%] [&_svg]:size-5",lg:"button-text-md h-10 gap-2 px-5 leading-[100%] [&_svg]:size-4",md:"button-text-sm h-8 gap-1.5 px-4 leading-[100%] [&_svg]:size-3.5",sm:"button-text-sm h-7 gap-1 px-3 leading-[100%] [&_svg]:size-3.5",xs:"button-text-sm h-6 gap-1 px-3 leading-[100%] [&_svg]:size-3.5"},rounded:{default:"rounded-2xl",full:"rounded-full"},weight:{light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"}},defaultVariants:{variant:"primary",size:"xl",weight:"semibold",rounded:"full"}}),f=T.forwardRef(({className:s,variant:o,size:n,weight:u,rounded:d,children:p,isLoading:r,isActive:j,disabled:b,tooltip:l,tooltipPlacement:m="top",asChild:h,iconOnly:i,...w},_)=>{const z=h?S.Slot:"button",R=i?{xl:"w-12 px-0",lg:"w-10 px-0",md:"w-8 px-0",sm:"w-7 px-0",xs:"w-6 px-0"}[n||"xl"]:"",E=t.cn(r?v({variant:o,weight:u,size:n,rounded:d,className:s}):j?y({variant:o,weight:u,size:n,rounded:d,className:s}):c({variant:o,weight:u,size:n,rounded:d,className:s}),R),k=h?p:t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[r&&t.jsxRuntimeExports.jsx(C.ClasingIcon,{className:t.cn("pointer-events-none absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2",{"visible animate-[spin_2s_linear_infinite] opacity-100":r})}),t.jsxRuntimeExports.jsx("span",{className:t.cn("flex items-center justify-center gap-2",r?"invisible opacity-0":"visible opacity-100"),children:p})]}),a=t.jsxRuntimeExports.jsx(z,{ref:_,className:E,disabled:b||r,...w,children:k});return l&&(b||r)?t.jsxRuntimeExports.jsx(e.TooltipProvider,{children:t.jsxRuntimeExports.jsxs(e.Tooltip,{children:[t.jsxRuntimeExports.jsx(e.TooltipTrigger,{asChild:i,children:i?t.jsxRuntimeExports.jsx("div",{className:"inline-block","aria-disabled":"true",children:a}):a}),t.jsxRuntimeExports.jsx(e.TooltipContent,{side:m,className:"text-muted-foreground",children:l})]})}):l?t.jsxRuntimeExports.jsx(e.TooltipProvider,{children:t.jsxRuntimeExports.jsxs(e.Tooltip,{children:[t.jsxRuntimeExports.jsx(e.TooltipTrigger,{asChild:i,children:a}),t.jsxRuntimeExports.jsx(e.TooltipContent,{side:m,className:"text-muted-foreground",children:l})]})}):a});f.displayName="Button";exports.Button=f;exports.buttonActiveStyles=y;exports.buttonLoadingStyles=v;exports.buttonStyles=c;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("./index-9HRzXEQf.cjs");function e({className:i,variant:l,color:x="currentColor",...L}){let s=[];switch(l){case"default":s=["#6CC422","#FF7BAA","#FF6F03","#0243F1","#00DBB7","#CF161C","#DD6DFF","#F6AF00"];break;default:s=Array(8).fill(x);break}return t.jsxRuntimeExports.jsxs("svg",{width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t.cn(i),...L,children:[t.jsxRuntimeExports.jsx("path",{d:"M22.0316 19.2438L9.82361 6.99085C9.05365 6.2205 7.80528 6.2205 7.0353 6.99085L7.03328 6.99289C6.26332 7.76325 6.26332 9.01224 7.03328 9.78259L19.1481 21.9646L22.0316 24.1086V19.2438Z",fill:s[0]}),t.jsxRuntimeExports.jsx("path",{d:"M40.9576 38.2141L28.8136 25.9861L22.0315 24.1099L26.0506 28.8388L38.1672 41.0059C38.9372 41.7762 40.1856 41.7762 40.9556 41.0059L40.9576 41.0038C41.7275 40.2335 41.7275 38.9845 40.9576 38.2141Z",fill:s[1]}),t.jsxRuntimeExports.jsx("path",{d:"M28.7858 21.9952L40.9823 9.77469C41.7437 9.00615 41.7437 7.76007 40.9823 6.99153L40.9803 6.98949C40.2188 6.22095 38.9843 6.22095 38.2229 6.98949L25.9939 19.087L22.0315 24.1086L28.7858 21.9952Z",fill:s[2]}),t.jsxRuntimeExports.jsx("path",{d:"M19.1799 26.0002L7.03063 38.1476C6.2599 38.9162 6.26441 40.2079 7.03514 40.9765L7.03717 40.9785C7.8079 41.747 9.0575 41.747 9.82824 40.9785L22.0309 28.782V24.1099L19.1799 26.0002Z",fill:s[3]}),t.jsxRuntimeExports.jsx("path",{d:"M19.1588 21.961L1.94788 21.9965C0.872081 21.9965 0 22.8889 0 23.9898V23.9928C0 25.0937 0.872081 25.9862 1.94788 25.9862L19.1803 26.0002L22.0312 24.1099L19.1588 21.961Z",fill:s[4]}),t.jsxRuntimeExports.jsx("path",{d:"M28.6254 25.9858H46.0272C47.1167 25.9858 47.9999 25.0933 47.9999 23.9924V23.9895C47.9999 22.8886 47.1167 21.9961 46.0272 21.9961H28.7858L22.0315 24.1096L28.6254 25.9858Z",fill:s[5]}),t.jsxRuntimeExports.jsx("path",{d:"M22.0059 45.9811C22.0051 47.0967 22.896 48.0012 23.9948 48.0004C25.0914 47.9995 25.98 47.0973 25.9809 45.9841L26.0502 28.8388L22.0311 24.1099",fill:s[6]}),t.jsxRuntimeExports.jsx("path",{d:"M22.0319 24.109L25.9943 19.0874V1.84509C25.9943 0.7448 25.0315 0 23.9311 0H23.9282C22.8278 0 21.9263 0.891965 21.9263 1.99226",fill:s[7]})]})}exports.ClasingIcon=e;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { j as L, c as i } from "./index-D5lmpham.js";
|
|
2
|
+
function h({
|
|
3
|
+
className: s,
|
|
4
|
+
variant: t,
|
|
5
|
+
color: C = "currentColor",
|
|
6
|
+
...a
|
|
7
|
+
}) {
|
|
8
|
+
let l = [];
|
|
9
|
+
switch (t) {
|
|
10
|
+
case "default":
|
|
11
|
+
l = [
|
|
12
|
+
"#6CC422",
|
|
13
|
+
"#FF7BAA",
|
|
14
|
+
"#FF6F03",
|
|
15
|
+
"#0243F1",
|
|
16
|
+
"#00DBB7",
|
|
17
|
+
"#CF161C",
|
|
18
|
+
"#DD6DFF",
|
|
19
|
+
"#F6AF00"
|
|
20
|
+
];
|
|
21
|
+
break;
|
|
22
|
+
default:
|
|
23
|
+
l = Array(8).fill(C);
|
|
24
|
+
break;
|
|
25
|
+
}
|
|
26
|
+
return /* @__PURE__ */ L.jsxs(
|
|
27
|
+
"svg",
|
|
28
|
+
{
|
|
29
|
+
width: "48",
|
|
30
|
+
height: "48",
|
|
31
|
+
viewBox: "0 0 48 48",
|
|
32
|
+
fill: "none",
|
|
33
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
34
|
+
className: i(s),
|
|
35
|
+
...a,
|
|
36
|
+
children: [
|
|
37
|
+
/* @__PURE__ */ L.jsx(
|
|
38
|
+
"path",
|
|
39
|
+
{
|
|
40
|
+
d: "M22.0316 19.2438L9.82361 6.99085C9.05365 6.2205 7.80528 6.2205 7.0353 6.99085L7.03328 6.99289C6.26332 7.76325 6.26332 9.01224 7.03328 9.78259L19.1481 21.9646L22.0316 24.1086V19.2438Z",
|
|
41
|
+
fill: l[0]
|
|
42
|
+
}
|
|
43
|
+
),
|
|
44
|
+
/* @__PURE__ */ L.jsx(
|
|
45
|
+
"path",
|
|
46
|
+
{
|
|
47
|
+
d: "M40.9576 38.2141L28.8136 25.9861L22.0315 24.1099L26.0506 28.8388L38.1672 41.0059C38.9372 41.7762 40.1856 41.7762 40.9556 41.0059L40.9576 41.0038C41.7275 40.2335 41.7275 38.9845 40.9576 38.2141Z",
|
|
48
|
+
fill: l[1]
|
|
49
|
+
}
|
|
50
|
+
),
|
|
51
|
+
/* @__PURE__ */ L.jsx(
|
|
52
|
+
"path",
|
|
53
|
+
{
|
|
54
|
+
d: "M28.7858 21.9952L40.9823 9.77469C41.7437 9.00615 41.7437 7.76007 40.9823 6.99153L40.9803 6.98949C40.2188 6.22095 38.9843 6.22095 38.2229 6.98949L25.9939 19.087L22.0315 24.1086L28.7858 21.9952Z",
|
|
55
|
+
fill: l[2]
|
|
56
|
+
}
|
|
57
|
+
),
|
|
58
|
+
/* @__PURE__ */ L.jsx(
|
|
59
|
+
"path",
|
|
60
|
+
{
|
|
61
|
+
d: "M19.1799 26.0002L7.03063 38.1476C6.2599 38.9162 6.26441 40.2079 7.03514 40.9765L7.03717 40.9785C7.8079 41.747 9.0575 41.747 9.82824 40.9785L22.0309 28.782V24.1099L19.1799 26.0002Z",
|
|
62
|
+
fill: l[3]
|
|
63
|
+
}
|
|
64
|
+
),
|
|
65
|
+
/* @__PURE__ */ L.jsx(
|
|
66
|
+
"path",
|
|
67
|
+
{
|
|
68
|
+
d: "M19.1588 21.961L1.94788 21.9965C0.872081 21.9965 0 22.8889 0 23.9898V23.9928C0 25.0937 0.872081 25.9862 1.94788 25.9862L19.1803 26.0002L22.0312 24.1099L19.1588 21.961Z",
|
|
69
|
+
fill: l[4]
|
|
70
|
+
}
|
|
71
|
+
),
|
|
72
|
+
/* @__PURE__ */ L.jsx(
|
|
73
|
+
"path",
|
|
74
|
+
{
|
|
75
|
+
d: "M28.6254 25.9858H46.0272C47.1167 25.9858 47.9999 25.0933 47.9999 23.9924V23.9895C47.9999 22.8886 47.1167 21.9961 46.0272 21.9961H28.7858L22.0315 24.1096L28.6254 25.9858Z",
|
|
76
|
+
fill: l[5]
|
|
77
|
+
}
|
|
78
|
+
),
|
|
79
|
+
/* @__PURE__ */ L.jsx(
|
|
80
|
+
"path",
|
|
81
|
+
{
|
|
82
|
+
d: "M22.0059 45.9811C22.0051 47.0967 22.896 48.0012 23.9948 48.0004C25.0914 47.9995 25.98 47.0973 25.9809 45.9841L26.0502 28.8388L22.0311 24.1099",
|
|
83
|
+
fill: l[6]
|
|
84
|
+
}
|
|
85
|
+
),
|
|
86
|
+
/* @__PURE__ */ L.jsx(
|
|
87
|
+
"path",
|
|
88
|
+
{
|
|
89
|
+
d: "M22.0319 24.109L25.9943 19.0874V1.84509C25.9943 0.7448 25.0315 0 23.9311 0H23.9282C22.8278 0 21.9263 0.891965 21.9263 1.99226",
|
|
90
|
+
fill: l[7]
|
|
91
|
+
}
|
|
92
|
+
)
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
export {
|
|
98
|
+
h as C
|
|
99
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-9HRzXEQf.cjs"),c=require("@radix-ui/react-alert-dialog"),n=require("../button-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-9HRzXEQf.cjs"),c=require("@radix-ui/react-alert-dialog"),n=require("../button-BekvnyS7.cjs");function u(t){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const l in t)if(l!=="default"){const r=Object.getOwnPropertyDescriptor(t,l);Object.defineProperty(a,l,r.get?r:{enumerable:!0,get:()=>t[l]})}}return a.default=t,Object.freeze(a)}const o=u(c);function d({...t}){return e.jsxRuntimeExports.jsx(o.Root,{"data-slot":"alert-dialog",...t})}function g({...t}){return e.jsxRuntimeExports.jsx(o.Trigger,{"data-slot":"alert-dialog-trigger",...t})}function i({...t}){return e.jsxRuntimeExports.jsx(o.Portal,{"data-slot":"alert-dialog-portal",...t})}function s({className:t,...a}){return e.jsxRuntimeExports.jsx(o.Overlay,{"data-slot":"alert-dialog-overlay",className:e.cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...a})}function x({className:t,...a}){return e.jsxRuntimeExports.jsxs(i,{children:[e.jsxRuntimeExports.jsx(s,{}),e.jsxRuntimeExports.jsx(o.Content,{"data-slot":"alert-dialog-content",className:e.cn("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-90 data-[state=open]:zoom-in-90 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 ease-in-out sm:max-w-lg",t),...a})]})}function m({className:t,...a}){return e.jsxRuntimeExports.jsx("div",{"data-slot":"alert-dialog-header",className:e.cn("flex flex-col gap-2 text-left",t),...a})}function f({className:t,...a}){return e.jsxRuntimeExports.jsx("div",{"data-slot":"alert-dialog-footer",className:e.cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...a})}function p({className:t,...a}){return e.jsxRuntimeExports.jsx(o.Title,{"data-slot":"alert-dialog-title",className:e.cn("label-2xl font-semibold",t),...a})}function j({className:t,...a}){return e.jsxRuntimeExports.jsx(o.Description,{"data-slot":"alert-dialog-description",className:e.cn("text-muted-foreground paragraph-md",t),...a})}function D({className:t,...a}){return e.jsxRuntimeExports.jsx(o.Action,{className:e.cn(n.buttonStyles(),t),...a})}function A({className:t,...a}){return e.jsxRuntimeExports.jsx(o.Cancel,{className:e.cn(n.buttonStyles({variant:"outline"}),t),...a})}exports.AlertDialog=d;exports.AlertDialogAction=D;exports.AlertDialogCancel=A;exports.AlertDialogContent=x;exports.AlertDialogDescription=j;exports.AlertDialogFooter=f;exports.AlertDialogHeader=m;exports.AlertDialogOverlay=s;exports.AlertDialogPortal=i;exports.AlertDialogTitle=p;exports.AlertDialogTrigger=g;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type VariantProps } from 'class-variance-authority';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
declare const badgeVariants: (props?: ({
|
|
4
|
-
variant?: "
|
|
4
|
+
variant?: "default" | "primary" | "secondary" | "outline" | "destructive" | "info" | "success" | "warning" | "error" | "neutral" | "yellow" | "blue" | "violet" | "not-started" | "in-progress" | "completed" | "blocked" | "paused" | "failed" | "expired" | "cancelled" | null | undefined;
|
|
5
5
|
size?: "lg" | "md" | "sm" | "xs" | null | undefined;
|
|
6
6
|
weight?: "bold" | "light" | "regular" | "semibold" | null | undefined;
|
|
7
7
|
rounded?: "default" | "full" | null | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../button-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../button-BekvnyS7.cjs");exports.Button=t.Button;exports.buttonActiveStyles=t.buttonActiveStyles;exports.buttonLoadingStyles=t.buttonLoadingStyles;exports.buttonStyles=t.buttonStyles;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-9HRzXEQf.cjs"),b=require("react"),g=require("react-day-picker"),m=require("../button-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-9HRzXEQf.cjs"),b=require("react"),g=require("react-day-picker"),m=require("../button-BekvnyS7.cjs"),i=require("@phosphor-icons/react");function y(n){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const r in n)if(r!=="default"){const d=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(a,r,d.get?d:{enumerable:!0,get:()=>n[r]})}}return a.default=n,Object.freeze(a)}const f=y(b);function h({className:n,classNames:a,showOutsideDays:r=!0,captionLayout:d="label",buttonVariant:c="inverse",formatters:l,components:p,...x}){const t=g.getDefaultClassNames();return e.jsxRuntimeExports.jsx(g.DayPicker,{showOutsideDays:r,className:e.cn("bg-background group/calendar p-3 [--cell-size:--spacing(8)] in-data-[slot=card-content]:bg-transparent in-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:d,formatters:{formatMonthDropdown:o=>o.toLocaleString("default",{month:"short"}),...l},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(m.buttonStyles({size:"sm",variant:c}),"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",t.button_previous),button_next:e.cn(m.buttonStyles({size:"sm",variant:c}),"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",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 paragraph-sm font-medium justify-center h-(--cell-size) gap-1.5",t.dropdowns),dropdown_root:e.cn("relative has-focus:border-ring border border-input 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",d==="label"?"paragraph-sm":"rounded-md pl-2 pr-1 flex items-center gap-1 paragraph-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("rounded-l-md bg-accent",t.range_start),range_middle:e.cn("rounded-none",t.range_middle),range_end:e.cn("rounded-r-md bg-accent",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-muted-foreground opacity-50",t.disabled),hidden:e.cn("invisible",t.hidden),...a},components:{Root:({className:o,rootRef:s,...u})=>e.jsxRuntimeExports.jsx("div",{"data-slot":"calendar",ref:s,className:e.cn(o),...u}),Chevron:({className:o,orientation:s,...u})=>s==="left"?e.jsxRuntimeExports.jsx(i.CaretLeftIcon,{...u}):s==="right"?e.jsxRuntimeExports.jsx(i.CaretRightIcon,{...u}):e.jsxRuntimeExports.jsx(i.CaretDownIcon,{...u}),DayButton:_,WeekNumber:({children:o,...s})=>e.jsxRuntimeExports.jsx("td",{...s,children:e.jsxRuntimeExports.jsx("div",{className:"flex size-(--cell-size) items-center justify-center text-center",children:o})}),...p},...x})}function _({className:n,day:a,modifiers:r,...d}){const c=g.getDefaultClassNames(),l=f.useRef(null);return f.useEffect(()=>{r.focused&&l.current?.focus()},[r.focused]),e.jsxRuntimeExports.jsx(m.Button,{ref:l,variant:"inverse",size:"xs","data-day":a.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("data-[selected-single=true]:bg-secondary data-[selected-single=true]:text-secondary-foreground data-[range-middle=true]:bg-blue-050 data-[range-start=true]:bg-secondary data-[range-start=true]:text-secondary-foreground data-[range-end=true]:bg-secondary data-[range-end=true]:text-secondary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 dark:hover:text-accent-foreground data-[selected-single=true]:hover:bg-secondary/80 data-[selected-single=true]:hover:text-secondary-foreground data-[range-start=true]:hover:bg-secondary/80 data-[range-end=true]:hover:bg-secondary/80 [&>span]:paragraph-xs flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 rounded-md p-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-middle=true]:text-blue-800 data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:opacity-70",c.day,n),...d})}exports.Calendar=h;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as r, c as e } from "../index-D5lmpham.js";
|
|
2
2
|
import * as i from "react";
|
|
3
3
|
import { getDefaultClassNames as f, DayPicker as b } from "react-day-picker";
|
|
4
|
-
import { c as m, B as y } from "../button-
|
|
4
|
+
import { c as m, B as y } from "../button-3Q4mqjFF.js";
|
|
5
5
|
import { CaretLeftIcon as h, CaretRightIcon as w, CaretDownIcon as _ } from "@phosphor-icons/react";
|
|
6
6
|
function C({
|
|
7
7
|
className: c,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../clasing-icon-CMe7j64k.cjs");exports.ClasingIcon=e.ClasingIcon;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../input-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../input-D3AVygkb.cjs");exports.Input=t.Input;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-9HRzXEQf.cjs"),V=require("../badge-Da_xHgvC.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-9HRzXEQf.cjs"),V=require("../badge-Da_xHgvC.cjs"),p=require("../command-CrtCQpi_.cjs"),M=require("../popover-CeOAAwBQ.cjs"),N=require("@phosphor-icons/react"),n=require("react"),I=require("../clasing-icon-CMe7j64k.cjs"),k=n.createContext(null);function z({children:t,values:r,defaultValues:i,onValuesChange:l,isLoading:a,onSearchChange:c,loadingText:j="Loading...",noResultsText:d="No results found"}){const[x,f]=n.useState(!1),[y,g]=n.useState(new Set(r??i)),[w,m]=n.useState(new Map),[S,E]=n.useState("");function o(s){const h=R=>{const v=new Set(R);return v.has(s)?v.delete(s):v.add(s),v};g(h),l?.([...h(y)])}const u=n.useCallback((s,h)=>{m(R=>R.get(s)===h?R:new Map(R).set(s,h))},[]),b=n.useCallback(s=>{E(s),c?.(s)},[c]);return e.jsxRuntimeExports.jsx(k,{value:{open:x,setOpen:f,selectedValues:r?new Set(r):y,toggleValue:o,items:w,onItemAdded:u,isLoading:a,searchValue:S,onSearchChange:b,loadingText:j,noResultsText:d},children:e.jsxRuntimeExports.jsx(M.Popover,{open:x,onOpenChange:f,children:t})})}function P({className:t,children:r,size:i="md",...l}){const{open:a}=C();return e.jsxRuntimeExports.jsx(M.PopoverTrigger,{asChild:!0,children:e.jsxRuntimeExports.jsxs("button",{...l,role:l.role??"combobox","aria-expanded":l["aria-expanded"]??a,"data-size":i,className:e.cn("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",i==="xs"&&'label-sm h-7 px-2 py-1 [&_svg:not([class*="size-"])]:size-3.5',i==="sm"&&"label-md h-8 px-2 py-1",i==="md"&&"label-lg h-12 px-3 py-1",i==="lg"&&"label-xl h-16 px-4 py-2",t),children:[r,e.jsxRuntimeExports.jsx(N.CaretUpDownIcon,{className:"size-4 shrink-0 opacity-50"})]})})}function q({placeholder:t,clickToRemove:r=!0,className:i,overflowBehavior:l="wrap-when-open",...a}){const{selectedValues:c,toggleValue:j,items:d,open:x}=C(),[f,y]=n.useState(0),g=n.useRef(null),w=n.useRef(null),m=n.useRef(new Set),S=l==="wrap"||l==="wrap-when-open"&&x;n.useEffect(()=>{S&&m.current.forEach(o=>o.style.removeProperty("display"))},[S]);const E=n.useCallback(()=>{if(g.current==null)return;const o=g.current,u=w.current;u!=null&&(u.style.display="none"),m.current.forEach(s=>s.style.removeProperty("display"));let b=0;for(let s=m.current.size-1;s>=0;s--){const h=[...m.current][s];if(o.scrollWidth<=o.clientWidth)break;b=m.current.size-s,h.style.display="none",u?.style.removeProperty("display")}y(b)},[]);return n.useEffect(()=>{if(g.current==null)return;const o=new ResizeObserver(E);return o.observe(g.current),()=>o.disconnect()},[E]),n.useLayoutEffect(()=>{E()},[c,E]),c.size===0&&t?e.jsxRuntimeExports.jsx("span",{className:"text-muted-foreground font-normal",children:t}):e.jsxRuntimeExports.jsxs("div",{...a,ref:g,className:e.cn("flex min-h-7 w-full gap-1.5 overflow-hidden",S&&"flex-wrap",i),children:[[...c].filter(o=>d.has(o)).map(o=>e.jsxRuntimeExports.jsxs(V.Badge,{ref:u=>{if(u!=null)return m.current.add(u),()=>{m.current.delete(u)}},variant:"outline",className:"group flex items-center gap-1",onClick:r?u=>{u.stopPropagation(),j(o)}:void 0,children:[d.get(o),r&&e.jsxRuntimeExports.jsx(N.XIcon,{className:"text-muted-foreground group-hover:text-destructive size-2"})]},o)),e.jsxRuntimeExports.jsxs(V.Badge,{style:{display:f>0&&!S?"block":"none"},variant:"outline",ref:w,children:["+",f]})]})}function O({search:t=!0,children:r,...i}){const{isLoading:l,onSearchChange:a,searchValue:c,noResultsText:j,loadingText:d}=C(),x=typeof t=="object"?!0:t;return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx("div",{style:{display:"none"},children:e.jsxRuntimeExports.jsx(p.Command,{children:e.jsxRuntimeExports.jsx(p.CommandList,{children:r})})}),e.jsxRuntimeExports.jsx(M.PopoverContent,{className:"min-w-(--radix-popover-trigger-width) p-0",children:e.jsxRuntimeExports.jsxs(p.Command,{...i,children:[x?e.jsxRuntimeExports.jsx(p.CommandInput,{placeholder:typeof t=="object"?t.placeholder:void 0,value:c,onValueChange:a}):e.jsxRuntimeExports.jsx("button",{autoFocus:!0,"aria-hidden":"true",className:"sr-only"}),e.jsxRuntimeExports.jsx(p.CommandList,{children:l?e.jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-center py-6",children:[e.jsxRuntimeExports.jsx(I.ClasingIcon,{className:"text-muted-foreground size-4 animate-spin"}),e.jsxRuntimeExports.jsx("span",{className:"text-muted-foreground paragraph-sm ml-2",children:d})]}):e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[x&&e.jsxRuntimeExports.jsx(p.CommandEmpty,{children:j}),r]})})]})})]})}function T({value:t,children:r,badgeLabel:i,onSelect:l,...a}){const{toggleValue:c,selectedValues:j,onItemAdded:d}=C(),x=j.has(t);return n.useEffect(()=>{d(t,i??r)},[t,r,d,i]),e.jsxRuntimeExports.jsxs(p.CommandItem,{...a,value:t,onSelect:f=>{c(f),l?.(f)},children:[e.jsxRuntimeExports.jsx(N.CheckIcon,{className:e.cn("mr-2 size-4",x?"opacity-100":"opacity-0")}),r]})}function _(t){return e.jsxRuntimeExports.jsx(p.CommandGroup,{...t})}function A(t){return e.jsxRuntimeExports.jsx(p.CommandSeparator,{...t})}function C(){const t=n.useContext(k);if(t==null)throw new Error("useMultiSelectContext must be used within a MultiSelectContext");return t}exports.MultiSelect=z;exports.MultiSelectContent=O;exports.MultiSelectGroup=_;exports.MultiSelectItem=T;exports.MultiSelectSeparator=A;exports.MultiSelectTrigger=P;exports.MultiSelectValue=q;
|
|
@@ -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
|
@@ -427,7 +427,7 @@
|
|
|
427
427
|
@apply relative;
|
|
428
428
|
|
|
429
429
|
&:before {
|
|
430
|
-
@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;
|
|
431
431
|
content: counter(step);
|
|
432
432
|
}
|
|
433
433
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clasing/ui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.umd.js",
|
|
6
6
|
"module": "./dist/index.es.js",
|
|
@@ -70,6 +70,11 @@
|
|
|
70
70
|
"require": "./dist/components/chip.umd.js",
|
|
71
71
|
"types": "./dist/components/chip.d.ts"
|
|
72
72
|
},
|
|
73
|
+
"./clasing-icon": {
|
|
74
|
+
"import": "./dist/components/clasing-icon.es.js",
|
|
75
|
+
"require": "./dist/components/clasing-icon.umd.js",
|
|
76
|
+
"types": "./dist/components/clasing-icon.d.ts"
|
|
77
|
+
},
|
|
73
78
|
"./collapsible": {
|
|
74
79
|
"import": "./dist/components/collapsible.es.js",
|
|
75
80
|
"require": "./dist/components/collapsible.umd.js",
|
|
@@ -264,9 +269,11 @@
|
|
|
264
269
|
"dependencies": {
|
|
265
270
|
"class-variance-authority": "^0.7.1",
|
|
266
271
|
"clsx": "^2.1.1",
|
|
272
|
+
"express": "^5.1.0",
|
|
273
|
+
"express-basic-auth": "^1.2.1",
|
|
267
274
|
"next-themes": "^0.4.6",
|
|
268
|
-
"react": "^19.2.
|
|
269
|
-
"react-dom": "^19.2.
|
|
275
|
+
"react": "^19.2.1",
|
|
276
|
+
"react-dom": "^19.2.1",
|
|
270
277
|
"tailwind-merge": "^3.3.1"
|
|
271
278
|
},
|
|
272
279
|
"devDependencies": {
|
|
@@ -296,8 +303,6 @@
|
|
|
296
303
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
297
304
|
"eslint-plugin-react-refresh": "^0.4.20",
|
|
298
305
|
"eslint-plugin-storybook": "^9.0.18",
|
|
299
|
-
"express": "^5.1.0",
|
|
300
|
-
"express-basic-auth": "^1.2.1",
|
|
301
306
|
"jsdom": "^26.1.0",
|
|
302
307
|
"prettier": "3.6.2",
|
|
303
308
|
"prettier-plugin-organize-imports": "^4.2.0",
|
package/dist/button-BT7pXfhd.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const t=require("./index-9HRzXEQf.cjs"),k=require("@phosphor-icons/react"),T=require("@radix-ui/react-slot"),g=require("./index-ECyCsPX0.cjs"),q=require("react"),e=require("./tooltip-BccdAn4x.cjs"),x="focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] relative flex items-center justify-center outline-1 transition-[color,background-color,box-shadow] [&_svg]:shrink-0",c=g.cva(x,{variants:{variant:{primary:["bg-primary-600 lg:hover:bg-primary-800 text-white outline-transparent disabled:bg-neutral-100 disabled:text-neutral-700 disabled:lg:hover:bg-neutral-100 disabled:lg:hover:text-neutral-700"],secondary:["bg-black text-white outline-transparent disabled:bg-neutral-100 disabled:text-neutral-700 lg:hover:bg-neutral-900 disabled:lg:hover:bg-neutral-100 disabled:lg:hover:text-neutral-700"],inverse:["lg:hover:bg-neutral-000 bg-white text-black outline-transparent disabled:bg-neutral-100 disabled:text-neutral-700 disabled:lg:hover:bg-neutral-100 disabled:lg:hover:text-neutral-700"],outline:["text-primary-600 outline-primary-600 lg:hover:bg-primary-050 bg-white disabled:bg-neutral-100 disabled:text-neutral-700 disabled:outline-transparent disabled:lg:hover:bg-neutral-100 disabled:lg:hover:text-neutral-700"],ghost:["bg-primary-050 text-primary-600 lg:hover:bg-primary-100 outline-transparent disabled:bg-neutral-100 disabled:text-neutral-700 disabled:lg:hover:bg-neutral-100 disabled:lg:hover:text-neutral-700"],destructive:["bg-error-light text-error-main outline-transparent disabled:bg-neutral-100 disabled:text-neutral-700 disabled:lg:hover:bg-neutral-100 disabled:lg:hover:text-neutral-700"],link:["text-primary-600 lg:hover:bg-primary-050 bg-transparent outline-transparent disabled:bg-neutral-100 disabled:text-neutral-700 disabled:lg:hover:bg-neutral-100 disabled:lg:hover:text-neutral-700"]},size:{xl:"button-text-lg h-12 gap-2 px-6 py-1 leading-[100%] [&_svg]:size-5",lg:"button-text-md h-10 gap-2 px-5 py-1 leading-[100%] [&_svg]:size-4",md:"button-text-sm h-8 gap-1.5 px-4 py-1 leading-[100%] [&_svg]:size-3.5",sm:"button-text-sm h-7 gap-1 px-3 py-1 leading-[100%] [&_svg]:size-3.5",xs:"button-text-sm h-6 gap-1 px-3 py-1 leading-[100%] [&_svg]:size-3.5"},rounded:{default:"rounded-2xl",full:"rounded-full"},weight:{light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"}},defaultVariants:{variant:"primary",size:"xl",weight:"semibold",rounded:"full"}}),v=g.cva(`${x} cursor-default`,{variants:{variant:{primary:["bg-primary-800 text-white outline-transparent"],secondary:["bg-neutral-900 text-white outline-transparent"],inverse:["bg-neutral-000 text-black outline-transparent"],ghost:["bg-primary-100 text-primary-600 outline-transparent"],outline:["bg-primary-100 text-primary-600 outline-primary-600"],destructive:["bg-error-light text-error-main outline-transparent"],link:["bg-primary-050 text-primary-600 outline-transparent"]},size:{xl:"button-text-lg h-12 gap-2 px-6 py-1 leading-[100%] [&_svg]:size-5",lg:"button-text-md h-10 gap-2 px-5 py-1 leading-[100%] [&_svg]:size-4",md:"button-text-sm h-8 gap-1.5 px-4 py-1 leading-[100%] [&_svg]:size-3.5",sm:"button-text-sm h-7 gap-1 px-3 py-1 leading-[100%] [&_svg]:size-3.5",xs:"button-text-sm h-6 gap-1 px-3 py-1 leading-[100%] [&_svg]:size-3.5"},rounded:{default:"rounded-2xl",full:"rounded-full"},weight:{light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"}},defaultVariants:{variant:"primary",size:"xl",weight:"semibold",rounded:"full"}}),y=g.cva(x,{variants:{variant:{primary:["bg-primary-800 text-white outline-transparent"],secondary:["bg-neutral-900 text-white outline-transparent"],inverse:["bg-neutral-000 text-black outline-transparent"],ghost:["bg-primary-100 text-primary-600 outline-transparent"],outline:["bg-primary-100 text-primary-600 outline-primary-600"],destructive:["bg-error-light text-error-main outline-transparent"],link:["bg-primary-050 text-primary-600 outline-transparent"]},size:{xl:"button-text-lg h-12 gap-2 px-6 leading-[100%] [&_svg]:size-5",lg:"button-text-md h-10 gap-2 px-5 leading-[100%] [&_svg]:size-4",md:"button-text-sm h-8 gap-1.5 px-4 leading-[100%] [&_svg]:size-3.5",sm:"button-text-sm h-7 gap-1 px-3 leading-[100%] [&_svg]:size-3.5",xs:"button-text-sm h-6 gap-1 px-3 leading-[100%] [&_svg]:size-3.5"},rounded:{default:"rounded-2xl",full:"rounded-full"},weight:{light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"}},defaultVariants:{variant:"primary",size:"xl",weight:"semibold",rounded:"full"}}),f=q.forwardRef(({className:s,variant:o,size:n,weight:u,rounded:d,children:p,isLoading:r,isActive:j,disabled:b,tooltip:l,tooltipPlacement:m="top",asChild:h,iconOnly:i,...w},z)=>{const R=h?T.Slot:"button",_=i?{xl:"w-12 px-0",lg:"w-10 px-0",md:"w-8 px-0",sm:"w-7 px-0",xs:"w-6 px-0"}[n||"xl"]:"",E=t.cn(r?v({variant:o,weight:u,size:n,rounded:d,className:s}):j?y({variant:o,weight:u,size:n,rounded:d,className:s}):c({variant:o,weight:u,size:n,rounded:d,className:s}),_),S=h?p:t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[r&&t.jsxRuntimeExports.jsx(k.SpinnerIcon,{className:t.cn("pointer-events-none absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2",{"visible animate-spin opacity-100":r})}),t.jsxRuntimeExports.jsx("span",{className:t.cn("flex items-center justify-center gap-2",r?"invisible opacity-0":"visible opacity-100"),children:p})]}),a=t.jsxRuntimeExports.jsx(R,{ref:z,className:E,disabled:b||r,...w,children:S});return l&&(b||r)?t.jsxRuntimeExports.jsx(e.TooltipProvider,{children:t.jsxRuntimeExports.jsxs(e.Tooltip,{children:[t.jsxRuntimeExports.jsx(e.TooltipTrigger,{asChild:i,children:i?t.jsxRuntimeExports.jsx("div",{className:"inline-block","aria-disabled":"true",children:a}):a}),t.jsxRuntimeExports.jsx(e.TooltipContent,{side:m,className:"text-muted-foreground",children:l})]})}):l?t.jsxRuntimeExports.jsx(e.TooltipProvider,{children:t.jsxRuntimeExports.jsxs(e.Tooltip,{children:[t.jsxRuntimeExports.jsx(e.TooltipTrigger,{asChild:i,children:a}),t.jsxRuntimeExports.jsx(e.TooltipContent,{side:m,className:"text-muted-foreground",children:l})]})}):a});f.displayName="Button";exports.Button=f;exports.buttonActiveStyles=y;exports.buttonLoadingStyles=v;exports.buttonStyles=c;
|