@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,82 +1,82 @@
1
- import { jsxs as M, jsx as t } from "react/jsx-runtime";
2
- import { forwardRef as T } from "react";
3
- import { uyTv as P } from "@payfit/unity-themes";
4
- import { useFormContext as g } from "react-hook-form";
5
- import { FormField as L } from "../form-field/FormField.js";
6
- import { FormControl as R } from "../form-field/parts/FormControl.js";
7
- import { FormFeedbackText as j } from "../form-field/parts/FormFeedbackText.js";
8
- import { FormHelperText as k } from "../form-field/parts/FormHelperText.js";
9
- import { FormLabel as q } from "../form-field/parts/FormLabel.js";
1
+ import { jsxs as C, jsx as t } from "react/jsx-runtime";
2
+ import { forwardRef as P } from "react";
3
+ import { uyTv as M } from "@payfit/unity-themes";
4
+ import { useFormContext as T } from "react-hook-form";
5
+ import { FormField as k } from "../form-field/FormField.js";
6
+ import { FormControl as g } from "../form-field/parts/FormControl.js";
7
+ import { FormFeedbackText as B } from "../form-field/parts/FormFeedbackText.js";
8
+ import { FormHelperText as L } from "../form-field/parts/FormHelperText.js";
9
+ import { FormLabel as R } from "../form-field/parts/FormLabel.js";
10
10
  import { MultiSelect as u } from "../multi-select/MultiSelect.js";
