@povio/ui 2.3.2 → 3.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/icons/AlignCenter.js +26 -11
- package/dist/assets/icons/AlignLeft.js +26 -11
- package/dist/assets/icons/AlignLeftRight.js +26 -11
- package/dist/assets/icons/AlignRight.js +26 -11
- package/dist/assets/icons/ArrowDropDown.js +26 -11
- package/dist/assets/icons/ArrowDropUp.js +26 -11
- package/dist/assets/icons/ArrowLeft.js +26 -11
- package/dist/assets/icons/ArrowRight.js +26 -11
- package/dist/assets/icons/Bold.js +26 -11
- package/dist/assets/icons/BulletedList.js +26 -11
- package/dist/assets/icons/Calendar.js +28 -13
- package/dist/assets/icons/Check.js +28 -13
- package/dist/assets/icons/CheckCircle.js +26 -11
- package/dist/assets/icons/CheckboxCheckmark.js +29 -14
- package/dist/assets/icons/CheckboxIndeterminate.js +29 -14
- package/dist/assets/icons/ChevronDown.js +28 -13
- package/dist/assets/icons/ChevronLeft.js +28 -13
- package/dist/assets/icons/ChevronRight.js +28 -13
- package/dist/assets/icons/ChevronUp.js +28 -13
- package/dist/assets/icons/ChevronsLeft.js +28 -13
- package/dist/assets/icons/ChevronsRight.js +28 -13
- package/dist/assets/icons/Clock.js +26 -11
- package/dist/assets/icons/Close.js +26 -11
- package/dist/assets/icons/DateTime.js +35 -14
- package/dist/assets/icons/DragIndicator.js +26 -11
- package/dist/assets/icons/File.js +28 -13
- package/dist/assets/icons/Highlight.js +26 -11
- package/dist/assets/icons/HighlightOn.js +49 -15
- package/dist/assets/icons/Home.js +26 -11
- package/dist/assets/icons/Info.js +37 -16
- package/dist/assets/icons/Italic.js +26 -11
- package/dist/assets/icons/Link.js +26 -11
- package/dist/assets/icons/Menu.js +26 -11
- package/dist/assets/icons/NumberedList.js +26 -11
- package/dist/assets/icons/PointerHorizontal.js +26 -11
- package/dist/assets/icons/PointerVertical.js +26 -11
- package/dist/assets/icons/Search.js +26 -11
- package/dist/assets/icons/Send.js +28 -13
- package/dist/assets/icons/Strikethrough.js +26 -11
- package/dist/assets/icons/TextColor.js +48 -14
- package/dist/assets/icons/Today.js +26 -11
- package/dist/assets/icons/Underlined.js +28 -13
- package/dist/assets/icons/Upload.js +35 -14
- package/dist/assets/icons/Visibility.js +26 -11
- package/dist/assets/icons/VisibilityOff.js +26 -11
- package/dist/assets/icons/WarningFilled.js +28 -13
- package/dist/assets/locales/sl/translation.json.js +2 -2
- package/dist/components/Breadcrumbs/Breadcrumbs.js +215 -64
- package/dist/components/Breadcrumbs/breadcrumbs.cva.d.ts +40 -14
- package/dist/components/Breadcrumbs/breadcrumbs.cva.js +21 -18
- package/dist/components/Menu/Menu.js +18 -2
- package/dist/components/Menu/MenuDesktop.js +41 -7
- package/dist/components/Menu/MenuItem.js +35 -12
- package/dist/components/Menu/MenuMobile.js +103 -44
- package/dist/components/Menu/MenuPopover.js +110 -34
- package/dist/components/Menu/menu.cva.d.ts +35 -13
- package/dist/components/Menu/menu.cva.js +30 -24
- package/dist/components/buttons/Button/Button.js +7 -7
- package/dist/components/buttons/Button/button.cva.d.ts +95 -26
- package/dist/components/buttons/Button/button.cva.js +601 -589
- package/dist/components/buttons/IconButton/IconButton.js +40 -8
- package/dist/components/buttons/InlineIconButton/InlineIconButton.d.ts +2 -1
- package/dist/components/buttons/InlineIconButton/InlineIconButton.js +34 -9
- package/dist/components/buttons/PillButton/PillButton.js +59 -21
- package/dist/components/buttons/PillButton/pillButton.cva.d.ts +33 -9
- package/dist/components/buttons/PillButton/pillButton.cva.js +247 -239
- package/dist/components/buttons/SplitButton/SplitButton.js +103 -18
- package/dist/components/buttons/TextButton/TextButton.js +30 -8
- package/dist/components/buttons/ToggleButton/ToggleButton.js +28 -8
- package/dist/components/buttons/shared/ButtonContent.js +83 -25
- package/dist/components/buttons/shared/buttonContent.cva.d.ts +3 -5
- package/dist/components/buttons/shared/buttonContent.cva.js +1 -8
- package/dist/components/inputs/Checkbox/Checkbox.d.ts +1 -0
- package/dist/components/inputs/Checkbox/Checkbox.js +203 -37
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +28 -14
- package/dist/components/inputs/Checkbox/checkbox.cva.d.ts +26 -10
- package/dist/components/inputs/Checkbox/checkbox.cva.js +47 -40
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +12 -5
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +371 -75
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +12 -5
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +596 -218
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +13 -5
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +267 -47
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +7 -3
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +611 -121
- package/dist/components/inputs/DateTime/shared/Calendar.d.ts +5 -2
- package/dist/components/inputs/DateTime/shared/Calendar.js +338 -119
- package/dist/components/inputs/DateTime/shared/CalendarCell.d.ts +4 -2
- package/dist/components/inputs/DateTime/shared/CalendarCell.js +310 -103
- package/dist/components/inputs/DateTime/shared/CalendarGrid.d.ts +4 -2
- package/dist/components/inputs/DateTime/shared/CalendarGrid.js +150 -33
- package/dist/components/inputs/DateTime/shared/CalendarHeader.js +249 -93
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +318 -137
- package/dist/components/inputs/DateTime/shared/DateField.js +286 -112
- package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +13 -3
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +387 -143
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.d.ts +15 -0
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +96 -11
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +84 -30
- package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +59 -10
- package/dist/components/inputs/DateTime/shared/MonthPicker.js +103 -58
- package/dist/components/inputs/DateTime/shared/RangeCalendar.js +193 -82
- package/dist/components/inputs/DateTime/shared/TimeField.js +27 -8
- package/dist/components/inputs/DateTime/shared/TimePickerForm.js +279 -110
- package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +4 -1
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +214 -69
- package/dist/components/inputs/DateTime/shared/YearPicker.js +119 -68
- package/dist/components/inputs/DateTime/shared/datePicker.types.d.ts +5 -0
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.d.ts +27 -0
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.js +15 -0
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.d.ts +15 -0
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.js +32 -0
- package/dist/components/inputs/DateTime/shared/dateSegment.utils.d.ts +2 -0
- package/dist/components/inputs/DateTime/shared/dateSegment.utils.spec.d.ts +1 -0
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.d.ts +40 -0
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.js +85 -0
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.spec.d.ts +1 -0
- package/dist/components/inputs/File/FileUpload.js +87 -44
- package/dist/components/inputs/File/FileUploadContainer.js +15 -7
- package/dist/components/inputs/File/InputUpload.js +317 -79
- package/dist/components/inputs/File/shared/FileCard.js +104 -41
- package/dist/components/inputs/File/shared/FileCardList.js +47 -12
- package/dist/components/inputs/File/shared/FileUploadContent.js +175 -44
- package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +149 -46
- package/dist/components/inputs/File/shared/FileUploadContentError.js +234 -93
- package/dist/components/inputs/File/shared/FileUploadContentFilled.js +230 -97
- package/dist/components/inputs/File/shared/FileUploadContentLoading.js +199 -55
- package/dist/components/inputs/File/shared/InputUploadContent.js +151 -37
- package/dist/components/inputs/File/shared/InputUploadFilled.js +51 -10
- package/dist/components/inputs/File/shared/ProgressBar.js +48 -9
- package/dist/components/inputs/File/shared/fileUpload.cva.d.ts +26 -9
- package/dist/components/inputs/File/shared/fileUpload.cva.js +48 -40
- package/dist/components/inputs/File/shared/inputUploadButton.cva.d.ts +23 -6
- package/dist/components/inputs/File/shared/inputUploadButton.cva.js +29 -20
- package/dist/components/inputs/FormField/FormField.d.ts +3 -3
- package/dist/components/inputs/FormField/FormField.js +119 -37
- package/dist/components/inputs/FormField/FormFieldError.js +27 -7
- package/dist/components/inputs/FormField/FormFieldHeader.d.ts +2 -2
- package/dist/components/inputs/FormField/FormFieldHeader.js +81 -22
- package/dist/components/inputs/FormField/FormFieldHeaderClose.js +31 -7
- package/dist/components/inputs/FormField/FormFieldHelper.js +28 -8
- package/dist/components/inputs/FormField/FormFieldLabel.d.ts +2 -2
- package/dist/components/inputs/FormField/FormFieldLabel.js +46 -15
- package/dist/components/inputs/FormField/formFieldError.cva.d.ts +12 -5
- package/dist/components/inputs/FormField/formFieldError.cva.js +11 -8
- package/dist/components/inputs/FormField/formFieldHeader.cva.d.ts +22 -0
- package/dist/components/inputs/FormField/formFieldHeader.cva.js +13 -0
- package/dist/components/inputs/FormField/formFieldHelper.cva.d.ts +12 -5
- package/dist/components/inputs/FormField/formFieldHelper.cva.js +11 -8
- package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +5 -2
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +450 -100
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.d.ts +45 -0
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +571 -0
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +35 -0
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +575 -0
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +48 -9
- package/dist/components/inputs/Input/TextArea/TextArea.cva.d.ts +12 -0
- package/dist/components/inputs/Input/TextArea/TextArea.cva.js +4 -0
- package/dist/components/inputs/Input/TextArea/TextArea.js +309 -94
- package/dist/components/inputs/Input/TextInput/TextInput.d.ts +3 -1
- package/dist/components/inputs/Input/TextInput/TextInput.js +422 -93
- package/dist/components/inputs/Input/shared/InputContent.js +196 -63
- package/dist/components/inputs/Input/shared/numberStatic.utils.d.ts +1 -0
- package/dist/components/inputs/Input/shared/numberStatic.utils.js +7 -0
- package/dist/components/inputs/Inputs/Form.js +40 -11
- package/dist/components/inputs/Inputs/InputItem.d.ts +15 -21
- package/dist/components/inputs/Inputs/InputItem.js +69 -14
- package/dist/components/inputs/Inputs/Inputs.js +37 -11
- package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +3 -1
- package/dist/components/inputs/RadioGroup/RadioGroup.js +356 -64
- package/dist/components/inputs/RadioGroup/radio.cva.d.ts +101 -6
- package/dist/components/inputs/RadioGroup/radio.cva.js +74 -24
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +6 -2
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +214 -22
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +3 -18
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +104 -8
- package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +36 -0
- package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +14 -0
- package/dist/components/inputs/Selection/Select/QuerySelect.js +173 -0
- package/dist/components/inputs/Selection/Select/Select.d.ts +7 -3
- package/dist/components/inputs/Selection/Select/Select.js +225 -18
- package/dist/components/inputs/Selection/shared/SelectBase.d.ts +8 -1
- package/dist/components/inputs/Selection/shared/SelectBase.js +69 -18
- package/dist/components/inputs/Selection/shared/SelectDesktop.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +396 -141
- package/dist/components/inputs/Selection/shared/SelectInput.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectInput.js +398 -119
- package/dist/components/inputs/Selection/shared/SelectInputTags.js +99 -25
- package/dist/components/inputs/Selection/shared/SelectListBox.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectListBox.js +164 -52
- package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +88 -38
- package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +72 -19
- package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +73 -24
- package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +58 -9
- package/dist/components/inputs/Selection/shared/SelectMobile.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/SelectMobile.js +9 -3
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.d.ts +9 -0
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +47 -0
- package/dist/components/inputs/Selection/shared/querySelect.utils.d.ts +12 -0
- package/dist/components/inputs/Selection/shared/querySelect.utils.js +36 -0
- package/dist/components/inputs/Selection/shared/select.context.d.ts +3 -2
- package/dist/components/inputs/Selection/shared/select.context.js +67 -36
- package/dist/components/inputs/Selection/shared/select.types.d.ts +3 -2
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.d.ts +10 -0
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.js +4 -0
- package/dist/components/inputs/Selection/shared/selectInput.cva.d.ts +5 -0
- package/dist/components/inputs/Selection/shared/selectInput.cva.js +5 -0
- package/dist/components/inputs/Selection/shared/selectItem.cva.d.ts +16 -6
- package/dist/components/inputs/Selection/shared/selectItem.cva.js +21 -18
- package/dist/components/inputs/Selection/shared/staticSelect.utils.d.ts +23 -0
- package/dist/components/inputs/Selection/shared/staticSelect.utils.js +37 -0
- package/dist/components/inputs/Selection/shared/staticSelect.utils.spec.d.ts +1 -0
- package/dist/components/inputs/Selection/shared/useSelectItems.js +109 -49
- package/dist/components/inputs/Skeleton/InputFrame.d.ts +82 -0
- package/dist/components/inputs/Skeleton/InputFrame.js +548 -0
- package/dist/components/inputs/Slider/Slider.d.ts +2 -1
- package/dist/components/inputs/Slider/Slider.js +265 -76
- package/dist/components/inputs/TextEditor/TextEditor.d.ts +1 -0
- package/dist/components/inputs/TextEditor/TextEditor.js +450 -101
- package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +37 -11
- package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +105 -33
- package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +194 -45
- package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +88 -28
- package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +48 -14
- package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.js +66 -19
- package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +49 -15
- package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +92 -32
- package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +126 -54
- package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +141 -38
- package/dist/components/inputs/Toggle/Toggle.d.ts +1 -0
- package/dist/components/inputs/Toggle/Toggle.js +217 -40
- package/dist/components/inputs/Toggle/toggle.cva.d.ts +15 -6
- package/dist/components/inputs/Toggle/toggle.cva.js +25 -21
- package/dist/components/inputs/shared/CheckContent.d.ts +2 -1
- package/dist/components/inputs/shared/CheckContent.js +23 -13
- package/dist/components/inputs/shared/InputClear.d.ts +2 -1
- package/dist/components/inputs/shared/InputClear.js +88 -12
- package/dist/components/inputs/shared/TooltipWrapper.js +50 -11
- package/dist/components/inputs/shared/input.cva.d.ts +137 -16
- package/dist/components/inputs/shared/input.cva.js +317 -273
- package/dist/components/inputs/shared/label.cva.d.ts +15 -6
- package/dist/components/inputs/shared/label.cva.js +28 -25
- package/dist/components/inputs/shared/tooltipWrapper.cva.d.ts +12 -0
- package/dist/components/inputs/shared/tooltipWrapper.cva.js +4 -0
- package/dist/components/inputs/shared/useStaticInputHandoff.d.ts +14 -0
- package/dist/components/inputs/shared/useStaticInputHandoff.js +100 -0
- package/dist/components/navigation/Accordion/Accordion.js +71 -24
- package/dist/components/navigation/Accordion/AccordionItem.js +97 -52
- package/dist/components/navigation/Accordion/accordion.cva.d.ts +109 -44
- package/dist/components/navigation/Accordion/accordion.cva.js +114 -84
- package/dist/components/navigation/Stepper/Stepper.js +69 -24
- package/dist/components/navigation/Stepper/StepperItem.js +112 -39
- package/dist/components/navigation/Stepper/StepperSeparator.js +25 -7
- package/dist/components/navigation/Stepper/stepper.cva.d.ts +86 -30
- package/dist/components/navigation/Stepper/stepper.cva.js +104 -83
- package/dist/components/overlays/ActionModal/ActionModal.js +169 -35
- package/dist/components/overlays/BottomSheet/BottomSheet.js +96 -23
- package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +48 -8
- package/dist/components/overlays/Drawer/Drawer.js +62 -20
- package/dist/components/overlays/Modal/Modal.js +5 -5
- package/dist/components/overlays/Modal/modal.cva.d.ts +34 -9
- package/dist/components/overlays/Modal/modal.cva.js +38 -27
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +86 -30
- package/dist/components/overlays/Tooltip/Tooltip.js +143 -34
- package/dist/components/overlays/Tooltip/TooltipEllipsis.js +37 -12
- package/dist/components/overlays/Tooltip/tooltip.cva.d.ts +45 -17
- package/dist/components/overlays/Tooltip/tooltip.cva.js +38 -26
- package/dist/components/segment/Segment.js +221 -60
- package/dist/components/segment/SegmentItem.js +70 -13
- package/dist/components/segment/segment.cva.d.ts +18 -7
- package/dist/components/segment/segment.cva.js +24 -21
- package/dist/components/shared/pagination/Pagination.js +108 -22
- package/dist/components/shared/pagination/PaginationList.js +167 -64
- package/dist/components/shared/popover.cva.d.ts +7 -3
- package/dist/components/shared/popover.cva.js +3 -3
- package/dist/components/status/Alert/Alert.js +103 -36
- package/dist/components/status/Alert/alert.cva.d.ts +18 -6
- package/dist/components/status/Alert/alert.cva.js +60 -57
- package/dist/components/status/Loader/Loader.js +77 -22
- package/dist/components/status/Loader/loader.cva.d.ts +23 -4
- package/dist/components/status/Loader/loader.cva.js +22 -13
- package/dist/components/status/Toast/Toast.js +27 -20
- package/dist/components/status/Toast/toast.cva.d.ts +61 -10
- package/dist/components/status/Toast/toast.cva.js +129 -64
- package/dist/components/status/Toast/useToast.js +62 -57
- package/dist/components/status/shared/status.cva.d.ts +30 -8
- package/dist/components/status/shared/status.cva.js +56 -50
- package/dist/components/table/CellText.js +3 -3
- package/dist/components/table/ColumnConfig.js +158 -54
- package/dist/components/table/HeaderText.js +3 -3
- package/dist/components/table/InfiniteTable.js +67 -16
- package/dist/components/table/PaginatedTable.js +84 -18
- package/dist/components/table/Table.js +34 -33
- package/dist/components/table/table.cva.d.ts +52 -19
- package/dist/components/table/table.cva.js +44 -35
- package/dist/components/text/Link/Link.js +22 -10
- package/dist/components/text/Link/link.cva.d.ts +11 -5
- package/dist/components/text/Link/link.cva.js +8 -5
- package/dist/components/text/Tag/Tag.js +3 -3
- package/dist/components/text/Tag/tag.cva.d.ts +15 -5
- package/dist/components/text/Tag/tag.cva.js +51 -48
- package/dist/components/text/Typography/Typography.js +25 -10
- package/dist/components/text/Typography/typography.cva.d.ts +93 -7
- package/dist/components/text/Typography/typography.cva.js +126 -122
- package/dist/config/confirmation.context.js +1 -1
- package/dist/config/link.context.js +23 -9
- package/dist/config/router.context.js +42 -16
- package/dist/config/theme.context.js +98 -45
- package/dist/config/uiConfig.context.d.ts +20 -6
- package/dist/config/uiConfig.context.js +68 -14
- package/dist/config/uiOverrides.context.d.ts +192 -0
- package/dist/config/uiOverrides.context.js +113 -0
- package/dist/helpers/dynamicInputs.d.ts +5 -5
- package/dist/helpers/dynamicInputs.js +3 -0
- package/dist/hooks/useAutosave.d.ts +2 -1
- package/dist/hooks/useAutosave.js +12 -4
- package/dist/hooks/useAutosave.spec.d.ts +1 -0
- package/dist/hooks/useBreakpoint.js +16 -3
- package/dist/hooks/useDebounceCallback.js +51 -17
- package/dist/hooks/useFilters.js +125 -64
- package/dist/hooks/useForm.js +42 -8
- package/dist/hooks/useFormAutosave.d.ts +3 -1
- package/dist/hooks/useFormAutosave.js +122 -30
- package/dist/hooks/useFormAutosave.spec.d.ts +1 -0
- package/dist/hooks/useIntersectionObserver.d.ts +1 -1
- package/dist/hooks/useIntersectionObserver.js +91 -24
- package/dist/hooks/useKeyInteractions.d.ts +20 -0
- package/dist/hooks/useKeyInteractions.js +54 -0
- package/dist/hooks/useKeyInteractions.spec.d.ts +1 -0
- package/dist/hooks/useLocalStorage.js +43 -10
- package/dist/hooks/useLongPressRepeat.js +55 -20
- package/dist/hooks/usePagination.js +49 -19
- package/dist/hooks/useQueryAutocomplete.d.ts +14 -0
- package/dist/hooks/useQueryAutocomplete.js +57 -0
- package/dist/hooks/useScrollableListBox.js +37 -16
- package/dist/hooks/useSorting.js +69 -28
- package/dist/hooks/useStateAndRef.js +21 -7
- package/dist/hooks/useTableColumnConfig.js +124 -31
- package/dist/hooks/useTranslationMemo.js +25 -5
- package/dist/index.d.ts +37 -1
- package/dist/index.js +34 -3
- package/dist/tw-ui-plugin.js +6 -0
- package/dist/utils/date-time.utils.d.ts +38 -10
- package/dist/utils/date-time.utils.js +136 -22
- package/dist/utils/query.utils.d.ts +4 -0
- package/dist/utils/query.utils.js +8 -0
- package/dist/utils/style-merge.util.d.ts +43 -0
- package/dist/utils/style-merge.util.js +233 -0
- package/dist/utils/style-merge.util.spec.d.ts +1 -0
- package/package.json +1 -1
- package/dist/config/uiStyle.context.d.ts +0 -162
- package/dist/config/uiStyle.context.js +0 -30
|
@@ -0,0 +1,548 @@
|
|
|
1
|
+
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
2
|
+
import { typography } from "../../text/Typography/typography.cva.js";
|
|
3
|
+
import { Loader } from "../../status/Loader/Loader.js";
|
|
4
|
+
import { UIConfig } from "../../../config/uiConfig.context.js";
|
|
5
|
+
import { InlineIconButton } from "../../buttons/InlineIconButton/InlineIconButton.js";
|
|
6
|
+
import { FormFieldLabel } from "../FormField/FormFieldLabel.js";
|
|
7
|
+
import { InputClear } from "../shared/InputClear.js";
|
|
8
|
+
import { inputBase, inputContentWrapper, inputSize } from "../shared/input.cva.js";
|
|
9
|
+
import { FormField } from "../FormField/FormField.js";
|
|
10
|
+
import { TooltipWrapper } from "../shared/TooltipWrapper.js";
|
|
11
|
+
import { c } from "react/compiler-runtime";
|
|
12
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { clsx } from "clsx";
|
|
14
|
+
import { isValidElement, useId } from "react";
|
|
15
|
+
//#region src/components/inputs/Skeleton/InputFrame.tsx
|
|
16
|
+
var InputFrame = (props) => {
|
|
17
|
+
const $ = c(189);
|
|
18
|
+
const ui = UIConfig.useConfig();
|
|
19
|
+
const inputBaseCva = UIOverrides.useCva("input.baseCva", inputBase);
|
|
20
|
+
const inputSizeCva = UIOverrides.useCva("input.sizeCva", inputSize);
|
|
21
|
+
const inputContentWrapperCva = UIOverrides.useCva("input.contentWrapperCva", inputContentWrapper);
|
|
22
|
+
const typographyCva = UIOverrides.useCva("typography.cva", typography);
|
|
23
|
+
const generatedInputId = useId();
|
|
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, contentGroup: t1, contentAndTrailingClassName, wrapContentAndTrailing, wrapTrailingContent: t2, reserveTrailingContent, labelPlacement: t3, trailingClassName, onMouseEnter, onFocusCapture, variant: variantProp, as: asProp, size: sizeProp } = props;
|
|
25
|
+
const actionContentPlacement = t0 === void 0 ? "content-wrapper" : t0;
|
|
26
|
+
const contentGroup = t1 === void 0 ? "input" : t1;
|
|
27
|
+
const wrapTrailingContent = t2 === void 0 ? true : t2;
|
|
28
|
+
const labelPlacement = t3 === void 0 ? "content-wrapper" : t3;
|
|
29
|
+
const as = asProp ?? ui.input.as;
|
|
30
|
+
const size = sizeProp ?? ui.input.size;
|
|
31
|
+
const variant = variantProp ?? ui.input.variant;
|
|
32
|
+
const hideLabel = hideLabelProp ?? ui.input.hideLabel;
|
|
33
|
+
const hasClear = !!(isClearableProp ?? ui.input.isClearable);
|
|
34
|
+
let t4;
|
|
35
|
+
if ($[0] !== leadingIcon) {
|
|
36
|
+
t4 = leadingIcon && isValidElement(leadingIcon);
|
|
37
|
+
$[0] = leadingIcon;
|
|
38
|
+
$[1] = t4;
|
|
39
|
+
} else t4 = $[1];
|
|
40
|
+
const isLeadingIconElement = t4;
|
|
41
|
+
let t5;
|
|
42
|
+
if ($[2] !== trailingIcon) {
|
|
43
|
+
t5 = trailingIcon && isValidElement(trailingIcon);
|
|
44
|
+
$[2] = trailingIcon;
|
|
45
|
+
$[3] = t5;
|
|
46
|
+
} else t5 = $[3];
|
|
47
|
+
const isTrailingIconElement = t5;
|
|
48
|
+
const hasTrailingContent = reserveTrailingContent || hasClear || !!trailingContent || !!unit || !!isLoading || !!action || !!trailingIcon || !!trailingAction;
|
|
49
|
+
const isTrailingInteractive = !!action || !!trailingAction || !!isTrailingIconElement || hasClear && !!showClear || !!trailingContent;
|
|
50
|
+
let dataAttributeProps;
|
|
51
|
+
let formFieldProps;
|
|
52
|
+
let isInputContentGroup;
|
|
53
|
+
let labelProps;
|
|
54
|
+
let t10;
|
|
55
|
+
let t11;
|
|
56
|
+
let t12;
|
|
57
|
+
let t13;
|
|
58
|
+
let t14;
|
|
59
|
+
let t15;
|
|
60
|
+
let t6;
|
|
61
|
+
let t7;
|
|
62
|
+
let t8;
|
|
63
|
+
let t9;
|
|
64
|
+
if ($[4] !== actionContent || $[5] !== actionContentPlacement || $[6] !== as || $[7] !== children || $[8] !== className || $[9] !== contentClassName || $[10] !== contentGroup || $[11] !== contentWrapperClassName || $[12] !== dataAttributes || $[13] !== error || $[14] !== errorClassName || $[15] !== generatedInputId || $[16] !== headerClassName || $[17] !== headerProps || $[18] !== helperText || $[19] !== hideLabel || $[20] !== idProp || $[21] !== inputContentWrapperCva || $[22] !== inputSizeCva || $[23] !== isDisabled || $[24] !== isHeaderHidden || $[25] !== isLeadingIconElement || $[26] !== isRequired || $[27] !== label || $[28] !== labelPlacement || $[29] !== labelPropsProp || $[30] !== leadingContent || $[31] !== leadingIcon || $[32] !== rightContent || $[33] !== size || $[34] !== tooltipText || $[35] !== typographyCva || $[36] !== typographySize) {
|
|
65
|
+
dataAttributeProps = getInputFrameDataAttributeProps(dataAttributes);
|
|
66
|
+
const baseLabelProps = headerProps?.labelProps ?? labelPropsProp;
|
|
67
|
+
const inputId = idProp ?? baseLabelProps?.htmlFor ?? `input-frame_${generatedInputId}`;
|
|
68
|
+
let t16;
|
|
69
|
+
if ($[51] !== baseLabelProps || $[52] !== inputId) {
|
|
70
|
+
t16 = {
|
|
71
|
+
...baseLabelProps,
|
|
72
|
+
htmlFor: inputId
|
|
73
|
+
};
|
|
74
|
+
$[51] = baseLabelProps;
|
|
75
|
+
$[52] = inputId;
|
|
76
|
+
$[53] = t16;
|
|
77
|
+
} else t16 = $[53];
|
|
78
|
+
labelProps = t16;
|
|
79
|
+
const t17 = label ?? "";
|
|
80
|
+
const t18 = isHeaderHidden || as === "inline" || as === "filter" || as === "floating";
|
|
81
|
+
let t19;
|
|
82
|
+
if ($[54] !== className || $[55] !== error || $[56] !== errorClassName || $[57] !== headerClassName || $[58] !== helperText || $[59] !== hideLabel || $[60] !== isDisabled || $[61] !== isRequired || $[62] !== rightContent || $[63] !== t17 || $[64] !== t18 || $[65] !== tooltipText) {
|
|
83
|
+
t19 = {
|
|
84
|
+
error,
|
|
85
|
+
label: t17,
|
|
86
|
+
tooltipText,
|
|
87
|
+
helperText,
|
|
88
|
+
isRequired,
|
|
89
|
+
rightContent,
|
|
90
|
+
isHeaderHidden: t18,
|
|
91
|
+
hideLabel,
|
|
92
|
+
isDisabled,
|
|
93
|
+
headerClassName,
|
|
94
|
+
errorClassName,
|
|
95
|
+
className
|
|
96
|
+
};
|
|
97
|
+
$[54] = className;
|
|
98
|
+
$[55] = error;
|
|
99
|
+
$[56] = errorClassName;
|
|
100
|
+
$[57] = headerClassName;
|
|
101
|
+
$[58] = helperText;
|
|
102
|
+
$[59] = hideLabel;
|
|
103
|
+
$[60] = isDisabled;
|
|
104
|
+
$[61] = isRequired;
|
|
105
|
+
$[62] = rightContent;
|
|
106
|
+
$[63] = t17;
|
|
107
|
+
$[64] = t18;
|
|
108
|
+
$[65] = tooltipText;
|
|
109
|
+
$[66] = t19;
|
|
110
|
+
} else t19 = $[66];
|
|
111
|
+
formFieldProps = t19;
|
|
112
|
+
let t20;
|
|
113
|
+
if ($[67] !== headerClassName || $[68] !== headerProps || $[69] !== helperText || $[70] !== hideLabel || $[71] !== isDisabled || $[72] !== isHeaderHidden || $[73] !== isRequired || $[74] !== label || $[75] !== labelProps || $[76] !== rightContent || $[77] !== tooltipText) {
|
|
114
|
+
t20 = headerProps ? {
|
|
115
|
+
...headerProps,
|
|
116
|
+
labelProps
|
|
117
|
+
} : {
|
|
118
|
+
label: label ?? "",
|
|
119
|
+
tooltipText,
|
|
120
|
+
helperText,
|
|
121
|
+
isRequired,
|
|
122
|
+
rightContent,
|
|
123
|
+
isHeaderHidden: hideLabel || isHeaderHidden,
|
|
124
|
+
isDisabled,
|
|
125
|
+
className: headerClassName,
|
|
126
|
+
labelProps
|
|
127
|
+
};
|
|
128
|
+
$[67] = headerClassName;
|
|
129
|
+
$[68] = headerProps;
|
|
130
|
+
$[69] = helperText;
|
|
131
|
+
$[70] = hideLabel;
|
|
132
|
+
$[71] = isDisabled;
|
|
133
|
+
$[72] = isHeaderHidden;
|
|
134
|
+
$[73] = isRequired;
|
|
135
|
+
$[74] = label;
|
|
136
|
+
$[75] = labelProps;
|
|
137
|
+
$[76] = rightContent;
|
|
138
|
+
$[77] = tooltipText;
|
|
139
|
+
$[78] = t20;
|
|
140
|
+
} else t20 = $[78];
|
|
141
|
+
const resolvedHeaderProps = t20;
|
|
142
|
+
let t21;
|
|
143
|
+
if ($[79] !== as) {
|
|
144
|
+
t21 = as && ["filter", "floating"].includes(as);
|
|
145
|
+
$[79] = as;
|
|
146
|
+
$[80] = t21;
|
|
147
|
+
} else t21 = $[80];
|
|
148
|
+
const shouldRenderLabel = t21;
|
|
149
|
+
let t22;
|
|
150
|
+
if ($[81] !== as || $[82] !== resolvedHeaderProps || $[83] !== shouldRenderLabel || $[84] !== size) {
|
|
151
|
+
t22 = shouldRenderLabel ? /* @__PURE__ */ jsx(FormFieldLabel, {
|
|
152
|
+
as,
|
|
153
|
+
size,
|
|
154
|
+
...resolvedHeaderProps
|
|
155
|
+
}) : null;
|
|
156
|
+
$[81] = as;
|
|
157
|
+
$[82] = resolvedHeaderProps;
|
|
158
|
+
$[83] = shouldRenderLabel;
|
|
159
|
+
$[84] = size;
|
|
160
|
+
$[85] = t22;
|
|
161
|
+
} else t22 = $[85];
|
|
162
|
+
const labelContent = t22;
|
|
163
|
+
let t23;
|
|
164
|
+
if ($[86] !== as || $[87] !== contentWrapperClassName || $[88] !== inputContentWrapperCva) {
|
|
165
|
+
t23 = contentWrapperClassName ?? inputContentWrapperCva({ as });
|
|
166
|
+
$[86] = as;
|
|
167
|
+
$[87] = contentWrapperClassName;
|
|
168
|
+
$[88] = inputContentWrapperCva;
|
|
169
|
+
$[89] = t23;
|
|
170
|
+
} else t23 = $[89];
|
|
171
|
+
const resolvedContentWrapperClassName = t23;
|
|
172
|
+
isInputContentGroup = contentGroup === "input";
|
|
173
|
+
t10 = dataAttributeProps;
|
|
174
|
+
const t24 = isInputContentGroup && inputFrameContentGroupClassNames.input;
|
|
175
|
+
if ($[90] !== as || $[91] !== contentClassName || $[92] !== inputSizeCva || $[93] !== size || $[94] !== t24 || $[95] !== typographyCva || $[96] !== typographySize) {
|
|
176
|
+
let t25;
|
|
177
|
+
if ($[98] !== typographyCva || $[99] !== typographySize) {
|
|
178
|
+
t25 = typographySize && typographyCva({ size: typographySize });
|
|
179
|
+
$[98] = typographyCva;
|
|
180
|
+
$[99] = typographySize;
|
|
181
|
+
$[100] = t25;
|
|
182
|
+
} else t25 = $[100];
|
|
183
|
+
t11 = clsx(t24, "group/input-frame flex min-w-0 w-full items-center gap-input-gap-input-text-to-elements", inputSizeCva({
|
|
184
|
+
size,
|
|
185
|
+
as
|
|
186
|
+
}), t25, contentClassName);
|
|
187
|
+
$[90] = as;
|
|
188
|
+
$[91] = contentClassName;
|
|
189
|
+
$[92] = inputSizeCva;
|
|
190
|
+
$[93] = size;
|
|
191
|
+
$[94] = t24;
|
|
192
|
+
$[95] = typographyCva;
|
|
193
|
+
$[96] = typographySize;
|
|
194
|
+
$[97] = t11;
|
|
195
|
+
} else t11 = $[97];
|
|
196
|
+
t12 = leadingContent;
|
|
197
|
+
if ($[101] !== isLeadingIconElement || $[102] !== leadingIcon) {
|
|
198
|
+
t13 = leadingIcon && /* @__PURE__ */ jsx("div", {
|
|
199
|
+
className: clsx(!isLeadingIconElement && "pointer-events-none"),
|
|
200
|
+
children: renderIconVisual(leadingIcon)
|
|
201
|
+
});
|
|
202
|
+
$[101] = isLeadingIconElement;
|
|
203
|
+
$[102] = leadingIcon;
|
|
204
|
+
$[103] = t13;
|
|
205
|
+
} else t13 = $[103];
|
|
206
|
+
t14 = labelPlacement === "content-row" && labelContent;
|
|
207
|
+
t15 = actionContentPlacement === "content-row" && actionContent;
|
|
208
|
+
t6 = resolvedContentWrapperClassName;
|
|
209
|
+
t7 = labelPlacement === "content-wrapper" && labelContent;
|
|
210
|
+
t8 = actionContentPlacement === "content-wrapper" && actionContent;
|
|
211
|
+
t9 = typeof children === "function" ? children({
|
|
212
|
+
...dataAttributeProps,
|
|
213
|
+
id: inputId
|
|
214
|
+
}) : children;
|
|
215
|
+
$[4] = actionContent;
|
|
216
|
+
$[5] = actionContentPlacement;
|
|
217
|
+
$[6] = as;
|
|
218
|
+
$[7] = children;
|
|
219
|
+
$[8] = className;
|
|
220
|
+
$[9] = contentClassName;
|
|
221
|
+
$[10] = contentGroup;
|
|
222
|
+
$[11] = contentWrapperClassName;
|
|
223
|
+
$[12] = dataAttributes;
|
|
224
|
+
$[13] = error;
|
|
225
|
+
$[14] = errorClassName;
|
|
226
|
+
$[15] = generatedInputId;
|
|
227
|
+
$[16] = headerClassName;
|
|
228
|
+
$[17] = headerProps;
|
|
229
|
+
$[18] = helperText;
|
|
230
|
+
$[19] = hideLabel;
|
|
231
|
+
$[20] = idProp;
|
|
232
|
+
$[21] = inputContentWrapperCva;
|
|
233
|
+
$[22] = inputSizeCva;
|
|
234
|
+
$[23] = isDisabled;
|
|
235
|
+
$[24] = isHeaderHidden;
|
|
236
|
+
$[25] = isLeadingIconElement;
|
|
237
|
+
$[26] = isRequired;
|
|
238
|
+
$[27] = label;
|
|
239
|
+
$[28] = labelPlacement;
|
|
240
|
+
$[29] = labelPropsProp;
|
|
241
|
+
$[30] = leadingContent;
|
|
242
|
+
$[31] = leadingIcon;
|
|
243
|
+
$[32] = rightContent;
|
|
244
|
+
$[33] = size;
|
|
245
|
+
$[34] = tooltipText;
|
|
246
|
+
$[35] = typographyCva;
|
|
247
|
+
$[36] = typographySize;
|
|
248
|
+
$[37] = dataAttributeProps;
|
|
249
|
+
$[38] = formFieldProps;
|
|
250
|
+
$[39] = isInputContentGroup;
|
|
251
|
+
$[40] = labelProps;
|
|
252
|
+
$[41] = t10;
|
|
253
|
+
$[42] = t11;
|
|
254
|
+
$[43] = t12;
|
|
255
|
+
$[44] = t13;
|
|
256
|
+
$[45] = t14;
|
|
257
|
+
$[46] = t15;
|
|
258
|
+
$[47] = t6;
|
|
259
|
+
$[48] = t7;
|
|
260
|
+
$[49] = t8;
|
|
261
|
+
$[50] = t9;
|
|
262
|
+
} else {
|
|
263
|
+
dataAttributeProps = $[37];
|
|
264
|
+
formFieldProps = $[38];
|
|
265
|
+
isInputContentGroup = $[39];
|
|
266
|
+
labelProps = $[40];
|
|
267
|
+
t10 = $[41];
|
|
268
|
+
t11 = $[42];
|
|
269
|
+
t12 = $[43];
|
|
270
|
+
t13 = $[44];
|
|
271
|
+
t14 = $[45];
|
|
272
|
+
t15 = $[46];
|
|
273
|
+
t6 = $[47];
|
|
274
|
+
t7 = $[48];
|
|
275
|
+
t8 = $[49];
|
|
276
|
+
t9 = $[50];
|
|
277
|
+
}
|
|
278
|
+
let t16;
|
|
279
|
+
if ($[104] !== t6 || $[105] !== t7 || $[106] !== t8 || $[107] !== t9) {
|
|
280
|
+
t16 = /* @__PURE__ */ jsxs("div", {
|
|
281
|
+
className: t6,
|
|
282
|
+
children: [
|
|
283
|
+
t7,
|
|
284
|
+
t8,
|
|
285
|
+
t9
|
|
286
|
+
]
|
|
287
|
+
});
|
|
288
|
+
$[104] = t6;
|
|
289
|
+
$[105] = t7;
|
|
290
|
+
$[106] = t8;
|
|
291
|
+
$[107] = t9;
|
|
292
|
+
$[108] = t16;
|
|
293
|
+
} else t16 = $[108];
|
|
294
|
+
let t17;
|
|
295
|
+
if ($[109] !== t10 || $[110] !== t11 || $[111] !== t12 || $[112] !== t13 || $[113] !== t14 || $[114] !== t15 || $[115] !== t16) {
|
|
296
|
+
t17 = /* @__PURE__ */ jsxs("div", {
|
|
297
|
+
...t10,
|
|
298
|
+
className: t11,
|
|
299
|
+
children: [
|
|
300
|
+
t12,
|
|
301
|
+
t13,
|
|
302
|
+
t14,
|
|
303
|
+
t15,
|
|
304
|
+
t16
|
|
305
|
+
]
|
|
306
|
+
});
|
|
307
|
+
$[109] = t10;
|
|
308
|
+
$[110] = t11;
|
|
309
|
+
$[111] = t12;
|
|
310
|
+
$[112] = t13;
|
|
311
|
+
$[113] = t14;
|
|
312
|
+
$[114] = t15;
|
|
313
|
+
$[115] = t16;
|
|
314
|
+
$[116] = t17;
|
|
315
|
+
} else t17 = $[116];
|
|
316
|
+
const contentRow = t17;
|
|
317
|
+
let t18;
|
|
318
|
+
if ($[117] !== action || $[118] !== clearClassName || $[119] !== hasClear || $[120] !== hasTrailingContent || $[121] !== isDisabled || $[122] !== isLoading || $[123] !== onClear || $[124] !== renderStatic || $[125] !== showClear || $[126] !== trailingAction || $[127] !== trailingContent || $[128] !== trailingIcon || $[129] !== typographyCva || $[130] !== unit) {
|
|
319
|
+
t18 = hasTrailingContent ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
320
|
+
hasClear && /* @__PURE__ */ jsx(InputClear, {
|
|
321
|
+
onClear: () => onClear?.(),
|
|
322
|
+
className: clearClassName,
|
|
323
|
+
show: !!showClear,
|
|
324
|
+
renderStatic
|
|
325
|
+
}),
|
|
326
|
+
trailingContent,
|
|
327
|
+
unit && /* @__PURE__ */ jsx("span", {
|
|
328
|
+
className: typographyCva({
|
|
329
|
+
size: "label-2",
|
|
330
|
+
sizeMobile: "label-2",
|
|
331
|
+
variant: "prominent-1",
|
|
332
|
+
className: "text-text-default-3"
|
|
333
|
+
}),
|
|
334
|
+
children: unit
|
|
335
|
+
}),
|
|
336
|
+
isLoading && /* @__PURE__ */ jsx("div", {
|
|
337
|
+
className: "inline-flex",
|
|
338
|
+
children: /* @__PURE__ */ jsx(Loader, {})
|
|
339
|
+
}),
|
|
340
|
+
!isLoading && action && /* @__PURE__ */ jsx(InlineIconButton, {
|
|
341
|
+
color: "secondary",
|
|
342
|
+
icon: action.icon,
|
|
343
|
+
isDisabled,
|
|
344
|
+
onPress: action.onClick,
|
|
345
|
+
excludeFromTabOrder: true,
|
|
346
|
+
label: action.altText,
|
|
347
|
+
className: clsx("border-0!", action.className)
|
|
348
|
+
}),
|
|
349
|
+
!isLoading && !action && trailingIcon && renderIconVisual(trailingIcon),
|
|
350
|
+
trailingAction
|
|
351
|
+
] }) : null;
|
|
352
|
+
$[117] = action;
|
|
353
|
+
$[118] = clearClassName;
|
|
354
|
+
$[119] = hasClear;
|
|
355
|
+
$[120] = hasTrailingContent;
|
|
356
|
+
$[121] = isDisabled;
|
|
357
|
+
$[122] = isLoading;
|
|
358
|
+
$[123] = onClear;
|
|
359
|
+
$[124] = renderStatic;
|
|
360
|
+
$[125] = showClear;
|
|
361
|
+
$[126] = trailingAction;
|
|
362
|
+
$[127] = trailingContent;
|
|
363
|
+
$[128] = trailingIcon;
|
|
364
|
+
$[129] = typographyCva;
|
|
365
|
+
$[130] = unit;
|
|
366
|
+
$[131] = t18;
|
|
367
|
+
} else t18 = $[131];
|
|
368
|
+
const trailingContentNodes = t18;
|
|
369
|
+
let t19;
|
|
370
|
+
if ($[132] !== as || $[133] !== inputSizeCva || $[134] !== isDisabled || $[135] !== isTrailingInteractive || $[136] !== size || $[137] !== trailingClassName || $[138] !== trailingContentNodes || $[139] !== wrapTrailingContent) {
|
|
371
|
+
t19 = wrapTrailingContent && trailingContentNodes ? /* @__PURE__ */ jsx("div", {
|
|
372
|
+
className: clsx("flex items-center gap-input-gap-trailing-elements", inputSizeCva({
|
|
373
|
+
size,
|
|
374
|
+
as
|
|
375
|
+
}), !isTrailingInteractive && "pointer-events-none", isDisabled && "text-interactive-text-secondary-disabled", trailingClassName),
|
|
376
|
+
children: trailingContentNodes
|
|
377
|
+
}) : trailingContentNodes;
|
|
378
|
+
$[132] = as;
|
|
379
|
+
$[133] = inputSizeCva;
|
|
380
|
+
$[134] = isDisabled;
|
|
381
|
+
$[135] = isTrailingInteractive;
|
|
382
|
+
$[136] = size;
|
|
383
|
+
$[137] = trailingClassName;
|
|
384
|
+
$[138] = trailingContentNodes;
|
|
385
|
+
$[139] = wrapTrailingContent;
|
|
386
|
+
$[140] = t19;
|
|
387
|
+
} else t19 = $[140];
|
|
388
|
+
const trailingRow = t19;
|
|
389
|
+
let t20;
|
|
390
|
+
if ($[141] !== contentAndTrailingClassName || $[142] !== contentRow || $[143] !== trailingRow || $[144] !== wrapContentAndTrailing) {
|
|
391
|
+
t20 = wrapContentAndTrailing ? /* @__PURE__ */ jsxs("div", {
|
|
392
|
+
className: clsx("flex w-full items-center gap-input-gap-input-text-to-elements", contentAndTrailingClassName),
|
|
393
|
+
children: [contentRow, trailingRow]
|
|
394
|
+
}) : /* @__PURE__ */ jsxs(Fragment, { children: [contentRow, trailingRow] });
|
|
395
|
+
$[141] = contentAndTrailingClassName;
|
|
396
|
+
$[142] = contentRow;
|
|
397
|
+
$[143] = trailingRow;
|
|
398
|
+
$[144] = wrapContentAndTrailing;
|
|
399
|
+
$[145] = t20;
|
|
400
|
+
} else t20 = $[145];
|
|
401
|
+
const inputFrameContent = t20;
|
|
402
|
+
const t21 = as === "inline" ? -1 : void 0;
|
|
403
|
+
const t22 = as === "inline" ? -1 : void 0;
|
|
404
|
+
let t23;
|
|
405
|
+
if ($[146] !== onMouseEnter || $[147] !== onStaticInteract || $[148] !== renderStatic) {
|
|
406
|
+
t23 = (event) => {
|
|
407
|
+
onMouseEnter?.(event);
|
|
408
|
+
if (renderStatic) onStaticInteract?.(false);
|
|
409
|
+
};
|
|
410
|
+
$[146] = onMouseEnter;
|
|
411
|
+
$[147] = onStaticInteract;
|
|
412
|
+
$[148] = renderStatic;
|
|
413
|
+
$[149] = t23;
|
|
414
|
+
} else t23 = $[149];
|
|
415
|
+
let t24;
|
|
416
|
+
if ($[150] !== onFocusCapture || $[151] !== onStaticInteract || $[152] !== renderStatic) {
|
|
417
|
+
t24 = (event_0) => {
|
|
418
|
+
onFocusCapture?.(event_0);
|
|
419
|
+
if (renderStatic) onStaticInteract?.(true);
|
|
420
|
+
};
|
|
421
|
+
$[150] = onFocusCapture;
|
|
422
|
+
$[151] = onStaticInteract;
|
|
423
|
+
$[152] = renderStatic;
|
|
424
|
+
$[153] = t24;
|
|
425
|
+
} else t24 = $[153];
|
|
426
|
+
const t25 = !isInputContentGroup && inputFrameContentGroupClassNames[contentGroup];
|
|
427
|
+
let t26;
|
|
428
|
+
if ($[154] !== as || $[155] !== inputBaseCva || $[156] !== inputClassName || $[157] !== t25 || $[158] !== variant) {
|
|
429
|
+
t26 = clsx("relative flex cursor-text has-disabled:cursor-default", t25, inputBaseCva({
|
|
430
|
+
variant,
|
|
431
|
+
as
|
|
432
|
+
}), inputClassName);
|
|
433
|
+
$[154] = as;
|
|
434
|
+
$[155] = inputBaseCva;
|
|
435
|
+
$[156] = inputClassName;
|
|
436
|
+
$[157] = t25;
|
|
437
|
+
$[158] = variant;
|
|
438
|
+
$[159] = t26;
|
|
439
|
+
} else t26 = $[159];
|
|
440
|
+
const t27 = renderStatic ? isDisabled ? -1 : 0 : void 0;
|
|
441
|
+
let t28;
|
|
442
|
+
let t29;
|
|
443
|
+
let t30;
|
|
444
|
+
if ($[160] !== onStaticInteract || $[161] !== renderStatic) {
|
|
445
|
+
t28 = () => {
|
|
446
|
+
if (renderStatic) onStaticInteract?.(true);
|
|
447
|
+
};
|
|
448
|
+
t29 = () => {
|
|
449
|
+
if (renderStatic) onStaticInteract?.(true);
|
|
450
|
+
};
|
|
451
|
+
t30 = () => {
|
|
452
|
+
if (renderStatic) onStaticInteract?.(true);
|
|
453
|
+
};
|
|
454
|
+
$[160] = onStaticInteract;
|
|
455
|
+
$[161] = renderStatic;
|
|
456
|
+
$[162] = t28;
|
|
457
|
+
$[163] = t29;
|
|
458
|
+
$[164] = t30;
|
|
459
|
+
} else {
|
|
460
|
+
t28 = $[162];
|
|
461
|
+
t29 = $[163];
|
|
462
|
+
t30 = $[164];
|
|
463
|
+
}
|
|
464
|
+
let t31;
|
|
465
|
+
if ($[165] !== dataAttributeProps || $[166] !== inputFrameContent || $[167] !== ref || $[168] !== t26 || $[169] !== t27 || $[170] !== t28 || $[171] !== t29 || $[172] !== t30) {
|
|
466
|
+
t31 = /* @__PURE__ */ jsx("div", {
|
|
467
|
+
ref,
|
|
468
|
+
...dataAttributeProps,
|
|
469
|
+
className: t26,
|
|
470
|
+
tabIndex: t27,
|
|
471
|
+
onFocus: t28,
|
|
472
|
+
onClick: t29,
|
|
473
|
+
onPointerDown: t30,
|
|
474
|
+
"data-rac": "",
|
|
475
|
+
children: inputFrameContent
|
|
476
|
+
});
|
|
477
|
+
$[165] = dataAttributeProps;
|
|
478
|
+
$[166] = inputFrameContent;
|
|
479
|
+
$[167] = ref;
|
|
480
|
+
$[168] = t26;
|
|
481
|
+
$[169] = t27;
|
|
482
|
+
$[170] = t28;
|
|
483
|
+
$[171] = t29;
|
|
484
|
+
$[172] = t30;
|
|
485
|
+
$[173] = t31;
|
|
486
|
+
} else t31 = $[173];
|
|
487
|
+
let t32;
|
|
488
|
+
if ($[174] !== as || $[175] !== dataAttributeProps || $[176] !== formFieldProps || $[177] !== formFieldRef || $[178] !== labelProps || $[179] !== t22 || $[180] !== t23 || $[181] !== t24 || $[182] !== t31) {
|
|
489
|
+
t32 = /* @__PURE__ */ jsx(FormField, {
|
|
490
|
+
...formFieldProps,
|
|
491
|
+
...dataAttributeProps,
|
|
492
|
+
ref: formFieldRef,
|
|
493
|
+
as,
|
|
494
|
+
labelProps,
|
|
495
|
+
tabIndex: t22,
|
|
496
|
+
onMouseEnter: t23,
|
|
497
|
+
onFocusCapture: t24,
|
|
498
|
+
children: t31
|
|
499
|
+
});
|
|
500
|
+
$[174] = as;
|
|
501
|
+
$[175] = dataAttributeProps;
|
|
502
|
+
$[176] = formFieldProps;
|
|
503
|
+
$[177] = formFieldRef;
|
|
504
|
+
$[178] = labelProps;
|
|
505
|
+
$[179] = t22;
|
|
506
|
+
$[180] = t23;
|
|
507
|
+
$[181] = t24;
|
|
508
|
+
$[182] = t31;
|
|
509
|
+
$[183] = t32;
|
|
510
|
+
} else t32 = $[183];
|
|
511
|
+
let t33;
|
|
512
|
+
if ($[184] !== as || $[185] !== error || $[186] !== t21 || $[187] !== t32) {
|
|
513
|
+
t33 = /* @__PURE__ */ jsx(TooltipWrapper, {
|
|
514
|
+
as,
|
|
515
|
+
error,
|
|
516
|
+
triggerTabIndex: t21,
|
|
517
|
+
children: t32
|
|
518
|
+
});
|
|
519
|
+
$[184] = as;
|
|
520
|
+
$[185] = error;
|
|
521
|
+
$[186] = t21;
|
|
522
|
+
$[187] = t32;
|
|
523
|
+
$[188] = t33;
|
|
524
|
+
} else t33 = $[188];
|
|
525
|
+
return t33;
|
|
526
|
+
};
|
|
527
|
+
var inputFrameContentGroupClassNames = {
|
|
528
|
+
"date-picker": "group/date-picker-content",
|
|
529
|
+
input: "group/input-content",
|
|
530
|
+
select: "group/select-content"
|
|
531
|
+
};
|
|
532
|
+
var renderIconVisual = (icon) => {
|
|
533
|
+
if (isValidElement(icon)) return icon;
|
|
534
|
+
return /* @__PURE__ */ jsx(icon, { className: "size-6 text-interactive-text-secondary-idle" });
|
|
535
|
+
};
|
|
536
|
+
var getInputFrameDataAttributeProps = (dataAttributes) => ({
|
|
537
|
+
"data-is-empty": dataAttributes?.dataIsEmpty || void 0,
|
|
538
|
+
"data-is-filled": dataAttributes?.dataIsFilled || void 0,
|
|
539
|
+
"data-is-dirty": dataAttributes?.dataIsDirty || void 0,
|
|
540
|
+
"data-is-required": dataAttributes?.dataIsRequired || void 0,
|
|
541
|
+
"data-is-disabled": dataAttributes?.dataIsDisabled || void 0,
|
|
542
|
+
"data-disabled": dataAttributes?.dataDisabled || void 0,
|
|
543
|
+
"data-has-search": dataAttributes?.dataHasSearch || void 0,
|
|
544
|
+
"data-invalid": dataAttributes?.dataInvalid || void 0,
|
|
545
|
+
"data-has-selection": dataAttributes?.dataHasSelection || void 0
|
|
546
|
+
});
|
|
547
|
+
//#endregion
|
|
548
|
+
export { InputFrame };
|
|
@@ -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>;
|