@povio/ui 2.1.14 → 2.1.15

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 (498) hide show
  1. package/README.md +74 -0
  2. package/dist/AclGuard.js +12 -0
  3. package/dist/ActionModal.js +51 -0
  4. package/dist/Alert.js +46 -0
  5. package/dist/AlignCenter.js +13 -0
  6. package/dist/AlignLeft.js +13 -0
  7. package/dist/AlignLeftRight.js +13 -0
  8. package/dist/AlignRight.js +13 -0
  9. package/dist/ArrowDropDown.js +13 -0
  10. package/dist/ArrowDropUp.js +13 -0
  11. package/dist/ArrowLeft.js +13 -0
  12. package/dist/ArrowRight.js +13 -0
  13. package/dist/AuthGuard.js +22 -0
  14. package/dist/Autocomplete.js +28 -0
  15. package/dist/Bold.js +13 -0
  16. package/dist/BottomSheet.js +191 -0
  17. package/dist/BulletedList.js +13 -0
  18. package/dist/Button.js +54 -0
  19. package/dist/ButtonContent.js +28 -0
  20. package/dist/Calendar.js +15 -0
  21. package/dist/Calendar2.js +54 -0
  22. package/dist/CalendarCell.js +130 -0
  23. package/dist/CalendarGrid.js +50 -0
  24. package/dist/CalendarHeader.js +75 -0
  25. package/dist/CalendarSelectHeader.js +170 -0
  26. package/dist/Can.js +13 -0
  27. package/dist/CellText.js +13 -0
  28. package/dist/Check.js +15 -0
  29. package/dist/CheckCircle.js +13 -0
  30. package/dist/CheckContent.js +16 -0
  31. package/dist/Checkbox.js +61 -0
  32. package/dist/CheckboxCheckmark.js +16 -0
  33. package/dist/CheckboxCheckmark2.js +25 -0
  34. package/dist/CheckboxIndeterminate.js +16 -0
  35. package/dist/ChevronDown.js +15 -0
  36. package/dist/ChevronLeft.js +15 -0
  37. package/dist/ChevronRight.js +15 -0
  38. package/dist/ChevronUp.js +15 -0
  39. package/dist/ChevronsLeft.js +15 -0
  40. package/dist/ChevronsRight.js +15 -0
  41. package/dist/Clock.js +13 -0
  42. package/dist/Close.js +13 -0
  43. package/dist/ColorPicker.js +16 -0
  44. package/dist/ColorPickerDropdown.js +51 -0
  45. package/dist/ColumnConfig.js +81 -0
  46. package/dist/DateField.js +89 -0
  47. package/dist/DatePicker.js +191 -0
  48. package/dist/DatePickerInput.js +158 -0
  49. package/dist/DateRangePicker.js +601 -0
  50. package/dist/DateSegmentItem.js +29 -0
  51. package/dist/DateTime.js +18 -0
  52. package/dist/DateTimeDialog.js +49 -0
  53. package/dist/DateTimeDialogFooter.js +25 -0
  54. package/dist/DateTimePicker.js +200 -0
  55. package/dist/Drag.js +13 -0
  56. package/dist/Drawer.js +43 -0
  57. package/dist/File.js +15 -0
  58. package/dist/FileCard.js +50 -0
  59. package/dist/FileCardList.js +17 -0
  60. package/dist/FileUpload.js +189 -0
  61. package/dist/FileUploadContainer.js +12 -0
  62. package/dist/FileUploadContent.js +61 -0
  63. package/dist/FileUploadContentEmpty.js +54 -0
  64. package/dist/FileUploadContentError.js +109 -0
  65. package/dist/FileUploadContentFilled.js +112 -0
  66. package/dist/FileUploadContentLoading.js +76 -0
  67. package/dist/Form.js +42 -0
  68. package/dist/FormField.js +35 -0
  69. package/dist/FormFieldError.js +11 -0
  70. package/dist/FormFieldHeader.js +36 -0
  71. package/dist/FormFieldHeaderClose.js +15 -0
  72. package/dist/FormFieldLabel.js +32 -0
  73. package/dist/HeaderText.js +10 -0
  74. package/dist/Highlight.js +13 -0
  75. package/dist/HighlightOn.js +19 -0
  76. package/dist/HyperlinkAction.js +70 -0
  77. package/dist/IconButton.js +12 -0
  78. package/dist/InfiniteTable.js +31 -0
  79. package/dist/Info.js +18 -0
  80. package/dist/InlineIconButton.js +13 -0
  81. package/dist/InputClear.js +19 -0
  82. package/dist/InputContent.js +94 -0
  83. package/dist/InputItem.js +54 -0
  84. package/dist/InputUpload.js +111 -0
  85. package/dist/InputUploadContent.js +52 -0
  86. package/dist/InputUploadFilled.js +26 -0
  87. package/dist/Inputs.js +15 -0
  88. package/dist/Italic.js +13 -0
  89. package/dist/Link.js +13 -0
  90. package/dist/Link2.js +19 -0
  91. package/dist/Loader.js +32 -0
  92. package/dist/Menu.js +13 -0
  93. package/dist/Menu2.js +9 -0
  94. package/dist/MenuDesktop.js +53 -0
  95. package/dist/MenuItem.js +21 -0
  96. package/dist/MenuMobile.js +64 -0
  97. package/dist/MenuPopover.js +30 -0
  98. package/dist/Modal.js +49 -0
  99. package/dist/MonthPicker.js +56 -0
  100. package/dist/NumberInput.js +132 -0
  101. package/dist/NumberedList.js +13 -0
  102. package/dist/PaginatedTable.js +26 -0
  103. package/dist/Pagination.js +43 -0
  104. package/dist/PaginationList.js +105 -0
  105. package/dist/PasswordInput.js +21 -0
  106. package/dist/PillButton.js +37 -0
  107. package/dist/PointerHorizontal.js +13 -0
  108. package/dist/PointerVertical.js +13 -0
  109. package/dist/ProgressBar.js +25 -0
  110. package/dist/QueryAutocomplete.js +18 -0
  111. package/dist/RadioGroup.js +81 -0
  112. package/dist/RangeCalendar.js +96 -0
  113. package/dist/ResponsivePopover.js +41 -0
  114. package/dist/Segment.js +82 -0
  115. package/dist/SegmentItem.js +23 -0
  116. package/dist/Select.js +24 -0
  117. package/dist/SelectBase.js +28 -0
  118. package/dist/SelectDesktop.js +147 -0
  119. package/dist/SelectInput.js +159 -0
  120. package/dist/SelectInputTags.js +29 -0
  121. package/dist/SelectListBox.js +73 -0
  122. package/dist/SelectListBoxItem.js +48 -0
  123. package/dist/SelectListBoxItemSelectAll.js +31 -0
  124. package/dist/SelectListBoxLoadingItem.js +41 -0
  125. package/dist/SelectListBoxSelectionBar.js +25 -0
  126. package/dist/SelectMobile.js +111 -0
  127. package/dist/Send.js +15 -0
  128. package/dist/Slider.js +93 -0
  129. package/dist/SplitButton.js +36 -0
  130. package/dist/Strikethrough.js +13 -0
  131. package/dist/Table.js +248 -0
  132. package/dist/Tag.js +42 -0
  133. package/dist/TextAlignSelect.js +44 -0
  134. package/dist/TextArea.js +120 -0
  135. package/dist/TextButton.js +13 -0
  136. package/dist/TextColor.js +16 -0
  137. package/dist/TextColorSelect.js +22 -0
  138. package/dist/TextEditor.js +143 -0
  139. package/dist/TextEditorToolbar.js +30 -0
  140. package/dist/TextHighlightSelect.js +24 -0
  141. package/dist/TextInput.js +125 -0
  142. package/dist/TextListActions.js +42 -0
  143. package/dist/TextMarksActions.js +67 -0
  144. package/dist/TextStyleSelect.js +52 -0
  145. package/dist/TimeField.js +17 -0
  146. package/dist/TimePicker.js +158 -0
  147. package/dist/TimePickerForm.js +158 -0
  148. package/dist/TimePickerInput.js +92 -0
  149. package/dist/Toast.js +58 -0
  150. package/dist/Today.js +13 -0
  151. package/dist/Toggle.js +60 -0
  152. package/dist/ToggleButton.js +13 -0
  153. package/dist/Tooltip.js +49 -0
  154. package/dist/TooltipEllipsis.js +18 -0
  155. package/dist/TooltipWrapper.js +19 -0
  156. package/dist/Typography.js +14 -0
  157. package/dist/Underlined.js +15 -0
  158. package/dist/Upload.js +16 -0
  159. package/dist/View.js +13 -0
  160. package/dist/ViewOff.js +13 -0
  161. package/dist/WarningFilled.js +15 -0
  162. package/dist/YearPicker.js +64 -0
  163. package/dist/ability.context.js +35 -0
  164. package/dist/alert.cva.js +62 -0
  165. package/dist/array.utils.js +8 -0
  166. package/dist/auth.context.js +37 -0
  167. package/dist/auth.js +6 -12
  168. package/dist/button.cva.js +656 -0
  169. package/dist/buttonContent.cva.js +10 -0
  170. package/dist/checkbox.cva.js +47 -0
  171. package/dist/components/inputs/Checkbox/Checkbox.d.ts +1 -0
  172. package/dist/components/inputs/Checkbox/CheckboxCheckmark.d.ts +2 -2
  173. package/dist/components/inputs/Checkbox/checkbox.cva.d.ts +5 -0
  174. package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +3 -1
  175. package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +3 -1
  176. package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +3 -1
  177. package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +1 -0
  178. package/dist/components/inputs/DateTime/shared/DateField.d.ts +1 -0
  179. package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +8 -2
  180. package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +2 -1
  181. package/dist/components/inputs/File/fileUpload.types.d.ts +1 -0
  182. package/dist/components/inputs/FormField/FormField.d.ts +4 -1
  183. package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +4 -2
  184. package/dist/components/inputs/Input/TextArea/TextArea.d.ts +1 -0
  185. package/dist/components/inputs/Input/TextInput/TextInput.d.ts +2 -1
  186. package/dist/components/inputs/Input/shared/InputContent.d.ts +4 -3
  187. package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +3 -0
  188. package/dist/components/inputs/TextEditor/TextEditor.d.ts +1 -0
  189. package/dist/components/inputs/Toggle/Toggle.d.ts +2 -0
  190. package/dist/components/inputs/shared/CheckContent.d.ts +2 -1
  191. package/dist/compoundMapper.js +11 -0
  192. package/dist/config/uiStyle.context.d.ts +2 -1
  193. package/dist/confirmation.context.js +78 -0
  194. package/dist/date-time.utils.js +50 -0
  195. package/dist/date.utils.js +17 -0
  196. package/dist/dom.utils.js +17 -0
  197. package/dist/dynamicColumns.js +272 -0
  198. package/dist/dynamicInputs.js +186 -0
  199. package/dist/error-handling.js +87 -0
  200. package/dist/file.utils.js +43 -0
  201. package/dist/fileUpload.cva.js +49 -0
  202. package/dist/i18n.js +8 -0
  203. package/dist/index.js +136 -278
  204. package/dist/input.cva.js +210 -0
  205. package/dist/inputUploadButton.cva.js +27 -0
  206. package/dist/isEqual.js +57 -0
  207. package/dist/label.cva.js +104 -0
  208. package/dist/link.context.js +17 -0
  209. package/dist/link.cva.js +7 -0
  210. package/dist/loader.cva.js +16 -0
  211. package/dist/logger.js +17 -0
  212. package/dist/menu.cva.js +27 -0
  213. package/dist/minWidth.cva.js +9 -0
  214. package/dist/modal.cva.js +31 -0
  215. package/dist/object.utils.js +36 -0
  216. package/dist/outline.clsx.js +4 -0
  217. package/dist/pillButton.cva.js +254 -0
  218. package/dist/queries.utils.js +7 -0
  219. package/dist/radio.cva.js +42 -0
  220. package/dist/react.js +6 -0
  221. package/dist/rest-interceptor.js +22 -0
  222. package/dist/rest.utils.js +31 -0
  223. package/dist/rolldown_runtime.js +16 -0
  224. package/dist/router.context.js +37 -0
  225. package/dist/routing.utils.js +9 -0
  226. package/dist/segment.cva.js +25 -0
  227. package/dist/select.context.js +190 -0
  228. package/dist/status.cva.js +57 -0
  229. package/dist/string.utils.js +10 -0
  230. package/dist/table.cva.js +35 -0
  231. package/dist/tag.cva.js +50 -0
  232. package/dist/text-editor.js +2 -4
  233. package/dist/textEditor.types.js +38 -0
  234. package/dist/theme.context.js +65 -0
  235. package/dist/toast.cva.js +158 -0
  236. package/dist/toggle.cva.js +27 -0
  237. package/dist/tooltip.cva.js +30 -0
  238. package/dist/translation.js +147 -0
  239. package/dist/translation2.js +145 -0
  240. package/dist/typography.cva.js +124 -0
  241. package/dist/uiConfig.context.js +58 -0
  242. package/dist/uiStyle.context.js +16 -0
  243. package/dist/useAutosave.js +62 -0
  244. package/dist/useBreakpoint.js +28 -0
  245. package/dist/useDebounceCallback.js +23 -0
  246. package/dist/useDeepCompare.js +21 -0
  247. package/dist/useFilters.js +121 -0
  248. package/dist/useForm.js +12 -0
  249. package/dist/useFormAutosave.js +52 -0
  250. package/dist/useIntersectionObserver.js +23 -0
  251. package/dist/useLocalStorage.js +35 -0
  252. package/dist/useLongPressRepeat.js +27 -0
  253. package/dist/usePagination.js +26 -0
  254. package/dist/useScrollableListBox.js +24 -0
  255. package/dist/useSelectItems.js +82 -0
  256. package/dist/useSorting.js +34 -0
  257. package/dist/useStateAndRef.js +15 -0
  258. package/dist/useTableColumnConfig.js +38 -0
  259. package/dist/useTableNav.js +279 -0
  260. package/dist/useToast.js +63 -0
  261. package/dist/useTranslationMemo.js +10 -0
  262. package/dist/zod.utils.js +17 -0
  263. package/package.json +14 -14
  264. package/dist/assets/icons/AlignCenter.js +0 -21
  265. package/dist/assets/icons/AlignLeft.js +0 -21
  266. package/dist/assets/icons/AlignLeftRight.js +0 -21
  267. package/dist/assets/icons/AlignRight.js +0 -21
  268. package/dist/assets/icons/ArrowDropDown.js +0 -21
  269. package/dist/assets/icons/ArrowDropUp.js +0 -21
  270. package/dist/assets/icons/ArrowLeft.js +0 -21
  271. package/dist/assets/icons/ArrowRight.js +0 -21
  272. package/dist/assets/icons/Bold.js +0 -21
  273. package/dist/assets/icons/BulletedList.js +0 -21
  274. package/dist/assets/icons/Calendar.js +0 -23
  275. package/dist/assets/icons/Check.js +0 -23
  276. package/dist/assets/icons/CheckCircle.js +0 -21
  277. package/dist/assets/icons/CheckboxCheckmark.js +0 -24
  278. package/dist/assets/icons/CheckboxIndeterminate.js +0 -24
  279. package/dist/assets/icons/ChevronDown.js +0 -23
  280. package/dist/assets/icons/ChevronLeft.js +0 -23
  281. package/dist/assets/icons/ChevronRight.js +0 -23
  282. package/dist/assets/icons/ChevronUp.js +0 -23
  283. package/dist/assets/icons/ChevronsLeft.js +0 -23
  284. package/dist/assets/icons/ChevronsRight.js +0 -23
  285. package/dist/assets/icons/Clock.js +0 -21
  286. package/dist/assets/icons/Close.js +0 -21
  287. package/dist/assets/icons/DateTime.js +0 -32
  288. package/dist/assets/icons/Drag.js +0 -21
  289. package/dist/assets/icons/File.js +0 -23
  290. package/dist/assets/icons/Highlight.js +0 -21
  291. package/dist/assets/icons/HighlightOn.js +0 -30
  292. package/dist/assets/icons/Info.js +0 -32
  293. package/dist/assets/icons/Italic.js +0 -21
  294. package/dist/assets/icons/Link.js +0 -21
  295. package/dist/assets/icons/Menu.js +0 -21
  296. package/dist/assets/icons/NumberedList.js +0 -21
  297. package/dist/assets/icons/PointerHorizontal.js +0 -21
  298. package/dist/assets/icons/PointerVertical.js +0 -21
  299. package/dist/assets/icons/Send.js +0 -23
  300. package/dist/assets/icons/Strikethrough.js +0 -21
  301. package/dist/assets/icons/TextColor.js +0 -30
  302. package/dist/assets/icons/Today.js +0 -21
  303. package/dist/assets/icons/Underlined.js +0 -23
  304. package/dist/assets/icons/Upload.js +0 -30
  305. package/dist/assets/icons/View.js +0 -18
  306. package/dist/assets/icons/ViewOff.js +0 -18
  307. package/dist/assets/icons/WarningFilled.js +0 -23
  308. package/dist/assets/locales/en/translation.json.js +0 -14
  309. package/dist/assets/locales/sl/translation.json.js +0 -14
  310. package/dist/components/Menu/Menu.js +0 -14
  311. package/dist/components/Menu/MenuDesktop.js +0 -74
  312. package/dist/components/Menu/MenuItem.js +0 -27
  313. package/dist/components/Menu/MenuMobile.js +0 -83
  314. package/dist/components/Menu/MenuPopover.js +0 -43
  315. package/dist/components/Menu/menu.cva.js +0 -45
  316. package/dist/components/buttons/Button/Button.js +0 -73
  317. package/dist/components/buttons/Button/button.cva.js +0 -666
  318. package/dist/components/buttons/IconButton/IconButton.js +0 -17
  319. package/dist/components/buttons/InlineIconButton/InlineIconButton.js +0 -18
  320. package/dist/components/buttons/PillButton/PillButton.js +0 -44
  321. package/dist/components/buttons/PillButton/pillButton.cva.js +0 -268
  322. package/dist/components/buttons/SplitButton/SplitButton.js +0 -65
  323. package/dist/components/buttons/TextButton/TextButton.js +0 -18
  324. package/dist/components/buttons/ToggleButton/ToggleButton.js +0 -21
  325. package/dist/components/buttons/shared/ButtonContent.js +0 -53
  326. package/dist/components/buttons/shared/buttonContent.cva.js +0 -16
  327. package/dist/components/inputs/Checkbox/Checkbox.js +0 -81
  328. package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +0 -32
  329. package/dist/components/inputs/Checkbox/checkbox.cva.js +0 -51
  330. package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +0 -251
  331. package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +0 -689
  332. package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +0 -265
  333. package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +0 -217
  334. package/dist/components/inputs/DateTime/shared/Calendar.js +0 -85
  335. package/dist/components/inputs/DateTime/shared/CalendarCell.js +0 -160
  336. package/dist/components/inputs/DateTime/shared/CalendarGrid.js +0 -67
  337. package/dist/components/inputs/DateTime/shared/CalendarHeader.js +0 -89
  338. package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +0 -203
  339. package/dist/components/inputs/DateTime/shared/DateField.js +0 -77
  340. package/dist/components/inputs/DateTime/shared/DatePickerInput.js +0 -206
  341. package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +0 -55
  342. package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +0 -76
  343. package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +0 -47
  344. package/dist/components/inputs/DateTime/shared/MonthPicker.js +0 -82
  345. package/dist/components/inputs/DateTime/shared/RangeCalendar.js +0 -133
  346. package/dist/components/inputs/DateTime/shared/TimeField.js +0 -26
  347. package/dist/components/inputs/DateTime/shared/TimePickerForm.js +0 -186
  348. package/dist/components/inputs/DateTime/shared/TimePickerInput.js +0 -125
  349. package/dist/components/inputs/DateTime/shared/YearPicker.js +0 -89
  350. package/dist/components/inputs/File/FileUpload.js +0 -257
  351. package/dist/components/inputs/File/FileUploadContainer.js +0 -17
  352. package/dist/components/inputs/File/InputUpload.js +0 -174
  353. package/dist/components/inputs/File/shared/FileCard.js +0 -67
  354. package/dist/components/inputs/File/shared/FileCardList.js +0 -20
  355. package/dist/components/inputs/File/shared/FileUploadContent.js +0 -92
  356. package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +0 -92
  357. package/dist/components/inputs/File/shared/FileUploadContentError.js +0 -167
  358. package/dist/components/inputs/File/shared/FileUploadContentFilled.js +0 -173
  359. package/dist/components/inputs/File/shared/FileUploadContentLoading.js +0 -128
  360. package/dist/components/inputs/File/shared/InputUploadContent.js +0 -73
  361. package/dist/components/inputs/File/shared/InputUploadFilled.js +0 -45
  362. package/dist/components/inputs/File/shared/ProgressBar.js +0 -42
  363. package/dist/components/inputs/File/shared/fileUpload.cva.js +0 -58
  364. package/dist/components/inputs/File/shared/inputUploadButton.cva.js +0 -49
  365. package/dist/components/inputs/FormField/FormField.js +0 -54
  366. package/dist/components/inputs/FormField/FormFieldError.js +0 -16
  367. package/dist/components/inputs/FormField/FormFieldHeader.js +0 -57
  368. package/dist/components/inputs/FormField/FormFieldHeaderClose.js +0 -20
  369. package/dist/components/inputs/FormField/FormFieldLabel.js +0 -37
  370. package/dist/components/inputs/Input/NumberInput/NumberInput.js +0 -166
  371. package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +0 -26
  372. package/dist/components/inputs/Input/TextArea/TextArea.js +0 -155
  373. package/dist/components/inputs/Input/TextInput/TextInput.js +0 -162
  374. package/dist/components/inputs/Input/shared/InputContent.js +0 -114
  375. package/dist/components/inputs/Inputs/Form.js +0 -68
  376. package/dist/components/inputs/Inputs/InputItem.js +0 -61
  377. package/dist/components/inputs/Inputs/Inputs.js +0 -32
  378. package/dist/components/inputs/RadioGroup/RadioGroup.js +0 -103
  379. package/dist/components/inputs/RadioGroup/radio.cva.js +0 -57
  380. package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +0 -39
  381. package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +0 -25
  382. package/dist/components/inputs/Selection/Select/Select.js +0 -32
  383. package/dist/components/inputs/Selection/shared/SelectBase.js +0 -27
  384. package/dist/components/inputs/Selection/shared/SelectDesktop.js +0 -223
  385. package/dist/components/inputs/Selection/shared/SelectInput.js +0 -234
  386. package/dist/components/inputs/Selection/shared/SelectInputTags.js +0 -49
  387. package/dist/components/inputs/Selection/shared/SelectListBox.js +0 -127
  388. package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +0 -78
  389. package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +0 -45
  390. package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +0 -47
  391. package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +0 -42
  392. package/dist/components/inputs/Selection/shared/SelectMobile.js +0 -165
  393. package/dist/components/inputs/Selection/shared/select.context.js +0 -244
  394. package/dist/components/inputs/Selection/shared/useSelectItems.js +0 -94
  395. package/dist/components/inputs/Slider/Slider.js +0 -137
  396. package/dist/components/inputs/TextEditor/TextEditor.js +0 -223
  397. package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +0 -34
  398. package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +0 -80
  399. package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +0 -92
  400. package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +0 -56
  401. package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +0 -33
  402. package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.js +0 -31
  403. package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +0 -37
  404. package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +0 -51
  405. package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +0 -73
  406. package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +0 -61
  407. package/dist/components/inputs/TextEditor/textEditor.types.js +0 -40
  408. package/dist/components/inputs/Toggle/Toggle.js +0 -65
  409. package/dist/components/inputs/Toggle/toggle.cva.js +0 -44
  410. package/dist/components/inputs/shared/CheckContent.js +0 -22
  411. package/dist/components/inputs/shared/InputClear.js +0 -27
  412. package/dist/components/inputs/shared/TooltipWrapper.js +0 -23
  413. package/dist/components/inputs/shared/input.cva.js +0 -174
  414. package/dist/components/inputs/shared/label.cva.js +0 -128
  415. package/dist/components/outline.clsx.js +0 -11
  416. package/dist/components/overlays/ActionModal/ActionModal.js +0 -80
  417. package/dist/components/overlays/BottomSheet/BottomSheet.js +0 -261
  418. package/dist/components/overlays/Drawer/Drawer.js +0 -84
  419. package/dist/components/overlays/Modal/Modal.js +0 -64
  420. package/dist/components/overlays/Modal/modal.cva.js +0 -53
  421. package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +0 -71
  422. package/dist/components/overlays/Tooltip/Tooltip.js +0 -92
  423. package/dist/components/overlays/Tooltip/TooltipEllipsis.js +0 -27
  424. package/dist/components/overlays/Tooltip/tooltip.cva.js +0 -60
  425. package/dist/components/segment/Segment.js +0 -118
  426. package/dist/components/segment/SegmentItem.js +0 -35
  427. package/dist/components/segment/segment.cva.js +0 -35
  428. package/dist/components/shared/pagination/Pagination.js +0 -75
  429. package/dist/components/shared/pagination/PaginationList.js +0 -145
  430. package/dist/components/shared/pagination/minWidth.cva.js +0 -15
  431. package/dist/components/status/Alert/Alert.js +0 -41
  432. package/dist/components/status/Alert/alert.cva.js +0 -64
  433. package/dist/components/status/Loader/Loader.js +0 -37
  434. package/dist/components/status/Loader/loader.cva.js +0 -27
  435. package/dist/components/status/Toast/Toast.js +0 -65
  436. package/dist/components/status/Toast/toast.cva.js +0 -150
  437. package/dist/components/status/Toast/useToast.js +0 -94
  438. package/dist/components/status/shared/status.cva.js +0 -62
  439. package/dist/components/table/CellText.js +0 -18
  440. package/dist/components/table/ColumnConfig.js +0 -124
  441. package/dist/components/table/HeaderText.js +0 -15
  442. package/dist/components/table/InfiniteTable.js +0 -40
  443. package/dist/components/table/PaginatedTable.js +0 -33
  444. package/dist/components/table/Table.js +0 -370
  445. package/dist/components/table/table.cva.js +0 -63
  446. package/dist/components/text/Link/Link.js +0 -24
  447. package/dist/components/text/Link/link.cva.js +0 -18
  448. package/dist/components/text/Tag/Tag.js +0 -49
  449. package/dist/components/text/Tag/tag.cva.js +0 -59
  450. package/dist/components/text/Typography/Typography.js +0 -22
  451. package/dist/components/text/Typography/typography.cva.js +0 -100
  452. package/dist/config/confirmation.context.js +0 -107
  453. package/dist/config/i18n.js +0 -15
  454. package/dist/config/link.context.js +0 -19
  455. package/dist/config/router.context.js +0 -39
  456. package/dist/config/theme.context.js +0 -73
  457. package/dist/config/uiConfig.context.js +0 -69
  458. package/dist/config/uiStyle.context.js +0 -16
  459. package/dist/helpers/dynamicColumns.js +0 -359
  460. package/dist/helpers/dynamicInputs.js +0 -212
  461. package/dist/hooks/useAutosave.js +0 -83
  462. package/dist/hooks/useBreakpoint.js +0 -33
  463. package/dist/hooks/useDebounceCallback.js +0 -29
  464. package/dist/hooks/useDeepCompare.js +0 -25
  465. package/dist/hooks/useFilters.js +0 -160
  466. package/dist/hooks/useForm.js +0 -22
  467. package/dist/hooks/useFormAutosave.js +0 -67
  468. package/dist/hooks/useIntersectionObserver.js +0 -27
  469. package/dist/hooks/useLocalStorage.js +0 -54
  470. package/dist/hooks/useLongPressRepeat.js +0 -33
  471. package/dist/hooks/usePagination.js +0 -35
  472. package/dist/hooks/useScrollableListBox.js +0 -30
  473. package/dist/hooks/useSorting.js +0 -32
  474. package/dist/hooks/useStateAndRef.js +0 -17
  475. package/dist/hooks/useTableColumnConfig.js +0 -63
  476. package/dist/hooks/useTableNav.js +0 -394
  477. package/dist/hooks/useTranslationMemo.js +0 -14
  478. package/dist/utils/array.utils.js +0 -12
  479. package/dist/utils/compoundMapper.js +0 -14
  480. package/dist/utils/date-time.utils.js +0 -77
  481. package/dist/utils/date.utils.js +0 -23
  482. package/dist/utils/dom.utils.js +0 -13
  483. package/dist/utils/file.utils.js +0 -63
  484. package/dist/utils/isEqual.js +0 -95
  485. package/dist/utils/logger.js +0 -19
  486. package/dist/utils/object.utils.js +0 -53
  487. package/dist/utils/queries.utils.js +0 -9
  488. package/dist/utils/rest.utils.js +0 -51
  489. package/dist/utils/routing.utils.js +0 -15
  490. package/dist/utils/string.utils.js +0 -12
  491. package/dist/utils/vendor/acl/AclGuard.js +0 -14
  492. package/dist/utils/vendor/acl/Can.js +0 -18
  493. package/dist/utils/vendor/acl/ability.context.js +0 -37
  494. package/dist/utils/vendor/auth/AuthGuard.js +0 -26
  495. package/dist/utils/vendor/auth/auth.context.js +0 -41
  496. package/dist/utils/vendor/error-handling.js +0 -119
  497. package/dist/utils/vendor/rest-interceptor.js +0 -21
  498. package/dist/utils/zod.utils.js +0 -21
