@povio/ui 0.0.8 → 0.0.9

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 (482) hide show
  1. package/dist/assets/icons/AlignCenter.js +21 -0
  2. package/dist/assets/icons/AlignLeft.js +21 -0
  3. package/dist/assets/icons/AlignLeftRight.js +21 -0
  4. package/dist/assets/icons/AlignRight.js +21 -0
  5. package/dist/assets/icons/ArrowDropDown.js +21 -0
  6. package/dist/assets/icons/ArrowDropUp.js +21 -0
  7. package/dist/assets/icons/ArrowLeft.js +21 -0
  8. package/dist/assets/icons/ArrowRight.js +21 -0
  9. package/dist/assets/icons/Bold.js +21 -0
  10. package/dist/assets/icons/BulletedList.js +21 -0
  11. package/dist/assets/icons/Calendar.js +23 -0
  12. package/dist/assets/icons/Check.js +23 -0
  13. package/dist/assets/icons/CheckCircle.js +21 -0
  14. package/dist/assets/icons/CheckboxCheckmark.js +24 -0
  15. package/dist/assets/icons/CheckboxIndeterminate.js +24 -0
  16. package/dist/assets/icons/ChevronDown.js +23 -0
  17. package/dist/assets/icons/ChevronLeft.js +23 -0
  18. package/dist/assets/icons/ChevronRight.js +23 -0
  19. package/dist/assets/icons/ChevronUp.js +23 -0
  20. package/dist/assets/icons/ChevronsLeft.js +23 -0
  21. package/dist/assets/icons/ChevronsRight.js +23 -0
  22. package/dist/assets/icons/Clock.js +21 -0
  23. package/dist/assets/icons/Close.js +21 -0
  24. package/dist/assets/icons/DateTime.js +32 -0
  25. package/dist/assets/icons/Drag.js +21 -0
  26. package/dist/assets/icons/File.js +23 -0
  27. package/dist/assets/icons/Highlight.js +21 -0
  28. package/dist/assets/icons/HighlightOn.js +30 -0
  29. package/dist/assets/icons/Info.js +32 -0
  30. package/dist/assets/icons/Italic.js +21 -0
  31. package/dist/assets/icons/Link.js +21 -0
  32. package/dist/assets/icons/Menu.js +21 -0
  33. package/dist/assets/icons/NumberedList.js +21 -0
  34. package/dist/assets/icons/PointerHorizontal.js +21 -0
  35. package/dist/assets/icons/PointerVertical.js +21 -0
  36. package/dist/assets/icons/Send.js +23 -0
  37. package/dist/assets/icons/Strikethrough.js +21 -0
  38. package/dist/assets/icons/TextColor.js +30 -0
  39. package/dist/assets/icons/Today.js +21 -0
  40. package/dist/assets/icons/Underlined.js +23 -0
  41. package/dist/assets/icons/Upload.js +30 -0
  42. package/dist/assets/icons/View.js +18 -0
  43. package/dist/assets/icons/ViewOff.js +18 -0
  44. package/dist/assets/icons/WarningFilled.js +23 -0
  45. package/dist/assets/locales/en/translation.json.js +14 -0
  46. package/dist/assets/locales/sl/translation.json.js +14 -0
  47. package/dist/components/Menu/Menu.js +14 -0
  48. package/{src → dist}/components/Menu/MenuDesktop.d.ts +1 -1
  49. package/dist/components/Menu/MenuDesktop.js +68 -0
  50. package/{src → dist}/components/Menu/MenuItem.d.ts +1 -1
  51. package/dist/components/Menu/MenuItem.js +33 -0
  52. package/{src → dist}/components/Menu/MenuMobile.d.ts +1 -1
  53. package/dist/components/Menu/MenuMobile.js +78 -0
  54. package/{src → dist}/components/Menu/MenuPopover.d.ts +1 -1
  55. package/dist/components/Menu/MenuPopover.js +38 -0
  56. package/{src → dist}/components/buttons/Button/Button.d.ts +1 -1
  57. package/dist/components/buttons/Button/Button.js +68 -0
  58. package/{src → dist}/components/buttons/Button/button.cva.d.ts +1 -1
  59. package/dist/components/buttons/Button/button.cva.js +672 -0
  60. package/{src → dist}/components/buttons/IconButton/IconButton.d.ts +1 -1
  61. package/dist/components/buttons/IconButton/IconButton.js +17 -0
  62. package/{src → dist}/components/buttons/InlineIconButton/InlineIconButton.d.ts +1 -1
  63. package/dist/components/buttons/InlineIconButton/InlineIconButton.js +18 -0
  64. package/{src → dist}/components/buttons/PillButton/PillButton.d.ts +2 -2
  65. package/dist/components/buttons/PillButton/PillButton.js +44 -0
  66. package/{src → dist}/components/buttons/PillButton/pillButton.cva.d.ts +1 -1
  67. package/dist/components/buttons/PillButton/pillButton.cva.js +86 -0
  68. package/{src → dist}/components/buttons/SplitButton/SplitButton.d.ts +2 -2
  69. package/dist/components/buttons/SplitButton/SplitButton.js +62 -0
  70. package/{src → dist}/components/buttons/TextButton/TextButton.d.ts +3 -3
  71. package/dist/components/buttons/TextButton/TextButton.js +18 -0
  72. package/{src → dist}/components/buttons/ToggleButton/ToggleButton.d.ts +3 -3
  73. package/dist/components/buttons/ToggleButton/ToggleButton.js +21 -0
  74. package/{src → dist}/components/buttons/shared/ButtonContent.d.ts +3 -3
  75. package/dist/components/buttons/shared/ButtonContent.js +53 -0
  76. package/dist/components/buttons/shared/buttonContent.cva.js +16 -0
  77. package/{src → dist}/components/inputs/Checkbox/Checkbox.d.ts +3 -3
  78. package/dist/components/inputs/Checkbox/Checkbox.js +81 -0
  79. package/{src → dist}/components/inputs/Checkbox/CheckboxCheckmark.d.ts +1 -1
  80. package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +49 -0
  81. package/{src → dist}/components/inputs/Checkbox/checkbox.cva.d.ts +1 -1
  82. package/dist/components/inputs/Checkbox/checkbox.cva.js +47 -0
  83. package/{src → dist}/components/inputs/DateTime/DatePicker/DatePicker.d.ts +3 -3
  84. package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +237 -0
  85. package/{src → dist}/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +3 -3
  86. package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +674 -0
  87. package/{src → dist}/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +3 -3
  88. package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +251 -0
  89. package/{src → dist}/components/inputs/DateTime/TimePicker/TimePicker.d.ts +3 -3
  90. package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +224 -0
  91. package/dist/components/inputs/DateTime/shared/Calendar.js +85 -0
  92. package/dist/components/inputs/DateTime/shared/CalendarCell.js +160 -0
  93. package/dist/components/inputs/DateTime/shared/CalendarGrid.js +67 -0
  94. package/{src → dist}/components/inputs/DateTime/shared/CalendarHeader.d.ts +1 -1
  95. package/dist/components/inputs/DateTime/shared/CalendarHeader.js +89 -0
  96. package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +203 -0
  97. package/dist/components/inputs/DateTime/shared/DateField.js +62 -0
  98. package/{src → dist}/components/inputs/DateTime/shared/DatePickerInput.d.ts +2 -2
  99. package/dist/components/inputs/DateTime/shared/DatePickerInput.js +174 -0
  100. package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +55 -0
  101. package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +76 -0
  102. package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +41 -0
  103. package/dist/components/inputs/DateTime/shared/MonthPicker.js +82 -0
  104. package/dist/components/inputs/DateTime/shared/RangeCalendar.js +131 -0
  105. package/dist/components/inputs/DateTime/shared/TimeField.js +26 -0
  106. package/dist/components/inputs/DateTime/shared/TimePickerForm.js +186 -0
  107. package/{src → dist}/components/inputs/DateTime/shared/TimePickerInput.d.ts +2 -2
  108. package/dist/components/inputs/DateTime/shared/TimePickerInput.js +114 -0
  109. package/dist/components/inputs/DateTime/shared/YearPicker.js +89 -0
  110. package/dist/components/inputs/File/FileUpload.js +254 -0
  111. package/dist/components/inputs/File/FileUploadContainer.js +17 -0
  112. package/dist/components/inputs/File/InputUpload.js +176 -0
  113. package/{src → dist}/components/inputs/File/fileUpload.types.d.ts +3 -3
  114. package/{src → dist}/components/inputs/File/inputUpload.types.d.ts +2 -2
  115. package/{src → dist}/components/inputs/File/shared/FileCard.d.ts +1 -1
  116. package/dist/components/inputs/File/shared/FileCard.js +67 -0
  117. package/{src → dist}/components/inputs/File/shared/FileCardList.d.ts +1 -1
  118. package/dist/components/inputs/File/shared/FileCardList.js +20 -0
  119. package/dist/components/inputs/File/shared/FileProgressBar.js +32 -0
  120. package/{src → dist}/components/inputs/File/shared/FileUploadContent.d.ts +1 -1
  121. package/dist/components/inputs/File/shared/FileUploadContent.js +92 -0
  122. package/{src → dist}/components/inputs/File/shared/FileUploadContentEmpty.d.ts +1 -1
  123. package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +92 -0
  124. package/{src → dist}/components/inputs/File/shared/FileUploadContentError.d.ts +1 -1
  125. package/dist/components/inputs/File/shared/FileUploadContentError.js +167 -0
  126. package/{src → dist}/components/inputs/File/shared/FileUploadContentFilled.d.ts +1 -1
  127. package/dist/components/inputs/File/shared/FileUploadContentFilled.js +176 -0
  128. package/{src → dist}/components/inputs/File/shared/FileUploadContentLoading.d.ts +1 -1
  129. package/dist/components/inputs/File/shared/FileUploadContentLoading.js +128 -0
  130. package/{src → dist}/components/inputs/File/shared/InputUploadContent.d.ts +1 -1
  131. package/dist/components/inputs/File/shared/InputUploadContent.js +74 -0
  132. package/dist/components/inputs/File/shared/InputUploadFilled.js +45 -0
  133. package/dist/components/inputs/File/shared/fileUpload.cva.js +58 -0
  134. package/dist/components/inputs/File/shared/inputUploadButton.cva.js +49 -0
  135. package/{src → dist}/components/inputs/FormField/FormField.d.ts +3 -3
  136. package/dist/components/inputs/FormField/FormField.js +54 -0
  137. package/dist/components/inputs/FormField/FormFieldError.js +16 -0
  138. package/dist/components/inputs/FormField/FormFieldHeader.js +57 -0
  139. package/dist/components/inputs/FormField/FormFieldHeaderClose.js +20 -0
  140. package/{src → dist}/components/inputs/FormField/FormFieldLabel.d.ts +2 -2
  141. package/dist/components/inputs/FormField/FormFieldLabel.js +37 -0
  142. package/{src → dist}/components/inputs/Input/NumberInput/NumberInput.d.ts +4 -4
  143. package/dist/components/inputs/Input/NumberInput/NumberInput.js +157 -0
  144. package/{src → dist}/components/inputs/Input/PasswordInput/PasswordInput.d.ts +2 -2
  145. package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +26 -0
  146. package/{src → dist}/components/inputs/Input/TextArea/TextArea.d.ts +3 -3
  147. package/dist/components/inputs/Input/TextArea/TextArea.js +146 -0
  148. package/{src → dist}/components/inputs/Input/TextInput/TextInput.d.ts +4 -4
  149. package/dist/components/inputs/Input/TextInput/TextInput.js +170 -0
  150. package/{src → dist}/components/inputs/Input/shared/InputContent.d.ts +3 -3
  151. package/dist/components/inputs/Input/shared/InputContent.js +114 -0
  152. package/{src → dist}/components/inputs/Inputs/Form.d.ts +2 -2
  153. package/dist/components/inputs/Inputs/Form.js +68 -0
  154. package/{src → dist}/components/inputs/Inputs/InputItem.d.ts +16 -16
  155. package/dist/components/inputs/Inputs/InputItem.js +63 -0
  156. package/dist/components/inputs/Inputs/Inputs.js +32 -0
  157. package/{src → dist}/components/inputs/RadioGroup/RadioGroup.d.ts +3 -3
  158. package/dist/components/inputs/RadioGroup/RadioGroup.js +113 -0
  159. package/{src → dist}/components/inputs/RadioGroup/radio.cva.d.ts +1 -1
  160. package/dist/components/inputs/RadioGroup/radio.cva.js +47 -0
  161. package/{src → dist}/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +3 -3
  162. package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +39 -0
  163. package/{src → dist}/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +3 -3
  164. package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +25 -0
  165. package/{src → dist}/components/inputs/Selection/Select/Select.d.ts +3 -3
  166. package/dist/components/inputs/Selection/Select/Select.js +32 -0
  167. package/{src → dist}/components/inputs/Selection/shared/SelectBase.d.ts +3 -3
  168. package/dist/components/inputs/Selection/shared/SelectBase.js +25 -0
  169. package/{src → dist}/components/inputs/Selection/shared/SelectDesktop.d.ts +1 -1
  170. package/dist/components/inputs/Selection/shared/SelectDesktop.js +211 -0
  171. package/{src → dist}/components/inputs/Selection/shared/SelectInput.d.ts +4 -4
  172. package/dist/components/inputs/Selection/shared/SelectInput.js +231 -0
  173. package/{src → dist}/components/inputs/Selection/shared/SelectInputTags.d.ts +2 -2
  174. package/dist/components/inputs/Selection/shared/SelectInputTags.js +22 -0
  175. package/{src → dist}/components/inputs/Selection/shared/SelectListBox.d.ts +2 -2
  176. package/dist/components/inputs/Selection/shared/SelectListBox.js +108 -0
  177. package/{src → dist}/components/inputs/Selection/shared/SelectListBoxItem.d.ts +2 -2
  178. package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +78 -0
  179. package/{src → dist}/components/inputs/Selection/shared/SelectListBoxItemSelectAll.d.ts +1 -1
  180. package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +45 -0
  181. package/{src → dist}/components/inputs/Selection/shared/SelectListBoxLoadingItem.d.ts +1 -1
  182. package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +47 -0
  183. package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +42 -0
  184. package/{src → dist}/components/inputs/Selection/shared/SelectMobile.d.ts +1 -1
  185. package/dist/components/inputs/Selection/shared/SelectMobile.js +161 -0
  186. package/{src → dist}/components/inputs/Selection/shared/select.context.d.ts +2 -2
  187. package/dist/components/inputs/Selection/shared/select.context.js +244 -0
  188. package/{src → dist}/components/inputs/Selection/shared/select.types.d.ts +1 -1
  189. package/{src → dist}/components/inputs/Selection/shared/useSelectItems.d.ts +2 -2
  190. package/dist/components/inputs/Selection/shared/useSelectItems.js +94 -0
  191. package/{src → dist}/components/inputs/Slider/Slider.d.ts +2 -2
  192. package/dist/components/inputs/Slider/Slider.js +137 -0
  193. package/{src → dist}/components/inputs/TextEditor/TextEditor.d.ts +2 -2
  194. package/dist/components/inputs/TextEditor/TextEditor.js +223 -0
  195. package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +34 -0
  196. package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +80 -0
  197. package/{src → dist}/components/inputs/TextEditor/Toolbar/HyperlinkAction.d.ts +1 -1
  198. package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +92 -0
  199. package/{src → dist}/components/inputs/TextEditor/Toolbar/TextAlignSelect.d.ts +1 -1
  200. package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +56 -0
  201. package/{src → dist}/components/inputs/TextEditor/Toolbar/TextColorSelect.d.ts +1 -1
  202. package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +33 -0
  203. package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.js +31 -0
  204. package/{src → dist}/components/inputs/TextEditor/Toolbar/TextHighlightSelect.d.ts +1 -1
  205. package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +37 -0
  206. package/{src → dist}/components/inputs/TextEditor/Toolbar/TextListActions.d.ts +1 -1
  207. package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +51 -0
  208. package/{src → dist}/components/inputs/TextEditor/Toolbar/TextMarksActions.d.ts +1 -1
  209. package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +73 -0
  210. package/{src → dist}/components/inputs/TextEditor/Toolbar/TextStyleSelect.d.ts +1 -1
  211. package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +61 -0
  212. package/dist/components/inputs/TextEditor/textEditor.types.js +40 -0
  213. package/{src → dist}/components/inputs/Toggle/Toggle.d.ts +3 -3
  214. package/dist/components/inputs/Toggle/Toggle.js +65 -0
  215. package/{src → dist}/components/inputs/Toggle/toggle.cva.d.ts +1 -1
  216. package/dist/components/inputs/Toggle/toggle.cva.js +44 -0
  217. package/{src → dist}/components/inputs/shared/CheckContent.d.ts +1 -1
  218. package/dist/components/inputs/shared/CheckContent.js +22 -0
  219. package/dist/components/inputs/shared/InputClear.js +27 -0
  220. package/dist/components/inputs/shared/input.cva.js +168 -0
  221. package/{src → dist}/components/inputs/shared/label.cva.d.ts +1 -1
  222. package/dist/components/inputs/shared/label.cva.js +133 -0
  223. package/dist/components/outline.clsx.js +11 -0
  224. package/{src → dist}/components/overlays/ActionModal/ActionModal.d.ts +2 -2
  225. package/dist/components/overlays/ActionModal/ActionModal.js +80 -0
  226. package/dist/components/overlays/BottomSheet/BottomSheet.js +261 -0
  227. package/dist/components/overlays/Drawer/Drawer.js +84 -0
  228. package/{src → dist}/components/overlays/Modal/Modal.d.ts +1 -1
  229. package/dist/components/overlays/Modal/Modal.js +53 -0
  230. package/dist/components/overlays/Modal/modal.cva.js +53 -0
  231. package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +71 -0
  232. package/{src → dist}/components/overlays/Tooltip/Tooltip.d.ts +1 -1
  233. package/dist/components/overlays/Tooltip/Tooltip.js +70 -0
  234. package/dist/components/overlays/Tooltip/TooltipEllipsis.js +27 -0
  235. package/dist/components/overlays/Tooltip/tooltip.cva.js +60 -0
  236. package/dist/components/segment/Segment.js +119 -0
  237. package/dist/components/segment/SegmentItem.js +43 -0
  238. package/{src → dist}/components/segment/segment.types.d.ts +1 -1
  239. package/dist/components/shared/pagination/Pagination.js +75 -0
  240. package/{src → dist}/components/shared/pagination/PaginationList.d.ts +1 -1
  241. package/dist/components/shared/pagination/PaginationList.js +145 -0
  242. package/dist/components/shared/pagination/minWidth.cva.js +15 -0
  243. package/{src → dist}/components/status/Alert/Alert.d.ts +1 -1
  244. package/dist/components/status/Alert/Alert.js +41 -0
  245. package/dist/components/status/Alert/alert.cva.js +64 -0
  246. package/{src → dist}/components/status/Loader/Loader.d.ts +1 -1
  247. package/dist/components/status/Loader/Loader.js +37 -0
  248. package/dist/components/status/Loader/loader.cva.js +27 -0
  249. package/{src → dist}/components/status/Toast/Toast.d.ts +1 -1
  250. package/dist/components/status/Toast/Toast.js +64 -0
  251. package/{src → dist}/components/status/Toast/toast.cva.d.ts +1 -1
  252. package/dist/components/status/Toast/toast.cva.js +150 -0
  253. package/dist/components/status/Toast/useToast.js +83 -0
  254. package/dist/components/status/shared/status.cva.js +62 -0
  255. package/dist/components/table/CellText.js +18 -0
  256. package/dist/components/table/ColumnConfig.js +124 -0
  257. package/dist/components/table/HeaderText.js +15 -0
  258. package/dist/components/table/InfiniteTable.js +40 -0
  259. package/dist/components/table/PaginatedTable.js +33 -0
  260. package/dist/components/table/Table.js +370 -0
  261. package/dist/components/table/table.cva.js +63 -0
  262. package/{src → dist}/components/text/Link/Link.d.ts +1 -1
  263. package/dist/components/text/Link/Link.js +18 -0
  264. package/dist/components/text/Link/link.cva.js +18 -0
  265. package/{src → dist}/components/text/Tag/Tag.d.ts +1 -1
  266. package/dist/components/text/Tag/Tag.js +49 -0
  267. package/dist/components/text/Tag/tag.cva.js +59 -0
  268. package/{src → dist}/components/text/Typography/Typography.d.ts +1 -1
  269. package/dist/components/text/Typography/Typography.js +22 -0
  270. package/dist/components/text/Typography/typography.cva.js +100 -0
  271. package/{src → dist}/config/confirmation.context.d.ts +1 -1
  272. package/dist/config/confirmation.context.js +107 -0
  273. package/dist/config/i18n.js +15 -0
  274. package/dist/config/router.context.js +43 -0
  275. package/{src → dist}/config/uiConfig.context.d.ts +8 -8
  276. package/dist/config/uiConfig.context.js +67 -0
  277. package/{src → dist}/config/uiStyle.context.d.ts +14 -14
  278. package/dist/config/uiStyle.context.js +16 -0
  279. package/dist/helpers/dynamicColumns.js +359 -0
  280. package/{src → dist}/helpers/dynamicInputs.d.ts +2 -2
  281. package/dist/helpers/dynamicInputs.js +216 -0
  282. package/dist/hooks/useAutosave.js +83 -0
  283. package/dist/hooks/useBreakpoint.js +20 -0
  284. package/dist/hooks/useDebounceCallback.js +29 -0
  285. package/dist/hooks/useDeepCompare.js +25 -0
  286. package/dist/hooks/useFilters.js +120 -0
  287. package/dist/hooks/useForm.js +22 -0
  288. package/{src → dist}/hooks/useFormAutosave.d.ts +2 -2
  289. package/dist/hooks/useFormAutosave.js +67 -0
  290. package/dist/hooks/useIntersectionObserver.js +27 -0
  291. package/dist/hooks/useLocalStorage.js +63 -0
  292. package/dist/hooks/useLongPressRepeat.js +33 -0
  293. package/dist/hooks/usePagination.js +35 -0
  294. package/dist/hooks/useScrollableListBox.js +30 -0
  295. package/dist/hooks/useSorting.js +30 -0
  296. package/dist/hooks/useStateAndRef.js +17 -0
  297. package/dist/hooks/useTableColumnConfig.js +63 -0
  298. package/dist/hooks/useTableNav.js +409 -0
  299. package/dist/hooks/useTranslationMemo.js +14 -0
  300. package/dist/index.js +284 -0
  301. package/{src → dist}/types/react-query.d.ts +1 -1
  302. package/dist/utils/array.utils.js +12 -0
  303. package/dist/utils/compoundMapper.js +14 -0
  304. package/dist/utils/date-time.utils.js +77 -0
  305. package/dist/utils/date.utils.js +12 -0
  306. package/dist/utils/dom.utils.js +13 -0
  307. package/dist/utils/file.utils.js +63 -0
  308. package/dist/utils/isEqual.js +95 -0
  309. package/dist/utils/logger.js +19 -0
  310. package/dist/utils/object.utils.js +53 -0
  311. package/dist/utils/queries.utils.js +9 -0
  312. package/dist/utils/rest.utils.js +51 -0
  313. package/dist/utils/routing.utils.js +15 -0
  314. package/dist/utils/string.utils.js +12 -0
  315. package/{src → dist}/utils/vendor/acl/AclGuard.d.ts +1 -1
  316. package/dist/utils/vendor/acl/AclGuard.js +15 -0
  317. package/dist/utils/vendor/acl/Can.js +18 -0
  318. package/dist/utils/vendor/acl/ability.context.js +37 -0
  319. package/dist/utils/vendor/auth/AuthGuard.js +26 -0
  320. package/dist/utils/vendor/auth/auth.context.js +36 -0
  321. package/{src → dist}/utils/vendor/auth/withPrivateAuthGuard.d.ts +1 -1
  322. package/dist/utils/vendor/auth/withPrivateAuthGuard.js +17 -0
  323. package/dist/utils/vendor/error-handling.js +119 -0
  324. package/dist/utils/vendor/rest-interceptor.js +21 -0
  325. package/dist/utils/zod.utils.js +25 -0
  326. package/package.json +57 -5
  327. package/index.js +0 -62585
  328. package/povio-ui-0.0.8.tgz +0 -0
  329. package/vite.config.d.ts +0 -2
  330. /package/{src → dist}/assets/icons/AlignCenter.d.ts +0 -0
  331. /package/{src → dist}/assets/icons/AlignLeft.d.ts +0 -0
  332. /package/{src → dist}/assets/icons/AlignLeftRight.d.ts +0 -0
  333. /package/{src → dist}/assets/icons/AlignRight.d.ts +0 -0
  334. /package/{src → dist}/assets/icons/ArrowDropDown.d.ts +0 -0
  335. /package/{src → dist}/assets/icons/ArrowDropUp.d.ts +0 -0
  336. /package/{src → dist}/assets/icons/ArrowLeft.d.ts +0 -0
  337. /package/{src → dist}/assets/icons/ArrowRight.d.ts +0 -0
  338. /package/{src → dist}/assets/icons/Bold.d.ts +0 -0
  339. /package/{src → dist}/assets/icons/BulletedList.d.ts +0 -0
  340. /package/{src → dist}/assets/icons/Calendar.d.ts +0 -0
  341. /package/{src → dist}/assets/icons/Check.d.ts +0 -0
  342. /package/{src → dist}/assets/icons/CheckCircle.d.ts +0 -0
  343. /package/{src → dist}/assets/icons/CheckboxCheckmark.d.ts +0 -0
  344. /package/{src → dist}/assets/icons/CheckboxIndeterminate.d.ts +0 -0
  345. /package/{src → dist}/assets/icons/ChevronDown.d.ts +0 -0
  346. /package/{src → dist}/assets/icons/ChevronLeft.d.ts +0 -0
  347. /package/{src → dist}/assets/icons/ChevronRight.d.ts +0 -0
  348. /package/{src → dist}/assets/icons/ChevronUp.d.ts +0 -0
  349. /package/{src → dist}/assets/icons/ChevronsLeft.d.ts +0 -0
  350. /package/{src → dist}/assets/icons/ChevronsRight.d.ts +0 -0
  351. /package/{src → dist}/assets/icons/Clock.d.ts +0 -0
  352. /package/{src → dist}/assets/icons/Close.d.ts +0 -0
  353. /package/{src → dist}/assets/icons/DateTime.d.ts +0 -0
  354. /package/{src → dist}/assets/icons/Drag.d.ts +0 -0
  355. /package/{src → dist}/assets/icons/File.d.ts +0 -0
  356. /package/{src → dist}/assets/icons/Highlight.d.ts +0 -0
  357. /package/{src → dist}/assets/icons/HighlightOn.d.ts +0 -0
  358. /package/{src → dist}/assets/icons/Info.d.ts +0 -0
  359. /package/{src → dist}/assets/icons/Italic.d.ts +0 -0
  360. /package/{src → dist}/assets/icons/Link.d.ts +0 -0
  361. /package/{src → dist}/assets/icons/Menu.d.ts +0 -0
  362. /package/{src → dist}/assets/icons/NumberedList.d.ts +0 -0
  363. /package/{src → dist}/assets/icons/PointerHorizontal.d.ts +0 -0
  364. /package/{src → dist}/assets/icons/PointerVertical.d.ts +0 -0
  365. /package/{src → dist}/assets/icons/Send.d.ts +0 -0
  366. /package/{src → dist}/assets/icons/Strikethrough.d.ts +0 -0
  367. /package/{src → dist}/assets/icons/TextColor.d.ts +0 -0
  368. /package/{src → dist}/assets/icons/Today.d.ts +0 -0
  369. /package/{src → dist}/assets/icons/Underlined.d.ts +0 -0
  370. /package/{src → dist}/assets/icons/Upload.d.ts +0 -0
  371. /package/{src → dist}/assets/icons/View.d.ts +0 -0
  372. /package/{src → dist}/assets/icons/ViewOff.d.ts +0 -0
  373. /package/{src → dist}/assets/icons/WarningFilled.d.ts +0 -0
  374. /package/{src → dist}/components/Menu/Menu.d.ts +0 -0
  375. /package/{src → dist}/components/buttons/shared/buttonContent.cva.d.ts +0 -0
  376. /package/{src → dist}/components/inputs/DateTime/shared/Calendar.d.ts +0 -0
  377. /package/{src → dist}/components/inputs/DateTime/shared/CalendarCell.d.ts +0 -0
  378. /package/{src → dist}/components/inputs/DateTime/shared/CalendarGrid.d.ts +0 -0
  379. /package/{src → dist}/components/inputs/DateTime/shared/CalendarSelectHeader.d.ts +0 -0
  380. /package/{src → dist}/components/inputs/DateTime/shared/DateField.d.ts +0 -0
  381. /package/{src → dist}/components/inputs/DateTime/shared/DateSegmentItem.d.ts +0 -0
  382. /package/{src → dist}/components/inputs/DateTime/shared/DateTimeDialog.d.ts +0 -0
  383. /package/{src → dist}/components/inputs/DateTime/shared/DateTimeDialogFooter.d.ts +0 -0
  384. /package/{src → dist}/components/inputs/DateTime/shared/MonthPicker.d.ts +0 -0
  385. /package/{src → dist}/components/inputs/DateTime/shared/RangeCalendar.d.ts +0 -0
  386. /package/{src → dist}/components/inputs/DateTime/shared/TimeField.d.ts +0 -0
  387. /package/{src → dist}/components/inputs/DateTime/shared/TimePickerForm.d.ts +0 -0
  388. /package/{src → dist}/components/inputs/DateTime/shared/YearPicker.d.ts +0 -0
  389. /package/{src → dist}/components/inputs/File/FileUpload.d.ts +0 -0
  390. /package/{src → dist}/components/inputs/File/FileUploadContainer.d.ts +0 -0
  391. /package/{src → dist}/components/inputs/File/InputUpload.d.ts +0 -0
  392. /package/{src → dist}/components/inputs/File/index.d.ts +0 -0
  393. /package/{src → dist}/components/inputs/File/shared/FileProgressBar.d.ts +0 -0
  394. /package/{src → dist}/components/inputs/File/shared/InputUploadFilled.d.ts +0 -0
  395. /package/{src → dist}/components/inputs/File/shared/fileUpload.cva.d.ts +0 -0
  396. /package/{src → dist}/components/inputs/File/shared/inputUploadButton.cva.d.ts +0 -0
  397. /package/{src → dist}/components/inputs/FormField/FormFieldError.d.ts +0 -0
  398. /package/{src → dist}/components/inputs/FormField/FormFieldHeader.d.ts +0 -0
  399. /package/{src → dist}/components/inputs/FormField/FormFieldHeaderClose.d.ts +0 -0
  400. /package/{src → dist}/components/inputs/Inputs/Inputs.d.ts +0 -0
  401. /package/{src → dist}/components/inputs/Selection/shared/SelectListBoxSelectionBar.d.ts +0 -0
  402. /package/{src → dist}/components/inputs/TextEditor/Toolbar/ColorPicker.d.ts +0 -0
  403. /package/{src → dist}/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.d.ts +0 -0
  404. /package/{src → dist}/components/inputs/TextEditor/Toolbar/TextEditorToolbar.d.ts +0 -0
  405. /package/{src → dist}/components/inputs/TextEditor/textEditor.types.d.ts +0 -0
  406. /package/{src → dist}/components/inputs/shared/InputClear.d.ts +0 -0
  407. /package/{src → dist}/components/inputs/shared/form.types.d.ts +0 -0
  408. /package/{src → dist}/components/inputs/shared/input.cva.d.ts +0 -0
  409. /package/{src → dist}/components/outline.clsx.d.ts +0 -0
  410. /package/{src → dist}/components/overlays/BottomSheet/BottomSheet.d.ts +0 -0
  411. /package/{src → dist}/components/overlays/Drawer/Drawer.d.ts +0 -0
  412. /package/{src → dist}/components/overlays/Modal/modal.cva.d.ts +0 -0
  413. /package/{src → dist}/components/overlays/ResponsivePopover/ResponsivePopover.d.ts +0 -0
  414. /package/{src → dist}/components/overlays/Tooltip/TooltipEllipsis.d.ts +0 -0
  415. /package/{src → dist}/components/overlays/Tooltip/tooltip.cva.d.ts +0 -0
  416. /package/{src → dist}/components/segment/Segment.d.ts +0 -0
  417. /package/{src → dist}/components/segment/SegmentItem.d.ts +0 -0
  418. /package/{src → dist}/components/shared/pagination/Pagination.d.ts +0 -0
  419. /package/{src → dist}/components/shared/pagination/minWidth.cva.d.ts +0 -0
  420. /package/{src → dist}/components/status/Alert/alert.cva.d.ts +0 -0
  421. /package/{src → dist}/components/status/Loader/loader.cva.d.ts +0 -0
  422. /package/{src → dist}/components/status/Toast/useToast.d.ts +0 -0
  423. /package/{src → dist}/components/status/shared/status.cva.d.ts +0 -0
  424. /package/{src → dist}/components/table/CellText.d.ts +0 -0
  425. /package/{src → dist}/components/table/ColumnConfig.d.ts +0 -0
  426. /package/{src → dist}/components/table/HeaderText.d.ts +0 -0
  427. /package/{src → dist}/components/table/InfiniteTable.d.ts +0 -0
  428. /package/{src → dist}/components/table/PaginatedTable.d.ts +0 -0
  429. /package/{src → dist}/components/table/Table.d.ts +0 -0
  430. /package/{src → dist}/components/table/table.cva.d.ts +0 -0
  431. /package/{src → dist}/components/text/Link/link.cva.d.ts +0 -0
  432. /package/{src → dist}/components/text/Tag/tag.cva.d.ts +0 -0
  433. /package/{src → dist}/components/text/Typography/typography.cva.d.ts +0 -0
  434. /package/{src → dist}/config/i18n.d.ts +0 -0
  435. /package/{src → dist}/config/router.context.d.ts +0 -0
  436. /package/{src → dist}/helpers/dynamicColumns.d.ts +0 -0
  437. /package/{src → dist}/hooks/useAutosave.d.ts +0 -0
  438. /package/{src → dist}/hooks/useBreakpoint.d.ts +0 -0
  439. /package/{src → dist}/hooks/useDebounceCallback.d.ts +0 -0
  440. /package/{src → dist}/hooks/useDeepCompare.d.ts +0 -0
  441. /package/{src → dist}/hooks/useFilters.d.ts +0 -0
  442. /package/{src → dist}/hooks/useForm.d.ts +0 -0
  443. /package/{src → dist}/hooks/useIntersectionObserver.d.ts +0 -0
  444. /package/{src → dist}/hooks/useLocalStorage.d.ts +0 -0
  445. /package/{src → dist}/hooks/useLongPressRepeat.d.ts +0 -0
  446. /package/{src → dist}/hooks/usePagination.d.ts +0 -0
  447. /package/{src → dist}/hooks/useScrollableListBox.d.ts +0 -0
  448. /package/{src → dist}/hooks/useSorting.d.ts +0 -0
  449. /package/{src → dist}/hooks/useStateAndRef.d.ts +0 -0
  450. /package/{src → dist}/hooks/useTableColumnConfig.d.ts +0 -0
  451. /package/{src → dist}/hooks/useTableNav.d.ts +0 -0
  452. /package/{src → dist}/hooks/useTranslationMemo.d.ts +0 -0
  453. /package/{src → dist}/index.d.ts +0 -0
  454. /package/{styles → dist/styles}/editor.css +0 -0
  455. /package/{styles → dist/styles}/index.css +0 -0
  456. /package/{src → dist}/types/common.d.ts +0 -0
  457. /package/{src → dist}/utils/array.utils.d.ts +0 -0
  458. /package/{src → dist}/utils/array.utils.spec.d.ts +0 -0
  459. /package/{src → dist}/utils/compoundMapper.d.ts +0 -0
  460. /package/{src → dist}/utils/compoundMapper.spec.d.ts +0 -0
  461. /package/{src → dist}/utils/date-time.utils.d.ts +0 -0
  462. /package/{src → dist}/utils/date-time.utils.spec.d.ts +0 -0
  463. /package/{src → dist}/utils/date.utils.d.ts +0 -0
  464. /package/{src → dist}/utils/date.utils.spec.d.ts +0 -0
  465. /package/{src → dist}/utils/dom.utils.d.ts +0 -0
  466. /package/{src → dist}/utils/file.utils.d.ts +0 -0
  467. /package/{src → dist}/utils/isEqual.d.ts +0 -0
  468. /package/{src → dist}/utils/logger.d.ts +0 -0
  469. /package/{src → dist}/utils/object.utils.d.ts +0 -0
  470. /package/{src → dist}/utils/queries.utils.d.ts +0 -0
  471. /package/{src → dist}/utils/rest.utils.d.ts +0 -0
  472. /package/{src → dist}/utils/routing.utils.d.ts +0 -0
  473. /package/{src → dist}/utils/string.utils.d.ts +0 -0
  474. /package/{src → dist}/utils/vendor/acl/Can.d.ts +0 -0
  475. /package/{src → dist}/utils/vendor/acl/ability.context.d.ts +0 -0
  476. /package/{src → dist}/utils/vendor/acl/appAbility.types.d.ts +0 -0
  477. /package/{src → dist}/utils/vendor/auth/AuthGuard.d.ts +0 -0
  478. /package/{src → dist}/utils/vendor/auth/auth.context.d.ts +0 -0
  479. /package/{src → dist}/utils/vendor/error-handling.d.ts +0 -0
  480. /package/{src → dist}/utils/vendor/rest-client.types.d.ts +0 -0
  481. /package/{src → dist}/utils/vendor/rest-interceptor.d.ts +0 -0
  482. /package/{src → dist}/utils/zod.utils.d.ts +0 -0
