@povio/ui 3.1.0 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (301) hide show
  1. package/dist/assets/icons/AlignCenter.js +26 -11
  2. package/dist/assets/icons/AlignLeft.js +26 -11
  3. package/dist/assets/icons/AlignLeftRight.js +26 -11
  4. package/dist/assets/icons/AlignRight.js +26 -11
  5. package/dist/assets/icons/ArrowDropDown.js +26 -11
  6. package/dist/assets/icons/ArrowDropUp.js +26 -11
  7. package/dist/assets/icons/ArrowLeft.js +26 -11
  8. package/dist/assets/icons/ArrowRight.js +26 -11
  9. package/dist/assets/icons/Bold.js +26 -11
  10. package/dist/assets/icons/BulletedList.js +26 -11
  11. package/dist/assets/icons/Calendar.js +28 -13
  12. package/dist/assets/icons/Check.js +28 -13
  13. package/dist/assets/icons/CheckCircle.js +26 -11
  14. package/dist/assets/icons/CheckboxCheckmark.js +29 -14
  15. package/dist/assets/icons/CheckboxIndeterminate.js +29 -14
  16. package/dist/assets/icons/ChevronDown.js +28 -13
  17. package/dist/assets/icons/ChevronLeft.js +28 -13
  18. package/dist/assets/icons/ChevronRight.js +28 -13
  19. package/dist/assets/icons/ChevronUp.js +28 -13
  20. package/dist/assets/icons/ChevronsLeft.js +28 -13
  21. package/dist/assets/icons/ChevronsRight.js +28 -13
  22. package/dist/assets/icons/Clock.js +26 -11
  23. package/dist/assets/icons/Close.js +26 -11
  24. package/dist/assets/icons/DateTime.js +35 -14
  25. package/dist/assets/icons/DragIndicator.js +26 -11
  26. package/dist/assets/icons/File.js +28 -13
  27. package/dist/assets/icons/Highlight.js +26 -11
  28. package/dist/assets/icons/HighlightOn.js +49 -15
  29. package/dist/assets/icons/Home.js +26 -11
  30. package/dist/assets/icons/Info.js +37 -16
  31. package/dist/assets/icons/Italic.js +26 -11
  32. package/dist/assets/icons/Link.js +26 -11
  33. package/dist/assets/icons/Menu.js +26 -11
  34. package/dist/assets/icons/NumberedList.js +26 -11
  35. package/dist/assets/icons/PointerHorizontal.js +26 -11
  36. package/dist/assets/icons/PointerVertical.js +26 -11
  37. package/dist/assets/icons/Search.js +26 -11
  38. package/dist/assets/icons/Send.js +28 -13
  39. package/dist/assets/icons/Strikethrough.js +26 -11
  40. package/dist/assets/icons/TextColor.js +48 -14
  41. package/dist/assets/icons/Today.js +26 -11
  42. package/dist/assets/icons/Underlined.js +28 -13
  43. package/dist/assets/icons/Upload.js +35 -14
  44. package/dist/assets/icons/Visibility.js +26 -11
  45. package/dist/assets/icons/VisibilityOff.js +26 -11
  46. package/dist/assets/icons/WarningFilled.js +28 -13
  47. package/dist/components/Breadcrumbs/Breadcrumbs.js +207 -56
  48. package/dist/components/Menu/Menu.js +18 -2
  49. package/dist/components/Menu/MenuDesktop.js +41 -7
  50. package/dist/components/Menu/MenuItem.js +32 -9
  51. package/dist/components/Menu/MenuMobile.js +102 -39
  52. package/dist/components/Menu/MenuPopover.js +105 -29
  53. package/dist/components/buttons/Button/button.cva.d.ts +3 -3
  54. package/dist/components/buttons/IconButton/IconButton.js +40 -8
  55. package/dist/components/buttons/InlineIconButton/InlineIconButton.d.ts +2 -1
  56. package/dist/components/buttons/InlineIconButton/InlineIconButton.js +34 -9
  57. package/dist/components/buttons/PillButton/PillButton.js +55 -17
  58. package/dist/components/buttons/PillButton/pillButton.cva.d.ts +1 -1
  59. package/dist/components/buttons/SplitButton/SplitButton.js +103 -18
  60. package/dist/components/buttons/TextButton/TextButton.js +30 -8
  61. package/dist/components/buttons/ToggleButton/ToggleButton.js +28 -8
  62. package/dist/components/buttons/shared/ButtonContent.js +80 -22
  63. package/dist/components/inputs/Checkbox/Checkbox.d.ts +1 -0
  64. package/dist/components/inputs/Checkbox/Checkbox.js +201 -35
  65. package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +24 -10
  66. package/dist/components/inputs/Checkbox/checkbox.cva.d.ts +3 -0
  67. package/dist/components/inputs/Checkbox/checkbox.cva.js +2 -1
  68. package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +12 -5
  69. package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +380 -75
  70. package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +12 -5
  71. package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +499 -186
  72. package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +14 -5
  73. package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +280 -46
  74. package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +7 -3
  75. package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +616 -121
  76. package/dist/components/inputs/DateTime/shared/Calendar.d.ts +5 -2
  77. package/dist/components/inputs/DateTime/shared/Calendar.js +342 -119
  78. package/dist/components/inputs/DateTime/shared/CalendarCell.d.ts +4 -2
  79. package/dist/components/inputs/DateTime/shared/CalendarCell.js +310 -103
  80. package/dist/components/inputs/DateTime/shared/CalendarGrid.d.ts +4 -2
  81. package/dist/components/inputs/DateTime/shared/CalendarGrid.js +150 -33
  82. package/dist/components/inputs/DateTime/shared/CalendarHeader.js +233 -98
  83. package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +318 -137
  84. package/dist/components/inputs/DateTime/shared/DateField.d.ts +2 -1
  85. package/dist/components/inputs/DateTime/shared/DateField.js +288 -112
  86. package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +14 -3
  87. package/dist/components/inputs/DateTime/shared/DatePickerInput.js +359 -129
  88. package/dist/components/inputs/DateTime/shared/DateSegmentItem.d.ts +18 -1
  89. package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +104 -11
  90. package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +83 -28
  91. package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +59 -10
  92. package/dist/components/inputs/DateTime/shared/MonthPicker.js +103 -58
  93. package/dist/components/inputs/DateTime/shared/RangeCalendar.js +193 -82
  94. package/dist/components/inputs/DateTime/shared/TimeField.js +27 -8
  95. package/dist/components/inputs/DateTime/shared/TimePickerForm.js +279 -110
  96. package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +4 -1
  97. package/dist/components/inputs/DateTime/shared/TimePickerInput.js +211 -65
  98. package/dist/components/inputs/DateTime/shared/YearPicker.js +119 -68
  99. package/dist/components/inputs/DateTime/shared/datePicker.types.d.ts +5 -0
  100. package/dist/components/inputs/DateTime/shared/datePickerInput.cva.d.ts +16 -0
  101. package/dist/components/inputs/DateTime/shared/datePickerInput.cva.js +16 -0
  102. package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.d.ts +15 -0
  103. package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.js +32 -0
  104. package/dist/components/inputs/DateTime/shared/dateSegment.utils.d.ts +2 -0
  105. package/dist/components/inputs/DateTime/shared/dateSegment.utils.spec.d.ts +1 -0
  106. package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.d.ts +41 -0
  107. package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.js +99 -0
  108. package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.spec.d.ts +1 -0
  109. package/dist/components/inputs/File/FileUpload.js +91 -46
  110. package/dist/components/inputs/File/FileUploadContainer.js +15 -7
  111. package/dist/components/inputs/File/InputUpload.js +317 -79
  112. package/dist/components/inputs/File/index.d.ts +1 -1
  113. package/dist/components/inputs/File/shared/FileCard.js +104 -41
  114. package/dist/components/inputs/File/shared/FileCardList.js +47 -12
  115. package/dist/components/inputs/File/shared/FileUploadContent.js +175 -44
  116. package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +149 -46
  117. package/dist/components/inputs/File/shared/FileUploadContentError.js +234 -93
  118. package/dist/components/inputs/File/shared/FileUploadContentFilled.js +230 -97
  119. package/dist/components/inputs/File/shared/FileUploadContentLoading.js +199 -55
  120. package/dist/components/inputs/File/shared/InputUploadContent.js +148 -34
  121. package/dist/components/inputs/File/shared/InputUploadFilled.js +49 -8
  122. package/dist/components/inputs/File/shared/ProgressBar.js +102 -15
  123. package/dist/components/inputs/File/shared/fileUpload.cva.d.ts +0 -11
  124. package/dist/components/inputs/File/shared/fileUpload.cva.js +1 -18
  125. package/dist/components/inputs/FormField/FormField.d.ts +3 -3
  126. package/dist/components/inputs/FormField/FormField.js +119 -37
  127. package/dist/components/inputs/FormField/FormFieldError.js +25 -5
  128. package/dist/components/inputs/FormField/FormFieldHeader.d.ts +2 -2
  129. package/dist/components/inputs/FormField/FormFieldHeader.js +81 -22
  130. package/dist/components/inputs/FormField/FormFieldHeaderClose.js +31 -7
  131. package/dist/components/inputs/FormField/FormFieldHelper.js +26 -6
  132. package/dist/components/inputs/FormField/FormFieldLabel.d.ts +2 -2
  133. package/dist/components/inputs/FormField/FormFieldLabel.js +40 -9
  134. package/dist/components/inputs/FormField/formFieldHeader.cva.d.ts +13 -0
  135. package/dist/components/inputs/FormField/formFieldHeader.cva.js +14 -0
  136. package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +5 -2
  137. package/dist/components/inputs/Input/NumberInput/NumberInput.js +446 -97
  138. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.d.ts +45 -0
  139. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +571 -0
  140. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +35 -0
  141. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +574 -0
  142. package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +48 -9
  143. package/dist/components/inputs/Input/TextArea/TextArea.cva.d.ts +8 -0
  144. package/dist/components/inputs/Input/TextArea/TextArea.cva.js +5 -0
  145. package/dist/components/inputs/Input/TextArea/TextArea.js +305 -90
  146. package/dist/components/inputs/Input/TextInput/TextInput.d.ts +3 -1
  147. package/dist/components/inputs/Input/TextInput/TextInput.js +429 -90
  148. package/dist/components/inputs/Input/shared/InputContent.js +193 -59
  149. package/dist/components/inputs/Input/shared/numberStatic.utils.d.ts +1 -0
  150. package/dist/components/inputs/Input/shared/numberStatic.utils.js +7 -0
  151. package/dist/components/inputs/Inputs/Form.js +40 -11
  152. package/dist/components/inputs/Inputs/InputItem.d.ts +15 -21
  153. package/dist/components/inputs/Inputs/InputItem.js +69 -14
  154. package/dist/components/inputs/Inputs/Inputs.js +37 -11
  155. package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +3 -1
  156. package/dist/components/inputs/RadioGroup/RadioGroup.js +353 -61
  157. package/dist/components/inputs/RadioGroup/radio.cva.d.ts +45 -0
  158. package/dist/components/inputs/RadioGroup/radio.cva.js +48 -1
  159. package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +6 -2
  160. package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +217 -22
  161. package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +3 -18
  162. package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +107 -8
  163. package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +37 -0
  164. package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +14 -0
  165. package/dist/components/inputs/Selection/Select/QuerySelect.js +178 -0
  166. package/dist/components/inputs/Selection/Select/Select.d.ts +7 -3
  167. package/dist/components/inputs/Selection/Select/Select.js +227 -18
  168. package/dist/components/inputs/Selection/shared/SelectBase.d.ts +8 -1
  169. package/dist/components/inputs/Selection/shared/SelectBase.js +69 -18
  170. package/dist/components/inputs/Selection/shared/SelectDesktop.d.ts +1 -1
  171. package/dist/components/inputs/Selection/shared/SelectDesktop.js +393 -138
  172. package/dist/components/inputs/Selection/shared/SelectInput.d.ts +2 -2
  173. package/dist/components/inputs/Selection/shared/SelectInput.js +397 -116
  174. package/dist/components/inputs/Selection/shared/SelectInputTags.js +99 -25
  175. package/dist/components/inputs/Selection/shared/SelectListBox.d.ts +2 -2
  176. package/dist/components/inputs/Selection/shared/SelectListBox.js +164 -52
  177. package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +85 -35
  178. package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +69 -16
  179. package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +70 -21
  180. package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +58 -9
  181. package/dist/components/inputs/Selection/shared/SelectMobile.d.ts +1 -1
  182. package/dist/components/inputs/Selection/shared/SelectMobile.js +9 -3
  183. package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.d.ts +9 -0
  184. package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +47 -0
  185. package/dist/components/inputs/Selection/shared/querySelect.utils.d.ts +14 -0
  186. package/dist/components/inputs/Selection/shared/querySelect.utils.js +43 -0
  187. package/dist/components/inputs/Selection/shared/select.context.d.ts +3 -2
  188. package/dist/components/inputs/Selection/shared/select.context.js +67 -36
  189. package/dist/components/inputs/Selection/shared/select.types.d.ts +3 -2
  190. package/dist/components/inputs/Selection/shared/selectDesktop.cva.d.ts +6 -0
  191. package/dist/components/inputs/Selection/shared/selectDesktop.cva.js +5 -0
  192. package/dist/components/inputs/Selection/shared/selectInput.cva.d.ts +12 -0
  193. package/dist/components/inputs/Selection/shared/selectInput.cva.js +8 -0
  194. package/dist/components/inputs/Selection/shared/staticSelect.utils.d.ts +23 -0
  195. package/dist/components/inputs/Selection/shared/staticSelect.utils.js +54 -0
  196. package/dist/components/inputs/Selection/shared/staticSelect.utils.spec.d.ts +1 -0
  197. package/dist/components/inputs/Selection/shared/useSelectItems.js +109 -49
  198. package/dist/components/inputs/Skeleton/InputFrame.d.ts +83 -0
  199. package/dist/components/inputs/Skeleton/InputFrame.js +612 -0
  200. package/dist/components/inputs/Slider/Slider.d.ts +2 -1
  201. package/dist/components/inputs/Slider/Slider.js +265 -76
  202. package/dist/components/inputs/TextEditor/TextEditor.d.ts +1 -0
  203. package/dist/components/inputs/TextEditor/TextEditor.js +447 -98
  204. package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +37 -11
  205. package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +102 -30
  206. package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +194 -45
  207. package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +88 -28
  208. package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +48 -14
  209. package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.js +66 -19
  210. package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +49 -15
  211. package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +92 -32
  212. package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +126 -54
  213. package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +141 -38
  214. package/dist/components/inputs/Toggle/Toggle.d.ts +1 -0
  215. package/dist/components/inputs/Toggle/Toggle.js +214 -37
  216. package/dist/components/inputs/Toggle/toggle.cva.d.ts +3 -0
  217. package/dist/components/inputs/Toggle/toggle.cva.js +2 -1
  218. package/dist/components/inputs/shared/CheckContent.d.ts +2 -1
  219. package/dist/components/inputs/shared/CheckContent.js +21 -11
  220. package/dist/components/inputs/shared/InputClear.d.ts +2 -1
  221. package/dist/components/inputs/shared/InputClear.js +88 -12
  222. package/dist/components/inputs/shared/TooltipWrapper.js +50 -11
  223. package/dist/components/inputs/shared/input.cva.d.ts +28 -0
  224. package/dist/components/inputs/shared/input.cva.js +38 -4
  225. package/dist/components/inputs/shared/tooltipWrapper.cva.d.ts +8 -0
  226. package/dist/components/inputs/shared/tooltipWrapper.cva.js +5 -0
  227. package/dist/components/inputs/shared/useStaticInputHandoff.d.ts +15 -0
  228. package/dist/components/inputs/shared/useStaticInputHandoff.js +112 -0
  229. package/dist/components/navigation/Accordion/Accordion.js +69 -22
  230. package/dist/components/navigation/Accordion/AccordionItem.js +86 -41
  231. package/dist/components/navigation/Stepper/Stepper.js +67 -22
  232. package/dist/components/navigation/Stepper/StepperItem.js +104 -31
  233. package/dist/components/navigation/Stepper/StepperSeparator.js +23 -5
  234. package/dist/components/overlays/ActionModal/ActionModal.js +169 -35
  235. package/dist/components/overlays/BottomSheet/BottomSheet.js +96 -23
  236. package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +48 -8
  237. package/dist/components/overlays/Drawer/Drawer.js +62 -20
  238. package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +85 -28
  239. package/dist/components/overlays/Tooltip/Tooltip.js +137 -28
  240. package/dist/components/overlays/Tooltip/TooltipEllipsis.js +37 -12
  241. package/dist/components/segment/Segment.js +218 -57
  242. package/dist/components/segment/SegmentItem.js +67 -10
  243. package/dist/components/shared/pagination/Pagination.js +108 -22
  244. package/dist/components/shared/pagination/PaginationList.js +167 -64
  245. package/dist/components/shared/pagination/minWidth.cva.d.ts +1 -1
  246. package/dist/components/status/Alert/Alert.js +97 -30
  247. package/dist/components/status/Loader/Loader.js +77 -22
  248. package/dist/components/status/Toast/Toast.js +28 -14
  249. package/dist/components/status/Toast/toast.cva.d.ts +1 -1
  250. package/dist/components/status/Toast/useToast.js +62 -57
  251. package/dist/components/table/ColumnConfig.js +158 -54
  252. package/dist/components/table/InfiniteTable.js +67 -16
  253. package/dist/components/table/PaginatedTable.js +84 -18
  254. package/dist/components/table/Table.js +28 -27
  255. package/dist/components/text/Link/Link.js +19 -7
  256. package/dist/components/text/Typography/Typography.js +23 -8
  257. package/dist/config/confirmation.context.js +1 -1
  258. package/dist/config/link.context.js +23 -9
  259. package/dist/config/router.context.js +42 -16
  260. package/dist/config/theme.context.js +98 -45
  261. package/dist/config/uiConfig.context.d.ts +20 -6
  262. package/dist/config/uiConfig.context.js +68 -14
  263. package/dist/config/uiOverrides.context.d.ts +30 -11
  264. package/dist/config/uiOverrides.context.js +54 -14
  265. package/dist/helpers/dynamicInputs.d.ts +12 -9
  266. package/dist/helpers/dynamicInputs.js +13 -8
  267. package/dist/hooks/useAutosave.d.ts +2 -1
  268. package/dist/hooks/useAutosave.js +12 -4
  269. package/dist/hooks/useAutosave.spec.d.ts +1 -0
  270. package/dist/hooks/useBreakpoint.js +16 -3
  271. package/dist/hooks/useDebounceCallback.js +51 -17
  272. package/dist/hooks/useFilters.js +125 -64
  273. package/dist/hooks/useForm.js +42 -8
  274. package/dist/hooks/useFormAutosave.d.ts +3 -1
  275. package/dist/hooks/useFormAutosave.js +122 -30
  276. package/dist/hooks/useFormAutosave.spec.d.ts +1 -0
  277. package/dist/hooks/useIntersectionObserver.d.ts +1 -1
  278. package/dist/hooks/useIntersectionObserver.js +91 -24
  279. package/dist/hooks/useKeyInteractions.d.ts +20 -0
  280. package/dist/hooks/useKeyInteractions.js +54 -0
  281. package/dist/hooks/useKeyInteractions.spec.d.ts +1 -0
  282. package/dist/hooks/useLocalStorage.js +43 -10
  283. package/dist/hooks/useLongPressRepeat.js +55 -20
  284. package/dist/hooks/usePagination.js +49 -19
  285. package/dist/hooks/useQueryAutocomplete.d.ts +14 -0
  286. package/dist/hooks/useQueryAutocomplete.js +72 -0
  287. package/dist/hooks/useScrollableListBox.js +37 -16
  288. package/dist/hooks/useSorting.js +69 -28
  289. package/dist/hooks/useStateAndRef.js +21 -7
  290. package/dist/hooks/useTableColumnConfig.js +124 -31
  291. package/dist/hooks/useTranslationMemo.js +25 -5
  292. package/dist/index.d.ts +18 -3
  293. package/dist/index.js +15 -5
  294. package/dist/tw-ui-plugin.js +6 -0
  295. package/dist/utils/date-time.utils.d.ts +38 -10
  296. package/dist/utils/date-time.utils.js +136 -22
  297. package/dist/utils/query.utils.d.ts +4 -0
  298. package/dist/utils/query.utils.js +8 -0
  299. package/dist/utils/zod.utils.d.ts +2 -0
  300. package/dist/utils/zod.utils.js +5 -0
  301. package/package.json +2 -2
