@povio/ui 2.3.0-rc.39 → 2.3.0-rc.40

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 (49) hide show
  1. package/dist/components/inputs/Checkbox/Checkbox.js +50 -45
  2. package/dist/components/inputs/Checkbox/checkbox.cva.js +2 -0
  3. package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +25 -6
  4. package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +31 -7
  5. package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +18 -5
  6. package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +97 -68
  7. package/dist/components/inputs/DateTime/shared/DatePickerInput.js +131 -136
  8. package/dist/components/inputs/DateTime/shared/DateSegmentItem.d.ts +1 -1
  9. package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +39 -37
  10. package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.d.ts +9 -1
  11. package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.js +43 -7
  12. package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.d.ts +16 -8
  13. package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.js +43 -40
  14. package/dist/components/inputs/File/InputUpload.js +1 -1
  15. package/dist/components/inputs/File/shared/InputUploadFilled.js +1 -1
  16. package/dist/components/inputs/Input/NumberInput/NumberInput.js +103 -97
  17. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +2 -2
  18. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +52 -29
  19. package/dist/components/inputs/Input/TextArea/TextArea.js +2 -2
  20. package/dist/components/inputs/Input/TextInput/TextInput.js +2 -1
  21. package/dist/components/inputs/RadioGroup/RadioGroup.js +29 -43
  22. package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +1 -0
  23. package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +2 -2
  24. package/dist/components/inputs/Selection/Select/QuerySelect.js +45 -63
  25. package/dist/components/inputs/Selection/Select/Select.js +1 -0
  26. package/dist/components/inputs/Selection/shared/SelectDesktop.js +2 -2
  27. package/dist/components/inputs/Selection/shared/SelectInput.js +54 -53
  28. package/dist/components/inputs/Selection/shared/SelectMobile.js +3 -2
  29. package/dist/components/inputs/Selection/shared/querySelect.utils.d.ts +1 -0
  30. package/dist/components/inputs/Selection/shared/querySelect.utils.js +12 -1
  31. package/dist/components/inputs/Selection/shared/select.context.js +3 -1
  32. package/dist/components/inputs/Skeleton/InputFrame.d.ts +1 -0
  33. package/dist/components/inputs/Skeleton/InputFrame.js +100 -92
  34. package/dist/components/inputs/Slider/Slider.d.ts +2 -1
  35. package/dist/components/inputs/Slider/Slider.js +170 -156
  36. package/dist/components/inputs/TextEditor/TextEditor.js +1 -1
  37. package/dist/components/inputs/Toggle/Toggle.js +70 -64
  38. package/dist/components/inputs/Toggle/toggle.cva.js +2 -1
  39. package/dist/components/inputs/shared/InputClear.js +71 -61
  40. package/dist/components/inputs/shared/input.cva.js +22 -10
  41. package/dist/components/inputs/shared/label.cva.js +2 -2
  42. package/dist/components/overlays/BottomSheet/BottomSheet.js +26 -2
  43. package/dist/config/uiConfig.context.d.ts +3 -1
  44. package/dist/config/uiConfig.context.js +2 -1
  45. package/dist/tw-ui-plugin.js +6 -1
  46. package/dist/utils/date-time.utils.d.ts +5 -0
  47. package/dist/utils/date-time.utils.js +10 -0
  48. package/dist/utils/dom.utils.js +1 -1
  49. package/package.json +1 -1
@@ -1,82 +1,85 @@
1
+ import { Typography } from "../../../text/Typography/Typography.js";
1
2
  import { DateSegmentItemView } from "./DateSegmentItem.js";
2
3
  import { DateTimeUtils } from "../../../../utils/date-time.utils.js";
3
4
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
5
  //#region src/components/inputs/DateTime/shared/staticDateTimeSegments.tsx