@@ -0,0 +1,53 @@
1
+ import { cva } from "class-variance-authority";
2
+ const modalContent = cva(
3
+ [
4
+ "relative flex flex-col items-center gap-modal-gap-content px-modal-side-mobile py-modal-height-mobile md:px-modal-side-desktop md:py-modal-height-desktop",
5
+ "w-fit max-w-full [&>*]:max-w-full",
6
+ "border-elevation-outline-default-1 bg-elevation-fill-default-1 outline-none",
7
+ "pointer-events-auto"
8
+ ],
9
+ {
10
+ variants: {
11
+ aside: {
12
+ left: "h-screen rounded-none border-r",
13
+ right: "h-screen rounded-none border-l",
14
+ center: "rounded-modal-rounding-default border"
15
+ }
16
+ },
17
+ defaultVariants: {
18
+ aside: "center"
19
+ }
20
+ }
21
+ );
22
+ const modalOverlay = cva(
23
+ ["fixed inset-0 z-10 flex h-(--visual-viewport-height) w-screen overflow-y-auto bg-elevation-fill-default-3/80"],
24
+ {
25
+ variants: {
26
+ aside: {
27
+ left: "p-0",
28
+ right: "p-0",
29
+ center: "p-4"
30
+ }
31
+ },
32
+ defaultVariants: {
33
+ aside: "center"
34
+ }
35
+ }
36
+ );
37
+ const modalMain = cva(["pointer-events-none my-auto flex w-full"], {
38
+ variants: {
39
+ aside: {
40
+ left: "entering:animate-drawer-enter-left exiting:animate-drawer-exit-left justify-start",
41
+ right: "entering:animate-drawer-enter-right exiting:animate-drawer-exit-right justify-end",
42
+ center: "justify-center"
43
+ }
44
+ },
45
+ defaultVariants: {
46
+ aside: "center"
47
+ }
48
+ });
49
+ export {
50
+ modalContent,
51
+ modalMain,
52
+ modalOverlay
53
+ };
@@ -0,0 +1,71 @@
1
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
+ import { clsx } from "clsx";
3
+ import { DialogTrigger, Popover, Dialog } from "react-aria-components";
4
+ import { FormFieldHeader } from "../../inputs/FormField/FormFieldHeader.js";
5
+ import { FormFieldHeaderClose } from "../../inputs/FormField/FormFieldHeaderClose.js";
6
+ import { BottomSheet } from "../BottomSheet/BottomSheet.js";
7
+ import { useBreakpoint } from "../../../hooks/useBreakpoint.js";
8
+ const ResponsivePopover = ({
9
+ trigger,
10
+ isOpen,
11
+ onOpenChange,
12
+ children,
13
+ popoverClassName,
14
+ sheetLabel
15
+ }) => {
16
+ const isDesktop = useBreakpoint("md");
17
+ if (!isDesktop) {
18
+ return /* @__PURE__ */ jsx(
19
+ BottomSheet,
20
+ {
21
+ isOpen,
22
+ onOpenChange,
23
+ trigger,
24
+ height: "auto",
25
+ isDismissable: true,
26
+ children: (close) => /* @__PURE__ */ jsxs(Fragment, { children: [
27
+ /* @__PURE__ */ jsx(
28
+ FormFieldHeader,
29
+ {
30
+ label: sheetLabel,
31
+ rightContent: /* @__PURE__ */ jsx(FormFieldHeaderClose, { onClose: close }),
32
+ className: "px-4 pt-3"
33
+ }
34
+ ),
35
+ /* @__PURE__ */ jsx("div", { className: "p-4", children })
36
+ ] })
37
+ }
38
+ );
39
+ }
40
+ return /* @__PURE__ */ jsxs(
41
+ DialogTrigger,
42
+ {
43
+ isOpen,
44
+ onOpenChange,
45
+ children: [
46
+ trigger,
47
+ /* @__PURE__ */ jsx(
48
+ Popover,
49
+ {
50
+ className: clsx("my-4 outline-none", popoverClassName),
51
+ offset: 0,
52
+ placement: "bottom start",
53
+ children: /* @__PURE__ */ jsx(Dialog, { className: "outline-none", children: /* @__PURE__ */ jsx(
54
+ "div",
55
+ {
56
+ className: clsx(
57
+ "overflow-hidden p-2 shadow-5 outline-none",
58
+ "rounded-s border border-elevation-outline-default-1 bg-elevation-fill-default-1"
59
+ ),
60
+ children
61
+ }
62
+ ) })
63
+ }
64
+ )
65
+ ]
66
+ }
67
+ );
68
+ };
69
+ export {
70
+ ResponsivePopover
71
+ };
@@ -1,6 +1,6 @@
1
1
  import { PropsWithChildren, ReactNode } from 'react';
