@povio/ui 2.3.0-rc.4 → 2.3.0-rc.40

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 (231) 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 +193 -34
  62. package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +24 -10
  63. package/dist/components/inputs/Checkbox/checkbox.cva.js +2 -0
  64. package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +1 -0
  65. package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +289 -93
  66. package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +1 -0
  67. package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +376 -189
  68. package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +1 -0
  69. package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +189 -75
  70. package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +1 -0
  71. package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +559 -159
  72. package/dist/components/inputs/DateTime/shared/Calendar.js +333 -137
  73. package/dist/components/inputs/DateTime/shared/CalendarCell.d.ts +2 -1
  74. package/dist/components/inputs/DateTime/shared/CalendarCell.js +301 -102
  75. package/dist/components/inputs/DateTime/shared/CalendarGrid.d.ts +2 -1
  76. package/dist/components/inputs/DateTime/shared/CalendarGrid.js +146 -33
  77. package/dist/components/inputs/DateTime/shared/CalendarHeader.js +245 -90
  78. package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +318 -137
  79. package/dist/components/inputs/DateTime/shared/DateField.js +311 -112
  80. package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +7 -1
  81. package/dist/components/inputs/DateTime/shared/DatePickerInput.js +374 -147
  82. package/dist/components/inputs/DateTime/shared/DateSegmentItem.d.ts +3 -2
  83. package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +93 -21
  84. package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +81 -27
  85. package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +59 -10
  86. package/dist/components/inputs/DateTime/shared/MonthPicker.js +103 -58
  87. package/dist/components/inputs/DateTime/shared/RangeCalendar.js +193 -82
  88. package/dist/components/inputs/DateTime/shared/TimeField.js +27 -8
  89. package/dist/components/inputs/DateTime/shared/TimePickerForm.js +279 -110
  90. package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +3 -1
  91. package/dist/components/inputs/DateTime/shared/TimePickerInput.js +208 -70
  92. package/dist/components/inputs/DateTime/shared/YearPicker.js +119 -68
  93. package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.d.ts +9 -1
  94. package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.js +43 -7
  95. package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.d.ts +16 -8
  96. package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.js +46 -41
  97. package/dist/components/inputs/File/FileUpload.js +86 -44
  98. package/dist/components/inputs/File/FileUploadContainer.js +15 -7
  99. package/dist/components/inputs/File/InputUpload.js +317 -79
  100. package/dist/components/inputs/File/shared/FileCard.js +104 -41
  101. package/dist/components/inputs/File/shared/FileCardList.js +47 -12
  102. package/dist/components/inputs/File/shared/FileUploadContent.js +175 -44
  103. package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +149 -46
  104. package/dist/components/inputs/File/shared/FileUploadContentError.js +234 -93
  105. package/dist/components/inputs/File/shared/FileUploadContentFilled.js +230 -97
  106. package/dist/components/inputs/File/shared/FileUploadContentLoading.js +199 -55
  107. package/dist/components/inputs/File/shared/InputUploadContent.js +148 -35
  108. package/dist/components/inputs/File/shared/InputUploadFilled.js +50 -9
  109. package/dist/components/inputs/File/shared/ProgressBar.js +48 -9
  110. package/dist/components/inputs/FormField/FormField.js +119 -37
  111. package/dist/components/inputs/FormField/FormFieldError.js +25 -5
  112. package/dist/components/inputs/FormField/FormFieldHeader.js +79 -22
  113. package/dist/components/inputs/FormField/FormFieldHeaderClose.js +31 -7
  114. package/dist/components/inputs/FormField/FormFieldHelper.js +26 -6
  115. package/dist/components/inputs/FormField/FormFieldLabel.js +40 -9
  116. package/dist/components/inputs/Input/NumberInput/NumberInput.js +400 -125
  117. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +541 -116
  118. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +486 -146
  119. package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +48 -9
  120. package/dist/components/inputs/Input/TextArea/TextArea.js +298 -89
  121. package/dist/components/inputs/Input/TextInput/TextInput.js +370 -121
  122. package/dist/components/inputs/Input/shared/InputContent.js +190 -58
  123. package/dist/components/inputs/Inputs/Form.js +40 -11
  124. package/dist/components/inputs/Inputs/InputItem.d.ts +0 -1
  125. package/dist/components/inputs/Inputs/InputItem.js +65 -16
  126. package/dist/components/inputs/Inputs/Inputs.js +37 -11
  127. package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +1 -0
  128. package/dist/components/inputs/RadioGroup/RadioGroup.js +320 -108
  129. package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +146 -50
  130. package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +4 -4
  131. package/dist/components/inputs/Selection/Select/QuerySelect.js +90 -28
  132. package/dist/components/inputs/Selection/Select/Select.js +140 -45
  133. package/dist/components/inputs/Selection/shared/SelectBase.js +69 -20
  134. package/dist/components/inputs/Selection/shared/SelectDesktop.js +390 -143
  135. package/dist/components/inputs/Selection/shared/SelectInput.d.ts +2 -2
  136. package/dist/components/inputs/Selection/shared/SelectInput.js +328 -137
  137. package/dist/components/inputs/Selection/shared/SelectInputTags.js +99 -25
  138. package/dist/components/inputs/Selection/shared/SelectListBox.js +163 -51
  139. package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +85 -35
  140. package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +69 -16
  141. package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +70 -21
  142. package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +58 -9
  143. package/dist/components/inputs/Selection/shared/SelectMobile.js +3 -2
  144. package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.d.ts +9 -0
  145. package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +47 -0
  146. package/dist/components/inputs/Selection/shared/querySelect.utils.d.ts +1 -0
  147. package/dist/components/inputs/Selection/shared/querySelect.utils.js +12 -1
  148. package/dist/components/inputs/Selection/shared/select.context.d.ts +2 -2
  149. package/dist/components/inputs/Selection/shared/select.context.js +47 -39
  150. package/dist/components/inputs/Selection/shared/selectInput.cva.d.ts +5 -0
  151. package/dist/components/inputs/Selection/shared/selectInput.cva.js +5 -0
  152. package/dist/components/inputs/Selection/shared/useSelectItems.js +109 -49
  153. package/dist/components/inputs/Skeleton/InputFrame.d.ts +3 -0
  154. package/dist/components/inputs/Skeleton/InputFrame.js +445 -117
  155. package/dist/components/inputs/Slider/Slider.d.ts +2 -1
  156. package/dist/components/inputs/Slider/Slider.js +265 -78
  157. package/dist/components/inputs/TextEditor/TextEditor.js +447 -103
  158. package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +37 -11
  159. package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +102 -30
  160. package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +194 -45
  161. package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +88 -28
  162. package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +48 -14
  163. package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.js +66 -19
  164. package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +49 -15
  165. package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +92 -32
  166. package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +126 -54
  167. package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +141 -38
  168. package/dist/components/inputs/Toggle/Toggle.d.ts +1 -0
  169. package/dist/components/inputs/Toggle/Toggle.js +212 -41
  170. package/dist/components/inputs/Toggle/toggle.cva.js +2 -1
  171. package/dist/components/inputs/shared/CheckContent.js +21 -10
  172. package/dist/components/inputs/shared/InputClear.js +88 -21
  173. package/dist/components/inputs/shared/TooltipWrapper.js +47 -12
  174. package/dist/components/inputs/shared/input.cva.js +35 -13
  175. package/dist/components/inputs/shared/label.cva.js +2 -2
  176. package/dist/components/inputs/shared/useStaticInputHandoff.js +83 -40
  177. package/dist/components/navigation/Accordion/Accordion.js +69 -22
  178. package/dist/components/navigation/Accordion/AccordionItem.js +86 -41
  179. package/dist/components/navigation/Stepper/Stepper.js +67 -22
  180. package/dist/components/navigation/Stepper/StepperItem.js +104 -31
  181. package/dist/components/navigation/Stepper/StepperSeparator.js +23 -5
  182. package/dist/components/overlays/ActionModal/ActionModal.js +169 -35
  183. package/dist/components/overlays/BottomSheet/BottomSheet.js +122 -25
  184. package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +48 -8
  185. package/dist/components/overlays/Drawer/Drawer.js +62 -20
  186. package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +83 -27
  187. package/dist/components/overlays/Tooltip/Tooltip.js +137 -28
  188. package/dist/components/overlays/Tooltip/TooltipEllipsis.js +37 -12
  189. package/dist/components/segment/Segment.js +218 -57
  190. package/dist/components/segment/SegmentItem.js +67 -10
  191. package/dist/components/shared/pagination/Pagination.js +108 -22
  192. package/dist/components/shared/pagination/PaginationList.js +167 -64
  193. package/dist/components/status/Alert/Alert.js +97 -30
  194. package/dist/components/status/Loader/Loader.js +77 -22
  195. package/dist/components/status/Toast/Toast.js +21 -13
  196. package/dist/components/status/Toast/useToast.js +62 -57
  197. package/dist/components/table/ColumnConfig.js +158 -54
  198. package/dist/components/table/InfiniteTable.js +67 -16
  199. package/dist/components/table/PaginatedTable.js +84 -18
  200. package/dist/components/table/Table.js +23 -23
  201. package/dist/components/text/Link/Link.js +19 -7
  202. package/dist/components/text/Typography/Typography.js +23 -8
  203. package/dist/config/confirmation.context.js +1 -1
  204. package/dist/config/link.context.js +23 -9
  205. package/dist/config/router.context.js +42 -16
  206. package/dist/config/theme.context.js +98 -45
  207. package/dist/config/uiConfig.context.d.ts +7 -5
  208. package/dist/config/uiConfig.context.js +52 -12
  209. package/dist/config/uiStyle.context.js +15 -5
  210. package/dist/helpers/dynamicInputs.d.ts +1 -1
  211. package/dist/hooks/useBreakpoint.js +16 -3
  212. package/dist/hooks/useDebounceCallback.js +51 -17
  213. package/dist/hooks/useFilters.js +125 -64
  214. package/dist/hooks/useForm.js +42 -8
  215. package/dist/hooks/useFormAutosave.js +101 -30
  216. package/dist/hooks/useIntersectionObserver.js +86 -32
  217. package/dist/hooks/useLocalStorage.js +43 -10
  218. package/dist/hooks/useLongPressRepeat.js +55 -20
  219. package/dist/hooks/usePagination.js +49 -19
  220. package/dist/hooks/useQueryAutocomplete.js +1 -0
  221. package/dist/hooks/useScrollableListBox.js +37 -16
  222. package/dist/hooks/useSorting.js +69 -28
  223. package/dist/hooks/useStateAndRef.js +21 -7
  224. package/dist/hooks/useTableColumnConfig.js +124 -31
  225. package/dist/hooks/useTranslationMemo.js +25 -5
  226. package/dist/index.js +2 -2
  227. package/dist/tw-ui-plugin.js +6 -1
  228. package/dist/utils/date-time.utils.d.ts +7 -0
  229. package/dist/utils/date-time.utils.js +34 -23
  230. package/dist/utils/dom.utils.js +1 -1
  231. package/package.json +1 -1
