@povio/ui 2.3.3 → 3.0.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (351) hide show
  1. package/dist/assets/icons/AlignCenter.js +26 -11
  2. package/dist/assets/icons/AlignLeft.js +26 -11
  3. package/dist/assets/icons/AlignLeftRight.js +26 -11
  4. package/dist/assets/icons/AlignRight.js +26 -11
  5. package/dist/assets/icons/ArrowDropDown.js +26 -11
  6. package/dist/assets/icons/ArrowDropUp.js +26 -11
  7. package/dist/assets/icons/ArrowLeft.js +26 -11
  8. package/dist/assets/icons/ArrowRight.js +26 -11
  9. package/dist/assets/icons/Bold.js +26 -11
  10. package/dist/assets/icons/BulletedList.js +26 -11
  11. package/dist/assets/icons/Calendar.js +28 -13
  12. package/dist/assets/icons/Check.js +28 -13
  13. package/dist/assets/icons/CheckCircle.js +26 -11
  14. package/dist/assets/icons/CheckboxCheckmark.js +29 -14
  15. package/dist/assets/icons/CheckboxIndeterminate.js +29 -14
  16. package/dist/assets/icons/ChevronDown.js +28 -13
  17. package/dist/assets/icons/ChevronLeft.js +28 -13
  18. package/dist/assets/icons/ChevronRight.js +28 -13
  19. package/dist/assets/icons/ChevronUp.js +28 -13
  20. package/dist/assets/icons/ChevronsLeft.js +28 -13
  21. package/dist/assets/icons/ChevronsRight.js +28 -13
  22. package/dist/assets/icons/Clock.js +26 -11
  23. package/dist/assets/icons/Close.js +26 -11
  24. package/dist/assets/icons/DateTime.js +35 -14
  25. package/dist/assets/icons/DragIndicator.js +26 -11
  26. package/dist/assets/icons/File.js +28 -13
  27. package/dist/assets/icons/Highlight.js +26 -11
  28. package/dist/assets/icons/HighlightOn.js +49 -15
  29. package/dist/assets/icons/Home.js +26 -11
  30. package/dist/assets/icons/Info.js +37 -16
  31. package/dist/assets/icons/Italic.js +26 -11
  32. package/dist/assets/icons/Link.js +26 -11
  33. package/dist/assets/icons/Menu.js +26 -11
  34. package/dist/assets/icons/NumberedList.js +26 -11
  35. package/dist/assets/icons/PointerHorizontal.js +26 -11
  36. package/dist/assets/icons/PointerVertical.js +26 -11
  37. package/dist/assets/icons/Search.js +26 -11
  38. package/dist/assets/icons/Send.js +28 -13
  39. package/dist/assets/icons/Strikethrough.js +26 -11
  40. package/dist/assets/icons/TextColor.js +48 -14
  41. package/dist/assets/icons/Today.js +26 -11
  42. package/dist/assets/icons/Underlined.js +28 -13
  43. package/dist/assets/icons/Upload.js +35 -14
  44. package/dist/assets/icons/Visibility.js +26 -11
  45. package/dist/assets/icons/VisibilityOff.js +26 -11
  46. package/dist/assets/icons/WarningFilled.js +28 -13
  47. package/dist/components/Breadcrumbs/Breadcrumbs.js +215 -64
  48. package/dist/components/Breadcrumbs/breadcrumbs.cva.d.ts +40 -14
  49. package/dist/components/Breadcrumbs/breadcrumbs.cva.js +21 -18
  50. package/dist/components/Menu/Menu.js +18 -2
  51. package/dist/components/Menu/MenuDesktop.js +41 -7
  52. package/dist/components/Menu/MenuItem.js +35 -12
  53. package/dist/components/Menu/MenuMobile.js +103 -44
  54. package/dist/components/Menu/MenuPopover.js +110 -34
  55. package/dist/components/Menu/menu.cva.d.ts +35 -13
  56. package/dist/components/Menu/menu.cva.js +30 -24
  57. package/dist/components/buttons/Button/Button.js +7 -7
  58. package/dist/components/buttons/Button/button.cva.d.ts +95 -26
  59. package/dist/components/buttons/Button/button.cva.js +601 -589
  60. package/dist/components/buttons/IconButton/IconButton.js +40 -8
  61. package/dist/components/buttons/InlineIconButton/InlineIconButton.d.ts +2 -1
  62. package/dist/components/buttons/InlineIconButton/InlineIconButton.js +34 -9
  63. package/dist/components/buttons/PillButton/PillButton.js +59 -21
  64. package/dist/components/buttons/PillButton/pillButton.cva.d.ts +33 -9
  65. package/dist/components/buttons/PillButton/pillButton.cva.js +247 -239
  66. package/dist/components/buttons/SplitButton/SplitButton.js +103 -18
  67. package/dist/components/buttons/TextButton/TextButton.js +30 -8
  68. package/dist/components/buttons/ToggleButton/ToggleButton.js +28 -8
  69. package/dist/components/buttons/shared/ButtonContent.js +83 -25
  70. package/dist/components/buttons/shared/buttonContent.cva.d.ts +3 -5
  71. package/dist/components/buttons/shared/buttonContent.cva.js +1 -8
  72. package/dist/components/inputs/Checkbox/Checkbox.d.ts +1 -0
  73. package/dist/components/inputs/Checkbox/Checkbox.js +203 -37
  74. package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +28 -14
  75. package/dist/components/inputs/Checkbox/checkbox.cva.d.ts +26 -10
  76. package/dist/components/inputs/Checkbox/checkbox.cva.js +47 -40
  77. package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +12 -5
  78. package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +371 -75
  79. package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +12 -5
  80. package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +482 -186
  81. package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +13 -5
  82. package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +267 -47
  83. package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +7 -3
  84. package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +611 -121
  85. package/dist/components/inputs/DateTime/shared/Calendar.d.ts +5 -2
  86. package/dist/components/inputs/DateTime/shared/Calendar.js +338 -119
  87. package/dist/components/inputs/DateTime/shared/CalendarCell.d.ts +4 -2
  88. package/dist/components/inputs/DateTime/shared/CalendarCell.js +310 -103
  89. package/dist/components/inputs/DateTime/shared/CalendarGrid.d.ts +4 -2
  90. package/dist/components/inputs/DateTime/shared/CalendarGrid.js +150 -33
  91. package/dist/components/inputs/DateTime/shared/CalendarHeader.js +249 -93
  92. package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +318 -137
  93. package/dist/components/inputs/DateTime/shared/DateField.js +286 -112
  94. package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +13 -3
  95. package/dist/components/inputs/DateTime/shared/DatePickerInput.js +387 -143
  96. package/dist/components/inputs/DateTime/shared/DateSegmentItem.d.ts +15 -0
  97. package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +96 -11
  98. package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +84 -30
  99. package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +59 -10
  100. package/dist/components/inputs/DateTime/shared/MonthPicker.js +103 -58
  101. package/dist/components/inputs/DateTime/shared/RangeCalendar.js +193 -82
  102. package/dist/components/inputs/DateTime/shared/TimeField.js +27 -8
  103. package/dist/components/inputs/DateTime/shared/TimePickerForm.js +279 -110
  104. package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +4 -1
  105. package/dist/components/inputs/DateTime/shared/TimePickerInput.js +214 -69
  106. package/dist/components/inputs/DateTime/shared/YearPicker.js +119 -68
  107. package/dist/components/inputs/DateTime/shared/datePicker.types.d.ts +5 -0
  108. package/dist/components/inputs/DateTime/shared/datePickerInput.cva.d.ts +27 -0
  109. package/dist/components/inputs/DateTime/shared/datePickerInput.cva.js +15 -0
  110. package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.d.ts +15 -0
  111. package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.js +32 -0
  112. package/dist/components/inputs/DateTime/shared/dateSegment.utils.d.ts +2 -0
  113. package/dist/components/inputs/DateTime/shared/dateSegment.utils.spec.d.ts +1 -0
  114. package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.d.ts +40 -0
  115. package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.js +85 -0
  116. package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.spec.d.ts +1 -0
  117. package/dist/components/inputs/File/FileUpload.js +87 -44
  118. package/dist/components/inputs/File/FileUploadContainer.js +15 -7
  119. package/dist/components/inputs/File/InputUpload.js +317 -79
  120. package/dist/components/inputs/File/shared/FileCard.js +104 -41
  121. package/dist/components/inputs/File/shared/FileCardList.js +47 -12
  122. package/dist/components/inputs/File/shared/FileUploadContent.js +175 -44
  123. package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +149 -46
  124. package/dist/components/inputs/File/shared/FileUploadContentError.js +234 -93
  125. package/dist/components/inputs/File/shared/FileUploadContentFilled.js +230 -97
  126. package/dist/components/inputs/File/shared/FileUploadContentLoading.js +199 -55
  127. package/dist/components/inputs/File/shared/InputUploadContent.js +151 -37
  128. package/dist/components/inputs/File/shared/InputUploadFilled.js +51 -10
  129. package/dist/components/inputs/File/shared/ProgressBar.js +48 -9
  130. package/dist/components/inputs/File/shared/fileUpload.cva.d.ts +26 -9
  131. package/dist/components/inputs/File/shared/fileUpload.cva.js +48 -40
  132. package/dist/components/inputs/File/shared/inputUploadButton.cva.d.ts +23 -6
  133. package/dist/components/inputs/File/shared/inputUploadButton.cva.js +29 -20
  134. package/dist/components/inputs/FormField/FormField.d.ts +3 -3
  135. package/dist/components/inputs/FormField/FormField.js +119 -37
  136. package/dist/components/inputs/FormField/FormFieldError.js +27 -7
  137. package/dist/components/inputs/FormField/FormFieldHeader.d.ts +2 -2
  138. package/dist/components/inputs/FormField/FormFieldHeader.js +81 -22
  139. package/dist/components/inputs/FormField/FormFieldHeaderClose.js +31 -7
  140. package/dist/components/inputs/FormField/FormFieldHelper.js +28 -8
  141. package/dist/components/inputs/FormField/FormFieldLabel.d.ts +2 -2
  142. package/dist/components/inputs/FormField/FormFieldLabel.js +46 -15
  143. package/dist/components/inputs/FormField/formFieldError.cva.d.ts +12 -5
  144. package/dist/components/inputs/FormField/formFieldError.cva.js +11 -8
  145. package/dist/components/inputs/FormField/formFieldHeader.cva.d.ts +22 -0
  146. package/dist/components/inputs/FormField/formFieldHeader.cva.js +13 -0
  147. package/dist/components/inputs/FormField/formFieldHelper.cva.d.ts +12 -5
  148. package/dist/components/inputs/FormField/formFieldHelper.cva.js +11 -8
  149. package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +5 -2
  150. package/dist/components/inputs/Input/NumberInput/NumberInput.js +450 -100
  151. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.d.ts +45 -0
  152. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +571 -0
  153. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +35 -0
  154. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +575 -0
  155. package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +48 -9
  156. package/dist/components/inputs/Input/TextArea/TextArea.cva.d.ts +12 -0
  157. package/dist/components/inputs/Input/TextArea/TextArea.cva.js +4 -0
  158. package/dist/components/inputs/Input/TextArea/TextArea.js +309 -94
  159. package/dist/components/inputs/Input/TextInput/TextInput.d.ts +3 -1
  160. package/dist/components/inputs/Input/TextInput/TextInput.js +422 -93
  161. package/dist/components/inputs/Input/shared/InputContent.js +196 -63
  162. package/dist/components/inputs/Input/shared/numberStatic.utils.d.ts +1 -0
  163. package/dist/components/inputs/Input/shared/numberStatic.utils.js +7 -0
  164. package/dist/components/inputs/Inputs/Form.js +40 -11
  165. package/dist/components/inputs/Inputs/InputItem.d.ts +15 -21
  166. package/dist/components/inputs/Inputs/InputItem.js +69 -14
  167. package/dist/components/inputs/Inputs/Inputs.js +37 -11
  168. package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +3 -1
  169. package/dist/components/inputs/RadioGroup/RadioGroup.js +356 -64
  170. package/dist/components/inputs/RadioGroup/radio.cva.d.ts +101 -6
  171. package/dist/components/inputs/RadioGroup/radio.cva.js +74 -24
  172. package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +6 -2
  173. package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +214 -22
  174. package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +3 -18
  175. package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +104 -8
  176. package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +36 -0
  177. package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +14 -0
  178. package/dist/components/inputs/Selection/Select/QuerySelect.js +173 -0
  179. package/dist/components/inputs/Selection/Select/Select.d.ts +7 -3
  180. package/dist/components/inputs/Selection/Select/Select.js +225 -18
  181. package/dist/components/inputs/Selection/shared/SelectBase.d.ts +8 -1
  182. package/dist/components/inputs/Selection/shared/SelectBase.js +69 -18
  183. package/dist/components/inputs/Selection/shared/SelectDesktop.d.ts +1 -1
  184. package/dist/components/inputs/Selection/shared/SelectDesktop.js +396 -141
  185. package/dist/components/inputs/Selection/shared/SelectInput.d.ts +2 -2
  186. package/dist/components/inputs/Selection/shared/SelectInput.js +398 -119
  187. package/dist/components/inputs/Selection/shared/SelectInputTags.js +99 -25
  188. package/dist/components/inputs/Selection/shared/SelectListBox.d.ts +2 -2
  189. package/dist/components/inputs/Selection/shared/SelectListBox.js +164 -52
  190. package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +88 -38
  191. package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +72 -19
  192. package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +73 -24
  193. package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +58 -9
  194. package/dist/components/inputs/Selection/shared/SelectMobile.d.ts +1 -1
  195. package/dist/components/inputs/Selection/shared/SelectMobile.js +9 -3
  196. package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.d.ts +9 -0
  197. package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +47 -0
  198. package/dist/components/inputs/Selection/shared/querySelect.utils.d.ts +12 -0
  199. package/dist/components/inputs/Selection/shared/querySelect.utils.js +36 -0
  200. package/dist/components/inputs/Selection/shared/select.context.d.ts +3 -2
  201. package/dist/components/inputs/Selection/shared/select.context.js +67 -36
  202. package/dist/components/inputs/Selection/shared/select.types.d.ts +3 -2
  203. package/dist/components/inputs/Selection/shared/selectDesktop.cva.d.ts +10 -0
  204. package/dist/components/inputs/Selection/shared/selectDesktop.cva.js +4 -0
  205. package/dist/components/inputs/Selection/shared/selectInput.cva.d.ts +5 -0
  206. package/dist/components/inputs/Selection/shared/selectInput.cva.js +5 -0
  207. package/dist/components/inputs/Selection/shared/selectItem.cva.d.ts +16 -6
  208. package/dist/components/inputs/Selection/shared/selectItem.cva.js +21 -18
  209. package/dist/components/inputs/Selection/shared/staticSelect.utils.d.ts +23 -0
  210. package/dist/components/inputs/Selection/shared/staticSelect.utils.js +37 -0
  211. package/dist/components/inputs/Selection/shared/staticSelect.utils.spec.d.ts +1 -0
  212. package/dist/components/inputs/Selection/shared/useSelectItems.js +109 -49
  213. package/dist/components/inputs/Skeleton/InputFrame.d.ts +82 -0
  214. package/dist/components/inputs/Skeleton/InputFrame.js +548 -0
  215. package/dist/components/inputs/Slider/Slider.d.ts +2 -1
  216. package/dist/components/inputs/Slider/Slider.js +265 -76
  217. package/dist/components/inputs/TextEditor/TextEditor.d.ts +1 -0
  218. package/dist/components/inputs/TextEditor/TextEditor.js +450 -101
  219. package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +37 -11
  220. package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +105 -33
  221. package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +194 -45
  222. package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +88 -28
  223. package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +48 -14
  224. package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.js +66 -19
  225. package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +49 -15
  226. package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +92 -32
  227. package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +126 -54
  228. package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +141 -38
  229. package/dist/components/inputs/Toggle/Toggle.d.ts +1 -0
  230. package/dist/components/inputs/Toggle/Toggle.js +217 -40
  231. package/dist/components/inputs/Toggle/toggle.cva.d.ts +15 -6
  232. package/dist/components/inputs/Toggle/toggle.cva.js +25 -21
  233. package/dist/components/inputs/shared/CheckContent.d.ts +2 -1
  234. package/dist/components/inputs/shared/CheckContent.js +23 -13
  235. package/dist/components/inputs/shared/InputClear.d.ts +2 -1
  236. package/dist/components/inputs/shared/InputClear.js +88 -12
  237. package/dist/components/inputs/shared/TooltipWrapper.js +50 -11
  238. package/dist/components/inputs/shared/input.cva.d.ts +137 -16
  239. package/dist/components/inputs/shared/input.cva.js +317 -273
  240. package/dist/components/inputs/shared/label.cva.d.ts +15 -6
  241. package/dist/components/inputs/shared/label.cva.js +28 -25
  242. package/dist/components/inputs/shared/tooltipWrapper.cva.d.ts +12 -0
  243. package/dist/components/inputs/shared/tooltipWrapper.cva.js +4 -0
  244. package/dist/components/inputs/shared/useStaticInputHandoff.d.ts +14 -0
  245. package/dist/components/inputs/shared/useStaticInputHandoff.js +100 -0
  246. package/dist/components/navigation/Accordion/Accordion.js +71 -24
  247. package/dist/components/navigation/Accordion/AccordionItem.js +97 -52
  248. package/dist/components/navigation/Accordion/accordion.cva.d.ts +109 -44
  249. package/dist/components/navigation/Accordion/accordion.cva.js +114 -84
  250. package/dist/components/navigation/Stepper/Stepper.js +69 -24
  251. package/dist/components/navigation/Stepper/StepperItem.js +112 -39
  252. package/dist/components/navigation/Stepper/StepperSeparator.js +25 -7
  253. package/dist/components/navigation/Stepper/stepper.cva.d.ts +86 -30
  254. package/dist/components/navigation/Stepper/stepper.cva.js +104 -83
  255. package/dist/components/overlays/ActionModal/ActionModal.js +169 -35
  256. package/dist/components/overlays/BottomSheet/BottomSheet.js +96 -23
  257. package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +48 -8
  258. package/dist/components/overlays/Drawer/Drawer.js +62 -20
  259. package/dist/components/overlays/Modal/Modal.js +5 -5
  260. package/dist/components/overlays/Modal/modal.cva.d.ts +34 -9
  261. package/dist/components/overlays/Modal/modal.cva.js +38 -27
  262. package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +86 -30
  263. package/dist/components/overlays/Tooltip/Tooltip.js +143 -34
  264. package/dist/components/overlays/Tooltip/TooltipEllipsis.js +37 -12
  265. package/dist/components/overlays/Tooltip/tooltip.cva.d.ts +45 -17
  266. package/dist/components/overlays/Tooltip/tooltip.cva.js +38 -26
  267. package/dist/components/segment/Segment.js +221 -60
  268. package/dist/components/segment/SegmentItem.js +70 -13
  269. package/dist/components/segment/segment.cva.d.ts +18 -7
  270. package/dist/components/segment/segment.cva.js +24 -21
  271. package/dist/components/shared/pagination/Pagination.js +108 -22
  272. package/dist/components/shared/pagination/PaginationList.js +167 -64
  273. package/dist/components/shared/popover.cva.d.ts +7 -3
  274. package/dist/components/shared/popover.cva.js +3 -3
  275. package/dist/components/status/Alert/Alert.js +103 -36
  276. package/dist/components/status/Alert/alert.cva.d.ts +18 -6
  277. package/dist/components/status/Alert/alert.cva.js +60 -57
  278. package/dist/components/status/Loader/Loader.js +77 -22
  279. package/dist/components/status/Loader/loader.cva.d.ts +23 -4
  280. package/dist/components/status/Loader/loader.cva.js +22 -13
  281. package/dist/components/status/Toast/Toast.js +27 -20
  282. package/dist/components/status/Toast/toast.cva.d.ts +61 -10
  283. package/dist/components/status/Toast/toast.cva.js +129 -64
  284. package/dist/components/status/Toast/useToast.js +62 -57
  285. package/dist/components/status/shared/status.cva.d.ts +30 -8
  286. package/dist/components/status/shared/status.cva.js +56 -50
  287. package/dist/components/table/CellText.js +3 -3
  288. package/dist/components/table/ColumnConfig.js +158 -54
  289. package/dist/components/table/HeaderText.js +3 -3
  290. package/dist/components/table/InfiniteTable.js +67 -16
  291. package/dist/components/table/PaginatedTable.js +84 -18
  292. package/dist/components/table/Table.js +34 -33
  293. package/dist/components/table/table.cva.d.ts +52 -19
  294. package/dist/components/table/table.cva.js +44 -35
  295. package/dist/components/text/Link/Link.js +22 -10
  296. package/dist/components/text/Link/link.cva.d.ts +11 -5
  297. package/dist/components/text/Link/link.cva.js +8 -5
  298. package/dist/components/text/Tag/Tag.js +3 -3
  299. package/dist/components/text/Tag/tag.cva.d.ts +15 -5
  300. package/dist/components/text/Tag/tag.cva.js +51 -48
  301. package/dist/components/text/Typography/Typography.js +25 -10
  302. package/dist/components/text/Typography/typography.cva.d.ts +93 -7
  303. package/dist/components/text/Typography/typography.cva.js +126 -122
  304. package/dist/config/confirmation.context.js +1 -1
  305. package/dist/config/link.context.js +23 -9
  306. package/dist/config/router.context.js +42 -16
  307. package/dist/config/theme.context.js +98 -45
  308. package/dist/config/uiConfig.context.d.ts +20 -6
  309. package/dist/config/uiConfig.context.js +68 -14
  310. package/dist/config/uiOverrides.context.d.ts +192 -0
  311. package/dist/config/uiOverrides.context.js +113 -0
  312. package/dist/helpers/dynamicInputs.d.ts +5 -5
  313. package/dist/helpers/dynamicInputs.js +3 -0
  314. package/dist/hooks/useAutosave.d.ts +2 -1
  315. package/dist/hooks/useAutosave.js +12 -4
  316. package/dist/hooks/useAutosave.spec.d.ts +1 -0
  317. package/dist/hooks/useBreakpoint.js +16 -3
  318. package/dist/hooks/useDebounceCallback.js +51 -17
  319. package/dist/hooks/useFilters.js +125 -64
  320. package/dist/hooks/useForm.js +42 -8
  321. package/dist/hooks/useFormAutosave.d.ts +3 -1
  322. package/dist/hooks/useFormAutosave.js +122 -30
  323. package/dist/hooks/useFormAutosave.spec.d.ts +1 -0
  324. package/dist/hooks/useIntersectionObserver.d.ts +1 -1
  325. package/dist/hooks/useIntersectionObserver.js +91 -24
  326. package/dist/hooks/useKeyInteractions.d.ts +20 -0
  327. package/dist/hooks/useKeyInteractions.js +54 -0
  328. package/dist/hooks/useKeyInteractions.spec.d.ts +1 -0
  329. package/dist/hooks/useLocalStorage.js +43 -10
  330. package/dist/hooks/useLongPressRepeat.js +55 -20
  331. package/dist/hooks/usePagination.js +49 -19
  332. package/dist/hooks/useQueryAutocomplete.d.ts +14 -0
  333. package/dist/hooks/useQueryAutocomplete.js +57 -0
  334. package/dist/hooks/useScrollableListBox.js +37 -16
  335. package/dist/hooks/useSorting.js +69 -28
  336. package/dist/hooks/useStateAndRef.js +21 -7
  337. package/dist/hooks/useTableColumnConfig.js +124 -31
  338. package/dist/hooks/useTranslationMemo.js +25 -5
  339. package/dist/index.d.ts +37 -1
  340. package/dist/index.js +34 -3
  341. package/dist/tw-ui-plugin.js +6 -0
  342. package/dist/utils/date-time.utils.d.ts +38 -10
  343. package/dist/utils/date-time.utils.js +136 -22
  344. package/dist/utils/query.utils.d.ts +4 -0
  345. package/dist/utils/query.utils.js +8 -0
  346. package/dist/utils/style-merge.util.d.ts +43 -0
  347. package/dist/utils/style-merge.util.js +233 -0
  348. package/dist/utils/style-merge.util.spec.d.ts +1 -0
  349. package/package.json +1 -1
  350. package/dist/config/uiStyle.context.d.ts +0 -162
  351. package/dist/config/uiStyle.context.js +0 -30
