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

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 (194) hide show
  1. package/dist/assets/icons/AlignCenter.js +26 -11
  2. package/dist/assets/icons/AlignLeft.js +26 -11
  3. package/dist/assets/icons/AlignLeftRight.js +26 -11
  4. package/dist/assets/icons/AlignRight.js +26 -11
  5. package/dist/assets/icons/ArrowDropDown.js +26 -11
  6. package/dist/assets/icons/ArrowDropUp.js +26 -11
  7. package/dist/assets/icons/ArrowLeft.js +26 -11
  8. package/dist/assets/icons/ArrowRight.js +26 -11
  9. package/dist/assets/icons/Bold.js +26 -11
  10. package/dist/assets/icons/BulletedList.js +26 -11
  11. package/dist/assets/icons/Calendar.js +28 -13
  12. package/dist/assets/icons/Check.js +28 -13
  13. package/dist/assets/icons/CheckCircle.js +26 -11
  14. package/dist/assets/icons/CheckboxCheckmark.js +29 -14
  15. package/dist/assets/icons/CheckboxIndeterminate.js +29 -14
  16. package/dist/assets/icons/ChevronDown.js +28 -13
  17. package/dist/assets/icons/ChevronLeft.js +28 -13
  18. package/dist/assets/icons/ChevronRight.js +28 -13
  19. package/dist/assets/icons/ChevronUp.js +28 -13
  20. package/dist/assets/icons/ChevronsLeft.js +28 -13
  21. package/dist/assets/icons/ChevronsRight.js +28 -13
  22. package/dist/assets/icons/Clock.js +26 -11
  23. package/dist/assets/icons/Close.js +26 -11
  24. package/dist/assets/icons/DateTime.js +35 -14
  25. package/dist/assets/icons/DragIndicator.js +26 -11
  26. package/dist/assets/icons/File.js +28 -13
  27. package/dist/assets/icons/Highlight.js +26 -11
  28. package/dist/assets/icons/HighlightOn.js +49 -15
  29. package/dist/assets/icons/Home.js +26 -11
  30. package/dist/assets/icons/Info.js +37 -16
  31. package/dist/assets/icons/Italic.js +26 -11
  32. package/dist/assets/icons/Link.js +26 -11
  33. package/dist/assets/icons/Menu.js +26 -11
  34. package/dist/assets/icons/NumberedList.js +26 -11
  35. package/dist/assets/icons/PointerHorizontal.js +26 -11
  36. package/dist/assets/icons/PointerVertical.js +26 -11
  37. package/dist/assets/icons/Search.js +26 -11
  38. package/dist/assets/icons/Send.js +28 -13
  39. package/dist/assets/icons/Strikethrough.js +26 -11
  40. package/dist/assets/icons/TextColor.js +48 -14
  41. package/dist/assets/icons/Today.js +26 -11
  42. package/dist/assets/icons/Underlined.js +28 -13
  43. package/dist/assets/icons/Upload.js +35 -14
  44. package/dist/assets/icons/Visibility.js +26 -11
  45. package/dist/assets/icons/VisibilityOff.js +26 -11
  46. package/dist/assets/icons/WarningFilled.js +28 -13
  47. package/dist/components/Breadcrumbs/Breadcrumbs.js +207 -56
  48. package/dist/components/Menu/Menu.js +18 -2
  49. package/dist/components/Menu/MenuDesktop.js +41 -7
  50. package/dist/components/Menu/MenuItem.js +32 -9
  51. package/dist/components/Menu/MenuMobile.js +97 -38
  52. package/dist/components/Menu/MenuPopover.js +105 -29
  53. package/dist/components/buttons/IconButton/IconButton.js +40 -8
  54. package/dist/components/buttons/InlineIconButton/InlineIconButton.js +34 -9
  55. package/dist/components/buttons/PillButton/PillButton.js +55 -17
  56. package/dist/components/buttons/SplitButton/SplitButton.js +103 -18
  57. package/dist/components/buttons/TextButton/TextButton.js +30 -8
  58. package/dist/components/buttons/ToggleButton/ToggleButton.js +28 -8
  59. package/dist/components/buttons/shared/ButtonContent.js +80 -22
  60. package/dist/components/inputs/Checkbox/Checkbox.js +164 -34
  61. package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +24 -10
  62. package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +8 -8
  63. package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +103 -103
  64. package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +9 -9
  65. package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +384 -116
  66. package/dist/components/inputs/DateTime/shared/Calendar.js +331 -137
  67. package/dist/components/inputs/DateTime/shared/CalendarCell.js +283 -102
  68. package/dist/components/inputs/DateTime/shared/CalendarGrid.js +142 -33
  69. package/dist/components/inputs/DateTime/shared/CalendarHeader.js +245 -90
  70. package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +318 -137
  71. package/dist/components/inputs/DateTime/shared/DateField.js +296 -112
  72. package/dist/components/inputs/DateTime/shared/DatePickerInput.js +345 -142
  73. package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +94 -21
  74. package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +81 -27
  75. package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +59 -10
  76. package/dist/components/inputs/DateTime/shared/MonthPicker.js +103 -58
  77. package/dist/components/inputs/DateTime/shared/RangeCalendar.js +193 -82
  78. package/dist/components/inputs/DateTime/shared/TimeField.js +27 -8
  79. package/dist/components/inputs/DateTime/shared/TimePickerForm.js +279 -110
  80. package/dist/components/inputs/DateTime/shared/TimePickerInput.js +205 -70
  81. package/dist/components/inputs/DateTime/shared/YearPicker.js +119 -68
  82. package/dist/components/inputs/File/FileUpload.js +86 -44
  83. package/dist/components/inputs/File/FileUploadContainer.js +15 -7
  84. package/dist/components/inputs/File/InputUpload.js +317 -79
  85. package/dist/components/inputs/File/shared/FileCard.js +104 -41
  86. package/dist/components/inputs/File/shared/FileCardList.js +47 -12
  87. package/dist/components/inputs/File/shared/FileUploadContent.js +175 -44
  88. package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +149 -46
  89. package/dist/components/inputs/File/shared/FileUploadContentError.js +234 -93
  90. package/dist/components/inputs/File/shared/FileUploadContentFilled.js +230 -97
  91. package/dist/components/inputs/File/shared/FileUploadContentLoading.js +199 -55
  92. package/dist/components/inputs/File/shared/InputUploadContent.js +148 -35
  93. package/dist/components/inputs/File/shared/InputUploadFilled.js +49 -8
  94. package/dist/components/inputs/File/shared/ProgressBar.js +48 -9
  95. package/dist/components/inputs/FormField/FormField.js +119 -37
  96. package/dist/components/inputs/FormField/FormFieldError.js +25 -5
  97. package/dist/components/inputs/FormField/FormFieldHeader.js +79 -22
  98. package/dist/components/inputs/FormField/FormFieldHeaderClose.js +31 -7
  99. package/dist/components/inputs/FormField/FormFieldHelper.js +26 -6
  100. package/dist/components/inputs/FormField/FormFieldLabel.js +40 -9
  101. package/dist/components/inputs/Input/NumberInput/NumberInput.js +253 -82
  102. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +541 -116
  103. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +314 -75
  104. package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +48 -9
  105. package/dist/components/inputs/Input/TextArea/TextArea.js +298 -89
  106. package/dist/components/inputs/Input/TextInput/TextInput.js +241 -81
  107. package/dist/components/inputs/Input/shared/InputContent.js +190 -58
  108. package/dist/components/inputs/Inputs/Form.js +40 -11
  109. package/dist/components/inputs/Inputs/InputItem.js +65 -14
  110. package/dist/components/inputs/Inputs/Inputs.js +37 -11
  111. package/dist/components/inputs/RadioGroup/RadioGroup.js +317 -106
  112. package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +2 -2
  113. package/dist/components/inputs/Selection/Select/QuerySelect.js +107 -27
  114. package/dist/components/inputs/Selection/shared/SelectBase.js +69 -20
  115. package/dist/components/inputs/Selection/shared/SelectDesktop.js +390 -143
  116. package/dist/components/inputs/Selection/shared/SelectInput.js +334 -136
  117. package/dist/components/inputs/Selection/shared/SelectInputTags.js +99 -25
  118. package/dist/components/inputs/Selection/shared/SelectListBox.js +163 -51
  119. package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +85 -35
  120. package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +69 -16
  121. package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +70 -21
  122. package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +58 -9
  123. package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +36 -11
  124. package/dist/components/inputs/Selection/shared/querySelect.utils.d.ts +1 -1
  125. package/dist/components/inputs/Selection/shared/querySelect.utils.js +1 -7
  126. package/dist/components/inputs/Selection/shared/select.context.js +34 -34
  127. package/dist/components/inputs/Selection/shared/useSelectItems.js +109 -49
  128. package/dist/components/inputs/Skeleton/InputFrame.js +472 -145
  129. package/dist/components/inputs/Slider/Slider.js +247 -74
  130. package/dist/components/inputs/TextEditor/TextEditor.js +447 -103
  131. package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +37 -11
  132. package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +102 -30
  133. package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +194 -45
  134. package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +88 -28
  135. package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +48 -14
  136. package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.js +66 -19
  137. package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +49 -15
  138. package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +92 -32
  139. package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +126 -54
  140. package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +141 -38
  141. package/dist/components/inputs/Toggle/Toggle.js +187 -41
  142. package/dist/components/inputs/shared/CheckContent.js +21 -10
  143. package/dist/components/inputs/shared/InputClear.js +78 -21
  144. package/dist/components/inputs/shared/TooltipWrapper.js +47 -12
  145. package/dist/components/inputs/shared/input.cva.js +13 -3
  146. package/dist/components/inputs/shared/useStaticInputHandoff.js +83 -55
  147. package/dist/components/navigation/Accordion/Accordion.js +69 -22
  148. package/dist/components/navigation/Accordion/AccordionItem.js +86 -41
  149. package/dist/components/navigation/Stepper/Stepper.js +67 -22
  150. package/dist/components/navigation/Stepper/StepperItem.js +104 -31
  151. package/dist/components/navigation/Stepper/StepperSeparator.js +23 -5
  152. package/dist/components/overlays/ActionModal/ActionModal.js +169 -35
  153. package/dist/components/overlays/BottomSheet/BottomSheet.js +96 -23
  154. package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +48 -8
  155. package/dist/components/overlays/Drawer/Drawer.js +62 -20
  156. package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +83 -27
  157. package/dist/components/overlays/Tooltip/Tooltip.js +137 -28
  158. package/dist/components/overlays/Tooltip/TooltipEllipsis.js +37 -12
  159. package/dist/components/segment/Segment.js +218 -57
  160. package/dist/components/segment/SegmentItem.js +67 -10
  161. package/dist/components/shared/pagination/Pagination.js +108 -22
  162. package/dist/components/shared/pagination/PaginationList.js +167 -64
  163. package/dist/components/status/Alert/Alert.js +97 -30
  164. package/dist/components/status/Loader/Loader.js +77 -22
  165. package/dist/components/status/Toast/Toast.js +21 -13
  166. package/dist/components/status/Toast/useToast.js +62 -57
  167. package/dist/components/table/ColumnConfig.js +158 -54
  168. package/dist/components/table/InfiniteTable.js +67 -16
  169. package/dist/components/table/PaginatedTable.js +84 -18
  170. package/dist/components/table/Table.js +23 -23
  171. package/dist/components/text/Link/Link.js +19 -7
  172. package/dist/components/text/Typography/Typography.js +23 -8
  173. package/dist/config/confirmation.context.js +1 -1
  174. package/dist/config/link.context.js +23 -9
  175. package/dist/config/router.context.js +42 -16
  176. package/dist/config/theme.context.js +98 -45
  177. package/dist/config/uiConfig.context.js +39 -8
  178. package/dist/config/uiStyle.context.js +15 -5
  179. package/dist/hooks/useBreakpoint.js +16 -3
  180. package/dist/hooks/useDebounceCallback.js +51 -17
  181. package/dist/hooks/useFilters.js +125 -64
  182. package/dist/hooks/useForm.js +42 -8
  183. package/dist/hooks/useFormAutosave.js +101 -30
  184. package/dist/hooks/useIntersectionObserver.js +86 -32
  185. package/dist/hooks/useLocalStorage.js +43 -10
  186. package/dist/hooks/useLongPressRepeat.js +55 -20
  187. package/dist/hooks/usePagination.js +49 -19
  188. package/dist/hooks/useQueryAutocomplete.js +1 -1
  189. package/dist/hooks/useScrollableListBox.js +37 -16
  190. package/dist/hooks/useSorting.js +69 -28
  191. package/dist/hooks/useStateAndRef.js +21 -7
  192. package/dist/hooks/useTableColumnConfig.js +124 -31
  193. package/dist/hooks/useTranslationMemo.js +25 -5
  194. package/package.json +1 -1
