@povio/ui 2.3.2-rc.3 → 2.3.3
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 +11 -26
- package/dist/assets/icons/AlignLeft.js +11 -26
- package/dist/assets/icons/AlignLeftRight.js +11 -26
- package/dist/assets/icons/AlignRight.js +11 -26
- package/dist/assets/icons/ArrowDropDown.js +11 -26
- package/dist/assets/icons/ArrowDropUp.js +11 -26
- package/dist/assets/icons/ArrowLeft.js +11 -26
- package/dist/assets/icons/ArrowRight.js +11 -26
- package/dist/assets/icons/Bold.js +11 -26
- package/dist/assets/icons/BulletedList.js +11 -26
- package/dist/assets/icons/Calendar.js +13 -28
- package/dist/assets/icons/Check.js +13 -28
- package/dist/assets/icons/CheckCircle.js +11 -26
- package/dist/assets/icons/CheckboxCheckmark.js +14 -29
- package/dist/assets/icons/CheckboxIndeterminate.js +14 -29
- package/dist/assets/icons/ChevronDown.js +13 -28
- package/dist/assets/icons/ChevronLeft.js +13 -28
- package/dist/assets/icons/ChevronRight.js +13 -28
- package/dist/assets/icons/ChevronUp.js +13 -28
- package/dist/assets/icons/ChevronsLeft.js +13 -28
- package/dist/assets/icons/ChevronsRight.js +13 -28
- package/dist/assets/icons/Clock.js +11 -26
- package/dist/assets/icons/Close.js +11 -26
- package/dist/assets/icons/DateTime.js +14 -35
- package/dist/assets/icons/DragIndicator.js +11 -26
- package/dist/assets/icons/File.js +13 -28
- package/dist/assets/icons/Highlight.js +11 -26
- package/dist/assets/icons/HighlightOn.js +15 -49
- package/dist/assets/icons/Home.js +11 -26
- package/dist/assets/icons/Info.js +16 -37
- package/dist/assets/icons/Italic.js +11 -26
- package/dist/assets/icons/Link.js +11 -26
- package/dist/assets/icons/Menu.js +11 -26
- package/dist/assets/icons/NumberedList.js +11 -26
- package/dist/assets/icons/PointerHorizontal.js +11 -26
- package/dist/assets/icons/PointerVertical.js +11 -26
- package/dist/assets/icons/Search.js +11 -26
- package/dist/assets/icons/Send.js +13 -28
- package/dist/assets/icons/Strikethrough.js +11 -26
- package/dist/assets/icons/TextColor.js +14 -48
- package/dist/assets/icons/Today.js +11 -26
- package/dist/assets/icons/Underlined.js +13 -28
- package/dist/assets/icons/Upload.js +14 -35
- package/dist/assets/icons/Visibility.js +11 -26
- package/dist/assets/icons/VisibilityOff.js +11 -26
- package/dist/assets/icons/WarningFilled.js +13 -28
- package/dist/assets/locales/sl/translation.json.js +2 -2
- package/dist/components/Breadcrumbs/Breadcrumbs.js +56 -207
- package/dist/components/Menu/Menu.js +2 -18
- package/dist/components/Menu/MenuDesktop.js +7 -41
- package/dist/components/Menu/MenuItem.js +9 -32
- package/dist/components/Menu/MenuMobile.js +38 -97
- package/dist/components/Menu/MenuPopover.js +29 -105
- package/dist/components/buttons/IconButton/IconButton.js +8 -40
- package/dist/components/buttons/InlineIconButton/InlineIconButton.d.ts +1 -2
- package/dist/components/buttons/InlineIconButton/InlineIconButton.js +9 -34
- package/dist/components/buttons/PillButton/PillButton.js +17 -55
- package/dist/components/buttons/SplitButton/SplitButton.js +18 -103
- package/dist/components/buttons/TextButton/TextButton.js +8 -30
- package/dist/components/buttons/ToggleButton/ToggleButton.js +8 -28
- package/dist/components/buttons/shared/ButtonContent.js +22 -80
- package/dist/components/inputs/Checkbox/Checkbox.d.ts +0 -1
- package/dist/components/inputs/Checkbox/Checkbox.js +35 -201
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +10 -24
- package/dist/components/inputs/Checkbox/checkbox.cva.d.ts +0 -3
- package/dist/components/inputs/Checkbox/checkbox.cva.js +1 -2
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +5 -12
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +75 -368
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +5 -12
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +298 -506
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +5 -13
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +56 -273
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +3 -6
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +130 -606
- package/dist/components/inputs/DateTime/shared/Calendar.d.ts +2 -5
- package/dist/components/inputs/DateTime/shared/Calendar.js +119 -332
- package/dist/components/inputs/DateTime/shared/CalendarCell.d.ts +2 -3
- package/dist/components/inputs/DateTime/shared/CalendarCell.js +102 -301
- package/dist/components/inputs/DateTime/shared/CalendarGrid.d.ts +2 -3
- package/dist/components/inputs/DateTime/shared/CalendarGrid.js +33 -146
- package/dist/components/inputs/DateTime/shared/CalendarHeader.js +93 -249
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +137 -318
- package/dist/components/inputs/DateTime/shared/DateField.js +112 -311
- package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +3 -13
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +139 -383
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.d.ts +0 -15
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +11 -96
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +27 -81
- package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +10 -59
- package/dist/components/inputs/DateTime/shared/MonthPicker.js +58 -103
- package/dist/components/inputs/DateTime/shared/RangeCalendar.js +82 -193
- package/dist/components/inputs/DateTime/shared/TimeField.js +8 -27
- package/dist/components/inputs/DateTime/shared/TimePickerForm.js +110 -279
- package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +1 -4
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +65 -210
- package/dist/components/inputs/DateTime/shared/YearPicker.js +68 -119
- package/dist/components/inputs/File/FileUpload.js +44 -87
- package/dist/components/inputs/File/FileUploadContainer.js +7 -15
- package/dist/components/inputs/File/InputUpload.js +79 -317
- package/dist/components/inputs/File/shared/FileCard.js +41 -104
- package/dist/components/inputs/File/shared/FileCardList.js +12 -47
- package/dist/components/inputs/File/shared/FileUploadContent.js +44 -175
- package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +46 -149
- package/dist/components/inputs/File/shared/FileUploadContentError.js +93 -234
- package/dist/components/inputs/File/shared/FileUploadContentFilled.js +97 -230
- package/dist/components/inputs/File/shared/FileUploadContentLoading.js +55 -199
- package/dist/components/inputs/File/shared/InputUploadContent.js +34 -148
- package/dist/components/inputs/File/shared/InputUploadFilled.js +8 -49
- package/dist/components/inputs/File/shared/ProgressBar.js +9 -48
- package/dist/components/inputs/FormField/FormField.d.ts +3 -3
- package/dist/components/inputs/FormField/FormField.js +37 -119
- package/dist/components/inputs/FormField/FormFieldError.js +5 -25
- package/dist/components/inputs/FormField/FormFieldHeader.d.ts +2 -2
- package/dist/components/inputs/FormField/FormFieldHeader.js +22 -81
- package/dist/components/inputs/FormField/FormFieldHeaderClose.js +7 -31
- package/dist/components/inputs/FormField/FormFieldHelper.js +6 -26
- package/dist/components/inputs/FormField/FormFieldLabel.d.ts +2 -2
- package/dist/components/inputs/FormField/FormFieldLabel.js +9 -40
- package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +2 -5
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +97 -447
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +9 -48
- package/dist/components/inputs/Input/TextArea/TextArea.js +90 -305
- package/dist/components/inputs/Input/TextInput/TextInput.d.ts +1 -3
- package/dist/components/inputs/Input/TextInput/TextInput.js +90 -419
- package/dist/components/inputs/Input/shared/InputContent.js +59 -192
- package/dist/components/inputs/Inputs/Form.js +11 -40
- package/dist/components/inputs/Inputs/InputItem.d.ts +21 -15
- package/dist/components/inputs/Inputs/InputItem.js +14 -69
- package/dist/components/inputs/Inputs/Inputs.js +11 -37
- package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +1 -3
- package/dist/components/inputs/RadioGroup/RadioGroup.js +61 -353
- package/dist/components/inputs/RadioGroup/radio.cva.d.ts +0 -17
- package/dist/components/inputs/RadioGroup/radio.cva.js +1 -42
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +2 -6
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +22 -214
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +18 -3
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +8 -104
- package/dist/components/inputs/Selection/Select/Select.d.ts +3 -7
- package/dist/components/inputs/Selection/Select/Select.js +18 -225
- package/dist/components/inputs/Selection/shared/SelectBase.d.ts +1 -8
- package/dist/components/inputs/Selection/shared/SelectBase.js +18 -69
- package/dist/components/inputs/Selection/shared/SelectDesktop.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +138 -393
- package/dist/components/inputs/Selection/shared/SelectInput.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectInput.js +116 -330
- package/dist/components/inputs/Selection/shared/SelectInputTags.js +25 -99
- package/dist/components/inputs/Selection/shared/SelectListBox.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectListBox.js +52 -164
- package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +35 -85
- package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +16 -69
- package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +21 -70
- package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +9 -58
- package/dist/components/inputs/Selection/shared/SelectMobile.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/SelectMobile.js +3 -9
- package/dist/components/inputs/Selection/shared/select.context.d.ts +2 -3
- package/dist/components/inputs/Selection/shared/select.context.js +36 -67
- package/dist/components/inputs/Selection/shared/select.types.d.ts +2 -3
- package/dist/components/inputs/Selection/shared/useSelectItems.js +49 -109
- package/dist/components/inputs/Slider/Slider.d.ts +1 -2
- package/dist/components/inputs/Slider/Slider.js +76 -265
- package/dist/components/inputs/TextEditor/TextEditor.d.ts +0 -1
- package/dist/components/inputs/TextEditor/TextEditor.js +98 -447
- package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +11 -37
- package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +30 -102
- package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +45 -194
- package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +28 -88
- package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +14 -48
- package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.js +19 -66
- package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +15 -49
- package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +32 -92
- package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +54 -126
- package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +38 -141
- package/dist/components/inputs/Toggle/Toggle.d.ts +0 -1
- package/dist/components/inputs/Toggle/Toggle.js +37 -214
- package/dist/components/inputs/Toggle/toggle.cva.d.ts +0 -3
- package/dist/components/inputs/Toggle/toggle.cva.js +1 -2
- package/dist/components/inputs/shared/CheckContent.d.ts +1 -2
- package/dist/components/inputs/shared/CheckContent.js +11 -21
- package/dist/components/inputs/shared/InputClear.d.ts +1 -2
- package/dist/components/inputs/shared/InputClear.js +12 -88
- package/dist/components/inputs/shared/TooltipWrapper.js +11 -50
- package/dist/components/inputs/shared/input.cva.d.ts +0 -10
- package/dist/components/inputs/shared/input.cva.js +4 -32
- package/dist/components/navigation/Accordion/Accordion.js +22 -69
- package/dist/components/navigation/Accordion/AccordionItem.js +41 -86
- package/dist/components/navigation/Stepper/Stepper.js +22 -67
- package/dist/components/navigation/Stepper/StepperItem.js +31 -104
- package/dist/components/navigation/Stepper/StepperSeparator.js +5 -23
- package/dist/components/overlays/ActionModal/ActionModal.js +35 -169
- package/dist/components/overlays/BottomSheet/BottomSheet.js +23 -96
- package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +8 -48
- package/dist/components/overlays/Drawer/Drawer.js +20 -62
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +27 -83
- package/dist/components/overlays/Tooltip/Tooltip.js +28 -137
- package/dist/components/overlays/Tooltip/TooltipEllipsis.js +12 -37
- package/dist/components/segment/Segment.js +57 -218
- package/dist/components/segment/SegmentItem.js +10 -67
- package/dist/components/shared/pagination/Pagination.js +22 -108
- package/dist/components/shared/pagination/PaginationList.js +64 -167
- package/dist/components/status/Alert/Alert.js +30 -97
- package/dist/components/status/Loader/Loader.js +22 -77
- package/dist/components/status/Toast/Toast.js +13 -21
- package/dist/components/status/Toast/useToast.js +57 -62
- package/dist/components/table/ColumnConfig.js +54 -158
- package/dist/components/table/InfiniteTable.js +16 -67
- package/dist/components/table/PaginatedTable.js +18 -84
- package/dist/components/table/Table.js +27 -28
- package/dist/components/text/Link/Link.js +7 -19
- package/dist/components/text/Typography/Typography.js +8 -23
- package/dist/config/confirmation.context.js +1 -1
- package/dist/config/link.context.js +9 -23
- package/dist/config/router.context.js +16 -42
- package/dist/config/theme.context.js +45 -98
- package/dist/config/uiConfig.context.d.ts +6 -19
- package/dist/config/uiConfig.context.js +14 -67
- package/dist/config/uiStyle.context.d.ts +4 -27
- package/dist/config/uiStyle.context.js +5 -15
- package/dist/helpers/dynamicInputs.d.ts +5 -5
- package/dist/helpers/dynamicInputs.js +0 -3
- package/dist/hooks/useBreakpoint.js +3 -16
- package/dist/hooks/useDebounceCallback.js +17 -51
- package/dist/hooks/useFilters.js +64 -125
- package/dist/hooks/useForm.js +8 -42
- package/dist/hooks/useFormAutosave.js +30 -101
- package/dist/hooks/useIntersectionObserver.d.ts +1 -1
- package/dist/hooks/useIntersectionObserver.js +24 -91
- package/dist/hooks/useLocalStorage.js +10 -43
- package/dist/hooks/useLongPressRepeat.js +20 -55
- package/dist/hooks/usePagination.js +19 -49
- package/dist/hooks/useScrollableListBox.js +16 -37
- package/dist/hooks/useSorting.js +28 -69
- package/dist/hooks/useStateAndRef.js +7 -21
- package/dist/hooks/useTableColumnConfig.js +31 -124
- package/dist/hooks/useTranslationMemo.js +5 -25
- package/dist/index.d.ts +0 -7
- package/dist/index.js +2 -4
- package/dist/tw-ui-plugin.js +0 -6
- package/dist/utils/date-time.utils.d.ts +10 -38
- package/dist/utils/date-time.utils.js +22 -134
- package/package.json +1 -1
- package/dist/components/inputs/DateTime/shared/datePicker.types.d.ts +0 -5
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.d.ts +0 -7
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.js +0 -13
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.d.ts +0 -15
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.js +0 -32
- package/dist/components/inputs/DateTime/shared/dateSegment.utils.d.ts +0 -2
- package/dist/components/inputs/DateTime/shared/dateSegment.utils.spec.d.ts +0 -1
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.d.ts +0 -39
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.js +0 -85
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.spec.d.ts +0 -1
- package/dist/components/inputs/FormField/formFieldHeader.cva.d.ts +0 -6
- package/dist/components/inputs/FormField/formFieldHeader.cva.js +0 -11
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.d.ts +0 -45
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +0 -571
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +0 -35
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +0 -575
- package/dist/components/inputs/Input/TextArea/TextArea.cva.d.ts +0 -4
- package/dist/components/inputs/Input/TextArea/TextArea.cva.js +0 -5
- package/dist/components/inputs/Input/shared/numberStatic.utils.d.ts +0 -1
- package/dist/components/inputs/Input/shared/numberStatic.utils.js +0 -7
- package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +0 -36
- package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +0 -14
- package/dist/components/inputs/Selection/Select/QuerySelect.js +0 -173
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.d.ts +0 -9
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +0 -47
- package/dist/components/inputs/Selection/shared/querySelect.utils.d.ts +0 -12
- package/dist/components/inputs/Selection/shared/querySelect.utils.js +0 -36
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.d.ts +0 -3
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.js +0 -5
- package/dist/components/inputs/Selection/shared/selectInput.cva.d.ts +0 -5
- package/dist/components/inputs/Selection/shared/selectInput.cva.js +0 -5
- package/dist/components/inputs/Selection/shared/staticSelect.utils.d.ts +0 -23
- package/dist/components/inputs/Selection/shared/staticSelect.utils.js +0 -37
- package/dist/components/inputs/Selection/shared/staticSelect.utils.spec.d.ts +0 -1
- package/dist/components/inputs/Skeleton/InputFrame.d.ts +0 -82
- package/dist/components/inputs/Skeleton/InputFrame.js +0 -548
- package/dist/components/inputs/shared/tooltipWrapper.cva.d.ts +0 -4
- package/dist/components/inputs/shared/tooltipWrapper.cva.js +0 -5
- package/dist/components/inputs/shared/useStaticInputHandoff.d.ts +0 -14
- package/dist/components/inputs/shared/useStaticInputHandoff.js +0 -100
- package/dist/hooks/useQueryAutocomplete.d.ts +0 -14
- package/dist/hooks/useQueryAutocomplete.js +0 -57
- package/dist/utils/query.utils.d.ts +0 -4
- package/dist/utils/query.utils.js +0 -8
|
@@ -5,75 +5,28 @@ 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";
|
|
9
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
9
|
//#region src/components/inputs/TextEditor/Toolbar/TextEditorToolbar.tsx
|
|
11
|
-
var TextEditorToolbar = (
|
|
12
|
-
const $ = c(16);
|
|
13
|
-
const { editor } = t0;
|
|
10
|
+
var TextEditorToolbar = ({ editor }) => {
|
|
14
11
|
if (!editor) return null;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
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;
|
|
12
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
13
|
+
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",
|
|
14
|
+
children: [
|
|
15
|
+
/* @__PURE__ */ jsxs("div", {
|
|
16
|
+
className: "flex flex-wrap gap-1",
|
|
17
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
18
|
+
className: "flex items-center gap-1",
|
|
19
|
+
children: [/* @__PURE__ */ jsx(TextStyleSelect, { editor }), /* @__PURE__ */ jsx(TextAlignSelect, { editor })]
|
|
20
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
21
|
+
className: "flex items-center gap-1",
|
|
22
|
+
children: [/* @__PURE__ */ jsx(TextColorSelect, { editor }), /* @__PURE__ */ jsx(TextHighlightSelect, { editor })]
|
|
23
|
+
})]
|
|
24
|
+
}),
|
|
25
|
+
/* @__PURE__ */ jsx(TextMarksActions, { editor }),
|
|
26
|
+
/* @__PURE__ */ jsx(TextListActions, { editor }),
|
|
27
|
+
/* @__PURE__ */ jsx(HyperlinkAction, { editor })
|
|
28
|
+
]
|
|
29
|
+
});
|
|
77
30
|
};
|
|
78
31
|
//#endregion
|
|
79
32
|
export { TextEditorToolbar };
|
|
@@ -2,59 +2,25 @@ 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";
|
|
6
5
|
import { jsx } from "react/jsx-runtime";
|
|
7
6
|
//#region src/components/inputs/TextEditor/Toolbar/TextHighlightSelect.tsx
|
|
8
|
-
var TextHighlightSelect = (
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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, {
|
|
7
|
+
var TextHighlightSelect = ({ editor }) => {
|
|
8
|
+
if (!editor.extensionManager.extensions.some((extension) => extension.name === "highlight")) return null;
|
|
9
|
+
const onChange = (color) => {
|
|
10
|
+
if (color === "#FFFFFF") editor.chain().focus().unsetHighlight().run();
|
|
11
|
+
else editor.chain().focus().setHighlight({ color }).run();
|
|
12
|
+
};
|
|
13
|
+
const highlightColor = editor.getAttributes("highlight").color || "#FFFFFF";
|
|
14
|
+
return /* @__PURE__ */ jsx(ColorPickerDropdown, {
|
|
15
|
+
value: highlightColor,
|
|
16
|
+
onChange,
|
|
17
|
+
colors: defaultColors,
|
|
18
|
+
isDisabled: !editor.isEditable,
|
|
19
|
+
children: highlightColor ? /* @__PURE__ */ jsx(HighlightOnIcon, {
|
|
33
20
|
className: "size-6",
|
|
34
21
|
highlightColor
|
|
35
|
-
}) : /* @__PURE__ */ jsx(HighlightIcon, { className: "size-6" })
|
|
36
|
-
|
|
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;
|
|
22
|
+
}) : /* @__PURE__ */ jsx(HighlightIcon, { className: "size-6" })
|
|
23
|
+
});
|
|
55
24
|
};
|
|
56
|
-
function _temp(extension) {
|
|
57
|
-
return extension.name === "highlight";
|
|
58
|
-
}
|
|
59
25
|
//#endregion
|
|
60
26
|
export { TextHighlightSelect };
|
|
@@ -2,103 +2,43 @@ 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";
|
|
6
5
|
import { jsx } from "react/jsx-runtime";
|
|
7
6
|
import { clsx } from "clsx";
|
|
8
7
|
import { useTranslation } from "react-i18next";
|
|
9
8
|
//#region src/components/inputs/TextEditor/Toolbar/TextListActions.tsx
|
|
10
|
-
var TextListActions = (
|
|
11
|
-
const $ = c(11);
|
|
12
|
-
const { editor } = t0;
|
|
9
|
+
var TextListActions = ({ editor }) => {
|
|
13
10
|
const { t } = useTranslation("ui");
|
|
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
|
-
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;
|
|
11
|
+
const enabledActions = [{
|
|
12
|
+
can: !!editor.extensionManager.extensions.find((extension) => extension.name === "bulletList"),
|
|
13
|
+
isEnabled: () => editor.isEditable && editor.can().toggleBulletList(),
|
|
14
|
+
label: t(($) => $.ui.textEditor.marks.bold),
|
|
15
|
+
icon: BulletedListIcon,
|
|
16
|
+
onPress: () => {
|
|
17
|
+
editor.chain().focus().toggleBulletList().run();
|
|
18
|
+
},
|
|
19
|
+
isActive: () => editor.isActive("bulletList")
|
|
20
|
+
}, {
|
|
21
|
+
can: !!editor.extensionManager.extensions.find((extension) => extension.name === "orderedList"),
|
|
22
|
+
isEnabled: () => editor.isEditable && editor.can().toggleOrderedList(),
|
|
23
|
+
label: t(($) => $.ui.textEditor.marks.italic),
|
|
24
|
+
icon: NumberedListIcon,
|
|
25
|
+
onPress: () => {
|
|
26
|
+
editor.chain().focus().toggleOrderedList().run();
|
|
27
|
+
},
|
|
28
|
+
isActive: () => editor.isActive("orderedList")
|
|
29
|
+
}].filter((action) => action.can);
|
|
30
|
+
if (enabledActions.length === 0) return null;
|
|
31
|
+
return /* @__PURE__ */ jsx("div", {
|
|
32
|
+
className: "flex h-full items-center gap-3",
|
|
33
|
+
children: enabledActions.map((action) => /* @__PURE__ */ jsx(InlineIconButton, {
|
|
34
|
+
color: "secondary",
|
|
35
|
+
label: action.label,
|
|
36
|
+
onPress: action.onPress,
|
|
37
|
+
icon: action.icon,
|
|
38
|
+
isDisabled: !action.isEnabled(),
|
|
39
|
+
className: clsx(action.isActive() && "!text-interactive-text-primary-idle")
|
|
40
|
+
}, action.label))
|
|
41
|
+
});
|
|
77
42
|
};
|
|
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
|
-
}
|
|
103
43
|
//#endregion
|
|
104
44
|
export { TextListActions };
|
|
@@ -4,138 +4,66 @@ 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";
|
|
8
7
|
import { jsx } from "react/jsx-runtime";
|
|
9
8
|
import { clsx } from "clsx";
|
|
10
9
|
import { useTranslation } from "react-i18next";
|
|
11
10
|
//#region src/components/inputs/TextEditor/Toolbar/TextMarksActions.tsx
|
|
12
|
-
var TextMarksActions = (
|
|
13
|
-
const $ = c(11);
|
|
14
|
-
const { editor } = t0;
|
|
11
|
+
var TextMarksActions = ({ editor }) => {
|
|
15
12
|
const { t } = useTranslation("ui");
|
|
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
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
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
|
-
});
|
|
13
|
+
const enabledActions = [
|
|
14
|
+
{
|
|
15
|
+
can: !!editor.extensionManager.extensions.find((extension) => extension.name === "bold"),
|
|
16
|
+
isEnabled: () => editor.isEditable && editor.can().toggleBold(),
|
|
17
|
+
label: t(($) => $.ui.textEditor.marks.bold),
|
|
18
|
+
icon: BoldIcon,
|
|
19
|
+
onPress: () => {
|
|
20
|
+
editor.chain().focus().toggleBold().run();
|
|
21
|
+
},
|
|
22
|
+
isActive: () => editor.isActive("bold")
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
can: !!editor.extensionManager.extensions.find((extension) => extension.name === "italic"),
|
|
26
|
+
isEnabled: () => editor.isEditable && editor.can().toggleItalic(),
|
|
27
|
+
label: t(($) => $.ui.textEditor.marks.italic),
|
|
28
|
+
icon: ItalicIcon,
|
|
29
|
+
onPress: () => {
|
|
30
|
+
editor.chain().focus().toggleItalic().run();
|
|
31
|
+
},
|
|
32
|
+
isActive: () => editor.isActive("italic")
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
can: !!editor.extensionManager.extensions.find((extension) => extension.name === "strike"),
|
|
36
|
+
isEnabled: () => editor.isEditable && editor.can().toggleStrike(),
|
|
37
|
+
label: t(($) => $.ui.textEditor.marks.strikethrough),
|
|
38
|
+
icon: StrikethroughIcon,
|
|
39
|
+
onPress: () => {
|
|
40
|
+
editor.chain().focus().toggleStrike().run();
|
|
41
|
+
},
|
|
42
|
+
isActive: () => editor.isActive("strike")
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
can: !!editor.extensionManager.extensions.find((extension) => extension.name === "underline"),
|
|
46
|
+
isEnabled: () => editor.isEditable && editor.can().toggleUnderline(),
|
|
47
|
+
label: t(($) => $.ui.textEditor.marks.underline),
|
|
48
|
+
icon: UnderlinedIcon,
|
|
49
|
+
onPress: () => {
|
|
50
|
+
editor.chain().focus().toggleUnderline().run();
|
|
51
|
+
},
|
|
52
|
+
isActive: () => editor.isActive("underline")
|
|
89
53
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
54
|
+
].filter((action) => action.can);
|
|
55
|
+
if (enabledActions.length === 0) return null;
|
|
56
|
+
return /* @__PURE__ */ jsx("div", {
|
|
57
|
+
className: "flex h-full items-center gap-3",
|
|
58
|
+
children: enabledActions.map((action) => /* @__PURE__ */ jsx(InlineIconButton, {
|
|
59
|
+
color: "secondary",
|
|
60
|
+
label: action.label,
|
|
61
|
+
onPress: action.onPress,
|
|
62
|
+
icon: action.icon,
|
|
63
|
+
isDisabled: !action.isEnabled(),
|
|
64
|
+
className: clsx(action.isActive() && "!text-interactive-text-primary-idle")
|
|
65
|
+
}, action.label))
|
|
66
|
+
});
|
|
102
67
|
};
|
|
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
|
-
}
|
|
140
68
|
//#endregion
|
|
141
69
|
export { TextMarksActions };
|