@payfit/unity-components 2.21.1 → 2.21.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,12 +1,12 @@
1
- import { jsx as a, jsxs as r } from "react/jsx-runtime";
2
- import { useState as m } from "react";
3
- import { today as I, getLocalTimeZone as f, isToday as T } from "@internationalized/date";
1
+ import { jsx as a, jsxs as s } from "react/jsx-runtime";
2
+ import { useState as c } from "react";
3
+ import { today as I, getLocalTimeZone as m, isToday as T } from "@internationalized/date";
4
4
  import { uyTv as k } from "@payfit/unity-themes";
5
5
  import { Calendar as B, Heading as F, CalendarGrid as M, CalendarGridHeader as O, CalendarHeaderCell as W, CalendarGridBody as P, CalendarCell as R } from "react-aria-components";
6
- import { IconButton as b } from "../icon-button/IconButton.js";
6
+ import { IconButton as f } from "../icon-button/IconButton.js";
7
7
  import { useMonthsList as Z } from "./hooks/useMonthsList.js";
8
8
  import { useYearsList as $ } from "./hooks/useYearsList.js";
9
- import { DateSegmentSelect as h } from "./parts/DateSegmentSelect.js";
9
+ import { DateSegmentSelect as b } from "./parts/DateSegmentSelect.js";
10
10
  const q = k({
11
11
  slots: {
12
12
  base: "",
@@ -40,34 +40,33 @@ const q = k({
40
40
  }
41
41
  });
42
42
  function z({
43
- value: n,
44
- defaultValue: d,
45
- minValue: i,
46
- maxValue: u,
47
- onChange: p,
48
- onFocusChange: g,
43
+ value: u,
44
+ defaultValue: o,
45
+ minValue: r,
46
+ maxValue: d,
47
+ onChange: h,
48
+ onFocusChange: p,
49
49
  ...t
50
50
  }) {
51
- const y = I(f()), [v, C] = m(
52
- n ?? d ?? y
53
- ), [l, s] = m(
54
- n ?? d ?? y
55
- ), x = Z(), D = $({
56
- startYear: i?.year,
57
- endYear: u?.year
51
+ const g = I(m()), v = Z(), C = $({
52
+ startYear: r?.year,
53
+ endYear: d?.year
54
+ }), [x, D] = c(u ?? o ?? null), [l, n] = c(() => {
55
+ const e = u ?? o ?? g;
56
+ return r && e.compare(r) < 0 ? r : d && e.compare(d) > 0 ? d : e;
58
57
  }), N = (e) => {
59
- s(
60
- (o) => o.set({ month: parseInt(e, 10) })
58
+ n(
59
+ (i) => i.set({ month: parseInt(e, 10) })
61
60
  );
62
61
  }, H = (e) => {
63
- s(
64
- (o) => o.set({ year: parseInt(e, 10) })
62
+ n(
63
+ (i) => i.set({ year: parseInt(e, 10) })
65
64
  );
66
65
  }, {
67
66
  base: w,
68
67
  calendarWrapper: G,
69
68
  dialogHeader: L,
70
- dialogHeaderGroup: c,
69
+ dialogHeaderGroup: y,
71
70
  calendarGrid: S,
72
71
  calendarHeaderCell: Y,
73
72
  calendarCell: j
@@ -76,42 +75,42 @@ function z({
76
75
  B,
77
76
  {
78
77
  ...t,
79
- minValue: i,
80
- maxValue: u,
81
- value: v,
82
- defaultValue: d,
78
+ minValue: r,
79
+ maxValue: d,
80
+ value: x,
81
+ defaultValue: o,
83
82
  onChange: (e) => {
84
- C(e), p?.(e);
83
+ D(e), h?.(e);
85
84
  },
86
85
  focusedValue: l,
87
86
  onFocusChange: (e) => {
88
- s(e), g?.(e);
87
+ n(e), p?.(e);
89
88
  },
90
- children: /* @__PURE__ */ r("div", { className: G(), children: [
91
- /* @__PURE__ */ r("header", { className: L(), children: [
89
+ children: /* @__PURE__ */ s("div", { className: G(), children: [
90
+ /* @__PURE__ */ s("header", { className: L(), children: [
92
91
  /* @__PURE__ */ a(F, { className: "uy:sr-only" }),
93
- /* @__PURE__ */ r(
92
+ /* @__PURE__ */ s(
94
93
  "div",
95
94
  {
96
- className: c({
95
+ className: y({
97
96
  className: "uy:pl-100 uy:gap-200"
98
97
  }),
99
98
  children: [
100
99
  /* @__PURE__ */ a(
101
- h,
100
+ b,
102
101
  {
103
102
  type: "month",
104
- items: x,
103
+ items: v,
105
104
  value: l.month.toString(),
106
105
  onChange: N,
107
106
  isDisabled: t.isDisabled
108
107
  }
109
108
  ),
110
109
  /* @__PURE__ */ a(
111
- h,
110
+ b,
112
111
  {
113
112
  type: "year",
114
- items: D,
113
+ items: C,
115
114
  value: l.year.toString(),
116
115
  onChange: H,
117
116
  isDisabled: t.isDisabled
@@ -120,15 +119,15 @@ function z({
120
119
  ]
121
120
  }
122
121
  ),
123
- /* @__PURE__ */ r(
122
+ /* @__PURE__ */ s(
124
123
  "div",
125
124
  {
126
- className: c({
125
+ className: y({
127
126
  className: "uy:ml-auto uy:gap-100"
128
127
  }),
129
128
  children: [
130
129
  /* @__PURE__ */ a(
131
- b,
130
+ f,
132
131
  {
133
132
  slot: "previous",
134
133
  icon: "CaretLeftOutlined",
@@ -139,7 +138,7 @@ function z({
139
138
  }
140
139
  ),
141
140
  /* @__PURE__ */ a(
142
- b,
141
+ f,
143
142
  {
144
143
  slot: "next",
145
144
  icon: "CaretRightOutlined",
@@ -153,13 +152,13 @@ function z({
153
152
  }
154
153
  )
155
154
  ] }),
156
- /* @__PURE__ */ r(M, { className: S(), weekdayStyle: "short", children: [
155
+ /* @__PURE__ */ s(M, { className: S(), weekdayStyle: "short", children: [
157
156
  /* @__PURE__ */ a(O, { children: (e) => /* @__PURE__ */ a(W, { className: Y(), children: e }) }),
158
157
  /* @__PURE__ */ a(P, { children: (e) => /* @__PURE__ */ a(
159
158
  R,
160
159
  {
161
160
  date: e,
162
- "data-today": T(e, f()) ? !0 : void 0,
161
+ "data-today": T(e, m()) ? !0 : void 0,
163
162
  className: j()
164
163
  }
165
164
  ) })
@@ -1,22 +1,21 @@
1
- import { jsx as o } from "react/jsx-runtime";
1
+ import { jsx as a } from "react/jsx-runtime";
2
2
  import { forwardRef as l } from "react";
3
3
  import { Text as m } from "../../text/Text.js";
4
4
  import { useFieldA11yContext as n } from "../TanstackFormField.context.js";
5
- const d = l(({ children: t, ...e }, a) => {
6
- const r = n();
7
- return /* @__PURE__ */ o(
5
+ const d = l(({ children: e, ...t }, r) => {
6
+ const o = n();
7
+ return /* @__PURE__ */ a(
8
8
  m,
9
9
  {
10
10
  "data-dd-privacy": "allow",
11
- ...e,
12
- id: r.helperTextId || e.id,
11
+ ...t,
12
+ id: o.helperTextId || t.id,
13
13
  "data-unity-slot": "form-field-helper-text",
14
14
  variant: "bodySmall",
15
15
  asElement: "span",
16
16
  color: "content.neutral.low",
17
- className: "uy:leading-[1]!",
18
- ref: a,
19
- children: t
17
+ ref: r,
18
+ children: e
20
19
  }
21
20
  );
22
21
  });
@@ -1,6 +1,6 @@
1
1
  import { VariantProps } from '@payfit/unity-themes';
2
2
  import { PropsWithChildren } from 'react';
3
- export declare const funnelPageContent: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, "uy:flex-1 uy:px-300 uy:my-400 uy:md:px-600 uy:group-has-[[data-unity-component=\"FunnelPageHeader\"]]/funnelpage:mt-0", {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, "uy:flex-1 uy:px-300 uy:my-400 uy:md:px-600 uy:group-has-[[data-unity-component=\"FunnelPageHeader\"]]/funnelpage:mt-0", unknown, unknown, undefined>>;
3
+ export declare const funnelPageContent: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, "uy:flex-1 uy:px-300 uy:my-400 uy:md:px-400 uy:group-has-[[data-unity-component=\"FunnelPageHeader\"]]/funnelpage:mt-0", {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, "uy:flex-1 uy:px-300 uy:my-400 uy:md:px-400 uy:group-has-[[data-unity-component=\"FunnelPageHeader\"]]/funnelpage:mt-0", unknown, unknown, undefined>>;
4
4
  export type FunnelPageContentProps = PropsWithChildren<VariantProps<typeof funnelPageContent>>;
5
5
  /**
6
6
  * The `FunnelPageContent` component provides the main content area of a funnel page.
@@ -29,7 +29,7 @@ export type FunnelPageContentProps = PropsWithChildren<VariantProps<typeof funne
29
29
  * @see Design docs in {@link https://www.payfit.design/24f360409/p/88f9fc-funnel/b/24ca6f Payfit.design}
30
30
  * @see Developer docs in {@link https://unity-components.payfit.io/?path=/docs/layout-funnellayout-funnelpage-funnelpagecontent--docs unity-components.payfit.io}
31
31
  */
32
- declare const FunnelPageContent: import('react').ForwardRefExoticComponent<VariantProps<import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, "uy:flex-1 uy:px-300 uy:my-400 uy:md:px-600 uy:group-has-[[data-unity-component=\"FunnelPageHeader\"]]/funnelpage:mt-0", {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, "uy:flex-1 uy:px-300 uy:my-400 uy:md:px-600 uy:group-has-[[data-unity-component=\"FunnelPageHeader\"]]/funnelpage:mt-0", unknown, unknown, undefined>>> & {
32
+ declare const FunnelPageContent: import('react').ForwardRefExoticComponent<VariantProps<import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, "uy:flex-1 uy:px-300 uy:my-400 uy:md:px-400 uy:group-has-[[data-unity-component=\"FunnelPageHeader\"]]/funnelpage:mt-0", {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, "uy:flex-1 uy:px-300 uy:my-400 uy:md:px-400 uy:group-has-[[data-unity-component=\"FunnelPageHeader\"]]/funnelpage:mt-0", unknown, unknown, undefined>>> & {
33
33
  children?: import('react').ReactNode | undefined;
34
34
  } & import('react').RefAttributes<HTMLElement>>;
35
35
  export { FunnelPageContent };
@@ -2,7 +2,7 @@ import { jsx as a } from "react/jsx-runtime";
2
2
  import { forwardRef as o } from "react";
3
3
  import { uyTv as u } from "@payfit/unity-themes";
4
4
  const m = u({
5
- base: 'uy:flex-1 uy:px-300 uy:my-400 uy:md:px-600 uy:group-has-[[data-unity-component="FunnelPageHeader"]]/funnelpage:mt-0'
5
+ base: 'uy:flex-1 uy:px-300 uy:my-400 uy:md:px-400 uy:group-has-[[data-unity-component="FunnelPageHeader"]]/funnelpage:mt-0'
6
6
  }), r = o(
7
7
  ({ children: n, ...e }, t) => /* @__PURE__ */ a(
8
8
  "section",
@@ -1,6 +1,6 @@
1
1
  import { VariantProps } from '@payfit/unity-themes';
2
2
  import { PropsWithChildren } from 'react';
3
- export declare const funnelPageFooter: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, "uy:px-300 uy:md:px-600", {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, "uy:px-300 uy:md:px-600", unknown, unknown, undefined>>;
3
+ export declare const funnelPageFooter: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, "uy:px-300 uy:md:px-400", {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, "uy:px-300 uy:md:px-400", unknown, unknown, undefined>>;
4
4
  export type FunnelPageFooterProps = PropsWithChildren<VariantProps<typeof funnelPageFooter>>;
5
5
  /**
6
6
  * The `FunnelPageFooter` component provides the footer section of a funnel page.
@@ -30,7 +30,7 @@ export type FunnelPageFooterProps = PropsWithChildren<VariantProps<typeof funnel
30
30
  * @see Design docs in {@link https://www.payfit.design/24f360409/p/88f9fc-funnel/b/24ca6f Payfit.design}
31
31
  * @see Developer docs in {@link https://unity-components.payfit.io/?path=/docs/layout-funnellayout-funnelpage-funnelpagefooter--docs unity-components.payfit.io}
32
32
  */
33
- declare const FunnelPageFooter: import('react').ForwardRefExoticComponent<VariantProps<import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, "uy:px-300 uy:md:px-600", {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, "uy:px-300 uy:md:px-600", unknown, unknown, undefined>>> & {
33
+ declare const FunnelPageFooter: import('react').ForwardRefExoticComponent<VariantProps<import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, "uy:px-300 uy:md:px-400", {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, "uy:px-300 uy:md:px-400", unknown, unknown, undefined>>> & {
34
34
  children?: import('react').ReactNode | undefined;
35
35
  } & import('react').RefAttributes<HTMLElement>>;
36
36
  export { FunnelPageFooter };
@@ -3,7 +3,7 @@ import { forwardRef as n } from "react";
3
3
  import { uyTv as m } from "@payfit/unity-themes";
4
4
  import { useFunnelLayoutContext as u } from "../FunnelLayout.context.js";
5
5
  const d = m({
6
- base: "uy:px-300 uy:md:px-600"
6
+ base: "uy:px-300 uy:md:px-400"
7
7
  }), s = n(
8
8
  ({ children: o, ...e }, t) => {
9
9
  const { ids: r } = u();
@@ -5,7 +5,7 @@ import { Text as n } from "../../text/Text.js";
5
5
  import { useFunnelLayoutContext as x } from "../FunnelLayout.context.js";
6
6
  const b = h({
7
7
  slots: {
8
- base: "uy:flex uy:flex-col uy:justify-between uy:p-300 uy:md:p-600 uy:md:flex-row uy:md:items-center uy:md:rounded-t-300",
8
+ base: "uy:flex uy:flex-col uy:justify-between uy:p-300 uy:md:py-600 uy:md:px-400 uy:md:flex-row uy:md:items-center uy:md:rounded-t-300",
9
9
  hgroup: "uy:space-y-100",
10
10
  figure: "uy:hidden uy:lg:block uy:lg:h-full uy:lg:max-h-[160px] uy:lg:ml-800 uy:lg:mr-150 uy:shrink-0",
11
11
  figcaption: "uy:sr-only"
@@ -9,7 +9,7 @@ const c = d({
9
9
  slots: {
10
10
  base: [
11
11
  "uy:relative uy:flex uy:flex-col uy:shadow-raising uy:bg-surface-neutral",
12
- "uy:md:border uy:md:border-solid uy:md:border-border-neutral uy:md:rounded-200 uy:md:p-400"
12
+ "uy:md:border uy:md:border-solid uy:md:border-border-neutral uy:md:rounded-200 uy:md:p-300"
13
13
  ]
14
14
  }
15
15
  }), b = u(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payfit/unity-components",
3
- "version": "2.21.1",
3
+ "version": "2.21.3",
4
4
  "module": "./dist/esm/index.js",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -42,7 +42,7 @@
42
42
  "@hookform/devtools": "4.4.0",
43
43
  "@hookform/resolvers": "5.2.1",
44
44
  "@internationalized/date": "3.12.0",
45
- "@payfit/unity-illustrations": "2.21.1",
45
+ "@payfit/unity-illustrations": "2.21.3",
46
46
  "@radix-ui/react-avatar": "1.1.11",
47
47
  "@radix-ui/react-slot": "1.2.4",
48
48
  "@react-aria/interactions": "3.27.1",
@@ -74,8 +74,8 @@
74
74
  },
75
75
  "peerDependencies": {
76
76
  "@hookform/devtools": "^4",
77
- "@payfit/unity-icons": "2.21.1",
78
- "@payfit/unity-themes": "2.21.1",
77
+ "@payfit/unity-icons": "2.21.3",
78
+ "@payfit/unity-themes": "2.21.3",
79
79
  "@storybook/react-vite": "^10.3.2",
80
80
  "@tanstack/react-query": "^5",
81
81
  "@tanstack/react-router": "^1.131",
@@ -95,9 +95,9 @@
95
95
  "@payfit/hr-apps-tsconfigs": "0.0.0-use.local",
96
96
  "@payfit/storybook-addon-console-errors": "0.0.0-use.local",
97
97
  "@payfit/storybook-config": "0.0.0-use.local",
98
- "@payfit/unity-icons": "2.21.1",
99
- "@payfit/unity-illustrations": "2.21.1",
100
- "@payfit/unity-themes": "2.21.1",
98
+ "@payfit/unity-icons": "2.21.3",
99
+ "@payfit/unity-illustrations": "2.21.3",
100
+ "@payfit/unity-themes": "2.21.3",
101
101
  "@payfit/vite-configs": "0.0.0-use.local",
102
102
  "@storybook/addon-a11y": "10.3.2",
103
103
  "@storybook/addon-designs": "11.1.2",