@povio/ui 2.3.2-rc.3 → 2.3.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 (284) hide show
  1. package/dist/assets/icons/AlignCenter.js +11 -26
  2. package/dist/assets/icons/AlignLeft.js +11 -26
  3. package/dist/assets/icons/AlignLeftRight.js +11 -26
  4. package/dist/assets/icons/AlignRight.js +11 -26
  5. package/dist/assets/icons/ArrowDropDown.js +11 -26
  6. package/dist/assets/icons/ArrowDropUp.js +11 -26
  7. package/dist/assets/icons/ArrowLeft.js +11 -26
  8. package/dist/assets/icons/ArrowRight.js +11 -26
  9. package/dist/assets/icons/Bold.js +11 -26
  10. package/dist/assets/icons/BulletedList.js +11 -26
  11. package/dist/assets/icons/Calendar.js +13 -28
  12. package/dist/assets/icons/Check.js +13 -28
  13. package/dist/assets/icons/CheckCircle.js +11 -26
  14. package/dist/assets/icons/CheckboxCheckmark.js +14 -29
  15. package/dist/assets/icons/CheckboxIndeterminate.js +14 -29
  16. package/dist/assets/icons/ChevronDown.js +13 -28
  17. package/dist/assets/icons/ChevronLeft.js +13 -28
  18. package/dist/assets/icons/ChevronRight.js +13 -28
  19. package/dist/assets/icons/ChevronUp.js +13 -28
  20. package/dist/assets/icons/ChevronsLeft.js +13 -28
  21. package/dist/assets/icons/ChevronsRight.js +13 -28
  22. package/dist/assets/icons/Clock.js +11 -26
  23. package/dist/assets/icons/Close.js +11 -26
  24. package/dist/assets/icons/DateTime.js +14 -35
  25. package/dist/assets/icons/DragIndicator.js +11 -26
  26. package/dist/assets/icons/File.js +13 -28
  27. package/dist/assets/icons/Highlight.js +11 -26
  28. package/dist/assets/icons/HighlightOn.js +15 -49
  29. package/dist/assets/icons/Home.js +11 -26
  30. package/dist/assets/icons/Info.js +16 -37
  31. package/dist/assets/icons/Italic.js +11 -26
  32. package/dist/assets/icons/Link.js +11 -26
  33. package/dist/assets/icons/Menu.js +11 -26
  34. package/dist/assets/icons/NumberedList.js +11 -26
  35. package/dist/assets/icons/PointerHorizontal.js +11 -26
  36. package/dist/assets/icons/PointerVertical.js +11 -26
  37. package/dist/assets/icons/Search.js +11 -26
  38. package/dist/assets/icons/Send.js +13 -28
  39. package/dist/assets/icons/Strikethrough.js +11 -26
  40. package/dist/assets/icons/TextColor.js +14 -48
  41. package/dist/assets/icons/Today.js +11 -26
  42. package/dist/assets/icons/Underlined.js +13 -28
  43. package/dist/assets/icons/Upload.js +14 -35
  44. package/dist/assets/icons/Visibility.js +11 -26
  45. package/dist/assets/icons/VisibilityOff.js +11 -26
  46. package/dist/assets/icons/WarningFilled.js +13 -28
  47. package/dist/assets/locales/sl/translation.json.js +2 -2
  48. package/dist/components/Breadcrumbs/Breadcrumbs.js +56 -207
  49. package/dist/components/Menu/Menu.js +2 -18
  50. package/dist/components/Menu/MenuDesktop.js +7 -41
  51. package/dist/components/Menu/MenuItem.js +9 -32
  52. package/dist/components/Menu/MenuMobile.js +38 -97
  53. package/dist/components/Menu/MenuPopover.js +29 -105
  54. package/dist/components/buttons/IconButton/IconButton.js +8 -40
  55. package/dist/components/buttons/InlineIconButton/InlineIconButton.d.ts +1 -2
  56. package/dist/components/buttons/InlineIconButton/InlineIconButton.js +9 -34
  57. package/dist/components/buttons/PillButton/PillButton.js +17 -55
  58. package/dist/components/buttons/SplitButton/SplitButton.js +18 -103
  59. package/dist/components/buttons/TextButton/TextButton.js +8 -30
  60. package/dist/components/buttons/ToggleButton/ToggleButton.js +8 -28
  61. package/dist/components/buttons/shared/ButtonContent.js +22 -80
  62. package/dist/components/inputs/Checkbox/Checkbox.d.ts +0 -1
  63. package/dist/components/inputs/Checkbox/Checkbox.js +35 -201
  64. package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +10 -24
  65. package/dist/components/inputs/Checkbox/checkbox.cva.d.ts +0 -3
  66. package/dist/components/inputs/Checkbox/checkbox.cva.js +1 -2
  67. package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +5 -12
  68. package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +75 -368
  69. package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +5 -12
  70. package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +298 -506
  71. package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +5 -13
  72. package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +56 -273
  73. package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +3 -6
  74. package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +130 -606
  75. package/dist/components/inputs/DateTime/shared/Calendar.d.ts +2 -5
  76. package/dist/components/inputs/DateTime/shared/Calendar.js +119 -332
  77. package/dist/components/inputs/DateTime/shared/CalendarCell.d.ts +2 -3
  78. package/dist/components/inputs/DateTime/shared/CalendarCell.js +102 -301
  79. package/dist/components/inputs/DateTime/shared/CalendarGrid.d.ts +2 -3
  80. package/dist/components/inputs/DateTime/shared/CalendarGrid.js +33 -146
  81. package/dist/components/inputs/DateTime/shared/CalendarHeader.js +93 -249
  82. package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +137 -318
  83. package/dist/components/inputs/DateTime/shared/DateField.js +112 -311
  84. package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +3 -13
  85. package/dist/components/inputs/DateTime/shared/DatePickerInput.js +139 -383
  86. package/dist/components/inputs/DateTime/shared/DateSegmentItem.d.ts +0 -15
  87. package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +11 -96
  88. package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +27 -81
  89. package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +10 -59
  90. package/dist/components/inputs/DateTime/shared/MonthPicker.js +58 -103
  91. package/dist/components/inputs/DateTime/shared/RangeCalendar.js +82 -193
  92. package/dist/components/inputs/DateTime/shared/TimeField.js +8 -27
  93. package/dist/components/inputs/DateTime/shared/TimePickerForm.js +110 -279
  94. package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +1 -4
  95. package/dist/components/inputs/DateTime/shared/TimePickerInput.js +65 -210
  96. package/dist/components/inputs/DateTime/shared/YearPicker.js +68 -119
  97. package/dist/components/inputs/File/FileUpload.js +44 -87
  98. package/dist/components/inputs/File/FileUploadContainer.js +7 -15
  99. package/dist/components/inputs/File/InputUpload.js +79 -317
  100. package/dist/components/inputs/File/shared/FileCard.js +41 -104
  101. package/dist/components/inputs/File/shared/FileCardList.js +12 -47
  102. package/dist/components/inputs/File/shared/FileUploadContent.js +44 -175
  103. package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +46 -149
  104. package/dist/components/inputs/File/shared/FileUploadContentError.js +93 -234
  105. package/dist/components/inputs/File/shared/FileUploadContentFilled.js +97 -230
  106. package/dist/components/inputs/File/shared/FileUploadContentLoading.js +55 -199
  107. package/dist/components/inputs/File/shared/InputUploadContent.js +34 -148
  108. package/dist/components/inputs/File/shared/InputUploadFilled.js +8 -49
  109. package/dist/components/inputs/File/shared/ProgressBar.js +9 -48
  110. package/dist/components/inputs/FormField/FormField.d.ts +3 -3
  111. package/dist/components/inputs/FormField/FormField.js +37 -119
  112. package/dist/components/inputs/FormField/FormFieldError.js +5 -25
  113. package/dist/components/inputs/FormField/FormFieldHeader.d.ts +2 -2
  114. package/dist/components/inputs/FormField/FormFieldHeader.js +22 -81
  115. package/dist/components/inputs/FormField/FormFieldHeaderClose.js +7 -31
  116. package/dist/components/inputs/FormField/FormFieldHelper.js +6 -26
  117. package/dist/components/inputs/FormField/FormFieldLabel.d.ts +2 -2
  118. package/dist/components/inputs/FormField/FormFieldLabel.js +9 -40
  119. package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +2 -5
  120. package/dist/components/inputs/Input/NumberInput/NumberInput.js +97 -447
  121. package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +9 -48
  122. package/dist/components/inputs/Input/TextArea/TextArea.js +90 -305
  123. package/dist/components/inputs/Input/TextInput/TextInput.d.ts +1 -3
  124. package/dist/components/inputs/Input/TextInput/TextInput.js +90 -419
  125. package/dist/components/inputs/Input/shared/InputContent.js +59 -192
  126. package/dist/components/inputs/Inputs/Form.js +11 -40
  127. package/dist/components/inputs/Inputs/InputItem.d.ts +21 -15
  128. package/dist/components/inputs/Inputs/InputItem.js +14 -69
  129. package/dist/components/inputs/Inputs/Inputs.js +11 -37
  130. package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +1 -3
  131. package/dist/components/inputs/RadioGroup/RadioGroup.js +61 -353
  132. package/dist/components/inputs/RadioGroup/radio.cva.d.ts +0 -17
  133. package/dist/components/inputs/RadioGroup/radio.cva.js +1 -42
  134. package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +2 -6
  135. package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +22 -214
  136. package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +18 -3
  137. package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +8 -104
  138. package/dist/components/inputs/Selection/Select/Select.d.ts +3 -7
  139. package/dist/components/inputs/Selection/Select/Select.js +18 -225
  140. package/dist/components/inputs/Selection/shared/SelectBase.d.ts +1 -8
  141. package/dist/components/inputs/Selection/shared/SelectBase.js +18 -69
  142. package/dist/components/inputs/Selection/shared/SelectDesktop.d.ts +1 -1
  143. package/dist/components/inputs/Selection/shared/SelectDesktop.js +138 -393
  144. package/dist/components/inputs/Selection/shared/SelectInput.d.ts +2 -2
  145. package/dist/components/inputs/Selection/shared/SelectInput.js +116 -330
  146. package/dist/components/inputs/Selection/shared/SelectInputTags.js +25 -99
  147. package/dist/components/inputs/Selection/shared/SelectListBox.d.ts +2 -2
  148. package/dist/components/inputs/Selection/shared/SelectListBox.js +52 -164
  149. package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +35 -85
  150. package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +16 -69
  151. package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +21 -70
  152. package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +9 -58
  153. package/dist/components/inputs/Selection/shared/SelectMobile.d.ts +1 -1
  154. package/dist/components/inputs/Selection/shared/SelectMobile.js +3 -9
  155. package/dist/components/inputs/Selection/shared/select.context.d.ts +2 -3
  156. package/dist/components/inputs/Selection/shared/select.context.js +36 -67
  157. package/dist/components/inputs/Selection/shared/select.types.d.ts +2 -3
  158. package/dist/components/inputs/Selection/shared/useSelectItems.js +49 -109
  159. package/dist/components/inputs/Slider/Slider.d.ts +1 -2
  160. package/dist/components/inputs/Slider/Slider.js +76 -265
  161. package/dist/components/inputs/TextEditor/TextEditor.d.ts +0 -1
  162. package/dist/components/inputs/TextEditor/TextEditor.js +98 -447
  163. package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +11 -37
  164. package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +30 -102
  165. package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +45 -194
  166. package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +28 -88
  167. package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +14 -48
  168. package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.js +19 -66
  169. package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +15 -49
  170. package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +32 -92
  171. package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +54 -126
  172. package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +38 -141
  173. package/dist/components/inputs/Toggle/Toggle.d.ts +0 -1
  174. package/dist/components/inputs/Toggle/Toggle.js +37 -214
  175. package/dist/components/inputs/Toggle/toggle.cva.d.ts +0 -3
  176. package/dist/components/inputs/Toggle/toggle.cva.js +1 -2
  177. package/dist/components/inputs/shared/CheckContent.d.ts +1 -2
  178. package/dist/components/inputs/shared/CheckContent.js +11 -21
  179. package/dist/components/inputs/shared/InputClear.d.ts +1 -2
  180. package/dist/components/inputs/shared/InputClear.js +12 -88
  181. package/dist/components/inputs/shared/TooltipWrapper.js +11 -50
  182. package/dist/components/inputs/shared/input.cva.d.ts +0 -10
  183. package/dist/components/inputs/shared/input.cva.js +4 -32
  184. package/dist/components/navigation/Accordion/Accordion.js +22 -69
  185. package/dist/components/navigation/Accordion/AccordionItem.js +41 -86
  186. package/dist/components/navigation/Stepper/Stepper.js +22 -67
  187. package/dist/components/navigation/Stepper/StepperItem.js +31 -104
  188. package/dist/components/navigation/Stepper/StepperSeparator.js +5 -23
  189. package/dist/components/overlays/ActionModal/ActionModal.js +35 -169
  190. package/dist/components/overlays/BottomSheet/BottomSheet.js +23 -96
  191. package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +8 -48
  192. package/dist/components/overlays/Drawer/Drawer.js +20 -62
  193. package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +27 -83
  194. package/dist/components/overlays/Tooltip/Tooltip.js +28 -137
  195. package/dist/components/overlays/Tooltip/TooltipEllipsis.js +12 -37
  196. package/dist/components/segment/Segment.js +57 -218
  197. package/dist/components/segment/SegmentItem.js +10 -67
  198. package/dist/components/shared/pagination/Pagination.js +22 -108
  199. package/dist/components/shared/pagination/PaginationList.js +64 -167
  200. package/dist/components/status/Alert/Alert.js +30 -97
  201. package/dist/components/status/Loader/Loader.js +22 -77
  202. package/dist/components/status/Toast/Toast.js +13 -21
  203. package/dist/components/status/Toast/useToast.js +57 -62
  204. package/dist/components/table/ColumnConfig.js +54 -158
  205. package/dist/components/table/InfiniteTable.js +16 -67
  206. package/dist/components/table/PaginatedTable.js +18 -84
  207. package/dist/components/table/Table.js +27 -28
  208. package/dist/components/text/Link/Link.js +7 -19
  209. package/dist/components/text/Typography/Typography.js +8 -23
  210. package/dist/config/confirmation.context.js +1 -1
  211. package/dist/config/link.context.js +9 -23
  212. package/dist/config/router.context.js +16 -42
  213. package/dist/config/theme.context.js +45 -98
  214. package/dist/config/uiConfig.context.d.ts +6 -19
  215. package/dist/config/uiConfig.context.js +14 -67
  216. package/dist/config/uiStyle.context.d.ts +4 -27
  217. package/dist/config/uiStyle.context.js +5 -15
  218. package/dist/helpers/dynamicInputs.d.ts +5 -5
  219. package/dist/helpers/dynamicInputs.js +0 -3
  220. package/dist/hooks/useBreakpoint.js +3 -16
  221. package/dist/hooks/useDebounceCallback.js +17 -51
  222. package/dist/hooks/useFilters.js +64 -125
  223. package/dist/hooks/useForm.js +8 -42
  224. package/dist/hooks/useFormAutosave.js +30 -101
  225. package/dist/hooks/useIntersectionObserver.d.ts +1 -1
  226. package/dist/hooks/useIntersectionObserver.js +24 -91
  227. package/dist/hooks/useLocalStorage.js +10 -43
  228. package/dist/hooks/useLongPressRepeat.js +20 -55
  229. package/dist/hooks/usePagination.js +19 -49
  230. package/dist/hooks/useScrollableListBox.js +16 -37
  231. package/dist/hooks/useSorting.js +28 -69
  232. package/dist/hooks/useStateAndRef.js +7 -21
  233. package/dist/hooks/useTableColumnConfig.js +31 -124
  234. package/dist/hooks/useTranslationMemo.js +5 -25
  235. package/dist/index.d.ts +0 -7
  236. package/dist/index.js +2 -4
  237. package/dist/tw-ui-plugin.js +0 -6
  238. package/dist/utils/date-time.utils.d.ts +10 -38
  239. package/dist/utils/date-time.utils.js +22 -134
  240. package/package.json +1 -1
  241. package/dist/components/inputs/DateTime/shared/datePicker.types.d.ts +0 -5
  242. package/dist/components/inputs/DateTime/shared/datePickerInput.cva.d.ts +0 -7
  243. package/dist/components/inputs/DateTime/shared/datePickerInput.cva.js +0 -13
  244. package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.d.ts +0 -15
  245. package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.js +0 -32
  246. package/dist/components/inputs/DateTime/shared/dateSegment.utils.d.ts +0 -2
  247. package/dist/components/inputs/DateTime/shared/dateSegment.utils.spec.d.ts +0 -1
  248. package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.d.ts +0 -39
  249. package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.js +0 -85
  250. package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.spec.d.ts +0 -1
  251. package/dist/components/inputs/FormField/formFieldHeader.cva.d.ts +0 -6
  252. package/dist/components/inputs/FormField/formFieldHeader.cva.js +0 -11
  253. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.d.ts +0 -45
  254. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +0 -571
  255. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +0 -35
  256. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +0 -575
  257. package/dist/components/inputs/Input/TextArea/TextArea.cva.d.ts +0 -4
  258. package/dist/components/inputs/Input/TextArea/TextArea.cva.js +0 -5
  259. package/dist/components/inputs/Input/shared/numberStatic.utils.d.ts +0 -1
  260. package/dist/components/inputs/Input/shared/numberStatic.utils.js +0 -7
  261. package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +0 -36
  262. package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +0 -14
  263. package/dist/components/inputs/Selection/Select/QuerySelect.js +0 -173
  264. package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.d.ts +0 -9
  265. package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +0 -47
  266. package/dist/components/inputs/Selection/shared/querySelect.utils.d.ts +0 -12
  267. package/dist/components/inputs/Selection/shared/querySelect.utils.js +0 -36
  268. package/dist/components/inputs/Selection/shared/selectDesktop.cva.d.ts +0 -3
  269. package/dist/components/inputs/Selection/shared/selectDesktop.cva.js +0 -5
  270. package/dist/components/inputs/Selection/shared/selectInput.cva.d.ts +0 -5
  271. package/dist/components/inputs/Selection/shared/selectInput.cva.js +0 -5
  272. package/dist/components/inputs/Selection/shared/staticSelect.utils.d.ts +0 -23
  273. package/dist/components/inputs/Selection/shared/staticSelect.utils.js +0 -37
  274. package/dist/components/inputs/Selection/shared/staticSelect.utils.spec.d.ts +0 -1
  275. package/dist/components/inputs/Skeleton/InputFrame.d.ts +0 -82
  276. package/dist/components/inputs/Skeleton/InputFrame.js +0 -548
  277. package/dist/components/inputs/shared/tooltipWrapper.cva.d.ts +0 -4
  278. package/dist/components/inputs/shared/tooltipWrapper.cva.js +0 -5
  279. package/dist/components/inputs/shared/useStaticInputHandoff.d.ts +0 -14
  280. package/dist/components/inputs/shared/useStaticInputHandoff.js +0 -100
  281. package/dist/hooks/useQueryAutocomplete.d.ts +0 -14
  282. package/dist/hooks/useQueryAutocomplete.js +0 -57
  283. package/dist/utils/query.utils.d.ts +0 -4
  284. package/dist/utils/query.utils.js +0 -8
