@povio/ui 3.0.0-rc.1 → 3.0.0-rc.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +4 -2
  2. package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +12 -2
  3. package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +1 -0
  4. package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +12 -5
  5. package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +2 -1
  6. package/dist/components/inputs/DateTime/shared/DatePickerInput.js +188 -205
  7. package/dist/components/inputs/DateTime/shared/datePickerInput.cva.d.ts +0 -11
  8. package/dist/components/inputs/DateTime/shared/datePickerInput.cva.js +3 -2
  9. package/dist/components/inputs/FormField/FormFieldHeader.js +2 -2
  10. package/dist/components/inputs/FormField/formFieldHeader.cva.d.ts +0 -9
  11. package/dist/components/inputs/FormField/formFieldHeader.cva.js +3 -2
  12. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +4 -4
  13. package/dist/components/inputs/Input/TextArea/TextArea.cva.d.ts +0 -4
  14. package/dist/components/inputs/Input/TextArea/TextArea.cva.js +3 -2
  15. package/dist/components/inputs/Input/TextArea/TextArea.js +2 -2
  16. package/dist/components/inputs/Input/shared/InputContent.js +2 -2
  17. package/dist/components/inputs/Inputs/InputItem.d.ts +1 -1
  18. package/dist/components/inputs/RadioGroup/RadioGroup.js +6 -6
  19. package/dist/components/inputs/RadioGroup/radio.cva.d.ts +0 -44
  20. package/dist/components/inputs/RadioGroup/radio.cva.js +3 -3
  21. package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +14 -11
  22. package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +13 -10
  23. package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +1 -0
  24. package/dist/components/inputs/Selection/Select/QuerySelect.js +50 -45
  25. package/dist/components/inputs/Selection/Select/Select.js +3 -1
  26. package/dist/components/inputs/Selection/shared/SelectDesktop.js +5 -5
  27. package/dist/components/inputs/Selection/shared/SelectInput.js +89 -87
  28. package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +2 -2
  29. package/dist/components/inputs/Selection/shared/querySelect.utils.d.ts +5 -3
  30. package/dist/components/inputs/Selection/shared/querySelect.utils.js +18 -11
  31. package/dist/components/inputs/Selection/shared/selectDesktop.cva.d.ts +0 -4
  32. package/dist/components/inputs/Selection/shared/selectDesktop.cva.js +3 -2
  33. package/dist/components/inputs/Selection/shared/selectInput.cva.d.ts +12 -5
  34. package/dist/components/inputs/Selection/shared/selectInput.cva.js +6 -3
  35. package/dist/components/inputs/Selection/shared/staticSelect.utils.js +25 -8
  36. package/dist/components/inputs/Skeleton/InputFrame.js +6 -6
  37. package/dist/components/inputs/shared/TooltipWrapper.js +2 -2
  38. package/dist/components/inputs/shared/input.cva.d.ts +0 -54
  39. package/dist/components/inputs/shared/input.cva.js +3 -5
  40. package/dist/components/inputs/shared/tooltipWrapper.cva.d.ts +0 -4
  41. package/dist/components/inputs/shared/tooltipWrapper.cva.js +3 -2
  42. package/dist/components/text/Typography/typography.cva.d.ts +0 -45
  43. package/dist/components/text/Typography/typography.cva.js +1 -2
  44. package/dist/config/uiConfig.context.d.ts +1 -1
  45. package/dist/config/uiOverrides.context.d.ts +1 -0
  46. package/dist/hooks/useQueryAutocomplete.d.ts +1 -1
  47. package/dist/hooks/useQueryAutocomplete.js +17 -2
  48. package/dist/index.d.ts +8 -2
  49. package/dist/index.js +9 -3
  50. package/package.json +1 -1
@@ -4,10 +4,10 @@ import { Typography } from "../../../text/Typography/Typography.js";
4
4
  import "../../../../config/i18n.js";
5
5
  import { FormFieldLabel } from "../../FormField/FormFieldLabel.js";
6
6
  import { InputClear } from "../../shared/InputClear.js";
7
- import { inputBaseDefinition, inputClearClass, inputSizeDefinition } from "../../shared/input.cva.js";
7
+ import { inputBaseDefinition, inputClearClassDefinition, inputSizeDefinition } from "../../shared/input.cva.js";
8
8
  import { SelectInputTags } from "./SelectInputTags.js";
9
9
  import { SelectContext } from "./select.context.js";
10
- import { selectInputTagsContentWrapperCva } from "./selectInput.cva.js";
10
+ import { selectInputTagsContentWrapperDefinition } from "./selectInput.cva.js";
11
11
  import { useKeyInteractions } from "../../../../hooks/useKeyInteractions.js";
12
12
  import { c } from "react/compiler-runtime";
13
13
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -18,11 +18,12 @@ import { useFocusVisible, useFocusWithin, useHover } from "react-aria";
18
18
  import { useTranslation } from "react-i18next";
19
19
  //#region src/components/inputs/Selection/shared/SelectInput.tsx