@@ -1,31 +1,98 @@
1
- import { useCallback, useEffect, useState } from "react";
1
+ import { c } from "react/compiler-runtime";
2
+ import { useEffect, useRef } from "react";
2
3
  //#region src/hooks/useIntersectionObserver.ts
3
- var useIntersectionObserver = ({ onIntersection, onIntersectionChange, root, rootMargin, threshold }) => {
4
- const [element, setElement] = useState(null);
5
- const ref = useCallback((node) => {
6
- setElement(node);
7
- }, []);
8
- useEffect(() => {
9
- if (!element) return;
10
- const observer = new IntersectionObserver((entries) => {
11
- if (entries.some((entry) => entry.isIntersecting)) onIntersection?.();
12
- onIntersectionChange?.(entries[0]);
13
- }, {
4
+ var useIntersectionObserver = (t0) => {
5
+ const $ = c(13);
6
+ const { onIntersection, onIntersectionChange, root, rootMargin, threshold } = t0;
7
+ const elementRef = useRef(null);
8
+ const observerRef = useRef(null);
9
+ const onIntersectionRef = useRef(onIntersection);
10
+ const onIntersectionChangeRef = useRef(onIntersectionChange);
11
+ let t1;
12
+ let t2;
13
+ if ($[0] !== onIntersection) {
14
+ t1 = () => {
15
+ onIntersectionRef.current = onIntersection;
16
+ };
17
+ t2 = [onIntersection];
18
+ $[0] = onIntersection;
19
+ $[1] = t1;
20
+ $[2] = t2;
21
+ } else {
22
+ t1 = $[1];
23
+ t2 = $[2];
24
+ }
25
+ useEffect(t1, t2);
26
+ let t3;
27
+ let t4;
28
+ if ($[3] !== onIntersectionChange) {
29
+ t3 = () => {
30
+ onIntersectionChangeRef.current = onIntersectionChange;
31
+ };
32
+ t4 = [onIntersectionChange];
33
+ $[3] = onIntersectionChange;
34
+ $[4] = t3;
35
+ $[5] = t4;
36
+ } else {
37
+ t3 = $[4];
38
+ t4 = $[5];
39
+ }
40
+ useEffect(t3, t4);
41
+ let t5;
42
+ let t6;
43
+ if ($[6] !== root || $[7] !== rootMargin || $[8] !== threshold) {
44
+ t5 = () => {
45
+ const observer = new IntersectionObserver((entries) => {
46
+ if (entries.some(_temp)) onIntersectionRef.current?.();
47
+ onIntersectionChangeRef.current?.(entries[0]);
48
+ }, {
49
+ root,
50
+ rootMargin,
51
+ threshold
52
+ });
53
+ observerRef.current = observer;
54
+ if (elementRef.current) observer.observe(elementRef.current);
55
+ return () => {
56
+ if (elementRef.current) observer.unobserve(elementRef.current);
57
+ observer.disconnect();
58
+ observerRef.current = null;
59
+ };
60
+ };
61
+ t6 = [
14
62
  root,
15
63
  rootMargin,
16
64
  threshold
17
- });
18
- observer.observe(element);
19
- return () => observer.disconnect();
20
- }, [
21
- element,
22
- root,
23
- onIntersection,
24
- onIntersectionChange,
25
- rootMargin,
26
- threshold
27
- ]);
28
- return { ref };
65
+ ];
66
+ $[6] = root;
67
+ $[7] = rootMargin;
68
+ $[8] = threshold;
69
+ $[9] = t5;
70
+ $[10] = t6;
71
+ } else {
72
+ t5 = $[9];
73
+ t6 = $[10];
74
+ }
75
+ useEffect(t5, t6);
76
+ let t7;
77
+ if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
78
+ t7 = (element) => {
79
+ if (elementRef.current === element) return;
80
+ if (observerRef.current && elementRef.current) observerRef.current.unobserve(elementRef.current);
81
+ elementRef.current = element;
82
+ if (observerRef.current && elementRef.current) observerRef.current.observe(elementRef.current);
83
+ };
84
+ $[11] = t7;
85
+ } else t7 = $[11];
86
+ const ref = t7;
87
+ let t8;
88
+ if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
89
+ t8 = { ref };
90
+ $[12] = t8;
91
+ } else t8 = $[12];
92
+ return t8;
29
93
  };