@@ -1,173 +0,0 @@
1
- import { UIConfig } from "../../../../config/uiConfig.context.js";
2
- import { Select } from "./Select.js";
3
- import { getQueryItems, shouldEnableQueryForSelection } from "../shared/querySelect.utils.js";
4
- import { useQueryAutocomplete } from "../../../../hooks/useQueryAutocomplete.js";
5
- import { c } from "react/compiler-runtime";
6
- import { jsx } from "react/jsx-runtime";
7
- import { useState } from "react";
8
- import { mergeRefs } from "@react-aria/utils";
9
- import { Controller } from "react-hook-form";
10
- //#region src/components/inputs/Selection/Select/QuerySelect.tsx
11
- var QuerySelectContent = (t0) => {
12
- const $ = c(28);
13
- const { query, queryParams, queryOptions, queryMap, ...props } = t0;
14
- const ui = UIConfig.useConfig();
15
- const [search, setSearch] = useState("");
16
- const isSearchable = props.isSearchable ?? ui.select.isSearchable;
17
- let t1;
18
- if ($[0] !== queryMap) {
19
- t1 = (data) => getQueryItems(data, queryMap);
20
- $[0] = queryMap;
21
- $[1] = t1;
22
- } else t1 = $[1];
23
- const t2 = isSearchable ? search : void 0;
24
- const t3 = shouldEnableQueryForSelection({
25
- initialSelection: props.initialSelection,
26
- value: "value" in props ? props.value : void 0,
27
- mapInitialToSelectItem: props.mapInitialToSelectItem
28
- }) ? false : props.isInitialQueryDisabled ?? ui.querySelect?.isInitialQueryDisabled;
29
- let t4;
30
- if ($[2] !== query || $[3] !== queryOptions || $[4] !== queryParams || $[5] !== t1 || $[6] !== t2 || $[7] !== t3) {
31
- t4 = {
32
- query,
33
- queryParams,
34
- queryOptions,
35
- mapItems: t1,
36
- search: t2,
37
- initialQueryState: t3
38
- };
39
- $[2] = query;
40
- $[3] = queryOptions;
41
- $[4] = queryParams;
42
- $[5] = t1;
43
- $[6] = t2;
44
- $[7] = t3;
45
- $[8] = t4;
46
- } else t4 = $[8];
47
- const { items, totalItems, isLoading, handleEnableQuery, hasNextPage, fetchNextPage } = useQueryAutocomplete(t4);
48
- let onSearchChange;
49
- let selectProps;
50
- if ($[9] !== props) {
51
- const { isInitialQueryDisabled: _, onSearchChange: t5, ...t6 } = props;
52
- onSearchChange = t5;
53
- selectProps = t6;
54
- $[9] = props;
55
- $[10] = onSearchChange;
56
- $[11] = selectProps;
57
- } else {
58
- onSearchChange = $[10];
59
- selectProps = $[11];
60
- }
61
- let t5;
62
- if ($[12] !== handleEnableQuery || $[13] !== onSearchChange || $[14] !== setSearch) {
63
- t5 = (value) => {
64
- setSearch(value);
65
- handleEnableQuery();
66
- onSearchChange?.(value);
67
- };
68
- $[12] = handleEnableQuery;
69
- $[13] = onSearchChange;
70
- $[14] = setSearch;
71
- $[15] = t5;
72
- } else t5 = $[15];
73
- const handleSearchChange = t5;
74
- let t6;
75
- if ($[16] !== handleSearchChange || $[17] !== isSearchable) {
76
- t6 = isSearchable && {
77
- isClientSearchDisabled: true,
78
- onSearchChange: handleSearchChange
79
- };
80
- $[16] = handleSearchChange;
81
- $[17] = isSearchable;
82
- $[18] = t6;
83
- } else t6 = $[18];
84
- let t7;
85
- if ($[19] !== fetchNextPage || $[20] !== handleEnableQuery || $[21] !== hasNextPage || $[22] !== isLoading || $[23] !== items || $[24] !== selectProps || $[25] !== t6 || $[26] !== totalItems) {
86
- t7 = /* @__PURE__ */ jsx(Select, {
87
- ...selectProps,
88
- items,
89
- isLoading,
90
- totalItems,
91
- hasLoadMore: hasNextPage,
92
- onLoadMore: fetchNextPage,
93
- onMouseEnter: handleEnableQuery,
94
- onFocusCapture: handleEnableQuery,
95
- ...t6
96
- });
97
- $[19] = fetchNextPage;
98
- $[20] = handleEnableQuery;
99
- $[21] = hasNextPage;
100
- $[22] = isLoading;
101
- $[23] = items;
102
- $[24] = selectProps;
103
- $[25] = t6;
104
- $[26] = totalItems;
105
- $[27] = t7;
106
- } else t7 = $[27];
107
- return t7;
108
- };
109
- var QuerySelect = (props) => {
110
- const $ = c(16);
111
- if ("formControl" in props && props.formControl) {
112
- let formControl;
113
- let innerProps;
114
- let ref;
115
- if ($[0] !== props) {
116
- ({formControl, ref, ...innerProps} = props);
117
- $[0] = props;
118
- $[1] = formControl;
119
- $[2] = innerProps;
120
- $[3] = ref;
121
- } else {
122
- formControl = $[1];
123
- innerProps = $[2];
124
- ref = $[3];
125
- }
126
- const controlWithOptions = formControl.control;
127
- let t0;
128
- if ($[4] !== controlWithOptions || $[5] !== innerProps || $[6] !== props.error || $[7] !== props.isDisabled || $[8] !== ref) {
129
- t0 = (t1) => {
130
- const { field, fieldState: t2 } = t1;
131
- const { error, isDirty } = t2;
132
- return /* @__PURE__ */ jsx(QuerySelectContent, {
133
- ...innerProps,
134
- ref: mergeRefs(ref, field.ref),
135
- value: field.value,
136
- onChange: field.onChange,
137
- onBlur: field.onBlur,
138
- isDirty,
139
- isDisabled: field.disabled || props.isDisabled || !!controlWithOptions._options?.disabled,
140
- error: props.error ?? error?.message
141
- });
142
- };
143
- $[4] = controlWithOptions;
144
- $[5] = innerProps;
145
- $[6] = props.error;
146
- $[7] = props.isDisabled;
147
- $[8] = ref;
148
- $[9] = t0;
149
- } else t0 = $[9];
150
- let t1;
151
- if ($[10] !== formControl.control || $[11] !== formControl.name || $[12] !== t0) {
152
- t1 = /* @__PURE__ */ jsx(Controller, {
153
- control: formControl.control,
154
- name: formControl.name,
155
- render: t0
156
- });
157
- $[10] = formControl.control;
158
- $[11] = formControl.name;
159
- $[12] = t0;
160
- $[13] = t1;
161
- } else t1 = $[13];
162
- return t1;
163
- }
164
- let t0;
165
- if ($[14] !== props) {
166
- t0 = /* @__PURE__ */ jsx(QuerySelectContent, { ...props });
167
- $[14] = props;
168
- $[15] = t0;
169
- } else t0 = $[15];
170
- return t0;
171
- };
172
- //#endregion
173
- export { QuerySelect };
@@ -1,9 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import { InputVariantProps } from '../../shared/input.cva';
3
- interface StaticSelectTrailingContentProps extends Pick<InputVariantProps, "size"> {
4
- trailingContent?: ReactNode;
5
- hideDropdownIcon?: boolean;
6
- isDisabled?: boolean;
7
- }
8
- export declare const StaticSelectTrailingContent: ({ trailingContent, hideDropdownIcon, isDisabled, size, }: StaticSelectTrailingContentProps) => import("react/jsx-runtime").JSX.Element | null;
9
- export {};
@@ -1,47 +0,0 @@
1
- import { ArrowDropDownIcon } from "../../../../assets/icons/ArrowDropDown.js";
2
- import { UIStyle } from "../../../../config/uiStyle.context.js";
3
- import { inputSize } from "../../shared/input.cva.js";
4
- import { c } from "react/compiler-runtime";
5
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
- import { clsx } from "clsx";
7
- //#region src/components/inputs/Selection/shared/StaticSelectTrailingContent.tsx
8
- var StaticSelectTrailingContent = (t0) => {
9
- const $ = c(10);
10
- const { trailingContent, hideDropdownIcon, isDisabled, size } = t0;
11
- const inputSizeCva = UIStyle.useCva("input.sizeCva", inputSize);
12
- if (!trailingContent && hideDropdownIcon) return null;
13
- let t1;
14
- if ($[0] !== trailingContent) {
15
- t1 = trailingContent && /* @__PURE__ */ jsx("div", {
16
- className: "flex shrink-0 items-center",
17
- children: trailingContent
18
- });
19
- $[0] = trailingContent;
20
- $[1] = t1;
21
- } else t1 = $[1];
22
- let t2;
23
- if ($[2] !== hideDropdownIcon || $[3] !== inputSizeCva || $[4] !== isDisabled || $[5] !== size) {
24
- t2 = !hideDropdownIcon ? /* @__PURE__ */ jsx("button", {
25
- type: "button",
26
- tabIndex: -1,
27
- className: clsx("self-stretch border-0! pl-1-5 outline-none", inputSizeCva({ size })),
28
- "aria-hidden": "true",
29
- children: /* @__PURE__ */ jsx(ArrowDropDownIcon, { className: clsx("size-6 shrink-0", isDisabled ? "text-interactive-text-secondary-disabled" : "text-interactive-text-secondary-idle") })
30
- }) : void 0;
31
- $[2] = hideDropdownIcon;
32
- $[3] = inputSizeCva;
33
- $[4] = isDisabled;
34
- $[5] = size;
35
- $[6] = t2;
36
- } else t2 = $[6];
37
- let t3;
38
- if ($[7] !== t1 || $[8] !== t2) {
39
- t3 = /* @__PURE__ */ jsxs(Fragment, { children: [t1, t2] });
40
- $[7] = t1;
41
- $[8] = t2;
42
- $[9] = t3;
43
- } else t3 = $[9];
44
- return t3;
45
- };
46
- //#endregion
47
- export { StaticSelectTrailingContent };
@@ -1,12 +0,0 @@
1
- import { UseInfiniteQueryResult, UseQueryResult } from '@tanstack/react-query';
2
- import { Key } from 'react-aria-components';
3
- import { SelectItem } from './select.types';
4
- export type QueryFn<TData = any> = (...args: any[]) => UseQueryResult<TData> | UseInfiniteQueryResult<TData>;
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, }: {
8
- initialSelection: TInitialSelectItem | TInitialSelectItem[] | null | undefined;
9
- value: TKey | TKey[] | null | undefined;
10
- mapInitialToSelectItem?: (item: TInitialSelectItem) => SelectItem<TKey>;
11
- }) => boolean;
12
- export declare const getQueryItems: <TQueryFn extends QueryFn, TKey extends Key = Key>(data: QueryDataType<TQueryFn> | undefined, queryMap?: (data: QueryDataType<TQueryFn>) => SelectItem<TKey>[]) => SelectItem<TKey>[];
@@ -1,36 +0,0 @@
1
- //#region src/components/inputs/Selection/shared/querySelect.utils.ts
2
- var getDefaultInitialSelectionLabel = (initialSelection) => {
3
- if (typeof initialSelection !== "object" || initialSelection === null) return "";
4
- if ("label" in initialSelection && typeof initialSelection.label === "string") return initialSelection.label;
5
- if ("name" in initialSelection && typeof initialSelection.name === "string") return initialSelection.name;
6
- return "";
7
- };
8
- var getInitialSelectionItems = (initialSelection) => {
9
- return Array.isArray(initialSelection) ? initialSelection : initialSelection != null ? [initialSelection] : [];
10
- };
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;
19
- const values = Array.isArray(value) ? value : value != null ? [value] : [];
20
- if (values.length === 0) return false;
21
- 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));
24
- };
25
- var getQueryItems = (data, queryMap) => {
26
- if (!data) return [];
27
- if (queryMap) return queryMap(data);
28
- if (Array.isArray(data)) return data;
29
- if (typeof data === "object" && data !== null) {
30
- if ("items" in data && Array.isArray(data.items)) return data.items;
31
- if ("pages" in data && Array.isArray(data.pages)) return data.pages.flatMap((page) => page && typeof page === "object" && "items" in page && Array.isArray(page.items) ? page.items : []);
32
- }
33
- return [];
34
- };
35
- //#endregion
36
- export { getQueryItems, shouldEnableQueryForSelection };
@@ -1,3 +0,0 @@
1
- import { VariantProps } from 'class-variance-authority';
2
- export declare const selectPopoverCva: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
3
- export type SelectPopoverCva = VariantProps<typeof selectPopoverCva>;
@@ -1,5 +0,0 @@
1
- import { cva } from "class-variance-authority";
2
- //#region src/components/inputs/Selection/shared/selectDesktop.cva.ts
3
- var selectPopoverCva = cva("my-4 outline-none");
4
- //#endregion
5
- export { selectPopoverCva };
@@ -1,5 +0,0 @@
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,5 +0,0 @@
1
- import { cva } from "class-variance-authority";
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" } } });
4
- //#endregion
5
- export { selectInputTagsContentWrapperCva };
@@ -1,23 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import { Key } from 'react-aria-components';
3
- import { SelectBaseProps } from './SelectBase';
4
- import { DefaultInitialSelectItem, SelectItem } from './select.types';
5
- interface GetStaticSelectValueOptions<TKey extends Key = Key, TInitialSelectItem = DefaultInitialSelectItem<TKey>> {
6
- items: SelectItem<TKey>[];
7
- value: TKey | TKey[] | null | undefined;
8
- selectionMode: SelectBaseProps<TKey>["selectionMode"];
9
- initialSelection?: TInitialSelectItem | TInitialSelectItem[] | null;
10
- mapInitialToSelectItem?: (item: TInitialSelectItem) => SelectItem<TKey>;
11
- showSelectionContent?: boolean;
12
- isDisabled?: boolean;
13
- collapseAfter?: SelectBaseProps<TKey>["collapseAfter"];
14
- selectedTagsType?: SelectBaseProps<TKey>["selectedTagsType"];
15
- }
16
- interface StaticSelectValueResult<TKey extends Key = Key> {
17
- selectedItem: SelectItem<TKey> | null;
18
- selectedItems: SelectItem<TKey>[];
19
- displayValue: ReactNode;
20
- isEmpty: boolean;
21
- }
22
- export declare const getStaticSelectValue: <TKey extends Key = Key, TInitialSelectItem = DefaultInitialSelectItem<TKey>>({ items, value, selectionMode, initialSelection, mapInitialToSelectItem, showSelectionContent, isDisabled, collapseAfter, selectedTagsType, }: GetStaticSelectValueOptions<TKey, TInitialSelectItem>) => StaticSelectValueResult<TKey>;
23
- export {};
@@ -1,37 +0,0 @@
1
- import { SelectInputTags } from "./SelectInputTags.js";
2
- import { jsx } from "react/jsx-runtime";
3
- //#region src/components/inputs/Selection/shared/staticSelect.utils.tsx
4
- var getStaticSelectValue = ({ items, value, selectionMode, initialSelection, mapInitialToSelectItem = ((item) => ({
5
- id: item.id,
6
- label: item.label ?? item.name ?? ""
7
- })), showSelectionContent, isDisabled, collapseAfter, selectedTagsType }) => {
8
- const initialSelectedItems = initialSelection ? (Array.isArray(initialSelection) ? initialSelection : [initialSelection]).map((item) => mapInitialToSelectItem(item)) : [];
9
- const allItemsMap = /* @__PURE__ */ new Map();
10
- [...initialSelectedItems, ...items].forEach((item) => allItemsMap.set(item.id, item));
11
- const getItem = (id) => allItemsMap.get(id) ?? null;
12
- const selectedItems = Array.isArray(value) ? value.map((id) => getItem(id)).filter((item) => item != null) : [];
13
- const selectedItem = !Array.isArray(value) && value != null ? getItem(value) : null;
14
- if (selectionMode === "multiple") return {
15
- selectedItem,
16
- selectedItems,
17
- displayValue: selectedItems.length > 0 ? /* @__PURE__ */ jsx(SelectInputTags, {
18
- selectedItems,
19
- isDisabled,
20
- collapseAfter,
21
- selectedTagsType,
22
- onRemove: () => void 0
23
- }) : "",
24
- isEmpty: selectedItems.length === 0
25
- };
26
- return {
27
- selectedItem,
28
- 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
- }) : "",
33
- isEmpty: selectedItem == null
34
- };
35
- };
36
- //#endregion
37
- export { getStaticSelectValue };
@@ -1,82 +0,0 @@
1
- import { FC, FocusEventHandler, MouseEventHandler, ReactElement, ReactNode, Ref, SVGProps } from 'react';
2
- import { InlineIconButtonProps } from '../../buttons/InlineIconButton/InlineIconButton';
3
- import { FormFieldProps } from '../FormField/FormField';
4
- import { FormFieldHeaderProps } from '../FormField/FormFieldHeader';
5
- import { InputVariantProps } from '../shared/input.cva';
6
- import { TypographyVariantProps } from '../../text/Typography/typography.cva';
7
- type InputFrameIcon = FC<SVGProps<SVGSVGElement>> | ReactElement;
8
- interface InputFrameAction {
9
- icon: InlineIconButtonProps["icon"];
10
- onClick: () => void;
11
- altText: string;
12
- className?: string;
13
- }
14
- interface InputFrameDataAttributes {
15
- dataDisabled?: boolean;
16
- dataHasSearch?: boolean;
17
- dataHasSelection?: boolean;
18
- dataInvalid?: boolean;
19
- dataIsDirty?: boolean;
20
- dataIsDisabled?: boolean;
21
- dataIsEmpty?: boolean;
22
- dataIsFilled?: boolean;
23
- dataIsRequired?: boolean;
24
- }
25
- type InputFrameDataAttributeProps = {
26
- "data-disabled"?: boolean;
27
- "data-has-search"?: boolean;
28
- "data-has-selection"?: boolean;
29
- "data-invalid"?: boolean;
30
- "data-is-dirty"?: boolean;
31
- "data-is-disabled"?: boolean;
32
- "data-is-empty"?: boolean;
33
- "data-is-filled"?: boolean;
34
- "data-is-required"?: boolean;
35
- };
36
- type InputFrameChildProps = InputFrameDataAttributeProps & {
37
- id: string;
38
- };
39
- type InputFrameChildren = ReactNode | ((childProps: InputFrameChildProps) => ReactNode);
40
- type InputFrameLabelPlacement = "content-wrapper" | "content-row";
41
- type InputFrameActionContentPlacement = "content-wrapper" | "content-row";
42
- type InputFrameContentGroup = "date-picker" | "input" | "select";
43
- export interface InputFrameProps extends InputVariantProps, Partial<FormFieldProps> {
44
- ref?: Ref<HTMLDivElement>;
45
- children: InputFrameChildren;
46
- formFieldRef?: Ref<HTMLDivElement>;
47
- onMouseEnter?: MouseEventHandler<HTMLDivElement>;
48
- onFocusCapture?: FocusEventHandler<HTMLDivElement>;
49
- labelProps?: FormFieldHeaderProps["labelProps"];
50
- headerProps?: FormFieldHeaderProps;
51
- leadingContent?: ReactNode;
52
- leadingIcon?: InputFrameIcon;
53
- actionContent?: ReactNode;
54
- actionContentPlacement?: InputFrameActionContentPlacement;
55
- trailingContent?: ReactNode;
56
- trailingIcon?: InputFrameIcon;
57
- trailingAction?: ReactNode;
58
- unit?: string;
59
- isLoading?: boolean;
60
- action?: InputFrameAction;
61
- isClearable?: boolean;
62
- showClear?: boolean;
63
- renderStatic?: boolean;
64
- onStaticInteract?: (shouldFocus: boolean) => void;
65
- clearClassName?: string;
66
- onClear?: () => void;
67
- dataAttributes?: InputFrameDataAttributes;
68
- typographySize?: TypographyVariantProps["size"];
69
- id?: string;
70
- inputClassName?: string;
71
- contentClassName?: string;
72
- contentWrapperClassName?: string;
73
- contentGroup?: InputFrameContentGroup;
74
- contentAndTrailingClassName?: string;
75
- wrapContentAndTrailing?: boolean;
76
- wrapTrailingContent?: boolean;
77
- reserveTrailingContent?: boolean;
78
- labelPlacement?: InputFrameLabelPlacement;
79
- trailingClassName?: string;
80
- }
81
- export declare const InputFrame: (props: InputFrameProps) => import("react/jsx-runtime").JSX.Element;
82
- export {};