@povio/ui 2.3.0-rc.6 → 2.3.0-rc.7

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 (191) 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 +97 -38
  52. package/dist/components/Menu/MenuPopover.js +105 -29
  53. package/dist/components/buttons/IconButton/IconButton.js +40 -8
  54. package/dist/components/buttons/InlineIconButton/InlineIconButton.js +34 -9
  55. package/dist/components/buttons/PillButton/PillButton.js +55 -17
  56. package/dist/components/buttons/SplitButton/SplitButton.js +103 -18
  57. package/dist/components/buttons/TextButton/TextButton.js +30 -8
  58. package/dist/components/buttons/ToggleButton/ToggleButton.js +28 -8
  59. package/dist/components/buttons/shared/ButtonContent.js +80 -22
  60. package/dist/components/inputs/Checkbox/Checkbox.js +164 -34
  61. package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +24 -10
  62. package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +8 -8
  63. package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +103 -103
  64. package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +9 -9
  65. package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +384 -116
  66. package/dist/components/inputs/DateTime/shared/Calendar.js +331 -137
  67. package/dist/components/inputs/DateTime/shared/CalendarCell.js +283 -102
  68. package/dist/components/inputs/DateTime/shared/CalendarGrid.js +142 -33
  69. package/dist/components/inputs/DateTime/shared/CalendarHeader.js +245 -90
  70. package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +318 -137
  71. package/dist/components/inputs/DateTime/shared/DateField.js +296 -112
  72. package/dist/components/inputs/DateTime/shared/DatePickerInput.js +345 -142
  73. package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +94 -21
  74. package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +81 -27
  75. package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +59 -10
  76. package/dist/components/inputs/DateTime/shared/MonthPicker.js +103 -58
  77. package/dist/components/inputs/DateTime/shared/RangeCalendar.js +193 -82
  78. package/dist/components/inputs/DateTime/shared/TimeField.js +27 -8
  79. package/dist/components/inputs/DateTime/shared/TimePickerForm.js +279 -110
  80. package/dist/components/inputs/DateTime/shared/TimePickerInput.js +205 -70
  81. package/dist/components/inputs/DateTime/shared/YearPicker.js +119 -68
  82. package/dist/components/inputs/File/FileUpload.js +86 -44
  83. package/dist/components/inputs/File/FileUploadContainer.js +15 -7
  84. package/dist/components/inputs/File/InputUpload.js +317 -79
  85. package/dist/components/inputs/File/shared/FileCard.js +104 -41
  86. package/dist/components/inputs/File/shared/FileCardList.js +47 -12
  87. package/dist/components/inputs/File/shared/FileUploadContent.js +175 -44
  88. package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +149 -46
  89. package/dist/components/inputs/File/shared/FileUploadContentError.js +234 -93
  90. package/dist/components/inputs/File/shared/FileUploadContentFilled.js +230 -97
  91. package/dist/components/inputs/File/shared/FileUploadContentLoading.js +199 -55
  92. package/dist/components/inputs/File/shared/InputUploadContent.js +148 -35
  93. package/dist/components/inputs/File/shared/InputUploadFilled.js +49 -8
  94. package/dist/components/inputs/File/shared/ProgressBar.js +48 -9
  95. package/dist/components/inputs/FormField/FormField.js +119 -37
  96. package/dist/components/inputs/FormField/FormFieldError.js +25 -5
  97. package/dist/components/inputs/FormField/FormFieldHeader.js +79 -22
  98. package/dist/components/inputs/FormField/FormFieldHeaderClose.js +31 -7
  99. package/dist/components/inputs/FormField/FormFieldHelper.js +26 -6
  100. package/dist/components/inputs/FormField/FormFieldLabel.js +40 -9
  101. package/dist/components/inputs/Input/NumberInput/NumberInput.js +253 -82
  102. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +541 -116
  103. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +314 -75
  104. package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +48 -9
  105. package/dist/components/inputs/Input/TextArea/TextArea.js +298 -89
  106. package/dist/components/inputs/Input/TextInput/TextInput.js +241 -81
  107. package/dist/components/inputs/Input/shared/InputContent.js +190 -58
  108. package/dist/components/inputs/Inputs/Form.js +40 -11
  109. package/dist/components/inputs/Inputs/InputItem.js +65 -14
  110. package/dist/components/inputs/Inputs/Inputs.js +37 -11
  111. package/dist/components/inputs/RadioGroup/RadioGroup.js +317 -106
  112. package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +2 -2
  113. package/dist/components/inputs/Selection/Select/QuerySelect.js +107 -27
  114. package/dist/components/inputs/Selection/shared/SelectBase.js +69 -20
  115. package/dist/components/inputs/Selection/shared/SelectDesktop.js +390 -143
  116. package/dist/components/inputs/Selection/shared/SelectInput.js +334 -136
  117. package/dist/components/inputs/Selection/shared/SelectInputTags.js +99 -25
  118. package/dist/components/inputs/Selection/shared/SelectListBox.js +163 -51
  119. package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +85 -35
  120. package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +69 -16
  121. package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +70 -21
  122. package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +58 -9
  123. package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +36 -11
  124. package/dist/components/inputs/Selection/shared/select.context.js +34 -34
  125. package/dist/components/inputs/Selection/shared/useSelectItems.js +109 -49
  126. package/dist/components/inputs/Skeleton/InputFrame.js +472 -145
  127. package/dist/components/inputs/Slider/Slider.js +247 -74
  128. package/dist/components/inputs/TextEditor/TextEditor.js +447 -103
  129. package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +37 -11
  130. package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +102 -30
  131. package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +194 -45
  132. package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +88 -28
  133. package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +48 -14
  134. package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.js +66 -19
  135. package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +49 -15
  136. package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +92 -32
  137. package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +126 -54
  138. package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +141 -38
  139. package/dist/components/inputs/Toggle/Toggle.js +187 -41
  140. package/dist/components/inputs/shared/CheckContent.js +21 -10
  141. package/dist/components/inputs/shared/InputClear.js +78 -21
  142. package/dist/components/inputs/shared/TooltipWrapper.js +47 -12
  143. package/dist/components/inputs/shared/input.cva.js +13 -3
  144. package/dist/components/inputs/shared/useStaticInputHandoff.js +93 -50
  145. package/dist/components/navigation/Accordion/Accordion.js +69 -22
  146. package/dist/components/navigation/Accordion/AccordionItem.js +86 -41
  147. package/dist/components/navigation/Stepper/Stepper.js +67 -22
  148. package/dist/components/navigation/Stepper/StepperItem.js +104 -31
  149. package/dist/components/navigation/Stepper/StepperSeparator.js +23 -5
  150. package/dist/components/overlays/ActionModal/ActionModal.js +169 -35
  151. package/dist/components/overlays/BottomSheet/BottomSheet.js +96 -23
  152. package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +48 -8
  153. package/dist/components/overlays/Drawer/Drawer.js +62 -20
  154. package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +83 -27
  155. package/dist/components/overlays/Tooltip/Tooltip.js +137 -28
  156. package/dist/components/overlays/Tooltip/TooltipEllipsis.js +37 -12
  157. package/dist/components/segment/Segment.js +218 -57
  158. package/dist/components/segment/SegmentItem.js +67 -10
  159. package/dist/components/shared/pagination/Pagination.js +108 -22
  160. package/dist/components/shared/pagination/PaginationList.js +167 -64
  161. package/dist/components/status/Alert/Alert.js +97 -30
  162. package/dist/components/status/Loader/Loader.js +77 -22
  163. package/dist/components/status/Toast/Toast.js +21 -13
  164. package/dist/components/status/Toast/useToast.js +62 -57
  165. package/dist/components/table/ColumnConfig.js +158 -54
  166. package/dist/components/table/InfiniteTable.js +67 -16
  167. package/dist/components/table/PaginatedTable.js +84 -18
  168. package/dist/components/table/Table.js +23 -23
  169. package/dist/components/text/Link/Link.js +19 -7
  170. package/dist/components/text/Typography/Typography.js +23 -8
  171. package/dist/config/confirmation.context.js +1 -1
  172. package/dist/config/link.context.js +23 -9
  173. package/dist/config/router.context.js +42 -16
  174. package/dist/config/theme.context.js +98 -45
  175. package/dist/config/uiConfig.context.js +39 -8
  176. package/dist/config/uiStyle.context.js +15 -5
  177. package/dist/hooks/useBreakpoint.js +16 -3
  178. package/dist/hooks/useDebounceCallback.js +51 -17
  179. package/dist/hooks/useFilters.js +125 -64
  180. package/dist/hooks/useForm.js +42 -8
  181. package/dist/hooks/useFormAutosave.js +101 -30
  182. package/dist/hooks/useIntersectionObserver.js +86 -32
  183. package/dist/hooks/useLocalStorage.js +43 -10
  184. package/dist/hooks/useLongPressRepeat.js +55 -20
  185. package/dist/hooks/usePagination.js +49 -19
  186. package/dist/hooks/useScrollableListBox.js +37 -16
  187. package/dist/hooks/useSorting.js +69 -28
  188. package/dist/hooks/useStateAndRef.js +21 -7
  189. package/dist/hooks/useTableColumnConfig.js +124 -31
  190. package/dist/hooks/useTranslationMemo.js +25 -5
  191. package/package.json +1 -1
