@snapcall/design-system 1.25.1 → 1.26.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/{chunk-SSZ45TLL.mjs → chunk-DNGG2G6R.mjs} +4 -4
- package/dist/{chunk-R6W6SKNR.mjs → chunk-HVMCOLSX.mjs} +3 -3
- package/dist/{chunk-YC4ZDBIC.mjs → chunk-VBMQG5SW.mjs} +58 -38
- package/dist/components/AlertDialog/index.js +9 -15
- package/dist/components/AlertDialog/index.mjs +7 -13
- package/dist/components/Badge/index.d.mts +1 -1
- package/dist/components/Badge/index.d.ts +1 -1
- package/dist/components/Badge/index.js +58 -38
- package/dist/components/Badge/index.mjs +1 -1
- package/dist/components/Button/index.js +3 -3
- package/dist/components/Button/index.mjs +1 -1
- package/dist/components/Calendar/index.js +3 -3
- package/dist/components/Calendar/index.mjs +1 -1
- package/dist/components/Carousel/index.js +3 -3
- package/dist/components/Carousel/index.mjs +1 -1
- package/dist/components/Command/index.js +6 -6
- package/dist/components/Command/index.mjs +2 -2
- package/dist/components/CreatableSelect/index.js +64 -44
- package/dist/components/CreatableSelect/index.mjs +3 -3
- package/dist/components/Dialog/index.js +28 -193
- package/dist/components/Dialog/index.mjs +10 -30
- package/dist/components/DropdownMenu/index.js +3 -3
- package/dist/components/DropdownMenu/index.mjs +3 -3
- package/dist/components/FilterButton/index.js +61 -41
- package/dist/components/FilterButton/index.mjs +2 -2
- package/dist/components/Input/index.js +1 -1
- package/dist/components/Input/index.mjs +1 -1
- package/dist/components/Pagination/index.js +3 -3
- package/dist/components/Pagination/index.mjs +1 -1
- package/dist/components/Select/index.js +3 -3
- package/dist/components/Select/index.mjs +3 -3
- package/dist/components/Sheet/index.js +3 -3
- package/dist/components/Sheet/index.mjs +1 -1
- package/dist/components/Tabs/index.js +2 -2
- package/dist/components/Tabs/index.mjs +2 -2
- package/dist/components/Textarea/index.js +3 -3
- package/dist/components/Textarea/index.mjs +3 -3
- package/dist/components/Toaster/index.js +4 -4
- package/dist/components/Toaster/index.mjs +2 -2
- package/dist/components/Toggle/index.d.mts +66 -0
- package/dist/components/Toggle/index.d.ts +66 -0
- package/dist/components/Toggle/index.js +117 -0
- package/dist/components/Toggle/index.mjs +48 -0
- package/dist/components/Tooltip/index.d.mts +2 -1
- package/dist/components/Tooltip/index.d.ts +2 -1
- package/dist/components/Tooltip/index.js +7 -4
- package/dist/components/Tooltip/index.mjs +4 -2
- package/dist/index.d.mts +65 -2
- package/dist/index.d.ts +65 -2
- package/dist/index.js +2 -0
- package/dist/index.mjs +1 -0
- package/dist/style.css +1 -1
- package/package.json +3 -3
|
@@ -71,7 +71,7 @@ __export(Dialog_exports, {
|
|
|
71
71
|
module.exports = __toCommonJS(Dialog_exports);
|
|
72
72
|
|
|
73
73
|
// src/components/Dialog/Dialog.tsx
|
|
74
|
-
var
|
|
74
|
+
var React = __toESM(require("react"));
|
|
75
75
|
var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"));
|
|
76
76
|
|
|
77
77
|
// src/icons/xClose.tsx
|
|
@@ -113,185 +113,35 @@ function cn(...inputs) {
|
|
|
113
113
|
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
// src/components/Button/Button.tsx
|
|
117
|
-
var React = __toESM(require("react"));
|
|
118
|
-
var import_react_slot = require("@radix-ui/react-slot");
|
|
119
|
-
var import_cva = require("cva");
|
|
120
|
-
|
|
121
|
-
// src/icons/spinner.tsx
|
|
122
|
-
var import_react2 = require("react");
|
|
123
|
-
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
124
|
-
var SpinnerIcon = (0, import_react2.forwardRef)(
|
|
125
|
-
function SpinnerIcon2(_a, ref) {
|
|
126
|
-
var _b = _a, { size = 24, className = "animate-spin text-gray-1000" } = _b, other = __objRest(_b, ["size", "className"]);
|
|
127
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
128
|
-
"svg",
|
|
129
|
-
__spreadProps(__spreadValues({
|
|
130
|
-
ref,
|
|
131
|
-
width: size,
|
|
132
|
-
height: size,
|
|
133
|
-
viewBox: "0 0 25 24",
|
|
134
|
-
fill: "none",
|
|
135
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
136
|
-
className
|
|
137
|
-
}, other), {
|
|
138
|
-
children: [
|
|
139
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
140
|
-
"path",
|
|
141
|
-
{
|
|
142
|
-
opacity: "0.12",
|
|
143
|
-
d: "M24.5 12C24.5 18.6274 19.1274 24 12.5 24C5.87258 24 0.5 18.6274 0.5 12C0.5 5.37258 5.87258 0 12.5 0C19.1274 0 24.5 5.37258 24.5 12ZM3.668 12C3.668 16.8778 7.62222 20.832 12.5 20.832C17.3778 20.832 21.332 16.8778 21.332 12C21.332 7.12222 17.3778 3.168 12.5 3.168C7.62222 3.168 3.668 7.12222 3.668 12Z",
|
|
144
|
-
fill: "currentColor"
|
|
145
|
-
}
|
|
146
|
-
),
|
|
147
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
148
|
-
"path",
|
|
149
|
-
{
|
|
150
|
-
d: "M22.916 12C23.7908 12 24.5108 12.7122 24.3956 13.5794C24.1641 15.323 23.5512 17.0011 22.5928 18.4912C21.3476 20.4272 19.5719 21.9643 17.4774 22.919C15.3829 23.8738 13.058 24.206 10.7799 23.8761C8.50179 23.5461 6.36667 22.5679 4.62912 21.0581C2.89158 19.5483 1.62494 17.5706 0.98025 15.3609C0.335563 13.1511 0.340035 10.8026 0.993131 8.5953C1.64623 6.38803 2.92039 4.41517 4.66367 2.91199C6.00545 1.75501 7.58156 0.913857 9.27571 0.441275C10.1184 0.206218 10.9241 0.819698 11.0462 1.68595C11.1683 2.55221 10.5575 3.33995 9.72694 3.61463C8.63201 3.97673 7.61359 4.55146 6.73246 5.31122C5.44941 6.41757 4.51162 7.86959 4.03094 9.49414C3.55027 11.1187 3.54697 12.8472 4.02146 14.4736C4.49595 16.1 5.4282 17.5555 6.70703 18.6668C7.98587 19.778 9.55732 20.4979 11.234 20.7408C12.9107 20.9836 14.6218 20.7391 16.1634 20.0364C17.7049 19.3337 19.0119 18.2024 19.9283 16.7775C20.5576 15.799 20.9846 14.7103 21.1903 13.5755C21.3464 12.7148 22.0412 12 22.916 12Z",
|
|
151
|
-
fill: "currentColor"
|
|
152
|
-
}
|
|
153
|
-
)
|
|
154
|
-
]
|
|
155
|
-
})
|
|
156
|
-
);
|
|
157
|
-
}
|
|
158
|
-
);
|
|
159
|
-
|
|
160
|
-
// src/components/Button/Button.tsx
|
|
161
|
-
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
162
|
-
var buttonVariants = (0, import_cva.cva)({
|
|
163
|
-
base: "inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium ring-offset-background transition-colors relative focus-visible:outline-hidden focus-visible:ring-2 disabled:select-none disabled:pointer-events-none disabled:opacity-40",
|
|
164
|
-
variants: {
|
|
165
|
-
variant: {
|
|
166
|
-
primary: "bg-blue-700 text-white [&>svg]:text-white dark:text-black dark:[&>svg]:text-black hover:bg-blue-800 active:bg-blue-900 focus-visible:ring-blue-1000",
|
|
167
|
-
secondary: "bg-gray-50 text-black [&>svg]:text-black hover:bg-gray-100 active:bg-gray-500 focus-visible:ring-black",
|
|
168
|
-
tertiary: "bg-gray-50 text-blue-700 [&>svg]:text-blue-700 hover:bg-blue-100 active:bg-blue-200 focus-visible:ring-blue-700",
|
|
169
|
-
outline: "bg-white text-black [&>svg]:text-black ring-1 ring-offset-0 ring-gray-200 hover:bg-gray-50 active:bg-gray-200 focus-visible:ring-black",
|
|
170
|
-
outlineBlue: "bg-transparent text-blue-700 [&>svg]:text-blue-700 ring-1 ring-inset ring-offset-0 ring-blue-700 hover:bg-blue-50 active:bg-blue-200 focus-visible:ring-blue-700 ",
|
|
171
|
-
destructive: "bg-red-700 text-white [&>svg]:text-white dark:text-black dark:[&>svg]:text-black hover:bg-red-800 active:bg-red-900 focus-visible:ring-red-1000",
|
|
172
|
-
ghostBlue: "bg-transparent text-blue-700 [&>svg]:text-blue-700 hover:bg-blue-100 active:bg-blue-200 focus-visible:ring-blue-700",
|
|
173
|
-
ghostRed: "bg-transparent text-red-700 [&>svg]:text-red-700 hover:bg-red-100 active:bg-red-200 focus-visible:ring-red-700",
|
|
174
|
-
ghostGray: "bg-transparent text-black [&>svg]:text-black hover:bg-gray-100 active:bg-gray-200 focus-visible:ring-black",
|
|
175
|
-
roundedFill: "rounded-2xl text-black [&>svg]:text-black bg-gray-200 active:bg-gray-300 border-2 border-gray-400 hover:border-gray-600",
|
|
176
|
-
roundedGlass: "rounded-2xl text-black [&>svg]:text-black bg-gray-100/50 hover:bg-gray-100/75 active:bg-gray-100 backdrop-blur-[20px]"
|
|
177
|
-
}
|
|
178
|
-
},
|
|
179
|
-
defaultVariants: {
|
|
180
|
-
variant: "primary"
|
|
181
|
-
}
|
|
182
|
-
});
|
|
183
|
-
var buttonSizes = (0, import_cva.cva)({
|
|
184
|
-
variants: {
|
|
185
|
-
size: {
|
|
186
|
-
xs: "text-xs px-2.5 py-1.5",
|
|
187
|
-
sm: "text-sm px-3 py-2",
|
|
188
|
-
md: "text-md px-3.5 py-2.5",
|
|
189
|
-
lg: "text-lg px-4 py-3"
|
|
190
|
-
}
|
|
191
|
-
},
|
|
192
|
-
defaultVariants: {
|
|
193
|
-
size: "md"
|
|
194
|
-
}
|
|
195
|
-
});
|
|
196
|
-
var iconButtonSizes = (0, import_cva.cva)({
|
|
197
|
-
variants: {
|
|
198
|
-
size: {
|
|
199
|
-
xs: "p-2",
|
|
200
|
-
sm: "p-2.5",
|
|
201
|
-
md: "p-[11px]",
|
|
202
|
-
lg: "p-3"
|
|
203
|
-
}
|
|
204
|
-
},
|
|
205
|
-
defaultVariants: {
|
|
206
|
-
size: "md"
|
|
207
|
-
}
|
|
208
|
-
});
|
|
209
|
-
var iconSizes = {
|
|
210
|
-
xs: 12,
|
|
211
|
-
sm: 16,
|
|
212
|
-
md: 18,
|
|
213
|
-
lg: 24
|
|
214
|
-
};
|
|
215
|
-
var Button = React.forwardRef(
|
|
216
|
-
(_a, ref) => {
|
|
217
|
-
var _b = _a, {
|
|
218
|
-
className,
|
|
219
|
-
variant,
|
|
220
|
-
size,
|
|
221
|
-
icon = false,
|
|
222
|
-
isLoading = false,
|
|
223
|
-
asChild = false,
|
|
224
|
-
children,
|
|
225
|
-
type = "button"
|
|
226
|
-
} = _b, props = __objRest(_b, [
|
|
227
|
-
"className",
|
|
228
|
-
"variant",
|
|
229
|
-
"size",
|
|
230
|
-
"icon",
|
|
231
|
-
"isLoading",
|
|
232
|
-
"asChild",
|
|
233
|
-
"children",
|
|
234
|
-
"type"
|
|
235
|
-
]);
|
|
236
|
-
var _a2;
|
|
237
|
-
const Comp = asChild ? import_react_slot.Slot : "button";
|
|
238
|
-
const sizesStyle = icon ? iconButtonSizes : buttonSizes;
|
|
239
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
240
|
-
Comp,
|
|
241
|
-
__spreadProps(__spreadValues({
|
|
242
|
-
className: cn(
|
|
243
|
-
buttonVariants({ variant, className }),
|
|
244
|
-
sizesStyle({ size })
|
|
245
|
-
),
|
|
246
|
-
ref,
|
|
247
|
-
disabled: (_a2 = props.disabled) != null ? _a2 : isLoading,
|
|
248
|
-
type
|
|
249
|
-
}, props), {
|
|
250
|
-
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
251
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
252
|
-
SpinnerIcon,
|
|
253
|
-
{
|
|
254
|
-
size: iconSizes[size || "md"],
|
|
255
|
-
className: "absolute text-inherit animate-spin"
|
|
256
|
-
}
|
|
257
|
-
),
|
|
258
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "flex gap-[inherit] invisible", children })
|
|
259
|
-
] }) : children
|
|
260
|
-
})
|
|
261
|
-
);
|
|
262
|
-
}
|
|
263
|
-
);
|
|
264
|
-
Button.displayName = "Button";
|
|
265
|
-
|
|
266
116
|
// src/components/Dialog/Dialog.tsx
|
|
267
|
-
var
|
|
117
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
268
118
|
var Dialog = DialogPrimitive.Root;
|
|
269
119
|
var DialogTrigger = DialogPrimitive.Trigger;
|
|
270
|
-
var DialogOverlay =
|
|
120
|
+
var DialogOverlay = React.forwardRef((_a, ref) => {
|
|
271
121
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
272
|
-
return /* @__PURE__ */ (0,
|
|
122
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
273
123
|
DialogPrimitive.Overlay,
|
|
274
124
|
__spreadValues({
|
|
275
125
|
ref,
|
|
276
126
|
className: cn(
|
|
277
|
-
"fixed inset-0 z-50 bg-black/25 backdrop-blur-
|
|
127
|
+
"fixed inset-0 z-50 bg-black/25 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
278
128
|
className
|
|
279
129
|
)
|
|
280
130
|
}, props)
|
|
281
131
|
);
|
|
282
132
|
});
|
|
283
133
|
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
284
|
-
var DialogContent =
|
|
134
|
+
var DialogContent = React.forwardRef(
|
|
285
135
|
(_a, ref) => {
|
|
286
136
|
var _b = _a, { className, children, bottomSheet = false, showClose = true } = _b, props = __objRest(_b, ["className", "children", "bottomSheet", "showClose"]);
|
|
287
|
-
return /* @__PURE__ */ (0,
|
|
288
|
-
/* @__PURE__ */ (0,
|
|
289
|
-
/* @__PURE__ */ (0,
|
|
137
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(DialogPrimitive.Portal, { children: [
|
|
138
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(DialogOverlay, {}),
|
|
139
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
290
140
|
DialogPrimitive.Content,
|
|
291
141
|
__spreadProps(__spreadValues({
|
|
292
142
|
ref,
|
|
293
143
|
className: cn(
|
|
294
|
-
"fixed left-[50%] top-[50%] z-50
|
|
144
|
+
"fixed left-[50%] top-[50%] z-50 flex flex-col divide-y divide-gray-200 w-full max-w-[400px] max-h-[90vh] overflow-hidden translate-x-[-50%] translate-y-[-50%] border border-gray-200 bg-white shadow-sm md:w-full *:p-4",
|
|
295
145
|
{
|
|
296
146
|
"top-auto bottom-0 translate-y-0 ease-[cubic-bezier(0.075,0.82,0.165,1)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=open]:slide-in-from-bottom-[100%] data-[state=closed]:slide-out-to-bottom-[100%] rounded-t-3xl": bottomSheet
|
|
297
147
|
},
|
|
@@ -303,20 +153,10 @@ var DialogContent = React2.forwardRef(
|
|
|
303
153
|
}, props), {
|
|
304
154
|
children: [
|
|
305
155
|
children,
|
|
306
|
-
showClose && /* @__PURE__ */ (0,
|
|
307
|
-
|
|
308
|
-
{
|
|
309
|
-
|
|
310
|
-
buttonVariants({ variant: "secondary" }),
|
|
311
|
-
iconButtonSizes({ size: "xs" }),
|
|
312
|
-
"absolute right-6 top-6"
|
|
313
|
-
),
|
|
314
|
-
children: [
|
|
315
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(XCloseIcon, { className: "w-3 h-3" }),
|
|
316
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "sr-only", children: "Close" })
|
|
317
|
-
]
|
|
318
|
-
}
|
|
319
|
-
)
|
|
156
|
+
showClose && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(DialogPrimitive.Close, { className: "absolute right-4 top-4 flex items-center justify-center bg-gray-50 hover:bg-gray-100 rounded-lg p-2 transition-colors", children: [
|
|
157
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(XCloseIcon, { className: "w-3 h-3" }),
|
|
158
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "sr-only", children: "Close" })
|
|
159
|
+
] })
|
|
320
160
|
]
|
|
321
161
|
})
|
|
322
162
|
)
|
|
@@ -330,12 +170,7 @@ var DialogHeader = (_a) => {
|
|
|
330
170
|
} = _b, props = __objRest(_b, [
|
|
331
171
|
"className"
|
|
332
172
|
]);
|
|
333
|
-
return /* @__PURE__ */ (0,
|
|
334
|
-
"div",
|
|
335
|
-
__spreadValues({
|
|
336
|
-
className: cn("flex flex-col space-y-1.5 text-left", className)
|
|
337
|
-
}, props)
|
|
338
|
-
);
|
|
173
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", __spreadValues({ className: cn("flex flex-col gap-1 p-4", className) }, props));
|
|
339
174
|
};
|
|
340
175
|
DialogHeader.displayName = "DialogHeader";
|
|
341
176
|
var DialogFooter = (_a) => {
|
|
@@ -344,51 +179,51 @@ var DialogFooter = (_a) => {
|
|
|
344
179
|
} = _b, props = __objRest(_b, [
|
|
345
180
|
"className"
|
|
346
181
|
]);
|
|
347
|
-
return /* @__PURE__ */ (0,
|
|
182
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
348
183
|
"div",
|
|
349
184
|
__spreadValues({
|
|
350
185
|
className: cn(
|
|
351
|
-
"flex
|
|
186
|
+
"flex items-center justify-end gap-2 p-4 bg-gray-25",
|
|
352
187
|
className
|
|
353
188
|
)
|
|
354
189
|
}, props)
|
|
355
190
|
);
|
|
356
191
|
};
|
|
357
192
|
DialogFooter.displayName = "DialogFooter";
|
|
358
|
-
var DialogTitle =
|
|
193
|
+
var DialogTitle = React.forwardRef((_a, ref) => {
|
|
359
194
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
360
|
-
return /* @__PURE__ */ (0,
|
|
195
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
361
196
|
DialogPrimitive.Title,
|
|
362
197
|
__spreadValues({
|
|
363
198
|
ref,
|
|
364
|
-
className: cn("text-
|
|
199
|
+
className: cn("text-base font-medium text-black", className)
|
|
365
200
|
}, props)
|
|
366
201
|
);
|
|
367
202
|
});
|
|
368
203
|
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
369
|
-
var DialogDescription =
|
|
204
|
+
var DialogDescription = React.forwardRef((_a, ref) => {
|
|
370
205
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
371
|
-
return /* @__PURE__ */ (0,
|
|
206
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
372
207
|
DialogPrimitive.Description,
|
|
373
208
|
__spreadValues({
|
|
374
209
|
ref,
|
|
375
|
-
className: cn("text-sm text-gray-
|
|
210
|
+
className: cn("text-sm text-gray-900", className)
|
|
376
211
|
}, props)
|
|
377
212
|
);
|
|
378
213
|
});
|
|
379
214
|
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
380
215
|
|
|
381
216
|
// src/components/Dialog/useDialogState.ts
|
|
382
|
-
var
|
|
217
|
+
var import_react2 = require("react");
|
|
383
218
|
var useDialogState = (props) => {
|
|
384
|
-
const [isOpen, setOpen] = (0,
|
|
385
|
-
const open = (0,
|
|
219
|
+
const [isOpen, setOpen] = (0, import_react2.useState)((props == null ? void 0 : props.defaultOpen) || false);
|
|
220
|
+
const open = (0, import_react2.useCallback)(() => {
|
|
386
221
|
setOpen(true);
|
|
387
222
|
}, []);
|
|
388
|
-
const close = (0,
|
|
223
|
+
const close = (0, import_react2.useCallback)(() => {
|
|
389
224
|
setOpen(false);
|
|
390
225
|
}, []);
|
|
391
|
-
const toggle = (0,
|
|
226
|
+
const toggle = (0, import_react2.useCallback)(() => {
|
|
392
227
|
setOpen(!isOpen);
|
|
393
228
|
}, [isOpen]);
|
|
394
229
|
return {
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
XCloseIcon
|
|
3
3
|
} from "../../chunk-FMJFBQTF.mjs";
|
|
4
|
-
import {
|
|
5
|
-
buttonVariants,
|
|
6
|
-
iconButtonSizes
|
|
7
|
-
} from "../../chunk-R6W6SKNR.mjs";
|
|
8
|
-
import "../../chunk-N65I4EXR.mjs";
|
|
9
4
|
import {
|
|
10
5
|
__objRest,
|
|
11
6
|
__spreadProps,
|
|
@@ -26,7 +21,7 @@ var DialogOverlay = React.forwardRef((_a, ref) => {
|
|
|
26
21
|
__spreadValues({
|
|
27
22
|
ref,
|
|
28
23
|
className: cn(
|
|
29
|
-
"fixed inset-0 z-50 bg-black/25 backdrop-blur-
|
|
24
|
+
"fixed inset-0 z-50 bg-black/25 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
30
25
|
className
|
|
31
26
|
)
|
|
32
27
|
}, props)
|
|
@@ -43,7 +38,7 @@ var DialogContent = React.forwardRef(
|
|
|
43
38
|
__spreadProps(__spreadValues({
|
|
44
39
|
ref,
|
|
45
40
|
className: cn(
|
|
46
|
-
"fixed left-[50%] top-[50%] z-50
|
|
41
|
+
"fixed left-[50%] top-[50%] z-50 flex flex-col divide-y divide-gray-200 w-full max-w-[400px] max-h-[90vh] overflow-hidden translate-x-[-50%] translate-y-[-50%] border border-gray-200 bg-white shadow-sm md:w-full *:p-4",
|
|
47
42
|
{
|
|
48
43
|
"top-auto bottom-0 translate-y-0 ease-[cubic-bezier(0.075,0.82,0.165,1)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=open]:slide-in-from-bottom-[100%] data-[state=closed]:slide-out-to-bottom-[100%] rounded-t-3xl": bottomSheet
|
|
49
44
|
},
|
|
@@ -55,20 +50,10 @@ var DialogContent = React.forwardRef(
|
|
|
55
50
|
}, props), {
|
|
56
51
|
children: [
|
|
57
52
|
children,
|
|
58
|
-
showClose && /* @__PURE__ */ jsxs(
|
|
59
|
-
|
|
60
|
-
{
|
|
61
|
-
|
|
62
|
-
buttonVariants({ variant: "secondary" }),
|
|
63
|
-
iconButtonSizes({ size: "xs" }),
|
|
64
|
-
"absolute right-6 top-6"
|
|
65
|
-
),
|
|
66
|
-
children: [
|
|
67
|
-
/* @__PURE__ */ jsx(XCloseIcon, { className: "w-3 h-3" }),
|
|
68
|
-
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
69
|
-
]
|
|
70
|
-
}
|
|
71
|
-
)
|
|
53
|
+
showClose && /* @__PURE__ */ jsxs(DialogPrimitive.Close, { className: "absolute right-4 top-4 flex items-center justify-center bg-gray-50 hover:bg-gray-100 rounded-lg p-2 transition-colors", children: [
|
|
54
|
+
/* @__PURE__ */ jsx(XCloseIcon, { className: "w-3 h-3" }),
|
|
55
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
56
|
+
] })
|
|
72
57
|
]
|
|
73
58
|
})
|
|
74
59
|
)
|
|
@@ -82,12 +67,7 @@ var DialogHeader = (_a) => {
|
|
|
82
67
|
} = _b, props = __objRest(_b, [
|
|
83
68
|
"className"
|
|
84
69
|
]);
|
|
85
|
-
return /* @__PURE__ */ jsx(
|
|
86
|
-
"div",
|
|
87
|
-
__spreadValues({
|
|
88
|
-
className: cn("flex flex-col space-y-1.5 text-left", className)
|
|
89
|
-
}, props)
|
|
90
|
-
);
|
|
70
|
+
return /* @__PURE__ */ jsx("div", __spreadValues({ className: cn("flex flex-col gap-1 p-4", className) }, props));
|
|
91
71
|
};
|
|
92
72
|
DialogHeader.displayName = "DialogHeader";
|
|
93
73
|
var DialogFooter = (_a) => {
|
|
@@ -100,7 +80,7 @@ var DialogFooter = (_a) => {
|
|
|
100
80
|
"div",
|
|
101
81
|
__spreadValues({
|
|
102
82
|
className: cn(
|
|
103
|
-
"flex
|
|
83
|
+
"flex items-center justify-end gap-2 p-4 bg-gray-25",
|
|
104
84
|
className
|
|
105
85
|
)
|
|
106
86
|
}, props)
|
|
@@ -113,7 +93,7 @@ var DialogTitle = React.forwardRef((_a, ref) => {
|
|
|
113
93
|
DialogPrimitive.Title,
|
|
114
94
|
__spreadValues({
|
|
115
95
|
ref,
|
|
116
|
-
className: cn("text-
|
|
96
|
+
className: cn("text-base font-medium text-black", className)
|
|
117
97
|
}, props)
|
|
118
98
|
);
|
|
119
99
|
});
|
|
@@ -124,7 +104,7 @@ var DialogDescription = React.forwardRef((_a, ref) => {
|
|
|
124
104
|
DialogPrimitive.Description,
|
|
125
105
|
__spreadValues({
|
|
126
106
|
ref,
|
|
127
|
-
className: cn("text-sm text-gray-
|
|
107
|
+
className: cn("text-sm text-gray-900", className)
|
|
128
108
|
}, props)
|
|
129
109
|
);
|
|
130
110
|
});
|
|
@@ -191,7 +191,7 @@ var DropdownMenuItemBase = ({
|
|
|
191
191
|
"div",
|
|
192
192
|
{
|
|
193
193
|
className: cn(
|
|
194
|
-
"mx-1 px-2 py-1.5 text-sm flex flex-col gap-1 text-black rounded-
|
|
194
|
+
"mx-1 px-2 py-1.5 text-sm flex flex-col gap-1 text-black rounded-lg cursor-pointer group-focus-within:bg-gray-100 group-data-disabled:cursor-not-allowed group-data-disabled:opacity-50 group-hover:bg-gray-50 group-active:bg-gray-100 group-data-[state=checked]:bg-gray-50",
|
|
195
195
|
{ "text-red-700 font-medium": destructive },
|
|
196
196
|
className
|
|
197
197
|
),
|
|
@@ -256,7 +256,7 @@ var DropdownMenuContent = import_react3.default.forwardRef(
|
|
|
256
256
|
DropdownMenuPrimitive.Content,
|
|
257
257
|
__spreadProps(__spreadValues({
|
|
258
258
|
className: cn(
|
|
259
|
-
"min-w-[144px] bg-white rounded-
|
|
259
|
+
"min-w-[144px] bg-white rounded-lg py-1 shadow-dropdown-sm border border-gray-200 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-95 data-[state=open]:zoom-in-95",
|
|
260
260
|
className
|
|
261
261
|
),
|
|
262
262
|
side,
|
|
@@ -344,7 +344,7 @@ var DropdownMenuSubContent = import_react3.default.forwardRef((_a, forwardedRef)
|
|
|
344
344
|
DropdownMenuPrimitive.SubContent,
|
|
345
345
|
__spreadProps(__spreadValues({
|
|
346
346
|
className: cn(
|
|
347
|
-
"min-w-[144px] bg-white rounded-
|
|
347
|
+
"min-w-[144px] bg-white rounded-lg py-1 shadow-dropdown-sm border border-gray-200 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-95 data-[state=open]:zoom-in-95",
|
|
348
348
|
className
|
|
349
349
|
),
|
|
350
350
|
sideOffset
|
|
@@ -31,7 +31,7 @@ var DropdownMenuItemBase = ({
|
|
|
31
31
|
"div",
|
|
32
32
|
{
|
|
33
33
|
className: cn(
|
|
34
|
-
"mx-1 px-2 py-1.5 text-sm flex flex-col gap-1 text-black rounded-
|
|
34
|
+
"mx-1 px-2 py-1.5 text-sm flex flex-col gap-1 text-black rounded-lg cursor-pointer group-focus-within:bg-gray-100 group-data-disabled:cursor-not-allowed group-data-disabled:opacity-50 group-hover:bg-gray-50 group-active:bg-gray-100 group-data-[state=checked]:bg-gray-50",
|
|
35
35
|
{ "text-red-700 font-medium": destructive },
|
|
36
36
|
className
|
|
37
37
|
),
|
|
@@ -96,7 +96,7 @@ var DropdownMenuContent = React.forwardRef(
|
|
|
96
96
|
DropdownMenuPrimitive.Content,
|
|
97
97
|
__spreadProps(__spreadValues({
|
|
98
98
|
className: cn(
|
|
99
|
-
"min-w-[144px] bg-white rounded-
|
|
99
|
+
"min-w-[144px] bg-white rounded-lg py-1 shadow-dropdown-sm border border-gray-200 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-95 data-[state=open]:zoom-in-95",
|
|
100
100
|
className
|
|
101
101
|
),
|
|
102
102
|
side,
|
|
@@ -184,7 +184,7 @@ var DropdownMenuSubContent = React.forwardRef((_a, forwardedRef) => {
|
|
|
184
184
|
DropdownMenuPrimitive.SubContent,
|
|
185
185
|
__spreadProps(__spreadValues({
|
|
186
186
|
className: cn(
|
|
187
|
-
"min-w-[144px] bg-white rounded-
|
|
187
|
+
"min-w-[144px] bg-white rounded-lg py-1 shadow-dropdown-sm border border-gray-200 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-95 data-[state=open]:zoom-in-95",
|
|
188
188
|
className
|
|
189
189
|
),
|
|
190
190
|
sideOffset
|
|
@@ -105,33 +105,33 @@ var randomPickFromArray = ({
|
|
|
105
105
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
106
106
|
var colors = {
|
|
107
107
|
gray: "text-gray-900",
|
|
108
|
-
green: "text-green-
|
|
109
|
-
red: "text-red-
|
|
110
|
-
|
|
111
|
-
blue: "text-blue-
|
|
112
|
-
crimson: "text-crimson-
|
|
113
|
-
violet: "text-violet-
|
|
114
|
-
cyan: "text-cyan-
|
|
115
|
-
teal: "text-teal-
|
|
116
|
-
brown: "text-brown-
|
|
117
|
-
orange: "text-orange-
|
|
108
|
+
green: "text-green-900",
|
|
109
|
+
red: "text-red-900",
|
|
110
|
+
amber: "text-amber-900",
|
|
111
|
+
blue: "text-blue-900",
|
|
112
|
+
crimson: "text-crimson-900",
|
|
113
|
+
violet: "text-violet-900",
|
|
114
|
+
cyan: "text-cyan-900",
|
|
115
|
+
teal: "text-teal-900",
|
|
116
|
+
brown: "text-brown-900",
|
|
117
|
+
orange: "text-orange-900"
|
|
118
118
|
};
|
|
119
119
|
var colorsArray = Object.keys(colors);
|
|
120
120
|
var badgeVariants = (0, import_cva.cva)({
|
|
121
|
-
base: "inline-flex items-center justify-center gap-1 rounded-
|
|
121
|
+
base: "inline-flex items-center justify-center gap-1 rounded-full px-2 py-0.5 text-xs font-semibold transition-colors",
|
|
122
122
|
variants: {
|
|
123
123
|
variant: {
|
|
124
124
|
default: "",
|
|
125
|
-
outline: "
|
|
125
|
+
outline: "border border-solid bg-transparent",
|
|
126
126
|
fill: ""
|
|
127
127
|
},
|
|
128
128
|
color: colors
|
|
129
129
|
},
|
|
130
130
|
compoundVariants: [
|
|
131
|
-
{ variant: "default", color: "gray", className: "bg-gray-
|
|
131
|
+
{ variant: "default", color: "gray", className: "bg-gray-100" },
|
|
132
132
|
{ variant: "default", color: "green", className: "bg-green-100" },
|
|
133
133
|
{ variant: "default", color: "red", className: "bg-red-100" },
|
|
134
|
-
{ variant: "default", color: "
|
|
134
|
+
{ variant: "default", color: "amber", className: "bg-amber-100" },
|
|
135
135
|
{ variant: "default", color: "blue", className: "bg-blue-100" },
|
|
136
136
|
{ variant: "default", color: "crimson", className: "bg-crimson-100" },
|
|
137
137
|
{ variant: "default", color: "violet", className: "bg-violet-100" },
|
|
@@ -142,88 +142,108 @@ var badgeVariants = (0, import_cva.cva)({
|
|
|
142
142
|
{
|
|
143
143
|
variant: "outline",
|
|
144
144
|
color: "gray",
|
|
145
|
-
className: "
|
|
145
|
+
className: "border-gray-200 text-black dark:bg-gray-25"
|
|
146
146
|
},
|
|
147
147
|
{
|
|
148
148
|
variant: "outline",
|
|
149
149
|
color: "green",
|
|
150
|
-
className: "
|
|
150
|
+
className: "border-green-700 text-green-700 dark:bg-green-25"
|
|
151
151
|
},
|
|
152
152
|
{
|
|
153
153
|
variant: "outline",
|
|
154
154
|
color: "red",
|
|
155
|
-
className: "
|
|
155
|
+
className: "border-red-700 text-red-700 dark:bg-red-25"
|
|
156
156
|
},
|
|
157
157
|
{
|
|
158
158
|
variant: "outline",
|
|
159
|
-
color: "
|
|
160
|
-
className: "
|
|
159
|
+
color: "amber",
|
|
160
|
+
className: "border-amber-700 text-amber-700 dark:bg-amber-25"
|
|
161
161
|
},
|
|
162
162
|
{
|
|
163
163
|
variant: "outline",
|
|
164
164
|
color: "blue",
|
|
165
|
-
className: "
|
|
165
|
+
className: "border-blue-700 text-blue-700 dark:bg-blue-25"
|
|
166
166
|
},
|
|
167
167
|
{
|
|
168
168
|
variant: "outline",
|
|
169
169
|
color: "crimson",
|
|
170
|
-
className: "
|
|
170
|
+
className: "border-crimson-700 text-crimson-700 dark:bg-crimson-25"
|
|
171
171
|
},
|
|
172
172
|
{
|
|
173
173
|
variant: "outline",
|
|
174
174
|
color: "violet",
|
|
175
|
-
className: "
|
|
175
|
+
className: "border-violet-700 text-violet-700 dark:bg-violet-25"
|
|
176
176
|
},
|
|
177
177
|
{
|
|
178
178
|
variant: "outline",
|
|
179
179
|
color: "cyan",
|
|
180
|
-
className: "
|
|
180
|
+
className: "border-cyan-700 text-cyan-700 dark:bg-cyan-25"
|
|
181
181
|
},
|
|
182
182
|
{
|
|
183
183
|
variant: "outline",
|
|
184
184
|
color: "teal",
|
|
185
|
-
className: "
|
|
185
|
+
className: "border-teal-700 text-teal-700 dark:bg-teal-25"
|
|
186
186
|
},
|
|
187
187
|
{
|
|
188
188
|
variant: "outline",
|
|
189
189
|
color: "brown",
|
|
190
|
-
className: "
|
|
190
|
+
className: "border-brown-700 text-brown-700 dark:bg-brown-25"
|
|
191
191
|
},
|
|
192
192
|
{
|
|
193
193
|
variant: "outline",
|
|
194
194
|
color: "orange",
|
|
195
|
-
className: "
|
|
195
|
+
className: "border-orange-700 text-orange-700 dark:bg-orange-25"
|
|
196
196
|
},
|
|
197
|
-
{ variant: "fill", color: "gray", className: "text-white
|
|
198
|
-
{ variant: "fill", color: "green", className: "text-white bg-green-700" },
|
|
199
|
-
{ variant: "fill", color: "red", className: "text-white bg-red-700" },
|
|
197
|
+
{ variant: "fill", color: "gray", className: "bg-black text-white" },
|
|
200
198
|
{
|
|
201
199
|
variant: "fill",
|
|
202
|
-
color: "
|
|
203
|
-
className: "text-white
|
|
200
|
+
color: "green",
|
|
201
|
+
className: "bg-green-700 text-white dark:text-black"
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
variant: "fill",
|
|
205
|
+
color: "red",
|
|
206
|
+
className: "bg-red-700 text-white dark:text-black"
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
variant: "fill",
|
|
210
|
+
color: "amber",
|
|
211
|
+
className: "bg-amber-700 text-white dark:text-black"
|
|
204
212
|
},
|
|
205
213
|
{
|
|
206
214
|
variant: "fill",
|
|
207
215
|
color: "blue",
|
|
208
|
-
className: "text-white dark:text-black
|
|
216
|
+
className: "bg-blue-700 text-white dark:text-black"
|
|
209
217
|
},
|
|
210
218
|
{
|
|
211
219
|
variant: "fill",
|
|
212
220
|
color: "crimson",
|
|
213
|
-
className: "text-white
|
|
221
|
+
className: "bg-crimson-700 text-white dark:text-black"
|
|
214
222
|
},
|
|
215
223
|
{
|
|
216
224
|
variant: "fill",
|
|
217
225
|
color: "violet",
|
|
218
|
-
className: "text-white
|
|
226
|
+
className: "bg-violet-700 text-white dark:text-black"
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
variant: "fill",
|
|
230
|
+
color: "cyan",
|
|
231
|
+
className: "bg-cyan-700 text-white dark:text-black"
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
variant: "fill",
|
|
235
|
+
color: "teal",
|
|
236
|
+
className: "bg-teal-700 text-white dark:text-black"
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
variant: "fill",
|
|
240
|
+
color: "brown",
|
|
241
|
+
className: "bg-brown-700 text-white dark:text-black"
|
|
219
242
|
},
|
|
220
|
-
{ variant: "fill", color: "cyan", className: "text-white bg-cyan-700" },
|
|
221
|
-
{ variant: "fill", color: "teal", className: "text-white bg-teal-700" },
|
|
222
|
-
{ variant: "fill", color: "brown", className: "text-white bg-brown-700" },
|
|
223
243
|
{
|
|
224
244
|
variant: "fill",
|
|
225
245
|
color: "orange",
|
|
226
|
-
className: "text-white
|
|
246
|
+
className: "bg-orange-700 text-white dark:text-black"
|
|
227
247
|
}
|
|
228
248
|
],
|
|
229
249
|
defaultVariants: {
|
|
@@ -294,7 +314,7 @@ var SpinnerIcon = (0, import_react2.forwardRef)(
|
|
|
294
314
|
// src/components/Button/Button.tsx
|
|
295
315
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
296
316
|
var buttonVariants = (0, import_cva2.cva)({
|
|
297
|
-
base: "inline-flex items-center justify-center gap-2 rounded-
|
|
317
|
+
base: "inline-flex items-center justify-center gap-2 rounded-lg text-sm font-medium ring-offset-background transition-colors relative focus-visible:outline-hidden focus-visible:ring-2 disabled:select-none disabled:pointer-events-none disabled:opacity-40",
|
|
298
318
|
variants: {
|
|
299
319
|
variant: {
|
|
300
320
|
primary: "bg-blue-700 text-white [&>svg]:text-white dark:text-black dark:[&>svg]:text-black hover:bg-blue-800 active:bg-blue-900 focus-visible:ring-blue-1000",
|
|
@@ -324,7 +344,7 @@ var buttonSizes = (0, import_cva2.cva)({
|
|
|
324
344
|
}
|
|
325
345
|
},
|
|
326
346
|
defaultVariants: {
|
|
327
|
-
size: "
|
|
347
|
+
size: "sm"
|
|
328
348
|
}
|
|
329
349
|
});
|
|
330
350
|
var iconButtonSizes = (0, import_cva2.cva)({
|
|
@@ -337,7 +357,7 @@ var iconButtonSizes = (0, import_cva2.cva)({
|
|
|
337
357
|
}
|
|
338
358
|
},
|
|
339
359
|
defaultVariants: {
|
|
340
|
-
size: "
|
|
360
|
+
size: "sm"
|
|
341
361
|
}
|
|
342
362
|
});
|
|
343
363
|
var iconSizes = {
|