@payfit/unity-components 2.46.8 → 2.46.10
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/breadcrumbs/parts/RawBreadcrumbLink.js +8 -8
- package/dist/esm/components/button/Button.variants.js +6 -6
- package/dist/esm/components/checkbox/Checkbox.js +6 -6
- package/dist/esm/components/checkbox/Checkbox.variants.js +2 -2
- package/dist/esm/components/checkbox/parts/CheckboxIndicator.js +9 -9
- package/dist/esm/components/date-calendar/DateCalendar.js +73 -73
- package/dist/esm/components/date-range-calendar/DateRangeCalendar.js +66 -66
- package/dist/esm/components/empty-state/parts/EmptyStateContent.js +4 -4
- package/dist/esm/components/error-state/ErrorState.js +66 -20
- package/dist/esm/components/funnel-layout/parts/FunnelPageAction.d.ts +2 -2
- package/dist/esm/components/funnel-layout/parts/FunnelPageAction.js +18 -15
- package/dist/esm/components/icon-button/IconButton.variants.js +6 -6
- package/dist/esm/components/list-view/parts/RawListViewItem.js +9 -8
- package/dist/esm/components/nav/Nav.js +10 -10
- package/dist/esm/components/selectable-card/selectable-card-checkbox-group/parts/SelectableCardCheckbox.js +20 -26
- package/dist/esm/components/toast/parts/ToastAction.js +9 -9
- package/package.json +7 -8
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as w, useState as R, useRef as E, useCallback as d, useLayoutEffect as L, useEffect as i } from "react";
|
|
3
3
|
import { RawLink as b } from "../../link/RawLink.js";
|
|
4
|
-
import { Tooltip as
|
|
5
|
-
const
|
|
4
|
+
import { Tooltip as T } from "../../tooltip/Tooltip.js";
|
|
5
|
+
const k = 180, y = w(
|
|
6
6
|
({ children: r, href: l, ...m }, n) => {
|
|
7
7
|
const o = typeof r == "string" ? r : "", [p, c] = R(!1), s = E(null), t = d(() => {
|
|
8
8
|
const e = s.current;
|
|
@@ -45,18 +45,18 @@ const T = 180, k = w(
|
|
|
45
45
|
{
|
|
46
46
|
isExact: !0,
|
|
47
47
|
href: l,
|
|
48
|
-
color: "
|
|
49
|
-
maxWidthTruncation:
|
|
48
|
+
color: "inherit",
|
|
49
|
+
maxWidthTruncation: k,
|
|
50
50
|
ref: v,
|
|
51
51
|
...m,
|
|
52
52
|
children: r
|
|
53
53
|
}
|
|
54
54
|
);
|
|
55
|
-
return p && o ? /* @__PURE__ */ a(
|
|
55
|
+
return p && o ? /* @__PURE__ */ a(T, { title: o, children: u }) : u;
|
|
56
56
|
}
|
|
57
57
|
);
|
|
58
|
-
|
|
58
|
+
y.displayName = "BreadcrumbLink";
|
|
59
59
|
export {
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
k as BREADCRUMB_ITEM_MAX_WIDTH,
|
|
61
|
+
y as RawBreadcrumbLink
|
|
62
62
|
};
|
|
@@ -35,7 +35,7 @@ const t = e({
|
|
|
35
35
|
"uy:theme-legacy:bg-surface-primary-enabled uy:theme-rebrand:bg-surface-neutral-highest-enabled uy:text-content-inverted-enabled",
|
|
36
36
|
'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',
|
|
37
37
|
"uy:theme-legacy:active:bg-surface-primary-active uy:theme-rebrand:active:bg-surface-neutral-highest-active uy:active:text-content-inverted-hover",
|
|
38
|
-
"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"
|
|
38
|
+
"uy:theme-legacy:data-[pressed]:bg-surface-primary-pressed uy:theme-rebrand:data-[pressed]:bg-surface-neutral-highest-pressed uy:theme-legacy:data-[pressed]:text-content-inverted-pressed uy:theme-rebrand:data-[pressed]:text-content-neutral-pressed"
|
|
39
39
|
],
|
|
40
40
|
warning: [
|
|
41
41
|
"uy:bg-surface-warning-enabled uy:text-content-neutral-enabled",
|
|
@@ -111,11 +111,11 @@ const t = e({
|
|
|
111
111
|
variants: {
|
|
112
112
|
color: {
|
|
113
113
|
primary: [
|
|
114
|
-
"uy:bg-transparent uy:text-content-primary-enabled",
|
|
115
|
-
'uy:data-[hovered="true"]:bg-surface-primary-lowest-hover uy:data-[hovered="true"]:text-content-primary-hover',
|
|
116
|
-
"uy:active:bg-surface-primary-lowest-active uy:active:text-content-primary-active",
|
|
117
|
-
"uy:data-[pressed=true]:bg-surface-primary-lowest-pressed uy:data-[pressed=true]:text-content-primary-pressed",
|
|
118
|
-
"uy:data-[focus-visible]:bg-transparent"
|
|
114
|
+
"uy:bg-transparent uy:theme-legacy:text-content-primary-enabled uy:theme-rebrand:text-content-neutral-enabled",
|
|
115
|
+
'uy:theme-legacy:data-[hovered="true"]:bg-surface-primary-lowest-hover uy:theme-rebrand:data-[hovered="true"]:bg-surface-neutral-hover uy:theme-legacy:data-[hovered="true"]:text-content-primary-hover uy:theme-rebrand:data-[hovered="true"]:text-content-neutral-hover',
|
|
116
|
+
"uy:theme-legacy:active:bg-surface-primary-lowest-active uy:theme-rebrand:active:bg-surface-neutral-active uy:theme-legacy:active:text-content-primary-active uy:theme-rebrand:active:text-content-neutral-active",
|
|
117
|
+
"uy:theme-legacy:data-[pressed=true]:bg-surface-primary-lowest-pressed uy:theme-rebrand:data-[pressed=true]:bg-surface-neutral-pressed uy:theme-legacy:data-[pressed=true]:text-content-primary-pressed uy:theme-rebrand:data-[pressed=true]:text-content-neutral-pressed",
|
|
118
|
+
"uy:data-[focus-visible]:bg-transparent uy:theme-rebrand:data-[focus-visible]:text-content-neutral-focus"
|
|
119
119
|
],
|
|
120
120
|
warning: [
|
|
121
121
|
"uy:bg-transparent uy:text-content-warning-enabled",
|
|
@@ -6,7 +6,7 @@ import { Text as N } from "../text/Text.js";
|
|
|
6
6
|
import { checkbox as V } from "./Checkbox.variants.js";
|
|
7
7
|
import { CheckboxIndicator as F } from "./parts/CheckboxIndicator.js";
|
|
8
8
|
const L = R(
|
|
9
|
-
({ children:
|
|
9
|
+
({ children: v, helperText: i, feedbackText: l, ...o }, u) => {
|
|
10
10
|
const a = E(), {
|
|
11
11
|
isDisabled: t,
|
|
12
12
|
isReadOnly: d,
|
|
@@ -27,18 +27,18 @@ const L = R(
|
|
|
27
27
|
isDisabled: t,
|
|
28
28
|
isReadOnly: d,
|
|
29
29
|
isInvalid: s
|
|
30
|
-
}),
|
|
30
|
+
}), p = [o["aria-labelledby"], `${a}-label`].filter(Boolean), y = [
|
|
31
31
|
o["aria-describedby"],
|
|
32
32
|
typeof i == "string" ? `${a}-helper-text` : void 0,
|
|
33
33
|
typeof l == "string" ? `${a}-feedback-text` : void 0
|
|
34
|
-
].filter(Boolean), I =
|
|
34
|
+
].filter(Boolean), I = p.length > 0 ? p.join(" ") : void 0, S = y.length > 0 ? y.join(" ") : void 0;
|
|
35
35
|
return /* @__PURE__ */ r("div", { className: g(), children: [
|
|
36
36
|
/* @__PURE__ */ e(
|
|
37
37
|
D,
|
|
38
38
|
{
|
|
39
39
|
...x,
|
|
40
40
|
isInvalid: s,
|
|
41
|
-
ref:
|
|
41
|
+
ref: u,
|
|
42
42
|
className: $(),
|
|
43
43
|
"aria-labelledby": I,
|
|
44
44
|
"aria-describedby": S,
|
|
@@ -49,7 +49,7 @@ const L = R(
|
|
|
49
49
|
F,
|
|
50
50
|
{
|
|
51
51
|
...j,
|
|
52
|
-
className: "uy:mt-
|
|
52
|
+
className: "uy:mt-25 uy:ml-0"
|
|
53
53
|
}
|
|
54
54
|
),
|
|
55
55
|
/* @__PURE__ */ e(
|
|
@@ -58,7 +58,7 @@ const L = R(
|
|
|
58
58
|
id: `${a}-label`,
|
|
59
59
|
className: k(),
|
|
60
60
|
"data-dd-privacy": "allow",
|
|
61
|
-
children:
|
|
61
|
+
children: v
|
|
62
62
|
}
|
|
63
63
|
),
|
|
64
64
|
c === "required" && n && /* @__PURE__ */ r("span", { className: C(), children: [
|
|
@@ -12,12 +12,12 @@ const r = e({
|
|
|
12
12
|
],
|
|
13
13
|
wrapper: [
|
|
14
14
|
"uy:group uy:sm:rounded-25 uy:leading-none uy:sm:leading-[1lh]",
|
|
15
|
-
"uy:inline-flex uy:items-
|
|
15
|
+
"uy:inline-flex uy:items-center",
|
|
16
16
|
"uy:typography-body uy:text-content-form-enabled",
|
|
17
17
|
"uy:data-[disabled=true]:text-content-form-disabled uy:data-[disabled]:cursor-not-allowed",
|
|
18
18
|
"uy:data-[readonly=true]:cursor-not-allowed uy:theme-rebrand:data-[readonly=true]:text-content-form-read-only"
|
|
19
19
|
],
|
|
20
|
-
label: "uy:ml-75",
|
|
20
|
+
label: "uy:ml-75 uy:leading-[1]",
|
|
21
21
|
asterisk: "uy:text-content-danger uy:ml-25",
|
|
22
22
|
optionalTag: "uy:typography-body uy:leading-1 uy:ml-25",
|
|
23
23
|
descriptionsContainer: "uy:ml-300 uy:leading-1 uy:inline-flex uy:flex-col",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { uyTv as u } from "@payfit/unity-themes";
|
|
3
|
-
const
|
|
3
|
+
const b = u({
|
|
4
4
|
slots: {
|
|
5
5
|
base: [
|
|
6
6
|
"uy:flex uy:items-center uy:justify-center uy:rounded-50 uy:m-25 uy:w-200 uy:h-200 uy:text-content-inverted uy:border uy:border-solid uy:transition-all uy:duration-100"
|
|
@@ -36,7 +36,7 @@ const n = u({
|
|
|
36
36
|
isInvalid: !1,
|
|
37
37
|
isReadOnly: !1,
|
|
38
38
|
className: {
|
|
39
|
-
base: "uy:border-border-form-enabled uy:group-data-[focus-visible=true]:border-border-form-focus uy:bg-surface-form-enabled"
|
|
39
|
+
base: "uy:border-border-form-enabled uy:hover:border-border-form-hover uy:group-data-[hovered=true]:border-border-form-hover uy:group-hover:border-border-form-hover uy:focus-visible:border-border-form-focus uy:group-data-[focus-visible=true]:border-border-form-focus uy:bg-surface-form-enabled"
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
42
|
{
|
|
@@ -112,17 +112,17 @@ function c({
|
|
|
112
112
|
isSelected: r,
|
|
113
113
|
isDisabled: s,
|
|
114
114
|
isIndeterminate: a,
|
|
115
|
-
isInvalid:
|
|
116
|
-
isReadOnly:
|
|
117
|
-
className:
|
|
115
|
+
isInvalid: o,
|
|
116
|
+
isReadOnly: t,
|
|
117
|
+
className: d
|
|
118
118
|
}) {
|
|
119
|
-
const { base: l, checkmark: i } =
|
|
119
|
+
const { base: l, checkmark: i } = b({
|
|
120
120
|
isSelected: r || a,
|
|
121
121
|
isDisabled: s,
|
|
122
|
-
isInvalid:
|
|
123
|
-
isReadOnly:
|
|
122
|
+
isInvalid: o,
|
|
123
|
+
isReadOnly: t
|
|
124
124
|
});
|
|
125
|
-
return /* @__PURE__ */ e("div", { className: l({ className:
|
|
125
|
+
return /* @__PURE__ */ e("div", { className: l({ className: d }), "data-dd-privacy": "mask", children: /* @__PURE__ */ e(
|
|
126
126
|
"svg",
|
|
127
127
|
{
|
|
128
128
|
fill: "none",
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { jsx as a, jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { today as
|
|
4
|
-
import { uyTv as
|
|
5
|
-
import { Calendar as
|
|
6
|
-
import { useIntl as
|
|
7
|
-
import { IconButton as
|
|
8
|
-
import { calendarBase as
|
|
9
|
-
import { useMonthsList as
|
|
10
|
-
import { useYearsList as
|
|
11
|
-
import { DateSegmentSelect as
|
|
12
|
-
const
|
|
13
|
-
extend:
|
|
1
|
+
import { jsx as a, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import { useState as b } from "react";
|
|
3
|
+
import { today as k, getLocalTimeZone as f, isToday as F } from "@internationalized/date";
|
|
4
|
+
import { useUnityTheme as R, uyTv as P } from "@payfit/unity-themes";
|
|
5
|
+
import { Calendar as U, Heading as W, CalendarGrid as Z, CalendarGridHeader as $, CalendarHeaderCell as q, CalendarGridBody as w, CalendarCell as z } from "react-aria-components/Calendar";
|
|
6
|
+
import { useIntl as A } from "react-intl";
|
|
7
|
+
import { IconButton as C } from "../icon-button/IconButton.js";
|
|
8
|
+
import { calendarBase as E } from "./DateCalendar.variants.js";
|
|
9
|
+
import { useMonthsList as J } from "./hooks/useMonthsList.js";
|
|
10
|
+
import { useYearsList as K } from "./hooks/useYearsList.js";
|
|
11
|
+
import { DateSegmentSelect as v } from "./parts/DateSegmentSelect.js";
|
|
12
|
+
const Q = P({
|
|
13
|
+
extend: E,
|
|
14
14
|
slots: {
|
|
15
15
|
calendarGrid: "uy:border-spacing-25",
|
|
16
16
|
calendarCell: [
|
|
@@ -33,121 +33,121 @@ const E = j({
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
|
-
function
|
|
36
|
+
function X({
|
|
37
37
|
value: c,
|
|
38
|
-
defaultValue:
|
|
38
|
+
defaultValue: d,
|
|
39
39
|
minValue: r,
|
|
40
|
-
maxValue:
|
|
41
|
-
onChange:
|
|
42
|
-
onFocusChange:
|
|
40
|
+
maxValue: n,
|
|
41
|
+
onChange: p,
|
|
42
|
+
onFocusChange: D,
|
|
43
43
|
...t
|
|
44
44
|
}) {
|
|
45
|
-
const m =
|
|
45
|
+
const m = A(), { theme: y } = R(), N = k(f()), x = J(), G = K({
|
|
46
46
|
startYear: r?.year,
|
|
47
|
-
endYear:
|
|
48
|
-
}), [
|
|
49
|
-
const e = c ??
|
|
50
|
-
return r && e.compare(r) < 0 ? r :
|
|
51
|
-
}),
|
|
52
|
-
|
|
47
|
+
endYear: n?.year
|
|
48
|
+
}), [H, L] = b(c ?? d ?? null), [o, i] = b(() => {
|
|
49
|
+
const e = c ?? d ?? N;
|
|
50
|
+
return r && e.compare(r) < 0 ? r : n && e.compare(n) > 0 ? n : e;
|
|
51
|
+
}), M = (e) => {
|
|
52
|
+
i(
|
|
53
53
|
(l) => l.set({ month: parseInt(e, 10) })
|
|
54
54
|
);
|
|
55
|
-
},
|
|
56
|
-
|
|
55
|
+
}, S = (e) => {
|
|
56
|
+
i(
|
|
57
57
|
(l) => l.set({ year: parseInt(e, 10) })
|
|
58
58
|
);
|
|
59
59
|
}, {
|
|
60
|
-
base:
|
|
61
|
-
calendarWrapper:
|
|
62
|
-
dialogHeader:
|
|
63
|
-
dialogHeaderGroup:
|
|
64
|
-
calendarGrid:
|
|
65
|
-
calendarHeaderCell:
|
|
66
|
-
calendarCell:
|
|
67
|
-
} =
|
|
60
|
+
base: B,
|
|
61
|
+
calendarWrapper: I,
|
|
62
|
+
dialogHeader: T,
|
|
63
|
+
dialogHeaderGroup: u,
|
|
64
|
+
calendarGrid: Y,
|
|
65
|
+
calendarHeaderCell: O,
|
|
66
|
+
calendarCell: j
|
|
67
|
+
} = Q({
|
|
68
68
|
isDisabled: t.isDisabled,
|
|
69
69
|
isInteractive: !t.isDisabled && !t.isReadOnly
|
|
70
|
-
});
|
|
71
|
-
return /* @__PURE__ */ a("div", { className:
|
|
72
|
-
|
|
70
|
+
}), h = y === "rebrand" ? "outlined" : "ghost", g = y === "rebrand" ? "primary" : "neutral";
|
|
71
|
+
return /* @__PURE__ */ a("div", { className: B(), "data-dd-privacy": "mask", children: /* @__PURE__ */ a(
|
|
72
|
+
U,
|
|
73
73
|
{
|
|
74
74
|
...t,
|
|
75
75
|
minValue: r,
|
|
76
|
-
maxValue:
|
|
77
|
-
value:
|
|
78
|
-
defaultValue:
|
|
76
|
+
maxValue: n,
|
|
77
|
+
value: H,
|
|
78
|
+
defaultValue: d,
|
|
79
79
|
onChange: (e) => {
|
|
80
|
-
|
|
80
|
+
L(e), p?.(e);
|
|
81
81
|
},
|
|
82
|
-
focusedValue:
|
|
82
|
+
focusedValue: o,
|
|
83
83
|
onFocusChange: (e) => {
|
|
84
|
-
|
|
84
|
+
i(e), D?.(e);
|
|
85
85
|
},
|
|
86
|
-
children: /* @__PURE__ */
|
|
87
|
-
/* @__PURE__ */
|
|
88
|
-
/* @__PURE__ */ a(
|
|
89
|
-
/* @__PURE__ */
|
|
86
|
+
children: /* @__PURE__ */ s("div", { className: I(), children: [
|
|
87
|
+
/* @__PURE__ */ s("header", { className: T(), children: [
|
|
88
|
+
/* @__PURE__ */ a(W, { className: "uy:sr-only" }),
|
|
89
|
+
/* @__PURE__ */ s(
|
|
90
90
|
"div",
|
|
91
91
|
{
|
|
92
|
-
className:
|
|
92
|
+
className: u({
|
|
93
93
|
className: "uy:pl-100 uy:gap-200"
|
|
94
94
|
}),
|
|
95
95
|
children: [
|
|
96
96
|
/* @__PURE__ */ a(
|
|
97
|
-
|
|
97
|
+
v,
|
|
98
98
|
{
|
|
99
99
|
type: "month",
|
|
100
|
-
items:
|
|
101
|
-
value:
|
|
102
|
-
onChange:
|
|
100
|
+
items: x,
|
|
101
|
+
value: o.month.toString(),
|
|
102
|
+
onChange: M,
|
|
103
103
|
isDisabled: t.isDisabled
|
|
104
104
|
}
|
|
105
105
|
),
|
|
106
106
|
/* @__PURE__ */ a(
|
|
107
|
-
|
|
107
|
+
v,
|
|
108
108
|
{
|
|
109
109
|
type: "year",
|
|
110
|
-
items:
|
|
111
|
-
value:
|
|
112
|
-
onChange:
|
|
110
|
+
items: G,
|
|
111
|
+
value: o.year.toString(),
|
|
112
|
+
onChange: S,
|
|
113
113
|
isDisabled: t.isDisabled
|
|
114
114
|
}
|
|
115
115
|
)
|
|
116
116
|
]
|
|
117
117
|
}
|
|
118
118
|
),
|
|
119
|
-
/* @__PURE__ */
|
|
119
|
+
/* @__PURE__ */ s(
|
|
120
120
|
"div",
|
|
121
121
|
{
|
|
122
|
-
className:
|
|
122
|
+
className: u({
|
|
123
123
|
className: "uy:ml-auto uy:gap-100"
|
|
124
124
|
}),
|
|
125
125
|
children: [
|
|
126
126
|
/* @__PURE__ */ a(
|
|
127
|
-
|
|
127
|
+
C,
|
|
128
128
|
{
|
|
129
129
|
slot: "previous",
|
|
130
130
|
icon: "CaretLeftOutlined",
|
|
131
|
-
color:
|
|
131
|
+
color: g,
|
|
132
132
|
label: m.formatMessage({
|
|
133
133
|
id: "unity:component:common:previous",
|
|
134
134
|
defaultMessage: "Previous"
|
|
135
135
|
}),
|
|
136
|
-
variant:
|
|
136
|
+
variant: h,
|
|
137
137
|
isDisabled: t.isDisabled
|
|
138
138
|
}
|
|
139
139
|
),
|
|
140
140
|
/* @__PURE__ */ a(
|
|
141
|
-
|
|
141
|
+
C,
|
|
142
142
|
{
|
|
143
143
|
slot: "next",
|
|
144
144
|
icon: "CaretRightOutlined",
|
|
145
|
-
color:
|
|
145
|
+
color: g,
|
|
146
146
|
label: m.formatMessage({
|
|
147
147
|
id: "unity:component:common:next",
|
|
148
148
|
defaultMessage: "Next"
|
|
149
149
|
}),
|
|
150
|
-
variant:
|
|
150
|
+
variant: h,
|
|
151
151
|
isDisabled: t.isDisabled
|
|
152
152
|
}
|
|
153
153
|
)
|
|
@@ -155,14 +155,14 @@ function J({
|
|
|
155
155
|
}
|
|
156
156
|
)
|
|
157
157
|
] }),
|
|
158
|
-
/* @__PURE__ */
|
|
159
|
-
/* @__PURE__ */ a(
|
|
160
|
-
/* @__PURE__ */ a(
|
|
161
|
-
|
|
158
|
+
/* @__PURE__ */ s(Z, { className: Y(), weekdayStyle: "short", children: [
|
|
159
|
+
/* @__PURE__ */ a($, { children: (e) => /* @__PURE__ */ a(q, { className: O(), children: e }) }),
|
|
160
|
+
/* @__PURE__ */ a(w, { children: (e) => /* @__PURE__ */ a(
|
|
161
|
+
z,
|
|
162
162
|
{
|
|
163
163
|
date: e,
|
|
164
|
-
"data-today":
|
|
165
|
-
className:
|
|
164
|
+
"data-today": F(e, f()) ? !0 : void 0,
|
|
165
|
+
className: j()
|
|
166
166
|
}
|
|
167
167
|
) })
|
|
168
168
|
] })
|
|
@@ -170,7 +170,7 @@ function J({
|
|
|
170
170
|
}
|
|
171
171
|
) });
|
|
172
172
|
}
|
|
173
|
-
|
|
173
|
+
X.displayName = "DateCalendar";
|
|
174
174
|
export {
|
|
175
|
-
|
|
175
|
+
X as DateCalendar
|
|
176
176
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { today as
|
|
4
|
-
import { uyTv as
|
|
5
|
-
import { Heading as
|
|
6
|
-
import { RangeCalendar as
|
|
7
|
-
import { useIntl as
|
|
8
|
-
import { calendarBase as
|
|
9
|
-
import { useMonthsList as
|
|
10
|
-
import { useYearsList as
|
|
11
|
-
import { DateSegmentSelect as
|
|
12
|
-
import { IconButton as
|
|
13
|
-
const
|
|
14
|
-
extend:
|
|
1
|
+
import { jsx as t, jsxs as d } from "react/jsx-runtime";
|
|
2
|
+
import { useState as S } from "react";
|
|
3
|
+
import { today as B, getLocalTimeZone as f, isToday as T } from "@internationalized/date";
|
|
4
|
+
import { useUnityTheme as Y, uyTv as O } from "@payfit/unity-themes";
|
|
5
|
+
import { Heading as j } from "react-aria-components/Heading";
|
|
6
|
+
import { RangeCalendar as k, CalendarGrid as F, CalendarGridHeader as P, CalendarHeaderCell as U, CalendarGridBody as W, CalendarCell as Z } from "react-aria-components/RangeCalendar";
|
|
7
|
+
import { useIntl as $ } from "react-intl";
|
|
8
|
+
import { calendarBase as q } from "../date-calendar/DateCalendar.variants.js";
|
|
9
|
+
import { useMonthsList as z } from "../date-calendar/hooks/useMonthsList.js";
|
|
10
|
+
import { useYearsList as A } from "../date-calendar/hooks/useYearsList.js";
|
|
11
|
+
import { DateSegmentSelect as g } from "../date-calendar/parts/DateSegmentSelect.js";
|
|
12
|
+
import { IconButton as v } from "../icon-button/IconButton.js";
|
|
13
|
+
const E = O({
|
|
14
|
+
extend: q,
|
|
15
15
|
slots: {
|
|
16
16
|
calendarGrid: [
|
|
17
17
|
//theme: common
|
|
@@ -72,119 +72,119 @@ const q = S({
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
});
|
|
75
|
-
function
|
|
75
|
+
function J({
|
|
76
76
|
value: c,
|
|
77
77
|
defaultValue: i,
|
|
78
78
|
minValue: n,
|
|
79
|
-
maxValue:
|
|
80
|
-
onChange:
|
|
81
|
-
onFocusChange:
|
|
79
|
+
maxValue: r,
|
|
80
|
+
onChange: p,
|
|
81
|
+
onFocusChange: C,
|
|
82
82
|
...a
|
|
83
83
|
}) {
|
|
84
|
-
const u =
|
|
84
|
+
const u = $(), { theme: y } = Y(), _ = B(f()), D = z(), N = A({
|
|
85
85
|
startYear: n?.year,
|
|
86
|
-
endYear:
|
|
87
|
-
}), [s, o] =
|
|
88
|
-
const e = c?.start ?? i?.start ??
|
|
89
|
-
return n && e.compare(n) < 0 ? n :
|
|
90
|
-
}),
|
|
86
|
+
endYear: r?.year
|
|
87
|
+
}), [s, o] = S(() => {
|
|
88
|
+
const e = c?.start ?? i?.start ?? _;
|
|
89
|
+
return n && e.compare(n) < 0 ? n : r && e.compare(r) > 0 ? r : e;
|
|
90
|
+
}), x = (e) => {
|
|
91
91
|
o(
|
|
92
92
|
(l) => l.set({ month: parseInt(e, 10) })
|
|
93
93
|
);
|
|
94
|
-
},
|
|
94
|
+
}, w = (e) => {
|
|
95
95
|
o(
|
|
96
96
|
(l) => l.set({ year: parseInt(e, 10) })
|
|
97
97
|
);
|
|
98
98
|
}, {
|
|
99
|
-
base:
|
|
100
|
-
calendarWrapper:
|
|
101
|
-
dialogHeader:
|
|
102
|
-
dialogHeaderGroup:
|
|
103
|
-
calendarGrid:
|
|
104
|
-
calendarHeaderCell:
|
|
105
|
-
calendarCell:
|
|
106
|
-
} =
|
|
99
|
+
base: G,
|
|
100
|
+
calendarWrapper: H,
|
|
101
|
+
dialogHeader: I,
|
|
102
|
+
dialogHeaderGroup: m,
|
|
103
|
+
calendarGrid: L,
|
|
104
|
+
calendarHeaderCell: M,
|
|
105
|
+
calendarCell: R
|
|
106
|
+
} = E({
|
|
107
107
|
isDisabled: a.isDisabled,
|
|
108
108
|
isInteractive: !a.isDisabled && !a.isReadOnly
|
|
109
|
-
});
|
|
110
|
-
return /* @__PURE__ */ t("div", { className:
|
|
111
|
-
|
|
109
|
+
}), h = y === "rebrand" ? "outlined" : "ghost", b = y === "rebrand" ? "primary" : "neutral";
|
|
110
|
+
return /* @__PURE__ */ t("div", { className: G(), "data-dd-privacy": "mask", children: /* @__PURE__ */ t(
|
|
111
|
+
k,
|
|
112
112
|
{
|
|
113
113
|
...a,
|
|
114
114
|
minValue: n,
|
|
115
|
-
maxValue:
|
|
115
|
+
maxValue: r,
|
|
116
116
|
value: c,
|
|
117
117
|
defaultValue: i,
|
|
118
|
-
onChange:
|
|
118
|
+
onChange: p,
|
|
119
119
|
focusedValue: s,
|
|
120
120
|
onFocusChange: (e) => {
|
|
121
|
-
o(e),
|
|
121
|
+
o(e), C?.(e);
|
|
122
122
|
},
|
|
123
|
-
children: /* @__PURE__ */
|
|
124
|
-
/* @__PURE__ */
|
|
125
|
-
/* @__PURE__ */ t(
|
|
126
|
-
/* @__PURE__ */
|
|
123
|
+
children: /* @__PURE__ */ d("div", { className: H(), children: [
|
|
124
|
+
/* @__PURE__ */ d("header", { className: I(), children: [
|
|
125
|
+
/* @__PURE__ */ t(j, { className: "uy:sr-only" }),
|
|
126
|
+
/* @__PURE__ */ d(
|
|
127
127
|
"div",
|
|
128
128
|
{
|
|
129
|
-
className:
|
|
129
|
+
className: m({
|
|
130
130
|
className: "uy:pl-100 uy:gap-200"
|
|
131
131
|
}),
|
|
132
132
|
children: [
|
|
133
133
|
/* @__PURE__ */ t(
|
|
134
|
-
|
|
134
|
+
g,
|
|
135
135
|
{
|
|
136
136
|
type: "month",
|
|
137
|
-
items:
|
|
137
|
+
items: D,
|
|
138
138
|
value: s.month.toString(),
|
|
139
|
-
onChange:
|
|
139
|
+
onChange: x,
|
|
140
140
|
isDisabled: a.isDisabled
|
|
141
141
|
}
|
|
142
142
|
),
|
|
143
143
|
/* @__PURE__ */ t(
|
|
144
|
-
|
|
144
|
+
g,
|
|
145
145
|
{
|
|
146
146
|
type: "year",
|
|
147
|
-
items:
|
|
147
|
+
items: N,
|
|
148
148
|
value: s.year.toString(),
|
|
149
|
-
onChange:
|
|
149
|
+
onChange: w,
|
|
150
150
|
isDisabled: a.isDisabled
|
|
151
151
|
}
|
|
152
152
|
)
|
|
153
153
|
]
|
|
154
154
|
}
|
|
155
155
|
),
|
|
156
|
-
/* @__PURE__ */
|
|
156
|
+
/* @__PURE__ */ d(
|
|
157
157
|
"div",
|
|
158
158
|
{
|
|
159
|
-
className:
|
|
159
|
+
className: m({
|
|
160
160
|
className: "uy:ml-auto uy:gap-100"
|
|
161
161
|
}),
|
|
162
162
|
children: [
|
|
163
163
|
/* @__PURE__ */ t(
|
|
164
|
-
|
|
164
|
+
v,
|
|
165
165
|
{
|
|
166
166
|
slot: "previous",
|
|
167
167
|
icon: "CaretLeftOutlined",
|
|
168
|
-
color:
|
|
168
|
+
color: b,
|
|
169
169
|
label: u.formatMessage({
|
|
170
170
|
id: "unity:component:common:previous",
|
|
171
171
|
defaultMessage: "Previous"
|
|
172
172
|
}),
|
|
173
|
-
variant:
|
|
173
|
+
variant: h,
|
|
174
174
|
isDisabled: a.isDisabled
|
|
175
175
|
}
|
|
176
176
|
),
|
|
177
177
|
/* @__PURE__ */ t(
|
|
178
|
-
|
|
178
|
+
v,
|
|
179
179
|
{
|
|
180
180
|
slot: "next",
|
|
181
181
|
icon: "CaretRightOutlined",
|
|
182
|
-
color:
|
|
182
|
+
color: b,
|
|
183
183
|
label: u.formatMessage({
|
|
184
184
|
id: "unity:component:common:next",
|
|
185
185
|
defaultMessage: "Next"
|
|
186
186
|
}),
|
|
187
|
-
variant:
|
|
187
|
+
variant: h,
|
|
188
188
|
isDisabled: a.isDisabled
|
|
189
189
|
}
|
|
190
190
|
)
|
|
@@ -192,14 +192,14 @@ function z({
|
|
|
192
192
|
}
|
|
193
193
|
)
|
|
194
194
|
] }),
|
|
195
|
-
/* @__PURE__ */
|
|
196
|
-
/* @__PURE__ */ t(
|
|
197
|
-
/* @__PURE__ */ t(
|
|
198
|
-
|
|
195
|
+
/* @__PURE__ */ d(F, { className: L(), weekdayStyle: "short", children: [
|
|
196
|
+
/* @__PURE__ */ t(P, { children: (e) => /* @__PURE__ */ t(U, { className: M(), children: e }) }),
|
|
197
|
+
/* @__PURE__ */ t(W, { children: (e) => /* @__PURE__ */ t(
|
|
198
|
+
Z,
|
|
199
199
|
{
|
|
200
200
|
date: e,
|
|
201
|
-
"data-today":
|
|
202
|
-
className:
|
|
201
|
+
"data-today": T(e, f()) ? !0 : void 0,
|
|
202
|
+
className: R()
|
|
203
203
|
}
|
|
204
204
|
) })
|
|
205
205
|
] })
|
|
@@ -207,7 +207,7 @@ function z({
|
|
|
207
207
|
}
|
|
208
208
|
) });
|
|
209
209
|
}
|
|
210
|
-
|
|
210
|
+
J.displayName = "DateRangeCalendar";
|
|
211
211
|
export {
|
|
212
|
-
|
|
212
|
+
J as DateRangeCalendar
|
|
213
213
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { jsxs as l, jsx as
|
|
1
|
+
import { jsxs as l, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as m } from "react";
|
|
3
3
|
import { Text as n } from "../../text/Text.js";
|
|
4
4
|
const c = m(
|
|
5
|
-
({ title: t, description:
|
|
5
|
+
({ title: t, description: e, ...o }, a) => !t && !e ? null : /* @__PURE__ */ l(
|
|
6
6
|
"div",
|
|
7
7
|
{
|
|
8
8
|
ref: a,
|
|
9
9
|
className: "uy:flex uy:flex-col uy:items-center uy:gap-100 uy:text-center",
|
|
10
10
|
...o,
|
|
11
11
|
children: [
|
|
12
|
-
t && /* @__PURE__ */
|
|
13
|
-
|
|
12
|
+
t && /* @__PURE__ */ r(n, { variant: "h4", color: "content.neutral", children: t }),
|
|
13
|
+
e && /* @__PURE__ */ r(n, { variant: "body", color: "content.neutral.low", children: e })
|
|
14
14
|
]
|
|
15
15
|
}
|
|
16
16
|
)
|
|
@@ -70,13 +70,13 @@ const ee = W({
|
|
|
70
70
|
description: ["uy:hidden uy:@section:block uy:@section:w-full"]
|
|
71
71
|
}
|
|
72
72
|
}), ne = (t, n) => {
|
|
73
|
-
const
|
|
73
|
+
const a = t.detailDescription ?? n?.detailDescription;
|
|
74
74
|
return /* @__PURE__ */ u($, { children: [
|
|
75
|
-
/* @__PURE__ */ e("div", { className: "uy:mb-200", children:
|
|
75
|
+
/* @__PURE__ */ e("div", { className: "uy:mb-200", children: a }),
|
|
76
76
|
/* @__PURE__ */ e(Y, { children: t.error.message })
|
|
77
77
|
] });
|
|
78
78
|
}, te = (t, n) => {
|
|
79
|
-
const
|
|
79
|
+
const a = t.backButtonLabel ?? n?.backButtonLabel;
|
|
80
80
|
return /* @__PURE__ */ e("div", { className: "uy:mt-200 uy:@section:block uy:hidden", children: /* @__PURE__ */ e(
|
|
81
81
|
h,
|
|
82
82
|
{
|
|
@@ -85,12 +85,12 @@ const ee = W({
|
|
|
85
85
|
},
|
|
86
86
|
color: "primary",
|
|
87
87
|
variant: "ghost",
|
|
88
|
-
children:
|
|
88
|
+
children: a
|
|
89
89
|
}
|
|
90
90
|
) });
|
|
91
91
|
}, oe = J((t, n) => {
|
|
92
92
|
const {
|
|
93
|
-
icon:
|
|
93
|
+
icon: a,
|
|
94
94
|
illustration: b,
|
|
95
95
|
onButtonPress: v,
|
|
96
96
|
buttonLabel: g,
|
|
@@ -114,15 +114,15 @@ const ee = W({
|
|
|
114
114
|
h2: P,
|
|
115
115
|
h3: z,
|
|
116
116
|
h4: Q
|
|
117
|
-
} = ee(),
|
|
118
|
-
(
|
|
119
|
-
y.current =
|
|
117
|
+
} = ee(), c = V(), q = _(c), y = K(null), { level: d } = X({ ref: y }), A = O(
|
|
118
|
+
(s) => {
|
|
119
|
+
y.current = s, n && (typeof n == "function" ? n(s) : n.current = s);
|
|
120
120
|
},
|
|
121
121
|
[n]
|
|
122
122
|
);
|
|
123
|
-
let
|
|
124
|
-
m === "generic" && C && (
|
|
125
|
-
const o = q.get(
|
|
123
|
+
let i = m === "404" ? "404" : "unknown";
|
|
124
|
+
m === "generic" && C && (i = "known");
|
|
125
|
+
const o = q.get(i), p = b ?? o?.illustration, f = a ?? o?.icon, F = g ?? o?.buttonLabel, l = x ?? o?.mainTitle, G = k ?? o?.mainDescription, H = w ?? o?.mainDescriptionComponent;
|
|
126
126
|
return /* @__PURE__ */ e(
|
|
127
127
|
"div",
|
|
128
128
|
{
|
|
@@ -136,7 +136,7 @@ const ee = W({
|
|
|
136
136
|
{
|
|
137
137
|
src: p,
|
|
138
138
|
variant: "picture",
|
|
139
|
-
alt:
|
|
139
|
+
alt: c.formatMessage({
|
|
140
140
|
id: "unity:component:error-state:common:illustration:alt",
|
|
141
141
|
defaultMessage: "Error states"
|
|
142
142
|
}),
|
|
@@ -150,7 +150,7 @@ const ee = W({
|
|
|
150
150
|
src: f,
|
|
151
151
|
size: 24,
|
|
152
152
|
color: "content.neutral.low",
|
|
153
|
-
alt:
|
|
153
|
+
alt: c.formatMessage({
|
|
154
154
|
id: "unity:component:error-state:common:icon:alt",
|
|
155
155
|
defaultMessage: "Error states"
|
|
156
156
|
}),
|
|
@@ -158,16 +158,62 @@ const ee = W({
|
|
|
158
158
|
}
|
|
159
159
|
),
|
|
160
160
|
/* @__PURE__ */ u("div", { className: j(), children: [
|
|
161
|
-
/* @__PURE__ */ e(
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
161
|
+
/* @__PURE__ */ e(
|
|
162
|
+
r,
|
|
163
|
+
{
|
|
164
|
+
asElement: "h1",
|
|
165
|
+
variant: "h1",
|
|
166
|
+
color: "content.neutral",
|
|
167
|
+
className: S(),
|
|
168
|
+
children: l
|
|
169
|
+
}
|
|
170
|
+
),
|
|
171
|
+
/* @__PURE__ */ e(
|
|
172
|
+
r,
|
|
173
|
+
{
|
|
174
|
+
asElement: "h2",
|
|
175
|
+
variant: "h2",
|
|
176
|
+
color: "content.neutral",
|
|
177
|
+
className: P(),
|
|
178
|
+
children: l
|
|
179
|
+
}
|
|
180
|
+
),
|
|
181
|
+
/* @__PURE__ */ e(
|
|
182
|
+
r,
|
|
183
|
+
{
|
|
184
|
+
asElement: "h3",
|
|
185
|
+
variant: "h3",
|
|
186
|
+
color: "content.neutral",
|
|
187
|
+
className: z(),
|
|
188
|
+
children: l
|
|
189
|
+
}
|
|
190
|
+
),
|
|
191
|
+
/* @__PURE__ */ e(
|
|
192
|
+
r,
|
|
193
|
+
{
|
|
194
|
+
asElement: "h4",
|
|
195
|
+
variant: "h4",
|
|
196
|
+
color: "content.neutral",
|
|
197
|
+
className: Q(),
|
|
198
|
+
children: l
|
|
199
|
+
}
|
|
200
|
+
),
|
|
201
|
+
/* @__PURE__ */ e(
|
|
202
|
+
r,
|
|
203
|
+
{
|
|
204
|
+
asElement: "p",
|
|
205
|
+
variant: "body",
|
|
206
|
+
color: "content.neutral.low",
|
|
207
|
+
className: I(),
|
|
208
|
+
children: G
|
|
209
|
+
}
|
|
210
|
+
),
|
|
166
211
|
/* @__PURE__ */ e(
|
|
167
212
|
r,
|
|
168
213
|
{
|
|
169
214
|
asElement: "p",
|
|
170
215
|
variant: "body",
|
|
216
|
+
color: "content.neutral.low",
|
|
171
217
|
className: T(),
|
|
172
218
|
children: H
|
|
173
219
|
}
|
|
@@ -181,8 +227,8 @@ const ee = W({
|
|
|
181
227
|
children: F
|
|
182
228
|
}
|
|
183
229
|
),
|
|
184
|
-
|
|
185
|
-
|
|
230
|
+
i === "unknown" && te(t, o),
|
|
231
|
+
i === "known" && /* @__PURE__ */ e("div", { className: R(), children: ne(t, o) })
|
|
186
232
|
] }) })
|
|
187
233
|
}
|
|
188
234
|
);
|
|
@@ -3,7 +3,7 @@ import { ButtonProps } from '../../button/Button.js';
|
|
|
3
3
|
export interface FunnelPageActionProps extends PropsWithChildren<Omit<ButtonProps, 'variant' | 'color' | 'size'>> {
|
|
4
4
|
/**
|
|
5
5
|
* The action type determines the default styling and behavior.
|
|
6
|
-
* - 'previous': Uses secondary variant for navigation back
|
|
6
|
+
* - 'previous': Uses secondary variant for navigation back, outlined in rebrand
|
|
7
7
|
* - 'next': Uses primary variant for progression forward
|
|
8
8
|
* - 'optional': Uses ghost variant for optional actions like skip
|
|
9
9
|
*/
|
|
@@ -27,7 +27,7 @@ export interface FunnelPageActionProps extends PropsWithChildren<Omit<ButtonProp
|
|
|
27
27
|
* ```
|
|
28
28
|
* @remarks
|
|
29
29
|
* - Automatically applies appropriate button variants based on action type
|
|
30
|
-
* - Previous actions use secondary variant, next actions use primary variant
|
|
30
|
+
* - Previous actions use secondary variant in legacy and outlined in rebrand, next actions use primary variant
|
|
31
31
|
* - Optional actions use ghost variant for less prominent actions
|
|
32
32
|
* - Automatically sets DataDog's session replay privacy to `data-dd-privacy="allow"`
|
|
33
33
|
* @see {@link FunnelPageActionProps} for all available props
|
|
@@ -1,28 +1,31 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as c, useCallback as
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as c, useCallback as u } from "react";
|
|
3
|
+
import { useUnityTheme as l } from "@payfit/unity-themes";
|
|
4
|
+
import { Button as p } from "../../button/Button.js";
|
|
5
|
+
const m = c(
|
|
6
|
+
({ actionType: t, children: a, ...e }, o) => {
|
|
7
|
+
const { theme: r } = l(), n = u(
|
|
8
|
+
(i) => {
|
|
9
|
+
switch (i) {
|
|
9
10
|
case "previous":
|
|
10
|
-
return {
|
|
11
|
+
return {
|
|
12
|
+
variant: r === "rebrand" ? "outlined" : "secondary"
|
|
13
|
+
};
|
|
11
14
|
case "next":
|
|
12
15
|
return { variant: "primary", color: "primary" };
|
|
13
16
|
case "optional":
|
|
14
17
|
return { variant: "ghost", color: "neutral" };
|
|
15
18
|
}
|
|
16
19
|
},
|
|
17
|
-
[]
|
|
20
|
+
[r]
|
|
18
21
|
)(t);
|
|
19
|
-
return /* @__PURE__ */
|
|
20
|
-
|
|
22
|
+
return /* @__PURE__ */ s(
|
|
23
|
+
p,
|
|
21
24
|
{
|
|
22
25
|
ref: o,
|
|
23
26
|
"data-dd-privacy": "allow",
|
|
27
|
+
...n,
|
|
24
28
|
...e,
|
|
25
|
-
...r,
|
|
26
29
|
"data-unity-component": "FunnelPageAction",
|
|
27
30
|
"data-action-type": t,
|
|
28
31
|
children: a
|
|
@@ -30,7 +33,7 @@ const u = c(
|
|
|
30
33
|
);
|
|
31
34
|
}
|
|
32
35
|
);
|
|
33
|
-
|
|
36
|
+
m.displayName = "FunnelPageAction";
|
|
34
37
|
export {
|
|
35
|
-
|
|
38
|
+
m as FunnelPageAction
|
|
36
39
|
};
|
|
@@ -30,7 +30,7 @@ const t = e({
|
|
|
30
30
|
"uy:theme-legacy:bg-surface-primary-enabled uy:theme-rebrand:bg-surface-neutral-highest-enabled uy:text-content-inverted-enabled",
|
|
31
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
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"
|
|
33
|
+
"uy:theme-legacy:data-[pressed]:bg-surface-primary-pressed uy:theme-rebrand:data-[pressed]:bg-surface-neutral-highest-pressed uy:theme-legacy:data-[pressed]:text-content-inverted-pressed uy:theme-rebrand:data-[pressed]:text-content-neutral-pressed"
|
|
34
34
|
],
|
|
35
35
|
warning: [
|
|
36
36
|
"uy:bg-surface-warning-enabled uy:text-content-neutral-enabled",
|
|
@@ -106,11 +106,11 @@ const t = e({
|
|
|
106
106
|
variants: {
|
|
107
107
|
color: {
|
|
108
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"
|
|
109
|
+
"uy:bg-transparent uy:theme-legacy:text-content-primary-enabled uy:theme-rebrand:text-content-neutral-enabled",
|
|
110
|
+
'uy:theme-legacy:data-[hovered="true"]:bg-surface-primary-lowest-hover uy:theme-rebrand:data-[hovered="true"]:bg-surface-neutral-hover uy:theme-legacy:data-[hovered="true"]:text-content-primary-hover uy:theme-rebrand:data-[hovered="true"]:text-content-neutral-hover',
|
|
111
|
+
"uy:theme-legacy:active:bg-surface-primary-lowest-active uy:theme-rebrand:active:bg-surface-neutral-active uy:theme-legacy:active:text-content-primary-active uy:theme-rebrand:active:text-content-neutral-active",
|
|
112
|
+
"uy:theme-legacy:data-[pressed=true]:bg-surface-primary-lowest-pressed uy:theme-rebrand:data-[pressed=true]:bg-surface-neutral-pressed uy:theme-legacy:data-[pressed=true]:text-content-primary-pressed uy:theme-rebrand:data-[pressed=true]:text-content-neutral-pressed",
|
|
113
|
+
"uy:data-[focus-visible]:bg-transparent uy:theme-rebrand:data-[focus-visible]:text-content-neutral-focus"
|
|
114
114
|
],
|
|
115
115
|
warning: [
|
|
116
116
|
"uy:bg-transparent uy:text-content-warning-enabled",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as u, jsxs as l } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as g, useRef as w, useLayoutEffect as x } from "react";
|
|
3
3
|
import { Icon as v } from "@payfit/unity-icons";
|
|
4
4
|
import { uyTv as h } from "@payfit/unity-themes";
|
|
@@ -12,6 +12,7 @@ const L = h({
|
|
|
12
12
|
"uy:flex uy:gap-150",
|
|
13
13
|
"uy:transition-colors",
|
|
14
14
|
"uy:bg-surface-neutral",
|
|
15
|
+
"uy:text-content-neutral",
|
|
15
16
|
"uy:border-b uy:border-b-solid uy:border-b-border-neutral",
|
|
16
17
|
// Hover when list is static
|
|
17
18
|
"uy:group-hover:bg-surface-neutral-hover uy:group-hover:cursor-pointer",
|
|
@@ -31,7 +32,7 @@ const L = h({
|
|
|
31
32
|
suffix: ["uy:grow-0 uy:flex uy:gap-100"]
|
|
32
33
|
}
|
|
33
34
|
}), V = (n, r) => {
|
|
34
|
-
const
|
|
35
|
+
const i = w(), { children: c, prefix: o, suffix: a, hideDisclosureIndicator: s, ...e } = n, {
|
|
35
36
|
root: d,
|
|
36
37
|
wrapper: f,
|
|
37
38
|
prefix: y,
|
|
@@ -39,25 +40,25 @@ const L = h({
|
|
|
39
40
|
content: b
|
|
40
41
|
} = L(), m = !!a || !s;
|
|
41
42
|
return x(() => {
|
|
42
|
-
const t =
|
|
43
|
+
const t = i.current;
|
|
43
44
|
if (!t) return;
|
|
44
45
|
t.querySelector('[data-unity-slot="ListViewItemLabel"]') || !("aria-label" in e) && !("aria-labelledby" in e) && !("textValue" in e) && console.error(
|
|
45
46
|
"ListViewItem: Either a ListViewItemLabel component, an aria-label, aria-labelledby, or textValue prop is required for accessibility. Provide one to ensure screen reader users can identify the item."
|
|
46
47
|
);
|
|
47
|
-
}, [e,
|
|
48
|
+
}, [e, i]), /* @__PURE__ */ u(I, { ...e, className: d(), "data-dd-privacy": "mask", children: /* @__PURE__ */ l(
|
|
48
49
|
"div",
|
|
49
50
|
{
|
|
50
51
|
ref: (t) => {
|
|
51
|
-
|
|
52
|
+
i.current = t, typeof r == "function" ? r(t) : r && (r.current = t);
|
|
52
53
|
},
|
|
53
54
|
"data-unity-slot": "ListViewItem",
|
|
54
55
|
className: f(),
|
|
55
56
|
children: [
|
|
56
|
-
|
|
57
|
-
/* @__PURE__ */
|
|
57
|
+
o && /* @__PURE__ */ u("div", { "data-unity-slot": "ListViewItem.prefix", className: y(), children: o }),
|
|
58
|
+
/* @__PURE__ */ u("div", { "data-unity-slot": "ListViewItem.content", className: b(), children: c }),
|
|
58
59
|
m && /* @__PURE__ */ l("div", { "data-unity-slot": "ListViewItem.suffix", className: p(), children: [
|
|
59
60
|
a,
|
|
60
|
-
!s && /* @__PURE__ */
|
|
61
|
+
!s && /* @__PURE__ */ u(
|
|
61
62
|
v,
|
|
62
63
|
{
|
|
63
64
|
src: "CaretRightOutlined",
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
function o({ children:
|
|
4
|
-
const l = `nav-title-${
|
|
5
|
-
return /* @__PURE__ */
|
|
1
|
+
import { jsxs as n, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import u from "../../hooks/use-id.js";
|
|
3
|
+
function o({ children: a, title: t, ...y }) {
|
|
4
|
+
const l = `nav-title-${u()}`;
|
|
5
|
+
return /* @__PURE__ */ n(
|
|
6
6
|
"nav",
|
|
7
7
|
{
|
|
8
|
-
...
|
|
8
|
+
...y,
|
|
9
9
|
className: "uy:flex uy:flex-col uy:gap-50 uy:min-w-[264px]",
|
|
10
10
|
"aria-labelledby": l,
|
|
11
11
|
children: [
|
|
12
|
-
/* @__PURE__ */
|
|
12
|
+
/* @__PURE__ */ e(
|
|
13
13
|
"h3",
|
|
14
14
|
{
|
|
15
15
|
id: l,
|
|
16
|
-
className: "uy:typography-body-strong uy:py-100 uy:px-150",
|
|
17
|
-
children:
|
|
16
|
+
className: "uy:typography-body-strong uy:text-content-neutral uy:py-100 uy:px-150",
|
|
17
|
+
children: t
|
|
18
18
|
}
|
|
19
19
|
),
|
|
20
|
-
/* @__PURE__ */
|
|
20
|
+
/* @__PURE__ */ e("ul", { className: "uy:flex uy:flex-col uy:gap-50 uy:list-none", children: a })
|
|
21
21
|
]
|
|
22
22
|
}
|
|
23
23
|
);
|
|
@@ -1,40 +1,34 @@
|
|
|
1
|
-
import { jsx as r, jsxs as m, Fragment as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { Checkbox as
|
|
4
|
-
import { useId as
|
|
5
|
-
import { CheckboxIndicator as
|
|
1
|
+
import { jsx as r, jsxs as m, Fragment as d } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as f } from "react";
|
|
3
|
+
import { Checkbox as p } from "react-aria-components/Checkbox";
|
|
4
|
+
import { useId as s } from "react-aria/useId";
|
|
5
|
+
import { CheckboxIndicator as h } from "../../../checkbox/parts/CheckboxIndicator.js";
|
|
6
6
|
import { Text as b } from "../../../text/Text.js";
|
|
7
7
|
import { Content as x } from "../../internals/Content.js";
|
|
8
8
|
import { Description as C } from "../../internals/Description.js";
|
|
9
|
-
import { Illustration as
|
|
10
|
-
import { SelectedIndicator as
|
|
11
|
-
import { selectableCard as
|
|
12
|
-
const
|
|
13
|
-
const { base:
|
|
9
|
+
import { Illustration as k } from "../../internals/Illustration.js";
|
|
10
|
+
import { SelectedIndicator as I } from "../../internals/SelectedIndicator.js";
|
|
11
|
+
import { selectableCard as S } from "../../selectableCard.variant.js";
|
|
12
|
+
const g = f(({ title: i, description: o, illustration: t, ...c }, a) => {
|
|
13
|
+
const { base: l } = S(), n = s();
|
|
14
14
|
return /* @__PURE__ */ r(
|
|
15
|
-
|
|
15
|
+
p,
|
|
16
16
|
{
|
|
17
|
-
ref:
|
|
18
|
-
className: ({ isFocusVisible: e }) =>
|
|
19
|
-
...
|
|
20
|
-
children: (e) => /* @__PURE__ */ m(
|
|
21
|
-
/* @__PURE__ */ r(
|
|
22
|
-
p,
|
|
23
|
-
{
|
|
24
|
-
className: "uy:group-hover:border-border-form-hover",
|
|
25
|
-
...e
|
|
26
|
-
}
|
|
27
|
-
) }),
|
|
17
|
+
ref: a,
|
|
18
|
+
className: ({ isFocusVisible: e }) => l({ isFocusVisible: e }),
|
|
19
|
+
...c,
|
|
20
|
+
children: (e) => /* @__PURE__ */ m(d, { children: [
|
|
21
|
+
/* @__PURE__ */ r(I, { children: /* @__PURE__ */ r(h, { ...e }) }),
|
|
28
22
|
/* @__PURE__ */ m(x, { children: [
|
|
29
|
-
t && /* @__PURE__ */ r(
|
|
30
|
-
/* @__PURE__ */ r(b, { variant: "bodyLargeStrong", asElement: "h3", id: `${
|
|
23
|
+
t && /* @__PURE__ */ r(k, { children: t }),
|
|
24
|
+
/* @__PURE__ */ r(b, { variant: "bodyLargeStrong", asElement: "h3", id: `${n}-label`, children: i }),
|
|
31
25
|
o && /* @__PURE__ */ r(C, { children: o })
|
|
32
26
|
] })
|
|
33
27
|
] })
|
|
34
28
|
}
|
|
35
29
|
);
|
|
36
30
|
});
|
|
37
|
-
|
|
31
|
+
g.displayName = "SelectableCardCheckbox";
|
|
38
32
|
export {
|
|
39
|
-
|
|
33
|
+
g as SelectableCardCheckbox
|
|
40
34
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useUnityTheme as
|
|
3
|
-
import { Button as
|
|
4
|
-
function
|
|
5
|
-
children:
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { useUnityTheme as a } from "@payfit/unity-themes";
|
|
3
|
+
import { Button as n } from "../../button/Button.js";
|
|
4
|
+
function s({
|
|
5
|
+
children: e,
|
|
6
6
|
onPress: r
|
|
7
7
|
}) {
|
|
8
|
-
const { theme:
|
|
9
|
-
return /* @__PURE__ */
|
|
8
|
+
const { theme: o } = a();
|
|
9
|
+
return /* @__PURE__ */ t("div", { className: "uy:theme-legacy:self-end uy:theme-rebrand:self-start", children: /* @__PURE__ */ t(n, { variant: o === "rebrand" ? "secondary" : "ghost", color: "primary", onPress: r, children: e }) });
|
|
10
10
|
}
|
|
11
|
-
|
|
11
|
+
s.displayName = "ToastAction";
|
|
12
12
|
export {
|
|
13
|
-
|
|
13
|
+
s as ToastAction
|
|
14
14
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@payfit/unity-components",
|
|
3
|
-
"version": "2.46.
|
|
3
|
+
"version": "2.46.10",
|
|
4
4
|
"module": "./dist/esm/index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"tailwind-variants": "3.2.2",
|
|
88
88
|
"usehooks-ts": "3.1.1",
|
|
89
89
|
"zod": "4.4.3",
|
|
90
|
-
"@payfit/unity-illustrations": "2.46.
|
|
90
|
+
"@payfit/unity-illustrations": "2.46.10"
|
|
91
91
|
},
|
|
92
92
|
"peerDependencies": {
|
|
93
93
|
"@hookform/devtools": "^4",
|
|
@@ -99,8 +99,8 @@
|
|
|
99
99
|
"react-hook-form": "^7",
|
|
100
100
|
"react-router-dom": "^5",
|
|
101
101
|
"zod": "^3 || ^4",
|
|
102
|
-
"@payfit/unity-icons": "2.46.
|
|
103
|
-
"@payfit/unity-themes": "2.46.
|
|
102
|
+
"@payfit/unity-icons": "2.46.10",
|
|
103
|
+
"@payfit/unity-themes": "2.46.10"
|
|
104
104
|
},
|
|
105
105
|
"devDependencies": {
|
|
106
106
|
"@figma/code-connect": "1.4.3",
|
|
@@ -145,14 +145,13 @@
|
|
|
145
145
|
"vite": "7.1.12",
|
|
146
146
|
"vite-plugin-node-polyfills": "0.24.0",
|
|
147
147
|
"vitest": "4.1.0",
|
|
148
|
-
"@payfit/code-pushup-tools": "0.0.0-use.local",
|
|
149
148
|
"@payfit/hr-app-eslint": "0.0.0-use.local",
|
|
150
149
|
"@payfit/hr-apps-tsconfigs": "0.0.0-use.local",
|
|
151
150
|
"@payfit/storybook-addon-console-errors": "0.0.0-use.local",
|
|
152
151
|
"@payfit/storybook-config": "0.0.0-use.local",
|
|
153
|
-
"@payfit/unity-icons": "2.46.
|
|
154
|
-
"@payfit/unity-illustrations": "2.46.
|
|
155
|
-
"@payfit/unity-themes": "2.46.
|
|
152
|
+
"@payfit/unity-icons": "2.46.10",
|
|
153
|
+
"@payfit/unity-illustrations": "2.46.10",
|
|
154
|
+
"@payfit/unity-themes": "2.46.10",
|
|
156
155
|
"@payfit/vite-configs": "0.0.0-use.local"
|
|
157
156
|
},
|
|
158
157
|
"peerDependenciesMeta": {
|