@povio/ui 2.3.0-rc.3 → 2.3.0-rc.33

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 (218) 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.d.ts +1 -0
  61. package/dist/components/inputs/Checkbox/Checkbox.js +188 -34
  62. package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +24 -10
  63. package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +1 -0
  64. package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +268 -87
  65. package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +1 -0
  66. package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +348 -182
  67. package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +1 -0
  68. package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +178 -69
  69. package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +1 -0
  70. package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +530 -157
  71. package/dist/components/inputs/DateTime/shared/Calendar.js +333 -137
  72. package/dist/components/inputs/DateTime/shared/CalendarCell.d.ts +2 -1
  73. package/dist/components/inputs/DateTime/shared/CalendarCell.js +301 -102
  74. package/dist/components/inputs/DateTime/shared/CalendarGrid.d.ts +2 -1
  75. package/dist/components/inputs/DateTime/shared/CalendarGrid.js +146 -33
  76. package/dist/components/inputs/DateTime/shared/CalendarHeader.js +245 -90
  77. package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +318 -137
  78. package/dist/components/inputs/DateTime/shared/DateField.js +311 -112
  79. package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +7 -1
  80. package/dist/components/inputs/DateTime/shared/DatePickerInput.js +376 -146
  81. package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +94 -21
  82. package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +81 -27
  83. package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +59 -10
  84. package/dist/components/inputs/DateTime/shared/MonthPicker.js +103 -58
  85. package/dist/components/inputs/DateTime/shared/RangeCalendar.js +193 -82
  86. package/dist/components/inputs/DateTime/shared/TimeField.js +27 -8
  87. package/dist/components/inputs/DateTime/shared/TimePickerForm.js +279 -110
  88. package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +3 -1
  89. package/dist/components/inputs/DateTime/shared/TimePickerInput.js +208 -70
  90. package/dist/components/inputs/DateTime/shared/YearPicker.js +119 -68
  91. package/dist/components/inputs/File/FileUpload.js +86 -44
  92. package/dist/components/inputs/File/FileUploadContainer.js +15 -7
  93. package/dist/components/inputs/File/InputUpload.js +317 -79
  94. package/dist/components/inputs/File/shared/FileCard.js +104 -41
  95. package/dist/components/inputs/File/shared/FileCardList.js +47 -12
  96. package/dist/components/inputs/File/shared/FileUploadContent.js +175 -44
  97. package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +149 -46
  98. package/dist/components/inputs/File/shared/FileUploadContentError.js +234 -93
  99. package/dist/components/inputs/File/shared/FileUploadContentFilled.js +230 -97
  100. package/dist/components/inputs/File/shared/FileUploadContentLoading.js +199 -55
  101. package/dist/components/inputs/File/shared/InputUploadContent.js +148 -35
  102. package/dist/components/inputs/File/shared/InputUploadFilled.js +49 -8
  103. package/dist/components/inputs/File/shared/ProgressBar.js +48 -9
  104. package/dist/components/inputs/FormField/FormField.js +119 -37
  105. package/dist/components/inputs/FormField/FormFieldError.js +25 -5
  106. package/dist/components/inputs/FormField/FormFieldHeader.js +79 -22
  107. package/dist/components/inputs/FormField/FormFieldHeaderClose.js +31 -7
  108. package/dist/components/inputs/FormField/FormFieldHelper.js +26 -6
  109. package/dist/components/inputs/FormField/FormFieldLabel.js +40 -9
  110. package/dist/components/inputs/Input/NumberInput/NumberInput.js +392 -123
  111. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +541 -116
  112. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +463 -146
  113. package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +48 -9
  114. package/dist/components/inputs/Input/TextArea/TextArea.js +298 -89
  115. package/dist/components/inputs/Input/TextInput/TextInput.js +370 -121
  116. package/dist/components/inputs/Input/shared/InputContent.js +190 -58
  117. package/dist/components/inputs/Inputs/Form.js +40 -11
  118. package/dist/components/inputs/Inputs/InputItem.d.ts +0 -1
  119. package/dist/components/inputs/Inputs/InputItem.js +65 -16
  120. package/dist/components/inputs/Inputs/Inputs.js +37 -11
  121. package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +1 -0
  122. package/dist/components/inputs/RadioGroup/RadioGroup.js +333 -107
  123. package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +145 -50
  124. package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +3 -2
  125. package/dist/components/inputs/Selection/Select/QuerySelect.js +107 -27
  126. package/dist/components/inputs/Selection/Select/Select.js +139 -44
  127. package/dist/components/inputs/Selection/shared/SelectBase.js +69 -20
  128. package/dist/components/inputs/Selection/shared/SelectDesktop.js +390 -143
  129. package/dist/components/inputs/Selection/shared/SelectInput.d.ts +2 -2
  130. package/dist/components/inputs/Selection/shared/SelectInput.js +326 -136
  131. package/dist/components/inputs/Selection/shared/SelectInputTags.js +99 -25
  132. package/dist/components/inputs/Selection/shared/SelectListBox.js +163 -51
  133. package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +85 -35
  134. package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +69 -16
  135. package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +70 -21
  136. package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +58 -9
  137. package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.d.ts +9 -0
  138. package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +47 -0
  139. package/dist/components/inputs/Selection/shared/select.context.d.ts +2 -2
  140. package/dist/components/inputs/Selection/shared/select.context.js +44 -38
  141. package/dist/components/inputs/Selection/shared/selectInput.cva.d.ts +5 -0
  142. package/dist/components/inputs/Selection/shared/selectInput.cva.js +5 -0
  143. package/dist/components/inputs/Selection/shared/useSelectItems.js +109 -49
  144. package/dist/components/inputs/Skeleton/InputFrame.d.ts +2 -0
  145. package/dist/components/inputs/Skeleton/InputFrame.js +444 -124
  146. package/dist/components/inputs/Slider/Slider.js +247 -74
  147. package/dist/components/inputs/TextEditor/TextEditor.js +447 -103
  148. package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +37 -11
  149. package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +102 -30
  150. package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +194 -45
  151. package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +88 -28
  152. package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +48 -14
  153. package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.js +66 -19
  154. package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +49 -15
  155. package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +92 -32
  156. package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +126 -54
  157. package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +141 -38
  158. package/dist/components/inputs/Toggle/Toggle.d.ts +1 -0
  159. package/dist/components/inputs/Toggle/Toggle.js +206 -41
  160. package/dist/components/inputs/shared/CheckContent.js +21 -10
  161. package/dist/components/inputs/shared/InputClear.js +78 -21
  162. package/dist/components/inputs/shared/TooltipWrapper.js +47 -12
  163. package/dist/components/inputs/shared/input.cva.js +13 -3
  164. package/dist/components/inputs/shared/useStaticInputHandoff.d.ts +1 -0
  165. package/dist/components/inputs/shared/useStaticInputHandoff.js +87 -34
  166. package/dist/components/navigation/Accordion/Accordion.js +69 -22
  167. package/dist/components/navigation/Accordion/AccordionItem.js +86 -41
  168. package/dist/components/navigation/Stepper/Stepper.js +67 -22
  169. package/dist/components/navigation/Stepper/StepperItem.js +104 -31
  170. package/dist/components/navigation/Stepper/StepperSeparator.js +23 -5
  171. package/dist/components/overlays/ActionModal/ActionModal.js +169 -35
  172. package/dist/components/overlays/BottomSheet/BottomSheet.js +96 -23
  173. package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +48 -8
  174. package/dist/components/overlays/Drawer/Drawer.js +62 -20
  175. package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +83 -27
  176. package/dist/components/overlays/Tooltip/Tooltip.js +137 -28
  177. package/dist/components/overlays/Tooltip/TooltipEllipsis.js +37 -12
  178. package/dist/components/segment/Segment.js +218 -57
  179. package/dist/components/segment/SegmentItem.js +67 -10
  180. package/dist/components/shared/pagination/Pagination.js +108 -22
  181. package/dist/components/shared/pagination/PaginationList.js +167 -64
  182. package/dist/components/status/Alert/Alert.js +97 -30
  183. package/dist/components/status/Loader/Loader.js +77 -22
  184. package/dist/components/status/Toast/Toast.js +21 -13
  185. package/dist/components/status/Toast/useToast.js +62 -57
  186. package/dist/components/table/ColumnConfig.js +158 -54
  187. package/dist/components/table/InfiniteTable.js +67 -16
  188. package/dist/components/table/PaginatedTable.js +84 -18
  189. package/dist/components/table/Table.js +28 -27
  190. package/dist/components/text/Link/Link.js +19 -7
  191. package/dist/components/text/Typography/Typography.js +23 -8
  192. package/dist/config/confirmation.context.js +1 -1
  193. package/dist/config/link.context.js +23 -9
  194. package/dist/config/router.context.js +42 -16
  195. package/dist/config/theme.context.js +98 -45
  196. package/dist/config/uiConfig.context.d.ts +4 -4
  197. package/dist/config/uiConfig.context.js +50 -11
  198. package/dist/config/uiStyle.context.js +15 -5
  199. package/dist/helpers/dynamicInputs.d.ts +1 -1
  200. package/dist/hooks/useBreakpoint.js +16 -3
  201. package/dist/hooks/useDebounceCallback.js +51 -17
  202. package/dist/hooks/useFilters.js +125 -64
  203. package/dist/hooks/useForm.js +42 -8
  204. package/dist/hooks/useFormAutosave.js +101 -30
  205. package/dist/hooks/useIntersectionObserver.js +86 -32
  206. package/dist/hooks/useLocalStorage.js +43 -10
  207. package/dist/hooks/useLongPressRepeat.js +55 -20
  208. package/dist/hooks/usePagination.js +49 -19
  209. package/dist/hooks/useQueryAutocomplete.js +1 -0
  210. package/dist/hooks/useScrollableListBox.js +37 -16
  211. package/dist/hooks/useSorting.js +69 -28
  212. package/dist/hooks/useStateAndRef.js +21 -7
  213. package/dist/hooks/useTableColumnConfig.js +124 -31
  214. package/dist/hooks/useTranslationMemo.js +25 -5
  215. package/dist/index.js +2 -2
  216. package/dist/utils/date-time.utils.d.ts +2 -0
  217. package/dist/utils/date-time.utils.js +17 -13
  218. package/package.json +1 -1