@@ -8,104 +8,306 @@ import { InputClear } from "../shared/InputClear.js";
8
8
  import { inputBase, inputContentWrapper, inputSize } from "../shared/input.cva.js";
9
9
  import { FormField } from "../FormField/FormField.js";
10
10
  import { TooltipWrapper } from "../shared/TooltipWrapper.js";
11
+ import { c } from "react/compiler-runtime";
11
12
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
12
13
  import { clsx } from "clsx";
13
14
  import { isValidElement, useId } from "react";
14
15
  //#region src/components/inputs/Skeleton/InputFrame.tsx
15
16
  var InputFrame = (props) => {
17
+ const $ = c(183);
16
18
  const ui = UIConfig.useConfig();
17
19
  const inputBaseCva = UIStyle.useCva("input.baseCva", inputBase);
18
20
  const inputSizeCva = UIStyle.useCva("input.sizeCva", inputSize);
19
21
  const inputContentWrapperCva = UIStyle.useCva("input.contentWrapperCva", inputContentWrapper);
20
22
  const typographyCva = UIStyle.useCva("typography.cva", typography);
21
23
  const generatedInputId = useId();
22
- const { ref, children, formFieldRef, labelProps: labelPropsProp, headerProps, error, label, tooltipText, helperText, isRequired, rightContent, isDisabled, isHeaderHidden, hideLabel: hideLabelProp, headerClassName, errorClassName, className, leadingContent, leadingIcon, actionContent, actionContentPlacement = "content-wrapper", trailingContent, trailingIcon, trailingAction, unit, isLoading, action, isClearable: isClearableProp, showClear, renderStatic, onStaticInteract, clearClassName, onClear, dataAttributes, typographySize, id: idProp, inputClassName, contentClassName, contentWrapperClassName, wrapContentAndTrailing, labelPlacement = "content-wrapper", trailingClassName, onMouseEnter, onFocusCapture, variant: variantProp, as: asProp, size: sizeProp } = props;
24
+ const { ref, children, formFieldRef, labelProps: labelPropsProp, headerProps, error, label, tooltipText, helperText, isRequired, rightContent, isDisabled, isHeaderHidden, hideLabel: hideLabelProp, headerClassName, errorClassName, className, leadingContent, leadingIcon, actionContent, actionContentPlacement: t0, trailingContent, trailingIcon, trailingAction, unit, isLoading, action, isClearable: isClearableProp, showClear, renderStatic, onStaticInteract, clearClassName, onClear, dataAttributes, typographySize, id: idProp, inputClassName, contentClassName, contentWrapperClassName, contentAndTrailingClassName, wrapContentAndTrailing, wrapTrailingContent: t1, reserveTrailingContent, labelPlacement: t2, trailingClassName, onMouseEnter, onFocusCapture, variant: variantProp, as: asProp, size: sizeProp } = props;
25
+ const actionContentPlacement = t0 === void 0 ? "content-wrapper" : t0;
26
+ const wrapTrailingContent = t1 === void 0 ? true : t1;
27
+ const labelPlacement = t2 === void 0 ? "content-wrapper" : t2;
23
28
  const as = asProp ?? ui.input.as;
24
29
  const size = sizeProp ?? ui.input.size;
25
30
  const variant = variantProp ?? ui.input.variant;
26
31
  const hideLabel = hideLabelProp ?? ui.input.hideLabel;
27
32
  const hasClear = !!(isClearableProp ?? ui.input.isClearable);
28
- const isLeadingIconElement = leadingIcon && isValidElement(leadingIcon);
29
- const isTrailingIconElement = trailingIcon && isValidElement(trailingIcon);
30
- const hasTrailingContent = hasClear || !!trailingContent || !!unit || !!isLoading || !!action || !!trailingIcon || !!trailingAction;
33
+ let t3;
34
+ if ($[0] !== leadingIcon) {
35
+ t3 = leadingIcon && isValidElement(leadingIcon);
36
+ $[0] = leadingIcon;
37
+ $[1] = t3;
38
+ } else t3 = $[1];
39
+ const isLeadingIconElement = t3;
40
+ let t4;
41
+ if ($[2] !== trailingIcon) {
42
+ t4 = trailingIcon && isValidElement(trailingIcon);
43
+ $[2] = trailingIcon;
44
+ $[3] = t4;
45
+ } else t4 = $[3];
46
+ const isTrailingIconElement = t4;
47
+ const hasTrailingContent = reserveTrailingContent || hasClear || !!trailingContent || !!unit || !!isLoading || !!action || !!trailingIcon || !!trailingAction;
31
48
  const isTrailingInteractive = !!action || !!trailingAction || !!isTrailingIconElement || hasClear && !!showClear || !!trailingContent;
32
- const dataAttributeProps = getInputFrameDataAttributeProps(dataAttributes);
33
- const baseLabelProps = headerProps?.labelProps ?? labelPropsProp;
34
- const inputId = idProp ?? baseLabelProps?.htmlFor ?? `input-frame_${generatedInputId}`;
35
- const labelProps = {
36
- ...baseLabelProps,
37
- htmlFor: inputId
38
- };
39
- const formFieldProps = {
40
- error,
41
- label: label ?? "",
42
- tooltipText,
43
- helperText,
44
- isRequired,
45
- rightContent,
46
- isHeaderHidden: isHeaderHidden || as === "inline" || as === "filter" || as === "floating",
47
- hideLabel,
48
- isDisabled,
49
- headerClassName,
50
- errorClassName,
51
- className
52
- };
53
- const resolvedHeaderProps = headerProps ? {
54
- ...headerProps,
55
- labelProps
56
- } : {
57
- label: label ?? "",
58
- tooltipText,
59
- helperText,
60
- isRequired,
61
- rightContent,
62
- isHeaderHidden: hideLabel || isHeaderHidden,
63
- isDisabled,
64
- className: headerClassName,
65
- labelProps
66
- };
67
- const labelContent = as && ["filter", "floating"].includes(as) ? /* @__PURE__ */ jsx(FormFieldLabel, {
68
- as,
69
- size,
70
- ...resolvedHeaderProps
71
- }) : null;
72
- const resolvedContentWrapperClassName = contentWrapperClassName ?? inputContentWrapperCva({ as });
73
- const contentRow = /* @__PURE__ */ jsxs("div", {
74
- className: clsx("group/input-frame flex min-w-0 w-full items-center gap-input-gap-input-text-to-elements", as === "inline" && "h-full", inputSizeCva({
75
- size,
76
- as
77
- }), typographySize && typographyCva({ size: typographySize }), contentClassName),
78
- children: [
79
- leadingContent,
80
- leadingIcon && /* @__PURE__ */ jsx("div", {
49
+ let dataAttributeProps;
50
+ let formFieldProps;
51
+ let labelProps;
52
+ let t10;
53
+ let t11;
54
+ let t12;
55
+ let t13;
56
+ let t5;
57
+ let t6;
58
+ let t7;
59
+ let t8;
60
+ let t9;
61
+ if ($[4] !== actionContent || $[5] !== actionContentPlacement || $[6] !== as || $[7] !== children || $[8] !== className || $[9] !== contentClassName || $[10] !== contentWrapperClassName || $[11] !== dataAttributes || $[12] !== error || $[13] !== errorClassName || $[14] !== generatedInputId || $[15] !== headerClassName || $[16] !== headerProps || $[17] !== helperText || $[18] !== hideLabel || $[19] !== idProp || $[20] !== inputContentWrapperCva || $[21] !== inputSizeCva || $[22] !== isDisabled || $[23] !== isHeaderHidden || $[24] !== isLeadingIconElement || $[25] !== isRequired || $[26] !== label || $[27] !== labelPlacement || $[28] !== labelPropsProp || $[29] !== leadingContent || $[30] !== leadingIcon || $[31] !== rightContent || $[32] !== size || $[33] !== tooltipText || $[34] !== typographyCva || $[35] !== typographySize) {
62
+ dataAttributeProps = getInputFrameDataAttributeProps(dataAttributes);
63
+ const baseLabelProps = headerProps?.labelProps ?? labelPropsProp;
64
+ const inputId = idProp ?? baseLabelProps?.htmlFor ?? `input-frame_${generatedInputId}`;
65
+ let t14;
66
+ if ($[48] !== baseLabelProps || $[49] !== inputId) {
67
+ t14 = {
68
+ ...baseLabelProps,
69
+ htmlFor: inputId
70
+ };
71
+ $[48] = baseLabelProps;
72
+ $[49] = inputId;
73
+ $[50] = t14;
74
+ } else t14 = $[50];
75
+ labelProps = t14;
76
+ const t15 = label ?? "";
77
+ const t16 = isHeaderHidden || as === "inline" || as === "filter" || as === "floating";
78
+ let t17;
79
+ if ($[51] !== className || $[52] !== error || $[53] !== errorClassName || $[54] !== headerClassName || $[55] !== helperText || $[56] !== hideLabel || $[57] !== isDisabled || $[58] !== isRequired || $[59] !== rightContent || $[60] !== t15 || $[61] !== t16 || $[62] !== tooltipText) {
80
+ t17 = {
81
+ error,
82
+ label: t15,
83
+ tooltipText,
84
+ helperText,
85
+ isRequired,
86
+ rightContent,
87
+ isHeaderHidden: t16,
88
+ hideLabel,
89
+ isDisabled,
90
+ headerClassName,
91
+ errorClassName,
92
+ className
93
+ };
94
+ $[51] = className;
95
+ $[52] = error;
96
+ $[53] = errorClassName;
97
+ $[54] = headerClassName;
98
+ $[55] = helperText;
99
+ $[56] = hideLabel;
100
+ $[57] = isDisabled;
101
+ $[58] = isRequired;
102
+ $[59] = rightContent;
103
+ $[60] = t15;
104
+ $[61] = t16;
105
+ $[62] = tooltipText;
106
+ $[63] = t17;
107
+ } else t17 = $[63];
108
+ formFieldProps = t17;
109
+ let t18;
110
+ if ($[64] !== headerClassName || $[65] !== headerProps || $[66] !== helperText || $[67] !== hideLabel || $[68] !== isDisabled || $[69] !== isHeaderHidden || $[70] !== isRequired || $[71] !== label || $[72] !== labelProps || $[73] !== rightContent || $[74] !== tooltipText) {
111
+ t18 = headerProps ? {
112
+ ...headerProps,
113
+ labelProps
114
+ } : {
115
+ label: label ?? "",
116
+ tooltipText,
117
+ helperText,
118
+ isRequired,
119
+ rightContent,
120
+ isHeaderHidden: hideLabel || isHeaderHidden,
121
+ isDisabled,
122
+ className: headerClassName,
123
+ labelProps
124
+ };
125
+ $[64] = headerClassName;
126
+ $[65] = headerProps;
127
+ $[66] = helperText;
128
+ $[67] = hideLabel;
129
+ $[68] = isDisabled;
130
+ $[69] = isHeaderHidden;
131
+ $[70] = isRequired;
132
+ $[71] = label;
133
+ $[72] = labelProps;
134
+ $[73] = rightContent;
135
+ $[74] = tooltipText;
136
+ $[75] = t18;
137
+ } else t18 = $[75];
138
+ const resolvedHeaderProps = t18;
139
+ let t19;
140
+ if ($[76] !== as) {
141
+ t19 = as && ["filter", "floating"].includes(as);
142
+ $[76] = as;
143
+ $[77] = t19;
144
+ } else t19 = $[77];
145
+ const shouldRenderLabel = t19;
146
+ let t20;
147
+ if ($[78] !== as || $[79] !== resolvedHeaderProps || $[80] !== shouldRenderLabel || $[81] !== size) {
148
+ t20 = shouldRenderLabel ? /* @__PURE__ */ jsx(FormFieldLabel, {
149
+ as,
150
+ size,
151
+ ...resolvedHeaderProps
152
+ }) : null;
153
+ $[78] = as;
154
+ $[79] = resolvedHeaderProps;
155
+ $[80] = shouldRenderLabel;
156
+ $[81] = size;
157
+ $[82] = t20;
158
+ } else t20 = $[82];
159
+ const labelContent = t20;
160
+ let t21;
161
+ if ($[83] !== as || $[84] !== contentWrapperClassName || $[85] !== inputContentWrapperCva) {
162
+ t21 = contentWrapperClassName ?? inputContentWrapperCva({ as });
163
+ $[83] = as;
164
+ $[84] = contentWrapperClassName;
165
+ $[85] = inputContentWrapperCva;
166
+ $[86] = t21;
167
+ } else t21 = $[86];
168
+ const resolvedContentWrapperClassName = t21;
169
+ if ($[87] !== as || $[88] !== contentClassName || $[89] !== inputSizeCva || $[90] !== size || $[91] !== typographyCva || $[92] !== typographySize) {
170
+ let t22;
171
+ if ($[94] !== typographyCva || $[95] !== typographySize) {
172
+ t22 = typographySize && typographyCva({ size: typographySize });
173
+ $[94] = typographyCva;
174
+ $[95] = typographySize;
175
+ $[96] = t22;
176
+ } else t22 = $[96];
177
+ t9 = clsx("group/input-frame flex min-w-0 w-full items-center gap-input-gap-input-text-to-elements", inputSizeCva({
178
+ size,
179
+ as
180
+ }), t22, contentClassName);
181
+ $[87] = as;
182
+ $[88] = contentClassName;
183
+ $[89] = inputSizeCva;
184
+ $[90] = size;
185
+ $[91] = typographyCva;
186
+ $[92] = typographySize;
187
+ $[93] = t9;
188
+ } else t9 = $[93];
189
+ t10 = leadingContent;
190
+ if ($[97] !== isLeadingIconElement || $[98] !== leadingIcon) {
191
+ t11 = leadingIcon && /* @__PURE__ */ jsx("div", {
81
192
  className: clsx(!isLeadingIconElement && "pointer-events-none"),
82
193
  children: renderIconVisual(leadingIcon)
83
- }),
84
- labelPlacement === "content-row" && labelContent,
85
- actionContentPlacement === "content-row" && actionContent,
86
- /* @__PURE__ */ jsxs("div", {
87
- className: resolvedContentWrapperClassName,
88
- children: [
89
- labelPlacement === "content-wrapper" && labelContent,
90
- actionContentPlacement === "content-wrapper" && actionContent,
91
- typeof children === "function" ? children({
92
- ...dataAttributeProps,
93
- id: inputId
94
- }) : children
95
- ]
96
- })
97
- ]
98
- });
99
- const trailingRow = hasTrailingContent ? /* @__PURE__ */ jsxs("div", {
100
- className: clsx("flex items-center gap-input-gap-trailing-elements", inputSizeCva({
101
- size,
102
- as
103
- }), !isTrailingInteractive && "pointer-events-none", trailingClassName),
104
- children: [
194
+ });
195
+ $[97] = isLeadingIconElement;
196
+ $[98] = leadingIcon;
197
+ $[99] = t11;
198
+ } else t11 = $[99];
199
+ t12 = labelPlacement === "content-row" && labelContent;
200
+ t13 = actionContentPlacement === "content-row" && actionContent;
201
+ t5 = resolvedContentWrapperClassName;
202
+ t6 = labelPlacement === "content-wrapper" && labelContent;
203
+ t7 = actionContentPlacement === "content-wrapper" && actionContent;
204
+ t8 = typeof children === "function" ? children({
205
+ ...dataAttributeProps,
206
+ id: inputId
207
+ }) : children;
208
+ $[4] = actionContent;
209
+ $[5] = actionContentPlacement;
210
+ $[6] = as;
211
+ $[7] = children;
212
+ $[8] = className;
213
+ $[9] = contentClassName;
214
+ $[10] = contentWrapperClassName;
215
+ $[11] = dataAttributes;
216
+ $[12] = error;
217
+ $[13] = errorClassName;
218
+ $[14] = generatedInputId;
219
+ $[15] = headerClassName;
220
+ $[16] = headerProps;
221
+ $[17] = helperText;
222
+ $[18] = hideLabel;
223
+ $[19] = idProp;
224
+ $[20] = inputContentWrapperCva;
225
+ $[21] = inputSizeCva;
226
+ $[22] = isDisabled;
227
+ $[23] = isHeaderHidden;
228
+ $[24] = isLeadingIconElement;
229
+ $[25] = isRequired;
230
+ $[26] = label;
231
+ $[27] = labelPlacement;
232
+ $[28] = labelPropsProp;
233
+ $[29] = leadingContent;
234
+ $[30] = leadingIcon;
235
+ $[31] = rightContent;
236
+ $[32] = size;
237
+ $[33] = tooltipText;
238
+ $[34] = typographyCva;
239
+ $[35] = typographySize;
240
+ $[36] = dataAttributeProps;
241
+ $[37] = formFieldProps;
242
+ $[38] = labelProps;
243
+ $[39] = t10;
244
+ $[40] = t11;
245
+ $[41] = t12;
246
+ $[42] = t13;
247
+ $[43] = t5;
248
+ $[44] = t6;
249
+ $[45] = t7;
250
+ $[46] = t8;
251
+ $[47] = t9;
252
+ } else {
253
+ dataAttributeProps = $[36];
254
+ formFieldProps = $[37];
255
+ labelProps = $[38];
256
+ t10 = $[39];
257
+ t11 = $[40];
258
+ t12 = $[41];
259
+ t13 = $[42];
260
+ t5 = $[43];
261
+ t6 = $[44];
262
+ t7 = $[45];
263
+ t8 = $[46];
264
+ t9 = $[47];
265
+ }
266
+ let t14;
267
+ if ($[100] !== t5 || $[101] !== t6 || $[102] !== t7 || $[103] !== t8) {
268
+ t14 = /* @__PURE__ */ jsxs("div", {
269
+ className: t5,
270
+ children: [
271
+ t6,
272
+ t7,
273
+ t8
274
+ ]
275
+ });
276
+ $[100] = t5;
277
+ $[101] = t6;
278
+ $[102] = t7;
279
+ $[103] = t8;
280
+ $[104] = t14;
281
+ } else t14 = $[104];
282
+ let t15;
283
+ if ($[105] !== t10 || $[106] !== t11 || $[107] !== t12 || $[108] !== t13 || $[109] !== t14 || $[110] !== t9) {
284
+ t15 = /* @__PURE__ */ jsxs("div", {
285
+ className: t9,
286
+ children: [
287
+ t10,
288
+ t11,
289
+ t12,
290
+ t13,
291
+ t14
292
+ ]
293
+ });
294
+ $[105] = t10;
295
+ $[106] = t11;
296
+ $[107] = t12;
297
+ $[108] = t13;
298
+ $[109] = t14;
299
+ $[110] = t9;
300
+ $[111] = t15;
301
+ } else t15 = $[111];
302
+ const contentRow = t15;
303
+ let t16;
304
+ if ($[112] !== action || $[113] !== clearClassName || $[114] !== hasClear || $[115] !== hasTrailingContent || $[116] !== isDisabled || $[117] !== isLoading || $[118] !== onClear || $[119] !== renderStatic || $[120] !== showClear || $[121] !== trailingAction || $[122] !== trailingContent || $[123] !== trailingIcon || $[124] !== typographyCva || $[125] !== unit) {
305
+ t16 = hasTrailingContent ? /* @__PURE__ */ jsxs(Fragment, { children: [
105
306
  hasClear && /* @__PURE__ */ jsx(InputClear, {
106
307
  onClear: () => onClear?.(),
107
308
  className: clearClassName,
108
309
  show: !!showClear,
310
+ style: showClear ? { visibility: "visible" } : void 0,
109
311
  renderStatic
110
312
  }),
111
313
  trailingContent,
@@ -133,53 +335,179 @@ var InputFrame = (props) => {
133
335
  }),
134
336
  !isLoading && !action && trailingIcon && renderIconVisual(trailingIcon),
135
337
  trailingAction
136
- ]
137
- }) : null;
138
- const inputFrameContent = wrapContentAndTrailing ? /* @__PURE__ */ jsxs("div", {
139
- className: "flex w-full items-center gap-input-gap-input-text-to-elements",
140
- children: [contentRow, trailingRow]
141
- }) : /* @__PURE__ */ jsxs(Fragment, { children: [contentRow, trailingRow] });
142
- return /* @__PURE__ */ jsx(TooltipWrapper, {
143
- as,
144
- error,
145
- triggerTabIndex: as === "inline" ? -1 : void 0,
146
- children: /* @__PURE__ */ jsx(FormField, {
338
+ ] }) : null;
339
+ $[112] = action;
340
+ $[113] = clearClassName;
341
+ $[114] = hasClear;
342
+ $[115] = hasTrailingContent;
343
+ $[116] = isDisabled;
344
+ $[117] = isLoading;
345
+ $[118] = onClear;
346
+ $[119] = renderStatic;
347
+ $[120] = showClear;
348
+ $[121] = trailingAction;
349
+ $[122] = trailingContent;
350
+ $[123] = trailingIcon;
351
+ $[124] = typographyCva;
352
+ $[125] = unit;
353
+ $[126] = t16;
354
+ } else t16 = $[126];
355
+ const trailingContentNodes = t16;
356
+ let t17;
357
+ if ($[127] !== as || $[128] !== inputSizeCva || $[129] !== isDisabled || $[130] !== isTrailingInteractive || $[131] !== size || $[132] !== trailingClassName || $[133] !== trailingContentNodes || $[134] !== wrapTrailingContent) {
358
+ t17 = wrapTrailingContent && trailingContentNodes ? /* @__PURE__ */ jsx("div", {
359
+ className: clsx("flex items-center gap-input-gap-trailing-elements", inputSizeCva({
360
+ size,
361
+ as
362
+ }), !isTrailingInteractive && "pointer-events-none", isDisabled && "text-interactive-text-secondary-disabled", trailingClassName),
363
+ children: trailingContentNodes
364
+ }) : trailingContentNodes;
365
+ $[127] = as;
366
+ $[128] = inputSizeCva;
367
+ $[129] = isDisabled;
368
+ $[130] = isTrailingInteractive;
369
+ $[131] = size;
370
+ $[132] = trailingClassName;
371
+ $[133] = trailingContentNodes;
372
+ $[134] = wrapTrailingContent;
373
+ $[135] = t17;
374
+ } else t17 = $[135];
375
+ const trailingRow = t17;
376
+ let t18;
377
+ if ($[136] !== contentAndTrailingClassName || $[137] !== contentRow || $[138] !== trailingRow || $[139] !== wrapContentAndTrailing) {
378
+ t18 = wrapContentAndTrailing ? /* @__PURE__ */ jsxs("div", {
379
+ className: clsx("flex w-full items-center gap-input-gap-input-text-to-elements", contentAndTrailingClassName),
380
+ children: [contentRow, trailingRow]
381
+ }) : /* @__PURE__ */ jsxs(Fragment, { children: [contentRow, trailingRow] });
382
+ $[136] = contentAndTrailingClassName;
383
+ $[137] = contentRow;
384
+ $[138] = trailingRow;
385
+ $[139] = wrapContentAndTrailing;
386
+ $[140] = t18;
387
+ } else t18 = $[140];
388
+ const inputFrameContent = t18;
389
+ const t19 = as === "inline" ? -1 : void 0;
390
+ const t20 = as === "inline" ? -1 : void 0;
391
+ let t21;
392
+ if ($[141] !== onMouseEnter || $[142] !== onStaticInteract || $[143] !== renderStatic) {
393
+ t21 = (event) => {
394
+ onMouseEnter?.(event);
395
+ if (renderStatic) onStaticInteract?.(false);
396
+ };
397
+ $[141] = onMouseEnter;
398
+ $[142] = onStaticInteract;
399
+ $[143] = renderStatic;
400
+ $[144] = t21;
401
+ } else t21 = $[144];
402
+ let t22;
403
+ if ($[145] !== onFocusCapture || $[146] !== onStaticInteract || $[147] !== renderStatic) {
404
+ t22 = (event_0) => {
405
+ onFocusCapture?.(event_0);
406
+ if (renderStatic) onStaticInteract?.(true);
407
+ };
408
+ $[145] = onFocusCapture;
409
+ $[146] = onStaticInteract;
410
+ $[147] = renderStatic;
411
+ $[148] = t22;
412
+ } else t22 = $[148];
413
+ let t23;
414
+ if ($[149] !== as || $[150] !== inputBaseCva || $[151] !== inputClassName || $[152] !== variant) {
415
+ t23 = clsx("relative flex cursor-text has-disabled:cursor-default", inputBaseCva({
416
+ variant,
417
+ as
418
+ }), inputClassName);
419
+ $[149] = as;
420
+ $[150] = inputBaseCva;
421
+ $[151] = inputClassName;
422
+ $[152] = variant;
423
+ $[153] = t23;
424
+ } else t23 = $[153];
425
+ const t24 = renderStatic ? isDisabled ? -1 : 0 : void 0;
426
+ let t25;
427
+ let t26;
428
+ let t27;
429
+ if ($[154] !== onStaticInteract || $[155] !== renderStatic) {
430
+ t25 = () => {
431
+ if (renderStatic) onStaticInteract?.(true);
432
+ };
433
+ t26 = () => {
434
+ if (renderStatic) onStaticInteract?.(true);
435
+ };
436
+ t27 = () => {
437
+ if (renderStatic) onStaticInteract?.(true);
438
+ };
439
+ $[154] = onStaticInteract;
440
+ $[155] = renderStatic;
441
+ $[156] = t25;
442
+ $[157] = t26;
443
+ $[158] = t27;
444
+ } else {
445
+ t25 = $[156];
446
+ t26 = $[157];
447
+ t27 = $[158];
448
+ }
449
+ let t28;
450
+ if ($[159] !== dataAttributeProps || $[160] !== inputFrameContent || $[161] !== ref || $[162] !== t23 || $[163] !== t24 || $[164] !== t25 || $[165] !== t26 || $[166] !== t27) {
451
+ t28 = /* @__PURE__ */ jsx("div", {
452
+ ref,
453
+ ...dataAttributeProps,
454
+ className: t23,
455
+ tabIndex: t24,
456
+ onFocus: t25,
457
+ onClick: t26,
458
+ onPointerDown: t27,
459
+ "data-rac": "",
460
+ children: inputFrameContent
461
+ });
462
+ $[159] = dataAttributeProps;
463
+ $[160] = inputFrameContent;
464
+ $[161] = ref;
465
+ $[162] = t23;
466
+ $[163] = t24;
467
+ $[164] = t25;
468
+ $[165] = t26;
469
+ $[166] = t27;
470
+ $[167] = t28;
471
+ } else t28 = $[167];
472
+ let t29;
473
+ if ($[168] !== as || $[169] !== dataAttributeProps || $[170] !== formFieldProps || $[171] !== formFieldRef || $[172] !== labelProps || $[173] !== t20 || $[174] !== t21 || $[175] !== t22 || $[176] !== t28) {
474
+ t29 = /* @__PURE__ */ jsx(FormField, {
147
475
  ...formFieldProps,
148
476
  ...dataAttributeProps,
149
477
  ref: formFieldRef,
150
478
  as,
151
479
  labelProps,
152
- tabIndex: as === "inline" ? -1 : void 0,
153
- onMouseEnter: (event) => {
154
- onMouseEnter?.(event);
155
- if (renderStatic) onStaticInteract?.(false);
156
- },
157
- onFocusCapture: (event) => {
158
- onFocusCapture?.(event);
159
- if (renderStatic) onStaticInteract?.(true);
160
- },
161
- children: /* @__PURE__ */ jsx("div", {
162
- ref,
163
- ...dataAttributeProps,
164
- className: clsx("relative flex cursor-text has-disabled:cursor-default", inputBaseCva({
165
- variant,
166
- as
167
- }), inputClassName),
168
- tabIndex: renderStatic ? isDisabled ? -1 : 0 : void 0,
169
- onFocus: () => {
170
- if (renderStatic) onStaticInteract?.(true);
171
- },
172
- onClick: () => {
173
- if (renderStatic) onStaticInteract?.(true);
174
- },
175
- onPointerDown: () => {
176
- if (renderStatic) onStaticInteract?.(true);
177
- },
178
- "data-rac": "",
179
- children: inputFrameContent
180
- })
181
- })
182
- });
480
+ tabIndex: t20,
481
+ onMouseEnter: t21,
482
+ onFocusCapture: t22,
483
+ children: t28
484
+ });
485
+ $[168] = as;
486
+ $[169] = dataAttributeProps;
487
+ $[170] = formFieldProps;
488
+ $[171] = formFieldRef;
489
+ $[172] = labelProps;
490
+ $[173] = t20;
491
+ $[174] = t21;
492
+ $[175] = t22;
493
+ $[176] = t28;
494
+ $[177] = t29;
495
+ } else t29 = $[177];
496
+ let t30;
497
+ if ($[178] !== as || $[179] !== error || $[180] !== t19 || $[181] !== t29) {
498
+ t30 = /* @__PURE__ */ jsx(TooltipWrapper, {
499
+ as,
500
+ error,
501
+ triggerTabIndex: t19,
502
+ children: t29
503
+ });
504
+ $[178] = as;
505
+ $[179] = error;
506
+ $[180] = t19;
507
+ $[181] = t29;
508
+ $[182] = t30;
509
+ } else t30 = $[182];
510
+ return t30;
183
511
  };
184
512
  var renderIconVisual = (icon) => {
185
513
  if (isValidElement(icon)) return icon;
@@ -1,4 +1,4 @@
1
- import { Ref } from 'react';
1
+ import { FocusEvent, Ref } from 'react';
2
2
  import { SliderProps as AriaSliderProps } from 'react-aria-components';
3
3
  import { FieldValues } from 'react-hook-form';
4
4
  import { FormFieldProps } from '../FormField/FormField';
@@ -10,6 +10,7 @@ interface SliderBaseProps<IsRange extends boolean = false> extends FormFieldProp
10
10
  isRange?: IsRange;
11
11
  defaultValue?: SliderValue<IsRange>;
12
12
  value?: SliderValue<IsRange>;
13
+ onBlur?: (event: FocusEvent<HTMLInputElement>) => void;
13
14
  onChange?: (value: SliderValue<IsRange>) => void;
14
15
  }
15
16
  export type SliderProps<IsRange extends boolean = false> = SliderBaseProps<IsRange>;