@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
@@ -1,89 +1,235 @@
1
- import { ClockIcon } from "../../../../assets/icons/Clock.js";
2
1
  import { UIOverrides } from "../../../../config/uiOverrides.context.js";
3
2
  import { Typography } from "../../../text/Typography/Typography.js";
3
+ import { UIConfig } from "../../../../config/uiConfig.context.js";
4
4
  import { InlineIconButton } from "../../../buttons/InlineIconButton/InlineIconButton.js";
5
5
  import { FormFieldLabel } from "../../FormField/FormFieldLabel.js";
6
6
  import { InputClear } from "../../shared/InputClear.js";
7
7
  import { inputBaseDefinition, inputSizeDefinition } from "../../shared/input.cva.js";
8
8
  import { TimeField } from "./TimeField.js";
9
+ import { c } from "react/compiler-runtime";
9
10
  import { jsx, jsxs } from "react/jsx-runtime";
10
11
  import { clsx } from "clsx";
11
12
  import { useState } from "react";
12
13
  import { Button } from "react-aria-components";
13
14
  import { useFocusVisible, useFocusWithin, useHover } from "react-aria";
14
15
  //#region src/components/inputs/DateTime/shared/TimePickerInput.tsx
15
- var TimePickerInput = ({ ref, as, fieldProps, state, isDisabled, isDirty, isInvalid, disableDropdown, variant, size, isClearable, headerProps, disableManualEntry, placeholder, className, onPress, ...props }) => {
16
+ var TimePickerInput = (t0) => {
17
+ const $ = c(67);
18
+ const { ref, as, fieldProps, state, isDisabled, isDirty, isRequired, isInvalid, disableDropdown, variant, size, isClearable, headerProps, disableManualEntry, placeholder, className, onPress, onClear, fireBlurOnChange, ...props } = t0;
19
+ const uiConfig = UIConfig.useConfig();
16
20
  const inputBaseCva = UIOverrides.useCva("input.baseCva", inputBaseDefinition);
17
21
  const inputSizeCva = UIOverrides.useCva("input.sizeCva", inputSizeDefinition);
18
- const { hoverProps, isHovered } = useHover({ isDisabled });
22
+ let t1;
23
+ if ($[0] !== isDisabled) {
24
+ t1 = { isDisabled };
25
+ $[0] = isDisabled;
26
+ $[1] = t1;
27
+ } else t1 = $[1];
28
+ const { hoverProps, isHovered } = useHover(t1);
19
29
  const [isFocused, setIsFocused] = useState(false);
20
- const { focusWithinProps } = useFocusWithin({ onFocusWithinChange: setIsFocused });
30
+ let t2;
31
+ if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
32
+ t2 = { onFocusWithinChange: setIsFocused };
33
+ $[2] = t2;
34
+ } else t2 = $[2];
35
+ const { focusWithinProps } = useFocusWithin(t2);
21
36
  const { isFocusVisible } = useFocusVisible();
22
37
  const hidePlaceholder = as === "floating" && !state.value && !isFocused;
23
- const canClear = state.segments.some((segment) => segment.type !== "literal" && segment.isPlaceholder === false);
24
- return /* @__PURE__ */ jsxs("div", {
25
- ref,
26
- className: clsx(inputBaseCva({
27
- variant,
38
+ let t3;
39
+ if ($[3] !== state.segments) {
40
+ t3 = state.segments.some(_temp);
41
+ $[3] = state.segments;
42
+ $[4] = t3;
43
+ } else t3 = $[4];
44
+ const canClear = t3;
45
+ const t4 = clsx(inputBaseCva({
46
+ variant,
47
+ as,
48
+ ...props
49
+ }), "group/date-picker-content relative min-w-input-width-min-width", "flex items-center justify-between gap-input-gap-input-text-to-elements", className);
50
+ const t5 = isHovered || void 0;
51
+ const t6 = isDisabled || void 0;
52
+ const t7 = isDisabled || void 0;
53
+ const t8 = isInvalid || void 0;
54
+ const t9 = state.value === null || void 0;
55
+ const t10 = isFocused || void 0;
56
+ const t11 = isFocused && isFocusVisible || void 0;
57
+ const t12 = state.value !== null || void 0;
58
+ const t13 = isDirty || void 0;
59
+ const t14 = isRequired || void 0;
60
+ const t15 = state.value !== null || void 0;
61
+ let t16;
62
+ if ($[5] !== as || $[6] !== inputSizeCva || $[7] !== size) {
63
+ t16 = clsx(inputSizeCva({
64
+ size,
65
+ as
66
+ }), "flex w-full items-center gap-input-gap-input-text-to-elements pr-0!");
67
+ $[5] = as;
68
+ $[6] = inputSizeCva;
69
+ $[7] = size;
70
+ $[8] = t16;
71
+ } else t16 = $[8];
72
+ let t17;
73
+ if ($[9] !== disableManualEntry || $[10] !== onPress) {
74
+ t17 = disableManualEntry && /* @__PURE__ */ jsx(Button, {
75
+ onPress,
76
+ className: "absolute inset-0 z-base"
77
+ });
78
+ $[9] = disableManualEntry;
79
+ $[10] = onPress;
80
+ $[11] = t17;
81
+ } else t17 = $[11];
82
+ let t18;
83
+ if ($[12] !== as || $[13] !== headerProps) {
84
+ t18 = as && ["filter", "floating"].includes(as) && headerProps && /* @__PURE__ */ jsx(FormFieldLabel, {
28
85
  as,
29
- ...props
30
- }), "group/date-picker-content relative min-w-input-width-min-width", "flex items-center justify-between gap-input-gap-input-text-to-elements", className),
31
- "data-rac": "",
32
- "data-datetime-input": "",
33
- "data-hovered": isHovered || void 0,
34
- "data-disabled": isDisabled || void 0,
35
- "data-invalid": isInvalid || void 0,
36
- "data-is-empty": state.value === null || void 0,
37
- "data-focus-within": isFocused || void 0,
38
- "data-focus-visible": isFocused && isFocusVisible || void 0,
39
- "data-has-selection": state.value !== null || void 0,
40
- "data-is-dirty": isDirty || void 0,
41
- ...fieldProps,
42
- ...focusWithinProps,
43
- ...hoverProps,
44
- children: [/* @__PURE__ */ jsxs("div", {
45
- className: clsx(inputSizeCva({
46
- size,
47
- as
48
- }), "flex w-full items-center gap-input-gap-input-text-to-elements pr-0!"),
86
+ ...headerProps
87
+ });
88
+ $[12] = as;
89
+ $[13] = headerProps;
90
+ $[14] = t18;
91
+ } else t18 = $[14];
92
+ let t19;
93
+ if ($[15] !== disableManualEntry || $[16] !== fieldProps || $[17] !== hidePlaceholder || $[18] !== isDisabled || $[19] !== placeholder || $[20] !== state) {
94
+ t19 = /* @__PURE__ */ jsx("div", { children: disableManualEntry && placeholder && !state.value ? /* @__PURE__ */ jsx(Typography, {
95
+ size: "label-1",
96
+ className: "text-text-default-3",
97
+ children: placeholder
98
+ }) : /* @__PURE__ */ jsx(TimeField, {
99
+ fieldProps,
100
+ state,
101
+ isDisabled,
102
+ hidePlaceholder
103
+ }) });
104
+ $[15] = disableManualEntry;
105
+ $[16] = fieldProps;
106
+ $[17] = hidePlaceholder;
107
+ $[18] = isDisabled;
108
+ $[19] = placeholder;
109
+ $[20] = state;
110
+ $[21] = t19;
111
+ } else t19 = $[21];
112
+ let t20;
113
+ if ($[22] !== t16 || $[23] !== t17 || $[24] !== t18 || $[25] !== t19) {
114
+ t20 = /* @__PURE__ */ jsxs("div", {
115
+ className: t16,
49
116
  children: [
50
- disableManualEntry && /* @__PURE__ */ jsx(Button, {
51
- onPress,
52
- className: "absolute inset-0 z-base"
53
- }),
54
- as && ["filter", "floating"].includes(as) && headerProps && /* @__PURE__ */ jsx(FormFieldLabel, {
55
- as,
56
- ...headerProps
57
- }),
58
- /* @__PURE__ */ jsx("div", { children: disableManualEntry && placeholder && !state.value ? /* @__PURE__ */ jsx(Typography, {
59
- size: "label-1",
60
- className: "text-text-default-3",
61
- children: placeholder
62
- }) : /* @__PURE__ */ jsx(TimeField, {
63
- fieldProps,
64
- state,
65
- isDisabled,
66
- hidePlaceholder
67
- }) })
117
+ t17,
118
+ t18,
119
+ t19
68
120
  ]
69
- }), /* @__PURE__ */ jsxs("div", {
70
- className: clsx(inputSizeCva({
71
- size,
72
- as
73
- }), "flex items-center gap-input-gap-trailing-elements py-0! pl-0!"),
74
- children: [isClearable && /* @__PURE__ */ jsx(InputClear, {
75
- onClear: () => state.setValue(null),
76
- show: canClear
77
- }), (!disableDropdown || disableManualEntry) && /* @__PURE__ */ jsx(InlineIconButton, {
78
- label: "",
79
- color: "secondary",
80
- onPress,
81
- icon: ClockIcon,
82
- isDisabled,
83
- className: "border-0!"
84
- })]
85
- })]
86
- });
121
+ });
122
+ $[22] = t16;
123
+ $[23] = t17;
124
+ $[24] = t18;
125
+ $[25] = t19;
126
+ $[26] = t20;
127
+ } else t20 = $[26];
128
+ let t21;
129
+ if ($[27] !== as || $[28] !== inputSizeCva || $[29] !== size) {
130
+ t21 = clsx(inputSizeCva({
131
+ size,
132
+ as
133
+ }), "flex items-center gap-input-gap-trailing-elements py-0! pl-0!");
134
+ $[27] = as;
135
+ $[28] = inputSizeCva;
136
+ $[29] = size;
137
+ $[30] = t21;
138
+ } else t21 = $[30];
139
+ let t22;
140
+ if ($[31] !== canClear || $[32] !== fieldProps || $[33] !== fireBlurOnChange || $[34] !== isClearable || $[35] !== onClear || $[36] !== state) {
141
+ t22 = isClearable && /* @__PURE__ */ jsx(InputClear, {
142
+ onClear: () => {
143
+ state.setValue(null);
144
+ onClear?.();
145
+ if (fireBlurOnChange) fieldProps.onBlur?.(null);
146
+ },
147
+ show: canClear
148
+ });
149
+ $[31] = canClear;
150
+ $[32] = fieldProps;
151
+ $[33] = fireBlurOnChange;
152
+ $[34] = isClearable;
153
+ $[35] = onClear;
154
+ $[36] = state;
155
+ $[37] = t22;
156
+ } else t22 = $[37];
157
+ let t23;
158
+ if ($[38] !== disableDropdown || $[39] !== disableManualEntry || $[40] !== isDisabled || $[41] !== onPress || $[42] !== uiConfig) {
159
+ t23 = (!disableDropdown || disableManualEntry) && /* @__PURE__ */ jsx(InlineIconButton, {
160
+ label: "",
161
+ color: "secondary",
162
+ onPress,
163
+ icon: uiConfig.dateInput.timeIcon,
164
+ isDisabled,
165
+ className: "border-0!",
166
+ "data-static-press-action": ""
167
+ });
168
+ $[38] = disableDropdown;
169
+ $[39] = disableManualEntry;
170
+ $[40] = isDisabled;
171
+ $[41] = onPress;
172
+ $[42] = uiConfig;
173
+ $[43] = t23;
174
+ } else t23 = $[43];
175
+ let t24;
176
+ if ($[44] !== t21 || $[45] !== t22 || $[46] !== t23) {
177
+ t24 = /* @__PURE__ */ jsxs("div", {
178
+ className: t21,
179
+ children: [t22, t23]
180
+ });
181
+ $[44] = t21;
182
+ $[45] = t22;
183
+ $[46] = t23;
184
+ $[47] = t24;
185
+ } else t24 = $[47];
186
+ let t25;
187
+ if ($[48] !== fieldProps || $[49] !== focusWithinProps || $[50] !== hoverProps || $[51] !== ref || $[52] !== t10 || $[53] !== t11 || $[54] !== t12 || $[55] !== t13 || $[56] !== t14 || $[57] !== t15 || $[58] !== t20 || $[59] !== t24 || $[60] !== t4 || $[61] !== t5 || $[62] !== t6 || $[63] !== t7 || $[64] !== t8 || $[65] !== t9) {
188
+ t25 = /* @__PURE__ */ jsxs("div", {
189
+ ref,
190
+ className: t4,
191
+ "data-rac": "",
192
+ "data-datetime-input": "",
193
+ "data-hovered": t5,
194
+ "data-disabled": t6,
195
+ "data-is-disabled": t7,
196
+ "data-invalid": t8,
197
+ "data-is-empty": t9,
198
+ "data-focus-within": t10,
199
+ "data-focus-visible": t11,
200
+ "data-has-selection": t12,
201
+ "data-is-dirty": t13,
202
+ "data-is-required": t14,
203
+ "data-is-filled": t15,
204
+ ...fieldProps,
205
+ ...focusWithinProps,
206
+ ...hoverProps,
207
+ children: [t20, t24]
208
+ });
209
+ $[48] = fieldProps;
210
+ $[49] = focusWithinProps;
211
+ $[50] = hoverProps;
212
+ $[51] = ref;
213
+ $[52] = t10;
214
+ $[53] = t11;
215
+ $[54] = t12;
216
+ $[55] = t13;
217
+ $[56] = t14;
218
+ $[57] = t15;
219
+ $[58] = t20;
220
+ $[59] = t24;
221
+ $[60] = t4;
222
+ $[61] = t5;
223
+ $[62] = t6;
224
+ $[63] = t7;
225
+ $[64] = t8;
226
+ $[65] = t9;
227
+ $[66] = t25;
228
+ } else t25 = $[66];
229
+ return t25;
87
230
  };