5
- var getStaticCalendarDateSegments = ({ value, locale, shouldForceLeadingZeros, isDisabled, hidePlaceholder }) => {
6
- const hasValue = !!value;
7
- return renderStaticSegments(value ? DateTimeUtils.formatCalendarDateLocalized(value, locale, { shouldForceLeadingZeros }) : DateTimeUtils.getDatePlaceholder(locale, { shouldForceLeadingZeros }), {
8
- isPlaceholder: !hasValue,
9
- isInputEmpty: !hasValue,
6
+ var getStaticCalendarDateSegments = ({ value, locale, shouldForceLeadingZeros, isDisabled, hidePlaceholder, disableManualEntry, placeholder, dateGranularity = "day" }) => {
7
+ if (disableManualEntry && placeholder && !value) return getStaticDateTimePlaceholder(placeholder);
8
+ return renderStaticDateTimeParts(DateTimeUtils.formatCalendarDatePartsLocalized(value, locale, { shouldForceLeadingZeros }), {
10
9
  isDisabled,
11
- hidePlaceholder
10
+ hidePlaceholder,
11
+ dateGranularity
12
12
  });
13
13
  };
14
- var getStaticCalendarDateTimeSegments = ({ value, locale, shouldForceLeadingZeros, isDisabled, hidePlaceholder }) => {
14
+ var getStaticCalendarDateTimeSegments = ({ value, locale, shouldForceLeadingZeros, isDisabled, hidePlaceholder, disableManualEntry, placeholder }) => {
15
15
  const hasValue = !!(value && "hour" in value);
16
- return renderStaticSegments(hasValue ? DateTimeUtils.formatCalendarDateTimeLocalized(value, locale, { shouldForceLeadingZeros }) : DateTimeUtils.getDateTimePlaceholder(locale, { shouldForceLeadingZeros }), {
17
- isPlaceholder: !hasValue,
18
- isInputEmpty: !hasValue,
16
+ if (disableManualEntry && placeholder && !hasValue) return getStaticDateTimePlaceholder(placeholder);
17
+ return renderStaticDateTimeParts(DateTimeUtils.formatCalendarDateTimePartsLocalized(hasValue ? value : null, locale, { shouldForceLeadingZeros }), {
19
18
  isDisabled,
20
19
  hidePlaceholder,
21
20
  segmentRole: "spinbutton"
22
21
  });
23
22
  };
24
- var getStaticDateRangeSegments = ({ start, end, locale, shouldForceLeadingZeros, isDisabled, hidePlaceholder }) => {
25
- const defaultPlaceholder = DateTimeUtils.getDatePlaceholder(locale, { shouldForceLeadingZeros });
23
+ var getStaticDateRangeSegments = ({ start, end, locale, shouldForceLeadingZeros, isDisabled, hidePlaceholder, disableManualEntry, placeholder }) => {
24
+ if (disableManualEntry && placeholder && !start && !end) return getStaticDateTimePlaceholder(placeholder);
25
+ const showSeparator = !hidePlaceholder;
26
26
  return /* @__PURE__ */ jsxs(Fragment, { children: [
27
- renderStaticSegments(start ? DateTimeUtils.formatCalendarDateLocalized(start, locale, { shouldForceLeadingZeros }) : defaultPlaceholder, {
28
- isPlaceholder: !start,
29
- isInputEmpty: !start,
27
+ renderStaticDateTimeParts(DateTimeUtils.formatCalendarDatePartsLocalized(start, locale, { shouldForceLeadingZeros }), {
30
28
  isDisabled,
31
29
  hidePlaceholder: hidePlaceholder && !start
32
30
  }),
33
- /* @__PURE__ */ jsx("span", {
31
+ showSeparator && /* @__PURE__ */ jsx("span", {
34
32
  className: isDisabled ? "pointer-events-none select-none text-interactive-text-secondary-disabled" : "pointer-events-none select-none",
35
33
  children: "–"
36
34
  }),
37
- renderStaticSegments(end ? DateTimeUtils.formatCalendarDateLocalized(end, locale, { shouldForceLeadingZeros }) : defaultPlaceholder, {
38
- isPlaceholder: !end,
39
- isInputEmpty: !end,
35
+ renderStaticDateTimeParts(DateTimeUtils.formatCalendarDatePartsLocalized(end, locale, { shouldForceLeadingZeros }), {
40
36
  isDisabled,
41
37
  hidePlaceholder: hidePlaceholder && !end
42
38
  })
43
39
  ] });
44
40
  };
45
- var getStaticTimeSegments = ({ value, locale, isDisabled, hidePlaceholder }) => {
46
- const hasValue = !!value;
47
- return renderStaticSegments(value ? DateTimeUtils.formatTimeLocalized(value, locale) : DateTimeUtils.getTimePlaceholder(locale), {
48
- isPlaceholder: !hasValue,
49
- isInputEmpty: !hasValue,
41
+ var getStaticTimeSegments = ({ value, locale, isDisabled, hidePlaceholder, disableManualEntry, placeholder }) => {
42
+ if (disableManualEntry && placeholder && !value) return getStaticDateTimePlaceholder(placeholder);
43
+ return renderStaticDateTimeParts(DateTimeUtils.formatTimePartsLocalized(value, locale), {
50
44
  isDisabled,
51
45
  hidePlaceholder,
52
46
  timePickerOnly: true
53
47
  });
54
48
  };
55
- var renderStaticSegments = (value, options) => {
49
+ var getStaticDateTimePlaceholder = (placeholder) => /* @__PURE__ */ jsx(Typography, {
50
+ size: "label-1",
51
+ className: "text-text-default-3",
52
+ children: placeholder
53
+ });
54
+ var renderStaticDateTimeParts = (parts, options) => {
56
55
  return /* @__PURE__ */ jsx("div", {
57
56
  className: "flex",
58
- children: tokenizeStaticSegmentText(value).map((token, index) => /* @__PURE__ */ jsx(DateSegmentItemView, {
59
- type: token.type,
60
- text: getStaticSegmentText(token),
61
- placeholder: getStaticSegmentText(token),
62
- isPlaceholder: options.isPlaceholder && token.type !== "literal",
63
- isInputEmpty: options.isInputEmpty,
57
+ children: getStaticDateTimePartsToRender(parts, options.dateGranularity).map((part, index) => /* @__PURE__ */ jsx(DateSegmentItemView, {
58
+ type: part.type,
59
+ text: part.value,
60
+ placeholder: part.placeholder,
61
+ isPlaceholder: part.isPlaceholder && part.type !== "literal",
62
+ isInputEmpty: parts.some((item) => item.type !== "literal" && item.isPlaceholder),
64
63
  isDisabled: options.isDisabled,
65
64
  timePickerOnly: options.timePickerOnly,
66
65
  hidePlaceholder: options.hidePlaceholder,
67
- role: token.type === "literal" ? void 0 : options.segmentRole
66
+ role: part.type === "literal" ? void 0 : options.segmentRole
68
67
  }, index))
69
68
  });
70
69
  };
71
- var tokenizeStaticSegmentText = (value) => {
72
- return (value.match(/(\p{Letter}+|\p{Number}+|[^\p{Letter}\p{Number}]+)/gu) ?? [value]).map((text) => ({
73
- text,
74
- type: /^[^\p{Letter}\p{Number}]+$/u.test(text) ? "literal" : "day"
75
- }));
70
+ var getStaticDateTimePartsToRender = (parts, dateGranularity = "day") => {
71
+ const segments = [];
72
+ for (const part of parts) if (part.type !== "literal") {
73
+ if (isStaticDatePartVisible(part.type, dateGranularity)) segments.push(part);
74
+ } else if (segments.length > 0 && segments.at(-1)?.type !== "literal") segments.push(part);
75
+ if (segments.at(-1)?.type === "literal") segments.pop();
76
+ return segments;
76
77
  };
77
- var getStaticSegmentText = (token) => {
78
- if (token.type !== "literal") return token.text;
79
- return token.text.replaceAll(" ", "\xA0");
78
+ var isStaticDatePartVisible = (type, dateGranularity) => {
79
+ if (dateGranularity === "day") return true;
80
+ if (dateGranularity === "month") return type !== "day";
81
+ if (dateGranularity === "year") return type === "year";
82
+ return true;
80
83
  };
81
84
  //#endregion
82
85
  export { getStaticCalendarDateSegments, getStaticCalendarDateTimeSegments, getStaticDateRangeSegments, getStaticTimeSegments };
@@ -234,7 +234,7 @@ var InputUploadBase = (t0) => {
234
234
  const handleRemove = t11;
235
235
  let t12;
236
236
  if ($[58] !== className) {
237
- t12 = clsx("w-full", className);
237
+ t12 = clsx("group w-full", className);
238
238
  $[58] = className;
239
239
  $[59] = t12;
240
240
  } else t12 = $[59];
@@ -30,7 +30,7 @@ var InputUploadFilled = (t0) => {
30
30
  variant: "default",
31
31
  size: "label-1",
32
32
  as: "span",
33
- className: "flex-fill select-none truncate text-ellipsis text-text-default-1",
33
+ className: "flex-fill select-none truncate text-ellipsis text-text-default-1 input-disabled:text-text-default-3",
34
34
  children: t2
35
35
  });
36
36
  $[5] = t2;
@@ -18,7 +18,7 @@ import { Controller } from "react-hook-form";
18
18
  import { useNumberFieldState } from "react-stately";
19
19
  //#region src/components/inputs/Input/NumberInput/NumberInput.tsx
20
20
  var NumberInputBase = (props) => {
21
- const $ = c(89);
21
+ const $ = c(90);
22
22
  const ui = UIConfig.useConfig();
23
23
  const inputBaseCva = UIStyle.useCva("input.baseCva", inputBase);
24
24
  const hasControlledValue = "value" in props;
@@ -57,7 +57,8 @@ var NumberInputBase = (props) => {
57
57
  locale,
58
58
  formatOptions
59
59
  };
60
- const { labelProps, inputProps } = useNumberField(numberProps, useNumberFieldState(numberProps), numberFieldRef);
60
+ const state = useNumberFieldState(numberProps);
61
+ const { labelProps, inputProps } = useNumberField(numberProps, state, numberFieldRef);
61
62
  let t2;
62
63
  let t3;
63
64
  if ($[4] !== autoFocusOnMount || $[5] !== isDisabled) {
@@ -116,13 +117,17 @@ var NumberInputBase = (props) => {
116
117
  } else t6 = $[21];
117
118
  const handleInputBlur = t6;
118
119
  let t7;
119
- if ($[22] !== onChange) {
120
- t7 = (val) => onChange?.(val === "" ? null : Number(val));
120
+ if ($[22] !== onChange || $[23] !== state) {
121
+ t7 = (val) => {
122
+ if (val === "") state.setInputValue("");
123
+ onChange?.(val === "" ? null : Number(val));
124
+ };
121
125
  $[22] = onChange;
122
- $[23] = t7;
123
- } else t7 = $[23];
126
+ $[23] = state;
127
+ $[24] = t7;
128
+ } else t7 = $[24];
124
129
  let t8;
125
- if ($[24] !== action || $[25] !== handleInputBlur || $[26] !== isClearable || $[27] !== isDisabled || $[28] !== isLoading || $[29] !== leadingIcon || $[30] !== t7 || $[31] !== trailingIcon || $[32] !== unit || $[33] !== value) {
130
+ if ($[25] !== action || $[26] !== handleInputBlur || $[27] !== isClearable || $[28] !== isDisabled || $[29] !== isLoading || $[30] !== leadingIcon || $[31] !== state.inputValue || $[32] !== t7 || $[33] !== trailingIcon || $[34] !== unit) {
126
131
  t8 = {
127
132
  unit,
128
133
  isLoading,
@@ -131,26 +136,26 @@ var NumberInputBase = (props) => {
131
136
  leadingIcon,
132
137
  trailingIcon,
133
138
  isClearable,
134
- value,
135
139
  onChange: t7,
140
+ value: state.inputValue,
136
141
  onBlur: handleInputBlur
137
142
  };
138
- $[24] = action;
139
- $[25] = handleInputBlur;
140
- $[26] = isClearable;
141
- $[27] = isDisabled;
142
- $[28] = isLoading;
143
- $[29] = leadingIcon;
144
- $[30] = t7;
145
- $[31] = trailingIcon;
146
- $[32] = unit;
147
- $[33] = value;
148
- $[34] = t8;
149
- } else t8 = $[34];
143
+ $[25] = action;
144
+ $[26] = handleInputBlur;
145
+ $[27] = isClearable;
146
+ $[28] = isDisabled;
147
+ $[29] = isLoading;
148
+ $[30] = leadingIcon;
149
+ $[31] = state.inputValue;
150
+ $[32] = t7;
151
+ $[33] = trailingIcon;
152
+ $[34] = unit;
153
+ $[35] = t8;
154
+ } else t8 = $[35];
150
155
  const inputContentProps = t8;
151
156
  const t9 = hideLabel || isHeaderHidden;
152
157
  let t10;
153
- if ($[35] !== headerClassName || $[36] !== helperText || $[37] !== isDisabled || $[38] !== isRequired || $[39] !== label || $[40] !== labelProps || $[41] !== rightContent || $[42] !== t9 || $[43] !== tooltipText) {
158
+ if ($[36] !== headerClassName || $[37] !== helperText || $[38] !== isDisabled || $[39] !== isRequired || $[40] !== label || $[41] !== labelProps || $[42] !== rightContent || $[43] !== t9 || $[44] !== tooltipText) {
154
159
  t10 = {
155
160
  label,
156
161
  tooltipText,
@@ -162,28 +167,28 @@ var NumberInputBase = (props) => {
162
167
  className: headerClassName,
163
168
  labelProps
164
169
  };
165
- $[35] = headerClassName;
166
- $[36] = helperText;
167
- $[37] = isDisabled;
168
- $[38] = isRequired;
169
- $[39] = label;
170
- $[40] = labelProps;
171
- $[41] = rightContent;
172
- $[42] = t9;
173
- $[43] = tooltipText;
174
- $[44] = t10;
175
- } else t10 = $[44];
170
+ $[36] = headerClassName;
171
+ $[37] = helperText;
172
+ $[38] = isDisabled;
173
+ $[39] = isRequired;
174
+ $[40] = label;
175
+ $[41] = labelProps;
176
+ $[42] = rightContent;
177
+ $[43] = t9;
178
+ $[44] = tooltipText;
179
+ $[45] = t10;
180
+ } else t10 = $[45];
176
181
  const headerProps = t10;
177
182
  const dataIsDisabled = isDisabled || void 0;
178
183
  const T0 = TooltipWrapper;
179
184
  const t11 = as === "inline" ? -1 : void 0;
180
185
  const T1 = FormField;
181
186
  let t12;
182
- if ($[45] !== className) {
187
+ if ($[46] !== className) {
183
188
  t12 = clsx("group w-full", className);
184
- $[45] = className;
185
- $[46] = t12;
186
- } else t12 = $[46];
189
+ $[46] = className;
190
+ $[47] = t12;
191
+ } else t12 = $[47];
187
192
  const t13 = as === "inline" ? -1 : void 0;
188
193
  const t14 = clsx("relative flex cursor-text has-disabled:cursor-default", inputBaseCva({
189
194
  variant,
@@ -191,35 +196,35 @@ var NumberInputBase = (props) => {
191
196
  ...rest
192
197
  }), inputClassName);
193
198
  let t15;
194
- if ($[47] === Symbol.for("react.memo_cache_sentinel")) {
199
+ if ($[48] === Symbol.for("react.memo_cache_sentinel")) {
195
200
  t15 = () => inputRef.current?.focus();
196
- $[47] = t15;
197
- } else t15 = $[47];
201
+ $[48] = t15;
202
+ } else t15 = $[48];
198
203
  const t16 = value === null || value === void 0 || void 0;
199
204
  const t17 = isRequired || void 0;
200
205
  let t18;
201
- if ($[48] !== ref) {
202
- t18 = mergeRefs(ref, inputRef);
203
- $[48] = ref;
204
- $[49] = t18;
205
- } else t18 = $[49];
206
+ if ($[49] !== ref) {
207
+ t18 = mergeRefs(ref, inputRef, numberFieldRef);
208
+ $[49] = ref;
209
+ $[50] = t18;
210
+ } else t18 = $[50];
206
211
  const t19 = isDirty || void 0;
207
212
  const t20 = isRequired || void 0;
208
- const t21 = value === null || value === void 0 || void 0;
213
+ const t21 = state.inputValue === "" || state.inputValue === void 0 || state.inputValue === null || void 0;
209
214
  const t22 = !("" + value === "" || value === null || value === void 0) || void 0;
210
215
  const t23 = as === "floating" ? "\xA0" : inputProps.placeholder;
211
216
  let t24;
212
- if ($[50] !== inputProps || $[51] !== isFocusVisible) {
217
+ if ($[51] !== inputProps || $[52] !== isFocusVisible) {
213
218
  t24 = (e_1) => {
214
219
  inputProps.onFocus?.(e_1);
215
220
  if (isFocusVisible) e_1.target.select();
216
221
  };
217
- $[50] = inputProps;
218
- $[51] = isFocusVisible;
219
- $[52] = t24;
220
- } else t24 = $[52];
222
+ $[51] = inputProps;
223
+ $[52] = isFocusVisible;
224
+ $[53] = t24;
225
+ } else t24 = $[53];
221
226
  let t25;
222
- if ($[53] !== dataIsDisabled || $[54] !== inputProps || $[55] !== t18 || $[56] !== t19 || $[57] !== t20 || $[58] !== t21 || $[59] !== t22 || $[60] !== t23 || $[61] !== t24) {
227
+ if ($[54] !== dataIsDisabled || $[55] !== inputProps || $[56] !== t18 || $[57] !== t19 || $[58] !== t20 || $[59] !== t21 || $[60] !== t22 || $[61] !== t23 || $[62] !== t24) {
223
228
  t25 = /* @__PURE__ */ jsx(Input, {
224
229
  ...inputProps,
225
230
  ref: t18,
@@ -232,19 +237,19 @@ var NumberInputBase = (props) => {
232
237
  className: "w-full bg-transparent outline-none",
233
238
  onFocus: t24
234
239
  });
235
- $[53] = dataIsDisabled;
236
- $[54] = inputProps;
237
- $[55] = t18;
238
- $[56] = t19;
239
- $[57] = t20;
240
- $[58] = t21;
241
- $[59] = t22;
242
- $[60] = t23;
243
- $[61] = t24;
244
- $[62] = t25;
245
- } else t25 = $[62];
240
+ $[54] = dataIsDisabled;
241
+ $[55] = inputProps;
242
+ $[56] = t18;
243
+ $[57] = t19;
244
+ $[58] = t20;
245
+ $[59] = t21;
246
+ $[60] = t22;
247
+ $[61] = t23;
248
+ $[62] = t24;
249
+ $[63] = t25;
250
+ } else t25 = $[63];
246
251
  let t26;
247
- if ($[63] !== as || $[64] !== headerProps || $[65] !== inputContentProps || $[66] !== size || $[67] !== t25) {
252
+ if ($[64] !== as || $[65] !== headerProps || $[66] !== inputContentProps || $[67] !== size || $[68] !== t25) {
248
253
  t26 = /* @__PURE__ */ jsx(InputContent, {
249
254
  ...inputContentProps,
250
255
  headerProps,
@@ -252,15 +257,15 @@ var NumberInputBase = (props) => {
252
257
  size,
253
258
  children: t25
254
259
  });
255
- $[63] = as;
256
- $[64] = headerProps;
257
- $[65] = inputContentProps;
258
- $[66] = size;
259
- $[67] = t25;
260
- $[68] = t26;
261
- } else t26 = $[68];
260
+ $[64] = as;
261
+ $[65] = headerProps;
262
+ $[66] = inputContentProps;
263
+ $[67] = size;
264
+ $[68] = t25;
265
+ $[69] = t26;
266
+ } else t26 = $[69];
262
267
  let t27;
263
- if ($[69] !== dataIsDisabled || $[70] !== t14 || $[71] !== t16 || $[72] !== t17 || $[73] !== t26) {
268
+ if ($[70] !== dataIsDisabled || $[71] !== t14 || $[72] !== t16 || $[73] !== t17 || $[74] !== t26) {
264
269
  t27 = /* @__PURE__ */ jsx("div", {
265
270
  className: t14,
266
271
  onClick: t15,
@@ -269,15 +274,15 @@ var NumberInputBase = (props) => {
269
274
  "data-is-disabled": dataIsDisabled,
270
275
  children: t26
271
276
  });
272
- $[69] = dataIsDisabled;
273
- $[70] = t14;
274
- $[71] = t16;
275
- $[72] = t17;
276
- $[73] = t26;
277
- $[74] = t27;
278
- } else t27 = $[74];
277
+ $[70] = dataIsDisabled;
278
+ $[71] = t14;
279
+ $[72] = t16;
280
+ $[73] = t17;
281
+ $[74] = t26;
282
+ $[75] = t27;
283
+ } else t27 = $[75];
279
284
  let t28;
280
- if ($[75] !== T1 || $[76] !== as || $[77] !== formFieldProps || $[78] !== labelProps || $[79] !== t12 || $[80] !== t13 || $[81] !== t27) {
285
+ if ($[76] !== T1 || $[77] !== as || $[78] !== formFieldProps || $[79] !== labelProps || $[80] !== t12 || $[81] !== t13 || $[82] !== t27) {
281
286
  t28 = /* @__PURE__ */ jsx(T1, {
282
287
  ...formFieldProps,
283
288
  as,
@@ -286,30 +291,30 @@ var NumberInputBase = (props) => {
286
291
  tabIndex: t13,
287
292
  children: t27
288
293
  });
289
- $[75] = T1;
290
- $[76] = as;
291
- $[77] = formFieldProps;
292
- $[78] = labelProps;
293
- $[79] = t12;
294
- $[80] = t13;
295
- $[81] = t27;
296
- $[82] = t28;
297
- } else t28 = $[82];
294
+ $[76] = T1;
295
+ $[77] = as;
296
+ $[78] = formFieldProps;
297
+ $[79] = labelProps;
298
+ $[80] = t12;
299
+ $[81] = t13;
300
+ $[82] = t27;
301
+ $[83] = t28;
302
+ } else t28 = $[83];
298
303
  let t29;
299
- if ($[83] !== T0 || $[84] !== as || $[85] !== error || $[86] !== t11 || $[87] !== t28) {
304
+ if ($[84] !== T0 || $[85] !== as || $[86] !== error || $[87] !== t11 || $[88] !== t28) {
300
305
  t29 = /* @__PURE__ */ jsx(T0, {
301
306
  as,
302
307
  error,
303
308
  triggerTabIndex: t11,
304
309
  children: t28
305
310
  });
306
- $[83] = T0;
307
- $[84] = as;
308
- $[85] = error;
309
- $[86] = t11;
310
- $[87] = t28;
311
- $[88] = t29;
312
- } else t29 = $[88];
311
+ $[84] = T0;
312
+ $[85] = as;
313
+ $[86] = error;
314
+ $[87] = t11;
315
+ $[88] = t28;
316
+ $[89] = t29;
317
+ } else t29 = $[89];
313
318
  return t29;
314
319
  };
315
320
  var NumberInputInner = (t0) => {
@@ -369,6 +374,7 @@ var NumberInputInner = (t0) => {
369
374
  contentClassName: t6,
370
375
  trailingClassName: "py-0! pl-0!",
371
376
  wrapContentAndTrailing: true,
377
+ reserveTrailingContent: true,
372
378
  children: (dataAttributeProps) => /* @__PURE__ */ jsx("input", {
373
379
  type: "text",
374
380
  ref: inputRef,
@@ -377,7 +383,7 @@ var NumberInputInner = (t0) => {
377
383
  tabIndex: -1,
378
384
  value: displayValue,
379
385
  placeholder: as === "floating" ? "" : props.placeholder,
380
- className: "w-full bg-transparent outline-none placeholder:text-text-default-3 disabled:text-interactive-text-secondary-disabled",
386
+ className: "w-full bg-transparent outline-none",
381
387
  onChange: (event) => replayStaticInputChange(event.target.value),
382
388
  ...dataAttributeProps,
383
389
  "data-rac": true
@@ -185,9 +185,9 @@ var NumberRangeValueField = (t0) => {
185
185
  } else t14 = $[51];
186
186
  let t15;
187
187
  if ($[52] !== isClearable || $[53] !== isDisabled || $[54] !== onClear || $[55] !== value) {
188
- t15 = isClearable && /* @__PURE__ */ jsx(InputClear, {
188
+ t15 = isClearable && !isDisabled && /* @__PURE__ */ jsx(InputClear, {
189
189
  onClear,
190
- show: value !== null && !isDisabled
190
+ show: value !== null
191
191
  });
192
192
  $[52] = isClearable;
193
193
  $[53] = isDisabled;
@@ -1,5 +1,6 @@
1
1
  import { UIStyle } from "../../../../config/uiStyle.context.js";
2
2
  import { UIConfig } from "../../../../config/uiConfig.context.js";
3
+ import { FormFieldLabel } from "../../FormField/FormFieldLabel.js";
3
4
  import { InputClear } from "../../shared/InputClear.js";
4
5
  import { inputBase, inputSize } from "../../shared/input.cva.js";
5
6
  import { InputFrame } from "../../Skeleton/InputFrame.js";
@@ -421,39 +422,61 @@ var NumberRangeInputInner = (t0) => {
421
422
  children: (t2) => {
422
423
  const { id, ...dataAttributeProps } = t2;
423
424
  return /* @__PURE__ */ jsxs(Fragment, { children: [
424
- /* @__PURE__ */ jsx("input", {
425
- id,
426
- readOnly: true,
427
- disabled: isDisabled,
428
- tabIndex: -1,
429
- value: minDisplay ?? "",
430
- placeholder: props.minPlaceholder ?? "Min",
431
- className: clsx("w-full bg-transparent outline-none placeholder:text-text-default-3 disabled:text-interactive-text-secondary-disabled", props.minInputClassName),
432
- ...dataAttributeProps,
433
- "data-rac": true
434
- }),
435
- isClearable && /* @__PURE__ */ jsx(InputClear, {
436
- onClear: _temp,
437
- renderStatic: true
425
+ /* @__PURE__ */ jsxs("div", {
426
+ className: "min-w-0 flex-1",
427
+ children: [/* @__PURE__ */ jsx(FormFieldLabel, {
428
+ label: props.minLabel ?? "Minimum",
429
+ isRequired: props.isRequired,
430
+ isDisabled,
431
+ className: clsx((props.hideInnerLabels ?? true) && "sr-only")
432
+ }), /* @__PURE__ */ jsxs("div", {
433
+ className: "flex items-center gap-input-gap-trailing-elements",
434
+ children: [/* @__PURE__ */ jsx("input", {
435
+ id,
436
+ readOnly: true,
437
+ disabled: isDisabled,
438
+ tabIndex: -1,
439
+ value: minDisplay ?? "",
440
+ placeholder: props.minPlaceholder ?? "Min",
441
+ className: clsx("w-full min-w-0 bg-transparent outline-none", props.minInputClassName),
442
+ ...dataAttributeProps,
443
+ "data-rac": true
444
+ }), isClearable && /* @__PURE__ */ jsx(InputClear, {
445
+ onClear: _temp,
446
+ show: staticValue.min !== null,
447
+ renderStatic: true
448
+ })]
449
+ })]
438
450
  }),
439
451
  /* @__PURE__ */ jsx("span", {
440
452
  className: "pointer-events-none shrink-0 select-none text-label-2 text-text-default-3",
441
453
  children: "-"
442
454
  }),
443
- /* @__PURE__ */ jsx("input", {
444
- id: `${id}-max`,
445
- readOnly: true,
446
- disabled: isDisabled,
447
- tabIndex: -1,
448
- value: maxDisplay ?? "",
449
- placeholder: props.maxPlaceholder ?? "Max",
450
- className: clsx("w-full bg-transparent outline-none placeholder:text-text-default-3 disabled:text-interactive-text-secondary-disabled", props.maxInputClassName),
451
- ...dataAttributeProps,
452
- "data-rac": true
453
- }),
454
- isClearable && /* @__PURE__ */ jsx(InputClear, {
455
- onClear: _temp2,
456
- renderStatic: true
455
+ /* @__PURE__ */ jsxs("div", {
456
+ className: "min-w-0 flex-1",
457
+ children: [/* @__PURE__ */ jsx(FormFieldLabel, {
458
+ label: props.maxLabel ?? "Maximum",
459
+ isRequired: props.isRequired,
460
+ isDisabled,
461
+ className: clsx((props.hideInnerLabels ?? true) && "sr-only")
462
+ }), /* @__PURE__ */ jsxs("div", {
463
+ className: "flex items-center gap-input-gap-trailing-elements",
464
+ children: [/* @__PURE__ */ jsx("input", {
465
+ id: `${id}-max`,
466
+ readOnly: true,
467
+ disabled: isDisabled,
468
+ tabIndex: -1,
469
+ value: maxDisplay ?? "",
470
+ placeholder: props.maxPlaceholder ?? "Max",
471
+ className: clsx("w-full min-w-0 bg-transparent outline-none", props.maxInputClassName),
472
+ ...dataAttributeProps,
473
+ "data-rac": true
474
+ }), isClearable && /* @__PURE__ */ jsx(InputClear, {
475
+ onClear: _temp2,
476
+ show: staticValue.max !== null,
477
+ renderStatic: true
478
+ })]
479
+ })]
457
480
  })
458
481
  ] });
459
482
  }
@@ -507,7 +530,7 @@ var NumberRangeInput = (t0) => {
507
530
  value: field.value ?? EMPTY_RANGE,
508
531
  onChange: field.onChange,
509
532
  onBlur: field.onBlur,
510
- isDisabled: field.disabled || props.isDisabled,
533
+ isDisabled: field.disabled || !!controlWithOptions._options?.disabled || props.isDisabled,
511
534
  isFormControlDisabled: !!controlWithOptions._options?.disabled,
512
535
  error: props.error ?? error?.message,
513
536
  renderStaticInput
@@ -95,7 +95,7 @@ var TextAreaBase = (props) => {
95
95
  className: headerClassName,
96
96
  labelProps
97
97
  };
98
- showClear = isClearable && value != null && value !== "";
98
+ showClear = isClearable && value != null && value !== "" && !isDisabled;
99
99
  T1 = TooltipWrapper;
100
100
  t11 = as;
101
101
  t12 = error;
@@ -105,7 +105,7 @@ var TextAreaBase = (props) => {
105
105
  t7 = as;
106
106
  t8 = labelProps;
107
107
  if ($[43] !== className) {
108
- t9 = clsx("w-full", className);
108
+ t9 = clsx("group w-full", className);
109
109
  $[43] = className;
110
110
  $[44] = t9;
111
111
  } else t9 = $[44];
@@ -343,6 +343,7 @@ var TextInputInner = (t0) => {
343
343
  contentClassName: t6,
344
344
  trailingClassName: "py-0! pl-0!",
345
345
  wrapContentAndTrailing: true,
346
+ reserveTrailingContent: true,
346
347
  children: (dataAttributeProps) => /* @__PURE__ */ jsx("input", {
347
348
  ref: inputRef,
348
349
  type: inputType === "hidden" ? "password" : inputType,
@@ -350,7 +351,7 @@ var TextInputInner = (t0) => {
350
351
  tabIndex: -1,
351
352
  value: displayValue,
352
353
  placeholder: as === "floating" ? "" : props.placeholder,
353
- className: "w-full bg-transparent outline-none placeholder:text-text-default-3 disabled:text-interactive-text-secondary-disabled",
354
+ className: "w-full bg-transparent outline-none",
354
355
  onChange: (event) => replayStaticInputChange(event.target.value),
355
356
  ...dataAttributeProps,
356
357
  "data-rac": true