@@ -1,54 +1,157 @@
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";
4
5
  import { jsx } from "react/jsx-runtime";
5
6
  import { useTranslation } from "react-i18next";
6
7
  //#region src/components/inputs/TextEditor/Toolbar/TextStyleSelect.tsx
7
- var TextStyleSelect = ({ editor }) => {
8
+ var TextStyleSelect = (t0) => {
9
+ const $0 = c(35);
10
+ const { editor } = t0;
8
11
  const { t } = useTranslation("ui");
9
- if (!!!editor.extensionManager.extensions.find((extension) => extension.name === "heading")) return null;
10
- const getItem = (level) => {
11
- return {
12
+ if (!!!editor.extensionManager.extensions.find(_temp)) return null;
13
+ let t1;
14
+ if ($0[0] !== t) {
15
+ t1 = (level) => ({
12
16
  id: level,
13
17
  label: t(($) => $.ui.textEditor.textStyle[`heading${level}`]),
14
18
  content: /* @__PURE__ */ jsx(Typography, {
15
19
  size: `title-${level}`,
16
- children: t(($) => $.ui.textEditor.textStyle[`heading${level}`])
20
+ children: t(($_0) => $_0.ui.textEditor.textStyle[`heading${level}`])
17
21
  })
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();
18
38
  };
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
- });
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;
52
143
  };
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
+ }
53
156
  //#endregion
54
157
  export { TextStyleSelect };
@@ -3,6 +3,7 @@ import { UIConfig } from "../../../config/uiConfig.context.js";
3
3
  import { FormFieldError } from "../FormField/FormFieldError.js";
4
4
  import { CheckContent } from "../shared/CheckContent.js";
5
5
  import { toggle, toggleContentClassName, toggleTypography } from "./toggle.cva.js";
6
+ import { c } from "react/compiler-runtime";
6
7
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
7
8
  import { clsx } from "clsx";
8
9
  import { Switch } from "react-aria-components";
@@ -10,58 +11,203 @@ import { mergeRefs } from "@react-aria/utils";
10
11
  import { Controller } from "react-hook-form";
11
12
  //#region src/components/inputs/Toggle/Toggle.tsx
12
13
  var ToggleBase = (props) => {
14
+ const $ = c(42);
13
15
  const ui = UIConfig.useConfig();
14
16
  const toggleCva = UIStyle.useCva("toggle.cva", toggle);
15
17
  const toggleTypographyMap = UIStyle.useMapper("toggle.typography", toggleTypography);
16
18
  const toggleContentClassNameMap = UIStyle.useMapper("toggle.contentClassName", toggleContentClassName);
17
- const { className, children, isDisabled, error, variant: variantProp, ...rest } = props;
18
- const variant = variantProp ?? ui.toggle.variant;
19
- const formFieldErrorProps = {
20
- error,
21
- isDisabled
22
- };
23
- return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs(Switch, {
24
- ...rest,
25
- "data-is-dirty": props.isDirty || void 0,
26
- "data-is-required": props.isRequired || void 0,
27
- isDisabled,
28
- className: clsx("group flex items-center gap-2", !isDisabled && "cursor-pointer", className),
29
- children: [/* @__PURE__ */ jsx("div", { className: toggleCva({
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({
30
59
  variant,
31
60
  ...rest
32
- }) }), /* @__PURE__ */ jsx(CheckContent, {
33
- typography: toggleTypographyMap({
34
- variant,
35
- ...rest
36
- }),
37
- contentClassName: toggleContentClassNameMap({
38
- variant,
39
- ...rest
40
- }),
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,
41
107
  children
42
- })]
43
- }), /* @__PURE__ */ jsx(FormFieldError, { ...formFieldErrorProps })] });
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;
44
149
  };
45
150
  var Toggle = (props) => {
151
+ const $ = c(15);
46
152
  if ("formControl" in props && props.formControl) {
47
- const { formControl, ref, ...innerProps } = props;
48
- return /* @__PURE__ */ jsx(Controller, {
49
- control: formControl.control,
50
- name: formControl.name,
51
- render: ({ field, fieldState: { error, isDirty } }) => /* @__PURE__ */ jsx(ToggleBase, {
52
- ...innerProps,
53
- ref: mergeRefs(ref, field.ref),
54
- isSelected: field.value,
55
- onChange: field.onChange,
56
- onBlur: field.onBlur,
57
- name: field.name,
58
- isDirty,
59
- isDisabled: field.disabled || props.isDisabled,
60
- error: props.error ?? error?.message
61
- })
62
- });
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;
63
203
  }
64
- return /* @__PURE__ */ jsx(ToggleBase, { ...props });
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;
65
211
  };
66
212
  //#endregion
67
213
  export { Toggle };
@@ -1,18 +1,29 @@
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";
3
4
  import { jsx } from "react/jsx-runtime";
4
5
  import clsx$1 from "clsx";
5
6
  //#region src/components/inputs/shared/CheckContent.tsx
6
- var CheckContent = ({ children, className, contentClassName, ...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
- }), contentClassName, className),
14
- children
15
- });
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;
16
27
  };
