@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.
Files changed (129) hide show
  1. package/README.md +6 -0
  2. package/dist/esm/components/action-bar/parts/ActionBarButton.d.ts +1 -15
  3. package/dist/esm/components/action-bar/parts/ActionBarButton.js +1 -2
  4. package/dist/esm/components/actionable/Actionable.d.ts +1 -1
  5. package/dist/esm/components/app-menu/parts/AppMenuHeader.js +30 -31
  6. package/dist/esm/components/avatar/parts/AvatarFallback.js +6 -6
  7. package/dist/esm/components/avatar-group/parts/AvatarGroupCount.d.ts +1 -1
  8. package/dist/esm/components/badge/Badge.js +1 -1
  9. package/dist/esm/components/breadcrumbs/parts/RawBreadcrumbLink.d.ts +1 -1
  10. package/dist/esm/components/button/Button.d.ts +1 -1
  11. package/dist/esm/components/button/Button.js +42 -48
  12. package/dist/esm/components/button/Button.variants.js +15 -17
  13. package/dist/esm/components/carousel/parts/CarouselHeader.d.ts +3 -3
  14. package/dist/esm/components/checkbox/Checkbox.variants.js +1 -1
  15. package/dist/esm/components/checkbox/parts/CheckboxIndicator.js +4 -4
  16. package/dist/esm/components/date-calendar/DateCalendar.js +74 -74
  17. package/dist/esm/components/date-calendar/DateCalendar.variants.js +3 -3
  18. package/dist/esm/components/date-picker/parts/DateInput.js +2 -3
  19. package/dist/esm/components/date-range-calendar/DateRangeCalendar.js +85 -85
  20. package/dist/esm/components/date-range-picker/parts/DateRangeInput.js +1 -1
  21. package/dist/esm/components/filter/parts/FilterPopover.js +27 -27
  22. package/dist/esm/components/form-field/parts/TanstackRawFormContextualLink.d.ts +1 -1
  23. package/dist/esm/components/form-field/parts/TanstackRawFormContextualLink.js +19 -20
  24. package/dist/esm/components/funnel-layout/FunnelLayout.d.ts +1 -1
  25. package/dist/esm/components/funnel-layout/parts/FunnelPageAction.d.ts +2 -2
  26. package/dist/esm/components/funnel-layout/parts/FunnelPageAction.js +24 -28
  27. package/dist/esm/components/funnel-layout/parts/FunnelSidebar.d.ts +0 -17
  28. package/dist/esm/components/funnel-layout/parts/FunnelSidebar.js +14 -23
  29. package/dist/esm/components/funnel-layout/parts/FunnelTopBar.d.ts +1 -27
  30. package/dist/esm/components/funnel-layout/parts/FunnelTopBar.js +43 -53
  31. package/dist/esm/components/icon-button/IconButton.d.ts +1 -1
  32. package/dist/esm/components/icon-button/IconButton.js +60 -66
  33. package/dist/esm/components/icon-button/IconButton.variants.js +15 -17
  34. package/dist/esm/components/link/RawLink.d.ts +1 -1
  35. package/dist/esm/components/link/RawLink.js +3 -3
  36. package/dist/esm/components/link-button/LinkButton.variants.js +12 -17
  37. package/dist/esm/components/link-button/RawLinkButton.js +41 -46
  38. package/dist/esm/components/menu/parts/MenuContent.d.ts +1 -10
  39. package/dist/esm/components/menu/parts/MenuContent.js +6 -6
  40. package/dist/esm/components/nav/parts/NavGroup.js +4 -4
  41. package/dist/esm/components/nav/parts/RawNavItem.js +9 -9
  42. package/dist/esm/components/navigation-card/NavigationCard.d.ts +1 -1
  43. package/dist/esm/components/navigation-card/NavigationCard.variants.js +2 -2
  44. package/dist/esm/components/page/parts/PageHeader.d.ts +3 -54
  45. package/dist/esm/components/page/parts/PageHeader.js +18 -28
  46. package/dist/esm/components/payfit-brand/PayFitBrand.d.ts +1 -11
  47. package/dist/esm/components/payfit-brand/PayFitBrand.js +48 -73
  48. package/dist/esm/components/payfit-brand/PayFitPreprod.d.ts +2 -6
  49. package/dist/esm/components/payfit-brand/PayFitPreprod.js +35 -44
  50. package/dist/esm/components/pill/Pill.d.ts +3 -3
  51. package/dist/esm/components/pill/Pill.js +1 -1
  52. package/dist/esm/components/radio-button-group/parts/RadioButton.js +23 -24
  53. package/dist/esm/components/radio-button-group/parts/RadioIndicator.d.ts +1 -2
  54. package/dist/esm/components/radio-button-group/parts/RadioIndicator.js +7 -38
  55. package/dist/esm/components/selectable-card/selectable-card-radio-group/parts/SelectableCardRadio.js +20 -22
  56. package/dist/esm/components/spinner/Spinner.js +1 -1
  57. package/dist/esm/components/tabs/Tabs.variant.js +6 -6
  58. package/dist/esm/components/tabs/parts/NavigationButton.js +2 -2
  59. package/dist/esm/components/task-menu/parts/RawSubTask.js +3 -3
  60. package/dist/esm/components/task-menu/parts/TaskGroup.js +3 -3
  61. package/dist/esm/components/task-menu/parts/task.variants.js +7 -7
  62. package/dist/esm/components/timeline/Timeline.variants.js +4 -4
  63. package/dist/esm/components/toast/UnityToast.js +2 -2
  64. package/dist/esm/components/toast/parts/ToastAction.js +10 -12
  65. package/dist/esm/components/toggle-switch/ToggleSwitch.js +4 -7
  66. package/dist/esm/hooks/use-tanstack-form.d.ts +6 -6
  67. package/dist/esm/index.d.ts +0 -21
  68. package/dist/esm/index.js +222 -243
  69. package/dist/esm/integrations/tanstack-router/components/form-contextual-link/TanstackFormContextualLink.js +7 -0
  70. package/dist/esm/integrations/tanstack-router/index.d.ts +1 -1
  71. package/dist/esm/integrations/tanstack-router.js +2 -2
  72. package/dist/esm/modules/ai-kit/components/ai-button/AIButton.d.ts +1 -1
  73. package/package.json +8 -11
  74. package/skills/unity-migrate-from-midnight/references/midnight-component-map.md +7 -7
  75. package/skills/unity-tanstack-form/SKILL.md +1 -25
  76. package/skills/unity-tanstack-form/references/schema-adapters.md +0 -27
  77. package/dist/esm/adapters/standardSchemaAdapter.js +0 -19
  78. package/dist/esm/adapters/zodAdapter.js +0 -60
  79. package/dist/esm/components/checkbox-field/CheckboxField.d.ts +0 -76
  80. package/dist/esm/components/checkbox-field/CheckboxField.js +0 -40
  81. package/dist/esm/components/checkbox-group-field/CheckboxGroupField.d.ts +0 -81
  82. package/dist/esm/components/checkbox-group-field/CheckboxGroupField.js +0 -37
  83. package/dist/esm/components/date-picker-field/DatePickerField.d.ts +0 -85
  84. package/dist/esm/components/date-picker-field/DatePickerField.js +0 -54
  85. package/dist/esm/components/form/Form.context.d.ts +0 -9
  86. package/dist/esm/components/form/Form.context.js +0 -17
  87. package/dist/esm/components/form/Form.d.ts +0 -43
  88. package/dist/esm/components/form/Form.js +0 -41
  89. package/dist/esm/components/form-field/FormField.context.d.ts +0 -33
  90. package/dist/esm/components/form-field/FormField.context.js +0 -47
  91. package/dist/esm/components/form-field/FormField.d.ts +0 -61
  92. package/dist/esm/components/form-field/FormField.js +0 -50
  93. package/dist/esm/components/form-field/parts/FormControl.d.ts +0 -32
  94. package/dist/esm/components/form-field/parts/FormControl.js +0 -42
  95. package/dist/esm/components/form-field/parts/FormFeedbackText.d.ts +0 -9
  96. package/dist/esm/components/form-field/parts/FormFeedbackText.js +0 -24
  97. package/dist/esm/components/form-field/parts/FormHelperText.d.ts +0 -9
  98. package/dist/esm/components/form-field/parts/FormHelperText.js +0 -21
  99. package/dist/esm/components/form-field/parts/FormLabel.d.ts +0 -10
  100. package/dist/esm/components/form-field/parts/FormLabel.js +0 -21
  101. package/dist/esm/components/form-field/parts/RawFormContextualLink.d.ts +0 -22
  102. package/dist/esm/components/form-field/parts/RawFormContextualLink.js +0 -33
  103. package/dist/esm/components/form-field/utils/isFieldRequired.d.ts +0 -8
  104. package/dist/esm/components/form-field/utils/isFieldRequired.js +0 -8
  105. package/dist/esm/components/multi-select-field/MultiSelectField.d.ts +0 -92
  106. package/dist/esm/components/multi-select-field/MultiSelectField.js +0 -57
  107. package/dist/esm/components/number-field/NumberField.d.ts +0 -49
  108. package/dist/esm/components/number-field/NumberField.js +0 -50
  109. package/dist/esm/components/radio-button-group-field/RadioButtonGroupField.d.ts +0 -49
  110. package/dist/esm/components/radio-button-group-field/RadioButtonGroupField.js +0 -37
  111. package/dist/esm/components/select-field/SelectField.d.ts +0 -52
  112. package/dist/esm/components/select-field/SelectField.js +0 -45
  113. package/dist/esm/components/selectable-button-group-field/SelectableButtonGroupField.d.ts +0 -61
  114. package/dist/esm/components/selectable-button-group-field/SelectableButtonGroupField.js +0 -42
  115. package/dist/esm/components/selectable-card-checkbox-group-field/SelectableCardCheckboxGroupField.d.ts +0 -33
  116. package/dist/esm/components/selectable-card-checkbox-group-field/SelectableCardCheckboxGroupField.js +0 -38
  117. package/dist/esm/components/selectable-card-radio-group-field/SelectableCardRadioGroupField.d.ts +0 -33
  118. package/dist/esm/components/selectable-card-radio-group-field/SelectableCardRadioGroupField.js +0 -38
  119. package/dist/esm/components/text-field/TextField.d.ts +0 -65
  120. package/dist/esm/components/text-field/TextField.js +0 -55
  121. package/dist/esm/components/toggle-switch-field/ToggleSwitchField.d.ts +0 -70
  122. package/dist/esm/components/toggle-switch-field/ToggleSwitchField.js +0 -35
  123. package/dist/esm/components/toggle-switch-group-field/ToggleSwitchGroupField.d.ts +0 -84
  124. package/dist/esm/components/toggle-switch-group-field/ToggleSwitchGroupField.js +0 -43
  125. package/dist/esm/hooks/use-form.d.ts +0 -50
  126. package/dist/esm/hooks/use-form.js +0 -38
  127. package/dist/esm/integrations/tanstack-router/components/form-contextual-link/FormContextualLink.d.ts +0 -45
  128. package/dist/esm/integrations/tanstack-router/components/form-contextual-link/FormContextualLink.js +0 -7
  129. 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 { useUnityTheme as o, uyTv as s } from "@payfit/unity-themes";
