@povio/ui 2.3.0-rc.9 → 2.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (282) hide show
  1. package/dist/assets/icons/AlignCenter.js +11 -26
  2. package/dist/assets/icons/AlignLeft.js +11 -26
  3. package/dist/assets/icons/AlignLeftRight.js +11 -26
  4. package/dist/assets/icons/AlignRight.js +11 -26
  5. package/dist/assets/icons/ArrowDropDown.js +11 -26
  6. package/dist/assets/icons/ArrowDropUp.js +11 -26
  7. package/dist/assets/icons/ArrowLeft.js +11 -26
  8. package/dist/assets/icons/ArrowRight.js +11 -26
  9. package/dist/assets/icons/Bold.js +11 -26
  10. package/dist/assets/icons/BulletedList.js +11 -26
  11. package/dist/assets/icons/Calendar.js +13 -28
  12. package/dist/assets/icons/Check.js +13 -28
  13. package/dist/assets/icons/CheckCircle.js +11 -26
  14. package/dist/assets/icons/CheckboxCheckmark.js +14 -29
  15. package/dist/assets/icons/CheckboxIndeterminate.js +14 -29
  16. package/dist/assets/icons/ChevronDown.js +13 -28
  17. package/dist/assets/icons/ChevronLeft.js +13 -28
  18. package/dist/assets/icons/ChevronRight.js +13 -28
  19. package/dist/assets/icons/ChevronUp.js +13 -28
  20. package/dist/assets/icons/ChevronsLeft.js +13 -28
  21. package/dist/assets/icons/ChevronsRight.js +13 -28
  22. package/dist/assets/icons/Clock.js +11 -26
  23. package/dist/assets/icons/Close.js +11 -26
  24. package/dist/assets/icons/DateTime.js +14 -35
  25. package/dist/assets/icons/DragIndicator.js +11 -26
  26. package/dist/assets/icons/File.js +13 -28
  27. package/dist/assets/icons/Highlight.js +11 -26
  28. package/dist/assets/icons/HighlightOn.js +15 -49
  29. package/dist/assets/icons/Home.js +11 -26
  30. package/dist/assets/icons/Info.js +16 -37
  31. package/dist/assets/icons/Italic.js +11 -26
  32. package/dist/assets/icons/Link.js +11 -26
  33. package/dist/assets/icons/Menu.js +11 -26
  34. package/dist/assets/icons/NumberedList.js +11 -26
  35. package/dist/assets/icons/PointerHorizontal.js +11 -26
  36. package/dist/assets/icons/PointerVertical.js +11 -26
  37. package/dist/assets/icons/Search.js +11 -26
  38. package/dist/assets/icons/Send.js +13 -28
  39. package/dist/assets/icons/Strikethrough.js +11 -26
  40. package/dist/assets/icons/TextColor.js +14 -48
  41. package/dist/assets/icons/Today.js +11 -26
  42. package/dist/assets/icons/Underlined.js +13 -28
  43. package/dist/assets/icons/Upload.js +14 -35
  44. package/dist/assets/icons/Visibility.js +11 -26
  45. package/dist/assets/icons/VisibilityOff.js +11 -26
  46. package/dist/assets/icons/WarningFilled.js +13 -28
  47. package/dist/components/Breadcrumbs/Breadcrumbs.js +56 -207
  48. package/dist/components/Menu/Menu.js +2 -18
  49. package/dist/components/Menu/MenuDesktop.js +7 -41
  50. package/dist/components/Menu/MenuItem.js +9 -32
  51. package/dist/components/Menu/MenuMobile.js +38 -97
  52. package/dist/components/Menu/MenuPopover.js +29 -105
  53. package/dist/components/buttons/IconButton/IconButton.js +8 -40
  54. package/dist/components/buttons/InlineIconButton/InlineIconButton.d.ts +1 -2
  55. package/dist/components/buttons/InlineIconButton/InlineIconButton.js +9 -34
  56. package/dist/components/buttons/PillButton/PillButton.js +17 -55
  57. package/dist/components/buttons/SplitButton/SplitButton.js +18 -103
  58. package/dist/components/buttons/TextButton/TextButton.js +8 -30
  59. package/dist/components/buttons/ToggleButton/ToggleButton.js +8 -28
  60. package/dist/components/buttons/shared/ButtonContent.js +22 -80
  61. package/dist/components/inputs/Checkbox/Checkbox.js +35 -172
  62. package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +10 -24
  63. package/dist/components/inputs/Checkbox/checkbox.cva.d.ts +0 -3
  64. package/dist/components/inputs/Checkbox/checkbox.cva.js +1 -2
  65. package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +5 -10
  66. package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +20 -121
  67. package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +5 -10
  68. package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +111 -215
  69. package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +5 -11
  70. package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +19 -123
  71. package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +3 -5
  72. package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +104 -448
  73. package/dist/components/inputs/DateTime/shared/Calendar.d.ts +2 -5
  74. package/dist/components/inputs/DateTime/shared/Calendar.js +119 -330
  75. package/dist/components/inputs/DateTime/shared/CalendarCell.d.ts +1 -1
  76. package/dist/components/inputs/DateTime/shared/CalendarCell.js +102 -283
  77. package/dist/components/inputs/DateTime/shared/CalendarGrid.d.ts +1 -1
  78. package/dist/components/inputs/DateTime/shared/CalendarGrid.js +33 -142
  79. package/dist/components/inputs/DateTime/shared/CalendarHeader.js +93 -249
  80. package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +137 -318
  81. package/dist/components/inputs/DateTime/shared/DateField.js +112 -296
  82. package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +3 -6
  83. package/dist/components/inputs/DateTime/shared/DatePickerInput.js +136 -355
  84. package/dist/components/inputs/DateTime/shared/DateSegmentItem.d.ts +0 -14
  85. package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +11 -97
  86. package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +27 -81
  87. package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +10 -59
  88. package/dist/components/inputs/DateTime/shared/MonthPicker.js +58 -103
  89. package/dist/components/inputs/DateTime/shared/RangeCalendar.js +82 -193
  90. package/dist/components/inputs/DateTime/shared/TimeField.js +8 -27
  91. package/dist/components/inputs/DateTime/shared/TimePickerForm.js +110 -279
  92. package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +1 -2
  93. package/dist/components/inputs/DateTime/shared/TimePickerInput.js +65 -207
  94. package/dist/components/inputs/DateTime/shared/YearPicker.js +68 -119
  95. package/dist/components/inputs/File/FileUpload.js +44 -87
  96. package/dist/components/inputs/File/FileUploadContainer.js +7 -15
  97. package/dist/components/inputs/File/InputUpload.js +79 -317
  98. package/dist/components/inputs/File/shared/FileCard.js +41 -104
  99. package/dist/components/inputs/File/shared/FileCardList.js +12 -47
  100. package/dist/components/inputs/File/shared/FileUploadContent.js +44 -175
  101. package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +46 -149
  102. package/dist/components/inputs/File/shared/FileUploadContentError.js +93 -234
  103. package/dist/components/inputs/File/shared/FileUploadContentFilled.js +97 -230
  104. package/dist/components/inputs/File/shared/FileUploadContentLoading.js +55 -199
  105. package/dist/components/inputs/File/shared/InputUploadContent.js +34 -148
  106. package/dist/components/inputs/File/shared/InputUploadFilled.js +8 -49
  107. package/dist/components/inputs/File/shared/ProgressBar.js +9 -48
  108. package/dist/components/inputs/FormField/FormField.d.ts +3 -3
  109. package/dist/components/inputs/FormField/FormField.js +37 -119
  110. package/dist/components/inputs/FormField/FormFieldError.js +5 -25
  111. package/dist/components/inputs/FormField/FormFieldHeader.d.ts +2 -2
  112. package/dist/components/inputs/FormField/FormFieldHeader.js +22 -81
  113. package/dist/components/inputs/FormField/FormFieldHeaderClose.js +7 -31
  114. package/dist/components/inputs/FormField/FormFieldHelper.js +6 -26
  115. package/dist/components/inputs/FormField/FormFieldLabel.d.ts +2 -2
  116. package/dist/components/inputs/FormField/FormFieldLabel.js +9 -40
  117. package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +2 -5
  118. package/dist/components/inputs/Input/NumberInput/NumberInput.js +88 -334
  119. package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +9 -48
  120. package/dist/components/inputs/Input/TextArea/TextArea.js +90 -305
  121. package/dist/components/inputs/Input/TextInput/TextInput.d.ts +1 -3
  122. package/dist/components/inputs/Input/TextInput/TextInput.js +79 -319
  123. package/dist/components/inputs/Input/shared/InputContent.js +59 -192
  124. package/dist/components/inputs/Inputs/Form.js +11 -40
  125. package/dist/components/inputs/Inputs/InputItem.d.ts +21 -16
  126. package/dist/components/inputs/Inputs/InputItem.js +14 -71
  127. package/dist/components/inputs/Inputs/Inputs.js +11 -37
  128. package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +1 -2
  129. package/dist/components/inputs/RadioGroup/RadioGroup.js +60 -352
  130. package/dist/components/inputs/RadioGroup/radio.cva.d.ts +0 -17
  131. package/dist/components/inputs/RadioGroup/radio.cva.js +1 -42
  132. package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +2 -6
  133. package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +7 -109
  134. package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +18 -3
  135. package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +8 -34
  136. package/dist/components/inputs/Selection/Select/Select.d.ts +3 -7
  137. package/dist/components/inputs/Selection/Select/Select.js +5 -132
  138. package/dist/components/inputs/Selection/shared/SelectBase.d.ts +1 -8
  139. package/dist/components/inputs/Selection/shared/SelectBase.js +18 -69
  140. package/dist/components/inputs/Selection/shared/SelectDesktop.d.ts +1 -1
  141. package/dist/components/inputs/Selection/shared/SelectDesktop.js +138 -393
  142. package/dist/components/inputs/Selection/shared/SelectInput.d.ts +2 -2
  143. package/dist/components/inputs/Selection/shared/SelectInput.js +116 -338
  144. package/dist/components/inputs/Selection/shared/SelectInputTags.js +25 -99
  145. package/dist/components/inputs/Selection/shared/SelectListBox.d.ts +2 -2
  146. package/dist/components/inputs/Selection/shared/SelectListBox.js +52 -164
  147. package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +35 -85
  148. package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +16 -69
  149. package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +21 -70
  150. package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +9 -58
  151. package/dist/components/inputs/Selection/shared/SelectMobile.d.ts +1 -1
  152. package/dist/components/inputs/Selection/shared/SelectMobile.js +3 -9
  153. package/dist/components/inputs/Selection/shared/select.context.d.ts +2 -3
  154. package/dist/components/inputs/Selection/shared/select.context.js +34 -57
  155. package/dist/components/inputs/Selection/shared/select.types.d.ts +2 -3
  156. package/dist/components/inputs/Selection/shared/useSelectItems.js +49 -109
  157. package/dist/components/inputs/Slider/Slider.js +74 -250
  158. package/dist/components/inputs/TextEditor/TextEditor.d.ts +0 -1
  159. package/dist/components/inputs/TextEditor/TextEditor.js +98 -447
  160. package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +11 -37
  161. package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +30 -102
  162. package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +45 -194
  163. package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +28 -88
  164. package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +14 -48
  165. package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.js +19 -66
  166. package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +15 -49
  167. package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +32 -92
  168. package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +54 -126
  169. package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +38 -141
  170. package/dist/components/inputs/Toggle/Toggle.js +37 -189
  171. package/dist/components/inputs/Toggle/toggle.cva.d.ts +0 -3
  172. package/dist/components/inputs/Toggle/toggle.cva.js +1 -2
  173. package/dist/components/inputs/shared/CheckContent.d.ts +1 -2
  174. package/dist/components/inputs/shared/CheckContent.js +11 -21
  175. package/dist/components/inputs/shared/InputClear.d.ts +1 -2
  176. package/dist/components/inputs/shared/InputClear.js +13 -79
  177. package/dist/components/inputs/shared/TooltipWrapper.js +11 -50
  178. package/dist/components/inputs/shared/input.cva.d.ts +0 -10
  179. package/dist/components/inputs/shared/input.cva.js +4 -32
  180. package/dist/components/navigation/Accordion/Accordion.js +22 -69
  181. package/dist/components/navigation/Accordion/AccordionItem.js +41 -86
  182. package/dist/components/navigation/Stepper/Stepper.js +22 -67
  183. package/dist/components/navigation/Stepper/StepperItem.js +31 -104
  184. package/dist/components/navigation/Stepper/StepperSeparator.js +5 -23
  185. package/dist/components/overlays/ActionModal/ActionModal.js +35 -169
  186. package/dist/components/overlays/BottomSheet/BottomSheet.js +49 -98
  187. package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +8 -48
  188. package/dist/components/overlays/Drawer/Drawer.js +20 -62
  189. package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +27 -83
  190. package/dist/components/overlays/Tooltip/Tooltip.js +28 -137
  191. package/dist/components/overlays/Tooltip/TooltipEllipsis.js +12 -37
  192. package/dist/components/segment/Segment.js +57 -218
  193. package/dist/components/segment/SegmentItem.js +10 -67
  194. package/dist/components/shared/pagination/Pagination.js +22 -108
  195. package/dist/components/shared/pagination/PaginationList.js +64 -167
  196. package/dist/components/status/Alert/Alert.js +30 -97
  197. package/dist/components/status/Loader/Loader.js +22 -77
  198. package/dist/components/status/Toast/Toast.js +13 -21
  199. package/dist/components/status/Toast/useToast.js +57 -62
  200. package/dist/components/table/ColumnConfig.js +54 -158
  201. package/dist/components/table/InfiniteTable.js +16 -67
  202. package/dist/components/table/PaginatedTable.js +18 -84
  203. package/dist/components/table/Table.js +27 -28
  204. package/dist/components/text/Link/Link.js +7 -19
  205. package/dist/components/text/Typography/Typography.js +8 -23
  206. package/dist/config/confirmation.context.js +1 -1
  207. package/dist/config/link.context.js +9 -23
  208. package/dist/config/router.context.js +16 -42
  209. package/dist/config/theme.context.js +45 -98
  210. package/dist/config/uiConfig.context.d.ts +6 -16
  211. package/dist/config/uiConfig.context.js +13 -56
  212. package/dist/config/uiStyle.context.d.ts +4 -27
  213. package/dist/config/uiStyle.context.js +5 -15
  214. package/dist/helpers/dynamicInputs.d.ts +5 -5
  215. package/dist/helpers/dynamicInputs.js +0 -3
  216. package/dist/hooks/useBreakpoint.js +3 -16
  217. package/dist/hooks/useDebounceCallback.js +17 -51
  218. package/dist/hooks/useFilters.js +64 -125
  219. package/dist/hooks/useForm.js +8 -42
  220. package/dist/hooks/useFormAutosave.js +30 -101
  221. package/dist/hooks/useIntersectionObserver.d.ts +1 -1
  222. package/dist/hooks/useIntersectionObserver.js +24 -91
  223. package/dist/hooks/useLocalStorage.js +10 -43
  224. package/dist/hooks/useLongPressRepeat.js +20 -55
  225. package/dist/hooks/usePagination.js +19 -49
  226. package/dist/hooks/useScrollableListBox.js +16 -37
  227. package/dist/hooks/useSorting.js +28 -69
  228. package/dist/hooks/useStateAndRef.js +7 -21
  229. package/dist/hooks/useTableColumnConfig.js +31 -124
  230. package/dist/hooks/useTranslationMemo.js +5 -25
  231. package/dist/index.d.ts +0 -7
  232. package/dist/index.js +3 -5
  233. package/dist/tw-ui-plugin.js +0 -2
  234. package/dist/utils/date-time.utils.d.ts +10 -31
  235. package/dist/utils/date-time.utils.js +22 -123
  236. package/dist/utils/dom.utils.js +1 -1
  237. package/package.json +1 -1
  238. package/dist/components/inputs/DateTime/shared/datePicker.types.d.ts +0 -4
  239. package/dist/components/inputs/DateTime/shared/datePickerInput.cva.d.ts +0 -7
  240. package/dist/components/inputs/DateTime/shared/datePickerInput.cva.js +0 -13
  241. package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.d.ts +0 -6
  242. package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.js +0 -21
  243. package/dist/components/inputs/DateTime/shared/dateSegment.utils.d.ts +0 -2
  244. package/dist/components/inputs/DateTime/shared/dateSegment.utils.spec.d.ts +0 -1
  245. package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.d.ts +0 -31
  246. package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.js +0 -80
  247. package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.spec.d.ts +0 -1
  248. package/dist/components/inputs/FormField/formFieldHeader.cva.d.ts +0 -6
  249. package/dist/components/inputs/FormField/formFieldHeader.cva.js +0 -11
  250. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.d.ts +0 -45
  251. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +0 -571
  252. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +0 -35
  253. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +0 -479
  254. package/dist/components/inputs/Input/TextArea/TextArea.cva.d.ts +0 -4
  255. package/dist/components/inputs/Input/TextArea/TextArea.cva.js +0 -5
  256. package/dist/components/inputs/Input/shared/numberStatic.utils.d.ts +0 -1
  257. package/dist/components/inputs/Input/shared/numberStatic.utils.js +0 -7
  258. package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +0 -36
  259. package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +0 -14
  260. package/dist/components/inputs/Selection/Select/QuerySelect.js +0 -122
  261. package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.d.ts +0 -9
  262. package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +0 -47
  263. package/dist/components/inputs/Selection/shared/querySelect.utils.d.ts +0 -6
  264. package/dist/components/inputs/Selection/shared/querySelect.utils.js +0 -13
  265. package/dist/components/inputs/Selection/shared/selectDesktop.cva.d.ts +0 -3
  266. package/dist/components/inputs/Selection/shared/selectDesktop.cva.js +0 -5
  267. package/dist/components/inputs/Selection/shared/selectInput.cva.d.ts +0 -5
  268. package/dist/components/inputs/Selection/shared/selectInput.cva.js +0 -5
  269. package/dist/components/inputs/Selection/shared/staticSelect.utils.d.ts +0 -23
  270. package/dist/components/inputs/Selection/shared/staticSelect.utils.js +0 -37
  271. package/dist/components/inputs/Selection/shared/staticSelect.utils.spec.d.ts +0 -1
  272. package/dist/components/inputs/Skeleton/InputFrame.d.ts +0 -79
  273. package/dist/components/inputs/Skeleton/InputFrame.js +0 -526
  274. package/dist/components/inputs/shared/StaticInput.d.ts +0 -38
  275. package/dist/components/inputs/shared/tooltipWrapper.cva.d.ts +0 -4
  276. package/dist/components/inputs/shared/tooltipWrapper.cva.js +0 -5
  277. package/dist/components/inputs/shared/useStaticInputHandoff.d.ts +0 -14
  278. package/dist/components/inputs/shared/useStaticInputHandoff.js +0 -100
  279. package/dist/hooks/useQueryAutocomplete.d.ts +0 -14
  280. package/dist/hooks/useQueryAutocomplete.js +0 -57
  281. package/dist/utils/query.utils.d.ts +0 -4
  282. package/dist/utils/query.utils.js +0 -8
