@povio/ui 3.0.0-rc.3 → 3.1.0

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 (309) hide show
  1. package/README.md +39 -0
  2. package/dist/assets/icons/AlignCenter.js +11 -26
  3. package/dist/assets/icons/AlignLeft.js +11 -26
  4. package/dist/assets/icons/AlignLeftRight.js +11 -26
  5. package/dist/assets/icons/AlignRight.js +11 -26
  6. package/dist/assets/icons/ArrowDropDown.js +11 -26
  7. package/dist/assets/icons/ArrowDropUp.js +11 -26
  8. package/dist/assets/icons/ArrowLeft.js +11 -26
  9. package/dist/assets/icons/ArrowRight.js +11 -26
  10. package/dist/assets/icons/Bold.js +11 -26
  11. package/dist/assets/icons/BulletedList.js +11 -26
  12. package/dist/assets/icons/Calendar.js +13 -28
  13. package/dist/assets/icons/Check.js +13 -28
  14. package/dist/assets/icons/CheckCircle.js +11 -26
  15. package/dist/assets/icons/CheckboxCheckmark.js +14 -29
  16. package/dist/assets/icons/CheckboxIndeterminate.js +14 -29
  17. package/dist/assets/icons/ChevronDown.js +13 -28
  18. package/dist/assets/icons/ChevronLeft.js +13 -28
  19. package/dist/assets/icons/ChevronRight.js +13 -28
  20. package/dist/assets/icons/ChevronUp.js +13 -28
  21. package/dist/assets/icons/ChevronsLeft.js +13 -28
  22. package/dist/assets/icons/ChevronsRight.js +13 -28
  23. package/dist/assets/icons/Clock.js +11 -26
  24. package/dist/assets/icons/Close.js +11 -26
  25. package/dist/assets/icons/DateTime.js +14 -35
  26. package/dist/assets/icons/DragIndicator.js +11 -26
  27. package/dist/assets/icons/File.js +13 -28
  28. package/dist/assets/icons/Highlight.js +11 -26
  29. package/dist/assets/icons/HighlightOn.js +15 -49
  30. package/dist/assets/icons/Home.js +11 -26
  31. package/dist/assets/icons/Info.js +16 -37
  32. package/dist/assets/icons/Italic.js +11 -26
  33. package/dist/assets/icons/Link.js +11 -26
  34. package/dist/assets/icons/Menu.js +11 -26
  35. package/dist/assets/icons/NumberedList.js +11 -26
  36. package/dist/assets/icons/PointerHorizontal.js +11 -26
  37. package/dist/assets/icons/PointerVertical.js +11 -26
  38. package/dist/assets/icons/Search.js +11 -26
  39. package/dist/assets/icons/Send.js +13 -28
  40. package/dist/assets/icons/Strikethrough.js +11 -26
  41. package/dist/assets/icons/TextColor.js +14 -48
  42. package/dist/assets/icons/Today.js +11 -26
  43. package/dist/assets/icons/Underlined.js +13 -28
  44. package/dist/assets/icons/Upload.js +14 -35
  45. package/dist/assets/icons/Visibility.js +11 -26
  46. package/dist/assets/icons/VisibilityOff.js +11 -26
  47. package/dist/assets/icons/WarningFilled.js +13 -28
  48. package/dist/components/Breadcrumbs/Breadcrumbs.js +56 -207
  49. package/dist/components/Menu/Menu.d.ts +4 -0
  50. package/dist/components/Menu/Menu.js +2 -18
  51. package/dist/components/Menu/MenuDesktop.js +7 -41
  52. package/dist/components/Menu/MenuItem.js +9 -32
  53. package/dist/components/Menu/MenuMobile.d.ts +1 -1
  54. package/dist/components/Menu/MenuMobile.js +39 -97
  55. package/dist/components/Menu/MenuPopover.js +29 -105
  56. package/dist/components/buttons/IconButton/IconButton.js +8 -40
  57. package/dist/components/buttons/InlineIconButton/InlineIconButton.d.ts +1 -2
  58. package/dist/components/buttons/InlineIconButton/InlineIconButton.js +9 -34
  59. package/dist/components/buttons/PillButton/PillButton.js +17 -55
  60. package/dist/components/buttons/SplitButton/SplitButton.js +18 -103
  61. package/dist/components/buttons/TextButton/TextButton.js +8 -30
  62. package/dist/components/buttons/ToggleButton/ToggleButton.js +8 -28
  63. package/dist/components/buttons/shared/ButtonContent.js +22 -80
  64. package/dist/components/inputs/Checkbox/Checkbox.d.ts +0 -1
  65. package/dist/components/inputs/Checkbox/Checkbox.js +35 -201
  66. package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +10 -24
  67. package/dist/components/inputs/Checkbox/checkbox.cva.d.ts +0 -3
  68. package/dist/components/inputs/Checkbox/checkbox.cva.js +1 -2
  69. package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +5 -12
  70. package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +75 -373
  71. package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +5 -12
  72. package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +186 -492
  73. package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +5 -14
  74. package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +47 -273
  75. package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +3 -7
  76. package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +121 -611
  77. package/dist/components/inputs/DateTime/shared/Calendar.d.ts +3 -5
  78. package/dist/components/inputs/DateTime/shared/Calendar.js +120 -338
  79. package/dist/components/inputs/DateTime/shared/CalendarCell.d.ts +2 -4
  80. package/dist/components/inputs/DateTime/shared/CalendarCell.js +103 -310
  81. package/dist/components/inputs/DateTime/shared/CalendarGrid.d.ts +2 -4
  82. package/dist/components/inputs/DateTime/shared/CalendarGrid.js +33 -150
  83. package/dist/components/inputs/DateTime/shared/CalendarHeader.d.ts +2 -1
  84. package/dist/components/inputs/DateTime/shared/CalendarHeader.js +98 -249
  85. package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +137 -318
  86. package/dist/components/inputs/DateTime/shared/DateField.js +112 -286
  87. package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +3 -14
  88. package/dist/components/inputs/DateTime/shared/DatePickerInput.js +129 -356
  89. package/dist/components/inputs/DateTime/shared/DateSegmentItem.d.ts +0 -15
  90. package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +11 -96
  91. package/dist/components/inputs/DateTime/shared/DateTimeDialog.d.ts +4 -1
  92. package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +28 -81
  93. package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +10 -59
  94. package/dist/components/inputs/DateTime/shared/MonthPicker.js +58 -103
  95. package/dist/components/inputs/DateTime/shared/RangeCalendar.js +82 -193
  96. package/dist/components/inputs/DateTime/shared/TimeField.js +8 -27
  97. package/dist/components/inputs/DateTime/shared/TimePickerForm.js +110 -279
  98. package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +1 -4
  99. package/dist/components/inputs/DateTime/shared/TimePickerInput.js +65 -210
  100. package/dist/components/inputs/DateTime/shared/YearPicker.js +68 -119
  101. package/dist/components/inputs/File/FileUpload.js +45 -88
  102. package/dist/components/inputs/File/FileUploadContainer.js +7 -15
  103. package/dist/components/inputs/File/InputUpload.js +79 -317
  104. package/dist/components/inputs/File/shared/FileCard.js +41 -104
  105. package/dist/components/inputs/File/shared/FileCardList.js +12 -47
  106. package/dist/components/inputs/File/shared/FileUploadContent.js +44 -175
  107. package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +46 -149
  108. package/dist/components/inputs/File/shared/FileUploadContentError.js +93 -234
  109. package/dist/components/inputs/File/shared/FileUploadContentFilled.js +97 -230
  110. package/dist/components/inputs/File/shared/FileUploadContentLoading.js +55 -199
  111. package/dist/components/inputs/File/shared/InputUploadContent.js +34 -148
  112. package/dist/components/inputs/File/shared/InputUploadFilled.js +8 -49
  113. package/dist/components/inputs/File/shared/ProgressBar.d.ts +2 -2
  114. package/dist/components/inputs/File/shared/ProgressBar.js +20 -53
  115. package/dist/components/inputs/File/shared/fileUpload.cva.d.ts +1 -1
  116. package/dist/components/inputs/File/shared/fileUpload.cva.js +1 -1
  117. package/dist/components/inputs/File/shared/progressBar.cva.d.ts +38 -0
  118. package/dist/components/inputs/File/shared/progressBar.cva.js +28 -0
  119. package/dist/components/inputs/FormField/FormField.d.ts +3 -3
  120. package/dist/components/inputs/FormField/FormField.js +37 -119
  121. package/dist/components/inputs/FormField/FormFieldError.js +5 -25
  122. package/dist/components/inputs/FormField/FormFieldHeader.d.ts +2 -2
  123. package/dist/components/inputs/FormField/FormFieldHeader.js +22 -81
  124. package/dist/components/inputs/FormField/FormFieldHeaderClose.js +7 -31
  125. package/dist/components/inputs/FormField/FormFieldHelper.js +6 -26
  126. package/dist/components/inputs/FormField/FormFieldLabel.d.ts +2 -2
  127. package/dist/components/inputs/FormField/FormFieldLabel.js +9 -40
  128. package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +2 -5
  129. package/dist/components/inputs/Input/NumberInput/NumberInput.js +97 -447
  130. package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +9 -48
  131. package/dist/components/inputs/Input/TextArea/TextArea.js +90 -305
  132. package/dist/components/inputs/Input/TextInput/TextInput.d.ts +1 -3
  133. package/dist/components/inputs/Input/TextInput/TextInput.js +90 -419
  134. package/dist/components/inputs/Input/shared/InputContent.js +59 -192
  135. package/dist/components/inputs/Inputs/Form.js +11 -40
  136. package/dist/components/inputs/Inputs/InputItem.d.ts +21 -15
  137. package/dist/components/inputs/Inputs/InputItem.js +14 -69
  138. package/dist/components/inputs/Inputs/Inputs.js +11 -37
  139. package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +1 -3
  140. package/dist/components/inputs/RadioGroup/RadioGroup.js +61 -353
  141. package/dist/components/inputs/RadioGroup/radio.cva.d.ts +0 -45
  142. package/dist/components/inputs/RadioGroup/radio.cva.js +1 -48
  143. package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +2 -6
  144. package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +22 -217
  145. package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +18 -3
  146. package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +8 -107
  147. package/dist/components/inputs/Selection/Select/Select.d.ts +3 -7
  148. package/dist/components/inputs/Selection/Select/Select.js +18 -227
  149. package/dist/components/inputs/Selection/shared/SelectBase.d.ts +3 -8
  150. package/dist/components/inputs/Selection/shared/SelectBase.js +18 -69
  151. package/dist/components/inputs/Selection/shared/SelectDesktop.d.ts +1 -1
  152. package/dist/components/inputs/Selection/shared/SelectDesktop.js +138 -393
  153. package/dist/components/inputs/Selection/shared/SelectInput.d.ts +2 -2
  154. package/dist/components/inputs/Selection/shared/SelectInput.js +116 -397
  155. package/dist/components/inputs/Selection/shared/SelectInputTags.js +25 -99
  156. package/dist/components/inputs/Selection/shared/SelectListBox.d.ts +2 -2
  157. package/dist/components/inputs/Selection/shared/SelectListBox.js +52 -164
  158. package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +35 -85
  159. package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +16 -69
  160. package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +21 -70
  161. package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +9 -58
  162. package/dist/components/inputs/Selection/shared/SelectMobile.d.ts +1 -1
  163. package/dist/components/inputs/Selection/shared/SelectMobile.js +6 -11
  164. package/dist/components/inputs/Selection/shared/select.context.d.ts +2 -3
  165. package/dist/components/inputs/Selection/shared/select.context.js +36 -67
  166. package/dist/components/inputs/Selection/shared/select.types.d.ts +2 -3
  167. package/dist/components/inputs/Selection/shared/useSelectItems.js +49 -109
  168. package/dist/components/inputs/Slider/Slider.d.ts +1 -2
  169. package/dist/components/inputs/Slider/Slider.js +76 -265
  170. package/dist/components/inputs/TextEditor/TextEditor.d.ts +0 -1
  171. package/dist/components/inputs/TextEditor/TextEditor.js +98 -447
  172. package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +11 -37
  173. package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +30 -102
  174. package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +45 -194
  175. package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +28 -88
  176. package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +14 -48
  177. package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.js +19 -66
  178. package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +15 -49
  179. package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +32 -92
  180. package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +54 -126
  181. package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +38 -141
  182. package/dist/components/inputs/Toggle/Toggle.d.ts +0 -1
  183. package/dist/components/inputs/Toggle/Toggle.js +37 -214
  184. package/dist/components/inputs/Toggle/toggle.cva.d.ts +0 -3
  185. package/dist/components/inputs/Toggle/toggle.cva.js +1 -2
  186. package/dist/components/inputs/shared/CheckContent.d.ts +1 -2
  187. package/dist/components/inputs/shared/CheckContent.js +11 -21
  188. package/dist/components/inputs/shared/InputClear.d.ts +1 -2
  189. package/dist/components/inputs/shared/InputClear.js +12 -88
  190. package/dist/components/inputs/shared/TooltipWrapper.js +11 -50
  191. package/dist/components/inputs/shared/input.cva.d.ts +0 -28
  192. package/dist/components/inputs/shared/input.cva.js +4 -38
  193. package/dist/components/navigation/Accordion/Accordion.js +22 -69
  194. package/dist/components/navigation/Accordion/AccordionItem.js +41 -86
  195. package/dist/components/navigation/Stepper/Stepper.js +22 -67
  196. package/dist/components/navigation/Stepper/StepperItem.js +31 -104
  197. package/dist/components/navigation/Stepper/StepperSeparator.js +5 -23
  198. package/dist/components/overlays/ActionModal/ActionModal.js +35 -169
  199. package/dist/components/overlays/BottomSheet/BottomSheet.js +25 -98
  200. package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +8 -48
  201. package/dist/components/overlays/Drawer/Drawer.js +22 -64
  202. package/dist/components/overlays/Modal/modal.cva.js +1 -1
  203. package/dist/components/overlays/ResponsivePopover/ResponsivePopover.d.ts +5 -1
  204. package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +28 -83
  205. package/dist/components/overlays/Tooltip/Tooltip.js +28 -137
  206. package/dist/components/overlays/Tooltip/TooltipEllipsis.js +12 -37
  207. package/dist/components/segment/Segment.js +57 -218
  208. package/dist/components/segment/SegmentItem.js +10 -67
  209. package/dist/components/shared/pagination/Pagination.js +22 -108
  210. package/dist/components/shared/pagination/PaginationList.js +64 -167
  211. package/dist/components/status/Alert/Alert.js +30 -97
  212. package/dist/components/status/Loader/Loader.js +22 -77
  213. package/dist/components/status/Toast/Toast.js +17 -22
  214. package/dist/components/status/Toast/toast.cva.d.ts +14 -3
  215. package/dist/components/status/Toast/toast.cva.js +12 -10
  216. package/dist/components/status/Toast/useToast.js +57 -62
  217. package/dist/components/table/ColumnConfig.js +54 -158
  218. package/dist/components/table/InfiniteTable.js +16 -67
  219. package/dist/components/table/PaginatedTable.js +18 -84
  220. package/dist/components/table/Table.js +30 -30
  221. package/dist/components/table/table.cva.d.ts +7 -0
  222. package/dist/components/table/table.cva.js +2 -1
  223. package/dist/components/text/Link/Link.js +7 -19
  224. package/dist/components/text/Pill/Pill.d.ts +15 -0
  225. package/dist/components/text/Pill/Pill.js +44 -0
  226. package/dist/components/text/Typography/Typography.js +8 -23
  227. package/dist/config/confirmation.context.js +1 -1
  228. package/dist/config/link.context.js +9 -23
  229. package/dist/config/router.context.js +16 -42
  230. package/dist/config/theme.context.js +45 -98
  231. package/dist/config/uiConfig.context.d.ts +10 -21
  232. package/dist/config/uiConfig.context.js +18 -69
  233. package/dist/config/uiOverrides.context.d.ts +10 -20
  234. package/dist/config/uiOverrides.context.js +14 -54
  235. package/dist/helpers/dynamicInputs.d.ts +5 -5
  236. package/dist/helpers/dynamicInputs.js +0 -3
  237. package/dist/hooks/useAutosave.d.ts +1 -2
  238. package/dist/hooks/useAutosave.js +4 -12
  239. package/dist/hooks/useBreakpoint.js +3 -16
  240. package/dist/hooks/useDebounceCallback.js +17 -51
  241. package/dist/hooks/useFilters.js +64 -125
  242. package/dist/hooks/useForm.js +8 -42
  243. package/dist/hooks/useFormAutosave.d.ts +1 -3
  244. package/dist/hooks/useFormAutosave.js +30 -122
  245. package/dist/hooks/useIntersectionObserver.d.ts +1 -1
  246. package/dist/hooks/useIntersectionObserver.js +24 -91
  247. package/dist/hooks/useLocalStorage.js +10 -43
  248. package/dist/hooks/useLongPressRepeat.js +20 -55
  249. package/dist/hooks/usePagination.js +19 -49
  250. package/dist/hooks/useScrollableListBox.js +16 -37
  251. package/dist/hooks/useSorting.js +28 -69
  252. package/dist/hooks/useStateAndRef.js +7 -21
  253. package/dist/hooks/useTableColumnConfig.js +31 -124
  254. package/dist/hooks/useTranslationMemo.js +5 -25
  255. package/dist/index.d.ts +7 -16
  256. package/dist/index.js +6 -13
  257. package/dist/tw-ui-plugin.js +0 -6
  258. package/dist/utils/date-time.utils.d.ts +10 -38
  259. package/dist/utils/date-time.utils.js +22 -136
  260. package/package.json +1 -1
  261. package/dist/components/inputs/DateTime/shared/datePicker.types.d.ts +0 -5
  262. package/dist/components/inputs/DateTime/shared/datePickerInput.cva.d.ts +0 -16
  263. package/dist/components/inputs/DateTime/shared/datePickerInput.cva.js +0 -16
  264. package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.d.ts +0 -15
  265. package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.js +0 -32
  266. package/dist/components/inputs/DateTime/shared/dateSegment.utils.d.ts +0 -2
  267. package/dist/components/inputs/DateTime/shared/dateSegment.utils.spec.d.ts +0 -1
  268. package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.d.ts +0 -40
  269. package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.js +0 -85
  270. package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.spec.d.ts +0 -1
  271. package/dist/components/inputs/FormField/formFieldHeader.cva.d.ts +0 -13
  272. package/dist/components/inputs/FormField/formFieldHeader.cva.js +0 -14
  273. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.d.ts +0 -45
  274. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +0 -571
  275. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +0 -35
  276. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +0 -575
  277. package/dist/components/inputs/Input/TextArea/TextArea.cva.d.ts +0 -8
  278. package/dist/components/inputs/Input/TextArea/TextArea.cva.js +0 -5
  279. package/dist/components/inputs/Input/shared/numberStatic.utils.d.ts +0 -1
  280. package/dist/components/inputs/Input/shared/numberStatic.utils.js +0 -7
  281. package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +0 -37
  282. package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +0 -14
  283. package/dist/components/inputs/Selection/Select/QuerySelect.js +0 -178
  284. package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.d.ts +0 -9
  285. package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +0 -47
  286. package/dist/components/inputs/Selection/shared/querySelect.utils.d.ts +0 -14
  287. package/dist/components/inputs/Selection/shared/querySelect.utils.js +0 -43
  288. package/dist/components/inputs/Selection/shared/selectDesktop.cva.d.ts +0 -6
  289. package/dist/components/inputs/Selection/shared/selectDesktop.cva.js +0 -5
  290. package/dist/components/inputs/Selection/shared/selectInput.cva.d.ts +0 -12
  291. package/dist/components/inputs/Selection/shared/selectInput.cva.js +0 -8
  292. package/dist/components/inputs/Selection/shared/staticSelect.utils.d.ts +0 -23
  293. package/dist/components/inputs/Selection/shared/staticSelect.utils.js +0 -54
  294. package/dist/components/inputs/Selection/shared/staticSelect.utils.spec.d.ts +0 -1
  295. package/dist/components/inputs/Skeleton/InputFrame.d.ts +0 -82
  296. package/dist/components/inputs/Skeleton/InputFrame.js +0 -548
  297. package/dist/components/inputs/shared/tooltipWrapper.cva.d.ts +0 -8
  298. package/dist/components/inputs/shared/tooltipWrapper.cva.js +0 -5
  299. package/dist/components/inputs/shared/useStaticInputHandoff.d.ts +0 -14
  300. package/dist/components/inputs/shared/useStaticInputHandoff.js +0 -100
  301. package/dist/hooks/useAutosave.spec.d.ts +0 -1
  302. package/dist/hooks/useFormAutosave.spec.d.ts +0 -1
  303. package/dist/hooks/useKeyInteractions.d.ts +0 -20
  304. package/dist/hooks/useKeyInteractions.js +0 -54
  305. package/dist/hooks/useKeyInteractions.spec.d.ts +0 -1
  306. package/dist/hooks/useQueryAutocomplete.d.ts +0 -14
  307. package/dist/hooks/useQueryAutocomplete.js +0 -72
  308. package/dist/utils/query.utils.d.ts +0 -4
  309. package/dist/utils/query.utils.js +0 -8
