@povio/ui 3.1.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/icons/AlignCenter.js +26 -11
- package/dist/assets/icons/AlignLeft.js +26 -11
- package/dist/assets/icons/AlignLeftRight.js +26 -11
- package/dist/assets/icons/AlignRight.js +26 -11
- package/dist/assets/icons/ArrowDropDown.js +26 -11
- package/dist/assets/icons/ArrowDropUp.js +26 -11
- package/dist/assets/icons/ArrowLeft.js +26 -11
- package/dist/assets/icons/ArrowRight.js +26 -11
- package/dist/assets/icons/Bold.js +26 -11
- package/dist/assets/icons/BulletedList.js +26 -11
- package/dist/assets/icons/Calendar.js +28 -13
- package/dist/assets/icons/Check.js +28 -13
- package/dist/assets/icons/CheckCircle.js +26 -11
- package/dist/assets/icons/CheckboxCheckmark.js +29 -14
- package/dist/assets/icons/CheckboxIndeterminate.js +29 -14
- package/dist/assets/icons/ChevronDown.js +28 -13
- package/dist/assets/icons/ChevronLeft.js +28 -13
- package/dist/assets/icons/ChevronRight.js +28 -13
- package/dist/assets/icons/ChevronUp.js +28 -13
- package/dist/assets/icons/ChevronsLeft.js +28 -13
- package/dist/assets/icons/ChevronsRight.js +28 -13
- package/dist/assets/icons/Clock.js +26 -11
- package/dist/assets/icons/Close.js +26 -11
- package/dist/assets/icons/DateTime.js +35 -14
- package/dist/assets/icons/DragIndicator.js +26 -11
- package/dist/assets/icons/File.js +28 -13
- package/dist/assets/icons/Highlight.js +26 -11
- package/dist/assets/icons/HighlightOn.js +49 -15
- package/dist/assets/icons/Home.js +26 -11
- package/dist/assets/icons/Info.js +37 -16
- package/dist/assets/icons/Italic.js +26 -11
- package/dist/assets/icons/Link.js +26 -11
- package/dist/assets/icons/Menu.js +26 -11
- package/dist/assets/icons/NumberedList.js +26 -11
- package/dist/assets/icons/PointerHorizontal.js +26 -11
- package/dist/assets/icons/PointerVertical.js +26 -11
- package/dist/assets/icons/Search.js +26 -11
- package/dist/assets/icons/Send.js +28 -13
- package/dist/assets/icons/Strikethrough.js +26 -11
- package/dist/assets/icons/TextColor.js +48 -14
- package/dist/assets/icons/Today.js +26 -11
- package/dist/assets/icons/Underlined.js +28 -13
- package/dist/assets/icons/Upload.js +35 -14
- package/dist/assets/icons/Visibility.js +26 -11
- package/dist/assets/icons/VisibilityOff.js +26 -11
- package/dist/assets/icons/WarningFilled.js +28 -13
- package/dist/components/Breadcrumbs/Breadcrumbs.js +207 -56
- package/dist/components/Menu/Menu.js +18 -2
- package/dist/components/Menu/MenuDesktop.js +41 -7
- package/dist/components/Menu/MenuItem.js +32 -9
- package/dist/components/Menu/MenuMobile.js +102 -39
- package/dist/components/Menu/MenuPopover.js +105 -29
- package/dist/components/buttons/Button/button.cva.d.ts +3 -3
- package/dist/components/buttons/IconButton/IconButton.js +40 -8
- package/dist/components/buttons/InlineIconButton/InlineIconButton.d.ts +2 -1
- package/dist/components/buttons/InlineIconButton/InlineIconButton.js +34 -9
- package/dist/components/buttons/PillButton/PillButton.js +55 -17
- package/dist/components/buttons/PillButton/pillButton.cva.d.ts +1 -1
- package/dist/components/buttons/SplitButton/SplitButton.js +103 -18
- package/dist/components/buttons/TextButton/TextButton.js +30 -8
- package/dist/components/buttons/ToggleButton/ToggleButton.js +28 -8
- package/dist/components/buttons/shared/ButtonContent.js +80 -22
- package/dist/components/inputs/Checkbox/Checkbox.d.ts +1 -0
- package/dist/components/inputs/Checkbox/Checkbox.js +201 -35
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +24 -10
- package/dist/components/inputs/Checkbox/checkbox.cva.d.ts +3 -0
- package/dist/components/inputs/Checkbox/checkbox.cva.js +2 -1
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +12 -5
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +380 -75
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +12 -5
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +499 -186
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +14 -5
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +280 -46
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +7 -3
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +616 -121
- package/dist/components/inputs/DateTime/shared/Calendar.d.ts +5 -2
- package/dist/components/inputs/DateTime/shared/Calendar.js +342 -119
- package/dist/components/inputs/DateTime/shared/CalendarCell.d.ts +4 -2
- package/dist/components/inputs/DateTime/shared/CalendarCell.js +310 -103
- package/dist/components/inputs/DateTime/shared/CalendarGrid.d.ts +4 -2
- package/dist/components/inputs/DateTime/shared/CalendarGrid.js +150 -33
- package/dist/components/inputs/DateTime/shared/CalendarHeader.js +233 -98
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +318 -137
- package/dist/components/inputs/DateTime/shared/DateField.d.ts +2 -1
- package/dist/components/inputs/DateTime/shared/DateField.js +288 -112
- package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +14 -3
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +359 -129
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.d.ts +18 -1
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +104 -11
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +83 -28
- package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +59 -10
- package/dist/components/inputs/DateTime/shared/MonthPicker.js +103 -58
- package/dist/components/inputs/DateTime/shared/RangeCalendar.js +193 -82
- package/dist/components/inputs/DateTime/shared/TimeField.js +27 -8
- package/dist/components/inputs/DateTime/shared/TimePickerForm.js +279 -110
- package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +4 -1
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +211 -65
- package/dist/components/inputs/DateTime/shared/YearPicker.js +119 -68
- package/dist/components/inputs/DateTime/shared/datePicker.types.d.ts +5 -0
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.d.ts +16 -0
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.js +16 -0
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.d.ts +15 -0
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.js +32 -0
- package/dist/components/inputs/DateTime/shared/dateSegment.utils.d.ts +2 -0
- package/dist/components/inputs/DateTime/shared/dateSegment.utils.spec.d.ts +1 -0
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.d.ts +41 -0
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.js +99 -0
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.spec.d.ts +1 -0
- package/dist/components/inputs/File/FileUpload.js +91 -46
- package/dist/components/inputs/File/FileUploadContainer.js +15 -7
- package/dist/components/inputs/File/InputUpload.js +317 -79
- package/dist/components/inputs/File/index.d.ts +1 -1
- package/dist/components/inputs/File/shared/FileCard.js +104 -41
- package/dist/components/inputs/File/shared/FileCardList.js +47 -12
- package/dist/components/inputs/File/shared/FileUploadContent.js +175 -44
- package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +149 -46
- package/dist/components/inputs/File/shared/FileUploadContentError.js +234 -93
- package/dist/components/inputs/File/shared/FileUploadContentFilled.js +230 -97
- package/dist/components/inputs/File/shared/FileUploadContentLoading.js +199 -55
- package/dist/components/inputs/File/shared/InputUploadContent.js +148 -34
- package/dist/components/inputs/File/shared/InputUploadFilled.js +49 -8
- package/dist/components/inputs/File/shared/ProgressBar.js +102 -15
- package/dist/components/inputs/File/shared/fileUpload.cva.d.ts +0 -11
- package/dist/components/inputs/File/shared/fileUpload.cva.js +1 -18
- package/dist/components/inputs/FormField/FormField.d.ts +3 -3
- package/dist/components/inputs/FormField/FormField.js +119 -37
- package/dist/components/inputs/FormField/FormFieldError.js +25 -5
- package/dist/components/inputs/FormField/FormFieldHeader.d.ts +2 -2
- package/dist/components/inputs/FormField/FormFieldHeader.js +81 -22
- package/dist/components/inputs/FormField/FormFieldHeaderClose.js +31 -7
- package/dist/components/inputs/FormField/FormFieldHelper.js +26 -6
- package/dist/components/inputs/FormField/FormFieldLabel.d.ts +2 -2
- package/dist/components/inputs/FormField/FormFieldLabel.js +40 -9
- package/dist/components/inputs/FormField/formFieldHeader.cva.d.ts +13 -0
- package/dist/components/inputs/FormField/formFieldHeader.cva.js +14 -0
- package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +5 -2
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +446 -97
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.d.ts +45 -0
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +571 -0
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +35 -0
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +574 -0
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +48 -9
- package/dist/components/inputs/Input/TextArea/TextArea.cva.d.ts +8 -0
- package/dist/components/inputs/Input/TextArea/TextArea.cva.js +5 -0
- package/dist/components/inputs/Input/TextArea/TextArea.js +305 -90
- package/dist/components/inputs/Input/TextInput/TextInput.d.ts +3 -1
- package/dist/components/inputs/Input/TextInput/TextInput.js +429 -90
- package/dist/components/inputs/Input/shared/InputContent.js +193 -59
- package/dist/components/inputs/Input/shared/numberStatic.utils.d.ts +1 -0
- package/dist/components/inputs/Input/shared/numberStatic.utils.js +7 -0
- package/dist/components/inputs/Inputs/Form.js +40 -11
- package/dist/components/inputs/Inputs/InputItem.d.ts +15 -21
- package/dist/components/inputs/Inputs/InputItem.js +69 -14
- package/dist/components/inputs/Inputs/Inputs.js +37 -11
- package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +3 -1
- package/dist/components/inputs/RadioGroup/RadioGroup.js +353 -61
- package/dist/components/inputs/RadioGroup/radio.cva.d.ts +45 -0
- package/dist/components/inputs/RadioGroup/radio.cva.js +48 -1
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +6 -2
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +217 -22
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +3 -18
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +107 -8
- package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +37 -0
- package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +14 -0
- package/dist/components/inputs/Selection/Select/QuerySelect.js +178 -0
- package/dist/components/inputs/Selection/Select/Select.d.ts +7 -3
- package/dist/components/inputs/Selection/Select/Select.js +227 -18
- package/dist/components/inputs/Selection/shared/SelectBase.d.ts +8 -1
- package/dist/components/inputs/Selection/shared/SelectBase.js +69 -18
- package/dist/components/inputs/Selection/shared/SelectDesktop.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +393 -138
- package/dist/components/inputs/Selection/shared/SelectInput.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectInput.js +397 -116
- package/dist/components/inputs/Selection/shared/SelectInputTags.js +99 -25
- package/dist/components/inputs/Selection/shared/SelectListBox.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectListBox.js +164 -52
- package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +85 -35
- package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +69 -16
- package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +70 -21
- package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +58 -9
- package/dist/components/inputs/Selection/shared/SelectMobile.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/SelectMobile.js +9 -3
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.d.ts +9 -0
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +47 -0
- package/dist/components/inputs/Selection/shared/querySelect.utils.d.ts +14 -0
- package/dist/components/inputs/Selection/shared/querySelect.utils.js +43 -0
- package/dist/components/inputs/Selection/shared/select.context.d.ts +3 -2
- package/dist/components/inputs/Selection/shared/select.context.js +67 -36
- package/dist/components/inputs/Selection/shared/select.types.d.ts +3 -2
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.d.ts +6 -0
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.js +5 -0
- package/dist/components/inputs/Selection/shared/selectInput.cva.d.ts +12 -0
- package/dist/components/inputs/Selection/shared/selectInput.cva.js +8 -0
- package/dist/components/inputs/Selection/shared/staticSelect.utils.d.ts +23 -0
- package/dist/components/inputs/Selection/shared/staticSelect.utils.js +54 -0
- package/dist/components/inputs/Selection/shared/staticSelect.utils.spec.d.ts +1 -0
- package/dist/components/inputs/Selection/shared/useSelectItems.js +109 -49
- package/dist/components/inputs/Skeleton/InputFrame.d.ts +83 -0
- package/dist/components/inputs/Skeleton/InputFrame.js +612 -0
- package/dist/components/inputs/Slider/Slider.d.ts +2 -1
- package/dist/components/inputs/Slider/Slider.js +265 -76
- package/dist/components/inputs/TextEditor/TextEditor.d.ts +1 -0
- package/dist/components/inputs/TextEditor/TextEditor.js +447 -98
- package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +37 -11
- package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +102 -30
- package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +194 -45
- package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +88 -28
- package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +48 -14
- package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.js +66 -19
- package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +49 -15
- package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +92 -32
- package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +126 -54
- package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +141 -38
- package/dist/components/inputs/Toggle/Toggle.d.ts +1 -0
- package/dist/components/inputs/Toggle/Toggle.js +214 -37
- package/dist/components/inputs/Toggle/toggle.cva.d.ts +3 -0
- package/dist/components/inputs/Toggle/toggle.cva.js +2 -1
- package/dist/components/inputs/shared/CheckContent.d.ts +2 -1
- package/dist/components/inputs/shared/CheckContent.js +21 -11
- package/dist/components/inputs/shared/InputClear.d.ts +2 -1
- package/dist/components/inputs/shared/InputClear.js +88 -12
- package/dist/components/inputs/shared/TooltipWrapper.js +50 -11
- package/dist/components/inputs/shared/input.cva.d.ts +28 -0
- package/dist/components/inputs/shared/input.cva.js +38 -4
- package/dist/components/inputs/shared/tooltipWrapper.cva.d.ts +8 -0
- package/dist/components/inputs/shared/tooltipWrapper.cva.js +5 -0
- package/dist/components/inputs/shared/useStaticInputHandoff.d.ts +15 -0
- package/dist/components/inputs/shared/useStaticInputHandoff.js +112 -0
- package/dist/components/navigation/Accordion/Accordion.js +69 -22
- package/dist/components/navigation/Accordion/AccordionItem.js +86 -41
- package/dist/components/navigation/Stepper/Stepper.js +67 -22
- package/dist/components/navigation/Stepper/StepperItem.js +104 -31
- package/dist/components/navigation/Stepper/StepperSeparator.js +23 -5
- package/dist/components/overlays/ActionModal/ActionModal.js +169 -35
- package/dist/components/overlays/BottomSheet/BottomSheet.js +96 -23
- package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +48 -8
- package/dist/components/overlays/Drawer/Drawer.js +62 -20
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +85 -28
- package/dist/components/overlays/Tooltip/Tooltip.js +137 -28
- package/dist/components/overlays/Tooltip/TooltipEllipsis.js +37 -12
- package/dist/components/segment/Segment.js +218 -57
- package/dist/components/segment/SegmentItem.js +67 -10
- package/dist/components/shared/pagination/Pagination.js +108 -22
- package/dist/components/shared/pagination/PaginationList.js +167 -64
- package/dist/components/shared/pagination/minWidth.cva.d.ts +1 -1
- package/dist/components/status/Alert/Alert.js +97 -30
- package/dist/components/status/Loader/Loader.js +77 -22
- package/dist/components/status/Toast/Toast.js +28 -14
- package/dist/components/status/Toast/toast.cva.d.ts +1 -1
- package/dist/components/status/Toast/useToast.js +62 -57
- package/dist/components/table/ColumnConfig.js +158 -54
- package/dist/components/table/InfiniteTable.js +67 -16
- package/dist/components/table/PaginatedTable.js +84 -18
- package/dist/components/table/Table.js +28 -27
- package/dist/components/text/Link/Link.js +19 -7
- package/dist/components/text/Typography/Typography.js +23 -8
- package/dist/config/confirmation.context.js +1 -1
- package/dist/config/link.context.js +23 -9
- package/dist/config/router.context.js +42 -16
- package/dist/config/theme.context.js +98 -45
- package/dist/config/uiConfig.context.d.ts +20 -6
- package/dist/config/uiConfig.context.js +68 -14
- package/dist/config/uiOverrides.context.d.ts +30 -11
- package/dist/config/uiOverrides.context.js +54 -14
- package/dist/helpers/dynamicInputs.d.ts +12 -9
- package/dist/helpers/dynamicInputs.js +13 -8
- package/dist/hooks/useAutosave.d.ts +2 -1
- package/dist/hooks/useAutosave.js +12 -4
- package/dist/hooks/useAutosave.spec.d.ts +1 -0
- package/dist/hooks/useBreakpoint.js +16 -3
- package/dist/hooks/useDebounceCallback.js +51 -17
- package/dist/hooks/useFilters.js +125 -64
- package/dist/hooks/useForm.js +42 -8
- package/dist/hooks/useFormAutosave.d.ts +3 -1
- package/dist/hooks/useFormAutosave.js +122 -30
- package/dist/hooks/useFormAutosave.spec.d.ts +1 -0
- package/dist/hooks/useIntersectionObserver.d.ts +1 -1
- package/dist/hooks/useIntersectionObserver.js +91 -24
- package/dist/hooks/useKeyInteractions.d.ts +20 -0
- package/dist/hooks/useKeyInteractions.js +54 -0
- package/dist/hooks/useKeyInteractions.spec.d.ts +1 -0
- package/dist/hooks/useLocalStorage.js +43 -10
- package/dist/hooks/useLongPressRepeat.js +55 -20
- package/dist/hooks/usePagination.js +49 -19
- package/dist/hooks/useQueryAutocomplete.d.ts +14 -0
- package/dist/hooks/useQueryAutocomplete.js +72 -0
- package/dist/hooks/useScrollableListBox.js +37 -16
- package/dist/hooks/useSorting.js +69 -28
- package/dist/hooks/useStateAndRef.js +21 -7
- package/dist/hooks/useTableColumnConfig.js +124 -31
- package/dist/hooks/useTranslationMemo.js +25 -5
- package/dist/index.d.ts +18 -3
- package/dist/index.js +15 -5
- package/dist/tw-ui-plugin.js +6 -0
- package/dist/utils/date-time.utils.d.ts +38 -10
- package/dist/utils/date-time.utils.js +136 -22
- package/dist/utils/query.utils.d.ts +4 -0
- package/dist/utils/query.utils.js +8 -0
- package/dist/utils/zod.utils.d.ts +2 -0
- package/dist/utils/zod.utils.js +5 -0
- package/package.json +2 -2
|
@@ -5,6 +5,7 @@ import { FormFieldLabel } from "../FormField/FormFieldLabel.js";
|
|
|
5
5
|
import { inputSideDefinition } from "../shared/input.cva.js";
|
|
6
6
|
import { FormField } from "../FormField/FormField.js";
|
|
7
7
|
import { TextEditorToolbar } from "./Toolbar/TextEditorToolbar.js";
|
|
8
|
+
import { c } from "react/compiler-runtime";
|
|
8
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
10
|
import { clsx } from "clsx";
|
|
10
11
|
import { useEffect, useRef, useState } from "react";
|
|
@@ -37,116 +38,464 @@ var extensions = [
|
|
|
37
38
|
defaultProtocol: "https"
|
|
38
39
|
})
|
|
39
40
|
];
|
|
40
|
-
var TextEditorBase = (
|
|
41
|
+
var TextEditorBase = (t0) => {
|
|
42
|
+
const $ = c(132);
|
|
43
|
+
const { ref, as: t1, placeholder, label, hideLabel, tooltipText, helperText, isRequired, rightContent, isDisabled, headerClassName, errorClassName, isHeaderHidden, error, value, className, editorClassName, isDirty, onChange, onBlur } = t0;
|
|
44
|
+
const as = t1 === void 0 ? "default" : t1;
|
|
41
45
|
const contentRef = useRef(null);
|
|
42
|
-
|
|
46
|
+
let t2;
|
|
47
|
+
if ($[0] !== isDisabled) {
|
|
48
|
+
t2 = { isDisabled };
|
|
49
|
+
$[0] = isDisabled;
|
|
50
|
+
$[1] = t2;
|
|
51
|
+
} else t2 = $[1];
|
|
52
|
+
const { hoverProps, isHovered } = useHover(t2);
|
|
43
53
|
const [isFocused, setIsFocused] = useState(false);
|
|
44
|
-
|
|
54
|
+
let t3;
|
|
55
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
56
|
+
t3 = { onFocusWithinChange: setIsFocused };
|
|
57
|
+
$[2] = t3;
|
|
58
|
+
} else t3 = $[2];
|
|
59
|
+
const { focusWithinProps } = useFocusWithin(t3);
|
|
45
60
|
const { isFocusVisible } = useFocusVisible();
|
|
46
61
|
const inputSideCva = UIOverrides.useCva("input.sideCva", inputSideDefinition);
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
const t4 = isHeaderHidden || as === "filter" || as === "floating";
|
|
63
|
+
let t5;
|
|
64
|
+
if ($[3] !== error || $[4] !== errorClassName || $[5] !== headerClassName || $[6] !== helperText || $[7] !== hideLabel || $[8] !== isDisabled || $[9] !== isRequired || $[10] !== label || $[11] !== rightContent || $[12] !== t4 || $[13] !== tooltipText) {
|
|
65
|
+
t5 = {
|
|
66
|
+
error,
|
|
67
|
+
label,
|
|
68
|
+
tooltipText,
|
|
69
|
+
helperText,
|
|
70
|
+
isRequired,
|
|
71
|
+
rightContent,
|
|
72
|
+
isHeaderHidden: t4,
|
|
73
|
+
hideLabel,
|
|
74
|
+
isDisabled,
|
|
75
|
+
headerClassName,
|
|
76
|
+
errorClassName
|
|
77
|
+
};
|
|
78
|
+
$[3] = error;
|
|
79
|
+
$[4] = errorClassName;
|
|
80
|
+
$[5] = headerClassName;
|
|
81
|
+
$[6] = helperText;
|
|
82
|
+
$[7] = hideLabel;
|
|
83
|
+
$[8] = isDisabled;
|
|
84
|
+
$[9] = isRequired;
|
|
85
|
+
$[10] = label;
|
|
86
|
+
$[11] = rightContent;
|
|
87
|
+
$[12] = t4;
|
|
88
|
+
$[13] = tooltipText;
|
|
89
|
+
$[14] = t5;
|
|
90
|
+
} else t5 = $[14];
|
|
91
|
+
const formFieldProps = t5;
|
|
92
|
+
let t6;
|
|
93
|
+
if ($[15] !== label) {
|
|
94
|
+
t6 = { label };
|
|
95
|
+
$[15] = label;
|
|
96
|
+
$[16] = t6;
|
|
97
|
+
} else t6 = $[16];
|
|
98
|
+
const { labelProps, fieldProps } = useLabel(t6);
|
|
99
|
+
let t7;
|
|
100
|
+
if ($[17] !== as || $[18] !== placeholder) {
|
|
101
|
+
t7 = Placeholder.configure({ placeholder: as === "floating" ? "" : placeholder });
|
|
102
|
+
$[17] = as;
|
|
103
|
+
$[18] = placeholder;
|
|
104
|
+
$[19] = t7;
|
|
105
|
+
} else t7 = $[19];
|
|
106
|
+
let t8;
|
|
107
|
+
if ($[20] !== t7) {
|
|
108
|
+
t8 = [...extensions, t7];
|
|
109
|
+
$[20] = t7;
|
|
110
|
+
$[21] = t8;
|
|
111
|
+
} else t8 = $[21];
|
|
112
|
+
let t9;
|
|
113
|
+
if ($[22] !== editorClassName) {
|
|
114
|
+
t9 = clsx("min-h-40 rounded-b-sm p-2 outline-none", editorClassName);
|
|
115
|
+
$[22] = editorClassName;
|
|
116
|
+
$[23] = t9;
|
|
117
|
+
} else t9 = $[23];
|
|
118
|
+
let t10;
|
|
119
|
+
if ($[24] !== t9) {
|
|
120
|
+
t10 = { attributes: { class: t9 } };
|
|
121
|
+
$[24] = t9;
|
|
122
|
+
$[25] = t10;
|
|
123
|
+
} else t10 = $[25];
|
|
124
|
+
let t11;
|
|
125
|
+
if ($[26] !== onChange) {
|
|
126
|
+
t11 = (event) => {
|
|
65
127
|
onChange?.({
|
|
66
128
|
json: event.editor.getJSON(),
|
|
67
129
|
html: event.editor.getHTML()
|
|
68
130
|
});
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
isDisabled,
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
}
|
|
131
|
+
};
|
|
132
|
+
$[26] = onChange;
|
|
133
|
+
$[27] = t11;
|
|
134
|
+
} else t11 = $[27];
|
|
135
|
+
const t12 = !isDisabled;
|
|
136
|
+
let t13;
|
|
137
|
+
if ($[28] !== onBlur || $[29] !== t10 || $[30] !== t11 || $[31] !== t12 || $[32] !== t8) {
|
|
138
|
+
t13 = {
|
|
139
|
+
extensions: t8,
|
|
140
|
+
editorProps: t10,
|
|
141
|
+
onUpdate: t11,
|
|
142
|
+
immediatelyRender: false,
|
|
143
|
+
editable: t12,
|
|
144
|
+
onBlur
|
|
145
|
+
};
|
|
146
|
+
$[28] = onBlur;
|
|
147
|
+
$[29] = t10;
|
|
148
|
+
$[30] = t11;
|
|
149
|
+
$[31] = t12;
|
|
150
|
+
$[32] = t8;
|
|
151
|
+
$[33] = t13;
|
|
152
|
+
} else t13 = $[33];
|
|
153
|
+
let t14;
|
|
154
|
+
if ($[34] !== editorClassName || $[35] !== isDisabled) {
|
|
155
|
+
t14 = [isDisabled, editorClassName];
|
|
156
|
+
$[34] = editorClassName;
|
|
157
|
+
$[35] = isDisabled;
|
|
158
|
+
$[36] = t14;
|
|
159
|
+
} else t14 = $[36];
|
|
160
|
+
const editor = useEditor(t13, t14);
|
|
161
|
+
let t15;
|
|
162
|
+
if ($[37] !== editor || $[38] !== value?.json) {
|
|
163
|
+
t15 = () => {
|
|
164
|
+
const content = value?.json ?? null;
|
|
165
|
+
if (editor) {
|
|
166
|
+
if (!isEqual(content, editor.getJSON())) editor.commands.setContent(content);
|
|
167
|
+
} else if (!isEqual(content, contentRef.current)) contentRef.current = content ?? null;
|
|
168
|
+
};
|
|
169
|
+
$[37] = editor;
|
|
170
|
+
$[38] = value?.json;
|
|
171
|
+
$[39] = t15;
|
|
172
|
+
} else t15 = $[39];
|
|
173
|
+
let t16;
|
|
174
|
+
if ($[40] !== value) {
|
|
175
|
+
t16 = [value];
|
|
176
|
+
$[40] = value;
|
|
177
|
+
$[41] = t16;
|
|
178
|
+
} else t16 = $[41];
|
|
179
|
+
useEffect(t15, t16);
|
|
180
|
+
let t17;
|
|
181
|
+
let t18;
|
|
182
|
+
if ($[42] !== editor) {
|
|
183
|
+
t17 = () => {
|
|
184
|
+
if (editor && contentRef.current) {
|
|
185
|
+
editor.commands.setContent(contentRef.current);
|
|
186
|
+
contentRef.current = null;
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
t18 = [editor];
|
|
190
|
+
$[42] = editor;
|
|
191
|
+
$[43] = t17;
|
|
192
|
+
$[44] = t18;
|
|
193
|
+
} else {
|
|
194
|
+
t17 = $[43];
|
|
195
|
+
t18 = $[44];
|
|
196
|
+
}
|
|
197
|
+
useEffect(t17, t18);
|
|
198
|
+
const t19 = hideLabel || isHeaderHidden;
|
|
199
|
+
let T0;
|
|
200
|
+
let t20;
|
|
201
|
+
let t21;
|
|
202
|
+
let t22;
|
|
203
|
+
let t23;
|
|
204
|
+
let t24;
|
|
205
|
+
let t25;
|
|
206
|
+
let t26;
|
|
207
|
+
let t27;
|
|
208
|
+
let t28;
|
|
209
|
+
let t29;
|
|
210
|
+
let t30;
|
|
211
|
+
let t31;
|
|
212
|
+
let t32;
|
|
213
|
+
let t33;
|
|
214
|
+
let t34;
|
|
215
|
+
let t35;
|
|
216
|
+
let t36;
|
|
217
|
+
let t37;
|
|
218
|
+
let t38;
|
|
219
|
+
let t39;
|
|
220
|
+
let t40;
|
|
221
|
+
let t41;
|
|
222
|
+
if ($[45] !== as || $[46] !== className || $[47] !== editor || $[48] !== fieldProps || $[49] !== focusWithinProps || $[50] !== formFieldProps || $[51] !== headerClassName || $[52] !== helperText || $[53] !== hoverProps || $[54] !== inputSideCva || $[55] !== isDirty || $[56] !== isDisabled || $[57] !== isFocusVisible || $[58] !== isFocused || $[59] !== isHovered || $[60] !== isRequired || $[61] !== label || $[62] !== labelProps || $[63] !== ref || $[64] !== rightContent || $[65] !== t19 || $[66] !== tooltipText) {
|
|
223
|
+
const headerProps = {
|
|
224
|
+
label,
|
|
225
|
+
tooltipText,
|
|
226
|
+
helperText,
|
|
227
|
+
isRequired,
|
|
228
|
+
rightContent,
|
|
229
|
+
isHeaderHidden: t19,
|
|
230
|
+
isDisabled,
|
|
231
|
+
className: headerClassName,
|
|
232
|
+
labelProps
|
|
233
|
+
};
|
|
234
|
+
T0 = FormField;
|
|
235
|
+
t37 = formFieldProps;
|
|
236
|
+
t38 = ref;
|
|
237
|
+
t39 = as;
|
|
238
|
+
t40 = labelProps;
|
|
239
|
+
if ($[90] !== className) {
|
|
240
|
+
t41 = clsx("group w-full", className);
|
|
241
|
+
$[90] = className;
|
|
242
|
+
$[91] = t41;
|
|
243
|
+
} else t41 = $[91];
|
|
244
|
+
if ($[92] === Symbol.for("react.memo_cache_sentinel")) {
|
|
245
|
+
t22 = clsx("group/text-editor relative", "h-full w-full rounded-sm border border-elevation-outline-default-2 border-solid bg-elevation-fill-default-1", uiOutlineClass, "focus-within:border focus-within:border-input-outlined-outline-active", "focus-visible:outline-interactive-contained-primary-focus", "hover:border hover:border-input-outlined-outline-hover");
|
|
246
|
+
$[92] = t22;
|
|
247
|
+
} else t22 = $[92];
|
|
248
|
+
t23 = true;
|
|
249
|
+
t24 = "";
|
|
250
|
+
t25 = isHovered || void 0;
|
|
251
|
+
t26 = isDisabled || void 0;
|
|
252
|
+
t27 = isDisabled || void 0;
|
|
253
|
+
t28 = isFocused || void 0;
|
|
254
|
+
t29 = isFocused && isFocusVisible || void 0;
|
|
255
|
+
t30 = !editor?.isEmpty;
|
|
256
|
+
t31 = isRequired || void 0;
|
|
257
|
+
t32 = isDirty || void 0;
|
|
258
|
+
t33 = hoverProps;
|
|
259
|
+
t34 = focusWithinProps;
|
|
260
|
+
t35 = fieldProps;
|
|
261
|
+
if ($[93] !== editor) {
|
|
262
|
+
t36 = /* @__PURE__ */ jsx(TextEditorToolbar, { editor });
|
|
263
|
+
$[93] = editor;
|
|
264
|
+
$[94] = t36;
|
|
265
|
+
} else t36 = $[94];
|
|
266
|
+
const t42 = as === "floating" && "pt-3";
|
|
267
|
+
if ($[95] !== t42) {
|
|
268
|
+
t20 = clsx("relative overflow-auto", t42);
|
|
269
|
+
$[95] = t42;
|
|
270
|
+
$[96] = t20;
|
|
271
|
+
} else t20 = $[96];
|
|
272
|
+
t21 = as === "floating" && headerProps && /* @__PURE__ */ jsx(FormFieldLabel, {
|
|
273
|
+
as,
|
|
274
|
+
...headerProps,
|
|
275
|
+
className: clsx(headerProps.className, inputSideCva({
|
|
276
|
+
size: "default",
|
|
277
|
+
type: "left"
|
|
278
|
+
}))
|
|
279
|
+
});
|
|
280
|
+
$[45] = as;
|
|
281
|
+
$[46] = className;
|
|
282
|
+
$[47] = editor;
|
|
283
|
+
$[48] = fieldProps;
|
|
284
|
+
$[49] = focusWithinProps;
|
|
285
|
+
$[50] = formFieldProps;
|
|
286
|
+
$[51] = headerClassName;
|
|
287
|
+
$[52] = helperText;
|
|
288
|
+
$[53] = hoverProps;
|
|
289
|
+
$[54] = inputSideCva;
|
|
290
|
+
$[55] = isDirty;
|
|
291
|
+
$[56] = isDisabled;
|
|
292
|
+
$[57] = isFocusVisible;
|
|
293
|
+
$[58] = isFocused;
|
|
294
|
+
$[59] = isHovered;
|
|
295
|
+
$[60] = isRequired;
|
|
296
|
+
$[61] = label;
|
|
297
|
+
$[62] = labelProps;
|
|
298
|
+
$[63] = ref;
|
|
299
|
+
$[64] = rightContent;
|
|
300
|
+
$[65] = t19;
|
|
301
|
+
$[66] = tooltipText;
|
|
302
|
+
$[67] = T0;
|
|
303
|
+
$[68] = t20;
|
|
304
|
+
$[69] = t21;
|
|
305
|
+
$[70] = t22;
|
|
306
|
+
$[71] = t23;
|
|
307
|
+
$[72] = t24;
|
|
308
|
+
$[73] = t25;
|
|
309
|
+
$[74] = t26;
|
|
310
|
+
$[75] = t27;
|
|
311
|
+
$[76] = t28;
|
|
312
|
+
$[77] = t29;
|
|
313
|
+
$[78] = t30;
|
|
314
|
+
$[79] = t31;
|
|
315
|
+
$[80] = t32;
|
|
316
|
+
$[81] = t33;
|
|
317
|
+
$[82] = t34;
|
|
318
|
+
$[83] = t35;
|
|
319
|
+
$[84] = t36;
|
|
320
|
+
$[85] = t37;
|
|
321
|
+
$[86] = t38;
|
|
322
|
+
$[87] = t39;
|
|
323
|
+
$[88] = t40;
|
|
324
|
+
$[89] = t41;
|
|
325
|
+
} else {
|
|
326
|
+
T0 = $[67];
|
|
327
|
+
t20 = $[68];
|
|
328
|
+
t21 = $[69];
|
|
329
|
+
t22 = $[70];
|
|
330
|
+
t23 = $[71];
|
|
331
|
+
t24 = $[72];
|
|
332
|
+
t25 = $[73];
|
|
333
|
+
t26 = $[74];
|
|
334
|
+
t27 = $[75];
|
|
335
|
+
t28 = $[76];
|
|
336
|
+
t29 = $[77];
|
|
337
|
+
t30 = $[78];
|
|
338
|
+
t31 = $[79];
|
|
339
|
+
t32 = $[80];
|
|
340
|
+
t33 = $[81];
|
|
341
|
+
t34 = $[82];
|
|
342
|
+
t35 = $[83];
|
|
343
|
+
t36 = $[84];
|
|
344
|
+
t37 = $[85];
|
|
345
|
+
t38 = $[86];
|
|
346
|
+
t39 = $[87];
|
|
347
|
+
t40 = $[88];
|
|
348
|
+
t41 = $[89];
|
|
349
|
+
}
|
|
350
|
+
const t42 = as === "floating" ? "" : placeholder;
|
|
351
|
+
const t43 = as === "floating" && editor?.isEmpty && "[&_p:before]:opacity-0";
|
|
352
|
+
let t44;
|
|
353
|
+
if ($[97] !== t43) {
|
|
354
|
+
t44 = clsx(t43);
|
|
355
|
+
$[97] = t43;
|
|
356
|
+
$[98] = t44;
|
|
357
|
+
} else t44 = $[98];
|
|
358
|
+
let t45;
|
|
359
|
+
if ($[99] !== editor || $[100] !== t42 || $[101] !== t44) {
|
|
360
|
+
t45 = /* @__PURE__ */ jsx(EditorContent, {
|
|
361
|
+
editor,
|
|
362
|
+
placeholder: t42,
|
|
363
|
+
className: t44
|
|
364
|
+
});
|
|
365
|
+
$[99] = editor;
|
|
366
|
+
$[100] = t42;
|
|
367
|
+
$[101] = t44;
|
|
368
|
+
$[102] = t45;
|
|
369
|
+
} else t45 = $[102];
|
|
370
|
+
let t46;
|
|
371
|
+
if ($[103] !== t20 || $[104] !== t21 || $[105] !== t45) {
|
|
372
|
+
t46 = /* @__PURE__ */ jsxs("div", {
|
|
373
|
+
className: t20,
|
|
374
|
+
children: [t21, t45]
|
|
375
|
+
});
|
|
376
|
+
$[103] = t20;
|
|
377
|
+
$[104] = t21;
|
|
378
|
+
$[105] = t45;
|
|
379
|
+
$[106] = t46;
|
|
380
|
+
} else t46 = $[106];
|
|
381
|
+
let t47;
|
|
382
|
+
if ($[107] !== t22 || $[108] !== t23 || $[109] !== t24 || $[110] !== t25 || $[111] !== t26 || $[112] !== t27 || $[113] !== t28 || $[114] !== t29 || $[115] !== t30 || $[116] !== t31 || $[117] !== t32 || $[118] !== t33 || $[119] !== t34 || $[120] !== t35 || $[121] !== t36 || $[122] !== t46) {
|
|
383
|
+
t47 = /* @__PURE__ */ jsxs("div", {
|
|
384
|
+
className: t22,
|
|
385
|
+
"data-text-editor": t23,
|
|
386
|
+
"data-rac": t24,
|
|
387
|
+
"data-hovered": t25,
|
|
388
|
+
"data-disabled": t26,
|
|
389
|
+
"data-is-disabled": t27,
|
|
390
|
+
"data-focus-within": t28,
|
|
391
|
+
"data-focus-visible": t29,
|
|
392
|
+
"data-is-filled": t30,
|
|
393
|
+
"data-is-required": t31,
|
|
394
|
+
"data-is-dirty": t32,
|
|
395
|
+
...t33,
|
|
396
|
+
...t34,
|
|
397
|
+
...t35,
|
|
398
|
+
children: [t36, t46]
|
|
399
|
+
});
|
|
400
|
+
$[107] = t22;
|
|
401
|
+
$[108] = t23;
|
|
402
|
+
$[109] = t24;
|
|
403
|
+
$[110] = t25;
|
|
404
|
+
$[111] = t26;
|
|
405
|
+
$[112] = t27;
|
|
406
|
+
$[113] = t28;
|
|
407
|
+
$[114] = t29;
|
|
408
|
+
$[115] = t30;
|
|
409
|
+
$[116] = t31;
|
|
410
|
+
$[117] = t32;
|
|
411
|
+
$[118] = t33;
|
|
412
|
+
$[119] = t34;
|
|
413
|
+
$[120] = t35;
|
|
414
|
+
$[121] = t36;
|
|
415
|
+
$[122] = t46;
|
|
416
|
+
$[123] = t47;
|
|
417
|
+
} else t47 = $[123];
|
|
418
|
+
let t48;
|
|
419
|
+
if ($[124] !== T0 || $[125] !== t37 || $[126] !== t38 || $[127] !== t39 || $[128] !== t40 || $[129] !== t41 || $[130] !== t47) {
|
|
420
|
+
t48 = /* @__PURE__ */ jsx(T0, {
|
|
421
|
+
...t37,
|
|
422
|
+
ref: t38,
|
|
423
|
+
as: t39,
|
|
424
|
+
labelProps: t40,
|
|
425
|
+
className: t41,
|
|
426
|
+
children: t47
|
|
427
|
+
});
|
|
428
|
+
$[124] = T0;
|
|
429
|
+
$[125] = t37;
|
|
430
|
+
$[126] = t38;
|
|
431
|
+
$[127] = t39;
|
|
432
|
+
$[128] = t40;
|
|
433
|
+
$[129] = t41;
|
|
434
|
+
$[130] = t47;
|
|
435
|
+
$[131] = t48;
|
|
436
|
+
} else t48 = $[131];
|
|
437
|
+
return t48;
|
|
132
438
|
};
|
|
133
439
|
var TextEditor = (props) => {
|
|
440
|
+
const $ = c(15);
|
|
134
441
|
if ("formControl" in props && props.formControl) {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
442
|
+
let formControl;
|
|
443
|
+
let innerProps;
|
|
444
|
+
let ref;
|
|
445
|
+
if ($[0] !== props) {
|
|
446
|
+
({formControl, ref, ...innerProps} = props);
|
|
447
|
+
$[0] = props;
|
|
448
|
+
$[1] = formControl;
|
|
449
|
+
$[2] = innerProps;
|
|
450
|
+
$[3] = ref;
|
|
451
|
+
} else {
|
|
452
|
+
formControl = $[1];
|
|
453
|
+
innerProps = $[2];
|
|
454
|
+
ref = $[3];
|
|
455
|
+
}
|
|
456
|
+
let t0;
|
|
457
|
+
if ($[4] !== innerProps || $[5] !== props.error || $[6] !== props.isDisabled || $[7] !== ref) {
|
|
458
|
+
t0 = (t1) => {
|
|
459
|
+
const { field, fieldState: t2 } = t1;
|
|
460
|
+
const { error, isDirty } = t2;
|
|
461
|
+
return /* @__PURE__ */ jsx(TextEditorBase, {
|
|
462
|
+
...innerProps,
|
|
463
|
+
ref: mergeRefs(ref, field.ref),
|
|
464
|
+
value: field.value,
|
|
465
|
+
onChange: field.onChange,
|
|
466
|
+
onBlur: field.onBlur,
|
|
467
|
+
isDirty,
|
|
468
|
+
isDisabled: field.disabled || props.isDisabled,
|
|
469
|
+
error: props.error ?? error?.message
|
|
470
|
+
});
|
|
471
|
+
};
|
|
472
|
+
$[4] = innerProps;
|
|
473
|
+
$[5] = props.error;
|
|
474
|
+
$[6] = props.isDisabled;
|
|
475
|
+
$[7] = ref;
|
|
476
|
+
$[8] = t0;
|
|
477
|
+
} else t0 = $[8];
|
|
478
|
+
let t1;
|
|
479
|
+
if ($[9] !== formControl.control || $[10] !== formControl.name || $[11] !== t0) {
|
|
480
|
+
t1 = /* @__PURE__ */ jsx(Controller, {
|
|
481
|
+
control: formControl.control,
|
|
482
|
+
name: formControl.name,
|
|
483
|
+
render: t0
|
|
484
|
+
});
|
|
485
|
+
$[9] = formControl.control;
|
|
486
|
+
$[10] = formControl.name;
|
|
487
|
+
$[11] = t0;
|
|
488
|
+
$[12] = t1;
|
|
489
|
+
} else t1 = $[12];
|
|
490
|
+
return t1;
|
|
148
491
|
}
|
|
149
|
-
|
|
492
|
+
let t0;
|
|
493
|
+
if ($[13] !== props) {
|
|
494
|
+
t0 = /* @__PURE__ */ jsx(TextEditorBase, { ...props });
|
|
495
|
+
$[13] = props;
|
|
496
|
+
$[14] = t0;
|
|
497
|
+
} else t0 = $[14];
|
|
498
|
+
return t0;
|
|
150
499
|
};
|
|
151
500
|
//#endregion
|
|
152
501
|
export { TextEditor };
|
|
@@ -1,18 +1,44 @@
|
|
|
1
|
+
import { c } from "react/compiler-runtime";
|
|
1
2
|
import { jsx } from "react/jsx-runtime";
|
|
2
3
|
import { clsx } from "clsx";
|
|
3
4
|
import { ColorSwatch, ColorSwatchPicker, ColorSwatchPickerItem } from "react-aria-components";
|
|
4
5
|
//#region src/components/inputs/TextEditor/Toolbar/ColorPicker.tsx
|
|
5
|
-
var ColorPicker = (
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
6
|
+
var ColorPicker = (t0) => {
|
|
7
|
+
const $ = c(8);
|
|
8
|
+
const { colors, value, onChange } = t0;
|
|
9
|
+
let t1;
|
|
10
|
+
if ($[0] !== onChange) {
|
|
11
|
+
t1 = (color) => onChange(color.toString("hex"));
|
|
12
|
+
$[0] = onChange;
|
|
13
|
+
$[1] = t1;
|
|
14
|
+
} else t1 = $[1];
|
|
15
|
+
let t2;
|
|
16
|
+
if ($[2] !== colors) {
|
|
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;
|
|
16
35
|
};
|
|
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
|
+
}
|
|
17
43
|
//#endregion
|
|
18
44
|
export { ColorPicker };
|