@szum-tech/design-system 3.12.3 → 3.14.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-4IGU5SVP.js +54 -0
- package/dist/{chunk-XJZOANXX.cjs → chunk-6HX7ETL3.cjs} +1 -1
- package/dist/chunk-7OD2NBSV.cjs +50 -0
- package/dist/chunk-B4M7Q5KX.cjs +25 -0
- package/dist/{chunk-S2BCU6WG.cjs → chunk-CAIAZGSW.cjs} +5 -4
- package/dist/chunk-EOTQVIA5.js +993 -0
- package/dist/chunk-EZCWHR56.cjs +2355 -0
- package/dist/chunk-G24PWQKG.js +20 -0
- package/dist/chunk-GEDBA3JU.cjs +49 -0
- package/dist/chunk-IZU3KULT.js +41 -0
- package/dist/{chunk-KQ6QE7BT.cjs → chunk-MNDQXDV4.cjs} +4 -4
- package/dist/chunk-N4TYSZSU.cjs +44 -0
- package/dist/chunk-OZSNSRLV.cjs +1027 -0
- package/dist/{chunk-DL54DIMD.js → chunk-Q2MJKFIE.js} +2 -1
- package/dist/chunk-S3ZUFD6U.js +23 -0
- package/dist/{chunk-WXZE35FK.js → chunk-VK2FJ65F.js} +1 -1
- package/dist/chunk-VL3TPVSB.js +2299 -0
- package/dist/chunk-X5O7GP4S.js +48 -0
- package/dist/{chunk-E5TYGWGE.js → chunk-XKCLVPUC.js} +1 -1
- package/dist/{chunk-XIQUR62A.cjs → chunk-XY3ZNUWR.cjs} +32 -20
- package/dist/color-picker.types-GI7dq2Ig.d.cts +42 -0
- package/dist/color-picker.types-GI7dq2Ig.d.ts +42 -0
- package/dist/components/badge-overflow/index.cjs +3 -2
- package/dist/components/badge-overflow/index.js +2 -1
- package/dist/components/button/index.cjs +16 -12
- package/dist/components/button/index.d.cts +1 -0
- package/dist/components/button/index.d.ts +1 -0
- package/dist/components/button/index.js +15 -11
- package/dist/components/carousel/index.cjs +17 -13
- package/dist/components/carousel/index.d.cts +1 -0
- package/dist/components/carousel/index.d.ts +1 -0
- package/dist/components/carousel/index.js +15 -11
- package/dist/components/color-picker/index.cjs +88 -0
- package/dist/components/color-picker/index.d.cts +71 -0
- package/dist/components/color-picker/index.d.ts +71 -0
- package/dist/components/color-picker/index.js +39 -0
- package/dist/components/dialog/index.d.cts +1 -0
- package/dist/components/dialog/index.d.ts +1 -0
- package/dist/components/file-upload/index.cjs +60 -0
- package/dist/components/file-upload/index.d.cts +131 -0
- package/dist/components/file-upload/index.d.ts +131 -0
- package/dist/components/file-upload/index.js +3 -0
- package/dist/components/index.cjs +216 -84
- package/dist/components/index.d.cts +8 -1
- package/dist/components/index.d.ts +8 -1
- package/dist/components/index.js +15 -11
- package/dist/components/input/index.cjs +2 -2
- package/dist/components/input/index.js +1 -1
- package/dist/components/item/index.d.cts +1 -0
- package/dist/components/item/index.d.ts +1 -0
- package/dist/components/masonry/index.cjs +5 -4
- package/dist/components/masonry/index.js +3 -2
- package/dist/components/popover/index.cjs +35 -0
- package/dist/components/popover/index.d.cts +18 -0
- package/dist/components/popover/index.d.ts +18 -0
- package/dist/components/popover/index.js +2 -0
- package/dist/components/select/index.cjs +7 -7
- package/dist/components/select/index.d.cts +8 -14
- package/dist/components/select/index.d.ts +8 -14
- package/dist/components/select/index.js +1 -1
- package/dist/components/sheet/index.d.cts +2 -1
- package/dist/components/sheet/index.d.ts +2 -1
- package/dist/components/stepper/index.cjs +34 -30
- package/dist/components/stepper/index.d.cts +1 -0
- package/dist/components/stepper/index.d.ts +1 -0
- package/dist/components/stepper/index.js +15 -11
- package/dist/components/switch/index.cjs +11 -0
- package/dist/components/switch/index.d.cts +19 -0
- package/dist/components/switch/index.d.ts +19 -0
- package/dist/components/switch/index.js +2 -0
- package/dist/components/timeline/index.cjs +12 -11
- package/dist/components/timeline/index.d.cts +1 -0
- package/dist/components/timeline/index.d.ts +1 -0
- package/dist/components/timeline/index.js +3 -2
- package/dist/components/toaster/index.cjs +17 -13
- package/dist/components/toaster/index.js +15 -11
- package/dist/components/typing-text/index.d.cts +1 -0
- package/dist/components/typing-text/index.d.ts +1 -0
- package/dist/components/word-rotate/index.d.cts +1 -0
- package/dist/components/word-rotate/index.d.ts +1 -0
- package/dist/hooks/index.cjs +17 -8
- package/dist/hooks/index.d.cts +15 -4
- package/dist/hooks/index.d.ts +15 -4
- package/dist/hooks/index.js +2 -1
- package/dist/popover-trigger-Cf4PPj0z.d.cts +14 -0
- package/dist/popover-trigger-Cf4PPj0z.d.ts +14 -0
- package/dist/select-Bf6XQtt-.d.cts +12 -0
- package/dist/select-Bf6XQtt-.d.ts +12 -0
- package/package.json +1 -1
- package/dist/chunk-5AA4IE2T.cjs +0 -27
- package/dist/chunk-CP43WJCN.cjs +0 -1065
- package/dist/chunk-QTYNFISP.js +0 -1020
- package/dist/chunk-SB5UG7OC.js +0 -41
- package/dist/chunk-UGSNASZM.js +0 -25
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React2 from 'react';
|
|
2
|
+
|
|
3
|
+
// src/hooks/use-lazy-ref.tsx
|
|
4
|
+
function useLazyRef(fn) {
|
|
5
|
+
const ref = React2.useRef(null);
|
|
6
|
+
if (ref.current === null) {
|
|
7
|
+
ref.current = fn();
|
|
8
|
+
}
|
|
9
|
+
return ref;
|
|
10
|
+
}
|
|
11
|
+
var useIsomorphicLayoutEffect = typeof window === "undefined" ? React2.useEffect : React2.useLayoutEffect;
|
|
12
|
+
function useAsRef(props) {
|
|
13
|
+
const ref = React2.useRef(props);
|
|
14
|
+
useIsomorphicLayoutEffect(() => {
|
|
15
|
+
ref.current = props;
|
|
16
|
+
});
|
|
17
|
+
return ref;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export { useAsRef, useIsomorphicLayoutEffect, useLazyRef };
|
|
@@ -0,0 +1,49 @@
|
|
|
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 Popover(props) {
|
|
8
|
+
return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Popover.Root, { "data-slot": "popover", ...props });
|
|
9
|
+
}
|
|
10
|
+
function PopoverAnchor(props) {
|
|
11
|
+
return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Popover.Anchor, { "data-slot": "popover-anchor", ...props });
|
|
12
|
+
}
|
|
13
|
+
function PopoverContent({ className, align = "center", sideOffset = 4, ...props }) {
|
|
14
|
+
return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Popover.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
15
|
+
radixUi.Popover.Content,
|
|
16
|
+
{
|
|
17
|
+
"data-slot": "popover-content",
|
|
18
|
+
align,
|
|
19
|
+
sideOffset,
|
|
20
|
+
className: chunkH2BWO3SI_cjs.cn(
|
|
21
|
+
"bg-popover text-popover-foreground ring-foreground/10 z-50 flex w-72 origin-(--radix-popover-content-transform-origin) flex-col gap-2.5 rounded p-2.5 text-sm shadow-md ring-1 outline-hidden duration-100",
|
|
22
|
+
"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",
|
|
23
|
+
"data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
24
|
+
className
|
|
25
|
+
),
|
|
26
|
+
...props
|
|
27
|
+
}
|
|
28
|
+
) });
|
|
29
|
+
}
|
|
30
|
+
function PopoverTrigger(props) {
|
|
31
|
+
return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Popover.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
32
|
+
}
|
|
33
|
+
function PopoverHeader({ className, ...props }) {
|
|
34
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "popover-header", className: chunkH2BWO3SI_cjs.cn("flex flex-col gap-0.5 text-sm", className), ...props });
|
|
35
|
+
}
|
|
36
|
+
function PopoverTitle({ className, ...props }) {
|
|
37
|
+
return /* @__PURE__ */ jsxRuntime.jsx("h2", { "data-slot": "popover-title", className: chunkH2BWO3SI_cjs.cn("font-medium", className), ...props });
|
|
38
|
+
}
|
|
39
|
+
function PopoverDescription({ className, ...props }) {
|
|
40
|
+
return /* @__PURE__ */ jsxRuntime.jsx("p", { "data-slot": "popover-description", className: chunkH2BWO3SI_cjs.cn("text-muted-foreground", className), ...props });
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
exports.Popover = Popover;
|
|
44
|
+
exports.PopoverAnchor = PopoverAnchor;
|
|
45
|
+
exports.PopoverContent = PopoverContent;
|
|
46
|
+
exports.PopoverDescription = PopoverDescription;
|
|
47
|
+
exports.PopoverHeader = PopoverHeader;
|
|
48
|
+
exports.PopoverTitle = PopoverTitle;
|
|
49
|
+
exports.PopoverTrigger = PopoverTrigger;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { cn } from './chunk-ZD2QRAOX.js';
|
|
2
|
+
import { Popover as Popover$1 } from 'radix-ui';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
function Popover(props) {
|
|
6
|
+
return /* @__PURE__ */ jsx(Popover$1.Root, { "data-slot": "popover", ...props });
|
|
7
|
+
}
|
|
8
|
+
function PopoverAnchor(props) {
|
|
9
|
+
return /* @__PURE__ */ jsx(Popover$1.Anchor, { "data-slot": "popover-anchor", ...props });
|
|
10
|
+
}
|
|
11
|
+
function PopoverContent({ className, align = "center", sideOffset = 4, ...props }) {
|
|
12
|
+
return /* @__PURE__ */ jsx(Popover$1.Portal, { children: /* @__PURE__ */ jsx(
|
|
13
|
+
Popover$1.Content,
|
|
14
|
+
{
|
|
15
|
+
"data-slot": "popover-content",
|
|
16
|
+
align,
|
|
17
|
+
sideOffset,
|
|
18
|
+
className: cn(
|
|
19
|
+
"bg-popover text-popover-foreground ring-foreground/10 z-50 flex w-72 origin-(--radix-popover-content-transform-origin) flex-col gap-2.5 rounded p-2.5 text-sm shadow-md ring-1 outline-hidden duration-100",
|
|
20
|
+
"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",
|
|
21
|
+
"data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
22
|
+
className
|
|
23
|
+
),
|
|
24
|
+
...props
|
|
25
|
+
}
|
|
26
|
+
) });
|
|
27
|
+
}
|
|
28
|
+
function PopoverTrigger(props) {
|
|
29
|
+
return /* @__PURE__ */ jsx(Popover$1.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
30
|
+
}
|
|
31
|
+
function PopoverHeader({ className, ...props }) {
|
|
32
|
+
return /* @__PURE__ */ jsx("div", { "data-slot": "popover-header", className: cn("flex flex-col gap-0.5 text-sm", className), ...props });
|
|
33
|
+
}
|
|
34
|
+
function PopoverTitle({ className, ...props }) {
|
|
35
|
+
return /* @__PURE__ */ jsx("h2", { "data-slot": "popover-title", className: cn("font-medium", className), ...props });
|
|
36
|
+
}
|
|
37
|
+
function PopoverDescription({ className, ...props }) {
|
|
38
|
+
return /* @__PURE__ */ jsx("p", { "data-slot": "popover-description", className: cn("text-muted-foreground", className), ...props });
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export { Popover, PopoverAnchor, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkN4TYSZSU_cjs = require('./chunk-N4TYSZSU.cjs');
|
|
4
4
|
var chunkH2BWO3SI_cjs = require('./chunk-H2BWO3SI.cjs');
|
|
5
5
|
var React2 = require('react');
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -340,8 +340,8 @@ function Timeline({
|
|
|
340
340
|
...props
|
|
341
341
|
}) {
|
|
342
342
|
const dir = useDirection(dirProp);
|
|
343
|
-
const listenersRef =
|
|
344
|
-
const stateRef =
|
|
343
|
+
const listenersRef = chunkN4TYSZSU_cjs.useLazyRef(() => /* @__PURE__ */ new Set());
|
|
344
|
+
const stateRef = chunkN4TYSZSU_cjs.useLazyRef(() => ({
|
|
345
345
|
items: /* @__PURE__ */ new Map()
|
|
346
346
|
}));
|
|
347
347
|
const store = React2__namespace.useMemo(() => {
|
|
@@ -461,7 +461,7 @@ function TimelineItem({ asChild = false, className, id, ref, ...props }) {
|
|
|
461
461
|
},
|
|
462
462
|
[activeIndex, itemIndex]
|
|
463
463
|
);
|
|
464
|
-
|
|
464
|
+
chunkN4TYSZSU_cjs.useIsomorphicLayoutEffect(() => {
|
|
465
465
|
store.onItemRegister(itemId, itemRef);
|
|
466
466
|
return () => {
|
|
467
467
|
store.onItemUnregister(itemId);
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React2 = require('react');
|
|
4
|
+
|
|
5
|
+
function _interopNamespace(e) {
|
|
6
|
+
if (e && e.__esModule) return e;
|
|
7
|
+
var n = Object.create(null);
|
|
8
|
+
if (e) {
|
|
9
|
+
Object.keys(e).forEach(function (k) {
|
|
10
|
+
if (k !== 'default') {
|
|
11
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
12
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () { return e[k]; }
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
n.default = e;
|
|
20
|
+
return Object.freeze(n);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
var React2__namespace = /*#__PURE__*/_interopNamespace(React2);
|
|
24
|
+
|
|
25
|
+
// src/hooks/use-lazy-ref.tsx
|
|
26
|
+
function useLazyRef(fn) {
|
|
27
|
+
const ref = React2__namespace.useRef(null);
|
|
28
|
+
if (ref.current === null) {
|
|
29
|
+
ref.current = fn();
|
|
30
|
+
}
|
|
31
|
+
return ref;
|
|
32
|
+
}
|
|
33
|
+
var useIsomorphicLayoutEffect = typeof window === "undefined" ? React2__namespace.useEffect : React2__namespace.useLayoutEffect;
|
|
34
|
+
function useAsRef(props) {
|
|
35
|
+
const ref = React2__namespace.useRef(props);
|
|
36
|
+
useIsomorphicLayoutEffect(() => {
|
|
37
|
+
ref.current = props;
|
|
38
|
+
});
|
|
39
|
+
return ref;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
exports.useAsRef = useAsRef;
|
|
43
|
+
exports.useIsomorphicLayoutEffect = useIsomorphicLayoutEffect;
|
|
44
|
+
exports.useLazyRef = useLazyRef;
|