@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
@@ -2,37 +2,122 @@ import { ChevronDownIcon } from "../../../assets/icons/ChevronDown.js";
2
2
  import { Button } from "../Button/Button.js";
3
3
  import { IconButton } from "../IconButton/IconButton.js";
4
4
  import { Menu } from "../../Menu/Menu.js";
5
+ import { c } from "react/compiler-runtime";
5
6
  import { jsx, jsxs } from "react/jsx-runtime";
6
7
  import { clsx } from "clsx";
7
8
  //#region src/components/buttons/SplitButton/SplitButton.tsx
8
- var SplitButton = ({ variant, color, width, size, label, labelRight, link, items, className, isLoading, ...props }) => {
9
- return /* @__PURE__ */ jsxs("div", {
10
- className: "group/split flex items-center",
11
- "data-split": "",
12
- children: [/* @__PURE__ */ jsx(Button, {
9
+ var SplitButton = (t0) => {
10
+ const $ = c(36);
11
+ let className;
12
+ let color;
13
+ let isLoading;
14
+ let items;
15
+ let label;
16
+ let labelRight;
17
+ let link;
18
+ let props;
19
+ let size;
20
+ let variant;
21
+ let width;
22
+ if ($[0] !== t0) {
23
+ ({variant, color, width, size, label, labelRight, link, items, className, isLoading, ...props} = t0);
24
+ $[0] = t0;
25
+ $[1] = className;
26
+ $[2] = color;
27
+ $[3] = isLoading;
28
+ $[4] = items;
29
+ $[5] = label;
30
+ $[6] = labelRight;
31
+ $[7] = link;
32
+ $[8] = props;
33
+ $[9] = size;
34
+ $[10] = variant;
35
+ $[11] = width;
36
+ } else {
37
+ className = $[1];
38
+ color = $[2];
39
+ isLoading = $[3];
40
+ items = $[4];
41
+ label = $[5];
42
+ labelRight = $[6];
43
+ link = $[7];
44
+ props = $[8];
45
+ size = $[9];
46
+ variant = $[10];
47
+ width = $[11];
48
+ }
49
+ let t1;
50
+ if ($[12] !== className) {
51
+ t1 = clsx("rounded-r-none! border-r border-solid", className);
52
+ $[12] = className;
53
+ $[13] = t1;
54
+ } else t1 = $[13];
55
+ let t2;
56
+ if ($[14] !== color || $[15] !== isLoading || $[16] !== label || $[17] !== link || $[18] !== props || $[19] !== size || $[20] !== t1 || $[21] !== variant || $[22] !== width) {
57
+ t2 = /* @__PURE__ */ jsx(Button, {
13
58
  ...props,
14
59
  width,
15
60
  size,
16
61
  variant,
17
62
  color,
18
63
  link,
19
- className: clsx("rounded-r-none! border-r border-solid", className),
64
+ className: t1,
20
65
  "data-separator": "",
21
66
  isLoading,
22
67
  children: label
23
- }), /* @__PURE__ */ jsx(Menu, {
24
- trigger: /* @__PURE__ */ jsx(IconButton, {
25
- size,
26
- variant,
27
- color,
28
- label: labelRight,
29
- icon: ChevronDownIcon,
30
- className: "rounded-l-none! border-l-0!",
31
- isDisabled: props.isDisabled || isLoading
32
- }),
68
+ });
69
+ $[14] = color;
70
+ $[15] = isLoading;
71
+ $[16] = label;
72
+ $[17] = link;
73
+ $[18] = props;
74
+ $[19] = size;
75
+ $[20] = t1;
76
+ $[21] = variant;
77
+ $[22] = width;
78
+ $[23] = t2;
79
+ } else t2 = $[23];
80
+ const t3 = props.isDisabled || isLoading;
81
+ let t4;
82
+ if ($[24] !== color || $[25] !== labelRight || $[26] !== size || $[27] !== t3 || $[28] !== variant) {
83
+ t4 = /* @__PURE__ */ jsx(IconButton, {
84
+ size,
85
+ variant,
86
+ color,
87
+ label: labelRight,
88
+ icon: ChevronDownIcon,
89
+ className: "rounded-l-none! border-l-0!",
90
+ isDisabled: t3
91
+ });
92
+ $[24] = color;
93
+ $[25] = labelRight;
94
+ $[26] = size;
95
+ $[27] = t3;
96
+ $[28] = variant;
97
+ $[29] = t4;
98
+ } else t4 = $[29];
99
+ let t5;
100
+ if ($[30] !== items || $[31] !== t4) {
101
+ t5 = /* @__PURE__ */ jsx(Menu, {
102
+ trigger: t4,
33
103
  items
34
- })]
35
- });
104
+ });
105
+ $[30] = items;
106
+ $[31] = t4;
107
+ $[32] = t5;
108
+ } else t5 = $[32];
109
+ let t6;
110
+ if ($[33] !== t2 || $[34] !== t5) {
111
+ t6 = /* @__PURE__ */ jsxs("div", {
112
+ className: "group/split flex items-center",
113
+ "data-split": "",
114
+ children: [t2, t5]
115
+ });
116
+ $[33] = t2;
117
+ $[34] = t5;
118
+ $[35] = t6;
119
+ } else t6 = $[35];
120
+ return t6;
36
121
  };
37
122
  //#endregion
38
123
  export { SplitButton };
@@ -1,14 +1,36 @@
1
1
  import { Button } from "../Button/Button.js";
2
+ import { c } from "react/compiler-runtime";
2
3
  import { jsx } from "react/jsx-runtime";
3
4
  //#region src/components/buttons/TextButton/TextButton.tsx
4
- var TextButton = ({ children, ...props }) => {
5
- return /* @__PURE__ */ jsx(Button, {
6
- ...props,
7
- variant: "text",
8
- size: "none",
9
- width: props.width ?? "hug",
10
- children
11
- });
5
+ var TextButton = (t0) => {
6
+ const $ = c(7);
7
+ let children;
8
+ let props;
9
+ if ($[0] !== t0) {
10
+ ({children, ...props} = t0);
11
+ $[0] = t0;
12
+ $[1] = children;
13
+ $[2] = props;
14
+ } else {
15
+ children = $[1];
16
+ props = $[2];
17
+ }
18
+ const t1 = props.width ?? "hug";
19
+ let t2;
20
+ if ($[3] !== children || $[4] !== props || $[5] !== t1) {
21
+ t2 = /* @__PURE__ */ jsx(Button, {
22
+ ...props,
23
+ variant: "text",
24
+ size: "none",
25
+ width: t1,
26
+ children
27
+ });
28
+ $[3] = children;
29
+ $[4] = props;
30
+ $[5] = t1;
31
+ $[6] = t2;
32
+ } else t2 = $[6];
33
+ return t2;
12
34
  };
13
35
  //#endregion
14
36
  export { TextButton };
@@ -1,14 +1,34 @@
1
1
  import { Button } from "../Button/Button.js";
2
+ import { c } from "react/compiler-runtime";
2
3
  import { jsx } from "react/jsx-runtime";
3
4
  //#region src/components/buttons/ToggleButton/ToggleButton.tsx
4
- var ToggleButton = ({ children, ...props }) => {
5
- return /* @__PURE__ */ jsx(Button, {
6
- ...props,
7
- toggle: true,
8
- variant: "outlined",
9
- color: "primary",
10
- children
11
- });
5
+ var ToggleButton = (t0) => {
6
+ const $ = c(6);
7
+ let children;
8
+ let props;
9
+ if ($[0] !== t0) {
10
+ ({children, ...props} = t0);
11
+ $[0] = t0;
12
+ $[1] = children;
13
+ $[2] = props;
14
+ } else {
15
+ children = $[1];
16
+ props = $[2];
17
+ }
18
+ let t1;
19
+ if ($[3] !== children || $[4] !== props) {
20
+ t1 = /* @__PURE__ */ jsx(Button, {
21
+ ...props,
22
+ toggle: true,
23
+ variant: "outlined",
24
+ color: "primary",
25
+ children
26
+ });
27
+ $[3] = children;
28
+ $[4] = props;
29
+ $[5] = t1;
30
+ } else t1 = $[5];
31
+ return t1;
12
32
  };
13
33
  //#endregion
14
34
  export { ToggleButton };
@@ -2,36 +2,94 @@ import { UIStyle } from "../../../config/uiStyle.context.js";
2
2
  import { typography } from "../../text/Typography/typography.cva.js";
3
3
  import { buttonContentLabel } from "./buttonContent.cva.js";
4
4
  import { Loader } from "../../status/Loader/Loader.js";
5
+ import { c } from "react/compiler-runtime";
5
6
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
7
  import { clsx } from "clsx";
7
8
  import { isValidElement } from "react";
8
9
  //#region src/components/buttons/shared/ButtonContent.tsx
9
- var ButtonContent = ({ ref, content, isLoading, icon: Icon, iconClassName, hideText, iconPosition = "left", typography: typographyOverrides }) => {
10
+ var ButtonContent = (t0) => {
11
+ const $ = c(21);
12
+ const { ref, content, isLoading, icon: Icon, iconClassName, hideText, iconPosition: t1, typography: typographyOverrides } = t0;
13
+ const iconPosition = t1 === void 0 ? "left" : t1;
10
14
  const typographyCva = UIStyle.useCva("typography.cva", typography);
11
15
  let iconOrLoader = null;
12
- if (isLoading) iconOrLoader = /* @__PURE__ */ jsx(Loader, { className: "shrink-0" });
13
- else if (Icon) if (isValidElement(Icon)) iconOrLoader = Icon;
14
- else iconOrLoader = /* @__PURE__ */ jsx(Icon, { className: clsx("shrink-0", iconClassName) });
15
- const resolvedTypography = {
16
- size: "label-2",
17
- variant: "prominent-1",
18
- ...typographyOverrides
19
- };
20
- return /* @__PURE__ */ jsxs(Fragment, { children: [
21
- iconOrLoader && iconPosition === "left" && iconOrLoader,
22
- /* @__PURE__ */ jsx("span", {
23
- className: clsx(typographyCva({
24
- ...resolvedTypography,
25
- sizeMobile: resolvedTypography.sizeMobile ?? resolvedTypography.size
26
- }), buttonContentLabel({
27
- iconPosition: iconOrLoader ? iconPosition : "none",
28
- hideText: !!hideText
29
- })),
16
+ if (isLoading) {
17
+ let t2;
18
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
19
+ t2 = /* @__PURE__ */ jsx(Loader, { className: "shrink-0" });
20
+ $[0] = t2;
21
+ } else t2 = $[0];
22
+ iconOrLoader = t2;
23
+ } else if (Icon) if (isValidElement(Icon)) iconOrLoader = Icon;
24
+ else {
25
+ let t2;
26
+ if ($[1] !== iconClassName) {
27
+ t2 = clsx("shrink-0", iconClassName);
28
+ $[1] = iconClassName;
29
+ $[2] = t2;
30
+ } else t2 = $[2];
31
+ let t3;
32
+ if ($[3] !== Icon || $[4] !== t2) {
33
+ t3 = /* @__PURE__ */ jsx(Icon, { className: t2 });
34
+ $[3] = Icon;
35
+ $[4] = t2;
36
+ $[5] = t3;
37
+ } else t3 = $[5];
38
+ iconOrLoader = t3;
39
+ }
40
+ let t2;
41
+ let t3;
42
+ if ($[6] !== hideText || $[7] !== iconOrLoader || $[8] !== iconPosition || $[9] !== typographyCva || $[10] !== typographyOverrides) {
43
+ const resolvedTypography = {
44
+ size: "label-2",
45
+ variant: "prominent-1",
46
+ ...typographyOverrides
47
+ };
48
+ t3 = iconOrLoader && iconPosition === "left" && iconOrLoader;
49
+ t2 = clsx(typographyCva({
50
+ ...resolvedTypography,
51
+ sizeMobile: resolvedTypography.sizeMobile ?? resolvedTypography.size
52
+ }), buttonContentLabel({
53
+ iconPosition: iconOrLoader ? iconPosition : "none",
54
+ hideText: !!hideText
55
+ }));
56
+ $[6] = hideText;
57
+ $[7] = iconOrLoader;
58
+ $[8] = iconPosition;
59
+ $[9] = typographyCva;
60
+ $[10] = typographyOverrides;
61
+ $[11] = t2;
62
+ $[12] = t3;
63
+ } else {
64
+ t2 = $[11];
65
+ t3 = $[12];
66
+ }
67
+ let t4;
68
+ if ($[13] !== content || $[14] !== ref || $[15] !== t2) {
69
+ t4 = /* @__PURE__ */ jsx("span", {
70
+ className: t2,
30
71
  ref,
31
72
  children: content
32
- }),
33
- iconOrLoader && iconPosition === "right" && iconOrLoader
34
- ] });
73
+ });
74
+ $[13] = content;
75
+ $[14] = ref;
76
+ $[15] = t2;
77
+ $[16] = t4;
78
+ } else t4 = $[16];
79
+ const t5 = iconOrLoader && iconPosition === "right" && iconOrLoader;
80
+ let t6;
81
+ if ($[17] !== t3 || $[18] !== t4 || $[19] !== t5) {
82
+ t6 = /* @__PURE__ */ jsxs(Fragment, { children: [
83
+ t3,
84
+ t4,
85
+ t5
86
+ ] });
87
+ $[17] = t3;
88
+ $[18] = t4;
89
+ $[19] = t5;
90
+ $[20] = t6;
91
+ } else t6 = $[20];
92
+ return t6;
35
93
  };
36
94
  //#endregion
37
95
  export { ButtonContent };
@@ -4,6 +4,7 @@ import { checkboxContentClassName, checkboxIndicatorClass, checkboxTypography }
4
4
  import { FormFieldError } from "../FormField/FormFieldError.js";
5
5
  import { CheckContent } from "../shared/CheckContent.js";
6
6
  import { CheckboxCheckmark } from "./CheckboxCheckmark.js";
7
+ import { c } from "react/compiler-runtime";
7
8
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
8
9
  import { clsx } from "clsx";
9
10
  import { Checkbox } from "react-aria-components";
@@ -11,28 +12,72 @@ import { mergeRefs } from "@react-aria/utils";
11
12
  import { Controller } from "react-hook-form";
12
13
  //#region src/components/inputs/Checkbox/Checkbox.tsx
13
14
  var CheckboxBase = (props) => {
15
+ const $ = c(38);
14
16
  const ui = UIConfig.useConfig();
15
17
  const checkboxTypographyMap = UIStyle.useMapper("checkbox.typography", checkboxTypography);
16
18
  const checkboxContentClassNameMap = UIStyle.useMapper("checkbox.contentClassName", checkboxContentClassName);
17
- const { className, children, isDisabled, error, variant: variantProp, hideLabel: hideLabelProp, ...rest } = props;
19
+ let children;
20
+ let className;
21
+ let error;
22
+ let hideLabelProp;
23
+ let isDisabled;
24
+ let rest;
25
+ let variantProp;
26
+ if ($[0] !== props) {
27
+ ({className, children, isDisabled, error, variant: variantProp, hideLabel: hideLabelProp, ...rest} = props);
28
+ $[0] = props;
29
+ $[1] = children;
30
+ $[2] = className;
31
+ $[3] = error;
32
+ $[4] = hideLabelProp;
33
+ $[5] = isDisabled;
34
+ $[6] = rest;
35
+ $[7] = variantProp;
36
+ } else {
37
+ children = $[1];
38
+ className = $[2];
39
+ error = $[3];
40
+ hideLabelProp = $[4];
41
+ isDisabled = $[5];
42
+ rest = $[6];
43
+ variantProp = $[7];
44
+ }
18
45
  const variant = variantProp ?? ui.checkbox.variant;
19
46
  const hideLabel = hideLabelProp ?? ui.input.hideLabel;
20
- const formFieldErrorProps = {
21
- error,
22
- isDisabled
23
- };
24
- return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs(Checkbox, {
25
- ...rest,
26
- isDisabled,
27
- isInvalid: !!error,
28
- "aria-errormessage": error || void 0,
29
- "data-is-dirty": props.isDirty || void 0,
30
- "data-is-required": props.isRequired || void 0,
31
- className: clsx("relative", checkboxIndicatorClass, className),
32
- children: [/* @__PURE__ */ jsx(CheckboxCheckmark, {
47
+ let t0;
48
+ if ($[8] !== error || $[9] !== isDisabled) {
49
+ t0 = {
50
+ error,
51
+ isDisabled
52
+ };
53
+ $[8] = error;
54
+ $[9] = isDisabled;
55
+ $[10] = t0;
56
+ } else t0 = $[10];
57
+ const formFieldErrorProps = t0;
58
+ const t1 = !!error;
59
+ const t2 = error || void 0;
60
+ const t3 = props.isDirty || void 0;
61
+ const t4 = props.isRequired || void 0;
62
+ let t5;
63
+ if ($[11] !== className) {
64
+ t5 = clsx("relative", checkboxIndicatorClass, className);
65
+ $[11] = className;
66
+ $[12] = t5;
67
+ } else t5 = $[12];
68
+ let t6;
69
+ if ($[13] !== rest || $[14] !== variant) {
70
+ t6 = /* @__PURE__ */ jsx(CheckboxCheckmark, {
33
71
  variant,
34
72
  ...rest
35
- }), !hideLabel && /* @__PURE__ */ jsx(CheckContent, {
73
+ });
74
+ $[13] = rest;
75
+ $[14] = variant;
76
+ $[15] = t6;
77
+ } else t6 = $[15];
78
+ let t7;
79
+ if ($[16] !== checkboxContentClassNameMap || $[17] !== checkboxTypographyMap || $[18] !== children || $[19] !== hideLabel || $[20] !== rest || $[21] !== variant) {
80
+ t7 = !hideLabel && /* @__PURE__ */ jsx(CheckContent, {
36
81
  typography: checkboxTypographyMap({
37
82
  variant,
38
83
  ...rest
@@ -42,29 +87,114 @@ var CheckboxBase = (props) => {
42
87
  ...rest
43
88
  }),
44
89
  children
45
- })]
46
- }), /* @__PURE__ */ jsx(FormFieldError, { ...formFieldErrorProps })] });
90
+ });
91
+ $[16] = checkboxContentClassNameMap;
92
+ $[17] = checkboxTypographyMap;
93
+ $[18] = children;
94
+ $[19] = hideLabel;
95
+ $[20] = rest;
96
+ $[21] = variant;
97
+ $[22] = t7;
98
+ } else t7 = $[22];
99
+ let t8;
100
+ if ($[23] !== isDisabled || $[24] !== rest || $[25] !== t1 || $[26] !== t2 || $[27] !== t3 || $[28] !== t4 || $[29] !== t5 || $[30] !== t6 || $[31] !== t7) {
101
+ t8 = /* @__PURE__ */ jsxs(Checkbox, {
102
+ ...rest,
103
+ isDisabled,
104
+ isInvalid: t1,
105
+ "aria-errormessage": t2,
106
+ "data-is-dirty": t3,
107
+ "data-is-required": t4,
108
+ className: t5,
109
+ children: [t6, t7]
110
+ });
111
+ $[23] = isDisabled;
112
+ $[24] = rest;
113
+ $[25] = t1;
114
+ $[26] = t2;
115
+ $[27] = t3;
116
+ $[28] = t4;
117
+ $[29] = t5;
118
+ $[30] = t6;
119
+ $[31] = t7;
120
+ $[32] = t8;
121
+ } else t8 = $[32];
122
+ let t9;
123
+ if ($[33] !== formFieldErrorProps) {
124
+ t9 = /* @__PURE__ */ jsx(FormFieldError, { ...formFieldErrorProps });
125
+ $[33] = formFieldErrorProps;
126
+ $[34] = t9;
127
+ } else t9 = $[34];
128
+ let t10;
129
+ if ($[35] !== t8 || $[36] !== t9) {
130
+ t10 = /* @__PURE__ */ jsxs(Fragment, { children: [t8, t9] });
131
+ $[35] = t8;
132
+ $[36] = t9;
133
+ $[37] = t10;
134
+ } else t10 = $[37];
135
+ return t10;
47
136
  };
48
137
  var Checkbox$1 = (props) => {
138
+ const $ = c(15);
49
139
  if ("formControl" in props && props.formControl) {
50
- const { formControl, ref, ...innerProps } = props;
51
- return /* @__PURE__ */ jsx(Controller, {
52
- control: formControl.control,
53
- name: formControl.name,
54
- render: ({ field, fieldState: { error, isDirty } }) => /* @__PURE__ */ jsx(CheckboxBase, {
55
- ...innerProps,
56
- ref: mergeRefs(ref, field.ref),
57
- isSelected: field.value,
58
- onChange: field.onChange,
59
- onBlur: field.onBlur,
60
- name: field.name,
61
- isDirty,
62
- isDisabled: field.disabled || props.isDisabled,
63
- error: props.error ?? error?.message
64
- })
65
- });
140
+ let formControl;
141
+ let innerProps;
142
+ let ref;
143
+ if ($[0] !== props) {
144
+ ({formControl, ref, ...innerProps} = props);
145
+ $[0] = props;
146
+ $[1] = formControl;
147
+ $[2] = innerProps;
148
+ $[3] = ref;
149
+ } else {
150
+ formControl = $[1];
151
+ innerProps = $[2];
152
+ ref = $[3];
153
+ }
154
+ let t0;
155
+ if ($[4] !== innerProps || $[5] !== props.error || $[6] !== props.isDisabled || $[7] !== ref) {
156
+ t0 = (t1) => {
157
+ const { field, fieldState: t2 } = t1;
158
+ const { error, isDirty } = t2;
159
+ return /* @__PURE__ */ jsx(CheckboxBase, {
160
+ ...innerProps,
161
+ ref: mergeRefs(ref, field.ref),
162
+ isSelected: field.value,
163
+ onChange: field.onChange,
164
+ onBlur: field.onBlur,
165
+ name: field.name,
166
+ isDirty,
167
+ isDisabled: field.disabled || props.isDisabled,
168
+ error: props.error ?? error?.message
169
+ });
170
+ };
171
+ $[4] = innerProps;
172
+ $[5] = props.error;
173
+ $[6] = props.isDisabled;
174
+ $[7] = ref;
175
+ $[8] = t0;
176
+ } else t0 = $[8];
177
+ let t1;
178
+ if ($[9] !== formControl.control || $[10] !== formControl.name || $[11] !== t0) {
179
+ t1 = /* @__PURE__ */ jsx(Controller, {
180
+ control: formControl.control,
181
+ name: formControl.name,
182
+ render: t0
183
+ });
184
+ $[9] = formControl.control;
185
+ $[10] = formControl.name;
186
+ $[11] = t0;
187
+ $[12] = t1;
188
+ } else t1 = $[12];
189
+ return t1;
66
190
  }
67
- return /* @__PURE__ */ jsx(CheckboxBase, { ...props });
191
+ let t0;
192
+ if ($[13] !== props) {
193
+ t0 = /* @__PURE__ */ jsx(CheckboxBase, { ...props });
194
+ $[13] = props;
195
+ $[14] = t0;
196
+ } else t0 = $[14];
197
+ return t0;
68
198
  };
69
199
  //#endregion
70
200
  export { Checkbox$1 as Checkbox };
@@ -2,24 +2,38 @@ import { CheckboxCheckmarkIcon } from "../../../assets/icons/CheckboxCheckmark.j
2
2
  import { CheckboxIndeterminateIcon } from "../../../assets/icons/CheckboxIndeterminate.js";
3
3
  import { UIStyle } from "../../../config/uiStyle.context.js";
4
4
  import { checkbox, checkboxIcon } from "./checkbox.cva.js";
5
+ import { c } from "react/compiler-runtime";
5
6
  import { jsx, jsxs } from "react/jsx-runtime";
6
7
  //#region src/components/inputs/Checkbox/CheckboxCheckmark.tsx
7
- var CheckboxCheckmark = ({ variant, className, selectedIcon: SelectedIcon = CheckboxCheckmarkIcon, indeterminateIcon: IndeterminateIcon = CheckboxIndeterminateIcon, ...props }) => {
8
+ var CheckboxCheckmark = (t0) => {
9
+ const $ = c(3);
10
+ const { variant, className, selectedIcon: t1, indeterminateIcon: t2, ...props } = t0;
11
+ const SelectedIcon = t1 === void 0 ? CheckboxCheckmarkIcon : t1;
12
+ const IndeterminateIcon = t2 === void 0 ? CheckboxIndeterminateIcon : t2;
8
13
  const checkboxCva = UIStyle.useCva("checkbox.cva", checkbox);
9
14
  const checkboxIconCva = UIStyle.useCva("checkbox.iconCva", checkboxIcon);
15
+ const t3 = checkboxCva({
16
+ variant,
17
+ ...props,
18
+ className
19
+ });
20
+ const t4 = checkboxIconCva({
21
+ ...props,
22
+ iconVariant: "indeterminate"
23
+ });
24
+ let t5;
25
+ if ($[0] !== IndeterminateIcon || $[1] !== t4) {
26
+ t5 = /* @__PURE__ */ jsx(IndeterminateIcon, { className: t4 });
27
+ $[0] = IndeterminateIcon;
28
+ $[1] = t4;
29
+ $[2] = t5;
30
+ } else t5 = $[2];
10
31
  return /* @__PURE__ */ jsxs("div", {
11
- className: checkboxCva({
12
- variant,
13
- ...props,
14
- className
15
- }),
32
+ className: t3,
16
33
  children: [/* @__PURE__ */ jsx(SelectedIcon, { className: checkboxIconCva({
17
34
  ...props,
18
35
  iconVariant: "selected"
19
- }) }), /* @__PURE__ */ jsx(IndeterminateIcon, { className: checkboxIconCva({
20
- ...props,
21
- iconVariant: "indeterminate"
22
- }) })]
36
+ }) }), t5]
23
37
  });
