@szum-tech/design-system 3.5.1 → 3.7.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/chunk-3BLXG7ET.js +86 -0
- package/dist/chunk-4YXM4NWG.cjs +46 -0
- package/dist/{chunk-5Q3H4MOX.js → chunk-ACJ3ES2B.js} +1 -1
- package/dist/{chunk-6WGZMVJT.cjs → chunk-BAWVLSRF.cjs} +1 -1
- package/dist/chunk-FKCWRNWB.js +54 -0
- package/dist/chunk-KXMI4545.js +43 -0
- package/dist/chunk-X55H6LRX.cjs +108 -0
- package/dist/chunk-Z6CZAPVG.cjs +58 -0
- package/dist/components/badge/index.cjs +10 -2
- package/dist/components/badge/index.d.cts +11 -2
- package/dist/components/badge/index.d.ts +11 -2
- package/dist/components/badge/index.js +1 -1
- package/dist/components/button/index.cjs +8 -6
- package/dist/components/button/index.d.cts +1 -1
- package/dist/components/button/index.d.ts +1 -1
- package/dist/components/button/index.js +7 -5
- package/dist/components/color-swatch/index.cjs +12 -0
- package/dist/components/color-swatch/index.d.cts +22 -0
- package/dist/components/color-swatch/index.d.ts +22 -0
- package/dist/components/color-swatch/index.js +3 -0
- package/dist/components/dialog/index.cjs +9 -9
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/index.cjs +64 -42
- package/dist/components/index.d.cts +3 -1
- package/dist/components/index.d.ts +3 -1
- package/dist/components/index.js +7 -5
- package/dist/components/item/index.d.cts +1 -1
- package/dist/components/item/index.d.ts +1 -1
- package/dist/components/scroll-area/index.cjs +16 -0
- package/dist/components/scroll-area/index.d.cts +11 -0
- package/dist/components/scroll-area/index.d.ts +11 -0
- package/dist/components/scroll-area/index.js +3 -0
- package/dist/components/stepper/index.cjs +26 -24
- package/dist/components/stepper/index.js +7 -5
- package/dist/components/toaster/index.cjs +9 -7
- package/dist/components/toaster/index.js +7 -5
- package/package.json +14 -14
- package/dist/chunk-6VC76QIP.js +0 -27
- package/dist/chunk-RDYKJP7U.cjs +0 -29
- /package/dist/{chunk-FN24XAO4.js → chunk-E2Y5T6U6.js} +0 -0
- /package/dist/{chunk-UPL5LJOP.cjs → chunk-ZTD7ED52.cjs} +0 -0
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { cn } from './chunk-ZD2QRAOX.js';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { Slot } from 'radix-ui';
|
|
4
|
+
import { cva } from 'class-variance-authority';
|
|
5
|
+
import { jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
var colorSwatchVariants = cva(
|
|
8
|
+
"border-border box-border rounded border shadow-sm [background-clip:padding-box] data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
9
|
+
{
|
|
10
|
+
variants: {
|
|
11
|
+
size: {
|
|
12
|
+
default: "size-8",
|
|
13
|
+
sm: "size-6",
|
|
14
|
+
lg: "size-12"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
defaultVariants: {
|
|
18
|
+
size: "default"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
// src/components/color-swatch/color-swatch.utils.ts
|
|
24
|
+
function getIsCssColor(v) {
|
|
25
|
+
try {
|
|
26
|
+
return typeof CSS !== "undefined" && typeof CSS.supports === "function" ? CSS.supports("color", v) : true;
|
|
27
|
+
} catch {
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
function getHasAlpha(v) {
|
|
32
|
+
const s = v.trim().toLowerCase();
|
|
33
|
+
if (s === "transparent") return true;
|
|
34
|
+
if (/^#(?:[0-9a-f]{4}|[0-9a-f]{8})$/i.test(s)) return true;
|
|
35
|
+
if (/\b(?:rgba|hsla)\s*\(/i.test(s)) return true;
|
|
36
|
+
return /\b(?:rgb|hsl|lab|lch|oklab|oklch|color)\s*\([^)]*\/\s*[\d.]+%?\s*\)/i.test(s);
|
|
37
|
+
}
|
|
38
|
+
function ColorSwatch({
|
|
39
|
+
color,
|
|
40
|
+
size = "default",
|
|
41
|
+
asChild = false,
|
|
42
|
+
disabled = false,
|
|
43
|
+
withoutTransparency = false,
|
|
44
|
+
className,
|
|
45
|
+
style,
|
|
46
|
+
...props
|
|
47
|
+
}) {
|
|
48
|
+
const colorValue = color?.trim();
|
|
49
|
+
const backgroundStyle = React.useMemo(() => {
|
|
50
|
+
if (!colorValue) {
|
|
51
|
+
return {
|
|
52
|
+
background: "linear-gradient(to bottom right, transparent calc(50% - 1px), hsl(var(--destructive)) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)) no-repeat"
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
if (!getIsCssColor(colorValue)) {
|
|
56
|
+
return { backgroundColor: "transparent" };
|
|
57
|
+
}
|
|
58
|
+
if (!withoutTransparency && getHasAlpha(colorValue)) {
|
|
59
|
+
return {
|
|
60
|
+
background: `linear-gradient(${colorValue}, ${colorValue}), repeating-conic-gradient(#ccc 0% 25%, #fff 0% 50%) 0% 50% / 10px 10px`
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
return { backgroundColor: colorValue };
|
|
64
|
+
}, [colorValue, withoutTransparency]);
|
|
65
|
+
const ariaLabel = !colorValue ? "No color selected" : `Color swatch: ${colorValue}`;
|
|
66
|
+
const Primitive = asChild ? Slot.Slot : "div";
|
|
67
|
+
return /* @__PURE__ */ jsx(
|
|
68
|
+
Primitive,
|
|
69
|
+
{
|
|
70
|
+
role: "img",
|
|
71
|
+
"aria-label": ariaLabel,
|
|
72
|
+
"aria-disabled": disabled || void 0,
|
|
73
|
+
"data-disabled": disabled ? "" : void 0,
|
|
74
|
+
"data-slot": "color-swatch",
|
|
75
|
+
...props,
|
|
76
|
+
className: cn(colorSwatchVariants({ size }), className),
|
|
77
|
+
style: {
|
|
78
|
+
...backgroundStyle,
|
|
79
|
+
forcedColorAdjust: "none",
|
|
80
|
+
...style
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export { ColorSwatch };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkH2BWO3SI_cjs = require('./chunk-H2BWO3SI.cjs');
|
|
4
|
+
var radixUi = require('radix-ui');
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
|
|
7
|
+
function ScrollBar({ className, orientation = "vertical", ...props }) {
|
|
8
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9
|
+
radixUi.ScrollArea.ScrollAreaScrollbar,
|
|
10
|
+
{
|
|
11
|
+
"data-slot": "scroll-area-scrollbar",
|
|
12
|
+
orientation,
|
|
13
|
+
className: chunkH2BWO3SI_cjs.cn(
|
|
14
|
+
"flex touch-none p-px transition-colors select-none",
|
|
15
|
+
orientation === "vertical" ? "h-full w-2.5 border-l border-l-transparent" : "",
|
|
16
|
+
orientation === "horizontal" ? "h-2.5 flex-col border-t border-t-transparent" : "",
|
|
17
|
+
className
|
|
18
|
+
),
|
|
19
|
+
...props,
|
|
20
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
21
|
+
radixUi.ScrollArea.ScrollAreaThumb,
|
|
22
|
+
{
|
|
23
|
+
"data-slot": "scroll-area-thumb",
|
|
24
|
+
className: "bg-border relative flex-1 rounded-full"
|
|
25
|
+
}
|
|
26
|
+
)
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
function ScrollArea({ className, children, ...props }) {
|
|
31
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(radixUi.ScrollArea.Root, { "data-slot": "scroll-area", className: chunkH2BWO3SI_cjs.cn("relative", className), ...props, children: [
|
|
32
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
33
|
+
radixUi.ScrollArea.Viewport,
|
|
34
|
+
{
|
|
35
|
+
"data-slot": "scroll-area-viewport",
|
|
36
|
+
className: "focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring focus-visible:outline-1",
|
|
37
|
+
children
|
|
38
|
+
}
|
|
39
|
+
),
|
|
40
|
+
/* @__PURE__ */ jsxRuntime.jsx(ScrollBar, {}),
|
|
41
|
+
/* @__PURE__ */ jsxRuntime.jsx(radixUi.ScrollArea.Corner, {})
|
|
42
|
+
] });
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
exports.ScrollArea = ScrollArea;
|
|
46
|
+
exports.ScrollBar = ScrollBar;
|
|
@@ -13,7 +13,7 @@ function DialogClose(props) {
|
|
|
13
13
|
}
|
|
14
14
|
var dialogContentVariants = cva(
|
|
15
15
|
[
|
|
16
|
-
"bg-background fixed
|
|
16
|
+
"bg-background border-border fixed left-[50%] top-[50%] z-50 grid w-full max-w-[calc(100%-1rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded border p-6 shadow-lg duration-200",
|
|
17
17
|
"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 "
|
|
18
18
|
],
|
|
19
19
|
{
|
|
@@ -15,7 +15,7 @@ function DialogClose(props) {
|
|
|
15
15
|
}
|
|
16
16
|
var dialogContentVariants = classVarianceAuthority.cva(
|
|
17
17
|
[
|
|
18
|
-
"bg-background fixed
|
|
18
|
+
"bg-background border-border fixed left-[50%] top-[50%] z-50 grid w-full max-w-[calc(100%-1rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded border p-6 shadow-lg duration-200",
|
|
19
19
|
"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 "
|
|
20
20
|
],
|
|
21
21
|
{
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { cn } from './chunk-ZD2QRAOX.js';
|
|
2
|
+
import { Slot } from 'radix-ui';
|
|
3
|
+
import { cva } from 'class-variance-authority';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
var badgeVariants = cva(
|
|
7
|
+
"border-border focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-error/20 dark:aria-invalid:ring-error/40 aria-invalid:border-error inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden whitespace-nowrap rounded border px-2 py-0.5 text-xs font-medium transition-[color,box-shadow] focus-visible:ring [&>svg]:pointer-events-none [&>svg]:size-3",
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
primary: "bg-primary text-primary-foreground [a&]:hover:bg-primary/90 border-transparent",
|
|
12
|
+
secondary: "bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90 border-transparent",
|
|
13
|
+
outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
14
|
+
success: "bg-success text-success-foreground [a&]:hover:bg-success/90 focus-visible:ring-success/20 border-transparent",
|
|
15
|
+
warning: "bg-warning text-warning-foreground [a&]:hover:bg-warning/90 focus-visible:ring-warning/20 border-transparent",
|
|
16
|
+
error: "bg-error [a&]:hover:bg-error/90 focus-visible:ring-error/20 dark:focus-visible:ring-error/40 dark:bg-error/60 text-error-foreground border-transparent"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
defaultVariants: {
|
|
20
|
+
variant: "primary"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
function Badge({ className, variant = "primary", asChild = false, ...props }) {
|
|
25
|
+
const Comp = asChild ? Slot.Slot : "span";
|
|
26
|
+
return /* @__PURE__ */ jsx(Comp, { "data-slot": "badge", className: cn(badgeVariants({ variant }), className), ...props });
|
|
27
|
+
}
|
|
28
|
+
function BadgeButton({ className, asChild = false, ...props }) {
|
|
29
|
+
const Comp = asChild ? Slot.Slot : "span";
|
|
30
|
+
return /* @__PURE__ */ jsx(
|
|
31
|
+
Comp,
|
|
32
|
+
{
|
|
33
|
+
"data-slot": "badge-button",
|
|
34
|
+
className: cn(
|
|
35
|
+
"-me-0.5 inline-flex size-3.5 cursor-pointer items-center justify-center rounded-md p-0 leading-none opacity-60 transition-all hover:opacity-100 [&>svg]:size-3.5! [&>svg]:opacity-100!",
|
|
36
|
+
className
|
|
37
|
+
),
|
|
38
|
+
role: "button",
|
|
39
|
+
...props
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
function BadgeDot({ className, ...props }) {
|
|
44
|
+
return /* @__PURE__ */ jsx(
|
|
45
|
+
"span",
|
|
46
|
+
{
|
|
47
|
+
"data-slot": "badge-dot",
|
|
48
|
+
className: cn("size-1.5 rounded-full bg-[currentColor] opacity-75", className),
|
|
49
|
+
...props
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export { Badge, BadgeButton, BadgeDot };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { cn } from './chunk-ZD2QRAOX.js';
|
|
2
|
+
import { ScrollArea as ScrollArea$1 } from 'radix-ui';
|
|
3
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
function ScrollBar({ className, orientation = "vertical", ...props }) {
|
|
6
|
+
return /* @__PURE__ */ jsx(
|
|
7
|
+
ScrollArea$1.ScrollAreaScrollbar,
|
|
8
|
+
{
|
|
9
|
+
"data-slot": "scroll-area-scrollbar",
|
|
10
|
+
orientation,
|
|
11
|
+
className: cn(
|
|
12
|
+
"flex touch-none p-px transition-colors select-none",
|
|
13
|
+
orientation === "vertical" ? "h-full w-2.5 border-l border-l-transparent" : "",
|
|
14
|
+
orientation === "horizontal" ? "h-2.5 flex-col border-t border-t-transparent" : "",
|
|
15
|
+
className
|
|
16
|
+
),
|
|
17
|
+
...props,
|
|
18
|
+
children: /* @__PURE__ */ jsx(
|
|
19
|
+
ScrollArea$1.ScrollAreaThumb,
|
|
20
|
+
{
|
|
21
|
+
"data-slot": "scroll-area-thumb",
|
|
22
|
+
className: "bg-border relative flex-1 rounded-full"
|
|
23
|
+
}
|
|
24
|
+
)
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
function ScrollArea({ className, children, ...props }) {
|
|
29
|
+
return /* @__PURE__ */ jsxs(ScrollArea$1.Root, { "data-slot": "scroll-area", className: cn("relative", className), ...props, children: [
|
|
30
|
+
/* @__PURE__ */ jsx(
|
|
31
|
+
ScrollArea$1.Viewport,
|
|
32
|
+
{
|
|
33
|
+
"data-slot": "scroll-area-viewport",
|
|
34
|
+
className: "focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring focus-visible:outline-1",
|
|
35
|
+
children
|
|
36
|
+
}
|
|
37
|
+
),
|
|
38
|
+
/* @__PURE__ */ jsx(ScrollBar, {}),
|
|
39
|
+
/* @__PURE__ */ jsx(ScrollArea$1.Corner, {})
|
|
40
|
+
] });
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export { ScrollArea, ScrollBar };
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkH2BWO3SI_cjs = require('./chunk-H2BWO3SI.cjs');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var radixUi = require('radix-ui');
|
|
6
|
+
var classVarianceAuthority = require('class-variance-authority');
|
|
7
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
8
|
+
|
|
9
|
+
function _interopNamespace(e) {
|
|
10
|
+
if (e && e.__esModule) return e;
|
|
11
|
+
var n = Object.create(null);
|
|
12
|
+
if (e) {
|
|
13
|
+
Object.keys(e).forEach(function (k) {
|
|
14
|
+
if (k !== 'default') {
|
|
15
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
16
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () { return e[k]; }
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
n.default = e;
|
|
24
|
+
return Object.freeze(n);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
28
|
+
|
|
29
|
+
var colorSwatchVariants = classVarianceAuthority.cva(
|
|
30
|
+
"border-border box-border rounded border shadow-sm [background-clip:padding-box] data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
31
|
+
{
|
|
32
|
+
variants: {
|
|
33
|
+
size: {
|
|
34
|
+
default: "size-8",
|
|
35
|
+
sm: "size-6",
|
|
36
|
+
lg: "size-12"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
defaultVariants: {
|
|
40
|
+
size: "default"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
// src/components/color-swatch/color-swatch.utils.ts
|
|
46
|
+
function getIsCssColor(v) {
|
|
47
|
+
try {
|
|
48
|
+
return typeof CSS !== "undefined" && typeof CSS.supports === "function" ? CSS.supports("color", v) : true;
|
|
49
|
+
} catch {
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
function getHasAlpha(v) {
|
|
54
|
+
const s = v.trim().toLowerCase();
|
|
55
|
+
if (s === "transparent") return true;
|
|
56
|
+
if (/^#(?:[0-9a-f]{4}|[0-9a-f]{8})$/i.test(s)) return true;
|
|
57
|
+
if (/\b(?:rgba|hsla)\s*\(/i.test(s)) return true;
|
|
58
|
+
return /\b(?:rgb|hsl|lab|lch|oklab|oklch|color)\s*\([^)]*\/\s*[\d.]+%?\s*\)/i.test(s);
|
|
59
|
+
}
|
|
60
|
+
function ColorSwatch({
|
|
61
|
+
color,
|
|
62
|
+
size = "default",
|
|
63
|
+
asChild = false,
|
|
64
|
+
disabled = false,
|
|
65
|
+
withoutTransparency = false,
|
|
66
|
+
className,
|
|
67
|
+
style,
|
|
68
|
+
...props
|
|
69
|
+
}) {
|
|
70
|
+
const colorValue = color?.trim();
|
|
71
|
+
const backgroundStyle = React__namespace.useMemo(() => {
|
|
72
|
+
if (!colorValue) {
|
|
73
|
+
return {
|
|
74
|
+
background: "linear-gradient(to bottom right, transparent calc(50% - 1px), hsl(var(--destructive)) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)) no-repeat"
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
if (!getIsCssColor(colorValue)) {
|
|
78
|
+
return { backgroundColor: "transparent" };
|
|
79
|
+
}
|
|
80
|
+
if (!withoutTransparency && getHasAlpha(colorValue)) {
|
|
81
|
+
return {
|
|
82
|
+
background: `linear-gradient(${colorValue}, ${colorValue}), repeating-conic-gradient(#ccc 0% 25%, #fff 0% 50%) 0% 50% / 10px 10px`
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
return { backgroundColor: colorValue };
|
|
86
|
+
}, [colorValue, withoutTransparency]);
|
|
87
|
+
const ariaLabel = !colorValue ? "No color selected" : `Color swatch: ${colorValue}`;
|
|
88
|
+
const Primitive = asChild ? radixUi.Slot.Slot : "div";
|
|
89
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
90
|
+
Primitive,
|
|
91
|
+
{
|
|
92
|
+
role: "img",
|
|
93
|
+
"aria-label": ariaLabel,
|
|
94
|
+
"aria-disabled": disabled || void 0,
|
|
95
|
+
"data-disabled": disabled ? "" : void 0,
|
|
96
|
+
"data-slot": "color-swatch",
|
|
97
|
+
...props,
|
|
98
|
+
className: chunkH2BWO3SI_cjs.cn(colorSwatchVariants({ size }), className),
|
|
99
|
+
style: {
|
|
100
|
+
...backgroundStyle,
|
|
101
|
+
forcedColorAdjust: "none",
|
|
102
|
+
...style
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
exports.ColorSwatch = ColorSwatch;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkH2BWO3SI_cjs = require('./chunk-H2BWO3SI.cjs');
|
|
4
|
+
var radixUi = require('radix-ui');
|
|
5
|
+
var classVarianceAuthority = require('class-variance-authority');
|
|
6
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
|
|
8
|
+
var badgeVariants = classVarianceAuthority.cva(
|
|
9
|
+
"border-border focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-error/20 dark:aria-invalid:ring-error/40 aria-invalid:border-error inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden whitespace-nowrap rounded border px-2 py-0.5 text-xs font-medium transition-[color,box-shadow] focus-visible:ring [&>svg]:pointer-events-none [&>svg]:size-3",
|
|
10
|
+
{
|
|
11
|
+
variants: {
|
|
12
|
+
variant: {
|
|
13
|
+
primary: "bg-primary text-primary-foreground [a&]:hover:bg-primary/90 border-transparent",
|
|
14
|
+
secondary: "bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90 border-transparent",
|
|
15
|
+
outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
16
|
+
success: "bg-success text-success-foreground [a&]:hover:bg-success/90 focus-visible:ring-success/20 border-transparent",
|
|
17
|
+
warning: "bg-warning text-warning-foreground [a&]:hover:bg-warning/90 focus-visible:ring-warning/20 border-transparent",
|
|
18
|
+
error: "bg-error [a&]:hover:bg-error/90 focus-visible:ring-error/20 dark:focus-visible:ring-error/40 dark:bg-error/60 text-error-foreground border-transparent"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
defaultVariants: {
|
|
22
|
+
variant: "primary"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
function Badge({ className, variant = "primary", asChild = false, ...props }) {
|
|
27
|
+
const Comp = asChild ? radixUi.Slot.Slot : "span";
|
|
28
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Comp, { "data-slot": "badge", className: chunkH2BWO3SI_cjs.cn(badgeVariants({ variant }), className), ...props });
|
|
29
|
+
}
|
|
30
|
+
function BadgeButton({ className, asChild = false, ...props }) {
|
|
31
|
+
const Comp = asChild ? radixUi.Slot.Slot : "span";
|
|
32
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
33
|
+
Comp,
|
|
34
|
+
{
|
|
35
|
+
"data-slot": "badge-button",
|
|
36
|
+
className: chunkH2BWO3SI_cjs.cn(
|
|
37
|
+
"-me-0.5 inline-flex size-3.5 cursor-pointer items-center justify-center rounded-md p-0 leading-none opacity-60 transition-all hover:opacity-100 [&>svg]:size-3.5! [&>svg]:opacity-100!",
|
|
38
|
+
className
|
|
39
|
+
),
|
|
40
|
+
role: "button",
|
|
41
|
+
...props
|
|
42
|
+
}
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
function BadgeDot({ className, ...props }) {
|
|
46
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
47
|
+
"span",
|
|
48
|
+
{
|
|
49
|
+
"data-slot": "badge-dot",
|
|
50
|
+
className: chunkH2BWO3SI_cjs.cn("size-1.5 rounded-full bg-[currentColor] opacity-75", className),
|
|
51
|
+
...props
|
|
52
|
+
}
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
exports.Badge = Badge;
|
|
57
|
+
exports.BadgeButton = BadgeButton;
|
|
58
|
+
exports.BadgeDot = BadgeDot;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkZ6CZAPVG_cjs = require('../../chunk-Z6CZAPVG.cjs');
|
|
4
4
|
require('../../chunk-H2BWO3SI.cjs');
|
|
5
5
|
require('../../chunk-3376ZTRC.cjs');
|
|
6
6
|
|
|
@@ -8,5 +8,13 @@ require('../../chunk-3376ZTRC.cjs');
|
|
|
8
8
|
|
|
9
9
|
Object.defineProperty(exports, "Badge", {
|
|
10
10
|
enumerable: true,
|
|
11
|
-
get: function () { return
|
|
11
|
+
get: function () { return chunkZ6CZAPVG_cjs.Badge; }
|
|
12
|
+
});
|
|
13
|
+
Object.defineProperty(exports, "BadgeButton", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () { return chunkZ6CZAPVG_cjs.BadgeButton; }
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "BadgeDot", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return chunkZ6CZAPVG_cjs.BadgeDot; }
|
|
12
20
|
});
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
+
import React__default from 'react';
|
|
3
4
|
import { VariantProps } from 'class-variance-authority';
|
|
4
5
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
5
6
|
|
|
6
7
|
declare const badgeVariants: (props?: ({
|
|
7
|
-
variant?: "
|
|
8
|
+
variant?: "primary" | "secondary" | "outline" | "success" | "warning" | "error" | null | undefined;
|
|
8
9
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9
10
|
|
|
10
11
|
type BadgeVariantsProps = VariantProps<typeof badgeVariants>;
|
|
@@ -16,4 +17,12 @@ type BadgeProps = React.ComponentProps<"span"> & {
|
|
|
16
17
|
};
|
|
17
18
|
declare function Badge({ className, variant, asChild, ...props }: BadgeProps): react_jsx_runtime.JSX.Element;
|
|
18
19
|
|
|
19
|
-
|
|
20
|
+
type BadgeButtonProps = React__default.ComponentProps<"button"> & {
|
|
21
|
+
asChild?: boolean;
|
|
22
|
+
};
|
|
23
|
+
declare function BadgeButton({ className, asChild, ...props }: BadgeButtonProps): react_jsx_runtime.JSX.Element;
|
|
24
|
+
|
|
25
|
+
type BadgeDotProps = React.ComponentProps<"span">;
|
|
26
|
+
declare function BadgeDot({ className, ...props }: React.ComponentProps<"span">): react_jsx_runtime.JSX.Element;
|
|
27
|
+
|
|
28
|
+
export { Badge, BadgeButton, type BadgeButtonProps, BadgeDot, type BadgeDotProps, type BadgeProps, type BadgeVariant };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
+
import React__default from 'react';
|
|
3
4
|
import { VariantProps } from 'class-variance-authority';
|
|
4
5
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
5
6
|
|
|
6
7
|
declare const badgeVariants: (props?: ({
|
|
7
|
-
variant?: "
|
|
8
|
+
variant?: "primary" | "secondary" | "outline" | "success" | "warning" | "error" | null | undefined;
|
|
8
9
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9
10
|
|
|
10
11
|
type BadgeVariantsProps = VariantProps<typeof badgeVariants>;
|
|
@@ -16,4 +17,12 @@ type BadgeProps = React.ComponentProps<"span"> & {
|
|
|
16
17
|
};
|
|
17
18
|
declare function Badge({ className, variant, asChild, ...props }: BadgeProps): react_jsx_runtime.JSX.Element;
|
|
18
19
|
|
|
19
|
-
|
|
20
|
+
type BadgeButtonProps = React__default.ComponentProps<"button"> & {
|
|
21
|
+
asChild?: boolean;
|
|
22
|
+
};
|
|
23
|
+
declare function BadgeButton({ className, asChild, ...props }: BadgeButtonProps): react_jsx_runtime.JSX.Element;
|
|
24
|
+
|
|
25
|
+
type BadgeDotProps = React.ComponentProps<"span">;
|
|
26
|
+
declare function BadgeDot({ className, ...props }: React.ComponentProps<"span">): react_jsx_runtime.JSX.Element;
|
|
27
|
+
|
|
28
|
+
export { Badge, BadgeButton, type BadgeButtonProps, BadgeDot, type BadgeDotProps, type BadgeProps, type BadgeVariant };
|
|
@@ -1,27 +1,29 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkZTD7ED52_cjs = require('../../chunk-ZTD7ED52.cjs');
|
|
4
4
|
require('../../chunk-NU5UQPBX.cjs');
|
|
5
5
|
require('../../chunk-GR37JJQK.cjs');
|
|
6
|
+
require('../../chunk-5AA4IE2T.cjs');
|
|
6
7
|
require('../../chunk-TH44JYXB.cjs');
|
|
7
8
|
require('../../chunk-XENOUBSI.cjs');
|
|
9
|
+
require('../../chunk-4YXM4NWG.cjs');
|
|
8
10
|
require('../../chunk-3ZRMIVJM.cjs');
|
|
9
11
|
require('../../chunk-GHV2TURY.cjs');
|
|
10
12
|
require('../../chunk-3WSQRFUY.cjs');
|
|
11
13
|
require('../../chunk-2Y2ZCPNV.cjs');
|
|
12
14
|
require('../../chunk-HCHVDUI6.cjs');
|
|
13
|
-
require('../../chunk-
|
|
14
|
-
require('../../chunk-
|
|
15
|
+
require('../../chunk-X55H6LRX.cjs');
|
|
16
|
+
require('../../chunk-BAWVLSRF.cjs');
|
|
15
17
|
require('../../chunk-YTVV2IUF.cjs');
|
|
16
18
|
require('../../chunk-S3ANEJJ7.cjs');
|
|
17
|
-
require('../../chunk-
|
|
19
|
+
require('../../chunk-YWG7TML6.cjs');
|
|
18
20
|
require('../../chunk-3DUJHGXE.cjs');
|
|
19
21
|
require('../../chunk-UIOBJSKZ.cjs');
|
|
20
22
|
require('../../chunk-EW6TE3N5.cjs');
|
|
21
23
|
require('../../chunk-7EYMOUWG.cjs');
|
|
22
24
|
require('../../chunk-TMXVL5CV.cjs');
|
|
23
25
|
require('../../chunk-I7AV5IQO.cjs');
|
|
24
|
-
require('../../chunk-
|
|
26
|
+
require('../../chunk-Z6CZAPVG.cjs');
|
|
25
27
|
require('../../chunk-H2BWO3SI.cjs');
|
|
26
28
|
require('../../chunk-3376ZTRC.cjs');
|
|
27
29
|
|
|
@@ -29,5 +31,5 @@ require('../../chunk-3376ZTRC.cjs');
|
|
|
29
31
|
|
|
30
32
|
Object.defineProperty(exports, "Button", {
|
|
31
33
|
enumerable: true,
|
|
32
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunkZTD7ED52_cjs.Button; }
|
|
33
35
|
});
|
|
@@ -45,7 +45,7 @@ type ButtonProps = React.ComponentProps<"button"> & {
|
|
|
45
45
|
declare function Button({ asChild, variant, disabled, fullWidth, loadingPosition: loadingPositionProp, children, type, loading, size, endIcon, startIcon, className, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
46
46
|
|
|
47
47
|
declare const buttonVariants: (props?: ({
|
|
48
|
-
variant?: "link" | "
|
|
48
|
+
variant?: "link" | "secondary" | "outline" | "error" | "default" | "ghost" | null | undefined;
|
|
49
49
|
size?: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
|
|
50
50
|
fullWidth?: boolean | null | undefined;
|
|
51
51
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
@@ -45,7 +45,7 @@ type ButtonProps = React.ComponentProps<"button"> & {
|
|
|
45
45
|
declare function Button({ asChild, variant, disabled, fullWidth, loadingPosition: loadingPositionProp, children, type, loading, size, endIcon, startIcon, className, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
46
46
|
|
|
47
47
|
declare const buttonVariants: (props?: ({
|
|
48
|
-
variant?: "link" | "
|
|
48
|
+
variant?: "link" | "secondary" | "outline" | "error" | "default" | "ghost" | null | undefined;
|
|
49
49
|
size?: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
|
|
50
50
|
fullWidth?: boolean | null | undefined;
|
|
51
51
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
@@ -1,24 +1,26 @@
|
|
|
1
|
-
export { Button } from '../../chunk-
|
|
1
|
+
export { Button } from '../../chunk-E2Y5T6U6.js';
|
|
2
2
|
import '../../chunk-OQCNPNPS.js';
|
|
3
3
|
import '../../chunk-HJJPEVIH.js';
|
|
4
|
+
import '../../chunk-UGSNASZM.js';
|
|
4
5
|
import '../../chunk-PBEZZMAB.js';
|
|
5
6
|
import '../../chunk-4TRADSTP.js';
|
|
7
|
+
import '../../chunk-KXMI4545.js';
|
|
6
8
|
import '../../chunk-O7QFYWMK.js';
|
|
7
9
|
import '../../chunk-DTSFPOLX.js';
|
|
8
10
|
import '../../chunk-P5IUC7HJ.js';
|
|
9
11
|
import '../../chunk-6BSR3O2J.js';
|
|
10
12
|
import '../../chunk-5F2Y65JH.js';
|
|
11
|
-
import '../../chunk-
|
|
12
|
-
import '../../chunk-
|
|
13
|
+
import '../../chunk-3BLXG7ET.js';
|
|
14
|
+
import '../../chunk-ACJ3ES2B.js';
|
|
13
15
|
import '../../chunk-KYFNEU4K.js';
|
|
14
16
|
import '../../chunk-I3RSTJP6.js';
|
|
15
|
-
import '../../chunk-
|
|
17
|
+
import '../../chunk-UW6GOD7J.js';
|
|
16
18
|
import '../../chunk-XV3AQ6NS.js';
|
|
17
19
|
import '../../chunk-XJIUGEPN.js';
|
|
18
20
|
import '../../chunk-H5O5L6XT.js';
|
|
19
21
|
import '../../chunk-DFD2WUOU.js';
|
|
20
22
|
import '../../chunk-5MJPZUTO.js';
|
|
21
23
|
import '../../chunk-NGVFYKAT.js';
|
|
22
|
-
import '../../chunk-
|
|
24
|
+
import '../../chunk-FKCWRNWB.js';
|
|
23
25
|
import '../../chunk-ZD2QRAOX.js';
|
|
24
26
|
import '../../chunk-BYXBJQAS.js';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkX55H6LRX_cjs = require('../../chunk-X55H6LRX.cjs');
|
|
4
|
+
require('../../chunk-H2BWO3SI.cjs');
|
|
5
|
+
require('../../chunk-3376ZTRC.cjs');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "ColorSwatch", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () { return chunkX55H6LRX_cjs.ColorSwatch; }
|
|
12
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
5
|
+
|
|
6
|
+
declare const colorSwatchVariants: (props?: ({
|
|
7
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
8
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9
|
+
|
|
10
|
+
type ColorSwatchVariantsProps = VariantProps<typeof colorSwatchVariants>;
|
|
11
|
+
type ColorSwatchSize = NonNullable<ColorSwatchVariantsProps["size"]>;
|
|
12
|
+
|
|
13
|
+
type ColorSwatchProps = React.ComponentProps<"div"> & {
|
|
14
|
+
size?: ColorSwatchSize;
|
|
15
|
+
color?: string;
|
|
16
|
+
asChild?: boolean;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
withoutTransparency?: boolean;
|
|
19
|
+
};
|
|
20
|
+
declare function ColorSwatch({ color, size, asChild, disabled, withoutTransparency, className, style, ...props }: ColorSwatchProps): react_jsx_runtime.JSX.Element;
|
|
21
|
+
|
|
22
|
+
export { ColorSwatch, type ColorSwatchProps, type ColorSwatchSize };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
5
|
+
|
|
6
|
+
declare const colorSwatchVariants: (props?: ({
|
|
7
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
8
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9
|
+
|
|
10
|
+
type ColorSwatchVariantsProps = VariantProps<typeof colorSwatchVariants>;
|
|
11
|
+
type ColorSwatchSize = NonNullable<ColorSwatchVariantsProps["size"]>;
|
|
12
|
+
|
|
13
|
+
type ColorSwatchProps = React.ComponentProps<"div"> & {
|
|
14
|
+
size?: ColorSwatchSize;
|
|
15
|
+
color?: string;
|
|
16
|
+
asChild?: boolean;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
withoutTransparency?: boolean;
|
|
19
|
+
};
|
|
20
|
+
declare function ColorSwatch({ color, size, asChild, disabled, withoutTransparency, className, style, ...props }: ColorSwatchProps): react_jsx_runtime.JSX.Element;
|
|
21
|
+
|
|
22
|
+
export { ColorSwatch, type ColorSwatchProps, type ColorSwatchSize };
|