@povio/ui 3.3.0-rc.4 → 3.4.0-rc.1

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 (125) hide show
  1. package/README.md +15 -1
  2. package/dist/components/Breadcrumbs/Breadcrumbs.js +55 -206
  3. package/dist/components/buttons/InlineIconButton/InlineIconButton.js +9 -34
  4. package/dist/components/buttons/shared/ButtonContent.js +22 -80
  5. package/dist/components/inputs/Checkbox/Checkbox.d.ts +1 -2
  6. package/dist/components/inputs/Checkbox/Checkbox.js +93 -100
  7. package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +10 -24
  8. package/dist/components/inputs/Checkbox/CheckboxGroup.d.ts +1 -2
  9. package/dist/components/inputs/Checkbox/CheckboxGroup.js +109 -113
  10. package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +1 -2
  11. package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +97 -238
  12. package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +1 -2
  13. package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +88 -214
  14. package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +1 -2
  15. package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +64 -143
  16. package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +1 -2
  17. package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +275 -294
  18. package/dist/components/inputs/DateTime/shared/Calendar.js +139 -339
  19. package/dist/components/inputs/DateTime/shared/CalendarCell.js +114 -308
  20. package/dist/components/inputs/DateTime/shared/CalendarGrid.js +35 -150
  21. package/dist/components/inputs/DateTime/shared/CalendarHeader.js +95 -229
  22. package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +115 -296
  23. package/dist/components/inputs/DateTime/shared/DateField.js +135 -306
  24. package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +1 -2
  25. package/dist/components/inputs/DateTime/shared/DatePickerInput.js +136 -343
  26. package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +10 -59
  27. package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +1 -2
  28. package/dist/components/inputs/DateTime/shared/TimePickerInput.js +43 -46
  29. package/dist/components/inputs/File/FileUpload.d.ts +1 -1
  30. package/dist/components/inputs/File/FileUpload.js +18 -18
  31. package/dist/components/inputs/File/InputUpload.d.ts +1 -1
  32. package/dist/components/inputs/File/InputUpload.js +82 -278
  33. package/dist/components/inputs/File/fileUpload.types.d.ts +1 -1
  34. package/dist/components/inputs/File/inputUpload.types.d.ts +1 -1
  35. package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +48 -180
  36. package/dist/components/inputs/File/shared/FileUploadContentError.js +95 -265
  37. package/dist/components/inputs/File/shared/FileUploadContentFilled.js +99 -261
  38. package/dist/components/inputs/File/shared/FileUploadContentLoading.js +56 -234
  39. package/dist/components/inputs/File/shared/ProgressBar.js +15 -102
  40. package/dist/components/inputs/FormField/FormField.js +34 -47
  41. package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +1 -1
  42. package/dist/components/inputs/Input/NumberInput/NumberInput.js +19 -19
  43. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +1 -1
  44. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +93 -331
  45. package/dist/components/inputs/Input/PasswordInput/PasswordInput.d.ts +1 -1
  46. package/dist/components/inputs/Input/TextArea/TextArea.d.ts +1 -1
  47. package/dist/components/inputs/Input/TextArea/TextArea.js +18 -18
  48. package/dist/components/inputs/Input/TextInput/TextInput.d.ts +2 -2
  49. package/dist/components/inputs/Input/TextInput/TextInput.js +36 -38
  50. package/dist/components/inputs/Inputs/Form.d.ts +4 -4
  51. package/dist/components/inputs/Inputs/InputItem.d.ts +22 -22
  52. package/dist/components/inputs/Inputs/InputItem.js +35 -36
  53. package/dist/components/inputs/Inputs/Inputs.d.ts +2 -2
  54. package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +1 -2
  55. package/dist/components/inputs/RadioGroup/RadioGroup.js +107 -111
  56. package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +1 -1
  57. package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +26 -86
  58. package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +1 -1
  59. package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +19 -19
  60. package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +1 -1
  61. package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +1 -1
  62. package/dist/components/inputs/Selection/Select/QuerySelect.js +49 -115
  63. package/dist/components/inputs/Selection/Select/Select.d.ts +1 -1
  64. package/dist/components/inputs/Selection/Select/Select.js +22 -22
  65. package/dist/components/inputs/Selection/shared/SelectBase.d.ts +0 -1
  66. package/dist/components/inputs/Selection/shared/SelectBase.js +34 -37
  67. package/dist/components/inputs/Selection/shared/SelectInput.js +1 -0
  68. package/dist/components/inputs/Selection/shared/SelectListBox.js +51 -163
  69. package/dist/components/inputs/Selection/shared/select.context.d.ts +2 -2
  70. package/dist/components/inputs/Selection/shared/select.context.js +4 -8
  71. package/dist/components/inputs/Selection/shared/select.types.d.ts +1 -1
  72. package/dist/components/inputs/Selection/shared/useSelectItems.js +48 -108
  73. package/dist/components/inputs/Skeleton/InputFrame.js +177 -552
  74. package/dist/components/inputs/Slider/Slider.d.ts +1 -1
  75. package/dist/components/inputs/Slider/Slider.js +18 -18
  76. package/dist/components/inputs/TextEditor/TextEditor.d.ts +1 -1
  77. package/dist/components/inputs/TextEditor/TextEditor.js +105 -407
  78. package/dist/components/inputs/Toggle/Toggle.d.ts +1 -2
  79. package/dist/components/inputs/Toggle/Toggle.js +59 -63
  80. package/dist/components/inputs/shared/InputClear.js +24 -40
  81. package/dist/components/inputs/shared/form.binding.d.ts +27 -0
  82. package/dist/components/inputs/shared/form.binding.js +57 -0
  83. package/dist/components/inputs/shared/form.types.d.ts +9 -8
  84. package/dist/components/inputs/shared/form.types.js +8 -0
  85. package/dist/components/navigation/Accordion/Accordion.js +22 -69
  86. package/dist/components/navigation/Accordion/AccordionItem.js +41 -86
  87. package/dist/components/navigation/Stepper/Stepper.js +22 -67
  88. package/dist/components/overlays/ActionModal/ActionModal.js +35 -169
  89. package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +29 -110
  90. package/dist/components/segment/Segment.d.ts +1 -1
  91. package/dist/components/segment/Segment.js +17 -17
  92. package/dist/components/segment/segment.types.d.ts +1 -1
  93. package/dist/components/shared/pagination/Pagination.js +22 -108
  94. package/dist/components/status/Alert/Alert.js +30 -97
  95. package/dist/components/table/InfiniteTable.js +16 -67
  96. package/dist/components/table/Table.d.ts +2 -8
  97. package/dist/components/table/Table.js +33 -55
  98. package/dist/components/text/Typography/Typography.js +8 -23
  99. package/dist/config/confirmation.context.js +1 -1
  100. package/dist/config/theme.context.js +45 -98
  101. package/dist/config/uiConfig.context.d.ts +5 -5
  102. package/dist/config/uiConfig.context.js +11 -51
  103. package/dist/config/uiOverrides.context.d.ts +0 -1
  104. package/dist/helpers/dynamicColumns.d.ts +1 -1
  105. package/dist/helpers/dynamicInputs.d.ts +7 -7
  106. package/dist/hooks/useAutosave.d.ts +4 -4
  107. package/dist/hooks/useAutosave.js +64 -49
  108. package/dist/hooks/useDebounceCallback.js +17 -51
  109. package/dist/hooks/useForm.d.ts +39 -15
  110. package/dist/hooks/useForm.js +96 -43
  111. package/dist/hooks/useFormAutosave.d.ts +8 -9
  112. package/dist/hooks/useFormAutosave.js +49 -122
  113. package/dist/hooks/useLongPressRepeat.js +20 -55
  114. package/dist/index.d.ts +2 -3
  115. package/dist/index.js +3 -4
  116. package/package.json +3 -4
  117. package/dist/components/inputs/FormField/formField.cva.d.ts +0 -11
  118. package/dist/components/inputs/FormField/formField.cva.js +0 -16
  119. package/dist/components/table/TableColumnFilterInput.d.ts +0 -9
  120. package/dist/components/table/TableColumnFilterInput.js +0 -108
  121. package/dist/components/table/TableColumnFilterPlaceholder.d.ts +0 -5
  122. package/dist/components/table/TableColumnFilterPlaceholder.js +0 -41
  123. package/dist/components/table/TableColumnFilterRow.d.ts +0 -16
  124. package/dist/components/table/TableColumnFilterRow.js +0 -68
  125. package/dist/hooks/useAutosave.spec.d.ts +0 -1
