@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,28 +5,75 @@ import { TextHighlightSelect } from "./TextHighlightSelect.js";
|
|
|
5
5
|
import { TextListActions } from "./TextListActions.js";
|
|
6
6
|
import { TextMarksActions } from "./TextMarksActions.js";
|
|
7
7
|
import { TextStyleSelect } from "./TextStyleSelect.js";
|
|
8
|
+
import { c } from "react/compiler-runtime";
|
|
8
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
10
|
//#region src/components/inputs/TextEditor/Toolbar/TextEditorToolbar.tsx
|
|
10
|
-
var TextEditorToolbar = (
|
|
11
|
+
var TextEditorToolbar = (t0) => {
|
|
12
|
+
const $ = c(16);
|
|
13
|
+
const { editor } = t0;
|
|
11
14
|
if (!editor) return null;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
/* @__PURE__ */ jsx(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
]
|
|
29
|
-
}
|
|
15
|
+
let t1;
|
|
16
|
+
if ($[0] !== editor) {
|
|
17
|
+
t1 = /* @__PURE__ */ jsxs("div", {
|
|
18
|
+
className: "flex items-center gap-1",
|
|
19
|
+
children: [/* @__PURE__ */ jsx(TextStyleSelect, { editor }), /* @__PURE__ */ jsx(TextAlignSelect, { editor })]
|
|
20
|
+
});
|
|
21
|
+
$[0] = editor;
|
|
22
|
+
$[1] = t1;
|
|
23
|
+
} else t1 = $[1];
|
|
24
|
+
let t2;
|
|
25
|
+
if ($[2] !== editor) {
|
|
26
|
+
t2 = /* @__PURE__ */ jsxs("div", {
|
|
27
|
+
className: "flex items-center gap-1",
|
|
28
|
+
children: [/* @__PURE__ */ jsx(TextColorSelect, { editor }), /* @__PURE__ */ jsx(TextHighlightSelect, { editor })]
|
|
29
|
+
});
|
|
30
|
+
$[2] = editor;
|
|
31
|
+
$[3] = t2;
|
|
32
|
+
} else t2 = $[3];
|
|
33
|
+
let t3;
|
|
34
|
+
if ($[4] !== t1 || $[5] !== t2) {
|
|
35
|
+
t3 = /* @__PURE__ */ jsxs("div", {
|
|
36
|
+
className: "flex flex-wrap gap-1",
|
|
37
|
+
children: [t1, t2]
|
|
38
|
+
});
|
|
39
|
+
$[4] = t1;
|
|
40
|
+
$[5] = t2;
|
|
41
|
+
$[6] = t3;
|
|
42
|
+
} else t3 = $[6];
|
|
43
|
+
let t4;
|
|
44
|
+
let t5;
|
|
45
|
+
let t6;
|
|
46
|
+
if ($[7] !== editor) {
|
|
47
|
+
t4 = /* @__PURE__ */ jsx(TextMarksActions, { editor });
|
|
48
|
+
t5 = /* @__PURE__ */ jsx(TextListActions, { editor });
|
|
49
|
+
t6 = /* @__PURE__ */ jsx(HyperlinkAction, { editor });
|
|
50
|
+
$[7] = editor;
|
|
51
|
+
$[8] = t4;
|
|
52
|
+
$[9] = t5;
|
|
53
|
+
$[10] = t6;
|
|
54
|
+
} else {
|
|
55
|
+
t4 = $[8];
|
|
56
|
+
t5 = $[9];
|
|
57
|
+
t6 = $[10];
|
|
58
|
+
}
|
|
59
|
+
let t7;
|
|
60
|
+
if ($[11] !== t3 || $[12] !== t4 || $[13] !== t5 || $[14] !== t6) {
|
|
61
|
+
t7 = /* @__PURE__ */ jsxs("div", {
|
|
62
|
+
className: "flex w-full flex-wrap items-center gap-x-7 gap-y-1 border-elevation-outline-default-2 border-b border-solid p-2",
|
|
63
|
+
children: [
|
|
64
|
+
t3,
|
|
65
|
+
t4,
|
|
66
|
+
t5,
|
|
67
|
+
t6
|
|
68
|
+
]
|
|
69
|
+
});
|
|
70
|
+
$[11] = t3;
|
|
71
|
+
$[12] = t4;
|
|
72
|
+
$[13] = t5;
|
|
73
|
+
$[14] = t6;
|
|
74
|
+
$[15] = t7;
|
|
75
|
+
} else t7 = $[15];
|
|
76
|
+
return t7;
|
|
30
77
|
};
|
|
31
78
|
//#endregion
|
|
32
79
|
export { TextEditorToolbar };
|
|
@@ -2,25 +2,59 @@ import { HighlightIcon } from "../../../../assets/icons/Highlight.js";
|
|
|
2
2
|
import { HighlightOnIcon } from "../../../../assets/icons/HighlightOn.js";
|
|
3
3
|
import { ColorPickerDropdown } from "./ColorPickerDropdown.js";
|
|
4
4
|
import { defaultColors } from "../textEditor.types.js";
|
|
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
|
|
7
|
-
var TextHighlightSelect = (
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
8
|
+
var TextHighlightSelect = (t0) => {
|
|
9
|
+
const $ = c(11);
|
|
10
|
+
const { editor } = t0;
|
|
11
|
+
if (!editor.extensionManager.extensions.some(_temp)) return null;
|
|
12
|
+
let t1;
|
|
13
|
+
if ($[0] !== editor) {
|
|
14
|
+
t1 = (color) => {
|
|
15
|
+
if (color === "#FFFFFF") editor.chain().focus().unsetHighlight().run();
|
|
16
|
+
else editor.chain().focus().setHighlight({ color }).run();
|
|
17
|
+
};
|
|
18
|
+
$[0] = editor;
|
|
19
|
+
$[1] = t1;
|
|
20
|
+
} else t1 = $[1];
|
|
21
|
+
const onChange = t1;
|
|
22
|
+
let t2;
|
|
23
|
+
if ($[2] !== editor) {
|
|
24
|
+
t2 = editor.getAttributes("highlight").color || "#FFFFFF";
|
|
25
|
+
$[2] = editor;
|
|
26
|
+
$[3] = t2;
|
|
27
|
+
} else t2 = $[3];
|
|
28
|
+
const highlightColor = t2;
|
|
29
|
+
const t3 = !editor.isEditable;
|
|
30
|
+
let t4;
|
|
31
|
+
if ($[4] !== highlightColor) {
|
|
32
|
+
t4 = highlightColor ? /* @__PURE__ */ jsx(HighlightOnIcon, {
|
|
20
33
|
className: "size-6",
|
|
21
34
|
highlightColor
|
|
22
|
-
}) : /* @__PURE__ */ jsx(HighlightIcon, { className: "size-6" })
|
|
23
|
-
|
|
35
|
+
}) : /* @__PURE__ */ jsx(HighlightIcon, { className: "size-6" });
|
|
36
|
+
$[4] = highlightColor;
|
|
37
|
+
$[5] = t4;
|
|
38
|
+
} else t4 = $[5];
|
|
39
|
+
let t5;
|
|
40
|
+
if ($[6] !== highlightColor || $[7] !== onChange || $[8] !== t3 || $[9] !== t4) {
|
|
41
|
+
t5 = /* @__PURE__ */ jsx(ColorPickerDropdown, {
|
|
42
|
+
value: highlightColor,
|
|
43
|
+
onChange,
|
|
44
|
+
colors: defaultColors,
|
|
45
|
+
isDisabled: t3,
|
|
46
|
+
children: t4
|
|
47
|
+
});
|
|
48
|
+
$[6] = highlightColor;
|
|
49
|
+
$[7] = onChange;
|
|
50
|
+
$[8] = t3;
|
|
51
|
+
$[9] = t4;
|
|
52
|
+
$[10] = t5;
|
|
53
|
+
} else t5 = $[10];
|
|
54
|
+
return t5;
|
|
24
55
|
};
|
|
56
|
+
function _temp(extension) {
|
|
57
|
+
return extension.name === "highlight";
|
|
58
|
+
}
|
|
25
59
|
//#endregion
|
|
26
60
|
export { TextHighlightSelect };
|
|
@@ -2,43 +2,103 @@ import { BulletedListIcon } from "../../../../assets/icons/BulletedList.js";
|
|
|
2
2
|
import { NumberedListIcon } from "../../../../assets/icons/NumberedList.js";
|
|
3
3
|
import { InlineIconButton } from "../../../buttons/InlineIconButton/InlineIconButton.js";
|
|
4
4
|
import "../../../../config/i18n.js";
|
|
5
|
+
import { c } from "react/compiler-runtime";
|
|
5
6
|
import { jsx } from "react/jsx-runtime";
|
|
6
7
|
import { clsx } from "clsx";
|
|
7
8
|
import { useTranslation } from "react-i18next";
|
|
8
9
|
//#region src/components/inputs/TextEditor/Toolbar/TextListActions.tsx
|
|
9
|
-
var TextListActions = (
|
|
10
|
+
var TextListActions = (t0) => {
|
|
11
|
+
const $ = c(11);
|
|
12
|
+
const { editor } = t0;
|
|
10
13
|
const { t } = useTranslation("ui");
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
14
|
+
let t1;
|
|
15
|
+
if ($[0] !== editor.extensionManager.extensions) {
|
|
16
|
+
t1 = editor.extensionManager.extensions.find(_temp);
|
|
17
|
+
$[0] = editor.extensionManager.extensions;
|
|
18
|
+
$[1] = t1;
|
|
19
|
+
} else t1 = $[1];
|
|
20
|
+
const t2 = !!t1;
|
|
21
|
+
let t3;
|
|
22
|
+
if ($[2] !== editor) {
|
|
23
|
+
t3 = () => editor.isEditable && editor.can().toggleBulletList();
|
|
24
|
+
$[2] = editor;
|
|
25
|
+
$[3] = t3;
|
|
26
|
+
} else t3 = $[3];
|
|
27
|
+
let t4;
|
|
28
|
+
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
29
|
+
t4 = _temp2;
|
|
30
|
+
$[4] = t4;
|
|
31
|
+
} else t4 = $[4];
|
|
32
|
+
let t5;
|
|
33
|
+
let t6;
|
|
34
|
+
if ($[5] !== editor || $[6] !== t || $[7] !== t2 || $[8] !== t3) {
|
|
35
|
+
t6 = Symbol.for("react.early_return_sentinel");
|
|
36
|
+
bb0: {
|
|
37
|
+
const enabledActions = [{
|
|
38
|
+
can: t2,
|
|
39
|
+
isEnabled: t3,
|
|
40
|
+
label: t(t4),
|
|
41
|
+
icon: BulletedListIcon,
|
|
42
|
+
onPress: () => {
|
|
43
|
+
editor.chain().focus().toggleBulletList().run();
|
|
44
|
+
},
|
|
45
|
+
isActive: () => editor.isActive("bulletList")
|
|
46
|
+
}, {
|
|
47
|
+
can: !!editor.extensionManager.extensions.find(_temp3),
|
|
48
|
+
isEnabled: () => editor.isEditable && editor.can().toggleOrderedList(),
|
|
49
|
+
label: t(_temp4),
|
|
50
|
+
icon: NumberedListIcon,
|
|
51
|
+
onPress: () => {
|
|
52
|
+
editor.chain().focus().toggleOrderedList().run();
|
|
53
|
+
},
|
|
54
|
+
isActive: () => editor.isActive("orderedList")
|
|
55
|
+
}].filter(_temp5);
|
|
56
|
+
if (enabledActions.length === 0) {
|
|
57
|
+
t6 = null;
|
|
58
|
+
break bb0;
|
|
59
|
+
}
|
|
60
|
+
t5 = /* @__PURE__ */ jsx("div", {
|
|
61
|
+
className: "flex h-full items-center gap-3",
|
|
62
|
+
children: enabledActions.map(_temp6)
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
$[5] = editor;
|
|
66
|
+
$[6] = t;
|
|
67
|
+
$[7] = t2;
|
|
68
|
+
$[8] = t3;
|
|
69
|
+
$[9] = t5;
|
|
70
|
+
$[10] = t6;
|
|
71
|
+
} else {
|
|
72
|
+
t5 = $[9];
|
|
73
|
+
t6 = $[10];
|
|
74
|
+
}
|
|
75
|
+
if (t6 !== Symbol.for("react.early_return_sentinel")) return t6;
|
|
76
|
+
return t5;
|
|
42
77
|
};
|
|
78
|
+
function _temp(extension) {
|
|
79
|
+
return extension.name === "bulletList";
|
|
80
|
+
}
|
|
81
|
+
function _temp2($) {
|
|
82
|
+
return $.ui.textEditor.marks.bold;
|
|
83
|
+
}
|
|
84
|
+
function _temp3(extension_0) {
|
|
85
|
+
return extension_0.name === "orderedList";
|
|
86
|
+
}
|
|
87
|
+
function _temp4($_0) {
|
|
88
|
+
return $_0.ui.textEditor.marks.italic;
|
|
89
|
+
}
|
|
90
|
+
function _temp5(action) {
|
|
91
|
+
return action.can;
|
|
92
|
+
}
|
|
93
|
+
function _temp6(action_0) {
|
|
94
|
+
return /* @__PURE__ */ jsx(InlineIconButton, {
|
|
95
|
+
color: "secondary",
|
|
96
|
+
label: action_0.label,
|
|
97
|
+
onPress: action_0.onPress,
|
|
98
|
+
icon: action_0.icon,
|
|
99
|
+
isDisabled: !action_0.isEnabled(),
|
|
100
|
+
className: clsx(action_0.isActive() && "!text-interactive-text-primary-idle")
|
|
101
|
+
}, action_0.label);
|
|
102
|
+
}
|
|
43
103
|
//#endregion
|
|
44
104
|
export { TextListActions };
|
|
@@ -4,66 +4,138 @@ import { StrikethroughIcon } from "../../../../assets/icons/Strikethrough.js";
|
|
|
4
4
|
import { UnderlinedIcon } from "../../../../assets/icons/Underlined.js";
|
|
5
5
|
import { InlineIconButton } from "../../../buttons/InlineIconButton/InlineIconButton.js";
|
|
6
6
|
import "../../../../config/i18n.js";
|
|
7
|
+
import { c } from "react/compiler-runtime";
|
|
7
8
|
import { jsx } from "react/jsx-runtime";
|
|
8
9
|
import { clsx } from "clsx";
|
|
9
10
|
import { useTranslation } from "react-i18next";
|
|
10
11
|
//#region src/components/inputs/TextEditor/Toolbar/TextMarksActions.tsx
|
|
11
|
-
var TextMarksActions = (
|
|
12
|
+
var TextMarksActions = (t0) => {
|
|
13
|
+
const $ = c(11);
|
|
14
|
+
const { editor } = t0;
|
|
12
15
|
const { t } = useTranslation("ui");
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
16
|
+
let t1;
|
|
17
|
+
if ($[0] !== editor.extensionManager.extensions) {
|
|
18
|
+
t1 = editor.extensionManager.extensions.find(_temp);
|
|
19
|
+
$[0] = editor.extensionManager.extensions;
|
|
20
|
+
$[1] = t1;
|
|
21
|
+
} else t1 = $[1];
|
|
22
|
+
const t2 = !!t1;
|
|
23
|
+
let t3;
|
|
24
|
+
if ($[2] !== editor) {
|
|
25
|
+
t3 = () => editor.isEditable && editor.can().toggleBold();
|
|
26
|
+
$[2] = editor;
|
|
27
|
+
$[3] = t3;
|
|
28
|
+
} else t3 = $[3];
|
|
29
|
+
let t4;
|
|
30
|
+
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
31
|
+
t4 = _temp2;
|
|
32
|
+
$[4] = t4;
|
|
33
|
+
} else t4 = $[4];
|
|
34
|
+
let t5;
|
|
35
|
+
let t6;
|
|
36
|
+
if ($[5] !== editor || $[6] !== t || $[7] !== t2 || $[8] !== t3) {
|
|
37
|
+
t6 = Symbol.for("react.early_return_sentinel");
|
|
38
|
+
bb0: {
|
|
39
|
+
const enabledActions = [
|
|
40
|
+
{
|
|
41
|
+
can: t2,
|
|
42
|
+
isEnabled: t3,
|
|
43
|
+
label: t(t4),
|
|
44
|
+
icon: BoldIcon,
|
|
45
|
+
onPress: () => {
|
|
46
|
+
editor.chain().focus().toggleBold().run();
|
|
47
|
+
},
|
|
48
|
+
isActive: () => editor.isActive("bold")
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
can: !!editor.extensionManager.extensions.find(_temp3),
|
|
52
|
+
isEnabled: () => editor.isEditable && editor.can().toggleItalic(),
|
|
53
|
+
label: t(_temp4),
|
|
54
|
+
icon: ItalicIcon,
|
|
55
|
+
onPress: () => {
|
|
56
|
+
editor.chain().focus().toggleItalic().run();
|
|
57
|
+
},
|
|
58
|
+
isActive: () => editor.isActive("italic")
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
can: !!editor.extensionManager.extensions.find(_temp5),
|
|
62
|
+
isEnabled: () => editor.isEditable && editor.can().toggleStrike(),
|
|
63
|
+
label: t(_temp6),
|
|
64
|
+
icon: StrikethroughIcon,
|
|
65
|
+
onPress: () => {
|
|
66
|
+
editor.chain().focus().toggleStrike().run();
|
|
67
|
+
},
|
|
68
|
+
isActive: () => editor.isActive("strike")
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
can: !!editor.extensionManager.extensions.find(_temp7),
|
|
72
|
+
isEnabled: () => editor.isEditable && editor.can().toggleUnderline(),
|
|
73
|
+
label: t(_temp8),
|
|
74
|
+
icon: UnderlinedIcon,
|
|
75
|
+
onPress: () => {
|
|
76
|
+
editor.chain().focus().toggleUnderline().run();
|
|
77
|
+
},
|
|
78
|
+
isActive: () => editor.isActive("underline")
|
|
79
|
+
}
|
|
80
|
+
].filter(_temp9);
|
|
81
|
+
if (enabledActions.length === 0) {
|
|
82
|
+
t6 = null;
|
|
83
|
+
break bb0;
|
|
84
|
+
}
|
|
85
|
+
t5 = /* @__PURE__ */ jsx("div", {
|
|
86
|
+
className: "flex h-full items-center gap-3",
|
|
87
|
+
children: enabledActions.map(_temp0)
|
|
88
|
+
});
|
|
53
89
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
});
|
|
90
|
+
$[5] = editor;
|
|
91
|
+
$[6] = t;
|
|
92
|
+
$[7] = t2;
|
|
93
|
+
$[8] = t3;
|
|
94
|
+
$[9] = t5;
|
|
95
|
+
$[10] = t6;
|
|
96
|
+
} else {
|
|
97
|
+
t5 = $[9];
|
|
98
|
+
t6 = $[10];
|
|
99
|
+
}
|
|
100
|
+
if (t6 !== Symbol.for("react.early_return_sentinel")) return t6;
|
|
101
|
+
return t5;
|
|
67
102
|
};
|
|
103
|
+
function _temp(extension) {
|
|
104
|
+
return extension.name === "bold";
|
|
105
|
+
}
|
|
106
|
+
function _temp2($) {
|
|
107
|
+
return $.ui.textEditor.marks.bold;
|
|
108
|
+
}
|
|
109
|
+
function _temp3(extension_0) {
|
|
110
|
+
return extension_0.name === "italic";
|
|
111
|
+
}
|
|
112
|
+
function _temp4($_0) {
|
|
113
|
+
return $_0.ui.textEditor.marks.italic;
|
|
114
|
+
}
|
|
115
|
+
function _temp5(extension_1) {
|
|
116
|
+
return extension_1.name === "strike";
|
|
117
|
+
}
|
|
118
|
+
function _temp6($_1) {
|
|
119
|
+
return $_1.ui.textEditor.marks.strikethrough;
|
|
120
|
+
}
|
|
121
|
+
function _temp7(extension_2) {
|
|
122
|
+
return extension_2.name === "underline";
|
|
123
|
+
}
|
|
124
|
+
function _temp8($_2) {
|
|
125
|
+
return $_2.ui.textEditor.marks.underline;
|
|
126
|
+
}
|
|
127
|
+
function _temp9(action) {
|
|
128
|
+
return action.can;
|
|
129
|
+
}
|
|
130
|
+
function _temp0(action_0) {
|
|
131
|
+
return /* @__PURE__ */ jsx(InlineIconButton, {
|
|
132
|
+
color: "secondary",
|
|
133
|
+
label: action_0.label,
|
|
134
|
+
onPress: action_0.onPress,
|
|
135
|
+
icon: action_0.icon,
|
|
136
|
+
isDisabled: !action_0.isEnabled(),
|
|
137
|
+
className: clsx(action_0.isActive() && "!text-interactive-text-primary-idle")
|
|
138
|
+
}, action_0.label);
|
|
139
|
+
}
|
|
68
140
|
//#endregion
|
|
69
141
|
export { TextMarksActions };
|