@povio/ui 3.4.0-rc.10 → 3.4.0-rc.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/icons/Account.d.ts +2 -0
- package/dist/assets/icons/AlignCenter.d.ts +2 -0
- package/dist/assets/icons/AlignCenter.js +30 -0
- package/dist/assets/icons/AlignLeft.d.ts +2 -0
- package/dist/assets/icons/AlignLeft.js +30 -0
- package/dist/assets/icons/AlignLeftRight.d.ts +2 -0
- package/dist/assets/icons/AlignLeftRight.js +30 -0
- package/dist/assets/icons/AlignRight.d.ts +2 -0
- package/dist/assets/icons/AlignRight.js +30 -0
- package/dist/assets/icons/ArrowDropDown.d.ts +2 -0
- package/dist/assets/icons/ArrowDropDown.js +30 -0
- package/dist/assets/icons/ArrowDropUp.d.ts +2 -0
- package/dist/assets/icons/ArrowDropUp.js +30 -0
- package/dist/assets/icons/ArrowLeft.d.ts +2 -0
- package/dist/assets/icons/ArrowLeft.js +30 -0
- package/dist/assets/icons/ArrowRight.d.ts +2 -0
- package/dist/assets/icons/ArrowRight.js +30 -0
- package/dist/assets/icons/Board.d.ts +2 -0
- package/dist/assets/icons/Bold.d.ts +2 -0
- package/dist/assets/icons/Bold.js +30 -0
- package/dist/assets/icons/BulletedList.d.ts +2 -0
- package/dist/assets/icons/BulletedList.js +30 -0
- package/dist/assets/icons/Calendar.d.ts +2 -0
- package/dist/assets/icons/Calendar.js +32 -0
- package/dist/assets/icons/Check.d.ts +2 -0
- package/dist/assets/icons/Check.js +32 -0
- package/dist/assets/icons/CheckCircle.d.ts +2 -0
- package/dist/assets/icons/CheckCircle.js +30 -0
- package/dist/assets/icons/CheckboxCheckmark.d.ts +2 -0
- package/dist/assets/icons/CheckboxCheckmark.js +33 -0
- package/dist/assets/icons/CheckboxIndeterminate.d.ts +2 -0
- package/dist/assets/icons/CheckboxIndeterminate.js +33 -0
- package/dist/assets/icons/ChevronDown.d.ts +2 -0
- package/dist/assets/icons/ChevronDown.js +32 -0
- package/dist/assets/icons/ChevronLeft.d.ts +2 -0
- package/dist/assets/icons/ChevronLeft.js +32 -0
- package/dist/assets/icons/ChevronRight.d.ts +2 -0
- package/dist/assets/icons/ChevronRight.js +32 -0
- package/dist/assets/icons/ChevronUp.d.ts +2 -0
- package/dist/assets/icons/ChevronUp.js +32 -0
- package/dist/assets/icons/ChevronsLeft.d.ts +2 -0
- package/dist/assets/icons/ChevronsLeft.js +32 -0
- package/dist/assets/icons/ChevronsRight.d.ts +2 -0
- package/dist/assets/icons/ChevronsRight.js +32 -0
- package/dist/assets/icons/Clock.d.ts +2 -0
- package/dist/assets/icons/Clock.js +30 -0
- package/dist/assets/icons/Close.d.ts +2 -0
- package/dist/assets/icons/Close.js +30 -0
- package/dist/assets/icons/DateTime.d.ts +2 -0
- package/dist/assets/icons/DateTime.js +39 -0
- package/dist/assets/icons/DragIndicator.d.ts +2 -0
- package/dist/assets/icons/DragIndicator.js +30 -0
- package/dist/assets/icons/Edit.d.ts +2 -0
- package/dist/assets/icons/Emoji.d.ts +2 -0
- package/dist/assets/icons/File.d.ts +2 -0
- package/dist/assets/icons/File.js +32 -0
- package/dist/assets/icons/Grid.d.ts +2 -0
- package/dist/assets/icons/Highlight.d.ts +2 -0
- package/dist/assets/icons/Highlight.js +30 -0
- package/dist/assets/icons/HighlightOn.d.ts +6 -0
- package/dist/assets/icons/HighlightOn.js +55 -0
- package/dist/assets/icons/Home.d.ts +2 -0
- package/dist/assets/icons/Home.js +30 -0
- package/dist/assets/icons/Image.d.ts +2 -0
- package/dist/assets/icons/ImageError.d.ts +2 -0
- package/dist/assets/icons/Info.d.ts +2 -0
- package/dist/assets/icons/Info.js +41 -0
- package/dist/assets/icons/Italic.d.ts +2 -0
- package/dist/assets/icons/Italic.js +30 -0
- package/dist/assets/icons/Link.d.ts +2 -0
- package/dist/assets/icons/Link.js +30 -0
- package/dist/assets/icons/Loader.d.ts +2 -0
- package/dist/assets/icons/MapPin.d.ts +2 -0
- package/dist/assets/icons/Menu.d.ts +2 -0
- package/dist/assets/icons/Menu.js +30 -0
- package/dist/assets/icons/Minus.d.ts +2 -0
- package/dist/assets/icons/MoreHoriz.d.ts +2 -0
- package/dist/assets/icons/NumberedList.d.ts +2 -0
- package/dist/assets/icons/NumberedList.js +30 -0
- package/dist/assets/icons/Pause.d.ts +2 -0
- package/dist/assets/icons/Plus.d.ts +2 -0
- package/dist/assets/icons/PointerHorizontal.d.ts +2 -0
- package/dist/assets/icons/PointerHorizontal.js +30 -0
- package/dist/assets/icons/PointerVertical.d.ts +2 -0
- package/dist/assets/icons/PointerVertical.js +30 -0
- package/dist/assets/icons/Retry.d.ts +2 -0
- package/dist/assets/icons/Search.d.ts +2 -0
- package/dist/assets/icons/Search.js +30 -0
- package/dist/assets/icons/Send.d.ts +2 -0
- package/dist/assets/icons/Send.js +32 -0
- package/dist/assets/icons/Share.d.ts +2 -0
- package/dist/assets/icons/Slash.d.ts +2 -0
- package/dist/assets/icons/Strikethrough.d.ts +2 -0
- package/dist/assets/icons/Strikethrough.js +30 -0
- package/dist/assets/icons/TextColor.d.ts +6 -0
- package/dist/assets/icons/TextColor.js +52 -0
- package/dist/assets/icons/Today.d.ts +2 -0
- package/dist/assets/icons/Today.js +30 -0
- package/dist/assets/icons/Trash.d.ts +2 -0
- package/dist/assets/icons/Underlined.d.ts +2 -0
- package/dist/assets/icons/Underlined.js +32 -0
- package/dist/assets/icons/Upload.d.ts +2 -0
- package/dist/assets/icons/Upload.js +39 -0
- package/dist/assets/icons/User.d.ts +2 -0
- package/dist/assets/icons/Visibility.d.ts +2 -0
- package/dist/assets/icons/Visibility.js +30 -0
- package/dist/assets/icons/VisibilityOff.d.ts +2 -0
- package/dist/assets/icons/VisibilityOff.js +30 -0
- package/dist/assets/icons/WarningFilled.d.ts +2 -0
- package/dist/assets/icons/WarningFilled.js +32 -0
- package/dist/assets/icons/WarningOutlined.d.ts +2 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.js +7 -7
- package/dist/components/Menu/MenuDesktop.js +1 -1
- package/dist/components/Menu/MenuItem.js +4 -4
- package/dist/components/Menu/MenuMobile.js +5 -5
- package/dist/components/Menu/MenuPopover.js +2 -2
- package/dist/components/buttons/Button/Button.js +1 -1
- package/dist/components/buttons/PillButton/PillButton.js +4 -4
- package/dist/components/buttons/PillButton/pillButton.cva.d.ts +1 -1
- package/dist/components/buttons/SplitButton/SplitButton.js +3 -3
- package/dist/components/buttons/shared/ButtonContent.js +2 -2
- package/dist/components/buttons/shared/buttonContent.cva.d.ts +1 -1
- package/dist/components/inputs/Checkbox/Checkbox.d.ts +2 -1
- package/dist/components/inputs/Checkbox/Checkbox.js +102 -95
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +3 -2
- package/dist/components/inputs/Checkbox/CheckboxGroup.d.ts +2 -1
- package/dist/components/inputs/Checkbox/CheckboxGroup.js +115 -111
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +2 -2
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +22 -17
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +2 -2
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +23 -17
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +2 -2
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +25 -21
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +2 -2
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +238 -225
- package/dist/components/inputs/DateTime/shared/Calendar.js +1 -1
- package/dist/components/inputs/DateTime/shared/CalendarCell.js +1 -1
- package/dist/components/inputs/DateTime/shared/CalendarGrid.js +1 -1
- package/dist/components/inputs/DateTime/shared/CalendarHeader.js +10 -7
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +12 -8
- package/dist/components/inputs/DateTime/shared/DateField.d.ts +1 -2
- package/dist/components/inputs/DateTime/shared/DateField.js +4 -4
- package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +2 -2
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +16 -8
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +3 -3
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +2 -2
- package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +1 -1
- package/dist/components/inputs/DateTime/shared/MonthPicker.js +2 -2
- package/dist/components/inputs/DateTime/shared/RangeCalendar.js +2 -2
- package/dist/components/inputs/DateTime/shared/TimePickerForm.js +5 -4
- package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +2 -2
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +11 -10
- package/dist/components/inputs/DateTime/shared/YearPicker.js +2 -2
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.js +1 -46
- package/dist/components/inputs/DateTime/shared/useFirefoxDateSegmentSelectionGuard.js +1 -1
- package/dist/components/inputs/File/FileUpload.d.ts +1 -1
- package/dist/components/inputs/File/FileUpload.js +20 -20
- package/dist/components/inputs/File/InputUpload.d.ts +1 -1
- package/dist/components/inputs/File/InputUpload.js +19 -19
- package/dist/components/inputs/File/fileUpload.types.d.ts +1 -1
- package/dist/components/inputs/File/inputUpload.types.d.ts +1 -1
- package/dist/components/inputs/File/shared/FileCard.js +1 -1
- package/dist/components/inputs/File/shared/FileCardList.js +1 -1
- package/dist/components/inputs/File/shared/FileUploadContent.js +1 -1
- package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +3 -3
- package/dist/components/inputs/File/shared/FileUploadContentError.js +6 -5
- package/dist/components/inputs/File/shared/FileUploadContentFilled.js +6 -5
- package/dist/components/inputs/File/shared/FileUploadContentLoading.js +5 -4
- package/dist/components/inputs/File/shared/InputUploadContent.js +4 -4
- package/dist/components/inputs/File/shared/InputUploadFilled.js +3 -3
- package/dist/components/inputs/FormField/FormFieldError.js +1 -1
- package/dist/components/inputs/FormField/FormFieldHeader.js +4 -4
- package/dist/components/inputs/FormField/FormFieldHeaderClose.js +3 -3
- package/dist/components/inputs/FormField/FormFieldHelper.js +1 -1
- package/dist/components/inputs/FormField/FormFieldLabel.js +2 -2
- package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +1 -1
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +107 -109
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.d.ts +1 -2
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +254 -265
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +1 -2
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +24 -25
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.d.ts +1 -1
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +4 -3
- package/dist/components/inputs/Input/TextArea/TextArea.d.ts +1 -2
- package/dist/components/inputs/Input/TextArea/TextArea.js +117 -118
- package/dist/components/inputs/Input/TextInput/TextInput.d.ts +2 -2
- package/dist/components/inputs/Input/TextInput/TextInput.js +129 -129
- package/dist/components/inputs/Input/shared/InputContent.d.ts +1 -2
- package/dist/components/inputs/Input/shared/InputContent.js +48 -50
- package/dist/components/inputs/Inputs/Form.d.ts +4 -4
- package/dist/components/inputs/Inputs/Form.js +1 -1
- package/dist/components/inputs/Inputs/InputItem.d.ts +22 -22
- package/dist/components/inputs/Inputs/InputItem.js +37 -36
- package/dist/components/inputs/Inputs/Inputs.d.ts +2 -2
- package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +2 -1
- package/dist/components/inputs/RadioGroup/RadioGroup.js +113 -109
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +1 -1
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +16 -16
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +1 -1
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +20 -20
- package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +1 -1
- package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +1 -1
- package/dist/components/inputs/Selection/Select/QuerySelect.js +20 -20
- package/dist/components/inputs/Selection/Select/Select.d.ts +1 -1
- package/dist/components/inputs/Selection/Select/Select.js +23 -23
- package/dist/components/inputs/Selection/shared/SelectBase.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/SelectBase.js +37 -34
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +56 -58
- package/dist/components/inputs/Selection/shared/SelectInput.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectInput.js +56 -57
- package/dist/components/inputs/Selection/shared/SelectListBox.js +1 -1
- package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +2 -2
- package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +2 -2
- package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +1 -1
- package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +1 -1
- package/dist/components/inputs/Selection/shared/SelectMobile.js +4 -5
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +3 -3
- package/dist/components/inputs/Selection/shared/select.context.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/select.context.js +9 -5
- package/dist/components/inputs/Selection/shared/select.types.d.ts +1 -1
- package/dist/components/inputs/Skeleton/InputFrame.d.ts +0 -1
- package/dist/components/inputs/Skeleton/InputFrame.js +7 -10
- package/dist/components/inputs/Slider/Slider.d.ts +1 -1
- package/dist/components/inputs/Slider/Slider.js +20 -20
- package/dist/components/inputs/TextEditor/TextEditor.d.ts +1 -1
- package/dist/components/inputs/TextEditor/TextEditor.js +20 -20
- package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +2 -2
- package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +4 -4
- package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +4 -4
- package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +8 -5
- package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +3 -3
- package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +5 -4
- package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +5 -4
- package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +9 -6
- package/dist/components/inputs/Toggle/Toggle.d.ts +2 -1
- package/dist/components/inputs/Toggle/Toggle.js +65 -61
- package/dist/components/inputs/shared/CheckContent.js +1 -1
- package/dist/components/inputs/shared/InputClear.js +28 -45
- package/dist/components/inputs/shared/TooltipWrapper.d.ts +1 -1
- package/dist/components/inputs/shared/form.types.d.ts +8 -9
- package/dist/components/inputs/shared/input.cva.js +1 -1
- package/dist/components/inputs/shared/useStaticInputHandoff.js +38 -64
- package/dist/components/navigation/Accordion/Accordion.js +1 -1
- package/dist/components/navigation/Accordion/AccordionItem.js +3 -3
- package/dist/components/navigation/Stepper/Stepper.js +2 -2
- package/dist/components/navigation/Stepper/StepperItem.js +4 -4
- package/dist/components/overlays/ActionModal/ActionModal.js +1 -1
- package/dist/components/overlays/BottomSheet/BottomSheet.js +3 -3
- package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +4 -4
- package/dist/components/overlays/Drawer/Drawer.js +2 -2
- package/dist/components/overlays/Modal/Modal.js +3 -3
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +1 -1
- package/dist/components/overlays/Tooltip/Tooltip.js +8 -15
- package/dist/components/overlays/Tooltip/TooltipEllipsis.js +1 -1
- package/dist/components/segment/Segment.d.ts +1 -1
- package/dist/components/segment/Segment.js +21 -21
- package/dist/components/segment/SegmentItem.js +1 -1
- package/dist/components/segment/segment.types.d.ts +1 -1
- package/dist/components/shared/pagination/Pagination.js +1 -1
- package/dist/components/shared/pagination/PaginationList.js +9 -6
- package/dist/components/table/ColumnConfig.js +1 -1
- package/dist/components/table/InfiniteTable.js +1 -1
- package/dist/components/table/Table.js +8 -6
- package/dist/components/text/Link/Link.js +1 -1
- package/dist/components/text/Pill/Pill.js +3 -3
- package/dist/components/text/Tag/Tag.js +3 -3
- package/dist/config/confirmation.context.js +1 -1
- package/dist/config/link.context.js +1 -1
- package/dist/config/router.context.js +1 -1
- package/dist/config/theme.context.js +1 -1
- package/dist/config/uiConfig.context.d.ts +5 -14
- package/dist/config/uiConfig.context.js +11 -9
- package/dist/config/uiOverrides.context.js +2 -2
- package/dist/helpers/dynamicColumns.d.ts +1 -1
- package/dist/helpers/dynamicInputs.d.ts +7 -7
- package/dist/hooks/useAutosave.d.ts +4 -4
- package/dist/hooks/useAutosave.js +49 -64
- package/dist/hooks/useFilters.js +1 -1
- package/dist/hooks/useForm.d.ts +15 -39
- package/dist/hooks/useForm.js +43 -96
- package/dist/hooks/useFormAutosave.d.ts +9 -8
- package/dist/hooks/useFormAutosave.js +9 -23
- package/dist/hooks/useIntersectionObserver.js +1 -1
- package/dist/hooks/useLocalStorage.js +1 -1
- package/dist/hooks/usePagination.js +1 -1
- package/dist/hooks/useScrollableListBox.js +1 -1
- package/dist/hooks/useSorting.js +1 -1
- package/dist/hooks/useStateAndRef.js +1 -1
- package/dist/hooks/useTableColumnConfig.js +1 -1
- package/dist/index.d.ts +263 -1
- package/dist/index.js +71 -11
- package/package.json +3 -15
- 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/inputs/shared/form.binding.d.ts +0 -27
- package/dist/components/inputs/shared/form.binding.js +0 -57
- package/dist/components/inputs/shared/form.types.js +0 -8
- package/dist/rhf/Inputs.d.ts +0 -60
- package/dist/rhf/Inputs.js +0 -148
- package/dist/rhf/components.d.ts +0 -80
- package/dist/rhf/components.js +0 -101
- package/dist/rhf/dynamicInputs.d.ts +0 -18
- package/dist/rhf/dynamicInputs.js +0 -5
- package/dist/rhf/fieldAdapter.d.ts +0 -7
- package/dist/rhf/fieldAdapter.js +0 -40
- package/dist/rhf/form.types.d.ts +0 -12
- package/dist/rhf/useAutosave.d.ts +0 -10
- package/dist/rhf/useAutosave.js +0 -71
- package/dist/rhf/useForm.d.ts +0 -18
- package/dist/rhf/useForm.js +0 -48
- package/dist/rhf/useFormAutosave.d.ts +0 -15
- package/dist/rhf/useFormAutosave.js +0 -59
- package/dist/rhf.d.ts +0 -225
- package/dist/tanstack.d.ts +0 -224
- package/dist/tanstack.js +0 -141
- /package/dist/{rhf/entrypoints.type-test.d.ts → hooks/useAutosave.spec.d.ts} +0 -0
|
@@ -8,9 +8,9 @@ import { FormField } from "../FormField/FormField.js";
|
|
|
8
8
|
import { inputBaseDefinition, inputContentWrapperDefinition, inputSizeDefinition } from "../shared/input.cva.js";
|
|
9
9
|
import { InputClear } from "../shared/InputClear.js";
|
|
10
10
|
import { TooltipWrapper } from "../shared/TooltipWrapper.js";
|
|
11
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
11
12
|
import { clsx } from "clsx";
|
|
12
13
|
import { isValidElement, useId, useRef } from "react";
|
|
13
|
-
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
14
14
|
//#region src/components/inputs/Skeleton/InputFrame.tsx
|
|
15
15
|
var InputFrame = (props) => {
|
|
16
16
|
const ui = UIConfig.useConfig();
|
|
@@ -20,7 +20,7 @@ var InputFrame = (props) => {
|
|
|
20
20
|
const typographyCva = UIOverrides.useCva("typography.cva", typographyDefinition);
|
|
21
21
|
const generatedInputId = useId();
|
|
22
22
|
const pendingStaticPressPointerIdRef = useRef(null);
|
|
23
|
-
const { ref, children, formFieldRef, labelProps: labelPropsProp, headerProps, error, label, tooltipText, helperText, isRequired, rightContent, isDisabled, isHeaderHidden, hideLabel: hideLabelProp, headerClassName, errorClassName, className, leadingContent, leadingIcon, actionContent, actionContentPlacement = "content-wrapper", trailingContent, trailingIcon, trailingAction, unit, isLoading, action, isClearable: isClearableProp,
|
|
23
|
+
const { ref, children, formFieldRef, labelProps: labelPropsProp, headerProps, error, label, tooltipText, helperText, isRequired, rightContent, isDisabled, isHeaderHidden, hideLabel: hideLabelProp, headerClassName, errorClassName, className, leadingContent, leadingIcon, actionContent, actionContentPlacement = "content-wrapper", trailingContent, trailingIcon, trailingAction, unit, isLoading, action, isClearable: isClearableProp, showClear, onStaticInteract, onStaticPress, staticPressTarget = "frame", clearClassName, onClear, dataAttributes, typographySize, id: idProp, inputClassName, contentClassName, contentWrapperClassName, contentGroup = "input", contentAndTrailingClassName, wrapContentAndTrailing, wrapTrailingContent = true, reserveTrailingContent, labelPlacement = "content-wrapper", trailingClassName, onMouseEnter, onFocusCapture, variant: variantProp, as: asProp, size: sizeProp } = props;
|
|
24
24
|
const as = asProp ?? ui.input.as;
|
|
25
25
|
const size = sizeProp ?? ui.input.size;
|
|
26
26
|
const variant = variantProp ?? ui.input.variant;
|
|
@@ -99,11 +99,11 @@ var InputFrame = (props) => {
|
|
|
99
99
|
})
|
|
100
100
|
]
|
|
101
101
|
});
|
|
102
|
-
const trailingContentNodes = hasTrailingContent ? /* @__PURE__ */ jsxs(Fragment
|
|
102
|
+
const trailingContentNodes = hasTrailingContent ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
103
103
|
hasClear && /* @__PURE__ */ jsx(InputClear, {
|
|
104
104
|
onClear: () => onClear?.(),
|
|
105
105
|
className: clearClassName,
|
|
106
|
-
show: !!showClear
|
|
106
|
+
show: !!showClear,
|
|
107
107
|
renderStatic: true
|
|
108
108
|
}),
|
|
109
109
|
trailingContent,
|
|
@@ -149,10 +149,9 @@ var InputFrame = (props) => {
|
|
|
149
149
|
const inputFrameContent = wrapContentAndTrailing ? /* @__PURE__ */ jsxs("div", {
|
|
150
150
|
className: clsx("flex w-full items-center gap-input-gap-input-text-to-elements", contentAndTrailingClassName),
|
|
151
151
|
children: [contentRow, trailingRow]
|
|
152
|
-
}) : /* @__PURE__ */ jsxs(Fragment
|
|
152
|
+
}) : /* @__PURE__ */ jsxs(Fragment, { children: [contentRow, trailingRow] });
|
|
153
153
|
const shouldReplayStaticPress = (target) => staticPressTarget === "frame" || target instanceof Element && !!target.closest("[data-static-press-action]");
|
|
154
154
|
const isStaticPressActionTarget = (target_0) => target_0 instanceof Element && !!target_0.closest("[data-static-press-action]");
|
|
155
|
-
const isStaticClearActionTarget = (target_1) => target_1 instanceof Element && !!target_1.closest("[data-static-clear-action]");
|
|
156
155
|
return /* @__PURE__ */ jsx(TooltipWrapper, {
|
|
157
156
|
as,
|
|
158
157
|
error,
|
|
@@ -171,7 +170,7 @@ var InputFrame = (props) => {
|
|
|
171
170
|
},
|
|
172
171
|
onFocusCapture: (event_0) => {
|
|
173
172
|
onFocusCapture?.(event_0);
|
|
174
|
-
if (pendingStaticPressPointerIdRef.current == null
|
|
173
|
+
if (pendingStaticPressPointerIdRef.current == null) onStaticInteract?.(true, event_0.target);
|
|
175
174
|
},
|
|
176
175
|
children: /* @__PURE__ */ jsx("div", {
|
|
177
176
|
ref,
|
|
@@ -182,10 +181,9 @@ var InputFrame = (props) => {
|
|
|
182
181
|
}), inputClassName),
|
|
183
182
|
tabIndex: isDisabled ? -1 : 0,
|
|
184
183
|
onFocus: (event_1) => {
|
|
185
|
-
if (pendingStaticPressPointerIdRef.current == null
|
|
184
|
+
if (pendingStaticPressPointerIdRef.current == null) onStaticInteract?.(true, event_1.target);
|
|
186
185
|
},
|
|
187
186
|
onClick: (event_2) => {
|
|
188
|
-
if (isStaticClearActionTarget(event_2.target)) return;
|
|
189
187
|
if (onStaticPress && shouldReplayStaticPress(event_2.target)) {
|
|
190
188
|
onStaticPress();
|
|
191
189
|
return;
|
|
@@ -196,7 +194,6 @@ var InputFrame = (props) => {
|
|
|
196
194
|
if (onStaticPress && shouldReplayStaticPress(event_3.target) || isStaticPressActionTarget(event_3.target)) pendingStaticPressPointerIdRef.current = event_3.pointerId;
|
|
197
195
|
},
|
|
198
196
|
onPointerDown: (event_4) => {
|
|
199
|
-
if (isStaticClearActionTarget(event_4.target)) return;
|
|
200
197
|
if (pendingStaticPressPointerIdRef.current === event_4.pointerId) return;
|
|
201
198
|
if (onStaticPress && shouldReplayStaticPress(event_4.target)) {
|
|
202
199
|
pendingStaticPressPointerIdRef.current = event_4.pointerId;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FocusEvent, Ref } from 'react';
|
|
2
2
|
import { SliderProps as AriaSliderProps } from 'react-aria-components';
|
|
3
|
-
import { FieldValues } from '
|
|
3
|
+
import { FieldValues } from 'react-hook-form';
|
|
4
4
|
import { FormFieldProps } from '../FormField/FormField';
|
|
5
5
|
import { ControlProps } from '../shared/form.types';
|
|
6
6
|
type SliderValue<IsRange extends boolean = false> = IsRange extends false ? number : number[];
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Typography } from "../../text/Typography/Typography.js";
|
|
2
2
|
import { UIConfig } from "../../../config/uiConfig.context.js";
|
|
3
3
|
import { uiOutlineClass } from "../../outline.clsx.js";
|
|
4
|
-
import { FieldController } from "../shared/form.binding.js";
|
|
5
4
|
import { FormField } from "../FormField/FormField.js";
|
|
6
|
-
import { clsx } from "clsx";
|
|
7
|
-
import { Slider, SliderThumb, SliderTrack } from "react-aria-components";
|
|
8
5
|
import { c } from "react/compiler-runtime";
|
|
9
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { clsx } from "clsx";
|
|
8
|
+
import { Slider, SliderThumb, SliderTrack } from "react-aria-components";
|
|
10
9
|
import { mergeRefs } from "@react-aria/utils";
|
|
10
|
+
import { Controller } from "react-hook-form";
|
|
11
11
|
//#region src/components/inputs/Slider/Slider.tsx
|
|
12
12
|
var SliderBase = (props) => {
|
|
13
13
|
const $ = c(61);
|
|
@@ -223,33 +223,33 @@ var SliderBase = (props) => {
|
|
|
223
223
|
};
|
|
224
224
|
var Slider$1 = (props) => {
|
|
225
225
|
const $ = c(15);
|
|
226
|
-
if ("
|
|
227
|
-
let
|
|
226
|
+
if ("formControl" in props && props.formControl) {
|
|
227
|
+
let formControl;
|
|
228
228
|
let innerProps;
|
|
229
229
|
let ref;
|
|
230
230
|
if ($[0] !== props) {
|
|
231
|
-
({
|
|
231
|
+
({formControl, ref, ...innerProps} = props);
|
|
232
232
|
$[0] = props;
|
|
233
|
-
$[1] =
|
|
233
|
+
$[1] = formControl;
|
|
234
234
|
$[2] = innerProps;
|
|
235
235
|
$[3] = ref;
|
|
236
236
|
} else {
|
|
237
|
-
|
|
237
|
+
formControl = $[1];
|
|
238
238
|
innerProps = $[2];
|
|
239
239
|
ref = $[3];
|
|
240
240
|
}
|
|
241
241
|
let t0;
|
|
242
242
|
if ($[4] !== innerProps || $[5] !== props.error || $[6] !== props.isDisabled || $[7] !== ref) {
|
|
243
243
|
t0 = (t1) => {
|
|
244
|
-
const { field
|
|
244
|
+
const { field, fieldState: t2 } = t1;
|
|
245
245
|
const { error } = t2;
|
|
246
246
|
return /* @__PURE__ */ jsx(SliderBase, {
|
|
247
247
|
...innerProps,
|
|
248
|
-
ref: mergeRefs(ref,
|
|
249
|
-
value:
|
|
250
|
-
onBlur:
|
|
251
|
-
onChange:
|
|
252
|
-
isDisabled:
|
|
248
|
+
ref: mergeRefs(ref, field.ref),
|
|
249
|
+
value: field.value,
|
|
250
|
+
onBlur: field.onBlur,
|
|
251
|
+
onChange: field.onChange,
|
|
252
|
+
isDisabled: field.disabled || props.isDisabled,
|
|
253
253
|
error: props.error ?? error?.message
|
|
254
254
|
});
|
|
255
255
|
};
|
|
@@ -260,14 +260,14 @@ var Slider$1 = (props) => {
|
|
|
260
260
|
$[8] = t0;
|
|
261
261
|
} else t0 = $[8];
|
|
262
262
|
let t1;
|
|
263
|
-
if ($[9] !==
|
|
264
|
-
t1 = /* @__PURE__ */ jsx(
|
|
265
|
-
control:
|
|
266
|
-
name:
|
|
263
|
+
if ($[9] !== formControl.control || $[10] !== formControl.name || $[11] !== t0) {
|
|
264
|
+
t1 = /* @__PURE__ */ jsx(Controller, {
|
|
265
|
+
control: formControl.control,
|
|
266
|
+
name: formControl.name,
|
|
267
267
|
render: t0
|
|
268
268
|
});
|
|
269
|
-
$[9] =
|
|
270
|
-
$[10] =
|
|
269
|
+
$[9] = formControl.control;
|
|
270
|
+
$[10] = formControl.name;
|
|
271
271
|
$[11] = t0;
|
|
272
272
|
$[12] = t1;
|
|
273
273
|
} else t1 = $[12];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { JSONContent } from '@tiptap/react';
|
|
2
2
|
import { Ref } from 'react';
|
|
3
|
-
import { FieldValues } from '
|
|
3
|
+
import { FieldValues } from 'react-hook-form';
|
|
4
4
|
import { FormFieldProps } from '../FormField/FormField';
|
|
5
5
|
import { ControlProps } from '../shared/form.types';
|
|
6
6
|
export interface TextEditorValue {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
2
2
|
import { isEqual } from "../../../utils/isEqual.js";
|
|
3
3
|
import { uiOutlineClass } from "../../outline.clsx.js";
|
|
4
|
-
import { FieldController } from "../shared/form.binding.js";
|
|
5
4
|
import { FormFieldLabel } from "../FormField/FormFieldLabel.js";
|
|
6
5
|
import { FormField } from "../FormField/FormField.js";
|
|
7
6
|
import { inputSideDefinition } from "../shared/input.cva.js";
|
|
8
7
|
import { TextEditorToolbar } from "./Toolbar/TextEditorToolbar.js";
|
|
9
|
-
import { clsx } from "clsx";
|
|
10
|
-
import { useEffect, useRef, useState } from "react";
|
|
11
8
|
import { c } from "react/compiler-runtime";
|
|
12
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
import { clsx } from "clsx";
|
|
11
|
+
import { useEffect, useRef, useState } from "react";
|
|
13
12
|
import { useFocusVisible, useFocusWithin, useHover, useLabel } from "react-aria";
|
|
14
13
|
import { mergeRefs } from "@react-aria/utils";
|
|
14
|
+
import { Controller } from "react-hook-form";
|
|
15
15
|
import { Color } from "@tiptap/extension-color";
|
|
16
16
|
import { Highlight } from "@tiptap/extension-highlight";
|
|
17
17
|
import { Link } from "@tiptap/extension-link";
|
|
@@ -136,34 +136,34 @@ var TextEditorBase = ({ ref, as = "default", placeholder, label, hideLabel, tool
|
|
|
136
136
|
};
|
|
137
137
|
var TextEditor = (props) => {
|
|
138
138
|
const $ = c(15);
|
|
139
|
-
if ("
|
|
140
|
-
let
|
|
139
|
+
if ("formControl" in props && props.formControl) {
|
|
140
|
+
let formControl;
|
|
141
141
|
let innerProps;
|
|
142
142
|
let ref;
|
|
143
143
|
if ($[0] !== props) {
|
|
144
|
-
({
|
|
144
|
+
({formControl, ref, ...innerProps} = props);
|
|
145
145
|
$[0] = props;
|
|
146
|
-
$[1] =
|
|
146
|
+
$[1] = formControl;
|
|
147
147
|
$[2] = innerProps;
|
|
148
148
|
$[3] = ref;
|
|
149
149
|
} else {
|
|
150
|
-
|
|
150
|
+
formControl = $[1];
|
|
151
151
|
innerProps = $[2];
|
|
152
152
|
ref = $[3];
|
|
153
153
|
}
|
|
154
154
|
let t0;
|
|
155
155
|
if ($[4] !== innerProps || $[5] !== props.error || $[6] !== props.isDisabled || $[7] !== ref) {
|
|
156
156
|
t0 = (t1) => {
|
|
157
|
-
const { field
|
|
157
|
+
const { field, fieldState: t2 } = t1;
|
|
158
158
|
const { error, isDirty } = t2;
|
|
159
159
|
return /* @__PURE__ */ jsx(TextEditorBase, {
|
|
160
160
|
...innerProps,
|
|
161
|
-
ref: mergeRefs(ref,
|
|
162
|
-
value:
|
|
163
|
-
onChange:
|
|
164
|
-
onBlur:
|
|
161
|
+
ref: mergeRefs(ref, field.ref),
|
|
162
|
+
value: field.value,
|
|
163
|
+
onChange: field.onChange,
|
|
164
|
+
onBlur: field.onBlur,
|
|
165
165
|
isDirty,
|
|
166
|
-
isDisabled:
|
|
166
|
+
isDisabled: field.disabled || props.isDisabled,
|
|
167
167
|
error: props.error ?? error?.message
|
|
168
168
|
});
|
|
169
169
|
};
|
|
@@ -174,14 +174,14 @@ var TextEditor = (props) => {
|
|
|
174
174
|
$[8] = t0;
|
|
175
175
|
} else t0 = $[8];
|
|
176
176
|
let t1;
|
|
177
|
-
if ($[9] !==
|
|
178
|
-
t1 = /* @__PURE__ */ jsx(
|
|
179
|
-
control:
|
|
180
|
-
name:
|
|
177
|
+
if ($[9] !== formControl.control || $[10] !== formControl.name || $[11] !== t0) {
|
|
178
|
+
t1 = /* @__PURE__ */ jsx(Controller, {
|
|
179
|
+
control: formControl.control,
|
|
180
|
+
name: formControl.name,
|
|
181
181
|
render: t0
|
|
182
182
|
});
|
|
183
|
-
$[9] =
|
|
184
|
-
$[10] =
|
|
183
|
+
$[9] = formControl.control;
|
|
184
|
+
$[10] = formControl.name;
|
|
185
185
|
$[11] = t0;
|
|
186
186
|
$[12] = t1;
|
|
187
187
|
} else t1 = $[12];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { clsx } from "clsx";
|
|
2
|
-
import { ColorSwatch, ColorSwatchPicker, ColorSwatchPickerItem } from "react-aria-components";
|
|
3
1
|
import { c } from "react/compiler-runtime";
|
|
4
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { clsx } from "clsx";
|
|
4
|
+
import { ColorSwatch, ColorSwatchPicker, ColorSwatchPickerItem } from "react-aria-components";
|
|
5
5
|
//#region src/components/inputs/TextEditor/Toolbar/ColorPicker.tsx
|
|
6
6
|
var ColorPicker = (t0) => {
|
|
7
7
|
const $ = c(8);
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
+
import { ArrowDropDownIcon } from "../../../../assets/icons/ArrowDropDown.js";
|
|
1
2
|
import { UIOverrides } from "../../../../config/uiOverrides.context.js";
|
|
2
3
|
import { Typography } from "../../../text/Typography/Typography.js";
|
|
3
4
|
import { useInputCva } from "../../shared/input.cva.js";
|
|
4
5
|
import { popoverDefinition } from "../../../shared/popover.cva.js";
|
|
5
6
|
import { ColorPicker } from "./ColorPicker.js";
|
|
6
|
-
import {
|
|
7
|
+
import { c } from "react/compiler-runtime";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
9
|
import { clsx } from "clsx";
|
|
8
10
|
import { useState } from "react";
|
|
9
11
|
import { Button, Dialog, DialogTrigger, Popover } from "react-aria-components";
|
|
10
|
-
import { c } from "react/compiler-runtime";
|
|
11
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
12
|
//#region src/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.tsx
|
|
13
13
|
var ColorPickerDropdown = (t0) => {
|
|
14
14
|
const $ = c(28);
|
|
@@ -54,7 +54,7 @@ var ColorPickerDropdown = (t0) => {
|
|
|
54
54
|
} else t5 = $[7];
|
|
55
55
|
let t6;
|
|
56
56
|
if ($[8] !== t5) {
|
|
57
|
-
t6 = /* @__PURE__ */ jsx(
|
|
57
|
+
t6 = /* @__PURE__ */ jsx(ArrowDropDownIcon, {
|
|
58
58
|
className: t5,
|
|
59
59
|
"aria-hidden": "true"
|
|
60
60
|
});
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
+
import { LinkIcon } from "../../../../assets/icons/Link.js";
|
|
1
2
|
import { Button } from "../../../buttons/Button/Button.js";
|
|
2
3
|
import { InlineIconButton } from "../../../buttons/InlineIconButton/InlineIconButton.js";
|
|
3
4
|
import "../../../../config/i18n.js";
|
|
4
5
|
import { TextInput } from "../../Input/TextInput/TextInput.js";
|
|
5
6
|
import { ResponsivePopover } from "../../../overlays/ResponsivePopover/ResponsivePopover.js";
|
|
6
|
-
import { Link } from "lucide-react";
|
|
7
|
-
import { clsx } from "clsx";
|
|
8
|
-
import { useEffect, useState } from "react";
|
|
9
7
|
import { c } from "react/compiler-runtime";
|
|
10
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
import { clsx } from "clsx";
|
|
10
|
+
import { useEffect, useState } from "react";
|
|
11
11
|
import { useTranslation } from "react-i18next";
|
|
12
12
|
//#region src/components/inputs/TextEditor/Toolbar/HyperlinkAction.tsx
|
|
13
13
|
var HyperlinkAction = (t0) => {
|
|
@@ -79,7 +79,7 @@ var HyperlinkAction = (t0) => {
|
|
|
79
79
|
t9 = /* @__PURE__ */ jsx(InlineIconButton, {
|
|
80
80
|
color: "secondary",
|
|
81
81
|
label: t6,
|
|
82
|
-
icon:
|
|
82
|
+
icon: LinkIcon,
|
|
83
83
|
className: t7,
|
|
84
84
|
isDisabled: t8
|
|
85
85
|
});
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { AlignCenterIcon } from "../../../../assets/icons/AlignCenter.js";
|
|
2
|
+
import { AlignLeftIcon } from "../../../../assets/icons/AlignLeft.js";
|
|
3
|
+
import { AlignLeftRightIcon } from "../../../../assets/icons/AlignLeftRight.js";
|
|
4
|
+
import { AlignRightIcon } from "../../../../assets/icons/AlignRight.js";
|
|
1
5
|
import "../../../../config/i18n.js";
|
|
2
6
|
import { Select } from "../../Selection/Select/Select.js";
|
|
3
|
-
import { AlignCenter, AlignJustify, AlignLeft, AlignRight } from "lucide-react";
|
|
4
7
|
import { c } from "react/compiler-runtime";
|
|
5
8
|
import { jsx } from "react/jsx-runtime";
|
|
6
9
|
import { useTranslation } from "react-i18next";
|
|
@@ -37,10 +40,10 @@ var TextAlignSelect = (t0) => {
|
|
|
37
40
|
let t3;
|
|
38
41
|
if ($0[5] !== getItem) {
|
|
39
42
|
t3 = [
|
|
40
|
-
getItem("left",
|
|
41
|
-
getItem("center",
|
|
42
|
-
getItem("right",
|
|
43
|
-
getItem("justify",
|
|
43
|
+
getItem("left", AlignLeftIcon),
|
|
44
|
+
getItem("center", AlignCenterIcon),
|
|
45
|
+
getItem("right", AlignRightIcon),
|
|
46
|
+
getItem("justify", AlignLeftRightIcon)
|
|
44
47
|
].filter(_temp2);
|
|
45
48
|
$0[5] = getItem;
|
|
46
49
|
$0[6] = t3;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { TextColorIcon } from "../../../../assets/icons/TextColor.js";
|
|
1
2
|
import { ColorPickerDropdown } from "./ColorPickerDropdown.js";
|
|
2
3
|
import { defaultColors } from "../textEditor.types.js";
|
|
3
|
-
import { Baseline } from "lucide-react";
|
|
4
4
|
import { c } from "react/compiler-runtime";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
//#region src/components/inputs/TextEditor/Toolbar/TextColorSelect.tsx
|
|
@@ -27,9 +27,9 @@ var TextColorSelect = (t0) => {
|
|
|
27
27
|
const t3 = !editor.isEditable;
|
|
28
28
|
let t4;
|
|
29
29
|
if ($[4] !== textColor) {
|
|
30
|
-
t4 = /* @__PURE__ */ jsx(
|
|
30
|
+
t4 = /* @__PURE__ */ jsx(TextColorIcon, {
|
|
31
31
|
className: "size-6",
|
|
32
|
-
|
|
32
|
+
textColor
|
|
33
33
|
});
|
|
34
34
|
$[4] = textColor;
|
|
35
35
|
$[5] = t4;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { HighlightIcon } from "../../../../assets/icons/Highlight.js";
|
|
2
|
+
import { HighlightOnIcon } from "../../../../assets/icons/HighlightOn.js";
|
|
1
3
|
import { ColorPickerDropdown } from "./ColorPickerDropdown.js";
|
|
2
4
|
import { defaultColors } from "../textEditor.types.js";
|
|
3
|
-
import { Highlighter } from "lucide-react";
|
|
4
5
|
import { c } from "react/compiler-runtime";
|
|
5
6
|
import { jsx } from "react/jsx-runtime";
|
|
6
7
|
//#region src/components/inputs/TextEditor/Toolbar/TextHighlightSelect.tsx
|
|
@@ -28,10 +29,10 @@ var TextHighlightSelect = (t0) => {
|
|
|
28
29
|
const t3 = !editor.isEditable;
|
|
29
30
|
let t4;
|
|
30
31
|
if ($[4] !== highlightColor) {
|
|
31
|
-
t4 = highlightColor ? /* @__PURE__ */ jsx(
|
|
32
|
+
t4 = highlightColor ? /* @__PURE__ */ jsx(HighlightOnIcon, {
|
|
32
33
|
className: "size-6",
|
|
33
|
-
|
|
34
|
-
}) : /* @__PURE__ */ jsx(
|
|
34
|
+
highlightColor
|
|
35
|
+
}) : /* @__PURE__ */ jsx(HighlightIcon, { className: "size-6" });
|
|
35
36
|
$[4] = highlightColor;
|
|
36
37
|
$[5] = t4;
|
|
37
38
|
} else t4 = $[5];
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { BulletedListIcon } from "../../../../assets/icons/BulletedList.js";
|
|
2
|
+
import { NumberedListIcon } from "../../../../assets/icons/NumberedList.js";
|
|
1
3
|
import { InlineIconButton } from "../../../buttons/InlineIconButton/InlineIconButton.js";
|
|
2
4
|
import "../../../../config/i18n.js";
|
|
3
|
-
import { List, ListOrdered } from "lucide-react";
|
|
4
|
-
import { clsx } from "clsx";
|
|
5
5
|
import { c } from "react/compiler-runtime";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
import { clsx } from "clsx";
|
|
7
8
|
import { useTranslation } from "react-i18next";
|
|
8
9
|
//#region src/components/inputs/TextEditor/Toolbar/TextListActions.tsx
|
|
9
10
|
var TextListActions = (t0) => {
|
|
@@ -37,7 +38,7 @@ var TextListActions = (t0) => {
|
|
|
37
38
|
can: t2,
|
|
38
39
|
isEnabled: t3,
|
|
39
40
|
label: t(t4),
|
|
40
|
-
icon:
|
|
41
|
+
icon: BulletedListIcon,
|
|
41
42
|
onPress: () => {
|
|
42
43
|
editor.chain().focus().toggleBulletList().run();
|
|
43
44
|
},
|
|
@@ -46,7 +47,7 @@ var TextListActions = (t0) => {
|
|
|
46
47
|
can: !!editor.extensionManager.extensions.find(_temp3),
|
|
47
48
|
isEnabled: () => editor.isEditable && editor.can().toggleOrderedList(),
|
|
48
49
|
label: t(_temp4),
|
|
49
|
-
icon:
|
|
50
|
+
icon: NumberedListIcon,
|
|
50
51
|
onPress: () => {
|
|
51
52
|
editor.chain().focus().toggleOrderedList().run();
|
|
52
53
|
},
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import { BoldIcon } from "../../../../assets/icons/Bold.js";
|
|
2
|
+
import { ItalicIcon } from "../../../../assets/icons/Italic.js";
|
|
3
|
+
import { StrikethroughIcon } from "../../../../assets/icons/Strikethrough.js";
|
|
4
|
+
import { UnderlinedIcon } from "../../../../assets/icons/Underlined.js";
|
|
1
5
|
import { InlineIconButton } from "../../../buttons/InlineIconButton/InlineIconButton.js";
|
|
2
6
|
import "../../../../config/i18n.js";
|
|
3
|
-
import { Bold, Italic, Strikethrough, Underline } from "lucide-react";
|
|
4
|
-
import { clsx } from "clsx";
|
|
5
7
|
import { c } from "react/compiler-runtime";
|
|
6
8
|
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
import { clsx } from "clsx";
|
|
7
10
|
import { useTranslation } from "react-i18next";
|
|
8
11
|
//#region src/components/inputs/TextEditor/Toolbar/TextMarksActions.tsx
|
|
9
12
|
var TextMarksActions = (t0) => {
|
|
@@ -38,7 +41,7 @@ var TextMarksActions = (t0) => {
|
|
|
38
41
|
can: t2,
|
|
39
42
|
isEnabled: t3,
|
|
40
43
|
label: t(t4),
|
|
41
|
-
icon:
|
|
44
|
+
icon: BoldIcon,
|
|
42
45
|
onPress: () => {
|
|
43
46
|
editor.chain().focus().toggleBold().run();
|
|
44
47
|
},
|
|
@@ -48,7 +51,7 @@ var TextMarksActions = (t0) => {
|
|
|
48
51
|
can: !!editor.extensionManager.extensions.find(_temp3),
|
|
49
52
|
isEnabled: () => editor.isEditable && editor.can().toggleItalic(),
|
|
50
53
|
label: t(_temp4),
|
|
51
|
-
icon:
|
|
54
|
+
icon: ItalicIcon,
|
|
52
55
|
onPress: () => {
|
|
53
56
|
editor.chain().focus().toggleItalic().run();
|
|
54
57
|
},
|
|
@@ -58,7 +61,7 @@ var TextMarksActions = (t0) => {
|
|
|
58
61
|
can: !!editor.extensionManager.extensions.find(_temp5),
|
|
59
62
|
isEnabled: () => editor.isEditable && editor.can().toggleStrike(),
|
|
60
63
|
label: t(_temp6),
|
|
61
|
-
icon:
|
|
64
|
+
icon: StrikethroughIcon,
|
|
62
65
|
onPress: () => {
|
|
63
66
|
editor.chain().focus().toggleStrike().run();
|
|
64
67
|
},
|
|
@@ -68,7 +71,7 @@ var TextMarksActions = (t0) => {
|
|
|
68
71
|
can: !!editor.extensionManager.extensions.find(_temp7),
|
|
69
72
|
isEnabled: () => editor.isEditable && editor.can().toggleUnderline(),
|
|
70
73
|
label: t(_temp8),
|
|
71
|
-
icon:
|
|
74
|
+
icon: UnderlinedIcon,
|
|
72
75
|
onPress: () => {
|
|
73
76
|
editor.chain().focus().toggleUnderline().run();
|
|
74
77
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Ref } from 'react';
|
|
2
2
|
import { SwitchProps as AriaSwitchProps } from 'react-aria-components';
|
|
3
|
-
import { FieldValues } from '
|
|
3
|
+
import { FieldValues } from 'react-hook-form';
|
|
4
4
|
import { FormFieldErrorProps } from '../FormField/FormFieldError';
|
|
5
5
|
import { ControlProps } from '../shared/form.types';
|
|
6
6
|
import { ToggleVariantProps } from './toggle.cva';
|
|
@@ -9,6 +9,7 @@ interface ToggleBaseProps extends FormFieldErrorProps, ToggleVariantProps, Omit<
|
|
|
9
9
|
children?: string;
|
|
10
10
|
isDirty?: boolean;
|
|
11
11
|
isRequired?: boolean;
|
|
12
|
+
fireBlurOnChange?: boolean;
|
|
12
13
|
}
|
|
13
14
|
export type ToggleProps = ToggleBaseProps;
|
|
14
15
|
export type ControlledToggleProps<TFieldValues extends FieldValues> = ControlProps<ToggleProps, TFieldValues, "isSelected">;
|