@povio/ui 2.3.0 → 2.3.2-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (286) 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.d.ts +2 -1
  55. package/dist/components/buttons/InlineIconButton/InlineIconButton.js +34 -9
  56. package/dist/components/buttons/PillButton/PillButton.js +55 -17
  57. package/dist/components/buttons/SplitButton/SplitButton.js +103 -18
  58. package/dist/components/buttons/TextButton/TextButton.js +30 -8
  59. package/dist/components/buttons/ToggleButton/ToggleButton.js +28 -8
  60. package/dist/components/buttons/shared/ButtonContent.js +80 -22
  61. package/dist/components/inputs/Checkbox/Checkbox.d.ts +1 -0
  62. package/dist/components/inputs/Checkbox/Checkbox.js +201 -35
  63. package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +24 -10
  64. package/dist/components/inputs/Checkbox/checkbox.cva.d.ts +3 -0
  65. package/dist/components/inputs/Checkbox/checkbox.cva.js +4 -1
  66. package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +11 -5
  67. package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +364 -76
  68. package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +11 -5
  69. package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +452 -167
  70. package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +12 -5
  71. package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +269 -57
  72. package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +6 -3
  73. package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +605 -130
  74. package/dist/components/inputs/DateTime/shared/Calendar.d.ts +5 -2
  75. package/dist/components/inputs/DateTime/shared/Calendar.js +332 -119
  76. package/dist/components/inputs/DateTime/shared/CalendarCell.d.ts +3 -2
  77. package/dist/components/inputs/DateTime/shared/CalendarCell.js +301 -102
  78. package/dist/components/inputs/DateTime/shared/CalendarGrid.d.ts +3 -2
  79. package/dist/components/inputs/DateTime/shared/CalendarGrid.js +146 -33
  80. package/dist/components/inputs/DateTime/shared/CalendarHeader.js +249 -93
  81. package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +318 -137
  82. package/dist/components/inputs/DateTime/shared/DateField.js +311 -112
  83. package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +12 -3
  84. package/dist/components/inputs/DateTime/shared/DatePickerInput.js +382 -138
  85. package/dist/components/inputs/DateTime/shared/DateSegmentItem.d.ts +15 -0
  86. package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +96 -11
  87. package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +81 -27
  88. package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +59 -10
  89. package/dist/components/inputs/DateTime/shared/MonthPicker.js +103 -58
  90. package/dist/components/inputs/DateTime/shared/RangeCalendar.js +193 -82
  91. package/dist/components/inputs/DateTime/shared/TimeField.js +27 -8
  92. package/dist/components/inputs/DateTime/shared/TimePickerForm.js +279 -110
  93. package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +4 -1
  94. package/dist/components/inputs/DateTime/shared/TimePickerInput.js +210 -65
  95. package/dist/components/inputs/DateTime/shared/YearPicker.js +119 -68
  96. package/dist/components/inputs/DateTime/shared/datePicker.types.d.ts +4 -0
  97. package/dist/components/inputs/DateTime/shared/datePickerInput.cva.d.ts +7 -0
  98. package/dist/components/inputs/DateTime/shared/datePickerInput.cva.js +13 -0
  99. package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.d.ts +14 -0
  100. package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.js +117 -0
  101. package/dist/components/inputs/DateTime/shared/dateSegment.utils.d.ts +2 -0
  102. package/dist/components/inputs/DateTime/shared/dateSegment.utils.spec.d.ts +1 -0
  103. package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.d.ts +39 -0
  104. package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.js +85 -0
  105. package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.spec.d.ts +1 -0
  106. package/dist/components/inputs/File/FileUpload.js +87 -44
  107. package/dist/components/inputs/File/FileUploadContainer.js +15 -7
  108. package/dist/components/inputs/File/InputUpload.js +317 -79
  109. package/dist/components/inputs/File/shared/FileCard.js +104 -41
  110. package/dist/components/inputs/File/shared/FileCardList.js +47 -12
  111. package/dist/components/inputs/File/shared/FileUploadContent.js +175 -44
  112. package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +149 -46
  113. package/dist/components/inputs/File/shared/FileUploadContentError.js +234 -93
  114. package/dist/components/inputs/File/shared/FileUploadContentFilled.js +230 -97
  115. package/dist/components/inputs/File/shared/FileUploadContentLoading.js +199 -55
  116. package/dist/components/inputs/File/shared/InputUploadContent.js +148 -34
  117. package/dist/components/inputs/File/shared/InputUploadFilled.js +50 -9
  118. package/dist/components/inputs/File/shared/ProgressBar.js +48 -9
  119. package/dist/components/inputs/FormField/FormField.d.ts +3 -3
  120. package/dist/components/inputs/FormField/FormField.js +119 -37
  121. package/dist/components/inputs/FormField/FormFieldError.js +25 -5
  122. package/dist/components/inputs/FormField/FormFieldHeader.d.ts +2 -2
  123. package/dist/components/inputs/FormField/FormFieldHeader.js +81 -22
  124. package/dist/components/inputs/FormField/FormFieldHeaderClose.js +31 -7
  125. package/dist/components/inputs/FormField/FormFieldHelper.js +26 -6
  126. package/dist/components/inputs/FormField/FormFieldLabel.d.ts +2 -2
  127. package/dist/components/inputs/FormField/FormFieldLabel.js +40 -9
  128. package/dist/components/inputs/FormField/formFieldHeader.cva.d.ts +6 -0
  129. package/dist/components/inputs/FormField/formFieldHeader.cva.js +11 -0
  130. package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +5 -2
  131. package/dist/components/inputs/Input/NumberInput/NumberInput.js +450 -95
  132. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.d.ts +45 -0
  133. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +571 -0
  134. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +35 -0
  135. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +575 -0
  136. package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +48 -9
  137. package/dist/components/inputs/Input/TextArea/TextArea.cva.d.ts +4 -0
  138. package/dist/components/inputs/Input/TextArea/TextArea.cva.js +5 -0
  139. package/dist/components/inputs/Input/TextArea/TextArea.js +305 -90
  140. package/dist/components/inputs/Input/TextInput/TextInput.d.ts +3 -1
  141. package/dist/components/inputs/Input/TextInput/TextInput.js +421 -91
  142. package/dist/components/inputs/Input/shared/InputContent.js +192 -59
  143. package/dist/components/inputs/Input/shared/numberStatic.utils.d.ts +1 -0
  144. package/dist/components/inputs/Input/shared/numberStatic.utils.js +7 -0
  145. package/dist/components/inputs/Inputs/Form.js +40 -11
  146. package/dist/components/inputs/Inputs/InputItem.d.ts +15 -21
  147. package/dist/components/inputs/Inputs/InputItem.js +69 -14
  148. package/dist/components/inputs/Inputs/Inputs.js +37 -11
  149. package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +3 -1
  150. package/dist/components/inputs/RadioGroup/RadioGroup.js +353 -60
  151. package/dist/components/inputs/RadioGroup/radio.cva.d.ts +17 -0
  152. package/dist/components/inputs/RadioGroup/radio.cva.js +42 -1
  153. package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +6 -2
  154. package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +213 -22
  155. package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +3 -18
  156. package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +34 -8
  157. package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +36 -0
  158. package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +14 -0
  159. package/dist/components/inputs/Selection/Select/QuerySelect.js +104 -0
  160. package/dist/components/inputs/Selection/Select/Select.d.ts +7 -3
  161. package/dist/components/inputs/Selection/Select/Select.js +224 -18
  162. package/dist/components/inputs/Selection/shared/SelectBase.d.ts +8 -1
  163. package/dist/components/inputs/Selection/shared/SelectBase.js +69 -18
  164. package/dist/components/inputs/Selection/shared/SelectDesktop.d.ts +1 -1
  165. package/dist/components/inputs/Selection/shared/SelectDesktop.js +393 -138
  166. package/dist/components/inputs/Selection/shared/SelectInput.d.ts +2 -2
  167. package/dist/components/inputs/Selection/shared/SelectInput.js +330 -116
  168. package/dist/components/inputs/Selection/shared/SelectInputTags.js +99 -25
  169. package/dist/components/inputs/Selection/shared/SelectListBox.d.ts +2 -2
  170. package/dist/components/inputs/Selection/shared/SelectListBox.js +164 -52
  171. package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +85 -35
  172. package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +69 -16
  173. package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +70 -21
  174. package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +58 -9
  175. package/dist/components/inputs/Selection/shared/SelectMobile.d.ts +1 -1
  176. package/dist/components/inputs/Selection/shared/SelectMobile.js +12 -5
  177. package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.d.ts +9 -0
  178. package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +47 -0
  179. package/dist/components/inputs/Selection/shared/querySelect.utils.d.ts +7 -0
  180. package/dist/components/inputs/Selection/shared/querySelect.utils.js +24 -0
  181. package/dist/components/inputs/Selection/shared/select.context.d.ts +3 -2
  182. package/dist/components/inputs/Selection/shared/select.context.js +67 -36
  183. package/dist/components/inputs/Selection/shared/select.types.d.ts +3 -2
  184. package/dist/components/inputs/Selection/shared/selectDesktop.cva.d.ts +3 -0
  185. package/dist/components/inputs/Selection/shared/selectDesktop.cva.js +5 -0
  186. package/dist/components/inputs/Selection/shared/selectInput.cva.d.ts +5 -0
  187. package/dist/components/inputs/Selection/shared/selectInput.cva.js +5 -0
  188. package/dist/components/inputs/Selection/shared/staticSelect.utils.d.ts +23 -0
  189. package/dist/components/inputs/Selection/shared/staticSelect.utils.js +37 -0
  190. package/dist/components/inputs/Selection/shared/staticSelect.utils.spec.d.ts +1 -0
  191. package/dist/components/inputs/Selection/shared/useSelectItems.js +109 -49
  192. package/dist/components/inputs/Skeleton/InputFrame.d.ts +80 -0
  193. package/dist/components/inputs/Skeleton/InputFrame.js +528 -0
  194. package/dist/components/inputs/Slider/Slider.d.ts +2 -1
  195. package/dist/components/inputs/Slider/Slider.js +265 -75
  196. package/dist/components/inputs/TextEditor/TextEditor.d.ts +1 -0
  197. package/dist/components/inputs/TextEditor/TextEditor.js +447 -98
  198. package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +37 -11
  199. package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +102 -30
  200. package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +194 -45
  201. package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +88 -28
  202. package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +48 -14
  203. package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.js +66 -19
  204. package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +49 -15
  205. package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +92 -32
  206. package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +126 -54
  207. package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +141 -38
  208. package/dist/components/inputs/Toggle/Toggle.d.ts +1 -0
  209. package/dist/components/inputs/Toggle/Toggle.js +214 -37
  210. package/dist/components/inputs/Toggle/toggle.cva.d.ts +3 -0
  211. package/dist/components/inputs/Toggle/toggle.cva.js +4 -2
  212. package/dist/components/inputs/shared/CheckContent.d.ts +2 -1
  213. package/dist/components/inputs/shared/CheckContent.js +21 -11
  214. package/dist/components/inputs/shared/InputClear.d.ts +2 -1
  215. package/dist/components/inputs/shared/InputClear.js +89 -10
  216. package/dist/components/inputs/shared/StaticInput.d.ts +38 -0
  217. package/dist/components/inputs/shared/TooltipWrapper.js +50 -11
  218. package/dist/components/inputs/shared/input.cva.d.ts +10 -0
  219. package/dist/components/inputs/shared/input.cva.js +54 -14
  220. package/dist/components/inputs/shared/label.cva.js +2 -2
  221. package/dist/components/inputs/shared/tooltipWrapper.cva.d.ts +4 -0
  222. package/dist/components/inputs/shared/tooltipWrapper.cva.js +5 -0
  223. package/dist/components/inputs/shared/useStaticInputHandoff.d.ts +14 -0
  224. package/dist/components/inputs/shared/useStaticInputHandoff.js +100 -0
  225. package/dist/components/navigation/Accordion/Accordion.js +69 -22
  226. package/dist/components/navigation/Accordion/AccordionItem.js +86 -41
  227. package/dist/components/navigation/Stepper/Stepper.js +67 -22
  228. package/dist/components/navigation/Stepper/StepperItem.js +104 -31
  229. package/dist/components/navigation/Stepper/StepperSeparator.js +23 -5
  230. package/dist/components/overlays/ActionModal/ActionModal.js +169 -35
  231. package/dist/components/overlays/BottomSheet/BottomSheet.js +122 -25
  232. package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +48 -8
  233. package/dist/components/overlays/Drawer/Drawer.js +62 -20
  234. package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +83 -27
  235. package/dist/components/overlays/Tooltip/Tooltip.js +137 -28
  236. package/dist/components/overlays/Tooltip/TooltipEllipsis.js +37 -12
  237. package/dist/components/segment/Segment.js +218 -57
  238. package/dist/components/segment/SegmentItem.js +67 -10
  239. package/dist/components/shared/pagination/Pagination.js +108 -22
  240. package/dist/components/shared/pagination/PaginationList.js +167 -64
  241. package/dist/components/status/Alert/Alert.js +97 -30
  242. package/dist/components/status/Loader/Loader.js +77 -22
  243. package/dist/components/status/Toast/Toast.js +21 -13
  244. package/dist/components/status/Toast/useToast.js +62 -57
  245. package/dist/components/table/ColumnConfig.js +158 -54
  246. package/dist/components/table/InfiniteTable.js +67 -16
  247. package/dist/components/table/PaginatedTable.js +84 -18
  248. package/dist/components/table/Table.js +28 -27
  249. package/dist/components/text/Link/Link.js +19 -7
  250. package/dist/components/text/Typography/Typography.js +23 -8
  251. package/dist/config/confirmation.context.js +1 -1
  252. package/dist/config/link.context.js +23 -9
  253. package/dist/config/router.context.js +42 -16
  254. package/dist/config/theme.context.js +98 -45
  255. package/dist/config/uiConfig.context.d.ts +21 -7
  256. package/dist/config/uiConfig.context.js +68 -15
  257. package/dist/config/uiStyle.context.d.ts +27 -4
  258. package/dist/config/uiStyle.context.js +15 -5
  259. package/dist/helpers/dynamicInputs.d.ts +5 -5
  260. package/dist/helpers/dynamicInputs.js +3 -0
  261. package/dist/hooks/useBreakpoint.js +16 -3
  262. package/dist/hooks/useDebounceCallback.js +51 -17
  263. package/dist/hooks/useFilters.js +125 -64
  264. package/dist/hooks/useForm.js +42 -8
  265. package/dist/hooks/useFormAutosave.js +101 -30
  266. package/dist/hooks/useIntersectionObserver.d.ts +1 -1
  267. package/dist/hooks/useIntersectionObserver.js +91 -24
  268. package/dist/hooks/useLocalStorage.js +43 -10
  269. package/dist/hooks/useLongPressRepeat.js +55 -20
  270. package/dist/hooks/usePagination.js +49 -19
  271. package/dist/hooks/useQueryAutocomplete.d.ts +14 -0
  272. package/dist/hooks/useQueryAutocomplete.js +57 -0
  273. package/dist/hooks/useScrollableListBox.js +37 -16
  274. package/dist/hooks/useSorting.js +69 -28
  275. package/dist/hooks/useStateAndRef.js +21 -7
  276. package/dist/hooks/useTableColumnConfig.js +124 -31
  277. package/dist/hooks/useTranslationMemo.js +25 -5
  278. package/dist/index.d.ts +7 -0
  279. package/dist/index.js +4 -2
  280. package/dist/tw-ui-plugin.js +8 -1
  281. package/dist/utils/date-time.utils.d.ts +38 -10
  282. package/dist/utils/date-time.utils.js +134 -22
  283. package/dist/utils/dom.utils.js +1 -1
  284. package/dist/utils/query.utils.d.ts +4 -0
  285. package/dist/utils/query.utils.js +8 -0
  286. package/package.json +1 -1
