@payfit/unity-components 2.29.11 → 2.31.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/esm/components/form-field/parts/TanstackFormHelperText.js +10 -9
- package/dist/esm/components/form-field/parts/TanstackRawFormContextualLink.js +20 -19
- package/dist/esm/components/input/Input.js +2 -2
- package/dist/esm/components/label/Label.js +1 -1
- package/dist/esm/components/link/RawLink.js +6 -8
- package/dist/esm/components/multi-select/parts/MultiSelectButton.js +14 -16
- package/dist/esm/components/select/parts/SelectButton.js +4 -4
- package/dist/esm/components/text-area/TextArea.js +6 -6
- package/dist/esm/components/toggle-switch/ToggleSwitch.d.ts +6 -6
- package/dist/esm/components/toggle-switch/ToggleSwitch.js +35 -24
- package/package.json +7 -7
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as l } from "react";
|
|
3
|
-
import { Text as
|
|
4
|
-
import { useFieldA11yContext as
|
|
5
|
-
const d = l(({ children: e, ...t },
|
|
6
|
-
const
|
|
7
|
-
return /* @__PURE__ */
|
|
8
|
-
|
|
3
|
+
import { Text as n } from "../../text/Text.js";
|
|
4
|
+
import { useFieldA11yContext as m } from "../TanstackFormField.context.js";
|
|
5
|
+
const d = l(({ children: e, ...t }, a) => {
|
|
6
|
+
const r = m();
|
|
7
|
+
return /* @__PURE__ */ o(
|
|
8
|
+
n,
|
|
9
9
|
{
|
|
10
10
|
"data-dd-privacy": "allow",
|
|
11
11
|
...t,
|
|
12
|
-
id:
|
|
12
|
+
id: r.helperTextId || t.id,
|
|
13
13
|
"data-unity-slot": "form-field-helper-text",
|
|
14
14
|
variant: "bodySmall",
|
|
15
15
|
asElement: "span",
|
|
16
16
|
color: "content.neutral.low",
|
|
17
|
-
|
|
17
|
+
className: "uy:[&>a]:text-content-neutral-enabled",
|
|
18
|
+
ref: a,
|
|
18
19
|
children: e
|
|
19
20
|
}
|
|
20
21
|
);
|
|
@@ -1,45 +1,46 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as s } from "react";
|
|
3
|
+
import { useUnityTheme as c } from "@payfit/unity-themes";
|
|
4
|
+
import { Button as u } from "react-aria-components/Button";
|
|
5
|
+
import { RawLink as y } from "../../link/RawLink.js";
|
|
6
|
+
import { useFieldA11yContext as f } from "../TanstackFormField.context.js";
|
|
7
|
+
const k = s((t, a) => {
|
|
8
|
+
const { children: o, href: n, onPress: l, ...r } = t, i = f(), { theme: d } = c(), m = d === "rebrand" ? "primary" : "secondary";
|
|
8
9
|
return n ? (
|
|
9
10
|
// @ts-expect-error - it's okay in this case
|
|
10
|
-
/* @__PURE__ */
|
|
11
|
-
|
|
11
|
+
/* @__PURE__ */ e(
|
|
12
|
+
y,
|
|
12
13
|
{
|
|
13
|
-
id:
|
|
14
|
+
id: i.contextualLinkId || t.id,
|
|
14
15
|
size: "small",
|
|
15
|
-
color:
|
|
16
|
+
color: m,
|
|
16
17
|
variant: "standalone",
|
|
17
18
|
"data-unity-slot": "form-field-contextual-link",
|
|
18
19
|
href: n,
|
|
19
20
|
ref: a,
|
|
20
21
|
"data-dd-privacy": "allow",
|
|
21
|
-
...
|
|
22
|
+
...r,
|
|
22
23
|
children: o
|
|
23
24
|
}
|
|
24
25
|
)
|
|
25
26
|
) : (
|
|
26
27
|
// @ts-expect-error - it's okay in this case
|
|
27
|
-
/* @__PURE__ */
|
|
28
|
-
|
|
28
|
+
/* @__PURE__ */ e(
|
|
29
|
+
u,
|
|
29
30
|
{
|
|
30
|
-
id:
|
|
31
|
-
onPress:
|
|
31
|
+
id: i.contextualLinkId || t.id,
|
|
32
|
+
onPress: l,
|
|
32
33
|
"data-unity-slot": "contextual-link",
|
|
33
34
|
className: "uy:typography-body-small uy:w-fit",
|
|
34
35
|
ref: a,
|
|
35
36
|
"data-dd-privacy": "allow",
|
|
36
|
-
...
|
|
37
|
+
...r,
|
|
37
38
|
children: o
|
|
38
39
|
}
|
|
39
40
|
)
|
|
40
41
|
);
|
|
41
42
|
});
|
|
42
|
-
|
|
43
|
+
k.displayName = "TanstackRawFormContextualLink";
|
|
43
44
|
export {
|
|
44
|
-
|
|
45
|
+
k as TanstackRawFormContextualLink
|
|
45
46
|
};
|
|
@@ -9,11 +9,11 @@ import { Spinner as C } from "../spinner/Spinner.js";
|
|
|
9
9
|
const O = h({
|
|
10
10
|
slots: {
|
|
11
11
|
base: "uy:flex uy:h-5.5 uy:sm:h-500 uy:border uy:border-solid uy:rounded-100 uy:sm:rounded-75 uy:focus-within:outline-none uy:focus-within:ring-2 uy:focus-within:ring-utility-focus-ring uy:focus-within:ring-offset-2 uy:active:border-border-form-active",
|
|
12
|
-
prefix: "uy:flex-grow-0 uy:text-content-
|
|
12
|
+
prefix: "uy:flex-grow-0 uy:text-content-form-enabled uy:content-center uy:py-125 uy:sm:py-100 uy:px-150 uy:border-r uy:border-solid uy:rounded-l-100 uy:sm:rounded-l-75 uy:active:border-border-form-active",
|
|
13
13
|
inputWrapper: "uy:flex uy:gap-50 uy:flex-grow uy:flex-nowrap uy:py-125 uy:sm:py-100 uy:px-150 uy:rounded-100 uy:sm:rounded-75 uy:max-w-full uy:justify-between",
|
|
14
14
|
input: "uy:w-full uy:flex-1 uy:outline-none uy:typography-body uy:placeholder:text-content-neutral-lowest uy:min-w-0 uy:max-w-full",
|
|
15
15
|
state: "uy:flex uy:gap-50 uy:items-center uy:shrink-0",
|
|
16
|
-
suffix: "uy:flex-grow-0 uy:text-content-
|
|
16
|
+
suffix: "uy:flex-grow-0 uy:text-content-form-enabled uy:content-center uy:py-125 uy:sm:py-100 uy:px-150 uy:border-l uy:border-solid uy:rounded-r-100 uy:sm:rounded-r-75 uy:active:border-border-form-active"
|
|
17
17
|
},
|
|
18
18
|
variants: {
|
|
19
19
|
isInvalid: {
|
|
@@ -8,7 +8,7 @@ import { mergeProps as N } from "react-aria/mergeProps";
|
|
|
8
8
|
import { useIntl as q } from "react-intl";
|
|
9
9
|
const x = b({
|
|
10
10
|
slots: {
|
|
11
|
-
base: "uy:typography-body-strong uy:text-content-
|
|
11
|
+
base: "uy:typography-body-strong uy:text-content-neutral-enabled uy:leading-[1lh]",
|
|
12
12
|
asterisk: "uy:text-content-danger uy:inline-block uy:ml-25",
|
|
13
13
|
optionalTag: "uy:typography-body uy:inline-block uy:ml-25"
|
|
14
14
|
},
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsxs as g, jsx as w } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as k } from "react";
|
|
3
|
-
import { IconSprite as
|
|
4
|
-
import { uyTv as
|
|
3
|
+
import { IconSprite as z } from "@payfit/unity-icons";
|
|
4
|
+
import { uyTv as D } from "@payfit/unity-themes";
|
|
5
5
|
import { Link as A } from "react-aria-components/Link";
|
|
6
6
|
import { useRouter as E } from "../../providers/router/RouterProvider.js";
|
|
7
7
|
import { isExternalUrl as L } from "./utils.js";
|
|
8
|
-
const N =
|
|
8
|
+
const N = D({
|
|
9
9
|
slots: {
|
|
10
10
|
base: [
|
|
11
11
|
"uy:rounded-50 uy:underline uy:transition-colors uy:underline-offset-3",
|
|
@@ -18,11 +18,11 @@ const N = z({
|
|
|
18
18
|
variant: {
|
|
19
19
|
inline: {
|
|
20
20
|
base: "uy:inline uy:text-(length:inherit) uy:font-medium uy:leading-inherit",
|
|
21
|
-
icon: "uy:align-top"
|
|
21
|
+
icon: "uy:align-text-top uy:w-[0.95em] uy:h-[1.2em]"
|
|
22
22
|
},
|
|
23
23
|
standalone: {
|
|
24
24
|
base: "uy:typography-action uy:flex uy:gap-x-25 uy:items-end uy:py-50 uy:sm:p-0",
|
|
25
|
-
icon: "uy:self-center"
|
|
25
|
+
icon: "uy:self-center uy:size-[1.1em]"
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
size: {
|
|
@@ -145,12 +145,10 @@ const N = z({
|
|
|
145
145
|
children: [
|
|
146
146
|
l,
|
|
147
147
|
r && /* @__PURE__ */ w(
|
|
148
|
-
|
|
148
|
+
z,
|
|
149
149
|
{
|
|
150
150
|
src: "ArrowSquareOutOutlined",
|
|
151
151
|
color: "currentColor",
|
|
152
|
-
width: "1.25em",
|
|
153
|
-
height: "1.25em",
|
|
154
152
|
role: "presentation",
|
|
155
153
|
className: h()
|
|
156
154
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { memo as D, forwardRef as k, useContext as A, useMemo as K } from "react";
|
|
3
3
|
import { useSelectContext as R, useStoreState as $, Select as L } from "@ariakit/react";
|
|
4
4
|
import { uyTv as P } from "@payfit/unity-themes";
|
|
@@ -14,7 +14,7 @@ const H = P({
|
|
|
14
14
|
base: "uy:h-5.5 uy:sm:h-500 uy:flex uy:items-center uy:justify-between uy:py-125 uy:sm:py-100 uy:px-150 uy:w-full uy:border uy:border-solid uy:rounded-100 uy:sm:rounded-75 uy:focus-within:outline-none uy:focus-within:ring-2 uy:focus-within:ring-utility-focus-ring uy:focus-within:ring-offset-2 uy:active:not([disabled]):border-border-form-active uy:pointer-events-auto!",
|
|
15
15
|
inputValue: "uy:flex-1 uy:typography-body uy:text-left uy:line-clamp-1",
|
|
16
16
|
state: "uy:grow-0 uy:outline-none uy:typography-body uy:placeholder:text-content-neutral-lowest uy:inline-flex uy:gap-50 uy:items-center uy:px-100",
|
|
17
|
-
suffix: "uy:text-content-neutral-
|
|
17
|
+
suffix: "uy:text-content-neutral-lowest"
|
|
18
18
|
},
|
|
19
19
|
variants: {
|
|
20
20
|
isDisabled: {
|
|
@@ -37,8 +37,8 @@ const H = P({
|
|
|
37
37
|
true: {
|
|
38
38
|
base: "uy:bg-surface-form-error uy:border-border-form-error",
|
|
39
39
|
inputValue: "uy:text-content-form-error",
|
|
40
|
-
state: "uy:text-content-form-error"
|
|
41
|
-
suffix:
|
|
40
|
+
state: "uy:text-content-form-error"
|
|
41
|
+
// suffix: 'uy:text-content-form-error',
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
44
|
isEmpty: {
|
|
@@ -58,8 +58,7 @@ const H = P({
|
|
|
58
58
|
className: {
|
|
59
59
|
base: "uy:border-border-form-enabled uy:bg-surface-form-enabled",
|
|
60
60
|
inputValue: "uy:text-content-form-enabled uy:bg-surface-form-enabled",
|
|
61
|
-
state: "uy:text-content-neutral-disabled"
|
|
62
|
-
suffix: "uy:border-border-form-enabled uy:text-content-form-enabled"
|
|
61
|
+
state: "uy:text-content-neutral-disabled"
|
|
63
62
|
}
|
|
64
63
|
},
|
|
65
64
|
{
|
|
@@ -86,20 +85,20 @@ function J({
|
|
|
86
85
|
onFocus: h,
|
|
87
86
|
...S
|
|
88
87
|
}, v) {
|
|
89
|
-
const m = T(), u = U(), C = R(), I = $(C, "open"),
|
|
88
|
+
const m = T(), u = U(), C = R(), I = $(C, "open"), y = A(G), a = y.maxVisibleItems ?? 0, i = y.selectedKeys ?? /* @__PURE__ */ new Set(), o = Array.from(x), { base: M, inputValue: V, state: B, suffix: N } = H({
|
|
90
89
|
isDisabled: !!n,
|
|
91
90
|
isReadOnly: !!t,
|
|
92
91
|
isInvalid: !!r,
|
|
93
|
-
isEmpty:
|
|
94
|
-
}),
|
|
92
|
+
isEmpty: i.size === 0
|
|
93
|
+
}), f = Math.max(
|
|
95
94
|
o.length - a,
|
|
96
95
|
0
|
|
97
|
-
), O =
|
|
96
|
+
), O = i.size > 0 && !n && !t && !c, z = K(() => {
|
|
98
97
|
if (o.length === 0) return s;
|
|
99
98
|
const E = o.slice(0, a), j = new Set(E);
|
|
100
99
|
return d(j);
|
|
101
100
|
}, [o, a, d, s]);
|
|
102
|
-
return /* @__PURE__ */
|
|
101
|
+
return /* @__PURE__ */ l(
|
|
103
102
|
L,
|
|
104
103
|
{
|
|
105
104
|
...S,
|
|
@@ -113,8 +112,8 @@ function J({
|
|
|
113
112
|
onBlur: w,
|
|
114
113
|
onFocus: h,
|
|
115
114
|
children: [
|
|
116
|
-
/* @__PURE__ */ e("span", { id: `${m}-select-button-label`, className: V(), children:
|
|
117
|
-
/* @__PURE__ */
|
|
115
|
+
/* @__PURE__ */ e("span", { id: `${m}-select-button-label`, className: V(), children: i.size > 0 ? z : s }),
|
|
116
|
+
/* @__PURE__ */ l("div", { className: B(), children: [
|
|
118
117
|
c && /* @__PURE__ */ e(
|
|
119
118
|
F,
|
|
120
119
|
{
|
|
@@ -137,9 +136,9 @@ function J({
|
|
|
137
136
|
})
|
|
138
137
|
}
|
|
139
138
|
),
|
|
140
|
-
|
|
139
|
+
f > 0 && /* @__PURE__ */ l(W, { variant: "numeric", children: [
|
|
141
140
|
"+",
|
|
142
|
-
|
|
141
|
+
f
|
|
143
142
|
] }),
|
|
144
143
|
O && /* @__PURE__ */ e(
|
|
145
144
|
q,
|
|
@@ -158,7 +157,6 @@ function J({
|
|
|
158
157
|
/* @__PURE__ */ e(
|
|
159
158
|
b,
|
|
160
159
|
{
|
|
161
|
-
color: "content.neutral.low",
|
|
162
160
|
className: N(),
|
|
163
161
|
src: I ? "CaretUpOutlined" : "CaretDownOutlined",
|
|
164
162
|
role: "presentation"
|
|
@@ -19,7 +19,7 @@ const x = b({
|
|
|
19
19
|
true: {
|
|
20
20
|
base: "uy:border-border-form-disabled uy:bg-surface-form-disabled",
|
|
21
21
|
selectValue: "uy:text-content-form-disabled",
|
|
22
|
-
icon: "uy:text-content-
|
|
22
|
+
icon: "uy:text-content-neutral-lowest-disabled"
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
isInvalid: {
|
|
@@ -31,7 +31,7 @@ const x = b({
|
|
|
31
31
|
true: {
|
|
32
32
|
base: "uy:border-border-form-disabled uy:bg-surface-form-disabled",
|
|
33
33
|
selectValue: "uy:text-content-form-readonly",
|
|
34
|
-
icon: "uy:text-content-
|
|
34
|
+
icon: "uy:text-content-neutral-lowest-disabled"
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
},
|
|
@@ -42,8 +42,8 @@ const x = b({
|
|
|
42
42
|
isReadOnly: !1,
|
|
43
43
|
className: {
|
|
44
44
|
base: "uy:border-border-form-enabled uy:hover:border-border-form-hover uy:bg-surface-form-enabled uy:hover:bg-surface-form-hover uy:active:border-border-form-active",
|
|
45
|
-
selectValue: "uy:text-content-
|
|
46
|
-
icon: "uy:text-content-neutral-
|
|
45
|
+
selectValue: "uy:text-content-form-enabled uy:hover:text-content-form-hover",
|
|
46
|
+
icon: "uy:text-content-neutral-lowest uy:hover:text-content-neutral-lowest-hover"
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
],
|
|
@@ -47,7 +47,7 @@ const N = h({
|
|
|
47
47
|
base: "uy:border-border-form-enabled uy:bg-surface-form-enabled",
|
|
48
48
|
inputWrapper: "uy:border-border-form-enabled uy:bg-surface-form-enabled",
|
|
49
49
|
input: "uy:text-content-form-enabled uy:bg-surface-form-enabled",
|
|
50
|
-
state: "uy:text-content-
|
|
50
|
+
state: "uy:text-content-form-disabled"
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
],
|
|
@@ -59,7 +59,7 @@ const N = h({
|
|
|
59
59
|
}), W = x(
|
|
60
60
|
({
|
|
61
61
|
isInvalid: o,
|
|
62
|
-
isLoading:
|
|
62
|
+
isLoading: n,
|
|
63
63
|
isDisabled: r,
|
|
64
64
|
isReadOnly: t,
|
|
65
65
|
isResizable: i = !1,
|
|
@@ -81,14 +81,14 @@ const N = h({
|
|
|
81
81
|
...d,
|
|
82
82
|
ref: f,
|
|
83
83
|
className: c(),
|
|
84
|
-
"aria-busy":
|
|
84
|
+
"aria-busy": n,
|
|
85
85
|
"aria-invalid": o,
|
|
86
86
|
readOnly: t,
|
|
87
87
|
disabled: r
|
|
88
88
|
}
|
|
89
89
|
),
|
|
90
90
|
/* @__PURE__ */ a("div", { className: p(), children: [
|
|
91
|
-
|
|
91
|
+
n && /* @__PURE__ */ e(
|
|
92
92
|
L,
|
|
93
93
|
{
|
|
94
94
|
color: "inherit",
|
|
@@ -123,8 +123,8 @@ const N = h({
|
|
|
123
123
|
id: "unity:component:form-field:textarea:resize-handle:label",
|
|
124
124
|
defaultMessage: "Resize textarea"
|
|
125
125
|
}),
|
|
126
|
-
onKeyDown: (
|
|
127
|
-
(
|
|
126
|
+
onKeyDown: (s) => {
|
|
127
|
+
(s.key === "Enter" || s.key === " ") && (s.preventDefault(), l.current?.querySelector("textarea")?.focus());
|
|
128
128
|
},
|
|
129
129
|
children: /* @__PURE__ */ a(
|
|
130
130
|
"svg",
|
|
@@ -3,8 +3,8 @@ import { SwitchProps as AriaSwitchProps } from 'react-aria-components/Switch';
|
|
|
3
3
|
export declare const toggleSwitch: import('tailwind-variants').TVReturnType<{
|
|
4
4
|
isDisabled: {
|
|
5
5
|
false: {
|
|
6
|
-
indicator: string;
|
|
7
|
-
knob: string;
|
|
6
|
+
indicator: string[];
|
|
7
|
+
knob: string[];
|
|
8
8
|
};
|
|
9
9
|
true: {
|
|
10
10
|
indicator: string;
|
|
@@ -22,8 +22,8 @@ export declare const toggleSwitch: import('tailwind-variants').TVReturnType<{
|
|
|
22
22
|
}, undefined, {
|
|
23
23
|
isDisabled: {
|
|
24
24
|
false: {
|
|
25
|
-
indicator: string;
|
|
26
|
-
knob: string;
|
|
25
|
+
indicator: string[];
|
|
26
|
+
knob: string[];
|
|
27
27
|
};
|
|
28
28
|
true: {
|
|
29
29
|
indicator: string;
|
|
@@ -41,8 +41,8 @@ export declare const toggleSwitch: import('tailwind-variants').TVReturnType<{
|
|
|
41
41
|
}, import('tailwind-variants').TVReturnType<{
|
|
42
42
|
isDisabled: {
|
|
43
43
|
false: {
|
|
44
|
-
indicator: string;
|
|
45
|
-
knob: string;
|
|
44
|
+
indicator: string[];
|
|
45
|
+
knob: string[];
|
|
46
46
|
};
|
|
47
47
|
true: {
|
|
48
48
|
indicator: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as e, jsxs as a } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as h } from "react";
|
|
3
3
|
import { uyTv as v } from "@payfit/unity-themes";
|
|
4
|
-
import { Switch as
|
|
4
|
+
import { Switch as m } from "react-aria-components/Switch";
|
|
5
5
|
import { useBreakpointListener as w } from "../../hooks/use-breakpoint-listener.js";
|
|
6
6
|
const x = v({
|
|
7
7
|
slots: {
|
|
@@ -35,8 +35,19 @@ const x = v({
|
|
|
35
35
|
variants: {
|
|
36
36
|
isDisabled: {
|
|
37
37
|
false: {
|
|
38
|
-
indicator:
|
|
39
|
-
|
|
38
|
+
indicator: [
|
|
39
|
+
'uy:theme-legacy:group-data-[selected="true"]:bg-surface-form-active uy:theme-legacy:group-data-[selected="true"]:border-border-form-active',
|
|
40
|
+
'uy:theme-rebrand:group-data-[selected="true"]:bg-surface-form-active uy:theme-rebrand:group-data-[selected="true"]:border-surface-form-active',
|
|
41
|
+
'uy:theme-legacy:group-data-[selected="true"]:group-data-[pressed]:bg-surface-form-active',
|
|
42
|
+
'uy:theme-legacy:group-data-[selected="true"]:group-data-[pressed]:border-border-form-active',
|
|
43
|
+
'uy:theme-rebrand:group-data-[selected="true"]:group-data-[pressed]:bg-surface-primary-active',
|
|
44
|
+
'uy:theme-rebrand:group-data-[selected="true"]:group-data-[pressed]:border-border-primary-active'
|
|
45
|
+
],
|
|
46
|
+
knob: [
|
|
47
|
+
"uy:theme-legacy:group-data-[selected=true]:border-border-inverted-enabled uy:theme-rebrand:group-data-[selected=true]:border-transparent",
|
|
48
|
+
"uy:group-data-[selected=true]:group-data-[pressed]:bg-surface-form-pressed",
|
|
49
|
+
"uy:group-data-[selected=true]:group-data-[pressed]:border-border-inverted-pressed"
|
|
50
|
+
]
|
|
40
51
|
},
|
|
41
52
|
true: {
|
|
42
53
|
indicator: "",
|
|
@@ -46,39 +57,39 @@ const x = v({
|
|
|
46
57
|
}
|
|
47
58
|
}), N = h(
|
|
48
59
|
({
|
|
49
|
-
label:
|
|
60
|
+
label: u,
|
|
50
61
|
helperText: r,
|
|
51
|
-
isLabelSrOnly:
|
|
62
|
+
isLabelSrOnly: o = !1,
|
|
52
63
|
isDisabled: d,
|
|
53
|
-
...
|
|
54
|
-
},
|
|
64
|
+
...b
|
|
65
|
+
}, s) => {
|
|
55
66
|
const {
|
|
56
67
|
container: t,
|
|
57
68
|
indicator: i,
|
|
58
69
|
knob: l,
|
|
59
70
|
textWrapper: y,
|
|
60
71
|
label: c,
|
|
61
|
-
hintText:
|
|
62
|
-
mobileContainer:
|
|
63
|
-
} = x({ isDisabled: d }),
|
|
64
|
-
return
|
|
65
|
-
|
|
72
|
+
hintText: p,
|
|
73
|
+
mobileContainer: g
|
|
74
|
+
} = x({ isDisabled: d }), f = w() === "xs", n = { ...b, role: "switch" };
|
|
75
|
+
return f ? /* @__PURE__ */ e(
|
|
76
|
+
m,
|
|
66
77
|
{
|
|
67
|
-
...
|
|
68
|
-
ref:
|
|
78
|
+
...n,
|
|
79
|
+
ref: s,
|
|
69
80
|
className: t(),
|
|
70
81
|
isDisabled: d,
|
|
71
|
-
children: /* @__PURE__ */ a("div", { className:
|
|
82
|
+
children: /* @__PURE__ */ a("div", { className: g(), children: [
|
|
72
83
|
/* @__PURE__ */ a(
|
|
73
84
|
"div",
|
|
74
85
|
{
|
|
75
86
|
className: y({
|
|
76
|
-
className:
|
|
87
|
+
className: o ? "uy:sr-only" : ""
|
|
77
88
|
}),
|
|
78
89
|
"data-dd-privacy": "allow",
|
|
79
90
|
children: [
|
|
80
|
-
/* @__PURE__ */ e("span", { className: c(), children:
|
|
81
|
-
r && /* @__PURE__ */ e("span", { className:
|
|
91
|
+
/* @__PURE__ */ e("span", { className: c(), children: u }),
|
|
92
|
+
r && /* @__PURE__ */ e("span", { className: p(), children: r })
|
|
82
93
|
]
|
|
83
94
|
}
|
|
84
95
|
),
|
|
@@ -86,10 +97,10 @@ const x = v({
|
|
|
86
97
|
] })
|
|
87
98
|
}
|
|
88
99
|
) : /* @__PURE__ */ a(
|
|
89
|
-
|
|
100
|
+
m,
|
|
90
101
|
{
|
|
91
|
-
...
|
|
92
|
-
ref:
|
|
102
|
+
...n,
|
|
103
|
+
ref: s,
|
|
93
104
|
className: t(),
|
|
94
105
|
isDisabled: d,
|
|
95
106
|
children: [
|
|
@@ -98,12 +109,12 @@ const x = v({
|
|
|
98
109
|
"div",
|
|
99
110
|
{
|
|
100
111
|
className: y({
|
|
101
|
-
className:
|
|
112
|
+
className: o ? "uy:sr-only" : ""
|
|
102
113
|
}),
|
|
103
114
|
"data-dd-privacy": "allow",
|
|
104
115
|
children: [
|
|
105
|
-
/* @__PURE__ */ e("span", { className: c(), children:
|
|
106
|
-
r && /* @__PURE__ */ e("span", { className:
|
|
116
|
+
/* @__PURE__ */ e("span", { className: c(), children: u }),
|
|
117
|
+
r && /* @__PURE__ */ e("span", { className: p(), children: r })
|
|
107
118
|
]
|
|
108
119
|
}
|
|
109
120
|
)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@payfit/unity-components",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.31.0",
|
|
4
4
|
"module": "./dist/esm/index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@hookform/devtools": "4.4.0",
|
|
43
43
|
"@hookform/resolvers": "5.2.1",
|
|
44
44
|
"@internationalized/date": "3.12.1",
|
|
45
|
-
"@payfit/unity-illustrations": "2.
|
|
45
|
+
"@payfit/unity-illustrations": "2.31.0",
|
|
46
46
|
"@radix-ui/react-avatar": "1.1.11",
|
|
47
47
|
"@radix-ui/react-slot": "1.2.4",
|
|
48
48
|
"@react-aria/interactions": "3.28.0",
|
|
@@ -74,8 +74,8 @@
|
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
76
|
"@hookform/devtools": "^4",
|
|
77
|
-
"@payfit/unity-icons": "2.
|
|
78
|
-
"@payfit/unity-themes": "2.
|
|
77
|
+
"@payfit/unity-icons": "2.31.0",
|
|
78
|
+
"@payfit/unity-themes": "2.31.0",
|
|
79
79
|
"@storybook/react-vite": "^10.3.2",
|
|
80
80
|
"@tanstack/react-query": "^5",
|
|
81
81
|
"@tanstack/react-router": "^1.131",
|
|
@@ -89,9 +89,9 @@
|
|
|
89
89
|
"@figma/code-connect": "1.4.3",
|
|
90
90
|
"@hookform/devtools": "4.4.0",
|
|
91
91
|
"@internationalized/date": "3.12.1",
|
|
92
|
-
"@payfit/unity-icons": "2.
|
|
93
|
-
"@payfit/unity-illustrations": "2.
|
|
94
|
-
"@payfit/unity-themes": "2.
|
|
92
|
+
"@payfit/unity-icons": "2.31.0",
|
|
93
|
+
"@payfit/unity-illustrations": "2.31.0",
|
|
94
|
+
"@payfit/unity-themes": "2.31.0",
|
|
95
95
|
"@storybook/addon-a11y": "10.3.5",
|
|
96
96
|
"@storybook/addon-designs": "11.1.3",
|
|
97
97
|
"@storybook/addon-docs": "10.3.5",
|