@@ -2,244 +2,83 @@ import { UIOverrides } from "../../config/uiOverrides.context.js";
2
2
  import { FormField } from "../inputs/FormField/FormField.js";
3
3
  import { segmentDefinition } from "./segment.cva.js";
4
4
  import { SegmentItem } from "./SegmentItem.js";
5
- import { c } from "react/compiler-runtime";
6
5
  import { jsx, jsxs } from "react/jsx-runtime";
7
6
  import { clsx } from "clsx";
8
- import { Fragment as Fragment$1, useRef } from "react";
7
+ import { Fragment as Fragment$1, useMemo, useRef } from "react";
9
8
  import { ToggleButtonGroup } from "react-aria-components";
10
9
  import { useToggleButtonGroup } from "react-aria";
11
10
  import { mergeRefs } from "@react-aria/utils";
12
11
  import { Controller } from "react-hook-form";
13
12
  import { useToggleGroupState } from "react-stately";
14
13
  //#region src/components/segment/Segment.tsx
15
- var SegmentBase = (t0) => {
16
- const $ = c(49);
17
- let className;
18
- let defaultValue;
19
- let error;
20
- let items;
21
- let onChange;
22
- let rest;
23
- let segmentItemClassName;
24
- let value;
25
- if ($[0] !== t0) {
26
- ({className, items, error, onChange, value, defaultValue, segmentItemClassName, ...rest} = t0);
27
- $[0] = t0;
28
- $[1] = className;
29
- $[2] = defaultValue;
30
- $[3] = error;
31
- $[4] = items;
32
- $[5] = onChange;
33
- $[6] = rest;
34
- $[7] = segmentItemClassName;
35
- $[8] = value;
36
- } else {
37
- className = $[1];
38
- defaultValue = $[2];
39
- error = $[3];
40
- items = $[4];
41
- onChange = $[5];
42
- rest = $[6];
43
- segmentItemClassName = $[7];
44
- value = $[8];
45
- }
46
- let t1;
47
- if ($[9] !== defaultValue) {
48
- t1 = defaultValue ? Array.isArray(defaultValue) ? defaultValue : [defaultValue] : void 0;
49
- $[9] = defaultValue;
50
- $[10] = t1;
51
- } else t1 = $[10];
52
- let t2;
53
- if ($[11] !== value) {
54
- t2 = value ? Array.isArray(value) ? value : [value] : void 0;
55
- $[11] = value;
56
- $[12] = t2;
57
- } else t2 = $[12];
58
- let t3;
59
- if ($[13] !== rest || $[14] !== t1 || $[15] !== t2) {
60
- t3 = {
61
- ...rest,
62
- defaultSelectedKeys: t1,
63
- selectedKeys: t2
64
- };
65
- $[13] = rest;
66
- $[14] = t1;
67
- $[15] = t2;
68
- $[16] = t3;
69
- } else t3 = $[16];
70
- const props = t3;
14
+ var SegmentBase = ({ className, items, error, onChange, value, defaultValue, segmentItemClassName, ...rest }) => {
15
+ const props = {
16
+ ...rest,
17
+ defaultSelectedKeys: defaultValue ? Array.isArray(defaultValue) ? defaultValue : [defaultValue] : void 0,
18
+ selectedKeys: value ? Array.isArray(value) ? value : [value] : void 0
19
+ };
71
20
  const buttonGroupRef = useRef(null);
72
21
  const state = useToggleGroupState(props);
73
22
  const { groupProps } = useToggleButtonGroup(props, state, buttonGroupRef);
74
23
  const segmentCva = UIOverrides.useCva("segment.cva", segmentDefinition);
75
- let t4;
76
- if ($[17] !== error || $[18] !== props.isDisabled) {
77
- t4 = {
78
- error,
79
- label: "",
80
- hideLabel: true,
81
- isDisabled: props.isDisabled
82
- };
83
- $[17] = error;
84
- $[18] = props.isDisabled;
85
- $[19] = t4;
86
- } else t4 = $[19];
87
- const formFieldProps = t4;
88
- let t5;
89
- if ($[20] !== onChange || $[21] !== props.selectionMode) {
90
- t5 = (keys) => {
91
- if (props.selectionMode === "multiple") onChange?.(Array.from(keys.values()));
92
- else onChange?.(Array.from(keys.values())[0]);
93
- };
94
- $[20] = onChange;
95
- $[21] = props.selectionMode;
96
- $[22] = t5;
97
- } else t5 = $[22];
98
- const onSelectionChange = t5;
99
- let t6;
100
- if ($[23] !== items.length) {
101
- t6 = items.length > 2 ? Array.from({ length: items.length * 2 - 1 }, _temp).join(" ") : `repeat(${items.length}, 1fr)`;
102
- $[23] = items.length;
103
- $[24] = t6;
104
- } else t6 = $[24];
105
- const gridTemplateColumns = t6;
106
- let t7;
107
- if ($[25] !== className) {
108
- t7 = clsx("relative w-full", className);
109
- $[25] = className;
110
- $[26] = t7;
111
- } else t7 = $[26];
112
- let t8;
113
- if ($[27] !== className || $[28] !== props || $[29] !== segmentCva) {
114
- t8 = segmentCva({
115
- ...props,
116
- className
117
- });
118
- $[27] = className;
119
- $[28] = props;
120
- $[29] = segmentCva;
121
- $[30] = t8;
122
- } else t8 = $[30];
123
- let t9;
124
- if ($[31] !== gridTemplateColumns) {
125
- t9 = { gridTemplateColumns };
126
- $[31] = gridTemplateColumns;
127
- $[32] = t9;
128
- } else t9 = $[32];
129
- let t10;
130
- if ($[33] !== items || $[34] !== props.isDisabled || $[35] !== segmentItemClassName || $[36] !== state) {
131
- t10 = items.map((item, index) => /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(SegmentItem, {
132
- ...item,
133
- className: clsx(item.className, segmentItemClassName),
134
- isDisabled: item.isDisabled || props.isDisabled,
135
- isSelected: state.selectedKeys.has(item.id),
136
- onPress: () => {
137
- state.toggleKey(item.id);
138
- }
139
- }), index !== items.length - 1 && items.length > 2 && /* @__PURE__ */ jsx("div", {
140
- className: clsx("h-5 w-px rounded-2xl", !state.selectedKeys.has(item.id) && !state.selectedKeys.has(items[index + 1].id) && "bg-elevation-outline-default-1"),
141
- children: /* @__PURE__ */ jsx("span", { className: "flex h-full w-px" })
142
- })] }, item.id));
143
- $[33] = items;
144
- $[34] = props.isDisabled;
145
- $[35] = segmentItemClassName;
146
- $[36] = state;
147
- $[37] = t10;
148
- } else t10 = $[37];
149
- let t11;
150
- if ($[38] !== groupProps || $[39] !== onSelectionChange || $[40] !== props || $[41] !== t10 || $[42] !== t8 || $[43] !== t9) {
151
- t11 = /* @__PURE__ */ jsx(ToggleButtonGroup, {
24
+ const formFieldProps = {
25
+ error,
26
+ label: "",
27
+ hideLabel: true,
28
+ isDisabled: props.isDisabled
29
+ };
30
+ const onSelectionChange = (keys) => {
31
+ if (props.selectionMode === "multiple") onChange?.(Array.from(keys.values()));
32
+ else onChange?.(Array.from(keys.values())[0]);
33
+ };
34
+ const gridTemplateColumns = useMemo(() => {
35
+ return items.length > 2 ? Array.from({ length: items.length * 2 - 1 }, (_, i) => i % 2 === 0 ? "1fr" : "auto").join(" ") : `repeat(${items.length}, 1fr)`;
36
+ }, [items.length]);
37
+ return /* @__PURE__ */ jsx(FormField, {
38
+ ...formFieldProps,
39
+ className: clsx("relative w-full", className),
40
+ children: /* @__PURE__ */ jsx(ToggleButtonGroup, {
152
41
  ...props,
153
42
  ...groupProps,
154
43
  ref: buttonGroupRef,
155
44
  onSelectionChange,
156
- className: t8,
157
- style: t9,
158
- children: t10
159
- });
160
- $[38] = groupProps;
161
- $[39] = onSelectionChange;
162
- $[40] = props;
163
- $[41] = t10;
164
- $[42] = t8;
165
- $[43] = t9;
166
- $[44] = t11;
167
- } else t11 = $[44];
168
- let t12;
169
- if ($[45] !== formFieldProps || $[46] !== t11 || $[47] !== t7) {
170
- t12 = /* @__PURE__ */ jsx(FormField, {
171
- ...formFieldProps,
172
- className: t7,
173
- children: t11
174
- });
175
- $[45] = formFieldProps;
176
- $[46] = t11;
177
- $[47] = t7;
178
- $[48] = t12;
179
- } else t12 = $[48];
180
- return t12;
45
+ className: segmentCva({
46
+ ...props,
47
+ className
48
+ }),
49
+ style: { gridTemplateColumns },
50
+ children: items.map((item, index) => /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(SegmentItem, {
51
+ ...item,
52
+ className: clsx(item.className, segmentItemClassName),
53
+ isDisabled: item.isDisabled || props.isDisabled,
54
+ isSelected: state.selectedKeys.has(item.id),
55
+ onPress: () => {
56
+ state.toggleKey(item.id);
57
+ }
58
+ }), index !== items.length - 1 && items.length > 2 && /* @__PURE__ */ jsx("div", {
59
+ className: clsx("h-5 w-px rounded-2xl", !state.selectedKeys.has(item.id) && !state.selectedKeys.has(items[index + 1].id) && "bg-elevation-outline-default-1"),
60
+ children: /* @__PURE__ */ jsx("span", { className: "flex h-full w-px" })
61
+ })] }, item.id))
62
+ })
63
+ });
181
64
  };