@@ -4,53 +4,125 @@ import { Typography } from "../../../text/Typography/Typography.js";
4
4
  import { useInputCva } from "../../shared/input.cva.js";
5
5
  import { popoverDefinition } from "../../../shared/popover.cva.js";
6
6
  import { ColorPicker } from "./ColorPicker.js";
7
+ import { c } from "react/compiler-runtime";
7
8
  import { jsx, jsxs } from "react/jsx-runtime";
8
9
  import { clsx } from "clsx";
9
10
  import { useState } from "react";
10
11
  import { Button, Dialog, DialogTrigger, Popover } from "react-aria-components";
11
12
  //#region src/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.tsx
12
- var ColorPickerDropdown = ({ colors, value, onChange, isDisabled, children }) => {
13
+ var ColorPickerDropdown = (t0) => {
14
+ const $ = c(28);
15
+ const { colors, value, onChange, isDisabled, children } = t0;
13
16
  const inputCva = useInputCva();
14
17
  const popoverCva = UIOverrides.useCva("popover.cva", popoverDefinition);
15
18
  const [isOpen, setIsOpen] = useState(false);
16
- const handleChange = (color) => {
17
- onChange(color);
18
- setIsOpen(false);
19
- };
20
- return /* @__PURE__ */ jsxs(DialogTrigger, {
21
- isOpen,
22
- onOpenChange: setIsOpen,
23
- children: [/* @__PURE__ */ jsxs(Button, {
24
- className: inputCva({
25
- as: "inline",
26
- className: clsx("flex items-center justify-between gap-2")
27
- }),
19
+ let t1;
20
+ if ($[0] !== onChange) {
21
+ t1 = (color) => {
22
+ onChange(color);
23
+ setIsOpen(false);
24
+ };
25
+ $[0] = onChange;
26
+ $[1] = t1;
27
+ } else t1 = $[1];
28
+ const handleChange = t1;
29
+ let t2;
30
+ if ($[2] !== inputCva) {
31
+ t2 = inputCva({
32
+ as: "inline",
33
+ className: clsx("flex items-center justify-between gap-2")
34
+ });
35
+ $[2] = inputCva;
36
+ $[3] = t2;
37
+ } else t2 = $[3];
38
+ let t3;
39
+ if ($[4] !== children) {
40
+ t3 = /* @__PURE__ */ jsx(Typography, {
41
+ size: "label-1",
42
+ className: "truncate",
43
+ children
44
+ });
45
+ $[4] = children;
46
+ $[5] = t3;
47
+ } else t3 = $[5];
48
+ const t4 = isOpen && "rotate-180";
49
+ let t5;
50
+ if ($[6] !== t4) {
51
+ t5 = clsx("size-6 shrink-0", t4);
52
+ $[6] = t4;
53
+ $[7] = t5;
54
+ } else t5 = $[7];
55
+ let t6;
56
+ if ($[8] !== t5) {
57
+ t6 = /* @__PURE__ */ jsx(ArrowDropDownIcon, {
58
+ className: t5,
59
+ "aria-hidden": "true"
60
+ });
61
+ $[8] = t5;
62
+ $[9] = t6;
63
+ } else t6 = $[9];
64
+ let t7;
65
+ if ($[10] !== isDisabled || $[11] !== t2 || $[12] !== t3 || $[13] !== t6) {
66
+ t7 = /* @__PURE__ */ jsxs(Button, {
67
+ className: t2,
28
68
  isDisabled,
29
- children: [/* @__PURE__ */ jsx(Typography, {
30
- size: "label-1",
31
- className: "truncate",
32
- children
33
- }), /* @__PURE__ */ jsx(ArrowDropDownIcon, {
34
- className: clsx("size-6 shrink-0", isOpen && "rotate-180"),
35
- "aria-hidden": "true"
36
- })]
37
- }), /* @__PURE__ */ jsx(Popover, {
69
+ children: [t3, t6]
70
+ });
71
+ $[10] = isDisabled;
72
+ $[11] = t2;
73
+ $[12] = t3;
74
+ $[13] = t6;
75
+ $[14] = t7;
76
+ } else t7 = $[14];
77
+ let t8;
78
+ if ($[15] !== popoverCva) {
79
+ t8 = clsx(popoverCva({}), "flex justify-center overflow-hidden p-2");
80
+ $[15] = popoverCva;
81
+ $[16] = t8;
82
+ } else t8 = $[16];
83
+ let t9;
84
+ if ($[17] !== colors || $[18] !== handleChange || $[19] !== value) {
85
+ t9 = /* @__PURE__ */ jsx(ColorPicker, {
86
+ colors,
87
+ value,
88
+ onChange: handleChange
89
+ });
90
+ $[17] = colors;
91
+ $[18] = handleChange;
92
+ $[19] = value;
93
+ $[20] = t9;
94
+ } else t9 = $[20];
95
+ let t10;
96
+ if ($[21] !== t8 || $[22] !== t9) {
97
+ t10 = /* @__PURE__ */ jsx(Popover, {
38
98
  className: "my-4 w-40 outline-none",
39
99
  offset: 0,
40
100
  placement: "bottom start",
41
101
  children: /* @__PURE__ */ jsx(Dialog, {
42
102
  className: "outline-none",
43
103
  children: /* @__PURE__ */ jsx("div", {
44
- className: clsx(popoverCva({}), "flex justify-center overflow-hidden p-2"),
45
- children: /* @__PURE__ */ jsx(ColorPicker, {
46
- colors,
47
- value,
48
- onChange: handleChange
49
- })
104
+ className: t8,
105
+ children: t9
50
106
  })
51
107
  })
52
- })]
53
- });
108
+ });
109
+ $[21] = t8;
110
+ $[22] = t9;
111
+ $[23] = t10;
112
+ } else t10 = $[23];
113
+ let t11;
114
+ if ($[24] !== isOpen || $[25] !== t10 || $[26] !== t7) {
115
+ t11 = /* @__PURE__ */ jsxs(DialogTrigger, {
116
+ isOpen,
117
+ onOpenChange: setIsOpen,
118
+ children: [t7, t10]
119
+ });
120
+ $[24] = isOpen;
121
+ $[25] = t10;
122
+ $[26] = t7;
123
+ $[27] = t11;
124
+ } else t11 = $[27];
125
+ return t11;
54
126
  };
55
127
  //#endregion
56
128
  export { ColorPickerDropdown };
@@ -4,69 +4,218 @@ import { InlineIconButton } from "../../../buttons/InlineIconButton/InlineIconBu
4
4
  import "../../../../config/i18n.js";
5
5
  import { TextInput } from "../../Input/TextInput/TextInput.js";
6
6
  import { ResponsivePopover } from "../../../overlays/ResponsivePopover/ResponsivePopover.js";
7
+ import { c } from "react/compiler-runtime";
7
8
  import { jsx, jsxs } from "react/jsx-runtime";
8
9
  import { clsx } from "clsx";
9
10
  import { useEffect, useState } from "react";
10
11
  import { useTranslation } from "react-i18next";
11
12
  //#region src/components/inputs/TextEditor/Toolbar/HyperlinkAction.tsx
12
- var HyperlinkAction = ({ editor }) => {
13
+ var HyperlinkAction = (t0) => {
14
+ const $ = c(49);
15
+ const { editor } = t0;
13
16
  const { t } = useTranslation("ui");
14
17
  const [isOpen, setIsOpen] = useState(false);
15
18
  const [url, setUrl] = useState("");
16
- const isLinkEnabled = !!editor.extensionManager.extensions.find((extension) => extension.name === "link");
19
+ const isLinkEnabled = !!editor.extensionManager.extensions.find(_temp);
17
20
  const linkHref = editor.getAttributes("link")?.href;
18
- useEffect(() => {
19
- setUrl(linkHref || "");
20
- }, [linkHref]);
21
+ let t1;
22
+ let t2;
23
+ if ($[0] !== linkHref) {
24
+ t1 = () => {
25
+ setUrl(linkHref || "");
26
+ };
27
+ t2 = [linkHref];
28
+ $[0] = linkHref;
29
+ $[1] = t1;
30
+ $[2] = t2;
31
+ } else {
32
+ t1 = $[1];
33
+ t2 = $[2];
34
+ }
35
+ useEffect(t1, t2);
21
36
  if (!isLinkEnabled) return null;
22
- const onRemove = () => {
23
- editor.chain().focus().extendMarkRange("link").unsetLink().run();
24
- setIsOpen(false);
25
- };
26
- const onApply = () => {
27
- editor.chain().focus().extendMarkRange("link").setLink({ href: url }).run();
28
- setIsOpen(false);
29
- };
30
- return /* @__PURE__ */ jsxs(ResponsivePopover, {
31
- isOpen,
32
- onOpenChange: setIsOpen,
33
- sheetLabel: t(($) => $.ui.textEditor.link.label),
34
- trigger: /* @__PURE__ */ jsx(InlineIconButton, {
37
+ let t3;
38
+ if ($[3] !== editor) {
39
+ t3 = () => {
40
+ editor.chain().focus().extendMarkRange("link").unsetLink().run();
41
+ setIsOpen(false);
42
+ };
43
+ $[3] = editor;
44
+ $[4] = t3;
45
+ } else t3 = $[4];
46
+ const onRemove = t3;
47
+ let t4;
48
+ if ($[5] !== editor || $[6] !== url) {
49
+ t4 = () => {
50
+ editor.chain().focus().extendMarkRange("link").setLink({ href: url }).run();
51
+ setIsOpen(false);
52
+ };
53
+ $[5] = editor;
54
+ $[6] = url;
55
+ $[7] = t4;
56
+ } else t4 = $[7];
57
+ const onApply = t4;
58
+ let t5;
59
+ if ($[8] !== t) {
60
+ t5 = t(_temp2);
61
+ $[8] = t;
62
+ $[9] = t5;
63
+ } else t5 = $[9];
64
+ let t6;
65
+ if ($[10] !== t) {
66
+ t6 = t(_temp3);
67
+ $[10] = t;
68
+ $[11] = t6;
69
+ } else t6 = $[11];
70
+ let t7;
71
+ if ($[12] !== editor) {
72
+ t7 = clsx(editor.isActive("link") && "!text-interactive-text-primary-idle");
73
+ $[12] = editor;
74
+ $[13] = t7;
75
+ } else t7 = $[13];
76
+ const t8 = !editor.isEditable;
77
+ let t9;
78
+ if ($[14] !== t6 || $[15] !== t7 || $[16] !== t8) {
79
+ t9 = /* @__PURE__ */ jsx(InlineIconButton, {
35
80
  color: "secondary",
36
- label: t(($) => $.ui.textEditor.link.label),
81
+ label: t6,
37
82
  icon: LinkIcon,
38
- className: clsx(editor.isActive("link") && "!text-interactive-text-primary-idle"),
39
- isDisabled: !editor.isEditable
40
- }),
41
- children: [/* @__PURE__ */ jsx(TextInput, {
83
+ className: t7,
84
+ isDisabled: t8
85
+ });
86
+ $[14] = t6;
87
+ $[15] = t7;
88
+ $[16] = t8;
89
+ $[17] = t9;
90
+ } else t9 = $[17];
91
+ let t10;
92
+ if ($[18] !== t) {
93
+ t10 = t(_temp4);
94
+ $[18] = t;
95
+ $[19] = t10;
96
+ } else t10 = $[19];
97
+ let t11;
98
+ if ($[20] !== t) {
99
+ t11 = t(_temp5);
100
+ $[20] = t;
101
+ $[21] = t11;
102
+ } else t11 = $[21];
103
+ let t12;
104
+ if ($[22] !== t10 || $[23] !== t11 || $[24] !== url) {
105
+ t12 = /* @__PURE__ */ jsx(TextInput, {
42
106
  variant: "outlined",
43
107
  hideLabel: true,
44
- label: t(($) => $.ui.textEditor.link.urlLabel),
45
- placeholder: t(($) => $.ui.textEditor.link.urlPlaceholder),
108
+ label: t10,
109
+ placeholder: t11,
46
110
  value: url,
47
111
  onChange: setUrl,
48
112
  className: "mb-4"
49
- }), /* @__PURE__ */ jsxs("div", {
113
+ });
114
+ $[22] = t10;
115
+ $[23] = t11;
116
+ $[24] = url;
117
+ $[25] = t12;
118
+ } else t12 = $[25];
119
+ const t13 = !url;
120
+ let t14;
121
+ if ($[26] !== t) {
122
+ t14 = t(_temp6);
123
+ $[26] = t;
124
+ $[27] = t14;
125
+ } else t14 = $[27];
126
+ let t15;
127
+ if ($[28] !== onApply || $[29] !== t13 || $[30] !== t14) {
128
+ t15 = /* @__PURE__ */ jsx(Button, {
129
+ variant: "contained",
130
+ color: "secondary",
131
+ size: "xs",
132
+ width: "hug",
133
+ onPress: onApply,
134
+ isDisabled: t13,
135
+ children: t14
136
+ });
137
+ $[28] = onApply;
138
+ $[29] = t13;
139
+ $[30] = t14;
140
+ $[31] = t15;
141
+ } else t15 = $[31];
142
+ let t16;
143
+ if ($[32] !== editor) {
144
+ t16 = editor.isActive("link");
145
+ $[32] = editor;
146
+ $[33] = t16;
147
+ } else t16 = $[33];
148
+ const t17 = !t16;
149
+ let t18;
150
+ if ($[34] !== t) {
151
+ t18 = t(_temp7);
152
+ $[34] = t;
153
+ $[35] = t18;
154
+ } else t18 = $[35];
155
+ let t19;
156
+ if ($[36] !== onRemove || $[37] !== t17 || $[38] !== t18) {
157
+ t19 = /* @__PURE__ */ jsx(Button, {
158
+ variant: "outlined",
159
+ color: "secondary",
160
+ size: "xs",
161
+ width: "hug",
162
+ onPress: onRemove,
163
+ isDisabled: t17,
164
+ children: t18
165
+ });
166
+ $[36] = onRemove;
167
+ $[37] = t17;
168
+ $[38] = t18;
169
+ $[39] = t19;
170
+ } else t19 = $[39];
171
+ let t20;
172
+ if ($[40] !== t15 || $[41] !== t19) {
173
+ t20 = /* @__PURE__ */ jsxs("div", {
50
174
  className: "flex justify-between",
51
- children: [/* @__PURE__ */ jsx(Button, {
52
- variant: "contained",
53
- color: "secondary",
54
- size: "xs",
55
- width: "hug",
56
- onPress: onApply,
57
- isDisabled: !url,
58
- children: t(($) => $.ui.textEditor.link.apply)
59
- }), /* @__PURE__ */ jsx(Button, {
60
- variant: "outlined",
61
- color: "secondary",
62
- size: "xs",
63
- width: "hug",
64
- onPress: onRemove,
65
- isDisabled: !editor.isActive("link"),
66
- children: t(($) => $.ui.textEditor.link.remove)
67
- })]
68
- })]
69
- });
175
+ children: [t15, t19]
176
+ });
177
+ $[40] = t15;
178
+ $[41] = t19;
179
+ $[42] = t20;
180
+ } else t20 = $[42];
181
+ let t21;
182
+ if ($[43] !== isOpen || $[44] !== t12 || $[45] !== t20 || $[46] !== t5 || $[47] !== t9) {
183
+ t21 = /* @__PURE__ */ jsxs(ResponsivePopover, {
184
+ isOpen,
185
+ onOpenChange: setIsOpen,
186
+ sheetLabel: t5,
187
+ trigger: t9,
188
+ children: [t12, t20]
189
+ });
190
+ $[43] = isOpen;
191
+ $[44] = t12;
192
+ $[45] = t20;
193
+ $[46] = t5;
194
+ $[47] = t9;
195
+ $[48] = t21;
196
+ } else t21 = $[48];
197
+ return t21;
70
198
  };
199
+ function _temp(extension) {
200
+ return extension.name === "link";
201
+ }
202
+ function _temp2($) {
203
+ return $.ui.textEditor.link.label;
204
+ }
205
+ function _temp3($_0) {
206
+ return $_0.ui.textEditor.link.label;
207
+ }
208
+ function _temp4($_1) {
209
+ return $_1.ui.textEditor.link.urlLabel;
210
+ }
211
+ function _temp5($_2) {
212
+ return $_2.ui.textEditor.link.urlPlaceholder;
213
+ }
214
+ function _temp6($_3) {
215
+ return $_3.ui.textEditor.link.apply;
216
+ }
217
+ function _temp7($_4) {
218
+ return $_4.ui.textEditor.link.remove;
219
+ }
71
220
  //#endregion
72
221
  export { HyperlinkAction };
@@ -4,43 +4,103 @@ import { AlignLeftRightIcon } from "../../../../assets/icons/AlignLeftRight.js";
4
4
  import { AlignRightIcon } from "../../../../assets/icons/AlignRight.js";
5
5
  import "../../../../config/i18n.js";
6
6
  import { Select } from "../../Selection/Select/Select.js";
7
+ import { c } from "react/compiler-runtime";
7
8
  import { jsx } from "react/jsx-runtime";
8
9
  import { useTranslation } from "react-i18next";
9
10
  //#region src/components/inputs/TextEditor/Toolbar/TextAlignSelect.tsx
10
- var TextAlignSelect = ({ editor }) => {
11
+ var TextAlignSelect = (t0) => {
12
+ const $0 = c(18);
13
+ const { editor } = t0;
11
14
  const { t } = useTranslation("ui");
12
- if (!!!editor.extensionManager.extensions.find((extension) => extension.name === "textAlign")) return null;
13
- const onChange = (val) => {
14
- if (val) editor.chain().focus().setTextAlign(val).run();
15
- else editor.chain().focus().unsetTextAlign().run();
16
- };
17
- const getItem = (id, Icon) => {
18
- return {
15
+ if (!!!editor.extensionManager.extensions.find(_temp)) return null;
16
+ let t1;
17
+ if ($0[0] !== editor) {
18
+ t1 = (val) => {
19
+ if (val) editor.chain().focus().setTextAlign(val).run();
20
+ else editor.chain().focus().unsetTextAlign().run();
21
+ };
22
+ $0[0] = editor;
23
+ $0[1] = t1;
24
+ } else t1 = $0[1];
25
+ const onChange = t1;
26
+ let t2;
27
+ if ($0[2] !== editor || $0[3] !== t) {
28
+ t2 = (id, Icon) => ({
19
29
  id,
20
30
  label: t(($) => $.ui.textEditor.textAlign[id]),
21
31
  content: /* @__PURE__ */ jsx(Icon, { className: "size-6" }),
22
32
  isActive: editor.isActive({ textAlign: id }),
23
33
  can: editor.can().setTextAlign(id)
24
- };
25
- };
26
- const enabledItems = [
27
- getItem("left", AlignLeftIcon),
28
- getItem("center", AlignCenterIcon),
29
- getItem("right", AlignRightIcon),
30
- getItem("justify", AlignLeftRightIcon)
31
- ].filter((item) => item.can);
32
- return /* @__PURE__ */ jsx(Select, {
33
- as: "inline",
34
- label: t(($) => $.ui.textEditor.textAlign.label),
35
- placeholder: t(($) => $.ui.textEditor.textAlign.label),
36
- hideLabel: true,
37
- ignoreTriggerWidth: true,
38
- showSelectionContent: true,
39
- onChange,
40
- items: enabledItems,
41
- value: enabledItems.find((item) => item.isActive)?.id || "left",
42
- isDisabled: !editor.isEditable
43
- });
34
+ });
35
+ $0[2] = editor;
36
+ $0[3] = t;
37
+ $0[4] = t2;
38
+ } else t2 = $0[4];
39
+ const getItem = t2;
40
+ let t3;
41
+ if ($0[5] !== getItem) {
42
+ t3 = [
43
+ getItem("left", AlignLeftIcon),
44
+ getItem("center", AlignCenterIcon),
45
+ getItem("right", AlignRightIcon),
46
+ getItem("justify", AlignLeftRightIcon)
47
+ ].filter(_temp2);
48
+ $0[5] = getItem;
49
+ $0[6] = t3;
50
+ } else t3 = $0[6];
51
+ const enabledItems = t3;
52
+ let t4;
53
+ if ($0[7] !== t) {
54
+ t4 = t(_temp3);
55
+ $0[7] = t;
56
+ $0[8] = t4;
57
+ } else t4 = $0[8];
58
+ let t5;
59
+ if ($0[9] !== t) {
60
+ t5 = t(_temp4);
61
+ $0[9] = t;
62
+ $0[10] = t5;
63
+ } else t5 = $0[10];
64
+ const t6 = enabledItems.find(_temp5)?.id || "left";
65
+ const t7 = !editor.isEditable;
66
+ let t8;
67
+ if ($0[11] !== enabledItems || $0[12] !== onChange || $0[13] !== t4 || $0[14] !== t5 || $0[15] !== t6 || $0[16] !== t7) {
68
+ t8 = /* @__PURE__ */ jsx(Select, {
69
+ as: "inline",
70
+ label: t4,
71
+ placeholder: t5,
72
+ hideLabel: true,
73
+ ignoreTriggerWidth: true,
74
+ showSelectionContent: true,
75
+ onChange,
76
+ items: enabledItems,
77
+ value: t6,
78
+ isDisabled: t7
79
+ });
80
+ $0[11] = enabledItems;
81
+ $0[12] = onChange;
82
+ $0[13] = t4;
83
+ $0[14] = t5;
84
+ $0[15] = t6;
85
+ $0[16] = t7;
86
+ $0[17] = t8;
87
+ } else t8 = $0[17];
88
+ return t8;
44
89
  };
90
+ function _temp(extension) {
91
+ return extension.name === "textAlign";
92
+ }
93
+ function _temp2(item) {
94
+ return item.can;
95
+ }
96
+ function _temp3($_0) {
97
+ return $_0.ui.textEditor.textAlign.label;
98
+ }
99
+ function _temp4($_1) {
100
+ return $_1.ui.textEditor.textAlign.label;
101
+ }
102
+ function _temp5(item_0) {
103
+ return item_0.isActive;
104
+ }
45
105
  //#endregion
46
106
  export { TextAlignSelect };
@@ -1,24 +1,58 @@
1
1
  import { TextColorIcon } from "../../../../assets/icons/TextColor.js";
2
2
  import { ColorPickerDropdown } from "./ColorPickerDropdown.js";
3
3
  import { defaultColors } from "../textEditor.types.js";
4
+ import { c } from "react/compiler-runtime";
4
5
  import { jsx } from "react/jsx-runtime";
5
6
  //#region src/components/inputs/TextEditor/Toolbar/TextColorSelect.tsx
6
- var TextColorSelect = ({ editor }) => {
7
- if (!editor.extensionManager.extensions.some((extension) => extension.name === "color")) return null;
8
- const onChange = (color) => {
9
- editor.chain().focus().setColor(color).run();
10
- };
11
- const textColor = editor.getAttributes("textStyle").color || "#000000";
12
- return /* @__PURE__ */ jsx(ColorPickerDropdown, {
13
- value: textColor,
14
- onChange,
15
- colors: defaultColors,
16
- isDisabled: !editor.isEditable,
17
- children: /* @__PURE__ */ jsx(TextColorIcon, {
7
+ var TextColorSelect = (t0) => {
8
+ const $ = c(11);
9
+ const { editor } = t0;
10
+ if (!editor.extensionManager.extensions.some(_temp)) return null;
11
+ let t1;
12
+ if ($[0] !== editor) {
13
+ t1 = (color) => {
14
+ editor.chain().focus().setColor(color).run();
15
+ };
16
+ $[0] = editor;
17
+ $[1] = t1;
18
+ } else t1 = $[1];
19
+ const onChange = t1;
20
+ let t2;
21
+ if ($[2] !== editor) {
22
+ t2 = editor.getAttributes("textStyle").color || "#000000";
23
+ $[2] = editor;
24
+ $[3] = t2;
25
+ } else t2 = $[3];
26
+ const textColor = t2;
27
+ const t3 = !editor.isEditable;
28
+ let t4;
29
+ if ($[4] !== textColor) {
30
+ t4 = /* @__PURE__ */ jsx(TextColorIcon, {
18
31
  className: "size-6",
19
32
  textColor
20
- })
21
- });
33
+ });
34
+ $[4] = textColor;
35
+ $[5] = t4;
36
+ } else t4 = $[5];
37
+ let t5;
38
+ if ($[6] !== onChange || $[7] !== t3 || $[8] !== t4 || $[9] !== textColor) {
39
+ t5 = /* @__PURE__ */ jsx(ColorPickerDropdown, {
40
+ value: textColor,
41
+ onChange,
42
+ colors: defaultColors,
43
+ isDisabled: t3,
44
+ children: t4
45
+ });
46
+ $[6] = onChange;
47
+ $[7] = t3;
48
+ $[8] = t4;
49
+ $[9] = textColor;
50
+ $[10] = t5;
51
+ } else t5 = $[10];
52
+ return t5;
22
53
  };
54
+ function _temp(extension) {
55
+ return extension.name === "color";
56
+ }
23
57
  //#endregion
24
58
  export { TextColorSelect };