@szum-tech/design-system 2.0.3 → 2.0.4
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-INJBKPIE.js +89 -0
- package/dist/chunk-TSN5DAKH.cjs +100 -0
- package/dist/icons.cjs +8 -1280
- package/dist/icons.d.cts +1 -1
- package/dist/icons.d.ts +1 -1
- package/dist/icons.js +1 -1
- package/dist/index.cjs +13 -11
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +7 -5
- package/package.json +26 -24
- package/dist/chunk-EKHM64CK.js +0 -7290
- package/dist/chunk-G4TX2R77.cjs +0 -7613
package/dist/icons.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from '@radix-ui/react-icons';
|
|
2
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
2
|
import * as React from 'react';
|
|
3
|
+
export * from '@radix-ui/react-icons';
|
|
4
4
|
|
|
5
5
|
declare function GoogleLogoIcon(props: React.SVGProps<SVGSVGElement>): react_jsx_runtime.JSX.Element;
|
|
6
6
|
|
package/dist/icons.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from '@radix-ui/react-icons';
|
|
2
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
2
|
import * as React from 'react';
|
|
3
|
+
export * from '@radix-ui/react-icons';
|
|
4
4
|
|
|
5
5
|
declare function GoogleLogoIcon(props: React.SVGProps<SVGSVGElement>): react_jsx_runtime.JSX.Element;
|
|
6
6
|
|
package/dist/icons.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { Auth0LogoIcon, GoogleLogoIcon, LoadingIcon, XLogoIcon } from './chunk-INJBKPIE.js';
|
package/dist/index.cjs
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkH2BWO3SI_cjs = require('./chunk-H2BWO3SI.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkTSN5DAKH_cjs = require('./chunk-TSN5DAKH.cjs');
|
|
5
5
|
var radixUi = require('radix-ui');
|
|
6
6
|
var classVarianceAuthority = require('class-variance-authority');
|
|
7
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
8
8
|
var React = require('react');
|
|
9
9
|
var reactSlot = require('@radix-ui/react-slot');
|
|
10
|
+
var reactIcons = require('@radix-ui/react-icons');
|
|
10
11
|
var tailwindMerge = require('tailwind-merge');
|
|
11
12
|
var reactHookForm = require('react-hook-form');
|
|
12
13
|
|
|
@@ -305,6 +306,7 @@ function Button({
|
|
|
305
306
|
color = "primary",
|
|
306
307
|
disabled = false,
|
|
307
308
|
fullWidth = false,
|
|
309
|
+
loadingPosition = "start",
|
|
308
310
|
ref,
|
|
309
311
|
...props
|
|
310
312
|
}) {
|
|
@@ -313,11 +315,10 @@ function Button({
|
|
|
313
315
|
type = "button",
|
|
314
316
|
loading = false,
|
|
315
317
|
size = "md",
|
|
316
|
-
loadingPosition = "start",
|
|
317
318
|
endIcon,
|
|
318
319
|
startIcon,
|
|
319
320
|
...rest
|
|
320
|
-
} = props;
|
|
321
|
+
} = { ...props, loadingPosition };
|
|
321
322
|
const Comp = asChild ? reactSlot.Slot : "button";
|
|
322
323
|
const buttonStyles = buttonCva({ fullWidth, size, variant, color });
|
|
323
324
|
const isDisabled = disabled || loading;
|
|
@@ -347,11 +348,11 @@ function ButtonContent({
|
|
|
347
348
|
...props
|
|
348
349
|
}) {
|
|
349
350
|
const isStartLoading = loading && loadingPosition === "start";
|
|
350
|
-
const StartIcon = isStartLoading ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
351
|
+
const StartIcon = isStartLoading ? /* @__PURE__ */ jsxRuntime.jsx(chunkTSN5DAKH_cjs.LoadingIcon, { "aria-label": "Loading" }) : startIcon || null;
|
|
351
352
|
const startIconStyles = iconCva({ size, loading: isStartLoading });
|
|
352
353
|
const startIconContainerStyles = iconContainerCva({ size, site: "left" });
|
|
353
354
|
const isEndLoading = loading && loadingPosition === "end";
|
|
354
|
-
const EndIcon = isEndLoading ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
355
|
+
const EndIcon = isEndLoading ? /* @__PURE__ */ jsxRuntime.jsx(chunkTSN5DAKH_cjs.LoadingIcon, { "aria-label": "Loading" }) : endIcon || null;
|
|
355
356
|
const endIconStyles = iconCva({ size, loading: isEndLoading });
|
|
356
357
|
const endIconContainerStyles = iconContainerCva({ size, site: "right" });
|
|
357
358
|
const LeadingIcon = StartIcon ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: startIconContainerStyles, role: isStartLoading ? "progressbar" : void 0, children: React__namespace.cloneElement(StartIcon, { className: startIconStyles }) }) : null;
|
|
@@ -515,7 +516,7 @@ function Select({ children, placeholder, invalid = false, ref, ...props }) {
|
|
|
515
516
|
return /* @__PURE__ */ jsxRuntime.jsxs(radixUi.Select.Root, { ...props, children: [
|
|
516
517
|
/* @__PURE__ */ jsxRuntime.jsxs(radixUi.Select.Trigger, { className: selectStyles, ref, children: [
|
|
517
518
|
/* @__PURE__ */ jsxRuntime.jsx(radixUi.Select.Value, { placeholder }),
|
|
518
|
-
/* @__PURE__ */ jsxRuntime.jsx(radixUi.Select.Icon, { className: "-mr-1.5", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
519
|
+
/* @__PURE__ */ jsxRuntime.jsx(radixUi.Select.Icon, { className: "-mr-1.5", children: /* @__PURE__ */ jsxRuntime.jsx(reactIcons.CaretSortIcon, { className: "size-5 text-gray-200" }) })
|
|
519
520
|
] }),
|
|
520
521
|
/* @__PURE__ */ jsxRuntime.jsx(radixUi.Select.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
521
522
|
radixUi.Select.Content,
|
|
@@ -535,7 +536,7 @@ function SelectItem({ children, ...props }) {
|
|
|
535
536
|
...props,
|
|
536
537
|
children: [
|
|
537
538
|
/* @__PURE__ */ jsxRuntime.jsx(radixUi.Select.ItemText, { className: "flex-1", children }),
|
|
538
|
-
/* @__PURE__ */ jsxRuntime.jsx(radixUi.Select.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
539
|
+
/* @__PURE__ */ jsxRuntime.jsx(radixUi.Select.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(reactIcons.CheckIcon, { className: "size-4" }) })
|
|
539
540
|
]
|
|
540
541
|
}
|
|
541
542
|
);
|
|
@@ -589,7 +590,7 @@ function SheetContent({ side = "right", className, children, ...props }) {
|
|
|
589
590
|
/* @__PURE__ */ jsxRuntime.jsxs(radixUi.Dialog.Content, { className: tailwindMerge.twMerge(sheetContentStyles({ side }), className), ...props, children: [
|
|
590
591
|
children,
|
|
591
592
|
/* @__PURE__ */ jsxRuntime.jsxs(radixUi.Dialog.Close, { className: "focus:ring-ring ring-primary-500 ring-offset-foreground data-[state=open]:bg-foreground absolute top-4 right-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none", children: [
|
|
592
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
593
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactIcons.Cross1Icon, { className: "size-4" }),
|
|
593
594
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
|
|
594
595
|
] })
|
|
595
596
|
] })
|
|
@@ -607,13 +608,14 @@ function SheetTitle({ className, ...props }) {
|
|
|
607
608
|
function SheetDescription({ className, ...props }) {
|
|
608
609
|
return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Dialog.Description, { className: tailwindMerge.twMerge("typography-body-2 text-gray-200", className), ...props });
|
|
609
610
|
}
|
|
610
|
-
function Separator({ className, orientation = "horizontal", decorative =
|
|
611
|
+
function Separator({ className, orientation = "horizontal", decorative = false, ...props }) {
|
|
611
612
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
612
613
|
radixUi.Separator.Root,
|
|
613
614
|
{
|
|
614
615
|
decorative,
|
|
615
616
|
orientation,
|
|
616
|
-
|
|
617
|
+
"aria-orientation": orientation,
|
|
618
|
+
className: chunkH2BWO3SI_cjs.cn(
|
|
617
619
|
"shrink-0 bg-gray-400",
|
|
618
620
|
orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
|
|
619
621
|
className
|
|
@@ -675,7 +677,7 @@ function DialogContent({ className, children, width = "md", ...props }) {
|
|
|
675
677
|
/* @__PURE__ */ jsxRuntime.jsxs(radixUi.Dialog.Content, { className: tailwindMerge.twMerge(dialogContentStyles({ width }), className), ...props, children: [
|
|
676
678
|
children,
|
|
677
679
|
/* @__PURE__ */ jsxRuntime.jsxs(radixUi.Dialog.Close, { className: "focus:ring-ring ring-primary-500 ring-offset-foreground data-[state=open]:bg-foreground absolute top-4 right-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none", children: [
|
|
678
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
680
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactIcons.Cross1Icon, { className: "size-4" }),
|
|
679
681
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
|
|
680
682
|
] })
|
|
681
683
|
] })
|
package/dist/index.d.cts
CHANGED
|
@@ -75,7 +75,7 @@ type Props = {
|
|
|
75
75
|
asChild?: boolean;
|
|
76
76
|
};
|
|
77
77
|
type ButtonProps = React$1.ButtonHTMLAttributes<HTMLButtonElement> & React$1.RefAttributes<HTMLButtonElement> & Props;
|
|
78
|
-
declare function Button({ asChild, variant, color, disabled, fullWidth, ref, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
78
|
+
declare function Button({ asChild, variant, color, disabled, fullWidth, loadingPosition, ref, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
79
79
|
|
|
80
80
|
declare const buttonCva: (props?: ({
|
|
81
81
|
fullWidth?: boolean | null | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -75,7 +75,7 @@ type Props = {
|
|
|
75
75
|
asChild?: boolean;
|
|
76
76
|
};
|
|
77
77
|
type ButtonProps = React$1.ButtonHTMLAttributes<HTMLButtonElement> & React$1.RefAttributes<HTMLButtonElement> & Props;
|
|
78
|
-
declare function Button({ asChild, variant, color, disabled, fullWidth, ref, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
78
|
+
declare function Button({ asChild, variant, color, disabled, fullWidth, loadingPosition, ref, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
79
79
|
|
|
80
80
|
declare const buttonCva: (props?: ({
|
|
81
81
|
fullWidth?: boolean | null | undefined;
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { cn } from './chunk-ZD2QRAOX.js';
|
|
2
2
|
export { cn } from './chunk-ZD2QRAOX.js';
|
|
3
|
-
import {
|
|
3
|
+
import { LoadingIcon } from './chunk-INJBKPIE.js';
|
|
4
4
|
import { Dialog as Dialog$1, AlertDialog as AlertDialog$1, Label as Label$1, Avatar as Avatar$1, Tooltip as Tooltip$1, Select as Select$1, Separator as Separator$1 } from 'radix-ui';
|
|
5
5
|
import { cva } from 'class-variance-authority';
|
|
6
6
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
7
|
import * as React from 'react';
|
|
8
8
|
import { Slot } from '@radix-ui/react-slot';
|
|
9
|
+
import { CaretSortIcon, CheckIcon, Cross1Icon } from '@radix-ui/react-icons';
|
|
9
10
|
import { twMerge } from 'tailwind-merge';
|
|
10
11
|
import { useFormContext, FormProvider, Controller } from 'react-hook-form';
|
|
11
12
|
|
|
@@ -284,6 +285,7 @@ function Button({
|
|
|
284
285
|
color = "primary",
|
|
285
286
|
disabled = false,
|
|
286
287
|
fullWidth = false,
|
|
288
|
+
loadingPosition = "start",
|
|
287
289
|
ref,
|
|
288
290
|
...props
|
|
289
291
|
}) {
|
|
@@ -292,11 +294,10 @@ function Button({
|
|
|
292
294
|
type = "button",
|
|
293
295
|
loading = false,
|
|
294
296
|
size = "md",
|
|
295
|
-
loadingPosition = "start",
|
|
296
297
|
endIcon,
|
|
297
298
|
startIcon,
|
|
298
299
|
...rest
|
|
299
|
-
} = props;
|
|
300
|
+
} = { ...props, loadingPosition };
|
|
300
301
|
const Comp = asChild ? Slot : "button";
|
|
301
302
|
const buttonStyles = buttonCva({ fullWidth, size, variant, color });
|
|
302
303
|
const isDisabled = disabled || loading;
|
|
@@ -586,13 +587,14 @@ function SheetTitle({ className, ...props }) {
|
|
|
586
587
|
function SheetDescription({ className, ...props }) {
|
|
587
588
|
return /* @__PURE__ */ jsx(Dialog$1.Description, { className: twMerge("typography-body-2 text-gray-200", className), ...props });
|
|
588
589
|
}
|
|
589
|
-
function Separator({ className, orientation = "horizontal", decorative =
|
|
590
|
+
function Separator({ className, orientation = "horizontal", decorative = false, ...props }) {
|
|
590
591
|
return /* @__PURE__ */ jsx(
|
|
591
592
|
Separator$1.Root,
|
|
592
593
|
{
|
|
593
594
|
decorative,
|
|
594
595
|
orientation,
|
|
595
|
-
|
|
596
|
+
"aria-orientation": orientation,
|
|
597
|
+
className: cn(
|
|
596
598
|
"shrink-0 bg-gray-400",
|
|
597
599
|
orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
|
|
598
600
|
className
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@szum-tech/design-system",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4",
|
|
4
4
|
"description": "Szum-Tech design system with tailwindcss support",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"szum-tech",
|
|
@@ -82,11 +82,14 @@
|
|
|
82
82
|
"test": "vitest",
|
|
83
83
|
"test:ci": "CI=true vitest",
|
|
84
84
|
"test:coverage": "vitest --coverage",
|
|
85
|
+
"test:storybook": "vitest --project=storybook --coverage",
|
|
85
86
|
"test:ui": "vitest --ui",
|
|
87
|
+
"test:unit": "vitest --project=unit --coverage",
|
|
86
88
|
"test:watch": "vitest --watch",
|
|
87
89
|
"type-check": "tsc --noEmit"
|
|
88
90
|
},
|
|
89
91
|
"dependencies": {
|
|
92
|
+
"@radix-ui/react-icons": "^1.3.2",
|
|
90
93
|
"class-variance-authority": "^0.7.1",
|
|
91
94
|
"clsx": "^2.1.1",
|
|
92
95
|
"radix-ui": "^1.1.3",
|
|
@@ -94,34 +97,33 @@
|
|
|
94
97
|
"tailwindcss-animate": "^1.0.7"
|
|
95
98
|
},
|
|
96
99
|
"devDependencies": {
|
|
97
|
-
"@hookform/resolvers": "^4.1.
|
|
98
|
-
"@
|
|
99
|
-
"@storybook/addon-
|
|
100
|
-
"@storybook/addon-
|
|
101
|
-
"@storybook/
|
|
102
|
-
"@storybook/
|
|
103
|
-
"@storybook/
|
|
104
|
-
"@
|
|
105
|
-
"@
|
|
106
|
-
"@szum-tech/
|
|
107
|
-
"@
|
|
108
|
-
"@szum-tech/semantic-release-config": "^2.2.2",
|
|
109
|
-
"@tailwindcss/postcss": "^4.0.9",
|
|
100
|
+
"@hookform/resolvers": "^4.1.3",
|
|
101
|
+
"@storybook/addon-essentials": "^8.6.4",
|
|
102
|
+
"@storybook/addon-links": "^8.6.4",
|
|
103
|
+
"@storybook/experimental-addon-test": "^8.6.4",
|
|
104
|
+
"@storybook/react": "^8.6.4",
|
|
105
|
+
"@storybook/react-vite": "^8.6.4",
|
|
106
|
+
"@storybook/theming": "^8.6.4",
|
|
107
|
+
"@szum-tech/eslint-config": "^2.1.6",
|
|
108
|
+
"@szum-tech/prettier-config": "^1.6.1",
|
|
109
|
+
"@szum-tech/semantic-release-config": "^2.3.0",
|
|
110
|
+
"@tailwindcss/postcss": "^4.0.14",
|
|
110
111
|
"@testing-library/dom": "^10.4.0",
|
|
111
112
|
"@testing-library/jest-dom": "^6.6.3",
|
|
112
113
|
"@testing-library/react": "^16.2.0",
|
|
113
114
|
"@testing-library/user-event": "^14.6.1",
|
|
114
|
-
"@types/node": "^22.13.
|
|
115
|
+
"@types/node": "^22.13.10",
|
|
115
116
|
"@types/react": "^19.0.10",
|
|
116
117
|
"@types/react-dom": "^19.0.4",
|
|
117
118
|
"@vitejs/plugin-react": "^4.3.4",
|
|
118
|
-
"@vitest/
|
|
119
|
-
"@vitest/
|
|
119
|
+
"@vitest/browser": "^3.0.8",
|
|
120
|
+
"@vitest/coverage-v8": "^3.0.8",
|
|
121
|
+
"@vitest/ui": "^3.0.8",
|
|
120
122
|
"cpy-cli": "^5.0.0",
|
|
121
|
-
"eslint": "^9.
|
|
122
|
-
"
|
|
123
|
+
"eslint": "^9.22.0",
|
|
124
|
+
"playwright": "^1.51.0",
|
|
123
125
|
"postcss": "^8.5.3",
|
|
124
|
-
"prettier": "^3.5.
|
|
126
|
+
"prettier": "^3.5.3",
|
|
125
127
|
"react": "^19.0.0",
|
|
126
128
|
"react-docgen-typescript": "^2.2.2",
|
|
127
129
|
"react-dom": "^19.0.0",
|
|
@@ -130,12 +132,12 @@
|
|
|
130
132
|
"serve": "^14.2.4",
|
|
131
133
|
"storybook": "^8.5.3",
|
|
132
134
|
"storybook-dark-mode": "^4.0.2",
|
|
133
|
-
"tailwindcss": "^4.0.
|
|
135
|
+
"tailwindcss": "^4.0.14",
|
|
134
136
|
"tsup": "^8.4.0",
|
|
135
|
-
"typescript": "^5.
|
|
136
|
-
"vite": "^
|
|
137
|
+
"typescript": "^5.8.2",
|
|
138
|
+
"vite": "^5.4.14",
|
|
137
139
|
"vite-tsconfig-paths": "^5.1.4",
|
|
138
|
-
"vitest": "^3.0.
|
|
140
|
+
"vitest": "^3.0.8",
|
|
139
141
|
"zod": "^3.24.2"
|
|
140
142
|
},
|
|
141
143
|
"peerDependencies": {
|