@szum-tech/design-system 3.8.1 → 3.10.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.
Files changed (110) hide show
  1. package/dist/chunk-2WQJ36RD.cjs +78 -0
  2. package/dist/{chunk-O3DHBQA5.cjs → chunk-3GNVQFCK.cjs} +1 -1
  3. package/dist/{chunk-SYKUS2RV.js → chunk-3MH6P44N.js} +2 -2
  4. package/dist/{chunk-3BLXG7ET.js → chunk-3RK5PCIC.js} +1 -1
  5. package/dist/{chunk-2Q2BIWBE.js → chunk-5MV54MWS.js} +1 -1
  6. package/dist/{chunk-YWG7TML6.cjs → chunk-6X26XC6P.cjs} +1 -1
  7. package/dist/chunk-A7SBXO2Y.cjs +40 -0
  8. package/dist/{chunk-ACJ3ES2B.js → chunk-BTSHACKG.js} +1 -1
  9. package/dist/{chunk-3DUJHGXE.cjs → chunk-CFJ44JVK.cjs} +1 -1
  10. package/dist/chunk-D4QID7AI.cjs +607 -0
  11. package/dist/chunk-DGWBE2Y3.cjs +205 -0
  12. package/dist/{chunk-Q5ONG5HB.cjs → chunk-DTYX7CYN.cjs} +2 -2
  13. package/dist/{chunk-3Z3GVXXN.cjs → chunk-EG374TED.cjs} +57 -89
  14. package/dist/chunk-EUH466AL.cjs +179 -0
  15. package/dist/chunk-F7N6WQV6.cjs +53 -0
  16. package/dist/chunk-GYXQUTWZ.cjs +59 -0
  17. package/dist/chunk-IWF52DDE.js +55 -0
  18. package/dist/{chunk-SZ3LC2VO.js → chunk-JLKQ6WKK.js} +53 -85
  19. package/dist/chunk-K5AURCK5.js +183 -0
  20. package/dist/{chunk-XV3AQ6NS.js → chunk-KGGCA634.js} +1 -1
  21. package/dist/chunk-OCOCENE6.js +42 -0
  22. package/dist/chunk-R65CJGEQ.js +48 -0
  23. package/dist/chunk-TKZOB6C3.cjs +70 -0
  24. package/dist/{chunk-FKCWRNWB.js → chunk-U3QKV7I4.js} +1 -1
  25. package/dist/chunk-U7XZJQ4O.js +36 -0
  26. package/dist/{chunk-X55H6LRX.cjs → chunk-ULEEQ723.cjs} +1 -1
  27. package/dist/{chunk-BAWVLSRF.cjs → chunk-VK5EX3OG.cjs} +1 -1
  28. package/dist/{chunk-UW6GOD7J.js → chunk-VT5GDGZJ.js} +1 -1
  29. package/dist/chunk-WMGJCB7O.js +157 -0
  30. package/dist/chunk-YEFLGE3L.cjs +47 -0
  31. package/dist/chunk-YQ6J6VOI.js +48 -0
  32. package/dist/chunk-YSYZKK24.js +575 -0
  33. package/dist/chunk-YUMKV5TH.js +56 -0
  34. package/dist/{chunk-Z6CZAPVG.cjs → chunk-ZVF7J4EI.cjs} +1 -1
  35. package/dist/components/accordion/index.cjs +23 -0
  36. package/dist/components/accordion/index.d.cts +17 -0
  37. package/dist/components/accordion/index.d.ts +17 -0
  38. package/dist/components/accordion/index.js +2 -0
  39. package/dist/components/alert/index.cjs +4 -4
  40. package/dist/components/alert/index.js +1 -1
  41. package/dist/components/badge/index.cjs +4 -4
  42. package/dist/components/badge/index.js +1 -1
  43. package/dist/components/button/index.cjs +23 -16
  44. package/dist/components/button/index.js +22 -15
  45. package/dist/components/color-swatch/index.cjs +2 -2
  46. package/dist/components/color-swatch/index.js +1 -1
  47. package/dist/components/counting-number/index.cjs +11 -0
  48. package/dist/components/counting-number/index.d.cts +18 -0
  49. package/dist/components/counting-number/index.d.ts +18 -0
  50. package/dist/components/counting-number/index.js +2 -0
  51. package/dist/components/dialog/index.cjs +9 -9
  52. package/dist/components/dialog/index.js +1 -1
  53. package/dist/components/field/index.cjs +11 -11
  54. package/dist/components/field/index.js +1 -1
  55. package/dist/components/header/index.cjs +2 -2
  56. package/dist/components/header/index.js +1 -1
  57. package/dist/components/index.cjs +251 -144
  58. package/dist/components/index.d.cts +12 -3
  59. package/dist/components/index.d.ts +12 -3
  60. package/dist/components/index.js +22 -15
  61. package/dist/components/item/index.cjs +11 -11
  62. package/dist/components/item/index.js +1 -1
  63. package/dist/components/marquee/index.cjs +11 -0
  64. package/dist/components/marquee/index.d.cts +48 -0
  65. package/dist/components/marquee/index.d.ts +48 -0
  66. package/dist/components/marquee/index.js +2 -0
  67. package/dist/components/status/index.cjs +19 -0
  68. package/dist/components/status/index.d.cts +25 -0
  69. package/dist/components/status/index.d.ts +25 -0
  70. package/dist/components/status/index.js +2 -0
  71. package/dist/components/stepper/index.cjs +41 -34
  72. package/dist/components/stepper/index.d.cts +5 -4
  73. package/dist/components/stepper/index.d.ts +5 -4
  74. package/dist/components/stepper/index.js +22 -15
  75. package/dist/components/tabs/index.cjs +23 -0
  76. package/dist/components/tabs/index.d.cts +17 -0
  77. package/dist/components/tabs/index.d.ts +17 -0
  78. package/dist/components/tabs/index.js +2 -0
  79. package/dist/components/timeline/index.cjs +44 -0
  80. package/dist/components/timeline/index.d.cts +62 -0
  81. package/dist/components/timeline/index.d.ts +62 -0
  82. package/dist/components/timeline/index.js +3 -0
  83. package/dist/components/toaster/index.cjs +24 -17
  84. package/dist/components/toaster/index.js +22 -15
  85. package/dist/components/tooltip/index.cjs +9 -4
  86. package/dist/components/tooltip/index.d.cts +8 -12
  87. package/dist/components/tooltip/index.d.ts +8 -12
  88. package/dist/components/tooltip/index.js +2 -1
  89. package/dist/components/typing-text/index.cjs +11 -0
  90. package/dist/components/typing-text/index.d.cts +40 -0
  91. package/dist/components/typing-text/index.d.ts +40 -0
  92. package/dist/components/typing-text/index.js +2 -0
  93. package/dist/components/word-rotate/index.cjs +11 -0
  94. package/dist/components/word-rotate/index.d.cts +29 -0
  95. package/dist/components/word-rotate/index.d.ts +29 -0
  96. package/dist/components/word-rotate/index.js +2 -0
  97. package/dist/direction-CUOPDLCj.d.cts +7 -0
  98. package/dist/direction-CUOPDLCj.d.ts +7 -0
  99. package/package.json +37 -49
  100. package/tailwind/animation.css +23 -1
  101. package/tailwind/global.css +5 -0
  102. package/tailwind/palette.css +2 -2
  103. package/dist/chunk-EW6TE3N5.cjs +0 -38
  104. package/dist/chunk-GR37JJQK.cjs +0 -43
  105. package/dist/chunk-H5O5L6XT.js +0 -14
  106. package/dist/chunk-HJJPEVIH.js +0 -40
  107. package/dist/contexts/index.cjs +0 -18
  108. package/dist/contexts/index.d.cts +0 -11
  109. package/dist/contexts/index.d.ts +0 -11
  110. package/dist/contexts/index.js +0 -1
