maz-ui 4.7.5 → 4.7.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/MazAccordion.CKnz73h4.js +1 -0
- package/dist/chunks/MazAlert.B8hE7wet.js +1 -0
- package/dist/chunks/MazAnimatedCounter.GLLYbZAz.js +1 -0
- package/dist/chunks/MazAnimatedElement._8NY8WgC.js +1 -0
- package/dist/chunks/MazAnimatedText.BSZ8FNf-.js +1 -0
- package/dist/chunks/MazAvatar.vO5VNPi8.js +1 -0
- package/dist/chunks/MazBackdrop.Cjbwi8-V.js +1 -0
- package/dist/chunks/MazBadge.BBZJgHXm.js +1 -0
- package/dist/chunks/MazBottomSheet.WgZ6qobx.js +1 -0
- package/dist/chunks/MazBtn.Cc9C1v2l.js +1 -0
- package/dist/chunks/MazBtnGroup.3B1XcqWM.js +1 -0
- package/dist/chunks/MazCard.YYC0LaHY.js +1 -0
- package/dist/chunks/MazCardSpotlight.SpZF61hl.js +1 -0
- package/dist/chunks/MazCarousel.1NT4jcvR.js +1 -0
- package/dist/chunks/MazChart.CDZ2PBTC.js +1 -0
- package/dist/chunks/MazCheckbox.DurIbKdf.js +1 -0
- package/dist/chunks/MazChecklist.D9ezwGpQ.js +1 -0
- package/dist/chunks/MazCircularProgressBar.rATx_hD9.js +1 -0
- package/dist/chunks/MazContainer.zXcfMOs-.js +1 -0
- package/dist/chunks/MazDatePicker.KUP34cbV.js +1 -0
- package/dist/chunks/MazDialog.CtKF3Xzo.js +1 -0
- package/dist/chunks/MazDialogConfirm.CAAHeBPE.js +1 -0
- package/dist/chunks/MazDrawer.Dc_RGG8a.js +1 -0
- package/dist/chunks/MazDropdown.2DUcivzO.js +1 -0
- package/dist/chunks/MazDropzone.CiWiPcFM.js +1 -0
- package/dist/chunks/MazExpandAnimation.CMMwtuQA.js +1 -0
- package/dist/chunks/MazFullscreenLoader.BIVRcZJ8.js +1 -0
- package/dist/chunks/MazGallery.CEmGy0K9.js +1 -0
- package/dist/chunks/MazIcon.ZWAk25ZX.js +1 -0
- package/dist/chunks/MazInput.DJjWLaKg.js +1 -0
- package/dist/chunks/MazInputCode.DKnl3i-X.js +1 -0
- package/dist/chunks/MazInputNumber.B42Mn-9h.js +1 -0
- package/dist/chunks/MazInputPhoneNumber.CLivThtK.js +1 -0
- package/dist/chunks/MazInputPrice.BeL-M944.js +1 -0
- package/dist/chunks/MazInputTags.CIVT9F6Q.js +1 -0
- package/dist/chunks/MazLazyImg.-EMwandx.js +1 -0
- package/dist/chunks/MazLink.BOpxMATj.js +1 -0
- package/dist/chunks/MazLoadingBar.C86AX2Tk.js +1 -0
- package/dist/chunks/MazPagination.CNNKXBsg.js +1 -0
- package/dist/chunks/MazPickerCalendarDays.CSZZbk5Z.js +1 -0
- package/dist/chunks/MazPickerCalendarGrid.DrUHBH6-.js +1 -0
- package/dist/chunks/MazPickerContainer.BZ74M74V.js +1 -0
- package/dist/chunks/MazPopover.Co8BEopX.js +1 -0
- package/dist/chunks/MazPullToRefresh.DMtb6Oa3.js +1 -0
- package/dist/chunks/MazRadio.75ipjTw2.js +1 -0
- package/dist/chunks/MazRadioButtons.DenHCgB3.js +1 -0
- package/dist/chunks/MazReadMore.CDXacQIw.js +1 -0
- package/dist/chunks/MazReadingProgressBar.828Y0mxA.js +1 -0
- package/dist/chunks/MazSelect.yYFAbBb5.js +1 -0
- package/dist/chunks/MazSelectCountry.DvVgk2es.js +1 -0
- package/dist/chunks/MazSkeleton.BewTYJC2.js +1 -0
- package/dist/chunks/MazSlider.BS5QHWK6.js +1 -0
- package/dist/chunks/MazSpinner.D3NN2pow.js +1 -0
- package/dist/chunks/MazStepper.DTu8HG9T.js +1 -0
- package/dist/chunks/MazSwitch.Dvmj-rTW.js +1 -0
- package/dist/chunks/MazTable.DnOehvN6.js +1 -0
- package/dist/chunks/MazTableCell.xbm2NGWL.js +1 -0
- package/dist/chunks/MazTableRow.B5dJiXk1.js +1 -0
- package/dist/chunks/MazTableTitle.DNA_1mCy.js +1 -0
- package/dist/chunks/MazTabs.-0-YP3QQ.js +1 -0
- package/dist/chunks/MazTabsBar.D2JVKMS7.js +1 -0
- package/dist/chunks/MazTabsContent.C9omK25X.js +1 -0
- package/dist/chunks/MazTabsContentItem.mJEAS5R8.js +1 -0
- package/dist/chunks/MazTextarea.BliEP5G5.js +1 -0
- package/dist/chunks/MazUiProvider.BgN8V0lD.js +1 -0
- package/dist/chunks/_plugin-vue_export-helper.ChmETRGw.js +1 -0
- package/dist/chunks/dialog.DexeIC3K.js +1 -0
- package/dist/chunks/dom-events.BPrKJiCz.js +1 -0
- package/dist/chunks/resolveLinkComponent.DAc3sqGH.js +1 -0
- package/dist/chunks/toast.UQ8RRuT9.js +1 -0
- package/dist/chunks/types.DDbvTVqf.js +1 -0
- package/dist/chunks/useMazInputPhoneNumber.B_qQ0ldP.js +1 -0
- package/dist/chunks/utils.B8bfGQxN.js +1 -0
- package/dist/chunks/vFullscreenImg.CZeRh3mw.js +1 -0
- package/dist/chunks/vLazyImg.CXmd3Lp0.js +1 -0
- package/dist/chunks/vZoomImg.CaAHb98S.js +124 -0
- package/dist/components/MazAccordion.js +1 -86
- package/dist/components/MazAlert.js +1 -85
- package/dist/components/MazAnimatedCounter.js +1 -73
- package/dist/components/MazAnimatedElement.js +1 -44
- package/dist/components/MazAnimatedText.js +1 -103
- package/dist/components/MazAvatar.js +1 -125
- package/dist/components/MazBackdrop.js +1 -163
- package/dist/components/MazBadge.js +1 -29
- package/dist/components/MazBottomSheet.js +1 -55
- package/dist/components/MazBtn.js +1 -109
- package/dist/components/MazBtnGroup.js +1 -44
- package/dist/components/MazCard.js +1 -184
- package/dist/components/MazCardSpotlight.js +1 -81
- package/dist/components/MazCarousel.js +1 -104
- package/dist/components/MazChart.js +1 -4
- package/dist/components/MazCheckbox.js +1 -128
- package/dist/components/MazChecklist.js +1 -133
- package/dist/components/MazCircularProgressBar.js +1 -131
- package/dist/components/MazContainer.js +1 -71
- package/dist/components/MazDatePicker/MazPickerCalendar.js +1 -113
- package/dist/components/MazDatePicker/MazPickerCalendarMonth/MazPickerCalendarDays.js +1 -19
- package/dist/components/MazDatePicker/MazPickerCalendarMonth/MazPickerCalendarGrid.js +1 -181
- package/dist/components/MazDatePicker/MazPickerCalendarMonth/MazPickerCalendarMonth.js +1 -75
- package/dist/components/MazDatePicker/MazPickerCalendarSwitcher.js +1 -90
- package/dist/components/MazDatePicker/MazPickerContainer.js +1 -116
- package/dist/components/MazDatePicker/MazPickerHeader.js +1 -126
- package/dist/components/MazDatePicker/MazPickerMonthSwitcher.js +1 -82
- package/dist/components/MazDatePicker/MazPickerShortcuts.js +1 -55
- package/dist/components/MazDatePicker/MazPickerTime.js +1 -178
- package/dist/components/MazDatePicker/MazPickerYearSwitcher.js +1 -95
- package/dist/components/MazDatePicker.js +1 -466
- package/dist/components/MazDatePicker.vue.d.ts +2 -6
- package/dist/components/MazDialog.js +1 -115
- package/dist/components/MazDialog.vue.d.ts +2 -6
- package/dist/components/MazDialogConfirm.js +1 -6
- package/dist/components/MazDialogConfirm.vue.d.ts +2 -6
- package/dist/components/MazDrawer.js +1 -70
- package/dist/components/MazDropdown.js +1 -277
- package/dist/components/MazDropdown.vue.d.ts +2 -6
- package/dist/components/MazDropzone.js +1 -533
- package/dist/components/MazExpandAnimation.js +1 -46
- package/dist/components/MazFullscreenLoader.js +1 -38
- package/dist/components/MazGallery.js +1 -105
- package/dist/components/MazIcon.js +1 -114
- package/dist/components/MazInput.js +1 -256
- package/dist/components/MazInputCode.js +1 -152
- package/dist/components/MazInputNumber.js +1 -152
- package/dist/components/MazInputPhoneNumber/PhoneInput.js +1 -114
- package/dist/components/MazInputPhoneNumber.js +1 -253
- package/dist/components/MazInputPrice.js +1 -4
- package/dist/components/MazInputTags.js +1 -145
- package/dist/components/MazLazyImg.js +1 -62
- package/dist/components/MazLink.js +1 -80
- package/dist/components/MazLoadingBar.js +1 -24
- package/dist/components/MazPagination.js +1 -184
- package/dist/components/MazPopover.js +1 -326
- package/dist/components/MazPullToRefresh.js +1 -145
- package/dist/components/MazRadio.js +1 -103
- package/dist/components/MazRadioButtons.js +1 -135
- package/dist/components/MazReadMore.js +1 -110
- package/dist/components/MazReadingProgressBar.js +1 -68
- package/dist/components/MazSelect.js +1 -413
- package/dist/components/MazSelectCountry.js +1 -192
- package/dist/components/MazSkeleton.js +1 -50
- package/dist/components/MazSlider.js +1 -205
- package/dist/components/MazSpinner.js +1 -27
- package/dist/components/MazStepper.js +1 -170
- package/dist/components/MazSwitch.js +1 -4
- package/dist/components/MazTable.js +1 -8
- package/dist/components/MazTableCell.js +1 -18
- package/dist/components/MazTableRow.js +1 -26
- package/dist/components/MazTableTitle.js +1 -18
- package/dist/components/MazTabs.js +1 -4
- package/dist/components/MazTabsBar.js +1 -138
- package/dist/components/MazTabsContent.js +1 -4
- package/dist/components/MazTabsContentItem.js +1 -37
- package/dist/components/MazTextarea.js +1 -147
- package/dist/components/MazUiProvider.js +1 -4
- package/dist/components/index.js +1 -127
- package/dist/composables/index.js +1 -44
- package/dist/composables/useAos.js +1 -7
- package/dist/composables/useBreakpoints.js +1 -34
- package/dist/composables/useDialog.js +1 -7
- package/dist/composables/useDisplayNames.js +1 -111
- package/dist/composables/useDropzone.js +1 -66
- package/dist/composables/useFormField.js +1 -101
- package/dist/composables/useFormValidator.js +1 -163
- package/dist/composables/useFreezeValue.js +1 -8
- package/dist/composables/useIdleTimeout.js +1 -10
- package/dist/composables/useInjectStrict.js +1 -10
- package/dist/composables/useInstanceUniqId.js +1 -12
- package/dist/composables/useMountComponent.js +1 -16
- package/dist/composables/useMutationObserver.js +1 -37
- package/dist/composables/useReadingTime.js +1 -33
- package/dist/composables/useStringMatching.js +1 -42
- package/dist/composables/useSwipe.js +1 -26
- package/dist/composables/useTimer.js +1 -36
- package/dist/composables/useToast.js +1 -14
- package/dist/composables/useUserVisibility.js +1 -10
- package/dist/composables/useWait.js +1 -7
- package/dist/composables/useWindowSize.js +1 -21
- package/dist/directives/index.js +1 -19
- package/dist/directives/vClickOutside.js +1 -104
- package/dist/directives/vFullscreenImg.js +1 -10
- package/dist/directives/vLazyImg.js +1 -23
- package/dist/directives/vTooltip.js +1 -161
- package/dist/directives/vZoomImg.js +1 -286
- package/dist/index.js +1 -1
- package/dist/plugins/aos.js +1 -89
- package/dist/plugins/dialog.js +1 -61
- package/dist/plugins/index.js +1 -17
- package/dist/plugins/maz-ui.js +1 -11
- package/dist/plugins/toast.js +1 -261
- package/dist/plugins/wait.js +1 -43
- package/dist/resolvers/MazComponentsResolver.js +1 -18
- package/dist/resolvers/MazDirectivesResolver.js +1 -14
- package/dist/resolvers/MazModulesResolver.js +1 -76
- package/dist/resolvers/index.js +1 -8
- package/dist/tailwindcss/index.js +1 -20
- package/dist/tailwindcss/tailwind.config.js +1 -35
- package/dist/tailwindcss/utils/colors.js +1 -25
- package/dist/tailwindcss/variables/breakpoints.js +1 -29
- package/dist/tailwindcss/variables/colors.js +1 -33
- package/dist/tailwindcss/variables/design-tokens.js +1 -42
- package/dist/tailwindcss/variables/utilities.js +1 -20
- package/dist/tailwindcss/variables/z-indexes.js +1 -17
- package/package.json +12 -13
- package/dist/chunks/MazChart.vue_vue_type_script_setup_true_lang.DpG9UYdm.js +0 -50
- package/dist/chunks/MazDialogConfirm.vue_vue_type_script_setup_true_lang.BB2rYkwY.js +0 -215
- package/dist/chunks/MazInputPrice.vue_vue_type_script_setup_true_lang.DcNkyw1C.js +0 -77
- package/dist/chunks/MazSwitch.vue_vue_type_style_index_0_lang.lYfYsI0R.js +0 -84
- package/dist/chunks/MazTable.vue_vue_type_script_setup_true_lang.ycpSYFvJ.js +0 -517
- package/dist/chunks/MazTabs.vue_vue_type_script_setup_true_lang.CiIFxs7J.js +0 -28
- package/dist/chunks/MazTabsContent.vue_vue_type_script_setup_true_lang.MO7zA8LZ.js +0 -26
- package/dist/chunks/MazUiProvider.vue_vue_type_script_setup_true_lang.DtnM1DOn.js +0 -34
- package/dist/chunks/_plugin-vue_export-helper.B--vMWp3.js +0 -9
- package/dist/chunks/dom-events.DTx6Kblx.js +0 -368
- package/dist/chunks/fullscreen-img.directive.BJieSSIt.js +0 -321
- package/dist/chunks/lazy-img.directive.GRfYbidn.js +0 -174
- package/dist/chunks/resolveLinkComponent.CKR2McYy.js +0 -8
- package/dist/chunks/types.D0Bp_UhS.js +0 -6
- package/dist/chunks/useMazInputPhoneNumber.Os-2y9bz.js +0 -157
- package/dist/chunks/utils.D89Q5cCP.js +0 -207
- /package/dist/assets/{fullscreen-img.DFp1SMPU.css → vFullscreenImg.DFp1SMPU.css} +0 -0
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
var style=`
|
|
2
|
+
.maz-zoom-img {
|
|
3
|
+
position: fixed;
|
|
4
|
+
top: 0;
|
|
5
|
+
bottom: 0;
|
|
6
|
+
left: 0;
|
|
7
|
+
right: 0;
|
|
8
|
+
padding: 1rem;
|
|
9
|
+
z-index: 1050;
|
|
10
|
+
background-color: hsla(238, 15%, 40%, 0.7);
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.maz-zoom-img,
|
|
18
|
+
.maz-zoom-img * {
|
|
19
|
+
box-sizing: border-box;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.maz-zoom-img .maz-zoom-img__wrapper {
|
|
23
|
+
position: relative;
|
|
24
|
+
display: flex;
|
|
25
|
+
justify-content: center;
|
|
26
|
+
align-items: center;
|
|
27
|
+
min-width: 0;
|
|
28
|
+
min-height: 0;
|
|
29
|
+
max-width: 100%;
|
|
30
|
+
max-height: 100%;
|
|
31
|
+
transition: all 300ms ease-in-out;
|
|
32
|
+
opacity: 0;
|
|
33
|
+
transform: scale(0.5);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.maz-zoom-img.maz-animate .maz-zoom-img__wrapper {
|
|
37
|
+
opacity: 1;
|
|
38
|
+
transform: scale(1);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.maz-zoom-img.maz-animate .maz-zoom-img__loader {
|
|
42
|
+
position: absolute;
|
|
43
|
+
top: 0;
|
|
44
|
+
bottom: 0;
|
|
45
|
+
left: 0;
|
|
46
|
+
right: 0;
|
|
47
|
+
display: flex;
|
|
48
|
+
align-items: center;
|
|
49
|
+
justify-content: center;
|
|
50
|
+
background-color: hsla(238, 15%, 40%, 0.7);
|
|
51
|
+
border-radius: 1rem;
|
|
52
|
+
z-index: 2;
|
|
53
|
+
min-width: 60px;
|
|
54
|
+
min-height: 60px;
|
|
55
|
+
}
|
|
56
|
+
.maz-zoom-img.maz-animate .maz-zoom-img__loader[hidden] {
|
|
57
|
+
display: none;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
@-webkit-keyframes spin {
|
|
61
|
+
0% { transform: rotate(0deg); }
|
|
62
|
+
100% { transform: rotate(360deg); }
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@keyframes spin {
|
|
66
|
+
0% { transform: rotate(0deg); }
|
|
67
|
+
100% { transform: rotate(360deg); }
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.maz-zoom-img.maz-animate .maz-zoom-img__loader__svg {
|
|
71
|
+
animation: spin .6s linear infinite;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.maz-zoom-img img {
|
|
75
|
+
max-width: 100%;
|
|
76
|
+
max-height: 100%;
|
|
77
|
+
min-width: 0;
|
|
78
|
+
border-radius: 1rem;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.maz-zoom-img .maz-zoom-btn {
|
|
82
|
+
margin: 0 auto;
|
|
83
|
+
border: none;
|
|
84
|
+
background-color: hsla(0, 0%, 7%, 0.5);
|
|
85
|
+
box-shadow: 0 0 0.5rem 0 hsla(0, 0%, 0%, 0.2);
|
|
86
|
+
height: 2.2rem;
|
|
87
|
+
min-height: 2.2rem;
|
|
88
|
+
width: 2.2rem;
|
|
89
|
+
min-width: 2.2rem;
|
|
90
|
+
display: flex;
|
|
91
|
+
align-items: center;
|
|
92
|
+
justify-content: center;
|
|
93
|
+
border-radius: 2.2rem;
|
|
94
|
+
cursor: pointer;
|
|
95
|
+
flex: 0 0 auto;
|
|
96
|
+
outline: none;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.maz-zoom-img .maz-zoom-btn svg {
|
|
100
|
+
fill: white;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.maz-zoom-img .maz-zoom-btn.maz-zoom-btn--close {
|
|
104
|
+
position: absolute;
|
|
105
|
+
top: 0.5rem;
|
|
106
|
+
right: 0.5rem;
|
|
107
|
+
z-index: 1;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.maz-zoom-img .maz-zoom-btn.maz-zoom-btn--previous {
|
|
111
|
+
position: absolute;
|
|
112
|
+
left: 0.5rem;
|
|
113
|
+
z-index: 1;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.maz-zoom-img .maz-zoom-btn.maz-zoom-btn--next {
|
|
117
|
+
position: absolute;
|
|
118
|
+
right: 0.5rem;
|
|
119
|
+
z-index: 1;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.maz-zoom-img .maz-zoom-btn:hover {
|
|
123
|
+
background-color: hsl(0, 0%, 0%);
|
|
124
|
+
}`;var svgs={close:`<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>`,next:`<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg>`,previous:`<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"/></svg>`,spinner:`<svg width="40px" height="40px" version="1.1" xmlns="http://www.w3.org/2000/svg" fill="currentColor" x="0px" y="0px" viewBox="0 0 50 50" xml:space="preserve" class="maz-zoom-img__loader__svg" data-v-6d1cb50c=""><path d="M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z"></path></svg>`};var StateClass=function(StateClass){return StateClass.OPEN=`maz-is-open`,StateClass}(StateClass||{});var ZoomImgHandler=class{options;loader;wrapper;img;keydownHandler;onImgLoadedCallback;buttonsAdded;defaultOptions={scale:!0,blur:!0,disabled:!1};mouseEnterListener=void 0;mouseLeaveListener=void 0;renderPreviewListener=void 0;constructor(binding){if(!binding.value)throw Error('[MazUI](zoom-img) Image path must be defined. Ex: `v-zoom-img="<PATH_TO_IMAGE>"`');if(typeof binding.value==`object`&&!binding.value.src)throw Error(`[maz-ui](zoom-img) src of image must be provided`);this.buttonsAdded=!1,this.options=this.buildOptions(binding),this.keydownHandler=this.keydownLister.bind(this),this.loader=this.getLoader(),this.wrapper=document.createElement(`div`),this.wrapper.classList.add(`maz-zoom-img__wrapper`),this.wrapper.prepend(this.loader),this.img=document.createElement(`img`),this.onImgLoadedCallback=this.onImgLoaded.bind(this),this.imgEventHandler(!0)}buildOptions(binding){return{...this.defaultOptions,...typeof binding.value==`object`?binding.value:{src:binding.value}}}get allInstances(){return[...document.querySelectorAll(`.maz-zoom-img-instance`)]}create(el){this.options.disabled||(el.style.cursor=`pointer`,setTimeout(()=>el.classList.add(`maz-zoom-img-instance`)),el.setAttribute(`data-zoom-src`,this.options.src),this.options.alt&&el.setAttribute(`data-zoom-alt`,this.options.alt),el.style.transition=`all 300ms ease-in-out`,this.mouseEnterListener=()=>this.mouseEnter(el),this.mouseLeaveListener=()=>this.mouseLeave(el),this.renderPreviewListener=()=>this.renderPreview(el,this.options),el.addEventListener(`mouseenter`,this.mouseEnterListener),el.addEventListener(`mouseleave`,this.mouseLeaveListener),el.addEventListener(`click`,this.renderPreviewListener))}update(binding){this.options=this.buildOptions(binding)}remove(el){this.imgEventHandler(!1),this.mouseEnterListener&&el.removeEventListener(`mouseenter`,this.mouseEnterListener),this.mouseLeaveListener&&el.removeEventListener(`mouseleave`,this.mouseLeaveListener),this.renderPreviewListener&&el.removeEventListener(`click`,this.renderPreviewListener),this.mouseEnterListener=void 0,this.mouseLeaveListener=void 0,this.renderPreviewListener=void 0,el.classList.remove(`maz-zoom-img-instance`),el.removeAttribute(`data-zoom-src`),el.removeAttribute(`data-zoom-alt`),el.style.cursor=``}renderPreview(el,options){el.classList.add(StateClass.OPEN),this.addStyle(style);let container=document.createElement(`div`);container.classList.add(`maz-zoom-img`),container.setAttribute(`id`,`MazImgPreviewFullsize`),container.addEventListener(`click`,e=>{container.isEqualNode(e.target)&&this.closePreview()}),typeof options==`object`&&(this.img.setAttribute(`src`,options.src),options.alt&&this.img.setAttribute(`alt`,options.alt),this.img.id=`MazImgElement`),this.wrapper.append(this.img),container.append(this.wrapper),document.body.append(container),this.keyboardEventHandler(!0),setTimeout(()=>{container&&container.classList.add(`maz-animate`)},100)}onImgLoaded(){this.wrapper.style.width=`${this.img.width}px`,this.wrapper.style.minWidth=`200px`,this.loader.hidden=!0;let closeButton=this.getButton();let buttons=[];let hasMultipleInstance=this.allInstances.length>1;if(!this.buttonsAdded){if(this.buttonsAdded=!0,hasMultipleInstance){let previousButton=this.getButton(`previous`);let nextButton=this.getButton(`next`);buttons.push(previousButton,nextButton)}this.wrapper.append(closeButton),hasMultipleInstance&&(this.wrapper.prepend(buttons[0]),this.wrapper.append(buttons[1]))}}getLoader(){let loader=document.createElement(`div`);return loader.classList.add(`maz-zoom-img__loader`),loader.innerHTML=svgs.spinner,loader}mouseLeave(el){this.options.scale&&(el.style.transform=``),this.options.blur&&(el.style.filter=``),el.style.zIndex=``}mouseEnter(el){el.style.zIndex=`1`,this.options.scale&&(el.style.transform=`scale(1.1)`),this.options.blur&&(el.style.filter=`blur(2px)`)}keydownLister(e){e.preventDefault(),(e.key===`Escape`||e.key===` `)&&this.closePreview(),(e.key===`ArrowLeft`||e.key===`ArrowRight`)&&this.nextPreviousImage(e.key===`ArrowRight`)}getButton(iconName=`close`){let button=document.createElement(`button`);button.innerHTML=svgs[iconName];let getAction=()=>iconName===`close`?this.closePreview():this.allInstances?this.nextPreviousImage(iconName===`next`):null;return button.addEventListener(`click`,()=>{getAction()}),button.classList.add(`maz-zoom-btn`),button.classList.add(`maz-zoom-btn--${iconName}`),button}closePreview(){let container=document.querySelector(`#MazImgPreviewFullsize`);let style=document.querySelector(`#MazPreviewStyle`);let instance=document.querySelector(`.maz-zoom-img-instance.maz-is-open`);instance&&instance.classList.remove(StateClass.OPEN),container&&container.classList.remove(`maz-animate`),this.keyboardEventHandler(!1),setTimeout(()=>{container&&container.remove(),style&&style.remove()},300)}getNewInstanceIndex(newInstanceIndex){let nextIndex=newInstanceIndex;return nextIndex<0?nextIndex=this.allInstances.length-1:nextIndex>=this.allInstances.length&&(nextIndex=0),nextIndex}nextPreviousImage(isNext){let selectNextInstance=isNext;let currentInstance=document.querySelector(`.maz-zoom-img-instance.maz-is-open`);if(currentInstance){let currentInstanceIndex=this.allInstances.indexOf(currentInstance);let newInstanceIndex=selectNextInstance?currentInstanceIndex+1:currentInstanceIndex-1;let nextInstance=this.allInstances[this.getNewInstanceIndex(newInstanceIndex)];nextInstance&&this.useNextInstance(currentInstance,nextInstance)}}useNextInstance(currentInstance,nextInstance){currentInstance.classList.remove(StateClass.OPEN),nextInstance.classList.add(StateClass.OPEN);let src=nextInstance.getAttribute(`data-zoom-src`);let alt=nextInstance.getAttribute(`data-zoom-alt`);this.wrapper.style.width=``,this.loader.hidden=!1,src&&this.img.setAttribute(`src`,src),alt&&this.img.setAttribute(`alt`,alt)}addStyle(styleString){let style=document.createElement(`style`);style.id=`MazPreviewStyle`,style.textContent=styleString,document.head.append(style)}keyboardEventHandler(add){if(add)return document.addEventListener(`keydown`,this.keydownHandler);document.removeEventListener(`keydown`,this.keydownHandler)}imgEventHandler(add){if(add)return this.img.addEventListener(`load`,this.onImgLoadedCallback);this.img.removeEventListener(`load`,this.onImgLoadedCallback)}};var instance;var vZoomImg={created(el,binding){instance=new ZoomImgHandler(binding),instance.create(el)},updated(_el,binding){instance.update(binding)},unmounted(el){instance.remove(el)}};var plugin={install(app){app.directive(`zoom-img`,vZoomImg)}};export{vZoomImg as n,plugin as t};
|
|
@@ -1,86 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { MazPlus } from "@maz-ui/icons/MazPlus";
|
|
3
|
-
import { useInstanceUniqId } from "../composables/useInstanceUniqId.js";
|
|
4
|
-
import MazCardSpotlight from "./MazCardSpotlight.js";
|
|
5
|
-
import MazExpandAnimation from "./MazExpandAnimation.js";
|
|
6
|
-
import { _ as _export_sfc } from "../chunks/_plugin-vue_export-helper.B--vMWp3.js";
|
|
7
|
-
import '../assets/MazAccordion.HGwBdQUE.css';const _hoisted_1 = {
|
|
8
|
-
class: "m-accordion m-reset-css",
|
|
9
|
-
role: "presentation"
|
|
10
|
-
}, _hoisted_2 = ["id", "aria-controls", "aria-expanded", "onClick"], _sfc_main = /* @__PURE__ */ defineComponent({
|
|
11
|
-
__name: "MazAccordion",
|
|
12
|
-
props: {
|
|
13
|
-
id: { default: () => {
|
|
14
|
-
} },
|
|
15
|
-
modelValue: { default: 0 },
|
|
16
|
-
contentClass: { type: [Boolean, null, String, Object, Array], default: () => {
|
|
17
|
-
} }
|
|
18
|
-
},
|
|
19
|
-
emits: ["update:model-value"],
|
|
20
|
-
setup(__props, { emit: __emit }) {
|
|
21
|
-
const emits = __emit, instanceId = useInstanceUniqId({
|
|
22
|
-
componentName: "MazAccordion",
|
|
23
|
-
providedId: __props.id
|
|
24
|
-
}), slots = useSlots(), stepCount = computed(
|
|
25
|
-
() => Object.keys(slots).filter((slot) => slot.startsWith("title-")).length
|
|
26
|
-
), localModelValue = ref(__props.modelValue), currentStep = computed({
|
|
27
|
-
get: () => __props.modelValue || localModelValue.value,
|
|
28
|
-
set: (value) => {
|
|
29
|
-
localModelValue.value = value, emits("update:model-value", value);
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
function isStepOpen(index) {
|
|
33
|
-
return currentStep.value === index;
|
|
34
|
-
}
|
|
35
|
-
function selectStep(index) {
|
|
36
|
-
currentStep.value === index ? (localModelValue.value = 0, emits("update:model-value", 0)) : (localModelValue.value = index, emits("update:model-value", index));
|
|
37
|
-
}
|
|
38
|
-
return (_ctx, _cache) => (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
39
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(stepCount.value, (step) => (openBlock(), createBlock(MazCardSpotlight, {
|
|
40
|
-
key: step,
|
|
41
|
-
class: "m-accordion__spotlight",
|
|
42
|
-
padding: !1
|
|
43
|
-
}, {
|
|
44
|
-
default: withCtx(() => [
|
|
45
|
-
createElementVNode("button", {
|
|
46
|
-
id: `step-${step}-${unref(instanceId)}`,
|
|
47
|
-
class: "m-accordion__header",
|
|
48
|
-
"aria-controls": `step-${step}-${unref(instanceId)}`,
|
|
49
|
-
"aria-expanded": isStepOpen(step),
|
|
50
|
-
onClick: ($event) => selectStep(step)
|
|
51
|
-
}, [
|
|
52
|
-
renderSlot(_ctx.$slots, `title-${step}`, {
|
|
53
|
-
isOpen: isStepOpen(step)
|
|
54
|
-
}, void 0, !0),
|
|
55
|
-
createVNode(unref(MazPlus), {
|
|
56
|
-
class: normalizeClass(["header-icon", { "--rotate": isStepOpen(step) }])
|
|
57
|
-
}, null, 8, ["class"])
|
|
58
|
-
], 8, _hoisted_2),
|
|
59
|
-
createVNode(MazExpandAnimation, {
|
|
60
|
-
"animation-duration": "300ms",
|
|
61
|
-
"model-value": isStepOpen(step),
|
|
62
|
-
"aria-labelledby": `step-${step}-${unref(instanceId)}`
|
|
63
|
-
}, {
|
|
64
|
-
default: withCtx(() => [
|
|
65
|
-
createElementVNode("div", {
|
|
66
|
-
class: normalizeClass(["m-accordion__content", __props.contentClass])
|
|
67
|
-
}, [
|
|
68
|
-
renderSlot(_ctx.$slots, "content", {
|
|
69
|
-
isOpen: isStepOpen(step)
|
|
70
|
-
}, void 0, !0),
|
|
71
|
-
renderSlot(_ctx.$slots, `content-${step}`, {
|
|
72
|
-
isOpen: isStepOpen(step)
|
|
73
|
-
}, void 0, !0)
|
|
74
|
-
], 2)
|
|
75
|
-
]),
|
|
76
|
-
_: 2
|
|
77
|
-
}, 1032, ["model-value", "aria-labelledby"])
|
|
78
|
-
]),
|
|
79
|
-
_: 2
|
|
80
|
-
}, 1024))), 128))
|
|
81
|
-
]));
|
|
82
|
-
}
|
|
83
|
-
}), MazAccordion = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-680465a1"]]);
|
|
84
|
-
export {
|
|
85
|
-
MazAccordion as default
|
|
86
|
-
};
|
|
1
|
+
import"../chunks/MazExpandAnimation.CMMwtuQA.js";import"../chunks/MazCardSpotlight.SpZF61hl.js";import{t as MazAccordion_default}from"../chunks/MazAccordion.CKnz73h4.js";export{MazAccordion_default as default};
|
|
@@ -1,85 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { MazInformationCircle, MazXCircle, MazExclamationCircle, MazCheckCircle } from "@maz-ui/icons/lazy";
|
|
3
|
-
import { _ as _export_sfc } from "../chunks/_plugin-vue_export-helper.B--vMWp3.js";
|
|
4
|
-
import '../assets/MazAlert.CYQbspTo.css';const _hoisted_1 = ["aria-labelledby", "aria-describedby"], _hoisted_2 = {
|
|
5
|
-
key: 0,
|
|
6
|
-
class: "m-alert-icon",
|
|
7
|
-
"aria-hidden": "true"
|
|
8
|
-
}, _hoisted_3 = { class: "m-alert-body" }, _hoisted_4 = ["id"], _hoisted_5 = ["id"], _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
|
-
__name: "MazAlert",
|
|
10
|
-
props: {
|
|
11
|
-
title: {},
|
|
12
|
-
content: {},
|
|
13
|
-
icon: { type: [Function, Object, String], default: void 0 },
|
|
14
|
-
hideIcon: { type: Boolean, default: !1 },
|
|
15
|
-
color: { default: "info" },
|
|
16
|
-
iconSize: { default: "md" },
|
|
17
|
-
roundedSize: { default: "base" },
|
|
18
|
-
bordered: { type: Boolean, default: !0 },
|
|
19
|
-
variant: { default: "soft" }
|
|
20
|
-
},
|
|
21
|
-
setup(__props) {
|
|
22
|
-
const MazIcon = defineAsyncComponent(() => import("./MazIcon.js")), slots = useSlots(), instanceId = useId(), headingId = computed(() => `m-alert-heading-${instanceId}`), contentId = computed(() => `m-alert-content-${instanceId}`), hasTitle = computed(() => !!__props.title || !!slots.title), hasContent = computed(() => !!__props.content || !!slots.default), colorStyles = computed(() => ({
|
|
23
|
-
"--m-alert-color": `var(--maz-${__props.color}-700)`,
|
|
24
|
-
"--m-alert-color-dark": `var(--maz-${__props.color}-400)`,
|
|
25
|
-
"--m-alert-bg": `var(--maz-${__props.color})`,
|
|
26
|
-
"--m-alert-fg": `var(--maz-${__props.color}-foreground)`,
|
|
27
|
-
"--m-alert-border": `var(--maz-${__props.color}-600)`
|
|
28
|
-
})), currentIcon = computed(() => __props.hideIcon ? void 0 : __props.icon ? __props.icon : {
|
|
29
|
-
success: MazCheckCircle,
|
|
30
|
-
warning: MazExclamationCircle,
|
|
31
|
-
destructive: MazXCircle,
|
|
32
|
-
info: MazInformationCircle,
|
|
33
|
-
primary: MazInformationCircle,
|
|
34
|
-
secondary: MazInformationCircle,
|
|
35
|
-
accent: MazInformationCircle,
|
|
36
|
-
contrast: MazInformationCircle
|
|
37
|
-
}[__props.color]);
|
|
38
|
-
return (_ctx, _cache) => (openBlock(), createElementBlock("div", {
|
|
39
|
-
class: normalizeClass(["m-alert m-reset-css", [
|
|
40
|
-
`--rounded-${__props.roundedSize}`,
|
|
41
|
-
`--${__props.variant}`,
|
|
42
|
-
{ "--bordered": __props.bordered }
|
|
43
|
-
]]),
|
|
44
|
-
role: "alert",
|
|
45
|
-
"aria-labelledby": hasTitle.value ? headingId.value : void 0,
|
|
46
|
-
"aria-describedby": hasContent.value ? contentId.value : void 0,
|
|
47
|
-
style: normalizeStyle(colorStyles.value)
|
|
48
|
-
}, [
|
|
49
|
-
currentIcon.value ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
50
|
-
typeof currentIcon.value == "string" ? (openBlock(), createBlock(unref(MazIcon), {
|
|
51
|
-
key: 0,
|
|
52
|
-
name: currentIcon.value,
|
|
53
|
-
size: __props.iconSize
|
|
54
|
-
}, null, 8, ["name", "size"])) : (openBlock(), createBlock(unref(MazIcon), {
|
|
55
|
-
key: 1,
|
|
56
|
-
icon: currentIcon.value,
|
|
57
|
-
size: __props.iconSize
|
|
58
|
-
}, null, 8, ["icon", "size"]))
|
|
59
|
-
])) : createCommentVNode("", !0),
|
|
60
|
-
createElementVNode("div", _hoisted_3, [
|
|
61
|
-
hasTitle.value ? (openBlock(), createElementBlock("p", {
|
|
62
|
-
key: 0,
|
|
63
|
-
id: headingId.value,
|
|
64
|
-
class: "m-alert-title"
|
|
65
|
-
}, [
|
|
66
|
-
renderSlot(_ctx.$slots, "title", {}, () => [
|
|
67
|
-
createTextVNode(toDisplayString(__props.title), 1)
|
|
68
|
-
], !0)
|
|
69
|
-
], 8, _hoisted_4)) : createCommentVNode("", !0),
|
|
70
|
-
hasContent.value ? (openBlock(), createElementBlock("div", {
|
|
71
|
-
key: 1,
|
|
72
|
-
id: contentId.value,
|
|
73
|
-
class: "m-alert-content"
|
|
74
|
-
}, [
|
|
75
|
-
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
76
|
-
createTextVNode(toDisplayString(__props.content), 1)
|
|
77
|
-
], !0)
|
|
78
|
-
], 8, _hoisted_5)) : createCommentVNode("", !0)
|
|
79
|
-
])
|
|
80
|
-
], 14, _hoisted_1));
|
|
81
|
-
}
|
|
82
|
-
}), MazAlert = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-8bf5631b"]]);
|
|
83
|
-
export {
|
|
84
|
-
MazAlert as default
|
|
85
|
-
};
|
|
1
|
+
import{t as MazAlert_default}from"../chunks/MazAlert.B8hE7wet.js";export{MazAlert_default as default};
|
|
@@ -1,73 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { isClient } from "@maz-ui/utils/helpers/isClient";
|
|
3
|
-
import { _ as _export_sfc } from "../chunks/_plugin-vue_export-helper.B--vMWp3.js";
|
|
4
|
-
import '../assets/MazAnimatedCounter.BKRZiS30.css';const _hoisted_1 = { class: "maz-sr-only" }, _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
|
-
__name: "MazAnimatedCounter",
|
|
6
|
-
props: {
|
|
7
|
-
count: {},
|
|
8
|
-
duration: { default: 1e3 },
|
|
9
|
-
prefix: {},
|
|
10
|
-
suffix: {},
|
|
11
|
-
delay: { default: 100 },
|
|
12
|
-
once: { type: Boolean, default: !0 }
|
|
13
|
-
},
|
|
14
|
-
setup(__props) {
|
|
15
|
-
const currentCount = ref(0), elementRef = ref(null);
|
|
16
|
-
function getRequestAnimationFrame() {
|
|
17
|
-
return !isClient() || !globalThis.requestAnimationFrame ? (callback) => (setTimeout(callback, 1e3 / 60), 0) : globalThis.requestAnimationFrame.bind(globalThis);
|
|
18
|
-
}
|
|
19
|
-
function animate(start, end, duration, delay) {
|
|
20
|
-
const requestAnim = getRequestAnimationFrame();
|
|
21
|
-
currentCount.value = start, isClient() && setTimeout(() => {
|
|
22
|
-
const startTime = performance.now(), updateCount = (currentTime = performance.now()) => {
|
|
23
|
-
const elapsed = currentTime - startTime, progress = Math.min(elapsed / duration, 1), easeOutQuad = (t) => t * (2 - t);
|
|
24
|
-
currentCount.value = Math.round(
|
|
25
|
-
start + (end - start) * easeOutQuad(progress)
|
|
26
|
-
), progress < 1 && requestAnim(updateCount);
|
|
27
|
-
};
|
|
28
|
-
requestAnim(updateCount);
|
|
29
|
-
}, delay);
|
|
30
|
-
}
|
|
31
|
-
function startAnimation(start, end) {
|
|
32
|
-
animate(start, end, __props.duration, __props.delay);
|
|
33
|
-
}
|
|
34
|
-
let observer = null;
|
|
35
|
-
return onMounted(() => {
|
|
36
|
-
__props.once || (observer = new IntersectionObserver(([entry]) => {
|
|
37
|
-
entry.isIntersecting && (startAnimation(0, __props.count), __props.once && observer?.unobserve(entry.target));
|
|
38
|
-
}), elementRef.value && observer.observe(elementRef.value));
|
|
39
|
-
}), onBeforeUnmount(() => observer?.disconnect()), watch(
|
|
40
|
-
() => __props.count,
|
|
41
|
-
(newCount, oldCount) => {
|
|
42
|
-
if (newCount === oldCount)
|
|
43
|
-
return;
|
|
44
|
-
startAnimation(oldCount ?? 0, newCount);
|
|
45
|
-
},
|
|
46
|
-
{ immediate: !0 }
|
|
47
|
-
), (_ctx, _cache) => (openBlock(), createElementBlock("span", {
|
|
48
|
-
ref_key: "elementRef",
|
|
49
|
-
ref: elementRef,
|
|
50
|
-
class: "m-animated-counter m-reset-css"
|
|
51
|
-
}, [
|
|
52
|
-
createElementVNode("span", _hoisted_1, [
|
|
53
|
-
renderSlot(_ctx.$slots, "prefix", {}, () => [
|
|
54
|
-
createTextVNode(toDisplayString(__props.prefix), 1)
|
|
55
|
-
], !0),
|
|
56
|
-
createTextVNode(toDisplayString(__props.count), 1),
|
|
57
|
-
renderSlot(_ctx.$slots, "suffix", {}, () => [
|
|
58
|
-
createTextVNode(toDisplayString(__props.suffix), 1)
|
|
59
|
-
], !0)
|
|
60
|
-
]),
|
|
61
|
-
renderSlot(_ctx.$slots, "prefix", {}, () => [
|
|
62
|
-
createTextVNode(toDisplayString(__props.prefix), 1)
|
|
63
|
-
], !0),
|
|
64
|
-
createTextVNode(toDisplayString(currentCount.value), 1),
|
|
65
|
-
renderSlot(_ctx.$slots, "suffix", {}, () => [
|
|
66
|
-
createTextVNode(toDisplayString(__props.suffix), 1)
|
|
67
|
-
], !0)
|
|
68
|
-
], 512));
|
|
69
|
-
}
|
|
70
|
-
}), MazAnimatedCounter = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-fb4175f1"]]);
|
|
71
|
-
export {
|
|
72
|
-
MazAnimatedCounter as default
|
|
73
|
-
};
|
|
1
|
+
import{t as MazAnimatedCounter_default}from"../chunks/MazAnimatedCounter.GLLYbZAz.js";export{MazAnimatedCounter_default as default};
|
|
@@ -1,44 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { _ as _export_sfc } from "../chunks/_plugin-vue_export-helper.B--vMWp3.js";
|
|
3
|
-
import '../assets/MazAnimatedElement.v3g68Xpj.css';const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
4
|
-
__name: "MazAnimatedElement",
|
|
5
|
-
props: {
|
|
6
|
-
direction: { default: "up" },
|
|
7
|
-
delay: { default: 0 },
|
|
8
|
-
duration: { default: 2e3 },
|
|
9
|
-
once: { type: Boolean, default: !0 }
|
|
10
|
-
},
|
|
11
|
-
setup(__props) {
|
|
12
|
-
const animatedClass = computed(() => `animate-slide-${__props.direction}-blur`), element = ref(), isAnimated = ref(!1);
|
|
13
|
-
let observer = null, animationFrameId = null;
|
|
14
|
-
function triggerAnimation() {
|
|
15
|
-
animationFrameId = requestAnimationFrame(() => {
|
|
16
|
-
element.value && (element.value.classList.remove("--invisible"), element.value.classList.add(animatedClass.value), isAnimated.value = !0);
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
function resetAnimation() {
|
|
20
|
-
element.value && (element.value.classList.add("--invisible"), element.value.classList.remove(animatedClass.value), isAnimated.value = !1);
|
|
21
|
-
}
|
|
22
|
-
return onMounted(() => {
|
|
23
|
-
observer = new IntersectionObserver(([entry]) => {
|
|
24
|
-
entry.isIntersecting && !isAnimated.value ? (nextTick(() => {
|
|
25
|
-
setTimeout(triggerAnimation, __props.delay);
|
|
26
|
-
}), __props.once === !0 && observer?.unobserve(entry.target)) : __props.once === !1 && !entry.isIntersecting && resetAnimation();
|
|
27
|
-
}), element.value && observer.observe(element.value);
|
|
28
|
-
}), onBeforeUnmount(() => {
|
|
29
|
-
observer?.disconnect(), animationFrameId && cancelAnimationFrame(animationFrameId);
|
|
30
|
-
}), (_ctx, _cache) => (openBlock(), createElementBlock("div", {
|
|
31
|
-
ref_key: "element",
|
|
32
|
-
ref: element,
|
|
33
|
-
class: "m-animated-element m-reset-css --invisible",
|
|
34
|
-
style: normalizeStyle({
|
|
35
|
-
animationDuration: `${__props.duration}ms`
|
|
36
|
-
})
|
|
37
|
-
}, [
|
|
38
|
-
renderSlot(_ctx.$slots, "default", {}, void 0, !0)
|
|
39
|
-
], 4));
|
|
40
|
-
}
|
|
41
|
-
}), MazAnimatedElement = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-5891b044"]]);
|
|
42
|
-
export {
|
|
43
|
-
MazAnimatedElement as default
|
|
44
|
-
};
|
|
1
|
+
import{t as MazAnimatedElement_default}from"../chunks/MazAnimatedElement._8NY8WgC.js";export{MazAnimatedElement_default as default};
|
|
@@ -1,103 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { checkAvailability } from "@maz-ui/utils/helpers/checkAvailability";
|
|
3
|
-
import { _ as _export_sfc } from "../chunks/_plugin-vue_export-helper.B--vMWp3.js";
|
|
4
|
-
import '../assets/MazAnimatedText.CoEetpNd.css';const _hoisted_1 = { class: "m-animated-text__last-word-inner" }, _hoisted_2 = { class: "m-animated-text__last-word-inner-text" }, _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
|
-
inheritAttrs: !1,
|
|
6
|
-
__name: "MazAnimatedText",
|
|
7
|
-
props: {
|
|
8
|
-
text: {},
|
|
9
|
-
lastWord: {},
|
|
10
|
-
delay: { default: 0 },
|
|
11
|
-
direction: { default: "up" },
|
|
12
|
-
tag: { default: "span" },
|
|
13
|
-
wordDelay: { default: 75 },
|
|
14
|
-
columnGap: { default: 0.5 },
|
|
15
|
-
rowGap: { default: 0 },
|
|
16
|
-
duration: { default: 2e3 },
|
|
17
|
-
once: { type: Boolean, default: !0 },
|
|
18
|
-
gradientFrom: { default: "primary" },
|
|
19
|
-
gradientVia: { default: "info" },
|
|
20
|
-
gradientTo: { default: "secondary" }
|
|
21
|
-
},
|
|
22
|
-
setup(__props) {
|
|
23
|
-
const words = computed(() => __props.text.split(" ")), wordCount = computed(() => words.value.length), isVisible = ref(!1), isClient = ref(!1), animatedWords = ref([]), element = ref();
|
|
24
|
-
let observer = null, animationFrameId = null;
|
|
25
|
-
function triggerWordAnimations() {
|
|
26
|
-
const totalWords = words.value.length + (__props.lastWord ? 1 : 0);
|
|
27
|
-
animatedWords.value = Array.from({ length: totalWords }, () => !1);
|
|
28
|
-
let currentIndex = 0;
|
|
29
|
-
const animateNextWord = () => {
|
|
30
|
-
currentIndex < totalWords && requestAnimationFrame(() => {
|
|
31
|
-
animatedWords.value[currentIndex] = !0, currentIndex++, currentIndex < totalWords && (animationFrameId = setTimeout(animateNextWord, __props.wordDelay));
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
setTimeout(animateNextWord, __props.delay);
|
|
35
|
-
}
|
|
36
|
-
onMounted(() => {
|
|
37
|
-
isClient.value = !0, observer = new IntersectionObserver(([entry]) => {
|
|
38
|
-
entry.isIntersecting && !isVisible.value && (isVisible.value = !0, nextTick(() => {
|
|
39
|
-
triggerWordAnimations();
|
|
40
|
-
}), __props.once && element.value && observer?.unobserve(element.value));
|
|
41
|
-
}), checkAvailability(() => element.value, (element2) => {
|
|
42
|
-
observer?.observe(element2);
|
|
43
|
-
});
|
|
44
|
-
}), onBeforeUnmount(() => {
|
|
45
|
-
observer?.disconnect(), animationFrameId && clearTimeout(animationFrameId);
|
|
46
|
-
});
|
|
47
|
-
const gradientStyle = computed(() => __props.lastWord ? `linear-gradient(to right, ${[
|
|
48
|
-
`hsl(var(--maz-${__props.gradientFrom}))`,
|
|
49
|
-
...__props.gradientVia ? [`hsl(var(--maz-${__props.gradientVia}))`] : [],
|
|
50
|
-
`hsl(var(--maz-${__props.gradientTo}))`
|
|
51
|
-
].join(", ")})` : void 0);
|
|
52
|
-
return (_ctx, _cache) => (openBlock(), createElementBlock("div", {
|
|
53
|
-
class: "m-reset-css m-animated-text",
|
|
54
|
-
style: normalizeStyle({ "--maz-gradient-style": gradientStyle.value })
|
|
55
|
-
}, [
|
|
56
|
-
isClient.value ? (openBlock(), createBlock(resolveDynamicComponent(__props.tag), mergeProps({
|
|
57
|
-
key: 0,
|
|
58
|
-
ref_key: "element",
|
|
59
|
-
ref: element
|
|
60
|
-
}, _ctx.$attrs, {
|
|
61
|
-
class: "m-animated-text__root",
|
|
62
|
-
style: { columnGap: `${__props.columnGap}rem`, rowGap: `${__props.rowGap}rem` }
|
|
63
|
-
}), {
|
|
64
|
-
default: withCtx(() => [
|
|
65
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(words.value, (word, index) => (openBlock(), createElementBlock("span", {
|
|
66
|
-
key: word + index,
|
|
67
|
-
class: "m-animated-text__word"
|
|
68
|
-
}, [
|
|
69
|
-
createElementVNode("span", {
|
|
70
|
-
class: normalizeClass(["m-animated-text__word-inner", animatedWords.value[index] ? `maz-animate-slide-${__props.direction}-blur` : "maz-invisible"]),
|
|
71
|
-
style: normalizeStyle({
|
|
72
|
-
animationDuration: `${__props.duration}ms`
|
|
73
|
-
})
|
|
74
|
-
}, toDisplayString(word), 7)
|
|
75
|
-
]))), 128)),
|
|
76
|
-
__props.lastWord ? (openBlock(), createElementBlock("span", {
|
|
77
|
-
key: 0,
|
|
78
|
-
class: normalizeClass(["m-animated-text__last-word", animatedWords.value[wordCount.value] ? `maz-animate-slide-${__props.direction}-blur` : "maz-invisible"]),
|
|
79
|
-
style: normalizeStyle({
|
|
80
|
-
animationDuration: `${__props.duration}ms`
|
|
81
|
-
})
|
|
82
|
-
}, [
|
|
83
|
-
createElementVNode("span", _hoisted_1, [
|
|
84
|
-
createElementVNode("span", _hoisted_2, toDisplayString(__props.lastWord), 1)
|
|
85
|
-
])
|
|
86
|
-
], 6)) : createCommentVNode("", !0)
|
|
87
|
-
]),
|
|
88
|
-
_: 1
|
|
89
|
-
}, 16, ["style"])) : (openBlock(), createBlock(resolveDynamicComponent(__props.tag), mergeProps({ key: 1 }, _ctx.$attrs, { class: "maz-invisible maz-inline-flex" }), {
|
|
90
|
-
default: withCtx(() => [
|
|
91
|
-
createTextVNode(toDisplayString(__props.text) + " ", 1),
|
|
92
|
-
__props.lastWord ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
93
|
-
createTextVNode(toDisplayString(__props.lastWord), 1)
|
|
94
|
-
], 64)) : createCommentVNode("", !0)
|
|
95
|
-
]),
|
|
96
|
-
_: 1
|
|
97
|
-
}, 16))
|
|
98
|
-
], 4));
|
|
99
|
-
}
|
|
100
|
-
}), MazAnimatedText = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-c353e3f9"]]);
|
|
101
|
-
export {
|
|
102
|
-
MazAnimatedText as default
|
|
103
|
-
};
|
|
1
|
+
import{t as MazAnimatedText_default}from"../chunks/MazAnimatedText.BSZ8FNf-.js";export{MazAnimatedText_default as default};
|
|
@@ -1,125 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { MazPencil } from "@maz-ui/icons/lazy";
|
|
3
|
-
import { r as resolveLinkComponent } from "../chunks/resolveLinkComponent.CKR2McYy.js";
|
|
4
|
-
import { _ as _export_sfc } from "../chunks/_plugin-vue_export-helper.B--vMWp3.js";
|
|
5
|
-
import '../assets/MazAvatar.yI9_k86V.css';const _hoisted_1 = ["tabindex"], _hoisted_2 = ["src", "alt", "loading"], _hoisted_3 = { class: "m-avatar__initial" }, _hoisted_4 = {
|
|
6
|
-
key: 0,
|
|
7
|
-
class: "m-avatar__caption"
|
|
8
|
-
}, _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
|
-
inheritAttrs: !1,
|
|
10
|
-
__name: "MazAvatar",
|
|
11
|
-
props: {
|
|
12
|
-
style: { type: [Boolean, null, String, Object, Array] },
|
|
13
|
-
class: { type: [Boolean, null, String, Object, Array] },
|
|
14
|
-
src: { default: void 0 },
|
|
15
|
-
caption: { default: void 0 },
|
|
16
|
-
href: { default: void 0 },
|
|
17
|
-
to: { default: void 0 },
|
|
18
|
-
alt: { default: "avatar image" },
|
|
19
|
-
target: { default: "_self" },
|
|
20
|
-
size: { default: void 0 },
|
|
21
|
-
bordered: { type: Boolean },
|
|
22
|
-
clickable: { type: Boolean },
|
|
23
|
-
square: { type: Boolean },
|
|
24
|
-
noElevation: { type: Boolean },
|
|
25
|
-
showCaption: { type: Boolean },
|
|
26
|
-
imageHeightFull: { type: Boolean },
|
|
27
|
-
hideLoader: { type: Boolean },
|
|
28
|
-
buttonColor: { default: "info" },
|
|
29
|
-
hideClickableIcon: { type: Boolean },
|
|
30
|
-
letterCount: { default: void 0 },
|
|
31
|
-
roundedSize: { default: "full" },
|
|
32
|
-
fallbackSrc: { default: void 0 },
|
|
33
|
-
loading: { default: "intersecting" }
|
|
34
|
-
},
|
|
35
|
-
emits: ["click", "intersecting", "loading", "loaded", "error"],
|
|
36
|
-
setup(__props, { emit: __emit }) {
|
|
37
|
-
const props = __props, emits = __emit, MazLazyImg = defineAsyncComponent(() => import("./MazLazyImg.js")), routerLinkComponent = resolveLinkComponent(), componentType = computed(() => props.to ? routerLinkComponent : props.href ? "a" : "div"), isLink = computed(() => !!props.to || !!props.href);
|
|
38
|
-
function getInitials(name, lettersCount = props.letterCount) {
|
|
39
|
-
return name.split(" ").map((word) => word[0]).join("").slice(0, lettersCount);
|
|
40
|
-
}
|
|
41
|
-
const shouldDisplayImg = computed(() => props.src || !props.src && !props.caption);
|
|
42
|
-
function handleImageError(event) {
|
|
43
|
-
if (emits("error", event.target), props.fallbackSrc && event.target instanceof HTMLImageElement) {
|
|
44
|
-
const currentSrc = new URL(event.target.src), fallbackSrc = new URL(props.fallbackSrc);
|
|
45
|
-
if (currentSrc.href === fallbackSrc.href)
|
|
46
|
-
return;
|
|
47
|
-
event.target.src = props.fallbackSrc;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
return (_ctx, _cache) => (openBlock(), createBlock(resolveDynamicComponent(componentType.value), {
|
|
51
|
-
style: normalizeStyle([{ fontSize: __props.size }, __props.style]),
|
|
52
|
-
class: normalizeClass(["m-avatar m-reset-css", [
|
|
53
|
-
{
|
|
54
|
-
"--has-link": isLink.value
|
|
55
|
-
},
|
|
56
|
-
props.class
|
|
57
|
-
]]),
|
|
58
|
-
href: __props.href,
|
|
59
|
-
to: __props.to,
|
|
60
|
-
target: isLink.value ? __props.target : void 0
|
|
61
|
-
}, {
|
|
62
|
-
default: withCtx(() => [
|
|
63
|
-
createElementVNode("div", {
|
|
64
|
-
class: normalizeClass(["m-avatar__wrapper", [
|
|
65
|
-
{
|
|
66
|
-
"--has-shadow": !__props.noElevation,
|
|
67
|
-
"--bordered": __props.bordered,
|
|
68
|
-
"--clickable": __props.clickable,
|
|
69
|
-
"--has-initial": !__props.src && __props.caption
|
|
70
|
-
},
|
|
71
|
-
`--rounded-${__props.square ? "none" : __props.roundedSize}`
|
|
72
|
-
]]),
|
|
73
|
-
tabindex: __props.clickable ? 0 : -1
|
|
74
|
-
}, [
|
|
75
|
-
shouldDisplayImg.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
76
|
-
__props.loading === "intersecting" ? (openBlock(), createBlock(unref(MazLazyImg), mergeProps({ key: 0 }, _ctx.$attrs, {
|
|
77
|
-
class: "m-avatar__picture maz-w-full maz-max-w-full",
|
|
78
|
-
src: __props.src,
|
|
79
|
-
alt: __props.alt,
|
|
80
|
-
"image-height-full": "",
|
|
81
|
-
"hide-loader": __props.hideLoader,
|
|
82
|
-
"fallback-src": __props.fallbackSrc,
|
|
83
|
-
onClick: _cache[0] || (_cache[0] = ($event) => __props.clickable ? _ctx.$emit("click", $event) : null),
|
|
84
|
-
onError: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("error", $event)),
|
|
85
|
-
onLoaded: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("loaded", $event)),
|
|
86
|
-
onLoading: _cache[3] || (_cache[3] = ($event) => _ctx.$emit("loading", $event)),
|
|
87
|
-
onIntersecting: _cache[4] || (_cache[4] = ($event) => _ctx.$emit("intersecting", $event))
|
|
88
|
-
}), null, 16, ["src", "alt", "hide-loader", "fallback-src"])) : (openBlock(), createElementBlock("img", {
|
|
89
|
-
key: 1,
|
|
90
|
-
class: "m-avatar__picture maz-w-full maz-max-w-full",
|
|
91
|
-
src: __props.src ?? __props.fallbackSrc,
|
|
92
|
-
alt: __props.alt,
|
|
93
|
-
loading: __props.loading,
|
|
94
|
-
onError: handleImageError
|
|
95
|
-
}, null, 40, _hoisted_2))
|
|
96
|
-
], 64)) : createCommentVNode("", !0),
|
|
97
|
-
__props.caption && !__props.src ? renderSlot(_ctx.$slots, "round-text", { key: 1 }, () => [
|
|
98
|
-
createElementVNode("span", _hoisted_3, toDisplayString(getInitials(__props.caption)), 1)
|
|
99
|
-
], !0) : createCommentVNode("", !0),
|
|
100
|
-
__props.clickable ? (openBlock(), createElementBlock("button", {
|
|
101
|
-
key: 2,
|
|
102
|
-
type: "button",
|
|
103
|
-
tabindex: "-1",
|
|
104
|
-
class: "m-avatar__button",
|
|
105
|
-
style: normalizeStyle({
|
|
106
|
-
backgroundColor: __props.src ? `hsl(var(--maz-${__props.buttonColor}) / 60%)` : `hsl(var(--maz-${__props.buttonColor}))`
|
|
107
|
-
}),
|
|
108
|
-
onClick: _cache[5] || (_cache[5] = ($event) => _ctx.$emit("click", $event))
|
|
109
|
-
}, [
|
|
110
|
-
__props.hideClickableIcon ? createCommentVNode("", !0) : renderSlot(_ctx.$slots, "icon", { key: 0 }, () => [
|
|
111
|
-
createVNode(unref(MazPencil), { class: "m-avatar__button__icon" })
|
|
112
|
-
], !0)
|
|
113
|
-
], 4)) : createCommentVNode("", !0)
|
|
114
|
-
], 10, _hoisted_1),
|
|
115
|
-
renderSlot(_ctx.$slots, "caption", {}, () => [
|
|
116
|
-
__props.showCaption && __props.caption ? (openBlock(), createElementBlock("p", _hoisted_4, toDisplayString(__props.caption), 1)) : createCommentVNode("", !0)
|
|
117
|
-
], !0)
|
|
118
|
-
]),
|
|
119
|
-
_: 3
|
|
120
|
-
}, 8, ["style", "class", "href", "to", "target"]));
|
|
121
|
-
}
|
|
122
|
-
}), MazAvatar = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-174150b8"]]);
|
|
123
|
-
export {
|
|
124
|
-
MazAvatar as default
|
|
125
|
-
};
|
|
1
|
+
import{t as MazAvatar_default}from"../chunks/MazAvatar.vO5VNPi8.js";export{MazAvatar_default as default};
|