@payfit/unity-components 2.36.1 → 2.36.3
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/esm/components/icon-button/IconButton.d.ts +30 -16
- package/dist/esm/components/icon-button/IconButton.js +80 -58
- package/dist/esm/components/icon-button/IconButton.variants.d.ts +142 -242
- package/dist/esm/components/icon-button/IconButton.variants.js +137 -355
- package/package.json +8 -8
|
@@ -1,30 +1,44 @@
|
|
|
1
1
|
import { UnityIcon } from '@payfit/unity-icons';
|
|
2
2
|
import { AriaRole, ButtonHTMLAttributes } from 'react';
|
|
3
3
|
import { ButtonProps as AriaButtonProps } from 'react-aria-components/Button';
|
|
4
|
-
import {
|
|
5
|
-
|
|
4
|
+
import { IconButtonBase, IconButtonFilled, IconButtonGhost, IconButtonOutlined } from './IconButton.variants.js';
|
|
5
|
+
type IconButtonBaseProps = AriaButtonProps & IconButtonBase & {
|
|
6
6
|
/** Label used to describe the action of the button */
|
|
7
7
|
label: string;
|
|
8
8
|
/** The icon to display inside the button */
|
|
9
9
|
icon: UnityIcon;
|
|
10
|
-
/**
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Press handler. Fires for mouse, touch, and keyboard activation.
|
|
12
|
+
* Prefer this over `onClick` for consistency with `Button`.
|
|
13
|
+
*/
|
|
13
14
|
onPress?: AriaButtonProps['onPress'];
|
|
15
|
+
/**
|
|
16
|
+
* The function to trigger when the button is clicked.
|
|
17
|
+
* Kept for backward compatibility — `onPress` takes precedence when both are provided.
|
|
18
|
+
*/
|
|
19
|
+
onClick?: () => void;
|
|
14
20
|
/** Override the icon role */
|
|
15
21
|
iconRole?: AriaRole;
|
|
16
|
-
/**
|
|
17
|
-
|
|
22
|
+
/** The button's appearance. */
|
|
23
|
+
variant: 'primary' | 'secondary' | 'ghost' | 'outlined';
|
|
24
|
+
/** The button's color. */
|
|
25
|
+
color?: IconButtonFilled['color'] | IconButtonOutlined['color'] | IconButtonGhost['color'];
|
|
26
|
+
/** The loading state of the button. */
|
|
27
|
+
isLoading?: boolean;
|
|
18
28
|
/** The button type */
|
|
19
29
|
type?: ButtonHTMLAttributes<HTMLButtonElement>['type'];
|
|
20
30
|
id?: ButtonHTMLAttributes<HTMLButtonElement>['id'];
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
31
|
+
className?: string;
|
|
32
|
+
};
|
|
33
|
+
type IconButtonUnionProps = (IconButtonBaseProps & {
|
|
34
|
+
variant: 'primary';
|
|
35
|
+
} & IconButtonFilled) | (IconButtonBaseProps & {
|
|
36
|
+
variant: 'secondary';
|
|
37
|
+
} & IconButtonOutlined) | (IconButtonBaseProps & {
|
|
38
|
+
variant: 'ghost';
|
|
39
|
+
} & IconButtonGhost) | (IconButtonBaseProps & {
|
|
40
|
+
variant: 'outlined';
|
|
41
|
+
} & IconButtonOutlined);
|
|
42
|
+
export type IconButtonProps = Omit<IconButtonUnionProps, 'style'>;
|
|
43
|
+
export declare const IconButton: import('react').ForwardRefExoticComponent<IconButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
30
44
|
export {};
|
|
@@ -1,71 +1,93 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
1
|
+
import { jsx as n, jsxs as N } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as j, useMemo as v } from "react";
|
|
3
|
+
import { useUnityTheme as z, uyMerge as o, cn as C } from "@payfit/unity-themes";
|
|
4
|
+
import { Button as M } from "react-aria-components/Button";
|
|
5
|
+
import P from "../../hooks/use-id.js";
|
|
6
|
+
import { Icon as T } from "../icon/Icon.js";
|
|
7
|
+
import { Spinner as A } from "../spinner/Spinner.js";
|
|
8
|
+
import { Tooltip as F } from "../tooltip/Tooltip.js";
|
|
9
|
+
import { iconButtonOutlined as c, iconButtonGhost as G, iconButtonFilled as p } from "./IconButton.variants.js";
|
|
10
|
+
const O = j(
|
|
11
|
+
({
|
|
12
|
+
variant: i,
|
|
13
|
+
color: t = "primary",
|
|
14
|
+
icon: u,
|
|
15
|
+
iconRole: d,
|
|
16
|
+
label: s,
|
|
17
|
+
isDisabled: a = !1,
|
|
18
|
+
isLoading: r = !1,
|
|
19
|
+
onClick: f,
|
|
20
|
+
onPress: h,
|
|
21
|
+
className: y,
|
|
22
|
+
...b
|
|
23
|
+
}, B) => {
|
|
24
|
+
const I = P(), { theme: l } = z(), m = `icon-button-label-${I}`, w = v(() => {
|
|
25
|
+
const e = { isDisabled: a, isLoading: r };
|
|
26
|
+
switch (i) {
|
|
27
|
+
case "primary":
|
|
28
|
+
return o(
|
|
29
|
+
p({
|
|
30
|
+
...e,
|
|
31
|
+
color: t
|
|
32
|
+
})
|
|
33
|
+
);
|
|
34
|
+
case "secondary":
|
|
35
|
+
return l === "rebrand" ? o(
|
|
36
|
+
p({ ...e, color: t === "inverted" ? "inverted.low" : "neutral" })
|
|
37
|
+
) : o(
|
|
38
|
+
c({
|
|
39
|
+
...e,
|
|
40
|
+
color: t
|
|
41
|
+
})
|
|
42
|
+
);
|
|
43
|
+
case "ghost":
|
|
44
|
+
return o(
|
|
45
|
+
G({
|
|
46
|
+
...e,
|
|
47
|
+
color: t
|
|
48
|
+
})
|
|
49
|
+
);
|
|
50
|
+
case "outlined":
|
|
51
|
+
return o(
|
|
52
|
+
c({
|
|
53
|
+
...e,
|
|
54
|
+
color: t
|
|
55
|
+
})
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
}, [i, t, a, r, l]), x = {
|
|
59
|
+
...r && { "data-loading": r }
|
|
60
|
+
};
|
|
61
|
+
return /* @__PURE__ */ n(F, { title: s, children: /* @__PURE__ */ N(
|
|
62
|
+
M,
|
|
43
63
|
{
|
|
44
|
-
ref:
|
|
64
|
+
ref: B,
|
|
45
65
|
"data-dd-privacy": "allow",
|
|
46
|
-
...
|
|
47
|
-
className:
|
|
48
|
-
onPress:
|
|
49
|
-
isDisabled:
|
|
50
|
-
|
|
66
|
+
...b,
|
|
67
|
+
className: C(w, y),
|
|
68
|
+
onPress: h ?? f,
|
|
69
|
+
isDisabled: a || r,
|
|
70
|
+
isPending: r,
|
|
71
|
+
"aria-label": s,
|
|
72
|
+
...x,
|
|
51
73
|
children: [
|
|
52
|
-
|
|
53
|
-
|
|
74
|
+
r ? /* @__PURE__ */ n(A, { size: "small", label: "Loading", color: "inherit" }) : /* @__PURE__ */ n(
|
|
75
|
+
T,
|
|
54
76
|
{
|
|
55
|
-
role:
|
|
56
|
-
src:
|
|
57
|
-
|
|
58
|
-
"
|
|
59
|
-
|
|
77
|
+
role: d,
|
|
78
|
+
src: u,
|
|
79
|
+
size: 20,
|
|
80
|
+
color: "inherit",
|
|
81
|
+
"aria-labelledby": m
|
|
60
82
|
}
|
|
61
83
|
),
|
|
62
|
-
/* @__PURE__ */
|
|
84
|
+
/* @__PURE__ */ n("span", { id: m, className: "uy:sr-only", children: s })
|
|
63
85
|
]
|
|
64
86
|
}
|
|
65
87
|
) });
|
|
66
88
|
}
|
|
67
89
|
);
|
|
68
|
-
|
|
90
|
+
O.displayName = "IconButton";
|
|
69
91
|
export {
|
|
70
|
-
|
|
92
|
+
O as IconButton
|
|
71
93
|
};
|
|
@@ -1,291 +1,191 @@
|
|
|
1
1
|
import { VariantProps } from '@payfit/unity-themes';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
declare const iconButtonBase: import('tailwind-variants').TVReturnType<{
|
|
3
|
+
isDisabled: {
|
|
4
|
+
true: string;
|
|
5
|
+
false: string;
|
|
6
|
+
};
|
|
7
|
+
isLoading: {
|
|
8
|
+
true: string;
|
|
9
|
+
false: string;
|
|
10
|
+
};
|
|
11
|
+
}, undefined, string[], {
|
|
12
|
+
isDisabled: {
|
|
13
|
+
true: string;
|
|
14
|
+
false: string;
|
|
15
|
+
};
|
|
16
|
+
isLoading: {
|
|
17
|
+
true: string;
|
|
18
|
+
false: string;
|
|
19
|
+
};
|
|
20
|
+
}, undefined, import('tailwind-variants').TVReturnType<{
|
|
21
|
+
isDisabled: {
|
|
22
|
+
true: string;
|
|
23
|
+
false: string;
|
|
5
24
|
};
|
|
25
|
+
isLoading: {
|
|
26
|
+
true: string;
|
|
27
|
+
false: string;
|
|
28
|
+
};
|
|
29
|
+
}, undefined, string[], unknown, unknown, undefined>>;
|
|
30
|
+
export declare const iconButtonFilled: import('tailwind-variants').TVReturnType<{
|
|
6
31
|
color: {
|
|
7
|
-
primary: string;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
32
|
+
primary: string[];
|
|
33
|
+
warning: string[];
|
|
34
|
+
danger: string[];
|
|
35
|
+
neutral: string[];
|
|
36
|
+
inverted: string[];
|
|
37
|
+
'inverted.low': string[];
|
|
38
|
+
};
|
|
39
|
+
isDisabled: {
|
|
40
|
+
true: string;
|
|
41
|
+
false: string;
|
|
42
|
+
};
|
|
43
|
+
isLoading: {
|
|
44
|
+
true: string;
|
|
45
|
+
false: string;
|
|
11
46
|
};
|
|
12
47
|
}, undefined, undefined, {
|
|
13
48
|
isDisabled: {
|
|
14
|
-
true:
|
|
15
|
-
|
|
16
|
-
};
|
|
17
|
-
false: {
|
|
18
|
-
button: string;
|
|
19
|
-
};
|
|
49
|
+
true: string;
|
|
50
|
+
false: string;
|
|
20
51
|
};
|
|
21
52
|
isLoading: {
|
|
22
|
-
true:
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
false: {
|
|
27
|
-
button: string;
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
}, {
|
|
31
|
-
button: string[];
|
|
32
|
-
icon: string;
|
|
33
|
-
}, import('tailwind-variants').TVReturnType<{
|
|
53
|
+
true: string;
|
|
54
|
+
false: string;
|
|
55
|
+
};
|
|
56
|
+
}, undefined, import('tailwind-variants').TVReturnType<{
|
|
34
57
|
isDisabled: {
|
|
35
|
-
true:
|
|
36
|
-
|
|
37
|
-
};
|
|
38
|
-
false: {
|
|
39
|
-
button: string;
|
|
40
|
-
};
|
|
58
|
+
true: string;
|
|
59
|
+
false: string;
|
|
41
60
|
};
|
|
42
61
|
isLoading: {
|
|
43
|
-
true:
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
false: {
|
|
48
|
-
button: string;
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
}, {
|
|
52
|
-
button: string[];
|
|
53
|
-
icon: string;
|
|
54
|
-
}, undefined, {
|
|
62
|
+
true: string;
|
|
63
|
+
false: string;
|
|
64
|
+
};
|
|
65
|
+
}, undefined, string[], {
|
|
55
66
|
isDisabled: {
|
|
56
|
-
true:
|
|
57
|
-
|
|
58
|
-
};
|
|
59
|
-
false: {
|
|
60
|
-
button: string;
|
|
61
|
-
};
|
|
67
|
+
true: string;
|
|
68
|
+
false: string;
|
|
62
69
|
};
|
|
63
70
|
isLoading: {
|
|
64
|
-
true:
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
false: {
|
|
69
|
-
button: string;
|
|
70
|
-
};
|
|
71
|
-
};
|
|
72
|
-
}, {
|
|
73
|
-
button: string[];
|
|
74
|
-
icon: string;
|
|
75
|
-
}, import('tailwind-variants').TVReturnType<{
|
|
71
|
+
true: string;
|
|
72
|
+
false: string;
|
|
73
|
+
};
|
|
74
|
+
}, undefined, import('tailwind-variants').TVReturnType<{
|
|
76
75
|
isDisabled: {
|
|
77
|
-
true:
|
|
78
|
-
|
|
79
|
-
};
|
|
80
|
-
false: {
|
|
81
|
-
button: string;
|
|
82
|
-
};
|
|
76
|
+
true: string;
|
|
77
|
+
false: string;
|
|
83
78
|
};
|
|
84
79
|
isLoading: {
|
|
85
|
-
true:
|
|
86
|
-
|
|
87
|
-
icon: string;
|
|
88
|
-
};
|
|
89
|
-
false: {
|
|
90
|
-
button: string;
|
|
91
|
-
};
|
|
92
|
-
};
|
|
93
|
-
}, {
|
|
94
|
-
button: string[];
|
|
95
|
-
icon: string;
|
|
96
|
-
}, undefined, unknown, unknown, undefined>>>;
|
|
97
|
-
export declare const iconButtonSecondary: import('tailwind-variants').TVReturnType<{
|
|
98
|
-
variant: {
|
|
99
|
-
secondary: {
|
|
100
|
-
button: string;
|
|
101
|
-
};
|
|
80
|
+
true: string;
|
|
81
|
+
false: string;
|
|
102
82
|
};
|
|
83
|
+
}, undefined, string[], unknown, unknown, undefined>>>;
|
|
84
|
+
export declare const iconButtonOutlined: import('tailwind-variants').TVReturnType<{
|
|
103
85
|
color: {
|
|
104
|
-
primary: string;
|
|
105
|
-
inverted: string;
|
|
86
|
+
primary: string[];
|
|
87
|
+
inverted: string[];
|
|
106
88
|
};
|
|
107
|
-
}, undefined, undefined, {
|
|
108
89
|
isDisabled: {
|
|
109
|
-
true:
|
|
110
|
-
|
|
111
|
-
};
|
|
112
|
-
false: {
|
|
113
|
-
button: string;
|
|
114
|
-
};
|
|
90
|
+
true: string;
|
|
91
|
+
false: string;
|
|
115
92
|
};
|
|
116
93
|
isLoading: {
|
|
117
|
-
true:
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
};
|
|
121
|
-
false: {
|
|
122
|
-
button: string;
|
|
123
|
-
};
|
|
124
|
-
};
|
|
125
|
-
}, {
|
|
126
|
-
button: string[];
|
|
127
|
-
icon: string;
|
|
128
|
-
}, import('tailwind-variants').TVReturnType<{
|
|
94
|
+
true: string;
|
|
95
|
+
};
|
|
96
|
+
}, undefined, "uy:border uy:border-solid uy:bg-transparent", {
|
|
129
97
|
isDisabled: {
|
|
130
|
-
true:
|
|
131
|
-
|
|
132
|
-
};
|
|
133
|
-
false: {
|
|
134
|
-
button: string;
|
|
135
|
-
};
|
|
98
|
+
true: string;
|
|
99
|
+
false: string;
|
|
136
100
|
};
|
|
137
101
|
isLoading: {
|
|
138
|
-
true:
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
false: {
|
|
143
|
-
button: string;
|
|
144
|
-
};
|
|
145
|
-
};
|
|
146
|
-
}, {
|
|
147
|
-
button: string[];
|
|
148
|
-
icon: string;
|
|
149
|
-
}, undefined, {
|
|
102
|
+
true: string;
|
|
103
|
+
false: string;
|
|
104
|
+
};
|
|
105
|
+
}, undefined, import('tailwind-variants').TVReturnType<{
|
|
150
106
|
isDisabled: {
|
|
151
|
-
true:
|
|
152
|
-
|
|
153
|
-
};
|
|
154
|
-
false: {
|
|
155
|
-
button: string;
|
|
156
|
-
};
|
|
107
|
+
true: string;
|
|
108
|
+
false: string;
|
|
157
109
|
};
|
|
158
110
|
isLoading: {
|
|
159
|
-
true:
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
false: {
|
|
164
|
-
button: string;
|
|
165
|
-
};
|
|
166
|
-
};
|
|
167
|
-
}, {
|
|
168
|
-
button: string[];
|
|
169
|
-
icon: string;
|
|
170
|
-
}, import('tailwind-variants').TVReturnType<{
|
|
111
|
+
true: string;
|
|
112
|
+
false: string;
|
|
113
|
+
};
|
|
114
|
+
}, undefined, string[], {
|
|
171
115
|
isDisabled: {
|
|
172
|
-
true:
|
|
173
|
-
|
|
174
|
-
};
|
|
175
|
-
false: {
|
|
176
|
-
button: string;
|
|
177
|
-
};
|
|
116
|
+
true: string;
|
|
117
|
+
false: string;
|
|
178
118
|
};
|
|
179
119
|
isLoading: {
|
|
180
|
-
true:
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
};
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
}, undefined, unknown, unknown, undefined>>>;
|
|
192
|
-
export declare const iconButtonGhost: import('tailwind-variants').TVReturnType<{
|
|
193
|
-
variant: {
|
|
194
|
-
ghost: string;
|
|
120
|
+
true: string;
|
|
121
|
+
false: string;
|
|
122
|
+
};
|
|
123
|
+
}, undefined, import('tailwind-variants').TVReturnType<{
|
|
124
|
+
isDisabled: {
|
|
125
|
+
true: string;
|
|
126
|
+
false: string;
|
|
127
|
+
};
|
|
128
|
+
isLoading: {
|
|
129
|
+
true: string;
|
|
130
|
+
false: string;
|
|
195
131
|
};
|
|
132
|
+
}, undefined, string[], unknown, unknown, undefined>>>;
|
|
133
|
+
export declare const iconButtonGhost: import('tailwind-variants').TVReturnType<{
|
|
196
134
|
color: {
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
inverted: string;
|
|
135
|
+
primary: string[];
|
|
136
|
+
warning: string[];
|
|
137
|
+
danger: string[];
|
|
138
|
+
neutral: string[];
|
|
139
|
+
'neutral.lowest': string[];
|
|
140
|
+
inverted: string[];
|
|
141
|
+
};
|
|
142
|
+
isDisabled: {
|
|
143
|
+
true: string;
|
|
144
|
+
false: string;
|
|
145
|
+
};
|
|
146
|
+
isLoading: {
|
|
147
|
+
true: string;
|
|
148
|
+
false: string;
|
|
203
149
|
};
|
|
204
150
|
}, undefined, undefined, {
|
|
205
151
|
isDisabled: {
|
|
206
|
-
true:
|
|
207
|
-
|
|
208
|
-
};
|
|
209
|
-
false: {
|
|
210
|
-
button: string;
|
|
211
|
-
};
|
|
152
|
+
true: string;
|
|
153
|
+
false: string;
|
|
212
154
|
};
|
|
213
155
|
isLoading: {
|
|
214
|
-
true:
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
false: {
|
|
219
|
-
button: string;
|
|
220
|
-
};
|
|
221
|
-
};
|
|
222
|
-
}, {
|
|
223
|
-
button: string[];
|
|
224
|
-
icon: string;
|
|
225
|
-
}, import('tailwind-variants').TVReturnType<{
|
|
156
|
+
true: string;
|
|
157
|
+
false: string;
|
|
158
|
+
};
|
|
159
|
+
}, undefined, import('tailwind-variants').TVReturnType<{
|
|
226
160
|
isDisabled: {
|
|
227
|
-
true:
|
|
228
|
-
|
|
229
|
-
};
|
|
230
|
-
false: {
|
|
231
|
-
button: string;
|
|
232
|
-
};
|
|
161
|
+
true: string;
|
|
162
|
+
false: string;
|
|
233
163
|
};
|
|
234
164
|
isLoading: {
|
|
235
|
-
true:
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
false: {
|
|
240
|
-
button: string;
|
|
241
|
-
};
|
|
242
|
-
};
|
|
243
|
-
}, {
|
|
244
|
-
button: string[];
|
|
245
|
-
icon: string;
|
|
246
|
-
}, undefined, {
|
|
165
|
+
true: string;
|
|
166
|
+
false: string;
|
|
167
|
+
};
|
|
168
|
+
}, undefined, string[], {
|
|
247
169
|
isDisabled: {
|
|
248
|
-
true:
|
|
249
|
-
|
|
250
|
-
};
|
|
251
|
-
false: {
|
|
252
|
-
button: string;
|
|
253
|
-
};
|
|
170
|
+
true: string;
|
|
171
|
+
false: string;
|
|
254
172
|
};
|
|
255
173
|
isLoading: {
|
|
256
|
-
true:
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
false: {
|
|
261
|
-
button: string;
|
|
262
|
-
};
|
|
263
|
-
};
|
|
264
|
-
}, {
|
|
265
|
-
button: string[];
|
|
266
|
-
icon: string;
|
|
267
|
-
}, import('tailwind-variants').TVReturnType<{
|
|
174
|
+
true: string;
|
|
175
|
+
false: string;
|
|
176
|
+
};
|
|
177
|
+
}, undefined, import('tailwind-variants').TVReturnType<{
|
|
268
178
|
isDisabled: {
|
|
269
|
-
true:
|
|
270
|
-
|
|
271
|
-
};
|
|
272
|
-
false: {
|
|
273
|
-
button: string;
|
|
274
|
-
};
|
|
179
|
+
true: string;
|
|
180
|
+
false: string;
|
|
275
181
|
};
|
|
276
182
|
isLoading: {
|
|
277
|
-
true:
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
};
|
|
285
|
-
}, {
|
|
286
|
-
button: string[];
|
|
287
|
-
icon: string;
|
|
288
|
-
}, undefined, unknown, unknown, undefined>>>;
|
|
289
|
-
export type IconButtonPrimary = VariantProps<typeof iconButtonPrimary>;
|
|
290
|
-
export type IconButtonSecondary = VariantProps<typeof iconButtonSecondary>;
|
|
183
|
+
true: string;
|
|
184
|
+
false: string;
|
|
185
|
+
};
|
|
186
|
+
}, undefined, string[], unknown, unknown, undefined>>>;
|
|
187
|
+
export type IconButtonBase = VariantProps<typeof iconButtonBase>;
|
|
188
|
+
export type IconButtonFilled = VariantProps<typeof iconButtonFilled>;
|
|
189
|
+
export type IconButtonOutlined = VariantProps<typeof iconButtonOutlined>;
|
|
291
190
|
export type IconButtonGhost = VariantProps<typeof iconButtonGhost>;
|
|
191
|
+
export {};
|
|
@@ -1,395 +1,177 @@
|
|
|
1
1
|
import { uyTv as e } from "@payfit/unity-themes";
|
|
2
2
|
const t = e({
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
]
|
|
10
|
-
|
|
11
|
-
},
|
|
3
|
+
base: [
|
|
4
|
+
"uy:group",
|
|
5
|
+
"uy:w-5.5 uy:min-w-5.5 uy:h-5.5 uy:sm:w-500 uy:sm:min-w-500 uy:sm:h-500 uy:min-h-500",
|
|
6
|
+
"uy:inline-flex uy:justify-center uy:items-center",
|
|
7
|
+
"uy:rounded-100 uy:sm:rounded-75 uy:cursor-pointer",
|
|
8
|
+
"uy:transition-colors",
|
|
9
|
+
'uy:data-[focus-visible="true"]:outline-2 uy:data-[focus-visible="true"]:outline-solid uy:data-[focus-visible="true"]:outline-offset-2 uy:data-[focus-visible="true"]:outline-utility-focus-ring'
|
|
10
|
+
],
|
|
12
11
|
variants: {
|
|
13
12
|
isDisabled: {
|
|
14
|
-
true:
|
|
15
|
-
|
|
16
|
-
},
|
|
17
|
-
false: {
|
|
18
|
-
button: ""
|
|
19
|
-
}
|
|
13
|
+
true: "uy:disabled:cursor-not-allowed",
|
|
14
|
+
false: ""
|
|
20
15
|
},
|
|
21
16
|
isLoading: {
|
|
22
|
-
true:
|
|
23
|
-
|
|
24
|
-
icon: ""
|
|
25
|
-
},
|
|
26
|
-
false: {
|
|
27
|
-
button: ""
|
|
28
|
-
}
|
|
17
|
+
true: "uy:data-[loading]:cursor-progress uy:data-[loading]:text-content-neutral-disabled",
|
|
18
|
+
false: ""
|
|
29
19
|
}
|
|
30
20
|
},
|
|
31
21
|
defaultVariants: {
|
|
32
22
|
isDisabled: !1,
|
|
33
23
|
isLoading: !1
|
|
34
24
|
}
|
|
35
|
-
}),
|
|
25
|
+
}), r = e({
|
|
36
26
|
extend: t,
|
|
37
27
|
variants: {
|
|
38
|
-
variant: {
|
|
39
|
-
primary: ""
|
|
40
|
-
},
|
|
41
28
|
color: {
|
|
42
|
-
primary:
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
]
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
"uy:active:bg-surface-danger-active",
|
|
81
|
-
"uy:focus:bg-surface-danger-focus",
|
|
82
|
-
"uy:data-[pressed]:bg-surface-danger-pressed"
|
|
83
|
-
],
|
|
84
|
-
icon: [
|
|
85
|
-
"uy:text-content-inverted-enabled",
|
|
86
|
-
'uy:group-data-[hovered="true"]:text-content-inverted-hover',
|
|
87
|
-
"uy:active:text-content-inverted-active",
|
|
88
|
-
"uy:focus:text-content-inverted-focus",
|
|
89
|
-
"uy:data-[pressed]:text-content-inverted-pressed"
|
|
90
|
-
]
|
|
91
|
-
}
|
|
29
|
+
primary: [
|
|
30
|
+
"uy:theme-legacy:bg-surface-primary-enabled uy:theme-rebrand:bg-surface-neutral-highest-enabled uy:text-content-inverted-enabled",
|
|
31
|
+
'uy:theme-legacy:data-[hovered="true"]:bg-surface-primary-hover uy:theme-rebrand:data-[hovered="true"]:bg-surface-neutral-highest-hover uy:data-[hovered="true"]:text-content-inverted-hover',
|
|
32
|
+
"uy:theme-legacy:active:bg-surface-primary-active uy:theme-rebrand:active:bg-surface-neutral-highest-active uy:active:text-content-inverted-hover",
|
|
33
|
+
"uy:theme-legacy:data-[pressed]:bg-surface-primary-pressed uy:theme-rebrand:data-[pressed]:bg-surface-neutral-highest-pressed uy:data-[pressed]:text-content-inverted-pressed"
|
|
34
|
+
],
|
|
35
|
+
warning: [
|
|
36
|
+
"uy:bg-surface-warning-enabled uy:text-content-neutral-enabled",
|
|
37
|
+
'uy:data-[hovered="true"]:bg-surface-warning-hover uy:data-[hovered="true"]:text-content-neutral-hover',
|
|
38
|
+
"uy:active:bg-surface-warning-active uy:active:text-content-neutral-active",
|
|
39
|
+
"uy:data-[pressed]:bg-surface-warning-pressed uy:data-[pressed]:text-content-neutral-pressed"
|
|
40
|
+
],
|
|
41
|
+
danger: [
|
|
42
|
+
"uy:bg-surface-danger-enabled uy:theme-legacy:text-content-inverted-enabled uy:theme-rebrand:text-content-inverted",
|
|
43
|
+
'uy:data-[hovered="true"]:bg-surface-danger-hover uy:theme-legacy:data-[hovered="true"]:text-content-inverted-hover',
|
|
44
|
+
"uy:active:bg-surface-danger-active uy:theme-legacy:active:text-content-inverted",
|
|
45
|
+
"uy:data-[pressed]:bg-surface-danger-pressed uy:theme-legacy:data-[pressed]:text-content-inverted"
|
|
46
|
+
],
|
|
47
|
+
neutral: [
|
|
48
|
+
"uy:bg-surface-neutral-low-enabled uy:text-content-neutral-enabled",
|
|
49
|
+
'uy:data-[hovered="true"]:bg-surface-neutral-low-hover uy:data-[hovered="true"]:text-content-neutral-hover',
|
|
50
|
+
"uy:active:bg-surface-neutral-low-active uy:active:text-content-neutral-active",
|
|
51
|
+
"uy:data-[pressed]:bg-surface-neutral-low-pressed uy:data-[pressed]:text-content-neutral-pressed"
|
|
52
|
+
],
|
|
53
|
+
inverted: [
|
|
54
|
+
"uy:bg-surface-neutral-enabled uy:text-content-neutral-enabled",
|
|
55
|
+
'uy:data-[hovered="true"]:bg-surface-neutral-hover uy:data-[hovered="true"]:text-content-neutral-hover',
|
|
56
|
+
"uy:active:bg-surface-neutral-active uy:active:text-content-neutral-active",
|
|
57
|
+
"uy:data-[pressed]:bg-surface-neutral-active uy:data-[pressed]:text-content-neutral-pressed",
|
|
58
|
+
"uy:data-[focus-visible]:outline-utility-inverted-focus-ring uy:data-[focus-visible]:text-content-neutral-focus uy:data-[focus-visible]:bg-surface-neutral-focus"
|
|
59
|
+
],
|
|
60
|
+
"inverted.low": [
|
|
61
|
+
"uy:bg-surface-inverted-low-enabled uy:text-content-inverted-enabled",
|
|
62
|
+
'uy:data-[hovered="true"]:bg-surface-inverted-low-hover uy:data-[hovered="true"]:text-content-inverted-hover',
|
|
63
|
+
"uy:active:bg-surface-inverted-low-active uy:active:text-content-inverted-active",
|
|
64
|
+
'uy:data-[pressed="true"]:bg-surface-inverted-low-pressed uy:data-[pressed="true"]:text-content-inverted-pressed',
|
|
65
|
+
'uy:data-[focus-visible="true"]:outline-utility-inverted-focus-ring uy:data-[focus-visible="true"]:text-content-inverted-focus uy:data-[focus-visible="true"]:bg-surface-inverted-low-focus'
|
|
66
|
+
]
|
|
92
67
|
},
|
|
93
|
-
{
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
isDisabled: !1,
|
|
97
|
-
isLoading: !1,
|
|
98
|
-
class: {
|
|
99
|
-
button: [
|
|
100
|
-
"uy:bg-surface-warning-enabled",
|
|
101
|
-
'uy:data-[hovered="true"]:bg-surface-warning-hover',
|
|
102
|
-
"uy:active:bg-surface-warning-pressed",
|
|
103
|
-
"uy:focus-visible:bg-surface-warning-focus",
|
|
104
|
-
"uy:data-[pressed]:bg-surface-warning-pressed"
|
|
105
|
-
],
|
|
106
|
-
icon: [
|
|
107
|
-
"uy:text-content-neutral-enabled",
|
|
108
|
-
'uy:group-data-[hovered="true"]:text-content-neutral-hover',
|
|
109
|
-
"uy:active:text-content-neutral-pressed",
|
|
110
|
-
"uy:focus-visible:text-content-neutral-focus",
|
|
111
|
-
"uy:data-[pressed]:text-content-neutral-pressed"
|
|
112
|
-
]
|
|
113
|
-
}
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
variant: "primary",
|
|
117
|
-
color: "inverted",
|
|
118
|
-
isDisabled: !1,
|
|
119
|
-
isLoading: !1,
|
|
120
|
-
class: {
|
|
121
|
-
button: [
|
|
122
|
-
"uy:bg-surface-neutral-enabled",
|
|
123
|
-
'uy:data-[hovered="true"]:bg-surface-neutral-hover',
|
|
124
|
-
"uy:active:bg-surface-neutral-pressed",
|
|
125
|
-
"uy:focus-visible:bg-surface-neutral-focus",
|
|
126
|
-
"uy:data-[pressed]:bg-surface-neutral-pressed"
|
|
127
|
-
],
|
|
128
|
-
icon: [
|
|
129
|
-
"uy:text-content-neutral-enabled",
|
|
130
|
-
'uy:group-data-[hovered="true"]:text-content-neutral-hover',
|
|
131
|
-
"uy:active:text-content-neutral-pressed",
|
|
132
|
-
"uy:focus-visible:text-content-neutral-focus",
|
|
133
|
-
"uy:data-[pressed]:text-content-neutral-pressed"
|
|
134
|
-
]
|
|
135
|
-
}
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
variant: "primary",
|
|
139
|
-
color: "primary",
|
|
140
|
-
isDisabled: !0,
|
|
141
|
-
isLoading: !1,
|
|
142
|
-
class: {
|
|
143
|
-
button: "uy:bg-surface-neutral-disabled",
|
|
144
|
-
icon: "uy:text-content-neutral-disabled"
|
|
145
|
-
}
|
|
68
|
+
isDisabled: {
|
|
69
|
+
true: "uy:disabled:bg-surface-neutral-disabled uy:disabled:text-content-neutral-disabled",
|
|
70
|
+
false: ""
|
|
146
71
|
},
|
|
147
|
-
{
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
isLoading: !0,
|
|
151
|
-
isDisabled: !1,
|
|
152
|
-
class: {
|
|
153
|
-
button: "uy:bg-surface-neutral-disabled",
|
|
154
|
-
icon: "uy:text-content-neutral-disabled"
|
|
155
|
-
}
|
|
72
|
+
isLoading: {
|
|
73
|
+
true: "uy:data-[loading]:bg-surface-neutral-disabled uy:data-[loading]:text-content-neutral-disabled",
|
|
74
|
+
false: ""
|
|
156
75
|
}
|
|
157
|
-
|
|
158
|
-
}),
|
|
76
|
+
}
|
|
77
|
+
}), u = e({
|
|
159
78
|
extend: t,
|
|
79
|
+
base: "uy:border uy:border-solid uy:bg-transparent",
|
|
160
80
|
variants: {
|
|
161
|
-
variant: {
|
|
162
|
-
secondary: { button: "uy:focus-visible:outline-offset-4" }
|
|
163
|
-
},
|
|
164
81
|
color: {
|
|
165
|
-
primary:
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
"uy:active:border-border-neutral-high-active",
|
|
179
|
-
"uy:data-[pressed]:border-border-neutral-high-pressed"
|
|
180
|
-
],
|
|
181
|
-
icon: [
|
|
182
|
-
"uy:text-content-neutral-low-enabled",
|
|
183
|
-
'uy:group-data-[hovered="true"]:text-content-low-neutral-hover',
|
|
184
|
-
"uy:active:text-content-neutral-low-active",
|
|
185
|
-
"uy:data-[pressed]:text-content-neutral-low-pressed",
|
|
186
|
-
"uy:focus-visible:text-content-neutral-low-focus"
|
|
187
|
-
]
|
|
188
|
-
}
|
|
189
|
-
},
|
|
190
|
-
{
|
|
191
|
-
color: "primary",
|
|
192
|
-
isLoading: !0,
|
|
193
|
-
isDisabled: !1,
|
|
194
|
-
class: {
|
|
195
|
-
button: [
|
|
196
|
-
"uy:border uy:border-solid uy:border-border-neutral-disabled",
|
|
197
|
-
"uy:focus-visible:border-border-primary-focus"
|
|
198
|
-
],
|
|
199
|
-
icon: ["uy:text-content-neutral-disabled"]
|
|
200
|
-
}
|
|
82
|
+
primary: [
|
|
83
|
+
"uy:text-content-neutral-enabled uy:border-border-neutral-high-enabled",
|
|
84
|
+
'uy:data-[hovered="true"]:text-content-neutral-hover uy:data-[hovered="true"]:border-border-neutral-high-hover',
|
|
85
|
+
'uy:theme-legacy:data-[pressed="true"]:text-content-neutral-high-pressed uy:theme-legacy:data-[pressed="true"]:border-border-neutral-high-pressed',
|
|
86
|
+
'uy:theme-rebrand:data-[pressed="true"]:text-content-neutral-pressed uy:theme-rebrand:data-[pressed="true"]:bg-surface-neutral-low-pressed uy:theme-rebrand:data-[pressed="true"]:border-surface-neutral-low-pressed',
|
|
87
|
+
'uy:data-[focus-visible="true"]:border-border-neutral-high-focus uy:data-[focus-visible="true"]:text-content-neutral-focus'
|
|
88
|
+
],
|
|
89
|
+
inverted: [
|
|
90
|
+
"uy:text-content-inverted-enabled uy:border-border-inverted-enabled",
|
|
91
|
+
'uy:theme-legacy:data-[pressed="true"]:text-content-inverted-pressed uy:theme-legacy:data-[pressed="true"]:border-border-inverted-pressed',
|
|
92
|
+
'uy:theme-rebrand:data-[pressed="true"]:text-content-neutral-pressed uy:theme-rebrand:data-[pressed="true"]:bg-surface-neutral-low-pressed uy:theme-rebrand:data-[pressed="true"]:border-surface-neutral-low-pressed',
|
|
93
|
+
"uy:data-[focus-visible]:outline-utility-inverted-focus-ring"
|
|
94
|
+
]
|
|
201
95
|
},
|
|
202
|
-
{
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
isDisabled: !0,
|
|
206
|
-
class: {
|
|
207
|
-
button: [
|
|
208
|
-
"uy:border uy:border-solid uy:border-border-neutral-disabled",
|
|
209
|
-
"uy:focus-visible:border-border-primary-focus"
|
|
210
|
-
],
|
|
211
|
-
icon: ["uy:text-content-neutral-disabled"]
|
|
212
|
-
}
|
|
213
|
-
},
|
|
214
|
-
{
|
|
215
|
-
color: "inverted",
|
|
216
|
-
isDisabled: !1,
|
|
217
|
-
isLoading: !1,
|
|
218
|
-
class: {
|
|
219
|
-
button: [
|
|
220
|
-
"uy:border uy:border-solid uy:border-border-inverted",
|
|
221
|
-
'uy:data-[hovered="true"]:border-border-inverted-hover',
|
|
222
|
-
"uy:data-[pressed]:border-border-inverted-pressed",
|
|
223
|
-
"uy:active:border-border-inverted-active",
|
|
224
|
-
"uy:focus-visible:border-border-inverted-focus uy:focus-visible:outline-utility-inverted-focus-ring"
|
|
225
|
-
],
|
|
226
|
-
icon: [
|
|
227
|
-
"uy:text-content-inverted",
|
|
228
|
-
'uy:group-data-[hovered="true"]:text-content-inverted-hover',
|
|
229
|
-
"uy:data-[pressed]:text-content-inverted-pressed",
|
|
230
|
-
"uy:active:text-content-inverted-active",
|
|
231
|
-
"uy:focus-visible:text-content-inverted-focus"
|
|
232
|
-
]
|
|
233
|
-
}
|
|
96
|
+
isDisabled: {
|
|
97
|
+
true: "uy:disabled:text-content-neutral-disabled uy:disabled:border-border-neutral-disabled uy:data-[disabled]:border-border-neutral-disabled",
|
|
98
|
+
false: ""
|
|
234
99
|
},
|
|
235
|
-
{
|
|
236
|
-
|
|
237
|
-
isLoading: !1,
|
|
238
|
-
isDisabled: !0,
|
|
239
|
-
class: {
|
|
240
|
-
button: [
|
|
241
|
-
"uy:border uy:border-solid uy:border-border-inverted-disabled",
|
|
242
|
-
"uy:focus-visible:border-border-primary-focus"
|
|
243
|
-
],
|
|
244
|
-
icon: ["uy:text-content-inverted-disabled"]
|
|
245
|
-
}
|
|
100
|
+
isLoading: {
|
|
101
|
+
true: "uy:data-[loading]:text-content-neutral-disabled uy:data-[loading]:border-border-neutral-disabled"
|
|
246
102
|
}
|
|
247
|
-
|
|
248
|
-
}),
|
|
103
|
+
}
|
|
104
|
+
}), n = e({
|
|
249
105
|
extend: t,
|
|
250
106
|
variants: {
|
|
251
|
-
variant: {
|
|
252
|
-
ghost: ""
|
|
253
|
-
},
|
|
254
107
|
color: {
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
108
|
+
primary: [
|
|
109
|
+
"uy:bg-transparent uy:text-content-primary-enabled",
|
|
110
|
+
'uy:data-[hovered="true"]:bg-surface-primary-lowest-hover uy:data-[hovered="true"]:text-content-primary-hover',
|
|
111
|
+
"uy:active:bg-surface-primary-lowest-active uy:active:text-content-primary-active",
|
|
112
|
+
"uy:data-[pressed=true]:bg-surface-primary-lowest-pressed uy:data-[pressed=true]:text-content-primary-pressed",
|
|
113
|
+
"uy:data-[focus-visible]:bg-transparent"
|
|
114
|
+
],
|
|
115
|
+
warning: [
|
|
116
|
+
"uy:bg-transparent uy:text-content-warning-enabled",
|
|
117
|
+
'uy:data-[hovered="true"]:bg-surface-warning-lowest-hover uy:data-[hovered="true"]:text-content-warning-hover',
|
|
118
|
+
"uy:active:bg-surface-warning-lowest-active uy:active:text-content-warning-active",
|
|
119
|
+
"uy:data-[pressed=true]:bg-surface-warning-lowest-pressed uy:data-[pressed=true]:text-content-warning-pressed",
|
|
120
|
+
"uy:data-[focus-visible]:bg-transparent"
|
|
121
|
+
],
|
|
122
|
+
danger: [
|
|
123
|
+
"uy:bg-transparent uy:text-content-danger-enabled",
|
|
124
|
+
'uy:data-[hovered="true"]:bg-surface-danger-lowest-hover uy:data-[hovered="true"]:text-content-danger-hover',
|
|
125
|
+
"uy:active:bg-surface-danger-lowest-active uy:active:text-content-danger-active",
|
|
126
|
+
"uy:data-[pressed=true]:bg-surface-danger-lowest-pressed uy:data-[pressed=true]:text-content-danger-pressed",
|
|
127
|
+
"uy:data-[focus-visible]:bg-transparent"
|
|
128
|
+
],
|
|
129
|
+
neutral: [
|
|
130
|
+
"uy:bg-transparent uy:text-content-neutral-enabled",
|
|
131
|
+
'uy:data-[hovered="true"]:bg-surface-neutral-hover uy:data-[hovered="true"]:text-content-neutral-hover',
|
|
132
|
+
"uy:active:bg-surface-neutral-active uy:active:text-content-neutral-active",
|
|
133
|
+
"uy:data-[pressed=true]:bg-surface-neutral-pressed uy:data-[pressed=true]:text-content-neutral-pressed",
|
|
134
|
+
"uy:data-[focus-visible]:bg-transparent"
|
|
135
|
+
],
|
|
136
|
+
"neutral.lowest": [
|
|
137
|
+
"uy:bg-transparent uy:text-content-neutral-enabled",
|
|
138
|
+
'uy:data-[hovered="true"]:bg-surface-neutral-lowest-hover uy:data-[hovered="true"]:text-content-neutral-hover',
|
|
139
|
+
"uy:active:bg-surface-neutral-lowest-active uy:active:text-content-neutral-active",
|
|
140
|
+
"uy:data-[pressed=true]:bg-surface-neutral-lowest-pressed uy:data-[pressed=true]:text-content-neutral-pressed",
|
|
141
|
+
"uy:data-[focus-visible]:bg-transparent"
|
|
142
|
+
],
|
|
143
|
+
inverted: [
|
|
144
|
+
"uy:bg-transparent uy:text-content-inverted-enabled",
|
|
145
|
+
'uy:data-[hovered="true"]:bg-surface-inverted-hover uy:data-[hovered="true"]:text-content-inverted-hover',
|
|
146
|
+
"uy:active:bg-surface-inverted-active uy:active:text-content-inverted-active",
|
|
147
|
+
"uy:data-[pressed=true]:bg-surface-inverted-pressed uy:data-[pressed=true]:text-content-inverted-pressed",
|
|
148
|
+
"uy:data-[focus-visible]:outline-utility-inverted-focus-ring uy:data-[focus-visible]:bg-transparent"
|
|
149
|
+
]
|
|
150
|
+
},
|
|
151
|
+
isDisabled: {
|
|
152
|
+
true: "uy:disabled:text-content-neutral-disabled uy:disabled:bg-transparent",
|
|
153
|
+
false: ""
|
|
154
|
+
},
|
|
155
|
+
isLoading: {
|
|
156
|
+
true: "uy:data-[loading]:text-content-neutral-disabled uy:data-[loading]:bg-transparent",
|
|
157
|
+
false: ""
|
|
261
158
|
}
|
|
262
159
|
},
|
|
263
160
|
compoundVariants: [
|
|
264
161
|
{
|
|
265
|
-
color: "inverted",
|
|
266
|
-
isDisabled: !1,
|
|
267
|
-
isLoading: !1,
|
|
268
|
-
class: {
|
|
269
|
-
button: [
|
|
270
|
-
"uy:bg-transparent",
|
|
271
|
-
'uy:data-[hovered="true"]:bg-surface-inverted-hover',
|
|
272
|
-
"uy:active:bg-surface-inverted-active",
|
|
273
|
-
"uy:data-[pressed=true]:bg-surface-inverted-pressed",
|
|
274
|
-
"uy:focus-visible:outline-utility-inverted-focus-ring",
|
|
275
|
-
"uy:focus-visible:bg-transparent"
|
|
276
|
-
],
|
|
277
|
-
icon: [
|
|
278
|
-
"uy:text-content-inverted",
|
|
279
|
-
'uy:group-data-[hovered="true"]:text-content-inverted-hover',
|
|
280
|
-
"uy:data-[pressed]:text-content-inverted-pressed",
|
|
281
|
-
"uy:active:text-content-inverted-active",
|
|
282
|
-
"uy:focus-visible:text-content-inverted-focus"
|
|
283
|
-
]
|
|
284
|
-
}
|
|
285
|
-
},
|
|
286
|
-
{
|
|
287
|
-
color: "neutral",
|
|
288
|
-
isDisabled: !1,
|
|
289
|
-
isLoading: !1,
|
|
290
|
-
class: {
|
|
291
|
-
button: [
|
|
292
|
-
'uy:data-[hovered="true"]:bg-surface-neutral-hover',
|
|
293
|
-
"uy:data-[pressed]:bg-surface-neutral-pressed",
|
|
294
|
-
"uy:active:bg-surface-neutral-active",
|
|
295
|
-
"uy:data-[pressed=true]:bg-surface-neutral-pressed"
|
|
296
|
-
],
|
|
297
|
-
icon: ["uy:text-content-neutral-low"]
|
|
298
|
-
}
|
|
299
|
-
},
|
|
300
|
-
{
|
|
301
|
-
color: "neutral.lowest",
|
|
302
|
-
isDisabled: !1,
|
|
303
|
-
isLoading: !1,
|
|
304
|
-
class: {
|
|
305
|
-
button: [
|
|
306
|
-
'uy:data-[hovered="true"]:bg-surface-neutral-lowest-hover',
|
|
307
|
-
"uy:active:bg-surface-neutral-lowest-active",
|
|
308
|
-
"uy:data-[pressed=true]:bg-surface-neutral-lowest-pressed"
|
|
309
|
-
],
|
|
310
|
-
icon: ["uy:text-content-neutral-low"]
|
|
311
|
-
}
|
|
312
|
-
},
|
|
313
|
-
{
|
|
314
|
-
color: "primary",
|
|
315
|
-
isDisabled: !1,
|
|
316
|
-
isLoading: !1,
|
|
317
|
-
class: {
|
|
318
|
-
button: [
|
|
319
|
-
"uy:text-content-primary-enabled",
|
|
320
|
-
'uy:data-[hovered="true"]:bg-surface-primary-lowest-hover',
|
|
321
|
-
"uy:data-[pressed]:bg-surface-primary-lowest-pressed",
|
|
322
|
-
"uy:active:bg-surface-primary-lowest-active"
|
|
323
|
-
],
|
|
324
|
-
icon: [
|
|
325
|
-
"uy:text-content-primary",
|
|
326
|
-
'uy:group-data-[hovered="true"]:text-content-primary',
|
|
327
|
-
"uy:data-[pressed]:text-content-primary",
|
|
328
|
-
"uy:focus-visible:text-content-primary",
|
|
329
|
-
"uy:active:text-content-primary"
|
|
330
|
-
]
|
|
331
|
-
}
|
|
332
|
-
},
|
|
333
|
-
{
|
|
334
|
-
color: "danger",
|
|
335
|
-
isDisabled: !1,
|
|
336
|
-
isLoading: !1,
|
|
337
|
-
class: {
|
|
338
|
-
button: [
|
|
339
|
-
'uy:data-[hovered="true"]:bg-surface-danger-lowest-hover',
|
|
340
|
-
"uy:data-[pressed]:bg-surface-danger-lowest-pressed",
|
|
341
|
-
"uy:active:bg-surface-danger-lowest-active"
|
|
342
|
-
],
|
|
343
|
-
icon: [
|
|
344
|
-
"uy:text-content-danger",
|
|
345
|
-
'uy:group-data-[hovered="true"]:text-content-danger',
|
|
346
|
-
"uy:data-[pressed]:text-content-danger",
|
|
347
|
-
"uy:focus-visible:text-content-danger",
|
|
348
|
-
"uy:active:text-content-danger"
|
|
349
|
-
]
|
|
350
|
-
}
|
|
351
|
-
},
|
|
352
|
-
{
|
|
353
|
-
color: "warning",
|
|
354
|
-
isDisabled: !1,
|
|
355
|
-
isLoading: !1,
|
|
356
|
-
class: {
|
|
357
|
-
button: [
|
|
358
|
-
'uy:data-[hovered="true"]:bg-surface-warning-lowest-hover',
|
|
359
|
-
"uy:data-[pressed]:bg-surface-warning-lowest-pressed",
|
|
360
|
-
"uy:active:bg-surface-warning-lowest-active"
|
|
361
|
-
],
|
|
362
|
-
icon: [
|
|
363
|
-
"uy:text-content-warning-high",
|
|
364
|
-
'uy:group-data-[hovered="true"]:text-content-warning-high',
|
|
365
|
-
"uy:data-[pressed]:text-content-warning-high",
|
|
366
|
-
"uy:focus-visible:text-content-warning-high",
|
|
367
|
-
"uy:active:text-content-warning-high"
|
|
368
|
-
]
|
|
369
|
-
}
|
|
370
|
-
},
|
|
371
|
-
{
|
|
372
|
-
color: ["primary", "neutral", "danger", "warning", "inverted"],
|
|
373
162
|
isDisabled: !0,
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
button: "",
|
|
377
|
-
icon: "uy:text-content-neutral-disabled"
|
|
378
|
-
}
|
|
163
|
+
color: "inverted",
|
|
164
|
+
className: ["uy:disabled:text-content-inverted-disabled"]
|
|
379
165
|
},
|
|
380
166
|
{
|
|
381
|
-
color: ["primary", "neutral", "danger", "warning", "inverted"],
|
|
382
|
-
isDisabled: !1,
|
|
383
167
|
isLoading: !0,
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
icon: "uy:text-content-neutral-disabled"
|
|
387
|
-
}
|
|
168
|
+
color: "inverted",
|
|
169
|
+
className: ["uy:data-[loading]:text-content-inverted-disabled"]
|
|
388
170
|
}
|
|
389
171
|
]
|
|
390
172
|
});
|
|
391
173
|
export {
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
174
|
+
r as iconButtonFilled,
|
|
175
|
+
n as iconButtonGhost,
|
|
176
|
+
u as iconButtonOutlined
|
|
395
177
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@payfit/unity-components",
|
|
3
|
-
"version": "2.36.
|
|
3
|
+
"version": "2.36.3",
|
|
4
4
|
"module": "./dist/esm/index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@hookform/devtools": "4.4.0",
|
|
44
44
|
"@hookform/resolvers": "5.2.1",
|
|
45
45
|
"@internationalized/date": "3.12.1",
|
|
46
|
-
"@payfit/unity-illustrations": "2.36.
|
|
46
|
+
"@payfit/unity-illustrations": "2.36.3",
|
|
47
47
|
"@radix-ui/react-avatar": "1.1.11",
|
|
48
48
|
"@radix-ui/react-slot": "1.2.4",
|
|
49
49
|
"@react-aria/interactions": "3.28.0",
|
|
@@ -75,8 +75,8 @@
|
|
|
75
75
|
},
|
|
76
76
|
"peerDependencies": {
|
|
77
77
|
"@hookform/devtools": "^4",
|
|
78
|
-
"@payfit/unity-icons": "2.36.
|
|
79
|
-
"@payfit/unity-themes": "2.36.
|
|
78
|
+
"@payfit/unity-icons": "2.36.3",
|
|
79
|
+
"@payfit/unity-themes": "2.36.3",
|
|
80
80
|
"@storybook/react-vite": "^10.3.2",
|
|
81
81
|
"@tanstack/react-query": "^5",
|
|
82
82
|
"@tanstack/react-router": "^1.131",
|
|
@@ -90,9 +90,9 @@
|
|
|
90
90
|
"@figma/code-connect": "1.4.3",
|
|
91
91
|
"@hookform/devtools": "4.4.0",
|
|
92
92
|
"@internationalized/date": "3.12.1",
|
|
93
|
-
"@payfit/unity-icons": "2.36.
|
|
94
|
-
"@payfit/unity-illustrations": "2.36.
|
|
95
|
-
"@payfit/unity-themes": "2.36.
|
|
93
|
+
"@payfit/unity-icons": "2.36.3",
|
|
94
|
+
"@payfit/unity-illustrations": "2.36.3",
|
|
95
|
+
"@payfit/unity-themes": "2.36.3",
|
|
96
96
|
"@storybook/addon-a11y": "10.3.5",
|
|
97
97
|
"@storybook/addon-designs": "11.1.3",
|
|
98
98
|
"@storybook/addon-docs": "10.3.5",
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
"@tanstack/intent": "0.0.40",
|
|
105
105
|
"@tanstack/react-devtools": "0.10.1",
|
|
106
106
|
"@tanstack/react-form-devtools": "0.2.22",
|
|
107
|
-
"@tanstack/react-query": "5.
|
|
107
|
+
"@tanstack/react-query": "5.100.10",
|
|
108
108
|
"@tanstack/react-router": "1.168.23",
|
|
109
109
|
"@tanstack/react-router-devtools": "1.166.13",
|
|
110
110
|
"@testing-library/dom": "10.4.0",
|