@@ -3,52 +3,161 @@ import { PointerVerticalIcon } from "../../../assets/icons/PointerVertical.js";
3
3
  import { UIStyle } from "../../../config/uiStyle.context.js";
4
4
  import { tooltipCva, tooltipPointerHorizontalCva, tooltipPointerVerticalCva, tooltipTextCva } from "./tooltip.cva.js";
5
5
  import { Typography } from "../../text/Typography/Typography.js";
6
+ import { c } from "react/compiler-runtime";
6
7
  import { jsx, jsxs } from "react/jsx-runtime";
7
8
  import { clsx } from "clsx";
8
9
  import { Fragment as Fragment$1, useRef } from "react";
9
10
  import { OverlayArrow, Tooltip, TooltipTrigger } from "react-aria-components";
10
11
  import { useFocusable } from "react-aria";
11
12
  //#region src/components/overlays/Tooltip/Tooltip.tsx
12
- var CustomTrigger = ({ children, className, tabIndex }) => {
13
+ var CustomTrigger = (t0) => {
14
+ const $ = c(8);
15
+ const { children, className, tabIndex } = t0;
13
16
  const ref = useRef(null);
14
- const { focusableProps } = useFocusable({}, ref);
15
- return /* @__PURE__ */ jsx("div", {
16
- ref,
17
- ...focusableProps,
18
- tabIndex: tabIndex ?? 0,
19
- className: clsx("inline-flex", className),
20
- children
21
- });
17
+ let t1;
18
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
19
+ t1 = {};
20
+ $[0] = t1;
21
+ } else t1 = $[0];
22
+ const { focusableProps } = useFocusable(t1, ref);
23
+ const t2 = tabIndex ?? 0;
24
+ let t3;
25
+ if ($[1] !== className) {
26
+ t3 = clsx("inline-flex", className);
27
+ $[1] = className;
28
+ $[2] = t3;
29
+ } else t3 = $[2];
30
+ let t4;
31
+ if ($[3] !== children || $[4] !== focusableProps || $[5] !== t2 || $[6] !== t3) {
32
+ t4 = /* @__PURE__ */ jsx("div", {
33
+ ref,
34
+ ...focusableProps,
35
+ tabIndex: t2,
36
+ className: t3,
37
+ children
38
+ });
39
+ $[3] = children;
40
+ $[4] = focusableProps;
41
+ $[5] = t2;
42
+ $[6] = t3;
43
+ $[7] = t4;
44
+ } else t4 = $[7];
45
+ return t4;
22
46
  };
