@povio/ui 3.1.0 → 3.2.0

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 (301) 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 +102 -39
  52. package/dist/components/Menu/MenuPopover.js +105 -29
  53. package/dist/components/buttons/Button/button.cva.d.ts +3 -3
  54. package/dist/components/buttons/IconButton/IconButton.js +40 -8
  55. package/dist/components/buttons/InlineIconButton/InlineIconButton.d.ts +2 -1
  56. package/dist/components/buttons/InlineIconButton/InlineIconButton.js +34 -9
  57. package/dist/components/buttons/PillButton/PillButton.js +55 -17
  58. package/dist/components/buttons/PillButton/pillButton.cva.d.ts +1 -1
  59. package/dist/components/buttons/SplitButton/SplitButton.js +103 -18
  60. package/dist/components/buttons/TextButton/TextButton.js +30 -8
  61. package/dist/components/buttons/ToggleButton/ToggleButton.js +28 -8
  62. package/dist/components/buttons/shared/ButtonContent.js +80 -22
  63. package/dist/components/inputs/Checkbox/Checkbox.d.ts +1 -0
  64. package/dist/components/inputs/Checkbox/Checkbox.js +201 -35
  65. package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +24 -10
  66. package/dist/components/inputs/Checkbox/checkbox.cva.d.ts +3 -0
  67. package/dist/components/inputs/Checkbox/checkbox.cva.js +2 -1
  68. package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +12 -5
  69. package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +380 -75
  70. package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +12 -5
  71. package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +499 -186
  72. package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +14 -5
  73. package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +280 -46
  74. package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +7 -3
  75. package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +616 -121
  76. package/dist/components/inputs/DateTime/shared/Calendar.d.ts +5 -2
  77. package/dist/components/inputs/DateTime/shared/Calendar.js +342 -119
  78. package/dist/components/inputs/DateTime/shared/CalendarCell.d.ts +4 -2
  79. package/dist/components/inputs/DateTime/shared/CalendarCell.js +310 -103
  80. package/dist/components/inputs/DateTime/shared/CalendarGrid.d.ts +4 -2
  81. package/dist/components/inputs/DateTime/shared/CalendarGrid.js +150 -33
  82. package/dist/components/inputs/DateTime/shared/CalendarHeader.js +233 -98
  83. package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +318 -137
  84. package/dist/components/inputs/DateTime/shared/DateField.d.ts +2 -1
  85. package/dist/components/inputs/DateTime/shared/DateField.js +288 -112
  86. package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +14 -3
  87. package/dist/components/inputs/DateTime/shared/DatePickerInput.js +359 -129
  88. package/dist/components/inputs/DateTime/shared/DateSegmentItem.d.ts +18 -1
  89. package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +104 -11
  90. package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +83 -28
  91. package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +59 -10
  92. package/dist/components/inputs/DateTime/shared/MonthPicker.js +103 -58
  93. package/dist/components/inputs/DateTime/shared/RangeCalendar.js +193 -82
  94. package/dist/components/inputs/DateTime/shared/TimeField.js +27 -8
  95. package/dist/components/inputs/DateTime/shared/TimePickerForm.js +279 -110
  96. package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +4 -1
  97. package/dist/components/inputs/DateTime/shared/TimePickerInput.js +211 -65
  98. package/dist/components/inputs/DateTime/shared/YearPicker.js +119 -68
  99. package/dist/components/inputs/DateTime/shared/datePicker.types.d.ts +5 -0
  100. package/dist/components/inputs/DateTime/shared/datePickerInput.cva.d.ts +16 -0
  101. package/dist/components/inputs/DateTime/shared/datePickerInput.cva.js +16 -0
  102. package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.d.ts +15 -0
  103. package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.js +32 -0
  104. package/dist/components/inputs/DateTime/shared/dateSegment.utils.d.ts +2 -0
  105. package/dist/components/inputs/DateTime/shared/dateSegment.utils.spec.d.ts +1 -0
  106. package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.d.ts +41 -0
  107. package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.js +99 -0
  108. package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.spec.d.ts +1 -0
  109. package/dist/components/inputs/File/FileUpload.js +91 -46
  110. package/dist/components/inputs/File/FileUploadContainer.js +15 -7
  111. package/dist/components/inputs/File/InputUpload.js +317 -79
  112. package/dist/components/inputs/File/index.d.ts +1 -1
  113. package/dist/components/inputs/File/shared/FileCard.js +104 -41
  114. package/dist/components/inputs/File/shared/FileCardList.js +47 -12
  115. package/dist/components/inputs/File/shared/FileUploadContent.js +175 -44
  116. package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +149 -46
  117. package/dist/components/inputs/File/shared/FileUploadContentError.js +234 -93
  118. package/dist/components/inputs/File/shared/FileUploadContentFilled.js +230 -97
  119. package/dist/components/inputs/File/shared/FileUploadContentLoading.js +199 -55
  120. package/dist/components/inputs/File/shared/InputUploadContent.js +148 -34
  121. package/dist/components/inputs/File/shared/InputUploadFilled.js +49 -8
  122. package/dist/components/inputs/File/shared/ProgressBar.js +102 -15
  123. package/dist/components/inputs/File/shared/fileUpload.cva.d.ts +0 -11
  124. package/dist/components/inputs/File/shared/fileUpload.cva.js +1 -18
  125. package/dist/components/inputs/FormField/FormField.d.ts +3 -3
  126. package/dist/components/inputs/FormField/FormField.js +119 -37
  127. package/dist/components/inputs/FormField/FormFieldError.js +25 -5
  128. package/dist/components/inputs/FormField/FormFieldHeader.d.ts +2 -2
  129. package/dist/components/inputs/FormField/FormFieldHeader.js +81 -22
  130. package/dist/components/inputs/FormField/FormFieldHeaderClose.js +31 -7
  131. package/dist/components/inputs/FormField/FormFieldHelper.js +26 -6
  132. package/dist/components/inputs/FormField/FormFieldLabel.d.ts +2 -2
  133. package/dist/components/inputs/FormField/FormFieldLabel.js +40 -9
  134. package/dist/components/inputs/FormField/formFieldHeader.cva.d.ts +13 -0
  135. package/dist/components/inputs/FormField/formFieldHeader.cva.js +14 -0
  136. package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +5 -2
  137. package/dist/components/inputs/Input/NumberInput/NumberInput.js +446 -97
  138. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.d.ts +45 -0
  139. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +571 -0
  140. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +35 -0
  141. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +574 -0
  142. package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +48 -9
  143. package/dist/components/inputs/Input/TextArea/TextArea.cva.d.ts +8 -0
  144. package/dist/components/inputs/Input/TextArea/TextArea.cva.js +5 -0
  145. package/dist/components/inputs/Input/TextArea/TextArea.js +305 -90
  146. package/dist/components/inputs/Input/TextInput/TextInput.d.ts +3 -1
  147. package/dist/components/inputs/Input/TextInput/TextInput.js +429 -90
  148. package/dist/components/inputs/Input/shared/InputContent.js +193 -59
  149. package/dist/components/inputs/Input/shared/numberStatic.utils.d.ts +1 -0
  150. package/dist/components/inputs/Input/shared/numberStatic.utils.js +7 -0
  151. package/dist/components/inputs/Inputs/Form.js +40 -11
  152. package/dist/components/inputs/Inputs/InputItem.d.ts +15 -21
  153. package/dist/components/inputs/Inputs/InputItem.js +69 -14
  154. package/dist/components/inputs/Inputs/Inputs.js +37 -11
  155. package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +3 -1
  156. package/dist/components/inputs/RadioGroup/RadioGroup.js +353 -61
  157. package/dist/components/inputs/RadioGroup/radio.cva.d.ts +45 -0
  158. package/dist/components/inputs/RadioGroup/radio.cva.js +48 -1
  159. package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +6 -2
  160. package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +217 -22
  161. package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +3 -18
  162. package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +107 -8
  163. package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +37 -0
  164. package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +14 -0
  165. package/dist/components/inputs/Selection/Select/QuerySelect.js +178 -0
  166. package/dist/components/inputs/Selection/Select/Select.d.ts +7 -3
  167. package/dist/components/inputs/Selection/Select/Select.js +227 -18
  168. package/dist/components/inputs/Selection/shared/SelectBase.d.ts +8 -1
  169. package/dist/components/inputs/Selection/shared/SelectBase.js +69 -18
  170. package/dist/components/inputs/Selection/shared/SelectDesktop.d.ts +1 -1
  171. package/dist/components/inputs/Selection/shared/SelectDesktop.js +393 -138
  172. package/dist/components/inputs/Selection/shared/SelectInput.d.ts +2 -2
  173. package/dist/components/inputs/Selection/shared/SelectInput.js +397 -116
  174. package/dist/components/inputs/Selection/shared/SelectInputTags.js +99 -25
  175. package/dist/components/inputs/Selection/shared/SelectListBox.d.ts +2 -2
  176. package/dist/components/inputs/Selection/shared/SelectListBox.js +164 -52
  177. package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +85 -35
  178. package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +69 -16
  179. package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +70 -21
  180. package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +58 -9
  181. package/dist/components/inputs/Selection/shared/SelectMobile.d.ts +1 -1
  182. package/dist/components/inputs/Selection/shared/SelectMobile.js +9 -3
  183. package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.d.ts +9 -0
  184. package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +47 -0
  185. package/dist/components/inputs/Selection/shared/querySelect.utils.d.ts +14 -0
  186. package/dist/components/inputs/Selection/shared/querySelect.utils.js +43 -0
  187. package/dist/components/inputs/Selection/shared/select.context.d.ts +3 -2
  188. package/dist/components/inputs/Selection/shared/select.context.js +67 -36
  189. package/dist/components/inputs/Selection/shared/select.types.d.ts +3 -2
  190. package/dist/components/inputs/Selection/shared/selectDesktop.cva.d.ts +6 -0
  191. package/dist/components/inputs/Selection/shared/selectDesktop.cva.js +5 -0
  192. package/dist/components/inputs/Selection/shared/selectInput.cva.d.ts +12 -0
  193. package/dist/components/inputs/Selection/shared/selectInput.cva.js +8 -0
  194. package/dist/components/inputs/Selection/shared/staticSelect.utils.d.ts +23 -0
  195. package/dist/components/inputs/Selection/shared/staticSelect.utils.js +54 -0
  196. package/dist/components/inputs/Selection/shared/staticSelect.utils.spec.d.ts +1 -0
  197. package/dist/components/inputs/Selection/shared/useSelectItems.js +109 -49
  198. package/dist/components/inputs/Skeleton/InputFrame.d.ts +83 -0
  199. package/dist/components/inputs/Skeleton/InputFrame.js +612 -0
  200. package/dist/components/inputs/Slider/Slider.d.ts +2 -1
  201. package/dist/components/inputs/Slider/Slider.js +265 -76
  202. package/dist/components/inputs/TextEditor/TextEditor.d.ts +1 -0
  203. package/dist/components/inputs/TextEditor/TextEditor.js +447 -98
  204. package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +37 -11
  205. package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +102 -30
  206. package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +194 -45
  207. package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +88 -28
  208. package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +48 -14
  209. package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.js +66 -19
  210. package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +49 -15
  211. package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +92 -32
  212. package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +126 -54
  213. package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +141 -38
  214. package/dist/components/inputs/Toggle/Toggle.d.ts +1 -0
  215. package/dist/components/inputs/Toggle/Toggle.js +214 -37
  216. package/dist/components/inputs/Toggle/toggle.cva.d.ts +3 -0
  217. package/dist/components/inputs/Toggle/toggle.cva.js +2 -1
  218. package/dist/components/inputs/shared/CheckContent.d.ts +2 -1
  219. package/dist/components/inputs/shared/CheckContent.js +21 -11
  220. package/dist/components/inputs/shared/InputClear.d.ts +2 -1
  221. package/dist/components/inputs/shared/InputClear.js +88 -12
  222. package/dist/components/inputs/shared/TooltipWrapper.js +50 -11
  223. package/dist/components/inputs/shared/input.cva.d.ts +28 -0
  224. package/dist/components/inputs/shared/input.cva.js +38 -4
  225. package/dist/components/inputs/shared/tooltipWrapper.cva.d.ts +8 -0
  226. package/dist/components/inputs/shared/tooltipWrapper.cva.js +5 -0
  227. package/dist/components/inputs/shared/useStaticInputHandoff.d.ts +15 -0
  228. package/dist/components/inputs/shared/useStaticInputHandoff.js +112 -0
  229. package/dist/components/navigation/Accordion/Accordion.js +69 -22
  230. package/dist/components/navigation/Accordion/AccordionItem.js +86 -41
  231. package/dist/components/navigation/Stepper/Stepper.js +67 -22
  232. package/dist/components/navigation/Stepper/StepperItem.js +104 -31
  233. package/dist/components/navigation/Stepper/StepperSeparator.js +23 -5
  234. package/dist/components/overlays/ActionModal/ActionModal.js +169 -35
  235. package/dist/components/overlays/BottomSheet/BottomSheet.js +96 -23
  236. package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +48 -8
  237. package/dist/components/overlays/Drawer/Drawer.js +62 -20
  238. package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +85 -28
  239. package/dist/components/overlays/Tooltip/Tooltip.js +137 -28
  240. package/dist/components/overlays/Tooltip/TooltipEllipsis.js +37 -12
  241. package/dist/components/segment/Segment.js +218 -57
  242. package/dist/components/segment/SegmentItem.js +67 -10
  243. package/dist/components/shared/pagination/Pagination.js +108 -22
  244. package/dist/components/shared/pagination/PaginationList.js +167 -64
  245. package/dist/components/shared/pagination/minWidth.cva.d.ts +1 -1
  246. package/dist/components/status/Alert/Alert.js +97 -30
  247. package/dist/components/status/Loader/Loader.js +77 -22
  248. package/dist/components/status/Toast/Toast.js +28 -14
  249. package/dist/components/status/Toast/toast.cva.d.ts +1 -1
  250. package/dist/components/status/Toast/useToast.js +62 -57
  251. package/dist/components/table/ColumnConfig.js +158 -54
  252. package/dist/components/table/InfiniteTable.js +67 -16
  253. package/dist/components/table/PaginatedTable.js +84 -18
  254. package/dist/components/table/Table.js +28 -27
  255. package/dist/components/text/Link/Link.js +19 -7
  256. package/dist/components/text/Typography/Typography.js +23 -8
  257. package/dist/config/confirmation.context.js +1 -1
  258. package/dist/config/link.context.js +23 -9
  259. package/dist/config/router.context.js +42 -16
  260. package/dist/config/theme.context.js +98 -45
  261. package/dist/config/uiConfig.context.d.ts +20 -6
  262. package/dist/config/uiConfig.context.js +68 -14
  263. package/dist/config/uiOverrides.context.d.ts +30 -11
  264. package/dist/config/uiOverrides.context.js +54 -14
  265. package/dist/helpers/dynamicInputs.d.ts +12 -9
  266. package/dist/helpers/dynamicInputs.js +13 -8
  267. package/dist/hooks/useAutosave.d.ts +2 -1
  268. package/dist/hooks/useAutosave.js +12 -4
  269. package/dist/hooks/useAutosave.spec.d.ts +1 -0
  270. package/dist/hooks/useBreakpoint.js +16 -3
  271. package/dist/hooks/useDebounceCallback.js +51 -17
  272. package/dist/hooks/useFilters.js +125 -64
  273. package/dist/hooks/useForm.js +42 -8
  274. package/dist/hooks/useFormAutosave.d.ts +3 -1
  275. package/dist/hooks/useFormAutosave.js +122 -30
  276. package/dist/hooks/useFormAutosave.spec.d.ts +1 -0
  277. package/dist/hooks/useIntersectionObserver.d.ts +1 -1
  278. package/dist/hooks/useIntersectionObserver.js +91 -24
  279. package/dist/hooks/useKeyInteractions.d.ts +20 -0
  280. package/dist/hooks/useKeyInteractions.js +54 -0
  281. package/dist/hooks/useKeyInteractions.spec.d.ts +1 -0
  282. package/dist/hooks/useLocalStorage.js +43 -10
  283. package/dist/hooks/useLongPressRepeat.js +55 -20
  284. package/dist/hooks/usePagination.js +49 -19
  285. package/dist/hooks/useQueryAutocomplete.d.ts +14 -0
  286. package/dist/hooks/useQueryAutocomplete.js +72 -0
  287. package/dist/hooks/useScrollableListBox.js +37 -16
  288. package/dist/hooks/useSorting.js +69 -28
  289. package/dist/hooks/useStateAndRef.js +21 -7
  290. package/dist/hooks/useTableColumnConfig.js +124 -31
  291. package/dist/hooks/useTranslationMemo.js +25 -5
  292. package/dist/index.d.ts +18 -3
  293. package/dist/index.js +15 -5
  294. package/dist/tw-ui-plugin.js +6 -0
  295. package/dist/utils/date-time.utils.d.ts +38 -10
  296. package/dist/utils/date-time.utils.js +136 -22
  297. package/dist/utils/query.utils.d.ts +4 -0
  298. package/dist/utils/query.utils.js +8 -0
  299. package/dist/utils/zod.utils.d.ts +2 -0
  300. package/dist/utils/zod.utils.js +5 -0
  301. package/package.json +2 -2
