@payfit/unity-components 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/dist/esm/adapters/standardSchemaAdapter.d.ts +7 -0
  2. package/dist/esm/adapters/standardSchemaAdapter.js +20 -0
  3. package/dist/esm/adapters/zodAdapter.d.ts +13 -0
  4. package/dist/esm/adapters/zodAdapter.js +74 -0
  5. package/dist/esm/components/action-bar/ActionBar.js +62 -64
  6. package/dist/esm/components/actionable/Actionable.d.ts +50 -3
  7. package/dist/esm/components/actionable/Actionable.js +49 -39
  8. package/dist/esm/components/app-menu/parts/AppMenuFooter.js +63 -63
  9. package/dist/esm/components/autocomplete/parts/AutocompleteClearButton.js +5 -5
  10. package/dist/esm/components/bottom-sheet/parts/BottomSheetDragIndicator.js +30 -31
  11. package/dist/esm/components/checkbox-field/CheckboxField.d.ts +2 -2
  12. package/dist/esm/components/checkbox-field/CheckboxField.js +18 -17
  13. package/dist/esm/components/checkbox-group-field/CheckboxGroupField.d.ts +2 -2
  14. package/dist/esm/components/checkbox-group-field/CheckboxGroupField.js +4 -1
  15. package/dist/esm/components/code/Code.d.ts +37 -0
  16. package/dist/esm/components/code/Code.js +39 -0
  17. package/dist/esm/components/code/copyToClipboard.d.ts +1 -0
  18. package/dist/esm/components/code/copyToClipboard.js +10 -0
  19. package/dist/esm/components/collapsible/Collapsible.d.ts +1 -1
  20. package/dist/esm/components/collapsible/Collapsible.js +14 -13
  21. package/dist/esm/components/collapsible/parts/CollapsibleTitle.js +7 -7
  22. package/dist/esm/components/data-table/DataTable.d.ts +76 -10
  23. package/dist/esm/components/data-table/DataTable.js +81 -78
  24. package/dist/esm/components/data-table/parts/ColumnSortHeader.js +13 -13
  25. package/dist/esm/components/data-table/parts/DataTableBulkActions.js +20 -20
  26. package/dist/esm/components/date-calendar/DateCalendar.js +52 -52
  27. package/dist/esm/components/date-calendar/parts/DateSegmentSelect.js +30 -33
  28. package/dist/esm/components/date-picker/DatePicker.js +64 -64
  29. package/dist/esm/components/date-picker/parts/DateInput.js +33 -33
  30. package/dist/esm/components/date-picker-field/DatePickerField.d.ts +2 -2
  31. package/dist/esm/components/dialog/parts/DialogActions/DialogButton.js +12 -12
  32. package/dist/esm/components/error-state/ErrorState.d.ts +196 -0
  33. package/dist/esm/components/error-state/ErrorState.js +153 -0
  34. package/dist/esm/components/error-state/initConfig.d.ts +16 -0
  35. package/dist/esm/components/error-state/initConfig.js +149 -0
  36. package/dist/esm/components/error-state/parts/Collapsible.d.ts +59 -0
  37. package/dist/esm/components/error-state/parts/Collapsible.js +67 -0
  38. package/dist/esm/components/form/Form.d.ts +15 -9
  39. package/dist/esm/components/form/Form.js +53 -50
  40. package/dist/esm/components/form-field/FormField.js +24 -23
  41. package/dist/esm/components/form-field/utils/isFieldRequired.d.ts +4 -4
  42. package/dist/esm/components/form-field/utils/isFieldRequired.js +5 -20
  43. package/dist/esm/components/funnel-layout/FunnelLayout.d.ts +1 -1
  44. package/dist/esm/components/funnel-layout/FunnelLayout.js +61 -110
  45. package/dist/esm/components/funnel-layout/parts/FunnelPage.js +8 -9
  46. package/dist/esm/components/funnel-layout/parts/FunnelPageActions.js +24 -24
  47. package/dist/esm/components/funnel-layout/parts/FunnelPageFooter.js +6 -7
  48. package/dist/esm/components/funnel-layout/parts/FunnelPageHeader.d.ts +2 -2
  49. package/dist/esm/components/funnel-layout/parts/FunnelSidebar.d.ts +2 -2
  50. package/dist/esm/components/funnel-layout/parts/FunnelSidebar.js +9 -10
  51. package/dist/esm/components/funnel-layout/parts/FunnelTopBar.js +0 -1
  52. package/dist/esm/components/input/Input.js +28 -28
  53. package/dist/esm/components/label/Label.js +19 -19
  54. package/dist/esm/components/multi-select/MultiSelect.js +94 -94
  55. package/dist/esm/components/multi-select/hooks/use-multiselection-state.js +32 -32
  56. package/dist/esm/components/multi-select/parts/MultiSelectButton.js +38 -38
  57. package/dist/esm/components/multi-select/parts/MultiSelectPopover.js +16 -16
  58. package/dist/esm/components/multi-select-field/MultiSelectField.d.ts +2 -2
  59. package/dist/esm/components/multi-select-field/MultiSelectField.js +53 -53
  60. package/dist/esm/components/nav/parts/NavGroup.js +21 -21
  61. package/dist/esm/components/number-field/NumberField.d.ts +3 -3
  62. package/dist/esm/components/number-input/NumberInput.js +58 -58
  63. package/dist/esm/components/pagination/Pagination.js +97 -101
  64. package/dist/esm/components/pagination/parts/PaginationJumpDialog.js +39 -40
  65. package/dist/esm/components/popover/parts/PopoverHeader.js +8 -8
  66. package/dist/esm/components/radio-button-group/parts/RadioButton.js +11 -11
  67. package/dist/esm/components/select-field/SelectField.d.ts +2 -2
  68. package/dist/esm/components/select-field/SelectField.js +4 -1
  69. package/dist/esm/components/selectable-button-group/SelectableButtonGroup.js +22 -23
  70. package/dist/esm/components/selectable-button-group-field/SelectableButtonGroupField.d.ts +2 -2
  71. package/dist/esm/components/side-panel/parts/SidePanelDragIndicator.js +30 -31
  72. package/dist/esm/components/skip-links/SkipLinks.js +50 -43
  73. package/dist/esm/components/table/Table.js +79 -76
  74. package/dist/esm/components/table/parts/TableBody.js +6 -6
  75. package/dist/esm/components/table/parts/TableCell.js +25 -25
  76. package/dist/esm/components/table/parts/TableColumnHeader.js +38 -38
  77. package/dist/esm/components/table/parts/TablePagination.js +61 -59
  78. package/dist/esm/components/table/parts/TableRow.js +16 -16
  79. package/dist/esm/components/tabs/parts/TabList.js +50 -54
  80. package/dist/esm/components/task-menu/parts/Content.js +24 -24
  81. package/dist/esm/components/task-menu/parts/Header.js +24 -24
  82. package/dist/esm/components/task-menu/parts/SubTask.js +74 -74
  83. package/dist/esm/components/task-menu/parts/Task.js +69 -69
  84. package/dist/esm/components/task-menu/parts/TaskGroup.js +45 -45
  85. package/dist/esm/components/text-area/TextArea.js +30 -31
  86. package/dist/esm/components/text-field/TextField.d.ts +2 -2
  87. package/dist/esm/components/toggle-switch-field/ToggleSwitchField.d.ts +2 -2
  88. package/dist/esm/components/toggle-switch-field/ToggleSwitchField.js +4 -1
  89. package/dist/esm/components/toggle-switch-group/ToggleSwitchGroup.js +74 -74
  90. package/dist/esm/components/toggle-switch-group-field/ToggleSwitchGroupField.d.ts +2 -2
  91. package/dist/esm/components/toggle-switch-group-field/ToggleSwitchGroupField.js +36 -32
  92. package/dist/esm/hooks/use-form.d.ts +5 -5
  93. package/dist/esm/hooks/use-form.types.d.ts +2 -2
  94. package/dist/esm/hooks/use-resizable.js +13 -14
  95. package/dist/esm/index.d.ts +1 -0
  96. package/dist/esm/index.js +22 -19
  97. package/dist/esm/types/schema.d.ts +8 -0
  98. package/dist/esm/utils/createSchemaAdapter.d.ts +7 -0
  99. package/dist/esm/utils/createSchemaAdapter.js +13 -0
  100. package/dist/esm/utils/platform.js +2 -3
  101. package/i18n/en-GB.json +16 -0
  102. package/i18n/es-ES.json +16 -0
  103. package/i18n/fr-FR.json +16 -0
  104. package/package.json +25 -19