23
- var Tooltip$1 = ({ children, text, isDisabled, delay, closeDelay, color, isNonInteractiveTrigger, triggerClassName, triggerTabIndex, ...tooltipProps }) => {
47
+ var Tooltip$1 = (t0) => {
48
+ const $ = c(38);
49
+ const { children, text, isDisabled, delay, closeDelay, color, isNonInteractiveTrigger, triggerClassName, triggerTabIndex, ...tooltipProps } = t0;
24
50
  const tooltipCva$1 = UIStyle.useCva("tooltip.cva", tooltipCva);
25
51
  const tooltipPointerHorizontalCva$1 = UIStyle.useCva("tooltip.pointerHorizontalCva", tooltipPointerHorizontalCva);
26
52
  const tooltipPointerVerticalCva$1 = UIStyle.useCva("tooltip.pointerVerticalCva", tooltipPointerVerticalCva);
27
53
  const tooltipTextCva$1 = UIStyle.useCva("tooltip.textCva", tooltipTextCva);
28
54
  const Trigger = isNonInteractiveTrigger ? CustomTrigger : Fragment$1;
29
- return /* @__PURE__ */ jsxs(TooltipTrigger, {
30
- delay: delay ?? 0,
31
- closeDelay: closeDelay ?? 0,
32
- isDisabled,
33
- children: [isNonInteractiveTrigger ? /* @__PURE__ */ jsx(Trigger, {
55
+ const T0 = TooltipTrigger;
56
+ const t1 = delay ?? 0;
57
+ const t2 = closeDelay ?? 0;
58
+ let t3;
59
+ if ($[0] !== Trigger || $[1] !== children || $[2] !== isNonInteractiveTrigger || $[3] !== triggerClassName || $[4] !== triggerTabIndex) {
60
+ t3 = isNonInteractiveTrigger ? /* @__PURE__ */ jsx(Trigger, {
34
61
  ...isNonInteractiveTrigger && { className: triggerClassName },
35
62
  tabIndex: triggerTabIndex,
36
63
  children
37
- }) : /* @__PURE__ */ jsx(Trigger, { children }), /* @__PURE__ */ jsxs(Tooltip, {
64
+ }) : /* @__PURE__ */ jsx(Trigger, { children });
65
+ $[0] = Trigger;
66
+ $[1] = children;
67
+ $[2] = isNonInteractiveTrigger;
68
+ $[3] = triggerClassName;
69
+ $[4] = triggerTabIndex;
70
+ $[5] = t3;
71
+ } else t3 = $[5];
72
+ const T1 = Tooltip;
73
+ const t4 = tooltipCva$1({
74
+ color,
75
+ className: tooltipProps.className
76
+ });
77
+ let t5;
78
+ if ($[6] !== color || $[7] !== tooltipPointerHorizontalCva$1) {
79
+ t5 = tooltipPointerHorizontalCva$1({ color });
80
+ $[6] = color;
81
+ $[7] = tooltipPointerHorizontalCva$1;
82
+ $[8] = t5;
83
+ } else t5 = $[8];
84
+ let t6;
85
+ if ($[9] !== t5) {
86
+ t6 = /* @__PURE__ */ jsx(PointerHorizontalIcon, { className: t5 });
87
+ $[9] = t5;
88
+ $[10] = t6;
89
+ } else t6 = $[10];
90
+ let t7;
91
+ if ($[11] !== color || $[12] !== tooltipPointerVerticalCva$1) {
92
+ t7 = tooltipPointerVerticalCva$1({ color });
93
+ $[11] = color;
94
+ $[12] = tooltipPointerVerticalCva$1;
95
+ $[13] = t7;
96
+ } else t7 = $[13];
97
+ let t8;
98
+ if ($[14] !== t7) {
99
+ t8 = /* @__PURE__ */ jsx(PointerVerticalIcon, { className: t7 });
100
+ $[14] = t7;
101
+ $[15] = t8;
102
+ } else t8 = $[15];
103
+ let t9;
104
+ if ($[16] !== t6 || $[17] !== t8) {
105
+ t9 = /* @__PURE__ */ jsxs(OverlayArrow, { children: [t6, t8] });
106
+ $[16] = t6;
107
+ $[17] = t8;
108
+ $[18] = t9;
109
+ } else t9 = $[18];
110
+ let t10;
111
+ if ($[19] !== color || $[20] !== tooltipTextCva$1) {
112
+ t10 = tooltipTextCva$1({ color });
113
+ $[19] = color;
114
+ $[20] = tooltipTextCva$1;
115
+ $[21] = t10;
116
+ } else t10 = $[21];
117
+ let t11;
118
+ if ($[22] !== t10 || $[23] !== text) {
119
+ t11 = /* @__PURE__ */ jsx(Typography, {
120
+ size: "body-4",
121
+ variant: "prominent-1",
122
+ className: t10,
123
+ children: text
124
+ });
125
+ $[22] = t10;
126
+ $[23] = text;
127
+ $[24] = t11;
128
+ } else t11 = $[24];
129
+ let t12;
130
+ if ($[25] !== T1 || $[26] !== t11 || $[27] !== t4 || $[28] !== t9 || $[29] !== tooltipProps) {
131
+ t12 = /* @__PURE__ */ jsxs(T1, {
38
132
  ...tooltipProps,
39
- className: tooltipCva$1({
40
- color,
41
- className: tooltipProps.className
42
- }),
133
+ className: t4,
43
134
  offset: 13,
44
- children: [/* @__PURE__ */ jsxs(OverlayArrow, { children: [/* @__PURE__ */ jsx(PointerHorizontalIcon, { className: tooltipPointerHorizontalCva$1({ color }) }), /* @__PURE__ */ jsx(PointerVerticalIcon, { className: tooltipPointerVerticalCva$1({ color }) })] }), /* @__PURE__ */ jsx(Typography, {
45
- size: "body-4",
46
- variant: "prominent-1",
47
- className: tooltipTextCva$1({ color }),
48
- children: text
49
- })]
50
- })]
51
- });
135
+ children: [t9, t11]
136
+ });
137
+ $[25] = T1;
138
+ $[26] = t11;
139
+ $[27] = t4;
140
+ $[28] = t9;
141
+ $[29] = tooltipProps;
142
+ $[30] = t12;
143
+ } else t12 = $[30];
144
+ let t13;
145
+ if ($[31] !== T0 || $[32] !== isDisabled || $[33] !== t1 || $[34] !== t12 || $[35] !== t2 || $[36] !== t3) {
146
+ t13 = /* @__PURE__ */ jsxs(T0, {
147
+ delay: t1,
148
+ closeDelay: t2,
149
+ isDisabled,
150
+ children: [t3, t12]
151
+ });
152
+ $[31] = T0;
153
+ $[32] = isDisabled;
154
+ $[33] = t1;
155
+ $[34] = t12;
156
+ $[35] = t2;
157
+ $[36] = t3;
158
+ $[37] = t13;
159
+ } else t13 = $[37];
160
+ return t13;
52
161
  };
53
162
  //#endregion
54
163
  export { Tooltip$1 as Tooltip };
@@ -1,20 +1,45 @@
1
1
  import { Tooltip } from "./Tooltip.js";
2
+ import { c } from "react/compiler-runtime";
2
3
  import { jsx } from "react/jsx-runtime";
3
4
  import { useState } from "react";
4
5
  //#region src/components/overlays/Tooltip/TooltipEllipsis.tsx
5
- var TooltipEllipsis = ({ text, children, isDisabled, isNonInteractiveTrigger }) => {
6
+ var TooltipEllipsis = (t0) => {
7
+ const $ = c(8);
8
+ const { text, children, isDisabled, isNonInteractiveTrigger } = t0;
6
9
  const [isEllipsisActive, setIsEllipsisActive] = useState(false);
7
- const onContentRef = (ref) => {
8
- if (ref) setIsEllipsisActive(ref.offsetWidth < ref.scrollWidth);
9
- };
10
- const content = children(onContentRef);
11
- if (isEllipsisActive && !isDisabled) return /* @__PURE__ */ jsx(Tooltip, {
12
- text,
13
- placement: "bottom",
14
- isDisabled,
15
- isNonInteractiveTrigger,
16
- children: content
17
- });
10
+ let t1;
11
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
12
+ t1 = (ref) => {
13
+ if (ref) setIsEllipsisActive(ref.offsetWidth < ref.scrollWidth);
14
+ };
15
+ $[0] = t1;
16
+ } else t1 = $[0];
17
+ const onContentRef = t1;
18
+ let t2;
19
+ if ($[1] !== children) {
20
+ t2 = children(onContentRef);
21
+ $[1] = children;
22
+ $[2] = t2;
23
+ } else t2 = $[2];
24
+ const content = t2;
25
+ if (isEllipsisActive && !isDisabled) {
26
+ let t3;
27
+ if ($[3] !== content || $[4] !== isDisabled || $[5] !== isNonInteractiveTrigger || $[6] !== text) {
28
+ t3 = /* @__PURE__ */ jsx(Tooltip, {
29
+ text,
30
+ placement: "bottom",
31
+ isDisabled,
32
+ isNonInteractiveTrigger,
33
+ children: content
34
+ });
35
+ $[3] = content;
36
+ $[4] = isDisabled;
37
+ $[5] = isNonInteractiveTrigger;
38
+ $[6] = text;
39
+ $[7] = t3;
40
+ } else t3 = $[7];
41
+ return t3;
42
+ }
18
43
  return content;
19
44
  };
20
45
  //#endregion
@@ -2,83 +2,244 @@ import { UIStyle } from "../../config/uiStyle.context.js";
2
2
  import { FormField } from "../inputs/FormField/FormField.js";
3
3
  import { segmentCva } from "./segment.cva.js";
4
4
  import { SegmentItem } from "./SegmentItem.js";
5
+ import { c } from "react/compiler-runtime";
5
6
  import { jsx, jsxs } from "react/jsx-runtime";
6
7
  import { clsx } from "clsx";
7
- import { Fragment as Fragment$1, useMemo, useRef } from "react";
8
+ import { Fragment as Fragment$1, useRef } from "react";
8
9
  import { ToggleButtonGroup } from "react-aria-components";
9
10
  import { useToggleButtonGroup } from "react-aria";
10
11
  import { mergeRefs } from "@react-aria/utils";
11
12
  import { Controller } from "react-hook-form";
12
13
  import { useToggleGroupState } from "react-stately";
13
14
  //#region src/components/segment/Segment.tsx
14
- var SegmentBase = ({ className, items, error, onChange, value, defaultValue, segmentItemClassName, ...rest }) => {
15
- const props = {
16
- ...rest,
17
- defaultSelectedKeys: defaultValue ? Array.isArray(defaultValue) ? defaultValue : [defaultValue] : void 0,
18
- selectedKeys: value ? Array.isArray(value) ? value : [value] : void 0
19
- };
15
+ var SegmentBase = (t0) => {
16
+ const $ = c(49);
17
+ let className;
18
+ let defaultValue;
19
+ let error;
20
+ let items;
21
+ let onChange;
22
+ let rest;
23
+ let segmentItemClassName;
24
+ let value;
25
+ if ($[0] !== t0) {
26
+ ({className, items, error, onChange, value, defaultValue, segmentItemClassName, ...rest} = t0);
27
+ $[0] = t0;
28
+ $[1] = className;
29
+ $[2] = defaultValue;
30
+ $[3] = error;
31
+ $[4] = items;
32
+ $[5] = onChange;
33
+ $[6] = rest;
34
+ $[7] = segmentItemClassName;
35
+ $[8] = value;
36
+ } else {
37
+ className = $[1];
38
+ defaultValue = $[2];
39
+ error = $[3];
40
+ items = $[4];
41
+ onChange = $[5];
42
+ rest = $[6];
43
+ segmentItemClassName = $[7];
44
+ value = $[8];
45
+ }
46
+ let t1;
47
+ if ($[9] !== defaultValue) {
48
+ t1 = defaultValue ? Array.isArray(defaultValue) ? defaultValue : [defaultValue] : void 0;
49
+ $[9] = defaultValue;
50
+ $[10] = t1;
51
+ } else t1 = $[10];
52
+ let t2;
53
+ if ($[11] !== value) {
54
+ t2 = value ? Array.isArray(value) ? value : [value] : void 0;
55
+ $[11] = value;
56
+ $[12] = t2;
57
+ } else t2 = $[12];
58
+ let t3;
59
+ if ($[13] !== rest || $[14] !== t1 || $[15] !== t2) {
60
+ t3 = {
61
+ ...rest,
62
+ defaultSelectedKeys: t1,
63
+ selectedKeys: t2
64
+ };
65
+ $[13] = rest;
66
+ $[14] = t1;
67
+ $[15] = t2;
68
+ $[16] = t3;
69
+ } else t3 = $[16];
70
+ const props = t3;
20
71
  const buttonGroupRef = useRef(null);
21
72
  const state = useToggleGroupState(props);
22
73
  const { groupProps } = useToggleButtonGroup(props, state, buttonGroupRef);
23
74
  const segmentCva$1 = UIStyle.useCva("segment.cva", segmentCva);
24
- const formFieldProps = {
25
- error,
26
- label: "",
27
- hideLabel: true,
28
- isDisabled: props.isDisabled
29
- };
30
- const onSelectionChange = (keys) => {
31
- if (props.selectionMode === "multiple") onChange?.(Array.from(keys.values()));
32
- else onChange?.(Array.from(keys.values())[0]);
33
- };
34
- const gridTemplateColumns = useMemo(() => {
35
- return items.length > 2 ? Array.from({ length: items.length * 2 - 1 }, (_, i) => i % 2 === 0 ? "1fr" : "auto").join(" ") : `repeat(${items.length}, 1fr)`;
36
- }, [items.length]);
37
- return /* @__PURE__ */ jsx(FormField, {
38
- ...formFieldProps,
39
- className: clsx("relative w-full", className),
40
- children: /* @__PURE__ */ jsx(ToggleButtonGroup, {
75
+ let t4;
76
+ if ($[17] !== error || $[18] !== props.isDisabled) {
77
+ t4 = {
78
+ error,
79
+ label: "",
80
+ hideLabel: true,
81
+ isDisabled: props.isDisabled
82
+ };
83
+ $[17] = error;
84
+ $[18] = props.isDisabled;
85
+ $[19] = t4;
86
+ } else t4 = $[19];
87
+ const formFieldProps = t4;
88
+ let t5;
89
+ if ($[20] !== onChange || $[21] !== props.selectionMode) {
90
+ t5 = (keys) => {
91
+ if (props.selectionMode === "multiple") onChange?.(Array.from(keys.values()));
92
+ else onChange?.(Array.from(keys.values())[0]);
93
+ };
94
+ $[20] = onChange;
95
+ $[21] = props.selectionMode;
96
+ $[22] = t5;
97
+ } else t5 = $[22];
98
+ const onSelectionChange = t5;
99
+ let t6;
100
+ if ($[23] !== items.length) {
101
+ t6 = items.length > 2 ? Array.from({ length: items.length * 2 - 1 }, _temp).join(" ") : `repeat(${items.length}, 1fr)`;
102
+ $[23] = items.length;
103
+ $[24] = t6;
104
+ } else t6 = $[24];
105
+ const gridTemplateColumns = t6;
106
+ let t7;
107
+ if ($[25] !== className) {
108
+ t7 = clsx("relative w-full", className);
109
+ $[25] = className;
110
+ $[26] = t7;
111
+ } else t7 = $[26];
112
+ let t8;
113
+ if ($[27] !== className || $[28] !== props || $[29] !== segmentCva$1) {
114
+ t8 = segmentCva$1({
115
+ ...props,
116
+ className
117
+ });
118
+ $[27] = className;
119
+ $[28] = props;
120
+ $[29] = segmentCva$1;
121
+ $[30] = t8;
122
+ } else t8 = $[30];
123
+ let t9;
124
+ if ($[31] !== gridTemplateColumns) {
125
+ t9 = { gridTemplateColumns };
126
+ $[31] = gridTemplateColumns;
127
+ $[32] = t9;
128
+ } else t9 = $[32];
129
+ let t10;
130
+ if ($[33] !== items || $[34] !== props.isDisabled || $[35] !== segmentItemClassName || $[36] !== state) {
131
+ t10 = items.map((item, index) => /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(SegmentItem, {
132
+ ...item,
133
+ className: clsx(item.className, segmentItemClassName),
134
+ isDisabled: item.isDisabled || props.isDisabled,
135
+ isSelected: state.selectedKeys.has(item.id),
136
+ onPress: () => {
137
+ state.toggleKey(item.id);
138
+ }
139
+ }), index !== items.length - 1 && items.length > 2 && /* @__PURE__ */ jsx("div", {
140
+ className: clsx("h-5 w-px rounded-2xl", !state.selectedKeys.has(item.id) && !state.selectedKeys.has(items[index + 1].id) && "bg-elevation-outline-default-1"),
141
+ children: /* @__PURE__ */ jsx("span", { className: "flex h-full w-px" })
142
+ })] }, item.id));
143
+ $[33] = items;
144
+ $[34] = props.isDisabled;
145
+ $[35] = segmentItemClassName;
146
+ $[36] = state;
147
+ $[37] = t10;
148
+ } else t10 = $[37];
149
+ let t11;
150
+ if ($[38] !== groupProps || $[39] !== onSelectionChange || $[40] !== props || $[41] !== t10 || $[42] !== t8 || $[43] !== t9) {
151
+ t11 = /* @__PURE__ */ jsx(ToggleButtonGroup, {
41
152
  ...props,
42
153
  ...groupProps,
43
154
  ref: buttonGroupRef,
44
155
  onSelectionChange,
45
- className: segmentCva$1({
46
- ...props,
47
- className
48
- }),
49
- style: { gridTemplateColumns },
50
- children: items.map((item, index) => /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(SegmentItem, {
51
- ...item,
52
- className: clsx(item.className, segmentItemClassName),
53
- isDisabled: item.isDisabled || props.isDisabled,
54
- isSelected: state.selectedKeys.has(item.id),
55
- onPress: () => {
56
- state.toggleKey(item.id);
57
- }
58
- }), index !== items.length - 1 && items.length > 2 && /* @__PURE__ */ jsx("div", {
59
- className: clsx("h-5 w-px rounded-2xl", !state.selectedKeys.has(item.id) && !state.selectedKeys.has(items[index + 1].id) && "bg-elevation-outline-default-1"),
60
- children: /* @__PURE__ */ jsx("span", { className: "flex h-full w-px" })
61
- })] }, item.id))
62
- })
63
- });
156
+ className: t8,
157
+ style: t9,
158
+ children: t10
159
+ });
160
+ $[38] = groupProps;
161
+ $[39] = onSelectionChange;
162
+ $[40] = props;
163
+ $[41] = t10;
164
+ $[42] = t8;
165
+ $[43] = t9;
166
+ $[44] = t11;
167
+ } else t11 = $[44];
168
+ let t12;
169
+ if ($[45] !== formFieldProps || $[46] !== t11 || $[47] !== t7) {
170
+ t12 = /* @__PURE__ */ jsx(FormField, {
171
+ ...formFieldProps,
172
+ className: t7,
173
+ children: t11
174
+ });
175
+ $[45] = formFieldProps;
176
+ $[46] = t11;
177
+ $[47] = t7;
178
+ $[48] = t12;
179
+ } else t12 = $[48];
180
+ return t12;
64
181
  };