24
38
  };
25
39
  //#endregion
@@ -84,9 +84,9 @@ var DatePickerBase = (props) => {
84
84
  ...rest,
85
85
  shouldForceLeadingZeros,
86
86
  value,
87
- onChange: (val) => {
88
- let normalizedValue = val;
89
- if (val) normalizedValue = normalizeByGranularity(val);
87
+ onChange: (val_0) => {
88
+ let normalizedValue = val_0;
89
+ if (val_0) normalizedValue = normalizeByGranularity(val_0);
90
90
  if (normalizedValue && (rest.minValue && normalizedValue < rest?.minValue || rest?.maxValue && normalizedValue > rest?.maxValue)) {
91
91
  state.setValue(state.value);
92
92
  return;
@@ -267,14 +267,14 @@ var DatePicker = ({ fullIso = true, granularity = "day", minValue, maxValue, ren
267
267
  if (calendarDate === null) return null;
268
268
  const normalizedDate = normalizeByGranularity(calendarDate);
269
269
  if (fullIso) return DateTimeUtils.fromCalendarDateToUTCISO(normalizedDate);
270
- const date = DateTimeUtils.fromDateValueToLocal(normalizedDate);
271
- return DateTime.fromJSDate(date).toISODate();
270
+ const date_0 = DateTimeUtils.fromDateValueToLocal(normalizedDate);
271
+ return DateTime.fromJSDate(date_0).toISODate();
272
272
  };
273
273
  const parseCalendarDate = (formattedDate) => {
274
274
  if (formattedDate == null) return formattedDate;
275
275
  if (fullIso) return normalizeByGranularity(DateTimeUtils.fromUTCISOToCalendarDate(formattedDate));
276
- const date = DateTime.fromISO(formattedDate).toJSDate();
277
- return normalizeByGranularity(toCalendarDate(DateTimeUtils.fromLocalToZonedDateTime(date)));
276
+ const date_1 = DateTime.fromISO(formattedDate).toJSDate();
277
+ return normalizeByGranularity(toCalendarDate(DateTimeUtils.fromLocalToZonedDateTime(date_1)));
278
278
  };
279
279
  const dateLimits = {
280
280
  minValue: typeof minValue === "string" ? parseCalendarDate(minValue) : minValue,
@@ -351,7 +351,7 @@ var DatePicker = ({ fullIso = true, granularity = "day", minValue, maxValue, ren
351
351
  ref: mergeRefs(props.ref, inputRef),
352
352
  granularity,
353
353
  value: parseCalendarDate(props.value),
354
- onChange: (value) => props.onChange?.(formatCalendarDate(value))
354
+ onChange: (value_0) => props.onChange?.(formatCalendarDate(value_0))
355
355
  });
356
356
  };
357
357
  //#endregion