@spear-ai/spectral 1.3.55 → 1.3.57
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/.js +137 -150
- package/dist/Button.d.ts +2 -2
- package/dist/Button.js +47 -49
- package/dist/Dialog/DialogBase.d.ts +1 -1
- package/dist/Drawer.d.ts +1 -2
- package/dist/Drawer.js +217 -223
- package/dist/Popover.js +14 -12
- package/dist/RadioGroup.d.ts +34 -9
- package/dist/RadioGroup.js +504 -33
- package/dist/Select.js +588 -635
- package/dist/Tooltip.js +12 -10
- package/dist/components/Button/Button.d.ts +2 -2
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Dialog/DialogBase.d.ts +1 -1
- package/dist/components/Drawer/Drawer.d.ts +1 -2
- package/dist/components/Drawer/Drawer.d.ts.map +1 -1
- package/dist/components/RadioGroup/RadioGroup.d.ts +34 -9
- package/dist/components/RadioGroup/RadioGroup.d.ts.map +1 -1
- package/dist/index-CA7haECj.js +248 -0
- package/dist/index-CBwRmAsQ.js +69 -0
- package/dist/index-Cb7rjMhE.js +27 -0
- package/dist/index-CbXx14YO.js +59 -0
- package/dist/{index-CFeaEsew.js → index-Cfyte2YO.js} +1 -1
- package/dist/{index-BDYruyoU.js → index-DUK1rxhf.js} +1 -1
- package/dist/{index-C18a1qz_.js → index-FeGk8zep.js} +316 -338
- package/dist/index-VXXKXen4.js +15 -0
- package/dist/index-cCg4yNa8.js +132 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/styles/main.css +1 -1
- package/package.json +2 -1
- package/dist/index-Ddc_4vXe.js +0 -80
- package/dist/index-DfFzqLW6.js +0 -373
package/dist/.js
CHANGED
|
@@ -2,164 +2,151 @@ import { Alert as e } from "./Alert.js";
|
|
|
2
2
|
import { Badge as p } from "./Badge.js";
|
|
3
3
|
import { Button as m } from "./Button.js";
|
|
4
4
|
import { ButtonIcon as x } from "./ButtonIcon.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
5
|
+
import { Dialog as I } from "./Dialog.js";
|
|
6
|
+
import { Drawer as l } from "./Drawer.js";
|
|
7
|
+
import { Input as i } from "./Input.js";
|
|
8
|
+
import { Label as C } from "./Label.js";
|
|
9
|
+
import { Popover as d, PopoverContent as T, PopoverTrigger as S } from "./Popover.js";
|
|
10
|
+
import { RadioButtonGroup as L, RadioButtonGroupItem as v } from "./RadioButtonGroup.js";
|
|
11
|
+
import { RadioGroup as P, RadioGroupItem as k } from "./RadioGroup.js";
|
|
12
|
+
import { Select as D } from "./Select.js";
|
|
13
|
+
import { Skeleton as b } from "./Skeleton.js";
|
|
14
|
+
import { Slider as R } from "./Slider.js";
|
|
15
|
+
import { Switch as A } from "./Switch.js";
|
|
16
|
+
import { Tabs as U } from "./Tabs.js";
|
|
17
|
+
import { Textarea as q } from "./Textarea.js";
|
|
18
|
+
import { Toggle as H } from "./Toggle.js";
|
|
19
|
+
import { ToggleGroup as V, ToggleGroupItem as W } from "./ToggleGroup.js";
|
|
20
|
+
import { Tooltip as Y, TooltipContent as j, TooltipTrigger as z } from "./Tooltip.js";
|
|
18
21
|
import { AnnotationsIcon as K } from "./Icons/AnnotationsIcon.js";
|
|
19
|
-
import { CalendarIcon as
|
|
20
|
-
import { CheckCircleIcon as
|
|
21
|
-
import { CheckSquareIcon as
|
|
22
|
-
import { CheckmarkIcon as
|
|
23
|
-
import { ChevronDownIcon as
|
|
24
|
-
import { ChevronUpIcon as
|
|
25
|
-
import { ClockIcon as
|
|
26
|
-
import { CloseCircleIcon as
|
|
27
|
-
import { CloseIcon as
|
|
28
|
-
import { DashboardIcon as
|
|
29
|
-
import { DeleteIcon as
|
|
30
|
-
import { DurationIcon as
|
|
31
|
-
import { EmailIcon as
|
|
32
|
-
import { EraserIcon as
|
|
33
|
-
import { ErrorIcon as
|
|
34
|
-
import { EyeClosedIcon as
|
|
35
|
-
import { EyeClosedIcon2 as
|
|
36
|
-
import { EyeOpenIcon as
|
|
37
|
-
import { GoToFirstIcon as
|
|
38
|
-
import { GoToLastIcon as
|
|
39
|
-
import { HarmonicCursorsIcon as
|
|
40
|
-
import { InfoIcon as
|
|
41
|
-
import { LabelIcon as
|
|
42
|
-
import { LassoIcon as
|
|
43
|
-
import { LineToolIcon as
|
|
44
|
-
import { LiveViewIcon as
|
|
22
|
+
import { CalendarIcon as Q } from "./Icons/CalendarIcon.js";
|
|
23
|
+
import { CheckCircleIcon as $ } from "./Icons/CheckCircleIcon.js";
|
|
24
|
+
import { CheckSquareIcon as ro } from "./Icons/CheckSquareIcon.js";
|
|
25
|
+
import { CheckmarkIcon as to } from "./Icons/CheckmarkIcon.js";
|
|
26
|
+
import { ChevronDownIcon as no } from "./Icons/ChevronDownIcon.js";
|
|
27
|
+
import { ChevronUpIcon as fo } from "./Icons/ChevronUpIcon.js";
|
|
28
|
+
import { ClockIcon as co } from "./Icons/ClockIcon.js";
|
|
29
|
+
import { CloseCircleIcon as ao } from "./Icons/CloseCircleIcon.js";
|
|
30
|
+
import { CloseIcon as so } from "./Icons/CloseIcon.js";
|
|
31
|
+
import { DashboardIcon as uo } from "./Icons/DashboardIcon.js";
|
|
32
|
+
import { DeleteIcon as go } from "./Icons/DeleteIcon.js";
|
|
33
|
+
import { DurationIcon as So } from "./Icons/DurationIcon.js";
|
|
34
|
+
import { EmailIcon as Lo } from "./Icons/EmailIcon.js";
|
|
35
|
+
import { EraserIcon as Go } from "./Icons/EraserIcon.js";
|
|
36
|
+
import { ErrorIcon as ko } from "./Icons/ErrorIcon.js";
|
|
37
|
+
import { EyeClosedIcon as Do } from "./Icons/EyeClosedIcon.js";
|
|
38
|
+
import { EyeClosedIcon2 as bo } from "./Icons/EyeClosedIcon2.js";
|
|
39
|
+
import { EyeOpenIcon as Ro } from "./Icons/EyeOpenIcon.js";
|
|
40
|
+
import { GoToFirstIcon as Ao } from "./Icons/GoToFirstIcon.js";
|
|
41
|
+
import { GoToLastIcon as Uo } from "./Icons/GoToLastIcon.js";
|
|
42
|
+
import { HarmonicCursorsIcon as qo } from "./Icons/HarmonicCursorsIcon.js";
|
|
43
|
+
import { InfoIcon as Ho } from "./Icons/InfoIcon.js";
|
|
44
|
+
import { LabelIcon as Vo } from "./Icons/LabelIcon.js";
|
|
45
|
+
import { LassoIcon as Xo } from "./Icons/LassoIcon.js";
|
|
46
|
+
import { LineToolIcon as jo } from "./Icons/LineToolIcon.js";
|
|
47
|
+
import { LiveViewIcon as Jo } from "./Icons/LiveViewIcon.js";
|
|
45
48
|
import { LoaderIcon as No } from "./Icons/LoaderIcon.js";
|
|
46
|
-
import { LocationIcon as
|
|
47
|
-
import { LogoutIcon as
|
|
48
|
-
import { MetadataIcon as
|
|
49
|
-
import { OntologyIcon as
|
|
50
|
-
import { PanelIconClose as
|
|
51
|
-
import { PanelIconOpen as
|
|
52
|
-
import { PlayIcon as
|
|
53
|
-
import { PlusIcon as
|
|
54
|
-
import { ResetIcon as
|
|
55
|
-
import { ScissorsIcon as
|
|
56
|
-
import { SettingsIcon as
|
|
57
|
-
import { TrashIcon as
|
|
58
|
-
import { UndoIcon as
|
|
59
|
-
import { UserIcon as
|
|
60
|
-
import { WarningIcon as
|
|
61
|
-
import { ZoomAllIcon as
|
|
62
|
-
import { ZoomXIcon as
|
|
63
|
-
import { ZoomYIcon as
|
|
64
|
-
import { default as
|
|
65
|
-
import { useControllableState as
|
|
66
|
-
import { useTheme as
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import { SpectralProvider as ee } from "./SpectralProvider.js";
|
|
49
|
+
import { LocationIcon as _o } from "./Icons/LocationIcon.js";
|
|
50
|
+
import { LogoutIcon as or } from "./Icons/LogoutIcon.js";
|
|
51
|
+
import { MetadataIcon as er } from "./Icons/MetadataIcon.js";
|
|
52
|
+
import { OntologyIcon as pr } from "./Icons/OntologyIcon.js";
|
|
53
|
+
import { PanelIconClose as mr } from "./Icons/PanelIconClose.js";
|
|
54
|
+
import { PanelIconOpen as xr } from "./Icons/PanelIconOpen.js";
|
|
55
|
+
import { PlayIcon as Ir } from "./Icons/PlayIcon.js";
|
|
56
|
+
import { PlusIcon as lr } from "./Icons/PlusIcon.js";
|
|
57
|
+
import { ResetIcon as ir } from "./Icons/ResetIcon.js";
|
|
58
|
+
import { ScissorsIcon as Cr } from "./Icons/ScissorsIcon.js";
|
|
59
|
+
import { SettingsIcon as dr } from "./Icons/SettingsIcon.js";
|
|
60
|
+
import { TrashIcon as Sr } from "./Icons/TrashIcon.js";
|
|
61
|
+
import { UndoIcon as Lr } from "./Icons/UndoIcon.js";
|
|
62
|
+
import { UserIcon as Gr } from "./Icons/UserIcon.js";
|
|
63
|
+
import { WarningIcon as kr } from "./Icons/WarningIcon.js";
|
|
64
|
+
import { ZoomAllIcon as Dr } from "./Icons/ZoomAllIcon.js";
|
|
65
|
+
import { ZoomXIcon as br } from "./Icons/ZoomXIcon.js";
|
|
66
|
+
import { ZoomYIcon as Rr } from "./Icons/ZoomYIcon.js";
|
|
67
|
+
import { default as Ar, SvgIdContext as Or } from "./Icons/IconBase.js";
|
|
68
|
+
import { useControllableState as Zr } from "./hooks/useControllableState.js";
|
|
69
|
+
import { useTheme as Fr } from "./hooks/useTheme.js";
|
|
70
|
+
import { c as Mr } from "./twUtils-CRiPKpXj.js";
|
|
71
|
+
import { SpectralProvider as Wr } from "./SpectralProvider.js";
|
|
70
72
|
export {
|
|
71
73
|
e as Alert,
|
|
72
74
|
K as AnnotationsIcon,
|
|
73
75
|
p as Badge,
|
|
74
76
|
m as Button,
|
|
75
77
|
x as ButtonIcon,
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
78
|
+
Q as CalendarIcon,
|
|
79
|
+
$ as CheckCircleIcon,
|
|
80
|
+
ro as CheckSquareIcon,
|
|
81
|
+
to as CheckmarkIcon,
|
|
82
|
+
no as ChevronDownIcon,
|
|
83
|
+
fo as ChevronUpIcon,
|
|
84
|
+
co as ClockIcon,
|
|
85
|
+
ao as CloseCircleIcon,
|
|
86
|
+
so as CloseIcon,
|
|
87
|
+
uo as DashboardIcon,
|
|
88
|
+
go as DeleteIcon,
|
|
89
|
+
I as Dialog,
|
|
90
|
+
l as Drawer,
|
|
91
|
+
So as DurationIcon,
|
|
92
|
+
Lo as EmailIcon,
|
|
93
|
+
Go as EraserIcon,
|
|
94
|
+
ko as ErrorIcon,
|
|
95
|
+
Do as EyeClosedIcon,
|
|
96
|
+
bo as EyeClosedIcon2,
|
|
97
|
+
Ro as EyeOpenIcon,
|
|
98
|
+
Ao as GoToFirstIcon,
|
|
99
|
+
Uo as GoToLastIcon,
|
|
100
|
+
qo as HarmonicCursorsIcon,
|
|
101
|
+
Ar as IconBase,
|
|
102
|
+
Ho as InfoIcon,
|
|
103
|
+
i as Input,
|
|
104
|
+
C as Label,
|
|
105
|
+
Vo as LabelIcon,
|
|
106
|
+
Xo as LassoIcon,
|
|
107
|
+
jo as LineToolIcon,
|
|
108
|
+
Jo as LiveViewIcon,
|
|
107
109
|
No as LoaderIcon,
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
S as RadioButtonGroupItem,
|
|
110
|
+
_o as LocationIcon,
|
|
111
|
+
or as LogoutIcon,
|
|
112
|
+
er as MetadataIcon,
|
|
113
|
+
pr as OntologyIcon,
|
|
114
|
+
mr as PanelIconClose,
|
|
115
|
+
xr as PanelIconOpen,
|
|
116
|
+
Ir as PlayIcon,
|
|
117
|
+
lr as PlusIcon,
|
|
118
|
+
d as Popover,
|
|
119
|
+
T as PopoverContent,
|
|
120
|
+
S as PopoverTrigger,
|
|
121
|
+
L as RadioButtonGroup,
|
|
122
|
+
v as RadioButtonGroupItem,
|
|
122
123
|
P as RadioGroup,
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
Zr as
|
|
150
|
-
|
|
151
|
-
qr as getFormFieldCSSProperties,
|
|
152
|
-
Hr as getInputClasses,
|
|
153
|
-
Kr as getOptionClasses,
|
|
154
|
-
Nr as getStateClasses,
|
|
155
|
-
Wr as getTextareaClasses,
|
|
156
|
-
Xr as getTriggerClasses,
|
|
157
|
-
Yr as groupOptions,
|
|
158
|
-
jr as scrollIntoView,
|
|
159
|
-
zr as useClickOutside,
|
|
160
|
-
Br as useControllableState,
|
|
161
|
-
Jr as useFormFieldId,
|
|
162
|
-
Qr as useFormFieldState,
|
|
163
|
-
_r as useKeyboardNavigation,
|
|
164
|
-
Or as useTheme
|
|
124
|
+
k as RadioGroupItem,
|
|
125
|
+
ir as ResetIcon,
|
|
126
|
+
Cr as ScissorsIcon,
|
|
127
|
+
D as Select,
|
|
128
|
+
dr as SettingsIcon,
|
|
129
|
+
b as Skeleton,
|
|
130
|
+
R as Slider,
|
|
131
|
+
Wr as SpectralProvider,
|
|
132
|
+
Or as SvgIdContext,
|
|
133
|
+
A as Switch,
|
|
134
|
+
U as Tabs,
|
|
135
|
+
q as Textarea,
|
|
136
|
+
H as Toggle,
|
|
137
|
+
V as ToggleGroup,
|
|
138
|
+
W as ToggleGroupItem,
|
|
139
|
+
Y as Tooltip,
|
|
140
|
+
j as TooltipContent,
|
|
141
|
+
z as TooltipTrigger,
|
|
142
|
+
Sr as TrashIcon,
|
|
143
|
+
Lr as UndoIcon,
|
|
144
|
+
Gr as UserIcon,
|
|
145
|
+
kr as WarningIcon,
|
|
146
|
+
Dr as ZoomAllIcon,
|
|
147
|
+
br as ZoomXIcon,
|
|
148
|
+
Rr as ZoomYIcon,
|
|
149
|
+
Mr as cn,
|
|
150
|
+
Zr as useControllableState,
|
|
151
|
+
Fr as useTheme
|
|
165
152
|
};
|
package/dist/Button.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
2
2
|
import { ButtonHTMLAttributes, MouseEvent, ReactNode } from 'react';
|
|
3
3
|
declare const buttonVariants: (props?: ({
|
|
4
4
|
variant?: "secondary" | "outline" | "primary" | "ghost" | null | undefined;
|
|
5
|
-
size?: "default" | "
|
|
5
|
+
size?: "default" | "fullWidth" | null | undefined;
|
|
6
6
|
state?: "default" | "error" | "loading" | null | undefined;
|
|
7
7
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
8
|
export interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'color'>, VariantProps<typeof buttonVariants> {
|
|
@@ -13,7 +13,7 @@ export interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement
|
|
|
13
13
|
onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
14
14
|
readonly dataTestId?: string;
|
|
15
15
|
readonly label: string;
|
|
16
|
-
readonly size?: 'default' | '
|
|
16
|
+
readonly size?: 'default' | 'fullWidth';
|
|
17
17
|
readonly state?: 'loading' | 'error' | 'default';
|
|
18
18
|
readonly type?: 'button' | 'submit' | 'reset';
|
|
19
19
|
startIcon?: ReactNode;
|
package/dist/Button.js
CHANGED
|
@@ -1,31 +1,30 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "./styles/main.css";
|
|
3
|
-
import { jsxs as
|
|
3
|
+
import { jsxs as s, jsx as o } from "react/jsx-runtime";
|
|
4
4
|
import { c as u } from "./twUtils-CRiPKpXj.js";
|
|
5
|
-
import { c as
|
|
5
|
+
import { c as y } from "./index-CRBC94ik.js";
|
|
6
6
|
import { forwardRef as h } from "react";
|
|
7
|
-
import { L as
|
|
8
|
-
const
|
|
7
|
+
import { L as f } from "./loader-circle-CvdzOiQ_.js";
|
|
8
|
+
const N = y(
|
|
9
9
|
`
|
|
10
10
|
!font-sans flex relative items-center justify-center gap-2 whitespace-nowrap transition-colors cursor-pointer rounded-lg border font-semibold disabled:pointer-events-none
|
|
11
|
-
focus:outline-none focus
|
|
11
|
+
focus:outline-none focus:outline-none focus-visible:outline-1 focus-visible:outline-offset-2 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0
|
|
12
12
|
`,
|
|
13
13
|
{
|
|
14
14
|
variants: {
|
|
15
15
|
variant: {
|
|
16
|
-
primary: "bg-button-primary-bg text-button-primary-text border-button-primary-border disabled:bg-button-primary-bg--disabled disabled:text-button-primary-text--disabled disabled:border-button-primary-border--disabled",
|
|
17
|
-
secondary: "bg-button-secondary-bg border-button-secondary-border text-button-secondary-text disabled:bg-button-secondary-bg--disabled disabled:text-button-secondary-text--disabled disabled:border-button-secondary-border--disabled",
|
|
18
|
-
outline: "bg-button-outline-bg border-button-outline-border text-button-outline-text disabled:text-button-outline-text--disabled disabled:border-button-outline-border--disabled",
|
|
19
|
-
ghost: "bg-button-ghost-bg border-none text-button-ghost-text hover:bg-button-ghost-bg--hover hover:text-button-ghost-text--hover disabled:text-button-ghost-text--disabled"
|
|
16
|
+
primary: "bg-button-primary-bg text-button-primary-text border-button-primary-border hover:bg-button-primary-bg--hover hover:text-button-primary-text--hover hover:border-button-primary-border--hover focus-visible:outline-button-primary-border disabled:bg-button-primary-bg--disabled disabled:text-button-primary-text--disabled disabled:border-button-primary-border--disabled",
|
|
17
|
+
secondary: "bg-button-secondary-bg border-button-secondary-border text-button-secondary-text hover:bg-button-secondary-bg--hover hover:text-button-secondary-text--hover focus-visible:outline-button-secondary-border disabled:bg-button-secondary-bg--disabled disabled:text-button-secondary-text--disabled disabled:border-button-secondary-border--disabled",
|
|
18
|
+
outline: "bg-button-outline-bg border-button-outline-border text-button-outline-text hover:bg-button-outline-bg--hover hover:text-button-outline-text--hover focus-visible:outline-button-outline-border disabled:text-button-outline-text--disabled disabled:border-button-outline-border--disabled",
|
|
19
|
+
ghost: "bg-button-ghost-bg border-none text-button-ghost-text hover:bg-button-ghost-bg--hover hover:text-button-ghost-text--hover focus-visible:outline-none disabled:text-button-ghost-text--disabled"
|
|
20
20
|
},
|
|
21
21
|
size: {
|
|
22
22
|
default: "py-2 px-6 w-fit",
|
|
23
|
-
icon: "size-9",
|
|
24
23
|
fullWidth: "py-2 px-6 w-full"
|
|
25
24
|
},
|
|
26
25
|
state: {
|
|
27
26
|
default: "",
|
|
28
|
-
error: "bg-button-danger text-
|
|
27
|
+
error: "bg-button-danger text-text-primary transition pointer-events-none focus-visible:outline-button-danger",
|
|
29
28
|
loading: "cursor-wait pointer-events-none"
|
|
30
29
|
}
|
|
31
30
|
},
|
|
@@ -35,23 +34,23 @@ const w = v(
|
|
|
35
34
|
size: "default"
|
|
36
35
|
}
|
|
37
36
|
}
|
|
38
|
-
),
|
|
37
|
+
), w = h(
|
|
39
38
|
({
|
|
40
|
-
children:
|
|
41
|
-
className:
|
|
42
|
-
dataTestId:
|
|
43
|
-
disabled:
|
|
44
|
-
endIcon:
|
|
45
|
-
errorMessage:
|
|
46
|
-
label:
|
|
47
|
-
size:
|
|
48
|
-
startIcon:
|
|
39
|
+
children: j,
|
|
40
|
+
className: l,
|
|
41
|
+
dataTestId: g,
|
|
42
|
+
disabled: n,
|
|
43
|
+
endIcon: b,
|
|
44
|
+
errorMessage: i,
|
|
45
|
+
label: p,
|
|
46
|
+
size: r,
|
|
47
|
+
startIcon: d,
|
|
49
48
|
state: t,
|
|
50
|
-
type:
|
|
51
|
-
variant:
|
|
52
|
-
...
|
|
53
|
-
},
|
|
54
|
-
const
|
|
49
|
+
type: c = "button",
|
|
50
|
+
variant: e,
|
|
51
|
+
...x
|
|
52
|
+
}, v) => {
|
|
53
|
+
const a = {
|
|
55
54
|
error: {
|
|
56
55
|
primary: "bg-button-danger border-button-danger text-button-primary-text pointer-events-none",
|
|
57
56
|
secondary: "bg-button-danger border-button-danger text-button-secondary-text pointer-events-none",
|
|
@@ -64,39 +63,38 @@ const w = v(
|
|
|
64
63
|
outline: "bg-button-outline-bg--disabled border-button-outline-border--disabled text-button-outline-text--disabled pointer-events-none",
|
|
65
64
|
ghost: "bg-transparent text-button-ghost-text--disabled pointer-events-none"
|
|
66
65
|
}
|
|
67
|
-
},
|
|
68
|
-
|
|
69
|
-
t === "error" &&
|
|
70
|
-
t === "loading" &&
|
|
71
|
-
|
|
72
|
-
|
|
66
|
+
}, m = u(
|
|
67
|
+
N({ variant: e, state: t, size: r }),
|
|
68
|
+
t === "error" && a.error[e || "primary"],
|
|
69
|
+
t === "loading" && a.loading[e || "primary"],
|
|
70
|
+
r,
|
|
71
|
+
l
|
|
73
72
|
);
|
|
74
|
-
return /* @__PURE__ */
|
|
75
|
-
/* @__PURE__ */
|
|
73
|
+
return /* @__PURE__ */ s("div", { className: u("flex flex-col justify-items-center", r), children: [
|
|
74
|
+
/* @__PURE__ */ s(
|
|
76
75
|
"button",
|
|
77
76
|
{
|
|
78
|
-
"aria-disabled":
|
|
79
|
-
className:
|
|
77
|
+
"aria-disabled": n,
|
|
78
|
+
className: m,
|
|
80
79
|
"data-state": t,
|
|
81
|
-
"data-testid":
|
|
82
|
-
disabled:
|
|
83
|
-
ref:
|
|
84
|
-
type:
|
|
85
|
-
...
|
|
80
|
+
"data-testid": g || `button-${e}`,
|
|
81
|
+
disabled: n,
|
|
82
|
+
ref: v,
|
|
83
|
+
type: c,
|
|
84
|
+
...x,
|
|
86
85
|
children: [
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
t
|
|
90
|
-
|
|
91
|
-
e === "icon" && g
|
|
86
|
+
d && /* @__PURE__ */ o("span", { className: "flex pr-2", "aria-hidden": !0, children: d }),
|
|
87
|
+
t === "loading" && /* @__PURE__ */ o(f, { className: "ml-2 animate-spin", size: 16 }),
|
|
88
|
+
b && t !== "loading" && /* @__PURE__ */ o("span", { className: "flex pl-2", "aria-hidden": !0, children: b }),
|
|
89
|
+
p
|
|
92
90
|
]
|
|
93
91
|
}
|
|
94
92
|
),
|
|
95
|
-
t === "error" &&
|
|
93
|
+
t === "error" && i && /* @__PURE__ */ o("p", { className: "text-danger-100 mt-2 text-xs", role: "alert", "aria-live": "assertive", children: i })
|
|
96
94
|
] });
|
|
97
95
|
}
|
|
98
96
|
);
|
|
99
|
-
|
|
97
|
+
w.displayName = "Button";
|
|
100
98
|
export {
|
|
101
|
-
|
|
99
|
+
w as Button
|
|
102
100
|
};
|
|
@@ -38,7 +38,7 @@ type DialogOverlayProps = {
|
|
|
38
38
|
};
|
|
39
39
|
export declare function DialogOverlayBase({ className }: DialogOverlayProps): import("react/jsx-runtime").JSX.Element | null;
|
|
40
40
|
declare const contentVariants: (props?: ({
|
|
41
|
-
size?: "sm" | "
|
|
41
|
+
size?: "sm" | "md" | "lg" | "xl" | "2xl" | null | undefined;
|
|
42
42
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
43
43
|
export type DialogSize = 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
44
44
|
export type DialogContentProps = {
|
package/dist/Drawer.d.ts
CHANGED
|
@@ -8,7 +8,6 @@ export type DrawerProps = {
|
|
|
8
8
|
trigger: ReactNode;
|
|
9
9
|
open?: boolean;
|
|
10
10
|
onOpenChange?: (open: boolean) => void;
|
|
11
|
-
asChild?: boolean;
|
|
12
11
|
};
|
|
13
|
-
export declare const Drawer: ({ trigger, title, description, children, direction, size
|
|
12
|
+
export declare const Drawer: ({ trigger, title, description, children, direction, size }: DrawerProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
13
|
//# sourceMappingURL=Drawer.d.ts.map
|