@@ -0,0 +1,109 @@
1
+ import { CloseIcon } from "./Close.js";
2
+ import { Typography } from "./Typography.js";
3
+ import { Button as Button$1 } from "./Button.js";
4
+ import { InlineIconButton } from "./InlineIconButton.js";
5
+ import { TextButton } from "./TextButton.js";
6
+ import { ns } from "./i18n.js";
7
+ import { WarningFilledIcon } from "./WarningFilled.js";
8
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
9
+ import { clsx } from "clsx";
10
+ import { FileTrigger } from "react-aria-components";
11
+ import { useTranslation } from "react-i18next";
12
+ const FileUploadContentError = ({ variant, as, isDisabled, state, browseText, fileTriggerProps, removeWithIcon = false, singleFile, onRemove }) => {
13
+ const { t } = useTranslation("ui");
14
+ return /* @__PURE__ */ jsx("div", {
15
+ className: clsx("flex w-full flex-fill flex-col items-start"),
16
+ children: /* @__PURE__ */ jsxs("div", {
17
+ className: clsx("flex w-full items-center", {
18
+ "flex-row gap-file-upload-content-gap-left-to-right-content": variant === "horizontal",
19
+ "flex-col": variant === "vertical",
20
+ "gap-file-upload-content-gap-content-to-button": variant === "vertical" && as === "button",
21
+ "gap-file-upload-content-gap-text-to-text": variant === "vertical" && as === "link"
22
+ }),
23
+ children: [/* @__PURE__ */ jsxs("div", {
24
+ className: clsx("flex min-w-0 max-w-full flex-grow items-center gap-file-upload-content-gap-icon-to-content", {
25
+ "flex-col": variant === "vertical",
26
+ "flex-row": variant === "horizontal",
27
+ "opacity-50": isDisabled
28
+ }),
29
+ children: [/* @__PURE__ */ jsx(WarningFilledIcon, { className: "h-6 w-6 text-elevation-fill-warning-1" }), /* @__PURE__ */ jsxs("div", {
30
+ className: clsx("flex flex-col gap-file-upload-content-gap-text-to-text", {
31
+ "max-w-full items-center": variant === "vertical",
32
+ "max-w-[calc(100%_-_32px)]": variant === "horizontal"
33
+ }),
34
+ children: [/* @__PURE__ */ jsx(Typography, {
35
+ variant: "prominent-1",
36
+ size: "label-1",
37
+ as: "span",
38
+ className: clsx("self-stretch truncate text-text-default-1", { "text-center": variant === "vertical" }),
39
+ children: state.file.name
40
+ }), /* @__PURE__ */ jsx(Typography, {
41
+ variant: "default",
42
+ size: singleFile ? "label-2" : "label-3",
43
+ as: "span",
44
+ className: clsx("text-text-default-2", { "text-center": variant === "vertical" }),
45
+ children: state.error?.serverMessage ?? state.error?.message
46
+ })]
47
+ })]
48
+ }), /* @__PURE__ */ jsx("div", {
49
+ className: clsx("flex flex-none items-center justify-end", {
50
+ "flex-col": variant === "vertical" && as === "button",
51
+ "gap-file-upload-content-gap-text-to-text": as === "link",
52
+ "gap-file-upload-content-gap-content-to-button": as === "button"
53
+ }),
54
+ children: as === "link" ? /* @__PURE__ */ jsxs(Fragment, { children: [fileTriggerProps && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(FileTrigger, {
55
+ ...fileTriggerProps,
56
+ children: /* @__PURE__ */ jsx(TextButton, {
57
+ className: "text-interactive-text-primary-idle",
58
+ children: browseText ?? ""
59
+ })
60
+ }), /* @__PURE__ */ jsx(Typography, {
61
+ variant: "default",
62
+ size: "label-2",
63
+ as: "span",
64
+ className: "text-text-default-2",
65
+ children: t(($) => $.ui.fileUpload.or)
66
+ })] }), removeWithIcon ? /* @__PURE__ */ jsx(InlineIconButton, {
67
+ label: "Cancel",
68
+ color: "secondary",
69
+ onPress: () => {
70
+ onRemove(state.id ?? "");
71
+ },
72
+ icon: CloseIcon
73
+ }) : /* @__PURE__ */ jsx(TextButton, {
74
+ className: "text-interactive-text-primary-idle lowercase",
75
+ onPress: () => {
76
+ onRemove(state.id ?? "");
77
+ },
78
+ children: t(($) => $.ui.fileUpload.removeFile)
79
+ })] }) : /* @__PURE__ */ jsxs("div", {
80
+ className: "flex items-center justify-center gap-file-upload-content-gap-button-to-button self-stretch",
81
+ children: [fileTriggerProps && /* @__PURE__ */ jsx(FileTrigger, {
82
+ ...fileTriggerProps,
83
+ children: /* @__PURE__ */ jsx(Button$1, {
84
+ variant: "outlined",
85
+ size: "xs",
86
+ width: "hug",
87
+ isDisabled,
88
+ children: browseText ?? ""
89
+ })
90
+ }), removeWithIcon ? /* @__PURE__ */ jsx(InlineIconButton, {
91
+ label: "Cancel",
92
+ color: "secondary",
93
+ onPress: () => {
94
+ onRemove(state.id ?? "");
95
+ },
96
+ icon: CloseIcon
97
+ }) : /* @__PURE__ */ jsx(TextButton, {
98
+ color: "secondary",
99
+ onPress: () => {
100
+ onRemove(state.id ?? "");
101
+ },
102
+ children: t(($) => $.ui.fileUpload.removeFile)
103
+ })]
104
+ })
105
+ })]
106
+ })
107
+ });
108
+ };
109
+ export { FileUploadContentError };
@@ -0,0 +1,112 @@
1
+ import { CloseIcon } from "./Close.js";
2
+ import { Typography } from "./Typography.js";
3
+ import { Button as Button$1 } from "./Button.js";
4
+ import { InlineIconButton } from "./InlineIconButton.js";
5
+ import { TextButton } from "./TextButton.js";
6
+ import { ns } from "./i18n.js";
7
+ import { FileUtils } from "./file.utils.js";
8
+ import { CheckCircleIcon } from "./CheckCircle.js";
9
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
10
+ import { clsx } from "clsx";
11
+ import { FileTrigger } from "react-aria-components";
12
+ import { useTranslation } from "react-i18next";
13
+ const FileUploadContentFilled = ({ variant, as, isDisabled, state, browseText, fileTriggerProps, removeWithIcon = false, singleFile, onRemove }) => {
14
+ const { t } = useTranslation("ui");
15
+ return /* @__PURE__ */ jsx("div", {
16
+ className: clsx("flex w-full flex-fill flex-col items-start"),
17
+ children: /* @__PURE__ */ jsxs("div", {
18
+ className: clsx("flex w-full items-center", {
19
+ "flex-row gap-file-upload-content-gap-left-to-right-content": variant === "horizontal",
20
+ "flex-col": variant === "vertical",
21
+ "gap-file-upload-content-gap-content-to-button": variant === "vertical" && as === "button",
22
+ "gap-file-upload-content-gap-text-to-text": variant === "vertical" && as === "link"
23
+ }),
24
+ children: [/* @__PURE__ */ jsxs("div", {
25
+ className: clsx("flex min-w-0 max-w-full grow items-center gap-file-upload-content-gap-icon-to-content", {
26
+ "flex-col": variant === "vertical",
27
+ "flex-row": variant === "horizontal",
28
+ "opacity-50": isDisabled
29
+ }),
30
+ children: [/* @__PURE__ */ jsx(CheckCircleIcon, { className: "h-6 w-6 text-text-default-1" }), /* @__PURE__ */ jsxs("div", {
31
+ className: clsx("flex flex-col gap-file-upload-content-gap-text-to-text", {
32
+ "max-w-full items-center": variant === "vertical",
33
+ "max-w-[calc(100%-32px)]": variant === "horizontal"
34
+ }),
35
+ children: [/* @__PURE__ */ jsx(Typography, {
36
+ variant: "prominent-1",
37
+ size: "label-1",
38
+ as: "span",
39
+ className: "self-stretch truncate text-center text-text-default-1",
40
+ children: state.file.name
41
+ }), /* @__PURE__ */ jsx(Typography, {
42
+ variant: "default",
43
+ size: singleFile ? "label-2" : "label-3",
44
+ as: "span",
45
+ className: "text-text-default-2",
46
+ children: FileUtils.getCalculatedFileSize(state.file)
47
+ })]
48
+ })]
49
+ }), /* @__PURE__ */ jsx("div", {
50
+ className: clsx("flex flex-none items-center justify-end", {
51
+ "flex-col": variant === "vertical" && as === "button",
52
+ "gap-file-upload-content-gap-text-to-text": as === "link" && variant === "vertical",
53
+ "gap-file-upload-content-gap-content-to-button": as === "button" && variant === "vertical",
54
+ "gap-file-upload-content-gap-button-to-button": variant === "horizontal"
55
+ }),
56
+ children: as === "link" ? /* @__PURE__ */ jsxs(Fragment, { children: [fileTriggerProps && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(FileTrigger, {
57
+ ...fileTriggerProps,
58
+ children: /* @__PURE__ */ jsx(TextButton, {
59
+ className: clsx("text-interactive-text-primary-idle", { "[&>span>span]:font-medium!": variant === "vertical" }),
60
+ children: browseText ?? ""
61
+ })
62
+ }), variant === "vertical" && /* @__PURE__ */ jsx(Typography, {
63
+ variant: "default",
64
+ size: "label-2",
65
+ as: "span",
66
+ className: "text-text-default-2",
67
+ children: t(($) => $.ui.fileUpload.or)
68
+ })] }), removeWithIcon ? /* @__PURE__ */ jsx(InlineIconButton, {
69
+ label: "Cancel",
70
+ color: "secondary",
71
+ onPress: () => {
72
+ onRemove(state.id ?? "");
73
+ },
74
+ icon: CloseIcon
75
+ }) : /* @__PURE__ */ jsx(TextButton, {
76
+ className: clsx(variant === "vertical" && "text-interactive-text-primary-idle lowercase [&>span>span]:font-medium!"),
77
+ color: variant === "horizontal" ? "secondary" : "primary",
78
+ onPress: () => {
79
+ onRemove(state.id ?? "");
80
+ },
81
+ children: t(($) => $.ui.fileUpload.removeFile)
82
+ })] }) : /* @__PURE__ */ jsxs("div", {
83
+ className: "flex items-center justify-center gap-file-upload-content-gap-button-to-button self-stretch",
84
+ children: [fileTriggerProps && /* @__PURE__ */ jsx(FileTrigger, {
85
+ ...fileTriggerProps,
86
+ children: /* @__PURE__ */ jsx(Button$1, {
87
+ variant: "outlined",
88
+ size: "xs",
89
+ width: "hug",
90
+ isDisabled,
91
+ children: browseText ?? ""
92
+ })
93
+ }), removeWithIcon ? /* @__PURE__ */ jsx(InlineIconButton, {
94
+ label: "Cancel",
95
+ color: "secondary",
96
+ onPress: () => {
97
+ onRemove(state.id ?? "");
98
+ },
99
+ icon: CloseIcon
100
+ }) : /* @__PURE__ */ jsx(TextButton, {
101
+ color: "secondary",
102
+ onPress: () => {
103
+ onRemove(state.id ?? "");
104
+ },
105
+ children: t(($) => $.ui.fileUpload.removeFile)
106
+ })]
107
+ })
108
+ })]
109
+ })
110
+ });
111
+ };
112
+ export { FileUploadContentFilled };
@@ -0,0 +1,76 @@
1
+ import { CloseIcon } from "./Close.js";
2
+ import { Typography } from "./Typography.js";
3
+ import { Button } from "./Button.js";
4
+ import { InlineIconButton } from "./InlineIconButton.js";
5
+ import { ns } from "./i18n.js";
6
+ import { FileUtils } from "./file.utils.js";
7
+ import { FileIcon } from "./File.js";
8
+ import { ProgressBar } from "./ProgressBar.js";
9
+ import { jsx, jsxs } from "react/jsx-runtime";
10
+ import { clsx } from "clsx";
11
+ import { useTranslation } from "react-i18next";
12
+ const FileUploadContentLoading = ({ index, variant, as, state, isDisabled, singleFile, onCancel }) => {
13
+ const { t } = useTranslation("ui");
14
+ return /* @__PURE__ */ jsxs("div", {
15
+ className: clsx("flex w-full flex-col items-center", {
16
+ "flex-col": variant === "vertical",
17
+ "flex-row": variant === "horizontal",
18
+ "gap-file-upload-content-gap-content-to-button": as === "button"
19
+ }),
20
+ children: [/* @__PURE__ */ jsxs("div", {
21
+ className: clsx("flex w-full items-center justify-between", {
22
+ "flex-col gap-file-upload-content-gap-text-to-progress": variant === "vertical",
23
+ "flex-row gap-file-upload-content-gap-left-to-right-content": variant === "horizontal",
24
+ "opacity-50": isDisabled
25
+ }),
26
+ children: [/* @__PURE__ */ jsxs("div", {
27
+ className: clsx("flex items-center gap-file-upload-content-gap-icon-to-content", {
28
+ "w-full flex-col": variant === "vertical",
29
+ "w-1/2": variant === "horizontal"
30
+ }),
31
+ children: [/* @__PURE__ */ jsx(FileIcon, { className: "h-6 w-6 text-text-default-1" }), /* @__PURE__ */ jsxs("div", {
32
+ className: clsx("flex flex-col", {
33
+ "max-w-full gap-file-upload-content-gap-icon-to-content text-center": variant === "vertical",
34
+ "max-w-[calc(100%-32px)] gap-file-upload-content-gap-text-to-text": variant === "horizontal"
35
+ }),
36
+ children: [/* @__PURE__ */ jsx(Typography, {
37
+ variant: "prominent-1",
38
+ size: "label-1",
39
+ as: "span",
40
+ className: "self-stretch truncate text-center text-text-default-1",
41
+ children: state.file.name
42
+ }), /* @__PURE__ */ jsx(Typography, {
43
+ variant: "default",
44
+ size: singleFile ? "label-2" : "label-3",
45
+ as: "span",
46
+ className: "text-text-default-2",
47
+ children: FileUtils.getCalculatedFileSize(state.file)
48
+ })]
49
+ })]
50
+ }), /* @__PURE__ */ jsxs("div", {
51
+ className: clsx("flex items-center gap-1", {
52
+ "w-1/2": variant === "horizontal",
53
+ "w-full": variant === "vertical"
54
+ }),
55
+ children: [/* @__PURE__ */ jsx(ProgressBar, { progress: state.progress }), (as === "link" || variant === "horizontal") && /* @__PURE__ */ jsx(InlineIconButton, {
56
+ label: "Cancel",
57
+ color: "secondary",
58
+ onPress: () => {
59
+ onCancel(index);
60
+ },
61
+ icon: CloseIcon
62
+ })]
63
+ })]
64
+ }), as === "button" && variant === "vertical" && /* @__PURE__ */ jsx(Button, {
65
+ variant: "outlined",
66
+ size: "xs",
67
+ color: "secondary",
68
+ width: "hug",
69
+ onPress: () => {
70
+ onCancel(index);
71
+ },
72
+ children: t(($) => $.ui.fileUpload.cancel)
73
+ })]
74
+ });
75
+ };
76
+ export { FileUploadContentLoading };
package/dist/Form.js ADDED
@@ -0,0 +1,42 @@
1
+ import { InputItem } from "./InputItem.js";
2
+ import { StringUtils } from "./string.utils.js";
3
+ import { ZodUtils } from "./zod.utils.js";
4
+ import { getDefaultInputComponentType } from "./dynamicInputs.js";
5
+ import { jsx } from "react/jsx-runtime";
6
+ import { useMemo } from "react";
7
+ import { z } from "zod";
8
+ var createFieldComponent = (field, schemaKeyType, form) => {
9
+ return function FieldComponent({ inputType, label, placeholder,...inputProps }) {
10
+ return /* @__PURE__ */ jsx(InputItem, {
11
+ form,
12
+ inputDef: {
13
+ name: field,
14
+ type: inputType ?? getDefaultInputComponentType(schemaKeyType),
15
+ label,
16
+ placeholder,
17
+ props: {
18
+ ...ZodUtils.unwrapZodType(schemaKeyType) instanceof z.ZodArray ? { selectionMode: "multiple" } : {},
19
+ ...inputProps
20
+ }
21
+ }
22
+ });
23
+ };
24
+ };
25
+ function Form({ form, schema, onSubmit, onError, className, children }) {
26
+ const components = useMemo(() => {
27
+ const fieldComponents = {};
28
+ const fields = Object.keys(schema.shape);
29
+ for (const field of fields) {
30
+ const componentName = StringUtils.capitalize(String(field));
31
+ const schemaKeyType = schema.shape[field];
32
+ fieldComponents[componentName] = createFieldComponent(field, schemaKeyType, form);
33
+ }
34
+ return fieldComponents;
35
+ }, [schema.shape, form]);
36
+ return /* @__PURE__ */ jsx("form", {
37
+ onSubmit: form.handleSubmit(onSubmit, onError),
38
+ className,
39
+ children: children(components)
40
+ });
41
+ }
42
+ export { Form };
@@ -0,0 +1,35 @@
1
+ import { FormFieldError } from "./FormFieldError.js";
2
+ import { FormFieldHeader } from "./FormFieldHeader.js";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ const FormField = ({ ref, as, label, tooltipText, helperText, isRequired, rightContent, isDisabled, error, hideLabel, headerClassName, errorClassName, children, className, labelProps, isHeaderHidden, tabIndex, onMouseEnter, onFocusCapture }) => {
5
+ const headerProps = {
6
+ label,
7
+ tooltipText,
8
+ helperText,
9
+ isRequired,
10
+ rightContent,
11
+ isHeaderHidden: hideLabel || isHeaderHidden,
12
+ isDisabled,
13
+ className: headerClassName,
14
+ labelProps
15
+ };
16
+ const errorProps = {
17
+ error,
18
+ isDisabled,
19
+ isHidden: isHeaderHidden,
20
+ className: errorClassName
21
+ };
22
+ return /* @__PURE__ */ jsxs("div", {
23
+ ref,
24
+ className,
25
+ tabIndex,
26
+ onMouseEnter,
27
+ onFocusCapture,
28
+ children: [
29
+ !["filter", "floating"].includes(as ?? "") && /* @__PURE__ */ jsx(FormFieldHeader, { ...headerProps }),
30
+ children,
31
+ /* @__PURE__ */ jsx(FormFieldError, { ...errorProps })
32
+ ]
33
+ });
34
+ };
35
+ export { FormField };
@@ -0,0 +1,11 @@
1
+ import { Typography } from "./Typography.js";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { clsx } from "clsx";
4
+ const FormFieldError = ({ error, isDisabled, isHidden, className }) => {
5
+ return /* @__PURE__ */ jsx(Typography, {
6
+ className: clsx("text-text-error-1", !error || isDisabled || isHidden ? "sr-only" : "mt-1-5", className),
7
+ size: "label-3",
8
+ children: error
9
+ });
10
+ };
11
+ export { FormFieldError };
@@ -0,0 +1,36 @@
1
+ import { InfoIcon } from "./Info.js";
2
+ import { Typography } from "./Typography.js";
3
+ import { Tooltip as Tooltip$1 } from "./Tooltip.js";
4
+ import { FormFieldLabel } from "./FormFieldLabel.js";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ import { clsx } from "clsx";
7
+ import { Focusable } from "react-aria-components";
8
+ const FormFieldHeader = ({ label, tooltipText, helperText, isRequired, rightContent, isHeaderHidden, isDisabled, className, labelProps }) => {
9
+ return /* @__PURE__ */ jsxs("div", {
10
+ className: clsx(isHeaderHidden ? "sr-only" : "mb-1", className),
11
+ children: [/* @__PURE__ */ jsxs("div", {
12
+ className: "flex items-start justify-between",
13
+ children: [/* @__PURE__ */ jsxs("div", {
14
+ className: "flex items-start gap-1",
15
+ children: [/* @__PURE__ */ jsx(FormFieldLabel, {
16
+ label,
17
+ isRequired,
18
+ isDisabled,
19
+ labelProps
20
+ }), tooltipText && /* @__PURE__ */ jsx(Tooltip$1, {
21
+ text: tooltipText,
22
+ children: /* @__PURE__ */ jsx(Focusable, { children: /* @__PURE__ */ jsx(InfoIcon, {
23
+ className: clsx("size-6", isDisabled ? "text-interactive-text-secondary-disabled" : "text-interactive-text-secondary-idle hover:text-interactive-text-secondary-hover"),
24
+ tabIndex: 0
25
+ }) })
26
+ })]
27
+ }), rightContent]
28
+ }), helperText && /* @__PURE__ */ jsx(Typography, {
29
+ slot: "description",
30
+ size: "label-2",
31
+ className: "text-text-default-2",
32
+ children: helperText
33
+ })]
34
+ });
35
+ };
36
+ export { FormFieldHeader };
@@ -0,0 +1,15 @@
1
+ import { CloseIcon } from "./Close.js";
2
+ import { ns } from "./i18n.js";
3
+ import { jsx } from "react/jsx-runtime";
4
+ import { Button } from "react-aria-components";
5
+ import { useTranslation } from "react-i18next";
6
+ const FormFieldHeaderClose = ({ onClose }) => {
7
+ const { t } = useTranslation("ui");
8
+ return /* @__PURE__ */ jsx(Button, {
9
+ onPress: onClose,
10
+ "aria-label": t(($) => $.ui.closeAlt),
11
+ className: "shrink-0 focus-visible:outline-interactive-text-secondary-focus",
12
+ children: /* @__PURE__ */ jsx(CloseIcon, { className: "size-6 text-interactive-text-secondary-idle" })
13
+ });
14
+ };
15
+ export { FormFieldHeaderClose };
@@ -0,0 +1,32 @@
1
+ import { UIStyle } from "./uiStyle.context.js";
2
+ import { Typography } from "./Typography.js";
3
+ import { inputSide } from "./input.cva.js";
4
+ import { labelBase, labelTypography } from "./label.cva.js";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ import { clsx } from "clsx";
7
+ import { Label } from "react-aria-components";
8
+ const FormFieldLabel = ({ ref, as, label, isRequired, isDisabled, labelProps, size }) => {
9
+ const uiStyle = UIStyle.useConfig();
10
+ const labelTypographyMap = uiStyle?.label?.typography ?? labelTypography;
11
+ const labelBaseCva = uiStyle?.label?.cva ?? labelBase;
12
+ const inputSideCva = uiStyle?.input?.sideCva ?? inputSide;
13
+ return /* @__PURE__ */ jsx(Label, {
14
+ ...labelProps,
15
+ children: /* @__PURE__ */ jsxs(Typography, {
16
+ ref,
17
+ as: "span",
18
+ size: "label-2",
19
+ variant: "prominent-1",
20
+ ...labelTypographyMap({ as }),
21
+ className: clsx(labelBaseCva({ as }), as && ["filter", "floating"].includes(as) && inputSideCva({
22
+ size,
23
+ type: "left"
24
+ }), labelProps?.className),
25
+ children: [label, isRequired && /* @__PURE__ */ jsx("span", {
26
+ className: clsx(!isDisabled && "text-text-error-1"),
27
+ children: "*"
28
+ })]
29
+ })
30
+ });
31
+ };
32
+ export { FormFieldLabel };
@@ -0,0 +1,10 @@
1
+ import { Typography } from "./Typography.js";
2
+ import { jsx } from "react/jsx-runtime";
3
+ const HeaderText = ({ children }) => /* @__PURE__ */ jsx(Typography, {
4
+ variant: "default",
5
+ size: "label-1",
6
+ as: "span",
7
+ className: "overflow-hidden text-ellipsis px-table-cell-content-side-m py-table-cell-content-height-m text-text-default-1",
8
+ children
9
+ });
10
+ export { HeaderText };
@@ -0,0 +1,13 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ const HighlightIcon = (props) => /* @__PURE__ */ jsx("svg", {
3
+ xmlns: "http://www.w3.org/2000/svg",
4
+ fill: "none",
5
+ viewBox: "0 0 24 24",
6
+ className: "fill-current",
7
+ ...props,
8
+ children: /* @__PURE__ */ jsx("path", {
9
+ fill: "currentColor",
10
+ d: "m14.302 12.145-2.6-2.6-3.942 3.942a.29.29 0 0 0-.087.211q0 .125.087.212l2.161 2.177a.29.29 0 0 0 .212.086.29.29 0 0 0 .211-.086zm-1.53-3.654 2.584 2.584 4.27-4.254a.3.3 0 0 0 .086-.22.3.3 0 0 0-.087-.222l-2.158-2.158a.3.3 0 0 0-.22-.086.3.3 0 0 0-.222.086zm-1.582-.543 4.708 4.708-4.484 4.5q-.543.542-1.274.542-.73 0-1.273-.542l-.096-.096-.404.388q-.246.216-.556.34a1.7 1.7 0 0 1-.642.126H5.071q-.31 0-.43-.276-.117-.276.103-.497l2.07-2.054-.077-.077a1.82 1.82 0 0 1-.558-1.288q-.016-.747.527-1.289zm0 0 4.79-4.79q.543-.542 1.274-.542.73 0 1.273.542l2.177 2.161q.542.543.542 1.273 0 .732-.542 1.273l-4.806 4.791z"
11
+ })
12
+ });
13
+ export { HighlightIcon };
@@ -0,0 +1,19 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ const HighlightOnIcon = ({ highlightColor,...props }) => /* @__PURE__ */ jsx("svg", {
3
+ xmlns: "http://www.w3.org/2000/svg",
4
+ fill: "none",
5
+ viewBox: "0 0 24 24",
6
+ className: "fill-current",
7
+ ...props,
8
+ children: /* @__PURE__ */ jsxs("g", {
9
+ fill: "currentColor",
10
+ children: [/* @__PURE__ */ jsx("path", {
11
+ d: "M14.3021 12.1445L11.7021 9.54447L7.75955 13.4867C7.70188 13.5444 7.67305 13.6149 7.67305 13.6982C7.67305 13.7816 7.70188 13.8521 7.75955 13.91L9.92105 16.0867C9.97888 16.1444 10.0495 16.1732 10.1328 16.1732C10.2161 16.1732 10.2866 16.1444 10.3443 16.0867L14.3021 12.1445ZM12.7711 8.49072L15.3558 11.0752L19.6251 6.82147C19.6827 6.76381 19.7116 6.69006 19.7116 6.60022C19.7116 6.51039 19.6827 6.43664 19.6251 6.37897L17.4673 4.22147C17.4096 4.16381 17.336 4.13497 17.2463 4.13497C17.1565 4.13497 17.0827 4.16381 17.0251 4.22147L12.7711 8.49072ZM11.1903 7.94847L15.8981 12.656L11.4136 17.156C11.0519 17.5175 10.6275 17.6982 10.1403 17.6982C9.65313 17.6982 9.2288 17.5175 8.8673 17.156L8.77105 17.0597L8.3673 17.4482C8.20313 17.5919 8.01755 17.7054 7.81055 17.7887C7.60355 17.8721 7.3898 17.9137 7.1693 17.9137H5.0713C4.86363 17.9137 4.72038 17.8217 4.64155 17.6377C4.56255 17.4537 4.5968 17.2881 4.7443 17.1407L6.81355 15.0867L6.73655 15.01C6.37505 14.6483 6.18913 14.2188 6.1788 13.7215C6.16863 13.224 6.3443 12.7945 6.7058 12.433L11.1903 7.94847ZM11.1903 7.94847L15.9808 3.15797C16.3423 2.79647 16.7666 2.61572 17.2538 2.61572C17.741 2.61572 18.1654 2.79647 18.5271 3.15797L20.7038 5.31947C21.0653 5.68097 21.2461 6.10531 21.2461 6.59247C21.2461 7.07964 21.0653 7.50397 20.7038 7.86547L15.8981 12.656L11.1903 7.94847Z",
12
+ fill: "currentColor"
13
+ }), /* @__PURE__ */ jsx("path", {
14
+ d: "M2.84872 23.741C3.02105 23.9135 3.23613 23.9998 3.49397 23.9998H20.686C20.9438 23.9998 21.1589 23.9135 21.3312 23.741C21.5037 23.5687 21.59 23.3537 21.59 23.096V21.1728C21.59 20.9151 21.5037 20.7001 21.3312 20.5278C21.1589 20.3553 20.9438 20.269 20.686 20.269H3.49397C3.23613 20.269 3.02105 20.3553 2.84872 20.5278C2.67622 20.7001 2.58997 20.9151 2.58997 21.1728V23.096C2.58997 23.3537 2.67622 23.5687 2.84872 23.741Z",
15
+ fill: highlightColor || "black"
16
+ })]
17
+ })
18
+ });
19
+ export { HighlightOnIcon };
@@ -0,0 +1,70 @@
1
+ import { LinkIcon } from "./Link.js";
2
+ import { Button } from "./Button.js";
3
+ import { InlineIconButton } from "./InlineIconButton.js";
4
+ import { ns } from "./i18n.js";
5
+ import { TextInput } from "./TextInput.js";
6
+ import { ResponsivePopover } from "./ResponsivePopover.js";
7
+ import { jsx, jsxs } from "react/jsx-runtime";
8
+ import { clsx } from "clsx";
9
+ import { useEffect, useState } from "react";
10
+ import { useTranslation } from "react-i18next";
11
+ const HyperlinkAction = ({ editor }) => {
12
+ const { t } = useTranslation("ui");
13
+ const [isOpen, setIsOpen] = useState(false);
14
+ const [url, setUrl] = useState("");
15
+ const isLinkEnabled = !!editor.extensionManager.extensions.find((extension) => extension.name === "link");
16
+ const linkHref = editor.getAttributes("link")?.href;
17
+ useEffect(() => {
18
+ setUrl(linkHref || "");
19
+ }, [linkHref]);
20
+ if (!isLinkEnabled) return null;
21
+ const onRemove = () => {
22
+ editor.chain().focus().extendMarkRange("link").unsetLink().run();
23
+ setIsOpen(false);
24
+ };
25
+ const onApply = () => {
26
+ editor.chain().focus().extendMarkRange("link").setLink({ href: url }).run();
27
+ setIsOpen(false);
28
+ };
29
+ return /* @__PURE__ */ jsxs(ResponsivePopover, {
30
+ isOpen,
31
+ onOpenChange: setIsOpen,
32
+ sheetLabel: t(($) => $.ui.textEditor.link.label),
33
+ trigger: /* @__PURE__ */ jsx(InlineIconButton, {
34
+ color: "secondary",
35
+ label: t(($) => $.ui.textEditor.link.label),
36
+ icon: LinkIcon,
37
+ className: clsx(editor.isActive("link") && "!text-interactive-text-primary-idle"),
38
+ isDisabled: !editor.isEditable
39
+ }),
40
+ children: [/* @__PURE__ */ jsx(TextInput, {
41
+ variant: "outlined",
42
+ hideLabel: true,
43
+ label: t(($) => $.ui.textEditor.link.urlLabel),
44
+ placeholder: t(($) => $.ui.textEditor.link.urlPlaceholder),
45
+ value: url,
46
+ onChange: setUrl,
47
+ className: "mb-4"
48
+ }), /* @__PURE__ */ jsxs("div", {
49
+ className: "flex justify-between",
50
+ children: [/* @__PURE__ */ jsx(Button, {
51
+ variant: "contained",
52
+ color: "secondary",
53
+ size: "xs",
54
+ width: "hug",
55
+ onPress: onApply,
56
+ isDisabled: !url,
57
+ children: t(($) => $.ui.textEditor.link.apply)
58
+ }), /* @__PURE__ */ jsx(Button, {
59
+ variant: "outlined",
60
+ color: "secondary",
61
+ size: "xs",
62
+ width: "hug",
63
+ onPress: onRemove,
64
+ isDisabled: !editor.isActive("link"),
65
+ children: t(($) => $.ui.textEditor.link.remove)
66
+ })]
67
+ })]
68
+ });
69
+ };
70
+ export { HyperlinkAction };
@@ -0,0 +1,12 @@
1
+ import { Button } from "./Button.js";
2
+ import { jsx } from "react/jsx-runtime";
3
+ const IconButton = ({ label,...props }) => {
4
+ return /* @__PURE__ */ jsx(Button, {
5
+ ...props,
6
+ iconOnly: true,
7
+ width: "hug",
8
+ disableTooltip: props.disableTooltip,
9
+ children: label
10
+ });
11
+ };
12
+ export { IconButton };
@@ -0,0 +1,31 @@
1
+ import { Loader } from "./Loader.js";
2
+ import { useIntersectionObserver } from "./useIntersectionObserver.js";
3
+ import { Table } from "./Table.js";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ import { useCallback } from "react";
6
+ const InfiniteTable = ({ hasNextPage, isFetchingNextPage = false, fetchNextPage,...rest }) => {
7
+ const { setRef } = useIntersectionObserver({
8
+ onIntersection: useCallback(() => {
9
+ if (!isFetchingNextPage && hasNextPage) fetchNextPage();
10
+ }, [
11
+ isFetchingNextPage,
12
+ hasNextPage,
13
+ fetchNextPage
14
+ ]),
15
+ rootMargin: "100px"
16
+ });
17
+ return /* @__PURE__ */ jsxs("div", {
18
+ className: "flex flex-col",
19
+ children: [/* @__PURE__ */ jsx(Table, { ...rest }), (hasNextPage || isFetchingNextPage) && /* @__PURE__ */ jsx("div", {
20
+ ref: (ref) => {
21
+ setRef(ref);
22
+ return () => {
23
+ setRef(null);
24
+ };
25
+ },
26
+ className: "flex justify-center py-4",
27
+ children: /* @__PURE__ */ jsx(Loader, {})
28
+ })]
29
+ });
30
+ };
31
+ export { InfiniteTable };
package/dist/Info.js ADDED
@@ -0,0 +1,18 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ const InfoIcon = (props) => /* @__PURE__ */ jsxs("svg", {
3
+ xmlns: "http://www.w3.org/2000/svg",
4
+ fill: "none",
5
+ viewBox: "0 0 24 24",
6
+ className: "fill-current",
7
+ ...props,
8
+ children: [/* @__PURE__ */ jsx("path", {
9
+ fill: "currentColor",
10
+ d: "M12 7.8a1 1 0 0 1 1 1V12a1 1 0 1 1-2 0V8.8a1 1 0 0 1 1-1M12 14.2a1 1 0 1 0 0 2h.008a1 1 0 1 0 0-2z"
11
+ }), /* @__PURE__ */ jsx("path", {
12
+ fill: "currentColor",
13
+ fillRule: "evenodd",
14
+ d: "M3 12a9 9 0 1 1 18 0 9 9 0 0 1-18 0m9-7a7 7 0 1 0 0 14 7 7 0 0 0 0-14",
15
+ clipRule: "evenodd"
16
+ })]
17
+ });
18
+ export { InfoIcon };