@@ -2,6 +2,7 @@ import { Typography } from "../../text/Typography/Typography.js";
2
2
  import { UIConfig } from "../../../config/uiConfig.context.js";
3
3
  import { uiOutlineClass } from "../../outline.clsx.js";
4
4
  import { FormField } from "../FormField/FormField.js";
5
+ import { c } from "react/compiler-runtime";
5
6
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
7
  import { clsx } from "clsx";
7
8
  import { Slider, SliderThumb, SliderTrack } from "react-aria-components";
@@ -9,90 +10,262 @@ import { mergeRefs } from "@react-aria/utils";
9
10
  import { Controller } from "react-hook-form";
10
11
  //#region src/components/inputs/Slider/Slider.tsx
11
12
  var SliderBase = (props) => {
13
+ const $ = c(58);
12
14
  const ui = UIConfig.useConfig();
13
- const { label, tooltipText, helperText, isRequired, rightContent, isDisabled, headerClassName, errorClassName, isHeaderHidden, error, unit, hideLabel: hideLabelProp, minValue: minValueProp, maxValue: maxValueProp, ...rest } = props;
15
+ let error;
16
+ let errorClassName;
17
+ let headerClassName;
18
+ let helperText;
19
+ let hideLabelProp;
20
+ let isDisabled;
21
+ let isHeaderHidden;
22
+ let isRequired;
23
+ let label;
24
+ let maxValueProp;
25
+ let minValueProp;
26
+ let rest;
27
+ let rightContent;
28
+ let tooltipText;
29
+ let unit;
30
+ if ($[0] !== props) {
31
+ ({label, tooltipText, helperText, isRequired, rightContent, isDisabled, headerClassName, errorClassName, isHeaderHidden, error, unit, hideLabel: hideLabelProp, minValue: minValueProp, maxValue: maxValueProp, ...rest} = props);
32
+ $[0] = props;
33
+ $[1] = error;
34
+ $[2] = errorClassName;
35
+ $[3] = headerClassName;
36
+ $[4] = helperText;
37
+ $[5] = hideLabelProp;
38
+ $[6] = isDisabled;
39
+ $[7] = isHeaderHidden;
40
+ $[8] = isRequired;
41
+ $[9] = label;
42
+ $[10] = maxValueProp;
43
+ $[11] = minValueProp;
44
+ $[12] = rest;
45
+ $[13] = rightContent;
46
+ $[14] = tooltipText;
47
+ $[15] = unit;
48
+ } else {
49
+ error = $[1];
50
+ errorClassName = $[2];
51
+ headerClassName = $[3];
52
+ helperText = $[4];
53
+ hideLabelProp = $[5];
54
+ isDisabled = $[6];
55
+ isHeaderHidden = $[7];
56
+ isRequired = $[8];
57
+ label = $[9];
58
+ maxValueProp = $[10];
59
+ minValueProp = $[11];
60
+ rest = $[12];
61
+ rightContent = $[13];
62
+ tooltipText = $[14];
63
+ unit = $[15];
64
+ }
14
65
  const hideLabel = hideLabelProp ?? ui.input.hideLabel;
15
66
  const minValue = minValueProp ?? ui.slider.minValue;
16
67
  const maxValue = maxValueProp ?? ui.slider.maxValue;
17
- const formFieldProps = {
18
- error,
19
- label,
20
- tooltipText,
21
- helperText,
22
- isRequired,
23
- rightContent,
24
- isHeaderHidden,
25
- hideLabel,
26
- isDisabled,
27
- headerClassName,
28
- errorClassName
29
- };
30
- const defaultValue = props.defaultValue ?? (props.isRange ? [minValue, minValue] : minValue);
31
- const getTrackFillStyle = (state) => {
32
- const p0 = state.getThumbPercent(0);
33
- const p1 = state.getThumbPercent(1);
34
- return {
35
- left: props.isRange ? `${p0 * 100}%` : 0,
36
- width: props.isRange ? `${(p1 - p0) * 100}%` : `${p0 * 100}%`
68
+ let t0;
69
+ if ($[16] !== error || $[17] !== errorClassName || $[18] !== headerClassName || $[19] !== helperText || $[20] !== hideLabel || $[21] !== isDisabled || $[22] !== isHeaderHidden || $[23] !== isRequired || $[24] !== label || $[25] !== rightContent || $[26] !== tooltipText) {
70
+ t0 = {
71
+ error,
72
+ label,
73
+ tooltipText,
74
+ helperText,
75
+ isRequired,
76
+ rightContent,
77
+ isHeaderHidden,
78
+ hideLabel,
79
+ isDisabled,
80
+ headerClassName,
81
+ errorClassName
37
82
  };
38
- };
39
- return /* @__PURE__ */ jsx(Slider, {
40
- ...rest,
41
- defaultValue,
42
- minValue,
43
- maxValue,
44
- isDisabled,
45
- children: /* @__PURE__ */ jsx(FormField, {
46
- ...formFieldProps,
47
- children: /* @__PURE__ */ jsxs("div", {
48
- className: "flex items-center justify-between",
49
- children: [
50
- /* @__PURE__ */ jsxs(Typography, {
51
- className: "min-w-10 px-slider-side-leading-and-trailing py-slider-height-leading-and-trailing text-text-default-3",
52
- size: "label-2",
53
- children: [minValue, unit]
54
- }),
55
- /* @__PURE__ */ jsx(SliderTrack, {
56
- className: "relative mx-2 h-6 w-full",
57
- children: ({ state }) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", {
58
- className: "absolute top-1/2 h-1 w-full -translate-y-1/2 overflow-hidden rounded-full bg-elevation-outline-default-1",
59
- children: /* @__PURE__ */ jsx("div", {
60
- className: clsx("absolute top-0 h-1 rounded-full", props.isDisabled ? "bg-interactive-contained-primary-disabled" : "bg-interactive-contained-primary-idle"),
61
- style: getTrackFillStyle(state)
62
- })
63
- }), state.values.map((_, i) => /* @__PURE__ */ jsx(SliderThumb, {
64
- index: i,
65
- className: clsx("absolute top-1/2 size-4 cursor-pointer rounded-full bg-interactive-contained-primary-idle disabled:cursor-default", "dragging:bg-interactive-contained-primary-pressed hover:bg-interactive-contained-primary-hover focus-visible:outline-interactive-contained-primary-focus disabled:bg-interactive-contained-primary-disabled", uiOutlineClass),
66
- isDisabled
67
- }, i))] })
68
- }),
69
- /* @__PURE__ */ jsxs(Typography, {
70
- className: "min-w-10 px-slider-side-leading-and-trailing py-slider-height-leading-and-trailing text-text-default-3",
71
- size: "label-2",
72
- children: [maxValue, unit]
83
+ $[16] = error;
84
+ $[17] = errorClassName;
85
+ $[18] = headerClassName;
86
+ $[19] = helperText;
87
+ $[20] = hideLabel;
88
+ $[21] = isDisabled;
89
+ $[22] = isHeaderHidden;
90
+ $[23] = isRequired;
91
+ $[24] = label;
92
+ $[25] = rightContent;
93
+ $[26] = tooltipText;
94
+ $[27] = t0;
95
+ } else t0 = $[27];
96
+ const formFieldProps = t0;
97
+ let t1;
98
+ if ($[28] !== minValue || $[29] !== props.defaultValue || $[30] !== props.isRange) {
99
+ t1 = props.defaultValue ?? (props.isRange ? [minValue, minValue] : minValue);
100
+ $[28] = minValue;
101
+ $[29] = props.defaultValue;
102
+ $[30] = props.isRange;
103
+ $[31] = t1;
104
+ } else t1 = $[31];
105
+ const defaultValue = t1;
106
+ let t2;
107
+ if ($[32] !== props.isRange) {
108
+ t2 = (state) => {
109
+ const p0 = state.getThumbPercent(0);
110
+ const p1 = state.getThumbPercent(1);
111
+ return {
112
+ left: props.isRange ? `${p0 * 100}%` : 0,
113
+ width: props.isRange ? `${(p1 - p0) * 100}%` : `${p0 * 100}%`
114
+ };
115
+ };
116
+ $[32] = props.isRange;
117
+ $[33] = t2;
118
+ } else t2 = $[33];
119
+ const getTrackFillStyle = t2;
120
+ let t3;
121
+ if ($[34] !== minValue || $[35] !== unit) {
122
+ t3 = /* @__PURE__ */ jsxs(Typography, {
123
+ className: "min-w-10 px-slider-side-leading-and-trailing py-slider-height-leading-and-trailing text-text-default-3",
124
+ size: "label-2",
125
+ children: [minValue, unit]
126
+ });
127
+ $[34] = minValue;
128
+ $[35] = unit;
129
+ $[36] = t3;
130
+ } else t3 = $[36];
131
+ let t4;
132
+ if ($[37] !== getTrackFillStyle || $[38] !== isDisabled || $[39] !== props.isDisabled) {
133
+ t4 = /* @__PURE__ */ jsx(SliderTrack, {
134
+ className: "relative mx-2 h-6 w-full",
135
+ children: (t5) => {
136
+ const { state: state_0 } = t5;
137
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", {
138
+ className: "absolute top-1/2 h-1 w-full -translate-y-1/2 overflow-hidden rounded-full bg-elevation-outline-default-1",
139
+ children: /* @__PURE__ */ jsx("div", {
140
+ className: clsx("absolute top-0 h-1 rounded-full", props.isDisabled ? "bg-interactive-contained-primary-disabled" : "bg-interactive-contained-primary-idle"),
141
+ style: getTrackFillStyle(state_0)
73
142
  })
74
- ]
75
- })
76
- })
77
- });
143
+ }), state_0.values.map((_, i) => /* @__PURE__ */ jsx(SliderThumb, {
144
+ index: i,
145
+ className: clsx("absolute top-1/2 size-4 cursor-pointer rounded-full bg-interactive-contained-primary-idle disabled:cursor-default", "dragging:bg-interactive-contained-primary-pressed hover:bg-interactive-contained-primary-hover focus-visible:outline-interactive-contained-primary-focus disabled:bg-interactive-contained-primary-disabled", uiOutlineClass),
146
+ isDisabled
147
+ }, i))] });
148
+ }
149
+ });
150
+ $[37] = getTrackFillStyle;
151
+ $[38] = isDisabled;
152
+ $[39] = props.isDisabled;
153
+ $[40] = t4;
154
+ } else t4 = $[40];
155
+ let t5;
156
+ if ($[41] !== maxValue || $[42] !== unit) {
157
+ t5 = /* @__PURE__ */ jsxs(Typography, {
158
+ className: "min-w-10 px-slider-side-leading-and-trailing py-slider-height-leading-and-trailing text-text-default-3",
159
+ size: "label-2",
160
+ children: [maxValue, unit]
161
+ });
162
+ $[41] = maxValue;
163
+ $[42] = unit;
164
+ $[43] = t5;
165
+ } else t5 = $[43];
166
+ let t6;
167
+ if ($[44] !== t3 || $[45] !== t4 || $[46] !== t5) {
168
+ t6 = /* @__PURE__ */ jsxs("div", {
169
+ className: "flex items-center justify-between",
170
+ children: [
171
+ t3,
172
+ t4,
173
+ t5
174
+ ]
175
+ });
176
+ $[44] = t3;
177
+ $[45] = t4;
178
+ $[46] = t5;
179
+ $[47] = t6;
180
+ } else t6 = $[47];
181
+ let t7;
182
+ if ($[48] !== formFieldProps || $[49] !== t6) {
183
+ t7 = /* @__PURE__ */ jsx(FormField, {
184
+ ...formFieldProps,
185
+ children: t6
186
+ });
187
+ $[48] = formFieldProps;
188
+ $[49] = t6;
189
+ $[50] = t7;
190
+ } else t7 = $[50];
191
+ let t8;
192
+ if ($[51] !== defaultValue || $[52] !== isDisabled || $[53] !== maxValue || $[54] !== minValue || $[55] !== rest || $[56] !== t7) {
193
+ t8 = /* @__PURE__ */ jsx(Slider, {
194
+ ...rest,
195
+ defaultValue,
196
+ minValue,
197
+ maxValue,
198
+ isDisabled,
199
+ children: t7
200
+ });
201
+ $[51] = defaultValue;
202
+ $[52] = isDisabled;
203
+ $[53] = maxValue;
204
+ $[54] = minValue;
205
+ $[55] = rest;
206
+ $[56] = t7;
207
+ $[57] = t8;
208
+ } else t8 = $[57];
209
+ return t8;
78
210
  };