94
+ function _temp(entry) {
95
+ return entry.isIntersecting;
96
+ }
30
97
  //#endregion
31
98
  export { useIntersectionObserver };
@@ -0,0 +1,20 @@
1
+ import { KeyboardEvent } from 'react';
2
+ export type KeyInteractionAction = "up" | "down" | "left" | "right" | "space" | "escape" | "enter" | "backspace";
3
+ export type KeyInteractionCallback<TElement extends HTMLElement = HTMLElement> = (event: KeyboardEvent<TElement>) => void;
4
+ export interface KeyInteraction<TElement extends HTMLElement = HTMLElement> {
5
+ callback: KeyInteractionCallback<TElement>;
6
+ enabled?: boolean;
7
+ preventDefault?: boolean;
8
+ }
9
+ export interface KeyInteractionGroup<TElement extends HTMLElement = HTMLElement> extends KeyInteraction<TElement> {
10
+ actions: KeyInteractionAction[];
11
+ }
12
+ export type KeyInteractions<TElement extends HTMLElement = HTMLElement> = Partial<Record<KeyInteractionAction, KeyInteraction<TElement>>> & {
13
+ interactions?: KeyInteractionGroup<TElement>[];
14
+ };
15
+ export interface UseKeyInteractionsResult<TElement extends HTMLElement = HTMLElement> {
16
+ onKeyDown: (event: KeyboardEvent<TElement>) => void;
17
+ }
18
+ export declare const getKeyInteractionAction: (event: Pick<KeyboardEvent, "code" | "key">) => KeyInteractionAction | undefined;
19
+ export declare const createKeyInteractionsHandler: <TElement extends HTMLElement = HTMLElement>(interactions: KeyInteractions<TElement>) => (event: KeyboardEvent<TElement>) => void;
20
+ export declare const useKeyInteractions: <TElement extends HTMLElement = HTMLElement>(interactions: KeyInteractions<TElement>) => UseKeyInteractionsResult<TElement>;
@@ -0,0 +1,54 @@
1
+ import { c } from "react/compiler-runtime";
2
+ //#region src/hooks/useKeyInteractions.ts
3
+ var KEY_TO_ACTION = {
4
+ ArrowUp: "up",
5
+ ArrowDown: "down",
6
+ ArrowLeft: "left",
7
+ ArrowRight: "right",
8
+ " ": "space",
9
+ Spacebar: "space",
10
+ Escape: "escape",
11
+ Enter: "enter",
12
+ Backspace: "backspace"
13
+ };
14
+ var getKeyInteractionAction = (event) => {
15
+ return KEY_TO_ACTION[event.key] ?? (event.code === "Space" ? "space" : void 0);
16
+ };
17
+ var createKeyInteractionsHandler = (interactions) => {
18
+ return (event) => handleKeyInteraction({
19
+ event,
20
+ interactions
21
+ });
22
+ };
23
+ var useKeyInteractions = (interactions) => {
24
+ const $ = c(4);
25
+ let t0;
26
+ if ($[0] !== interactions) {
27
+ t0 = (event) => handleKeyInteraction({
28
+ event,
29
+ interactions
30
+ });
31
+ $[0] = interactions;
32
+ $[1] = t0;
33
+ } else t0 = $[1];
34
+ const onKeyDown = t0;
35
+ let t1;
36
+ if ($[2] !== onKeyDown) {
37
+ t1 = { onKeyDown };
38
+ $[2] = onKeyDown;
39
+ $[3] = t1;
40
+ } else t1 = $[3];
41
+ return t1;
42
+ };
43
+ var handleKeyInteraction = ({ event, interactions }) => {
44
+ const action = getKeyInteractionAction(event);
45
+ if (!action) return;
46
+ const interaction = interactions[action];
47
+ const groupInteraction = interactions.interactions?.find((group) => group.actions.includes(action));
48
+ const selectedInteraction = interaction ?? groupInteraction;
49
+ if (!selectedInteraction || selectedInteraction.enabled === false) return;
50
+ if (selectedInteraction.preventDefault) event.preventDefault();
51
+ selectedInteraction.callback(event);
52
+ };
53
+ //#endregion
54
+ export { createKeyInteractionsHandler, getKeyInteractionAction, useKeyInteractions };
@@ -0,0 +1 @@
1
+ export {};
@@ -1,4 +1,5 @@
1
- import { useCallback, useState } from "react";
1
+ import { c } from "react/compiler-runtime";
2
+ import { useState } from "react";
2
3
  //#region src/hooks/useLocalStorage.ts
