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

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 +267 -87
  65. package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +1 -0
  66. package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +347 -182
  67. package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +1 -0
  68. package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +177 -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 +295 -112
  79. package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +6 -1
  80. package/dist/components/inputs/DateTime/shared/DatePickerInput.js +375 -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
@@ -6,6 +6,7 @@ import { inputBase, inputSize } from "../shared/input.cva.js";
6
6
  import { FormField } from "../FormField/FormField.js";
7
7
  import { TooltipWrapper } from "../shared/TooltipWrapper.js";
8
8
  import { radio, radioContentClassName, radioContentRow, radioContentWrapper, radioIndicatorClass, radioTypography } from "./radio.cva.js";
9
+ import { c } from "react/compiler-runtime";
9
10
  import { jsx, jsxs } from "react/jsx-runtime";
10
11
  import { clsx } from "clsx";
11
12
  import { Radio, RadioGroup } from "react-aria-components";
@@ -14,6 +15,7 @@ import { mergeRefs } from "@react-aria/utils";
14
15
  import { Controller } from "react-hook-form";
15
16
  //#region src/components/inputs/RadioGroup/RadioGroup.tsx
16
17
  var RadioGroupBase = (props) => {
18
+ const $ = c(96);
17
19
  const ui = UIConfig.useConfig();
18
20
  const radioCva = UIStyle.useCva("radio.cva", radio);
19
21
  const radioContentWrapperCva = UIStyle.useCva("radio.contentWrapperCva", radioContentWrapper);
@@ -22,11 +24,12 @@ var RadioGroupBase = (props) => {
22
24
  const inputSizeCva = UIStyle.useCva("input.sizeCva", inputSize);
23
25
  const radioTypographyMap = UIStyle.useMapper("radio.typography", radioTypography);
24
26
  const radioContentClassNameMap = UIStyle.useMapper("radio.contentClassName", radioContentClassName);
25
- const { ref, label, tooltipText, helperText, isDirty, isRequired, rightContent, isDisabled, headerClassName, errorClassName, labelClassName, inputClassName, isHeaderHidden, error, className, options, value, defaultValue, as: asProp, size: sizeProp, variant: variantProp, hideLabel: hideLabelProp, ...rest } = props;
27
+ const { ref, label, tooltipText, helperText, isDirty, isRequired, rightContent, isDisabled, headerClassName, errorClassName, labelClassName, inputClassName, isHeaderHidden, error, className, options, value, defaultValue, onChange, onBlur, fireBlurOnChange: fireBlurOnChangeProp, as: asProp, size: sizeProp, variant: variantProp, hideLabel: hideLabelProp, ...rest } = props;
26
28
  const as = asProp ?? ui.input.as;
27
29
  const size = sizeProp ?? ui.input.size;
28
30
  const variant = variantProp ?? ui.radioGroup.variant;
29
31
  const hideLabel = hideLabelProp ?? ui.radioGroup.hideLabel;
32
+ const fireBlurOnChange = fireBlurOnChangeProp ?? ui.radioGroup.fireBlurOnChange;
30
33
  const radioClassName = radioCva({
31
34
  variant,
32
35
  ...rest
@@ -39,125 +42,348 @@ var RadioGroupBase = (props) => {
39
42
  variant,
40
43
  ...rest
41
44
  });
42
- const formFieldProps = {
43
- className,
44
- error,
45
- label,
46
- tooltipText,
47
- helperText,
48
- isRequired,
49
- rightContent,
50
- isHeaderHidden: isHeaderHidden || as === "inline" || as === "filter" || as === "floating",
51
- hideLabel,
52
- isDisabled,
53
- headerClassName,
54
- errorClassName
55
- };
56
- const { labelProps, fieldProps } = useLabel({ label });
57
- const headerProps = {
58
- label,
59
- tooltipText,
60
- helperText,
61
- isRequired,
62
- rightContent,
63
- isHeaderHidden: hideLabel || isHeaderHidden,
64
- isDisabled,
65
- className: headerClassName,
66
- labelProps
67
- };
45
+ const t0 = isHeaderHidden || as === "inline" || as === "filter" || as === "floating";
46
+ let t1;
47
+ if ($[0] !== className || $[1] !== error || $[2] !== errorClassName || $[3] !== headerClassName || $[4] !== helperText || $[5] !== hideLabel || $[6] !== isDisabled || $[7] !== isRequired || $[8] !== label || $[9] !== rightContent || $[10] !== t0 || $[11] !== tooltipText) {
48
+ t1 = {
49
+ className,
50
+ error,
51
+ label,
52
+ tooltipText,
53
+ helperText,
54
+ isRequired,
55
+ rightContent,
56
+ isHeaderHidden: t0,
57
+ hideLabel,
58
+ isDisabled,
59
+ headerClassName,
60
+ errorClassName
61
+ };
62
+ $[0] = className;
63
+ $[1] = error;
64
+ $[2] = errorClassName;
65
+ $[3] = headerClassName;
66
+ $[4] = helperText;
67
+ $[5] = hideLabel;
68
+ $[6] = isDisabled;
69
+ $[7] = isRequired;
70
+ $[8] = label;
71
+ $[9] = rightContent;
72
+ $[10] = t0;
73
+ $[11] = tooltipText;
74
+ $[12] = t1;
75
+ } else t1 = $[12];
76
+ const formFieldProps = t1;
77
+ let t2;
78
+ if ($[13] !== label) {
79
+ t2 = { label };
80
+ $[13] = label;
81
+ $[14] = t2;
82
+ } else t2 = $[14];
83
+ const { labelProps, fieldProps } = useLabel(t2);
84
+ const t3 = hideLabel || isHeaderHidden;
85
+ let t4;
86
+ if ($[15] !== headerClassName || $[16] !== helperText || $[17] !== isDisabled || $[18] !== isRequired || $[19] !== label || $[20] !== labelProps || $[21] !== rightContent || $[22] !== t3 || $[23] !== tooltipText) {
87
+ t4 = {
88
+ label,
89
+ tooltipText,
90
+ helperText,
91
+ isRequired,
92
+ rightContent,
93
+ isHeaderHidden: t3,
94
+ isDisabled,
95
+ className: headerClassName,
96
+ labelProps
97
+ };
98
+ $[15] = headerClassName;
99
+ $[16] = helperText;
100
+ $[17] = isDisabled;
101
+ $[18] = isRequired;
102
+ $[19] = label;
103
+ $[20] = labelProps;
104
+ $[21] = rightContent;
105
+ $[22] = t3;
106
+ $[23] = tooltipText;
107
+ $[24] = t4;
108
+ } else t4 = $[24];
109
+ const headerProps = t4;
68
110
  const selectedValue = value ?? defaultValue;
69
111
  const shouldRenderInputFrame = as !== "default";
70
- return /* @__PURE__ */ jsx(TooltipWrapper, {
112
+ let t5;
113
+ if ($[25] !== fireBlurOnChange || $[26] !== onBlur || $[27] !== onChange) {
114
+ t5 = (nextValue) => {
115
+ onChange?.(nextValue);
116
+ if (fireBlurOnChange) onBlur?.({});
117
+ };
118
+ $[25] = fireBlurOnChange;
119
+ $[26] = onBlur;
120
+ $[27] = onChange;
121
+ $[28] = t5;
122
+ } else t5 = $[28];
123
+ const handleChange = t5;
124
+ const T0 = TooltipWrapper;
125
+ const t6 = as === "inline" ? -1 : void 0;
126
+ const T1 = RadioGroup;
127
+ const t7 = !!error;
128
+ const t8 = isDirty || void 0;
129
+ const t9 = isRequired || void 0;
130
+ const T2 = FormField;
131
+ const t10 = as === "inline" && "h-full";
132
+ let t11;
133
+ if ($[29] !== className || $[30] !== t10) {
134
+ t11 = clsx("w-full", t10, className);
135
+ $[29] = className;
136
+ $[30] = t10;
137
+ $[31] = t11;
138
+ } else t11 = $[31];
139
+ const t12 = as === "inline" ? -1 : void 0;
140
+ let t13;
141
+ if ($[32] !== as || $[33] !== inputBaseCva || $[34] !== inputClassName || $[35] !== shouldRenderInputFrame || $[36] !== ui) {
142
+ t13 = clsx("group/radio-group-content relative", shouldRenderInputFrame && inputBaseCva({
143
+ variant: ui.input.variant,
144
+ as
145
+ }), inputClassName);
146
+ $[32] = as;
147
+ $[33] = inputBaseCva;
148
+ $[34] = inputClassName;
149
+ $[35] = shouldRenderInputFrame;
150
+ $[36] = ui;
151
+ $[37] = t13;
152
+ } else t13 = $[37];
153
+ const t14 = "";
154
+ const t15 = isDisabled || void 0;
155
+ const t16 = isDisabled || void 0;
156
+ const t17 = !!error || void 0;
157
+ const t18 = selectedValue != null && selectedValue !== "" ? true : void 0;
158
+ const t19 = "";
159
+ const t20 = clsx(radioContentWrapperCva({
160
+ variant,
161
+ as,
162
+ hasInputFrame: shouldRenderInputFrame,
163
+ ...rest
164
+ }), shouldRenderInputFrame && inputSizeCva({
71
165
  as,
72
- error,
73
- triggerTabIndex: as === "inline" ? -1 : void 0,
74
- children: /* @__PURE__ */ jsx(RadioGroup, {
166
+ size
167
+ }));
168
+ const t21 = isDirty || void 0;
169
+ const t22 = isRequired || void 0;
170
+ let t23;
171
+ if ($[38] !== as || $[39] !== headerProps || $[40] !== size) {
172
+ t23 = as && ["filter", "floating"].includes(as) && /* @__PURE__ */ jsx(FormFieldLabel, {
173
+ as,
174
+ size,
175
+ ...headerProps
176
+ });
177
+ $[38] = as;
178
+ $[39] = headerProps;
179
+ $[40] = size;
180
+ $[41] = t23;
181
+ } else t23 = $[41];
182
+ const t24 = radioContentRowCva({
183
+ variant,
184
+ as,
185
+ hasInputFrame: shouldRenderInputFrame,
186
+ ...rest
187
+ });
188
+ let t25;
189
+ if ($[42] !== labelClassName || $[43] !== options || $[44] !== radioClassName || $[45] !== radioContentClassNameValue || $[46] !== radioTypographyProps) {
190
+ let t26;
191
+ if ($[48] !== labelClassName || $[49] !== radioClassName || $[50] !== radioContentClassNameValue || $[51] !== radioTypographyProps) {
192
+ t26 = (option) => /* @__PURE__ */ jsxs(Radio, {
193
+ value: option.value,
194
+ className: clsx("relative", radioIndicatorClass),
195
+ children: [/* @__PURE__ */ jsx("div", { className: radioClassName }), /* @__PURE__ */ jsx(CheckContent, {
196
+ typography: radioTypographyProps,
197
+ contentClassName: radioContentClassNameValue,
198
+ className: labelClassName,
199
+ children: option.label
200
+ })]
201
+ }, option.value);
202
+ $[48] = labelClassName;
203
+ $[49] = radioClassName;
204
+ $[50] = radioContentClassNameValue;
205
+ $[51] = radioTypographyProps;
206
+ $[52] = t26;
207
+ } else t26 = $[52];
208
+ t25 = options.map(t26);
209
+ $[42] = labelClassName;
210
+ $[43] = options;
211
+ $[44] = radioClassName;
212
+ $[45] = radioContentClassNameValue;
213
+ $[46] = radioTypographyProps;
214
+ $[47] = t25;
215
+ } else t25 = $[47];
216
+ let t26;
217
+ if ($[53] !== t24 || $[54] !== t25) {
218
+ t26 = /* @__PURE__ */ jsx("div", {
219
+ className: t24,
220
+ children: t25
221
+ });
222
+ $[53] = t24;
223
+ $[54] = t25;
224
+ $[55] = t26;
225
+ } else t26 = $[55];
226
+ let t27;
227
+ if ($[56] !== t20 || $[57] !== t21 || $[58] !== t22 || $[59] !== t23 || $[60] !== t26) {
228
+ t27 = /* @__PURE__ */ jsxs("div", {
229
+ className: t20,
230
+ "data-is-dirty": t21,
231
+ "data-is-required": t22,
232
+ children: [t23, t26]
233
+ });
234
+ $[56] = t20;
235
+ $[57] = t21;
236
+ $[58] = t22;
237
+ $[59] = t23;
238
+ $[60] = t26;
239
+ $[61] = t27;
240
+ } else t27 = $[61];
241
+ let t28;
242
+ if ($[62] !== t13 || $[63] !== t15 || $[64] !== t16 || $[65] !== t17 || $[66] !== t18 || $[67] !== t27) {
243
+ t28 = /* @__PURE__ */ jsx("div", {
244
+ className: t13,
245
+ "data-rac": t14,
246
+ "data-disabled": t15,
247
+ "data-is-disabled": t16,
248
+ "data-invalid": t17,
249
+ "data-has-selection": t18,
250
+ "data-radio-group-content": t19,
251
+ children: t27
252
+ });
253
+ $[62] = t13;
254
+ $[63] = t15;
255
+ $[64] = t16;
256
+ $[65] = t17;
257
+ $[66] = t18;
258
+ $[67] = t27;
259
+ $[68] = t28;
260
+ } else t28 = $[68];
261
+ let t29;
262
+ if ($[69] !== T2 || $[70] !== as || $[71] !== formFieldProps || $[72] !== labelProps || $[73] !== t11 || $[74] !== t12 || $[75] !== t28) {
263
+ t29 = /* @__PURE__ */ jsx(T2, {
264
+ ...formFieldProps,
265
+ as,
266
+ labelProps,
267
+ className: t11,
268
+ tabIndex: t12,
269
+ children: t28
270
+ });
271
+ $[69] = T2;
272
+ $[70] = as;
273
+ $[71] = formFieldProps;
274
+ $[72] = labelProps;
275
+ $[73] = t11;
276
+ $[74] = t12;
277
+ $[75] = t28;
278
+ $[76] = t29;
279
+ } else t29 = $[76];
280
+ let t30;
281
+ if ($[77] !== T1 || $[78] !== defaultValue || $[79] !== fieldProps || $[80] !== handleChange || $[81] !== isDisabled || $[82] !== ref || $[83] !== rest || $[84] !== t29 || $[85] !== t7 || $[86] !== t8 || $[87] !== t9 || $[88] !== value) {
282
+ t30 = /* @__PURE__ */ jsx(T1, {
75
283
  ...rest,
76
284
  ...fieldProps,
77
285
  ref,
78
286
  value,
79
287
  defaultValue,
288
+ onChange: handleChange,
80
289
  isDisabled,
81
- isInvalid: !!error,
82
- "data-is-dirty": isDirty || void 0,
83
- "data-is-required": isRequired || void 0,
84
- children: /* @__PURE__ */ jsx(FormField, {
85
- ...formFieldProps,
86
- as,
87
- labelProps,
88
- className: clsx("w-full", as === "inline" && "h-full", className),
89
- tabIndex: as === "inline" ? -1 : void 0,
90
- children: /* @__PURE__ */ jsx("div", {
91
- className: clsx("group/radio-group-content relative", shouldRenderInputFrame && inputBaseCva({
92
- variant: ui.input.variant,
93
- as
94
- }), inputClassName),
95
- "data-rac": "",
96
- "data-disabled": isDisabled || void 0,
97
- "data-is-disabled": isDisabled || void 0,
98
- "data-invalid": !!error || void 0,
99
- "data-has-selection": selectedValue != null && selectedValue !== "" ? true : void 0,
100
- "data-radio-group-content": "",
101
- children: /* @__PURE__ */ jsxs("div", {
102
- className: clsx(radioContentWrapperCva({
103
- variant,
104
- as,
105
- hasInputFrame: shouldRenderInputFrame,
106
- ...rest
107
- }), shouldRenderInputFrame && inputSizeCva({
108
- as,
109
- size
110
- })),
111
- "data-is-dirty": isDirty || void 0,
112
- "data-is-required": isRequired || void 0,
113
- children: [as && ["filter", "floating"].includes(as) && /* @__PURE__ */ jsx(FormFieldLabel, {
114
- as,
115
- size,
116
- ...headerProps
117
- }), /* @__PURE__ */ jsx("div", {
118
- className: radioContentRowCva({
119
- variant,
120
- as,
121
- hasInputFrame: shouldRenderInputFrame,
122
- ...rest
123
- }),
124
- children: options.map((option) => /* @__PURE__ */ jsxs(Radio, {
125
- value: option.value,
126
- className: clsx("relative", radioIndicatorClass),
127
- children: [/* @__PURE__ */ jsx("div", { className: radioClassName }), /* @__PURE__ */ jsx(CheckContent, {
128
- typography: radioTypographyProps,
129
- contentClassName: radioContentClassNameValue,
130
- className: labelClassName,
131
- children: option.label
132
- })]
133
- }, option.value))
134
- })]
135
- })
136
- })
137
- })
138
- })
139
- });
290
+ isInvalid: t7,
291
+ "data-is-dirty": t8,
292
+ "data-is-required": t9,
293
+ children: t29
294
+ });
295
+ $[77] = T1;
296
+ $[78] = defaultValue;
297
+ $[79] = fieldProps;
298
+ $[80] = handleChange;
299
+ $[81] = isDisabled;
300
+ $[82] = ref;
301
+ $[83] = rest;
302
+ $[84] = t29;
303
+ $[85] = t7;
304
+ $[86] = t8;
305
+ $[87] = t9;
306
+ $[88] = value;
307
+ $[89] = t30;
308
+ } else t30 = $[89];
309
+ let t31;
310
+ if ($[90] !== T0 || $[91] !== as || $[92] !== error || $[93] !== t30 || $[94] !== t6) {
311
+ t31 = /* @__PURE__ */ jsx(T0, {
312
+ as,
313
+ error,
314
+ triggerTabIndex: t6,
315
+ children: t30
316
+ });
317
+ $[90] = T0;
318
+ $[91] = as;
319
+ $[92] = error;
320
+ $[93] = t30;
321
+ $[94] = t6;
322
+ $[95] = t31;
323
+ } else t31 = $[95];
324
+ return t31;
140
325
  };
141
326
  var RadioGroup$1 = (props) => {
327
+ const $ = c(15);
142
328
  if ("formControl" in props && props.formControl) {
143
- const { formControl, ref, ...innerProps } = props;
144
- return /* @__PURE__ */ jsx(Controller, {
145
- control: formControl.control,
146
- name: formControl.name,
147
- render: ({ field, fieldState: { error, isDirty } }) => /* @__PURE__ */ jsx(RadioGroupBase, {
148
- ...innerProps,
149
- ref: mergeRefs(ref, field.ref),
150
- value: field.value,
151
- onChange: field.onChange,
152
- onBlur: field.onBlur,
153
- name: field.name,
154
- isDirty,
155
- isDisabled: field.disabled || props.isDisabled,
156
- error: props.error ?? error?.message
157
- })
158
- });
329
+ let formControl;
330
+ let innerProps;
331
+ let ref;
332
+ if ($[0] !== props) {
333
+ ({formControl, ref, ...innerProps} = props);
334
+ $[0] = props;
335
+ $[1] = formControl;
336
+ $[2] = innerProps;
337
+ $[3] = ref;
338
+ } else {
339
+ formControl = $[1];
340
+ innerProps = $[2];
341
+ ref = $[3];
342
+ }
343
+ let t0;
344
+ if ($[4] !== innerProps || $[5] !== props.error || $[6] !== props.isDisabled || $[7] !== ref) {
345
+ t0 = (t1) => {
346
+ const { field, fieldState: t2 } = t1;
347
+ const { error, isDirty } = t2;
348
+ return /* @__PURE__ */ jsx(RadioGroupBase, {
349
+ ...innerProps,
350
+ ref: mergeRefs(ref, field.ref),
351
+ value: field.value,
352
+ onChange: field.onChange,
353
+ onBlur: field.onBlur,
354
+ name: field.name,
355
+ isDirty,
356
+ isDisabled: field.disabled || props.isDisabled,
357
+ error: props.error ?? error?.message
358
+ });
359
+ };
360
+ $[4] = innerProps;
361
+ $[5] = props.error;
362
+ $[6] = props.isDisabled;
363
+ $[7] = ref;
364
+ $[8] = t0;
365
+ } else t0 = $[8];
366
+ let t1;
367
+ if ($[9] !== formControl.control || $[10] !== formControl.name || $[11] !== t0) {
368
+ t1 = /* @__PURE__ */ jsx(Controller, {
369
+ control: formControl.control,
370
+ name: formControl.name,
371
+ render: t0
372
+ });
373
+ $[9] = formControl.control;
374
+ $[10] = formControl.name;
375
+ $[11] = t0;
376
+ $[12] = t1;
377
+ } else t1 = $[12];
378
+ return t1;
159
379
  }
160
- return /* @__PURE__ */ jsx(RadioGroupBase, { ...props });
380
+ let t0;
381
+ if ($[13] !== props) {
382
+ t0 = /* @__PURE__ */ jsx(RadioGroupBase, { ...props });
383
+ $[13] = props;
384
+ $[14] = t0;
385
+ } else t0 = $[14];
386
+ return t0;
161
387
  };
162
388
  //#endregion
163
389
  export { RadioGroup$1 as RadioGroup };