@@ -1,4 +1,5 @@
1
1
  import { UIConfig } from "../../../../config/uiConfig.context.js";
2
+ import { FieldController } from "../../shared/form.binding.js";
2
3
  import { Select } from "./Select.js";
3
4
  import { getQueryItems, getSelectionIdsToResolve } from "../shared/querySelect.utils.js";
4
5
  import { useQueryAutocomplete } from "../../../../hooks/useQueryAutocomplete.js";
@@ -6,12 +7,8 @@ import { c } from "react/compiler-runtime";
6
7
  import { jsx } from "react/jsx-runtime";
7
8
  import { useState } from "react";
8
9
  import { mergeRefs } from "@react-aria/utils";
9
- import { Controller } from "react-hook-form";
10
10
  //#region src/components/inputs/Selection/Select/QuerySelect.tsx
11
- var LoadedQuerySelectContent = (t0) => {
12
- const $ = c(31);
13
- const { query, queryParams, queryOptions, queryMap, resolveSelectedItemsWithIds, isQueryEnabledInitially: t1, ...props } = t0;
14
- const isQueryEnabledInitially = t1 === void 0 ? false : t1;
11
+ var LoadedQuerySelectContent = ({ query, queryParams, queryOptions, queryMap, resolveSelectedItemsWithIds, isQueryEnabledInitially = false, ...props }) => {
15
12
  const ui = UIConfig.useConfig();
16
13
  const [search, setSearch] = useState("");
17
14
  const isSearchable = props.isSearchable ?? ui.select.isSearchable;
@@ -24,100 +21,37 @@ var LoadedQuerySelectContent = (t0) => {
24
21
  const shouldEnableInitialQuery = selectedIdsToResolve.count > 0;
25
22
  const isInitialQueryDisabled = props.isInitialQueryDisabled ?? ui.querySelect?.isInitialQueryDisabled;
26
23
  const shouldDisableInitialQuery = !isQueryEnabledInitially && !shouldEnableInitialQuery && (selectedIdsToResolve.isResolvedByInitialSelection || isInitialQueryDisabled);
27
- let t2;
28
- if ($[0] !== queryMap) {
29
- t2 = (data) => getQueryItems(data, queryMap);
30
- $[0] = queryMap;
31
- $[1] = t2;
32
- } else t2 = $[1];
33
- const t3 = resolveSelectedItemsWithIds ?? ui.querySelect?.resolveSelectedItemsWithIds;
34
- const t4 = isSearchable ? search : void 0;
35
- let t5;
36
- if ($[2] !== query || $[3] !== queryOptions || $[4] !== queryParams || $[5] !== selectedIdsToResolve.items || $[6] !== shouldDisableInitialQuery || $[7] !== t2 || $[8] !== t3 || $[9] !== t4) {
37
- t5 = {
38
- query,
39
- queryParams,
40
- queryOptions,
41
- mapItems: t2,
42
- resolveSelectedItemsWithIds: t3,
43
- search: t4,
44
- initialQueryState: shouldDisableInitialQuery,
45
- selectedIdsToResolve: selectedIdsToResolve.items
46
- };
47
- $[2] = query;
48
- $[3] = queryOptions;
49
- $[4] = queryParams;
50
- $[5] = selectedIdsToResolve.items;
51
- $[6] = shouldDisableInitialQuery;
52
- $[7] = t2;
53
- $[8] = t3;
54
- $[9] = t4;
55
- $[10] = t5;
56
- } else t5 = $[10];
57
- const { items, totalItems, isLoading, handleEnableQuery, hasNextPage, fetchNextPage } = useQueryAutocomplete(t5);
58
- let onSearchChange;
59
- let selectProps;
60
- if ($[11] !== props) {
61
- const { isInitialQueryDisabled: _, onSearchChange: t6, ...t7 } = props;
62
- onSearchChange = t6;
63
- selectProps = t7;
64
- $[11] = props;
65
- $[12] = onSearchChange;
66
- $[13] = selectProps;
67
- } else {
68
- onSearchChange = $[12];
69
- selectProps = $[13];
70
- }
71
- let t6;
72
- if ($[14] !== handleEnableQuery || $[15] !== onSearchChange || $[16] !== setSearch) {
73
- t6 = (value_0) => {
74
- setSearch(value_0);
75
- handleEnableQuery();
76
- onSearchChange?.(value_0);
77
- };
78
- $[14] = handleEnableQuery;
79
- $[15] = onSearchChange;
80
- $[16] = setSearch;
81
- $[17] = t6;
82
- } else t6 = $[17];
83
- const handleSearchChange = t6;
84
- const t7 = props.searchDebounceDelay ?? ui.querySelect?.searchDebounceDelay;
85
- let t8;
86
- if ($[18] !== handleSearchChange || $[19] !== isSearchable) {
87
- t8 = isSearchable && {
24
+ const { items, totalItems, isLoading, handleEnableQuery, hasNextPage, fetchNextPage } = useQueryAutocomplete({
25
+ query,
26
+ queryParams,
27
+ queryOptions,
28
+ mapItems: (data) => getQueryItems(data, queryMap),
29
+ resolveSelectedItemsWithIds: resolveSelectedItemsWithIds ?? ui.querySelect?.resolveSelectedItemsWithIds,
30
+ search: isSearchable ? search : void 0,
31
+ initialQueryState: shouldDisableInitialQuery,
32
+ selectedIdsToResolve: selectedIdsToResolve.items
33
+ });
34
+ const { isInitialQueryDisabled: _, onSearchChange, ...selectProps } = props;
35
+ const handleSearchChange = (value_0) => {
36
+ setSearch(value_0);
37
+ handleEnableQuery();
38
+ onSearchChange?.(value_0);
39
+ };
40
+ return /* @__PURE__ */ jsx(Select, {
41
+ ...selectProps,
42
+ items,
43
+ isLoading,
44
+ totalItems,
45
+ hasLoadMore: hasNextPage,
46
+ onLoadMore: fetchNextPage,
47
+ searchDebounceDelay: props.searchDebounceDelay ?? ui.querySelect?.searchDebounceDelay,
48
+ onMouseEnter: handleEnableQuery,
49
+ onFocusCapture: handleEnableQuery,
50
+ ...isSearchable && {
88
51
  isClientSearchDisabled: true,
89
52
  onSearchChange: handleSearchChange
90
- };
91
- $[18] = handleSearchChange;
92
- $[19] = isSearchable;
93
- $[20] = t8;
94
- } else t8 = $[20];
95
- let t9;
96
- if ($[21] !== fetchNextPage || $[22] !== handleEnableQuery || $[23] !== hasNextPage || $[24] !== isLoading || $[25] !== items || $[26] !== selectProps || $[27] !== t7 || $[28] !== t8 || $[29] !== totalItems) {
97
- t9 = /* @__PURE__ */ jsx(Select, {
98
- ...selectProps,
99
- items,
100
- isLoading,
101
- totalItems,
102
- hasLoadMore: hasNextPage,
103
- onLoadMore: fetchNextPage,
104
- searchDebounceDelay: t7,
105
- onMouseEnter: handleEnableQuery,
106
- onFocusCapture: handleEnableQuery,
107
- ...t8
108
- });
109
- $[21] = fetchNextPage;
110
- $[22] = handleEnableQuery;
111
- $[23] = hasNextPage;
112
- $[24] = isLoading;
113
- $[25] = items;
114
- $[26] = selectProps;
115
- $[27] = t7;
116
- $[28] = t8;
117
- $[29] = totalItems;
118
- $[30] = t9;
119
- } else t9 = $[30];
120
- return t9;
53
+ }
54
+ });
121
55
  };
122
56
  var QuerySelectContent = (props) => {
123
57
  const $ = c(9);
@@ -173,35 +107,35 @@ var QuerySelectContent = (props) => {
173
107
  };
174
108
  var QuerySelect = (props) => {
175
109
  const $ = c(16);
176
- if ("formControl" in props && props.formControl) {
177
- let formControl;
110
+ if ("field" in props && props.field) {
111
+ let field;
178
112
  let innerProps;
179
113
  let ref;
180
114
  if ($[0] !== props) {
181
- ({formControl, ref, ...innerProps} = props);
115
+ ({field, ref, ...innerProps} = props);
182
116
  $[0] = props;
183
- $[1] = formControl;
117
+ $[1] = field;
184
118
  $[2] = innerProps;
185
119
  $[3] = ref;
186
120
  } else {
187
- formControl = $[1];
121
+ field = $[1];
188
122
  innerProps = $[2];
189
123
  ref = $[3];
190
124
  }
191
- const controlWithOptions = formControl.control;
125
+ const controlWithOptions = field.form;
192
126
  let t0;
193
127
  if ($[4] !== controlWithOptions || $[5] !== innerProps || $[6] !== props.error || $[7] !== props.isDisabled || $[8] !== ref) {
194
128
  t0 = (t1) => {
195
- const { field, fieldState: t2 } = t1;
129
+ const { field: field_0, fieldState: t2 } = t1;
196
130
  const { error, isDirty } = t2;
197
131
  return /* @__PURE__ */ jsx(QuerySelectContent, {
198
132
  ...innerProps,
199
- ref: mergeRefs(ref, field.ref),
200
- value: field.value,
201
- onChange: field.onChange,
202
- onBlur: field.onBlur,
133
+ ref: mergeRefs(ref, field_0.ref),
134
+ value: field_0.value,
135
+ onChange: field_0.onChange,
136
+ onBlur: field_0.onBlur,
203
137
  isDirty,
204
- isDisabled: field.disabled || props.isDisabled || !!controlWithOptions._options?.disabled,
138
+ isDisabled: field_0.disabled || props.isDisabled || !!controlWithOptions._options?.disabled,
205
139
  error: props.error ?? error?.message
206
140
  });
207
141
  };
@@ -213,14 +147,14 @@ var QuerySelect = (props) => {
213
147
  $[9] = t0;
214
148
  } else t0 = $[9];
215
149
  let t1;
216
- if ($[10] !== formControl.control || $[11] !== formControl.name || $[12] !== t0) {
217
- t1 = /* @__PURE__ */ jsx(Controller, {
218
- control: formControl.control,
219
- name: formControl.name,
150
+ if ($[10] !== field.form || $[11] !== field.name || $[12] !== t0) {
151
+ t1 = /* @__PURE__ */ jsx(FieldController, {
152
+ control: field.form,
153
+ name: field.name,
220
154
  render: t0
221
155
  });
222
- $[10] = formControl.control;
223
- $[11] = formControl.name;
156
+ $[10] = field.form;
157
+ $[11] = field.name;
224
158
  $[12] = t0;
225
159
  $[13] = t1;
226
160
  } else t1 = $[13];
@@ -1,6 +1,6 @@
1
1
  import { ReactElement } from 'react';
2
2
  import { Key } from 'react-aria-components';
3
- import { FieldValues } from 'react-hook-form';
3
+ import { FieldValues } from '../../shared/form.binding';
4
4
  import { SelectBaseProps } from '../shared/SelectBase';
5
5
  import { DefaultInitialSelectItem, GroupedSelectControlProps, GroupedSelectProps, SelectAsyncProps } from '../shared/select.types';
6
6
  import { OmitDiscriminatedUnion } from '../../../../types/common';
@@ -1,6 +1,7 @@
1
1
  import { UIOverrides } from "../../../../config/uiOverrides.context.js";
2
2
  import { Typography } from "../../../text/Typography/Typography.js";
3
3
  import { UIConfig } from "../../../../config/uiConfig.context.js";
4
+ import { FieldController } from "../../shared/form.binding.js";
4
5
  import { InputFrame } from "../../Skeleton/InputFrame.js";
5
6
  import { useStaticInputHandoff } from "../../shared/useStaticInputHandoff.js";
6
7
  import { selectInputTagsContentWrapperDefinition } from "../shared/selectInput.cva.js";
@@ -12,7 +13,6 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
12
13
  import { clsx } from "clsx";
13
14
  import { useRef, useState } from "react";
14
15
  import { mergeRefs } from "@react-aria/utils";
15
- import { Controller } from "react-hook-form";
16
16
  //#region src/components/inputs/Selection/Select/Select.tsx
17
17
  function SelectInner(t0) {
18
18
  const $ = c(6);
@@ -77,12 +77,12 @@ function SelectInner(t0) {
77
77
  };
78
78
  const buttonContent = isMultiple && !isEmpty ? /* @__PURE__ */ jsx(Fragment, { children: "\xA0" }) : isEmpty ? /* @__PURE__ */ jsx(Typography, {
79
79
  size: "label-1",
80
- as: "p",
80
+ as: "span",
81
81
  className: "block truncate text-text-default-3",
82
- children: placeholder || (as === "filter" ? "\xA0" : null)
82
+ children: placeholder
83
83
  }) : /* @__PURE__ */ jsx(Typography, {
84
84
  size: "label-1",
85
- as: "p",
85
+ as: "span",
86
86
  className: "block truncate",
87
87
  children: displayValue
88
88
  });
@@ -163,35 +163,35 @@ function Select(t0) {
163
163
  props = $[1];
164
164
  renderStaticInput = $[2];
165
165
  }
166
- if ("formControl" in props && props.formControl) {
167
- let formControl;
166
+ if ("field" in props && props.field) {
167
+ let field;
168
168
  let innerProps;
169
169
  let ref;
170
170
  if ($[3] !== props) {
171
- ({formControl, ref, ...innerProps} = props);
171
+ ({field, ref, ...innerProps} = props);
172
172
  $[3] = props;
173
- $[4] = formControl;
173
+ $[4] = field;
174
174
  $[5] = innerProps;
175
175
  $[6] = ref;
176
176
  } else {
177
- formControl = $[4];
177
+ field = $[4];
178
178
  innerProps = $[5];
179
179
  ref = $[6];
180
180
  }
181
- const controlWithOptions = formControl.control;
181
+ const controlWithOptions = field.form;
182
182
  let t1;
183
183
  if ($[7] !== controlWithOptions._options?.disabled || $[8] !== innerProps || $[9] !== props.error || $[10] !== props.isDisabled || $[11] !== ref || $[12] !== renderStaticInput) {
184
184
  t1 = (t2) => {
185
- const { field, fieldState: t3 } = t2;
185
+ const { field: field_0, fieldState: t3 } = t2;
186
186
  const { error, isDirty } = t3;
187
187
  return /* @__PURE__ */ jsx(SelectInner, {
188
188
  ...innerProps,
189
- ref: mergeRefs(ref, field.ref),
190
- value: field.value,
191
- onChange: field.onChange,
192
- onBlur: field.onBlur,
189
+ ref: mergeRefs(ref, field_0.ref),
190
+ value: field_0.value,
191
+ onChange: field_0.onChange,
192
+ onBlur: field_0.onBlur,
193
193
  isDirty,
194
- isDisabled: field.disabled || props.isDisabled,
194
+ isDisabled: field_0.disabled || props.isDisabled,
195
195
  isFormControlDisabled: !!controlWithOptions._options?.disabled,
196
196
  error: props.error ?? error?.message,
197
197
  renderStaticInput
@@ -206,14 +206,14 @@ function Select(t0) {
206
206
  $[13] = t1;
207
207
  } else t1 = $[13];
208
208
  let t2;
209
- if ($[14] !== formControl.control || $[15] !== formControl.name || $[16] !== t1) {
210
- t2 = /* @__PURE__ */ jsx(Controller, {
211
- control: formControl.control,
212
- name: formControl.name,
209
+ if ($[14] !== field.form || $[15] !== field.name || $[16] !== t1) {
210
+ t2 = /* @__PURE__ */ jsx(FieldController, {
211
+ control: field.form,
212
+ name: field.name,
213
213
  render: t1
214
214
  });
215
- $[14] = formControl.control;
216
- $[15] = formControl.name;
215
+ $[14] = field.form;
216
+ $[15] = field.name;
217
217
  $[16] = t1;
218
218
  $[17] = t2;
219
219
  } else t2 = $[17];
@@ -25,7 +25,6 @@ export type SelectBaseProps<TKey extends Key = Key, TInitialSelectItem = Default
25
25
  customTrigger?: ReactElement;
26
26
  selectedTagsType?: "tags" | "list";
27
27
  collapseAfter?: number;
28
- fireBlurOnChange?: boolean;
29
28
  searchDebounceDelay?: number;
30
29
  multiSelectAutoConfirm?: boolean;
31
30
  onInputChange?: (value: string) => void;
@@ -7,7 +7,7 @@ import { c } from "react/compiler-runtime";
7
7
  import { jsx } from "react/jsx-runtime";
8
8
  //#region src/components/inputs/Selection/shared/SelectBase.tsx
9
9
  var SelectBase = (dProps) => {
10
- const $ = c(22);
10
+ const $ = c(21);
11
11
  const ui = UIConfig.useConfig();
12
12
  const t0 = dProps.selectionMode ?? ui.select.selectionMode;
13
13
  const t1 = dProps.variant ?? ui.input.variant;
@@ -20,12 +20,11 @@ var SelectBase = (dProps) => {
20
20
  const t8 = dProps.virtualizerOptions || (dProps.totalItems ?? 0) > 100 || dProps.hasLoadMore ? false : dProps.ignoreTriggerWidth ?? false;
21
21
  const t9 = dProps.collapseAfter ?? ui.select.collapseAfter;
22
22
  const t10 = dProps.hideSearchIcon ?? ui.select.hideSearchIcon;
23
- const t11 = dProps.fireBlurOnChange ?? ui.select.fireBlurOnChange;
24
- const t12 = dProps.multiSelectAutoConfirm ?? ui.select.multiSelectAutoConfirm;
25
- const t13 = dProps.ignoreInputValueFiltering ?? dProps.isClientSearchDisabled;
26
- let t14;
27
- if ($[0] !== dProps || $[1] !== t0 || $[2] !== t1 || $[3] !== t10 || $[4] !== t11 || $[5] !== t12 || $[6] !== t13 || $[7] !== t2 || $[8] !== t3 || $[9] !== t4 || $[10] !== t5 || $[11] !== t6 || $[12] !== t7 || $[13] !== t8 || $[14] !== t9) {
28
- t14 = {
23
+ const t11 = dProps.multiSelectAutoConfirm ?? ui.select.multiSelectAutoConfirm;
24
+ const t12 = dProps.ignoreInputValueFiltering ?? dProps.isClientSearchDisabled;
25
+ let t13;
26
+ if ($[0] !== dProps || $[1] !== t0 || $[2] !== t1 || $[3] !== t10 || $[4] !== t11 || $[5] !== t12 || $[6] !== t2 || $[7] !== t3 || $[8] !== t4 || $[9] !== t5 || $[10] !== t6 || $[11] !== t7 || $[12] !== t8 || $[13] !== t9) {
27
+ t13 = {
29
28
  ...dProps,
30
29
  selectionMode: t0,
31
30
  variant: t1,
@@ -38,9 +37,8 @@ var SelectBase = (dProps) => {
38
37
  ignoreTriggerWidth: t8,
39
38
  collapseAfter: t9,
40
39
  hideSearchIcon: t10,
41
- fireBlurOnChange: t11,
42
- multiSelectAutoConfirm: t12,
43
- isClientSearchDisabled: t13
40
+ multiSelectAutoConfirm: t11,
41
+ isClientSearchDisabled: t12
44
42
  };
45
43
  $[0] = dProps;
46
44
  $[1] = t0;
@@ -48,38 +46,37 @@ var SelectBase = (dProps) => {
48
46
  $[3] = t10;
49
47
  $[4] = t11;
50
48
  $[5] = t12;
51
- $[6] = t13;
52
- $[7] = t2;
53
- $[8] = t3;
54
- $[9] = t4;
55
- $[10] = t5;
56
- $[11] = t6;
57
- $[12] = t7;
58
- $[13] = t8;
59
- $[14] = t9;
60
- $[15] = t14;
61
- } else t14 = $[15];
62
- const props = t14;
49
+ $[6] = t2;
50
+ $[7] = t3;
51
+ $[8] = t4;
52
+ $[9] = t5;
53
+ $[10] = t6;
54
+ $[11] = t7;
55
+ $[12] = t8;
56
+ $[13] = t9;
57
+ $[14] = t13;
58
+ } else t13 = $[14];
59
+ const props = t13;
63
60
  const isDesktop = useBreakpoint("md");
64
- const t15 = props;
61
+ const t14 = props;
62
+ let t15;
63
+ if ($[15] !== isDesktop || $[16] !== props) {
64
+ t15 = isDesktop ? /* @__PURE__ */ jsx(SelectDesktop, { ...props }) : /* @__PURE__ */ jsx(SelectMobile, { ...props });
65
+ $[15] = isDesktop;
66
+ $[16] = props;
67
+ $[17] = t15;
68
+ } else t15 = $[17];
65
69
  let t16;
66
- if ($[16] !== isDesktop || $[17] !== props) {
67
- t16 = isDesktop ? /* @__PURE__ */ jsx(SelectDesktop, { ...props }) : /* @__PURE__ */ jsx(SelectMobile, { ...props });
68
- $[16] = isDesktop;
69
- $[17] = props;
70
- $[18] = t16;
71
- } else t16 = $[18];
72
- let t17;
73
- if ($[19] !== t15 || $[20] !== t16) {
74
- t17 = /* @__PURE__ */ jsx(SelectContext.Provider, {
75
- ...t15,
76
- children: t16
70
+ if ($[18] !== t14 || $[19] !== t15) {
71
+ t16 = /* @__PURE__ */ jsx(SelectContext.Provider, {
72
+ ...t14,
73
+ children: t15
77
74
  });
75
+ $[18] = t14;
78
76
  $[19] = t15;
79
77
  $[20] = t16;
80
- $[21] = t17;
81
- } else t17 = $[21];
82
- return t17;
78
+ } else t16 = $[20];
79
+ return t16;
83
80
  };
84
81
  //#endregion
85
82
  export { SelectBase };
@@ -313,6 +313,7 @@ var SelectInput = (t0) => {
313
313
  ...fieldProps,
314
314
  children: [(as === "floating" && isEmpty || isMultiple && !isEmpty) && /* @__PURE__ */ jsx(Fragment, { children: "\xA0" }), (isEmpty || !isMultiple) && (as !== "floating" || !isEmpty) && /* @__PURE__ */ jsxs(Typography, {
315
315
  size: "label-1",
316
+ as: "span",
316
317
  className: clsx("truncate empty:before:inline-block empty:before:content-['']", isEmpty && "text-text-default-3 group-disabled/select-trigger:text-interactive-text-secondary-disabled"),
317
318
  children: [isEmpty && placeholder, !isEmpty && (showSelectionContent ? selectedItems[0].content : selectedItems[0].label)]
318
319
  })]