maz-ui 4.0.0-beta.2 → 4.0.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/MazCheckbox.BFo5eYS6.css +1 -0
- package/dist/assets/MazInputPhoneNumber.C-Nw3080.css +1 -0
- package/dist/assets/MazLazyImg.NlPRN3Nk.css +1 -0
- package/dist/assets/{MazPopover.Bth9NWia.css → MazPopover.COR-tym7.css} +1 -1
- package/dist/assets/{MazSelectCountry.D2Qudf0K.css → MazSelectCountry.9RTcDxtM.css} +1 -1
- package/dist/chunks/{MazDropdown.vue_vue_type_style_index_0_lang.abk1IbMX.js → MazDropdown.vue_vue_type_style_index_0_lang.De5b1GG8.js} +6 -13
- package/dist/chunks/{MazInputPhoneNumber.Uwhn1Q9j.js → MazInputPhoneNumber.B7mxCHgU.js} +3 -3
- package/dist/chunks/{MazSwitch.vue_vue_type_style_index_0_lang.DnCjlD6D.js → MazSwitch.vue_vue_type_style_index_0_lang.DQE0vFhe.js} +1 -1
- package/dist/chunks/{PhoneInput.CPjyZ8Sq.js → PhoneInput.tDA-TWr5.js} +1 -1
- package/dist/chunks/{en.BzBlrE0C.js → en.Q_4-KljL.js} +12 -0
- package/dist/components/MazCheckbox.js +2 -2
- package/dist/components/MazDropdown.js +1 -1
- package/dist/components/MazInputPhoneNumber.js +1 -1
- package/dist/components/MazLazyImg.js +8 -8
- package/dist/components/MazPopover.js +13 -12
- package/dist/components/MazSelectCountry.js +2 -2
- package/dist/components/MazSwitch.js +1 -1
- package/dist/components/index.js +3 -3
- package/dist/composables/useAos.js +1 -1
- package/dist/composables/useDialog.js +1 -1
- package/dist/composables/useInjectStrict.js +2 -2
- package/dist/composables/useToast.js +1 -1
- package/dist/composables/useWait.js +1 -1
- package/dist/directives/vTooltip.js +1 -1
- package/dist/plugins/maz-ui.js +3 -64
- package/dist/types/components/MazDatePicker.vue.d.ts +11 -11
- package/dist/types/components/MazDialogPromise/useMazDialogPromise.d.ts +7 -7
- package/dist/types/components/MazDropdown.vue.d.ts +11 -11
- package/dist/types/components/MazInputPhoneNumber/useLibphonenumber.d.ts +2 -2
- package/dist/types/components/MazInputPhoneNumber/useMazInputPhoneNumber.d.ts +6 -2
- package/dist/types/components/MazInputPhoneNumber.vue.d.ts +28 -13
- package/dist/types/components/MazLazyImg.vue.d.ts +8 -8
- package/dist/types/components/MazPopover.vue.d.ts +10 -10
- package/dist/types/components/MazSelectCountry.vue.d.ts +2 -2
- package/dist/types/components/index.d.ts +1 -1
- package/dist/types/composables/useInjectStrict.d.ts +1 -1
- package/dist/types/directives/vClickOutside.d.ts +11 -18
- package/dist/types/directives/vFullscreenImg/fullscreen-img.directive.d.ts +3 -5
- package/dist/types/directives/vFullscreenImg.d.ts +9 -4
- package/dist/types/directives/vLazyImg/lazy-img.directive.d.ts +3 -5
- package/dist/types/directives/vLazyImg.d.ts +11 -6
- package/dist/types/directives/vTooltip.d.ts +12 -12
- package/dist/types/directives/vZoomImg/zoom-img.directive.d.ts +2 -0
- package/dist/types/directives/vZoomImg.d.ts +9 -5
- package/dist/types/plugins/aos.d.ts +30 -4
- package/dist/types/plugins/dialog.d.ts +2 -4
- package/dist/types/plugins/maz-ui.d.ts +2 -63
- package/dist/types/plugins/toast.d.ts +2 -4
- package/dist/types/plugins/wait.d.ts +2 -3
- package/package.json +24 -24
- package/dist/assets/MazCheckbox.C_qIngLy.css +0 -1
- package/dist/assets/MazInputPhoneNumber.vpA2mrZn.css +0 -1
- package/dist/assets/MazLazyImg.BNaVtpfX.css +0 -1
- package/dist/types/components/MazInputPhoneNumber/types.d.ts +0 -22
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.m-checkbox[data-v-588a1122]{vertical-align:top;outline-offset:2px;outline:2px solid #0000;align-items:center;gap:.5rem;display:inline-flex;position:relative}.m-checkbox .check-icon[data-v-588a1122]{--maz-tw-scale-x:0;--maz-tw-scale-y:0;transform:translate(var(--maz-tw-translate-x),var(--maz-tw-translate-y))rotate(var(--maz-tw-rotate))skewX(var(--maz-tw-skew-x))skewY(var(--maz-tw-skew-y))scaleX(var(--maz-tw-scale-x))scaleY(var(--maz-tw-scale-y));transition-property:transform;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.m-checkbox .check-icon[data-v-588a1122] path{stroke-width:2.5px}.m-checkbox>span[data-v-588a1122]{border-radius:calc(var(--maz-radius) - 4px);border-width:var(--maz-border-width);--maz-tw-border-opacity:1;border-color:hsl(var(--maz-border)/var(--maz-tw-border-opacity,1));justify-content:center;align-items:center;transition-property:all;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1);display:flex;position:relative}.m-checkbox>span[data-v-588a1122]:is([class~=dark] *){--maz-tw-border-opacity:1;border-color:hsl(var(--maz-border-400)/var(--maz-tw-border-opacity,1))}.m-checkbox input[data-v-588a1122]{display:none}.m-checkbox input:not(:checked)~span[data-v-588a1122]{--maz-tw-bg-opacity:1;background-color:hsl(var(--maz-background)/var(--maz-tw-bg-opacity,1))}.m-checkbox input:not(:checked)~span[data-v-588a1122]:is([class~=dark] *){background-color:hsl(var(--maz-background-400)/.6)}.m-checkbox input:checked~span[data-v-588a1122]{border-color:var(--checkbox-selected-color);background-color:var(--checkbox-selected-color)}.m-checkbox input:checked~span .check-icon[data-v-588a1122]{--maz-tw-scale-x:1;--maz-tw-scale-y:1;transform:translate(var(--maz-tw-translate-x),var(--maz-tw-translate-y))rotate(var(--maz-tw-rotate))skewX(var(--maz-tw-skew-x))skewY(var(--maz-tw-skew-y))scaleX(var(--maz-tw-scale-x))scaleY(var(--maz-tw-scale-y))}.m-checkbox input:disabled~span[data-v-588a1122]{--maz-tw-bg-opacity:1;background-color:hsl(var(--maz-background-400)/var(--maz-tw-bg-opacity,1))}.m-checkbox input:disabled~span[data-v-588a1122]:is([class~=dark] *){--maz-tw-bg-opacity:1;background-color:hsl(var(--maz-background-300)/var(--maz-tw-bg-opacity,1))}.m-checkbox.--disabled[data-v-588a1122]{cursor:not-allowed;--maz-tw-text-opacity:1;color:hsl(var(--maz-muted)/var(--maz-tw-text-opacity,1))}.m-checkbox.--disabled svg[data-v-588a1122]{--maz-tw-text-opacity:1!important;color:hsl(var(--maz-muted)/var(--maz-tw-text-opacity,1))!important}.m-checkbox.--disabled input:checked~span[data-v-588a1122]{--maz-tw-border-opacity:1;border-color:hsl(var(--maz-border)/var(--maz-tw-border-opacity,1))}.m-checkbox.--disabled input:checked~span .check-icon[data-v-588a1122]{--maz-tw-text-opacity:1;color:hsl(var(--maz-muted)/var(--maz-tw-text-opacity,1))}.m-checkbox[data-v-588a1122]:not(.--disabled){cursor:pointer}.m-checkbox:not(.--disabled):hover>span[data-v-588a1122],.m-checkbox:not(.--disabled):focus>span[data-v-588a1122]{box-shadow:0 0 0 .125rem var(--checkbox-box-shadow-color);transition-property:all;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.m-checkbox__text[data-v-588a1122]{flex-direction:column;gap:0;display:flex}.m-checkbox__hint[data-v-588a1122]{--maz-tw-text-opacity:1;color:hsl(var(--maz-muted)/var(--maz-tw-text-opacity,1));font-size:.875rem;line-height:1.25rem}.m-checkbox__hint.--error[data-v-588a1122]{--maz-tw-text-opacity:1;color:hsl(var(--maz-destructive-600)/var(--maz-tw-text-opacity,1))}.m-checkbox__hint.--success[data-v-588a1122]{--maz-tw-text-opacity:1;color:hsl(var(--maz-success-600)/var(--maz-tw-text-opacity,1))}.m-checkbox__hint.--warning[data-v-588a1122]{--maz-tw-text-opacity:1;color:hsl(var(--maz-warning-600)/var(--maz-tw-text-opacity,1))}.m-checkbox.--error>span[data-v-588a1122],.m-checkbox.--warning>span[data-v-588a1122],.m-checkbox.--success>span[data-v-588a1122]{transition-property:all;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.m-input-phone-number[data-v-2c969ce1]{vertical-align:top;align-items:center;display:inline-flex;position:relative}.m-input-phone-number.--block[data-v-2c969ce1]{width:100%}.m-input-phone-number.--col[data-v-2c969ce1]{flex-direction:column}.m-input-phone-number.--col .m-input-phone-number__country-select[data-v-2c969ce1],.m-input-phone-number.--col .m-input-phone-number__country-select[data-v-2c969ce1] .m-select-country__select{min-width:100%}.m-input-phone-number.--col .m-input-phone-number__country-select[data-v-2c969ce1] .m-select-country__select .m-input-wrapper{border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--maz-radius)}.m-input-phone-number.--row[data-v-2c969ce1]{flex-direction:row}.m-input-phone-number.--row .m-input-phone-number__country-select[data-v-2c969ce1] .m-select-country__select .m-input-wrapper{border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.m-input-phone-number.--responsive[data-v-2c969ce1]{flex-direction:column}@media (min-width:576px){.m-input-phone-number.--responsive[data-v-2c969ce1]{flex-direction:row}}.m-input-phone-number.--responsive .m-input-phone-number__country-select[data-v-2c969ce1]{min-width:100%}@media (min-width:576px){.m-input-phone-number.--responsive .m-input-phone-number__country-select[data-v-2c969ce1]{min-width:inherit}}.m-input-phone-number.--responsive .m-input-phone-number__country-select[data-v-2c969ce1] .m-select-country__select{min-width:100%}@media (min-width:576px){.m-input-phone-number.--responsive .m-input-phone-number__country-select[data-v-2c969ce1] .m-select-country__select{min-width:inherit}}.m-input-phone-number.--responsive .m-input-phone-number__country-select[data-v-2c969ce1] .m-input-wrapper{border-bottom-right-radius:0;border-bottom-left-radius:0}@media (min-width:576px){.m-input-phone-number.--responsive .m-input-phone-number__country-select[data-v-2c969ce1] .m-input-wrapper{border-bottom-right-radius:var(--maz-radius);border-bottom-left-radius:var(--maz-radius);border-top-right-radius:0;border-bottom-right-radius:0}}.m-input-phone-number__country-list-code[data-v-2c969ce1]{text-align:center;--maz-tw-text-opacity:1;min-width:2rem;color:hsl(var(--maz-muted)/var(--maz-tw-text-opacity,1))}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.m-lazy-img-component[data-v-e4f27ec0]{vertical-align:top;justify-content:center;align-items:center;display:inline-flex;position:relative}.m-lazy-img-component.--block[data-v-e4f27ec0],.m-lazy-img-component.--block img[data-v-e4f27ec0]{width:100%}.m-lazy-img-component-loader[data-v-e4f27ec0]{justify-content:center;align-items:center;display:none;position:absolute;inset:0}.m-lazy-img-component.--height-full img[data-v-e4f27ec0]{width:min-content!important;max-width:min-content!important;max-height:100%!important}.m-lazy-img-component.m-lazy-error[data-v-e4f27ec0]:not(.m-lazy-fallback){--maz-tw-bg-opacity:1;background-color:hsl(var(--maz-background-400)/var(--maz-tw-bg-opacity,1))}.m-lazy-img-component.m-lazy-error:not(.m-lazy-fallback) img[data-v-e4f27ec0]{width:50%;height:50%}.m-lazy-img-component.m-lazy-loading .m-lazy-img-component-loader[data-v-e4f27ec0]{display:flex}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.m-popover[data-v-
|
|
1
|
+
.m-popover[data-v-ea83582e]{display:inline-block}.m-popover.--block[data-v-ea83582e],.m-popover.--block .m-popover-trigger[data-v-ea83582e]{width:100%}.m-popover-trigger[data-v-ea83582e]{display:inline-block}.m-popover-panel[data-v-ea83582e]{visibility:hidden;z-index:1050;border-radius:var(--maz-radius);--maz-tw-shadow-color:hsl(var(--maz-shadow)/1);--maz-tw-shadow:var(--maz-tw-shadow-colored);outline-offset:2px;--maz-tw-drop-shadow:drop-shadow(0 4px 3px #00000012)drop-shadow(0 2px 2px #0000000f);filter:var(--maz-tw-blur)var(--maz-tw-brightness)var(--maz-tw-contrast)var(--maz-tw-grayscale)var(--maz-tw-hue-rotate)var(--maz-tw-invert)var(--maz-tw-saturate)var(--maz-tw-sepia)var(--maz-tw-drop-shadow);outline:2px solid #0000;position:absolute}.m-popover-panel.--background[data-v-ea83582e]{--maz-tw-bg-opacity:1;background-color:hsl(var(--maz-background)/var(--maz-tw-bg-opacity,1))}.m-popover-panel.--background[data-v-ea83582e]:is([class~=dark] *){border-width:var(--maz-border-width);--maz-tw-border-opacity:1;border-color:hsl(var(--maz-border)/var(--maz-tw-border-opacity,1))}.m-popover-panel.--primary[data-v-ea83582e]{--maz-tw-border-opacity:1;border-color:hsl(var(--maz-primary-600)/var(--maz-tw-border-opacity,1));--maz-tw-bg-opacity:1;background-color:hsl(var(--maz-primary)/var(--maz-tw-bg-opacity,1));--maz-tw-text-opacity:1;color:hsl(var(--maz-primary-foreground)/var(--maz-tw-text-opacity,1))}.m-popover-panel.--secondary[data-v-ea83582e]{--maz-tw-border-opacity:1;border-color:hsl(var(--maz-secondary-600)/var(--maz-tw-border-opacity,1));--maz-tw-bg-opacity:1;background-color:hsl(var(--maz-secondary)/var(--maz-tw-bg-opacity,1));--maz-tw-text-opacity:1;color:hsl(var(--maz-secondary-foreground)/var(--maz-tw-text-opacity,1))}.m-popover-panel.--success[data-v-ea83582e]{--maz-tw-border-opacity:1;border-color:hsl(var(--maz-success-600)/var(--maz-tw-border-opacity,1));--maz-tw-bg-opacity:1;background-color:hsl(var(--maz-success)/var(--maz-tw-bg-opacity,1));--maz-tw-text-opacity:1;color:hsl(var(--maz-success-foreground)/var(--maz-tw-text-opacity,1))}.m-popover-panel.--warning[data-v-ea83582e]{--maz-tw-border-opacity:1;border-color:hsl(var(--maz-warning-600)/var(--maz-tw-border-opacity,1));--maz-tw-bg-opacity:1;background-color:hsl(var(--maz-warning)/var(--maz-tw-bg-opacity,1));--maz-tw-text-opacity:1;color:hsl(var(--maz-warning-foreground)/var(--maz-tw-text-opacity,1))}.m-popover-panel.--destructive[data-v-ea83582e]{--maz-tw-border-opacity:1;border-color:hsl(var(--maz-destructive-600)/var(--maz-tw-border-opacity,1));--maz-tw-bg-opacity:1;background-color:hsl(var(--maz-destructive)/var(--maz-tw-bg-opacity,1));--maz-tw-text-opacity:1;color:hsl(var(--maz-destructive-foreground)/var(--maz-tw-text-opacity,1))}.m-popover-panel.--info[data-v-ea83582e]{--maz-tw-border-opacity:1;border-color:hsl(var(--maz-info-600)/var(--maz-tw-border-opacity,1));--maz-tw-bg-opacity:1;background-color:hsl(var(--maz-info)/var(--maz-tw-bg-opacity,1));--maz-tw-text-opacity:1;color:hsl(var(--maz-info-foreground)/var(--maz-tw-text-opacity,1))}.m-popover-panel.--accent[data-v-ea83582e]{--maz-tw-border-opacity:1;border-color:hsl(var(--maz-accent-600)/var(--maz-tw-border-opacity,1));--maz-tw-bg-opacity:1;background-color:hsl(var(--maz-accent)/var(--maz-tw-bg-opacity,1));--maz-tw-text-opacity:1;color:hsl(var(--maz-accent-foreground)/var(--maz-tw-text-opacity,1))}.m-popover-panel.--contrast[data-v-ea83582e]{--maz-tw-border-opacity:1;border-color:hsl(var(--maz-contrast-600)/var(--maz-tw-border-opacity,1));--maz-tw-bg-opacity:1;background-color:hsl(var(--maz-contrast)/var(--maz-tw-bg-opacity,1));--maz-tw-text-opacity:1;color:hsl(var(--maz-contrast-foreground)/var(--maz-tw-text-opacity,1))}.maz-popover-enter-active[data-v-ea83582e],.maz-popover-leave-active[data-v-ea83582e]{transform-origin:var(--popover-origin,center);transition-property:all;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1)}.maz-popover-leave-to[data-v-ea83582e],.maz-popover-enter-from[data-v-ea83582e]{opacity:0;transform:scale(.95)translateY(-4px)}.m-popover-panel.--position-top[data-v-ea83582e],.m-popover-panel.--position-top-start[data-v-ea83582e],.m-popover-panel.--position-top-end[data-v-ea83582e]{--popover-origin:bottom center}.m-popover-panel.--position-bottom[data-v-ea83582e],.m-popover-panel.--position-bottom-start[data-v-ea83582e],.m-popover-panel.--position-bottom-end[data-v-ea83582e]{--popover-origin:top center}.m-popover-panel.--position-left[data-v-ea83582e],.m-popover-panel.--position-left-start[data-v-ea83582e],.m-popover-panel.--position-left-end[data-v-ea83582e]{--popover-origin:center right}.m-popover-panel.--position-right[data-v-ea83582e],.m-popover-panel.--position-right-start[data-v-ea83582e],.m-popover-panel.--position-right-end[data-v-ea83582e]{--popover-origin:center left}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.m-select-country[data-v-
|
|
1
|
+
.m-select-country[data-v-c5870457]{display:inline-flex;position:relative}.m-select-country__country-flag[data-v-c5870457]{z-index:4;cursor:pointer;border:none;outline:none;justify-content:center;align-items:center;margin:0;padding:0;display:flex;position:absolute;top:1.25rem;left:.813rem}.m-select-country__country-flag.--should-have-bottom-flag[data-v-c5870457]{bottom:2px}.m-select-country__select[data-v-c5870457] .m-input-label{padding:0!important}.m-select-country__select__item[data-v-c5870457]{text-overflow:ellipsis;white-space:nowrap;align-items:center;gap:.5rem;width:100%;font-size:.875rem;line-height:1.25rem;display:flex;overflow:hidden}.m-select-country__select__item__flag-container[data-v-c5870457]{justify-content:center;align-items:center;display:flex}.m-select-country__select__item__list-flag[data-v-c5870457]{--maz-tw-bg-opacity:1;background-color:hsl(var(--maz-primary-500)/var(--maz-tw-bg-opacity,1));width:1.25rem;height:1.25rem;color:hsl(var(--maz-primary-foreground)/.8);border-radius:9999px;justify-content:center;align-items:center;font-size:.75rem;line-height:1;display:flex}
|
|
@@ -4,7 +4,7 @@ import { u as useTranslations } from "./useTranslations.BXuww4ux.js";
|
|
|
4
4
|
import { i as isClient } from "./isClient.WI4oSt66.js";
|
|
5
5
|
import { useInstanceUniqId } from "../composables/useInstanceUniqId.js";
|
|
6
6
|
import MazPopover from "../components/MazPopover.js";
|
|
7
|
-
import '../assets/MazDropdown.C6vjLIeN.css';const _hoisted_1 = ["id", "aria-expanded"
|
|
7
|
+
import '../assets/MazDropdown.C6vjLIeN.css';const _hoisted_1 = ["id", "aria-expanded"], _hoisted_2 = ["id"], _hoisted_3 = ["id"], _hoisted_4 = ["onClick", "onKeypress"], _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
8
|
inheritAttrs: !1,
|
|
9
9
|
__name: "MazDropdown",
|
|
10
10
|
props: /* @__PURE__ */ mergeModels({
|
|
@@ -13,7 +13,7 @@ import '../assets/MazDropdown.C6vjLIeN.css';const _hoisted_1 = ["id", "aria-expa
|
|
|
13
13
|
class: {},
|
|
14
14
|
items: { default: () => [] },
|
|
15
15
|
id: {},
|
|
16
|
-
trigger: { default: "
|
|
16
|
+
trigger: { default: "adaptive" },
|
|
17
17
|
color: { default: "transparent" },
|
|
18
18
|
position: { default: "auto" },
|
|
19
19
|
preferPosition: { default: "bottom-start" },
|
|
@@ -103,23 +103,17 @@ import '../assets/MazDropdown.C6vjLIeN.css';const _hoisted_1 = ["id", "aria-expa
|
|
|
103
103
|
color: "background",
|
|
104
104
|
position: _ctx.position,
|
|
105
105
|
disabled: _ctx.disabled,
|
|
106
|
-
"keep-open-on-hover": _ctx.trigger === "hover",
|
|
106
|
+
"keep-open-on-hover": _ctx.trigger === "hover" || _ctx.trigger === "adaptive",
|
|
107
107
|
block: _ctx.block,
|
|
108
108
|
"onUpdate:modelValue": setDropdown
|
|
109
109
|
}, {
|
|
110
110
|
trigger: withCtx(({ toggle, close, isOpen, open }) => [
|
|
111
111
|
createElementVNode("div", {
|
|
112
112
|
id: unref(instanceId),
|
|
113
|
-
|
|
114
|
-
tabindex: "0",
|
|
113
|
+
tabindex: "-1",
|
|
115
114
|
class: "m-dropdown__wrapper",
|
|
116
115
|
"aria-expanded": modelValue.value,
|
|
117
|
-
"aria-haspopup": "menu"
|
|
118
|
-
onClick: withModifiers(toggle, ["stop"]),
|
|
119
|
-
onKeypress: [
|
|
120
|
-
withKeys(withModifiers(toggle, ["stop", "prevent"]), ["enter"]),
|
|
121
|
-
withKeys(withModifiers(toggle, ["stop", "prevent"]), ["space"])
|
|
122
|
-
]
|
|
116
|
+
"aria-haspopup": "menu"
|
|
123
117
|
}, [
|
|
124
118
|
createElementVNode("span", {
|
|
125
119
|
id: `${unref(instanceId)}-labelspan`,
|
|
@@ -140,7 +134,6 @@ import '../assets/MazDropdown.C6vjLIeN.css';const _hoisted_1 = ["id", "aria-expa
|
|
|
140
134
|
color: _ctx.color,
|
|
141
135
|
disabled: _ctx.disabled
|
|
142
136
|
}, _ctx.$attrs, {
|
|
143
|
-
tabindex: "-1",
|
|
144
137
|
block: _ctx.block,
|
|
145
138
|
size: _ctx.size
|
|
146
139
|
}), createSlots({
|
|
@@ -175,7 +168,7 @@ import '../assets/MazDropdown.C6vjLIeN.css';const _hoisted_1 = ["id", "aria-expa
|
|
|
175
168
|
} : void 0
|
|
176
169
|
]), 1040, ["aria-labelledby", "color", "disabled", "block", "size"])
|
|
177
170
|
])
|
|
178
|
-
],
|
|
171
|
+
], 8, _hoisted_1)
|
|
179
172
|
]),
|
|
180
173
|
default: withCtx(({ open, close, isOpen, toggle }) => [
|
|
181
174
|
createElementVNode("div", {
|
|
@@ -3,7 +3,7 @@ import { u as useTranslations } from "./useTranslations.BXuww4ux.js";
|
|
|
3
3
|
import { useInstanceUniqId } from "../composables/useInstanceUniqId.js";
|
|
4
4
|
import { getCountryCallingCode, getCountries, isSupportedCountry, getExampleNumber, parsePhoneNumberFromString, AsYouType } from "libphonenumber-js";
|
|
5
5
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper.B--vMWp3.js";
|
|
6
|
-
import '../assets/MazInputPhoneNumber.
|
|
6
|
+
import '../assets/MazInputPhoneNumber.C-Nw3080.css';const examples = ref();
|
|
7
7
|
function isCountryAvailable(locale) {
|
|
8
8
|
try {
|
|
9
9
|
const response = isSupportedCountry(locale);
|
|
@@ -209,7 +209,7 @@ const _hoisted_1 = { class: "m-input-phone-number__country-list-code" }, _sfc_ma
|
|
|
209
209
|
},
|
|
210
210
|
emits: ["update:model-value", "country-code", "update:country-code", "data"],
|
|
211
211
|
setup(__props, { emit: __emit }) {
|
|
212
|
-
const props = __props, emits = __emit, MazSelectCountry = defineAsyncComponent(() => import("../components/MazSelectCountry.js")), PhoneInput = defineAsyncComponent(() => import("./PhoneInput.
|
|
212
|
+
const props = __props, emits = __emit, MazSelectCountry = defineAsyncComponent(() => import("../components/MazSelectCountry.js")), PhoneInput = defineAsyncComponent(() => import("./PhoneInput.tDA-TWr5.js")), { fetchCountryCode: fetchCountryCode2, getBrowserLocale: getBrowserLocale2, getCountryList: getCountryList2 } = useMazInputPhoneNumber(), { isCountryAvailable: isCountryAvailable2, getPhoneNumberResults: getPhoneNumberResults2 } = useLibphonenumber(), instanceId = useInstanceUniqId({
|
|
213
213
|
componentName: "MazInputPhoneNumber",
|
|
214
214
|
providedId: props.id
|
|
215
215
|
}), phoneNumber = ref(), selectedCountry = ref(), { t } = useTranslations(), messages = computed(() => ({
|
|
@@ -394,7 +394,7 @@ const _hoisted_1 = { class: "m-input-phone-number__country-list-code" }, _sfc_ma
|
|
|
394
394
|
}), null, 16, ["id", "model-value", "color", "size", "auto-format", "example", "disabled", "has-radius", "success", "error", "locales", "label", "placeholder"])
|
|
395
395
|
], 6));
|
|
396
396
|
}
|
|
397
|
-
}), MazInputPhoneNumber = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
397
|
+
}), MazInputPhoneNumber = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-2c969ce1"]]);
|
|
398
398
|
export {
|
|
399
399
|
MazInputPhoneNumber as M,
|
|
400
400
|
useLibphonenumber as u
|
|
@@ -25,7 +25,7 @@ import '../assets/MazSwitch.Z1ZMm7tx.css';const _hoisted_1 = ["for", "aria-check
|
|
|
25
25
|
const props = __props, emits = __emit, instanceId = useInstanceUniqId({
|
|
26
26
|
componentName: "MazSwitch",
|
|
27
27
|
providedId: props.id
|
|
28
|
-
}), bgColorClassVar = computed(() => `hsl(var(--maz-${props.color})
|
|
28
|
+
}), bgColorClassVar = computed(() => `hsl(var(--maz-${props.color}))`);
|
|
29
29
|
function emit() {
|
|
30
30
|
emits("update:model-value", !props.modelValue), emits("change", !props.modelValue);
|
|
31
31
|
}
|
|
@@ -2,7 +2,7 @@ import { defineComponent, mergeModels, useModel, ref, computed, onMounted, watch
|
|
|
2
2
|
import { u as useTranslations } from "./useTranslations.BXuww4ux.js";
|
|
3
3
|
import { useInjectStrict } from "../composables/useInjectStrict.js";
|
|
4
4
|
import MazInput from "../components/MazInput.js";
|
|
5
|
-
import { u as useLibphonenumber } from "./MazInputPhoneNumber.
|
|
5
|
+
import { u as useLibphonenumber } from "./MazInputPhoneNumber.B7mxCHgU.js";
|
|
6
6
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper.B--vMWp3.js";
|
|
7
7
|
import '../assets/PhoneInput.CyWO76iq.css';const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
8
|
__name: "PhoneInput",
|
|
@@ -127,12 +127,24 @@ const en = {
|
|
|
127
127
|
lastPage: "Last Page, page {page}"
|
|
128
128
|
}
|
|
129
129
|
},
|
|
130
|
+
/**
|
|
131
|
+
* This is the translation for the carousel component.
|
|
132
|
+
* The keys are:
|
|
133
|
+
* - ariaLabel.previousButton: The aria-label for the previous button.
|
|
134
|
+
* - ariaLabel.nextButton: The aria-label for the next button.
|
|
135
|
+
*/
|
|
130
136
|
carousel: {
|
|
131
137
|
ariaLabel: {
|
|
132
138
|
previousButton: "Scroll to previous items",
|
|
133
139
|
nextButton: "Scroll to next items"
|
|
134
140
|
}
|
|
135
141
|
},
|
|
142
|
+
/**
|
|
143
|
+
* This is the translation for the checklist component.
|
|
144
|
+
* The keys are:
|
|
145
|
+
* - noResultsFound: The translation for the no results found text.
|
|
146
|
+
* - searchInput.placeholder: The translation for the search input placeholder.
|
|
147
|
+
*/
|
|
136
148
|
checklist: {
|
|
137
149
|
noResultsFound: "No results found",
|
|
138
150
|
searchInput: {
|
|
@@ -2,7 +2,7 @@ import { defineComponent, computed, ref, createElementBlock, openBlock, normaliz
|
|
|
2
2
|
import { MazCheck } from "@maz-ui/icons";
|
|
3
3
|
import { useInstanceUniqId } from "../composables/useInstanceUniqId.js";
|
|
4
4
|
import { _ as _export_sfc } from "../chunks/_plugin-vue_export-helper.B--vMWp3.js";
|
|
5
|
-
import '../assets/MazCheckbox.
|
|
5
|
+
import '../assets/MazCheckbox.BFo5eYS6.css';const _hoisted_1 = ["for", "tabindex", "aria-checked"], _hoisted_2 = ["id", "checked", "disabled", "name"], _hoisted_3 = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "m-checkbox__text"
|
|
8
8
|
}, _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -124,7 +124,7 @@ import '../assets/MazCheckbox.C_qIngLy.css';const _hoisted_1 = ["for", "tabindex
|
|
|
124
124
|
])) : createCommentVNode("", !0)
|
|
125
125
|
], 46, _hoisted_1));
|
|
126
126
|
}
|
|
127
|
-
}), MazCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
127
|
+
}), MazCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-588a1122"]]);
|
|
128
128
|
export {
|
|
129
129
|
MazCheckbox as default
|
|
130
130
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, defineAsyncComponent, computed, withDirectives, createElementBlock, openBlock, normalizeStyle, normalizeClass, createElementVNode, createCommentVNode, renderSlot, Fragment, renderList, mergeProps, createVNode, unref } from "vue";
|
|
2
2
|
import { d as directive } from "../chunks/lazy-img.directive.D5zCo3Zi.js";
|
|
3
3
|
import { _ as _export_sfc } from "../chunks/_plugin-vue_export-helper.B--vMWp3.js";
|
|
4
|
-
import '../assets/MazLazyImg.
|
|
4
|
+
import '../assets/MazLazyImg.NlPRN3Nk.css';const _hoisted_1 = ["data-lazy-srcset", "media"], _hoisted_2 = ["alt"], _hoisted_3 = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "m-lazy-img-component-loader"
|
|
7
7
|
}, _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -22,8 +22,8 @@ import '../assets/MazLazyImg.BNaVtpfX.css';const _hoisted_1 = ["data-lazy-srcset
|
|
|
22
22
|
block: { type: Boolean }
|
|
23
23
|
},
|
|
24
24
|
emits: ["intersecting", "loading", "loaded", "error"],
|
|
25
|
-
setup(__props) {
|
|
26
|
-
const props = __props, MazSpinner = defineAsyncComponent(() => import("./MazSpinner.js")), sources = computed(() => typeof props.src == "string" ? [{ srcset: props.src }] : props.src?.sources);
|
|
25
|
+
setup(__props, { emit: __emit }) {
|
|
26
|
+
const props = __props, emits = __emit, MazSpinner = defineAsyncComponent(() => import("./MazSpinner.js")), sources = computed(() => typeof props.src == "string" ? [{ srcset: props.src }] : props.src?.sources);
|
|
27
27
|
return (_ctx, _cache) => withDirectives((openBlock(), createElementBlock("picture", {
|
|
28
28
|
class: normalizeClass(["m-lazy-img-component m-reset-css", [{ "--use-loader": !_ctx.hideLoader, "--height-full": _ctx.imageHeightFull, "--block": _ctx.block }, props.class]]),
|
|
29
29
|
style: normalizeStyle(_ctx.style)
|
|
@@ -49,14 +49,14 @@ import '../assets/MazLazyImg.BNaVtpfX.css';const _hoisted_1 = ["data-lazy-srcset
|
|
|
49
49
|
observerOptions: _ctx.observerOptions,
|
|
50
50
|
fallbackSrc: _ctx.fallbackSrc,
|
|
51
51
|
observerOnce: _ctx.observerOnce,
|
|
52
|
-
onIntersecting: (el) =>
|
|
53
|
-
onLoading: (el) =>
|
|
54
|
-
onLoaded: (el) =>
|
|
55
|
-
onError: (el) =>
|
|
52
|
+
onIntersecting: (el) => emits("intersecting", el),
|
|
53
|
+
onLoading: (el) => emits("loading", el),
|
|
54
|
+
onLoaded: (el) => emits("loaded", el),
|
|
55
|
+
onError: (el) => emits("error", el)
|
|
56
56
|
}]
|
|
57
57
|
]);
|
|
58
58
|
}
|
|
59
|
-
}), MazLazyImg = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
59
|
+
}), MazLazyImg = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-e4f27ec0"]]);
|
|
60
60
|
export {
|
|
61
61
|
MazLazyImg as default
|
|
62
62
|
};
|
|
@@ -4,7 +4,7 @@ import { t as throttle } from "../chunks/throttle.DN8ARw0a.js";
|
|
|
4
4
|
import { useInstanceUniqId } from "../composables/useInstanceUniqId.js";
|
|
5
5
|
import { vClickOutside as directive } from "../directives/vClickOutside.js";
|
|
6
6
|
import { _ as _export_sfc } from "../chunks/_plugin-vue_export-helper.B--vMWp3.js";
|
|
7
|
-
import '../assets/MazPopover.
|
|
7
|
+
import '../assets/MazPopover.COR-tym7.css';const _hoisted_1 = ["id", "aria-expanded", "aria-haspopup", "aria-describedby", "aria-labelledby"], _hoisted_2 = ["id", "role", "aria-label", "aria-labelledby", "aria-describedby", "aria-modal", "tabindex", "aria-live"], _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
8
|
name: "MazPopover",
|
|
9
9
|
inheritAttrs: !1,
|
|
10
10
|
__name: "MazPopover",
|
|
@@ -48,14 +48,14 @@ import '../assets/MazPopover.Bth9NWia.css';const _hoisted_1 = ["id", "aria-expan
|
|
|
48
48
|
providedId: __props.id
|
|
49
49
|
}), attrs = useAttrs(), triggerElement = useTemplateRef("trigger"), panelElement = useTemplateRef("panel"), isOpen = useModel(__props, "modelValue"), computedPosition = ref(__props.position);
|
|
50
50
|
let openTimeout = null, closeTimeout = null, initialFocusElement = null, ignoreNextClickOutside = !1;
|
|
51
|
-
const panelId = computed(() => `${triggerId.value}-panel`), panelStyles = ref(), rootStyles = computed(() => attrs.style), triggerEvents = computed(() => {
|
|
52
|
-
if (__props.disabled ||
|
|
51
|
+
const panelId = computed(() => `${triggerId.value}-panel`), panelStyles = ref(), rootStyles = computed(() => attrs.style), isTouchDevice = computed(() => isClient() ? "ontouchstart" in window || navigator.maxTouchPoints > 0 : !1), effectiveTrigger = computed(() => __props.trigger === "adaptive" ? isTouchDevice.value ? "click" : "hover" : __props.trigger), triggerEvents = computed(() => {
|
|
52
|
+
if (__props.disabled || effectiveTrigger.value === "manual")
|
|
53
53
|
return {};
|
|
54
54
|
const events = {};
|
|
55
|
-
return
|
|
55
|
+
return effectiveTrigger.value === "hover" && (events.onMouseenter = () => {
|
|
56
56
|
clearCloseTimeout(), open();
|
|
57
|
-
}, events.onMouseleave = close),
|
|
58
|
-
}), panelEvents = computed(() =>
|
|
57
|
+
}, events.onMouseleave = close), effectiveTrigger.value === "click" && (events.onClick = toggle), events;
|
|
58
|
+
}), panelEvents = computed(() => effectiveTrigger.value !== "hover" ? {} : {
|
|
59
59
|
onMouseenter: () => {
|
|
60
60
|
__props.keepOpenOnHover && clearCloseTimeout();
|
|
61
61
|
},
|
|
@@ -111,9 +111,9 @@ import '../assets/MazPopover.Bth9NWia.css';const _hoisted_1 = ["id", "aria-expan
|
|
|
111
111
|
}, __props.delay) : setOpen(!0));
|
|
112
112
|
}
|
|
113
113
|
function close() {
|
|
114
|
-
clearOpenTimeout(), __props.delay > 0 &&
|
|
114
|
+
clearOpenTimeout(), __props.delay > 0 && effectiveTrigger.value === "hover" ? closeTimeout = setTimeout(() => {
|
|
115
115
|
setOpen(!1);
|
|
116
|
-
}, __props.delay) :
|
|
116
|
+
}, __props.delay) : effectiveTrigger.value === "hover" && __props.keepOpenOnHover ? closeTimeout = setTimeout(() => {
|
|
117
117
|
setOpen(!1);
|
|
118
118
|
}, __props.hoverDelay) : setOpen(!1);
|
|
119
119
|
}
|
|
@@ -204,7 +204,7 @@ import '../assets/MazPopover.Bth9NWia.css';const _hoisted_1 = ["id", "aria-expan
|
|
|
204
204
|
return { top, left };
|
|
205
205
|
}
|
|
206
206
|
function setupFocusTrap() {
|
|
207
|
-
__props.role === "tooltip" || __props.role === "menu" ||
|
|
207
|
+
__props.role === "tooltip" || __props.role === "menu" || effectiveTrigger.value === "hover" || !__props.trapFocus || (initialFocusElement = document.activeElement, nextTick(() => {
|
|
208
208
|
const focusableElements = panelElement.value?.querySelectorAll(
|
|
209
209
|
'a[href], button, textarea, input[type="text"], input[type="radio"], input[type="checkbox"], select, [tabindex]:not([tabindex="-1"])'
|
|
210
210
|
);
|
|
@@ -212,7 +212,7 @@ import '../assets/MazPopover.Bth9NWia.css';const _hoisted_1 = ["id", "aria-expan
|
|
|
212
212
|
}));
|
|
213
213
|
}
|
|
214
214
|
function restoreFocus() {
|
|
215
|
-
__props.role === "tooltip" || __props.role === "menu" ||
|
|
215
|
+
__props.role === "tooltip" || __props.role === "menu" || effectiveTrigger.value === "hover" || !__props.trapFocus || nextTick(() => {
|
|
216
216
|
initialFocusElement?.focus({ preventScroll: !0 });
|
|
217
217
|
});
|
|
218
218
|
}
|
|
@@ -231,7 +231,7 @@ import '../assets/MazPopover.Bth9NWia.css';const _hoisted_1 = ["id", "aria-expan
|
|
|
231
231
|
event.shiftKey ? document.activeElement === firstElement && (event.preventDefault(), lastElement.focus()) : document.activeElement === lastElement && (event.preventDefault(), firstElement.focus());
|
|
232
232
|
}
|
|
233
233
|
function onClickOutside(event) {
|
|
234
|
-
if (
|
|
234
|
+
if (effectiveTrigger.value !== "manual") {
|
|
235
235
|
if (ignoreNextClickOutside) {
|
|
236
236
|
ignoreNextClickOutside = !1;
|
|
237
237
|
return;
|
|
@@ -300,6 +300,7 @@ import '../assets/MazPopover.Bth9NWia.css';const _hoisted_1 = ["id", "aria-expan
|
|
|
300
300
|
createElementVNode("div", mergeProps({
|
|
301
301
|
id: unref(triggerId),
|
|
302
302
|
ref: "trigger",
|
|
303
|
+
role: "button",
|
|
303
304
|
class: "m-popover-trigger",
|
|
304
305
|
"aria-expanded": _ctx.role === "dialog" || _ctx.role === "menu" ? isOpen.value : void 0,
|
|
305
306
|
"aria-haspopup": _ctx.role === "dialog" ? "dialog" : void 0,
|
|
@@ -351,7 +352,7 @@ import '../assets/MazPopover.Bth9NWia.css';const _hoisted_1 = ["id", "aria-expan
|
|
|
351
352
|
], 8, ["to", "disabled"]))
|
|
352
353
|
], 6));
|
|
353
354
|
}
|
|
354
|
-
}), MazPopover = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
355
|
+
}), MazPopover = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ea83582e"]]);
|
|
355
356
|
export {
|
|
356
357
|
MazPopover as default
|
|
357
358
|
};
|
|
@@ -6,7 +6,7 @@ import { useDisplayNames } from "../composables/useDisplayNames.js";
|
|
|
6
6
|
import { useInstanceUniqId } from "../composables/useInstanceUniqId.js";
|
|
7
7
|
import MazSelect from "./MazSelect.js";
|
|
8
8
|
import { _ as _export_sfc } from "../chunks/_plugin-vue_export-helper.B--vMWp3.js";
|
|
9
|
-
import '../assets/MazSelectCountry.
|
|
9
|
+
import '../assets/MazSelectCountry.9RTcDxtM.css';function getBrowserLocale() {
|
|
10
10
|
try {
|
|
11
11
|
return isServer() ? void 0 : window.navigator.language;
|
|
12
12
|
} catch (error) {
|
|
@@ -188,7 +188,7 @@ const _hoisted_1 = {
|
|
|
188
188
|
}, 16, ["id", "model-value", "option-value-key", "option-label-key", "option-input-value-key", "max-list-width", "min-list-width", "disabled", "color", "placeholder", "label", "size", "list-position", "error", "warning", "success", "search", "block", "autocomplete", "item-height", "max-list-height", "min-list-height", "required", "search-function", "format-input-value", "display-code", "search-placeholder", "search-threshold", "options", "hint"])
|
|
189
189
|
], 6));
|
|
190
190
|
}
|
|
191
|
-
}), MazSelectCountry = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
191
|
+
}), MazSelectCountry = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-c5870457"]]);
|
|
192
192
|
export {
|
|
193
193
|
MazSelectCountry as default
|
|
194
194
|
};
|
package/dist/components/index.js
CHANGED
|
@@ -18,7 +18,7 @@ import { M } from "../chunks/MazDatePicker.CT5yJhSN.js";
|
|
|
18
18
|
import { default as default17 } from "./MazDialog.js";
|
|
19
19
|
import { _ as _2, u } from "../chunks/MazDialogPromise.vue_vue_type_script_setup_true_lang.BQvDEofz.js";
|
|
20
20
|
import { default as default18 } from "./MazDrawer.js";
|
|
21
|
-
import { _ as _3 } from "../chunks/MazDropdown.vue_vue_type_style_index_0_lang.
|
|
21
|
+
import { _ as _3 } from "../chunks/MazDropdown.vue_vue_type_style_index_0_lang.De5b1GG8.js";
|
|
22
22
|
import { default as default19 } from "./MazDropzone.js";
|
|
23
23
|
import { default as default20 } from "./MazExpandAnimation.js";
|
|
24
24
|
import { default as default21 } from "./MazFullscreenLoader.js";
|
|
@@ -27,7 +27,7 @@ import { default as default23 } from "./MazIcon.js";
|
|
|
27
27
|
import { default as default24 } from "./MazInput.js";
|
|
28
28
|
import { default as default25 } from "./MazInputCode.js";
|
|
29
29
|
import { _ as _4 } from "../chunks/MazInputNumber.vue_vue_type_style_index_0_lang.B6DYpHfi.js";
|
|
30
|
-
import { M as M2 } from "../chunks/MazInputPhoneNumber.
|
|
30
|
+
import { M as M2 } from "../chunks/MazInputPhoneNumber.B7mxCHgU.js";
|
|
31
31
|
import { _ as _5 } from "../chunks/MazInputPrice.vue_vue_type_script_setup_true_lang.GMKzSu7R.js";
|
|
32
32
|
import { default as default26 } from "./MazInputTags.js";
|
|
33
33
|
import { default as default27 } from "./MazLazyImg.js";
|
|
@@ -44,7 +44,7 @@ import { default as default37 } from "./MazSelectCountry.js";
|
|
|
44
44
|
import { default as default38 } from "./MazSlider.js";
|
|
45
45
|
import { default as default39 } from "./MazSpinner.js";
|
|
46
46
|
import { default as default40 } from "./MazStepper.js";
|
|
47
|
-
import { _ as _6 } from "../chunks/MazSwitch.vue_vue_type_style_index_0_lang.
|
|
47
|
+
import { _ as _6 } from "../chunks/MazSwitch.vue_vue_type_style_index_0_lang.DQE0vFhe.js";
|
|
48
48
|
import { default as default41 } from "./MazTable.js";
|
|
49
49
|
import { default as default42 } from "./MazTableCell.js";
|
|
50
50
|
import { default as default43 } from "./MazTableRow.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { inject } from "vue";
|
|
2
|
-
function useInjectStrict(key, fallback) {
|
|
2
|
+
function useInjectStrict(key, fallback, errorMessage) {
|
|
3
3
|
const resolved = inject(key, fallback);
|
|
4
4
|
if (!resolved)
|
|
5
|
-
throw new TypeError(`[maz-ui](injectStrict) Could not resolve ${key.toString()}`);
|
|
5
|
+
throw new TypeError(errorMessage || `[maz-ui](injectStrict) Could not resolve ${key.toString()}`);
|
|
6
6
|
return resolved;
|
|
7
7
|
}
|
|
8
8
|
export {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useInjectStrict } from "./useInjectStrict.js";
|
|
2
2
|
function useToast() {
|
|
3
|
-
const toast = useInjectStrict("mazToast");
|
|
3
|
+
const toast = useInjectStrict("mazToast", void 0, "[maz-ui](useToast) ToastPlugin is not installed");
|
|
4
4
|
return {
|
|
5
5
|
message: toast.message.bind(toast),
|
|
6
6
|
success: toast.success.bind(toast),
|
|
@@ -117,7 +117,7 @@ const directive = {
|
|
|
117
117
|
globalHandler && globalHandler.unmount(el);
|
|
118
118
|
}
|
|
119
119
|
}, plugin = {
|
|
120
|
-
install: (app, options
|
|
120
|
+
install: (app, options) => {
|
|
121
121
|
const handler = new TooltipHandler(options);
|
|
122
122
|
app.directive("tooltip", {
|
|
123
123
|
beforeMount: handler.mount.bind(handler),
|
package/dist/plugins/maz-ui.js
CHANGED
|
@@ -260,8 +260,7 @@ function injectThemeCSS(finalPreset, config) {
|
|
|
260
260
|
if (typeof document > "u")
|
|
261
261
|
return;
|
|
262
262
|
const cssOptions = {
|
|
263
|
-
mode: "both"
|
|
264
|
-
prefix: config.prefix
|
|
263
|
+
mode: config.colorMode === "auto" ? "both" : config.colorMode
|
|
265
264
|
};
|
|
266
265
|
if (config.injectCriticalCSS) {
|
|
267
266
|
const criticalCSS = generateCriticalCSS(finalPreset, cssOptions);
|
|
@@ -284,7 +283,6 @@ const MazUiTheme = {
|
|
|
284
283
|
strategy: "runtime",
|
|
285
284
|
darkModeStrategy: "class",
|
|
286
285
|
colorMode: "auto",
|
|
287
|
-
prefix: "maz",
|
|
288
286
|
injectCriticalCSS: !0,
|
|
289
287
|
injectFullCSS: !0,
|
|
290
288
|
...options
|
|
@@ -311,7 +309,7 @@ const MazUiTheme = {
|
|
|
311
309
|
themeState.currentPreset = finalPreset, config.strategy !== "buildtime" && injectThemeCSS(finalPreset, config);
|
|
312
310
|
}
|
|
313
311
|
}, defaultLocaleLoaders = {
|
|
314
|
-
en: () => import("../chunks/en.
|
|
312
|
+
en: () => import("../chunks/en.Q_4-KljL.js"),
|
|
315
313
|
fr: () => import("../chunks/fr.BVPG-7Dk.js"),
|
|
316
314
|
es: () => import("../chunks/es.BV1TlfTw.js"),
|
|
317
315
|
de: () => import("../chunks/de.B15Maq8Z.js"),
|
|
@@ -399,68 +397,9 @@ const MazTranslations = {
|
|
|
399
397
|
return app.config.globalProperties.$mazTranslations = i18n, app.provide("mazTranslations", i18n), i18n;
|
|
400
398
|
}
|
|
401
399
|
}, MazUi = {
|
|
402
|
-
|
|
403
|
-
async install(app, options = {}) {
|
|
400
|
+
install(app, options = {}) {
|
|
404
401
|
const { theme, translations } = options;
|
|
405
402
|
app.use(MazUiTheme, theme), app.use(MazTranslations, translations);
|
|
406
|
-
const pluginPromises = [];
|
|
407
|
-
if (options.plugins?.dialog) {
|
|
408
|
-
const dialogOptions = typeof options.plugins.dialog == "boolean" ? void 0 : options.plugins.dialog;
|
|
409
|
-
pluginPromises.push(
|
|
410
|
-
import("./dialog.js").then(({ DialogPlugin }) => {
|
|
411
|
-
app.use(DialogPlugin, dialogOptions);
|
|
412
|
-
})
|
|
413
|
-
);
|
|
414
|
-
}
|
|
415
|
-
if (options.plugins?.toast) {
|
|
416
|
-
const toastOptions = typeof options.plugins.toast == "boolean" ? void 0 : options.plugins.toast;
|
|
417
|
-
pluginPromises.push(
|
|
418
|
-
import("./toast.js").then(({ ToastPlugin }) => {
|
|
419
|
-
app.use(ToastPlugin, toastOptions);
|
|
420
|
-
})
|
|
421
|
-
);
|
|
422
|
-
}
|
|
423
|
-
if (options.plugins?.wait && pluginPromises.push(
|
|
424
|
-
import("./wait.js").then(({ WaitPlugin }) => {
|
|
425
|
-
app.use(WaitPlugin);
|
|
426
|
-
})
|
|
427
|
-
), options.plugins?.aos) {
|
|
428
|
-
const aosOptions = typeof options.plugins.aos == "boolean" ? void 0 : options.plugins.aos;
|
|
429
|
-
pluginPromises.push(
|
|
430
|
-
import("./aos.js").then(({ AosPlugin }) => {
|
|
431
|
-
app.use(AosPlugin, aosOptions);
|
|
432
|
-
})
|
|
433
|
-
);
|
|
434
|
-
}
|
|
435
|
-
if (options.directives?.vTooltip) {
|
|
436
|
-
const vTooltipOptions = typeof options.directives.vTooltip == "boolean" ? void 0 : options.directives.vTooltip;
|
|
437
|
-
pluginPromises.push(
|
|
438
|
-
import("../directives/vTooltip.js").then(({ vTooltipInstall }) => {
|
|
439
|
-
app.use(vTooltipInstall, vTooltipOptions);
|
|
440
|
-
})
|
|
441
|
-
);
|
|
442
|
-
}
|
|
443
|
-
if (options.directives?.vLazyImg) {
|
|
444
|
-
const vLazyImgOptions = typeof options.directives.vLazyImg == "boolean" ? void 0 : options.directives.vLazyImg;
|
|
445
|
-
pluginPromises.push(
|
|
446
|
-
import("../directives/vLazyImg.js").then(({ vLazyImgInstall }) => {
|
|
447
|
-
app.use(vLazyImgInstall, vLazyImgOptions);
|
|
448
|
-
})
|
|
449
|
-
);
|
|
450
|
-
}
|
|
451
|
-
options.directives?.vClickOutside && pluginPromises.push(
|
|
452
|
-
import("../directives/vClickOutside.js").then(({ vClickOutsideInstall }) => {
|
|
453
|
-
app.use(vClickOutsideInstall);
|
|
454
|
-
})
|
|
455
|
-
), options.directives?.vFullscreenImg && pluginPromises.push(
|
|
456
|
-
import("../directives/vFullscreenImg.js").then(({ vFullscreenImgInstall }) => {
|
|
457
|
-
app.use(vFullscreenImgInstall);
|
|
458
|
-
})
|
|
459
|
-
), options.directives?.vZoomImg && pluginPromises.push(
|
|
460
|
-
import("../directives/vZoomImg.js").then(({ vZoomImgInstall }) => {
|
|
461
|
-
app.use(vZoomImgInstall);
|
|
462
|
-
})
|
|
463
|
-
), await Promise.all(pluginPromises);
|
|
464
403
|
}
|
|
465
404
|
};
|
|
466
405
|
export {
|
|
@@ -249,11 +249,11 @@ declare function __VLS_template(): {
|
|
|
249
249
|
$data: {};
|
|
250
250
|
$props: {
|
|
251
251
|
readonly modelValue?: boolean | undefined;
|
|
252
|
-
readonly position?: import('./MazPopover.vue').
|
|
253
|
-
readonly preferPosition?: import('./MazPopover.vue').
|
|
254
|
-
readonly fallbackPosition?: import('./MazPopover.vue').
|
|
255
|
-
readonly trigger?: import('./MazPopover.vue').
|
|
256
|
-
readonly role?: import('./MazPopover.vue').
|
|
252
|
+
readonly position?: import('./MazPopover.vue').MazPopoverPosition | undefined;
|
|
253
|
+
readonly preferPosition?: import('./MazPopover.vue').MazPopoverPosition | undefined;
|
|
254
|
+
readonly fallbackPosition?: import('./MazPopover.vue').MazPopoverPosition | undefined;
|
|
255
|
+
readonly trigger?: import('./MazPopover.vue').MazPopoverTrigger | undefined;
|
|
256
|
+
readonly role?: import('./MazPopover.vue').MazPopoverRole | undefined;
|
|
257
257
|
readonly ariaLabel?: string | undefined;
|
|
258
258
|
readonly announceChanges?: boolean | undefined;
|
|
259
259
|
readonly disabled?: boolean | undefined;
|
|
@@ -407,7 +407,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
407
407
|
hideHeader: boolean;
|
|
408
408
|
inputFormat: Intl.DateTimeFormatOptions;
|
|
409
409
|
autoClose: boolean;
|
|
410
|
-
pickerPosition: import('./MazPopover.vue').
|
|
410
|
+
pickerPosition: import('./MazPopover.vue').MazPopoverPosition;
|
|
411
411
|
onlyTime: boolean;
|
|
412
412
|
useBrowserLocale: boolean;
|
|
413
413
|
fetchLocal: boolean;
|
|
@@ -417,11 +417,11 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
417
417
|
$data: {};
|
|
418
418
|
$props: {
|
|
419
419
|
readonly modelValue?: boolean | undefined;
|
|
420
|
-
readonly position?: import('./MazPopover.vue').
|
|
421
|
-
readonly preferPosition?: import('./MazPopover.vue').
|
|
422
|
-
readonly fallbackPosition?: import('./MazPopover.vue').
|
|
423
|
-
readonly trigger?: import('./MazPopover.vue').
|
|
424
|
-
readonly role?: import('./MazPopover.vue').
|
|
420
|
+
readonly position?: import('./MazPopover.vue').MazPopoverPosition | undefined;
|
|
421
|
+
readonly preferPosition?: import('./MazPopover.vue').MazPopoverPosition | undefined;
|
|
422
|
+
readonly fallbackPosition?: import('./MazPopover.vue').MazPopoverPosition | undefined;
|
|
423
|
+
readonly trigger?: import('./MazPopover.vue').MazPopoverTrigger | undefined;
|
|
424
|
+
readonly role?: import('./MazPopover.vue').MazPopoverRole | undefined;
|
|
425
425
|
readonly ariaLabel?: string | undefined;
|
|
426
426
|
readonly announceChanges?: boolean | undefined;
|
|
427
427
|
readonly disabled?: boolean | undefined;
|