@@ -1,157 +1,54 @@
1
1
  import { Typography } from "../../../text/Typography/Typography.js";
2
2
  import "../../../../config/i18n.js";
3
3
  import { Select } from "../../Selection/Select/Select.js";
4
- import { c } from "react/compiler-runtime";
5
4
  import { jsx } from "react/jsx-runtime";
6
5
  import { useTranslation } from "react-i18next";
7
6
  //#region src/components/inputs/TextEditor/Toolbar/TextStyleSelect.tsx
8
- var TextStyleSelect = (t0) => {
9
- const $0 = c(35);
10
- const { editor } = t0;
7
+ var TextStyleSelect = ({ editor }) => {
11
8
  const { t } = useTranslation("ui");
12
- if (!!!editor.extensionManager.extensions.find(_temp)) return null;
13
- let t1;
14
- if ($0[0] !== t) {
15
- t1 = (level) => ({
9
+ if (!!!editor.extensionManager.extensions.find((extension) => extension.name === "heading")) return null;
10
+ const getItem = (level) => {
11
+ return {
16
12
  id: level,
17
13
  label: t(($) => $.ui.textEditor.textStyle[`heading${level}`]),
18
14
  content: /* @__PURE__ */ jsx(Typography, {
19
15
  size: `title-${level}`,
20
- children: t(($_0) => $_0.ui.textEditor.textStyle[`heading${level}`])
16
+ children: t(($) => $.ui.textEditor.textStyle[`heading${level}`])
21
17
  })
22
- });
23
- $0[0] = t;
24
- $0[1] = t1;
25
- } else t1 = $0[1];
26
- const getItem = t1;
27
- let t2;
28
- if ($0[2] !== editor) {
29
- t2 = (val) => {
30
- if (!val) {
31
- const currentLevel = editor.getAttributes("heading")?.level;
32
- if (!currentLevel) return;
33
- editor.chain().focus().toggleHeading({ level: currentLevel }).run();
34
- return;
35
- }
36
- if (!editor.can().setHeading({ level: val })) return;
37
- editor.chain().focus().setHeading({ level: val }).run();
38
18
  };
39
- $0[2] = editor;
40
- $0[3] = t2;
41
- } else t2 = $0[3];
42
- const onChange = t2;
43
- let t3;
44
- if ($0[4] !== t) {
45
- t3 = t(_temp2);
46
- $0[4] = t;
47
- $0[5] = t3;
48
- } else t3 = $0[5];
49
- let t4;
50
- if ($0[6] !== t) {
51
- t4 = t(_temp3);
52
- $0[6] = t;
53
- $0[7] = t4;
54
- } else t4 = $0[7];
55
- let t5;
56
- if ($0[8] !== t) {
57
- t5 = t(_temp4);
58
- $0[8] = t;
59
- $0[9] = t5;
60
- } else t5 = $0[9];
61
- let t6;
62
- if ($0[10] !== t5) {
63
- t6 = {
64
- id: 0,
65
- label: t5
66
- };
67
- $0[10] = t5;
68
- $0[11] = t6;
69
- } else t6 = $0[11];
70
- let t10;
71
- let t11;
72
- let t12;
73
- let t7;
74
- let t8;
75
- let t9;
76
- if ($0[12] !== editor || $0[13] !== getItem) {
77
- t7 = editor.can().toggleHeading({ level: 1 }) ? [getItem(1)] : [];
78
- t8 = editor.can().toggleHeading({ level: 2 }) ? [getItem(2)] : [];
79
- t9 = editor.can().toggleHeading({ level: 3 }) ? [getItem(3)] : [];
80
- t10 = editor.can().toggleHeading({ level: 4 }) ? [getItem(4)] : [];
81
- t11 = editor.can().toggleHeading({ level: 5 }) ? [getItem(5)] : [];
82
- t12 = editor.can().toggleHeading({ level: 6 }) ? [getItem(6)] : [];
83
- $0[12] = editor;
84
- $0[13] = getItem;
85
- $0[14] = t10;
86
- $0[15] = t11;
87
- $0[16] = t12;
88
- $0[17] = t7;
89
- $0[18] = t8;
90
- $0[19] = t9;
91
- } else {
92
- t10 = $0[14];
93
- t11 = $0[15];
94
- t12 = $0[16];
95
- t7 = $0[17];
96
- t8 = $0[18];
97
- t9 = $0[19];
98
- }
99
- let t13;
100
- if ($0[20] !== t10 || $0[21] !== t11 || $0[22] !== t12 || $0[23] !== t6 || $0[24] !== t7 || $0[25] !== t8 || $0[26] !== t9) {
101
- t13 = [
102
- t6,
103
- ...t7,
104
- ...t8,
105
- ...t9,
106
- ...t10,
107
- ...t11,
108
- ...t12
109
- ];
110
- $0[20] = t10;
111
- $0[21] = t11;
112
- $0[22] = t12;
113
- $0[23] = t6;
114
- $0[24] = t7;
115
- $0[25] = t8;
116
- $0[26] = t9;
117
- $0[27] = t13;
118
- } else t13 = $0[27];
119
- const t14 = editor.getAttributes("heading")?.level || 0;
120
- const t15 = !editor.isEditable;
121
- let t16;
122
- if ($0[28] !== onChange || $0[29] !== t13 || $0[30] !== t14 || $0[31] !== t15 || $0[32] !== t3 || $0[33] !== t4) {
123
- t16 = /* @__PURE__ */ jsx(Select, {
124
- as: "inline",
125
- placeholder: t3,
126
- label: t4,
127
- hideLabel: true,
128
- ignoreTriggerWidth: true,
129
- onChange,
130
- items: t13,
131
- value: t14,
132
- isDisabled: t15
133
- });
134
- $0[28] = onChange;
135
- $0[29] = t13;
136
- $0[30] = t14;
137
- $0[31] = t15;
138
- $0[32] = t3;
139
- $0[33] = t4;
140
- $0[34] = t16;
141
- } else t16 = $0[34];
142
- return t16;
19
+ };
20
+ const onChange = (val) => {
21
+ if (!val) {
22
+ const currentLevel = editor.getAttributes("heading")?.level;
23
+ if (!currentLevel) return;
24
+ editor.chain().focus().toggleHeading({ level: currentLevel }).run();
25
+ return;
26
+ }
27
+ if (!editor.can().setHeading({ level: val })) return;
28
+ editor.chain().focus().setHeading({ level: val }).run();
29
+ };
30
+ return /* @__PURE__ */ jsx(Select, {
31
+ as: "inline",
32
+ placeholder: t(($) => $.ui.textEditor.textStyle.label),
33
+ label: t(($) => $.ui.textEditor.textStyle.label),
34
+ hideLabel: true,
35
+ ignoreTriggerWidth: true,
36
+ onChange,
37
+ items: [
38
+ {
39
+ id: 0,
40
+ label: t(($) => $.ui.textEditor.textStyle.normal)
41
+ },
42
+ ...editor.can().toggleHeading({ level: 1 }) ? [getItem(1)] : [],
43
+ ...editor.can().toggleHeading({ level: 2 }) ? [getItem(2)] : [],
44
+ ...editor.can().toggleHeading({ level: 3 }) ? [getItem(3)] : [],
45
+ ...editor.can().toggleHeading({ level: 4 }) ? [getItem(4)] : [],
46
+ ...editor.can().toggleHeading({ level: 5 }) ? [getItem(5)] : [],
47
+ ...editor.can().toggleHeading({ level: 6 }) ? [getItem(6)] : []
48
+ ],
49
+ value: editor.getAttributes("heading")?.level || 0,
50
+ isDisabled: !editor.isEditable
51
+ });
143
52
  };
144
- function _temp(extension) {
145
- return extension.name === "heading";
146
- }
147
- function _temp2($_1) {
148
- return $_1.ui.textEditor.textStyle.label;
149
- }
150
- function _temp3($_2) {
151
- return $_2.ui.textEditor.textStyle.label;
152
- }
153
- function _temp4($_3) {
154
- return $_3.ui.textEditor.textStyle.normal;
155
- }
156
53
  //#endregion
157
54
  export { TextStyleSelect };
@@ -2,8 +2,7 @@ import { UIStyle } from "../../../config/uiStyle.context.js";
2
2
  import { UIConfig } from "../../../config/uiConfig.context.js";
3
3
  import { FormFieldError } from "../FormField/FormFieldError.js";
4
4
  import { CheckContent } from "../shared/CheckContent.js";
5
- import { toggle, toggleContentClassName, toggleTypography } from "./toggle.cva.js";
6
- import { c } from "react/compiler-runtime";
5
+ import { toggle, toggleTypography } from "./toggle.cva.js";
7
6
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
8
7
  import { clsx } from "clsx";
9
8
  import { Switch } from "react-aria-components";
@@ -11,203 +10,52 @@ import { mergeRefs } from "@react-aria/utils";
11
10
  import { Controller } from "react-hook-form";
12
11
  //#region src/components/inputs/Toggle/Toggle.tsx
13
12
  var ToggleBase = (props) => {
14
- const $ = c(42);
15
13
  const ui = UIConfig.useConfig();
16
14
  const toggleCva = UIStyle.useCva("toggle.cva", toggle);
17
15
  const toggleTypographyMap = UIStyle.useMapper("toggle.typography", toggleTypography);
18
- const toggleContentClassNameMap = UIStyle.useMapper("toggle.contentClassName", toggleContentClassName);
19
- let T0;
20
- let T1;
21
- let children;
22
- let formFieldErrorProps;
23
- let t0;
24
- let t1;
25
- let t2;
26
- let t3;
27
- let t4;
28
- let t5;
29
- let t6;
30
- let t7;
31
- if ($[0] !== props || $[1] !== toggleContentClassNameMap || $[2] !== toggleCva || $[3] !== toggleTypographyMap || $[4] !== ui) {
32
- const { className, children: t8, isDisabled, error, variant: variantProp, ...rest } = props;
33
- children = t8;
34
- const variant = variantProp ?? ui.toggle.variant;
35
- let t9;
36
- if ($[17] !== error || $[18] !== isDisabled) {
37
- t9 = {
38
- error,
39
- isDisabled
40
- };
41
- $[17] = error;
42
- $[18] = isDisabled;
43
- $[19] = t9;
44
- } else t9 = $[19];
45
- formFieldErrorProps = t9;
46
- T1 = Switch;
47
- t2 = rest;
48
- t3 = props.isDirty || void 0;
49
- t4 = props.isRequired || void 0;
50
- t5 = isDisabled;
51
- const t10 = !isDisabled && "cursor-pointer";
52
- if ($[20] !== className || $[21] !== t10) {
53
- t6 = clsx("group flex items-center gap-2", t10, className);
54
- $[20] = className;
55
- $[21] = t10;
56
- $[22] = t6;
57
- } else t6 = $[22];
58
- t7 = /* @__PURE__ */ jsx("div", { className: toggleCva({
16
+ const { className, children, isDisabled, error, variant = ui.toggle.variant, ...rest } = props;
17
+ const formFieldErrorProps = {
18
+ error,
19
+ isDisabled
20
+ };
21
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs(Switch, {
22
+ ...rest,
23
+ "data-is-dirty": props.isDirty || void 0,
24
+ "data-is-required": props.isRequired || void 0,
25
+ isDisabled,
26
+ className: clsx("group flex items-center gap-2", !isDisabled && "cursor-pointer", className),
27
+ children: [/* @__PURE__ */ jsx("div", { className: toggleCva({
59
28
  variant,
60
29
  ...rest
61
- }) });
62
- T0 = CheckContent;
63
- t0 = toggleTypographyMap({
64
- variant,
65
- ...rest
66
- });
67
- t1 = toggleContentClassNameMap({
68
- variant,
69
- ...rest
70
- });
71
- $[0] = props;
72
- $[1] = toggleContentClassNameMap;
73
- $[2] = toggleCva;
74
- $[3] = toggleTypographyMap;
75
- $[4] = ui;
76
- $[5] = T0;
77
- $[6] = T1;
78
- $[7] = children;
79
- $[8] = formFieldErrorProps;
80
- $[9] = t0;
81
- $[10] = t1;
82
- $[11] = t2;
83
- $[12] = t3;
84
- $[13] = t4;
85
- $[14] = t5;
86
- $[15] = t6;
87
- $[16] = t7;
88
- } else {
89
- T0 = $[5];
90
- T1 = $[6];
91
- children = $[7];
92
- formFieldErrorProps = $[8];
93
- t0 = $[9];
94
- t1 = $[10];
95
- t2 = $[11];
96
- t3 = $[12];
97
- t4 = $[13];
98
- t5 = $[14];
99
- t6 = $[15];
100
- t7 = $[16];
101
- }
102
- let t8;
103
- if ($[23] !== T0 || $[24] !== children || $[25] !== t0 || $[26] !== t1) {
104
- t8 = /* @__PURE__ */ jsx(T0, {
105
- typography: t0,
106
- contentClassName: t1,
30
+ }) }), /* @__PURE__ */ jsx(CheckContent, {
31
+ typography: toggleTypographyMap({
32
+ variant,
33
+ ...rest
34
+ }),
107
35
  children
108
- });
109
- $[23] = T0;
110
- $[24] = children;
111
- $[25] = t0;
112
- $[26] = t1;
113
- $[27] = t8;
114
- } else t8 = $[27];
115
- let t9;
116
- if ($[28] !== T1 || $[29] !== t2 || $[30] !== t3 || $[31] !== t4 || $[32] !== t5 || $[33] !== t6 || $[34] !== t7 || $[35] !== t8) {
117
- t9 = /* @__PURE__ */ jsxs(T1, {
118
- ...t2,
119
- "data-is-dirty": t3,
120
- "data-is-required": t4,
121
- isDisabled: t5,
122
- className: t6,
123
- children: [t7, t8]
124
- });
125
- $[28] = T1;
126
- $[29] = t2;
127
- $[30] = t3;
128
- $[31] = t4;
129
- $[32] = t5;
130
- $[33] = t6;
131
- $[34] = t7;
132
- $[35] = t8;
133
- $[36] = t9;
134
- } else t9 = $[36];
135
- let t10;
136
- if ($[37] !== formFieldErrorProps) {
137
- t10 = /* @__PURE__ */ jsx(FormFieldError, { ...formFieldErrorProps });
138
- $[37] = formFieldErrorProps;
139
- $[38] = t10;
140
- } else t10 = $[38];
141
- let t11;
142
- if ($[39] !== t10 || $[40] !== t9) {
143
- t11 = /* @__PURE__ */ jsxs(Fragment, { children: [t9, t10] });
144
- $[39] = t10;
145
- $[40] = t9;
146
- $[41] = t11;
147
- } else t11 = $[41];
148
- return t11;
36
+ })]
37
+ }), /* @__PURE__ */ jsx(FormFieldError, { ...formFieldErrorProps })] });
149
38
  };