17
28
  //#endregion
18
29
  export { CheckContent };
@@ -1,33 +1,90 @@
1
1
  import { CloseIcon } from "../../../assets/icons/Close.js";
2
2
  import { InlineIconButton } from "../../buttons/InlineIconButton/InlineIconButton.js";
3
3
  import "../../../config/i18n.js";
4
+ import { c } from "react/compiler-runtime";
4
5
  import { jsx } from "react/jsx-runtime";
5
6
  import { clsx } from "clsx";
6
7
  import { useTranslation } from "react-i18next";
7
8
  //#region src/components/inputs/shared/InputClear.tsx
8
- var InputClear = ({ onClear, className, style, show, renderStatic }) => {
9
- if (renderStatic) return /* @__PURE__ */ jsx("button", {
10
- className: 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!", !show && "invisible!", className),
11
- style
12
- });
13
- return /* @__PURE__ */ jsx(InputClearButton, {
14
- onClear,
15
- className,
16
- style,
17
- show
18
- });
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;
19
48
  };
20
- var InputClearButton = ({ onClear, className, style, show }) => {
49
+ var InputClearButton = (t0) => {
50
+ const $ = c(10);
51
+ const { onClear, className, style, show } = t0;
21
52
  const { t } = useTranslation("ui");
22
- return /* @__PURE__ */ jsx(InlineIconButton, {
23
- color: "secondary",
24
- className: 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!", !show && "invisible!", className),
25
- label: t(($) => $.ui.clearAlt),
26
- icon: CloseIcon,
27
- onPress: onClear,
28
- excludeFromTabOrder: true,
29
- style
30
- });
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;
31
85
  };
86
+ function _temp($) {
87
+ return $.ui.clearAlt;
88
+ }
32
89
  //#endregion
33
90
  export { InputClear };
@@ -1,25 +1,60 @@
1
1
  import { UIStyle } from "../../../config/uiStyle.context.js";
2
2
  import { Tooltip } from "../../overlays/Tooltip/Tooltip.js";
3
3
  import { tooltipWrapperTrigger } from "./tooltipWrapper.cva.js";
4
+ import { c } from "react/compiler-runtime";
4
5
  import { jsx } from "react/jsx-runtime";
5
6
  //#region src/components/inputs/shared/TooltipWrapper.tsx
6
7
  var TooltipWrapper = (props) => {
8
+ const $ = c(14);
7
9
  const tooltipWrapperTriggerCva = UIStyle.useCva("tooltipWrapper.triggerCva", tooltipWrapperTrigger);
8
10
  if (props.as !== "inline") return props.children;
9
- return /* @__PURE__ */ jsx(Tooltip, {
10
- text: props.error || void 0,
11
- placement: "bottom",
12
- color: "error",
13
- hidden: !props.error,
14
- isNonInteractiveTrigger: true,
15
- triggerClassName: tooltipWrapperTriggerCva({ className: props.triggerClassName }),
16
- triggerTabIndex: props.triggerTabIndex,
17
- children: /* @__PURE__ */ jsx("div", {
11
+ const t0 = props.error || void 0;
12
+ const t1 = !props.error;
13
+ let t2;
14
+ if ($[0] !== props.triggerClassName || $[1] !== tooltipWrapperTriggerCva) {
15
+ t2 = tooltipWrapperTriggerCva({ className: props.triggerClassName });
16
+ $[0] = props.triggerClassName;
17
+ $[1] = tooltipWrapperTriggerCva;
18
+ $[2] = t2;
19
+ } else t2 = $[2];
20
+ const t3 = props.triggerTabIndex;
21
+ let t4;
22
+ if ($[3] !== tooltipWrapperTriggerCva) {
23
+ t4 = tooltipWrapperTriggerCva({});
24
+ $[3] = tooltipWrapperTriggerCva;
25
+ $[4] = t4;
26
+ } else t4 = $[4];
27
+ let t5;
28
+ if ($[5] !== props.children || $[6] !== t4) {
29
+ t5 = /* @__PURE__ */ jsx("div", {
18
30
  tabIndex: -1,
19
- className: tooltipWrapperTriggerCva({}),
31
+ className: t4,
20
32
  children: props.children
21
- })
22
- });
33
+ });
34
+ $[5] = props.children;
35
+ $[6] = t4;
36
+ $[7] = t5;
37
+ } else t5 = $[7];
38
+ let t6;
39
+ if ($[8] !== props.triggerTabIndex || $[9] !== t0 || $[10] !== t1 || $[11] !== t2 || $[12] !== t5) {
40
+ t6 = /* @__PURE__ */ jsx(Tooltip, {
41
+ text: t0,
42
+ placement: "bottom",
43
+ color: "error",
44
+ hidden: t1,
45
+ isNonInteractiveTrigger: true,
46
+ triggerClassName: t2,
47
+ triggerTabIndex: t3,
48
+ children: t5
49
+ });
50
+ $[8] = props.triggerTabIndex;
51
+ $[9] = t0;
52
+ $[10] = t1;
53
+ $[11] = t2;
54
+ $[12] = t5;
55
+ $[13] = t6;
56
+ } else t6 = $[13];
57
+ return t6;
23
58
  };
24
59
  //#endregion
25
60
  export { TooltipWrapper };