@szum-tech/design-system 2.5.1 → 2.6.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-75T7KAAY.js → chunk-36YD6ICC.js} +2 -2
- package/dist/chunk-3WSQRFUY.cjs +11 -0
- package/dist/chunk-5RNHEHRL.js +996 -0
- package/dist/chunk-7EYMOUWG.cjs +51 -0
- package/dist/{chunk-MOOWZNA6.js → chunk-7V34QHYR.js} +3 -3
- package/dist/chunk-AIXT3Q3I.cjs +1043 -0
- package/dist/chunk-DFD2WUOU.js +27 -0
- package/dist/chunk-EW6TE3N5.cjs +38 -0
- package/dist/{chunk-BJ553XYM.cjs → chunk-G6VXQ7DJ.cjs} +3 -3
- package/dist/chunk-H5O5L6XT.js +14 -0
- package/dist/{chunk-3PV6NLP5.js → chunk-IAI7BIAG.js} +3 -3
- package/dist/{chunk-XKXP3W3H.cjs → chunk-K4TRAPRN.cjs} +3 -3
- package/dist/{chunk-4C7M4HBP.js → chunk-MI3CQBHC.js} +3 -3
- package/dist/{chunk-KXTNZ4UO.cjs → chunk-NHFHKMX2.cjs} +3 -3
- package/dist/{chunk-6L3QPLRR.cjs → chunk-OIWEXHFE.cjs} +3 -3
- package/dist/chunk-P5IUC7HJ.js +9 -0
- package/dist/{chunk-WMMJEZ7Y.js → chunk-YJFJLF7Y.js} +3 -3
- package/dist/{chunk-FPK72OV4.cjs → chunk-ZZ3EBGSD.cjs} +2 -2
- package/dist/components/badge/index.cjs +2 -2
- package/dist/components/badge/index.js +1 -1
- package/dist/components/button/index.cjs +2 -2
- package/dist/components/button/index.js +1 -1
- package/dist/components/form/index.cjs +20 -17
- package/dist/components/form/index.js +13 -10
- package/dist/components/index.cjs +147 -64
- package/dist/components/index.d.cts +3 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.js +13 -10
- package/dist/components/input/index.cjs +2 -2
- package/dist/components/input/index.js +1 -1
- package/dist/components/select/index.cjs +3 -3
- package/dist/components/select/index.js +1 -1
- package/dist/components/spinner/index.cjs +11 -0
- package/dist/components/spinner/index.d.cts +7 -0
- package/dist/components/spinner/index.d.ts +7 -0
- package/dist/components/spinner/index.js +2 -0
- package/dist/components/stepper/index.cjs +102 -0
- package/dist/components/stepper/index.d.cts +162 -0
- package/dist/components/stepper/index.d.ts +162 -0
- package/dist/components/stepper/index.js +21 -0
- package/dist/components/textarea/index.cjs +2 -2
- package/dist/components/textarea/index.js +1 -1
- package/dist/contexts/index.cjs +18 -0
- package/dist/contexts/index.d.cts +11 -0
- package/dist/contexts/index.d.ts +11 -0
- package/dist/contexts/index.js +1 -0
- package/dist/hooks/index.cjs +18 -0
- package/dist/hooks/index.d.cts +14 -0
- package/dist/hooks/index.d.ts +14 -0
- package/dist/hooks/index.js +1 -0
- package/dist/icons/index.d.cts +3 -0
- package/dist/icons/index.d.ts +3 -0
- package/package.json +22 -1
- package/dist/chunk-DH5YKYXV.cjs +0 -116
- package/dist/chunk-SPCZ3GVM.js +0 -88
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import React__default from 'react';
|
|
4
|
+
import { Direction } from '../../contexts/index.cjs';
|
|
5
|
+
|
|
6
|
+
type StepperProps = React.ComponentProps<"div"> & {
|
|
7
|
+
asChild?: boolean;
|
|
8
|
+
value?: string;
|
|
9
|
+
defaultValue?: string;
|
|
10
|
+
onValueChange?: (value: string) => void;
|
|
11
|
+
onValueComplete?: (value: string, completed: boolean) => void;
|
|
12
|
+
onValueAdd?: (value: string) => void;
|
|
13
|
+
onValueRemove?: (value: string) => void;
|
|
14
|
+
onValidate?: (value: string, direction: StepperNavigationDirection) => boolean | Promise<boolean>;
|
|
15
|
+
activationMode?: StepperActivationMode;
|
|
16
|
+
dir?: Direction;
|
|
17
|
+
orientation?: StepperOrientation;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
loop?: boolean;
|
|
20
|
+
nonInteractive?: boolean;
|
|
21
|
+
indicators?: StepIndicators;
|
|
22
|
+
};
|
|
23
|
+
declare function Stepper({ value, defaultValue, onValueChange, onValueComplete, onValueAdd, onValueRemove, onValidate, id: idProp, dir: dirProp, orientation, activationMode, asChild, disabled, nonInteractive, loop, className, indicators, ...rootProps }: StepperProps): react_jsx_runtime.JSX.Element;
|
|
24
|
+
|
|
25
|
+
declare const StepperFocusIntent: {
|
|
26
|
+
readonly FIRST: "first";
|
|
27
|
+
readonly LAST: "last";
|
|
28
|
+
readonly PREV: "prev";
|
|
29
|
+
readonly NEXT: "next";
|
|
30
|
+
};
|
|
31
|
+
type StepperFocusIntent = (typeof StepperFocusIntent)[keyof typeof StepperFocusIntent];
|
|
32
|
+
declare const StepperOrientation: {
|
|
33
|
+
readonly HORIZONTAL: "horizontal";
|
|
34
|
+
readonly VERTICAL: "vertical";
|
|
35
|
+
};
|
|
36
|
+
type StepperOrientation = (typeof StepperOrientation)[keyof typeof StepperOrientation];
|
|
37
|
+
declare const StepperNavigationDirection: {
|
|
38
|
+
readonly NEXT: "next";
|
|
39
|
+
readonly PREV: "prev";
|
|
40
|
+
};
|
|
41
|
+
type StepperNavigationDirection = (typeof StepperNavigationDirection)[keyof typeof StepperNavigationDirection];
|
|
42
|
+
declare const StepperActivationMode: {
|
|
43
|
+
readonly AUTOMATIC: "automatic";
|
|
44
|
+
readonly MANUAL: "manual";
|
|
45
|
+
};
|
|
46
|
+
type StepperActivationMode = (typeof StepperActivationMode)[keyof typeof StepperActivationMode];
|
|
47
|
+
declare const StepperDataState: {
|
|
48
|
+
readonly INACTIVE: "inactive";
|
|
49
|
+
readonly ACTIVE: "active";
|
|
50
|
+
readonly COMPLETED: "completed";
|
|
51
|
+
};
|
|
52
|
+
type StepperDataState = (typeof StepperDataState)[keyof typeof StepperDataState];
|
|
53
|
+
type StepIndicators = {
|
|
54
|
+
active?: React.ReactNode;
|
|
55
|
+
completed?: React.ReactNode;
|
|
56
|
+
inactive?: React.ReactNode;
|
|
57
|
+
loading?: React.ReactNode;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
interface StepperContextValue {
|
|
61
|
+
id: string;
|
|
62
|
+
dir: Direction;
|
|
63
|
+
orientation: StepperOrientation;
|
|
64
|
+
activationMode: StepperActivationMode;
|
|
65
|
+
disabled: boolean;
|
|
66
|
+
nonInteractive: boolean;
|
|
67
|
+
loop: boolean;
|
|
68
|
+
indicators: StepIndicators;
|
|
69
|
+
}
|
|
70
|
+
declare function useStepperContext(consumerName: string): StepperContextValue;
|
|
71
|
+
|
|
72
|
+
type StepperTriggerElement = React.ComponentRef<typeof StepperTrigger>;
|
|
73
|
+
type StepperTriggerProps = React.ComponentProps<"button"> & {
|
|
74
|
+
asChild?: boolean;
|
|
75
|
+
};
|
|
76
|
+
declare function StepperTrigger({ asChild, disabled, className, ref, ...triggerProps }: StepperTriggerProps): react_jsx_runtime.JSX.Element;
|
|
77
|
+
|
|
78
|
+
type StepperItemData = {
|
|
79
|
+
id: string;
|
|
80
|
+
ref: React.RefObject<StepperTriggerElement | null>;
|
|
81
|
+
value: string;
|
|
82
|
+
active: boolean;
|
|
83
|
+
disabled: boolean;
|
|
84
|
+
};
|
|
85
|
+
type StepperFocusContextValue = {
|
|
86
|
+
tabStopId: string | null;
|
|
87
|
+
onItemFocus: (tabStopId: string) => void;
|
|
88
|
+
onItemShiftTab: () => void;
|
|
89
|
+
onFocusableItemAdd: () => void;
|
|
90
|
+
onFocusableItemRemove: () => void;
|
|
91
|
+
onItemRegister: (item: StepperItemData) => void;
|
|
92
|
+
onItemUnregister: (id: string) => void;
|
|
93
|
+
getItems: () => StepperItemData[];
|
|
94
|
+
};
|
|
95
|
+
declare function useStepperFocusContext(consumerName: string): StepperFocusContextValue;
|
|
96
|
+
|
|
97
|
+
type StepperNavProps = React.ComponentProps<"nav"> & {
|
|
98
|
+
asChild?: boolean;
|
|
99
|
+
};
|
|
100
|
+
declare function StepperNav({ className, children, asChild, ref, ...listProps }: StepperNavProps): react_jsx_runtime.JSX.Element;
|
|
101
|
+
|
|
102
|
+
type StepperItemProps = React.ComponentProps<"div"> & {
|
|
103
|
+
asChild?: boolean;
|
|
104
|
+
value: string;
|
|
105
|
+
completed?: boolean;
|
|
106
|
+
disabled?: boolean;
|
|
107
|
+
loading?: boolean;
|
|
108
|
+
};
|
|
109
|
+
declare function StepperItem({ value: itemValue, completed, disabled, loading, asChild, className, children, ...props }: StepperItemProps): react_jsx_runtime.JSX.Element;
|
|
110
|
+
|
|
111
|
+
type StepperStepState = {
|
|
112
|
+
value: string;
|
|
113
|
+
completed: boolean;
|
|
114
|
+
disabled: boolean;
|
|
115
|
+
loading: boolean;
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
type StepperItemContextValue = {
|
|
119
|
+
value: string;
|
|
120
|
+
stepState: StepperStepState | undefined;
|
|
121
|
+
};
|
|
122
|
+
declare function useStepperItemContext(consumerName: string): StepperItemContextValue;
|
|
123
|
+
|
|
124
|
+
type StepperIndicatorProps = Omit<React.ComponentProps<"div">, "children"> & {
|
|
125
|
+
asChild?: boolean;
|
|
126
|
+
children?: React.ReactNode | ((dataState: StepperDataState) => React.ReactNode);
|
|
127
|
+
};
|
|
128
|
+
declare function StepperIndicator({ className, children, asChild, ref, ...props }: StepperIndicatorProps): react_jsx_runtime.JSX.Element;
|
|
129
|
+
|
|
130
|
+
type StepperTitleProps = React.ComponentProps<"h3"> & {
|
|
131
|
+
asChild?: boolean;
|
|
132
|
+
};
|
|
133
|
+
declare function StepperTitle({ className, asChild, ...props }: StepperTitleProps): react_jsx_runtime.JSX.Element;
|
|
134
|
+
|
|
135
|
+
type StepperDescriptionProps = React.ComponentProps<"span"> & {
|
|
136
|
+
asChild?: boolean;
|
|
137
|
+
};
|
|
138
|
+
declare function StepperDescription({ className, asChild, ...props }: StepperDescriptionProps): react_jsx_runtime.JSX.Element;
|
|
139
|
+
|
|
140
|
+
type StepperPanelProps = React__default.ComponentProps<"div"> & {
|
|
141
|
+
asChild?: boolean;
|
|
142
|
+
};
|
|
143
|
+
declare function StepperPanel({ children, asChild, className, ...props }: StepperPanelProps): react_jsx_runtime.JSX.Element;
|
|
144
|
+
|
|
145
|
+
type StepperContentProps = React.ComponentProps<"div"> & {
|
|
146
|
+
asChild?: boolean;
|
|
147
|
+
value: string;
|
|
148
|
+
forceMount?: boolean;
|
|
149
|
+
};
|
|
150
|
+
declare function StepperContent({ value: valueProp, asChild, forceMount, className, ...props }: StepperContentProps): react_jsx_runtime.JSX.Element | null;
|
|
151
|
+
|
|
152
|
+
type StepperNextTriggerProps = React.ComponentProps<"button"> & {
|
|
153
|
+
asChild?: boolean;
|
|
154
|
+
};
|
|
155
|
+
declare function StepperNextTrigger({ asChild, onClick, disabled, ...props }: StepperNextTriggerProps): react_jsx_runtime.JSX.Element;
|
|
156
|
+
|
|
157
|
+
type StepperPrevTriggerProps = React.ComponentProps<"button"> & {
|
|
158
|
+
asChild?: boolean;
|
|
159
|
+
};
|
|
160
|
+
declare function StepperPrevTrigger({ asChild, disabled, onClick, ...props }: StepperPrevTriggerProps): react_jsx_runtime.JSX.Element;
|
|
161
|
+
|
|
162
|
+
export { type StepIndicators, Stepper, StepperActivationMode, StepperContent, type StepperContentProps, StepperDataState, StepperDescription, type StepperDescriptionProps, StepperFocusIntent, StepperIndicator, type StepperIndicatorProps, StepperItem, type StepperItemProps, StepperNav, type StepperNavProps, StepperNavigationDirection, StepperNextTrigger, type StepperNextTriggerProps, StepperOrientation, StepperPanel, type StepperPanelProps, StepperPrevTrigger, type StepperPrevTriggerProps, type StepperProps, StepperTitle, type StepperTitleProps, StepperTrigger, type StepperTriggerElement, type StepperTriggerProps, useStepperContext, useStepperFocusContext, useStepperItemContext };
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import React__default from 'react';
|
|
4
|
+
import { Direction } from '../../contexts/index.js';
|
|
5
|
+
|
|
6
|
+
type StepperProps = React.ComponentProps<"div"> & {
|
|
7
|
+
asChild?: boolean;
|
|
8
|
+
value?: string;
|
|
9
|
+
defaultValue?: string;
|
|
10
|
+
onValueChange?: (value: string) => void;
|
|
11
|
+
onValueComplete?: (value: string, completed: boolean) => void;
|
|
12
|
+
onValueAdd?: (value: string) => void;
|
|
13
|
+
onValueRemove?: (value: string) => void;
|
|
14
|
+
onValidate?: (value: string, direction: StepperNavigationDirection) => boolean | Promise<boolean>;
|
|
15
|
+
activationMode?: StepperActivationMode;
|
|
16
|
+
dir?: Direction;
|
|
17
|
+
orientation?: StepperOrientation;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
loop?: boolean;
|
|
20
|
+
nonInteractive?: boolean;
|
|
21
|
+
indicators?: StepIndicators;
|
|
22
|
+
};
|
|
23
|
+
declare function Stepper({ value, defaultValue, onValueChange, onValueComplete, onValueAdd, onValueRemove, onValidate, id: idProp, dir: dirProp, orientation, activationMode, asChild, disabled, nonInteractive, loop, className, indicators, ...rootProps }: StepperProps): react_jsx_runtime.JSX.Element;
|
|
24
|
+
|
|
25
|
+
declare const StepperFocusIntent: {
|
|
26
|
+
readonly FIRST: "first";
|
|
27
|
+
readonly LAST: "last";
|
|
28
|
+
readonly PREV: "prev";
|
|
29
|
+
readonly NEXT: "next";
|
|
30
|
+
};
|
|
31
|
+
type StepperFocusIntent = (typeof StepperFocusIntent)[keyof typeof StepperFocusIntent];
|
|
32
|
+
declare const StepperOrientation: {
|
|
33
|
+
readonly HORIZONTAL: "horizontal";
|
|
34
|
+
readonly VERTICAL: "vertical";
|
|
35
|
+
};
|
|
36
|
+
type StepperOrientation = (typeof StepperOrientation)[keyof typeof StepperOrientation];
|
|
37
|
+
declare const StepperNavigationDirection: {
|
|
38
|
+
readonly NEXT: "next";
|
|
39
|
+
readonly PREV: "prev";
|
|
40
|
+
};
|
|
41
|
+
type StepperNavigationDirection = (typeof StepperNavigationDirection)[keyof typeof StepperNavigationDirection];
|
|
42
|
+
declare const StepperActivationMode: {
|
|
43
|
+
readonly AUTOMATIC: "automatic";
|
|
44
|
+
readonly MANUAL: "manual";
|
|
45
|
+
};
|
|
46
|
+
type StepperActivationMode = (typeof StepperActivationMode)[keyof typeof StepperActivationMode];
|
|
47
|
+
declare const StepperDataState: {
|
|
48
|
+
readonly INACTIVE: "inactive";
|
|
49
|
+
readonly ACTIVE: "active";
|
|
50
|
+
readonly COMPLETED: "completed";
|
|
51
|
+
};
|
|
52
|
+
type StepperDataState = (typeof StepperDataState)[keyof typeof StepperDataState];
|
|
53
|
+
type StepIndicators = {
|
|
54
|
+
active?: React.ReactNode;
|
|
55
|
+
completed?: React.ReactNode;
|
|
56
|
+
inactive?: React.ReactNode;
|
|
57
|
+
loading?: React.ReactNode;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
interface StepperContextValue {
|
|
61
|
+
id: string;
|
|
62
|
+
dir: Direction;
|
|
63
|
+
orientation: StepperOrientation;
|
|
64
|
+
activationMode: StepperActivationMode;
|
|
65
|
+
disabled: boolean;
|
|
66
|
+
nonInteractive: boolean;
|
|
67
|
+
loop: boolean;
|
|
68
|
+
indicators: StepIndicators;
|
|
69
|
+
}
|
|
70
|
+
declare function useStepperContext(consumerName: string): StepperContextValue;
|
|
71
|
+
|
|
72
|
+
type StepperTriggerElement = React.ComponentRef<typeof StepperTrigger>;
|
|
73
|
+
type StepperTriggerProps = React.ComponentProps<"button"> & {
|
|
74
|
+
asChild?: boolean;
|
|
75
|
+
};
|
|
76
|
+
declare function StepperTrigger({ asChild, disabled, className, ref, ...triggerProps }: StepperTriggerProps): react_jsx_runtime.JSX.Element;
|
|
77
|
+
|
|
78
|
+
type StepperItemData = {
|
|
79
|
+
id: string;
|
|
80
|
+
ref: React.RefObject<StepperTriggerElement | null>;
|
|
81
|
+
value: string;
|
|
82
|
+
active: boolean;
|
|
83
|
+
disabled: boolean;
|
|
84
|
+
};
|
|
85
|
+
type StepperFocusContextValue = {
|
|
86
|
+
tabStopId: string | null;
|
|
87
|
+
onItemFocus: (tabStopId: string) => void;
|
|
88
|
+
onItemShiftTab: () => void;
|
|
89
|
+
onFocusableItemAdd: () => void;
|
|
90
|
+
onFocusableItemRemove: () => void;
|
|
91
|
+
onItemRegister: (item: StepperItemData) => void;
|
|
92
|
+
onItemUnregister: (id: string) => void;
|
|
93
|
+
getItems: () => StepperItemData[];
|
|
94
|
+
};
|
|
95
|
+
declare function useStepperFocusContext(consumerName: string): StepperFocusContextValue;
|
|
96
|
+
|
|
97
|
+
type StepperNavProps = React.ComponentProps<"nav"> & {
|
|
98
|
+
asChild?: boolean;
|
|
99
|
+
};
|
|
100
|
+
declare function StepperNav({ className, children, asChild, ref, ...listProps }: StepperNavProps): react_jsx_runtime.JSX.Element;
|
|
101
|
+
|
|
102
|
+
type StepperItemProps = React.ComponentProps<"div"> & {
|
|
103
|
+
asChild?: boolean;
|
|
104
|
+
value: string;
|
|
105
|
+
completed?: boolean;
|
|
106
|
+
disabled?: boolean;
|
|
107
|
+
loading?: boolean;
|
|
108
|
+
};
|
|
109
|
+
declare function StepperItem({ value: itemValue, completed, disabled, loading, asChild, className, children, ...props }: StepperItemProps): react_jsx_runtime.JSX.Element;
|
|
110
|
+
|
|
111
|
+
type StepperStepState = {
|
|
112
|
+
value: string;
|
|
113
|
+
completed: boolean;
|
|
114
|
+
disabled: boolean;
|
|
115
|
+
loading: boolean;
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
type StepperItemContextValue = {
|
|
119
|
+
value: string;
|
|
120
|
+
stepState: StepperStepState | undefined;
|
|
121
|
+
};
|
|
122
|
+
declare function useStepperItemContext(consumerName: string): StepperItemContextValue;
|
|
123
|
+
|
|
124
|
+
type StepperIndicatorProps = Omit<React.ComponentProps<"div">, "children"> & {
|
|
125
|
+
asChild?: boolean;
|
|
126
|
+
children?: React.ReactNode | ((dataState: StepperDataState) => React.ReactNode);
|
|
127
|
+
};
|
|
128
|
+
declare function StepperIndicator({ className, children, asChild, ref, ...props }: StepperIndicatorProps): react_jsx_runtime.JSX.Element;
|
|
129
|
+
|
|
130
|
+
type StepperTitleProps = React.ComponentProps<"h3"> & {
|
|
131
|
+
asChild?: boolean;
|
|
132
|
+
};
|
|
133
|
+
declare function StepperTitle({ className, asChild, ...props }: StepperTitleProps): react_jsx_runtime.JSX.Element;
|
|
134
|
+
|
|
135
|
+
type StepperDescriptionProps = React.ComponentProps<"span"> & {
|
|
136
|
+
asChild?: boolean;
|
|
137
|
+
};
|
|
138
|
+
declare function StepperDescription({ className, asChild, ...props }: StepperDescriptionProps): react_jsx_runtime.JSX.Element;
|
|
139
|
+
|
|
140
|
+
type StepperPanelProps = React__default.ComponentProps<"div"> & {
|
|
141
|
+
asChild?: boolean;
|
|
142
|
+
};
|
|
143
|
+
declare function StepperPanel({ children, asChild, className, ...props }: StepperPanelProps): react_jsx_runtime.JSX.Element;
|
|
144
|
+
|
|
145
|
+
type StepperContentProps = React.ComponentProps<"div"> & {
|
|
146
|
+
asChild?: boolean;
|
|
147
|
+
value: string;
|
|
148
|
+
forceMount?: boolean;
|
|
149
|
+
};
|
|
150
|
+
declare function StepperContent({ value: valueProp, asChild, forceMount, className, ...props }: StepperContentProps): react_jsx_runtime.JSX.Element | null;
|
|
151
|
+
|
|
152
|
+
type StepperNextTriggerProps = React.ComponentProps<"button"> & {
|
|
153
|
+
asChild?: boolean;
|
|
154
|
+
};
|
|
155
|
+
declare function StepperNextTrigger({ asChild, onClick, disabled, ...props }: StepperNextTriggerProps): react_jsx_runtime.JSX.Element;
|
|
156
|
+
|
|
157
|
+
type StepperPrevTriggerProps = React.ComponentProps<"button"> & {
|
|
158
|
+
asChild?: boolean;
|
|
159
|
+
};
|
|
160
|
+
declare function StepperPrevTrigger({ asChild, disabled, onClick, ...props }: StepperPrevTriggerProps): react_jsx_runtime.JSX.Element;
|
|
161
|
+
|
|
162
|
+
export { type StepIndicators, Stepper, StepperActivationMode, StepperContent, type StepperContentProps, StepperDataState, StepperDescription, type StepperDescriptionProps, StepperFocusIntent, StepperIndicator, type StepperIndicatorProps, StepperItem, type StepperItemProps, StepperNav, type StepperNavProps, StepperNavigationDirection, StepperNextTrigger, type StepperNextTriggerProps, StepperOrientation, StepperPanel, type StepperPanelProps, StepperPrevTrigger, type StepperPrevTriggerProps, type StepperProps, StepperTitle, type StepperTitleProps, StepperTrigger, type StepperTriggerElement, type StepperTriggerProps, useStepperContext, useStepperFocusContext, useStepperItemContext };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export { Stepper, StepperActivationMode, StepperContent, StepperDataState, StepperDescription, StepperFocusIntent, StepperIndicator, StepperItem, StepperNav, StepperNavigationDirection, StepperNextTrigger, StepperOrientation, StepperPanel, StepperPrevTrigger, StepperTitle, StepperTrigger, useStepperContext, useStepperFocusContext, useStepperItemContext } from '../../chunk-5RNHEHRL.js';
|
|
2
|
+
import '../../chunk-MI3CQBHC.js';
|
|
3
|
+
import '../../chunk-P5IUC7HJ.js';
|
|
4
|
+
import '../../chunk-DTSFPOLX.js';
|
|
5
|
+
import '../../chunk-RXYZURP4.js';
|
|
6
|
+
import '../../chunk-IAI7BIAG.js';
|
|
7
|
+
import '../../chunk-HJJPEVIH.js';
|
|
8
|
+
import '../../chunk-YJFJLF7Y.js';
|
|
9
|
+
import '../../chunk-V5OVQTDR.js';
|
|
10
|
+
import '../../chunk-AGVEKVWD.js';
|
|
11
|
+
import '../../chunk-5PBHBOXI.js';
|
|
12
|
+
import '../../chunk-UW6GOD7J.js';
|
|
13
|
+
import '../../chunk-VZKTT6CG.js';
|
|
14
|
+
import '../../chunk-36YD6ICC.js';
|
|
15
|
+
import '../../chunk-H5O5L6XT.js';
|
|
16
|
+
import '../../chunk-DFD2WUOU.js';
|
|
17
|
+
import '../../chunk-XTO7CMIM.js';
|
|
18
|
+
import '../../chunk-5MJPZUTO.js';
|
|
19
|
+
import '../../chunk-EU7G37IS.js';
|
|
20
|
+
import '../../chunk-7V34QHYR.js';
|
|
21
|
+
import '../../chunk-ZD2QRAOX.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkOIWEXHFE_cjs = require('../../chunk-OIWEXHFE.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "Textarea", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkOIWEXHFE_cjs.Textarea; }
|
|
10
10
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Textarea } from '../../chunk-
|
|
1
|
+
export { Textarea } from '../../chunk-IAI7BIAG.js';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkEW6TE3N5_cjs = require('../chunk-EW6TE3N5.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "Direction", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () { return chunkEW6TE3N5_cjs.Direction; }
|
|
10
|
+
});
|
|
11
|
+
Object.defineProperty(exports, "DirectionContext", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () { return chunkEW6TE3N5_cjs.DirectionContext; }
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(exports, "useDirection", {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () { return chunkEW6TE3N5_cjs.useDirection; }
|
|
18
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
declare const Direction: {
|
|
4
|
+
readonly LTR: "ltr";
|
|
5
|
+
readonly RTL: "rtl";
|
|
6
|
+
};
|
|
7
|
+
type Direction = (typeof Direction)[keyof typeof Direction];
|
|
8
|
+
declare const DirectionContext: React.Context<Direction | undefined>;
|
|
9
|
+
declare function useDirection(dirProp?: Direction): Direction;
|
|
10
|
+
|
|
11
|
+
export { Direction, DirectionContext, useDirection };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
declare const Direction: {
|
|
4
|
+
readonly LTR: "ltr";
|
|
5
|
+
readonly RTL: "rtl";
|
|
6
|
+
};
|
|
7
|
+
type Direction = (typeof Direction)[keyof typeof Direction];
|
|
8
|
+
declare const DirectionContext: React.Context<Direction | undefined>;
|
|
9
|
+
declare function useDirection(dirProp?: Direction): Direction;
|
|
10
|
+
|
|
11
|
+
export { Direction, DirectionContext, useDirection };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Direction, DirectionContext, useDirection } from '../chunk-H5O5L6XT.js';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunk7EYMOUWG_cjs = require('../chunk-7EYMOUWG.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "useIsomorphicLayoutEffect", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () { return chunk7EYMOUWG_cjs.useIsomorphicLayoutEffect; }
|
|
10
|
+
});
|
|
11
|
+
Object.defineProperty(exports, "useLazyRef", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () { return chunk7EYMOUWG_cjs.useLazyRef; }
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(exports, "useValidationLog", {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () { return chunk7EYMOUWG_cjs.useValidationLog; }
|
|
18
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface UseValidationLogProps {
|
|
4
|
+
check: boolean;
|
|
5
|
+
scope: string;
|
|
6
|
+
message: string;
|
|
7
|
+
}
|
|
8
|
+
declare function useValidationLog({ check, scope, message }: UseValidationLogProps): void;
|
|
9
|
+
|
|
10
|
+
declare function useLazyRef<T>(fn: () => T): React.RefObject<T>;
|
|
11
|
+
|
|
12
|
+
declare const useIsomorphicLayoutEffect: typeof React.useEffect;
|
|
13
|
+
|
|
14
|
+
export { useIsomorphicLayoutEffect, useLazyRef, useValidationLog };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface UseValidationLogProps {
|
|
4
|
+
check: boolean;
|
|
5
|
+
scope: string;
|
|
6
|
+
message: string;
|
|
7
|
+
}
|
|
8
|
+
declare function useValidationLog({ check, scope, message }: UseValidationLogProps): void;
|
|
9
|
+
|
|
10
|
+
declare function useLazyRef<T>(fn: () => T): React.RefObject<T>;
|
|
11
|
+
|
|
12
|
+
declare const useIsomorphicLayoutEffect: typeof React.useEffect;
|
|
13
|
+
|
|
14
|
+
export { useIsomorphicLayoutEffect, useLazyRef, useValidationLog };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useIsomorphicLayoutEffect, useLazyRef, useValidationLog } from '../chunk-DFD2WUOU.js';
|
package/dist/icons/index.d.cts
CHANGED
|
@@ -3,6 +3,9 @@ import * as React from 'react';
|
|
|
3
3
|
|
|
4
4
|
declare function GoogleLogoIcon(props: React.SVGProps<SVGSVGElement>): react_jsx_runtime.JSX.Element;
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated
|
|
8
|
+
*/
|
|
6
9
|
declare function LoadingIcon(props: React.SVGProps<SVGSVGElement>): react_jsx_runtime.JSX.Element;
|
|
7
10
|
|
|
8
11
|
declare function Auth0LogoIcon(props: React.SVGProps<SVGSVGElement>): react_jsx_runtime.JSX.Element;
|
package/dist/icons/index.d.ts
CHANGED
|
@@ -3,6 +3,9 @@ import * as React from 'react';
|
|
|
3
3
|
|
|
4
4
|
declare function GoogleLogoIcon(props: React.SVGProps<SVGSVGElement>): react_jsx_runtime.JSX.Element;
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated
|
|
8
|
+
*/
|
|
6
9
|
declare function LoadingIcon(props: React.SVGProps<SVGSVGElement>): react_jsx_runtime.JSX.Element;
|
|
7
10
|
|
|
8
11
|
declare function Auth0LogoIcon(props: React.SVGProps<SVGSVGElement>): react_jsx_runtime.JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@szum-tech/design-system",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.0",
|
|
4
4
|
"description": "Szum-Tech design system with tailwindcss support",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"szum-tech",
|
|
@@ -68,6 +68,26 @@
|
|
|
68
68
|
"require": "./dist/utils/index.cjs"
|
|
69
69
|
}
|
|
70
70
|
},
|
|
71
|
+
"./hooks": {
|
|
72
|
+
"import": {
|
|
73
|
+
"types": "./dist/hooks/index.d.ts",
|
|
74
|
+
"import": "./dist/hooks/index.js"
|
|
75
|
+
},
|
|
76
|
+
"require": {
|
|
77
|
+
"types": "./dist/hooks/index.d.cts",
|
|
78
|
+
"require": "./dist/hooks/index.cjs"
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"./contexts": {
|
|
82
|
+
"import": {
|
|
83
|
+
"types": "./dist/contexts/index.d.ts",
|
|
84
|
+
"import": "./dist/contexts/index.js"
|
|
85
|
+
},
|
|
86
|
+
"require": {
|
|
87
|
+
"types": "./dist/contexts/index.d.cts",
|
|
88
|
+
"require": "./dist/contexts/index.cjs"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
71
91
|
"./tailwind/*.css": "./tailwind/*.css",
|
|
72
92
|
"./package.json": "./package.json"
|
|
73
93
|
},
|
|
@@ -131,6 +151,7 @@
|
|
|
131
151
|
"@vitest/ui": "^3.1.4",
|
|
132
152
|
"cpy-cli": "^6.0.0",
|
|
133
153
|
"eslint": "^9.32.0",
|
|
154
|
+
"happy-dom": "^20.0.2",
|
|
134
155
|
"playwright": "^1.54.1",
|
|
135
156
|
"prettier": "^3.6.2",
|
|
136
157
|
"react": "^19.1.1",
|
package/dist/chunk-DH5YKYXV.cjs
DELETED
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkP4J2TTH7_cjs = require('./chunk-P4J2TTH7.cjs');
|
|
4
|
-
var chunkFVSO3RHT_cjs = require('./chunk-FVSO3RHT.cjs');
|
|
5
|
-
var reactHookForm = require('react-hook-form');
|
|
6
|
-
var React2 = require('react');
|
|
7
|
-
var tailwindMerge = require('tailwind-merge');
|
|
8
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
9
|
-
var reactSlot = require('@radix-ui/react-slot');
|
|
10
|
-
|
|
11
|
-
function _interopNamespace(e) {
|
|
12
|
-
if (e && e.__esModule) return e;
|
|
13
|
-
var n = Object.create(null);
|
|
14
|
-
if (e) {
|
|
15
|
-
Object.keys(e).forEach(function (k) {
|
|
16
|
-
if (k !== 'default') {
|
|
17
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
18
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function () { return e[k]; }
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
n.default = e;
|
|
26
|
-
return Object.freeze(n);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
var React2__namespace = /*#__PURE__*/_interopNamespace(React2);
|
|
30
|
-
|
|
31
|
-
var Form = reactHookForm.FormProvider;
|
|
32
|
-
var FormItemContext = React2__namespace.createContext({});
|
|
33
|
-
var FormItem = React2__namespace.forwardRef(function({ className, ...props }, ref) {
|
|
34
|
-
const id = React2__namespace.useId();
|
|
35
|
-
return /* @__PURE__ */ jsxRuntime.jsx(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: tailwindMerge.twMerge("space-y-2", className), ...props }) });
|
|
36
|
-
});
|
|
37
|
-
FormItem.displayName = "FormItem";
|
|
38
|
-
var FormFieldContext = React2__namespace.createContext({});
|
|
39
|
-
var FormField = ({
|
|
40
|
-
...props
|
|
41
|
-
}) => {
|
|
42
|
-
return /* @__PURE__ */ jsxRuntime.jsx(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsxRuntime.jsx(reactHookForm.Controller, { ...props }) });
|
|
43
|
-
};
|
|
44
|
-
var useFormField = () => {
|
|
45
|
-
const fieldContext = React2__namespace.useContext(FormFieldContext);
|
|
46
|
-
const itemContext = React2__namespace.useContext(FormItemContext);
|
|
47
|
-
const { getFieldState, formState } = reactHookForm.useFormContext();
|
|
48
|
-
const fieldState = getFieldState(fieldContext.name, formState);
|
|
49
|
-
if (!fieldContext) {
|
|
50
|
-
throw new Error("useFormField should be used within <FormField>");
|
|
51
|
-
}
|
|
52
|
-
const { id } = itemContext;
|
|
53
|
-
return {
|
|
54
|
-
id,
|
|
55
|
-
name: fieldContext.name,
|
|
56
|
-
formItemId: `${id}-form-item`,
|
|
57
|
-
formDescriptionId: `${id}-form-item-description`,
|
|
58
|
-
formMessageId: `${id}-form-item-message`,
|
|
59
|
-
...fieldState
|
|
60
|
-
};
|
|
61
|
-
};
|
|
62
|
-
var FormLabel = React2__namespace.forwardRef(
|
|
63
|
-
({ className, caption, ...props }, ref) => {
|
|
64
|
-
const { error, formItemId } = useFormField();
|
|
65
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row items-end justify-between", children: [
|
|
66
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
67
|
-
chunkFVSO3RHT_cjs.Label,
|
|
68
|
-
{
|
|
69
|
-
ref,
|
|
70
|
-
className: tailwindMerge.twMerge(error ? "text-error-500" : null, className),
|
|
71
|
-
htmlFor: formItemId,
|
|
72
|
-
...props
|
|
73
|
-
}
|
|
74
|
-
),
|
|
75
|
-
caption ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "typography-caption text-gray-200", children: caption }) : null
|
|
76
|
-
] });
|
|
77
|
-
}
|
|
78
|
-
);
|
|
79
|
-
FormLabel.displayName = "FormLabel";
|
|
80
|
-
var FormControl = React2__namespace.forwardRef(function(props, ref) {
|
|
81
|
-
const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
|
|
82
|
-
const newProps = { ...props, invalid: !!error };
|
|
83
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
84
|
-
reactSlot.Slot,
|
|
85
|
-
{
|
|
86
|
-
ref,
|
|
87
|
-
id: formItemId,
|
|
88
|
-
"aria-describedby": !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`,
|
|
89
|
-
"aria-invalid": !!error,
|
|
90
|
-
...newProps
|
|
91
|
-
}
|
|
92
|
-
);
|
|
93
|
-
});
|
|
94
|
-
FormControl.displayName = "FormControl";
|
|
95
|
-
var FormMessage = React2__namespace.forwardRef(function({ children, ...props }, ref) {
|
|
96
|
-
const { error, formMessageId } = useFormField();
|
|
97
|
-
const body = error ? String(error?.message) : children;
|
|
98
|
-
if (!body) {
|
|
99
|
-
return null;
|
|
100
|
-
}
|
|
101
|
-
return /* @__PURE__ */ jsxRuntime.jsx(chunkP4J2TTH7_cjs.HelperText, { ref, type: "error", id: formMessageId, ...props, children: body });
|
|
102
|
-
});
|
|
103
|
-
FormMessage.displayName = "FormMessage";
|
|
104
|
-
var FormDescription = React2__namespace.forwardRef(function(props, ref) {
|
|
105
|
-
const { formDescriptionId } = useFormField();
|
|
106
|
-
return /* @__PURE__ */ jsxRuntime.jsx(chunkP4J2TTH7_cjs.HelperText, { ref, id: formDescriptionId, ...props });
|
|
107
|
-
});
|
|
108
|
-
FormDescription.displayName = "FormDescription";
|
|
109
|
-
|
|
110
|
-
exports.Form = Form;
|
|
111
|
-
exports.FormControl = FormControl;
|
|
112
|
-
exports.FormDescription = FormDescription;
|
|
113
|
-
exports.FormField = FormField;
|
|
114
|
-
exports.FormItem = FormItem;
|
|
115
|
-
exports.FormLabel = FormLabel;
|
|
116
|
-
exports.FormMessage = FormMessage;
|