231
+ function _temp(segment) {
232
+ return segment.type !== "literal" && segment.isPlaceholder === false;
233
+ }
88
234
  //#endregion
89
235
  export { TimePickerInput };
@@ -1,19 +1,29 @@
1
1
  import { Typography } from "../../../text/Typography/Typography.js";
2
2
  import { useScrollableListBox } from "../../../../hooks/useScrollableListBox.js";
3
+ import { c } from "react/compiler-runtime";
3
4
  import { jsx } from "react/jsx-runtime";
4
5
  import { clsx } from "clsx";
5
- import { useMemo, useRef } from "react";
6
+ import { useRef } from "react";
6
7
  import { ListBox, ListBoxItem } from "react-aria-components";
7
8
  import { today } from "@internationalized/date";
8
9
  import { useDateFormatter } from "@react-aria/i18n";
9
10
  //#region src/components/inputs/DateTime/shared/YearPicker.tsx
10
- var YearPicker = ({ state, onSelectionChange, onDateChange, onCommit, selectedDate }) => {
11
- const formatter = useDateFormatter({
12
- year: "numeric",
13
- timeZone: state.timeZone
14
- });
15
- const years = useMemo(() => {
16
- const arr = [];
11
+ var YearPicker = (t0) => {
12
+ const $ = c(22);
13
+ const { state, onSelectionChange, onDateChange, onCommit, selectedDate } = t0;
14
+ let t1;
15
+ if ($[0] !== state.timeZone) {
16
+ t1 = {
17
+ year: "numeric",
18
+ timeZone: state.timeZone
19
+ };
20
+ $[0] = state.timeZone;
21
+ $[1] = t1;
22
+ } else t1 = $[1];
23
+ const formatter = useDateFormatter(t1);
24
+ let arr;
25
+ if ($[2] !== formatter || $[3] !== state.timeZone) {
26
+ arr = [];
17
27
  for (let i = -100; i <= 100; i++) {
18
28
  const date = today(state.timeZone).add({ years: i });
19
29
  arr.push({
@@ -21,80 +31,121 @@ var YearPicker = ({ state, onSelectionChange, onDateChange, onCommit, selectedDa
21
31
  formatted: formatter.format(date.toDate(state.timeZone))
22
32
  });
23
33
  }
24
- return arr;
25
- }, [state.timeZone, formatter]);
34
+ $[2] = formatter;
35
+ $[3] = state.timeZone;
36
+ $[4] = arr;
37
+ } else arr = $[4];
38
+ const years = arr;
26
39
  const isYearDisabled = (year) => {
27
40
  if (state.minValue && year < state.minValue.year) return true;
28
41
  if (state.maxValue && year > state.maxValue.year) return true;
29
42
  return false;
30
43
  };
31
- const getSelectedYearIndex = () => {
32
- if (selectedDate) {
33
- const selectedIndexFromValue = years.findIndex((year) => year.value === selectedDate.year);
34
- if (selectedIndexFromValue >= 0) return selectedIndexFromValue;
35
- }
36
- const focusedYearIndex = years.findIndex((year) => year.value === state.focusedDate.year);
37
- if (focusedYearIndex < 0) return null;
38
- return focusedYearIndex;
39
- };
40
- const selectedYearIndex = getSelectedYearIndex();
44
+ let t2;
45
+ if ($[5] !== selectedDate || $[6] !== state.focusedDate || $[7] !== years) {
46
+ t2 = () => {
47
+ if (selectedDate) {
48
+ const selectedIndexFromValue = years.findIndex((year_0) => year_0.value === selectedDate.year);
49
+ if (selectedIndexFromValue >= 0) return selectedIndexFromValue;
50
+ }
51
+ const focusedYearIndex = years.findIndex((year_1) => year_1.value === state.focusedDate.year);
52
+ if (focusedYearIndex < 0) return null;
53
+ return focusedYearIndex;
54
+ };
55
+ $[5] = selectedDate;
56
+ $[6] = state.focusedDate;
57
+ $[7] = years;
58
+ $[8] = t2;
59
+ } else t2 = $[8];
60
+ const selectedYearIndex = t2();
41
61
  const lastPressedYearIndexRef = useRef(null);
42
- const listBoxSelectionProps = {};
43
- if (selectedYearIndex !== null) listBoxSelectionProps.selectedKeys = [selectedYearIndex];
44
- const parseYearIndexFromKey = (key) => {
45
- if (typeof key === "number") return key;
46
- if (typeof key === "string") {
47
- const parsedIndex = Number.parseInt(key, 10);
48
- if (!Number.isNaN(parsedIndex)) return parsedIndex;
49
- }
50
- return null;
51
- };
62
+ let listBoxSelectionProps;
63
+ if ($[9] !== selectedYearIndex) {
64
+ listBoxSelectionProps = {};
65
+ if (selectedYearIndex !== null) listBoxSelectionProps.selectedKeys = [selectedYearIndex];
66
+ $[9] = selectedYearIndex;
67
+ $[10] = listBoxSelectionProps;
68
+ } else listBoxSelectionProps = $[10];
69
+ const parseYearIndexFromKey = _temp;
52
70
  const { ref } = useScrollableListBox();
53
- return /* @__PURE__ */ jsx(ListBox, {
54
- ref,
55
- autoFocus: true,
56
- "aria-label": "Year",
57
- selectionMode: "single",
58
- ...listBoxSelectionProps,
59
- onSelectionChange: (key) => {
60
- if (key === "all") return;
61
- const selectedKey = [...key][0];
71
+ const T0 = ListBox;
72
+ const t3 = true;
73
+ const t4 = "Year";
74
+ const t5 = "single";
75
+ let t6;
76
+ if ($[11] !== onDateChange || $[12] !== onSelectionChange || $[13] !== state || $[14] !== years) {
77
+ t6 = (key_0) => {
78
+ if (key_0 === "all") return;
79
+ const selectedKey = [...key_0][0];
62
80
  const selectedYearIndexValue = parseYearIndexFromKey(selectedKey);
63
81
  if (selectedYearIndexValue !== null && years[selectedYearIndexValue]) {
64
82
  const nextSelectedDate = state.focusedDate.set({ year: years[selectedYearIndexValue].value });
65
83
  state.setFocusedDate(nextSelectedDate);
66
84
  onDateChange?.(nextSelectedDate);
67
85
  }
68
- onSelectionChange(key);
69
- },
70
- className: "h-80 max-h-full min-h-0 w-full shrink-0 overflow-y-auto md:h-72 md:w-80",
71
- children: years.map((year, index) => {
72
- const isDisabled = isYearDisabled(year.value);
73
- return /* @__PURE__ */ jsx(ListBoxItem, {
74
- id: index,
75
- textValue: year.formatted,
76
- isDisabled,
77
- onPress: () => {
78
- const isSecondConsecutivePress = lastPressedYearIndexRef.current === index;
79
- lastPressedYearIndexRef.current = index;
80
- const nextSelectedDate = state.focusedDate.set({ year: year.value });
81
- state.setFocusedDate(nextSelectedDate);
82
- onDateChange?.(nextSelectedDate);
83
- if (!isSecondConsecutivePress) return;
84
- if (!selectedDate) return;
85
- if (selectedYearIndex === null) return;
86
- if (index !== selectedYearIndex) return;
87
- onCommit?.();
88
- },
89
- className: clsx("flex px-4 py-2 text-interactive-text-secondary-idle outline-none", "border-elevation-outline-default-1 border-b border-solid bg-elevation-fill-default-1 last:border-b-0", "hover:text-interactive-text-secondary-hover", "selected:bg-interactive-contained-primary-idle selected:text-interactive-text-secondary-idle-inverted", "focus-visible:bg-interactive-contained-primary-focus focus-visible:text-interactive-text-secondary-idle-inverted", isDisabled ? "cursor-default opacity-50" : "cursor-pointer"),
90
- children: /* @__PURE__ */ jsx(Typography, {
91
- as: "span",
92
- size: "label-2",
93
- children: year.formatted
94
- })
95
- }, index);
96
- })
86
+ onSelectionChange(key_0);
87
+ };
88
+ $[11] = onDateChange;
89
+ $[12] = onSelectionChange;
90
+ $[13] = state;
91
+ $[14] = years;
92
+ $[15] = t6;
93
+ } else t6 = $[15];
94
+ const t7 = "h-80 max-h-full min-h-0 w-full shrink-0 overflow-y-auto md:h-72 md:w-80";
95
+ const t8 = years.map((year_2, index) => {
96
+ const isDisabled = isYearDisabled(year_2.value);
97
+ return /* @__PURE__ */ jsx(ListBoxItem, {
98
+ id: index,
99
+ textValue: year_2.formatted,
100
+ isDisabled,
101
+ onPress: () => {
102
+ const isSecondConsecutivePress = lastPressedYearIndexRef.current === index;
103
+ lastPressedYearIndexRef.current = index;
104
+ const nextSelectedDate_0 = state.focusedDate.set({ year: year_2.value });
105
+ state.setFocusedDate(nextSelectedDate_0);
106
+ onDateChange?.(nextSelectedDate_0);
107
+ if (!isSecondConsecutivePress) return;
108
+ if (!selectedDate) return;
109
+ if (selectedYearIndex === null) return;
110
+ if (index !== selectedYearIndex) return;
111
+ onCommit?.();
112
+ },
113
+ className: clsx("flex px-4 py-2 text-interactive-text-secondary-idle outline-none", "border-elevation-outline-default-1 border-b border-solid bg-elevation-fill-default-1 last:border-b-0", "hover:text-interactive-text-secondary-hover", "selected:bg-interactive-contained-primary-idle selected:text-interactive-text-secondary-idle-inverted", "focus-visible:bg-interactive-contained-primary-focus focus-visible:text-interactive-text-secondary-idle-inverted", isDisabled ? "cursor-default opacity-50" : "cursor-pointer"),
114
+ children: /* @__PURE__ */ jsx(Typography, {
115
+ as: "span",
116
+ size: "label-2",
117
+ children: year_2.formatted
118
+ })
119
+ }, index);
97
120
  });
121
+ let t9;
122
+ if ($[16] !== T0 || $[17] !== listBoxSelectionProps || $[18] !== ref || $[19] !== t6 || $[20] !== t8) {
123
+ t9 = /* @__PURE__ */ jsx(T0, {
124
+ ref,
125
+ autoFocus: t3,
126
+ "aria-label": t4,
127
+ selectionMode: t5,
128
+ ...listBoxSelectionProps,
129
+ onSelectionChange: t6,
130
+ className: t7,
131
+ children: t8
132
+ });
133
+ $[16] = T0;
134
+ $[17] = listBoxSelectionProps;
135
+ $[18] = ref;
136
+ $[19] = t6;
137
+ $[20] = t8;
138
+ $[21] = t9;
139
+ } else t9 = $[21];
140
+ return t9;
98
141
  };
142
+ function _temp(key) {
143
+ if (typeof key === "number") return key;
144
+ if (typeof key === "string") {
145
+ const parsedIndex = Number.parseInt(key, 10);
146
+ if (!Number.isNaN(parsedIndex)) return parsedIndex;
147
+ }
148
+ return null;
149
+ }
99
150
  //#endregion
100
151
  export { YearPicker };
@@ -0,0 +1,5 @@
1
+ import { IconButtonProps } from '../../../buttons/IconButton/IconButton';
2
+ export type DatePickerTodayIcon = boolean | IconButtonProps["icon"];
3
+ export type DatePickerTodayIconButtonSize = IconButtonProps["size"];
4
+ export type DatePickerTodayIconButtonComponent = "iconButton" | "inlineIconButton";
5
+ export type DatePickerTodayIconPlacement = "content" | "fieldLabel";
@@ -0,0 +1,16 @@
1
+ import { InputSizeProps } from '../../shared/input.cva';
2
+ import { UIOverrides } from '../../../../config/uiOverrides.context';
3
+ export declare const datePickerInputContentRowDefinition: {
4
+ base: string[];
5
+ config: import("../../../../utils/style-merge.util").StyleMergeUtils.Config<{
6
+ readonly size: {
7
+ readonly "extra-small": "";
8
+ readonly small: "";
9
+ readonly default: "";
10
+ readonly large: "";
11
+ };
12
+ }>;
13
+ };
14
+ export type DatePickerInputContentRowConfig = NonNullable<typeof datePickerInputContentRowDefinition.config>;
15
+ export interface DatePickerInputContentRowProps extends UIOverrides.VariantProps<DatePickerInputContentRowConfig>, InputSizeProps {
16
+ }
@@ -0,0 +1,16 @@
1
+ import { UIOverrides } from "../../../../config/uiOverrides.context.js";
2
+ //#region src/components/inputs/DateTime/shared/datePickerInput.cva.ts
3
+ var datePickerInputContentRowDefinition = UIOverrides.defineConfig({
4
+ base: ["flex items-center gap-input-gap-input-text-to-elements"],
5
+ config: {
6
+ variants: { size: {
7
+ "extra-small": "",
8
+ small: "",
9
+ default: "",
10
+ large: ""
11
+ } },
12
+ defaultVariants: { size: "default" }
13
+ }
14
+ });
15
+ //#endregion
16
+ export { datePickerInputContentRowDefinition };
@@ -0,0 +1,15 @@
1
+ import { FC, ReactElement, SVGProps } from 'react';
2
+ import { PressEvent } from 'react-aria-components';
3
+ import { DatePickerTodayIcon, DatePickerTodayIconButtonComponent, DatePickerTodayIconButtonSize } from './datePicker.types';
4
+ type TodayIconComponent = FC<SVGProps<SVGSVGElement>> | ReactElement;
5
+ type DatePickerTodayIconOptions = {
6
+ className?: string;
7
+ isDisabled?: boolean;
8
+ onPress?: (event: PressEvent) => void;
9
+ renderStatic?: boolean;
10
+ size?: DatePickerTodayIconButtonSize;
11
+ todayIconButtonComponent?: DatePickerTodayIconButtonComponent;
12
+ };
13
+ export declare const getDatePickerTodayIcon: (todayIcon: DatePickerTodayIcon | undefined) => TodayIconComponent | null;
14
+ export declare const renderDatePickerTodayIcon: (todayIcon: DatePickerTodayIcon | undefined, options?: DatePickerTodayIconOptions) => import("react/jsx-runtime").JSX.Element | undefined;
15
+ export {};
@@ -0,0 +1,32 @@
1
+ import { IconButton } from "../../../buttons/IconButton/IconButton.js";
2
+ import { InlineIconButton } from "../../../buttons/InlineIconButton/InlineIconButton.js";
3
+ import { TodayIcon } from "../../../../assets/icons/Today.js";
4
+ import { jsx } from "react/jsx-runtime";
5
+ //#region src/components/inputs/DateTime/shared/datePickerTodayIcon.tsx
6
+ var getDatePickerTodayIcon = (todayIcon) => {
7
+ if (!todayIcon) return null;
8
+ return todayIcon === true ? TodayIcon : todayIcon;
9
+ };
10
+ var renderDatePickerTodayIcon = (todayIcon, options) => {
11
+ const icon = getDatePickerTodayIcon(todayIcon);
12
+ if (!icon) return;
13
+ const { className, isDisabled, onPress, renderStatic, size = "none", todayIconButtonComponent = "iconButton" } = options ?? {};
14
+ const buttonProps = {
15
+ label: "",
16
+ icon,
17
+ size,
18
+ isDisabled,
19
+ onPress
20
+ };
21
+ if (todayIconButtonComponent === "inlineIconButton") return /* @__PURE__ */ jsx(InlineIconButton, {
22
+ ...buttonProps,
23
+ staticRender: renderStatic,
24
+ className: className ?? "relative z-raised !border-none"
25
+ });
26
+ return /* @__PURE__ */ jsx(IconButton, {
27
+ ...buttonProps,
28
+ className: className ?? "relative z-raised"
29
+ });
30
+ };
31
+ //#endregion
32
+ export { renderDatePickerTodayIcon };
@@ -0,0 +1,2 @@
1
+ import { DateSegment } from '@react-stately/datepicker';
2
+ export declare const getTimeSegmentValue: (segment: DateSegment | undefined, fallbackValue?: number) => number;
@@ -0,0 +1,41 @@
1
+ import { CalendarDate } from '@internationalized/date';
2
+ import { ReactNode } from 'react';
3
+ import { DateValue, TimeValue } from 'react-aria';
4
+ interface StaticSegmentProps {
5
+ isDisabled?: boolean;
6
+ hidePlaceholder?: boolean;
7
+ }
8
+ interface StaticManualEntryPlaceholderProps {
9
+ disableManualEntry?: boolean;
10
+ placeholder?: ReactNode;
11
+ }
12
+ type StaticDateGranularity = "day" | "month" | "year";
13
+ interface StaticCalendarDateSegmentsProps extends StaticSegmentProps, StaticManualEntryPlaceholderProps {
14
+ value?: CalendarDate | null;
15
+ locale: string;
16
+ shouldForceLeadingZeros?: boolean;
17
+ dateGranularity?: StaticDateGranularity;
18
+ }
19
+ interface StaticCalendarDateTimeSegmentsProps extends StaticSegmentProps, StaticManualEntryPlaceholderProps {
20
+ value?: DateValue | null;
21
+ locale: string;
22
+ shouldForceLeadingZeros?: boolean;
23
+ }
24
+ interface StaticDateRangeSegmentsProps extends StaticSegmentProps, StaticManualEntryPlaceholderProps {
25
+ start?: CalendarDate | null;
26
+ end?: CalendarDate | null;
27
+ locale: string;
28
+ shouldForceLeadingZeros?: boolean;
29
+ }
30
+ interface StaticTimeSegmentsProps extends StaticSegmentProps, StaticManualEntryPlaceholderProps {
31
+ value?: TimeValue | null;
32
+ locale: string;
33
+ shouldForceLeadingZeros?: boolean;
34
+ }
35
+ export declare const getStaticCalendarDateSegments: ({ value, locale, shouldForceLeadingZeros, isDisabled, hidePlaceholder, disableManualEntry, placeholder, dateGranularity, }: StaticCalendarDateSegmentsProps) => import("react/jsx-runtime").JSX.Element;
36
+ export declare const getStaticCalendarDateTimeSegments: ({ value, locale, shouldForceLeadingZeros, isDisabled, hidePlaceholder, disableManualEntry, placeholder, }: StaticCalendarDateTimeSegmentsProps) => import("react/jsx-runtime").JSX.Element;
37
+ export declare const getStaticDateRangeSegments: ({ start, end, locale, shouldForceLeadingZeros, isDisabled, hidePlaceholder, disableManualEntry, placeholder, }: StaticDateRangeSegmentsProps) => import("react/jsx-runtime").JSX.Element;
38
+ export declare const getStaticTimeSegments: ({ value, locale, shouldForceLeadingZeros, isDisabled, hidePlaceholder, disableManualEntry, placeholder, }: StaticTimeSegmentsProps) => import("react/jsx-runtime").JSX.Element;
39
+ export declare const getStaticDateTimePlaceholder: (placeholder: ReactNode) => import("react/jsx-runtime").JSX.Element;
40
+ export declare const getStaticDateTimeFocusTarget: (container: HTMLElement, staticTarget: EventTarget | null) => HTMLElement | null;
41
+ export {};