origam 2.38.1 → 2.38.2
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/CHANGELOG.md +24 -0
- package/dist/src/assets/locales/en.json +1 -1
- package/dist/src/assets/locales/fr.json +2 -2
- package/dist/src/components/Alert/OrigamAlert.vue +739 -165
- package/dist/src/components/App/OrigamApp.vue +95 -19
- package/dist/src/components/App/OrigamAppBar.vue +751 -158
- package/dist/src/components/Audio/OrigamAudio.vue +1288 -346
- package/dist/src/components/Audio/OrigamAudioWaveform.vue +63 -7
- package/dist/src/components/Avatar/OrigamAvatar.vue +678 -126
- package/dist/src/components/Avatar/OrigamAvatarGroup.vue +700 -153
- package/dist/src/components/Badge/OrigamBadge.vue +548 -135
- package/dist/src/components/Blockquote/OrigamBlockquote.vue +698 -140
- package/dist/src/components/BottomNav/OrigamBottomNav.vue +864 -156
- package/dist/src/components/Bracket/OrigamBracket.vue +1013 -380
- package/dist/src/components/Bracket/OrigamBracketCompetitor.vue +674 -154
- package/dist/src/components/Bracket/OrigamBracketMatch.vue +663 -163
- package/dist/src/components/Bracket/OrigamBracketRound.vue +116 -34
- package/dist/src/components/Breadcrumb/OrigamBreadcrumb.vue +654 -119
- package/dist/src/components/Breadcrumb/OrigamBreadcrumbDivider.vue +292 -54
- package/dist/src/components/Breadcrumb/OrigamBreadcrumbItem.vue +657 -126
- package/dist/src/components/Btn/OrigamBtn.vue +928 -249
- package/dist/src/components/Btn/OrigamBtnGroup.vue +658 -141
- package/dist/src/components/Btn/OrigamBtnToggle.vue +578 -91
- package/dist/src/components/Calendar/OrigamCalendar.vue +1142 -484
- package/dist/src/components/Card/OrigamCard.vue +938 -194
- package/dist/src/components/Card/OrigamCardHeader.vue +593 -104
- package/dist/src/components/Card/OrigamCardText.vue +536 -84
- package/dist/src/components/Carousel/OrigamCarousel.vue +778 -202
- package/dist/src/components/Carousel/OrigamCarouselItem.vue +660 -109
- package/dist/src/components/Chart/OrigamChart.vue +942 -452
- package/dist/src/components/Chart/OrigamChartAxis.vue +111 -19
- package/dist/src/components/Chart/OrigamChartBoxPlot.vue +713 -297
- package/dist/src/components/Chart/OrigamChartBullet.vue +701 -286
- package/dist/src/components/Chart/OrigamChartCandlestick.vue +663 -243
- package/dist/src/components/Chart/OrigamChartCartesian.vue +1055 -487
- package/dist/src/components/Chart/OrigamChartGauge.vue +563 -164
- package/dist/src/components/Chart/OrigamChartHeatmap.vue +677 -251
- package/dist/src/components/Chart/OrigamChartHoneycomb.vue +700 -288
- package/dist/src/components/Chart/OrigamChartLegend.vue +108 -16
- package/dist/src/components/Chart/OrigamChartMap.vue +723 -299
- package/dist/src/components/Chart/OrigamChartPareto.vue +721 -276
- package/dist/src/components/Chart/OrigamChartPictorial.vue +777 -355
- package/dist/src/components/Chart/OrigamChartPolar.vue +603 -210
- package/dist/src/components/Chart/OrigamChartPolarBar.vue +674 -271
- package/dist/src/components/Chart/OrigamChartPyramid.vue +685 -250
- package/dist/src/components/Chart/OrigamChartRadar.vue +515 -165
- package/dist/src/components/Chart/OrigamChartRangeSelector.vue +50 -25
- package/dist/src/components/Chart/OrigamChartSankey.vue +913 -467
- package/dist/src/components/Chart/OrigamChartSparkline.vue +711 -268
- package/dist/src/components/Chart/OrigamChartStreamgraph.vue +810 -368
- package/dist/src/components/Chart/OrigamChartSunburst.vue +779 -368
- package/dist/src/components/Chart/OrigamChartTooltip.vue +78 -19
- package/dist/src/components/Chart/OrigamChartTreemap.vue +750 -288
- package/dist/src/components/Chart/OrigamChartVariwide.vue +679 -251
- package/dist/src/components/Chart/OrigamChartWordCloud.vue +674 -265
- package/dist/src/components/Checkbox/OrigamCheckbox.vue +781 -136
- package/dist/src/components/Checkbox/OrigamCheckboxBtn.vue +465 -81
- package/dist/src/components/Checkbox/OrigamCheckboxGroup.vue +824 -137
- package/dist/src/components/Chip/OrigamChip.vue +867 -202
- package/dist/src/components/Chip/OrigamChipGroup.vue +633 -121
- package/dist/src/components/ClientOnly/OrigamClientOnly.vue +30 -4
- package/dist/src/components/Clipboard/OrigamClipboard.vue +624 -105
- package/dist/src/components/Code/OrigamCode.vue +844 -206
- package/dist/src/components/CodeGroup/OrigamCodeGroup.vue +494 -83
- package/dist/src/components/ColorPicker/OrigamColorPicker.vue +777 -159
- package/dist/src/components/ColorPicker/OrigamColorPickerCanvas.vue +295 -181
- package/dist/src/components/ColorPicker/OrigamColorPickerEdit.vue +108 -45
- package/dist/src/components/ColorPicker/OrigamColorPickerPreview.vue +131 -46
- package/dist/src/components/ColorPicker/OrigamColorPickerSwatches.vue +128 -39
- package/dist/src/components/ColorPickerField/OrigamColorPickerField.vue +1123 -258
- package/dist/src/components/CommandPalette/OrigamCommandPalette.vue +415 -162
- package/dist/src/components/ConfirmWrapper/OrigamConfirmWrapper.vue +389 -145
- package/dist/src/components/ContextualMenu/OrigamContextualMenu.vue +852 -147
- package/dist/src/components/Counter/OrigamCounter.vue +588 -96
- package/dist/src/components/DataList/OrigamDataList.vue +619 -113
- package/dist/src/components/DataList/OrigamDataText.vue +295 -65
- package/dist/src/components/DataList/OrigamDataTitle.vue +295 -65
- package/dist/src/components/DataTable/OrigamDataTable.vue +934 -222
- package/dist/src/components/DataTable/OrigamDataTableColumnCell.vue +196 -51
- package/dist/src/components/DataTable/OrigamDataTableFooter.vue +319 -78
- package/dist/src/components/DataTable/OrigamDataTableGroupHeaderRow.vue +124 -44
- package/dist/src/components/DataTable/OrigamDataTableHeaderCell.vue +181 -70
- package/dist/src/components/DataTable/OrigamDataTableHeaders.vue +155 -46
- package/dist/src/components/DataTable/OrigamDataTableHeadersCell.vue +145 -27
- package/dist/src/components/DataTable/OrigamDataTableHeadersCellMobile.vue +126 -43
- package/dist/src/components/DataTable/OrigamDataTableRow.vue +151 -73
- package/dist/src/components/DataTable/OrigamDataTableRows.vue +261 -106
- package/dist/src/components/DatePicker/OrigamDatePicker.vue +1048 -261
- package/dist/src/components/DatePicker/OrigamDatePickerControls.vue +155 -51
- package/dist/src/components/DatePicker/OrigamDatePickerHeader.vue +147 -46
- package/dist/src/components/DatePicker/OrigamDatePickerMonth.vue +312 -134
- package/dist/src/components/DatePicker/OrigamDatePickerMonths.vue +151 -61
- package/dist/src/components/DatePicker/OrigamDatePickerYears.vue +154 -67
- package/dist/src/components/DatePickerField/OrigamDatePickerField.vue +1147 -306
- package/dist/src/components/DefaultsProvider/OrigamDefaultsProvider.vue +74 -14
- package/dist/src/components/Dialog/OrigamDialog.vue +953 -196
- package/dist/src/components/Dialog/OrigamDialogConfirmation.vue +886 -148
- package/dist/src/components/Divider/OrigamDivider.vue +210 -50
- package/dist/src/components/Drawer/OrigamDrawer.vue +909 -207
- package/dist/src/components/EmptyState/OrigamEmptyState.vue +146 -35
- package/dist/src/components/ExpansionPanel/OrigamExpansionPanel.vue +746 -159
- package/dist/src/components/ExpansionPanel/OrigamExpansionPanelContent.vue +591 -95
- package/dist/src/components/ExpansionPanel/OrigamExpansionPanelHeader.vue +663 -143
- package/dist/src/components/ExpansionPanel/OrigamExpansionPanels.vue +675 -134
- package/dist/src/components/Field/OrigamField.vue +1118 -306
- package/dist/src/components/FileField/OrigamFileField.vue +1188 -311
- package/dist/src/components/FileField/OrigamFileFieldDragNDropItem.vue +155 -36
- package/dist/src/components/FileField/OrigamFileFieldListItem.vue +155 -36
- package/dist/src/components/Form/OrigamForm.vue +197 -74
- package/dist/src/components/Grid/OrigamGrid.vue +707 -147
- package/dist/src/components/Grid/OrigamGridItem.vue +110 -37
- package/dist/src/components/Grids/OrigamCol.vue +593 -110
- package/dist/src/components/Grids/OrigamContainer.vue +461 -80
- package/dist/src/components/Grids/OrigamRow.vue +573 -112
- package/dist/src/components/Grids/OrigamSpacer.vue +54 -17
- package/dist/src/components/Icon/OrigamClassIcon.vue +573 -98
- package/dist/src/components/Icon/OrigamComponentIcon.vue +561 -101
- package/dist/src/components/Icon/OrigamIcon.vue +561 -98
- package/dist/src/components/Icon/OrigamLigatureIcon.vue +558 -98
- package/dist/src/components/Icon/OrigamSvgIcon.vue +593 -100
- package/dist/src/components/Img/OrigamImg.vue +869 -228
- package/dist/src/components/InfiniteScroll/OrigamInfiniteScroll.vue +319 -111
- package/dist/src/components/InfiniteScroll/OrigamInfiniteScrollIntersect.vue +80 -17
- package/dist/src/components/InlineEdit/OrigamInlineEdit.vue +476 -140
- package/dist/src/components/Input/OrigamInput.vue +747 -180
- package/dist/src/components/ItemGroup/OrigamItemGroup.vue +112 -36
- package/dist/src/components/ItemGroup/OrigamItemGroupItem.vue +80 -29
- package/dist/src/components/Kbd/OrigamKbd.vue +450 -75
- package/dist/src/components/Label/OrigamLabel.vue +584 -95
- package/dist/src/components/Layout/OrigamLayout.vue +563 -94
- package/dist/src/components/Lazy/OrigamLazy.vue +131 -34
- package/dist/src/components/List/OrigamList.vue +755 -170
- package/dist/src/components/List/OrigamListChildren.vue +59 -19
- package/dist/src/components/List/OrigamListGroup.vue +631 -134
- package/dist/src/components/List/OrigamListGroupActivator.vue +45 -17
- package/dist/src/components/List/OrigamListItem.vue +890 -224
- package/dist/src/components/List/OrigamListItemWrapper.vue +20 -10
- package/dist/src/components/List/OrigamListSubheader.vue +542 -93
- package/dist/src/components/Loader/OrigamLoader.vue +110 -25
- package/dist/src/components/Main/OrigamMain.vue +565 -96
- package/dist/src/components/Masonry/OrigamMasonry.vue +799 -187
- package/dist/src/components/Media/OrigamMediaController.vue +465 -182
- package/dist/src/components/Media/OrigamMediaScrubber.vue +389 -152
- package/dist/src/components/Media/OrigamMediaVolumeControl.vue +174 -44
- package/dist/src/components/Menu/OrigamMenu.vue +1079 -255
- package/dist/src/components/Messages/OrigamMessages.vue +606 -97
- package/dist/src/components/NumberField/OrigamNumberField.vue +1208 -333
- package/dist/src/components/NumberFormat/OrigamNumberFormat.vue +177 -57
- package/dist/src/components/OtpInputField/OrigamOtpInputField.vue +1016 -272
- package/dist/src/components/Overlay/OrigamOverlay.vue +446 -158
- package/dist/src/components/Overlay/OrigamOverlayScrim.vue +122 -30
- package/dist/src/components/Pagination/OrigamPagination.vue +982 -313
- package/dist/src/components/Parallax/OrigamParallax.vue +800 -259
- package/dist/src/components/Parallax/OrigamParallaxElement.vue +694 -178
- package/dist/src/components/Parallax/OrigamParallaxLayer.vue +132 -47
- package/dist/src/components/PasswordField/OrigamPasswordField.vue +1098 -265
- package/dist/src/components/Picker/OrigamPicker.vue +655 -108
- package/dist/src/components/Picker/OrigamPickerTitle.vue +108 -26
- package/dist/src/components/Progress/OrigamProgress.vue +436 -70
- package/dist/src/components/Progress/OrigamProgressCircular.vue +399 -82
- package/dist/src/components/Progress/OrigamProgressLinear.vue +468 -115
- package/dist/src/components/QrCode/OrigamQrCode.vue +642 -126
- package/dist/src/components/Radio/OrigamRadio.vue +772 -132
- package/dist/src/components/Radio/OrigamRadioBtn.vue +446 -71
- package/dist/src/components/Radio/OrigamRadioGroup.vue +808 -135
- package/dist/src/components/RatingField/OrigamRatingField.vue +963 -194
- package/dist/src/components/RatingField/OrigamRatingFieldItem.vue +657 -106
- package/dist/src/components/Responsive/OrigamResponsive.vue +548 -91
- package/dist/src/components/Select/OrigamSelect.vue +1639 -567
- package/dist/src/components/SelectionControl/OrigamSelectionControl.vue +564 -151
- package/dist/src/components/SelectionControl/OrigamSelectionControlGroup.vue +178 -62
- package/dist/src/components/Sheet/OrigamSheet.vue +773 -199
- package/dist/src/components/Skeleton/OrigamSkeleton.vue +249 -46
- package/dist/src/components/Skeleton/OrigamSkeletonGroup.vue +66 -11
- package/dist/src/components/Slide/OrigamSlideGroup.vue +772 -257
- package/dist/src/components/SliderField/OrigamSliderField.vue +1157 -335
- package/dist/src/components/SliderField/OrigamSliderFieldTrack.vue +236 -112
- package/dist/src/components/Snackbar/OrigamSnackbar.vue +871 -214
- package/dist/src/components/Snackbar/OrigamSnackbarGroup.vue +218 -51
- package/dist/src/components/Snackbar/OrigamSnackbarItem.vue +175 -43
- package/dist/src/components/Stepper/OrigamStepper.vue +618 -126
- package/dist/src/components/Stepper/OrigamStepperItem.vue +98 -37
- package/dist/src/components/Switch/OrigamSwitch.vue +879 -156
- package/dist/src/components/Switch/OrigamSwitchTrack.vue +431 -78
- package/dist/src/components/SystemBar/OrigamSystemBar.vue +517 -87
- package/dist/src/components/Table/OrigamTable.vue +585 -124
- package/dist/src/components/Tabs/OrigamTab.vue +239 -73
- package/dist/src/components/Tabs/OrigamTabPanel.vue +125 -39
- package/dist/src/components/Tabs/OrigamTabPanels.vue +148 -57
- package/dist/src/components/Tabs/OrigamTabs.vue +381 -109
- package/dist/src/components/TextField/OrigamTextField.vue +1077 -258
- package/dist/src/components/TextMask/OrigamTextMask.vue +150 -43
- package/dist/src/components/TextareaField/OrigamTextareaField.vue +1162 -310
- package/dist/src/components/TextareaField/OrigamTextareaFieldRichToolbar.vue +77 -79
- package/dist/src/components/ThemeProvider/OrigamThemeProvider.vue +44 -9
- package/dist/src/components/Timeline/OrigamTimeline.vue +113 -43
- package/dist/src/components/Timeline/OrigamTimelineItem.vue +163 -76
- package/dist/src/components/Title/OrigamTitle.vue +505 -82
- package/dist/src/components/Toolbar/OrigamToolbar.vue +679 -142
- package/dist/src/components/Tooltip/OrigamTooltip.vue +288 -72
- package/dist/src/components/Transition/OrigamExpandX.vue +219 -106
- package/dist/src/components/Transition/OrigamExpandY.vue +219 -106
- package/dist/src/components/Transition/OrigamFade.vue +47 -9
- package/dist/src/components/Transition/OrigamReverseTranslatePicker.vue +52 -10
- package/dist/src/components/Transition/OrigamScaleRotate.vue +52 -10
- package/dist/src/components/Transition/OrigamSlideX.vue +52 -10
- package/dist/src/components/Transition/OrigamSlideY.vue +52 -10
- package/dist/src/components/Transition/OrigamSnack.vue +52 -10
- package/dist/src/components/Transition/OrigamTransition.vue +40 -12
- package/dist/src/components/Transition/OrigamTranslateBottom.vue +52 -10
- package/dist/src/components/Transition/OrigamTranslatePicker.vue +52 -10
- package/dist/src/components/Transition/OrigamTranslateScale.vue +209 -97
- package/dist/src/components/Transition/OrigamWindowXReverseTranslate.vue +40 -7
- package/dist/src/components/Transition/OrigamWindowXTranslate.vue +40 -7
- package/dist/src/components/Transition/OrigamWindowYReverseTranslate.vue +40 -7
- package/dist/src/components/Transition/OrigamWindowYTranslate.vue +40 -7
- package/dist/src/components/Treeview/OrigamTreeview.vue +258 -118
- package/dist/src/components/Treeview/OrigamTreeviewNode.vue +126 -88
- package/dist/src/components/Video/OrigamVideo.vue +1178 -331
- package/dist/src/components/VirtualScroll/OrigamVirtualScroll.vue +147 -55
- package/dist/src/components/VirtualScroll/OrigamVirtualScrollItem.vue +94 -19
- package/dist/src/components/Watermark/OrigamWatermark.vue +224 -124
- package/dist/src/components/Window/OrigamWindow.vue +745 -175
- package/dist/src/components/Window/OrigamWindowItem.vue +162 -69
- package/dist/src/composables/Commons/display.composable.cjs +2 -0
- package/dist/src/composables/Commons/display.composable.js +1 -1
- package/dist/src/interfaces/Pagination/pagination.interface.d.ts +1 -1
- package/package.json +6 -6
|
@@ -88,10 +88,24 @@ import { useLocale } from "../../composables/Commons/locale.composable";
|
|
|
88
88
|
import { MDI_ICONS } from "../../enums/Commons/mdi.enum";
|
|
89
89
|
import { TEXTAREA_TOOLBAR_COMMAND, TEXTAREA_TOOLBAR_POSITION } from "../../enums/TextareaField/textarea-field-rich-toolbar.enum";
|
|
90
90
|
const props = defineProps({
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
91
|
+
items: {
|
|
92
|
+
type: Array,
|
|
93
|
+
required: true
|
|
94
|
+
},
|
|
95
|
+
active: {
|
|
96
|
+
type: Object,
|
|
97
|
+
required: true
|
|
98
|
+
},
|
|
99
|
+
position: {
|
|
100
|
+
type: null,
|
|
101
|
+
required: false,
|
|
102
|
+
default: TEXTAREA_TOOLBAR_POSITION.TOP
|
|
103
|
+
},
|
|
104
|
+
disabled: {
|
|
105
|
+
type: Boolean,
|
|
106
|
+
required: false,
|
|
107
|
+
default: false
|
|
108
|
+
}
|
|
95
109
|
});
|
|
96
110
|
const emit = defineEmits(["format"]);
|
|
97
111
|
defineSlots();
|
|
@@ -103,97 +117,81 @@ const toolbarLabel = computed(() => t("origam.textarea.rich.toolbar.aria_label")
|
|
|
103
117
|
const linkPlaceholder = computed(() => t("origam.textarea.rich.link.placeholder"));
|
|
104
118
|
const linkApplyLabel = computed(() => t("origam.textarea.rich.link.apply"));
|
|
105
119
|
const ICON_MAP = {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
120
|
+
[TEXTAREA_TOOLBAR_COMMAND.BOLD]: MDI_ICONS.FORMAT_BOLD,
|
|
121
|
+
[TEXTAREA_TOOLBAR_COMMAND.ITALIC]: MDI_ICONS.FORMAT_ITALIC,
|
|
122
|
+
[TEXTAREA_TOOLBAR_COMMAND.UNDERLINE]: MDI_ICONS.FORMAT_UNDERLINE,
|
|
123
|
+
[TEXTAREA_TOOLBAR_COMMAND.LINK]: MDI_ICONS.LINK_VARIANT,
|
|
124
|
+
[TEXTAREA_TOOLBAR_COMMAND.LIST_BULLET]: MDI_ICONS.FORMAT_LIST_BULLETED,
|
|
125
|
+
[TEXTAREA_TOOLBAR_COMMAND.LIST_ORDERED]: MDI_ICONS.FORMAT_LIST_NUMBERED,
|
|
126
|
+
[TEXTAREA_TOOLBAR_COMMAND.HEADING]: MDI_ICONS.FORMAT_HEADER_1,
|
|
127
|
+
[TEXTAREA_TOOLBAR_COMMAND.HEADING_1]: MDI_ICONS.FORMAT_HEADER_1,
|
|
128
|
+
[TEXTAREA_TOOLBAR_COMMAND.HEADING_2]: MDI_ICONS.FORMAT_HEADER_2,
|
|
129
|
+
[TEXTAREA_TOOLBAR_COMMAND.HEADING_3]: MDI_ICONS.FORMAT_HEADER_3,
|
|
130
|
+
[TEXTAREA_TOOLBAR_COMMAND.CODE_INLINE]: MDI_ICONS.CODE_TAGS,
|
|
131
|
+
[TEXTAREA_TOOLBAR_COMMAND.CLEAR_FORMAT]: MDI_ICONS.FORMAT_CLEAR
|
|
118
132
|
};
|
|
119
133
|
const LABEL_KEY = {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
134
|
+
[TEXTAREA_TOOLBAR_COMMAND.BOLD]: ["origam.textarea.rich.command.bold", "Bold"],
|
|
135
|
+
[TEXTAREA_TOOLBAR_COMMAND.ITALIC]: ["origam.textarea.rich.command.italic", "Italic"],
|
|
136
|
+
[TEXTAREA_TOOLBAR_COMMAND.UNDERLINE]: ["origam.textarea.rich.command.underline", "Underline"],
|
|
137
|
+
[TEXTAREA_TOOLBAR_COMMAND.LINK]: ["origam.textarea.rich.command.link", "Insert link"],
|
|
138
|
+
[TEXTAREA_TOOLBAR_COMMAND.LIST_BULLET]: ["origam.textarea.rich.command.list_bullet", "Bullet list"],
|
|
139
|
+
[TEXTAREA_TOOLBAR_COMMAND.LIST_ORDERED]: ["origam.textarea.rich.command.list_ordered", "Numbered list"],
|
|
140
|
+
[TEXTAREA_TOOLBAR_COMMAND.HEADING]: ["origam.textarea.rich.command.heading", "Heading"],
|
|
141
|
+
[TEXTAREA_TOOLBAR_COMMAND.HEADING_1]: ["origam.textarea.rich.command.heading_1", "Heading 1"],
|
|
142
|
+
[TEXTAREA_TOOLBAR_COMMAND.HEADING_2]: ["origam.textarea.rich.command.heading_2", "Heading 2"],
|
|
143
|
+
[TEXTAREA_TOOLBAR_COMMAND.HEADING_3]: ["origam.textarea.rich.command.heading_3", "Heading 3"],
|
|
144
|
+
[TEXTAREA_TOOLBAR_COMMAND.CODE_INLINE]: ["origam.textarea.rich.command.code_inline", "Inline code"],
|
|
145
|
+
[TEXTAREA_TOOLBAR_COMMAND.CLEAR_FORMAT]: ["origam.textarea.rich.command.clear_format", "Clear formatting"]
|
|
132
146
|
};
|
|
133
|
-
const toolbarClasses = computed(() => [
|
|
134
|
-
"origam-rich-toolbar",
|
|
135
|
-
`origam-rich-toolbar--${props.position}`
|
|
136
|
-
]);
|
|
147
|
+
const toolbarClasses = computed(() => ["origam-rich-toolbar", `origam-rich-toolbar--${props.position}`]);
|
|
137
148
|
const isLink = (item) => item === TEXTAREA_TOOLBAR_COMMAND.LINK;
|
|
138
149
|
const isActive = (item) => {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
return props.active.listOrdered;
|
|
154
|
-
case TEXTAREA_TOOLBAR_COMMAND.HEADING:
|
|
155
|
-
case TEXTAREA_TOOLBAR_COMMAND.HEADING_1:
|
|
156
|
-
return props.active.heading === 1;
|
|
157
|
-
case TEXTAREA_TOOLBAR_COMMAND.HEADING_2:
|
|
158
|
-
return props.active.heading === 2;
|
|
159
|
-
case TEXTAREA_TOOLBAR_COMMAND.HEADING_3:
|
|
160
|
-
return props.active.heading === 3;
|
|
161
|
-
default:
|
|
162
|
-
return false;
|
|
163
|
-
}
|
|
150
|
+
switch (item) {
|
|
151
|
+
case TEXTAREA_TOOLBAR_COMMAND.BOLD: return props.active.bold;
|
|
152
|
+
case TEXTAREA_TOOLBAR_COMMAND.ITALIC: return props.active.italic;
|
|
153
|
+
case TEXTAREA_TOOLBAR_COMMAND.UNDERLINE: return props.active.underline;
|
|
154
|
+
case TEXTAREA_TOOLBAR_COMMAND.CODE_INLINE: return props.active.code;
|
|
155
|
+
case TEXTAREA_TOOLBAR_COMMAND.LINK: return props.active.link;
|
|
156
|
+
case TEXTAREA_TOOLBAR_COMMAND.LIST_BULLET: return props.active.listBullet;
|
|
157
|
+
case TEXTAREA_TOOLBAR_COMMAND.LIST_ORDERED: return props.active.listOrdered;
|
|
158
|
+
case TEXTAREA_TOOLBAR_COMMAND.HEADING:
|
|
159
|
+
case TEXTAREA_TOOLBAR_COMMAND.HEADING_1: return props.active.heading === 1;
|
|
160
|
+
case TEXTAREA_TOOLBAR_COMMAND.HEADING_2: return props.active.heading === 2;
|
|
161
|
+
case TEXTAREA_TOOLBAR_COMMAND.HEADING_3: return props.active.heading === 3;
|
|
162
|
+
default: return false;
|
|
163
|
+
}
|
|
164
164
|
};
|
|
165
|
-
const btnClassFor = (item) => ({
|
|
166
|
-
"origam-rich-toolbar__btn--active": isActive(item)
|
|
167
|
-
});
|
|
165
|
+
const btnClassFor = (item) => ({ "origam-rich-toolbar__btn--active": isActive(item) });
|
|
168
166
|
const iconFor = (item) => ICON_MAP[item] ?? MDI_ICONS.FORMAT_BOLD;
|
|
169
167
|
const labelFor = (item) => {
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
168
|
+
const entry = LABEL_KEY[item];
|
|
169
|
+
if (!entry) return item;
|
|
170
|
+
return t(entry[0], entry[1]);
|
|
173
171
|
};
|
|
174
172
|
const openLinkPopover = async () => {
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
173
|
+
linkPopoverOpen.value = !linkPopoverOpen.value;
|
|
174
|
+
if (!linkPopoverOpen.value) return;
|
|
175
|
+
linkInput.value = "";
|
|
176
|
+
await nextTick();
|
|
177
|
+
linkInputRef.value?.focus();
|
|
180
178
|
};
|
|
181
179
|
const closeLinkPopover = () => {
|
|
182
|
-
|
|
183
|
-
|
|
180
|
+
linkPopoverOpen.value = false;
|
|
181
|
+
linkInput.value = "";
|
|
184
182
|
};
|
|
185
183
|
const applyLink = () => {
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
184
|
+
const url = linkInput.value.trim();
|
|
185
|
+
if (url === "") {
|
|
186
|
+
closeLinkPopover();
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
emit("format", TEXTAREA_TOOLBAR_COMMAND.LINK, url);
|
|
190
|
+
closeLinkPopover();
|
|
193
191
|
};
|
|
194
192
|
defineExpose({
|
|
195
|
-
|
|
196
|
-
|
|
193
|
+
openLinkPopover,
|
|
194
|
+
closeLinkPopover
|
|
197
195
|
});
|
|
198
196
|
</script>
|
|
199
197
|
|
|
@@ -17,26 +17,61 @@ import { ORIGAM_DEFAULTS_KEY } from "../../consts/Commons/defaults.const";
|
|
|
17
17
|
import { ORIGAM_THEME_DEFAULTS_KEY } from "../../consts/Commons/theme.const";
|
|
18
18
|
import { omit } from "../../utils/Commons/commons.util";
|
|
19
19
|
defineOptions({ inheritAttrs: false });
|
|
20
|
+
/*********************************************************
|
|
21
|
+
* Global
|
|
22
|
+
********************************************************/
|
|
20
23
|
const props = defineProps({
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
theme: {
|
|
25
|
+
type: null,
|
|
26
|
+
required: false,
|
|
27
|
+
default: "auto"
|
|
28
|
+
},
|
|
29
|
+
mode: {
|
|
30
|
+
type: null,
|
|
31
|
+
required: false,
|
|
32
|
+
default: "auto"
|
|
33
|
+
},
|
|
34
|
+
tag: {
|
|
35
|
+
type: String,
|
|
36
|
+
required: false,
|
|
37
|
+
default: "div"
|
|
38
|
+
}
|
|
24
39
|
});
|
|
25
40
|
defineEmits([]);
|
|
26
41
|
defineSlots();
|
|
27
42
|
const attrs = useAttrs();
|
|
28
|
-
const dataTheme = computed(() => props.theme === "auto" ?
|
|
29
|
-
const dataMode = computed(() => props.mode === "auto" ?
|
|
43
|
+
const dataTheme = computed(() => props.theme === "auto" ? undefined : props.theme);
|
|
44
|
+
const dataMode = computed(() => props.mode === "auto" ? undefined : props.mode);
|
|
30
45
|
const themeProviderClasses = computed(() => {
|
|
31
|
-
|
|
46
|
+
return ["origam-theme-provider", attrs.class];
|
|
32
47
|
});
|
|
48
|
+
/*********************************************************
|
|
49
|
+
* restAttrs
|
|
50
|
+
*
|
|
51
|
+
* @description
|
|
52
|
+
* `class` is merged explicitly into `themeProviderClasses` above — strip it
|
|
53
|
+
* from the raw `$attrs` fallthrough so it isn't applied twice. Everything
|
|
54
|
+
* else (`id`, `style`, `data-cy`, event listeners, …) reaches the root
|
|
55
|
+
* unmodified. Issue #492: `inheritAttrs: false` was set with no fallthrough
|
|
56
|
+
* binding at all, so every non-`class` attribute was silently dropped.
|
|
57
|
+
********************************************************/
|
|
33
58
|
const restAttrs = computed(() => omit(attrs, ["class"]));
|
|
59
|
+
/*********************************************************
|
|
60
|
+
* resolveThemeDefaults
|
|
61
|
+
*
|
|
62
|
+
* @description
|
|
63
|
+
* Re-apply the named brand's per-component DEFAULT PROPS (`theme.components`)
|
|
64
|
+
* to this sub-tree, so props-first theming works in a scoped sub-tree — not
|
|
65
|
+
* only the CSS-variable re-scoping done by `data-theme`. When `theme="auto"`
|
|
66
|
+
* (no brand) or the resolver is unavailable (component used outside
|
|
67
|
+
* `createOrigam`), fall back to the inherited parent defaults (no-op).
|
|
68
|
+
********************************************************/
|
|
34
69
|
const resolveThemeDefaults = inject(ORIGAM_THEME_DEFAULTS_KEY, null);
|
|
35
70
|
const parentDefaults = inject(ORIGAM_DEFAULTS_KEY, ref({}));
|
|
36
71
|
const scopedDefaults = computed(() => {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
72
|
+
if (props.theme === "auto" || !resolveThemeDefaults) return parentDefaults.value;
|
|
73
|
+
const mode = props.mode === "auto" ? undefined : props.mode;
|
|
74
|
+
return resolveThemeDefaults(props.theme, mode);
|
|
40
75
|
});
|
|
41
76
|
provideDefaults(scopedDefaults, { scoped: true });
|
|
42
77
|
</script>
|
|
@@ -60,64 +60,134 @@ import { useStyle } from "../../composables/Commons/style.composable";
|
|
|
60
60
|
import { TIMELINE_CONTEXT_KEY } from "../../consts/Timeline/timeline.const";
|
|
61
61
|
import { DIRECTION } from "../../enums/Commons/direction.enum";
|
|
62
62
|
import { TIMELINE_SIDE } from "../../enums/Timeline/timeline.enum";
|
|
63
|
+
/*********************************************************
|
|
64
|
+
* Global
|
|
65
|
+
********************************************************/
|
|
63
66
|
const props = defineProps({
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
67
|
+
items: {
|
|
68
|
+
type: Array,
|
|
69
|
+
required: false
|
|
70
|
+
},
|
|
71
|
+
orientation: {
|
|
72
|
+
type: null,
|
|
73
|
+
required: false,
|
|
74
|
+
default: "vertical"
|
|
75
|
+
},
|
|
76
|
+
side: {
|
|
77
|
+
type: null,
|
|
78
|
+
required: false,
|
|
79
|
+
default: "start"
|
|
80
|
+
},
|
|
81
|
+
truncateLine: {
|
|
82
|
+
type: Boolean,
|
|
83
|
+
required: false,
|
|
84
|
+
default: false
|
|
85
|
+
},
|
|
86
|
+
ariaLabel: {
|
|
87
|
+
type: String,
|
|
88
|
+
required: false
|
|
89
|
+
},
|
|
90
|
+
id: {
|
|
91
|
+
type: String,
|
|
92
|
+
required: false
|
|
93
|
+
},
|
|
94
|
+
class: {
|
|
95
|
+
type: [
|
|
96
|
+
String,
|
|
97
|
+
Array,
|
|
98
|
+
Object
|
|
99
|
+
],
|
|
100
|
+
required: false
|
|
101
|
+
},
|
|
102
|
+
style: {
|
|
103
|
+
type: [
|
|
104
|
+
String,
|
|
105
|
+
Array,
|
|
106
|
+
Object,
|
|
107
|
+
Boolean,
|
|
108
|
+
null
|
|
109
|
+
],
|
|
110
|
+
required: false,
|
|
111
|
+
skipCheck: true
|
|
112
|
+
},
|
|
113
|
+
tag: {
|
|
114
|
+
type: String,
|
|
115
|
+
required: false,
|
|
116
|
+
default: "div"
|
|
117
|
+
},
|
|
118
|
+
color: {
|
|
119
|
+
type: [
|
|
120
|
+
String,
|
|
121
|
+
Object,
|
|
122
|
+
Boolean,
|
|
123
|
+
null
|
|
124
|
+
],
|
|
125
|
+
required: false,
|
|
126
|
+
skipCheck: true
|
|
127
|
+
},
|
|
128
|
+
size: {
|
|
129
|
+
type: null,
|
|
130
|
+
required: false
|
|
131
|
+
},
|
|
132
|
+
density: {
|
|
133
|
+
type: null,
|
|
134
|
+
required: false
|
|
135
|
+
}
|
|
76
136
|
});
|
|
77
137
|
const { filterProps } = useProps(props);
|
|
78
138
|
defineEmits([]);
|
|
79
139
|
defineSlots();
|
|
80
140
|
const orientation = computed(() => props.orientation ?? DIRECTION.VERTICAL);
|
|
81
141
|
const isHorizontal = computed(() => orientation.value === DIRECTION.HORIZONTAL);
|
|
142
|
+
/*********************************************************
|
|
143
|
+
* Composables
|
|
144
|
+
********************************************************/
|
|
82
145
|
const { densityClasses } = useDensity(props);
|
|
83
146
|
const { sizeClasses } = useSize(props);
|
|
147
|
+
// Provide context to nested OrigamTimelineItem children — `orientation`
|
|
148
|
+
// is exposed too so an item dropped manually in the slot picks up the
|
|
149
|
+
// parent layout direction without having to pass the prop explicitly.
|
|
84
150
|
provide(TIMELINE_CONTEXT_KEY, {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
151
|
+
get side() {
|
|
152
|
+
return props.side ?? TIMELINE_SIDE.START;
|
|
153
|
+
},
|
|
154
|
+
get truncateLine() {
|
|
155
|
+
return props.truncateLine ?? false;
|
|
156
|
+
},
|
|
157
|
+
get orientation() {
|
|
158
|
+
return orientation.value;
|
|
159
|
+
},
|
|
160
|
+
get color() {
|
|
161
|
+
const c = props.color;
|
|
162
|
+
return typeof c === "string" ? c : undefined;
|
|
163
|
+
}
|
|
98
164
|
});
|
|
165
|
+
/*********************************************************
|
|
166
|
+
* Class & Style
|
|
167
|
+
********************************************************/
|
|
99
168
|
const timelineClasses = computed(() => [
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
]);
|
|
110
|
-
const timelineStyles = computed(() => [
|
|
111
|
-
props.style
|
|
169
|
+
"origam-timeline",
|
|
170
|
+
`origam-timeline--orientation-${orientation.value}`,
|
|
171
|
+
{
|
|
172
|
+
[`origam-timeline--side-${props.side}`]: !!props.side,
|
|
173
|
+
"origam-timeline--truncate-line": props.truncateLine
|
|
174
|
+
},
|
|
175
|
+
densityClasses.value,
|
|
176
|
+
sizeClasses.value,
|
|
177
|
+
props.class
|
|
112
178
|
]);
|
|
179
|
+
const timelineStyles = computed(() => [props.style]);
|
|
113
180
|
const { id, css, load, isLoaded, unload } = useStyle(timelineStyles, () => props.id);
|
|
181
|
+
/*********************************************************
|
|
182
|
+
* Expose
|
|
183
|
+
********************************************************/
|
|
114
184
|
defineExpose({
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
185
|
+
filterProps,
|
|
186
|
+
css,
|
|
187
|
+
id,
|
|
188
|
+
load,
|
|
189
|
+
unload,
|
|
190
|
+
isLoaded
|
|
121
191
|
});
|
|
122
192
|
</script>
|
|
123
193
|
|