20
20
  var SelectInput = (t0) => {
21
- const $0 = c(123);
21
+ const $0 = c(124);
22
22
  const { ref, placeholder, variant, as, size, isDisabled, isInvalid, className, hideDropdownIcon, isSearchable, isClearable, showSelectionContent, inputClassName, fieldProps, headerProps, selectedTagsType, collapseAfter, isRequired, isDirty, onCloseComboBox, onBlur, leadingContent, trailingContent, onMouseEnter, onFocusCapture, ...props } = t0;
23
23
  const inputSizeCva = UIOverrides.useCva("input.sizeCva", inputSizeDefinition);
24
24
  const inputBaseCva = UIOverrides.useCva("input.baseCva", inputBaseDefinition);
25
- const inputClearClassCva = UIOverrides.useCva("input.clearClassCva", inputClearClass);
25
+ const inputClearClassCva = UIOverrides.useCva("input.clearClassCva", inputClearClassDefinition);
26
+ const selectInputTagsContentWrapperCva = UIOverrides.useCva("select.tagsContentWrapperCva", selectInputTagsContentWrapperDefinition);
26
27
  const { t } = useTranslation("ui");
27
28
  const state = use(ComboBoxStateContext);
28
29
  let t1;
@@ -227,7 +228,7 @@ var SelectInput = (t0) => {
227
228
  $0[43] = t35;
228
229
  } else t35 = $0[43];
229
230
  let t36;
230
- if ($0[44] !== as || $0[45] !== collapseAfter || $0[46] !== fieldProps || $0[47] !== inputClassName || $0[48] !== isDisabled || $0[49] !== isSearchable || $0[50] !== onBlur || $0[51] !== onKeyDown || $0[52] !== onRemove || $0[53] !== placeholder || $0[54] !== selectedItems || $0[55] !== selectedTagsType || $0[56] !== showTags) {
231
+ if ($0[44] !== as || $0[45] !== collapseAfter || $0[46] !== fieldProps || $0[47] !== inputClassName || $0[48] !== isDisabled || $0[49] !== isSearchable || $0[50] !== onBlur || $0[51] !== onKeyDown || $0[52] !== onRemove || $0[53] !== placeholder || $0[54] !== selectInputTagsContentWrapperCva || $0[55] !== selectedItems || $0[56] !== selectedTagsType || $0[57] !== showTags) {
231
232
  t36 = (showTags || isSearchable) && /* @__PURE__ */ jsxs("div", {
232
233
  className: selectInputTagsContentWrapperCva({ isSearchable }),
233
234
  children: [showTags && /* @__PURE__ */ jsx(SelectInputTags, {
@@ -255,13 +256,14 @@ var SelectInput = (t0) => {
255
256
  $0[51] = onKeyDown;
256
257
  $0[52] = onRemove;
257
258
  $0[53] = placeholder;
258
- $0[54] = selectedItems;
259
- $0[55] = selectedTagsType;
260
- $0[56] = showTags;
261
- $0[57] = t36;
262
- } else t36 = $0[57];
259
+ $0[54] = selectInputTagsContentWrapperCva;
260
+ $0[55] = selectedItems;
261
+ $0[56] = selectedTagsType;
262
+ $0[57] = showTags;
263
+ $0[58] = t36;
264
+ } else t36 = $0[58];
263
265
  let t37;
264
- if ($0[58] !== as || $0[59] !== fieldProps || $0[60] !== isDisabled || $0[61] !== isEmpty || $0[62] !== isMultiple || $0[63] !== isOpen || $0[64] !== isSearchable || $0[65] !== onBlur || $0[66] !== onTriggerKeyDown || $0[67] !== placeholder || $0[68] !== selectedItems[0] || $0[69] !== setIsOpen || $0[70] !== showSelectionContent || $0[71] !== showTags) {
266
+ if ($0[59] !== as || $0[60] !== fieldProps || $0[61] !== isDisabled || $0[62] !== isEmpty || $0[63] !== isMultiple || $0[64] !== isOpen || $0[65] !== isSearchable || $0[66] !== onBlur || $0[67] !== onTriggerKeyDown || $0[68] !== placeholder || $0[69] !== selectedItems[0] || $0[70] !== setIsOpen || $0[71] !== showSelectionContent || $0[72] !== showTags) {
265
267
  t37 = !isSearchable && /* @__PURE__ */ jsxs(Button, {
266
268
  isDisabled,
267
269
  onPress: () => setIsOpen(!isOpen),
@@ -276,24 +278,24 @@ var SelectInput = (t0) => {
276
278
  children: [isEmpty && placeholder, !isEmpty && (showSelectionContent ? selectedItems[0].content : selectedItems[0].label)]
277
279
  })]
278
280
  });
279
- $0[58] = as;
280
- $0[59] = fieldProps;
281
- $0[60] = isDisabled;
282
- $0[61] = isEmpty;
283
- $0[62] = isMultiple;
284
- $0[63] = isOpen;
285
- $0[64] = isSearchable;
286
- $0[65] = onBlur;
287
- $0[66] = onTriggerKeyDown;
288
- $0[67] = placeholder;
289
- $0[68] = selectedItems[0];
290
- $0[69] = setIsOpen;
291
- $0[70] = showSelectionContent;
292
- $0[71] = showTags;
293
- $0[72] = t37;
294
- } else t37 = $0[72];
281
+ $0[59] = as;
282
+ $0[60] = fieldProps;
283
+ $0[61] = isDisabled;
284
+ $0[62] = isEmpty;
285
+ $0[63] = isMultiple;
286
+ $0[64] = isOpen;
287
+ $0[65] = isSearchable;
288
+ $0[66] = onBlur;
289
+ $0[67] = onTriggerKeyDown;
290
+ $0[68] = placeholder;
291
+ $0[69] = selectedItems[0];
292
+ $0[70] = setIsOpen;
293
+ $0[71] = showSelectionContent;
294
+ $0[72] = showTags;
295
+ $0[73] = t37;
296
+ } else t37 = $0[73];
295
297
  let t38;
296
- if ($0[73] !== onClick || $0[74] !== t33 || $0[75] !== t34 || $0[76] !== t35 || $0[77] !== t36 || $0[78] !== t37) {
298
+ if ($0[74] !== onClick || $0[75] !== t33 || $0[76] !== t34 || $0[77] !== t35 || $0[78] !== t36 || $0[79] !== t37) {
297
299
  t38 = /* @__PURE__ */ jsxs("div", {
298
300
  className: t33,
299
301
  onClick,
@@ -304,16 +306,16 @@ var SelectInput = (t0) => {
304
306
  t37
305
307
  ]
306
308
  });
307
- $0[73] = onClick;
308
- $0[74] = t33;
309
- $0[75] = t34;
310
- $0[76] = t35;
311
- $0[77] = t36;
312
- $0[78] = t37;
313
- $0[79] = t38;
314
- } else t38 = $0[79];
309
+ $0[74] = onClick;
310
+ $0[75] = t33;
311
+ $0[76] = t34;
312
+ $0[77] = t35;
313
+ $0[78] = t36;
314
+ $0[79] = t37;
315
+ $0[80] = t38;
316
+ } else t38 = $0[80];
315
317
  let t39;
316
- if ($0[80] !== as || $0[81] !== inputClearClassCva || $0[82] !== isClearable || $0[83] !== isDisabled || $0[84] !== onClear || $0[85] !== showClearButton) {
318
+ if ($0[81] !== as || $0[82] !== inputClearClassCva || $0[83] !== isClearable || $0[84] !== isDisabled || $0[85] !== onClear || $0[86] !== showClearButton) {
317
319
  t39 = isClearable && !isDisabled && /* @__PURE__ */ jsx(InputClear, {
318
320
  onClear: () => {
319
321
  onClear();
@@ -321,25 +323,25 @@ var SelectInput = (t0) => {
321
323
  className: inputClearClassCva({ as }),
322
324
  show: showClearButton
323
325
  });
324
- $0[80] = as;
325
- $0[81] = inputClearClassCva;
326
- $0[82] = isClearable;
327
- $0[83] = isDisabled;
328
- $0[84] = onClear;
329
- $0[85] = showClearButton;
330
- $0[86] = t39;
331
- } else t39 = $0[86];
326
+ $0[81] = as;
327
+ $0[82] = inputClearClassCva;
328
+ $0[83] = isClearable;
329
+ $0[84] = isDisabled;
330
+ $0[85] = onClear;
331
+ $0[86] = showClearButton;
332
+ $0[87] = t39;
333
+ } else t39 = $0[87];
332
334
  let t40;
333
- if ($0[87] !== trailingContent) {
335
+ if ($0[88] !== trailingContent) {
334
336
  t40 = trailingContent && /* @__PURE__ */ jsx("div", {
335
337
  className: "flex shrink-0 items-center",
336
338
  children: trailingContent
337
339
  });
338
- $0[87] = trailingContent;
339
- $0[88] = t40;
340
- } else t40 = $0[88];
340
+ $0[88] = trailingContent;
341
+ $0[89] = t40;
342
+ } else t40 = $0[89];
341
343
  let t41;
342
- if ($0[89] !== hideDropdownIcon || $0[90] !== inputSizeCva || $0[91] !== isDisabled || $0[92] !== isOpen || $0[93] !== isSearchable || $0[94] !== setIsOpen || $0[95] !== size || $0[96] !== t) {
344
+ if ($0[90] !== hideDropdownIcon || $0[91] !== inputSizeCva || $0[92] !== isDisabled || $0[93] !== isOpen || $0[94] !== isSearchable || $0[95] !== setIsOpen || $0[96] !== size || $0[97] !== t) {
343
345
  t41 = !hideDropdownIcon && /* @__PURE__ */ jsx(Button, {
344
346
  excludeFromTabOrder: true,
345
347
  "aria-label": t(($) => isOpen ? $.ui.closeAlt : $.ui.openAlt),
@@ -353,18 +355,18 @@ var SelectInput = (t0) => {
353
355
  "aria-hidden": "true"
354
356
  })
355
357
  });
356
- $0[89] = hideDropdownIcon;
357
- $0[90] = inputSizeCva;
358
- $0[91] = isDisabled;
359
- $0[92] = isOpen;
360
- $0[93] = isSearchable;
361
- $0[94] = setIsOpen;
362
- $0[95] = size;
363
- $0[96] = t;
364
- $0[97] = t41;
365
- } else t41 = $0[97];
358
+ $0[90] = hideDropdownIcon;
359
+ $0[91] = inputSizeCva;
360
+ $0[92] = isDisabled;
361
+ $0[93] = isOpen;
362
+ $0[94] = isSearchable;
363
+ $0[95] = setIsOpen;
364
+ $0[96] = size;
365
+ $0[97] = t;
366
+ $0[98] = t41;
367
+ } else t41 = $0[98];
366
368
  let t42;
367
- if ($0[98] !== focusWithinProps || $0[99] !== hoverProps || $0[100] !== onFocusCapture || $0[101] !== onMouseEnter || $0[102] !== ref || $0[103] !== t16 || $0[104] !== t18 || $0[105] !== t19 || $0[106] !== t20 || $0[107] !== t21 || $0[108] !== t22 || $0[109] !== t23 || $0[110] !== t24 || $0[111] !== t25 || $0[112] !== t26 || $0[113] !== t27 || $0[114] !== t28 || $0[115] !== t29 || $0[116] !== t30 || $0[117] !== t31 || $0[118] !== t38 || $0[119] !== t39 || $0[120] !== t40 || $0[121] !== t41) {
369
+ if ($0[99] !== focusWithinProps || $0[100] !== hoverProps || $0[101] !== onFocusCapture || $0[102] !== onMouseEnter || $0[103] !== ref || $0[104] !== t16 || $0[105] !== t18 || $0[106] !== t19 || $0[107] !== t20 || $0[108] !== t21 || $0[109] !== t22 || $0[110] !== t23 || $0[111] !== t24 || $0[112] !== t25 || $0[113] !== t26 || $0[114] !== t27 || $0[115] !== t28 || $0[116] !== t29 || $0[117] !== t30 || $0[118] !== t31 || $0[119] !== t38 || $0[120] !== t39 || $0[121] !== t40 || $0[122] !== t41) {
368
370
  t42 = /* @__PURE__ */ jsxs("div", {
369
371
  ref,
370
372
  className: t16,
@@ -395,32 +397,32 @@ var SelectInput = (t0) => {
395
397
  t41
396
398
  ]
397
399
  });
398
- $0[98] = focusWithinProps;
399
- $0[99] = hoverProps;
400
- $0[100] = onFocusCapture;
401
- $0[101] = onMouseEnter;
402
- $0[102] = ref;
403
- $0[103] = t16;
404
- $0[104] = t18;
405
- $0[105] = t19;
406
- $0[106] = t20;
407
- $0[107] = t21;
408
- $0[108] = t22;
409
- $0[109] = t23;
410
- $0[110] = t24;
411
- $0[111] = t25;
412
- $0[112] = t26;
413
- $0[113] = t27;
414
- $0[114] = t28;
415
- $0[115] = t29;
416
- $0[116] = t30;
417
- $0[117] = t31;
418
- $0[118] = t38;
419
- $0[119] = t39;
420
- $0[120] = t40;
421
- $0[121] = t41;
422
- $0[122] = t42;
423
- } else t42 = $0[122];
400
+ $0[99] = focusWithinProps;
401
+ $0[100] = hoverProps;
402
+ $0[101] = onFocusCapture;
403
+ $0[102] = onMouseEnter;
404
+ $0[103] = ref;
405
+ $0[104] = t16;
406
+ $0[105] = t18;
407
+ $0[106] = t19;
408
+ $0[107] = t20;
409
+ $0[108] = t21;
410
+ $0[109] = t22;
411
+ $0[110] = t23;
412
+ $0[111] = t24;
413
+ $0[112] = t25;
414
+ $0[113] = t26;
415
+ $0[114] = t27;
416
+ $0[115] = t28;
417
+ $0[116] = t29;
418
+ $0[117] = t30;
419
+ $0[118] = t31;
420
+ $0[119] = t38;
421
+ $0[120] = t39;
422
+ $0[121] = t40;
423
+ $0[122] = t41;
424
+ $0[123] = t42;
425
+ } else t42 = $0[123];
424
426
  return t42;
425
427
  };
426
428
  //#endregion
@@ -1,6 +1,6 @@
1
1
  import { ArrowDropDownIcon } from "../../../../assets/icons/ArrowDropDown.js";
2
2
  import { UIOverrides } from "../../../../config/uiOverrides.context.js";
3
- import { inputSize } from "../../shared/input.cva.js";
3
+ import { inputSizeDefinition } from "../../shared/input.cva.js";
4
4
  import { c } from "react/compiler-runtime";
5
5
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
6
  import { clsx } from "clsx";
@@ -8,7 +8,7 @@ import { clsx } from "clsx";
8
8
  var StaticSelectTrailingContent = (t0) => {
9
9
  const $ = c(10);
10
10
  const { trailingContent, hideDropdownIcon, isDisabled, size } = t0;
11
- const inputSizeCva = UIOverrides.useCva("input.sizeCva", inputSize);
11
+ const inputSizeCva = UIOverrides.useCva("input.sizeCva", inputSizeDefinition);
12
12
  if (!trailingContent && hideDropdownIcon) return null;
13
13
  let t1;
14
14
  if ($[0] !== trailingContent) {
@@ -3,10 +3,12 @@ import { Key } from 'react-aria-components';
3
3
  import { SelectItem } from './select.types';
4
4
  export type QueryFn<TData = any> = (...args: any[]) => UseQueryResult<TData> | UseInfiniteQueryResult<TData>;
5
5
  export type QueryDataType<TQueryFn extends QueryFn> = Exclude<ReturnType<TQueryFn>["data"], undefined>;
6
- export declare const isInitialSelectionLabelMissing: <TInitialSelectItem>(initialSelection: TInitialSelectItem | TInitialSelectItem[] | null | undefined, mapInitialToSelectItem?: (item: TInitialSelectItem) => SelectItem) => boolean;
7
- export declare const shouldEnableQueryForSelection: <TInitialSelectItem, TKey extends Key = Key>({ initialSelection, value, mapInitialToSelectItem, }: {
6
+ export declare const getSelectionIdsToResolve: <TInitialSelectItem, TKey extends Key = Key>({ initialSelection, value, mapInitialToSelectItem, }: {
8
7
  initialSelection: TInitialSelectItem | TInitialSelectItem[] | null | undefined;
9
8
  value: TKey | TKey[] | null | undefined;
10
9
  mapInitialToSelectItem?: (item: TInitialSelectItem) => SelectItem<TKey>;
11
- }) => boolean;
10
+ }) => {
11
+ count: number;
12
+ items: TKey[];
13
+ };
12
14
  export declare const getQueryItems: <TQueryFn extends QueryFn, TKey extends Key = Key>(data: QueryDataType<TQueryFn> | undefined, queryMap?: (data: QueryDataType<TQueryFn>) => SelectItem<TKey>[]) => SelectItem<TKey>[];
@@ -9,18 +9,25 @@ var getInitialSelectionItems = (initialSelection) => {
9
9
  return Array.isArray(initialSelection) ? initialSelection : initialSelection != null ? [initialSelection] : [];
10
10
  };
11
11
  var getInitialSelectionLabel = (initialSelection, mapInitialToSelectItem) => mapInitialToSelectItem?.(initialSelection).label ?? getDefaultInitialSelectionLabel(initialSelection);
12
- var isInitialSelectionLabelMissing = (initialSelection, mapInitialToSelectItem) => {
13
- return getInitialSelectionItems(initialSelection).some((item) => {
14
- return getInitialSelectionLabel(item, mapInitialToSelectItem) === "";
15
- });
16
- };
17
- var shouldEnableQueryForSelection = ({ initialSelection, value, mapInitialToSelectItem }) => {
18
- if (isInitialSelectionLabelMissing(initialSelection, mapInitialToSelectItem)) return true;
12
+ var getSelectionIdsToResolve = ({ initialSelection, value, mapInitialToSelectItem }) => {
19
13
  const values = Array.isArray(value) ? value : value != null ? [value] : [];
20
- if (values.length === 0) return false;
21
14
  const initialSelections = getInitialSelectionItems(initialSelection);
22
- const labeledInitialSelectionIds = new Set(initialSelections.filter((item) => getInitialSelectionLabel(item, mapInitialToSelectItem) !== "").map((item) => mapInitialToSelectItem?.(item).id ?? item.id));
23
- return values.some((id) => !labeledInitialSelectionIds.has(id));
15
+ const labeledInitialSelectionIds = /* @__PURE__ */ new Set();
16
+ const missingLabelInitialSelectionIds = [];
17
+ initialSelections.forEach((item) => {
18
+ const id = (mapInitialToSelectItem?.(item))?.id ?? item.id;
19
+ if (id == null) return;
20
+ if (getInitialSelectionLabel(item, mapInitialToSelectItem) === "") {
21
+ missingLabelInitialSelectionIds.push(id);
22
+ return;
23
+ }
24
+ labeledInitialSelectionIds.add(id);
25
+ });
26
+ const items = Array.from(new Set([...missingLabelInitialSelectionIds, ...values.filter((id) => !labeledInitialSelectionIds.has(id))]));
27
+ return {
28
+ count: items.length,
29
+ items
30
+ };
24
31
  };
25
32
  var getQueryItems = (data, queryMap) => {
26
33
  if (!data) return [];
@@ -33,4 +40,4 @@ var getQueryItems = (data, queryMap) => {
33
40
  return [];
34
41
  };
35
42
  //#endregion
36
- export { getQueryItems, shouldEnableQueryForSelection };
43
+ export { getQueryItems, getSelectionIdsToResolve };
@@ -3,8 +3,4 @@ export declare const selectPopoverDefinition: {
3
3
  base: string[];
4
4
  config?: import("../../../../utils/style-merge.util").StyleMergeUtils.Config<Record<never, never>>;
5
5
  };
6
- export declare const selectPopoverCva: {
7
- base: string[];
8
- config?: import("../../../../utils/style-merge.util").StyleMergeUtils.Config<Record<never, never>>;
9
- };
10
6
  export type SelectPopoverCva = UIOverrides.VariantProps<NonNullable<typeof selectPopoverDefinition.config>>;
@@ -1,4 +1,5 @@
1
1
  import { UIOverrides } from "../../../../config/uiOverrides.context.js";
2
- var selectPopoverCva = UIOverrides.defineConfig({ base: ["my-4 outline-none"] });
2
+ //#region src/components/inputs/Selection/shared/selectDesktop.cva.ts
3
+ var selectPopoverDefinition = UIOverrides.defineConfig({ base: ["my-4 outline-none"] });
3
4
  //#endregion
4
- export { selectPopoverCva };
5
+ export { selectPopoverDefinition };
@@ -1,5 +1,12 @@
1
- import { VariantProps } from 'class-variance-authority';
2
- export declare const selectInputTagsContentWrapperCva: (props?: ({
3
- isSearchable?: boolean | null | undefined;
4
- } & import('class-variance-authority/types').ClassProp) | undefined) => string;
5
- export type SelectInputTagsContentWrapperCva = VariantProps<typeof selectInputTagsContentWrapperCva>;
1
+ import { UIOverrides } from '../../../../config/uiOverrides.context';
2
+ export declare const selectInputTagsContentWrapperDefinition: {
3
+ base: string[];
4
+ config: import("../../../../utils/style-merge.util").StyleMergeUtils.Config<{
5
+ readonly isSearchable: {
6
+ readonly false: "pointer-events-none z-1";
7
+ };
8
+ }>;
9
+ };
10
+ export type SelectInputTagsContentWrapperConfig = NonNullable<typeof selectInputTagsContentWrapperDefinition.config>;
11
+ export interface SelectInputTagsContentWrapperVariantProps extends UIOverrides.VariantProps<SelectInputTagsContentWrapperConfig> {
12
+ }
@@ -1,5 +1,8 @@
1
- import { cva } from "class-variance-authority";
1
+ import { UIOverrides } from "../../../../config/uiOverrides.context.js";
2
2
  //#region src/components/inputs/Selection/shared/selectInput.cva.ts
3
- var selectInputTagsContentWrapperCva = cva("flex flex-1 flex-wrap gap-input-gap-input-text-to-elements truncate", { variants: { isSearchable: { false: "pointer-events-none z-1" } } });
3
+ var selectInputTagsContentWrapperDefinition = UIOverrides.defineConfig({
4
+ base: ["flex flex-1 flex-wrap gap-input-gap-input-text-to-elements truncate"],
5
+ config: { variants: { isSearchable: { false: "pointer-events-none z-1" } } }
6
+ });
4
7
  //#endregion
5
- export { selectInputTagsContentWrapperCva };
8
+ export { selectInputTagsContentWrapperDefinition };
@@ -1,6 +1,24 @@
1
1
  import { SelectInputTags } from "./SelectInputTags.js";
2
2
  import { jsx } from "react/jsx-runtime";
3
3
  //#region src/components/inputs/Selection/shared/staticSelect.utils.tsx
4
+ var getStaticMultipleDisplayValue = ({ selectedItems, isDisabled, collapseAfter, selectedTagsType }) => {
5
+ if (selectedItems.length === 0) return "";
6
+ return /* @__PURE__ */ jsx(SelectInputTags, {
7
+ selectedItems,
8
+ isDisabled,
9
+ collapseAfter,
10
+ selectedTagsType,
11
+ onRemove: () => void 0
12
+ });
13
+ };
14
+ var getStaticSingleDisplayValue = ({ selectedItem, showSelectionContent }) => {
15
+ if (!selectedItem) return "";
16
+ if (showSelectionContent && selectedItem.content) return selectedItem.content;
17
+ return /* @__PURE__ */ jsx("div", {
18
+ className: "min-w-0 flex-1 truncate",
19
+ children: selectedItem.label
20
+ });
21
+ };
4
22
  var getStaticSelectValue = ({ items, value, selectionMode, initialSelection, mapInitialToSelectItem = ((item) => ({
5
23
  id: item.id,
6
24
  label: item.label ?? item.name ?? ""
@@ -14,22 +32,21 @@ var getStaticSelectValue = ({ items, value, selectionMode, initialSelection, map
14
32
  if (selectionMode === "multiple") return {
15
33
  selectedItem,
16
34
  selectedItems,
17
- displayValue: selectedItems.length > 0 ? /* @__PURE__ */ jsx(SelectInputTags, {
35
+ displayValue: getStaticMultipleDisplayValue({
18
36
  selectedItems,
19
37
  isDisabled,
20
38
  collapseAfter,
21
- selectedTagsType,
22
- onRemove: () => void 0
23
- }) : "",
39
+ selectedTagsType
40
+ }),
24
41
  isEmpty: selectedItems.length === 0
25
42
  };
26
43
  return {
27
44
  selectedItem,
28
45
  selectedItems,
29
- displayValue: selectedItem != null ? showSelectionContent && selectedItem.content ? selectedItem.content : /* @__PURE__ */ jsx("div", {
30
- className: "min-w-0 flex-1 truncate",
31
- children: selectedItem.label
32
- }) : "",
46
+ displayValue: getStaticSingleDisplayValue({
47
+ selectedItem,
48
+ showSelectionContent
49
+ }),
33
50
  isEmpty: selectedItem == null
34
51
  };
35
52
  };
@@ -1,11 +1,11 @@
1
1
  import { UIOverrides } from "../../../config/uiOverrides.context.js";
2
- import { typography } from "../../text/Typography/typography.cva.js";
2
+ import { typographyDefinition } from "../../text/Typography/typography.cva.js";
3
3
  import { Loader } from "../../status/Loader/Loader.js";
4
4
  import { UIConfig } from "../../../config/uiConfig.context.js";
5
5
  import { InlineIconButton } from "../../buttons/InlineIconButton/InlineIconButton.js";
6
6
  import { FormFieldLabel } from "../FormField/FormFieldLabel.js";
7
7
  import { InputClear } from "../shared/InputClear.js";
8
- import { inputBase, inputContentWrapper, inputSize } from "../shared/input.cva.js";
8
+ import { inputBaseDefinition, inputContentWrapperDefinition, inputSizeDefinition } from "../shared/input.cva.js";
9
9
  import { FormField } from "../FormField/FormField.js";
10
10
  import { TooltipWrapper } from "../shared/TooltipWrapper.js";
11
11
  import { c } from "react/compiler-runtime";
@@ -16,10 +16,10 @@ import { isValidElement, useId } from "react";
16
16
  var InputFrame = (props) => {
17
17
  const $ = c(189);
18
18
  const ui = UIConfig.useConfig();
19
- const inputBaseCva = UIOverrides.useCva("input.baseCva", inputBase);
20
- const inputSizeCva = UIOverrides.useCva("input.sizeCva", inputSize);
21
- const inputContentWrapperCva = UIOverrides.useCva("input.contentWrapperCva", inputContentWrapper);
22
- const typographyCva = UIOverrides.useCva("typography.cva", typography);
19
+ const inputBaseCva = UIOverrides.useCva("input.baseCva", inputBaseDefinition);
20
+ const inputSizeCva = UIOverrides.useCva("input.sizeCva", inputSizeDefinition);
21
+ const inputContentWrapperCva = UIOverrides.useCva("input.contentWrapperCva", inputContentWrapperDefinition);
22
+ const typographyCva = UIOverrides.useCva("typography.cva", typographyDefinition);
23
23
  const generatedInputId = useId();
24
24
  const { ref, children, formFieldRef, labelProps: labelPropsProp, headerProps, error, label, tooltipText, helperText, isRequired, rightContent, isDisabled, isHeaderHidden, hideLabel: hideLabelProp, headerClassName, errorClassName, className, leadingContent, leadingIcon, actionContent, actionContentPlacement: t0, trailingContent, trailingIcon, trailingAction, unit, isLoading, action, isClearable: isClearableProp, showClear, renderStatic, onStaticInteract, clearClassName, onClear, dataAttributes, typographySize, id: idProp, inputClassName, contentClassName, contentWrapperClassName, contentGroup: t1, contentAndTrailingClassName, wrapContentAndTrailing, wrapTrailingContent: t2, reserveTrailingContent, labelPlacement: t3, trailingClassName, onMouseEnter, onFocusCapture, variant: variantProp, as: asProp, size: sizeProp } = props;
25
25
  const actionContentPlacement = t0 === void 0 ? "content-wrapper" : t0;
@@ -1,12 +1,12 @@
1
1
  import { UIOverrides } from "../../../config/uiOverrides.context.js";
2
2
  import { Tooltip } from "../../overlays/Tooltip/Tooltip.js";
3
- import { tooltipWrapperTrigger } from "./tooltipWrapper.cva.js";
3
+ import { tooltipWrapperTriggerDefinition } from "./tooltipWrapper.cva.js";
4
4
  import { c } from "react/compiler-runtime";
5
5
  import { jsx } from "react/jsx-runtime";
6
6
  //#region src/components/inputs/shared/TooltipWrapper.tsx
7
7
  var TooltipWrapper = (props) => {
8
8
  const $ = c(14);
9
- const tooltipWrapperTriggerCva = UIOverrides.useCva("tooltipWrapper.triggerCva", tooltipWrapperTrigger);
9
+ const tooltipWrapperTriggerCva = UIOverrides.useCva("tooltipWrapper.triggerCva", tooltipWrapperTriggerDefinition);
10
10
  if (props.as !== "inline") return props.children;
11
11
  const t0 = props.error || void 0;
12
12
  const t1 = !props.error;
@@ -38,38 +38,6 @@ export declare const inputSizeDefinition: {
38
38
  export type InputSizeConfig = NonNullable<typeof inputSizeDefinition.config>;
39
39
  export interface InputSizeProps extends UIOverrides.VariantProps<InputSizeConfig> {
40
40
  }
41
- export declare const inputBase: {
42
- base: string[];
43
- config: import("../../../utils/style-merge.util").StyleMergeUtils.Config<{
44
- readonly variant: {
45
- readonly outlined: "";
46
- readonly filled: "";
47
- };
48
- readonly as: {
49
- readonly default: "rounded-input-rounding-default";
50
- readonly floating: "rounded-input-rounding-default";
51
- readonly filter: "rounded-input-rounding-default";
52
- readonly inline: ["h-full", "border-transparent border-b-0 bg-transparent text-text-default-1", "hover:border-input-outlined-outline-hover", "focus-within:border-input-outlined-outline-active", "invalid:border-input-outlined-outline-error", "has-invalid:border-input-outlined-outline-error", "disabled:hover:border-transparent", "has-disabled:hover:border-transparent"];
53
- };
54
- }>;
55
- };
56
- export declare const inputSize: {
57
- base: string[];
58
- config: import("../../../utils/style-merge.util").StyleMergeUtils.Config<{
59
- readonly size: {
60
- readonly "extra-small": "text-label-1";
61
- readonly small: "text-label-1";
62
- readonly default: "text-label-1";
63
- readonly large: "text-label-1";
64
- };
65
- readonly as: {
66
- readonly default: "";
67
- readonly floating: ["px-input-side-m", "py-floating-label-input-height-empty", "input-filled:pb-[calc(var(--spacing-floating-label-input-height-filled)+var(--spacing-floating-label-input-offset-bottom))]", "input-filled:pt-[calc(var(--spacing-floating-label-input-height-filled)+var(--spacing-floating-label-input-offset-top)+var(--text-label-3--line-height)*var(--text-label-3))]"];
68
- readonly filter: "";
69
- readonly inline: "";
70
- };
71
- }>;
72
- };
73
41
  export declare const inputContentWrapperDefinition: {
74
42
  base: string[];
75
43
  config: import("../../../utils/style-merge.util").StyleMergeUtils.Config<{
@@ -81,17 +49,6 @@ export declare const inputContentWrapperDefinition: {
81
49
  };
82
50
  }>;
83
51
  };
84
- export declare const inputContentWrapper: {
85
- base: string[];
86
- config: import("../../../utils/style-merge.util").StyleMergeUtils.Config<{
87
- readonly as: {
88
- readonly default: "";
89
- readonly floating: "flex-col";
90
- readonly filter: "gap-input-gap-input-text-to-elements";
91
- readonly inline: "";
92
- };
93
- }>;
94
- };
95
52
  export type InputContentWrapperConfig = NonNullable<typeof inputContentWrapperDefinition.config>;
96
53
  export interface InputContentWrapperProps extends UIOverrides.VariantProps<InputContentWrapperConfig> {
97
54
  }
@@ -106,17 +63,6 @@ export declare const inputClearClassDefinition: {
106
63
  };
107
64
  }>;
108
65
  };
109
- export declare const inputClearClass: {
110
- base: string[];
111
- config: import("../../../utils/style-merge.util").StyleMergeUtils.Config<{
112
- readonly as: {
113
- readonly default: "";
114
- readonly floating: "";
115
- readonly filter: "";
116
- readonly inline: "";
117
- };
118
- }>;
119
- };
120
66
  export type InputClearClassConfig = NonNullable<typeof inputClearClassDefinition.config>;
121
67
  export interface InputClearClassProps extends UIOverrides.VariantProps<InputClearClassConfig> {
122
68
  }
@@ -209,9 +209,7 @@ var inputSizeDefinition = UIOverrides.defineConfig({
209
209
  }
210
210
  }
211
211
  });
212
- var inputBase = inputBaseDefinition;
213
- var inputSize = inputSizeDefinition;
214
- var inputContentWrapper = UIOverrides.defineConfig({
212
+ var inputContentWrapperDefinition = UIOverrides.defineConfig({
215
213
  base: ["flex w-full"],
216
214
  config: {
217
215
  variants: { as: {
@@ -223,7 +221,7 @@ var inputContentWrapper = UIOverrides.defineConfig({
223
221
  defaultVariants: { as: "default" }
224
222
  }
225
223
  });
226
- var inputClearClass = UIOverrides.defineConfig({
224
+ var inputClearClassDefinition = UIOverrides.defineConfig({
227
225
  base: [""],
228
226
  config: {
229
227
  variants: { as: {
@@ -333,4 +331,4 @@ var useInputCva = () => {
333
331
  return t0;
334
332
  };
335
333
  //#endregion
336
- export { inputBase, inputBaseDefinition, inputClearClass, inputContentWrapper, inputSideDefinition, inputSize, inputSizeDefinition, useInputCva };
334
+ export { inputBaseDefinition, inputClearClassDefinition, inputContentWrapperDefinition, inputSideDefinition, inputSizeDefinition, useInputCva };
@@ -3,10 +3,6 @@ export declare const tooltipWrapperTriggerDefinition: {
3
3
  base: string[];
4
4
  config?: import("../../../utils/style-merge.util").StyleMergeUtils.Config<Record<never, never>>;
5
5
  };
6
- export declare const tooltipWrapperTrigger: {
7
- base: string[];
8
- config?: import("../../../utils/style-merge.util").StyleMergeUtils.Config<Record<never, never>>;
9
- };
10
6
  export type TooltipWrapperTriggerConfig = NonNullable<typeof tooltipWrapperTriggerDefinition.config>;
11
7
  export interface TooltipWrapperTriggerVariantProps extends UIOverrides.VariantProps<TooltipWrapperTriggerConfig> {
12
8
  }
@@ -1,4 +1,5 @@
1
1
  import { UIOverrides } from "../../../config/uiOverrides.context.js";
2
- var tooltipWrapperTrigger = UIOverrides.defineConfig({ base: ["inline-flex"] });
2
+ //#region src/components/inputs/shared/tooltipWrapper.cva.ts
3
+ var tooltipWrapperTriggerDefinition = UIOverrides.defineConfig({ base: ["inline-flex"] });
3
4
  //#endregion
4
- export { tooltipWrapperTrigger };
5
+ export { tooltipWrapperTriggerDefinition };