@payfit/unity-components 2.68.14 → 2.68.16
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/README.md +6 -0
- package/dist/esm/components/action-bar/parts/ActionBarButton.d.ts +1 -15
- package/dist/esm/components/action-bar/parts/ActionBarButton.js +1 -2
- package/dist/esm/components/actionable/Actionable.d.ts +1 -1
- package/dist/esm/components/app-menu/parts/AppMenuHeader.js +30 -31
- package/dist/esm/components/avatar/parts/AvatarFallback.js +6 -6
- package/dist/esm/components/avatar-group/parts/AvatarGroupCount.d.ts +1 -1
- package/dist/esm/components/badge/Badge.js +1 -1
- package/dist/esm/components/breadcrumbs/parts/RawBreadcrumbLink.d.ts +1 -1
- package/dist/esm/components/button/Button.d.ts +1 -1
- package/dist/esm/components/button/Button.js +42 -48
- package/dist/esm/components/button/Button.variants.js +15 -17
- package/dist/esm/components/carousel/parts/CarouselHeader.d.ts +3 -3
- package/dist/esm/components/checkbox/Checkbox.variants.js +1 -1
- package/dist/esm/components/checkbox/parts/CheckboxIndicator.js +4 -4
- package/dist/esm/components/date-calendar/DateCalendar.js +74 -74
- package/dist/esm/components/date-calendar/DateCalendar.variants.js +3 -3
- package/dist/esm/components/date-picker/parts/DateInput.js +2 -3
- package/dist/esm/components/date-range-calendar/DateRangeCalendar.js +85 -85
- package/dist/esm/components/date-range-picker/parts/DateRangeInput.js +1 -1
- package/dist/esm/components/filter/parts/FilterPopover.js +27 -27
- package/dist/esm/components/form-field/parts/TanstackRawFormContextualLink.d.ts +1 -1
- package/dist/esm/components/form-field/parts/TanstackRawFormContextualLink.js +19 -20
- package/dist/esm/components/funnel-layout/FunnelLayout.d.ts +1 -1
- package/dist/esm/components/funnel-layout/parts/FunnelPageAction.d.ts +2 -2
- package/dist/esm/components/funnel-layout/parts/FunnelPageAction.js +24 -28
- package/dist/esm/components/funnel-layout/parts/FunnelSidebar.d.ts +0 -17
- package/dist/esm/components/funnel-layout/parts/FunnelSidebar.js +14 -23
- package/dist/esm/components/funnel-layout/parts/FunnelTopBar.d.ts +1 -27
- package/dist/esm/components/funnel-layout/parts/FunnelTopBar.js +43 -53
- package/dist/esm/components/icon-button/IconButton.d.ts +1 -1
- package/dist/esm/components/icon-button/IconButton.js +60 -66
- package/dist/esm/components/icon-button/IconButton.variants.js +15 -17
- package/dist/esm/components/link/RawLink.d.ts +1 -1
- package/dist/esm/components/link/RawLink.js +3 -3
- package/dist/esm/components/link-button/LinkButton.variants.js +12 -17
- package/dist/esm/components/link-button/RawLinkButton.js +41 -46
- package/dist/esm/components/menu/parts/MenuContent.d.ts +1 -10
- package/dist/esm/components/menu/parts/MenuContent.js +6 -6
- package/dist/esm/components/nav/parts/NavGroup.js +4 -4
- package/dist/esm/components/nav/parts/RawNavItem.js +9 -9
- package/dist/esm/components/navigation-card/NavigationCard.d.ts +1 -1
- package/dist/esm/components/navigation-card/NavigationCard.variants.js +2 -2
- package/dist/esm/components/page/parts/PageHeader.d.ts +3 -54
- package/dist/esm/components/page/parts/PageHeader.js +18 -28
- package/dist/esm/components/payfit-brand/PayFitBrand.d.ts +1 -11
- package/dist/esm/components/payfit-brand/PayFitBrand.js +48 -73
- package/dist/esm/components/payfit-brand/PayFitPreprod.d.ts +2 -6
- package/dist/esm/components/payfit-brand/PayFitPreprod.js +35 -44
- package/dist/esm/components/pill/Pill.d.ts +3 -3
- package/dist/esm/components/pill/Pill.js +1 -1
- package/dist/esm/components/radio-button-group/parts/RadioButton.js +23 -24
- package/dist/esm/components/radio-button-group/parts/RadioIndicator.d.ts +1 -2
- package/dist/esm/components/radio-button-group/parts/RadioIndicator.js +7 -38
- package/dist/esm/components/selectable-card/selectable-card-radio-group/parts/SelectableCardRadio.js +20 -22
- package/dist/esm/components/spinner/Spinner.js +1 -1
- package/dist/esm/components/tabs/Tabs.variant.js +6 -6
- package/dist/esm/components/tabs/parts/NavigationButton.js +2 -2
- package/dist/esm/components/task-menu/parts/RawSubTask.js +3 -3
- package/dist/esm/components/task-menu/parts/TaskGroup.js +3 -3
- package/dist/esm/components/task-menu/parts/task.variants.js +7 -7
- package/dist/esm/components/timeline/Timeline.variants.js +4 -4
- package/dist/esm/components/toast/UnityToast.js +2 -2
- package/dist/esm/components/toast/parts/ToastAction.js +10 -12
- package/dist/esm/components/toggle-switch/ToggleSwitch.js +4 -7
- package/dist/esm/hooks/use-tanstack-form.d.ts +6 -6
- package/dist/esm/index.d.ts +0 -21
- package/dist/esm/index.js +222 -243
- package/dist/esm/integrations/tanstack-router/components/form-contextual-link/TanstackFormContextualLink.js +7 -0
- package/dist/esm/integrations/tanstack-router/index.d.ts +1 -1
- package/dist/esm/integrations/tanstack-router.js +2 -2
- package/dist/esm/modules/ai-kit/components/ai-button/AIButton.d.ts +1 -1
- package/package.json +8 -11
- package/skills/unity-migrate-from-midnight/references/midnight-component-map.md +7 -7
- package/skills/unity-tanstack-form/SKILL.md +1 -25
- package/skills/unity-tanstack-form/references/schema-adapters.md +0 -27
- package/dist/esm/adapters/standardSchemaAdapter.js +0 -19
- package/dist/esm/adapters/zodAdapter.js +0 -60
- package/dist/esm/components/checkbox-field/CheckboxField.d.ts +0 -76
- package/dist/esm/components/checkbox-field/CheckboxField.js +0 -40
- package/dist/esm/components/checkbox-group-field/CheckboxGroupField.d.ts +0 -81
- package/dist/esm/components/checkbox-group-field/CheckboxGroupField.js +0 -37
- package/dist/esm/components/date-picker-field/DatePickerField.d.ts +0 -85
- package/dist/esm/components/date-picker-field/DatePickerField.js +0 -54
- package/dist/esm/components/form/Form.context.d.ts +0 -9
- package/dist/esm/components/form/Form.context.js +0 -17
- package/dist/esm/components/form/Form.d.ts +0 -43
- package/dist/esm/components/form/Form.js +0 -41
- package/dist/esm/components/form-field/FormField.context.d.ts +0 -33
- package/dist/esm/components/form-field/FormField.context.js +0 -47
- package/dist/esm/components/form-field/FormField.d.ts +0 -61
- package/dist/esm/components/form-field/FormField.js +0 -50
- package/dist/esm/components/form-field/parts/FormControl.d.ts +0 -32
- package/dist/esm/components/form-field/parts/FormControl.js +0 -42
- package/dist/esm/components/form-field/parts/FormFeedbackText.d.ts +0 -9
- package/dist/esm/components/form-field/parts/FormFeedbackText.js +0 -24
- package/dist/esm/components/form-field/parts/FormHelperText.d.ts +0 -9
- package/dist/esm/components/form-field/parts/FormHelperText.js +0 -21
- package/dist/esm/components/form-field/parts/FormLabel.d.ts +0 -10
- package/dist/esm/components/form-field/parts/FormLabel.js +0 -21
- package/dist/esm/components/form-field/parts/RawFormContextualLink.d.ts +0 -22
- package/dist/esm/components/form-field/parts/RawFormContextualLink.js +0 -33
- package/dist/esm/components/form-field/utils/isFieldRequired.d.ts +0 -8
- package/dist/esm/components/form-field/utils/isFieldRequired.js +0 -8
- package/dist/esm/components/multi-select-field/MultiSelectField.d.ts +0 -92
- package/dist/esm/components/multi-select-field/MultiSelectField.js +0 -57
- package/dist/esm/components/number-field/NumberField.d.ts +0 -49
- package/dist/esm/components/number-field/NumberField.js +0 -50
- package/dist/esm/components/radio-button-group-field/RadioButtonGroupField.d.ts +0 -49
- package/dist/esm/components/radio-button-group-field/RadioButtonGroupField.js +0 -37
- package/dist/esm/components/select-field/SelectField.d.ts +0 -52
- package/dist/esm/components/select-field/SelectField.js +0 -45
- package/dist/esm/components/selectable-button-group-field/SelectableButtonGroupField.d.ts +0 -61
- package/dist/esm/components/selectable-button-group-field/SelectableButtonGroupField.js +0 -42
- package/dist/esm/components/selectable-card-checkbox-group-field/SelectableCardCheckboxGroupField.d.ts +0 -33
- package/dist/esm/components/selectable-card-checkbox-group-field/SelectableCardCheckboxGroupField.js +0 -38
- package/dist/esm/components/selectable-card-radio-group-field/SelectableCardRadioGroupField.d.ts +0 -33
- package/dist/esm/components/selectable-card-radio-group-field/SelectableCardRadioGroupField.js +0 -38
- package/dist/esm/components/text-field/TextField.d.ts +0 -65
- package/dist/esm/components/text-field/TextField.js +0 -55
- package/dist/esm/components/toggle-switch-field/ToggleSwitchField.d.ts +0 -70
- package/dist/esm/components/toggle-switch-field/ToggleSwitchField.js +0 -35
- package/dist/esm/components/toggle-switch-group-field/ToggleSwitchGroupField.d.ts +0 -84
- package/dist/esm/components/toggle-switch-group-field/ToggleSwitchGroupField.js +0 -43
- package/dist/esm/hooks/use-form.d.ts +0 -50
- package/dist/esm/hooks/use-form.js +0 -38
- package/dist/esm/integrations/tanstack-router/components/form-contextual-link/FormContextualLink.d.ts +0 -45
- package/dist/esm/integrations/tanstack-router/components/form-contextual-link/FormContextualLink.js +0 -7
- package/dist/esm/utils/createSchemaAdapter.js +0 -8
|
@@ -4,120 +4,120 @@ import { useMonthsList as n } from "./hooks/useMonthsList.js";
|
|
|
4
4
|
import { useYearsList as r } from "./hooks/useYearsList.js";
|
|
5
5
|
import { DateSegmentSelect as i } from "./parts/DateSegmentSelect.js";
|
|
6
6
|
import { useState as a } from "react";
|
|
7
|
-
import {
|
|
8
|
-
import { jsx as
|
|
9
|
-
import { useIntl as
|
|
10
|
-
import { getLocalTimeZone as
|
|
11
|
-
import { Calendar as
|
|
7
|
+
import { uyTv as o } from "@payfit/unity-themes";
|
|
8
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
9
|
+
import { useIntl as l } from "react-intl";
|
|
10
|
+
import { getLocalTimeZone as u, isToday as d, today as f } from "@internationalized/date";
|
|
11
|
+
import { Calendar as p, CalendarCell as m, CalendarGrid as h, CalendarGridBody as g, CalendarGridHeader as _, CalendarHeaderCell as v, Heading as y } from "react-aria-components/Calendar";
|
|
12
12
|
//#region src/components/date-calendar/DateCalendar.tsx
|
|
13
|
-
var
|
|
13
|
+
var b = o({
|
|
14
14
|
extend: t,
|
|
15
15
|
slots: {
|
|
16
16
|
calendarGrid: "uy:border-spacing-25",
|
|
17
17
|
calendarCell: [
|
|
18
18
|
"uy:data-[selected]:bg-surface-form-active",
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"uy:
|
|
22
|
-
"uy:
|
|
19
|
+
"",
|
|
20
|
+
"",
|
|
21
|
+
"uy:data-[selected]:text-content-form-active",
|
|
22
|
+
"uy:data-[today]:data-[selected]:after:bg-border-form-active"
|
|
23
23
|
]
|
|
24
24
|
},
|
|
25
25
|
variants: { isDisabled: { true: { calendarCell: "uy:data-[selected]:bg-transparent uy:data-[selected]:text-content-neutral-disabled" } } }
|
|
26
26
|
});
|
|
27
|
-
function
|
|
28
|
-
let
|
|
29
|
-
startYear:
|
|
30
|
-
endYear:
|
|
31
|
-
}), [
|
|
32
|
-
let e = t ??
|
|
33
|
-
return
|
|
34
|
-
}),
|
|
35
|
-
|
|
36
|
-
},
|
|
37
|
-
|
|
38
|
-
}, { base:
|
|
39
|
-
isDisabled:
|
|
40
|
-
isInteractive: !
|
|
41
|
-
}),
|
|
42
|
-
return /* @__PURE__ */
|
|
43
|
-
className:
|
|
27
|
+
function x({ value: t, defaultValue: o, minValue: x, maxValue: S, onChange: C, onFocusChange: w, ...T }) {
|
|
28
|
+
let E = l(), D = f(u()), O = n(), k = r({
|
|
29
|
+
startYear: x?.year,
|
|
30
|
+
endYear: S?.year
|
|
31
|
+
}), [A, j] = a(t ?? o ?? null), [M, N] = a(() => {
|
|
32
|
+
let e = t ?? o ?? D;
|
|
33
|
+
return x && e.compare(x) < 0 ? x : S && e.compare(S) > 0 ? S : e;
|
|
34
|
+
}), P = (e) => {
|
|
35
|
+
N((t) => t.set({ month: parseInt(e, 10) }));
|
|
36
|
+
}, F = (e) => {
|
|
37
|
+
N((t) => t.set({ year: parseInt(e, 10) }));
|
|
38
|
+
}, { base: I, calendarWrapper: L, dialogHeader: R, dialogHeaderGroup: z, calendarGrid: B, calendarHeaderCell: V, calendarCell: H } = b({
|
|
39
|
+
isDisabled: T.isDisabled,
|
|
40
|
+
isInteractive: !T.isDisabled && !T.isReadOnly
|
|
41
|
+
}), U = "outlined", W = "primary";
|
|
42
|
+
return /* @__PURE__ */ s("div", {
|
|
43
|
+
className: I(),
|
|
44
44
|
"data-dd-privacy": "mask",
|
|
45
|
-
children: /* @__PURE__ */
|
|
46
|
-
...
|
|
47
|
-
minValue:
|
|
48
|
-
maxValue:
|
|
49
|
-
value:
|
|
50
|
-
defaultValue:
|
|
45
|
+
children: /* @__PURE__ */ s(p, {
|
|
46
|
+
...T,
|
|
47
|
+
minValue: x,
|
|
48
|
+
maxValue: S,
|
|
49
|
+
value: A,
|
|
50
|
+
defaultValue: o,
|
|
51
51
|
onChange: (e) => {
|
|
52
|
-
|
|
52
|
+
j(e), C?.(e);
|
|
53
53
|
},
|
|
54
|
-
focusedValue:
|
|
54
|
+
focusedValue: M,
|
|
55
55
|
onFocusChange: (e) => {
|
|
56
|
-
|
|
56
|
+
N(e), w?.(e);
|
|
57
57
|
},
|
|
58
|
-
children: /* @__PURE__ */
|
|
59
|
-
className:
|
|
60
|
-
children: [/* @__PURE__ */
|
|
61
|
-
className:
|
|
58
|
+
children: /* @__PURE__ */ c("div", {
|
|
59
|
+
className: L(),
|
|
60
|
+
children: [/* @__PURE__ */ c("header", {
|
|
61
|
+
className: R(),
|
|
62
62
|
children: [
|
|
63
|
-
/* @__PURE__ */
|
|
64
|
-
/* @__PURE__ */
|
|
65
|
-
className:
|
|
66
|
-
children: [/* @__PURE__ */
|
|
63
|
+
/* @__PURE__ */ s(y, { className: "uy:sr-only" }),
|
|
64
|
+
/* @__PURE__ */ c("div", {
|
|
65
|
+
className: z({ className: "uy:pl-100 uy:gap-200" }),
|
|
66
|
+
children: [/* @__PURE__ */ s(i, {
|
|
67
67
|
type: "month",
|
|
68
|
-
items:
|
|
69
|
-
value:
|
|
70
|
-
onChange:
|
|
71
|
-
isDisabled:
|
|
72
|
-
}), /* @__PURE__ */
|
|
68
|
+
items: O,
|
|
69
|
+
value: M.month.toString(),
|
|
70
|
+
onChange: P,
|
|
71
|
+
isDisabled: T.isDisabled
|
|
72
|
+
}), /* @__PURE__ */ s(i, {
|
|
73
73
|
type: "year",
|
|
74
|
-
items:
|
|
75
|
-
value:
|
|
76
|
-
onChange:
|
|
77
|
-
isDisabled:
|
|
74
|
+
items: k,
|
|
75
|
+
value: M.year.toString(),
|
|
76
|
+
onChange: F,
|
|
77
|
+
isDisabled: T.isDisabled
|
|
78
78
|
})]
|
|
79
79
|
}),
|
|
80
|
-
/* @__PURE__ */
|
|
81
|
-
className:
|
|
82
|
-
children: [/* @__PURE__ */
|
|
80
|
+
/* @__PURE__ */ c("div", {
|
|
81
|
+
className: z({ className: "uy:ml-auto uy:gap-100" }),
|
|
82
|
+
children: [/* @__PURE__ */ s(e, {
|
|
83
83
|
slot: "previous",
|
|
84
84
|
icon: "CaretLeftOutlined",
|
|
85
|
-
color:
|
|
86
|
-
label:
|
|
85
|
+
color: W,
|
|
86
|
+
label: E.formatMessage({
|
|
87
87
|
id: "unity:component:common:previous",
|
|
88
88
|
defaultMessage: "Previous"
|
|
89
89
|
}),
|
|
90
|
-
variant:
|
|
91
|
-
isDisabled:
|
|
92
|
-
}), /* @__PURE__ */
|
|
90
|
+
variant: U,
|
|
91
|
+
isDisabled: T.isDisabled
|
|
92
|
+
}), /* @__PURE__ */ s(e, {
|
|
93
93
|
slot: "next",
|
|
94
94
|
icon: "CaretRightOutlined",
|
|
95
|
-
color:
|
|
96
|
-
label:
|
|
95
|
+
color: W,
|
|
96
|
+
label: E.formatMessage({
|
|
97
97
|
id: "unity:component:common:next",
|
|
98
98
|
defaultMessage: "Next"
|
|
99
99
|
}),
|
|
100
|
-
variant:
|
|
101
|
-
isDisabled:
|
|
100
|
+
variant: U,
|
|
101
|
+
isDisabled: T.isDisabled
|
|
102
102
|
})]
|
|
103
103
|
})
|
|
104
104
|
]
|
|
105
|
-
}), /* @__PURE__ */
|
|
106
|
-
className:
|
|
105
|
+
}), /* @__PURE__ */ c(h, {
|
|
106
|
+
className: B(),
|
|
107
107
|
weekdayStyle: "short",
|
|
108
|
-
children: [/* @__PURE__ */
|
|
109
|
-
className:
|
|
108
|
+
children: [/* @__PURE__ */ s(_, { children: (e) => /* @__PURE__ */ s(v, {
|
|
109
|
+
className: V(),
|
|
110
110
|
children: e
|
|
111
|
-
}) }), /* @__PURE__ */
|
|
111
|
+
}) }), /* @__PURE__ */ s(g, { children: (e) => /* @__PURE__ */ s(m, {
|
|
112
112
|
date: e,
|
|
113
|
-
"data-today":
|
|
114
|
-
className:
|
|
113
|
+
"data-today": d(e, u()) ? !0 : void 0,
|
|
114
|
+
className: H()
|
|
115
115
|
}) })]
|
|
116
116
|
})]
|
|
117
117
|
})
|
|
118
118
|
})
|
|
119
119
|
});
|
|
120
120
|
}
|
|
121
|
-
|
|
121
|
+
x.displayName = "DateCalendar";
|
|
122
122
|
//#endregion
|
|
123
|
-
export {
|
|
123
|
+
export { x as DateCalendar };
|
|
@@ -12,8 +12,8 @@ var t = e({
|
|
|
12
12
|
"uy:typography-body uy:relative uy:text-content-form-enabled uy:w-[44px] uy:h-[44px] uy:p-[1px] uy:outline-hidden uy:cursor-pointer uy:rounded-circle uy:flex uy:items-center uy:justify-center",
|
|
13
13
|
"uy:data-[outside-month]:text-content-neutral-disabled uy:data-[outside-month]:cursor-not-allowed uy:data-[disabled]:text-content-neutral-disabled uy:data-[disabled]:cursor-not-allowed uy:data-[unavailable]:text-content-neutral-disabled uy:data-[unavailable]:cursor-not-allowed",
|
|
14
14
|
"uy:data-[today]:after:content-[''] uy:data-[today]:after:absolute uy:data-[today]:after:bottom-[6px] uy:data-[today]:after:w-[6px] uy:data-[today]:after:h-[6px] uy:data-[today]:after:rounded-circle",
|
|
15
|
-
"
|
|
16
|
-
"uy:
|
|
15
|
+
"",
|
|
16
|
+
"uy:data-[today]:after:bg-border-form-active"
|
|
17
17
|
]
|
|
18
18
|
},
|
|
19
19
|
variants: {
|
|
@@ -21,7 +21,7 @@ var t = e({
|
|
|
21
21
|
isInteractive: { true: { calendarCell: [
|
|
22
22
|
"uy:hover:bg-surface-neutral-hover uy:active:bg-surface-form-active",
|
|
23
23
|
"uy:data-[pressed]:bg-surface-neutral-pressed uy:data-[focus-visible]:outline-2 uy:data-[focus-visible]:outline-solid uy:data-[focus-visible]:outline-utility-focus-ring uy:data-[focus-visible]:outline-offset-2",
|
|
24
|
-
"uy:
|
|
24
|
+
"uy:active:text-content-form-active",
|
|
25
25
|
"uy:data-[disabled]:hover:bg-transparent uy:data-[unavailable]:hover:bg-transparent uy:data-[outside-month]:hover:bg-transparent"
|
|
26
26
|
] } }
|
|
27
27
|
},
|
|
@@ -11,12 +11,11 @@ var d = i({
|
|
|
11
11
|
base: [
|
|
12
12
|
"uy:group uy:box-content uy:rounded-25 uy:px-25 uy:text-end uy:tabular-nums! uy:outline-none uy:typography-body uy:focus:bg-surface-form-active uy:focus:rounded-25",
|
|
13
13
|
"uy:data-[disabled]:text-content-form-disabled",
|
|
14
|
-
"uy:
|
|
15
|
-
"uy:theme-rebrand:focus:text-content-form-active"
|
|
14
|
+
"uy:focus:text-content-form-active"
|
|
16
15
|
],
|
|
17
16
|
variants: {
|
|
18
17
|
isPlaceholder: {
|
|
19
|
-
true: ["uy:
|
|
18
|
+
true: ["uy:text-content-neutral-lowest-enabled"],
|
|
20
19
|
false: "uy:text-content-form-enabled"
|
|
21
20
|
},
|
|
22
21
|
isLiteral: {
|
|
@@ -4,26 +4,26 @@ import { useMonthsList as n } from "../date-calendar/hooks/useMonthsList.js";
|
|
|
4
4
|
import { useYearsList as r } from "../date-calendar/hooks/useYearsList.js";
|
|
5
5
|
import { DateSegmentSelect as i } from "../date-calendar/parts/DateSegmentSelect.js";
|
|
6
6
|
import { useState as a } from "react";
|
|
7
|
-
import {
|
|
8
|
-
import { jsx as
|
|
9
|
-
import { useIntl as
|
|
10
|
-
import { Heading as
|
|
11
|
-
import { getLocalTimeZone as
|
|
12
|
-
import { CalendarCell as
|
|
7
|
+
import { uyTv as o } from "@payfit/unity-themes";
|
|
8
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
9
|
+
import { useIntl as l } from "react-intl";
|
|
10
|
+
import { Heading as u } from "react-aria-components/Heading";
|
|
11
|
+
import { getLocalTimeZone as d, isToday as f, today as p } from "@internationalized/date";
|
|
12
|
+
import { CalendarCell as m, CalendarGrid as h, CalendarGridBody as g, CalendarGridHeader as _, CalendarHeaderCell as v, RangeCalendar as y } from "react-aria-components/RangeCalendar";
|
|
13
13
|
//#region src/components/date-range-calendar/DateRangeCalendar.tsx
|
|
14
|
-
var
|
|
14
|
+
var b = o({
|
|
15
15
|
extend: t,
|
|
16
16
|
slots: {
|
|
17
17
|
calendarGrid: [
|
|
18
18
|
"uy:border-spacing-y-25 uy:border-spacing-x-0",
|
|
19
19
|
"uy:[&_td:has(>[data-selected])]:relative",
|
|
20
|
-
"uy:[&_td:has(>[data-selection-start])]:bg-transparent uy:[&_td:has(>[data-selection-start]:not([data-selection-end]))]:before:content-[''] uy:[&_td:has(>[data-selection-start]:not([data-selection-end]))]:before:absolute uy:[&_td:has(>[data-selection-start]:not([data-selection-end]))]:before:top-0 uy:[&_td:has(>[data-selection-start]:not([data-selection-end]))]:before:right-0 uy:[&_td:has(>[data-selection-start]:not([data-selection-end]))]:before:w-1/2 uy:[&_td:has(>[data-selection-start]:not([data-selection-end]))]:before:h-full
|
|
20
|
+
"uy:[&_td:has(>[data-selection-start])]:bg-transparent uy:[&_td:has(>[data-selection-start]:not([data-selection-end]))]:before:content-[''] uy:[&_td:has(>[data-selection-start]:not([data-selection-end]))]:before:absolute uy:[&_td:has(>[data-selection-start]:not([data-selection-end]))]:before:top-0 uy:[&_td:has(>[data-selection-start]:not([data-selection-end]))]:before:right-0 uy:[&_td:has(>[data-selection-start]:not([data-selection-end]))]:before:w-1/2 uy:[&_td:has(>[data-selection-start]:not([data-selection-end]))]:before:h-full ",
|
|
21
21
|
"uy:[&_td:has(>[data-selection-end])]:bg-transparent",
|
|
22
22
|
"uy:[&_td:has(>[data-selection-start][data-selection-end])]:bg-transparent",
|
|
23
|
-
"
|
|
24
|
-
"uy:
|
|
25
|
-
"uy:
|
|
26
|
-
"uy:[&_td:has(>[data-selection-end]:not([data-selection-start]))]:before:content-[''] uy:[&_td:has(>[data-selection-end]:not([data-selection-start]))]:before:absolute uy:[&_td:has(>[data-selection-end]:not([data-selection-start]))]:before:top-0 uy:[&_td:has(>[data-selection-end]:not([data-selection-start]))]:before:left-0 uy:[&_td:has(>[data-selection-end]:not([data-selection-start]))]:before:w-1/2 uy:[&_td:has(>[data-selection-end]:not([data-selection-start]))]:before:h-full
|
|
23
|
+
"",
|
|
24
|
+
"uy:[&_td:has(>[data-selected])]:bg-surface-form-selected",
|
|
25
|
+
"uy:[&_td:has(>[data-selection-start]:not([data-selection-end]))]:before:bg-surface-form-selected",
|
|
26
|
+
"uy:[&_td:has(>[data-selection-end]:not([data-selection-start]))]:before:content-[''] uy:[&_td:has(>[data-selection-end]:not([data-selection-start]))]:before:absolute uy:[&_td:has(>[data-selection-end]:not([data-selection-start]))]:before:top-0 uy:[&_td:has(>[data-selection-end]:not([data-selection-start]))]:before:left-0 uy:[&_td:has(>[data-selection-end]:not([data-selection-start]))]:before:w-1/2 uy:[&_td:has(>[data-selection-end]:not([data-selection-start]))]:before:h-full uy:[&_td:has(>[data-selection-end]:not([data-selection-start]))]:before:bg-surface-form-selected"
|
|
27
27
|
],
|
|
28
28
|
calendarHeaderCell: "uy:text-center",
|
|
29
29
|
calendarCell: [
|
|
@@ -31,14 +31,14 @@ var x = s({
|
|
|
31
31
|
"uy:data-[selection-start]:bg-surface-form-active uy:data-[selection-start]:rounded-circle",
|
|
32
32
|
"uy:data-[selection-end]:bg-surface-form-active",
|
|
33
33
|
"uy:data-[selection-end]:rounded-circle",
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"uy:
|
|
39
|
-
"uy:
|
|
40
|
-
"uy:
|
|
41
|
-
"uy:
|
|
34
|
+
"",
|
|
35
|
+
"",
|
|
36
|
+
"",
|
|
37
|
+
"",
|
|
38
|
+
"uy:data-[selection-start]:text-content-form-active",
|
|
39
|
+
"uy:data-[selection-end]:text-content-form-active",
|
|
40
|
+
"uy:data-[today]:data-[selection-start]:after:bg-border-form-active",
|
|
41
|
+
"uy:data-[today]:data-[selection-end]:after:bg-border-form-active"
|
|
42
42
|
]
|
|
43
43
|
},
|
|
44
44
|
variants: {
|
|
@@ -48,103 +48,103 @@ var x = s({
|
|
|
48
48
|
} },
|
|
49
49
|
isInteractive: { true: { calendarCell: [
|
|
50
50
|
"uy:data-[selected]:not-data-[selection-start]:not-data-[selection-end]:hover:rounded-circle",
|
|
51
|
-
"
|
|
52
|
-
"uy:
|
|
51
|
+
"",
|
|
52
|
+
"uy:data-[selected]:not-data-[selection-start]:not-data-[selection-end]:hover:bg-surface-neutral-hover"
|
|
53
53
|
] } }
|
|
54
54
|
}
|
|
55
55
|
});
|
|
56
|
-
function
|
|
57
|
-
let
|
|
58
|
-
startYear:
|
|
59
|
-
endYear:
|
|
60
|
-
}), [
|
|
61
|
-
let e = t?.start ??
|
|
62
|
-
return
|
|
63
|
-
}),
|
|
64
|
-
|
|
65
|
-
},
|
|
66
|
-
|
|
67
|
-
}, { base:
|
|
68
|
-
isDisabled:
|
|
69
|
-
isInteractive: !
|
|
70
|
-
}),
|
|
71
|
-
return /* @__PURE__ */
|
|
72
|
-
className:
|
|
56
|
+
function x({ value: t, defaultValue: o, minValue: x, maxValue: S, onChange: C, onFocusChange: w, ...T }) {
|
|
57
|
+
let E = l(), D = p(d()), O = n(), k = r({
|
|
58
|
+
startYear: x?.year,
|
|
59
|
+
endYear: S?.year
|
|
60
|
+
}), [A, j] = a(() => {
|
|
61
|
+
let e = t?.start ?? o?.start ?? D;
|
|
62
|
+
return x && e.compare(x) < 0 ? x : S && e.compare(S) > 0 ? S : e;
|
|
63
|
+
}), M = (e) => {
|
|
64
|
+
j((t) => t.set({ month: parseInt(e, 10) }));
|
|
65
|
+
}, N = (e) => {
|
|
66
|
+
j((t) => t.set({ year: parseInt(e, 10) }));
|
|
67
|
+
}, { base: P, calendarWrapper: F, dialogHeader: I, dialogHeaderGroup: L, calendarGrid: R, calendarHeaderCell: z, calendarCell: B } = b({
|
|
68
|
+
isDisabled: T.isDisabled,
|
|
69
|
+
isInteractive: !T.isDisabled && !T.isReadOnly
|
|
70
|
+
}), V = "outlined", H = "primary";
|
|
71
|
+
return /* @__PURE__ */ s("div", {
|
|
72
|
+
className: P(),
|
|
73
73
|
"data-dd-privacy": "mask",
|
|
74
|
-
children: /* @__PURE__ */
|
|
75
|
-
...
|
|
76
|
-
minValue:
|
|
77
|
-
maxValue:
|
|
74
|
+
children: /* @__PURE__ */ s(y, {
|
|
75
|
+
...T,
|
|
76
|
+
minValue: x,
|
|
77
|
+
maxValue: S,
|
|
78
78
|
value: t,
|
|
79
|
-
defaultValue:
|
|
80
|
-
onChange:
|
|
81
|
-
focusedValue:
|
|
79
|
+
defaultValue: o,
|
|
80
|
+
onChange: C,
|
|
81
|
+
focusedValue: A,
|
|
82
82
|
onFocusChange: (e) => {
|
|
83
|
-
|
|
83
|
+
j(e), w?.(e);
|
|
84
84
|
},
|
|
85
|
-
children: /* @__PURE__ */
|
|
86
|
-
className:
|
|
87
|
-
children: [/* @__PURE__ */
|
|
88
|
-
className:
|
|
85
|
+
children: /* @__PURE__ */ c("div", {
|
|
86
|
+
className: F(),
|
|
87
|
+
children: [/* @__PURE__ */ c("header", {
|
|
88
|
+
className: I(),
|
|
89
89
|
children: [
|
|
90
|
-
/* @__PURE__ */
|
|
91
|
-
/* @__PURE__ */
|
|
92
|
-
className:
|
|
93
|
-
children: [/* @__PURE__ */
|
|
90
|
+
/* @__PURE__ */ s(u, { className: "uy:sr-only" }),
|
|
91
|
+
/* @__PURE__ */ c("div", {
|
|
92
|
+
className: L({ className: "uy:pl-100 uy:gap-200" }),
|
|
93
|
+
children: [/* @__PURE__ */ s(i, {
|
|
94
94
|
type: "month",
|
|
95
|
-
items:
|
|
96
|
-
value:
|
|
97
|
-
onChange:
|
|
98
|
-
isDisabled:
|
|
99
|
-
}), /* @__PURE__ */
|
|
95
|
+
items: O,
|
|
96
|
+
value: A.month.toString(),
|
|
97
|
+
onChange: M,
|
|
98
|
+
isDisabled: T.isDisabled
|
|
99
|
+
}), /* @__PURE__ */ s(i, {
|
|
100
100
|
type: "year",
|
|
101
|
-
items:
|
|
102
|
-
value:
|
|
103
|
-
onChange:
|
|
104
|
-
isDisabled:
|
|
101
|
+
items: k,
|
|
102
|
+
value: A.year.toString(),
|
|
103
|
+
onChange: N,
|
|
104
|
+
isDisabled: T.isDisabled
|
|
105
105
|
})]
|
|
106
106
|
}),
|
|
107
|
-
/* @__PURE__ */
|
|
108
|
-
className:
|
|
109
|
-
children: [/* @__PURE__ */
|
|
107
|
+
/* @__PURE__ */ c("div", {
|
|
108
|
+
className: L({ className: "uy:ml-auto uy:gap-100" }),
|
|
109
|
+
children: [/* @__PURE__ */ s(e, {
|
|
110
110
|
slot: "previous",
|
|
111
111
|
icon: "CaretLeftOutlined",
|
|
112
|
-
color:
|
|
113
|
-
label:
|
|
112
|
+
color: H,
|
|
113
|
+
label: E.formatMessage({
|
|
114
114
|
id: "unity:component:common:previous",
|
|
115
115
|
defaultMessage: "Previous"
|
|
116
116
|
}),
|
|
117
|
-
variant:
|
|
118
|
-
isDisabled:
|
|
119
|
-
}), /* @__PURE__ */
|
|
117
|
+
variant: V,
|
|
118
|
+
isDisabled: T.isDisabled
|
|
119
|
+
}), /* @__PURE__ */ s(e, {
|
|
120
120
|
slot: "next",
|
|
121
121
|
icon: "CaretRightOutlined",
|
|
122
|
-
color:
|
|
123
|
-
label:
|
|
122
|
+
color: H,
|
|
123
|
+
label: E.formatMessage({
|
|
124
124
|
id: "unity:component:common:next",
|
|
125
125
|
defaultMessage: "Next"
|
|
126
126
|
}),
|
|
127
|
-
variant:
|
|
128
|
-
isDisabled:
|
|
127
|
+
variant: V,
|
|
128
|
+
isDisabled: T.isDisabled
|
|
129
129
|
})]
|
|
130
130
|
})
|
|
131
131
|
]
|
|
132
|
-
}), /* @__PURE__ */
|
|
133
|
-
className:
|
|
132
|
+
}), /* @__PURE__ */ c(h, {
|
|
133
|
+
className: R(),
|
|
134
134
|
weekdayStyle: "short",
|
|
135
|
-
children: [/* @__PURE__ */
|
|
136
|
-
className:
|
|
135
|
+
children: [/* @__PURE__ */ s(_, { children: (e) => /* @__PURE__ */ s(v, {
|
|
136
|
+
className: z(),
|
|
137
137
|
children: e
|
|
138
|
-
}) }), /* @__PURE__ */
|
|
138
|
+
}) }), /* @__PURE__ */ s(g, { children: (e) => /* @__PURE__ */ s(m, {
|
|
139
139
|
date: e,
|
|
140
|
-
"data-today":
|
|
141
|
-
className:
|
|
140
|
+
"data-today": f(e, d()) ? !0 : void 0,
|
|
141
|
+
className: B()
|
|
142
142
|
}) })]
|
|
143
143
|
})]
|
|
144
144
|
})
|
|
145
145
|
})
|
|
146
146
|
});
|
|
147
147
|
}
|
|
148
|
-
|
|
148
|
+
x.displayName = "DateRangeCalendar";
|
|
149
149
|
//#endregion
|
|
150
|
-
export {
|
|
150
|
+
export { x as DateRangeCalendar };
|
|
@@ -12,7 +12,7 @@ var p = o({
|
|
|
12
12
|
base: "uy:px-50 uy:flex uy:items-center",
|
|
13
13
|
variants: { isDisabled: {
|
|
14
14
|
true: "uy:text-content-form-disabled",
|
|
15
|
-
false: ["uy:
|
|
15
|
+
false: ["uy:text-content-neutral-lowest"]
|
|
16
16
|
} }
|
|
17
17
|
});
|
|
18
18
|
function m({ isLoading: o, isInvalid: m, isReadOnly: h, isDisabled: g, onClearButtonPress: _ }) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Button as e } from "../../button/Button.js";
|
|
2
|
-
import {
|
|
3
|
-
import { jsx as
|
|
4
|
-
import { FormattedMessage as
|
|
5
|
-
import { Separator as
|
|
6
|
-
import { Popover as
|
|
7
|
-
import { Dialog as
|
|
2
|
+
import { uyTv as t } from "@payfit/unity-themes";
|
|
3
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
+
import { FormattedMessage as i } from "react-intl";
|
|
5
|
+
import { Separator as a } from "react-aria-components/Separator";
|
|
6
|
+
import { Popover as o } from "react-aria-components/Popover";
|
|
7
|
+
import { Dialog as s } from "react-aria-components/Dialog";
|
|
8
8
|
//#region src/components/filter/parts/FilterPopover.tsx
|
|
9
|
-
var
|
|
9
|
+
var c = t({ slots: {
|
|
10
10
|
popover: [
|
|
11
11
|
"uy:border uy:border-solid uy:border-border-neutral uy:bg-surface-neutral uy:rounded-sm uy:shadow-300 uy:min-w-[320px] uy:max-w-[800px] uy:relative uy:isolate uy:overflow-hidden",
|
|
12
12
|
"uy:transition-all uy:duration-200 uy:linear uy:data-[entering]:opacity-100 uy:data-[exiting]:opacity-0",
|
|
@@ -26,36 +26,36 @@ var l = n({ slots: {
|
|
|
26
26
|
separator: ["uy:mb-100 uy:border-border-neutral uy:h-px"],
|
|
27
27
|
actions: ["uy:flex uy:justify-between uy:gap-100"]
|
|
28
28
|
} });
|
|
29
|
-
function
|
|
30
|
-
let { popover:
|
|
31
|
-
return /* @__PURE__ */
|
|
32
|
-
className:
|
|
29
|
+
function l({ children: t, onConfirm: l, onClear: u }) {
|
|
30
|
+
let { popover: d, dialog: f, content: p, footer: m, separator: h, actions: g } = c();
|
|
31
|
+
return /* @__PURE__ */ n(o, {
|
|
32
|
+
className: d(),
|
|
33
33
|
placement: "bottom left",
|
|
34
|
-
children: /* @__PURE__ */
|
|
35
|
-
className:
|
|
36
|
-
children: [/* @__PURE__ */
|
|
34
|
+
children: /* @__PURE__ */ r(s, {
|
|
35
|
+
className: f(),
|
|
36
|
+
children: [/* @__PURE__ */ n("div", {
|
|
37
|
+
className: p(),
|
|
38
|
+
children: t
|
|
39
|
+
}), /* @__PURE__ */ r("footer", {
|
|
37
40
|
className: m(),
|
|
38
|
-
children: n
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
children: [/* @__PURE__ */ r(o, { className: g() }), /* @__PURE__ */ i("div", {
|
|
42
|
-
className: _(),
|
|
43
|
-
children: [/* @__PURE__ */ r(e, {
|
|
41
|
+
children: [/* @__PURE__ */ n(a, { className: h() }), /* @__PURE__ */ r("div", {
|
|
42
|
+
className: g(),
|
|
43
|
+
children: [/* @__PURE__ */ n(e, {
|
|
44
44
|
variant: "ghost",
|
|
45
45
|
color: "danger",
|
|
46
46
|
size: "full",
|
|
47
47
|
prefixIcon: "TrashOutlined",
|
|
48
|
-
onPress:
|
|
49
|
-
children: /* @__PURE__ */
|
|
48
|
+
onPress: u,
|
|
49
|
+
children: /* @__PURE__ */ n(i, {
|
|
50
50
|
id: "unity:component:common:clear:title",
|
|
51
51
|
defaultMessage: "Clear"
|
|
52
52
|
})
|
|
53
|
-
}), /* @__PURE__ */
|
|
54
|
-
variant:
|
|
53
|
+
}), /* @__PURE__ */ n(e, {
|
|
54
|
+
variant: "primary",
|
|
55
55
|
color: "primary",
|
|
56
56
|
size: "full",
|
|
57
|
-
onPress:
|
|
58
|
-
children: /* @__PURE__ */
|
|
57
|
+
onPress: l,
|
|
58
|
+
children: /* @__PURE__ */ n(i, {
|
|
59
59
|
id: "unity:component:filter:action:apply",
|
|
60
60
|
defaultMessage: "Apply"
|
|
61
61
|
})
|
|
@@ -66,4 +66,4 @@ function u({ children: n, onConfirm: u, onClear: d }) {
|
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
68
|
//#endregion
|
|
69
|
-
export {
|
|
69
|
+
export { l as FilterPopover, c as filterPopover };
|
|
@@ -22,5 +22,5 @@ export type TanstackRawFormContextualLinkProps = PropsWithChildren<FormContextua
|
|
|
22
22
|
* - an anchor (`RawLink`) when `href` is provided; or
|
|
23
23
|
* - a button (from `react-aria-components`) when `onPress` is provided.
|
|
24
24
|
*/
|
|
25
|
-
declare const TanstackRawFormContextualLink: import('react').ForwardRefExoticComponent<TanstackRawFormContextualLinkProps & import('react').RefAttributes<
|
|
25
|
+
declare const TanstackRawFormContextualLink: import('react').ForwardRefExoticComponent<TanstackRawFormContextualLinkProps & import('react').RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
|
|
26
26
|
export { TanstackRawFormContextualLink };
|
|
@@ -1,34 +1,33 @@
|
|
|
1
1
|
import { RawLink as e } from "../../link/RawLink.js";
|
|
2
2
|
import { useFieldA11yContext as t } from "../TanstackFormField.context.js";
|
|
3
3
|
import { forwardRef as n } from "react";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { Button as a } from "react-aria-components/Button";
|
|
4
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
+
import { Button as i } from "react-aria-components/Button";
|
|
7
6
|
//#region src/components/form-field/parts/TanstackRawFormContextualLink.tsx
|
|
8
|
-
var
|
|
9
|
-
let { children:
|
|
10
|
-
return
|
|
11
|
-
id:
|
|
7
|
+
var a = n((n, a) => {
|
|
8
|
+
let { children: o, href: s, onPress: c, ...l } = n, u = t();
|
|
9
|
+
return s ? /* @__PURE__ */ r(e, {
|
|
10
|
+
id: u.contextualLinkId || n.id,
|
|
12
11
|
size: "small",
|
|
13
|
-
color:
|
|
12
|
+
color: "primary",
|
|
14
13
|
variant: "standalone",
|
|
15
14
|
"data-unity-slot": "form-field-contextual-link",
|
|
16
|
-
href:
|
|
17
|
-
ref:
|
|
15
|
+
href: s,
|
|
16
|
+
ref: a,
|
|
18
17
|
"data-dd-privacy": "allow",
|
|
19
|
-
...
|
|
20
|
-
children:
|
|
21
|
-
}) : /* @__PURE__ */ i
|
|
22
|
-
id:
|
|
23
|
-
onPress:
|
|
18
|
+
...l,
|
|
19
|
+
children: o
|
|
20
|
+
}) : /* @__PURE__ */ r(i, {
|
|
21
|
+
id: u.contextualLinkId || n.id,
|
|
22
|
+
onPress: c,
|
|
24
23
|
"data-unity-slot": "contextual-link",
|
|
25
24
|
className: "uy:typography-body-small uy:w-fit",
|
|
26
|
-
ref:
|
|
25
|
+
ref: a,
|
|
27
26
|
"data-dd-privacy": "allow",
|
|
28
|
-
...
|
|
29
|
-
children:
|
|
27
|
+
...l,
|
|
28
|
+
children: o
|
|
30
29
|
});
|
|
31
30
|
});
|
|
32
|
-
|
|
31
|
+
a.displayName = "TanstackRawFormContextualLink";
|
|
33
32
|
//#endregion
|
|
34
|
-
export {
|
|
33
|
+
export { a as TanstackRawFormContextualLink };
|
|
@@ -16,7 +16,7 @@ export interface FunnelLayoutProps extends PropsWithChildren<VariantProps<typeof
|
|
|
16
16
|
*
|
|
17
17
|
* function Example() {
|
|
18
18
|
* return (
|
|
19
|
-
* <FunnelLayout header={<FunnelTopBar title="Setup Process"
|
|
19
|
+
* <FunnelLayout header={<FunnelTopBar title="Setup Process" leading={<FunnelBackButton label="Back" onPress={handleBack} />} />}>
|
|
20
20
|
* <FunnelBody>
|
|
21
21
|
* <FunnelSidebar>Sidebar content</FunnelSidebar>
|
|
22
22
|
* <FunnelPage>Main content</FunnelPage>
|