@povio/ui 3.4.0-rc.14 → 3.4.0-rc.16
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/README.md +1 -1
- package/dist/assets/locales/en/{translation.json.js → translation.js} +1 -0
- package/dist/assets/locales/sl/{translation.json.js → translation.js} +1 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +17 -14
- package/dist/components/Breadcrumbs/Breadcrumbs.js +206 -55
- package/dist/components/Breadcrumbs/breadcrumbs.cva.d.ts +39 -40
- package/dist/components/Breadcrumbs/breadcrumbs.cva.js +5 -5
- package/dist/components/Menu/Menu.d.ts +20 -18
- package/dist/components/Menu/Menu.js +1 -1
- package/dist/components/Menu/MenuDesktop.js +2 -2
- package/dist/components/Menu/MenuItem.d.ts +6 -3
- package/dist/components/Menu/MenuItem.js +2 -2
- package/dist/components/Menu/MenuMobile.js +2 -2
- package/dist/components/Menu/MenuPopover.d.ts +7 -5
- package/dist/components/Menu/MenuPopover.js +2 -2
- package/dist/components/Menu/menu.cva.d.ts +35 -35
- package/dist/components/Menu/menu.cva.js +4 -4
- package/dist/components/buttons/Button/Button.d.ts +25 -23
- package/dist/components/buttons/Button/Button.js +1 -1
- package/dist/components/buttons/Button/button.cva.d.ts +89 -95
- package/dist/components/buttons/Button/button.cva.js +8 -44
- package/dist/components/buttons/IconButton/IconButton.d.ts +13 -10
- package/dist/components/buttons/IconButton/IconButton.js +1 -1
- package/dist/components/buttons/InlineIconButton/InlineIconButton.d.ts +15 -12
- package/dist/components/buttons/InlineIconButton/InlineIconButton.js +34 -9
- package/dist/components/buttons/PillButton/PillButton.d.ts +14 -11
- package/dist/components/buttons/PillButton/PillButton.js +2 -2
- package/dist/components/buttons/PillButton/pillButton.cva.d.ts +33 -38
- package/dist/components/buttons/PillButton/pillButton.cva.js +5 -5
- package/dist/components/buttons/SplitButton/SplitButton.d.ts +14 -11
- package/dist/components/buttons/SplitButton/SplitButton.js +2 -2
- package/dist/components/buttons/TextButton/TextButton.d.ts +14 -11
- package/dist/components/buttons/TextButton/TextButton.js +1 -1
- package/dist/components/buttons/ToggleButton/ToggleButton.d.ts +11 -8
- package/dist/components/buttons/ToggleButton/ToggleButton.js +1 -1
- package/dist/components/buttons/shared/ButtonContent.js +80 -22
- package/dist/components/buttons/shared/buttonContent.cva.d.ts +6 -8
- package/dist/components/buttons/shared/buttonContent.cva.js +1 -1
- package/dist/components/inputs/Checkbox/Checkbox.d.ts +22 -19
- package/dist/components/inputs/Checkbox/Checkbox.js +45 -201
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +1 -1
- package/dist/components/inputs/Checkbox/CheckboxGroup.d.ts +27 -25
- package/dist/components/inputs/Checkbox/CheckboxGroup.js +126 -355
- package/dist/components/inputs/Checkbox/checkbox.cva.d.ts +73 -89
- package/dist/components/inputs/Checkbox/checkbox.cva.js +8 -8
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +40 -37
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +44 -35
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +46 -43
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +172 -168
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +41 -38
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +21 -18
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +29 -26
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +166 -541
- package/dist/components/inputs/DateTime/shared/Calendar.js +17 -14
- package/dist/components/inputs/DateTime/shared/CalendarCell.js +17 -17
- package/dist/components/inputs/DateTime/shared/CalendarGrid.js +5 -4
- package/dist/components/inputs/DateTime/shared/CalendarHeader.js +8 -7
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +43 -43
- package/dist/components/inputs/DateTime/shared/DateField.js +19 -20
- package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +11 -45
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +1 -1
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +26 -102
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +28 -83
- package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +2 -2
- package/dist/components/inputs/DateTime/shared/MonthPicker.js +58 -103
- package/dist/components/inputs/DateTime/shared/RangeCalendar.js +82 -193
- package/dist/components/inputs/DateTime/shared/TimeField.js +8 -27
- package/dist/components/inputs/DateTime/shared/TimePickerForm.js +111 -281
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +71 -214
- package/dist/components/inputs/DateTime/shared/YearPicker.js +68 -119
- package/dist/components/inputs/DateTime/shared/datePicker.types.d.ts +8 -5
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.d.ts +16 -15
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.js +1 -1
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.js +11 -50
- package/dist/components/inputs/DateTime/shared/datePickerValue.utils.js +4 -0
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.js +12 -11
- package/dist/components/inputs/DateTime/shared/useFirefoxDateSegmentSelectionGuard.js +12 -26
- package/dist/components/inputs/File/FileUpload.d.ts +7 -4
- package/dist/components/inputs/File/FileUpload.js +49 -88
- package/dist/components/inputs/File/FileUploadContainer.d.ts +5 -3
- package/dist/components/inputs/File/FileUploadContainer.js +10 -17
- package/dist/components/inputs/File/InputUpload.d.ts +7 -4
- package/dist/components/inputs/File/InputUpload.js +26 -65
- package/dist/components/inputs/File/fileUpload.types.d.ts +87 -84
- package/dist/components/inputs/File/inputUpload.types.d.ts +34 -32
- package/dist/components/inputs/File/inputUpload.types.js +1 -1
- package/dist/components/inputs/File/shared/FileCard.js +47 -110
- package/dist/components/inputs/File/shared/FileCardList.js +16 -54
- package/dist/components/inputs/File/shared/FileUploadContent.js +47 -188
- package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +1 -1
- package/dist/components/inputs/File/shared/FileUploadContentError.js +3 -3
- package/dist/components/inputs/File/shared/FileUploadContentFilled.js +3 -3
- package/dist/components/inputs/File/shared/FileUploadContentLoading.js +1 -1
- package/dist/components/inputs/File/shared/InputUploadContent.js +36 -149
- package/dist/components/inputs/File/shared/InputUploadFilled.js +8 -48
- package/dist/components/inputs/File/shared/ProgressBar.d.ts +6 -4
- package/dist/components/inputs/File/shared/ProgressBar.js +1 -1
- package/dist/components/inputs/File/shared/fileUpload.cva.d.ts +17 -16
- package/dist/components/inputs/File/shared/fileUpload.cva.js +1 -1
- package/dist/components/inputs/File/shared/inputUploadButton.cva.d.ts +24 -25
- package/dist/components/inputs/File/shared/inputUploadButton.cva.js +5 -5
- package/dist/components/inputs/File/shared/progressBar.cva.d.ts +34 -33
- package/dist/components/inputs/File/shared/progressBar.cva.js +5 -5
- package/dist/components/inputs/FormField/FormField.d.ts +21 -17
- package/dist/components/inputs/FormField/FormField.js +39 -119
- package/dist/components/inputs/FormField/FormFieldError.d.ts +9 -6
- package/dist/components/inputs/FormField/FormFieldError.js +6 -24
- package/dist/components/inputs/FormField/FormFieldHeader.d.ts +15 -13
- package/dist/components/inputs/FormField/FormFieldHeader.js +22 -78
- package/dist/components/inputs/FormField/FormFieldHeaderClose.js +7 -31
- package/dist/components/inputs/FormField/FormFieldHelper.js +7 -25
- package/dist/components/inputs/FormField/FormFieldLabel.js +9 -40
- package/dist/components/inputs/FormField/formFieldError.cva.d.ts +13 -12
- package/dist/components/inputs/FormField/formFieldError.cva.js +1 -1
- package/dist/components/inputs/FormField/formFieldHeader.cva.d.ts +13 -12
- package/dist/components/inputs/FormField/formFieldHeader.cva.js +1 -1
- package/dist/components/inputs/FormField/formFieldHelper.cva.d.ts +13 -12
- package/dist/components/inputs/FormField/formFieldHelper.cva.js +1 -1
- package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +25 -21
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +145 -394
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.d.ts +11 -45
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +120 -553
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +37 -34
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +93 -164
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.d.ts +10 -7
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +12 -50
- package/dist/components/inputs/Input/TextArea/TextArea.cva.d.ts +8 -7
- package/dist/components/inputs/Input/TextArea/TextArea.cva.js +1 -1
- package/dist/components/inputs/Input/TextArea/TextArea.d.ts +20 -18
- package/dist/components/inputs/Input/TextArea/TextArea.js +96 -304
- package/dist/components/inputs/Input/TextInput/TextInput.d.ts +24 -20
- package/dist/components/inputs/Input/TextInput/TextInput.js +151 -380
- package/dist/components/inputs/Input/shared/InputContent.d.ts +25 -27
- package/dist/components/inputs/Input/shared/InputContent.js +59 -193
- package/dist/components/inputs/Input/shared/numberStatic.utils.js +1 -1
- package/dist/components/inputs/Inputs/Form.d.ts +19 -19
- package/dist/components/inputs/Inputs/Form.js +23 -51
- package/dist/components/inputs/Inputs/InputItem.d.ts +77 -58
- package/dist/components/inputs/Inputs/InputItem.js +16 -65
- package/dist/components/inputs/Inputs/Inputs.d.ts +12 -9
- package/dist/components/inputs/Inputs/Inputs.js +11 -37
- package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +23 -21
- package/dist/components/inputs/RadioGroup/RadioGroup.js +114 -320
- package/dist/components/inputs/RadioGroup/radio.cva.d.ts +49 -59
- package/dist/components/inputs/RadioGroup/radio.cva.js +6 -6
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +15 -11
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +25 -55
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +8 -4
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +46 -117
- package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +25 -38
- package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +18 -14
- package/dist/components/inputs/Selection/Select/QuerySelect.js +58 -115
- package/dist/components/inputs/Selection/Select/Select.d.ts +15 -11
- package/dist/components/inputs/Selection/Select/Select.js +35 -111
- package/dist/components/inputs/Selection/shared/SelectBase.d.ts +39 -37
- package/dist/components/inputs/Selection/shared/SelectBase.js +26 -70
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +144 -392
- package/dist/components/inputs/Selection/shared/SelectInput.js +161 -428
- package/dist/components/inputs/Selection/shared/SelectInputTags.js +26 -100
- package/dist/components/inputs/Selection/shared/SelectListBox.js +1 -1
- package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +35 -85
- package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +16 -69
- package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +23 -71
- package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +9 -58
- package/dist/components/inputs/Selection/shared/SelectMobile.js +1 -1
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +14 -39
- package/dist/components/inputs/Selection/shared/querySelect.utils.d.ts +8 -15
- package/dist/components/inputs/Selection/shared/querySelect.utils.js +6 -6
- package/dist/components/inputs/Selection/shared/select.context.js +52 -52
- package/dist/components/inputs/Selection/shared/select.types.d.ts +60 -62
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.d.ts +8 -5
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.js +1 -1
- package/dist/components/inputs/Selection/shared/selectInput.cva.d.ts +12 -11
- package/dist/components/inputs/Selection/shared/selectInput.cva.js +1 -1
- package/dist/components/inputs/Selection/shared/selectItem.cva.d.ts +16 -15
- package/dist/components/inputs/Selection/shared/selectItem.cva.js +1 -1
- package/dist/components/inputs/Selection/shared/staticSelect.utils.js +3 -3
- package/dist/components/inputs/Selection/shared/useSelectItems.js +12 -12
- package/dist/components/inputs/Skeleton/InputFrame.js +27 -27
- package/dist/components/inputs/Slider/Slider.d.ts +20 -17
- package/dist/components/inputs/Slider/Slider.js +86 -268
- package/dist/components/inputs/TextEditor/TextEditor.d.ts +24 -20
- package/dist/components/inputs/TextEditor/TextEditor.js +21 -62
- package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +11 -37
- package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +30 -102
- package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +45 -194
- package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +28 -88
- package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +14 -48
- package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.js +19 -66
- package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +15 -49
- package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +32 -92
- package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +54 -126
- package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +38 -141
- package/dist/components/inputs/TextEditor/textEditor.types.js +1 -1
- package/dist/components/inputs/Toggle/Toggle.d.ts +18 -15
- package/dist/components/inputs/Toggle/Toggle.js +50 -210
- package/dist/components/inputs/Toggle/toggle.cva.d.ts +15 -18
- package/dist/components/inputs/Toggle/toggle.cva.js +3 -3
- package/dist/components/inputs/shared/CheckContent.js +11 -21
- package/dist/components/inputs/shared/InputClear.js +30 -102
- package/dist/components/inputs/shared/TooltipWrapper.js +13 -48
- package/dist/components/inputs/shared/form.binding.d.ts +7 -27
- package/dist/components/inputs/shared/form.binding.js +8 -37
- package/dist/components/inputs/shared/form.types.d.ts +11 -11
- package/dist/components/inputs/shared/form.types.js +1 -1
- package/dist/components/inputs/shared/input.cva.d.ts +76 -85
- package/dist/components/inputs/shared/input.cva.js +9 -19
- package/dist/components/inputs/shared/label.cva.d.ts +18 -18
- package/dist/components/inputs/shared/label.cva.js +2 -2
- package/dist/components/inputs/shared/tooltipWrapper.cva.d.ts +10 -7
- package/dist/components/inputs/shared/tooltipWrapper.cva.js +1 -1
- package/dist/components/inputs/shared/useFieldAccessibility.js +19 -0
- package/dist/components/inputs/shared/useStaticInputHandoff.js +50 -105
- package/dist/components/navigation/Accordion/Accordion.d.ts +5 -3
- package/dist/components/navigation/Accordion/Accordion.js +69 -22
- package/dist/components/navigation/Accordion/AccordionItem.js +86 -41
- package/dist/components/navigation/Accordion/accordion.cva.d.ts +76 -100
- package/dist/components/navigation/Accordion/accordion.cva.js +10 -10
- package/dist/components/navigation/Accordion/accordion.types.d.ts +52 -49
- package/dist/components/navigation/Stepper/Stepper.d.ts +5 -2
- package/dist/components/navigation/Stepper/Stepper.js +67 -22
- package/dist/components/navigation/Stepper/StepperItem.js +2 -2
- package/dist/components/navigation/Stepper/StepperSeparator.js +1 -1
- package/dist/components/navigation/Stepper/stepper.cva.d.ts +73 -86
- package/dist/components/navigation/Stepper/stepper.cva.js +7 -7
- package/dist/components/navigation/Stepper/stepper.types.d.ts +29 -37
- package/dist/components/outline.clsx.d.ts +4 -2
- package/dist/components/outline.clsx.js +2 -2
- package/dist/components/overlays/ActionModal/ActionModal.d.ts +23 -21
- package/dist/components/overlays/ActionModal/ActionModal.js +170 -36
- package/dist/components/overlays/BottomSheet/BottomSheet.d.ts +30 -28
- package/dist/components/overlays/BottomSheet/BottomSheet.js +13 -10
- package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +2 -2
- package/dist/components/overlays/Drawer/Drawer.d.ts +17 -14
- package/dist/components/overlays/Drawer/Drawer.js +3 -3
- package/dist/components/overlays/Modal/Modal.d.ts +18 -14
- package/dist/components/overlays/Modal/Modal.js +3 -1
- package/dist/components/overlays/Modal/modal.cva.d.ts +34 -34
- package/dist/components/overlays/Modal/modal.cva.js +4 -4
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.d.ts +16 -14
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +110 -29
- package/dist/components/overlays/Tooltip/Tooltip.d.ts +15 -12
- package/dist/components/overlays/Tooltip/Tooltip.js +3 -3
- package/dist/components/overlays/Tooltip/TooltipEllipsis.d.ts +10 -7
- package/dist/components/overlays/Tooltip/TooltipEllipsis.js +2 -2
- package/dist/components/overlays/Tooltip/tooltip.cva.d.ts +39 -45
- package/dist/components/overlays/Tooltip/tooltip.cva.js +4 -4
- package/dist/components/segment/Segment.d.ts +7 -4
- package/dist/components/segment/Segment.js +3 -3
- package/dist/components/segment/SegmentItem.js +2 -2
- package/dist/components/segment/segment.cva.d.ts +20 -18
- package/dist/components/segment/segment.cva.js +2 -2
- package/dist/components/segment/segment.types.d.ts +33 -30
- package/dist/components/shared/pagination/Pagination.d.ts +11 -8
- package/dist/components/shared/pagination/Pagination.js +108 -22
- package/dist/components/shared/pagination/PaginationList.d.ts +17 -14
- package/dist/components/shared/pagination/PaginationList.js +2 -2
- package/dist/components/shared/pagination/minWidth.cva.js +1 -1
- package/dist/components/shared/popover.cva.d.ts +8 -7
- package/dist/components/shared/popover.cva.js +1 -1
- package/dist/components/status/Alert/Alert.d.ts +13 -10
- package/dist/components/status/Alert/Alert.js +97 -30
- package/dist/components/status/Alert/alert.cva.d.ts +21 -18
- package/dist/components/status/Alert/alert.cva.js +1 -1
- package/dist/components/status/Loader/Loader.d.ts +7 -5
- package/dist/components/status/Loader/Loader.js +1 -1
- package/dist/components/status/Loader/loader.cva.d.ts +23 -26
- package/dist/components/status/Loader/loader.cva.js +4 -4
- package/dist/components/status/Toast/Toast.d.ts +15 -12
- package/dist/components/status/Toast/Toast.js +2 -2
- package/dist/components/status/Toast/toast.cva.d.ts +58 -77
- package/dist/components/status/Toast/toast.cva.js +6 -6
- package/dist/components/status/Toast/useToast.d.ts +14 -11
- package/dist/components/status/Toast/useToast.js +1 -1
- package/dist/components/status/shared/status.cva.d.ts +32 -28
- package/dist/components/status/shared/status.cva.js +2 -2
- package/dist/components/table/CellText.d.ts +10 -7
- package/dist/components/table/CellText.js +3 -2
- package/dist/components/table/ColumnConfig.d.ts +12 -9
- package/dist/components/table/ColumnConfig.js +6 -5
- package/dist/components/table/HeaderText.d.ts +10 -7
- package/dist/components/table/HeaderText.js +3 -2
- package/dist/components/table/InfiniteTable.d.ts +10 -8
- package/dist/components/table/InfiniteTable.js +67 -16
- package/dist/components/table/PaginatedTable.d.ts +12 -10
- package/dist/components/table/PaginatedTable.js +1 -1
- package/dist/components/table/Table.d.ts +34 -35
- package/dist/components/table/Table.js +18 -16
- package/dist/components/table/table.cva.d.ts +40 -59
- package/dist/components/table/table.cva.js +7 -7
- package/dist/components/text/Link/Link.d.ts +10 -8
- package/dist/components/text/Link/Link.js +2 -2
- package/dist/components/text/Link/link.cva.d.ts +14 -11
- package/dist/components/text/Link/link.cva.js +1 -1
- package/dist/components/text/Pill/Pill.d.ts +17 -14
- package/dist/components/text/Pill/Pill.js +1 -1
- package/dist/components/text/Tag/Tag.d.ts +17 -14
- package/dist/components/text/Tag/Tag.js +1 -1
- package/dist/components/text/Tag/tag.cva.d.ts +18 -15
- package/dist/components/text/Tag/tag.cva.js +1 -1
- package/dist/components/text/Typography/Typography.d.ts +10 -9
- package/dist/components/text/Typography/Typography.js +23 -8
- package/dist/components/text/Typography/typography.cva.d.ts +51 -48
- package/dist/components/text/Typography/typography.cva.js +1 -1
- package/dist/config/confirmation.context.d.ts +22 -19
- package/dist/config/confirmation.context.js +2 -2
- package/dist/config/i18n.d.ts +311 -308
- package/dist/config/i18n.js +4 -4
- package/dist/config/link.context.d.ts +9 -7
- package/dist/config/link.context.js +2 -2
- package/dist/config/router.context.d.ts +11 -9
- package/dist/config/router.context.js +2 -2
- package/dist/config/theme.context.d.ts +19 -16
- package/dist/config/theme.context.js +99 -46
- package/dist/config/uiConfig.context.d.ts +80 -75
- package/dist/config/uiConfig.context.js +46 -9
- package/dist/config/uiOverrides.context.d.ts +205 -204
- package/dist/config/uiOverrides.context.js +2 -2
- package/dist/helpers/dynamicColumns.d.ts +27 -28
- package/dist/helpers/dynamicColumns.js +32 -31
- package/dist/helpers/dynamicInputs.d.ts +66 -74
- package/dist/helpers/dynamicInputs.js +21 -20
- package/dist/hooks/useAutosave.d.ts +12 -9
- package/dist/hooks/useAutosave.js +1 -1
- package/dist/hooks/useBreakpoint.d.ts +4 -2
- package/dist/hooks/useBreakpoint.js +37 -10
- package/dist/hooks/useDebounceCallback.d.ts +7 -4
- package/dist/hooks/useDebounceCallback.js +51 -17
- package/dist/hooks/useDeepCompare.d.ts +7 -4
- package/dist/hooks/useDeepCompare.js +4 -4
- package/dist/hooks/useFilters.d.ts +10 -7
- package/dist/hooks/useFilters.js +8 -6
- package/dist/hooks/useForm.d.ts +35 -35
- package/dist/hooks/useForm.js +6 -6
- package/dist/hooks/useFormAutosave.d.ts +16 -13
- package/dist/hooks/useFormAutosave.js +18 -17
- package/dist/hooks/useIntersectionObserver.d.ts +7 -5
- package/dist/hooks/useIntersectionObserver.js +2 -2
- package/dist/hooks/useKeyInteractions.d.ts +19 -16
- package/dist/hooks/useKeyInteractions.js +5 -5
- package/dist/hooks/useLocalStorage.d.ts +10 -8
- package/dist/hooks/useLocalStorage.js +3 -3
- package/dist/hooks/useLongPressRepeat.d.ts +10 -7
- package/dist/hooks/useLongPressRepeat.js +55 -20
- package/dist/hooks/usePagination.d.ts +9 -6
- package/dist/hooks/usePagination.js +2 -2
- package/dist/hooks/useQueryAutocomplete.js +2 -2
- package/dist/hooks/useScrollableListBox.d.ts +5 -2
- package/dist/hooks/useScrollableListBox.js +1 -1
- package/dist/hooks/useSorting.d.ts +8 -5
- package/dist/hooks/useSorting.js +1 -1
- package/dist/hooks/useStateAndRef.d.ts +5 -3
- package/dist/hooks/useStateAndRef.js +2 -2
- package/dist/hooks/useTableColumnConfig.d.ts +15 -13
- package/dist/hooks/useTableColumnConfig.js +1 -1
- package/dist/hooks/useTableNav.d.ts +79 -77
- package/dist/hooks/useTableNav.js +19 -37
- package/dist/hooks/useTranslationMemo.d.ts +5 -3
- package/dist/index.d.ts +145 -1
- package/dist/index.js +3 -3
- package/dist/rhf/Inputs.d.ts +55 -54
- package/dist/rhf/Inputs.js +62 -17
- package/dist/rhf/components.d.ts +77 -75
- package/dist/rhf/components.js +27 -27
- package/dist/rhf/dynamicInputs.d.ts +16 -14
- package/dist/rhf/dynamicInputs.js +1 -1
- package/dist/rhf/fieldAdapter.d.ts +8 -6
- package/dist/rhf/form.types.d.ts +11 -10
- package/dist/rhf/useAutosave.d.ts +12 -9
- package/dist/rhf/useForm.d.ts +13 -13
- package/dist/rhf/useFormAutosave.d.ts +17 -14
- package/dist/rhf/useFormAutosave.js +121 -34
- package/dist/rhf.d.ts +146 -225
- package/dist/rhf.js +120 -0
- package/dist/tanstack.d.ts +151 -224
- package/dist/tanstack.js +3 -3
- package/dist/text-editor.d.ts +2 -2
- package/dist/tw-ui-plugin.d.ts +4 -2
- package/dist/tw-ui-plugin.js +1 -1
- package/dist/types/common.d.ts +11 -12
- package/dist/types/error-handling.d.ts +8 -5
- package/dist/utils/array.utils.d.ts +5 -2
- package/dist/utils/array.utils.js +1 -1
- package/dist/utils/compoundMapper.d.ts +12 -14
- package/dist/utils/compoundMapper.js +1 -1
- package/dist/utils/date-time.utils.d.ts +44 -41
- package/dist/utils/date-time.utils.js +7 -9
- package/dist/utils/date.utils.d.ts +6 -4
- package/dist/utils/date.utils.js +29 -6
- package/dist/utils/dom.utils.d.ts +7 -4
- package/dist/utils/dom.utils.js +2 -2
- package/dist/utils/file.utils.d.ts +20 -12
- package/dist/utils/file.utils.js +19 -8
- package/dist/utils/intl.utils.d.ts +7 -5
- package/dist/utils/intl.utils.js +2 -2
- package/dist/utils/isEqual.d.ts +4 -1
- package/dist/utils/isEqual.js +3 -3
- package/dist/utils/logger.d.ts +9 -6
- package/dist/utils/logger.js +1 -1
- package/dist/utils/object.utils.d.ts +12 -9
- package/dist/utils/object.utils.js +1 -1
- package/dist/utils/queries.utils.d.ts +6 -3
- package/dist/utils/queries.utils.js +1 -1
- package/dist/utils/query.utils.js +1 -1
- package/dist/utils/routing.utils.d.ts +6 -3
- package/dist/utils/routing.utils.js +1 -1
- package/dist/utils/string.utils.d.ts +6 -3
- package/dist/utils/string.utils.js +1 -1
- package/dist/utils/style-merge.util.d.ts +38 -41
- package/dist/utils/style-merge.util.js +7 -4
- package/dist/utils/zod.utils.d.ts +22 -19
- package/dist/utils/zod.utils.js +1 -1
- package/package.json +30 -8
- package/dist/assets/locales/en/translation.json.d.ts +0 -158
- package/dist/assets/locales/sl/translation.json.d.ts +0 -154
- package/dist/components/Menu/MenuDesktop.d.ts +0 -2
- package/dist/components/Menu/MenuMobile.d.ts +0 -2
- package/dist/components/buttons/shared/ButtonContent.d.ts +0 -14
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.d.ts +0 -9
- package/dist/components/inputs/DateTime/shared/Calendar.d.ts +0 -29
- package/dist/components/inputs/DateTime/shared/CalendarCell.d.ts +0 -22
- package/dist/components/inputs/DateTime/shared/CalendarGrid.d.ts +0 -27
- package/dist/components/inputs/DateTime/shared/CalendarHeader.d.ts +0 -18
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.d.ts +0 -17
- package/dist/components/inputs/DateTime/shared/DateField.d.ts +0 -21
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.d.ts +0 -28
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.d.ts +0 -18
- package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.d.ts +0 -8
- package/dist/components/inputs/DateTime/shared/MonthPicker.d.ts +0 -11
- package/dist/components/inputs/DateTime/shared/RangeCalendar.d.ts +0 -26
- package/dist/components/inputs/DateTime/shared/TimeField.d.ts +0 -12
- package/dist/components/inputs/DateTime/shared/TimePickerForm.d.ts +0 -10
- package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +0 -25
- package/dist/components/inputs/DateTime/shared/YearPicker.d.ts +0 -12
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.d.ts +0 -15
- package/dist/components/inputs/DateTime/shared/dateSegment.utils.d.ts +0 -2
- package/dist/components/inputs/DateTime/shared/dateSegment.utils.spec.d.ts +0 -1
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.d.ts +0 -41
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.spec.d.ts +0 -1
- package/dist/components/inputs/DateTime/shared/useFirefoxDateSegmentSelectionGuard.d.ts +0 -2
- package/dist/components/inputs/File/index.d.ts +0 -9
- package/dist/components/inputs/File/shared/FileCard.d.ts +0 -9
- package/dist/components/inputs/File/shared/FileCardList.d.ts +0 -9
- package/dist/components/inputs/File/shared/FileUploadContent.d.ts +0 -10
- package/dist/components/inputs/File/shared/FileUploadContentEmpty.d.ts +0 -9
- package/dist/components/inputs/File/shared/FileUploadContentError.d.ts +0 -11
- package/dist/components/inputs/File/shared/FileUploadContentFilled.d.ts +0 -11
- package/dist/components/inputs/File/shared/FileUploadContentLoading.d.ts +0 -9
- package/dist/components/inputs/File/shared/InputUploadContent.d.ts +0 -9
- package/dist/components/inputs/File/shared/InputUploadFilled.d.ts +0 -8
- package/dist/components/inputs/FormField/FormFieldHeaderClose.d.ts +0 -5
- package/dist/components/inputs/FormField/FormFieldHelper.d.ts +0 -8
- package/dist/components/inputs/FormField/FormFieldLabel.d.ts +0 -13
- package/dist/components/inputs/Input/shared/numberStatic.utils.d.ts +0 -1
- package/dist/components/inputs/Selection/shared/SelectDesktop.d.ts +0 -5
- package/dist/components/inputs/Selection/shared/SelectInput.d.ts +0 -15
- package/dist/components/inputs/Selection/shared/SelectInputTags.d.ts +0 -12
- package/dist/components/inputs/Selection/shared/SelectListBox.d.ts +0 -9
- package/dist/components/inputs/Selection/shared/SelectListBoxItem.d.ts +0 -7
- package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.d.ts +0 -4
- package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.d.ts +0 -6
- package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.d.ts +0 -5
- package/dist/components/inputs/Selection/shared/SelectMobile.d.ts +0 -5
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.d.ts +0 -9
- package/dist/components/inputs/Selection/shared/select.context.d.ts +0 -32
- package/dist/components/inputs/Selection/shared/staticSelect.utils.d.ts +0 -23
- package/dist/components/inputs/Selection/shared/staticSelect.utils.spec.d.ts +0 -1
- package/dist/components/inputs/Selection/shared/useSelectItems.d.ts +0 -23
- package/dist/components/inputs/Skeleton/InputFrame.d.ts +0 -84
- package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.d.ts +0 -7
- package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.d.ts +0 -10
- package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.d.ts +0 -2
- package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.d.ts +0 -2
- package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.d.ts +0 -2
- package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.d.ts +0 -6
- package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.d.ts +0 -2
- package/dist/components/inputs/TextEditor/Toolbar/TextListActions.d.ts +0 -2
- package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.d.ts +0 -2
- package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.d.ts +0 -2
- package/dist/components/inputs/TextEditor/textEditor.types.d.ts +0 -5
- package/dist/components/inputs/shared/CheckContent.d.ts +0 -9
- package/dist/components/inputs/shared/InputClear.d.ts +0 -10
- package/dist/components/inputs/shared/TooltipWrapper.d.ts +0 -10
- package/dist/components/inputs/shared/useStaticInputHandoff.d.ts +0 -15
- package/dist/components/navigation/Accordion/AccordionItem.d.ts +0 -2
- package/dist/components/navigation/Stepper/StepperItem.d.ts +0 -2
- package/dist/components/navigation/Stepper/StepperSeparator.d.ts +0 -5
- package/dist/components/overlays/BottomSheet/BottomSheetHeader.d.ts +0 -13
- package/dist/components/segment/SegmentItem.d.ts +0 -2
- package/dist/components/shared/pagination/minWidth.cva.d.ts +0 -3
- package/dist/hooks/useFormAutosave.spec.d.ts +0 -1
- package/dist/hooks/useKeyInteractions.spec.d.ts +0 -1
- package/dist/hooks/useQueryAutocomplete.d.ts +0 -13
- package/dist/rhf/entrypoints.type-test.d.ts +0 -1
- package/dist/types/react-query.d.ts +0 -6
- package/dist/utils/array.utils.spec.d.ts +0 -1
- package/dist/utils/compoundMapper.spec.d.ts +0 -1
- package/dist/utils/date-time.utils.spec.d.ts +0 -1
- package/dist/utils/date.utils.spec.d.ts +0 -1
- package/dist/utils/intl.utils.spec.d.ts +0 -1
- package/dist/utils/query.utils.d.ts +0 -4
- package/dist/utils/rest.utils.d.ts +0 -10
- package/dist/utils/rest.utils.js +0 -33
- package/dist/utils/style-merge.util.spec.d.ts +0 -1
|
@@ -7,16 +7,16 @@ import { TooltipWrapper } from "../../shared/TooltipWrapper.js";
|
|
|
7
7
|
import { InputFrame } from "../../Skeleton/InputFrame.js";
|
|
8
8
|
import { useStaticInputHandoff } from "../../shared/useStaticInputHandoff.js";
|
|
9
9
|
import { InputContent } from "../shared/InputContent.js";
|
|
10
|
+
import { useFieldAccessibility } from "../../shared/useFieldAccessibility.js";
|
|
10
11
|
import { clsx } from "clsx";
|
|
11
|
-
import { useEffect, useRef, useState } from "react";
|
|
12
|
+
import { memo, useEffect, useRef, useState } from "react";
|
|
12
13
|
import { Input } from "react-aria-components";
|
|
13
|
-
import { c } from "react/compiler-runtime";
|
|
14
14
|
import { jsx } from "react/jsx-runtime";
|
|
15
15
|
import { useFocusVisible, useTextField } from "react-aria";
|
|
16
16
|
import { mergeRefs } from "@react-aria/utils";
|
|
17
17
|
//#region src/components/inputs/Input/TextInput/TextInput.tsx
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
const TextInputBase = (props) => {
|
|
19
|
+
"use no memo";
|
|
20
20
|
const ui = UIConfig.useConfig();
|
|
21
21
|
const inputBaseCva = UIOverrides.useCva("input.baseCva", inputBaseDefinition);
|
|
22
22
|
const inputRef = useRef(null);
|
|
@@ -26,10 +26,10 @@ var TextInputBase = (props) => {
|
|
|
26
26
|
const variant = variantProp ?? ui.input.variant;
|
|
27
27
|
const size = sizeProp ?? ui.input.size;
|
|
28
28
|
const isClearable = isClearableProp ?? ui.input.isClearable;
|
|
29
|
-
const textFieldRef = useRef(null);
|
|
30
29
|
const { isFocusVisible } = useFocusVisible();
|
|
31
30
|
const inputValue = value ?? "";
|
|
32
|
-
const
|
|
31
|
+
const textFieldRef = useRef(null);
|
|
32
|
+
const textFieldProps = {
|
|
33
33
|
...rest,
|
|
34
34
|
label,
|
|
35
35
|
isDisabled,
|
|
@@ -38,273 +38,125 @@ var TextInputBase = (props) => {
|
|
|
38
38
|
value: inputValue,
|
|
39
39
|
onChange,
|
|
40
40
|
onBlur
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
t4 = {
|
|
92
|
-
unit,
|
|
93
|
-
isLoading,
|
|
94
|
-
isDisabled,
|
|
95
|
-
action,
|
|
96
|
-
leadingIcon,
|
|
97
|
-
trailingIcon,
|
|
98
|
-
isClearable,
|
|
99
|
-
isClearableIfDisabled,
|
|
100
|
-
value: inputValue,
|
|
101
|
-
onChange,
|
|
102
|
-
onBlur
|
|
103
|
-
};
|
|
104
|
-
$[16] = action;
|
|
105
|
-
$[17] = inputValue;
|
|
106
|
-
$[18] = isClearable;
|
|
107
|
-
$[19] = isClearableIfDisabled;
|
|
108
|
-
$[20] = isDisabled;
|
|
109
|
-
$[21] = isLoading;
|
|
110
|
-
$[22] = leadingIcon;
|
|
111
|
-
$[23] = onBlur;
|
|
112
|
-
$[24] = onChange;
|
|
113
|
-
$[25] = trailingIcon;
|
|
114
|
-
$[26] = unit;
|
|
115
|
-
$[27] = t4;
|
|
116
|
-
} else t4 = $[27];
|
|
117
|
-
const inputContentProps = t4;
|
|
118
|
-
const t5 = hideLabel || isHeaderHidden;
|
|
119
|
-
let t6;
|
|
120
|
-
if ($[28] !== headerClassName || $[29] !== helperText || $[30] !== isDisabled || $[31] !== isRequired || $[32] !== label || $[33] !== labelProps || $[34] !== rightContent || $[35] !== t5 || $[36] !== tooltipText) {
|
|
121
|
-
t6 = {
|
|
122
|
-
label,
|
|
123
|
-
tooltipText,
|
|
124
|
-
helperText,
|
|
125
|
-
isRequired,
|
|
126
|
-
rightContent,
|
|
127
|
-
isHeaderHidden: t5,
|
|
128
|
-
isDisabled,
|
|
129
|
-
className: headerClassName,
|
|
130
|
-
labelProps
|
|
131
|
-
};
|
|
132
|
-
$[28] = headerClassName;
|
|
133
|
-
$[29] = helperText;
|
|
134
|
-
$[30] = isDisabled;
|
|
135
|
-
$[31] = isRequired;
|
|
136
|
-
$[32] = label;
|
|
137
|
-
$[33] = labelProps;
|
|
138
|
-
$[34] = rightContent;
|
|
139
|
-
$[35] = t5;
|
|
140
|
-
$[36] = tooltipText;
|
|
141
|
-
$[37] = t6;
|
|
142
|
-
} else t6 = $[37];
|
|
143
|
-
const headerProps = t6;
|
|
41
|
+
};
|
|
42
|
+
const { labelProps, inputProps } = useTextField(textFieldProps, textFieldRef);
|
|
43
|
+
const { describedBy, errorMessageId, helperTextId } = useFieldAccessibility({
|
|
44
|
+
describedBy: inputProps["aria-describedby"],
|
|
45
|
+
error,
|
|
46
|
+
helperText
|
|
47
|
+
});
|
|
48
|
+
useEffect(() => {
|
|
49
|
+
if (!autoFocusOnMount || isDisabled) return;
|
|
50
|
+
requestAnimationFrame(() => inputRef.current?.focus());
|
|
51
|
+
}, [autoFocusOnMount, isDisabled]);
|
|
52
|
+
const formFieldProps = {
|
|
53
|
+
errorMessageId,
|
|
54
|
+
error,
|
|
55
|
+
label,
|
|
56
|
+
tooltipText,
|
|
57
|
+
helperText,
|
|
58
|
+
helperTextId,
|
|
59
|
+
isRequired,
|
|
60
|
+
rightContent,
|
|
61
|
+
isHeaderHidden: isHeaderHidden || as === "inline" || as === "filter" || as === "floating",
|
|
62
|
+
hideLabel,
|
|
63
|
+
isDisabled,
|
|
64
|
+
headerClassName,
|
|
65
|
+
errorClassName
|
|
66
|
+
};
|
|
67
|
+
const inputContentProps = {
|
|
68
|
+
unit,
|
|
69
|
+
isLoading,
|
|
70
|
+
isDisabled,
|
|
71
|
+
action,
|
|
72
|
+
leadingIcon,
|
|
73
|
+
trailingIcon,
|
|
74
|
+
isClearable,
|
|
75
|
+
isClearableIfDisabled,
|
|
76
|
+
value: inputValue,
|
|
77
|
+
onChange,
|
|
78
|
+
onBlur
|
|
79
|
+
};
|
|
80
|
+
const headerProps = {
|
|
81
|
+
label,
|
|
82
|
+
tooltipText,
|
|
83
|
+
helperText,
|
|
84
|
+
isRequired,
|
|
85
|
+
rightContent,
|
|
86
|
+
isHeaderHidden: hideLabel || isHeaderHidden,
|
|
87
|
+
isDisabled,
|
|
88
|
+
className: headerClassName,
|
|
89
|
+
labelProps
|
|
90
|
+
};
|
|
144
91
|
const dataIsDisabled = isDisabled || void 0;
|
|
145
|
-
|
|
146
|
-
const t7 = as === "inline" ? -1 : void 0;
|
|
147
|
-
const T1 = FormField;
|
|
148
|
-
const t8 = as === "inline" && "h-full";
|
|
149
|
-
let t9;
|
|
150
|
-
if ($[38] !== className || $[39] !== t8) {
|
|
151
|
-
t9 = clsx("group w-full", t8, className);
|
|
152
|
-
$[38] = className;
|
|
153
|
-
$[39] = t8;
|
|
154
|
-
$[40] = t9;
|
|
155
|
-
} else t9 = $[40];
|
|
156
|
-
const t10 = as === "inline" ? -1 : void 0;
|
|
157
|
-
const t11 = value === "" || value === null || value === void 0 || void 0;
|
|
158
|
-
const t12 = isRequired || void 0;
|
|
159
|
-
const t13 = clsx("relative flex cursor-text has-disabled:cursor-default", inputBaseCva({
|
|
160
|
-
variant,
|
|
92
|
+
return /* @__PURE__ */ jsx(TooltipWrapper, {
|
|
161
93
|
as,
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
if ($[41] === Symbol.for("react.memo_cache_sentinel")) {
|
|
166
|
-
t14 = () => inputRef.current?.focus();
|
|
167
|
-
$[41] = t14;
|
|
168
|
-
} else t14 = $[41];
|
|
169
|
-
const t15 = value === "" || value === null || value === void 0 || void 0;
|
|
170
|
-
const t16 = isRequired || void 0;
|
|
171
|
-
let t17;
|
|
172
|
-
if ($[42] !== ref) {
|
|
173
|
-
t17 = mergeRefs(ref, inputRef);
|
|
174
|
-
$[42] = ref;
|
|
175
|
-
$[43] = t17;
|
|
176
|
-
} else t17 = $[43];
|
|
177
|
-
const t18 = value === "" || value === null || value === void 0 || void 0;
|
|
178
|
-
const t19 = !(value === "" || value === null || value === void 0) || void 0;
|
|
179
|
-
const t20 = isDirty || void 0;
|
|
180
|
-
const t21 = isRequired || void 0;
|
|
181
|
-
const t22 = as === "floating" ? "\xA0" : inputProps.placeholder;
|
|
182
|
-
let t23;
|
|
183
|
-
if ($[44] !== inputProps || $[45] !== isFocusVisible) {
|
|
184
|
-
t23 = (e) => {
|
|
185
|
-
inputProps.onFocus?.(e);
|
|
186
|
-
if (isFocusVisible) e.target.select();
|
|
187
|
-
};
|
|
188
|
-
$[44] = inputProps;
|
|
189
|
-
$[45] = isFocusVisible;
|
|
190
|
-
$[46] = t23;
|
|
191
|
-
} else t23 = $[46];
|
|
192
|
-
let t24;
|
|
193
|
-
if ($[47] !== dataIsDisabled || $[48] !== inputProps || $[49] !== t17 || $[50] !== t18 || $[51] !== t19 || $[52] !== t20 || $[53] !== t21 || $[54] !== t22 || $[55] !== t23) {
|
|
194
|
-
t24 = /* @__PURE__ */ jsx(Input, {
|
|
195
|
-
...inputProps,
|
|
196
|
-
ref: t17,
|
|
197
|
-
"data-is-empty": t18,
|
|
198
|
-
"data-is-filled": t19,
|
|
199
|
-
"data-is-dirty": t20,
|
|
200
|
-
"data-is-required": t21,
|
|
201
|
-
"data-is-disabled": dataIsDisabled,
|
|
202
|
-
placeholder: t22,
|
|
203
|
-
className: "w-full bg-transparent outline-none",
|
|
204
|
-
onFocus: t23
|
|
205
|
-
});
|
|
206
|
-
$[47] = dataIsDisabled;
|
|
207
|
-
$[48] = inputProps;
|
|
208
|
-
$[49] = t17;
|
|
209
|
-
$[50] = t18;
|
|
210
|
-
$[51] = t19;
|
|
211
|
-
$[52] = t20;
|
|
212
|
-
$[53] = t21;
|
|
213
|
-
$[54] = t22;
|
|
214
|
-
$[55] = t23;
|
|
215
|
-
$[56] = t24;
|
|
216
|
-
} else t24 = $[56];
|
|
217
|
-
let t25;
|
|
218
|
-
if ($[57] !== as || $[58] !== headerProps || $[59] !== inputContentProps || $[60] !== size || $[61] !== t24) {
|
|
219
|
-
t25 = /* @__PURE__ */ jsx(InputContent, {
|
|
220
|
-
...inputContentProps,
|
|
221
|
-
headerProps,
|
|
222
|
-
as,
|
|
223
|
-
size,
|
|
224
|
-
children: t24
|
|
225
|
-
});
|
|
226
|
-
$[57] = as;
|
|
227
|
-
$[58] = headerProps;
|
|
228
|
-
$[59] = inputContentProps;
|
|
229
|
-
$[60] = size;
|
|
230
|
-
$[61] = t24;
|
|
231
|
-
$[62] = t25;
|
|
232
|
-
} else t25 = $[62];
|
|
233
|
-
let t26;
|
|
234
|
-
if ($[63] !== dataIsDisabled || $[64] !== t13 || $[65] !== t15 || $[66] !== t16 || $[67] !== t25) {
|
|
235
|
-
t26 = /* @__PURE__ */ jsx("div", {
|
|
236
|
-
className: t13,
|
|
237
|
-
onClick: t14,
|
|
238
|
-
"data-is-empty": t15,
|
|
239
|
-
"data-is-required": t16,
|
|
240
|
-
"data-is-disabled": dataIsDisabled,
|
|
241
|
-
children: t25
|
|
242
|
-
});
|
|
243
|
-
$[63] = dataIsDisabled;
|
|
244
|
-
$[64] = t13;
|
|
245
|
-
$[65] = t15;
|
|
246
|
-
$[66] = t16;
|
|
247
|
-
$[67] = t25;
|
|
248
|
-
$[68] = t26;
|
|
249
|
-
} else t26 = $[68];
|
|
250
|
-
let t27;
|
|
251
|
-
if ($[69] !== T1 || $[70] !== as || $[71] !== formFieldProps || $[72] !== labelProps || $[73] !== t10 || $[74] !== t11 || $[75] !== t12 || $[76] !== t26 || $[77] !== t9) {
|
|
252
|
-
t27 = /* @__PURE__ */ jsx(T1, {
|
|
94
|
+
error,
|
|
95
|
+
triggerTabIndex: as === "inline" ? -1 : void 0,
|
|
96
|
+
children: /* @__PURE__ */ jsx(FormField, {
|
|
253
97
|
...formFieldProps,
|
|
254
98
|
as,
|
|
255
99
|
labelProps,
|
|
256
|
-
className:
|
|
257
|
-
tabIndex:
|
|
258
|
-
"data-is-empty":
|
|
259
|
-
"data-is-required":
|
|
260
|
-
children:
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
100
|
+
className: clsx("group w-full", as === "inline" && "h-full", className),
|
|
101
|
+
tabIndex: as === "inline" ? -1 : void 0,
|
|
102
|
+
"data-is-empty": value === "" || value === null || value === void 0 || void 0,
|
|
103
|
+
"data-is-required": isRequired || void 0,
|
|
104
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
105
|
+
className: clsx("relative flex cursor-text has-disabled:cursor-default", inputBaseCva({
|
|
106
|
+
variant,
|
|
107
|
+
as,
|
|
108
|
+
...rest
|
|
109
|
+
}), inputClassName),
|
|
110
|
+
onClick: () => inputRef.current?.focus(),
|
|
111
|
+
"data-is-empty": value === "" || value === null || value === void 0 || void 0,
|
|
112
|
+
"data-is-required": isRequired || void 0,
|
|
113
|
+
"data-is-disabled": dataIsDisabled,
|
|
114
|
+
children: /* @__PURE__ */ jsx(InputContent, {
|
|
115
|
+
...inputContentProps,
|
|
116
|
+
headerProps,
|
|
117
|
+
as,
|
|
118
|
+
size,
|
|
119
|
+
children: /* @__PURE__ */ jsx(Input, {
|
|
120
|
+
...inputProps,
|
|
121
|
+
"aria-describedby": describedBy,
|
|
122
|
+
"aria-errormessage": errorMessageId,
|
|
123
|
+
ref: mergeRefs(ref, inputRef),
|
|
124
|
+
"data-is-empty": value === "" || value === null || value === void 0 || void 0,
|
|
125
|
+
"data-is-filled": !(value === "" || value === null || value === void 0) || void 0,
|
|
126
|
+
"data-is-dirty": isDirty || void 0,
|
|
127
|
+
"data-is-required": isRequired || void 0,
|
|
128
|
+
"data-is-disabled": dataIsDisabled,
|
|
129
|
+
placeholder: as === "floating" ? "\xA0" : inputProps.placeholder,
|
|
130
|
+
className: "w-full bg-transparent outline-none",
|
|
131
|
+
onFocus: (e) => {
|
|
132
|
+
inputProps.onFocus?.(e);
|
|
133
|
+
if (isFocusVisible) e.target.select();
|
|
134
|
+
}
|
|
135
|
+
})
|
|
136
|
+
})
|
|
137
|
+
})
|
|
138
|
+
})
|
|
139
|
+
});
|
|
289
140
|
};
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
const { renderStaticInput, isFormControlDisabled, ...props } = t0;
|
|
141
|
+
const TextInputInner = ({ renderStaticInput, isFormControlDisabled, ...props }) => {
|
|
142
|
+
"use no memo";
|
|
293
143
|
const ui = UIConfig.useConfig();
|
|
294
144
|
const [renderInput, setRenderInput] = useState(!(renderStaticInput ?? ui.renderStaticInput));
|
|
295
145
|
const inputRef = useRef(null);
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
146
|
+
const { shouldFocus, renderRealInput, replayStaticInputChange, replayStaticInputPress } = useStaticInputHandoff({
|
|
147
|
+
inputRef,
|
|
148
|
+
renderInput,
|
|
149
|
+
setRenderInput,
|
|
150
|
+
getPressTarget: (input) => {
|
|
151
|
+
let element = input;
|
|
152
|
+
for (let depth = 0; element && depth < 6; depth += 1) {
|
|
153
|
+
const action = element.querySelector("[data-static-press-action]");
|
|
154
|
+
if (action) return action;
|
|
155
|
+
element = element.parentElement;
|
|
156
|
+
}
|
|
157
|
+
return null;
|
|
158
|
+
}
|
|
159
|
+
});
|
|
308
160
|
if (!renderInput) {
|
|
309
161
|
const staticValue = props.value ?? props.defaultValue ?? "";
|
|
310
162
|
const inputType = props.type;
|
|
@@ -324,26 +176,16 @@ var TextInputInner = (t0) => {
|
|
|
324
176
|
dataInvalid: !!props.error,
|
|
325
177
|
dataHasSelection: hasValue
|
|
326
178
|
};
|
|
327
|
-
const t2 = isDisabled;
|
|
328
|
-
const t3 = clsx("group w-full", as === "inline" && "h-full", props.className);
|
|
329
|
-
const t4 = props.inputClassName;
|
|
330
|
-
const t5 = as === "inline" && "h-full";
|
|
331
|
-
let t6;
|
|
332
|
-
if ($[2] !== t5) {
|
|
333
|
-
t6 = clsx(t5, "pr-0!");
|
|
334
|
-
$[2] = t5;
|
|
335
|
-
$[3] = t6;
|
|
336
|
-
} else t6 = $[3];
|
|
337
179
|
return /* @__PURE__ */ jsx(InputFrame, {
|
|
338
180
|
...props,
|
|
339
|
-
isDisabled
|
|
340
|
-
className:
|
|
181
|
+
isDisabled,
|
|
182
|
+
className: clsx("group w-full", as === "inline" && "h-full", props.className),
|
|
341
183
|
dataAttributes,
|
|
342
184
|
onStaticInteract: renderRealInput,
|
|
343
185
|
onStaticPress: props.action ? replayStaticInputPress : void 0,
|
|
344
186
|
staticPressTarget: "action",
|
|
345
|
-
inputClassName:
|
|
346
|
-
contentClassName:
|
|
187
|
+
inputClassName: props.inputClassName,
|
|
188
|
+
contentClassName: clsx(as === "inline" && "h-full", "pr-0!"),
|
|
347
189
|
trailingClassName: "py-0! pl-0!",
|
|
348
190
|
wrapContentAndTrailing: true,
|
|
349
191
|
reserveTrailingContent: true,
|
|
@@ -361,110 +203,39 @@ var TextInputInner = (t0) => {
|
|
|
361
203
|
})
|
|
362
204
|
});
|
|
363
205
|
}
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
...props,
|
|
370
|
-
ref: t2,
|
|
371
|
-
autoFocusOnMount: shouldFocus
|
|
372
|
-
});
|
|
373
|
-
$[4] = T0;
|
|
374
|
-
$[5] = props;
|
|
375
|
-
$[6] = shouldFocus;
|
|
376
|
-
$[7] = t2;
|
|
377
|
-
$[8] = t3;
|
|
378
|
-
} else t3 = $[8];
|
|
379
|
-
return t3;
|
|
206
|
+
return /* @__PURE__ */ jsx(TextInputBase, {
|
|
207
|
+
...props,
|
|
208
|
+
ref: mergeRefs(props.ref, inputRef),
|
|
209
|
+
autoFocusOnMount: shouldFocus
|
|
210
|
+
});
|
|
380
211
|
};
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
let renderStaticInput;
|
|
385
|
-
if ($[0] !== t0) {
|
|
386
|
-
({renderStaticInput, ...props} = t0);
|
|
387
|
-
$[0] = t0;
|
|
388
|
-
$[1] = props;
|
|
389
|
-
$[2] = renderStaticInput;
|
|
390
|
-
} else {
|
|
391
|
-
props = $[1];
|
|
392
|
-
renderStaticInput = $[2];
|
|
393
|
-
}
|
|
212
|
+
/** @internal Exported for production render benchmarks. */
|
|
213
|
+
const TextInputComponent = ({ renderStaticInput, ...props }) => {
|
|
214
|
+
"use no memo";
|
|
394
215
|
if ("field" in props && props.field) {
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
({field,
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
t1 = (t2) => {
|
|
412
|
-
const { field: field_0, fieldState: t3 } = t2;
|
|
413
|
-
const { error, isDirty } = t3;
|
|
414
|
-
return /* @__PURE__ */ jsx(TextInputInner, {
|
|
415
|
-
...innerProps,
|
|
416
|
-
ref: mergeRefs(ref, field_0.ref),
|
|
417
|
-
value: field_0.value,
|
|
418
|
-
onChange: field_0.onChange,
|
|
419
|
-
onBlur: field_0.onBlur,
|
|
420
|
-
isDirty,
|
|
421
|
-
isDisabled: field_0.disabled || props.isDisabled,
|
|
422
|
-
isFormControlDisabled: field_0.disabled,
|
|
423
|
-
error: props.error ?? error?.message,
|
|
424
|
-
renderStaticInput
|
|
425
|
-
});
|
|
426
|
-
};
|
|
427
|
-
$[7] = innerProps;
|
|
428
|
-
$[8] = props.error;
|
|
429
|
-
$[9] = props.isDisabled;
|
|
430
|
-
$[10] = ref;
|
|
431
|
-
$[11] = renderStaticInput;
|
|
432
|
-
$[12] = t1;
|
|
433
|
-
} else t1 = $[12];
|
|
434
|
-
let t2;
|
|
435
|
-
if ($[13] !== field.form || $[14] !== field.name || $[15] !== t1) {
|
|
436
|
-
t2 = /* @__PURE__ */ jsx(FieldController, {
|
|
437
|
-
control: field.form,
|
|
438
|
-
name: field.name,
|
|
439
|
-
render: t1
|
|
440
|
-
});
|
|
441
|
-
$[13] = field.form;
|
|
442
|
-
$[14] = field.name;
|
|
443
|
-
$[15] = t1;
|
|
444
|
-
$[16] = t2;
|
|
445
|
-
} else t2 = $[16];
|
|
446
|
-
return t2;
|
|
447
|
-
}
|
|
448
|
-
let t1;
|
|
449
|
-
if ($[17] !== props || $[18] !== renderStaticInput) {
|
|
450
|
-
t1 = /* @__PURE__ */ jsx(TextInputInner, {
|
|
451
|
-
...props,
|
|
452
|
-
renderStaticInput
|
|
216
|
+
const { field, ref, ...innerProps } = props;
|
|
217
|
+
return /* @__PURE__ */ jsx(FieldController, {
|
|
218
|
+
control: field.form,
|
|
219
|
+
name: field.name,
|
|
220
|
+
render: ({ field, fieldState: { error, isDirty } }) => /* @__PURE__ */ jsx(TextInputInner, {
|
|
221
|
+
...innerProps,
|
|
222
|
+
ref: mergeRefs(ref, field.ref),
|
|
223
|
+
value: field.value,
|
|
224
|
+
onChange: field.onChange,
|
|
225
|
+
onBlur: field.onBlur,
|
|
226
|
+
isDirty,
|
|
227
|
+
isDisabled: field.disabled || props.isDisabled,
|
|
228
|
+
isFormControlDisabled: field.disabled,
|
|
229
|
+
error: props.error ?? error?.message,
|
|
230
|
+
renderStaticInput
|
|
231
|
+
})
|
|
453
232
|
});
|
|
454
|
-
$[17] = props;
|
|
455
|
-
$[18] = renderStaticInput;
|
|
456
|
-
$[19] = t1;
|
|
457
|
-
} else t1 = $[19];
|
|
458
|
-
return t1;
|
|
459
|
-
};
|
|
460
|
-
function _temp(input) {
|
|
461
|
-
let element = input;
|
|
462
|
-
for (let depth = 0; element && depth < 6; depth = depth + 1) {
|
|
463
|
-
const action = element.querySelector("[data-static-press-action]");
|
|
464
|
-
if (action) return action;
|
|
465
|
-
element = element.parentElement;
|
|
466
233
|
}
|
|
467
|
-
return
|
|
468
|
-
|
|
234
|
+
return /* @__PURE__ */ jsx(TextInputInner, {
|
|
235
|
+
...props,
|
|
236
|
+
renderStaticInput
|
|
237
|
+
});
|
|
238
|
+
};
|
|
239
|
+
const TextInput = memo(TextInputComponent);
|
|
469
240
|
//#endregion
|
|
470
|
-
export { TextInput };
|
|
241
|
+
export { TextInput, TextInputComponent };
|
|
@@ -1,29 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
|
|
1
|
+
import { InlineIconButtonProps } from "../../../buttons/InlineIconButton/InlineIconButton.js";
|
|
2
|
+
import { FormFieldHeaderProps } from "../../FormField/FormFieldHeader.js";
|
|
3
|
+
import "../../shared/input.cva.js";
|
|
4
|
+
import { FC, FocusEvent, ReactElement, ReactNode, SVGProps } from "react";
|
|
5
|
+
//#region src/components/inputs/Input/shared/InputContent.d.ts
|
|
6
|
+
interface InputContentProps {
|
|
7
|
+
className?: string;
|
|
8
|
+
unit?: string;
|
|
9
|
+
isLoading?: boolean;
|
|
10
|
+
isDisabled?: boolean;
|
|
11
|
+
action?: {
|
|
12
|
+
icon: InlineIconButtonProps["icon"];
|
|
13
|
+
onClick: () => void;
|
|
14
|
+
altText: string;
|
|
6
15
|
className?: string;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
leadingIcon?: FC<SVGProps<SVGSVGElement>> | ReactElement;
|
|
17
|
-
trailingIcon?: FC<SVGProps<SVGSVGElement>> | ReactElement;
|
|
18
|
-
isClearable?: boolean;
|
|
19
|
-
isClearableIfDisabled?: boolean;
|
|
20
|
-
value?: string | number | null;
|
|
21
|
-
onChange?: (value: string) => void;
|
|
22
|
-
onBlur?: (e: FocusEvent<HTMLInputElement>) => void;
|
|
23
|
-
headerProps?: FormFieldHeaderProps;
|
|
16
|
+
};
|
|
17
|
+
leadingIcon?: FC<SVGProps<SVGSVGElement>> | ReactElement;
|
|
18
|
+
trailingIcon?: FC<SVGProps<SVGSVGElement>> | ReactElement;
|
|
19
|
+
isClearable?: boolean;
|
|
20
|
+
isClearableIfDisabled?: boolean;
|
|
21
|
+
value?: string | number | null;
|
|
22
|
+
onChange?: (value: string) => void;
|
|
23
|
+
onBlur?: (e: FocusEvent<HTMLInputElement>) => void;
|
|
24
|
+
headerProps?: FormFieldHeaderProps;
|
|
24
25
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
export declare const InputContent: ({ leadingIcon: LeadingIcon, trailingIcon: TrailingIcon, unit, isLoading, isDisabled, action, isClearable, isClearableIfDisabled, value, onChange, onBlur, children, headerProps, as, size, }: InputContentComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
29
|
-
export {};
|
|
26
|
+
//#endregion
|
|
27
|
+
export { InputContentProps };
|