@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,8 +7,7 @@ import { FormField } from "../FormField/FormField.js";
|
|
|
7
7
|
import { inputSideDefinition } from "../shared/input.cva.js";
|
|
8
8
|
import { TextEditorToolbar } from "./Toolbar/TextEditorToolbar.js";
|
|
9
9
|
import { clsx } from "clsx";
|
|
10
|
-
import { useEffect, useRef, useState } from "react";
|
|
11
|
-
import { c } from "react/compiler-runtime";
|
|
10
|
+
import { memo, useEffect, useRef, useState } from "react";
|
|
12
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
12
|
import { useFocusVisible, useFocusWithin, useHover, useLabel } from "react-aria";
|
|
14
13
|
import { mergeRefs } from "@react-aria/utils";
|
|
@@ -22,7 +21,7 @@ import { Underline } from "@tiptap/extension-underline";
|
|
|
22
21
|
import { EditorContent, useEditor } from "@tiptap/react";
|
|
23
22
|
import { StarterKit } from "@tiptap/starter-kit";
|
|
24
23
|
//#region src/components/inputs/TextEditor/TextEditor.tsx
|
|
25
|
-
|
|
24
|
+
const extensions = [
|
|
26
25
|
StarterKit.configure({ heading: { levels: [
|
|
27
26
|
1,
|
|
28
27
|
2,
|
|
@@ -38,7 +37,7 @@ var extensions = [
|
|
|
38
37
|
defaultProtocol: "https"
|
|
39
38
|
})
|
|
40
39
|
];
|
|
41
|
-
|
|
40
|
+
const TextEditorBase = ({ ref, as = "default", placeholder, label, hideLabel, tooltipText, helperText, isRequired, rightContent, isDisabled, headerClassName, errorClassName, isHeaderHidden, error, value, className, editorClassName, isDirty, onChange, onBlur }) => {
|
|
42
41
|
const contentRef = useRef(null);
|
|
43
42
|
const { hoverProps, isHovered } = useHover({ isDisabled });
|
|
44
43
|
const [isFocused, setIsFocused] = useState(false);
|
|
@@ -134,66 +133,26 @@ var TextEditorBase = ({ ref, as = "default", placeholder, label, hideLabel, tool
|
|
|
134
133
|
})
|
|
135
134
|
});
|
|
136
135
|
};
|
|
137
|
-
|
|
138
|
-
const $ = c(15);
|
|
136
|
+
const TextEditorComponent = (props) => {
|
|
139
137
|
if ("field" in props && props.field) {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
({field,
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
if ($[4] !== innerProps || $[5] !== props.error || $[6] !== props.isDisabled || $[7] !== ref) {
|
|
156
|
-
t0 = (t1) => {
|
|
157
|
-
const { field: field_0, fieldState: t2 } = t1;
|
|
158
|
-
const { error, isDirty } = t2;
|
|
159
|
-
return /* @__PURE__ */ jsx(TextEditorBase, {
|
|
160
|
-
...innerProps,
|
|
161
|
-
ref: mergeRefs(ref, field_0.ref),
|
|
162
|
-
value: field_0.value,
|
|
163
|
-
onChange: field_0.onChange,
|
|
164
|
-
onBlur: field_0.onBlur,
|
|
165
|
-
isDirty,
|
|
166
|
-
isDisabled: field_0.disabled || props.isDisabled,
|
|
167
|
-
error: props.error ?? error?.message
|
|
168
|
-
});
|
|
169
|
-
};
|
|
170
|
-
$[4] = innerProps;
|
|
171
|
-
$[5] = props.error;
|
|
172
|
-
$[6] = props.isDisabled;
|
|
173
|
-
$[7] = ref;
|
|
174
|
-
$[8] = t0;
|
|
175
|
-
} else t0 = $[8];
|
|
176
|
-
let t1;
|
|
177
|
-
if ($[9] !== field.form || $[10] !== field.name || $[11] !== t0) {
|
|
178
|
-
t1 = /* @__PURE__ */ jsx(FieldController, {
|
|
179
|
-
control: field.form,
|
|
180
|
-
name: field.name,
|
|
181
|
-
render: t0
|
|
182
|
-
});
|
|
183
|
-
$[9] = field.form;
|
|
184
|
-
$[10] = field.name;
|
|
185
|
-
$[11] = t0;
|
|
186
|
-
$[12] = t1;
|
|
187
|
-
} else t1 = $[12];
|
|
188
|
-
return t1;
|
|
138
|
+
const { field, ref, ...innerProps } = props;
|
|
139
|
+
return /* @__PURE__ */ jsx(FieldController, {
|
|
140
|
+
control: field.form,
|
|
141
|
+
name: field.name,
|
|
142
|
+
render: ({ field, fieldState: { error, isDirty } }) => /* @__PURE__ */ jsx(TextEditorBase, {
|
|
143
|
+
...innerProps,
|
|
144
|
+
ref: mergeRefs(ref, field.ref),
|
|
145
|
+
value: field.value,
|
|
146
|
+
onChange: field.onChange,
|
|
147
|
+
onBlur: field.onBlur,
|
|
148
|
+
isDirty,
|
|
149
|
+
isDisabled: field.disabled || props.isDisabled,
|
|
150
|
+
error: props.error ?? error?.message
|
|
151
|
+
})
|
|
152
|
+
});
|
|
189
153
|
}
|
|
190
|
-
|
|
191
|
-
if ($[13] !== props) {
|
|
192
|
-
t0 = /* @__PURE__ */ jsx(TextEditorBase, { ...props });
|
|
193
|
-
$[13] = props;
|
|
194
|
-
$[14] = t0;
|
|
195
|
-
} else t0 = $[14];
|
|
196
|
-
return t0;
|
|
154
|
+
return /* @__PURE__ */ jsx(TextEditorBase, { ...props });
|
|
197
155
|
};
|
|
156
|
+
const TextEditor = memo(TextEditorComponent);
|
|
198
157
|
//#endregion
|
|
199
158
|
export { TextEditor };
|
|
@@ -1,44 +1,18 @@
|
|
|
1
1
|
import { clsx } from "clsx";
|
|
2
2
|
import { ColorSwatch, ColorSwatchPicker, ColorSwatchPickerItem } from "react-aria-components";
|
|
3
|
-
import { c } from "react/compiler-runtime";
|
|
4
3
|
import { jsx } from "react/jsx-runtime";
|
|
5
4
|
//#region src/components/inputs/TextEditor/Toolbar/ColorPicker.tsx
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
t2 = colors.map(_temp);
|
|
18
|
-
$[2] = colors;
|
|
19
|
-
$[3] = t2;
|
|
20
|
-
} else t2 = $[3];
|
|
21
|
-
let t3;
|
|
22
|
-
if ($[4] !== t1 || $[5] !== t2 || $[6] !== value) {
|
|
23
|
-
t3 = /* @__PURE__ */ jsx(ColorSwatchPicker, {
|
|
24
|
-
value,
|
|
25
|
-
onChange: t1,
|
|
26
|
-
className: "grid w-full grid-cols-[repeat(auto-fit,minmax(1rem,1fr))] gap-1",
|
|
27
|
-
children: t2
|
|
28
|
-
});
|
|
29
|
-
$[4] = t1;
|
|
30
|
-
$[5] = t2;
|
|
31
|
-
$[6] = value;
|
|
32
|
-
$[7] = t3;
|
|
33
|
-
} else t3 = $[7];
|
|
34
|
-
return t3;
|
|
5
|
+
const ColorPicker = ({ colors, value, onChange }) => {
|
|
6
|
+
return /* @__PURE__ */ jsx(ColorSwatchPicker, {
|
|
7
|
+
value,
|
|
8
|
+
onChange: (color) => onChange(color.toString("hex")),
|
|
9
|
+
className: "grid w-full grid-cols-[repeat(auto-fit,minmax(1rem,1fr))] gap-1",
|
|
10
|
+
children: colors.map((color) => /* @__PURE__ */ jsx(ColorSwatchPickerItem, {
|
|
11
|
+
color,
|
|
12
|
+
className: "group",
|
|
13
|
+
children: /* @__PURE__ */ jsx(ColorSwatch, { className: clsx("size-4 rounded-xs border border-interactive-outlined-secondary-outline-idle border-solid", "group-selected:border-interactive-outlined-primary-outline-pressed group-selected:shadow-2", "cursor-pointer") })
|
|
14
|
+
}, color))
|
|
15
|
+
});
|
|
35
16
|
};
|
|
36
|
-
function _temp(color_0) {
|
|
37
|
-
return /* @__PURE__ */ jsx(ColorSwatchPickerItem, {
|
|
38
|
-
color: color_0,
|
|
39
|
-
className: "group",
|
|
40
|
-
children: /* @__PURE__ */ jsx(ColorSwatch, { className: clsx("size-4 rounded-xs border border-interactive-outlined-secondary-outline-idle border-solid", "group-selected:border-interactive-outlined-primary-outline-pressed group-selected:shadow-2", "cursor-pointer") })
|
|
41
|
-
}, color_0);
|
|
42
|
-
}
|
|
43
17
|
//#endregion
|
|
44
18
|
export { ColorPicker };
|
|
@@ -7,122 +7,50 @@ import { ChevronDown } from "lucide-react";
|
|
|
7
7
|
import { clsx } from "clsx";
|
|
8
8
|
import { useState } from "react";
|
|
9
9
|
import { Button, Dialog, DialogTrigger, Popover } from "react-aria-components";
|
|
10
|
-
import { c } from "react/compiler-runtime";
|
|
11
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
11
|
//#region src/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.tsx
|
|
13
|
-
|
|
14
|
-
const $ = c(28);
|
|
15
|
-
const { colors, value, onChange, isDisabled, children } = t0;
|
|
12
|
+
const ColorPickerDropdown = ({ colors, value, onChange, isDisabled, children }) => {
|
|
16
13
|
const inputCva = useInputCva();
|
|
17
14
|
const popoverCva = UIOverrides.useCva("popover.cva", popoverDefinition);
|
|
18
15
|
const [isOpen, setIsOpen] = useState(false);
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
t2 = inputCva({
|
|
32
|
-
as: "inline",
|
|
33
|
-
className: clsx("flex items-center justify-between gap-2")
|
|
34
|
-
});
|
|
35
|
-
$[2] = inputCva;
|
|
36
|
-
$[3] = t2;
|
|
37
|
-
} else t2 = $[3];
|
|
38
|
-
let t3;
|
|
39
|
-
if ($[4] !== children) {
|
|
40
|
-
t3 = /* @__PURE__ */ jsx(Typography, {
|
|
41
|
-
size: "label-1",
|
|
42
|
-
className: "truncate",
|
|
43
|
-
children
|
|
44
|
-
});
|
|
45
|
-
$[4] = children;
|
|
46
|
-
$[5] = t3;
|
|
47
|
-
} else t3 = $[5];
|
|
48
|
-
const t4 = isOpen && "rotate-180";
|
|
49
|
-
let t5;
|
|
50
|
-
if ($[6] !== t4) {
|
|
51
|
-
t5 = clsx("size-6 shrink-0", t4);
|
|
52
|
-
$[6] = t4;
|
|
53
|
-
$[7] = t5;
|
|
54
|
-
} else t5 = $[7];
|
|
55
|
-
let t6;
|
|
56
|
-
if ($[8] !== t5) {
|
|
57
|
-
t6 = /* @__PURE__ */ jsx(ChevronDown, {
|
|
58
|
-
className: t5,
|
|
59
|
-
"aria-hidden": "true"
|
|
60
|
-
});
|
|
61
|
-
$[8] = t5;
|
|
62
|
-
$[9] = t6;
|
|
63
|
-
} else t6 = $[9];
|
|
64
|
-
let t7;
|
|
65
|
-
if ($[10] !== isDisabled || $[11] !== t2 || $[12] !== t3 || $[13] !== t6) {
|
|
66
|
-
t7 = /* @__PURE__ */ jsxs(Button, {
|
|
67
|
-
className: t2,
|
|
16
|
+
const handleChange = (color) => {
|
|
17
|
+
onChange(color);
|
|
18
|
+
setIsOpen(false);
|
|
19
|
+
};
|
|
20
|
+
return /* @__PURE__ */ jsxs(DialogTrigger, {
|
|
21
|
+
isOpen,
|
|
22
|
+
onOpenChange: setIsOpen,
|
|
23
|
+
children: [/* @__PURE__ */ jsxs(Button, {
|
|
24
|
+
className: inputCva({
|
|
25
|
+
as: "inline",
|
|
26
|
+
className: clsx("flex items-center justify-between gap-2")
|
|
27
|
+
}),
|
|
68
28
|
isDisabled,
|
|
69
|
-
children: [
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
if ($[15] !== popoverCva) {
|
|
79
|
-
t8 = clsx(popoverCva({}), "flex justify-center overflow-hidden p-2");
|
|
80
|
-
$[15] = popoverCva;
|
|
81
|
-
$[16] = t8;
|
|
82
|
-
} else t8 = $[16];
|
|
83
|
-
let t9;
|
|
84
|
-
if ($[17] !== colors || $[18] !== handleChange || $[19] !== value) {
|
|
85
|
-
t9 = /* @__PURE__ */ jsx(ColorPicker, {
|
|
86
|
-
colors,
|
|
87
|
-
value,
|
|
88
|
-
onChange: handleChange
|
|
89
|
-
});
|
|
90
|
-
$[17] = colors;
|
|
91
|
-
$[18] = handleChange;
|
|
92
|
-
$[19] = value;
|
|
93
|
-
$[20] = t9;
|
|
94
|
-
} else t9 = $[20];
|
|
95
|
-
let t10;
|
|
96
|
-
if ($[21] !== t8 || $[22] !== t9) {
|
|
97
|
-
t10 = /* @__PURE__ */ jsx(Popover, {
|
|
29
|
+
children: [/* @__PURE__ */ jsx(Typography, {
|
|
30
|
+
size: "label-1",
|
|
31
|
+
className: "truncate",
|
|
32
|
+
children
|
|
33
|
+
}), /* @__PURE__ */ jsx(ChevronDown, {
|
|
34
|
+
className: clsx("size-6 shrink-0", isOpen && "rotate-180"),
|
|
35
|
+
"aria-hidden": "true"
|
|
36
|
+
})]
|
|
37
|
+
}), /* @__PURE__ */ jsx(Popover, {
|
|
98
38
|
className: "my-4 w-40 outline-none",
|
|
99
39
|
offset: 0,
|
|
100
40
|
placement: "bottom start",
|
|
101
41
|
children: /* @__PURE__ */ jsx(Dialog, {
|
|
102
42
|
className: "outline-none",
|
|
103
43
|
children: /* @__PURE__ */ jsx("div", {
|
|
104
|
-
className:
|
|
105
|
-
children:
|
|
44
|
+
className: clsx(popoverCva({}), "flex justify-center overflow-hidden p-2"),
|
|
45
|
+
children: /* @__PURE__ */ jsx(ColorPicker, {
|
|
46
|
+
colors,
|
|
47
|
+
value,
|
|
48
|
+
onChange: handleChange
|
|
49
|
+
})
|
|
106
50
|
})
|
|
107
51
|
})
|
|
108
|
-
})
|
|
109
|
-
|
|
110
|
-
$[22] = t9;
|
|
111
|
-
$[23] = t10;
|
|
112
|
-
} else t10 = $[23];
|
|
113
|
-
let t11;
|
|
114
|
-
if ($[24] !== isOpen || $[25] !== t10 || $[26] !== t7) {
|
|
115
|
-
t11 = /* @__PURE__ */ jsxs(DialogTrigger, {
|
|
116
|
-
isOpen,
|
|
117
|
-
onOpenChange: setIsOpen,
|
|
118
|
-
children: [t7, t10]
|
|
119
|
-
});
|
|
120
|
-
$[24] = isOpen;
|
|
121
|
-
$[25] = t10;
|
|
122
|
-
$[26] = t7;
|
|
123
|
-
$[27] = t11;
|
|
124
|
-
} else t11 = $[27];
|
|
125
|
-
return t11;
|
|
52
|
+
})]
|
|
53
|
+
});
|
|
126
54
|
};
|
|
127
55
|
//#endregion
|
|
128
56
|
export { ColorPickerDropdown };
|
|
@@ -6,216 +6,67 @@ import { ResponsivePopover } from "../../../overlays/ResponsivePopover/Responsiv
|
|
|
6
6
|
import { Link } from "lucide-react";
|
|
7
7
|
import { clsx } from "clsx";
|
|
8
8
|
import { useEffect, useState } from "react";
|
|
9
|
-
import { c } from "react/compiler-runtime";
|
|
10
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
10
|
import { useTranslation } from "react-i18next";
|
|
12
11
|
//#region src/components/inputs/TextEditor/Toolbar/HyperlinkAction.tsx
|
|
13
|
-
|
|
14
|
-
const $ = c(49);
|
|
15
|
-
const { editor } = t0;
|
|
12
|
+
const HyperlinkAction = ({ editor }) => {
|
|
16
13
|
const { t } = useTranslation("ui");
|
|
17
14
|
const [isOpen, setIsOpen] = useState(false);
|
|
18
15
|
const [url, setUrl] = useState("");
|
|
19
|
-
const isLinkEnabled = !!editor.extensionManager.extensions.find(
|
|
16
|
+
const isLinkEnabled = !!editor.extensionManager.extensions.find((extension) => extension.name === "link");
|
|
20
17
|
const linkHref = editor.getAttributes("link")?.href;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
t1 = () => {
|
|
25
|
-
setUrl(linkHref || "");
|
|
26
|
-
};
|
|
27
|
-
t2 = [linkHref];
|
|
28
|
-
$[0] = linkHref;
|
|
29
|
-
$[1] = t1;
|
|
30
|
-
$[2] = t2;
|
|
31
|
-
} else {
|
|
32
|
-
t1 = $[1];
|
|
33
|
-
t2 = $[2];
|
|
34
|
-
}
|
|
35
|
-
useEffect(t1, t2);
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
setUrl(linkHref || "");
|
|
20
|
+
}, [linkHref]);
|
|
36
21
|
if (!isLinkEnabled) return null;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
editor.chain().focus().extendMarkRange("link").setLink({ href: url }).run();
|
|
51
|
-
setIsOpen(false);
|
|
52
|
-
};
|
|
53
|
-
$[5] = editor;
|
|
54
|
-
$[6] = url;
|
|
55
|
-
$[7] = t4;
|
|
56
|
-
} else t4 = $[7];
|
|
57
|
-
const onApply = t4;
|
|
58
|
-
let t5;
|
|
59
|
-
if ($[8] !== t) {
|
|
60
|
-
t5 = t(_temp2);
|
|
61
|
-
$[8] = t;
|
|
62
|
-
$[9] = t5;
|
|
63
|
-
} else t5 = $[9];
|
|
64
|
-
let t6;
|
|
65
|
-
if ($[10] !== t) {
|
|
66
|
-
t6 = t(_temp3);
|
|
67
|
-
$[10] = t;
|
|
68
|
-
$[11] = t6;
|
|
69
|
-
} else t6 = $[11];
|
|
70
|
-
let t7;
|
|
71
|
-
if ($[12] !== editor) {
|
|
72
|
-
t7 = clsx(editor.isActive("link") && "!text-interactive-text-primary-idle");
|
|
73
|
-
$[12] = editor;
|
|
74
|
-
$[13] = t7;
|
|
75
|
-
} else t7 = $[13];
|
|
76
|
-
const t8 = !editor.isEditable;
|
|
77
|
-
let t9;
|
|
78
|
-
if ($[14] !== t6 || $[15] !== t7 || $[16] !== t8) {
|
|
79
|
-
t9 = /* @__PURE__ */ jsx(InlineIconButton, {
|
|
22
|
+
const onRemove = () => {
|
|
23
|
+
editor.chain().focus().extendMarkRange("link").unsetLink().run();
|
|
24
|
+
setIsOpen(false);
|
|
25
|
+
};
|
|
26
|
+
const onApply = () => {
|
|
27
|
+
editor.chain().focus().extendMarkRange("link").setLink({ href: url }).run();
|
|
28
|
+
setIsOpen(false);
|
|
29
|
+
};
|
|
30
|
+
return /* @__PURE__ */ jsxs(ResponsivePopover, {
|
|
31
|
+
isOpen,
|
|
32
|
+
onOpenChange: setIsOpen,
|
|
33
|
+
sheetLabel: t(($) => $.ui.textEditor.link.label),
|
|
34
|
+
trigger: /* @__PURE__ */ jsx(InlineIconButton, {
|
|
80
35
|
color: "secondary",
|
|
81
|
-
label:
|
|
36
|
+
label: t(($) => $.ui.textEditor.link.label),
|
|
82
37
|
icon: Link,
|
|
83
|
-
className:
|
|
84
|
-
isDisabled:
|
|
85
|
-
})
|
|
86
|
-
|
|
87
|
-
$[15] = t7;
|
|
88
|
-
$[16] = t8;
|
|
89
|
-
$[17] = t9;
|
|
90
|
-
} else t9 = $[17];
|
|
91
|
-
let t10;
|
|
92
|
-
if ($[18] !== t) {
|
|
93
|
-
t10 = t(_temp4);
|
|
94
|
-
$[18] = t;
|
|
95
|
-
$[19] = t10;
|
|
96
|
-
} else t10 = $[19];
|
|
97
|
-
let t11;
|
|
98
|
-
if ($[20] !== t) {
|
|
99
|
-
t11 = t(_temp5);
|
|
100
|
-
$[20] = t;
|
|
101
|
-
$[21] = t11;
|
|
102
|
-
} else t11 = $[21];
|
|
103
|
-
let t12;
|
|
104
|
-
if ($[22] !== t10 || $[23] !== t11 || $[24] !== url) {
|
|
105
|
-
t12 = /* @__PURE__ */ jsx(TextInput, {
|
|
38
|
+
className: clsx(editor.isActive("link") && "!text-interactive-text-primary-idle"),
|
|
39
|
+
isDisabled: !editor.isEditable
|
|
40
|
+
}),
|
|
41
|
+
children: [/* @__PURE__ */ jsx(TextInput, {
|
|
106
42
|
variant: "outlined",
|
|
107
43
|
hideLabel: true,
|
|
108
|
-
label:
|
|
109
|
-
placeholder:
|
|
44
|
+
label: t(($) => $.ui.textEditor.link.urlLabel),
|
|
45
|
+
placeholder: t(($) => $.ui.textEditor.link.urlPlaceholder),
|
|
110
46
|
value: url,
|
|
111
47
|
onChange: setUrl,
|
|
112
48
|
className: "mb-4"
|
|
113
|
-
})
|
|
114
|
-
$[22] = t10;
|
|
115
|
-
$[23] = t11;
|
|
116
|
-
$[24] = url;
|
|
117
|
-
$[25] = t12;
|
|
118
|
-
} else t12 = $[25];
|
|
119
|
-
const t13 = !url;
|
|
120
|
-
let t14;
|
|
121
|
-
if ($[26] !== t) {
|
|
122
|
-
t14 = t(_temp6);
|
|
123
|
-
$[26] = t;
|
|
124
|
-
$[27] = t14;
|
|
125
|
-
} else t14 = $[27];
|
|
126
|
-
let t15;
|
|
127
|
-
if ($[28] !== onApply || $[29] !== t13 || $[30] !== t14) {
|
|
128
|
-
t15 = /* @__PURE__ */ jsx(Button, {
|
|
129
|
-
variant: "contained",
|
|
130
|
-
color: "secondary",
|
|
131
|
-
size: "xs",
|
|
132
|
-
width: "hug",
|
|
133
|
-
onPress: onApply,
|
|
134
|
-
isDisabled: t13,
|
|
135
|
-
children: t14
|
|
136
|
-
});
|
|
137
|
-
$[28] = onApply;
|
|
138
|
-
$[29] = t13;
|
|
139
|
-
$[30] = t14;
|
|
140
|
-
$[31] = t15;
|
|
141
|
-
} else t15 = $[31];
|
|
142
|
-
let t16;
|
|
143
|
-
if ($[32] !== editor) {
|
|
144
|
-
t16 = editor.isActive("link");
|
|
145
|
-
$[32] = editor;
|
|
146
|
-
$[33] = t16;
|
|
147
|
-
} else t16 = $[33];
|
|
148
|
-
const t17 = !t16;
|
|
149
|
-
let t18;
|
|
150
|
-
if ($[34] !== t) {
|
|
151
|
-
t18 = t(_temp7);
|
|
152
|
-
$[34] = t;
|
|
153
|
-
$[35] = t18;
|
|
154
|
-
} else t18 = $[35];
|
|
155
|
-
let t19;
|
|
156
|
-
if ($[36] !== onRemove || $[37] !== t17 || $[38] !== t18) {
|
|
157
|
-
t19 = /* @__PURE__ */ jsx(Button, {
|
|
158
|
-
variant: "outlined",
|
|
159
|
-
color: "secondary",
|
|
160
|
-
size: "xs",
|
|
161
|
-
width: "hug",
|
|
162
|
-
onPress: onRemove,
|
|
163
|
-
isDisabled: t17,
|
|
164
|
-
children: t18
|
|
165
|
-
});
|
|
166
|
-
$[36] = onRemove;
|
|
167
|
-
$[37] = t17;
|
|
168
|
-
$[38] = t18;
|
|
169
|
-
$[39] = t19;
|
|
170
|
-
} else t19 = $[39];
|
|
171
|
-
let t20;
|
|
172
|
-
if ($[40] !== t15 || $[41] !== t19) {
|
|
173
|
-
t20 = /* @__PURE__ */ jsxs("div", {
|
|
49
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
174
50
|
className: "flex justify-between",
|
|
175
|
-
children: [
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
$[47] = t9;
|
|
195
|
-
$[48] = t21;
|
|
196
|
-
} else t21 = $[48];
|
|
197
|
-
return t21;
|
|
51
|
+
children: [/* @__PURE__ */ jsx(Button, {
|
|
52
|
+
variant: "contained",
|
|
53
|
+
color: "secondary",
|
|
54
|
+
size: "xs",
|
|
55
|
+
width: "hug",
|
|
56
|
+
onPress: onApply,
|
|
57
|
+
isDisabled: !url,
|
|
58
|
+
children: t(($) => $.ui.textEditor.link.apply)
|
|
59
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
60
|
+
variant: "outlined",
|
|
61
|
+
color: "secondary",
|
|
62
|
+
size: "xs",
|
|
63
|
+
width: "hug",
|
|
64
|
+
onPress: onRemove,
|
|
65
|
+
isDisabled: !editor.isActive("link"),
|
|
66
|
+
children: t(($) => $.ui.textEditor.link.remove)
|
|
67
|
+
})]
|
|
68
|
+
})]
|
|
69
|
+
});
|
|
198
70
|
};
|
|
199
|
-
function _temp(extension) {
|
|
200
|
-
return extension.name === "link";
|
|
201
|
-
}
|
|
202
|
-
function _temp2($) {
|
|
203
|
-
return $.ui.textEditor.link.label;
|
|
204
|
-
}
|
|
205
|
-
function _temp3($_0) {
|
|
206
|
-
return $_0.ui.textEditor.link.label;
|
|
207
|
-
}
|
|
208
|
-
function _temp4($_1) {
|
|
209
|
-
return $_1.ui.textEditor.link.urlLabel;
|
|
210
|
-
}
|
|
211
|
-
function _temp5($_2) {
|
|
212
|
-
return $_2.ui.textEditor.link.urlPlaceholder;
|
|
213
|
-
}
|
|
214
|
-
function _temp6($_3) {
|
|
215
|
-
return $_3.ui.textEditor.link.apply;
|
|
216
|
-
}
|
|
217
|
-
function _temp7($_4) {
|
|
218
|
-
return $_4.ui.textEditor.link.remove;
|
|
219
|
-
}
|
|
220
71
|
//#endregion
|
|
221
72
|
export { HyperlinkAction };
|