150
39
  var Toggle = (props) => {
151
- const $ = c(15);
152
40
  if ("formControl" in props && props.formControl) {
153
- let formControl;
154
- let innerProps;
155
- let ref;
156
- if ($[0] !== props) {
157
- ({formControl, ref, ...innerProps} = props);
158
- $[0] = props;
159
- $[1] = formControl;
160
- $[2] = innerProps;
161
- $[3] = ref;
162
- } else {
163
- formControl = $[1];
164
- innerProps = $[2];
165
- ref = $[3];
166
- }
167
- let t0;
168
- if ($[4] !== innerProps || $[5] !== props.error || $[6] !== props.isDisabled || $[7] !== ref) {
169
- t0 = (t1) => {
170
- const { field, fieldState: t2 } = t1;
171
- const { error, isDirty } = t2;
172
- return /* @__PURE__ */ jsx(ToggleBase, {
173
- ...innerProps,
174
- ref: mergeRefs(ref, field.ref),
175
- isSelected: field.value,
176
- onChange: field.onChange,
177
- onBlur: field.onBlur,
178
- name: field.name,
179
- isDirty,
180
- isDisabled: field.disabled || props.isDisabled,
181
- error: props.error ?? error?.message
182
- });
183
- };
184
- $[4] = innerProps;
185
- $[5] = props.error;
186
- $[6] = props.isDisabled;
187
- $[7] = ref;
188
- $[8] = t0;
189
- } else t0 = $[8];
190
- let t1;
191
- if ($[9] !== formControl.control || $[10] !== formControl.name || $[11] !== t0) {
192
- t1 = /* @__PURE__ */ jsx(Controller, {
193
- control: formControl.control,
194
- name: formControl.name,
195
- render: t0
196
- });
197
- $[9] = formControl.control;
198
- $[10] = formControl.name;
199
- $[11] = t0;
200
- $[12] = t1;
201
- } else t1 = $[12];
202
- return t1;
41
+ const { formControl, ref, ...innerProps } = props;
42
+ return /* @__PURE__ */ jsx(Controller, {
43
+ control: formControl.control,
44
+ name: formControl.name,
45
+ render: ({ field, fieldState: { error, isDirty } }) => /* @__PURE__ */ jsx(ToggleBase, {
46
+ ...innerProps,
47
+ ref: mergeRefs(ref, field.ref),
48
+ isSelected: field.value,
49
+ onChange: field.onChange,
50
+ onBlur: field.onBlur,
51
+ name: field.name,
52
+ isDirty,
53
+ isDisabled: field.disabled || props.isDisabled,
54
+ error: props.error ?? error?.message
55
+ })
56
+ });
203
57
  }
204
- let t0;
205
- if ($[13] !== props) {
206
- t0 = /* @__PURE__ */ jsx(ToggleBase, { ...props });
207
- $[13] = props;
208
- $[14] = t0;
209
- } else t0 = $[14];
210
- return t0;
58
+ return /* @__PURE__ */ jsx(ToggleBase, { ...props });
211
59
  };