8
- import { jsx as c, jsxs as l } from "react/jsx-runtime";
9
- import { useIntl as u } from "react-intl";
10
- import { getLocalTimeZone as d, isToday as f, today as p } from "@internationalized/date";
11
- import { Calendar as m, CalendarCell as h, CalendarGrid as g, CalendarGridBody as _, CalendarGridHeader as v, CalendarHeaderCell as y, Heading as b } from "react-aria-components/Calendar";
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 x = s({
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
- "uy:theme-legacy:data-[selected]:text-content-inverted",
20
- "uy:theme-legacy:data-[today]:data-[selected]:after:bg-content-inverted",
21
- "uy:theme-rebrand:data-[selected]:text-content-form-active",
22
- "uy:theme-rebrand:data-[today]:data-[selected]:after:bg-border-form-active"
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 S({ value: t, defaultValue: s, minValue: S, maxValue: C, onChange: w, onFocusChange: T, ...E }) {
28
- let D = u(), { theme: O } = o(), k = p(d()), A = n(), j = r({
29
- startYear: S?.year,
30
- endYear: C?.year
31
- }), [M, N] = a(t ?? s ?? null), [P, F] = a(() => {
32
- let e = t ?? s ?? k;
33
- return S && e.compare(S) < 0 ? S : C && e.compare(C) > 0 ? C : e;
34
- }), I = (e) => {
35
- F((t) => t.set({ month: parseInt(e, 10) }));
36
- }, L = (e) => {
37
- F((t) => t.set({ year: parseInt(e, 10) }));
38
- }, { base: R, calendarWrapper: z, dialogHeader: B, dialogHeaderGroup: V, calendarGrid: H, calendarHeaderCell: U, calendarCell: W } = x({
39
- isDisabled: E.isDisabled,
40
- isInteractive: !E.isDisabled && !E.isReadOnly
41
- }), G = O === "rebrand" ? "outlined" : "ghost", K = O === "rebrand" ? "primary" : "neutral";
42
- return /* @__PURE__ */ c("div", {
43
- className: R(),
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__ */ c(m, {
46
- ...E,
47
- minValue: S,
48
- maxValue: C,
49
- value: M,
50
- defaultValue: s,
45
+ children: /* @__PURE__ */ s(p, {
46
+ ...T,
47
+ minValue: x,
48
+ maxValue: S,
49
+ value: A,
50
+ defaultValue: o,
51
51
  onChange: (e) => {
52
- N(e), w?.(e);
52
+ j(e), C?.(e);
53
53
  },
54
- focusedValue: P,
54
+ focusedValue: M,
55
55
  onFocusChange: (e) => {
56
- F(e), T?.(e);
56
+ N(e), w?.(e);
57
57
  },
58
- children: /* @__PURE__ */ l("div", {
59
- className: z(),
60
- children: [/* @__PURE__ */ l("header", {
61
- className: B(),
58
+ children: /* @__PURE__ */ c("div", {
59
+ className: L(),
60
+ children: [/* @__PURE__ */ c("header", {
61
+ className: R(),
62
62
  children: [
63
- /* @__PURE__ */ c(b, { className: "uy:sr-only" }),
64
- /* @__PURE__ */ l("div", {
65
- className: V({ className: "uy:pl-100 uy:gap-200" }),
66
- children: [/* @__PURE__ */ c(i, {
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: A,
69
- value: P.month.toString(),
70
- onChange: I,
71
- isDisabled: E.isDisabled
72
- }), /* @__PURE__ */ c(i, {
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: j,
75
- value: P.year.toString(),
76
- onChange: L,
77
- isDisabled: E.isDisabled
74
+ items: k,
75
+ value: M.year.toString(),
76
+ onChange: F,
77
+ isDisabled: T.isDisabled
78
78
  })]
79
79
  }),
80
- /* @__PURE__ */ l("div", {
81
- className: V({ className: "uy:ml-auto uy:gap-100" }),
82
- children: [/* @__PURE__ */ c(e, {
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: K,
86
- label: D.formatMessage({
85
+ color: W,
86
+ label: E.formatMessage({
87
87
  id: "unity:component:common:previous",
88
88
  defaultMessage: "Previous"
89
89
  }),
90
- variant: G,
91
- isDisabled: E.isDisabled
92
- }), /* @__PURE__ */ c(e, {
90
+ variant: U,
91
+ isDisabled: T.isDisabled
92
+ }), /* @__PURE__ */ s(e, {
93
93
  slot: "next",
94
94
  icon: "CaretRightOutlined",
95
- color: K,
96
- label: D.formatMessage({
95
+ color: W,
96
+ label: E.formatMessage({
97
97
  id: "unity:component:common:next",
98
98
  defaultMessage: "Next"
99
99
  }),
100
- variant: G,
101
- isDisabled: E.isDisabled
100
+ variant: U,
101
+ isDisabled: T.isDisabled
102
102
  })]
103
103
  })
104
104
  ]
105
- }), /* @__PURE__ */ l(g, {
106
- className: H(),
105
+ }), /* @__PURE__ */ c(h, {
106
+ className: B(),
107
107
  weekdayStyle: "short",
108
- children: [/* @__PURE__ */ c(v, { children: (e) => /* @__PURE__ */ c(y, {
109
- className: U(),
108
+ children: [/* @__PURE__ */ s(_, { children: (e) => /* @__PURE__ */ s(v, {
109
+ className: V(),
110
110
  children: e
111
- }) }), /* @__PURE__ */ c(_, { children: (e) => /* @__PURE__ */ c(h, {
111
+ }) }), /* @__PURE__ */ s(g, { children: (e) => /* @__PURE__ */ s(m, {
112
112
  date: e,
113
- "data-today": f(e, d()) ? !0 : void 0,
114
- className: W()
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
- S.displayName = "DateCalendar";
121
+ x.displayName = "DateCalendar";
122
122
  //#endregion
123
- export { S as DateCalendar };
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
- "uy:theme-legacy:data-[today]:after:bg-surface-primary-active",
16
- "uy:theme-rebrand:data-[today]:after:bg-border-form-active"
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:theme-rebrand:active:text-content-form-active",
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:theme-legacy:focus:text-content-inverted",
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:theme-legacy:text-content-neutral-lowest", "uy:theme-rebrand:text-content-neutral-lowest-enabled"],
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 { useUnityTheme as o, uyTv as s } from "@payfit/unity-themes";
8
- import { jsx as c, jsxs as l } from "react/jsx-runtime";
9
- import { useIntl as u } from "react-intl";
10
- import { Heading as d } from "react-aria-components/Heading";
11
- import { getLocalTimeZone as f, isToday as p, today as m } from "@internationalized/date";
12
- import { CalendarCell as h, CalendarGrid as g, CalendarGridBody as _, CalendarGridHeader as v, CalendarHeaderCell as y, RangeCalendar as b } from "react-aria-components/RangeCalendar";
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 x = s({
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 uy:theme-legacy:[&_td:has(>[data-selection-start]:not([data-selection-end]))]:before:bg-surface-primary-lowest",
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
- "uy:theme-legacy:[&_td:has(>[data-selected])]:bg-surface-primary-lowest",
24
- "uy:theme-rebrand:[&_td:has(>[data-selected])]:bg-surface-form-selected",
25
- "uy:theme-rebrand:[&_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:theme-legacy:[&_td:has(>[data-selection-end]:not([data-selection-start]))]:before:bg-surface-primary-lowest uy:theme-rebrand:[&_td:has(>[data-selection-end]:not([data-selection-start]))]:before:bg-surface-form-selected"
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
- "uy:theme-legacy:data-[selection-start]:text-content-inverted",
35
- "uy:theme-legacy:data-[selection-end]:text-content-inverted",
36
- "uy:theme-legacy:data-[today]:data-[selection-start]:after:bg-content-inverted",
37
- "uy:theme-legacy:data-[today]:data-[selection-end]:after:bg-content-inverted",
38
- "uy:theme-rebrand:data-[selection-start]:text-content-form-active",
39
- "uy:theme-rebrand:data-[selection-end]:text-content-form-active",
40
- "uy:theme-rebrand:data-[today]:data-[selection-start]:after:bg-border-form-active",
41
- "uy:theme-rebrand:data-[today]:data-[selection-end]:after:bg-border-form-active"
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
- "uy:theme-legacy:data-[selected]:not-data-[selection-start]:not-data-[selection-end]:hover:bg-surface-primary-lowest-hover",
52
- "uy:theme-rebrand:data-[selected]:not-data-[selection-start]:not-data-[selection-end]:hover:bg-surface-neutral-hover"
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 S({ value: t, defaultValue: s, minValue: S, maxValue: C, onChange: w, onFocusChange: T, ...E }) {
57
- let D = u(), { theme: O } = o(), k = m(f()), A = n(), j = r({
58
- startYear: S?.year,
59
- endYear: C?.year
60
- }), [M, N] = a(() => {
61
- let e = t?.start ?? s?.start ?? k;
62
- return S && e.compare(S) < 0 ? S : C && e.compare(C) > 0 ? C : e;
63
- }), P = (e) => {
64
- N((t) => t.set({ month: parseInt(e, 10) }));
65
- }, F = (e) => {
66
- N((t) => t.set({ year: parseInt(e, 10) }));
67
- }, { base: I, calendarWrapper: L, dialogHeader: R, dialogHeaderGroup: z, calendarGrid: B, calendarHeaderCell: V, calendarCell: H } = x({
68
- isDisabled: E.isDisabled,
69
- isInteractive: !E.isDisabled && !E.isReadOnly
70
- }), U = O === "rebrand" ? "outlined" : "ghost", W = O === "rebrand" ? "primary" : "neutral";
71
- return /* @__PURE__ */ c("div", {
72
- className: I(),
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__ */ c(b, {
75
- ...E,
76
- minValue: S,
77
- maxValue: C,
74
+ children: /* @__PURE__ */ s(y, {
75
+ ...T,
76
+ minValue: x,
77
+ maxValue: S,
78
78
  value: t,
79
- defaultValue: s,
80
- onChange: w,
81
- focusedValue: M,
79
+ defaultValue: o,
80
+ onChange: C,
81
+ focusedValue: A,
82
82
  onFocusChange: (e) => {
83
- N(e), T?.(e);
83
+ j(e), w?.(e);
84
84
  },
85
- children: /* @__PURE__ */ l("div", {
86
- className: L(),
87
- children: [/* @__PURE__ */ l("header", {
88
- className: R(),
85
+ children: /* @__PURE__ */ c("div", {
86
+ className: F(),
87
+ children: [/* @__PURE__ */ c("header", {
88
+ className: I(),
89
89
  children: [
90
- /* @__PURE__ */ c(d, { className: "uy:sr-only" }),
91
- /* @__PURE__ */ l("div", {
92
- className: z({ className: "uy:pl-100 uy:gap-200" }),
93
- children: [/* @__PURE__ */ c(i, {
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: A,
96
- value: M.month.toString(),
97
- onChange: P,
98
- isDisabled: E.isDisabled
99
- }), /* @__PURE__ */ c(i, {
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: j,
102
- value: M.year.toString(),
103
- onChange: F,
104
- isDisabled: E.isDisabled
101
+ items: k,
102
+ value: A.year.toString(),
103
+ onChange: N,
104
+ isDisabled: T.isDisabled
105
105
  })]
106
106
  }),
107
- /* @__PURE__ */ l("div", {
108
- className: z({ className: "uy:ml-auto uy:gap-100" }),
109
- children: [/* @__PURE__ */ c(e, {
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: W,
113
- label: D.formatMessage({
112
+ color: H,
113
+ label: E.formatMessage({
114
114
  id: "unity:component:common:previous",
115
115
  defaultMessage: "Previous"
116
116
  }),
117
- variant: U,
118
- isDisabled: E.isDisabled
119
- }), /* @__PURE__ */ c(e, {
117
+ variant: V,
118
+ isDisabled: T.isDisabled
119
+ }), /* @__PURE__ */ s(e, {
120
120
  slot: "next",
121
121
  icon: "CaretRightOutlined",
122
- color: W,
123
- label: D.formatMessage({
122
+ color: H,
123
+ label: E.formatMessage({
124
124
  id: "unity:component:common:next",
125
125
  defaultMessage: "Next"
126
126
  }),
127
- variant: U,
128
- isDisabled: E.isDisabled
127
+ variant: V,
128
+ isDisabled: T.isDisabled
129
129
  })]
130
130
  })
131
131
  ]
132
- }), /* @__PURE__ */ l(g, {
133
- className: B(),
132
+ }), /* @__PURE__ */ c(h, {
133
+ className: R(),
134
134
  weekdayStyle: "short",
135
- children: [/* @__PURE__ */ c(v, { children: (e) => /* @__PURE__ */ c(y, {
136
- className: V(),
135
+ children: [/* @__PURE__ */ s(_, { children: (e) => /* @__PURE__ */ s(v, {
136
+ className: z(),
137
137
  children: e
138
- }) }), /* @__PURE__ */ c(_, { children: (e) => /* @__PURE__ */ c(h, {
138
+ }) }), /* @__PURE__ */ s(g, { children: (e) => /* @__PURE__ */ s(m, {
139
139
  date: e,
140
- "data-today": p(e, f()) ? !0 : void 0,
141
- className: H()
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
- S.displayName = "DateRangeCalendar";
148
+ x.displayName = "DateRangeCalendar";
149
149
  //#endregion
150
- export { S as DateRangeCalendar };
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:theme-legacy:text-content-neutral-lowest-enabled", "uy:theme-rebrand:text-content-neutral-lowest"]
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 { useUnityTheme as t, uyTv as n } from "@payfit/unity-themes";
3
- import { jsx as r, jsxs as i } from "react/jsx-runtime";
4
- import { FormattedMessage as a } from "react-intl";
5
- import { Separator as o } from "react-aria-components/Separator";
6
- import { Popover as s } from "react-aria-components/Popover";
7
- import { Dialog as c } from "react-aria-components/Dialog";
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 l = n({ slots: {
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 u({ children: n, onConfirm: u, onClear: d }) {
30
- let { popover: f, dialog: p, content: m, footer: h, separator: g, actions: _ } = l(), v = t();
31
- return /* @__PURE__ */ r(s, {
32
- className: f(),
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__ */ i(c, {
35
- className: p(),
36
- children: [/* @__PURE__ */ r("div", {
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
- }), /* @__PURE__ */ i("footer", {
40
- className: h(),
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: d,
49
- children: /* @__PURE__ */ r(a, {
48
+ onPress: u,
49
+ children: /* @__PURE__ */ n(i, {
50
50
  id: "unity:component:common:clear:title",
51
51
  defaultMessage: "Clear"
52
52
  })
53
- }), /* @__PURE__ */ r(e, {
54
- variant: v.theme === "legacy" ? "ghost" : "primary",
53
+ }), /* @__PURE__ */ n(e, {
54
+ variant: "primary",
55
55
  color: "primary",
56
56
  size: "full",
57
- onPress: u,
58
- children: /* @__PURE__ */ r(a, {
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 { u as FilterPopover, l as filterPopover };
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<HTMLAnchorElement | HTMLButtonElement>>;
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 { useUnityTheme as r } from "@payfit/unity-themes";
5
- import { jsx as i } from "react/jsx-runtime";
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 o = n((n, o) => {
9
- let { children: s, href: c, onPress: l, ...u } = n, d = t(), { theme: f } = r(), p = f === "rebrand" ? "primary" : "secondary";
10
- return c ? /* @__PURE__ */ i(e, {
11
- id: d.contextualLinkId || n.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: p,
12
+ color: "primary",
14
13
  variant: "standalone",
15
14
  "data-unity-slot": "form-field-contextual-link",
16
- href: c,
17
- ref: o,
15
+ href: s,
16
+ ref: a,
18
17
  "data-dd-privacy": "allow",
19
- ...u,
20
- children: s
21
- }) : /* @__PURE__ */ i(a, {
22
- id: d.contextualLinkId || n.id,
23
- onPress: l,
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: o,
25
+ ref: a,
27
26
  "data-dd-privacy": "allow",
28
- ...u,
29
- children: s
27
+ ...l,
28
+ children: o
30
29
  });
31
30
  });
32
- o.displayName = "TanstackRawFormContextualLink";
31
+ a.displayName = "TanstackRawFormContextualLink";
33
32
  //#endregion
34
- export { o as TanstackRawFormContextualLink };
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" onBackButtonPress={handleBack} />}>
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>