2
2
  import { TooltipProps as AriaTooltipProps } from 'react-aria-components';
3
- import { TooltipVariantProps } from '#ui/components/overlays/Tooltip/tooltip.cva';
3
+ import { TooltipVariantProps } from './tooltip.cva';
4
4
  export interface TooltipProps extends PropsWithChildren<AriaTooltipProps>, TooltipVariantProps {
5
5
  text: ReactNode;
6
6
  isDisabled?: boolean;
@@ -0,0 +1,70 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { Fragment, useRef } from "react";
3
+ import { useFocusable } from "react-aria";
4
+ import { TooltipTrigger, Tooltip as Tooltip$1, OverlayArrow } from "react-aria-components";
5
+ import { PointerHorizontalIcon } from "../../../assets/icons/PointerHorizontal.js";
6
+ import { PointerVerticalIcon } from "../../../assets/icons/PointerVertical.js";
7
+ import { tooltipCva, tooltipPointerHorizontalCva, tooltipPointerVerticalCva, tooltipTextCva } from "./tooltip.cva.js";
8
+ import { Typography } from "../../text/Typography/Typography.js";
9
+ const CustomTrigger = ({ children }) => {
10
+ const ref = useRef(null);
11
+ const { focusableProps } = useFocusable({}, ref);
12
+ return /* @__PURE__ */ jsx(
13
+ "div",
14
+ {
15
+ ref,
16
+ ...focusableProps,
17
+ tabIndex: 0,
18
+ children
19
+ }
20
+ );
21
+ };
22
+ const Tooltip = ({
23
+ children,
24
+ text,
25
+ isDisabled,
26
+ delay,
27
+ closeDelay,
28
+ color,
29
+ isNonInteractiveTrigger,
30
+ ...tooltipProps
31
+ }) => {
32
+ const Trigger = isNonInteractiveTrigger ? CustomTrigger : Fragment;
33
+ return /* @__PURE__ */ jsxs(
34
+ TooltipTrigger,
35
+ {
36
+ delay: delay ?? 0,
37
+ closeDelay: closeDelay ?? 0,
38
+ isDisabled,
39
+ children: [
40
+ /* @__PURE__ */ jsx(Trigger, { children }),
41
+ /* @__PURE__ */ jsxs(
42
+ Tooltip$1,
43
+ {
44
+ className: tooltipCva({ color }),
45
+ ...tooltipProps,
46
+ offset: 13,
47
+ children: [
48
+ /* @__PURE__ */ jsxs(OverlayArrow, { children: [
49
+ /* @__PURE__ */ jsx(PointerHorizontalIcon, { className: tooltipPointerHorizontalCva({ color }) }),
50
+ /* @__PURE__ */ jsx(PointerVerticalIcon, { className: tooltipPointerVerticalCva({ color }) })
51
+ ] }),
52
+ /* @__PURE__ */ jsx(
53
+ Typography,
54
+ {
55
+ size: "body-4",
56
+ variant: "prominent-1",
57
+ className: tooltipTextCva({ color }),
58
+ children: text
59
+ }
60
+ )
61
+ ]
62
+ }
63
+ )
64
+ ]
65
+ }
66
+ );
67
+ };
68
+ export {
69
+ Tooltip
70
+ };
@@ -0,0 +1,27 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { useState } from "react";
3
+ import { Tooltip } from "./Tooltip.js";
4
+ const TooltipEllipsis = ({ text, children, isDisabled }) => {
5
+ const [isEllipsisActive, setIsEllipsisActive] = useState(false);
6
+ const onContentRef = (ref) => {
7
+ if (ref) {
8
+ setIsEllipsisActive(ref.offsetWidth < ref.scrollWidth);
9
+ }
10
+ };
11
+ const content = children(onContentRef);
12
+ if (isEllipsisActive && !isDisabled) {
13
+ return /* @__PURE__ */ jsx(
14
+ Tooltip,
15
+ {
16
+ text,
17
+ placement: "bottom",
18
+ isDisabled,
19
+ children: content
20
+ }
21
+ );
22
+ }
23
+ return content;
24
+ };
25
+ export {
26
+ TooltipEllipsis
27
+ };
@@ -0,0 +1,60 @@
1
+ import { cva } from "class-variance-authority";
2
+ const tooltipCva = cva(
3
+ ["group max-w-64 rounded-tooltip-rounding-default px-tooltip-side-default py-tooltip-height-default shadow-2"],
4
+ {
5
+ variants: {
6
+ color: {
7
+ default: ["bg-interactive-contained-secondary-idle"],
8
+ error: ["w-max bg-text-error-1"]
9
+ }
10
+ },
11
+ defaultVariants: {
12
+ color: "default"
13
+ }
14
+ }
15
+ );
16
+ const tooltipPointerHorizontalCva = cva(
17
+ ["h-2-5 w-5 group-placement-left:hidden group-placement-right:hidden group-placement-top:rotate-180"],
18
+ {
19
+ variants: {
20
+ color: {
21
+ default: ["text-interactive-contained-secondary-idle"],
22
+ error: ["text-text-error-1"]
23
+ }
24
+ },
25
+ defaultVariants: {
26
+ color: "default"
27
+ }
28
+ }
29
+ );
30
+ const tooltipPointerVerticalCva = cva(
31
+ ["h-5 w-2-5 group-placement-bottom:hidden group-placement-top:hidden group-placement-left:rotate-180"],
32
+ {
33
+ variants: {
34
+ color: {
35
+ default: ["text-interactive-contained-secondary-idle"],
36
+ error: ["text-text-error-1"]
37
+ }
38
+ },
39
+ defaultVariants: {
40
+ color: "default"
41
+ }
42
+ }
43
+ );
44
+ const tooltipTextCva = cva([], {
45
+ variants: {
46
+ color: {
47
+ default: ["text-text-inverted-3"],
48
+ error: ["text-interactive-text-secondary-idle-inverted"]
49
+ }
50
+ },
51
+ defaultVariants: {
52
+ color: "default"
53
+ }
54
+ });
55
+ export {
56
+ tooltipCva,
57
+ tooltipPointerHorizontalCva,
58
+ tooltipPointerVerticalCva,
59
+ tooltipTextCva
60
+ };
@@ -0,0 +1,119 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { mergeRefs } from "@react-aria/utils";
3
+ import { clsx } from "clsx";
4
+ import { useRef, useMemo, Fragment } from "react";
5
+ import { useToggleButtonGroup } from "react-aria";
6
+ import { ToggleButtonGroup } from "react-aria-components";
7
+ import { Controller } from "react-hook-form";
8
+ import { useToggleGroupState } from "react-stately";
9
+ import { FormField } from "../inputs/FormField/FormField.js";
10
+ import { SegmentItem } from "./SegmentItem.js";
11
+ const SegmentBase = ({
12
+ className,
13
+ items,
14
+ error,
15
+ onChange,
16
+ value,
17
+ defaultValue,
18
+ ...rest
19
+ }) => {
20
+ const props = {
21
+ ...rest,
22
+ defaultSelectedKeys: defaultValue ? Array.isArray(defaultValue) ? defaultValue : [defaultValue] : void 0,
23
+ selectedKeys: value ? Array.isArray(value) ? value : [value] : void 0
24
+ };
25
+ const buttonGroupRef = useRef(null);
26
+ const state = useToggleGroupState(props);
27
+ const { groupProps } = useToggleButtonGroup(props, state, buttonGroupRef);
28
+ const formFieldProps = {
29
+ error,
30
+ label: "",
31
+ hideLabel: true,
32
+ isDisabled: props.isDisabled
33
+ };
34
+ const onSelectionChange = (keys) => {
35
+ if (props.selectionMode === "multiple") {
36
+ onChange?.(Array.from(keys.values()));
37
+ } else {
38
+ onChange?.(Array.from(keys.values())[0]);
39
+ }
40
+ };
41
+ const gridTemplateColumns = useMemo(() => {
42
+ return items.length > 2 ? Array.from({ length: items.length * 2 - 1 }, (_, i) => i % 2 === 0 ? "1fr" : "auto").join(" ") : `repeat(${items.length}, 1fr)`;
43
+ }, [items.length]);
44
+ return /* @__PURE__ */ jsx(
45
+ FormField,
46
+ {
47
+ ...formFieldProps,
48
+ className: clsx("relative w-full", className),
49
+ children: /* @__PURE__ */ jsx(
50
+ ToggleButtonGroup,
51
+ {
52
+ ...props,
53
+ ...groupProps,
54
+ ref: buttonGroupRef,
55
+ onSelectionChange,
56
+ className: clsx(
57
+ "group/segment grid w-fit items-center gap-segmented-control-side-segmented-control p-segmented-control-side-segmented-control",
58
+ "bg-elevation-fill-default-3",
59
+ "rounded-segmented-control-rounding-segmented-control",
60
+ className
61
+ ),
62
+ style: {
63
+ gridTemplateColumns
64
+ },
65
+ children: items.map((item, index) => /* @__PURE__ */ jsxs(Fragment, { children: [
66
+ /* @__PURE__ */ jsx(
67
+ SegmentItem,
68
+ {
69
+ ...item,
70
+ isDisabled: item.isDisabled || props.isDisabled,
71
+ isSelected: state.selectedKeys.has(item.id),
72
+ onPress: () => {
73
+ state.toggleKey(item.id);
74
+ }
75
+ }
76
+ ),
77
+ index !== items.length - 1 && items.length > 2 && /* @__PURE__ */ jsx(
78
+ "div",
79
+ {
80
+ className: clsx(
81
+ "h-5 w-px rounded-2xl",
82
+ !state.selectedKeys.has(item.id) && !state.selectedKeys.has(items[index + 1].id) && "bg-elevation-outline-default-1"
83
+ ),
84
+ children: /* @__PURE__ */ jsx("span", { className: "flex h-full w-px" })
85
+ }
86
+ )
87
+ ] }, item.id))
88
+ }
89
+ )
90
+ }
91
+ );
92
+ };
93
+ const Segment = (props) => {
94
+ if ("formControl" in props && props.formControl) {
95
+ const { formControl, ref, ...innerProps } = props;
96
+ return /* @__PURE__ */ jsx(
97
+ Controller,
98
+ {
99
+ control: formControl.control,
100
+ name: formControl.name,
101
+ render: ({ field, fieldState: { error } }) => /* @__PURE__ */ jsx(
102
+ SegmentBase,
103
+ {
104
+ ...innerProps,
105
+ ref: mergeRefs(ref, field.ref),
106
+ value: field.value,
107
+ onChange: field.onChange,
108
+ isDisabled: field.disabled || props.isDisabled,
109
+ error: props.error ?? error?.message
110
+ }
111
+ )
112
+ }
113
+ );
114
+ }
115
+ return /* @__PURE__ */ jsx(SegmentBase, { ...props });
116
+ };
117
+ export {
118
+ Segment
119
+ };
@@ -0,0 +1,43 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { clsx } from "clsx";
3
+ import { ToggleButton } from "react-aria-components";
4
+ import { Typography } from "../text/Typography/Typography.js";
5
+ const SegmentItem = ({ label, icon, id, isDisabled, ...props }) => {
6
+ const IconComponent = icon;
7
+ const iconOnly = icon && !label;
8
+ return /* @__PURE__ */ jsxs(
9
+ ToggleButton,
10
+ {
11
+ ...props,
12
+ id,
13
+ className: clsx(
14
+ "flex items-center justify-center gap-1 transition-all duration-200",
15
+ "border border-transparent",
16
+ "py-segmented-control-height-segment",
17
+ iconOnly ? "px-segmented-control-height-segment" : "px-segmented-control-side-segment py-segmented-control-height-segment",
18
+ "rounded-segmented-control-rounding-segment",
19
+ "hover:bg-interactive-subtle-secondary-hover",
20
+ "pressed:bg-interactive-subtle-secondary-pressed",
21
+ "selected:text-interactive-subtle-secondary-on-toggled-idle text-interactive-subtle-secondary-on-idle hover:text-interactive-subtle-secondary-on-hover",
22
+ "disabled:selected:text-interactive-subtle-secondary-on-toggled-disabled disabled:text-interactive-subtle-secondary-on-disabled",
23
+ "selected:bg-interactive-subtle-secondary-toggled-idle disabled:selected:bg-interactive-subtle-secondary-toggled-disabled"
24
+ ),
25
+ isDisabled,
26
+ children: [
27
+ icon && /* @__PURE__ */ jsx(IconComponent, { className: "size-6" }),
28
+ label && /* @__PURE__ */ jsx(
29
+ Typography,
30
+ {
31
+ size: "label-2",
32
+ as: "span",
33
+ className: "overflow-hidden text-ellipsis text-center",
34
+ children: label
35
+ }
36
+ )
37
+ ]
38
+ }
39
+ );
40
+ };
41
+ export {
42
+ SegmentItem
43
+ };
@@ -1,7 +1,7 @@
1
1
  import { FC, ReactElement, Ref, SVGProps } from 'react';
2
2
  import { Key, ToggleButtonGroupProps, ToggleButtonProps } from 'react-aria-components';
3
3
  import { FieldValues } from 'react-hook-form';
4
- import { ControlProps } from '#ui/components/inputs/shared/form.types';
4
+ import { ControlProps } from '../inputs/shared/form.types';
5
5
  export interface SegmentItem<TKey extends Key = Key> extends ToggleButtonProps {
6
6
  id: TKey;
7
7
  label?: string;
@@ -0,0 +1,75 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { clsx } from "clsx";
3
+ import { useTranslation } from "react-i18next";
4
+ import { NumberInput } from "../../inputs/Input/NumberInput/NumberInput.js";
5
+ import { Typography } from "../../text/Typography/Typography.js";
6
+ import { ns } from "../../../config/i18n.js";
7
+ import { PaginationList } from "./PaginationList.js";
8
+ const Pagination = ({
9
+ size = "s",
10
+ variant = "subtle",
11
+ color = "secondary",
12
+ page,
13
+ totalItems,
14
+ totalPages,
15
+ pageSize,
16
+ hideText = true,
17
+ hideFirstLast = true,
18
+ hidePrevNext = false,
19
+ hideNumbers = false,
20
+ className,
21
+ onPageChange,
22
+ onPageSizeChange
23
+ }) => {
24
+ const { t } = useTranslation(ns);
25
+ return /* @__PURE__ */ jsxs(
26
+ "nav",
27
+ {
28
+ id: "pagination",
29
+ className: clsx("flex items-center gap-2", className),
30
+ children: [
31
+ totalItems > pageSize && /* @__PURE__ */ jsx(
32
+ PaginationList,
33
+ {
34
+ page,
35
+ size,
36
+ color,
37
+ variant,
38
+ hideText,
39
+ hideFirstLast,
40
+ hidePrevNext,
41
+ hideNumbers,
42
+ totalPages: totalPages ?? Math.ceil(totalItems / pageSize),
43
+ onPageChange
44
+ }
45
+ ),
46
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
47
+ /* @__PURE__ */ jsx(
48
+ Typography,
49
+ {
50
+ variant: "default",
51
+ size: "label-2",
52
+ as: "span",
53
+ className: "whitespace-nowrap text-text-default-1",
54
+ children: t(($) => $.ui.pagination.resultsPerPage)
55
+ }
56
+ ),
57
+ /* @__PURE__ */ jsx(
58
+ NumberInput,
59
+ {
60
+ value: pageSize,
61
+ onChange: (value) => onPageSizeChange?.(Number(value)),
62
+ label: t(($) => $.ui.pagination.resultsPerPage),
63
+ hideLabel: true,
64
+ className: "w-min",
65
+ inputClassName: "min-w-12 !px-3 !py-0-5"
66
+ }
67
+ )
68
+ ] })
69
+ ]
70
+ }
71
+ );
72
+ };
73
+ export {
74
+ Pagination
75
+ };
@@ -1,4 +1,4 @@
1
- import { ButtonProps } from '#ui/components/buttons/Button/Button';
1
+ import { ButtonProps } from '../../buttons/Button/Button';
2
2
  export interface PaginationListProps {
3
3
  page: number;
4
4
  totalPages: number;
@@ -0,0 +1,145 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { clsx } from "clsx";
3
+ import { useMemo } from "react";
4
+ import { useTranslation } from "react-i18next";
5
+ import { ChevronLeftIcon } from "../../../assets/icons/ChevronLeft.js";
6
+ import { ChevronRightIcon } from "../../../assets/icons/ChevronRight.js";
7
+ import { ChevronsLeftIcon } from "../../../assets/icons/ChevronsLeft.js";
8
+ import { ChevronsRightIcon } from "../../../assets/icons/ChevronsRight.js";
9
+ import { Button } from "../../buttons/Button/Button.js";
10
+ import { ns } from "../../../config/i18n.js";
11
+ import { minWidth } from "./minWidth.cva.js";
12
+ const PaginationList = ({
13
+ page,
14
+ totalPages,
15
+ size,
16
+ color,
17
+ variant,
18
+ hideText,
19
+ hideFirstLast,
20
+ hidePrevNext,
21
+ hideNumbers,
22
+ className,
23
+ onPageChange
24
+ }) => {
25
+ const { t } = useTranslation(ns);
26
+ const isPrevDisabled = page <= 1;
27
+ const isNextDisabled = page >= totalPages;
28
+ const renderPageNumbers = useMemo(() => {
29
+ const pagesToShow = [];
30
+ pagesToShow.push(1);
31
+ if (page > 3) {
32
+ pagesToShow.push("ellipsis");
33
+ }
34
+ for (let i = Math.max(2, page - 1); i <= Math.min(totalPages - 1, page + 1); i++) {
35
+ pagesToShow.push(i);
36
+ }
37
+ if (page < totalPages - 2) {
38
+ pagesToShow.push("ellipsis");
39
+ }
40
+ if (totalPages > 1 && !pagesToShow.includes(totalPages)) {
41
+ pagesToShow.push(totalPages);
42
+ }
43
+ return pagesToShow.map((p, index) => {
44
+ if (p === "ellipsis") {
45
+ return /* @__PURE__ */ jsx(
46
+ Button,
47
+ {
48
+ variant,
49
+ color,
50
+ size,
51
+ width: "fill",
52
+ className: clsx(minWidth({ size })),
53
+ children: "..."
54
+ },
55
+ `ellipsis-${index}`
56
+ );
57
+ }
58
+ return /* @__PURE__ */ jsx(
59
+ Button,
60
+ {
61
+ width: "hug",
62
+ size,
63
+ variant,
64
+ color,
65
+ "data-selected": p === page ? true : void 0,
66
+ className: clsx(p.toString().length <= 2 && minWidth({ size })),
67
+ onPress: () => onPageChange?.(p),
68
+ children: p.toString()
69
+ },
70
+ `page-${p}`
71
+ );
72
+ });
73
+ }, [page, color, size, variant, totalPages, onPageChange]);
74
+ if (totalPages <= 1) {
75
+ return null;
76
+ }
77
+ const onNext = () => {
78
+ if (!isNextDisabled) {
79
+ onPageChange?.(page + 1);
80
+ }
81
+ };
82
+ const onPrevious = () => {
83
+ if (!isPrevDisabled) {
84
+ onPageChange?.(page - 1);
85
+ }
86
+ };
87
+ return /* @__PURE__ */ jsxs("nav", { className: clsx("flex items-center gap-pagination-button-to-button", className), children: [
88
+ !hideFirstLast && /* @__PURE__ */ jsx(
89
+ Button,
90
+ {
91
+ onClick: () => onPageChange?.(1),
92
+ isDisabled: isPrevDisabled,
93
+ size,
94
+ color,
95
+ variant,
96
+ iconOnly: hideText,
97
+ icon: ChevronsLeftIcon,
98
+ children: t(($) => $.ui.pagination.firstBtn)
99
+ }
100
+ ),
101
+ !hidePrevNext && /* @__PURE__ */ jsx(
102
+ Button,
103
+ {
104
+ onClick: onPrevious,
105
+ isDisabled: isPrevDisabled,
106
+ size,
107
+ color,
108
+ variant,
109
+ iconOnly: hideText,
110
+ icon: ChevronLeftIcon,
111
+ children: t(($) => $.ui.pagination.backBtn)
112
+ }
113
+ ),
114
+ !hideNumbers && renderPageNumbers,
115
+ !hidePrevNext && /* @__PURE__ */ jsx(
116
+ Button,
117
+ {
118
+ onClick: onNext,
119
+ isDisabled: isNextDisabled,
120
+ size,
121
+ color,
122
+ variant,
123
+ iconOnly: hideText,
124
+ icon: ChevronRightIcon,
125
+ children: t(($) => $.ui.pagination.nextBtn)
126
+ }
127
+ ),
128
+ !hideFirstLast && /* @__PURE__ */ jsx(
129
+ Button,
130
+ {
131
+ onClick: () => onPageChange?.(totalPages),
132
+ isDisabled: isNextDisabled,
133
+ size,
134
+ color,
135
+ variant,
136
+ iconOnly: hideText,
137
+ icon: ChevronsRightIcon,
138
+ children: t(($) => $.ui.pagination.lastBtn)
139
+ }
140
+ )
141
+ ] });
142
+ };
143
+ export {
144
+ PaginationList
145
+ };