212
60
  //#endregion
213
61
  export { Toggle };
@@ -8,6 +8,3 @@ export interface ToggleVariantProps extends VariantProps<typeof toggle> {
8
8
  export declare const toggleTypography: (props: {
9
9
  variant?: "default" | null | undefined;
10
10
  }) => TypographyVariantProps | undefined;
11
- export declare const toggleContentClassName: (props: {
12
- variant?: "default" | null | undefined;
13
- }) => string | undefined;
@@ -26,6 +26,5 @@ var toggleTypography = compoundMapper({ default: {
26
26
  sizeMobile: "label-1",
27
27
  variant: "default"
28
28
  } });
29
- var toggleContentClassName = compoundMapper({ default: "text-text-default-2" });
30
29
  //#endregion
31
- export { toggle, toggleContentClassName, toggleTypography };
30
+ export { toggle, toggleTypography };
@@ -3,7 +3,6 @@ import { TypographyVariantProps } from '../../text/Typography/typography.cva';
3
3
  interface CheckContentProps {
4
4
  typography?: TypographyVariantProps;
5
5
  className?: string;
6
- contentClassName?: string;
7
6
  }
8
- export declare const CheckContent: ({ children, className, contentClassName, ...props }: PropsWithChildren<CheckContentProps>) => import("react/jsx-runtime").JSX.Element;
7
+ export declare const CheckContent: ({ children, className, ...props }: PropsWithChildren<CheckContentProps>) => import("react/jsx-runtime").JSX.Element;
9
8
  export {};
@@ -1,29 +1,19 @@
1
1
  import { UIStyle } from "../../../config/uiStyle.context.js";
2
2
  import { typography } from "../../text/Typography/typography.cva.js";
3
- import { c } from "react/compiler-runtime";
4
3
  import { jsx } from "react/jsx-runtime";
5
4
  import clsx$1 from "clsx";
6
5
  //#region src/components/inputs/shared/CheckContent.tsx
7
- var CheckContent = (t0) => {
8
- const $ = c(3);
9
- const { children, className, contentClassName, ...props } = t0;
10
- const t1 = clsx$1(UIStyle.useCva("typography.cva", typography)({
11
- size: "label-1",
12
- sizeMobile: "label-1",
13
- variant: "default",
14
- ...props.typography
15
- }), contentClassName, className);
16
- let t2;
17
- if ($[0] !== children || $[1] !== t1) {
18
- t2 = /* @__PURE__ */ jsx("div", {
19
- className: t1,
20
- children
21
- });
22
- $[0] = children;
23
- $[1] = t1;
24
- $[2] = t2;
25
- } else t2 = $[2];
26
- return t2;
6
+ var CheckContent = ({ children, className, ...props }) => {
7
+ return /* @__PURE__ */ jsx("div", {
8
+ className: clsx$1(UIStyle.useCva("typography.cva", typography)({
9
+ size: "label-1",
10
+ sizeMobile: "label-1",
11
+ variant: "default",
12
+ ...props.typography,
13
+ className: "text-text-default-2"
14
+ }), className),
15
+ children
16
+ });
27
17
  };
28
18
  //#endregion
29
19
  export { CheckContent };
@@ -2,9 +2,8 @@ import { CSSProperties } from 'react';
2
2
  interface InputClearProps {
3
3
  onClear: () => void;
4
4
  show?: boolean;
5
- renderStatic?: boolean;
6
5
  className?: string;
7
6
  style?: CSSProperties;
8
7
  }
9
- export declare const InputClear: ({ onClear, className, style, show, renderStatic }: InputClearProps) => import("react/jsx-runtime").JSX.Element;
8
+ export declare const InputClear: ({ onClear, className, style, show }: InputClearProps) => import("react/jsx-runtime").JSX.Element;
10
9
  export {};
@@ -1,90 +1,24 @@
1
1
  import { CloseIcon } from "../../../assets/icons/Close.js";
2
+ import { UIConfig } from "../../../config/uiConfig.context.js";
2
3
  import { InlineIconButton } from "../../buttons/InlineIconButton/InlineIconButton.js";
3
4
  import "../../../config/i18n.js";
4
- import { c } from "react/compiler-runtime";
5
5
  import { jsx } from "react/jsx-runtime";
6
6
  import { clsx } from "clsx";
7
7
  import { useTranslation } from "react-i18next";
8
8
  //#region src/components/inputs/shared/InputClear.tsx
9
- var InputClear = (t0) => {
10
- const $ = c(11);
11
- const { onClear, className, style, show, renderStatic } = t0;
12
- if (renderStatic) {
13
- const t1 = !show && "invisible!";
14
- let t2;
15
- if ($[0] !== className || $[1] !== t1) {
16
- t2 = clsx("invisible relative z-1 flex items-center size-6 shrink-0", "group-focus-within:visible group-hover/date-picker-content:visible group-hover/select-content:visible group-hover/text-area:visible group-hover:visible", "border-0!", t1, className);
17
- $[0] = className;
18
- $[1] = t1;
19
- $[2] = t2;
20
- } else t2 = $[2];
21
- let t3;
22
- if ($[3] !== style || $[4] !== t2) {
23
- t3 = /* @__PURE__ */ jsx("button", {
24
- className: t2,
25
- style
26
- });
27
- $[3] = style;
28
- $[4] = t2;
29
- $[5] = t3;
30
- } else t3 = $[5];
31
- return t3;
32
- }
33
- let t1;
34
- if ($[6] !== className || $[7] !== onClear || $[8] !== show || $[9] !== style) {
35
- t1 = /* @__PURE__ */ jsx(InputClearButton, {
36
- onClear,
37
- className,
38
- style,
39
- show
40
- });
41
- $[6] = className;
42
- $[7] = onClear;
43
- $[8] = show;
44
- $[9] = style;
45
- $[10] = t1;
46
- } else t1 = $[10];
47
- return t1;
48
- };
49
- var InputClearButton = (t0) => {
50
- const $ = c(10);
51
- const { onClear, className, style, show } = t0;
9
+ var InputClear = ({ onClear, className, style, show }) => {
52
10
  const { t } = useTranslation("ui");
53
- const t1 = !show && "invisible!";
54
- let t2;
55
- if ($[0] !== className || $[1] !== t1) {
56
- t2 = clsx("invisible relative z-1 flex items-center", "group-focus-within:visible group-hover/date-picker-content:visible group-hover/select-content:visible group-hover/text-area:visible group-hover:visible", "border-0!", t1, className);
57
- $[0] = className;
58
- $[1] = t1;
59
- $[2] = t2;
60
- } else t2 = $[2];
61
- let t3;
62
- if ($[3] !== t) {
63
- t3 = t(_temp);
64
- $[3] = t;
65
- $[4] = t3;
66
- } else t3 = $[4];
67
- let t4;
68
- if ($[5] !== onClear || $[6] !== style || $[7] !== t2 || $[8] !== t3) {
69
- t4 = /* @__PURE__ */ jsx(InlineIconButton, {
70
- color: "secondary",
71
- className: t2,
72
- label: t3,
73
- icon: CloseIcon,
74
- onPress: onClear,
75
- excludeFromTabOrder: true,
76
- style
77
- });
78
- $[5] = onClear;
79
- $[6] = style;
80
- $[7] = t2;
81
- $[8] = t3;
82
- $[9] = t4;
83
- } else t4 = $[9];
84
- return t4;
11
+ const alwaysShowClear = UIConfig.useConfig().input.alwaysShowClear;
12
+ return /* @__PURE__ */ jsx(InlineIconButton, {
13
+ color: "secondary",
14
+ className: clsx("relative z-1 flex items-center", !alwaysShowClear && "md:invisible group-focus-within:visible group-hover/date-picker-content:visible group-hover/select-content:visible group-hover/text-area:visible group-hover:visible", "border-0!", !show && "invisible!", className),
15
+ label: t(($) => $.ui.clearAlt),
16
+ icon: CloseIcon,
17
+ onPress: onClear,
18
+ onMouseDown: (e) => e.preventDefault(),
19
+ excludeFromTabOrder: true,
20
+ style
21
+ });
85
22
  };
86
- function _temp($) {
87
- return $.ui.clearAlt;
88
- }
89
23
  //#endregion
90
24
  export { InputClear };