@@ -0,0 +1,574 @@
1
+ import { UIOverrides } from "../../../../config/uiOverrides.context.js";
2
+ import { UIConfig } from "../../../../config/uiConfig.context.js";
3
+ import { FormFieldLabel } from "../../FormField/FormFieldLabel.js";
4
+ import { InputClear } from "../../shared/InputClear.js";
5
+ import { inputBaseDefinition, inputSizeDefinition } from "../../shared/input.cva.js";
6
+ import { InputFrame } from "../../Skeleton/InputFrame.js";
7
+ import { useStaticInputHandoff } from "../../shared/useStaticInputHandoff.js";
8
+ import { getStaticNumberDisplayValue } from "../shared/numberStatic.utils.js";
9
+ import { NumberRangeField } from "./NumberRangeField.js";
10
+ import { c } from "react/compiler-runtime";
11
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
12
+ import { clsx } from "clsx";
13
+ import { useRef, useState } from "react";
14
+ import { useLocale } from "react-aria-components";
15
+ import { useFocusVisible, useFocusWithin, useHover } from "react-aria";
16
+ import { Controller } from "react-hook-form";
17
+ //#region src/components/inputs/Input/NumberRangeInput/NumberRangeInput.tsx
18
+ var EMPTY_RANGE = {
19
+ min: null,
20
+ max: null
21
+ };
22
+ var normalizeRangeValue = (value, minValue, maxValue) => {
23
+ if (value) return value;
24
+ return {
25
+ min: minValue ?? null,
26
+ max: maxValue ?? null
27
+ };
28
+ };
29
+ var NumberRangeInputBase = (props) => {
30
+ const $ = c(114);
31
+ const ui = UIConfig.useConfig();
32
+ const inputBaseCva = UIOverrides.useCva("input.baseCva", inputBaseDefinition);
33
+ const inputSizeCva = UIOverrides.useCva("input.sizeCva", inputSizeDefinition);
34
+ let asProp;
35
+ let autoFocusOnMount;
36
+ let className;
37
+ let error;
38
+ let errorClassName;
39
+ let headerClassName;
40
+ let helperText;
41
+ let hideLabelProps;
42
+ let inputClassName;
43
+ let isClearableProps;
44
+ let isDirty;
45
+ let isDisabled;
46
+ let isHeaderHidden;
47
+ let isRequired;
48
+ let label;
49
+ let maxInputClassName;
50
+ let maxValue;
51
+ let minInputClassName;
52
+ let minValue;
53
+ let onBlur;
54
+ let onChange;
55
+ let onMaxChange;
56
+ let onMinChange;
57
+ let ref;
58
+ let rest;
59
+ let rightContent;
60
+ let sizeProps;
61
+ let t0;
62
+ let t1;
63
+ let t2;
64
+ let t3;
65
+ let t4;
66
+ let t5;
67
+ let tooltipText;
68
+ let value;
69
+ let variantProps;
70
+ if ($[0] !== props) {
71
+ ({ref, label, tooltipText, helperText, isRequired, rightContent, isDisabled, headerClassName, errorClassName, isHeaderHidden, error, className, inputClassName, minInputClassName, maxInputClassName, value, minValue, maxValue, minPlaceholder: t0, maxPlaceholder: t1, minLabel: t2, maxLabel: t3, invalidRangeError: t4, hideInnerLabels: t5, isDirty, autoFocusOnMount, onChange, onMinChange, onMaxChange, onBlur, isClearable: isClearableProps, as: asProp, variant: variantProps, size: sizeProps, hideLabel: hideLabelProps, ...rest} = props);
72
+ $[0] = props;
73
+ $[1] = asProp;
74
+ $[2] = autoFocusOnMount;
75
+ $[3] = className;
76
+ $[4] = error;
77
+ $[5] = errorClassName;
78
+ $[6] = headerClassName;
79
+ $[7] = helperText;
80
+ $[8] = hideLabelProps;
81
+ $[9] = inputClassName;
82
+ $[10] = isClearableProps;
83
+ $[11] = isDirty;
84
+ $[12] = isDisabled;
85
+ $[13] = isHeaderHidden;
86
+ $[14] = isRequired;
87
+ $[15] = label;
88
+ $[16] = maxInputClassName;
89
+ $[17] = maxValue;
90
+ $[18] = minInputClassName;
91
+ $[19] = minValue;
92
+ $[20] = onBlur;
93
+ $[21] = onChange;
94
+ $[22] = onMaxChange;
95
+ $[23] = onMinChange;
96
+ $[24] = ref;
97
+ $[25] = rest;
98
+ $[26] = rightContent;
99
+ $[27] = sizeProps;
100
+ $[28] = t0;
101
+ $[29] = t1;
102
+ $[30] = t2;
103
+ $[31] = t3;
104
+ $[32] = t4;
105
+ $[33] = t5;
106
+ $[34] = tooltipText;
107
+ $[35] = value;
108
+ $[36] = variantProps;
109
+ } else {
110
+ asProp = $[1];
111
+ autoFocusOnMount = $[2];
112
+ className = $[3];
113
+ error = $[4];
114
+ errorClassName = $[5];
115
+ headerClassName = $[6];
116
+ helperText = $[7];
117
+ hideLabelProps = $[8];
118
+ inputClassName = $[9];
119
+ isClearableProps = $[10];
120
+ isDirty = $[11];
121
+ isDisabled = $[12];
122
+ isHeaderHidden = $[13];
123
+ isRequired = $[14];
124
+ label = $[15];
125
+ maxInputClassName = $[16];
126
+ maxValue = $[17];
127
+ minInputClassName = $[18];
128
+ minValue = $[19];
129
+ onBlur = $[20];
130
+ onChange = $[21];
131
+ onMaxChange = $[22];
132
+ onMinChange = $[23];
133
+ ref = $[24];
134
+ rest = $[25];
135
+ rightContent = $[26];
136
+ sizeProps = $[27];
137
+ t0 = $[28];
138
+ t1 = $[29];
139
+ t2 = $[30];
140
+ t3 = $[31];
141
+ t4 = $[32];
142
+ t5 = $[33];
143
+ tooltipText = $[34];
144
+ value = $[35];
145
+ variantProps = $[36];
146
+ }
147
+ const minPlaceholder = t0 === void 0 ? "Min" : t0;
148
+ const maxPlaceholder = t1 === void 0 ? "Max" : t1;
149
+ const minLabel = t2 === void 0 ? "Minimum" : t2;
150
+ const maxLabel = t3 === void 0 ? "Maximum" : t3;
151
+ const invalidRangeError = t4 === void 0 ? "Minimum cannot be greater than maximum" : t4;
152
+ const hideInnerLabels = t5 === void 0 ? true : t5;
153
+ const isClearable = isClearableProps ?? ui.input.isClearable;
154
+ const as = asProp ?? ui.input.as;
155
+ const variant = variantProps ?? ui.input.variant;
156
+ const size = sizeProps ?? ui.input.size;
157
+ const hideLabel = hideLabelProps ?? ui.input.hideLabel;
158
+ let t6;
159
+ if ($[37] !== maxValue || $[38] !== minValue || $[39] !== value) {
160
+ t6 = normalizeRangeValue(value, minValue, maxValue);
161
+ $[37] = maxValue;
162
+ $[38] = minValue;
163
+ $[39] = value;
164
+ $[40] = t6;
165
+ } else t6 = $[40];
166
+ const rangeValue = t6;
167
+ const isEmpty = rangeValue.min === null && rangeValue.max === null;
168
+ const rangeError = rangeValue.min !== null && rangeValue.max !== null && rangeValue.min > rangeValue.max ? invalidRangeError : void 0;
169
+ const effectiveError = error || rangeError;
170
+ let t7;
171
+ if ($[41] !== isDisabled) {
172
+ t7 = { isDisabled };
173
+ $[41] = isDisabled;
174
+ $[42] = t7;
175
+ } else t7 = $[42];
176
+ const { hoverProps, isHovered } = useHover(t7);
177
+ const { isFocusVisible } = useFocusVisible();
178
+ const [isFocused, setIsFocused] = useState(false);
179
+ let t8;
180
+ if ($[43] === Symbol.for("react.memo_cache_sentinel")) {
181
+ t8 = { onFocusWithinChange: setIsFocused };
182
+ $[43] = t8;
183
+ } else t8 = $[43];
184
+ const { focusWithinProps } = useFocusWithin(t8);
185
+ const t9 = isHeaderHidden || as === "inline" || as === "filter" || as === "floating";
186
+ let t10;
187
+ if ($[44] !== effectiveError || $[45] !== errorClassName || $[46] !== headerClassName || $[47] !== helperText || $[48] !== hideLabel || $[49] !== isDisabled || $[50] !== isRequired || $[51] !== label || $[52] !== rightContent || $[53] !== t9 || $[54] !== tooltipText) {
188
+ t10 = {
189
+ error: effectiveError,
190
+ label,
191
+ tooltipText,
192
+ helperText,
193
+ isRequired,
194
+ rightContent,
195
+ isHeaderHidden: t9,
196
+ hideLabel,
197
+ isDisabled,
198
+ headerClassName,
199
+ errorClassName
200
+ };
201
+ $[44] = effectiveError;
202
+ $[45] = errorClassName;
203
+ $[46] = headerClassName;
204
+ $[47] = helperText;
205
+ $[48] = hideLabel;
206
+ $[49] = isDisabled;
207
+ $[50] = isRequired;
208
+ $[51] = label;
209
+ $[52] = rightContent;
210
+ $[53] = t9;
211
+ $[54] = tooltipText;
212
+ $[55] = t10;
213
+ } else t10 = $[55];
214
+ const formFieldProps = t10;
215
+ const t11 = hideLabel || isHeaderHidden;
216
+ let t12;
217
+ if ($[56] !== headerClassName || $[57] !== helperText || $[58] !== isDisabled || $[59] !== isRequired || $[60] !== label || $[61] !== rightContent || $[62] !== t11 || $[63] !== tooltipText) {
218
+ t12 = {
219
+ label,
220
+ tooltipText,
221
+ helperText,
222
+ isRequired,
223
+ rightContent,
224
+ isHeaderHidden: t11,
225
+ isDisabled,
226
+ className: headerClassName
227
+ };
228
+ $[56] = headerClassName;
229
+ $[57] = helperText;
230
+ $[58] = isDisabled;
231
+ $[59] = isRequired;
232
+ $[60] = label;
233
+ $[61] = rightContent;
234
+ $[62] = t11;
235
+ $[63] = tooltipText;
236
+ $[64] = t12;
237
+ } else t12 = $[64];
238
+ const headerProps = t12;
239
+ let t13;
240
+ if ($[65] !== onChange || $[66] !== onMaxChange || $[67] !== onMinChange || $[68] !== rangeValue) {
241
+ t13 = (side, nextValue) => {
242
+ const nextRange = {
243
+ ...rangeValue,
244
+ [side]: nextValue
245
+ };
246
+ onChange?.(nextRange);
247
+ if (side === "min") onMinChange?.(nextValue);
248
+ else onMaxChange?.(nextValue);
249
+ };
250
+ $[65] = onChange;
251
+ $[66] = onMaxChange;
252
+ $[67] = onMinChange;
253
+ $[68] = rangeValue;
254
+ $[69] = t13;
255
+ } else t13 = $[69];
256
+ const updateRange = t13;
257
+ let t14;
258
+ if ($[70] !== onBlur || $[71] !== updateRange) {
259
+ t14 = (side_0) => {
260
+ updateRange(side_0, null);
261
+ onBlur?.({ target: { value: "" } });
262
+ };
263
+ $[70] = onBlur;
264
+ $[71] = updateRange;
265
+ $[72] = t14;
266
+ } else t14 = $[72];
267
+ const clearRangeSide = t14;
268
+ let t15;
269
+ if ($[73] !== as || $[74] !== inputBaseCva || $[75] !== variant) {
270
+ t15 = inputBaseCva({
271
+ variant,
272
+ as
273
+ });
274
+ $[73] = as;
275
+ $[74] = inputBaseCva;
276
+ $[75] = variant;
277
+ $[76] = t15;
278
+ } else t15 = $[76];
279
+ let t16;
280
+ if ($[77] !== as || $[78] !== inputSizeCva || $[79] !== size) {
281
+ t16 = inputSizeCva({
282
+ size,
283
+ as
284
+ });
285
+ $[77] = as;
286
+ $[78] = inputSizeCva;
287
+ $[79] = size;
288
+ $[80] = t16;
289
+ } else t16 = $[80];
290
+ let t17;
291
+ if ($[81] !== as || $[82] !== autoFocusOnMount || $[83] !== className || $[84] !== clearRangeSide || $[85] !== effectiveError || $[86] !== focusWithinProps || $[87] !== formFieldProps || $[88] !== headerProps || $[89] !== hideInnerLabels || $[90] !== hoverProps || $[91] !== inputClassName || $[92] !== isClearable || $[93] !== isDirty || $[94] !== isDisabled || $[95] !== isEmpty || $[96] !== isFocusVisible || $[97] !== isFocused || $[98] !== isHovered || $[99] !== isRequired || $[100] !== maxInputClassName || $[101] !== maxLabel || $[102] !== maxPlaceholder || $[103] !== minInputClassName || $[104] !== minLabel || $[105] !== minPlaceholder || $[106] !== onBlur || $[107] !== rangeValue || $[108] !== ref || $[109] !== rest || $[110] !== t15 || $[111] !== t16 || $[112] !== updateRange) {
292
+ t17 = /* @__PURE__ */ jsx(NumberRangeField, {
293
+ ...rest,
294
+ ref,
295
+ as,
296
+ className,
297
+ inputClassName,
298
+ minInputClassName,
299
+ maxInputClassName,
300
+ inputBaseClassName: t15,
301
+ inputSizeClassName: t16,
302
+ formFieldProps,
303
+ headerProps,
304
+ rangeValue,
305
+ effectiveError,
306
+ minPlaceholder,
307
+ maxPlaceholder,
308
+ minLabel,
309
+ maxLabel,
310
+ hideInnerLabels,
311
+ isDirty,
312
+ isClearable,
313
+ autoFocusOnMount,
314
+ isDisabled,
315
+ isRequired,
316
+ isEmpty,
317
+ isHovered,
318
+ isFocused,
319
+ isFocusVisible,
320
+ focusWithinProps,
321
+ hoverProps,
322
+ onRangeSideChange: updateRange,
323
+ onRangeSideClear: clearRangeSide,
324
+ onBlur
325
+ });
326
+ $[81] = as;
327
+ $[82] = autoFocusOnMount;
328
+ $[83] = className;
329
+ $[84] = clearRangeSide;
330
+ $[85] = effectiveError;
331
+ $[86] = focusWithinProps;
332
+ $[87] = formFieldProps;
333
+ $[88] = headerProps;
334
+ $[89] = hideInnerLabels;
335
+ $[90] = hoverProps;
336
+ $[91] = inputClassName;
337
+ $[92] = isClearable;
338
+ $[93] = isDirty;
339
+ $[94] = isDisabled;
340
+ $[95] = isEmpty;
341
+ $[96] = isFocusVisible;
342
+ $[97] = isFocused;
343
+ $[98] = isHovered;
344
+ $[99] = isRequired;
345
+ $[100] = maxInputClassName;
346
+ $[101] = maxLabel;
347
+ $[102] = maxPlaceholder;
348
+ $[103] = minInputClassName;
349
+ $[104] = minLabel;
350
+ $[105] = minPlaceholder;
351
+ $[106] = onBlur;
352
+ $[107] = rangeValue;
353
+ $[108] = ref;
354
+ $[109] = rest;
355
+ $[110] = t15;
356
+ $[111] = t16;
357
+ $[112] = updateRange;
358
+ $[113] = t17;
359
+ } else t17 = $[113];
360
+ return t17;
361
+ };
362
+ var NumberRangeInputInner = (t0) => {
363
+ const $ = c(5);
364
+ const { renderStaticInput, isFormControlDisabled, ...props } = t0;
365
+ const inputSizeCva = UIOverrides.useCva("input.sizeCva", inputSizeDefinition);
366
+ const ui = UIConfig.useConfig();
367
+ const { locale } = useLocale();
368
+ const [renderInput, setRenderInput] = useState(!(renderStaticInput ?? ui.renderStaticInput));
369
+ const inputRef = useRef(null);
370
+ let t1;
371
+ if ($[0] !== renderInput) {
372
+ t1 = {
373
+ inputRef,
374
+ renderInput,
375
+ setRenderInput
376
+ };
377
+ $[0] = renderInput;
378
+ $[1] = t1;
379
+ } else t1 = $[1];
380
+ const { shouldFocus, renderRealInput } = useStaticInputHandoff(t1);
381
+ if (!renderInput) {
382
+ const staticValue = normalizeRangeValue(props.value, props.minValue, props.maxValue);
383
+ const formatOptions = props.formatOptions ?? ui.numberInput.formatOptions;
384
+ const formatter = new Intl.NumberFormat(locale, formatOptions);
385
+ const minDisplay = getStaticNumberDisplayValue(staticValue.min, formatter);
386
+ const maxDisplay = getStaticNumberDisplayValue(staticValue.max, formatter);
387
+ const hasValue = minDisplay !== null || maxDisplay !== null;
388
+ const rangeError = staticValue.min !== null && staticValue.max !== null && staticValue.min > staticValue.max ? props.invalidRangeError ?? "Minimum cannot be greater than maximum" : void 0;
389
+ const effectiveError = props.error || rangeError;
390
+ const as = props.as ?? ui.input.as;
391
+ const size = props.size ?? ui.input.size;
392
+ let isDisabled = !!props.isDisabled;
393
+ if (isFormControlDisabled) isDisabled = true;
394
+ const isClearable = props.isClearable ?? ui.input.isClearable;
395
+ const dataAttributes = {
396
+ dataIsEmpty: !hasValue,
397
+ dataIsFilled: hasValue,
398
+ dataIsDirty: props.isDirty,
399
+ dataIsRequired: props.isRequired,
400
+ dataIsDisabled: isDisabled,
401
+ dataDisabled: isDisabled,
402
+ dataInvalid: !!effectiveError,
403
+ dataHasSelection: hasValue
404
+ };
405
+ return /* @__PURE__ */ jsx(InputFrame, {
406
+ ...props,
407
+ error: effectiveError,
408
+ isDisabled,
409
+ className: clsx("group w-full", as === "inline" && "h-full", props.className),
410
+ inputClassName: props.inputClassName,
411
+ contentClassName: "pr-0!",
412
+ trailingClassName: "py-0! pl-0!",
413
+ contentWrapperClassName: clsx("flex w-full items-center gap-input-gap-input-text-to-elements pr-0! py-0! px-0!", inputSizeCva({
414
+ size,
415
+ as
416
+ })),
417
+ dataAttributes,
418
+ onStaticInteract: renderRealInput,
419
+ isClearable: false,
420
+ labelPlacement: "content-wrapper",
421
+ children: (t2) => {
422
+ const { id, ...dataAttributeProps } = t2;
423
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
424
+ /* @__PURE__ */ jsxs("div", {
425
+ className: "min-w-0 flex-1",
426
+ children: [/* @__PURE__ */ jsx(FormFieldLabel, {
427
+ label: props.minLabel ?? "Minimum",
428
+ isRequired: props.isRequired,
429
+ isDisabled,
430
+ className: clsx((props.hideInnerLabels ?? true) && "sr-only")
431
+ }), /* @__PURE__ */ jsxs("div", {
432
+ className: "flex items-center gap-input-gap-trailing-elements",
433
+ children: [/* @__PURE__ */ jsx("input", {
434
+ id,
435
+ readOnly: true,
436
+ disabled: isDisabled,
437
+ tabIndex: -1,
438
+ value: minDisplay ?? "",
439
+ placeholder: props.minPlaceholder ?? "Min",
440
+ className: clsx("w-full min-w-0 bg-transparent outline-none", props.minInputClassName),
441
+ ...dataAttributeProps,
442
+ "data-rac": true
443
+ }), isClearable && /* @__PURE__ */ jsx(InputClear, {
444
+ onClear: _temp,
445
+ show: staticValue.min !== null,
446
+ renderStatic: true
447
+ })]
448
+ })]
449
+ }),
450
+ /* @__PURE__ */ jsx("span", {
451
+ className: "pointer-events-none shrink-0 select-none text-label-2 text-text-default-3",
452
+ children: "-"
453
+ }),
454
+ /* @__PURE__ */ jsxs("div", {
455
+ className: "min-w-0 flex-1",
456
+ children: [/* @__PURE__ */ jsx(FormFieldLabel, {
457
+ label: props.maxLabel ?? "Maximum",
458
+ isRequired: props.isRequired,
459
+ isDisabled,
460
+ className: clsx((props.hideInnerLabels ?? true) && "sr-only")
461
+ }), /* @__PURE__ */ jsxs("div", {
462
+ className: "flex items-center gap-input-gap-trailing-elements",
463
+ children: [/* @__PURE__ */ jsx("input", {
464
+ id: `${id}-max`,
465
+ readOnly: true,
466
+ disabled: isDisabled,
467
+ tabIndex: -1,
468
+ value: maxDisplay ?? "",
469
+ placeholder: props.maxPlaceholder ?? "Max",
470
+ className: clsx("w-full min-w-0 bg-transparent outline-none", props.maxInputClassName),
471
+ ...dataAttributeProps,
472
+ "data-rac": true
473
+ }), isClearable && /* @__PURE__ */ jsx(InputClear, {
474
+ onClear: _temp2,
475
+ show: staticValue.max !== null,
476
+ renderStatic: true
477
+ })]
478
+ })]
479
+ })
480
+ ] });
481
+ }
482
+ });
483
+ }
484
+ let t2;
485
+ if ($[2] !== props || $[3] !== shouldFocus) {
486
+ t2 = /* @__PURE__ */ jsx(NumberRangeInputBase, {
487
+ ...props,
488
+ autoFocusOnMount: shouldFocus
489
+ });
490
+ $[2] = props;
491
+ $[3] = shouldFocus;
492
+ $[4] = t2;
493
+ } else t2 = $[4];
494
+ return t2;
495
+ };
496
+ var NumberRangeInput = (t0) => {
497
+ const $ = c(19);
498
+ let props;
499
+ let renderStaticInput;
500
+ if ($[0] !== t0) {
501
+ ({renderStaticInput, ...props} = t0);
502
+ $[0] = t0;
503
+ $[1] = props;
504
+ $[2] = renderStaticInput;
505
+ } else {
506
+ props = $[1];
507
+ renderStaticInput = $[2];
508
+ }
509
+ if ("formControl" in props && props.formControl) {
510
+ let formControl;
511
+ let innerProps;
512
+ if ($[3] !== props) {
513
+ ({formControl, ...innerProps} = props);
514
+ $[3] = props;
515
+ $[4] = formControl;
516
+ $[5] = innerProps;
517
+ } else {
518
+ formControl = $[4];
519
+ innerProps = $[5];
520
+ }
521
+ const controlWithOptions = formControl.control;
522
+ let t1;
523
+ if ($[6] !== controlWithOptions._options?.disabled || $[7] !== innerProps || $[8] !== props.error || $[9] !== props.isDisabled || $[10] !== renderStaticInput) {
524
+ t1 = (t2) => {
525
+ const { field, fieldState: t3 } = t2;
526
+ const { error } = t3;
527
+ return /* @__PURE__ */ jsx(NumberRangeInputInner, {
528
+ ...innerProps,
529
+ value: field.value ?? EMPTY_RANGE,
530
+ onChange: field.onChange,
531
+ onBlur: field.onBlur,
532
+ isDisabled: field.disabled || !!controlWithOptions._options?.disabled || props.isDisabled,
533
+ isFormControlDisabled: !!controlWithOptions._options?.disabled,
534
+ error: props.error ?? error?.message,
535
+ renderStaticInput
536
+ });
537
+ };
538
+ $[6] = controlWithOptions._options?.disabled;
539
+ $[7] = innerProps;
540
+ $[8] = props.error;
541
+ $[9] = props.isDisabled;
542
+ $[10] = renderStaticInput;
543
+ $[11] = t1;
544
+ } else t1 = $[11];
545
+ let t2;
546
+ if ($[12] !== formControl.control || $[13] !== formControl.name || $[14] !== t1) {
547
+ t2 = /* @__PURE__ */ jsx(Controller, {
548
+ control: formControl.control,
549
+ name: formControl.name,
550
+ render: t1
551
+ });
552
+ $[12] = formControl.control;
553
+ $[13] = formControl.name;
554
+ $[14] = t1;
555
+ $[15] = t2;
556
+ } else t2 = $[15];
557
+ return t2;
558
+ }
559
+ let t1;
560
+ if ($[16] !== props || $[17] !== renderStaticInput) {
561
+ t1 = /* @__PURE__ */ jsx(NumberRangeInputInner, {
562
+ ...props,
563
+ renderStaticInput
564
+ });
565
+ $[16] = props;
566
+ $[17] = renderStaticInput;
567
+ $[18] = t1;
568
+ } else t1 = $[18];
569
+ return t1;
570
+ };
571
+ function _temp() {}
572
+ function _temp2() {}
573
+ //#endregion
574
+ export { NumberRangeInput };
@@ -2,22 +2,61 @@ import { VisibilityIcon } from "../../../../assets/icons/Visibility.js";
2
2
  import { VisibilityOffIcon } from "../../../../assets/icons/VisibilityOff.js";