182
65
  var Segment = (props) => {
183
- const $ = c(15);
184
66
  if ("formControl" in props && props.formControl) {
185
- let formControl;
186
- let innerProps;
187
- let ref;
188
- if ($[0] !== props) {
189
- ({formControl, ref, ...innerProps} = props);
190
- $[0] = props;
191
- $[1] = formControl;
192
- $[2] = innerProps;
193
- $[3] = ref;
194
- } else {
195
- formControl = $[1];
196
- innerProps = $[2];
197
- ref = $[3];
198
- }
199
- let t0;
200
- if ($[4] !== innerProps || $[5] !== props.error || $[6] !== props.isDisabled || $[7] !== ref) {
201
- t0 = (t1) => {
202
- const { field, fieldState: t2 } = t1;
203
- const { error } = t2;
204
- return /* @__PURE__ */ jsx(SegmentBase, {
205
- ...innerProps,
206
- ref: mergeRefs(ref, field.ref),
207
- value: field.value,
208
- onChange: field.onChange,
209
- isDisabled: field.disabled || props.isDisabled,
210
- error: props.error ?? error?.message
211
- });
212
- };
213
- $[4] = innerProps;
214
- $[5] = props.error;
215
- $[6] = props.isDisabled;
216
- $[7] = ref;
217
- $[8] = t0;
218
- } else t0 = $[8];
219
- let t1;
220
- if ($[9] !== formControl.control || $[10] !== formControl.name || $[11] !== t0) {
221
- t1 = /* @__PURE__ */ jsx(Controller, {
222
- control: formControl.control,
223
- name: formControl.name,
224
- render: t0
225
- });
226
- $[9] = formControl.control;
227
- $[10] = formControl.name;
228
- $[11] = t0;
229
- $[12] = t1;
230
- } else t1 = $[12];
231
- return t1;
67
+ const { formControl, ref, ...innerProps } = props;
68
+ return /* @__PURE__ */ jsx(Controller, {
69
+ control: formControl.control,
70
+ name: formControl.name,
71
+ render: ({ field, fieldState: { error } }) => /* @__PURE__ */ jsx(SegmentBase, {
72
+ ...innerProps,
73
+ ref: mergeRefs(ref, field.ref),
74
+ value: field.value,
75
+ onChange: field.onChange,
76
+ isDisabled: field.disabled || props.isDisabled,
77
+ error: props.error ?? error?.message
78
+ })
79
+ });
232
80
  }
233
- let t0;
234
- if ($[13] !== props) {
235
- t0 = /* @__PURE__ */ jsx(SegmentBase, { ...props });
236
- $[13] = props;
237
- $[14] = t0;
238
- } else t0 = $[14];
239
- return t0;
81
+ return /* @__PURE__ */ jsx(SegmentBase, { ...props });
240
82
  };