79
211
  var Slider$1 = (props) => {
212
+ const $ = c(15);
80
213
  if ("formControl" in props && props.formControl) {
81
- const { formControl, ref, ...innerProps } = props;
82
- return /* @__PURE__ */ jsx(Controller, {
83
- control: formControl.control,
84
- name: formControl.name,
85
- render: ({ field, fieldState: { error } }) => /* @__PURE__ */ jsx(SliderBase, {
86
- ...innerProps,
87
- ref: mergeRefs(ref, field.ref),
88
- value: field.value,
89
- onChange: field.onChange,
90
- isDisabled: field.disabled || props.isDisabled,
91
- error: props.error ?? error?.message
92
- })
93
- });
214
+ let formControl;
215
+ let innerProps;
216
+ let ref;
217
+ if ($[0] !== props) {
218
+ ({formControl, ref, ...innerProps} = props);
219
+ $[0] = props;
220
+ $[1] = formControl;
221
+ $[2] = innerProps;
222
+ $[3] = ref;
223
+ } else {
224
+ formControl = $[1];
225
+ innerProps = $[2];
226
+ ref = $[3];
227
+ }
228
+ let t0;
229
+ if ($[4] !== innerProps || $[5] !== props.error || $[6] !== props.isDisabled || $[7] !== ref) {
230
+ t0 = (t1) => {
231
+ const { field, fieldState: t2 } = t1;
232
+ const { error } = t2;
233
+ return /* @__PURE__ */ jsx(SliderBase, {
234
+ ...innerProps,
235
+ ref: mergeRefs(ref, field.ref),
236
+ value: field.value,
237
+ onChange: field.onChange,
238
+ isDisabled: field.disabled || props.isDisabled,
239
+ error: props.error ?? error?.message
240
+ });
241
+ };
242
+ $[4] = innerProps;
243
+ $[5] = props.error;
244
+ $[6] = props.isDisabled;
245
+ $[7] = ref;
246
+ $[8] = t0;
247
+ } else t0 = $[8];
248
+ let t1;
249
+ if ($[9] !== formControl.control || $[10] !== formControl.name || $[11] !== t0) {
250
+ t1 = /* @__PURE__ */ jsx(Controller, {
251
+ control: formControl.control,
252
+ name: formControl.name,
253
+ render: t0
254
+ });
255
+ $[9] = formControl.control;
256
+ $[10] = formControl.name;
257
+ $[11] = t0;
258
+ $[12] = t1;
259
+ } else t1 = $[12];
260
+ return t1;
94
261
  }
95
- return /* @__PURE__ */ jsx(SliderBase, { ...props });
262
+ let t0;
263
+ if ($[13] !== props) {
264
+ t0 = /* @__PURE__ */ jsx(SliderBase, { ...props });
265
+ $[13] = props;
266
+ $[14] = t0;
267
+ } else t0 = $[14];
268
+ return t0;
96
269
  };
97
270
  //#endregion
98
271
  export { Slider$1 as Slider };