@povio/ui 3.3.0 → 3.4.0-rc.10
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/locales/en/translation.json.d.ts +158 -0
- package/dist/assets/locales/sl/translation.json.d.ts +154 -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 +1 -2
- package/dist/components/inputs/Checkbox/Checkbox.js +95 -102
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +2 -3
- package/dist/components/inputs/Checkbox/CheckboxGroup.d.ts +1 -2
- package/dist/components/inputs/Checkbox/CheckboxGroup.js +111 -115
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +2 -2
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +17 -22
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +2 -2
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +17 -23
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +2 -2
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +21 -25
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +2 -2
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +225 -238
- 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 +7 -10
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +8 -12
- package/dist/components/inputs/DateTime/shared/DateField.d.ts +2 -1
- 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 +8 -16
- 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 +4 -5
- package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +2 -2
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +10 -11
- package/dist/components/inputs/DateTime/shared/YearPicker.js +2 -2
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.js +46 -1
- 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 +5 -6
- package/dist/components/inputs/File/shared/FileUploadContentFilled.js +5 -6
- package/dist/components/inputs/File/shared/FileUploadContentLoading.js +4 -5
- 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 +109 -107
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.d.ts +2 -1
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +265 -254
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +2 -1
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +25 -24
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.d.ts +1 -1
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +3 -4
- package/dist/components/inputs/Input/TextArea/TextArea.d.ts +2 -1
- package/dist/components/inputs/Input/TextArea/TextArea.js +118 -117
- 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 +2 -1
- package/dist/components/inputs/Input/shared/InputContent.js +50 -48
- 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 +36 -37
- package/dist/components/inputs/Inputs/Inputs.d.ts +2 -2
- package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +1 -2
- package/dist/components/inputs/RadioGroup/RadioGroup.js +109 -113
- 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 +34 -37
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +58 -56
- package/dist/components/inputs/Selection/shared/SelectInput.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectInput.js +57 -56
- 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 +5 -4
- 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 +5 -9
- package/dist/components/inputs/Selection/shared/select.types.d.ts +1 -1
- package/dist/components/inputs/Skeleton/InputFrame.d.ts +1 -0
- package/dist/components/inputs/Skeleton/InputFrame.js +10 -7
- 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 +5 -8
- package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +3 -3
- package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +4 -5
- package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +4 -5
- package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +6 -9
- package/dist/components/inputs/Toggle/Toggle.d.ts +1 -2
- package/dist/components/inputs/Toggle/Toggle.js +61 -65
- package/dist/components/inputs/shared/CheckContent.js +1 -1
- package/dist/components/inputs/shared/InputClear.js +45 -28
- package/dist/components/inputs/shared/TooltipWrapper.d.ts +1 -1
- package/dist/components/inputs/shared/form.binding.d.ts +27 -0
- package/dist/components/inputs/shared/form.binding.js +57 -0
- package/dist/components/inputs/shared/form.types.d.ts +9 -8
- package/dist/components/inputs/shared/form.types.js +8 -0
- package/dist/components/inputs/shared/input.cva.js +1 -1
- package/dist/components/inputs/shared/useStaticInputHandoff.js +64 -38
- 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 +15 -8
- 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 +6 -9
- package/dist/components/table/ColumnConfig.js +1 -1
- package/dist/components/table/InfiniteTable.js +1 -1
- package/dist/components/table/Table.js +6 -8
- 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 +14 -5
- package/dist/config/uiConfig.context.js +9 -11
- 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 +64 -49
- package/dist/hooks/useFilters.js +1 -1
- package/dist/hooks/useForm.d.ts +39 -15
- package/dist/hooks/useForm.js +96 -43
- package/dist/hooks/useFormAutosave.d.ts +8 -9
- package/dist/hooks/useFormAutosave.js +23 -9
- 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 +1 -263
- package/dist/index.js +11 -71
- package/dist/rhf/Inputs.d.ts +60 -0
- package/dist/rhf/Inputs.js +148 -0
- package/dist/rhf/components.d.ts +80 -0
- package/dist/rhf/components.js +101 -0
- package/dist/rhf/dynamicInputs.d.ts +18 -0
- package/dist/rhf/dynamicInputs.js +5 -0
- package/dist/rhf/fieldAdapter.d.ts +7 -0
- package/dist/rhf/fieldAdapter.js +40 -0
- package/dist/rhf/form.types.d.ts +12 -0
- package/dist/rhf/useAutosave.d.ts +10 -0
- package/dist/rhf/useAutosave.js +71 -0
- package/dist/rhf/useForm.d.ts +18 -0
- package/dist/rhf/useForm.js +48 -0
- package/dist/rhf/useFormAutosave.d.ts +15 -0
- package/dist/rhf/useFormAutosave.js +59 -0
- package/dist/rhf.d.ts +225 -0
- package/dist/tanstack.d.ts +224 -0
- package/dist/tanstack.js +141 -0
- package/package.json +15 -3
- package/dist/assets/icons/Account.d.ts +0 -2
- package/dist/assets/icons/AlignCenter.d.ts +0 -2
- package/dist/assets/icons/AlignCenter.js +0 -30
- package/dist/assets/icons/AlignLeft.d.ts +0 -2
- package/dist/assets/icons/AlignLeft.js +0 -30
- package/dist/assets/icons/AlignLeftRight.d.ts +0 -2
- package/dist/assets/icons/AlignLeftRight.js +0 -30
- package/dist/assets/icons/AlignRight.d.ts +0 -2
- package/dist/assets/icons/AlignRight.js +0 -30
- package/dist/assets/icons/ArrowDropDown.d.ts +0 -2
- package/dist/assets/icons/ArrowDropDown.js +0 -30
- package/dist/assets/icons/ArrowDropUp.d.ts +0 -2
- package/dist/assets/icons/ArrowDropUp.js +0 -30
- package/dist/assets/icons/ArrowLeft.d.ts +0 -2
- package/dist/assets/icons/ArrowLeft.js +0 -30
- package/dist/assets/icons/ArrowRight.d.ts +0 -2
- package/dist/assets/icons/ArrowRight.js +0 -30
- package/dist/assets/icons/Board.d.ts +0 -2
- package/dist/assets/icons/Bold.d.ts +0 -2
- package/dist/assets/icons/Bold.js +0 -30
- package/dist/assets/icons/BulletedList.d.ts +0 -2
- package/dist/assets/icons/BulletedList.js +0 -30
- package/dist/assets/icons/Calendar.d.ts +0 -2
- package/dist/assets/icons/Calendar.js +0 -32
- package/dist/assets/icons/Check.d.ts +0 -2
- package/dist/assets/icons/Check.js +0 -32
- package/dist/assets/icons/CheckCircle.d.ts +0 -2
- package/dist/assets/icons/CheckCircle.js +0 -30
- package/dist/assets/icons/CheckboxCheckmark.d.ts +0 -2
- package/dist/assets/icons/CheckboxCheckmark.js +0 -33
- package/dist/assets/icons/CheckboxIndeterminate.d.ts +0 -2
- package/dist/assets/icons/CheckboxIndeterminate.js +0 -33
- package/dist/assets/icons/ChevronDown.d.ts +0 -2
- package/dist/assets/icons/ChevronDown.js +0 -32
- package/dist/assets/icons/ChevronLeft.d.ts +0 -2
- package/dist/assets/icons/ChevronLeft.js +0 -32
- package/dist/assets/icons/ChevronRight.d.ts +0 -2
- package/dist/assets/icons/ChevronRight.js +0 -32
- package/dist/assets/icons/ChevronUp.d.ts +0 -2
- package/dist/assets/icons/ChevronUp.js +0 -32
- package/dist/assets/icons/ChevronsLeft.d.ts +0 -2
- package/dist/assets/icons/ChevronsLeft.js +0 -32
- package/dist/assets/icons/ChevronsRight.d.ts +0 -2
- package/dist/assets/icons/ChevronsRight.js +0 -32
- package/dist/assets/icons/Clock.d.ts +0 -2
- package/dist/assets/icons/Clock.js +0 -30
- package/dist/assets/icons/Close.d.ts +0 -2
- package/dist/assets/icons/Close.js +0 -30
- package/dist/assets/icons/DateTime.d.ts +0 -2
- package/dist/assets/icons/DateTime.js +0 -39
- package/dist/assets/icons/DragIndicator.d.ts +0 -2
- package/dist/assets/icons/DragIndicator.js +0 -30
- package/dist/assets/icons/Edit.d.ts +0 -2
- package/dist/assets/icons/Emoji.d.ts +0 -2
- package/dist/assets/icons/File.d.ts +0 -2
- package/dist/assets/icons/File.js +0 -32
- package/dist/assets/icons/Grid.d.ts +0 -2
- package/dist/assets/icons/Highlight.d.ts +0 -2
- package/dist/assets/icons/Highlight.js +0 -30
- package/dist/assets/icons/HighlightOn.d.ts +0 -6
- package/dist/assets/icons/HighlightOn.js +0 -55
- package/dist/assets/icons/Home.d.ts +0 -2
- package/dist/assets/icons/Home.js +0 -30
- package/dist/assets/icons/Image.d.ts +0 -2
- package/dist/assets/icons/ImageError.d.ts +0 -2
- package/dist/assets/icons/Info.d.ts +0 -2
- package/dist/assets/icons/Info.js +0 -41
- package/dist/assets/icons/Italic.d.ts +0 -2
- package/dist/assets/icons/Italic.js +0 -30
- package/dist/assets/icons/Link.d.ts +0 -2
- package/dist/assets/icons/Link.js +0 -30
- package/dist/assets/icons/Loader.d.ts +0 -2
- package/dist/assets/icons/MapPin.d.ts +0 -2
- package/dist/assets/icons/Menu.d.ts +0 -2
- package/dist/assets/icons/Menu.js +0 -30
- package/dist/assets/icons/Minus.d.ts +0 -2
- package/dist/assets/icons/MoreHoriz.d.ts +0 -2
- package/dist/assets/icons/NumberedList.d.ts +0 -2
- package/dist/assets/icons/NumberedList.js +0 -30
- package/dist/assets/icons/Pause.d.ts +0 -2
- package/dist/assets/icons/Plus.d.ts +0 -2
- package/dist/assets/icons/PointerHorizontal.d.ts +0 -2
- package/dist/assets/icons/PointerHorizontal.js +0 -30
- package/dist/assets/icons/PointerVertical.d.ts +0 -2
- package/dist/assets/icons/PointerVertical.js +0 -30
- package/dist/assets/icons/Retry.d.ts +0 -2
- package/dist/assets/icons/Search.d.ts +0 -2
- package/dist/assets/icons/Search.js +0 -30
- package/dist/assets/icons/Send.d.ts +0 -2
- package/dist/assets/icons/Send.js +0 -32
- package/dist/assets/icons/Share.d.ts +0 -2
- package/dist/assets/icons/Slash.d.ts +0 -2
- package/dist/assets/icons/Strikethrough.d.ts +0 -2
- package/dist/assets/icons/Strikethrough.js +0 -30
- package/dist/assets/icons/TextColor.d.ts +0 -6
- package/dist/assets/icons/TextColor.js +0 -52
- package/dist/assets/icons/Today.d.ts +0 -2
- package/dist/assets/icons/Today.js +0 -30
- package/dist/assets/icons/Trash.d.ts +0 -2
- package/dist/assets/icons/Underlined.d.ts +0 -2
- package/dist/assets/icons/Underlined.js +0 -32
- package/dist/assets/icons/Upload.d.ts +0 -2
- package/dist/assets/icons/Upload.js +0 -39
- package/dist/assets/icons/User.d.ts +0 -2
- package/dist/assets/icons/Visibility.d.ts +0 -2
- package/dist/assets/icons/Visibility.js +0 -30
- package/dist/assets/icons/VisibilityOff.d.ts +0 -2
- package/dist/assets/icons/VisibilityOff.js +0 -30
- package/dist/assets/icons/WarningFilled.d.ts +0 -2
- package/dist/assets/icons/WarningFilled.js +0 -32
- package/dist/assets/icons/WarningOutlined.d.ts +0 -2
- /package/dist/{hooks/useAutosave.spec.d.ts → rhf/entrypoints.type-test.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";
|
|
12
11
|
import { clsx } from "clsx";
|
|
13
12
|
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, 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;
|
|
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, isClearableIfDisabled, 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, { children: [
|
|
102
|
+
const trailingContentNodes = hasTrailingContent ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
103
103
|
hasClear && /* @__PURE__ */ jsx(InputClear, {
|
|
104
104
|
onClear: () => onClear?.(),
|
|
105
105
|
className: clearClassName,
|
|
106
|
-
show: !!showClear,
|
|
106
|
+
show: !!showClear && (!isDisabled || isClearableIfDisabled === true),
|
|
107
107
|
renderStatic: true
|
|
108
108
|
}),
|
|
109
109
|
trailingContent,
|
|
@@ -149,9 +149,10 @@ 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, { children: [contentRow, trailingRow] });
|
|
152
|
+
}) : /* @__PURE__ */ jsxs(Fragment$1, { 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]");
|
|
155
156
|
return /* @__PURE__ */ jsx(TooltipWrapper, {
|
|
156
157
|
as,
|
|
157
158
|
error,
|
|
@@ -170,7 +171,7 @@ var InputFrame = (props) => {
|
|
|
170
171
|
},
|
|
171
172
|
onFocusCapture: (event_0) => {
|
|
172
173
|
onFocusCapture?.(event_0);
|
|
173
|
-
if (pendingStaticPressPointerIdRef.current == null) onStaticInteract?.(true, event_0.target);
|
|
174
|
+
if (pendingStaticPressPointerIdRef.current == null && !isStaticClearActionTarget(event_0.target)) onStaticInteract?.(true, event_0.target);
|
|
174
175
|
},
|
|
175
176
|
children: /* @__PURE__ */ jsx("div", {
|
|
176
177
|
ref,
|
|
@@ -181,9 +182,10 @@ var InputFrame = (props) => {
|
|
|
181
182
|
}), inputClassName),
|
|
182
183
|
tabIndex: isDisabled ? -1 : 0,
|
|
183
184
|
onFocus: (event_1) => {
|
|
184
|
-
if (pendingStaticPressPointerIdRef.current == null) onStaticInteract?.(true, event_1.target);
|
|
185
|
+
if (pendingStaticPressPointerIdRef.current == null && !isStaticClearActionTarget(event_1.target)) onStaticInteract?.(true, event_1.target);
|
|
185
186
|
},
|
|
186
187
|
onClick: (event_2) => {
|
|
188
|
+
if (isStaticClearActionTarget(event_2.target)) return;
|
|
187
189
|
if (onStaticPress && shouldReplayStaticPress(event_2.target)) {
|
|
188
190
|
onStaticPress();
|
|
189
191
|
return;
|
|
@@ -194,6 +196,7 @@ var InputFrame = (props) => {
|
|
|
194
196
|
if (onStaticPress && shouldReplayStaticPress(event_3.target) || isStaticPressActionTarget(event_3.target)) pendingStaticPressPointerIdRef.current = event_3.pointerId;
|
|
195
197
|
},
|
|
196
198
|
onPointerDown: (event_4) => {
|
|
199
|
+
if (isStaticClearActionTarget(event_4.target)) return;
|
|
197
200
|
if (pendingStaticPressPointerIdRef.current === event_4.pointerId) return;
|
|
198
201
|
if (onStaticPress && shouldReplayStaticPress(event_4.target)) {
|
|
199
202
|
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 '../shared/form.binding';
|
|
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";
|
|
4
5
|
import { FormField } from "../FormField/FormField.js";
|
|
5
|
-
import { c } from "react/compiler-runtime";
|
|
6
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
6
|
import { clsx } from "clsx";
|
|
8
7
|
import { Slider, SliderThumb, SliderTrack } from "react-aria-components";
|
|
8
|
+
import { c } from "react/compiler-runtime";
|
|
9
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
9
10
|
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 ("field" in props && props.field) {
|
|
227
|
+
let field;
|
|
228
228
|
let innerProps;
|
|
229
229
|
let ref;
|
|
230
230
|
if ($[0] !== props) {
|
|
231
|
-
({
|
|
231
|
+
({field, ref, ...innerProps} = props);
|
|
232
232
|
$[0] = props;
|
|
233
|
-
$[1] =
|
|
233
|
+
$[1] = field;
|
|
234
234
|
$[2] = innerProps;
|
|
235
235
|
$[3] = ref;
|
|
236
236
|
} else {
|
|
237
|
-
|
|
237
|
+
field = $[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, fieldState: t2 } = t1;
|
|
244
|
+
const { field: field_0, 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_0.ref),
|
|
249
|
+
value: field_0.value,
|
|
250
|
+
onBlur: field_0.onBlur,
|
|
251
|
+
onChange: field_0.onChange,
|
|
252
|
+
isDisabled: field_0.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] !== field.form || $[10] !== field.name || $[11] !== t0) {
|
|
264
|
+
t1 = /* @__PURE__ */ jsx(FieldController, {
|
|
265
|
+
control: field.form,
|
|
266
|
+
name: field.name,
|
|
267
267
|
render: t0
|
|
268
268
|
});
|
|
269
|
-
$[9] =
|
|
270
|
-
$[10] =
|
|
269
|
+
$[9] = field.form;
|
|
270
|
+
$[10] = field.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 '../shared/form.binding';
|
|
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";
|
|
4
5
|
import { FormFieldLabel } from "../FormField/FormFieldLabel.js";
|
|
5
6
|
import { FormField } from "../FormField/FormField.js";
|
|
6
7
|
import { inputSideDefinition } from "../shared/input.cva.js";
|
|
7
8
|
import { TextEditorToolbar } from "./Toolbar/TextEditorToolbar.js";
|
|
8
|
-
import { c } from "react/compiler-runtime";
|
|
9
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
9
|
import { clsx } from "clsx";
|
|
11
10
|
import { useEffect, useRef, useState } from "react";
|
|
11
|
+
import { c } from "react/compiler-runtime";
|
|
12
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
13
|
import { useFocusVisible, useFocusWithin, useHover, useLabel } from "react-aria";
|
|
13
14
|
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 ("field" in props && props.field) {
|
|
140
|
+
let field;
|
|
141
141
|
let innerProps;
|
|
142
142
|
let ref;
|
|
143
143
|
if ($[0] !== props) {
|
|
144
|
-
({
|
|
144
|
+
({field, ref, ...innerProps} = props);
|
|
145
145
|
$[0] = props;
|
|
146
|
-
$[1] =
|
|
146
|
+
$[1] = field;
|
|
147
147
|
$[2] = innerProps;
|
|
148
148
|
$[3] = ref;
|
|
149
149
|
} else {
|
|
150
|
-
|
|
150
|
+
field = $[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, fieldState: t2 } = t1;
|
|
157
|
+
const { field: field_0, 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_0.ref),
|
|
162
|
+
value: field_0.value,
|
|
163
|
+
onChange: field_0.onChange,
|
|
164
|
+
onBlur: field_0.onBlur,
|
|
165
165
|
isDirty,
|
|
166
|
-
isDisabled:
|
|
166
|
+
isDisabled: field_0.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] !== field.form || $[10] !== field.name || $[11] !== t0) {
|
|
178
|
+
t1 = /* @__PURE__ */ jsx(FieldController, {
|
|
179
|
+
control: field.form,
|
|
180
|
+
name: field.name,
|
|
181
181
|
render: t0
|
|
182
182
|
});
|
|
183
|
-
$[9] =
|
|
184
|
-
$[10] =
|
|
183
|
+
$[9] = field.form;
|
|
184
|
+
$[10] = field.name;
|
|
185
185
|
$[11] = t0;
|
|
186
186
|
$[12] = t1;
|
|
187
187
|
} else t1 = $[12];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { c } from "react/compiler-runtime";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
1
|
import { clsx } from "clsx";
|
|
4
2
|
import { ColorSwatch, ColorSwatchPicker, ColorSwatchPickerItem } from "react-aria-components";
|
|
3
|
+
import { c } from "react/compiler-runtime";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
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";
|
|
2
1
|
import { UIOverrides } from "../../../../config/uiOverrides.context.js";
|
|
3
2
|
import { Typography } from "../../../text/Typography/Typography.js";
|
|
4
3
|
import { useInputCva } from "../../shared/input.cva.js";
|
|
5
4
|
import { popoverDefinition } from "../../../shared/popover.cva.js";
|
|
6
5
|
import { ColorPicker } from "./ColorPicker.js";
|
|
7
|
-
import {
|
|
8
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { ChevronDown } from "lucide-react";
|
|
9
7
|
import { clsx } from "clsx";
|
|
10
8
|
import { useState } from "react";
|
|
11
9
|
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(ChevronDown, {
|
|
58
58
|
className: t5,
|
|
59
59
|
"aria-hidden": "true"
|
|
60
60
|
});
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { LinkIcon } from "../../../../assets/icons/Link.js";
|
|
2
1
|
import { Button } from "../../../buttons/Button/Button.js";
|
|
3
2
|
import { InlineIconButton } from "../../../buttons/InlineIconButton/InlineIconButton.js";
|
|
4
3
|
import "../../../../config/i18n.js";
|
|
5
4
|
import { TextInput } from "../../Input/TextInput/TextInput.js";
|
|
6
5
|
import { ResponsivePopover } from "../../../overlays/ResponsivePopover/ResponsivePopover.js";
|
|
7
|
-
import {
|
|
8
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { Link } from "lucide-react";
|
|
9
7
|
import { clsx } from "clsx";
|
|
10
8
|
import { useEffect, useState } from "react";
|
|
9
|
+
import { c } from "react/compiler-runtime";
|
|
10
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
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: Link,
|
|
83
83
|
className: t7,
|
|
84
84
|
isDisabled: t8
|
|
85
85
|
});
|
|
@@ -1,9 +1,6 @@
|
|
|
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";
|
|
5
1
|
import "../../../../config/i18n.js";
|
|
6
2
|
import { Select } from "../../Selection/Select/Select.js";
|
|
3
|
+
import { AlignCenter, AlignJustify, AlignLeft, AlignRight } from "lucide-react";
|
|
7
4
|
import { c } from "react/compiler-runtime";
|
|
8
5
|
import { jsx } from "react/jsx-runtime";
|
|
9
6
|
import { useTranslation } from "react-i18next";
|
|
@@ -40,10 +37,10 @@ var TextAlignSelect = (t0) => {
|
|
|
40
37
|
let t3;
|
|
41
38
|
if ($0[5] !== getItem) {
|
|
42
39
|
t3 = [
|
|
43
|
-
getItem("left",
|
|
44
|
-
getItem("center",
|
|
45
|
-
getItem("right",
|
|
46
|
-
getItem("justify",
|
|
40
|
+
getItem("left", AlignLeft),
|
|
41
|
+
getItem("center", AlignCenter),
|
|
42
|
+
getItem("right", AlignRight),
|
|
43
|
+
getItem("justify", AlignJustify)
|
|
47
44
|
].filter(_temp2);
|
|
48
45
|
$0[5] = getItem;
|
|
49
46
|
$0[6] = t3;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { TextColorIcon } from "../../../../assets/icons/TextColor.js";
|
|
2
1
|
import { ColorPickerDropdown } from "./ColorPickerDropdown.js";
|
|
3
2
|
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(Baseline, {
|
|
31
31
|
className: "size-6",
|
|
32
|
-
textColor
|
|
32
|
+
style: { color: textColor }
|
|
33
33
|
});
|
|
34
34
|
$[4] = textColor;
|
|
35
35
|
$[5] = t4;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { HighlightIcon } from "../../../../assets/icons/Highlight.js";
|
|
2
|
-
import { HighlightOnIcon } from "../../../../assets/icons/HighlightOn.js";
|
|
3
1
|
import { ColorPickerDropdown } from "./ColorPickerDropdown.js";
|
|
4
2
|
import { defaultColors } from "../textEditor.types.js";
|
|
3
|
+
import { Highlighter } from "lucide-react";
|
|
5
4
|
import { c } from "react/compiler-runtime";
|
|
6
5
|
import { jsx } from "react/jsx-runtime";
|
|
7
6
|
//#region src/components/inputs/TextEditor/Toolbar/TextHighlightSelect.tsx
|
|
@@ -29,10 +28,10 @@ var TextHighlightSelect = (t0) => {
|
|
|
29
28
|
const t3 = !editor.isEditable;
|
|
30
29
|
let t4;
|
|
31
30
|
if ($[4] !== highlightColor) {
|
|
32
|
-
t4 = highlightColor ? /* @__PURE__ */ jsx(
|
|
31
|
+
t4 = highlightColor ? /* @__PURE__ */ jsx(Highlighter, {
|
|
33
32
|
className: "size-6",
|
|
34
|
-
highlightColor
|
|
35
|
-
}) : /* @__PURE__ */ jsx(
|
|
33
|
+
style: { color: highlightColor }
|
|
34
|
+
}) : /* @__PURE__ */ jsx(Highlighter, { className: "size-6" });
|
|
36
35
|
$[4] = highlightColor;
|
|
37
36
|
$[5] = t4;
|
|
38
37
|
} else t4 = $[5];
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { BulletedListIcon } from "../../../../assets/icons/BulletedList.js";
|
|
2
|
-
import { NumberedListIcon } from "../../../../assets/icons/NumberedList.js";
|
|
3
1
|
import { InlineIconButton } from "../../../buttons/InlineIconButton/InlineIconButton.js";
|
|
4
2
|
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";
|
|
8
7
|
import { useTranslation } from "react-i18next";
|
|
9
8
|
//#region src/components/inputs/TextEditor/Toolbar/TextListActions.tsx
|
|
10
9
|
var TextListActions = (t0) => {
|
|
@@ -38,7 +37,7 @@ var TextListActions = (t0) => {
|
|
|
38
37
|
can: t2,
|
|
39
38
|
isEnabled: t3,
|
|
40
39
|
label: t(t4),
|
|
41
|
-
icon:
|
|
40
|
+
icon: List,
|
|
42
41
|
onPress: () => {
|
|
43
42
|
editor.chain().focus().toggleBulletList().run();
|
|
44
43
|
},
|
|
@@ -47,7 +46,7 @@ var TextListActions = (t0) => {
|
|
|
47
46
|
can: !!editor.extensionManager.extensions.find(_temp3),
|
|
48
47
|
isEnabled: () => editor.isEditable && editor.can().toggleOrderedList(),
|
|
49
48
|
label: t(_temp4),
|
|
50
|
-
icon:
|
|
49
|
+
icon: ListOrdered,
|
|
51
50
|
onPress: () => {
|
|
52
51
|
editor.chain().focus().toggleOrderedList().run();
|
|
53
52
|
},
|
|
@@ -1,12 +1,9 @@
|
|
|
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";
|
|
5
1
|
import { InlineIconButton } from "../../../buttons/InlineIconButton/InlineIconButton.js";
|
|
6
2
|
import "../../../../config/i18n.js";
|
|
3
|
+
import { Bold, Italic, Strikethrough, Underline } from "lucide-react";
|
|
4
|
+
import { clsx } from "clsx";
|
|
7
5
|
import { c } from "react/compiler-runtime";
|
|
8
6
|
import { jsx } from "react/jsx-runtime";
|
|
9
|
-
import { clsx } from "clsx";
|
|
10
7
|
import { useTranslation } from "react-i18next";
|
|
11
8
|
//#region src/components/inputs/TextEditor/Toolbar/TextMarksActions.tsx
|
|
12
9
|
var TextMarksActions = (t0) => {
|
|
@@ -41,7 +38,7 @@ var TextMarksActions = (t0) => {
|
|
|
41
38
|
can: t2,
|
|
42
39
|
isEnabled: t3,
|
|
43
40
|
label: t(t4),
|
|
44
|
-
icon:
|
|
41
|
+
icon: Bold,
|
|
45
42
|
onPress: () => {
|
|
46
43
|
editor.chain().focus().toggleBold().run();
|
|
47
44
|
},
|
|
@@ -51,7 +48,7 @@ var TextMarksActions = (t0) => {
|
|
|
51
48
|
can: !!editor.extensionManager.extensions.find(_temp3),
|
|
52
49
|
isEnabled: () => editor.isEditable && editor.can().toggleItalic(),
|
|
53
50
|
label: t(_temp4),
|
|
54
|
-
icon:
|
|
51
|
+
icon: Italic,
|
|
55
52
|
onPress: () => {
|
|
56
53
|
editor.chain().focus().toggleItalic().run();
|
|
57
54
|
},
|
|
@@ -61,7 +58,7 @@ var TextMarksActions = (t0) => {
|
|
|
61
58
|
can: !!editor.extensionManager.extensions.find(_temp5),
|
|
62
59
|
isEnabled: () => editor.isEditable && editor.can().toggleStrike(),
|
|
63
60
|
label: t(_temp6),
|
|
64
|
-
icon:
|
|
61
|
+
icon: Strikethrough,
|
|
65
62
|
onPress: () => {
|
|
66
63
|
editor.chain().focus().toggleStrike().run();
|
|
67
64
|
},
|
|
@@ -71,7 +68,7 @@ var TextMarksActions = (t0) => {
|
|
|
71
68
|
can: !!editor.extensionManager.extensions.find(_temp7),
|
|
72
69
|
isEnabled: () => editor.isEditable && editor.can().toggleUnderline(),
|
|
73
70
|
label: t(_temp8),
|
|
74
|
-
icon:
|
|
71
|
+
icon: Underline,
|
|
75
72
|
onPress: () => {
|
|
76
73
|
editor.chain().focus().toggleUnderline().run();
|
|
77
74
|
},
|
|
@@ -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 '../shared/form.binding';
|
|
4
4
|
import { FormFieldErrorProps } from '../FormField/FormFieldError';
|
|
5
5
|
import { ControlProps } from '../shared/form.types';
|
|
6
6
|
import { ToggleVariantProps } from './toggle.cva';
|
|
@@ -9,7 +9,6 @@ interface ToggleBaseProps extends FormFieldErrorProps, ToggleVariantProps, Omit<
|
|
|
9
9
|
children?: string;
|
|
10
10
|
isDirty?: boolean;
|
|
11
11
|
isRequired?: boolean;
|
|
12
|
-
fireBlurOnChange?: boolean;
|
|
13
12
|
}
|
|
14
13
|
export type ToggleProps = ToggleBaseProps;
|
|
15
14
|
export type ControlledToggleProps<TFieldValues extends FieldValues> = ControlProps<ToggleProps, TFieldValues, "isSelected">;
|