origam 2.38.0 → 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 +34 -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 +8 -8
|
@@ -13,131 +13,243 @@ import { useProps } from "../../composables/Commons/props.composable";
|
|
|
13
13
|
import { EASING } from "../../enums/Transition/transition.enum";
|
|
14
14
|
import { animate } from "../../utils/Commons/animation.util";
|
|
15
15
|
import { getChildren, getDimensions } from "../../utils/Transition/transition.util";
|
|
16
|
+
/*********************************************************
|
|
17
|
+
* Global
|
|
18
|
+
*
|
|
19
|
+
* @description
|
|
20
|
+
* Props with defaults and filterProps utility.
|
|
21
|
+
********************************************************/
|
|
22
|
+
/*********************************************************
|
|
23
|
+
* ⛔ No `mode` default here.
|
|
24
|
+
*
|
|
25
|
+
* @description
|
|
26
|
+
* `mode` was removed from `ITranslateScaleProps` on 2026-09-06, but a
|
|
27
|
+
* `mode: TRANSITION_MODE.IN_OUT` entry survived in this object. It was
|
|
28
|
+
* dead weight AND a lie about the surface: measured on the compiled
|
|
29
|
+
* descriptor, `Object.keys(OrigamTranslateScale.props)` is
|
|
30
|
+
* `['target','disabled','name','origin']` — the SFC compiler drops a
|
|
31
|
+
* `withDefaults` key that has no matching member in the props type, so
|
|
32
|
+
* the default never existed at runtime.
|
|
33
|
+
********************************************************/
|
|
16
34
|
const props = defineProps({
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
35
|
+
target: {
|
|
36
|
+
type: null,
|
|
37
|
+
required: false
|
|
38
|
+
},
|
|
39
|
+
disabled: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
required: false
|
|
42
|
+
},
|
|
43
|
+
name: {
|
|
44
|
+
type: String,
|
|
45
|
+
required: false,
|
|
46
|
+
default: "origam-transition--transform-scale"
|
|
47
|
+
},
|
|
48
|
+
origin: {
|
|
49
|
+
type: String,
|
|
50
|
+
required: false
|
|
51
|
+
}
|
|
21
52
|
});
|
|
22
53
|
const { filterProps } = useProps(props);
|
|
23
54
|
defineEmits([]);
|
|
24
55
|
defineSlots();
|
|
56
|
+
/*********************************************************
|
|
57
|
+
* Frames bornees a la duree de vie du composant (#753)
|
|
58
|
+
*
|
|
59
|
+
* @description
|
|
60
|
+
* Les trois rAF d'ici ne sont pas de la meme forme que les autres
|
|
61
|
+
* sites du ticket : ils sont ATTENDUS
|
|
62
|
+
* (`await new Promise(resolve => requestAnimationFrame(resolve))`).
|
|
63
|
+
* La continuation n'est donc pas la callback du rAF, c'est la suite
|
|
64
|
+
* de la fonction `async` — et elle, elle appelle `getDimensions`
|
|
65
|
+
* (lecture de `getBoundingClientRect` sur deux elements) puis
|
|
66
|
+
* `animate`, sur un noeud que Vue a pu retirer entre-temps.
|
|
67
|
+
*
|
|
68
|
+
* @description
|
|
69
|
+
* ⛔ Une promesse abandonnee ne doit PAS rester pendante : elle
|
|
70
|
+
* retiendrait justement la continuation qu'on cherche a liberer. Au
|
|
71
|
+
* demontage on RESOUT donc la frame en attente, et c'est le test
|
|
72
|
+
* `disposed` place APRES chaque `await` qui interrompt la suite. Le
|
|
73
|
+
* `done()` de Vue n'est pas appele dans ce cas, et c'est correct :
|
|
74
|
+
* il ne sert qu'a signaler la fin d'une transition a un composant
|
|
75
|
+
* qui n'existe plus.
|
|
76
|
+
********************************************************/
|
|
25
77
|
let disposed = false;
|
|
26
|
-
const frames =
|
|
27
|
-
const pending =
|
|
78
|
+
const frames = new Set();
|
|
79
|
+
const pending = new Set();
|
|
28
80
|
const nextFrame = () => new Promise((resolve) => {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
81
|
+
if (disposed) return resolve();
|
|
82
|
+
pending.add(resolve);
|
|
83
|
+
const id = requestAnimationFrame(() => {
|
|
84
|
+
frames.delete(id);
|
|
85
|
+
pending.delete(resolve);
|
|
86
|
+
resolve();
|
|
87
|
+
});
|
|
88
|
+
frames.add(id);
|
|
37
89
|
});
|
|
38
90
|
onBeforeUnmount(() => {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
91
|
+
disposed = true;
|
|
92
|
+
for (const id of frames) cancelAnimationFrame(id);
|
|
93
|
+
frames.clear();
|
|
94
|
+
for (const resolve of pending) resolve();
|
|
95
|
+
pending.clear();
|
|
44
96
|
});
|
|
97
|
+
/*********************************************************
|
|
98
|
+
* TranslateScale transition hooks
|
|
99
|
+
*
|
|
100
|
+
* @description
|
|
101
|
+
* JS-driven WAAPI animation — when a `target` element is
|
|
102
|
+
* provided, the entering/leaving element scales and
|
|
103
|
+
* translates to/from the target's bounding rect. Without
|
|
104
|
+
* a target, the CSS fallback class runs a simpler scale.
|
|
105
|
+
********************************************************/
|
|
45
106
|
const hasTarget = computed(() => {
|
|
46
|
-
|
|
107
|
+
return !!props.target;
|
|
47
108
|
});
|
|
109
|
+
/*********************************************************
|
|
110
|
+
* Event handlers
|
|
111
|
+
********************************************************/
|
|
112
|
+
/*********************************************************
|
|
113
|
+
* applyOrigin
|
|
114
|
+
*
|
|
115
|
+
* @description
|
|
116
|
+
* `origin` (from `ITransitionProps`, inherited by `ITranslateScaleProps`)
|
|
117
|
+
* sets `transform-origin` on the transitioned element BEFORE the scale
|
|
118
|
+
* runs — the only sibling in the 8-component `origin` audit (#538/#548)
|
|
119
|
+
* where the prop has something to anchor on, since this is the only
|
|
120
|
+
* transition whose keyframes/CSS class include an actual `scale(...)`.
|
|
121
|
+
* Applied on BOTH paths:
|
|
122
|
+
* - CSS-only (`!hasTarget`): the inline style wins the cascade over
|
|
123
|
+
* the `.origam-transition--transform-scale-enter-from` SCSS rule's
|
|
124
|
+
* `transform: scale(0.9)`, so the browser anchors that scale on the
|
|
125
|
+
* custom origin instead of its `50% 50%` default.
|
|
126
|
+
* - WAAPI (`hasTarget`): set before `getDimensions()` is called so its
|
|
127
|
+
* `getComputedStyle(el).transformOrigin` read (transition.util.ts)
|
|
128
|
+
* picks up the custom value — that function's `x`/`y` math already
|
|
129
|
+
* generically accounts for whatever `transform-origin` is current,
|
|
130
|
+
* it was simply never given anything but the browser default.
|
|
131
|
+
********************************************************/
|
|
48
132
|
const applyOrigin = (el) => {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
133
|
+
if (props.origin) {
|
|
134
|
+
el.style.transformOrigin = props.origin;
|
|
135
|
+
}
|
|
52
136
|
};
|
|
53
137
|
const handleBeforeEnter = (el) => {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
138
|
+
applyOrigin(el);
|
|
139
|
+
el.style.pointerEvents = "none";
|
|
140
|
+
el.style.visibility = "hidden";
|
|
57
141
|
};
|
|
58
142
|
const handleEnter = async (el, done) => {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
143
|
+
await nextFrame();
|
|
144
|
+
await nextFrame();
|
|
145
|
+
if (disposed) return;
|
|
146
|
+
el.style.visibility = "";
|
|
147
|
+
const { x, y, sx, sy, speed } = getDimensions(props.target, el);
|
|
148
|
+
const animation = animate(el, [{
|
|
149
|
+
transform: `translate(${x}px, ${y}px) scale(${sx}, ${sy})`,
|
|
150
|
+
opacity: 0
|
|
151
|
+
}, {}], {
|
|
152
|
+
duration: 225 * speed,
|
|
153
|
+
easing: EASING.DECELERATE
|
|
154
|
+
});
|
|
155
|
+
getChildren(el)?.forEach((el) => {
|
|
156
|
+
animate(el, [
|
|
157
|
+
{ opacity: 0 },
|
|
158
|
+
{
|
|
159
|
+
opacity: 0,
|
|
160
|
+
offset: .33
|
|
161
|
+
},
|
|
162
|
+
{}
|
|
163
|
+
], {
|
|
164
|
+
duration: 225 * 2 * speed,
|
|
165
|
+
easing: EASING.STANDARD
|
|
166
|
+
});
|
|
167
|
+
});
|
|
168
|
+
animation.finished.then(() => done());
|
|
82
169
|
};
|
|
83
170
|
const handleAfterEnter = (el) => {
|
|
84
|
-
|
|
171
|
+
el.style.removeProperty("pointer-events");
|
|
85
172
|
};
|
|
86
173
|
const handleBeforeLeave = (el) => {
|
|
87
|
-
|
|
88
|
-
|
|
174
|
+
applyOrigin(el);
|
|
175
|
+
el.style.pointerEvents = "none";
|
|
89
176
|
};
|
|
90
177
|
const handleLeave = async (el, done) => {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
178
|
+
await nextFrame();
|
|
179
|
+
if (disposed) return;
|
|
180
|
+
const { x, y, sx, sy, speed } = getDimensions(props.target, el);
|
|
181
|
+
const animation = animate(el, [{}, {
|
|
182
|
+
transform: `translate(${x}px, ${y}px) scale(${sx}, ${sy})`,
|
|
183
|
+
opacity: 0
|
|
184
|
+
}], {
|
|
185
|
+
duration: 125 * speed,
|
|
186
|
+
easing: EASING.ACCELERATE
|
|
187
|
+
});
|
|
188
|
+
animation.finished.then(() => done());
|
|
189
|
+
getChildren(el)?.forEach((el) => {
|
|
190
|
+
animate(el, [
|
|
191
|
+
{},
|
|
192
|
+
{
|
|
193
|
+
opacity: 0,
|
|
194
|
+
offset: .2
|
|
195
|
+
},
|
|
196
|
+
{ opacity: 0 }
|
|
197
|
+
], {
|
|
198
|
+
duration: 125 * 2 * speed,
|
|
199
|
+
easing: EASING.STANDARD
|
|
200
|
+
});
|
|
201
|
+
});
|
|
112
202
|
};
|
|
113
203
|
const handleAfterLeave = (el) => {
|
|
114
|
-
|
|
204
|
+
el.style.removeProperty("pointer-events");
|
|
115
205
|
};
|
|
206
|
+
/*********************************************************
|
|
207
|
+
* events
|
|
208
|
+
*
|
|
209
|
+
* @description
|
|
210
|
+
* `disabled` (from `ITransitionProps`) short-circuits both paths: no
|
|
211
|
+
* hooks bound at all (this computed returns `{}`) AND `css` is forced
|
|
212
|
+
* `false` in the template — same combination Vue's `<transition>`
|
|
213
|
+
* uses to skip the transition outright and settle instantly, mirroring
|
|
214
|
+
* `<OrigamExpandX>`'s `:css="!disabled"`.
|
|
215
|
+
*
|
|
216
|
+
* When NOT disabled, exactly one of the two remaining branches binds:
|
|
217
|
+
* - `hasTarget` -> the full WAAPI hook set (unchanged).
|
|
218
|
+
* - `!hasTarget` -> only `applyOrigin`, so the CSS-only path still
|
|
219
|
+
* gets `transform-origin` set on the element before its native
|
|
220
|
+
* `<transition>` CSS classes kick in the `scale(0.9)`. Nothing is
|
|
221
|
+
* bound at all if `origin` isn't set, identical to pre-#548
|
|
222
|
+
* behaviour (this branch used to unconditionally return `{}`).
|
|
223
|
+
********************************************************/
|
|
116
224
|
const events = computed(() => {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
});
|
|
138
|
-
defineExpose({
|
|
139
|
-
filterProps
|
|
225
|
+
if (props.disabled) {
|
|
226
|
+
return {};
|
|
227
|
+
}
|
|
228
|
+
if (hasTarget.value) {
|
|
229
|
+
return {
|
|
230
|
+
onBeforeEnter: handleBeforeEnter,
|
|
231
|
+
onEnter: handleEnter,
|
|
232
|
+
onAfterEnter: handleAfterEnter,
|
|
233
|
+
onBeforeLeave: handleBeforeLeave,
|
|
234
|
+
onLeave: handleLeave,
|
|
235
|
+
onAfterLeave: handleAfterLeave
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
if (props.origin) {
|
|
239
|
+
return {
|
|
240
|
+
onBeforeEnter: applyOrigin,
|
|
241
|
+
onBeforeLeave: applyOrigin
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
return {};
|
|
140
245
|
});
|
|
246
|
+
/*********************************************************
|
|
247
|
+
* Expose
|
|
248
|
+
*
|
|
249
|
+
* @description
|
|
250
|
+
* Public API surface exposed to parent refs.
|
|
251
|
+
********************************************************/
|
|
252
|
+
defineExpose({ filterProps });
|
|
141
253
|
</script>
|
|
142
254
|
|
|
143
255
|
<style lang="scss">
|
|
@@ -11,19 +11,52 @@
|
|
|
11
11
|
<script lang="ts" setup>
|
|
12
12
|
import { useProps } from "../../composables/Commons/props.composable";
|
|
13
13
|
import { useWindowTransition } from "../../composables/Transition/windowTransition.composable";
|
|
14
|
+
/*********************************************************
|
|
15
|
+
* Global
|
|
16
|
+
*
|
|
17
|
+
* @description
|
|
18
|
+
* Props with defaults and filterProps utility.
|
|
19
|
+
********************************************************/
|
|
14
20
|
const props = defineProps({
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
21
|
+
mode: {
|
|
22
|
+
type: null,
|
|
23
|
+
required: false
|
|
24
|
+
},
|
|
25
|
+
disabled: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
required: false
|
|
28
|
+
},
|
|
29
|
+
name: {
|
|
30
|
+
type: String,
|
|
31
|
+
required: false,
|
|
32
|
+
default: "origam-transition--window-x-reverse-translate"
|
|
33
|
+
},
|
|
34
|
+
group: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
required: false
|
|
37
|
+
}
|
|
19
38
|
});
|
|
20
39
|
const { filterProps } = useProps(props);
|
|
21
40
|
defineEmits([]);
|
|
22
41
|
defineSlots();
|
|
42
|
+
/*********************************************************
|
|
43
|
+
* Transition
|
|
44
|
+
*
|
|
45
|
+
* @description
|
|
46
|
+
* Window horizontal reverse-slide transition delegated to
|
|
47
|
+
* useWindowTransition.
|
|
48
|
+
********************************************************/
|
|
49
|
+
/*********************************************************
|
|
50
|
+
* Composables
|
|
51
|
+
********************************************************/
|
|
23
52
|
const { name, tag, transitionProps } = useWindowTransition(props);
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
53
|
+
/*********************************************************
|
|
54
|
+
* Expose
|
|
55
|
+
*
|
|
56
|
+
* @description
|
|
57
|
+
* Public API surface exposed to parent refs.
|
|
58
|
+
********************************************************/
|
|
59
|
+
defineExpose({ filterProps });
|
|
27
60
|
</script>
|
|
28
61
|
|
|
29
62
|
<style lang="scss">
|
|
@@ -11,19 +11,52 @@
|
|
|
11
11
|
<script lang="ts" setup>
|
|
12
12
|
import { useProps } from "../../composables/Commons/props.composable";
|
|
13
13
|
import { useWindowTransition } from "../../composables/Transition/windowTransition.composable";
|
|
14
|
+
/*********************************************************
|
|
15
|
+
* Global
|
|
16
|
+
*
|
|
17
|
+
* @description
|
|
18
|
+
* Props with defaults and filterProps utility.
|
|
19
|
+
********************************************************/
|
|
14
20
|
const props = defineProps({
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
21
|
+
mode: {
|
|
22
|
+
type: null,
|
|
23
|
+
required: false
|
|
24
|
+
},
|
|
25
|
+
disabled: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
required: false
|
|
28
|
+
},
|
|
29
|
+
name: {
|
|
30
|
+
type: String,
|
|
31
|
+
required: false,
|
|
32
|
+
default: "origam-transition--window-x-translate"
|
|
33
|
+
},
|
|
34
|
+
group: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
required: false
|
|
37
|
+
}
|
|
19
38
|
});
|
|
20
39
|
const { filterProps } = useProps(props);
|
|
21
40
|
defineEmits([]);
|
|
22
41
|
defineSlots();
|
|
42
|
+
/*********************************************************
|
|
43
|
+
* Transition
|
|
44
|
+
*
|
|
45
|
+
* @description
|
|
46
|
+
* Window horizontal forward-slide transition delegated to
|
|
47
|
+
* useWindowTransition.
|
|
48
|
+
********************************************************/
|
|
49
|
+
/*********************************************************
|
|
50
|
+
* Composables
|
|
51
|
+
********************************************************/
|
|
23
52
|
const { name, tag, transitionProps } = useWindowTransition(props);
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
53
|
+
/*********************************************************
|
|
54
|
+
* Expose
|
|
55
|
+
*
|
|
56
|
+
* @description
|
|
57
|
+
* Public API surface exposed to parent refs.
|
|
58
|
+
********************************************************/
|
|
59
|
+
defineExpose({ filterProps });
|
|
27
60
|
</script>
|
|
28
61
|
|
|
29
62
|
<style lang="scss">
|
|
@@ -11,19 +11,52 @@
|
|
|
11
11
|
<script lang="ts" setup>
|
|
12
12
|
import { useProps } from "../../composables/Commons/props.composable";
|
|
13
13
|
import { useWindowTransition } from "../../composables/Transition/windowTransition.composable";
|
|
14
|
+
/*********************************************************
|
|
15
|
+
* Global
|
|
16
|
+
*
|
|
17
|
+
* @description
|
|
18
|
+
* Props with defaults and filterProps utility.
|
|
19
|
+
********************************************************/
|
|
14
20
|
const props = defineProps({
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
21
|
+
mode: {
|
|
22
|
+
type: null,
|
|
23
|
+
required: false
|
|
24
|
+
},
|
|
25
|
+
disabled: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
required: false
|
|
28
|
+
},
|
|
29
|
+
name: {
|
|
30
|
+
type: String,
|
|
31
|
+
required: false,
|
|
32
|
+
default: "origam-transition--window-y-reverse-translate"
|
|
33
|
+
},
|
|
34
|
+
group: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
required: false
|
|
37
|
+
}
|
|
19
38
|
});
|
|
20
39
|
const { filterProps } = useProps(props);
|
|
21
40
|
defineEmits([]);
|
|
22
41
|
defineSlots();
|
|
42
|
+
/*********************************************************
|
|
43
|
+
* Transition
|
|
44
|
+
*
|
|
45
|
+
* @description
|
|
46
|
+
* Window vertical reverse-slide transition delegated to
|
|
47
|
+
* useWindowTransition.
|
|
48
|
+
********************************************************/
|
|
49
|
+
/*********************************************************
|
|
50
|
+
* Composables
|
|
51
|
+
********************************************************/
|
|
23
52
|
const { name, tag, transitionProps } = useWindowTransition(props);
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
53
|
+
/*********************************************************
|
|
54
|
+
* Expose
|
|
55
|
+
*
|
|
56
|
+
* @description
|
|
57
|
+
* Public API surface exposed to parent refs.
|
|
58
|
+
********************************************************/
|
|
59
|
+
defineExpose({ filterProps });
|
|
27
60
|
</script>
|
|
28
61
|
|
|
29
62
|
<style lang="scss">
|
|
@@ -11,19 +11,52 @@
|
|
|
11
11
|
<script lang="ts" setup>
|
|
12
12
|
import { useProps } from "../../composables/Commons/props.composable";
|
|
13
13
|
import { useWindowTransition } from "../../composables/Transition/windowTransition.composable";
|
|
14
|
+
/*********************************************************
|
|
15
|
+
* Global
|
|
16
|
+
*
|
|
17
|
+
* @description
|
|
18
|
+
* Props with defaults and filterProps utility.
|
|
19
|
+
********************************************************/
|
|
14
20
|
const props = defineProps({
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
21
|
+
mode: {
|
|
22
|
+
type: null,
|
|
23
|
+
required: false
|
|
24
|
+
},
|
|
25
|
+
disabled: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
required: false
|
|
28
|
+
},
|
|
29
|
+
name: {
|
|
30
|
+
type: String,
|
|
31
|
+
required: false,
|
|
32
|
+
default: "origam-transition--window-y-translate"
|
|
33
|
+
},
|
|
34
|
+
group: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
required: false
|
|
37
|
+
}
|
|
19
38
|
});
|
|
20
39
|
const { filterProps } = useProps(props);
|
|
21
40
|
defineEmits([]);
|
|
22
41
|
defineSlots();
|
|
42
|
+
/*********************************************************
|
|
43
|
+
* Transition
|
|
44
|
+
*
|
|
45
|
+
* @description
|
|
46
|
+
* Window vertical forward-slide transition delegated to
|
|
47
|
+
* useWindowTransition.
|
|
48
|
+
********************************************************/
|
|
49
|
+
/*********************************************************
|
|
50
|
+
* Composables
|
|
51
|
+
********************************************************/
|
|
23
52
|
const { name, tag, transitionProps } = useWindowTransition(props);
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
53
|
+
/*********************************************************
|
|
54
|
+
* Expose
|
|
55
|
+
*
|
|
56
|
+
* @description
|
|
57
|
+
* Public API surface exposed to parent refs.
|
|
58
|
+
********************************************************/
|
|
59
|
+
defineExpose({ filterProps });
|
|
27
60
|
</script>
|
|
28
61
|
|
|
29
62
|
<style lang="scss">
|