65
182
  var Segment = (props) => {
183
+ const $ = c(15);
66
184
  if ("formControl" in props && props.formControl) {
67
- const { formControl, ref, ...innerProps } = props;
68
- return /* @__PURE__ */ jsx(Controller, {
69
- control: formControl.control,
70
- name: formControl.name,
71
- render: ({ field, fieldState: { error } }) => /* @__PURE__ */ jsx(SegmentBase, {
72
- ...innerProps,
73
- ref: mergeRefs(ref, field.ref),
74
- value: field.value,
75
- onChange: field.onChange,
76
- isDisabled: field.disabled || props.isDisabled,
77
- error: props.error ?? error?.message
78
- })
79
- });
185
+ let formControl;
186
+ let innerProps;
187
+ let ref;
188
+ if ($[0] !== props) {
189
+ ({formControl, ref, ...innerProps} = props);
190
+ $[0] = props;
191
+ $[1] = formControl;
192
+ $[2] = innerProps;
193
+ $[3] = ref;
194
+ } else {
195
+ formControl = $[1];
196
+ innerProps = $[2];
197
+ ref = $[3];
198
+ }
199
+ let t0;
200
+ if ($[4] !== innerProps || $[5] !== props.error || $[6] !== props.isDisabled || $[7] !== ref) {
201
+ t0 = (t1) => {
202
+ const { field, fieldState: t2 } = t1;
203
+ const { error } = t2;
204
+ return /* @__PURE__ */ jsx(SegmentBase, {
205
+ ...innerProps,
206
+ ref: mergeRefs(ref, field.ref),
207
+ value: field.value,
208
+ onChange: field.onChange,
209
+ isDisabled: field.disabled || props.isDisabled,
210
+ error: props.error ?? error?.message
211
+ });
212
+ };
213
+ $[4] = innerProps;
214
+ $[5] = props.error;
215
+ $[6] = props.isDisabled;
216
+ $[7] = ref;
217
+ $[8] = t0;
218
+ } else t0 = $[8];
219
+ let t1;
220
+ if ($[9] !== formControl.control || $[10] !== formControl.name || $[11] !== t0) {
221
+ t1 = /* @__PURE__ */ jsx(Controller, {
222
+ control: formControl.control,
223
+ name: formControl.name,
224
+ render: t0
225
+ });
226
+ $[9] = formControl.control;
227
+ $[10] = formControl.name;
228
+ $[11] = t0;
229
+ $[12] = t1;
230
+ } else t1 = $[12];
231
+ return t1;
80
232
  }
81
- return /* @__PURE__ */ jsx(SegmentBase, { ...props });
233
+ let t0;
234
+ if ($[13] !== props) {
235
+ t0 = /* @__PURE__ */ jsx(SegmentBase, { ...props });
236
+ $[13] = props;
237
+ $[14] = t0;
238
+ } else t0 = $[14];
239
+ return t0;
82
240
  };