@@ -1,32 +1,32 @@
1
- import { jsxs as l, Fragment as u, jsx as s } from "react/jsx-runtime";
2
- import { forwardRef as h } from "react";
3
- import { uyTv as p } from "@payfit/unity-themes";
4
- import { useBreakpointListener as t } from "../../../hooks/use-breakpoint-listener.js";
5
- const b = p({
1
+ import { jsxs as e, Fragment as l, jsx as c } from "react/jsx-runtime";
2
+ import { forwardRef as u } from "react";
3
+ import { uyTv as m } from "@payfit/unity-themes";
4
+ import { useBreakpointListener as y } from "../../../hooks/use-breakpoint-listener.js";
5
+ const d = m({
6
6
  base: "uy:flex uy:flex-col uy:gap-200 uy:md:flex-row uy:md:justify-between"
7
- }), w = h(
8
- ({ renderNext: y, renderPrevious: a, renderOptionalActions: m, ...g }, x) => {
9
- const f = t(), c = f === "xs" || f === "sm";
10
- return /* @__PURE__ */ l(
7
+ }), f = u(
8
+ ({ renderNext: a, renderPrevious: n, renderOptionalActions: o, ...t }, r) => {
9
+ const s = y(), i = s === "xs" || s === "sm";
10
+ return /* @__PURE__ */ e(
11
11
  "div",
12
12
  {
13
- ref: x,
13
+ ref: r,
14
14
  "data-dd-privacy": "allow",
15
- ...g,
16
- className: b(),
15
+ ...t,
16
+ className: d(),
17
17
  role: "group",
18
18
  "data-unity-component": "FunnelPageActions",
19
19
  children: [
20
- c && /* @__PURE__ */ l(u, { children: [
21
- y(),
22
- a == null ? void 0 : a(),
23
- m == null ? void 0 : m()
20
+ i && /* @__PURE__ */ e(l, { children: [
21
+ a(),
22
+ n?.(),
23
+ o?.()
24
24
  ] }),
25
- !c && /* @__PURE__ */ l(u, { children: [
26
- /* @__PURE__ */ s("div", { className: "uy:flex uy:gap-100", children: m == null ? void 0 : m() }),
27
- /* @__PURE__ */ l("div", { className: "uy:flex uy:gap-100", children: [
28
- a == null ? void 0 : a(),
29
- y()
25
+ !i && /* @__PURE__ */ e(l, { children: [
26
+ /* @__PURE__ */ c("div", { className: "uy:flex uy:gap-100", children: o?.() }),
27
+ /* @__PURE__ */ e("div", { className: "uy:flex uy:gap-100", children: [
28
+ n?.(),
29
+ a()
30
30
  ] })
31
31
  ] })
32
32
  ]
@@ -34,8 +34,8 @@ const b = p({
34
34
  );
35
35
  }
36
36
  );
37
- w.displayName = "FunnelPageActions";
37
+ f.displayName = "FunnelPageActions";
38
38
  export {
39
- w as FunnelPageActions,
40
- b as funnelPageActions
39
+ f as FunnelPageActions,
40
+ d as funnelPageActions
41
41
  };
@@ -1,22 +1,21 @@
1
1
  import { jsx as a } from "react/jsx-runtime";
2
2
  import { forwardRef as n } from "react";
3
- import { uyTv as d } from "@payfit/unity-themes";
4
- import { useFunnelLayoutContext as m } from "../FunnelLayout.context.js";
5
- const u = d({
3
+ import { uyTv as m } from "@payfit/unity-themes";
4
+ import { useFunnelLayoutContext as u } from "../FunnelLayout.context.js";
5
+ const d = m({
6
6
  base: "uy:px-300 uy:md:px-600"
7
7
  }), s = n(
8
8
  ({ children: o, ...e }, t) => {
9
- const { ids: r } = m();
9
+ const { ids: r } = u();
10
10
  return /* @__PURE__ */ a(
11
11
  "footer",
12
12
  {
13
13
  ref: t,
14
14
  "data-dd-privacy": "allow",
15
15
  ...e,
16
- className: u(),
16
+ className: d(),
17
17
  "data-unity-component": "FunnelPageFooter",
18
18
  id: r.footerId,
19
- tabIndex: -1,
20
19
  children: o
21
20
  }
22
21
  );
@@ -25,5 +24,5 @@ const u = d({
25
24
  s.displayName = "FunnelPageFooter";
26
25
  export {
27
26
  s as FunnelPageFooter,
28
- u as funnelPageFooter
27
+ d as funnelPageFooter
29
28
  };
@@ -1,5 +1,5 @@
1
1
  import { VariantProps } from '@payfit/unity-themes';
2
- import { PropsWithChildren } from 'react';
2
+ import { PropsWithChildren, ReactNode } from 'react';
3
3
  export declare const funnelPageHeader: import('tailwind-variants').TVReturnType<{
4
4
  gradient: {
5
5
  default: {
@@ -36,7 +36,7 @@ export declare const funnelPageHeader: import('tailwind-variants').TVReturnType<
36
36
  }, undefined, unknown, unknown, undefined>>;
37
37
  export interface FunnelPageHeaderProps extends PropsWithChildren<VariantProps<typeof funnelPageHeader>> {
38
38
  title: string;
39
- subtitle: string;
39
+ subtitle: ReactNode;
40
40
  style?: VariantProps<typeof funnelPageHeader>['gradient'];
41
41
  imageSlot?: React.ReactNode;
42
42
  imageSlotAltText?: string;
@@ -5,7 +5,7 @@ export declare const funnelSidebar: import('tailwind-variants').TVReturnType<{
5
5
  true: string;
6
6
  false: string;
7
7
  };
8
- }, undefined, "uy:w-full uy:self-start uy:shrink uy:grow-0 uy:md:top-600 uy:md:basis-1/3 uy:lg:basis-1/4 uy:md:shrink-0", {
8
+ }, undefined, "uy:w-full uy:self-start uy:shrink uy:grow-0 uy:md:basis-1/3 uy:lg:basis-1/4 uy:md:shrink-0", {
9
9
  isSticky: {
10
10
  true: string;
11
11
  false: string;
@@ -15,7 +15,7 @@ export declare const funnelSidebar: import('tailwind-variants').TVReturnType<{
15
15
  true: string;
16
16
  false: string;
17
17
  };
18
- }, undefined, "uy:w-full uy:self-start uy:shrink uy:grow-0 uy:md:top-600 uy:md:basis-1/3 uy:lg:basis-1/4 uy:md:shrink-0", unknown, unknown, undefined>>;
18
+ }, undefined, "uy:w-full uy:self-start uy:shrink uy:grow-0 uy:md:basis-1/3 uy:lg:basis-1/4 uy:md:shrink-0", unknown, unknown, undefined>>;
19
19
  export interface FunnelSidebarProps extends PropsWithChildren<VariantProps<typeof funnelSidebar>> {
20
20
  'aria-label'?: string;
21
21
  }
@@ -1,13 +1,13 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
2
  import { forwardRef as l } from "react";
3
- import { uyTv as d } from "@payfit/unity-themes";
4
- import { useIntl as o } from "react-intl";
3
+ import { uyTv as o } from "@payfit/unity-themes";
4
+ import { useIntl as d } from "react-intl";
5
5
  import { useFunnelLayoutContext as y } from "../FunnelLayout.context.js";
6
- const m = d({
7
- base: "uy:w-full uy:self-start uy:shrink uy:grow-0 uy:md:top-600 uy:md:basis-1/3 uy:lg:basis-1/4 uy:md:shrink-0",
6
+ const m = o({
7
+ base: "uy:w-full uy:self-start uy:shrink uy:grow-0 uy:md:basis-1/3 uy:lg:basis-1/4 uy:md:shrink-0",
8
8
  variants: {
9
9
  isSticky: {
10
- true: "uy:sticky uy:top-0 uy:z-9",
10
+ true: "uy:sticky uy:top-8 uy:md:top-10 uy:z-9",
11
11
  false: "uy:static"
12
12
  }
13
13
  },
@@ -15,20 +15,19 @@ const m = d({
15
15
  isSticky: !0
16
16
  }
17
17
  }), f = l(
18
- ({ children: e, isSticky: t, "aria-label": s, ...i }, r) => {
19
- const { ids: a } = y(), u = o();
18
+ ({ children: e, isSticky: s, "aria-label": t, ...i }, r) => {
19
+ const { ids: a } = y(), u = d();
20
20
  return /* @__PURE__ */ n(
21
21
  "aside",
22
22
  {
23
23
  ref: r,
24
- "aria-label": s ?? u.formatMessage({
24
+ "aria-label": t ?? u.formatMessage({
25
25
  id: "unity:layout:funnel:sidebar:aria-label",
26
26
  defaultMessage: "Process steps"
27
27
  }),
28
28
  "aria-describedby": a.funnelTitleId,
29
- className: m({ isSticky: t }),
29
+ className: m({ isSticky: s }),
30
30
  id: a.asideId,
31
- tabIndex: -1,
32
31
  "data-unity-component": "FunnelSidebar",
33
32
  "data-dd-privacy": "allow",
34
33
  ...i,
@@ -55,7 +55,6 @@ const A = N({
55
55
  id: n.topbarId,
56
56
  className: f(),
57
57
  role: "banner",
58
- tabIndex: -1,
59
58
  "aria-labelledby": n.funnelTitleId,
60
59
  "aria-describedby": n.funnelStatusId,
61
60
  "data-dd-privacy": "allow",
@@ -5,15 +5,15 @@ import { Input as I } from "react-aria-components";
5
5
  import { useIntl as N } from "react-intl";
6
6
  import { CircularIconButton as W } from "../icon-button/CircularIconButton.js";
7
7
  import { Icon as M } from "../icon/Icon.js";
8
- import { Spinner as O } from "../spinner/Spinner.js";
9
- const S = h({
8
+ import { Spinner as C } from "../spinner/Spinner.js";
9
+ const O = h({
10
10
  slots: {
11
- base: "uy:flex uy:h-500 uy:border uy:border-solid uy:rounded-100 uy:focus-within:outline-none uy:focus-within:ring-2 uy:focus-within:ring-utility-focus-ring uy:focus-within:ring-offset-2 uy:active:border-border-form-active",
12
- prefix: "uy:flex-grow-0 uy:text-content-neutral-low uy:content-center uy:pt-100 uy:pb-100 uy:pl-150 uy:pr-150 uy:border-r uy:border-solid uy:rounded-l-100 uy:active:border-border-form-active",
13
- inputWrapper: "uy:flex uy:gap-50 uy:flex-grow uy:flex-nowrap uy:pt-100 uy:pb-100 uy:pl-150 uy:pr-150 uy:rounded-100 uy:max-w-full uy:justify-between",
11
+ base: "uy:flex uy:h-500 uy:border uy:border-solid uy:rounded-75 uy:focus-within:outline-none uy:focus-within:ring-2 uy:focus-within:ring-utility-focus-ring uy:focus-within:ring-offset-2 uy:active:border-border-form-active",
12
+ prefix: "uy:flex-grow-0 uy:text-content-neutral-low uy:content-center uy:pt-100 uy:pb-100 uy:pl-150 uy:pr-150 uy:border-r uy:border-solid uy:rounded-l-75 uy:active:border-border-form-active",
13
+ inputWrapper: "uy:flex uy:gap-50 uy:flex-grow uy:flex-nowrap uy:pt-100 uy:pb-100 uy:pl-150 uy:pr-150 uy:rounded-75 uy:max-w-full uy:justify-between",
14
14
  input: "uy:w-full uy:flex-1 uy:outline-none uy:typography-body uy:placeholder:text-content-neutral-lowest uy:min-w-0 uy:max-w-full",
15
15
  state: "uy:flex uy:gap-50 uy:items-center uy:shrink-0",
16
- suffix: "uy:flex-grow-0 uy:text-content-neutral-low uy:content-center uy:pt-100 uy:pb-100 uy:pl-150 uy:pr-150 uy:border-l uy:border-solid uy:rounded-r-100 uy:active:border-border-form-active"
16
+ suffix: "uy:flex-grow-0 uy:text-content-neutral-low uy:content-center uy:pt-100 uy:pb-100 uy:pl-150 uy:pr-150 uy:border-l uy:border-solid uy:rounded-r-75 uy:active:border-border-form-active"
17
17
  },
18
18
  variants: {
19
19
  isInvalid: {
@@ -60,38 +60,38 @@ const S = h({
60
60
  }
61
61
  }
62
62
  ]
63
- }), j = v(
63
+ }), S = v(
64
64
  ({
65
65
  type: s = "text",
66
- prefix: l,
67
- suffix: i,
68
- isInvalid: f,
66
+ prefix: d,
67
+ suffix: l,
68
+ isInvalid: i,
69
69
  isLoading: r,
70
70
  isDisabled: o,
71
71
  isReadOnly: u,
72
- onClearButtonPress: t,
73
- ...a
72
+ onClearButtonPress: f,
73
+ ...t
74
74
  }, y) => {
75
- const d = N(), {
75
+ const a = N(), {
76
76
  base: b,
77
77
  prefix: m,
78
78
  inputWrapper: c,
79
79
  input: p,
80
80
  state: x,
81
81
  suffix: g
82
- } = S({
83
- isInvalid: !!f,
82
+ } = O({
83
+ isInvalid: !!i,
84
84
  isReadOnly: !!u,
85
85
  isDisabled: !!o
86
- }), w = a.value && !r && !u && !o;
87
- return delete a.isRequired, /* @__PURE__ */ n("div", { className: b(), children: [
88
- l ? /* @__PURE__ */ e("span", { className: m(), children: l }) : null,
86
+ }), w = t.value && !r && !u && !o;
87
+ return delete t.isRequired, /* @__PURE__ */ n("div", { className: b(), children: [
88
+ d ? /* @__PURE__ */ e("span", { className: m(), children: d }) : null,
89
89
  /* @__PURE__ */ n("div", { className: c(), children: [
90
90
  /* @__PURE__ */ e(
91
91
  I,
92
92
  {
93
93
  "data-dd-privacy": "mask",
94
- ...a,
94
+ ...t,
95
95
  ref: y,
96
96
  type: s,
97
97
  className: p(),
@@ -102,22 +102,22 @@ const S = h({
102
102
  ),
103
103
  /* @__PURE__ */ n("div", { className: x(), children: [
104
104
  r && /* @__PURE__ */ e(
105
- O,
105
+ C,
106
106
  {
107
107
  color: "inherit",
108
108
  size: "small",
109
- label: d.formatMessage({
109
+ label: a.formatMessage({
110
110
  id: "unity:component:common:loading:label",
111
111
  defaultMessage: "Loading..."
112
112
  })
113
113
  }
114
114
  ),
115
- f && /* @__PURE__ */ e(
115
+ i && /* @__PURE__ */ e(
116
116
  M,
117
117
  {
118
118
  src: "WarningCircleOutlined",
119
119
  color: "content.form.invalid",
120
- alt: d.formatMessage({
120
+ alt: a.formatMessage({
121
121
  id: "unity:component:form-field:form-input:error:alt",
122
122
  defaultMessage: "Error"
123
123
  })
@@ -126,24 +126,24 @@ const S = h({
126
126
  w && /* @__PURE__ */ e(
127
127
  W,
128
128
  {
129
- title: d.formatMessage({
129
+ title: a.formatMessage({
130
130
  id: "unity:component:common:clear:title",
131
131
  defaultMessage: "Clear"
132
132
  }),
133
133
  color: "content.neutral.low",
134
134
  icon: "CloseOutlined",
135
135
  onPress: () => {
136
- t == null || t();
136
+ f?.();
137
137
  }
138
138
  }
139
139
  )
140
140
  ] })
141
141
  ] }),
142
- i ? /* @__PURE__ */ e("span", { className: g(), children: i }) : null
142
+ l ? /* @__PURE__ */ e("span", { className: g(), children: l }) : null
143
143
  ] });
144
144
  }
145
145
  );
146
- j.displayName = "Input";
146
+ S.displayName = "Input";
147
147
  export {
148
- j as Input
148
+ S as Input
149
149
  };
@@ -1,10 +1,10 @@
1
- import { jsxs as r, jsx as n } from "react/jsx-runtime";
2
- import { forwardRef as u } from "react";
1
+ import { jsxs as s, jsx as r } from "react/jsx-runtime";
2
+ import { forwardRef as c } from "react";
3
3
  import { uyTv as b } from "@payfit/unity-themes";
4
4
  import { mergeProps as f } from "react-aria";
5
- import { useSlottedContext as g, InputContext as N, Label as h } from "react-aria-components";
6
- import { useIntl as q } from "react-intl";
7
- const x = b({
5
+ import { useSlottedContext as g, InputContext as x, Label as N } from "react-aria-components";
6
+ import { useIntl as h } from "react-intl";
7
+ const q = b({
8
8
  slots: {
9
9
  base: "uy:typography-body-strong uy:text-content-form-enabled uy:flex uy:gap-25",
10
10
  asterisk: "uy:text-content-danger",
@@ -23,33 +23,33 @@ const x = b({
23
23
  defaultVariants: {
24
24
  variant: "strong"
25
25
  }
26
- }), v = u(
27
- ({ children: l, ...a }, i) => {
28
- const s = q(), e = g(N), d = f(
29
- { isRequired: e == null ? void 0 : e["aria-required"] },
26
+ }), v = c(
27
+ ({ children: n, ...a }, l) => {
28
+ const e = h(), i = g(x), p = f(
29
+ { isRequired: i?.["aria-required"] },
30
30
  a
31
31
  ), {
32
32
  isRequired: t = !1,
33
33
  requiredVariant: o = "required",
34
- ...p
35
- } = d, { base: y, asterisk: m, optionalTag: c } = x();
36
- return /* @__PURE__ */ r(
37
- h,
34
+ ...d
35
+ } = p, { base: y, asterisk: m, optionalTag: u } = q();
36
+ return /* @__PURE__ */ s(
37
+ N,
38
38
  {
39
39
  "data-dd-privacy": "allow",
40
- ...p,
41
- ref: i,
40
+ ...d,
41
+ ref: l,
42
42
  className: y({ className: a.className }),
43
43
  children: [
44
- l,
45
- o === "required" && t && /* @__PURE__ */ r("span", { className: m(), children: [
44
+ n,
45
+ o === "required" && t && /* @__PURE__ */ s("span", { className: m(), children: [
46
46
  "*",
47
- /* @__PURE__ */ n("span", { className: "uy:sr-only", children: s.formatMessage({
47
+ /* @__PURE__ */ r("span", { className: "uy:sr-only", children: e.formatMessage({
48
48
  id: "unity:component:label:required",
49
49
  defaultMessage: "required"
50
50
  }) })
51
51
  ] }),
52
- o === "optional" && !t && /* @__PURE__ */ n("span", { className: c({ className: a.className }), children: s.formatMessage({
52
+ o === "optional" && !t && /* @__PURE__ */ r("span", { className: u({ className: a.className }), children: e.formatMessage({
53
53
  id: "unity:component:label:optional",
54
54
  defaultMessage: "(optional)"
55
55
  }) })