3
3
  import "../../../../config/i18n.js";
4
4
  import { TextInput } from "../TextInput/TextInput.js";
5
+ import { c } from "react/compiler-runtime";
5
6
  import { jsx } from "react/jsx-runtime";
6
7
  import { useState } from "react";
7
8
  import { useTranslation } from "react-i18next";
8
9
  //#region src/components/inputs/Input/PasswordInput/PasswordInput.tsx
9
10
  var PasswordInput = (props) => {
11
+ const $0 = c(15);
10
12
  const { t } = useTranslation("ui");
11
13
  const [isRevealed, setIsRevealed] = useState(false);
12
- return /* @__PURE__ */ jsx(TextInput, {
13
- ...props,
14
- type: isRevealed ? "text" : "password",
15
- action: {
16
- icon: isRevealed ? VisibilityIcon : VisibilityOffIcon,
17
- altText: t(($) => isRevealed ? $.ui.password.hide : $.ui.password.reveal),
18
- onClick: () => setIsRevealed(!isRevealed)
19
- }
20
- });
14
+ const t0 = isRevealed ? "text" : "password";
15
+ const t1 = isRevealed ? VisibilityIcon : VisibilityOffIcon;
16
+ let t2;
17
+ if ($0[0] !== isRevealed) {
18
+ t2 = ($) => isRevealed ? $.ui.password.hide : $.ui.password.reveal;
19
+ $0[0] = isRevealed;
20
+ $0[1] = t2;
21
+ } else t2 = $0[1];
22
+ let t3;
23
+ if ($0[2] !== t || $0[3] !== t2) {
24
+ t3 = t(t2);
25
+ $0[2] = t;
26
+ $0[3] = t2;
27
+ $0[4] = t3;
28
+ } else t3 = $0[4];
29
+ let t4;
30
+ if ($0[5] !== isRevealed) {
31
+ t4 = () => setIsRevealed(!isRevealed);
32
+ $0[5] = isRevealed;
33
+ $0[6] = t4;
34
+ } else t4 = $0[6];
35
+ let t5;
36
+ if ($0[7] !== t1 || $0[8] !== t3 || $0[9] !== t4) {
37
+ t5 = {
38
+ icon: t1,
39
+ altText: t3,
40
+ onClick: t4
41
+ };
42
+ $0[7] = t1;
43
+ $0[8] = t3;
44
+ $0[9] = t4;
45
+ $0[10] = t5;
46
+ } else t5 = $0[10];
47
+ let t6;
48
+ if ($0[11] !== props || $0[12] !== t0 || $0[13] !== t5) {
49
+ t6 = /* @__PURE__ */ jsx(TextInput, {
50
+ ...props,
51
+ type: t0,
52
+ action: t5
53
+ });
54
+ $0[11] = props;
55
+ $0[12] = t0;
56
+ $0[13] = t5;
57
+ $0[14] = t6;
58
+ } else t6 = $0[14];
59
+ return t6;
21
60
  };
22
61
  //#endregion
23
62
  export { PasswordInput };
@@ -0,0 +1,8 @@
1
+ import { UIOverrides } from '../../../../config/uiOverrides.context';
2
+ export declare const textAreaWrapperDefinition: {
3
+ base: string[];
4
+ config?: import("../../../../utils/style-merge.util").StyleMergeUtils.Config<Record<never, never>>;
5
+ };
6
+ export type TextAreaWrapperConfig = NonNullable<typeof textAreaWrapperDefinition.config>;
7
+ export interface TextAreaWrapperVariantProps extends UIOverrides.VariantProps<TextAreaWrapperConfig> {
8
+ }
@@ -0,0 +1,5 @@
1
+ import { UIOverrides } from "../../../../config/uiOverrides.context.js";
2
+ //#region src/components/inputs/Input/TextArea/TextArea.cva.ts
3
+ var textAreaWrapperDefinition = UIOverrides.defineConfig({ base: ["group/text-area relative h-full"] });
4
+ //#endregion
5
+ export { textAreaWrapperDefinition };