@@ -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 };
@@ -1,5 +1,6 @@
1
1
  import { UIStyle } from "../../../config/uiStyle.context.js";
2
2
  import { uiOutlineClass } from "../../outline.clsx.js";
3
+ import { c } from "react/compiler-runtime";
3
4
  import { clsx } from "clsx";
4
5
  import { cva } from "class-variance-authority";
5
6
  //#region src/components/inputs/shared/input.cva.ts
@@ -288,11 +289,20 @@ var inputSide = cva("", {
288
289
  defaultVariants: { size: "default" }
289
290
  });
290
291
  var useInputCva = () => {
292
+ const $ = c(3);
291
293
  const inputBaseCva = UIStyle.useCva("input.baseCva", inputBase);
292
294
  const inputSizeCva = UIStyle.useCva("input.sizeCva", inputSize);
293
- return ({ className, ...rest }) => {
294
- return clsx(inputBaseCva(rest), inputSizeCva(rest), className);
295
- };
295
+ let t0;
296
+ if ($[0] !== inputBaseCva || $[1] !== inputSizeCva) {
297
+ t0 = (t1) => {
298
+ const { className, ...rest } = t1;
299
+ return clsx(inputBaseCva(rest), inputSizeCva(rest), className);
300
+ };
301
+ $[0] = inputBaseCva;
302
+ $[1] = inputSizeCva;
303
+ $[2] = t0;
304
+ } else t0 = $[2];
305
+ return t0;
296
306
  };