@@ -0,0 +1,179 @@
1
+ 'use strict';
2
+
3
+ var chunkH2BWO3SI_cjs = require('./chunk-H2BWO3SI.cjs');
4
+ var React = require('react');
5
+ var react = require('motion/react');
6
+ var jsxRuntime = require('react/jsx-runtime');
7
+
8
+ function _interopNamespace(e) {
9
+ if (e && e.__esModule) return e;
10
+ var n = Object.create(null);
11
+ if (e) {
12
+ Object.keys(e).forEach(function (k) {
13
+ if (k !== 'default') {
14
+ var d = Object.getOwnPropertyDescriptor(e, k);
15
+ Object.defineProperty(n, k, d.get ? d : {
16
+ enumerable: true,
17
+ get: function () { return e[k]; }
18
+ });
19
+ }
20
+ });
21
+ }
22
+ n.default = e;
23
+ return Object.freeze(n);
24
+ }
25
+
26
+ var React__namespace = /*#__PURE__*/_interopNamespace(React);
27
+
28
+ var cursorVariants = {
29
+ blinking: {
30
+ opacity: [0, 0, 1, 1],
31
+ transition: {
32
+ duration: 1,
33
+ repeat: Infinity,
34
+ repeatDelay: 0,
35
+ ease: "linear",
36
+ times: [0, 0.5, 0.5, 1]
37
+ }
38
+ }
39
+ };
40
+ var animationVariants = {
41
+ fadeIn: {
42
+ hidden: { opacity: 0, y: 10 },
43
+ show: { opacity: 1, y: 0 },
44
+ exit: { opacity: 0 }
45
+ },
46
+ blurIn: {
47
+ hidden: { opacity: 0, filter: "blur(4px)" },
48
+ show: { opacity: 1, filter: "blur(0px)" },
49
+ exit: { opacity: 0, filter: "blur(4px)" }
50
+ },
51
+ blurInUp: {
52
+ hidden: { opacity: 0, y: 20, filter: "blur(4px)" },
53
+ show: { opacity: 1, y: 0, filter: "blur(0px)" },
54
+ exit: { opacity: 0, y: -20, filter: "blur(4px)" }
55
+ },
56
+ blurInDown: {
57
+ hidden: { opacity: 0, y: -20, filter: "blur(4px)" },
58
+ show: { opacity: 1, y: 0, filter: "blur(0px)" },
59
+ exit: { opacity: 0, y: 20, filter: "blur(4px)" }
60
+ },
61
+ slideUp: {
62
+ hidden: { opacity: 0, y: 20 },
63
+ show: { opacity: 1, y: 0 },
64
+ exit: { opacity: 0, y: -20 }
65
+ },
66
+ slideDown: {
67
+ hidden: { opacity: 0, y: -20 },
68
+ show: { opacity: 1, y: 0 },
69
+ exit: { opacity: 0, y: 20 }
70
+ },
71
+ slideLeft: {
72
+ hidden: { opacity: 0, x: 20 },
73
+ show: { opacity: 1, x: 0 },
74
+ exit: { opacity: 0, x: -20 }
75
+ },
76
+ slideRight: {
77
+ hidden: { opacity: 0, x: -20 },
78
+ show: { opacity: 1, x: 0 },
79
+ exit: { opacity: 0, x: 20 }
80
+ },
81
+ scaleUp: {
82
+ hidden: { opacity: 0, scale: 0.8 },
83
+ show: { opacity: 1, scale: 1 },
84
+ exit: { opacity: 0, scale: 1.2 }
85
+ },
86
+ scaleDown: {
87
+ hidden: { opacity: 0, scale: 1.2 },
88
+ show: { opacity: 1, scale: 1 },
89
+ exit: { opacity: 0, scale: 0.8 }
90
+ }
91
+ };
92
+ function TypingText({
93
+ text,
94
+ texts,
95
+ speed = 100,
96
+ delay = 0,
97
+ showCursor = true,
98
+ cursorClassName = "",
99
+ cursor = "|",
100
+ loop = false,
101
+ pauseDuration = 2e3,
102
+ className,
103
+ onComplete,
104
+ startOnView = true,
105
+ once = false,
106
+ animation = "fadeIn",
107
+ inViewMargin,
108
+ ...props
109
+ }) {
110
+ const ref = React__namespace.useRef(null);
111
+ const isInView = react.useInView(ref, { once, margin: inViewMargin });
112
+ const [hasAnimated, setHasAnimated] = React__namespace.useState(false);
113
+ const [displayText, setDisplayText] = React__namespace.useState("");
114
+ const [currentIndex, setCurrentIndex] = React__namespace.useState(0);
115
+ const [isTyping, setIsTyping] = React__namespace.useState(false);
116
+ const [currentTextIndex, setCurrentTextIndex] = React__namespace.useState(0);
117
+ const shouldStart = !startOnView || isInView && (!once || !hasAnimated);
118
+ const textArray = texts && texts.length > 0 ? texts : [text];
119
+ const currentText = textArray[currentTextIndex] ?? "";
120
+ React__namespace.useEffect(() => {
121
+ if (!shouldStart) return;
122
+ const timeout = setTimeout(() => {
123
+ setIsTyping(true);
124
+ setHasAnimated(true);
125
+ }, delay);
126
+ return () => clearTimeout(timeout);
127
+ }, [delay, shouldStart]);
128
+ React__namespace.useEffect(() => {
129
+ if (!isTyping) return;
130
+ if (currentIndex < currentText.length) {
131
+ const timeout = setTimeout(() => {
132
+ setDisplayText(currentText.slice(0, currentIndex + 1));
133
+ setCurrentIndex(currentIndex + 1);
134
+ }, speed);
135
+ return () => clearTimeout(timeout);
136
+ } else {
137
+ onComplete?.();
138
+ if (loop && texts && texts.length > 1) {
139
+ const timeout = setTimeout(() => {
140
+ setDisplayText("");
141
+ setCurrentIndex(0);
142
+ setCurrentTextIndex((prev) => (prev + 1) % texts.length);
143
+ }, pauseDuration);
144
+ return () => clearTimeout(timeout);
145
+ }
146
+ }
147
+ }, [currentIndex, currentText, isTyping, speed, loop, texts, pauseDuration, onComplete]);
148
+ const selectedVariants = animationVariants[animation];
149
+ const MotionComponent = react.motion.span;
150
+ return /* @__PURE__ */ jsxRuntime.jsx(
151
+ MotionComponent,
152
+ {
153
+ ref,
154
+ variants: selectedVariants,
155
+ initial: "hidden",
156
+ whileInView: startOnView ? "show" : void 0,
157
+ animate: startOnView ? void 0 : "show",
158
+ exit: "exit",
159
+ className: chunkH2BWO3SI_cjs.cn("whitespace-pre-wrap", className),
160
+ viewport: { once },
161
+ "data-slot": "typing-text",
162
+ ...props,
163
+ children: /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { display: "inline-flex", alignItems: "center" }, children: [
164
+ displayText,
165
+ showCursor && /* @__PURE__ */ jsxRuntime.jsx(
166
+ react.motion.span,
167
+ {
168
+ variants: cursorVariants,
169
+ animate: "blinking",
170
+ className: chunkH2BWO3SI_cjs.cn("text-foreground ms-1 inline-block w-px font-normal select-none", cursorClassName),
171
+ children: cursor
172
+ }
173
+ )
174
+ ] })
175
+ }
176
+ );
177
+ }
178
+
179
+ exports.TypingText = TypingText;
@@ -0,0 +1,53 @@
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
+ var lucideReact = require('lucide-react');
7
+
8
+ function Accordion({ ...props }) {
9
+ return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Accordion.Root, { "data-slot": "accordion", ...props });
10
+ }
11
+ function AccordionContent({ className, children, ...props }) {
12
+ return /* @__PURE__ */ jsxRuntime.jsx(
13
+ radixUi.Accordion.Content,
14
+ {
15
+ "data-slot": "accordion-content",
16
+ className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",
17
+ ...props,
18
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkH2BWO3SI_cjs.cn("pt-0 pb-4", className), children })
19
+ }
20
+ );
21
+ }
22
+ function AccordionTrigger({ className, children, ...props }) {
23
+ return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Accordion.Header, { className: "flex", children: /* @__PURE__ */ jsxRuntime.jsxs(
24
+ radixUi.Accordion.Trigger,
25
+ {
26
+ "data-slot": "accordion-trigger",
27
+ className: chunkH2BWO3SI_cjs.cn(
28
+ "focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
29
+ className
30
+ ),
31
+ ...props,
32
+ children: [
33
+ children,
34
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, { className: "text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" })
35
+ ]
36
+ }
37
+ ) });
38
+ }
39
+ function AccordionItem({ className, ...props }) {
40
+ return /* @__PURE__ */ jsxRuntime.jsx(
41
+ radixUi.Accordion.Item,
42
+ {
43
+ "data-slot": "accordion-item",
44
+ className: chunkH2BWO3SI_cjs.cn("border-b last:border-b-0", className),
45
+ ...props
46
+ }
47
+ );
48
+ }
49
+
50
+ exports.Accordion = Accordion;
51
+ exports.AccordionContent = AccordionContent;
52
+ exports.AccordionItem = AccordionItem;
53
+ exports.AccordionTrigger = AccordionTrigger;
@@ -0,0 +1,59 @@
1
+ 'use strict';
2
+
3
+ var chunkH2BWO3SI_cjs = require('./chunk-H2BWO3SI.cjs');
4
+ var reactSlot = require('@radix-ui/react-slot');
5
+ var classVarianceAuthority = require('class-variance-authority');
6
+ var jsxRuntime = require('react/jsx-runtime');
7
+
8
+ var statusVariants = classVarianceAuthority.cva(
9
+ "inline-flex w-fit shrink-0 items-center gap-1.5 overflow-hidden whitespace-nowrap rounded-full border px-2.5 py-1 font-medium text-xs transition-colors",
10
+ {
11
+ variants: {
12
+ variant: {
13
+ default: "border-transparent bg-muted text-muted-foreground **:data-[slot=status-indicator]:bg-muted-foreground",
14
+ success: "border-success/20 bg-success/10 text-success **:data-[slot=status-indicator]:bg-success",
15
+ error: "border-error/20 bg-error/10 text-error **:data-[slot=status-indicator]:bg-error",
16
+ warning: "border-warning/20 bg-warning/10 text-warning **:data-[slot=status-indicator]:bg-warning",
17
+ primary: "border-primary/20 bg-primary/10 text-primary **:data-[slot=status-indicator]:bg-primary "
18
+ }
19
+ },
20
+ defaultVariants: {
21
+ variant: "default"
22
+ }
23
+ }
24
+ );
25
+ function Status({ className, variant = "default", asChild, ...rootProps }) {
26
+ const RootPrimitive = asChild ? reactSlot.Slot : "div";
27
+ return /* @__PURE__ */ jsxRuntime.jsx(
28
+ RootPrimitive,
29
+ {
30
+ "data-slot": "status",
31
+ "data-variant": variant,
32
+ ...rootProps,
33
+ className: chunkH2BWO3SI_cjs.cn(statusVariants({ variant }), className)
34
+ }
35
+ );
36
+ }
37
+ function StatusIndicator(props) {
38
+ const { className, ...indicatorProps } = props;
39
+ return /* @__PURE__ */ jsxRuntime.jsx(
40
+ "div",
41
+ {
42
+ "data-slot": "status-indicator",
43
+ ...indicatorProps,
44
+ className: chunkH2BWO3SI_cjs.cn(
45
+ "relative flex size-2 shrink-0 rounded-full",
46
+ "before:absolute before:inset-0 before:animate-ping before:rounded-full before:bg-inherit",
47
+ "after:absolute after:inset-0.5 after:rounded-full after:bg-inherit",
48
+ className
49
+ )
50
+ }
51
+ );
52
+ }
53
+ function StatusLabel({ className, ...labelProps }) {
54
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "status-label", ...labelProps, className: chunkH2BWO3SI_cjs.cn("leading-none", className) });
55
+ }
56
+
57
+ exports.Status = Status;
58
+ exports.StatusIndicator = StatusIndicator;
59
+ exports.StatusLabel = StatusLabel;
@@ -0,0 +1,55 @@
1
+ import { cn } from './chunk-ZD2QRAOX.js';
2
+ import { Slot } from '@radix-ui/react-slot';
3
+ import { cva } from 'class-variance-authority';
4
+ import { jsx } from 'react/jsx-runtime';
5
+
6
+ var statusVariants = cva(
7
+ "inline-flex w-fit shrink-0 items-center gap-1.5 overflow-hidden whitespace-nowrap rounded-full border px-2.5 py-1 font-medium text-xs transition-colors",
8
+ {
9
+ variants: {
10
+ variant: {
11
+ default: "border-transparent bg-muted text-muted-foreground **:data-[slot=status-indicator]:bg-muted-foreground",
12
+ success: "border-success/20 bg-success/10 text-success **:data-[slot=status-indicator]:bg-success",
13
+ error: "border-error/20 bg-error/10 text-error **:data-[slot=status-indicator]:bg-error",
14
+ warning: "border-warning/20 bg-warning/10 text-warning **:data-[slot=status-indicator]:bg-warning",
15
+ primary: "border-primary/20 bg-primary/10 text-primary **:data-[slot=status-indicator]:bg-primary "
16
+ }
17
+ },
18
+ defaultVariants: {
19
+ variant: "default"
20
+ }
21
+ }
22
+ );
23
+ function Status({ className, variant = "default", asChild, ...rootProps }) {
24
+ const RootPrimitive = asChild ? Slot : "div";
25
+ return /* @__PURE__ */ jsx(
26
+ RootPrimitive,
27
+ {
28
+ "data-slot": "status",
29
+ "data-variant": variant,
30
+ ...rootProps,
31
+ className: cn(statusVariants({ variant }), className)
32
+ }
33
+ );
34
+ }
35
+ function StatusIndicator(props) {
36
+ const { className, ...indicatorProps } = props;
37
+ return /* @__PURE__ */ jsx(
38
+ "div",
39
+ {
40
+ "data-slot": "status-indicator",
41
+ ...indicatorProps,
42
+ className: cn(
43
+ "relative flex size-2 shrink-0 rounded-full",
44
+ "before:absolute before:inset-0 before:animate-ping before:rounded-full before:bg-inherit",
45
+ "after:absolute after:inset-0.5 after:rounded-full after:bg-inherit",
46
+ className
47
+ )
48
+ }
49
+ );
50
+ }
51
+ function StatusLabel({ className, ...labelProps }) {
52
+ return /* @__PURE__ */ jsx("div", { "data-slot": "status-label", ...labelProps, className: cn("leading-none", className) });
53
+ }
54
+
55
+ export { Status, StatusIndicator, StatusLabel };