241
- function _temp(_, i) {
242
- return i % 2 === 0 ? "1fr" : "auto";
243
- }
244
83
  //#endregion
245
84
  export { Segment };
@@ -1,85 +1,28 @@
1
1
  import { UIOverrides } from "../../config/uiOverrides.context.js";
2
2
  import { Typography } from "../text/Typography/Typography.js";
3
3
  import { segmentItemDefinition } from "./segment.cva.js";
4
- import { c } from "react/compiler-runtime";
5
4
  import { jsx, jsxs } from "react/jsx-runtime";
6
5
  import { ToggleButton } from "react-aria-components";
7
6
  //#region src/components/segment/SegmentItem.tsx
8
- var SegmentItem = (t0) => {
9
- const $ = c(23);
10
- let className;
11
- let icon;
12
- let id;
13
- let isDisabled;
14
- let label;
15
- let props;
16
- if ($[0] !== t0) {
17
- ({label, icon, id, isDisabled, className, ...props} = t0);
18
- $[0] = t0;
19
- $[1] = className;
20
- $[2] = icon;
21
- $[3] = id;
22
- $[4] = isDisabled;
23
- $[5] = label;
24
- $[6] = props;
25
- } else {
26
- className = $[1];
27
- icon = $[2];
28
- id = $[3];
29
- isDisabled = $[4];
30
- label = $[5];
31
- props = $[6];
32
- }
7
+ var SegmentItem = ({ label, icon, id, isDisabled, className, ...props }) => {
33
8
  const IconComponent = icon;
34
9
  const iconOnly = !!(icon && !label);
35
10
  const segmentItemCva = UIOverrides.useCva("segment.itemCva", segmentItemDefinition);
36
- let t1;
37
- if ($[7] !== className || $[8] !== iconOnly || $[9] !== segmentItemCva) {
38
- t1 = segmentItemCva({
11
+ return /* @__PURE__ */ jsxs(ToggleButton, {
12
+ ...props,
13
+ id,
14
+ className: segmentItemCva({
39
15
  iconOnly,
40
16
  className
41
- });
42
- $[7] = className;
43
- $[8] = iconOnly;
44
- $[9] = segmentItemCva;
45
- $[10] = t1;
46
- } else t1 = $[10];
47
- let t2;
48
- if ($[11] !== IconComponent || $[12] !== icon) {
49
- t2 = icon && /* @__PURE__ */ jsx(IconComponent, { className: "size-6" });
50
- $[11] = IconComponent;
51
- $[12] = icon;
52
- $[13] = t2;
53
- } else t2 = $[13];
54
- let t3;
55
- if ($[14] !== label) {
56
- t3 = label && /* @__PURE__ */ jsx(Typography, {
17
+ }),
18
+ isDisabled,
19
+ children: [icon && /* @__PURE__ */ jsx(IconComponent, { className: "size-6" }), label && /* @__PURE__ */ jsx(Typography, {
57
20
  size: "label-2",
58
21
  as: "span",
59
22
  className: "overflow-hidden text-ellipsis text-center",
60
23
  children: label
61
- });
62
- $[14] = label;
63
- $[15] = t3;
64
- } else t3 = $[15];
65
- let t4;
66
- if ($[16] !== id || $[17] !== isDisabled || $[18] !== props || $[19] !== t1 || $[20] !== t2 || $[21] !== t3) {
67
- t4 = /* @__PURE__ */ jsxs(ToggleButton, {
68
- ...props,
69
- id,
70
- className: t1,
71
- isDisabled,
72
- children: [t2, t3]
73
- });
74
- $[16] = id;
75
- $[17] = isDisabled;
76
- $[18] = props;
77
- $[19] = t1;
78
- $[20] = t2;
79
- $[21] = t3;
80
- $[22] = t4;
81
- } else t4 = $[22];
82
- return t4;
24
+ })]
25
+ });
83
26
  };
84
27
  //#endregion
85
28
  export { SegmentItem };
@@ -2,31 +2,16 @@ import { Typography } from "../../text/Typography/Typography.js";
2
2
  import "../../../config/i18n.js";
3
3
  import { NumberInput } from "../../inputs/Input/NumberInput/NumberInput.js";
4
4
  import { PaginationList } from "./PaginationList.js";
5
- import { c } from "react/compiler-runtime";
6
5
  import { jsx, jsxs } from "react/jsx-runtime";
7
6
  import { clsx } from "clsx";
8
7
  import { useTranslation } from "react-i18next";
9
8
  //#region src/components/shared/pagination/Pagination.tsx
10
- var Pagination = (t0) => {
11
- const $ = c(34);
12
- const { size: t1, variant: t2, color: t3, page, totalItems, totalPages, pageSize, hideText: t4, hideFirstLast: t5, hidePrevNext: t6, hideNumbers: t7, className, onPageChange, onPageSizeChange } = t0;
13
- const size = t1 === void 0 ? "s" : t1;
14
- const variant = t2 === void 0 ? "subtle" : t2;
15
- const color = t3 === void 0 ? "secondary" : t3;
16
- const hideText = t4 === void 0 ? true : t4;
17
- const hideFirstLast = t5 === void 0 ? true : t5;
18
- const hidePrevNext = t6 === void 0 ? false : t6;
19
- const hideNumbers = t7 === void 0 ? false : t7;
9
+ var Pagination = ({ size = "s", variant = "subtle", color = "secondary", page, totalItems, totalPages, pageSize, hideText = true, hideFirstLast = true, hidePrevNext = false, hideNumbers = false, className, onPageChange, onPageSizeChange }) => {
20
10
  const { t } = useTranslation("ui");
21
- let t8;
22
- if ($[0] !== className) {
23
- t8 = clsx("flex items-center gap-2", className);
24
- $[0] = className;
25
- $[1] = t8;
26
- } else t8 = $[1];
27
- let t9;
28
- if ($[2] !== color || $[3] !== hideFirstLast || $[4] !== hideNumbers || $[5] !== hidePrevNext || $[6] !== hideText || $[7] !== onPageChange || $[8] !== page || $[9] !== pageSize || $[10] !== size || $[11] !== totalItems || $[12] !== totalPages || $[13] !== variant) {
29
- t9 = totalItems > pageSize && /* @__PURE__ */ jsx(PaginationList, {
11
+ return /* @__PURE__ */ jsxs("nav", {
12
+ id: "pagination",
13
+ className: clsx("flex items-center gap-2", className),
14
+ children: [totalItems > pageSize && /* @__PURE__ */ jsx(PaginationList, {
30
15
  page,
31
16
  size,
32
17
  color,
@@ -37,95 +22,24 @@ var Pagination = (t0) => {
37
22
  hideNumbers,
38
23
  totalPages: totalPages ?? Math.ceil(totalItems / pageSize),
39
24
  onPageChange
40
- });
41
- $[2] = color;
42
- $[3] = hideFirstLast;
43
- $[4] = hideNumbers;
44
- $[5] = hidePrevNext;
45
- $[6] = hideText;
46
- $[7] = onPageChange;
47
- $[8] = page;
48
- $[9] = pageSize;
49
- $[10] = size;
50
- $[11] = totalItems;
51
- $[12] = totalPages;
52
- $[13] = variant;
53
- $[14] = t9;
54
- } else t9 = $[14];
55
- let t10;
56
- if ($[15] !== t) {
57
- t10 = t(_temp);
58
- $[15] = t;
59
- $[16] = t10;
60
- } else t10 = $[16];
61
- let t11;
62
- if ($[17] !== t10) {
63
- t11 = /* @__PURE__ */ jsx(Typography, {
64
- variant: "default",
65
- size: "label-2",
66
- as: "span",
67
- className: "whitespace-nowrap text-text-default-1",
68
- children: t10
69
- });
70
- $[17] = t10;
71
- $[18] = t11;
72
- } else t11 = $[18];
73
- let t12;
74
- if ($[19] !== onPageSizeChange) {
75
- t12 = (value) => onPageSizeChange?.(Number(value));
76
- $[19] = onPageSizeChange;
77
- $[20] = t12;
78
- } else t12 = $[20];
79
- let t13;
80
- if ($[21] !== t) {
81
- t13 = t(_temp2);
82
- $[21] = t;
83
- $[22] = t13;
84
- } else t13 = $[22];
85
- let t14;
86
- if ($[23] !== pageSize || $[24] !== t12 || $[25] !== t13) {
87
- t14 = /* @__PURE__ */ jsx(NumberInput, {
88
- value: pageSize,
89
- onChange: t12,
90
- label: t13,
91
- hideLabel: true,
92
- className: "w-min",
93
- inputClassName: "min-w-12 !px-3 !py-0-5"
94
- });
95
- $[23] = pageSize;
96
- $[24] = t12;
97
- $[25] = t13;
98
- $[26] = t14;
99
- } else t14 = $[26];
100
- let t15;
101
- if ($[27] !== t11 || $[28] !== t14) {
102
- t15 = /* @__PURE__ */ jsxs("div", {
25
+ }), /* @__PURE__ */ jsxs("div", {
103
26
  className: "flex items-center gap-2",
104
- children: [t11, t14]
105
- });
106
- $[27] = t11;
107
- $[28] = t14;
108
- $[29] = t15;
109
- } else t15 = $[29];
110
- let t16;
111
- if ($[30] !== t15 || $[31] !== t8 || $[32] !== t9) {
112
- t16 = /* @__PURE__ */ jsxs("nav", {
113
- id: "pagination",
114
- className: t8,
115
- children: [t9, t15]
116
- });
117
- $[30] = t15;
118
- $[31] = t8;
119
- $[32] = t9;
120
- $[33] = t16;
121
- } else t16 = $[33];
122
- return t16;
27
+ children: [/* @__PURE__ */ jsx(Typography, {
28
+ variant: "default",
29
+ size: "label-2",
30
+ as: "span",
31
+ className: "whitespace-nowrap text-text-default-1",
32
+ children: t(($) => $.ui.pagination.resultsPerPage)
33
+ }), /* @__PURE__ */ jsx(NumberInput, {
34
+ value: pageSize,
35
+ onChange: (value) => onPageSizeChange?.(Number(value)),
36
+ label: t(($) => $.ui.pagination.resultsPerPage),
37
+ hideLabel: true,
38
+ className: "w-min",
39
+ inputClassName: "min-w-12 !px-3 !py-0-5"
40
+ })]
41
+ })]
42
+ });
123
43
  };
124
- function _temp($) {
125
- return $.ui.pagination.resultsPerPage;
126
- }
127
- function _temp2($_0) {
128
- return $_0.ui.pagination.resultsPerPage;
129
- }
130
44
  //#endregion
131
45
  export { Pagination };