297
307
  //#endregion
298
308
  export { inputBase, inputClearClass, inputContentWrapper, inputSide, inputSize, useInputCva };
@@ -9,5 +9,6 @@ export declare const useStaticInputHandoff: <TElement extends HTMLElement = HTML
9
9
  shouldFocus: boolean;
10
10
  renderRealInput: (focus: boolean) => void;
11
11
  replayStaticInputChange: (value: string) => void;
12
+ replayStaticInputPress: () => void;
12
13
  };
13
14
  export {};
@@ -1,47 +1,100 @@
1
+ import { c } from "react/compiler-runtime";
1
2
  import { useLayoutEffect, useRef, useState } from "react";
2
3
  //#region src/components/inputs/shared/useStaticInputHandoff.ts
3
- var useStaticInputHandoff = ({ inputRef, renderInput, setRenderInput, getFocusTarget }) => {
4
+ var useStaticInputHandoff = (t0) => {
5
+ const $ = c(15);
6
+ const { inputRef, renderInput, setRenderInput, getFocusTarget } = t0;
4
7
  const [shouldFocus, setShouldFocus] = useState(false);
5
8
  const pendingStaticChangeRef = useRef(null);
6
- useLayoutEffect(() => {
7
- if (!renderInput || !shouldFocus) return;
8
- const focusRealInput = (replayPendingChange) => {
9
- const input = inputRef.current;
10
- const pendingValue = pendingStaticChangeRef.current;
11
- const focusTarget = input ? getFocusTarget?.(input) ?? input : null;
12
- if (replayPendingChange && focusTarget instanceof HTMLInputElement && pendingValue != null) {
13
- (Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value")?.set)?.call(focusTarget, pendingValue);
14
- focusTarget.dispatchEvent(new Event("input", { bubbles: true }));
15
- pendingStaticChangeRef.current = null;
16
- }
17
- focusTarget?.focus();
9
+ const shouldReplayStaticPressRef = useRef(false);
10
+ let t1;
11
+ let t2;
12
+ if ($[0] !== getFocusTarget || $[1] !== inputRef || $[2] !== renderInput || $[3] !== shouldFocus) {
13
+ t1 = () => {
14
+ if (!renderInput || !shouldFocus) return;
15
+ const focusRealInput = (replayPendingInteraction) => {
16
+ const input = inputRef.current;
17
+ const pendingValue = pendingStaticChangeRef.current;
18
+ const focusTarget = input ? getFocusTarget?.(input) ?? input : null;
19
+ if (replayPendingInteraction && focusTarget instanceof HTMLInputElement && pendingValue != null) {
20
+ (Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value")?.set)?.call(focusTarget, pendingValue);
21
+ focusTarget.dispatchEvent(new Event("input", { bubbles: true }));
22
+ pendingStaticChangeRef.current = null;
23
+ }
24
+ focusTarget?.focus();
25
+ if (replayPendingInteraction && shouldReplayStaticPressRef.current) {
26
+ shouldReplayStaticPressRef.current = false;
27
+ focusTarget?.click();
28
+ }
29
+ };
30
+ focusRealInput(true);
31
+ const frame = requestAnimationFrame(() => {
32
+ focusRealInput(false);
33
+ setShouldFocus(false);
34
+ });
35
+ return () => {
36
+ cancelAnimationFrame(frame);
37
+ };
18
38
  };
19
- focusRealInput(true);
20
- const frame = requestAnimationFrame(() => {
21
- focusRealInput(false);
22
- setShouldFocus(false);
23
- });
24
- return () => {
25
- cancelAnimationFrame(frame);
26
- };
27
- }, [
28
- getFocusTarget,
29
- inputRef,
30
- renderInput,
31
- shouldFocus
32
- ]);
33
- return {
34
- shouldFocus,
35
- renderRealInput: (focus) => {
39
+ t2 = [
40
+ getFocusTarget,
41
+ inputRef,
42
+ renderInput,
43
+ shouldFocus
44
+ ];
45
+ $[0] = getFocusTarget;
46
+ $[1] = inputRef;
47
+ $[2] = renderInput;
48
+ $[3] = shouldFocus;
49
+ $[4] = t1;
50
+ $[5] = t2;
51
+ } else {
52
+ t1 = $[4];
53
+ t2 = $[5];
54
+ }
55
+ useLayoutEffect(t1, t2);
56
+ let t3;
57
+ let t4;
58
+ let t5;
59
+ if ($[6] !== setRenderInput) {
60
+ t3 = (focus) => {
36
61
  setShouldFocus(focus);
37
62
  setRenderInput(true);
38
- },
39
- replayStaticInputChange: (value) => {
63
+ };
64
+ t4 = (value) => {
40
65
  pendingStaticChangeRef.current = value;
41
66
  setShouldFocus(true);
42
67
  setRenderInput(true);
43
- }
44
- };
68
+ };
69
+ t5 = () => {
70
+ shouldReplayStaticPressRef.current = true;
71
+ setShouldFocus(true);
72
+ setRenderInput(true);
73
+ };
74
+ $[6] = setRenderInput;
75
+ $[7] = t3;
76
+ $[8] = t4;
77
+ $[9] = t5;
78
+ } else {
79
+ t3 = $[7];
80
+ t4 = $[8];
81
+ t5 = $[9];
82
+ }
83
+ let t6;
84
+ if ($[10] !== shouldFocus || $[11] !== t3 || $[12] !== t4 || $[13] !== t5) {
85
+ t6 = {
86
+ shouldFocus,
87
+ renderRealInput: t3,
88
+ replayStaticInputChange: t4,
89
+ replayStaticInputPress: t5
90
+ };
91
+ $[10] = shouldFocus;
92
+ $[11] = t3;
93
+ $[12] = t4;
94
+ $[13] = t5;
95
+ $[14] = t6;
96
+ } else t6 = $[14];
97
+ return t6;
45
98
  };
46
99
  //#endregion
47
100
  export { useStaticInputHandoff };
@@ -1,34 +1,81 @@
1
1
  import { UIStyle } from "../../../config/uiStyle.context.js";
2
2
  import { accordionCva } from "./accordion.cva.js";
3
3
  import { AccordionItem } from "./AccordionItem.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 { DisclosureGroup } from "react-aria-components";
7
8
  //#region src/components/navigation/Accordion/Accordion.tsx
8
- var Accordion = ({ items, variant = "filled", actionPosition = "right", allowsMultipleExpanded = false, expandedKeys, defaultExpandedKeys, onExpandedChange, className, disabled }) => {
9
- return /* @__PURE__ */ jsx(DisclosureGroup, {
10
- allowsMultipleExpanded,
11
- expandedKeys,
12
- defaultExpandedKeys,
13
- onExpandedChange,
14
- className: clsx(UIStyle.useCva("accordion.cva", accordionCva)({
9
+ var Accordion = (t0) => {
10
+ const $ = c(23);
11
+ const { items, variant: t1, actionPosition: t2, allowsMultipleExpanded: t3, expandedKeys, defaultExpandedKeys, onExpandedChange, className, disabled } = t0;
12
+ const variant = t1 === void 0 ? "filled" : t1;
13
+ const actionPosition = t2 === void 0 ? "right" : t2;
14
+ const allowsMultipleExpanded = t3 === void 0 ? false : t3;
15
+ const accordionCva$1 = UIStyle.useCva("accordion.cva", accordionCva);
16
+ const t4 = items.length === 1;
17
+ let t5;
18
+ if ($[0] !== accordionCva$1 || $[1] !== className || $[2] !== t4 || $[3] !== variant) {
19
+ t5 = clsx(accordionCva$1({
15
20
  className,
16
21
  variant,
17
- singleItem: items.length === 1
18
- })),
19
- isDisabled: disabled,
20
- children: items.map((item) => /* @__PURE__ */ jsx(AccordionItem, {
21
- id: item.id,
22
- heading: item.heading,
23
- subheading: item.subheading,
24
- icon: item.icon,
25
- variant,
26
- actionPosition,
27
- disabled: item.disabled || disabled,
28
- isSingle: items.length === 1,
29
- children: item.children
30
- }, item.id))
31
- });
22
+ singleItem: t4
23
+ }));
24
+ $[0] = accordionCva$1;
25
+ $[1] = className;
26
+ $[2] = t4;
27
+ $[3] = variant;
28
+ $[4] = t5;
29
+ } else t5 = $[4];
30
+ let t6;
31
+ if ($[5] !== actionPosition || $[6] !== disabled || $[7] !== items || $[8] !== variant) {
32
+ let t7;
33
+ if ($[10] !== actionPosition || $[11] !== disabled || $[12] !== items.length || $[13] !== variant) {
34
+ t7 = (item) => /* @__PURE__ */ jsx(AccordionItem, {
35
+ id: item.id,
36
+ heading: item.heading,
37
+ subheading: item.subheading,
38
+ icon: item.icon,
39
+ variant,
40
+ actionPosition,
41
+ disabled: item.disabled || disabled,
42
+ isSingle: items.length === 1,
43
+ children: item.children
44
+ }, item.id);
45
+ $[10] = actionPosition;
46
+ $[11] = disabled;
47
+ $[12] = items.length;
48
+ $[13] = variant;
49
+ $[14] = t7;
50
+ } else t7 = $[14];
51
+ t6 = items.map(t7);
52
+ $[5] = actionPosition;
53
+ $[6] = disabled;
54
+ $[7] = items;
55
+ $[8] = variant;
56
+ $[9] = t6;
57
+ } else t6 = $[9];
58
+ let t7;
59
+ if ($[15] !== allowsMultipleExpanded || $[16] !== defaultExpandedKeys || $[17] !== disabled || $[18] !== expandedKeys || $[19] !== onExpandedChange || $[20] !== t5 || $[21] !== t6) {
60
+ t7 = /* @__PURE__ */ jsx(DisclosureGroup, {
61
+ allowsMultipleExpanded,
62
+ expandedKeys,
63
+ defaultExpandedKeys,
64
+ onExpandedChange,
65
+ className: t5,
66
+ isDisabled: disabled,
67
+ children: t6
68
+ });
69
+ $[15] = allowsMultipleExpanded;
70
+ $[16] = defaultExpandedKeys;
71
+ $[17] = disabled;
72
+ $[18] = expandedKeys;
73
+ $[19] = onExpandedChange;
74
+ $[20] = t5;
75
+ $[21] = t6;
76
+ $[22] = t7;
77
+ } else t7 = $[22];
78
+ return t7;
32
79
  };
33
80
  //#endregion
34
81
  export { Accordion };
@@ -2,10 +2,15 @@ import { ChevronDownIcon } from "../../../assets/icons/ChevronDown.js";
2
2
  import { UIStyle } from "../../../config/uiStyle.context.js";
3
3
  import { Typography } from "../../text/Typography/Typography.js";
4
4
  import { accordionChevronCva, accordionHeadingCva, accordionHeadingSubtitleCva, accordionHeadingTitleCva, accordionIconCva, accordionItemCva, accordionPanelContentCva, accordionPanelCva, accordionTriggerCva } from "./accordion.cva.js";
5
+ import { c } from "react/compiler-runtime";
5
6
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
7
  import { Button, Disclosure, DisclosurePanel, Heading } from "react-aria-components";
7
8
  //#region src/components/navigation/Accordion/AccordionItem.tsx
8
- var AccordionItem = ({ id, disabled, heading, subheading, children, icon: Icon, variant = "filled", actionPosition = "right", isSingle }) => {
9
+ var AccordionItem = (t0) => {
10
+ const $ = c(25);
11
+ const { id, disabled, heading, subheading, children, icon: Icon, variant: t1, actionPosition: t2, isSingle } = t0;
12
+ const variant = t1 === void 0 ? "filled" : t1;
13
+ const actionPosition = t2 === void 0 ? "right" : t2;
9
14
  const itemCva = UIStyle.useCva("accordion.itemCva", accordionItemCva);
10
15
  const triggerCva = UIStyle.useCva("accordion.triggerCva", accordionTriggerCva);
11
16
  const headingCva = UIStyle.useCva("accordion.headingCva", accordionHeadingCva);
@@ -15,49 +20,89 @@ var AccordionItem = ({ id, disabled, heading, subheading, children, icon: Icon,
15
20
  const iconCva = UIStyle.useCva("accordion.iconCva", accordionIconCva);
16
21
  const panelCva = UIStyle.useCva("accordion.panelCva", accordionPanelCva);
17
22
  const panelContentCva = UIStyle.useCva("accordion.panelContentCva", accordionPanelContentCva);
18
- return /* @__PURE__ */ jsx(Disclosure, {
19
- id,
20
- className: itemCva({
23
+ let t3;
24
+ if ($[0] !== isSingle || $[1] !== itemCva || $[2] !== variant) {
25
+ t3 = itemCva({
21
26
  variant,
22
27
  singleItem: isSingle
23
- }),
24
- isDisabled: disabled,
25
- children: ({ isExpanded }) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Heading, { children: /* @__PURE__ */ jsxs(Button, {
26
- slot: "trigger",
27
- className: triggerCva({
28
- variant,
29
- actionPosition,
30
- disabled
31
- }),
32
- children: [/* @__PURE__ */ jsx("div", {
33
- className: headingCva({}),
34
- children: /* @__PURE__ */ jsxs("div", {
35
- className: "flex flex-1 items-center gap-accordion-gap-icon-to-text",
36
- children: [
37
- Icon && /* @__PURE__ */ jsx(Icon, { className: iconCva({}) }),
38
- /* @__PURE__ */ jsx(Typography, {
39
- size: "label-2",
40
- variant: "default",
41
- className: headingTitleCva({}),
42
- children: heading
43
- }),
44
- subheading && /* @__PURE__ */ jsx(Typography, {
45
- size: "label-3",
46
- variant: "default",
47
- className: headingSubtitleCva({}),
48
- children: subheading
49
- })
50
- ]
28
+ });
29
+ $[0] = isSingle;
30
+ $[1] = itemCva;
31
+ $[2] = variant;
32
+ $[3] = t3;
33
+ } else t3 = $[3];
34
+ let t4;
35
+ if ($[4] !== Icon || $[5] !== actionPosition || $[6] !== chevronCva || $[7] !== children || $[8] !== disabled || $[9] !== heading || $[10] !== headingCva || $[11] !== headingSubtitleCva || $[12] !== headingTitleCva || $[13] !== iconCva || $[14] !== panelContentCva || $[15] !== panelCva || $[16] !== subheading || $[17] !== triggerCva || $[18] !== variant) {
36
+ t4 = (t5) => {
37
+ const { isExpanded } = t5;
38
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Heading, { children: /* @__PURE__ */ jsxs(Button, {
39
+ slot: "trigger",
40
+ className: triggerCva({
41
+ variant,
42
+ actionPosition,
43
+ disabled
44
+ }),
45
+ children: [/* @__PURE__ */ jsx("div", {
46
+ className: headingCva({}),
47
+ children: /* @__PURE__ */ jsxs("div", {
48
+ className: "flex flex-1 items-center gap-accordion-gap-icon-to-text",
49
+ children: [
50
+ Icon && /* @__PURE__ */ jsx(Icon, { className: iconCva({}) }),
51
+ /* @__PURE__ */ jsx(Typography, {
52
+ size: "label-2",
53
+ variant: "default",
54
+ className: headingTitleCva({}),
55
+ children: heading
56
+ }),
57
+ subheading && /* @__PURE__ */ jsx(Typography, {
58
+ size: "label-3",
59
+ variant: "default",
60
+ className: headingSubtitleCva({}),
61
+ children: subheading
62
+ })
63
+ ]
64
+ })
65
+ }), /* @__PURE__ */ jsx(ChevronDownIcon, { className: chevronCva({ isExpanded }) })]
66
+ }) }), /* @__PURE__ */ jsx(DisclosurePanel, {
67
+ className: panelCva({ isExpanded }),
68
+ children: /* @__PURE__ */ jsx("div", {
69
+ className: panelContentCva({}),
70
+ children
51
71
  })
52
- }), /* @__PURE__ */ jsx(ChevronDownIcon, { className: chevronCva({ isExpanded }) })]
53
- }) }), /* @__PURE__ */ jsx(DisclosurePanel, {
54
- className: panelCva({ isExpanded }),
55
- children: /* @__PURE__ */ jsx("div", {
56
- className: panelContentCva({}),
57
- children
58
- })
59
- })] })
60
- });
72
+ })] });
73
+ };
74
+ $[4] = Icon;
75
+ $[5] = actionPosition;
76
+ $[6] = chevronCva;
77
+ $[7] = children;
78
+ $[8] = disabled;
79
+ $[9] = heading;
80
+ $[10] = headingCva;
81
+ $[11] = headingSubtitleCva;
82
+ $[12] = headingTitleCva;
83
+ $[13] = iconCva;
84
+ $[14] = panelContentCva;
85
+ $[15] = panelCva;
86
+ $[16] = subheading;
87
+ $[17] = triggerCva;
88
+ $[18] = variant;
89
+ $[19] = t4;
90
+ } else t4 = $[19];
91
+ let t5;
92
+ if ($[20] !== disabled || $[21] !== id || $[22] !== t3 || $[23] !== t4) {
93
+ t5 = /* @__PURE__ */ jsx(Disclosure, {
94
+ id,
95
+ className: t3,
96
+ isDisabled: disabled,
97
+ children: t4
98
+ });
99
+ $[20] = disabled;
100
+ $[21] = id;
101
+ $[22] = t3;
102
+ $[23] = t4;
103
+ $[24] = t5;
104
+ } else t5 = $[24];
105
+ return t5;
61
106
  };
62
107
  //#endregion
63
108
  export { AccordionItem };
@@ -2,33 +2,78 @@ import { UIStyle } from "../../../config/uiStyle.context.js";
2
2
  import { stepperCva } from "./stepper.cva.js";
3
3
  import { StepperItem } from "./StepperItem.js";
4
4
  import { StepperSeparator } from "./StepperSeparator.js";
5
+ import { c } from "react/compiler-runtime";
5
6
  import { jsx, jsxs } from "react/jsx-runtime";
6
7
  import { Fragment as Fragment$1 } from "react";
7
8
  //#region src/components/navigation/Stepper/Stepper.tsx
8
- var Stepper = ({ steps, currentStep, orientation = "horizontal", contentOrientation = "horizontal", iconsOnly, titlesOnly, onStepClick, className }) => {
9
- return /* @__PURE__ */ jsx("div", {
10
- className: UIStyle.useCva("stepper.cva", stepperCva)({
9
+ var Stepper = (t0) => {
10
+ const $ = c(23);
11
+ const { steps, currentStep, orientation: t1, contentOrientation: t2, iconsOnly, titlesOnly, onStepClick, className } = t0;
12
+ const orientation = t1 === void 0 ? "horizontal" : t1;
13
+ const contentOrientation = t2 === void 0 ? "horizontal" : t2;
14
+ const stepperCva$1 = UIStyle.useCva("stepper.cva", stepperCva);
15
+ let t3;
16
+ if ($[0] !== className || $[1] !== orientation || $[2] !== stepperCva$1) {
17
+ t3 = stepperCva$1({
11
18
  orientation,
12
19
  className
13
- }),
14
- role: "group",
15
- "aria-label": "Progress",
16
- children: steps.map((step, index) => {
17
- const status = index < currentStep ? "completed" : index === currentStep ? "active" : "todo";
18
- return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(StepperItem, {
19
- step,
20
- stepNumber: index + 1,
21
- status,
22
- contentOrientation,
23
- iconsOnly,
24
- titlesOnly,
25
- onPress: onStepClick && status === "completed" ? () => onStepClick(index) : void 0
26
- }), index < steps.length - 1 && /* @__PURE__ */ jsx(StepperSeparator, {
27
- orientation,
28
- contentOrientation
29
- })] }, step.id);
30
- })
31
- });
20
+ });
21
+ $[0] = className;
22
+ $[1] = orientation;
23
+ $[2] = stepperCva$1;
24
+ $[3] = t3;
25
+ } else t3 = $[3];
26
+ let t4;
27
+ if ($[4] !== contentOrientation || $[5] !== currentStep || $[6] !== iconsOnly || $[7] !== onStepClick || $[8] !== orientation || $[9] !== steps || $[10] !== titlesOnly) {
28
+ let t5;
29
+ if ($[12] !== contentOrientation || $[13] !== currentStep || $[14] !== iconsOnly || $[15] !== onStepClick || $[16] !== orientation || $[17] !== steps.length || $[18] !== titlesOnly) {
30
+ t5 = (step, index) => {
31
+ const status = index < currentStep ? "completed" : index === currentStep ? "active" : "todo";
32
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(StepperItem, {
33
+ step,
34
+ stepNumber: index + 1,
35
+ status,
36
+ contentOrientation,
37
+ iconsOnly,
38
+ titlesOnly,
39
+ onPress: onStepClick && status === "completed" ? () => onStepClick(index) : void 0
40
+ }), index < steps.length - 1 && /* @__PURE__ */ jsx(StepperSeparator, {
41
+ orientation,
42
+ contentOrientation
43
+ })] }, step.id);
44
+ };
45
+ $[12] = contentOrientation;
46
+ $[13] = currentStep;
47
+ $[14] = iconsOnly;
48
+ $[15] = onStepClick;
49
+ $[16] = orientation;
50
+ $[17] = steps.length;
51
+ $[18] = titlesOnly;
52
+ $[19] = t5;
53
+ } else t5 = $[19];
54
+ t4 = steps.map(t5);
55
+ $[4] = contentOrientation;
56
+ $[5] = currentStep;
57
+ $[6] = iconsOnly;
58
+ $[7] = onStepClick;
59
+ $[8] = orientation;
60
+ $[9] = steps;
61
+ $[10] = titlesOnly;
62
+ $[11] = t4;
63
+ } else t4 = $[11];
64
+ let t5;
65
+ if ($[20] !== t3 || $[21] !== t4) {
66
+ t5 = /* @__PURE__ */ jsx("div", {
67
+ className: t3,
68
+ role: "group",
69
+ "aria-label": "Progress",
70
+ children: t4
71
+ });
72
+ $[20] = t3;
73
+ $[21] = t4;
74
+ $[22] = t5;
75
+ } else t5 = $[22];
76
+ return t5;
32
77
  };
33
78
  //#endregion
34
79
  export { Stepper };