11
- const v = P({
11
+ const j = M({
12
12
  base: "uy:flex uy:flex-col uy:gap-100"
13
13
  });
14
- function w(e, i) {
15
- const { control: l, setValue: f } = g(), {
16
- name: o,
17
- label: x,
18
- helperText: n,
19
- feedbackText: F,
20
- contextualLink: h,
21
- isRequired: p,
22
- isInvalid: b,
23
- isLoading: m,
24
- isDisabled: c,
25
- isReadOnly: s,
26
- requiredVariant: S,
27
- children: a,
28
- onClearButtonPress: r,
14
+ function q(e, l) {
15
+ const { control: r, setValue: d } = T(), {
16
+ name: i,
17
+ label: f,
18
+ helperText: o,
19
+ feedbackText: x,
20
+ contextualLink: F,
21
+ isRequired: b,
22
+ isInvalid: h,
23
+ isLoading: n,
24
+ isDisabled: m,
25
+ isReadOnly: a,
26
+ requiredVariant: p,
27
+ children: s,
28
+ onClearButtonPress: S,
29
29
  ...y
30
30
  } = e, I = {
31
- isRequired: p,
32
- isInvalid: b,
33
- isLoading: m,
34
- isDisabled: c,
35
- isReadOnly: s
36
- }, V = "items" in e && "getItemValue" in e, d = {
31
+ isRequired: b,
32
+ isInvalid: h,
33
+ isLoading: n,
34
+ isDisabled: m,
35
+ isReadOnly: a
36
+ }, V = "items" in e && "getItemValue" in e, c = {
37
37
  onClearButtonPress: () => {
38
- f(o, /* @__PURE__ */ new Set()), r == null || r();
38
+ d(i, /* @__PURE__ */ new Set()), S?.();
39
39
  },
40
40
  placeholder: e.placeholder,
41
41
  isSearchable: e.isSearchable,
42
42
  maxVisibleItems: e.maxVisibleItems,
43
- isDisabled: c,
44
- isReadOnly: s,
45
- isLoading: m,
43
+ isDisabled: m,
44
+ isReadOnly: a,
45
+ isLoading: n,
46
46
  renderValue: e.renderValue
47
47
  };
48
- return /* @__PURE__ */ M(
49
- L,
48
+ return /* @__PURE__ */ C(
49
+ k,
50
50
  {
51
- control: l,
52
- name: o,
53
- className: v(),
51
+ control: r,
52
+ name: i,
53
+ className: j(),
54
54
  ...I,
55
55
  children: [
56
- /* @__PURE__ */ t(q, { requiredVariant: S, children: x }),
57
- n && /* @__PURE__ */ t(k, { children: n }),
58
- /* @__PURE__ */ t(R, { children: V ? (
56
+ /* @__PURE__ */ t(R, { requiredVariant: p, children: f }),
57
+ o && /* @__PURE__ */ t(L, { children: o }),
58
+ /* @__PURE__ */ t(g, { children: V ? (
59
59
  // @ts-expect-error - Type system cannot fully express this but it works correctly at runtime
60
60
  /* @__PURE__ */ t(
61
61
  u,
62
62
  {
63
63
  ...y,
64
- ...d,
65
- ref: i,
66
- children: a
64
+ ...c,
65
+ ref: l,
66
+ children: s
67
67
  }
68
68
  )
69
- ) : /* @__PURE__ */ t(u, { ...d, ref: i, children: a }) }),
70
- /* @__PURE__ */ t(j, { children: F }),
71
- h
69
+ ) : /* @__PURE__ */ t(u, { ...c, ref: l, children: s }) }),
70
+ /* @__PURE__ */ t(B, { children: x }),
71
+ F
72
72
  ]
73
73
  }
74
74
  );
75
75
  }
76
- const C = T(function(i, l) {
77
- return w(i, l);
76
+ const v = P(function(l, r) {
77
+ return q(l, r);
78
78
  });
79
- C.displayName = "MultiSelectField";
79
+ v.displayName = "MultiSelectField";
80
80
  export {
81
- C as MultiSelectField
81
+ v as MultiSelectField
82
82
  };
@@ -1,5 +1,5 @@
1
- import { jsxs as r, jsx as a } from "react/jsx-runtime";
2
- import s, { useState as G, useCallback as j } from "react";
1
+ import { jsxs as o, jsx as n } from "react/jsx-runtime";
2
+ import r, { useState as G, useCallback as j } from "react";
3
3
  import { uyTv as B } from "@payfit/unity-themes";
4
4
  import { Button as D } from "react-aria-components";
5
5
  import _ from "../../../hooks/use-id.js";
@@ -32,40 +32,40 @@ const z = B({
32
32
  function H({
33
33
  children: y,
34
34
  label: p,
35
- prefix: i,
35
+ prefix: s,
36
36
  suffix: m,
37
37
  defaultExpanded: f = !1,
38
38
  isExpanded: l,
39
- onToggle: n,
39
+ onToggle: i,
40
40
  ...x
41
41
  }) {
42
- const u = _(), [h, b] = G(f), o = l !== void 0, e = o ? l : h, v = j(() => {
43
- o || b((t) => !t), n == null || n(!e);
44
- }, [o, e, n]), N = s.Children.map(y, (t) => s.isValidElement(t) ? s.cloneElement(t, { isDisabled: !e, level: 1 }) : t), c = `${u}-toggle`, d = `${u}-content`, {
45
- base: I,
46
- prefix: E,
47
- label: S,
48
- suffix: g,
42
+ const u = _(), [h, b] = G(f), a = l !== void 0, e = a ? l : h, v = j(() => {
43
+ a || b((t) => !t), i?.(!e);
44
+ }, [a, e, i]), g = r.Children.map(y, (t) => r.isValidElement(t) ? r.cloneElement(t, { isDisabled: !e, level: 1 }) : t), c = `${u}-toggle`, d = `${u}-content`, {
45
+ base: N,
46
+ prefix: I,
47
+ label: E,
48
+ suffix: S,
49
49
  content: w,
50
50
  contentWrapper: C,
51
51
  caret: W
52
52
  } = z({ level: 0, expanded: e });
53
- return /* @__PURE__ */ r("li", { className: "uy:flex uy:flex-col uy:gap-50", children: [
54
- /* @__PURE__ */ r(
53
+ return /* @__PURE__ */ o("li", { className: "uy:flex uy:flex-col uy:gap-50", children: [
54
+ /* @__PURE__ */ o(
55
55
  D,
56
56
  {
57
57
  id: c,
58
- className: I({ className: "uy:w-full" }),
58
+ className: N({ className: "uy:w-full" }),
59
59
  onPress: v,
60
60
  "aria-expanded": e,
61
61
  "aria-controls": d,
62
62
  ...x,
63
63
  children: [
64
- i && /* @__PURE__ */ a("span", { className: E(), children: i({ isExpanded: e }) }),
65
- /* @__PURE__ */ a("span", { className: S(), children: p }),
66
- /* @__PURE__ */ r("span", { className: g(), role: "presentation", children: [
64
+ s && /* @__PURE__ */ n("span", { className: I(), children: s({ isExpanded: e }) }),
65
+ /* @__PURE__ */ n("span", { className: E(), children: p }),
66
+ /* @__PURE__ */ o("span", { className: S(), role: "presentation", children: [
67
67
  m,
68
- /* @__PURE__ */ a(
68
+ /* @__PURE__ */ n(
69
69
  $,
70
70
  {
71
71
  src: "CaretDownOutlined",
@@ -79,19 +79,19 @@ function H({
79
79
  ]
80
80
  }
81
81
  ),
82
- /* @__PURE__ */ a(
82
+ /* @__PURE__ */ n(
83
83
  "div",
84
84
  {
85
85
  className: C(),
86
86
  style: { maxHeight: e ? 1e3 : 0 },
87
- children: /* @__PURE__ */ a(
87
+ children: /* @__PURE__ */ n(
88
88
  "ul",
89
89
  {
90
90
  id: d,
91
91
  className: w(),
92
92
  "aria-labelledby": c,
93
93
  "aria-hidden": !e,
94
- children: N
94
+ children: g
95
95
  }
96
96
  )
97
97
  }
@@ -1,6 +1,6 @@
1
+ import { StandardSchemaV1 } from '@standard-schema/spec';
1
2
  import { ForwardedRef, JSX, ReactNode } from 'react';
2
3
  import { FieldPath, FieldValues } from 'react-hook-form';
3
- import { infer as ZodInfer } from 'zod';
4
4
  import { Schema } from '../../hooks/use-form.types.js';
5
5
  import { LabelProps } from '../label/Label.js';
6
6
  import { NumberProps } from '../number-input/NumberInput.js';
@@ -17,7 +17,7 @@ export interface NumberFieldProps<TFieldValues extends FieldValues = FieldValues
17
17
  /** A contextual link to display below the text field. */
18
18
  contextualLink?: ReactNode;
19
19
  }
20
- type NumberFieldComponent = (<TSchema extends Schema>(props: NumberFieldProps<ZodInfer<TSchema>> & {
20
+ type NumberFieldComponent = (<TSchema extends Schema>(props: NumberFieldProps<StandardSchemaV1.InferOutput<TSchema>> & {
21
21
  ref?: ForwardedRef<HTMLInputElement>;
22
22
  }) => JSX.Element) & {
23
23
  displayName?: string;
@@ -39,7 +39,7 @@ type NumberFieldComponent = (<TSchema extends Schema>(props: NumberFieldProps<Zo
39
39
  * />
40
40
  * ```
41
41
  * @template TSchema - The Zod schema type for form validation
42
- * @param {NumberFieldProps<ZodInfer<TSchema>>} props - The props for the NumberField component
42
+ * @param {NumberFieldProps<StandardSchemaV1.InferOutput<TSchema>>} props - The props for the NumberField component
43
43
  * @param {ForwardedRef<HTMLInputElement>} ref - Ref forwarded to the underlying input element
44
44
  * @returns {JSX.Element} A NumberField component
45
45
  */
@@ -1,32 +1,32 @@
1
1
  import { jsxs as t, jsx as e } from "react/jsx-runtime";
2
- import { forwardRef as G } from "react";
3
- import { uyTv as T } from "@payfit/unity-themes";
4
- import { NumberField as W, Group as q, Input as A } from "react-aria-components";
5
- import { Icon as C } from "../icon/Icon.js";
2
+ import { forwardRef as k } from "react";
3
+ import { uyTv as z } from "@payfit/unity-themes";
4
+ import { NumberField as F, Group as G, Input as T } from "react-aria-components";
5
+ import { Icon as W } from "../icon/Icon.js";
6
6
  import "@payfit/unity-icons";
7
- import { useIntl as H } from "react-intl";
8
- import { CircularIconButton as s } from "../icon-button/CircularIconButton.js";
9
- import { Spinner as J } from "../spinner/Spinner.js";
10
- const K = T({
7
+ import { useIntl as q } from "react-intl";
8
+ import { CircularIconButton as i } from "../icon-button/CircularIconButton.js";
9
+ import { Spinner as A } from "../spinner/Spinner.js";
10
+ const H = z({
11
11
  slots: {
12
12
  base: [
13
- "uy:group uy:flex uy:h-500 uy:border uy:border-solid uy:rounded-100",
13
+ "uy:group uy:flex uy:h-500 uy:border uy:border-solid uy:rounded-75",
14
14
  "uy:focus-within:outline-none uy:focus-within:ring-2 uy:focus-within:ring-utility-focus-ring uy:focus-within:ring-offset-2",
15
15
  "uy:active:border-border-form-active"
16
16
  ],
17
17
  wrapper: [
18
- "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 uy:items-center"
18
+ "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 uy:items-center"
19
19
  ],
20
20
  input: [
21
21
  "uy:w-full uy:flex-1 uy:outline-none uy:typography-body uy:min-w-0 uy:max-w-full",
22
22
  "uy:placeholder:text-content-neutral-lowest"
23
23
  ],
24
24
  prefix: [
25
- "uy:flex-grow-0 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",
25
+ "uy:flex-grow-0 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",
26
26
  "uy:active:border-border-form-active"
27
27
  ],
28
28
  suffix: [
29
- "uy:flex-grow-0 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",
29
+ "uy:flex-grow-0 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",
30
30
  "uy:active:border-border-form-active"
31
31
  ],
32
32
  state: [
@@ -81,62 +81,62 @@ const K = T({
81
81
  }
82
82
  }
83
83
  }
84
- }), Q = G(
84
+ }), J = k(
85
85
  ({
86
- withControls: b = !1,
86
+ withControls: s = !1,
87
87
  defaultValue: u,
88
- formatOptions: g,
89
- isDisabled: f,
90
- isInvalid: y,
88
+ formatOptions: p,
89
+ isDisabled: b,
90
+ isInvalid: f,
91
91
  isLoading: a,
92
92
  isReadOnly: d,
93
- isRequired: x,
93
+ isRequired: g,
94
94
  maxValue: n,
95
- minValue: i,
96
- prefix: m,
97
- onBlur: w,
98
- onChange: v,
99
- onClearButtonPress: l,
95
+ minValue: l,
96
+ prefix: y,
97
+ onBlur: x,
98
+ onChange: w,
99
+ onClearButtonPress: v,
100
100
  step: h,
101
- suffix: c,
101
+ suffix: m,
102
102
  value: r,
103
103
  ...N
104
- }, p) => {
104
+ }, c) => {
105
105
  const {
106
106
  base: M,
107
107
  wrapper: I,
108
- input: j,
109
- prefix: E,
110
- suffix: O,
111
- state: S,
112
- controls: D
113
- } = K({ isReadOnly: d }), o = H(), k = r !== void 0 && !isNaN(r), z = u !== void 0 && !isNaN(u), F = (k || z) && !b && !a && !d && !f;
108
+ input: C,
109
+ prefix: j,
110
+ suffix: E,
111
+ state: O,
112
+ controls: S
113
+ } = H({ isReadOnly: d }), o = q(), B = r !== void 0 && !isNaN(r), D = u !== void 0 && !isNaN(u), P = (B || D) && !s && !a && !d && !b;
114
114
  return /* @__PURE__ */ t(
115
- W,
115
+ F,
116
116
  {
117
- ref: p,
117
+ ref: c,
118
118
  className: M(),
119
119
  value: r,
120
120
  defaultValue: u,
121
- minValue: i,
121
+ minValue: l,
122
122
  maxValue: n,
123
123
  step: h,
124
- isDisabled: f,
124
+ isDisabled: b,
125
125
  isReadOnly: d,
126
- isInvalid: y,
127
- isRequired: x,
126
+ isInvalid: f,
127
+ isRequired: g,
128
128
  "aria-busy": a,
129
- onChange: v,
130
- formatOptions: g,
131
- onBlur: w,
129
+ onChange: w,
130
+ formatOptions: p,
131
+ onBlur: x,
132
132
  ...N,
133
133
  children: [
134
- m ? /* @__PURE__ */ e("span", { className: E(), children: m }) : null,
135
- /* @__PURE__ */ t(q, { className: I(), children: [
136
- /* @__PURE__ */ e(A, { ref: p, className: j() }),
137
- /* @__PURE__ */ t("div", { className: S(), children: [
134
+ y ? /* @__PURE__ */ e("span", { className: j(), children: y }) : null,
135
+ /* @__PURE__ */ t(G, { className: I(), children: [
136
+ /* @__PURE__ */ e(T, { ref: c, className: C() }),
137
+ /* @__PURE__ */ t("div", { className: O(), children: [
138
138
  a && /* @__PURE__ */ e(
139
- J,
139
+ A,
140
140
  {
141
141
  color: "inherit",
142
142
  size: "small",
@@ -146,8 +146,8 @@ const K = T({
146
146
  })
147
147
  }
148
148
  ),
149
- y && /* @__PURE__ */ e(
150
- C,
149
+ f && /* @__PURE__ */ e(
150
+ W,
151
151
  {
152
152
  src: "WarningCircleOutlined",
153
153
  color: "content.form.invalid",
@@ -157,8 +157,8 @@ const K = T({
157
157
  })
158
158
  }
159
159
  ),
160
- F && /* @__PURE__ */ e(
161
- s,
160
+ P && /* @__PURE__ */ e(
161
+ i,
162
162
  {
163
163
  title: o.formatMessage({
164
164
  id: "unity:component:common:clear:title",
@@ -167,19 +167,19 @@ const K = T({
167
167
  className: "uy:text-content-neutral-enabled",
168
168
  icon: "CloseOutlined",
169
169
  onPress: () => {
170
- l == null || l();
170
+ v?.();
171
171
  }
172
172
  }
173
173
  )
174
174
  ] }),
175
- b && /* @__PURE__ */ t("div", { className: D(), children: [
175
+ s && /* @__PURE__ */ t("div", { className: S(), children: [
176
176
  /* @__PURE__ */ e(
177
- s,
177
+ i,
178
178
  {
179
179
  asElement: "button",
180
180
  icon: "MinusOutlined",
181
181
  slot: "decrement",
182
- isDisabled: i !== void 0 && r === i,
182
+ isDisabled: l !== void 0 && r === l,
183
183
  title: o.formatMessage({
184
184
  id: "unity:component:form-field:number-input:decrement:title",
185
185
  defaultMessage: "decrement"
@@ -187,7 +187,7 @@ const K = T({
187
187
  }
188
188
  ),
189
189
  /* @__PURE__ */ e(
190
- s,
190
+ i,
191
191
  {
192
192
  asElement: "button",
193
193
  icon: "PlusOutlined",
@@ -201,14 +201,14 @@ const K = T({
201
201
  )
202
202
  ] })
203
203
  ] }),
204
- c ? /* @__PURE__ */ e("span", { className: O(), children: c }) : null
204
+ m ? /* @__PURE__ */ e("span", { className: E(), children: m }) : null
205
205
  ]
206
206
  }
207
207
  );
208
208
  }
209
209
  );
210
- Q.displayName = "NumberInput";
210
+ J.displayName = "NumberInput";
211
211
  export {
212
- Q as NumberInput,
213
- K as numberInput
212
+ J as NumberInput,
213
+ H as numberInput
214
214
  };