3
4
  var getValue = (key, schema) => {
4
5
  if (!localStorage) return null;
@@ -14,24 +15,56 @@ var getValue = (key, schema) => {
14
15
  if (parsedValue.success) return parsedValue.data;
15
16
  else return null;
16
17
  };
17
- var useLocalStorage = ({ key, schema }) => {
18
- const [value, setValue] = useState(() => getValue(key, schema));
19
- return {
20
- value,
21
- set: useCallback((newValue) => {
18
+ var useLocalStorage = (t0) => {
19
+ const $ = c(12);
20
+ const { key, schema } = t0;
21
+ let t1;
22
+ if ($[0] !== key || $[1] !== schema) {
23
+ t1 = () => getValue(key, schema);
24
+ $[0] = key;
25
+ $[1] = schema;
26
+ $[2] = t1;
27
+ } else t1 = $[2];
28
+ const [value, setValue] = useState(t1);
29
+ let t2;
30
+ if ($[3] !== key || $[4] !== schema) {
31
+ t2 = (newValue) => {
22
32
  if (!localStorage) return;
23
33
  const parsedValue = schema.safeParse(newValue);
24
34
  if (!parsedValue.success) return;
25
35
  if (typeof parsedValue.data === "string") localStorage.setItem(key, parsedValue.data);
26
36
  else localStorage.setItem(key, JSON.stringify(parsedValue.data));
27
37
  setValue(parsedValue.data);
28
- }, [key, schema]),
29
- remove: useCallback(() => {
38
+ };
39
+ $[3] = key;
40
+ $[4] = schema;
41
+ $[5] = t2;
42
+ } else t2 = $[5];
43
+ const set = t2;
44
+ let t3;
45
+ if ($[6] !== key) {
46
+ t3 = () => {
30
47
  if (!localStorage) return;
31
48
  localStorage.removeItem(key);
32
49
  setValue(null);
33
- }, [key])
34
- };
50
+ };
51
+ $[6] = key;
52
+ $[7] = t3;
53
+ } else t3 = $[7];
54
+ const remove = t3;
55
+ let t4;
56
+ if ($[8] !== remove || $[9] !== set || $[10] !== value) {
57
+ t4 = {
58
+ value,
59
+ set,
60
+ remove
61
+ };
62
+ $[8] = remove;
63
+ $[9] = set;
64
+ $[10] = value;
65
+ $[11] = t4;
66
+ } else t4 = $[11];
67
+ return t4;
35
68
  };
36
69
  //#endregion
37
70
  export { useLocalStorage };
@@ -1,29 +1,64 @@
1
+ import { c } from "react/compiler-runtime";
1
2
  import { useEffect, useRef } from "react";
2
3
  //#region src/hooks/useLongPressRepeat.ts
3
- var useLongPressRepeat = ({ onPress, enabled = true, interval = 85, timeout = 500 }) => {
4
+ var useLongPressRepeat = (t0) => {
5
+ const $ = c(10);
6
+ const { onPress, enabled: t1, interval: t2, timeout: t3 } = t0;
7
+ const enabled = t1 === void 0 ? true : t1;
8
+ const interval = t2 === void 0 ? 85 : t2;
9
+ const timeout = t3 === void 0 ? 500 : t3;
4
10
  const intervalRef = useRef(void 0);
5
- useEffect(() => {
6
- return () => {
11
+ let t4;
12
+ let t5;
13
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
14
+ t4 = () => () => {
7
15
  clearInterval(intervalRef.current);
8
16
  };
9
- }, []);
10
- const onPressStart = () => {
11
- onPress(false);
12
- if (!enabled) return;
13
- intervalRef.current = setTimeout(() => {
14
- onPress(true);
15
- intervalRef.current = setInterval(() => {
17
+ t5 = [];
18
+ $[0] = t4;
19
+ $[1] = t5;
20
+ } else {
21
+ t4 = $[0];
22
+ t5 = $[1];
23
+ }
24
+ useEffect(t4, t5);
25
+ let t6;
26
+ if ($[2] !== enabled || $[3] !== interval || $[4] !== onPress || $[5] !== timeout) {
27
+ t6 = () => {
28
+ onPress(false);
29
+ if (!enabled) return;
30
+ intervalRef.current = setTimeout(() => {
16
31
  onPress(true);
17
- }, interval);
18
- }, timeout);
19
- };
20
- const onPressEnd = () => {
21
- clearInterval(intervalRef.current);
22
- };
23
- return {
24
- onPressStart,
25
- onPressEnd
26
- };
32
+ intervalRef.current = setInterval(() => {
33
+ onPress(true);
34
+ }, interval);
35
+ }, timeout);
36
+ };
37
+ $[2] = enabled;
38
+ $[3] = interval;
39
+ $[4] = onPress;
40
+ $[5] = timeout;
41
+ $[6] = t6;
42
+ } else t6 = $[6];
43
+ const onPressStart = t6;
44
+ let t7;
45
+ if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
46
+ t7 = () => {
47
+ clearInterval(intervalRef.current);
48
+ };
49
+ $[7] = t7;
50
+ } else t7 = $[7];
51
+ const onPressEnd = t7;
52
+ let t8;
53
+ if ($[8] !== onPressStart) {
54
+ t8 = {
55
+ onPressStart,
56
+ onPressEnd
57
+ };
58
+ $[8] = onPressStart;
59
+ $[9] = t8;
60
+ } else t8 = $[9];
61
+ return t8;
27
62
  };
28
63
  //#endregion
29
64
  export { useLongPressRepeat };
@@ -1,5 +1,6 @@
1
1
  import { UIRouter } from "../config/router.context.js";
2
2
  import { RoutingUtils } from "../utils/routing.utils.js";
3
+ import { c } from "react/compiler-runtime";
3
4
  import { useEffect, useState } from "react";
4
5
  //#region src/hooks/usePagination.ts
5
6
  var DEFAULT_STATE = {
@@ -7,26 +8,55 @@ var DEFAULT_STATE = {
7
8
  pageSize: 20
8
9
  };
9
10
  function usePagination(defaultPagination) {
11
+ const $ = c(12);
10
12
  const { replace, searchParams } = UIRouter.useUIRouter();
11
- const [pagination, setPagination] = useState(defaultPagination ?? {
12
- pageIndex: searchParams.has("page") ? Number.parseInt(searchParams.get("page") ?? "", 10) : DEFAULT_STATE.pageIndex,
13
- pageSize: searchParams.has("size") ? Number.parseInt(searchParams.get("size") ?? "", 10) : DEFAULT_STATE.pageSize
14
- });
15
- useEffect(() => {
16
- const params = new URLSearchParams(searchParams);
17
- params.delete("size");
18
- params.delete("page");
19
- if (pagination.pageSize !== DEFAULT_STATE.pageSize) params.set("size", pagination.pageSize.toString());
20
- if (pagination.pageIndex !== DEFAULT_STATE.pageIndex) params.set("page", pagination.pageIndex.toString());
21
- if (params.toString() === searchParams.toString()) return;
22
- replace(".", RoutingUtils.toRouterSearch(params));
23
- }, [pagination]);
24
- return {
25
- pagination,
26
- setPagination,
27
- pageIndex: pagination.pageIndex,
28
- pageSize: pagination.pageSize
29
- };
13
+ let t0;
14
+ if ($[0] !== defaultPagination || $[1] !== searchParams) {
15
+ t0 = defaultPagination ?? {
16
+ pageIndex: searchParams.has("page") ? Number.parseInt(searchParams.get("page") ?? "", 10) : DEFAULT_STATE.pageIndex,
17
+ pageSize: searchParams.has("size") ? Number.parseInt(searchParams.get("size") ?? "", 10) : DEFAULT_STATE.pageSize
18
+ };
19
+ $[0] = defaultPagination;
20
+ $[1] = searchParams;
21
+ $[2] = t0;
22
+ } else t0 = $[2];
23
+ const [pagination, setPagination] = useState(t0);
24
+ let t1;
25
+ if ($[3] !== pagination.pageIndex || $[4] !== pagination.pageSize || $[5] !== replace || $[6] !== searchParams) {
26
+ t1 = () => {
27
+ const params = new URLSearchParams(searchParams);
28
+ params.delete("size");
29
+ params.delete("page");
30
+ if (pagination.pageSize !== DEFAULT_STATE.pageSize) params.set("size", pagination.pageSize.toString());
31
+ if (pagination.pageIndex !== DEFAULT_STATE.pageIndex) params.set("page", pagination.pageIndex.toString());
32
+ if (params.toString() === searchParams.toString()) return;
33
+ replace(".", RoutingUtils.toRouterSearch(params));
34
+ };
35
+ $[3] = pagination.pageIndex;
36
+ $[4] = pagination.pageSize;
37
+ $[5] = replace;
38
+ $[6] = searchParams;
39
+ $[7] = t1;
40
+ } else t1 = $[7];
41
+ let t2;
42
+ if ($[8] !== pagination) {
43
+ t2 = [pagination];
44
+ $[8] = pagination;
45
+ $[9] = t2;
46
+ } else t2 = $[9];
47
+ useEffect(t1, t2);
48
+ let t3;
49
+ if ($[10] !== pagination) {
50
+ t3 = {
51
+ pagination,
52
+ setPagination,
53
+ pageIndex: pagination.pageIndex,
54
+ pageSize: pagination.pageSize
55
+ };
56
+ $[10] = pagination;
57
+ $[11] = t3;
58
+ } else t3 = $[11];
59
+ return t3;
30
60
  }
31
61
  //#endregion
32
62
  export { usePagination };
@@ -0,0 +1,14 @@
1
+ import { InfiniteData } from '@tanstack/react-query';
2
+ import { Key } from 'react-aria-components';
3
+ import { InfiniteQueryPage, QueryFn, UseQueryAutocompleteOptions } from '../components/inputs/Selection/Autocomplete/queryAutocomplete.types';
4
+ export declare const useQueryAutocomplete: <TQueryFn extends QueryFn, TKey extends Key = Key>({ query, queryParams, queryOptions, mapItems, initialQueryState, search, }: UseQueryAutocompleteOptions<TQueryFn, TKey>) => {
5
+ data: any;
6
+ isLoading: boolean;
7
+ isQueryEnabled: boolean;
8
+ handleEnableQuery: () => void;
9
+ items: import('..').SelectItem<TKey>[];
10
+ totalItems: number | undefined;
11
+ hasNextPage: boolean;
12
+ fetchNextPage: ((options?: import('@tanstack/react-query').FetchNextPageOptions) => Promise<import('@tanstack/react-query').InfiniteQueryObserverResult<InfiniteData<InfiniteQueryPage<TKey>, unknown>, Error>>) | undefined;
13
+ isFetchingNextPage: boolean;
14
+ };
@@ -0,0 +1,57 @@
1
+ import { ApiQueryUtils } from "../utils/query.utils.js";
2
+ import { useMemo, useState } from "react";
3
+ //#region src/hooks/useQueryAutocomplete.ts
4
+ var isFilterSearchParams = (params) => {
5
+ return typeof params === "object" && params !== null && "filter" in params;
6
+ };
7
+ var useQueryAutocomplete = ({ query, queryParams, queryOptions, mapItems, initialQueryState, search }) => {
8
+ "use no memo";
9
+ const [isQueryEnabled, setIsQueryEnabled] = useState(!initialQueryState);
10
+ const queryResult = query(search === void 0 ? queryParams : {
11
+ ...queryParams,
12
+ limit: queryParams?.limit ?? ApiQueryUtils.DEFAULT_LIMIT,
13
+ search,
14
+ filter: {
15
+ ...isFilterSearchParams(queryParams) ? queryParams.filter : {},
16
+ search
17
+ }
18
+ }, {
19
+ ...queryOptions,
20
+ enabled: isQueryEnabled && (queryOptions?.enabled ?? true)
21
+ });
22
+ const data = queryResult.data;
23
+ const isLoading = queryResult.isLoading;
24
+ const isInfiniteQueryResult = (result) => {
25
+ return "hasNextPage" in result && "fetchNextPage" in result;
26
+ };
27
+ const handleEnableQuery = () => {
28
+ setIsQueryEnabled(true);
29
+ };
30
+ const infiniteQueryResult = isInfiniteQueryResult(queryResult) ? queryResult : void 0;
31
+ const isInfiniteQuery = infiniteQueryResult !== void 0;
32
+ const hasNextPage = infiniteQueryResult?.hasNextPage ?? false;
33
+ const fetchNextPage = infiniteQueryResult?.fetchNextPage;
34
+ const isFetchingNextPage = infiniteQueryResult?.isFetchingNextPage ?? false;
35
+ const totalItems = infiniteQueryResult?.data?.pages?.[0]?.totalItems;
36
+ const items = useMemo(() => {
37
+ if (!data) return [];
38
+ return mapItems(isInfiniteQuery ? data.pages?.flatMap((page) => page?.items ?? []) : data);
39
+ }, [
40
+ data,
41
+ isInfiniteQuery,
42
+ mapItems
43
+ ]);
44
+ return {
45
+ data,
46
+ isLoading: isLoading || isFetchingNextPage,
47
+ isQueryEnabled,
48
+ handleEnableQuery,
49
+ items,
50
+ totalItems,
51
+ hasNextPage,
52
+ fetchNextPage,
53
+ isFetchingNextPage
54
+ };
55
+ };
56
+ //#endregion
57
+ export { useQueryAutocomplete };
@@ -1,26 +1,47 @@
1
1
  import { useBreakpoint } from "./useBreakpoint.js";
2
+ import { c } from "react/compiler-runtime";
2
3
  import { useEffect, useRef } from "react";
3
4
  //#region src/hooks/useScrollableListBox.ts
4
5
  function useScrollableListBox() {
6
+ const $ = c(4);
5
7
  const ref = useRef(null);
6
8
  const isDesktop = useBreakpoint("md");
7
- useEffect(() => {
8
- const node = ref.current;
9
- if (!node || isDesktop) return;
10
- const onPointerDownCapture = (e) => {
11
- e.stopPropagation();
9
+ let t0;
10
+ let t1;
11
+ if ($[0] !== isDesktop) {
12
+ t0 = () => {
13
+ const node = ref.current;
14
+ if (!node || isDesktop) return;
15
+ const onPointerDownCapture = _temp;
16
+ const onClickCapture = _temp2;
17
+ node.addEventListener("pointerdown", onPointerDownCapture);
18
+ node.addEventListener("click", onClickCapture);
19
+ return () => {
20
+ node.removeEventListener("pointerdown", onPointerDownCapture);
21
+ node.removeEventListener("click", onClickCapture);
22
+ };
12
23
  };
13
- const onClickCapture = (e) => {
14
- if (e.currentTarget?.contains(e.target) && e.target !== e.currentTarget) e.target.click();
15
- };
16
- node.addEventListener("pointerdown", onPointerDownCapture);
17
- node.addEventListener("click", onClickCapture);
18
- return () => {
19
- node.removeEventListener("pointerdown", onPointerDownCapture);
20
- node.removeEventListener("click", onClickCapture);
21
- };
22
- }, [ref, isDesktop]);
23
- return { ref };
24
+ t1 = [ref, isDesktop];
25
+ $[0] = isDesktop;
26
+ $[1] = t0;
27
+ $[2] = t1;
28
+ } else {
29
+ t0 = $[1];
30
+ t1 = $[2];
31
+ }
32
+ useEffect(t0, t1);
33
+ let t2;
34
+ if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
35
+ t2 = { ref };
36
+ $[3] = t2;
37
+ } else t2 = $[3];
38
+ return t2;
39
+ }
40
+ function _temp2(e_0) {
41
+ if (e_0.currentTarget?.contains(e_0.target) && e_0.target !== e_0.currentTarget) e_0.target.click();
42
+ }
43
+ function _temp(e) {
44
+ e.stopPropagation();
24
45
  }
25
46
  //#endregion
26
47
  export { useScrollableListBox };