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
|
@@ -75,19 +75,7 @@
|
|
|
75
75
|
</template>
|
|
76
76
|
|
|
77
77
|
<script lang="ts" setup>
|
|
78
|
-
import {
|
|
79
|
-
computed,
|
|
80
|
-
inject,
|
|
81
|
-
mergeProps,
|
|
82
|
-
onBeforeUnmount,
|
|
83
|
-
onMounted,
|
|
84
|
-
ref,
|
|
85
|
-
shallowRef,
|
|
86
|
-
StyleValue,
|
|
87
|
-
useSlots,
|
|
88
|
-
watch,
|
|
89
|
-
watchEffect
|
|
90
|
-
} from "vue";
|
|
78
|
+
import { computed, inject, mergeProps, onBeforeUnmount, onMounted, ref, shallowRef, StyleValue, useSlots, watch, watchEffect } from "vue";
|
|
91
79
|
import OrigamOverlay from "../Overlay/OrigamOverlay.vue";
|
|
92
80
|
import OrigamSnack from "../Transition/OrigamSnack.vue";
|
|
93
81
|
import OrigamSnackbarItem from "./OrigamSnackbarItem.vue";
|
|
@@ -104,260 +92,929 @@ import { useVModel } from "../../composables/Commons/vModel.composable";
|
|
|
104
92
|
import { ORIGAM_LAYOUT_KEY } from "../../consts/Commons/layout.const";
|
|
105
93
|
import { SCROLL_STRATEGIES } from "../../enums/Commons/scroll.enum";
|
|
106
94
|
import { forwardRefs } from "../../utils/Commons/forwardRefs.util";
|
|
95
|
+
/*********************************************************
|
|
96
|
+
* Global
|
|
97
|
+
*
|
|
98
|
+
* @description
|
|
99
|
+
* Props with defaults and filterProps utility.
|
|
100
|
+
********************************************************/
|
|
107
101
|
const props = defineProps({
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
102
|
+
multiLine: {
|
|
103
|
+
type: Boolean,
|
|
104
|
+
required: false
|
|
105
|
+
},
|
|
106
|
+
text: {
|
|
107
|
+
type: String,
|
|
108
|
+
required: false
|
|
109
|
+
},
|
|
110
|
+
timer: {
|
|
111
|
+
type: [Boolean, String],
|
|
112
|
+
required: false
|
|
113
|
+
},
|
|
114
|
+
timeout: {
|
|
115
|
+
type: [Number, String],
|
|
116
|
+
required: false,
|
|
117
|
+
default: 5e3
|
|
118
|
+
},
|
|
119
|
+
vertical: {
|
|
120
|
+
type: Boolean,
|
|
121
|
+
required: false
|
|
122
|
+
},
|
|
123
|
+
id: {
|
|
124
|
+
type: String,
|
|
125
|
+
required: false
|
|
126
|
+
},
|
|
127
|
+
class: {
|
|
128
|
+
type: [
|
|
129
|
+
String,
|
|
130
|
+
Array,
|
|
131
|
+
Object
|
|
132
|
+
],
|
|
133
|
+
required: false
|
|
134
|
+
},
|
|
135
|
+
style: {
|
|
136
|
+
type: [
|
|
137
|
+
String,
|
|
138
|
+
Array,
|
|
139
|
+
Object,
|
|
140
|
+
Boolean,
|
|
141
|
+
null
|
|
142
|
+
],
|
|
143
|
+
required: false,
|
|
144
|
+
skipCheck: true
|
|
145
|
+
},
|
|
146
|
+
tag: {
|
|
147
|
+
type: String,
|
|
148
|
+
required: false
|
|
149
|
+
},
|
|
150
|
+
status: {
|
|
151
|
+
type: null,
|
|
152
|
+
required: false
|
|
153
|
+
},
|
|
154
|
+
statusIconPosition: {
|
|
155
|
+
type: null,
|
|
156
|
+
required: false
|
|
157
|
+
},
|
|
158
|
+
icon: {
|
|
159
|
+
type: null,
|
|
160
|
+
required: false
|
|
161
|
+
},
|
|
162
|
+
color: {
|
|
163
|
+
type: [
|
|
164
|
+
String,
|
|
165
|
+
Object,
|
|
166
|
+
Boolean,
|
|
167
|
+
null
|
|
168
|
+
],
|
|
169
|
+
required: false,
|
|
170
|
+
skipCheck: true
|
|
171
|
+
},
|
|
172
|
+
bgColor: {
|
|
173
|
+
type: [
|
|
174
|
+
String,
|
|
175
|
+
Object,
|
|
176
|
+
Boolean,
|
|
177
|
+
null
|
|
178
|
+
],
|
|
179
|
+
required: false,
|
|
180
|
+
skipCheck: true
|
|
181
|
+
},
|
|
182
|
+
absolute: {
|
|
183
|
+
type: Boolean,
|
|
184
|
+
required: false
|
|
185
|
+
},
|
|
186
|
+
closeOnBack: {
|
|
187
|
+
type: Boolean,
|
|
188
|
+
required: false
|
|
189
|
+
},
|
|
190
|
+
contentClass: {
|
|
191
|
+
type: [String, Array],
|
|
192
|
+
required: false
|
|
193
|
+
},
|
|
194
|
+
contentProps: {
|
|
195
|
+
type: null,
|
|
196
|
+
required: false
|
|
197
|
+
},
|
|
198
|
+
disabled: {
|
|
199
|
+
type: Boolean,
|
|
200
|
+
required: false
|
|
201
|
+
},
|
|
202
|
+
noClickAnimation: {
|
|
203
|
+
type: Boolean,
|
|
204
|
+
required: false
|
|
205
|
+
},
|
|
206
|
+
modelValue: {
|
|
207
|
+
type: Boolean,
|
|
208
|
+
required: false
|
|
209
|
+
},
|
|
210
|
+
zIndex: {
|
|
211
|
+
type: [Number, String],
|
|
212
|
+
required: false
|
|
213
|
+
},
|
|
214
|
+
disableGlobalStack: {
|
|
215
|
+
type: Boolean,
|
|
216
|
+
required: false
|
|
217
|
+
},
|
|
218
|
+
persistent: {
|
|
219
|
+
type: Boolean,
|
|
220
|
+
required: false
|
|
221
|
+
},
|
|
222
|
+
height: {
|
|
223
|
+
type: [Number, String],
|
|
224
|
+
required: false
|
|
225
|
+
},
|
|
226
|
+
maxHeight: {
|
|
227
|
+
type: [Number, String],
|
|
228
|
+
required: false
|
|
229
|
+
},
|
|
230
|
+
maxWidth: {
|
|
231
|
+
type: [Number, String],
|
|
232
|
+
required: false
|
|
233
|
+
},
|
|
234
|
+
minHeight: {
|
|
235
|
+
type: [Number, String],
|
|
236
|
+
required: false
|
|
237
|
+
},
|
|
238
|
+
minWidth: {
|
|
239
|
+
type: [Number, String],
|
|
240
|
+
required: false
|
|
241
|
+
},
|
|
242
|
+
width: {
|
|
243
|
+
type: [Number, String],
|
|
244
|
+
required: false
|
|
245
|
+
},
|
|
246
|
+
target: {
|
|
247
|
+
type: null,
|
|
248
|
+
required: false
|
|
249
|
+
},
|
|
250
|
+
activator: {
|
|
251
|
+
type: null,
|
|
252
|
+
required: false
|
|
253
|
+
},
|
|
254
|
+
activatorProps: {
|
|
255
|
+
type: null,
|
|
256
|
+
required: false
|
|
257
|
+
},
|
|
258
|
+
openOnClick: {
|
|
259
|
+
type: Boolean,
|
|
260
|
+
required: false
|
|
261
|
+
},
|
|
262
|
+
openOnContextMenu: {
|
|
263
|
+
type: Boolean,
|
|
264
|
+
required: false
|
|
265
|
+
},
|
|
266
|
+
openOnHover: {
|
|
267
|
+
type: Boolean,
|
|
268
|
+
required: false
|
|
269
|
+
},
|
|
270
|
+
openOnFocus: {
|
|
271
|
+
type: Boolean,
|
|
272
|
+
required: false
|
|
273
|
+
},
|
|
274
|
+
closeOnContentClick: {
|
|
275
|
+
type: Boolean,
|
|
276
|
+
required: false
|
|
277
|
+
},
|
|
278
|
+
closeDelay: {
|
|
279
|
+
type: [Number, String],
|
|
280
|
+
required: false
|
|
281
|
+
},
|
|
282
|
+
openDelay: {
|
|
283
|
+
type: [Number, String],
|
|
284
|
+
required: false
|
|
285
|
+
},
|
|
286
|
+
locationStrategy: {
|
|
287
|
+
type: Function,
|
|
288
|
+
required: false,
|
|
289
|
+
skipCheck: true
|
|
290
|
+
},
|
|
291
|
+
location: {
|
|
292
|
+
type: null,
|
|
293
|
+
required: false,
|
|
294
|
+
default: "bottom"
|
|
295
|
+
},
|
|
296
|
+
origin: {
|
|
297
|
+
type: null,
|
|
298
|
+
required: false
|
|
299
|
+
},
|
|
300
|
+
offset: {
|
|
301
|
+
type: [
|
|
302
|
+
Number,
|
|
303
|
+
String,
|
|
304
|
+
Array
|
|
305
|
+
],
|
|
306
|
+
required: false
|
|
307
|
+
},
|
|
308
|
+
viewportMargin: {
|
|
309
|
+
type: Number,
|
|
310
|
+
required: false
|
|
311
|
+
},
|
|
312
|
+
scrollStrategy: {
|
|
313
|
+
type: Function,
|
|
314
|
+
required: false,
|
|
315
|
+
skipCheck: true
|
|
316
|
+
},
|
|
317
|
+
contained: {
|
|
318
|
+
type: Boolean,
|
|
319
|
+
required: false
|
|
320
|
+
},
|
|
321
|
+
eager: {
|
|
322
|
+
type: Boolean,
|
|
323
|
+
required: false
|
|
324
|
+
},
|
|
325
|
+
transition: {
|
|
326
|
+
type: [
|
|
327
|
+
Boolean,
|
|
328
|
+
String,
|
|
329
|
+
Object
|
|
330
|
+
],
|
|
331
|
+
required: false,
|
|
332
|
+
default: () => ({ component: OrigamSnack })
|
|
333
|
+
},
|
|
334
|
+
scrim: {
|
|
335
|
+
type: [Boolean, String],
|
|
336
|
+
required: false
|
|
337
|
+
},
|
|
338
|
+
attach: {
|
|
339
|
+
type: [
|
|
340
|
+
Boolean,
|
|
341
|
+
String,
|
|
342
|
+
null
|
|
343
|
+
],
|
|
344
|
+
required: false,
|
|
345
|
+
skipCheck: true
|
|
346
|
+
},
|
|
347
|
+
position: {
|
|
348
|
+
type: null,
|
|
349
|
+
required: false
|
|
350
|
+
},
|
|
351
|
+
top: {
|
|
352
|
+
type: [Number, String],
|
|
353
|
+
required: false
|
|
354
|
+
},
|
|
355
|
+
bottom: {
|
|
356
|
+
type: [Number, String],
|
|
357
|
+
required: false
|
|
358
|
+
},
|
|
359
|
+
left: {
|
|
360
|
+
type: [Number, String],
|
|
361
|
+
required: false
|
|
362
|
+
},
|
|
363
|
+
right: {
|
|
364
|
+
type: [Number, String],
|
|
365
|
+
required: false
|
|
366
|
+
},
|
|
367
|
+
rounded: {
|
|
368
|
+
type: [
|
|
369
|
+
Boolean,
|
|
370
|
+
Number,
|
|
371
|
+
String,
|
|
372
|
+
null
|
|
373
|
+
],
|
|
374
|
+
required: false,
|
|
375
|
+
skipCheck: true,
|
|
376
|
+
default: true
|
|
377
|
+
},
|
|
378
|
+
roundedTopRight: {
|
|
379
|
+
type: [
|
|
380
|
+
Boolean,
|
|
381
|
+
Number,
|
|
382
|
+
String
|
|
383
|
+
],
|
|
384
|
+
required: false
|
|
385
|
+
},
|
|
386
|
+
roundedTopLeft: {
|
|
387
|
+
type: [
|
|
388
|
+
Boolean,
|
|
389
|
+
Number,
|
|
390
|
+
String
|
|
391
|
+
],
|
|
392
|
+
required: false
|
|
393
|
+
},
|
|
394
|
+
roundedBottomLeft: {
|
|
395
|
+
type: [
|
|
396
|
+
Boolean,
|
|
397
|
+
Number,
|
|
398
|
+
String
|
|
399
|
+
],
|
|
400
|
+
required: false
|
|
401
|
+
},
|
|
402
|
+
roundedBottomRight: {
|
|
403
|
+
type: [
|
|
404
|
+
Boolean,
|
|
405
|
+
Number,
|
|
406
|
+
String
|
|
407
|
+
],
|
|
408
|
+
required: false
|
|
409
|
+
},
|
|
410
|
+
roundedStartStart: {
|
|
411
|
+
type: [
|
|
412
|
+
Boolean,
|
|
413
|
+
Number,
|
|
414
|
+
String
|
|
415
|
+
],
|
|
416
|
+
required: false
|
|
417
|
+
},
|
|
418
|
+
roundedStartEnd: {
|
|
419
|
+
type: [
|
|
420
|
+
Boolean,
|
|
421
|
+
Number,
|
|
422
|
+
String
|
|
423
|
+
],
|
|
424
|
+
required: false
|
|
425
|
+
},
|
|
426
|
+
roundedEndStart: {
|
|
427
|
+
type: [
|
|
428
|
+
Boolean,
|
|
429
|
+
Number,
|
|
430
|
+
String
|
|
431
|
+
],
|
|
432
|
+
required: false
|
|
433
|
+
},
|
|
434
|
+
roundedEndEnd: {
|
|
435
|
+
type: [
|
|
436
|
+
Boolean,
|
|
437
|
+
Number,
|
|
438
|
+
String
|
|
439
|
+
],
|
|
440
|
+
required: false
|
|
441
|
+
},
|
|
442
|
+
border: {
|
|
443
|
+
type: [
|
|
444
|
+
Boolean,
|
|
445
|
+
Number,
|
|
446
|
+
String,
|
|
447
|
+
Array
|
|
448
|
+
],
|
|
449
|
+
required: false,
|
|
450
|
+
skipCheck: true,
|
|
451
|
+
default: true
|
|
452
|
+
},
|
|
453
|
+
borderTop: {
|
|
454
|
+
type: [
|
|
455
|
+
Boolean,
|
|
456
|
+
Number,
|
|
457
|
+
String
|
|
458
|
+
],
|
|
459
|
+
required: false
|
|
460
|
+
},
|
|
461
|
+
borderLeft: {
|
|
462
|
+
type: [
|
|
463
|
+
Boolean,
|
|
464
|
+
Number,
|
|
465
|
+
String
|
|
466
|
+
],
|
|
467
|
+
required: false
|
|
468
|
+
},
|
|
469
|
+
borderBottom: {
|
|
470
|
+
type: [
|
|
471
|
+
Boolean,
|
|
472
|
+
Number,
|
|
473
|
+
String
|
|
474
|
+
],
|
|
475
|
+
required: false
|
|
476
|
+
},
|
|
477
|
+
borderRight: {
|
|
478
|
+
type: [
|
|
479
|
+
Boolean,
|
|
480
|
+
Number,
|
|
481
|
+
String
|
|
482
|
+
],
|
|
483
|
+
required: false
|
|
484
|
+
},
|
|
485
|
+
borderBlock: {
|
|
486
|
+
type: [
|
|
487
|
+
Boolean,
|
|
488
|
+
Number,
|
|
489
|
+
String
|
|
490
|
+
],
|
|
491
|
+
required: false
|
|
492
|
+
},
|
|
493
|
+
borderInline: {
|
|
494
|
+
type: [
|
|
495
|
+
Boolean,
|
|
496
|
+
Number,
|
|
497
|
+
String
|
|
498
|
+
],
|
|
499
|
+
required: false
|
|
500
|
+
},
|
|
501
|
+
borderInlineStart: {
|
|
502
|
+
type: [
|
|
503
|
+
Boolean,
|
|
504
|
+
Number,
|
|
505
|
+
String
|
|
506
|
+
],
|
|
507
|
+
required: false
|
|
508
|
+
},
|
|
509
|
+
borderInlineEnd: {
|
|
510
|
+
type: [
|
|
511
|
+
Boolean,
|
|
512
|
+
Number,
|
|
513
|
+
String
|
|
514
|
+
],
|
|
515
|
+
required: false
|
|
516
|
+
},
|
|
517
|
+
borderBlockStart: {
|
|
518
|
+
type: [
|
|
519
|
+
Boolean,
|
|
520
|
+
Number,
|
|
521
|
+
String
|
|
522
|
+
],
|
|
523
|
+
required: false
|
|
524
|
+
},
|
|
525
|
+
borderBlockEnd: {
|
|
526
|
+
type: [
|
|
527
|
+
Boolean,
|
|
528
|
+
Number,
|
|
529
|
+
String
|
|
530
|
+
],
|
|
531
|
+
required: false
|
|
532
|
+
},
|
|
533
|
+
borderColor: {
|
|
534
|
+
type: String,
|
|
535
|
+
required: false
|
|
536
|
+
},
|
|
537
|
+
borderStyle: {
|
|
538
|
+
type: String,
|
|
539
|
+
required: false
|
|
540
|
+
},
|
|
541
|
+
borderTopColor: {
|
|
542
|
+
type: [
|
|
543
|
+
String,
|
|
544
|
+
Object,
|
|
545
|
+
Boolean,
|
|
546
|
+
null
|
|
547
|
+
],
|
|
548
|
+
required: false,
|
|
549
|
+
skipCheck: true
|
|
550
|
+
},
|
|
551
|
+
borderRightColor: {
|
|
552
|
+
type: [
|
|
553
|
+
String,
|
|
554
|
+
Object,
|
|
555
|
+
Boolean,
|
|
556
|
+
null
|
|
557
|
+
],
|
|
558
|
+
required: false,
|
|
559
|
+
skipCheck: true
|
|
560
|
+
},
|
|
561
|
+
borderBottomColor: {
|
|
562
|
+
type: [
|
|
563
|
+
String,
|
|
564
|
+
Object,
|
|
565
|
+
Boolean,
|
|
566
|
+
null
|
|
567
|
+
],
|
|
568
|
+
required: false,
|
|
569
|
+
skipCheck: true
|
|
570
|
+
},
|
|
571
|
+
borderLeftColor: {
|
|
572
|
+
type: [
|
|
573
|
+
String,
|
|
574
|
+
Object,
|
|
575
|
+
Boolean,
|
|
576
|
+
null
|
|
577
|
+
],
|
|
578
|
+
required: false,
|
|
579
|
+
skipCheck: true
|
|
580
|
+
},
|
|
581
|
+
borderInlineStartColor: {
|
|
582
|
+
type: [
|
|
583
|
+
String,
|
|
584
|
+
Object,
|
|
585
|
+
Boolean,
|
|
586
|
+
null
|
|
587
|
+
],
|
|
588
|
+
required: false,
|
|
589
|
+
skipCheck: true
|
|
590
|
+
},
|
|
591
|
+
borderInlineEndColor: {
|
|
592
|
+
type: [
|
|
593
|
+
String,
|
|
594
|
+
Object,
|
|
595
|
+
Boolean,
|
|
596
|
+
null
|
|
597
|
+
],
|
|
598
|
+
required: false,
|
|
599
|
+
skipCheck: true
|
|
600
|
+
},
|
|
601
|
+
borderBlockStartColor: {
|
|
602
|
+
type: [
|
|
603
|
+
String,
|
|
604
|
+
Object,
|
|
605
|
+
Boolean,
|
|
606
|
+
null
|
|
607
|
+
],
|
|
608
|
+
required: false,
|
|
609
|
+
skipCheck: true
|
|
610
|
+
},
|
|
611
|
+
borderBlockEndColor: {
|
|
612
|
+
type: [
|
|
613
|
+
String,
|
|
614
|
+
Object,
|
|
615
|
+
Boolean,
|
|
616
|
+
null
|
|
617
|
+
],
|
|
618
|
+
required: false,
|
|
619
|
+
skipCheck: true
|
|
620
|
+
},
|
|
621
|
+
padding: {
|
|
622
|
+
type: [
|
|
623
|
+
Boolean,
|
|
624
|
+
Number,
|
|
625
|
+
String
|
|
626
|
+
],
|
|
627
|
+
required: false
|
|
628
|
+
},
|
|
629
|
+
paddingTop: {
|
|
630
|
+
type: [
|
|
631
|
+
Boolean,
|
|
632
|
+
Number,
|
|
633
|
+
String
|
|
634
|
+
],
|
|
635
|
+
required: false
|
|
636
|
+
},
|
|
637
|
+
paddingLeft: {
|
|
638
|
+
type: [
|
|
639
|
+
Boolean,
|
|
640
|
+
Number,
|
|
641
|
+
String
|
|
642
|
+
],
|
|
643
|
+
required: false
|
|
644
|
+
},
|
|
645
|
+
paddingBottom: {
|
|
646
|
+
type: [
|
|
647
|
+
Boolean,
|
|
648
|
+
Number,
|
|
649
|
+
String
|
|
650
|
+
],
|
|
651
|
+
required: false
|
|
652
|
+
},
|
|
653
|
+
paddingRight: {
|
|
654
|
+
type: [
|
|
655
|
+
Boolean,
|
|
656
|
+
Number,
|
|
657
|
+
String
|
|
658
|
+
],
|
|
659
|
+
required: false
|
|
660
|
+
},
|
|
661
|
+
paddingBlock: {
|
|
662
|
+
type: [
|
|
663
|
+
Boolean,
|
|
664
|
+
Number,
|
|
665
|
+
String
|
|
666
|
+
],
|
|
667
|
+
required: false
|
|
668
|
+
},
|
|
669
|
+
paddingInline: {
|
|
670
|
+
type: [
|
|
671
|
+
Boolean,
|
|
672
|
+
Number,
|
|
673
|
+
String
|
|
674
|
+
],
|
|
675
|
+
required: false
|
|
676
|
+
},
|
|
677
|
+
paddingInlineStart: {
|
|
678
|
+
type: [
|
|
679
|
+
Boolean,
|
|
680
|
+
Number,
|
|
681
|
+
String
|
|
682
|
+
],
|
|
683
|
+
required: false
|
|
684
|
+
},
|
|
685
|
+
paddingInlineEnd: {
|
|
686
|
+
type: [
|
|
687
|
+
Boolean,
|
|
688
|
+
Number,
|
|
689
|
+
String
|
|
690
|
+
],
|
|
691
|
+
required: false
|
|
692
|
+
},
|
|
693
|
+
paddingBlockStart: {
|
|
694
|
+
type: [
|
|
695
|
+
Boolean,
|
|
696
|
+
Number,
|
|
697
|
+
String
|
|
698
|
+
],
|
|
699
|
+
required: false
|
|
700
|
+
},
|
|
701
|
+
paddingBlockEnd: {
|
|
702
|
+
type: [
|
|
703
|
+
Boolean,
|
|
704
|
+
Number,
|
|
705
|
+
String
|
|
706
|
+
],
|
|
707
|
+
required: false
|
|
708
|
+
},
|
|
709
|
+
margin: {
|
|
710
|
+
type: [
|
|
711
|
+
Boolean,
|
|
712
|
+
Number,
|
|
713
|
+
String
|
|
714
|
+
],
|
|
715
|
+
required: false
|
|
716
|
+
},
|
|
717
|
+
marginTop: {
|
|
718
|
+
type: [
|
|
719
|
+
Boolean,
|
|
720
|
+
Number,
|
|
721
|
+
String
|
|
722
|
+
],
|
|
723
|
+
required: false
|
|
724
|
+
},
|
|
725
|
+
marginLeft: {
|
|
726
|
+
type: [
|
|
727
|
+
Boolean,
|
|
728
|
+
Number,
|
|
729
|
+
String
|
|
730
|
+
],
|
|
731
|
+
required: false
|
|
732
|
+
},
|
|
733
|
+
marginBottom: {
|
|
734
|
+
type: [
|
|
735
|
+
Boolean,
|
|
736
|
+
Number,
|
|
737
|
+
String
|
|
738
|
+
],
|
|
739
|
+
required: false
|
|
740
|
+
},
|
|
741
|
+
marginRight: {
|
|
742
|
+
type: [
|
|
743
|
+
Boolean,
|
|
744
|
+
Number,
|
|
745
|
+
String
|
|
746
|
+
],
|
|
747
|
+
required: false
|
|
748
|
+
},
|
|
749
|
+
marginBlock: {
|
|
750
|
+
type: [
|
|
751
|
+
Boolean,
|
|
752
|
+
Number,
|
|
753
|
+
String
|
|
754
|
+
],
|
|
755
|
+
required: false
|
|
756
|
+
},
|
|
757
|
+
marginInline: {
|
|
758
|
+
type: [
|
|
759
|
+
Boolean,
|
|
760
|
+
Number,
|
|
761
|
+
String
|
|
762
|
+
],
|
|
763
|
+
required: false
|
|
764
|
+
},
|
|
765
|
+
marginInlineStart: {
|
|
766
|
+
type: [
|
|
767
|
+
Boolean,
|
|
768
|
+
Number,
|
|
769
|
+
String
|
|
770
|
+
],
|
|
771
|
+
required: false
|
|
772
|
+
},
|
|
773
|
+
marginInlineEnd: {
|
|
774
|
+
type: [
|
|
775
|
+
Boolean,
|
|
776
|
+
Number,
|
|
777
|
+
String
|
|
778
|
+
],
|
|
779
|
+
required: false
|
|
780
|
+
},
|
|
781
|
+
marginBlockStart: {
|
|
782
|
+
type: [
|
|
783
|
+
Boolean,
|
|
784
|
+
Number,
|
|
785
|
+
String
|
|
786
|
+
],
|
|
787
|
+
required: false
|
|
788
|
+
},
|
|
789
|
+
marginBlockEnd: {
|
|
790
|
+
type: [
|
|
791
|
+
Boolean,
|
|
792
|
+
Number,
|
|
793
|
+
String
|
|
794
|
+
],
|
|
795
|
+
required: false
|
|
796
|
+
},
|
|
797
|
+
elevation: {
|
|
798
|
+
type: [Number, String],
|
|
799
|
+
required: false,
|
|
800
|
+
default: 1
|
|
801
|
+
},
|
|
802
|
+
active: {
|
|
803
|
+
type: [Boolean, Object],
|
|
804
|
+
required: false
|
|
805
|
+
},
|
|
806
|
+
activeClass: {
|
|
807
|
+
type: String,
|
|
808
|
+
required: false
|
|
809
|
+
},
|
|
810
|
+
hover: {
|
|
811
|
+
type: [Boolean, Object],
|
|
812
|
+
required: false
|
|
813
|
+
},
|
|
814
|
+
hoverClass: {
|
|
815
|
+
type: String,
|
|
816
|
+
required: false
|
|
817
|
+
}
|
|
223
818
|
});
|
|
224
819
|
defineSlots();
|
|
225
820
|
defineEmits(["update:modelValue"]);
|
|
226
821
|
const { filterProps } = useProps(props);
|
|
227
822
|
const slots = useSlots();
|
|
823
|
+
/*********************************************************
|
|
824
|
+
* Value & Countdown
|
|
825
|
+
*
|
|
826
|
+
* @description
|
|
827
|
+
* v-model active state, countdown timer, and auto-dismiss
|
|
828
|
+
* timeout management.
|
|
829
|
+
********************************************************/
|
|
228
830
|
const isActive = useVModel(props, "modelValue");
|
|
831
|
+
/*********************************************************
|
|
832
|
+
* Composables
|
|
833
|
+
********************************************************/
|
|
229
834
|
const { positionClasses } = usePosition(props);
|
|
230
835
|
const { scopeId } = useScopeId();
|
|
836
|
+
/*********************************************************
|
|
837
|
+
* Icon / Status
|
|
838
|
+
********************************************************/
|
|
231
839
|
const { icon, statusClasses, statusIntent } = useStatus(props);
|
|
232
840
|
const origamOverlayRef = ref();
|
|
233
841
|
const isHovering = shallowRef(false);
|
|
234
842
|
const startY = shallowRef(0);
|
|
235
843
|
const mainStyles = ref();
|
|
236
|
-
const hasLayout = inject(ORIGAM_LAYOUT_KEY,
|
|
844
|
+
const hasLayout = inject(ORIGAM_LAYOUT_KEY, undefined);
|
|
237
845
|
const timerKey = shallowRef(0);
|
|
238
846
|
useToggleScope(() => !!hasLayout, () => {
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
847
|
+
const layout = useLayoutMain();
|
|
848
|
+
watchEffect(() => {
|
|
849
|
+
mainStyles.value = layout.mainStyles.value;
|
|
850
|
+
});
|
|
243
851
|
});
|
|
244
852
|
let activeTimeout = -1;
|
|
245
853
|
const startTimeout = () => {
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
854
|
+
window.clearTimeout(activeTimeout);
|
|
855
|
+
const timeout = Number(props.timeout);
|
|
856
|
+
if (!isActive.value || timeout === -1) return;
|
|
857
|
+
timerKey.value++;
|
|
858
|
+
activeTimeout = window.setTimeout(() => {
|
|
859
|
+
isActive.value = false;
|
|
860
|
+
}, timeout);
|
|
253
861
|
};
|
|
254
862
|
const clearTimeout = () => {
|
|
255
|
-
|
|
863
|
+
window.clearTimeout(activeTimeout);
|
|
256
864
|
};
|
|
257
865
|
watch(isActive, startTimeout);
|
|
258
866
|
watch(() => props.timeout, startTimeout);
|
|
259
867
|
onMounted(() => {
|
|
260
|
-
|
|
868
|
+
if (isActive.value) startTimeout();
|
|
261
869
|
});
|
|
870
|
+
/*********************************************************
|
|
871
|
+
* Teardown (#706)
|
|
872
|
+
*
|
|
873
|
+
* @description
|
|
874
|
+
* `startTimeout` arms a `window.setTimeout` for the whole snackbar
|
|
875
|
+
* duration (seconds), and nothing used to cancel it on unmount — only
|
|
876
|
+
* hovering did. The timer therefore outlived the component, and under
|
|
877
|
+
* Vitest it could fire after the jsdom environment was torn down,
|
|
878
|
+
* where `window` no longer exists: an unhandled error that fails the
|
|
879
|
+
* entire run without a single red test.
|
|
880
|
+
********************************************************/
|
|
262
881
|
onBeforeUnmount(clearTimeout);
|
|
882
|
+
/*********************************************************
|
|
883
|
+
* Interaction
|
|
884
|
+
*
|
|
885
|
+
* @description
|
|
886
|
+
* Hover pause/resume, swipe-to-dismiss touch handling.
|
|
887
|
+
********************************************************/
|
|
263
888
|
const handlePointerenter = () => {
|
|
264
|
-
|
|
265
|
-
|
|
889
|
+
isHovering.value = true;
|
|
890
|
+
clearTimeout();
|
|
266
891
|
};
|
|
267
892
|
const handlePointerleave = () => {
|
|
268
|
-
|
|
269
|
-
|
|
893
|
+
isHovering.value = false;
|
|
894
|
+
startTimeout();
|
|
270
895
|
};
|
|
271
896
|
const handleTouchstart = (event) => {
|
|
272
|
-
|
|
897
|
+
startY.value = event.touches[0].clientY;
|
|
273
898
|
};
|
|
274
899
|
const handleTouchend = (event) => {
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
900
|
+
if (Math.abs(startY.value - event.changedTouches[0].clientY) > 50) {
|
|
901
|
+
isActive.value = false;
|
|
902
|
+
}
|
|
278
903
|
};
|
|
904
|
+
/*********************************************************
|
|
905
|
+
* Intent bridge
|
|
906
|
+
*
|
|
907
|
+
* @description
|
|
908
|
+
* OrigamSnackbarItem uses `intent` (TIntent). OrigamSnackbar
|
|
909
|
+
* uses `status` (TStatus). The `status` values map 1-to-1 to
|
|
910
|
+
* intent token names in the DS, so we cast directly.
|
|
911
|
+
********************************************************/
|
|
279
912
|
const snackbarIntent = computed(() => {
|
|
280
|
-
|
|
281
|
-
|
|
913
|
+
if (!props.status) return undefined;
|
|
914
|
+
return props.status;
|
|
282
915
|
});
|
|
916
|
+
/*********************************************************
|
|
917
|
+
* Color & state effects
|
|
918
|
+
********************************************************/
|
|
283
919
|
const statusBgColor = computed(() => statusIntent.value ?? props.bgColor);
|
|
284
|
-
const statusColor = computed(() => statusIntent.value ?
|
|
920
|
+
const statusColor = computed(() => statusIntent.value ? undefined : props.color);
|
|
285
921
|
const { colorClasses, colorStyles } = useBothColor(statusBgColor, statusColor);
|
|
286
|
-
const {
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
borderStyles,
|
|
291
|
-
paddingClasses,
|
|
292
|
-
paddingStyles,
|
|
293
|
-
marginClasses,
|
|
294
|
-
marginStyles,
|
|
295
|
-
elevationClasses
|
|
296
|
-
} = useStateEffect(props);
|
|
922
|
+
const { roundedClasses, roundedStyles, borderClasses, borderStyles, paddingClasses, paddingStyles, marginClasses, marginStyles, elevationClasses } = useStateEffect(props);
|
|
923
|
+
/*********************************************************
|
|
924
|
+
* Forwarded props
|
|
925
|
+
********************************************************/
|
|
297
926
|
const overlayProps = computed(() => {
|
|
298
|
-
|
|
927
|
+
return origamOverlayRef.value?.filterProps(props, [
|
|
928
|
+
"class",
|
|
929
|
+
"style",
|
|
930
|
+
"id",
|
|
931
|
+
"contentProps",
|
|
932
|
+
"modelValue",
|
|
933
|
+
"disableGlobalStack",
|
|
934
|
+
"noClickAnimation",
|
|
935
|
+
"persistent",
|
|
936
|
+
"scrim",
|
|
937
|
+
"scrollStrategy"
|
|
938
|
+
]);
|
|
299
939
|
});
|
|
300
940
|
const contentProps = computed(() => {
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
onPointerenter: handlePointerenter,
|
|
314
|
-
onPointerleave: handlePointerleave
|
|
315
|
-
}, props.contentProps);
|
|
941
|
+
return mergeProps({
|
|
942
|
+
class: ["origam-snackbar__wrapper", colorClasses.value],
|
|
943
|
+
style: [
|
|
944
|
+
colorStyles.value,
|
|
945
|
+
roundedStyles.value,
|
|
946
|
+
borderStyles.value,
|
|
947
|
+
paddingStyles.value,
|
|
948
|
+
marginStyles.value
|
|
949
|
+
],
|
|
950
|
+
onPointerenter: handlePointerenter,
|
|
951
|
+
onPointerleave: handlePointerleave
|
|
952
|
+
}, props.contentProps);
|
|
316
953
|
});
|
|
954
|
+
/*********************************************************
|
|
955
|
+
* Class & Style
|
|
956
|
+
*
|
|
957
|
+
* @description
|
|
958
|
+
* Root element location/position classes.
|
|
959
|
+
* Extra classes forwarded to OrigamSnackbarItem to honour
|
|
960
|
+
* border-radius, border, elevation, status theming applied
|
|
961
|
+
* at the snackbar level.
|
|
962
|
+
********************************************************/
|
|
317
963
|
const locationClasses = computed(() => {
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
964
|
+
return props.location.split(" ").reduce((acc, loc) => {
|
|
965
|
+
acc[`origam-snackbar--${loc}`] = true;
|
|
966
|
+
return acc;
|
|
967
|
+
}, {});
|
|
322
968
|
});
|
|
323
969
|
const snackbarStyles = computed(() => {
|
|
324
|
-
|
|
325
|
-
mainStyles.value,
|
|
326
|
-
props.style
|
|
327
|
-
];
|
|
970
|
+
return [mainStyles.value, props.style];
|
|
328
971
|
});
|
|
329
972
|
const snackbarTimerClasses = computed(() => {
|
|
330
|
-
|
|
331
|
-
"origam-snackbar__timer",
|
|
332
|
-
{ "origam-snackbar__timer--paused": isHovering.value }
|
|
333
|
-
];
|
|
973
|
+
return ["origam-snackbar__timer", { "origam-snackbar__timer--paused": isHovering.value }];
|
|
334
974
|
});
|
|
975
|
+
// Extra modifier classes forwarded to OrigamSnackbarItem so that
|
|
976
|
+
// BEM modifiers (multi-line, vertical, status) still live on the
|
|
977
|
+
// visible item element. These do NOT carry the full item class set —
|
|
978
|
+
// OrigamSnackbarItem owns its own root classes.
|
|
335
979
|
const snackbarItemExtraClasses = computed(() => {
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
980
|
+
return [
|
|
981
|
+
{
|
|
982
|
+
"origam-snackbar__item--multi-line": props.multiLine && !props.vertical,
|
|
983
|
+
"origam-snackbar__item--timer": !!props.timer,
|
|
984
|
+
"origam-snackbar__item--vertical": props.vertical
|
|
985
|
+
},
|
|
986
|
+
locationClasses.value,
|
|
987
|
+
positionClasses.value,
|
|
988
|
+
roundedClasses.value,
|
|
989
|
+
borderClasses.value,
|
|
990
|
+
paddingClasses.value,
|
|
991
|
+
marginClasses.value,
|
|
992
|
+
elevationClasses.value,
|
|
993
|
+
statusClasses.value,
|
|
994
|
+
props.class
|
|
995
|
+
];
|
|
352
996
|
});
|
|
997
|
+
/*********************************************************
|
|
998
|
+
* useStyle
|
|
999
|
+
*
|
|
1000
|
+
* @description
|
|
1001
|
+
* #381 — the `id` returned by useStyle is a GENERATED identifier,
|
|
1002
|
+
* only meant for the scoped stylesheet selector. Without
|
|
1003
|
+
* `() => props.id` here, it shadowed the `id` PROP of the same
|
|
1004
|
+
* name: the template's `:id="id"` on <origam-overlay> rendered
|
|
1005
|
+
* the generated id, never the consumer's.
|
|
1006
|
+
********************************************************/
|
|
353
1007
|
const { id, css, load, isLoaded, unload } = useStyle(snackbarStyles, () => props.id);
|
|
1008
|
+
/*********************************************************
|
|
1009
|
+
* Expose
|
|
1010
|
+
********************************************************/
|
|
354
1011
|
defineExpose(forwardRefs({
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
1012
|
+
filterProps,
|
|
1013
|
+
css,
|
|
1014
|
+
id,
|
|
1015
|
+
load,
|
|
1016
|
+
unload,
|
|
1017
|
+
isLoaded
|
|
361
1018
|
}, origamOverlayRef));
|
|
362
1019
|
</script>
|
|
363
1020
|
|