241
+ function _temp(_, i) {
242
+ return i % 2 === 0 ? "1fr" : "auto";
243
+ }
83
244
  //#endregion
84
245
  export { Segment };
@@ -1,28 +1,85 @@
1
1
  import { UIStyle } from "../../config/uiStyle.context.js";
2
2
  import { Typography } from "../text/Typography/Typography.js";
3
3
  import { segmentItemCva } from "./segment.cva.js";
4
+ import { c } from "react/compiler-runtime";
4
5
  import { jsx, jsxs } from "react/jsx-runtime";
5
6
  import { ToggleButton } from "react-aria-components";
6
7
  //#region src/components/segment/SegmentItem.tsx
7
- var SegmentItem = ({ label, icon, id, isDisabled, className, ...props }) => {
8
+ var SegmentItem = (t0) => {
9
+ const $ = c(23);
10
+ let className;
11
+ let icon;
12
+ let id;
13
+ let isDisabled;
14
+ let label;
15
+ let props;
16
+ if ($[0] !== t0) {
17
+ ({label, icon, id, isDisabled, className, ...props} = t0);
18
+ $[0] = t0;
19
+ $[1] = className;
20
+ $[2] = icon;
21
+ $[3] = id;
22
+ $[4] = isDisabled;
23
+ $[5] = label;
24
+ $[6] = props;
25
+ } else {
26
+ className = $[1];
27
+ icon = $[2];
28
+ id = $[3];
29
+ isDisabled = $[4];
30
+ label = $[5];
31
+ props = $[6];
32
+ }
8
33
  const IconComponent = icon;
9
34
  const iconOnly = !!(icon && !label);
10
35
  const segmentItemCva$1 = UIStyle.useCva("segment.itemCva", segmentItemCva);
11
- return /* @__PURE__ */ jsxs(ToggleButton, {
12
- ...props,
13
- id,
14
- className: segmentItemCva$1({
36
+ let t1;
37
+ if ($[7] !== className || $[8] !== iconOnly || $[9] !== segmentItemCva$1) {
38
+ t1 = segmentItemCva$1({
15
39
  iconOnly,
16
40
  className
17
- }),
18
- isDisabled,
19
- children: [icon && /* @__PURE__ */ jsx(IconComponent, { className: "size-6" }), label && /* @__PURE__ */ jsx(Typography, {
41
+ });
42
+ $[7] = className;
43
+ $[8] = iconOnly;
44
+ $[9] = segmentItemCva$1;
45
+ $[10] = t1;
46
+ } else t1 = $[10];
47
+ let t2;
48
+ if ($[11] !== IconComponent || $[12] !== icon) {
49
+ t2 = icon && /* @__PURE__ */ jsx(IconComponent, { className: "size-6" });
50
+ $[11] = IconComponent;
51
+ $[12] = icon;
52
+ $[13] = t2;
53
+ } else t2 = $[13];
54
+ let t3;
55
+ if ($[14] !== label) {
56
+ t3 = label && /* @__PURE__ */ jsx(Typography, {
20
57
  size: "label-2",
21
58
  as: "span",
22
59
  className: "overflow-hidden text-ellipsis text-center",
23
60
  children: label
24
- })]
25
- });
61
+ });
62
+ $[14] = label;
63
+ $[15] = t3;
64
+ } else t3 = $[15];
65
+ let t4;
66
+ if ($[16] !== id || $[17] !== isDisabled || $[18] !== props || $[19] !== t1 || $[20] !== t2 || $[21] !== t3) {
67
+ t4 = /* @__PURE__ */ jsxs(ToggleButton, {
68
+ ...props,
69
+ id,
70
+ className: t1,
71
+ isDisabled,
72
+ children: [t2, t3]
73
+ });
74
+ $[16] = id;
75
+ $[17] = isDisabled;
76
+ $[18] = props;
77
+ $[19] = t1;
78
+ $[20] = t2;
79
+ $[21] = t3;
80
+ $[22] = t4;
81
+ } else t4 = $[22];
82
+ return t4;
26
83
  };
27
84
  //#endregion
28
85
  export { SegmentItem };