@ozdao/prometheus-framework 0.2.200 → 0.2.201
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +133 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs.map +1 -0
- package/dist/prometheus-framework/src/components/Button/Button.vue2.js +82 -44
- package/dist/prometheus-framework/src/components/Button/Button.vue2.js.map +1 -0
- package/dist/prometheus-framework/src/components/Chips/Chips.vue.cjs +32 -1
- package/dist/prometheus-framework/src/components/Chips/Chips.vue.cjs.map +1 -0
- package/dist/prometheus-framework/src/components/Chips/Chips.vue.js +20 -14
- package/dist/prometheus-framework/src/components/Chips/Chips.vue.js.map +1 -0
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs +64 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs.map +1 -0
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +45 -38
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js.map +1 -0
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +121 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs.map +1 -0
- package/dist/prometheus-framework/src/components/Field/Field.vue2.js +97 -76
- package/dist/prometheus-framework/src/components/Field/Field.vue2.js.map +1 -0
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +92 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs.map +1 -0
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +69 -54
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js.map +1 -0
- package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +127 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs.map +1 -0
- package/dist/prometheus-framework/src/components/Select/Select.vue2.js +75 -51
- package/dist/prometheus-framework/src/components/Select/Select.vue2.js.map +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/layouts/Auth.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/layouts/Auth.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterCode.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterCode.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterPassword.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterPassword.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/Invite.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/Invite.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignUp.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignUp.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +5 -5
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +5 -5
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockSearch.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockSearch.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/Header.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/Header.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/NavigationBar.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/NavigationBar.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +4 -4
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +4 -4
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +4 -4
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +6 -6
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +6 -6
- package/dist/prometheus-framework/src/modules/pages/views/components/blocks/CardPage.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/pages/views/components/blocks/CardPage.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/pages/views/components/pages/PageEdit.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/pages/views/components/pages/PageEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/pages/views/components/partials/SidebarPages.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/pages/views/components/partials/SidebarPages.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.cjs +4 -4
- package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +5 -5
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +5 -5
- package/package.json +1 -1
@@ -1 +1,121 @@
|
|
1
|
-
"use strict";
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
3
|
+
const vue = require("vue");
|
4
|
+
;/* empty css */
|
5
|
+
const _pluginVue_exportHelper = require("../../../../_virtual/_plugin-vue_export-helper.cjs");
|
6
|
+
const _hoisted_1 = {
|
7
|
+
key: 0,
|
8
|
+
class: "t-transp mn-r-small"
|
9
|
+
};
|
10
|
+
const _hoisted_2 = { class: "w-100" };
|
11
|
+
const _hoisted_3 = ["type", "value", "placeholder", "tabindex", "disabled"];
|
12
|
+
const _hoisted_4 = ["value", "placeholder", "tabindex", "disabled"];
|
13
|
+
const _hoisted_5 = {
|
14
|
+
key: 1,
|
15
|
+
class: "t-transp mn-l-small"
|
16
|
+
};
|
17
|
+
const _hoisted_6 = {
|
18
|
+
key: 0,
|
19
|
+
class: "mn-t-thin mn-b-thin mn-b-thin invalid-feedback"
|
20
|
+
};
|
21
|
+
const _sfc_main = {
|
22
|
+
__name: "Field",
|
23
|
+
props: {
|
24
|
+
label: null,
|
25
|
+
symbol: null,
|
26
|
+
type: "text",
|
27
|
+
placeholder: "Enter something here",
|
28
|
+
field: null,
|
29
|
+
value: null,
|
30
|
+
validation: false,
|
31
|
+
disabled: null,
|
32
|
+
tabindex: -1
|
33
|
+
},
|
34
|
+
emits: ["update:field", "focus", "blur"],
|
35
|
+
setup(__props, { emit: __emit }) {
|
36
|
+
const emit = __emit;
|
37
|
+
const props = __props;
|
38
|
+
if (props.value) {
|
39
|
+
emit("update:field", props.value);
|
40
|
+
}
|
41
|
+
const textarea = vue.ref(null);
|
42
|
+
function resize() {
|
43
|
+
var _a;
|
44
|
+
if (textarea.value) textarea.value.style.height = "1rem";
|
45
|
+
if (textarea.value) textarea.value.style.height = ((_a = textarea.value) == null ? void 0 : _a.scrollHeight) + "px";
|
46
|
+
}
|
47
|
+
vue.onUpdated(() => {
|
48
|
+
if (props.type === "textarea") vue.nextTick(() => {
|
49
|
+
{
|
50
|
+
focus();
|
51
|
+
}
|
52
|
+
});
|
53
|
+
resize();
|
54
|
+
});
|
55
|
+
vue.onMounted(() => {
|
56
|
+
if (props.type === "textarea") vue.nextTick(() => {
|
57
|
+
{
|
58
|
+
focus();
|
59
|
+
}
|
60
|
+
});
|
61
|
+
resize();
|
62
|
+
});
|
63
|
+
const text = vue.ref(props.field);
|
64
|
+
return (_ctx, _cache) => {
|
65
|
+
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
66
|
+
vue.createElementVNode("div", {
|
67
|
+
class: vue.normalizeClass([[
|
68
|
+
_ctx.$attrs.class,
|
69
|
+
{
|
70
|
+
"bg-fourth-nano": __props.validation
|
71
|
+
}
|
72
|
+
], "flex-center flex-nowrap flex"])
|
73
|
+
}, [
|
74
|
+
__props.label ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
75
|
+
vue.createElementVNode("span", null, vue.toDisplayString(__props.label), 1)
|
76
|
+
])) : vue.createCommentVNode("", true),
|
77
|
+
vue.createElementVNode("div", _hoisted_2, [
|
78
|
+
__props.type !== "textarea" ? (vue.openBlock(), vue.createElementBlock("input", {
|
79
|
+
key: 0,
|
80
|
+
onInput: _cache[0] || (_cache[0] = (event) => text.value = emit("update:field", event.target.value)),
|
81
|
+
onFocus: _cache[1] || (_cache[1] = (event) => emit("focus", event)),
|
82
|
+
onBlur: _cache[2] || (_cache[2] = (event) => emit("blur", event)),
|
83
|
+
type: __props.type,
|
84
|
+
class: "w-100",
|
85
|
+
value: __props.field,
|
86
|
+
placeholder: __props.placeholder,
|
87
|
+
tabindex: __props.tabindex,
|
88
|
+
disabled: __props.disabled
|
89
|
+
}, null, 40, _hoisted_3)) : (vue.openBlock(), vue.createElementBlock("textarea", {
|
90
|
+
key: 1,
|
91
|
+
ref_key: "textarea",
|
92
|
+
ref: textarea,
|
93
|
+
onInput: _cache[3] || (_cache[3] = (event) => text.value = emit("update:field", event.target.value)),
|
94
|
+
onFocus: _cache[4] || (_cache[4] = (event) => emit("focus", event)),
|
95
|
+
onBlur: _cache[5] || (_cache[5] = (event) => emit("blur", event)),
|
96
|
+
class: "w-100",
|
97
|
+
style: { "resize": "vertical" },
|
98
|
+
value: __props.field,
|
99
|
+
placeholder: __props.placeholder,
|
100
|
+
tabindex: __props.tabindex,
|
101
|
+
disabled: __props.disabled
|
102
|
+
}, null, 40, _hoisted_4))
|
103
|
+
]),
|
104
|
+
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true),
|
105
|
+
__props.symbol ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5, [
|
106
|
+
vue.createElementVNode("span", null, vue.toDisplayString(__props.symbol), 1)
|
107
|
+
])) : vue.createCommentVNode("", true)
|
108
|
+
], 2),
|
109
|
+
vue.createVNode(vue.Transition, { name: "fade" }, {
|
110
|
+
default: vue.withCtx(() => [
|
111
|
+
__props.validation ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6, " * " + vue.toDisplayString(__props.validation.message), 1)) : vue.createCommentVNode("", true)
|
112
|
+
]),
|
113
|
+
_: 1
|
114
|
+
})
|
115
|
+
], 64);
|
116
|
+
};
|
117
|
+
}
|
118
|
+
};
|
119
|
+
const Field = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-5659d4ce"]]);
|
120
|
+
exports.default = Field;
|
121
|
+
//# sourceMappingURL=Field.vue2.cjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Field.vue2.cjs","sources":["../../../../../src/components/Field/Field.vue"],"sourcesContent":["<script setup>\n import { ref, computed, onUpdated, onMounted, nextTick } from 'vue'\n\n const emit = defineEmits(['update:field', 'focus', 'blur']);\n\n const props = defineProps({\n label: null,\n symbol: null,\n type: 'text',\n placeholder: 'Enter something here',\n field: null,\n value: null,\n validation: false,\n disabled: null,\n tabindex: -1\n });\n\n if (props.value) {\n emit('update:field', props.value)\n }\n\n const textarea = ref(null);\n\n function resize() {\n if (textarea.value) textarea.value.style.height = \"1rem\";\n if (textarea.value) textarea.value.style.height = textarea.value?.scrollHeight + \"px\";\n }\n\n\n onUpdated(() => {\n if (props.type === 'textarea') nextTick(() => { { focus()} })\n resize()\n });\n\n onMounted(() => {\n if (props.type === 'textarea') nextTick(() => { { focus()} })\n resize()\n });\n\n const text = ref(props.field);\n</script>\n\n<template>\n <div \n :class=\"[\n $attrs.class, \n { \n 'bg-fourth-nano': validation \n }\n ]\" \n class=\"flex-center flex-nowrap flex\"\n >\n <div \n v-if=\"label\" \n class=\"t-transp mn-r-small\"\n >\n <span>\n {{label}}\n </span>\n </div>\n\n <div class=\"w-100\">\n <input \n v-if=\"type !== 'textarea'\"\n @input=\"event => text = emit('update:field', event.target.value)\"\n @focus=\"event => emit('focus', event)\"\n @blur=\"event => emit('blur', event)\"\n :type=\"type\"\n class=\"w-100\"\n :value=\"field\"\n :placeholder=\"placeholder\"\n :tabindex=\"tabindex\"\n :disabled=\"disabled\"\n />\n <textarea \n v-else\n ref=\"textarea\"\n @input=\"event => text = emit('update:field', event.target.value)\"\n @focus=\"event => emit('focus', event)\"\n @blur=\"event => emit('blur', event)\"\n class=\"w-100\"\n style=\"resize: vertical;\"\n :value=\"field\"\n :placeholder=\"placeholder\"\n :tabindex=\"tabindex\"\n :disabled=\"disabled\"\n />\n </div> \n\n <slot></slot>\n\n <div \n v-if=\"symbol\" \n class=\"t-transp mn-l-small\"\n >\n <span>\n {{symbol}}\n </span>\n </div>\n </div>\n\n <!-- Validation -->\n <transition name=\"fade\">\n <div v-if=\"validation\" class=\"mn-t-thin mn-b-thin mn-b-thin invalid-feedback\">\n * {{validation.message}}\n </div>\n </transition>\n</template>\n\n<style lang=\"scss\" scoped>\n input, textarea, span {\n line-height: 1;\n color: inherit;\n }\n</style>"],"names":["ref","onUpdated","nextTick","onMounted"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGE,UAAM,OAAO;AAEb,UAAM,QAAQ;AAYd,QAAI,MAAM,OAAO;AACf,WAAK,gBAAgB,MAAM,KAAK;AAAA,IACjC;AAED,UAAM,WAAWA,QAAI,IAAI;AAEzB,aAAS,SAAS;;AAChB,UAAI,SAAS,MAAO,UAAS,MAAM,MAAM,SAAS;AAClD,UAAI,SAAS,MAAO,UAAS,MAAM,MAAM,WAAS,cAAS,UAAT,mBAAgB,gBAAe;AAAA,IAClF;AAGDC,QAAAA,UAAU,MAAM;AACf,UAAI,MAAM,SAAS,WAAYC,KAAAA,SAAS,MAAM;AAAG;AAAE,gBAAO;AAAA,QAAA;AAAA,OAAG;AAC5D,aAAQ;AAAA,IACZ,CAAG;AAEDC,QAAAA,UAAU,MAAM;AACd,UAAI,MAAM,SAAS,WAAYD,KAAAA,SAAS,MAAM;AAAG;AAAE,gBAAO;AAAA,QAAA;AAAA,OAAG;AAC7D,aAAQ;AAAA,IACZ,CAAG;AAED,UAAM,OAAOF,IAAAA,IAAI,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -1,16 +1,22 @@
|
|
1
|
-
import { ref
|
1
|
+
import { ref, onUpdated, nextTick, onMounted, openBlock, createElementBlock, Fragment, createElementVNode, normalizeClass, toDisplayString, createCommentVNode, renderSlot, createVNode, Transition, withCtx } from "vue";
|
2
2
|
/* empty css */
|
3
|
-
import
|
4
|
-
const
|
3
|
+
import _export_sfc from "../../../../_virtual/_plugin-vue_export-helper.js";
|
4
|
+
const _hoisted_1 = {
|
5
5
|
key: 0,
|
6
6
|
class: "t-transp mn-r-small"
|
7
|
-
}
|
7
|
+
};
|
8
|
+
const _hoisted_2 = { class: "w-100" };
|
9
|
+
const _hoisted_3 = ["type", "value", "placeholder", "tabindex", "disabled"];
|
10
|
+
const _hoisted_4 = ["value", "placeholder", "tabindex", "disabled"];
|
11
|
+
const _hoisted_5 = {
|
8
12
|
key: 1,
|
9
13
|
class: "t-transp mn-l-small"
|
10
|
-
}
|
14
|
+
};
|
15
|
+
const _hoisted_6 = {
|
11
16
|
key: 0,
|
12
17
|
class: "mn-t-thin mn-b-thin mn-b-thin invalid-feedback"
|
13
|
-
}
|
18
|
+
};
|
19
|
+
const _sfc_main = {
|
14
20
|
__name: "Field",
|
15
21
|
props: {
|
16
22
|
label: null,
|
@@ -19,82 +25,97 @@ const C = {
|
|
19
25
|
placeholder: "Enter something here",
|
20
26
|
field: null,
|
21
27
|
value: null,
|
22
|
-
validation:
|
28
|
+
validation: false,
|
23
29
|
disabled: null,
|
24
30
|
tabindex: -1
|
25
31
|
},
|
26
32
|
emits: ["update:field", "focus", "blur"],
|
27
|
-
setup(
|
28
|
-
const
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
var u;
|
33
|
-
n.value && (n.value.style.height = "1rem"), n.value && (n.value.style.height = ((u = n.value) == null ? void 0 : u.scrollHeight) + "px");
|
33
|
+
setup(__props, { emit: __emit }) {
|
34
|
+
const emit = __emit;
|
35
|
+
const props = __props;
|
36
|
+
if (props.value) {
|
37
|
+
emit("update:field", props.value);
|
34
38
|
}
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
39
|
+
const textarea = ref(null);
|
40
|
+
function resize() {
|
41
|
+
var _a;
|
42
|
+
if (textarea.value) textarea.value.style.height = "1rem";
|
43
|
+
if (textarea.value) textarea.value.style.height = ((_a = textarea.value) == null ? void 0 : _a.scrollHeight) + "px";
|
44
|
+
}
|
45
|
+
onUpdated(() => {
|
46
|
+
if (props.type === "textarea") nextTick(() => {
|
47
|
+
{
|
48
|
+
focus();
|
49
|
+
}
|
50
|
+
});
|
51
|
+
resize();
|
52
|
+
});
|
53
|
+
onMounted(() => {
|
54
|
+
if (props.type === "textarea") nextTick(() => {
|
55
|
+
{
|
56
|
+
focus();
|
57
|
+
}
|
58
|
+
});
|
59
|
+
resize();
|
43
60
|
});
|
44
|
-
const
|
45
|
-
return (
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
61
|
+
const text = ref(props.field);
|
62
|
+
return (_ctx, _cache) => {
|
63
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
64
|
+
createElementVNode("div", {
|
65
|
+
class: normalizeClass([[
|
66
|
+
_ctx.$attrs.class,
|
67
|
+
{
|
68
|
+
"bg-fourth-nano": __props.validation
|
69
|
+
}
|
70
|
+
], "flex-center flex-nowrap flex"])
|
71
|
+
}, [
|
72
|
+
__props.label ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
73
|
+
createElementVNode("span", null, toDisplayString(__props.label), 1)
|
74
|
+
])) : createCommentVNode("", true),
|
75
|
+
createElementVNode("div", _hoisted_2, [
|
76
|
+
__props.type !== "textarea" ? (openBlock(), createElementBlock("input", {
|
77
|
+
key: 0,
|
78
|
+
onInput: _cache[0] || (_cache[0] = (event) => text.value = emit("update:field", event.target.value)),
|
79
|
+
onFocus: _cache[1] || (_cache[1] = (event) => emit("focus", event)),
|
80
|
+
onBlur: _cache[2] || (_cache[2] = (event) => emit("blur", event)),
|
81
|
+
type: __props.type,
|
82
|
+
class: "w-100",
|
83
|
+
value: __props.field,
|
84
|
+
placeholder: __props.placeholder,
|
85
|
+
tabindex: __props.tabindex,
|
86
|
+
disabled: __props.disabled
|
87
|
+
}, null, 40, _hoisted_3)) : (openBlock(), createElementBlock("textarea", {
|
88
|
+
key: 1,
|
89
|
+
ref_key: "textarea",
|
90
|
+
ref: textarea,
|
91
|
+
onInput: _cache[3] || (_cache[3] = (event) => text.value = emit("update:field", event.target.value)),
|
92
|
+
onFocus: _cache[4] || (_cache[4] = (event) => emit("focus", event)),
|
93
|
+
onBlur: _cache[5] || (_cache[5] = (event) => emit("blur", event)),
|
94
|
+
class: "w-100",
|
95
|
+
style: { "resize": "vertical" },
|
96
|
+
value: __props.field,
|
97
|
+
placeholder: __props.placeholder,
|
98
|
+
tabindex: __props.tabindex,
|
99
|
+
disabled: __props.disabled
|
100
|
+
}, null, 40, _hoisted_4))
|
101
|
+
]),
|
102
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true),
|
103
|
+
__props.symbol ? (openBlock(), createElementBlock("div", _hoisted_5, [
|
104
|
+
createElementVNode("span", null, toDisplayString(__props.symbol), 1)
|
105
|
+
])) : createCommentVNode("", true)
|
106
|
+
], 2),
|
107
|
+
createVNode(Transition, { name: "fade" }, {
|
108
|
+
default: withCtx(() => [
|
109
|
+
__props.validation ? (openBlock(), createElementBlock("div", _hoisted_6, " * " + toDisplayString(__props.validation.message), 1)) : createCommentVNode("", true)
|
110
|
+
]),
|
111
|
+
_: 1
|
112
|
+
})
|
113
|
+
], 64);
|
114
|
+
};
|
96
115
|
}
|
97
|
-
}
|
116
|
+
};
|
117
|
+
const Field = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-5659d4ce"]]);
|
98
118
|
export {
|
99
|
-
|
119
|
+
Field as default
|
100
120
|
};
|
121
|
+
//# sourceMappingURL=Field.vue2.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Field.vue2.js","sources":["../../../../../src/components/Field/Field.vue"],"sourcesContent":["<script setup>\n import { ref, computed, onUpdated, onMounted, nextTick } from 'vue'\n\n const emit = defineEmits(['update:field', 'focus', 'blur']);\n\n const props = defineProps({\n label: null,\n symbol: null,\n type: 'text',\n placeholder: 'Enter something here',\n field: null,\n value: null,\n validation: false,\n disabled: null,\n tabindex: -1\n });\n\n if (props.value) {\n emit('update:field', props.value)\n }\n\n const textarea = ref(null);\n\n function resize() {\n if (textarea.value) textarea.value.style.height = \"1rem\";\n if (textarea.value) textarea.value.style.height = textarea.value?.scrollHeight + \"px\";\n }\n\n\n onUpdated(() => {\n if (props.type === 'textarea') nextTick(() => { { focus()} })\n resize()\n });\n\n onMounted(() => {\n if (props.type === 'textarea') nextTick(() => { { focus()} })\n resize()\n });\n\n const text = ref(props.field);\n</script>\n\n<template>\n <div \n :class=\"[\n $attrs.class, \n { \n 'bg-fourth-nano': validation \n }\n ]\" \n class=\"flex-center flex-nowrap flex\"\n >\n <div \n v-if=\"label\" \n class=\"t-transp mn-r-small\"\n >\n <span>\n {{label}}\n </span>\n </div>\n\n <div class=\"w-100\">\n <input \n v-if=\"type !== 'textarea'\"\n @input=\"event => text = emit('update:field', event.target.value)\"\n @focus=\"event => emit('focus', event)\"\n @blur=\"event => emit('blur', event)\"\n :type=\"type\"\n class=\"w-100\"\n :value=\"field\"\n :placeholder=\"placeholder\"\n :tabindex=\"tabindex\"\n :disabled=\"disabled\"\n />\n <textarea \n v-else\n ref=\"textarea\"\n @input=\"event => text = emit('update:field', event.target.value)\"\n @focus=\"event => emit('focus', event)\"\n @blur=\"event => emit('blur', event)\"\n class=\"w-100\"\n style=\"resize: vertical;\"\n :value=\"field\"\n :placeholder=\"placeholder\"\n :tabindex=\"tabindex\"\n :disabled=\"disabled\"\n />\n </div> \n\n <slot></slot>\n\n <div \n v-if=\"symbol\" \n class=\"t-transp mn-l-small\"\n >\n <span>\n {{symbol}}\n </span>\n </div>\n </div>\n\n <!-- Validation -->\n <transition name=\"fade\">\n <div v-if=\"validation\" class=\"mn-t-thin mn-b-thin mn-b-thin invalid-feedback\">\n * {{validation.message}}\n </div>\n </transition>\n</template>\n\n<style lang=\"scss\" scoped>\n input, textarea, span {\n line-height: 1;\n color: inherit;\n }\n</style>"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGE,UAAM,OAAO;AAEb,UAAM,QAAQ;AAYd,QAAI,MAAM,OAAO;AACf,WAAK,gBAAgB,MAAM,KAAK;AAAA,IACjC;AAED,UAAM,WAAW,IAAI,IAAI;AAEzB,aAAS,SAAS;;AAChB,UAAI,SAAS,MAAO,UAAS,MAAM,MAAM,SAAS;AAClD,UAAI,SAAS,MAAO,UAAS,MAAM,MAAM,WAAS,cAAS,UAAT,mBAAgB,gBAAe;AAAA,IAClF;AAGD,cAAU,MAAM;AACf,UAAI,MAAM,SAAS,WAAY,UAAS,MAAM;AAAG;AAAE,gBAAO;AAAA,QAAA;AAAA,OAAG;AAC5D,aAAQ;AAAA,IACZ,CAAG;AAED,cAAU,MAAM;AACd,UAAI,MAAM,SAAS,WAAY,UAAS,MAAM;AAAG;AAAE,gBAAO;AAAA,QAAA;AAAA,OAAG;AAC7D,aAAQ;AAAA,IACZ,CAAG;AAED,UAAM,OAAO,IAAI,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
3
3
|
const vue = require("vue");
|
4
|
-
const Field = require("../Field/Field.
|
4
|
+
const Field = require("../Field/Field.vue2.cjs");
|
5
5
|
const IconArrow = require("../../modules/icons/navigation/IconArrow.vue.cjs");
|
6
6
|
const vueI18n = require("vue-i18n");
|
7
7
|
const _hoisted_1 = { class: "pd-thin radius-extra flex-nowrap flex" };
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ref, onMounted, watchEffect, openBlock, createElementBlock, createVNode, unref, isRef, createElementVNode, toDisplayString, createCommentVNode } from "vue";
|
2
|
-
import Field from "../Field/Field.
|
2
|
+
import Field from "../Field/Field.vue2.js";
|
3
3
|
import _sfc_main$1 from "../../modules/icons/navigation/IconArrow.vue.js";
|
4
4
|
import { useI18n } from "vue-i18n";
|
5
5
|
const _hoisted_1 = { class: "pd-thin radius-extra flex-nowrap flex" };
|
@@ -1 +1,92 @@
|
|
1
|
-
"use strict";
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
3
|
+
const vue = require("vue");
|
4
|
+
const vueRouter = require("vue-router");
|
5
|
+
const vueI18n = require("vue-i18n");
|
6
|
+
const IconCross = require("../../modules/icons/navigation/IconCross.vue.cjs");
|
7
|
+
;/* empty css */
|
8
|
+
const _hoisted_1 = {
|
9
|
+
key: "popup-content",
|
10
|
+
class: "pd-small z-index-6 popup-wrapper"
|
11
|
+
};
|
12
|
+
const _hoisted_2 = {
|
13
|
+
key: 0,
|
14
|
+
class: "mn-b-small"
|
15
|
+
};
|
16
|
+
const _sfc_main = {
|
17
|
+
__name: "Popup",
|
18
|
+
props: {
|
19
|
+
isPopupOpen: {
|
20
|
+
type: Boolean,
|
21
|
+
default: false
|
22
|
+
},
|
23
|
+
style: String,
|
24
|
+
title: String
|
25
|
+
},
|
26
|
+
emits: ["close-popup"],
|
27
|
+
setup(__props, { emit: __emit }) {
|
28
|
+
const props = __props;
|
29
|
+
const emits = __emit;
|
30
|
+
function closePopup() {
|
31
|
+
emits("close-popup");
|
32
|
+
}
|
33
|
+
vue.watch(() => props.isPopupOpen, (newVal) => {
|
34
|
+
if (newVal) {
|
35
|
+
document.body.classList.add("no-scroll");
|
36
|
+
} else {
|
37
|
+
document.body.classList.remove("no-scroll");
|
38
|
+
}
|
39
|
+
});
|
40
|
+
vueRouter.useRoute();
|
41
|
+
vueRouter.useRouter();
|
42
|
+
const text = {
|
43
|
+
messages: {
|
44
|
+
en: {},
|
45
|
+
ru: {}
|
46
|
+
}
|
47
|
+
};
|
48
|
+
vueI18n.useI18n(text);
|
49
|
+
return (_ctx, _cache) => {
|
50
|
+
return vue.openBlock(), vue.createBlock(vue.Transition, {
|
51
|
+
name: "TransitionTranslateY",
|
52
|
+
appear: ""
|
53
|
+
}, {
|
54
|
+
default: vue.withCtx(() => [
|
55
|
+
__props.isPopupOpen ? (vue.openBlock(), vue.createBlock(vue.Teleport, {
|
56
|
+
key: 0,
|
57
|
+
to: "body"
|
58
|
+
}, [
|
59
|
+
__props.isPopupOpen ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
60
|
+
vue.createVNode(vue.Transition, {
|
61
|
+
name: "TransitionTranslateY",
|
62
|
+
mode: "out-in"
|
63
|
+
}, {
|
64
|
+
default: vue.withCtx(() => [
|
65
|
+
vue.createElementVNode("section", vue.mergeProps({ class: "pos-relative z-index-4" }, _ctx.$attrs, {
|
66
|
+
class: _ctx.$attrs.class
|
67
|
+
}), [
|
68
|
+
__props.title ? (vue.openBlock(), vue.createElementBlock("h4", _hoisted_2, vue.toDisplayString(__props.title), 1)) : vue.createCommentVNode("", true),
|
69
|
+
vue.createVNode(IconCross.default, {
|
70
|
+
fill: "rgb(var(--white))",
|
71
|
+
onClick: _cache[0] || (_cache[0] = ($event) => closePopup()),
|
72
|
+
class: "cursor-pointer bg-second pd-micro radius-extra pos-absolute pos-t-0 pos-r-0 mn-t-semi mn-r-semi hover-scale-1 i-medium z-index-5"
|
73
|
+
}),
|
74
|
+
vue.renderSlot(_ctx.$slots, "default")
|
75
|
+
], 16)
|
76
|
+
]),
|
77
|
+
_: 3
|
78
|
+
}),
|
79
|
+
vue.createElementVNode("div", {
|
80
|
+
onClick: _cache[1] || (_cache[1] = ($event) => closePopup()),
|
81
|
+
class: vue.normalizeClass([{ "active": __props.isPopupOpen === true }, "color-overlay z-index-3"])
|
82
|
+
}, null, 2)
|
83
|
+
])) : vue.createCommentVNode("", true)
|
84
|
+
])) : vue.createCommentVNode("", true)
|
85
|
+
]),
|
86
|
+
_: 3
|
87
|
+
});
|
88
|
+
};
|
89
|
+
}
|
90
|
+
};
|
91
|
+
exports.default = _sfc_main;
|
92
|
+
//# sourceMappingURL=Popup.vue2.cjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Popup.vue2.cjs","sources":["../../../../../src/components/Popup/Popup.vue"],"sourcesContent":["<template>\n\n\t\t<transition name=\"TransitionTranslateY\" appear>\n\t\t\t\t<teleport to=\"body\" v-if=\"isPopupOpen\">\n\t\t\t\t\t<div v-if=\"isPopupOpen\" key=\"popup-content\" class=\"pd-small z-index-6 popup-wrapper\">\n\n\t\t\t\t\t\t<transition name=\"TransitionTranslateY\" mode=\"out-in\">\n\t\t\t\t\t\t\t<section class=\"pos-relative z-index-4\" v-bind=\"$attrs\" :class=\"$attrs.class\">\n\t\t\t\t\t\t\t\t\t<h4 v-if=\"title\" class=\"mn-b-small\">{{title}}</h4>\n\t\t\t\t\t\t\t\t\t<IconCross :fill=\"'rgb(var(--white))'\" @click=\"closePopup()\" class=\"cursor-pointer bg-second pd-micro radius-extra pos-absolute pos-t-0 pos-r-0 mn-t-semi mn-r-semi hover-scale-1 i-medium z-index-5\"/>\n\t\t\t\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t\t\t</section> \n\t\t\t\t\t\t</transition>\n\n\t\t\t\t\t\t<div \n\t\t\t\t\t\t\t@click=\"closePopup()\" \n\t\t\t\t\t :class=\"{'active':isPopupOpen === true}\" \n\t\t\t\t\t class=\"color-overlay z-index-3\">\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t</div>\n\t\t\t</teleport>\n\t\t</transition>\n\n</template>\n\n<script setup>\nimport { computed, watch, onMounted, ref, nextTick } from 'vue';\n// Import libs\nimport { useRoute, useRouter } from 'vue-router'\nimport { useI18n } from 'vue-i18n'\n// Icons\nimport IconCross from '@pf/src/modules/icons/navigation/IconCross.vue';\n// Define props\nconst props = defineProps({\n isPopupOpen: {\n \ttype: Boolean,\n\t default: false\n },\n style: String,\n title: String,\n});\nconst emits = defineEmits(['close-popup'])\n\nfunction closePopup() {\n emits(\"close-popup\");\n} \n\nwatch(() => props.isPopupOpen, (newVal) => {\n if (newVal) {\n document.body.classList.add('no-scroll');\n } else {\n document.body.classList.remove('no-scroll');\n }\n});\n\n// Accessing router and store\nconst route = useRoute()\nconst router = useRouter()\n// Localization\nconst text = {\n \tmessages: {\n\t en: {},\n\t ru: {}\n\t}\n}\nconst { t } = useI18n(text)\n</script>\n\n<style lang=\"scss\">\n\t.no-scroll {\n\t overflow: hidden;\n\t}\n\n\t.popup-wrapper {\n\t\tdisplay: flex;\n\t\tposition: fixed;\n\n\t\talign-items: center;\n\t\tjustify-content: center;\n\n\t\twidth: 100%;\n\t\theight: 100%;\n\n\t\tleft: 0;\n\t\ttop: 0;\n\n\t\tz-index: 40;\n\n\t\t.popup {\n\t\t\tposition: absolute;\n\t\t\theight: auto;\n\t\t\tpadding: 2rem;\n\t\t\tmin-width: 24rem;\n\t\t\tborder-radius: 2rem;\n\t\t\toverflow: hidden;\n\n\t\t\tcolor: white;\n\t\t\tbackground: black;\n\n\t\t\tz-index: 40;\n\t\t}\n\t}\n\n\t.color-overlay {\n\t\tdisplay: block;\n\t\tposition: fixed;\n\n\t\tleft: 0;\n\t\ttop: 0;\n\n\t\twidth: 100%;\n\t\theight: 100%;\n\n\t\tbackground: rgba(0,0,0,0.0);\n\t\tpointer-events: none;\n\n\t\ttransform: scale(1.5);\n\n\t\ttransition: all 0.5s cubic-bezier(.31,.79,.24,.92);\n\n\t\t&.active {\n\t\t\tbackground: rgba(#000,0.25);\n\t\t\tpointer-events: all;\n\t\t}\n\t}\n</style>\n"],"names":["watch","useRoute","useRouter","useI18n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,UAAM,QAAQ;AAQd,UAAM,QAAQ;AAEd,aAAS,aAAa;AACpB,YAAM,aAAa;AAAA,IACrB;AAEAA,QAAK,MAAC,MAAM,MAAM,aAAa,CAAC,WAAW;AACzC,UAAI,QAAQ;AACV,iBAAS,KAAK,UAAU,IAAI,WAAW;AAAA,MAC3C,OAAS;AACL,iBAAS,KAAK,UAAU,OAAO,WAAW;AAAA,MAC3C;AAAA,IACH,CAAC;AAGaC,cAAAA,SAAU;AACTC,cAAAA,UAAW;AAE1B,UAAM,OAAO;AAAA,MACV,UAAU;AAAA,QACR,IAAI,CAAE;AAAA,QACN,IAAI,CAAE;AAAA,MACT;AAAA,IACF;AACcC,YAAO,QAAC,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -1,77 +1,92 @@
|
|
1
|
-
import { watch
|
2
|
-
import { useRoute
|
3
|
-
import { useI18n
|
4
|
-
import
|
1
|
+
import { watch, openBlock, createBlock, Transition, withCtx, Teleport, createElementBlock, createVNode, createElementVNode, mergeProps, toDisplayString, createCommentVNode, renderSlot, normalizeClass } from "vue";
|
2
|
+
import { useRoute, useRouter } from "vue-router";
|
3
|
+
import { useI18n } from "vue-i18n";
|
4
|
+
import _sfc_main$1 from "../../modules/icons/navigation/IconCross.vue.js";
|
5
5
|
/* empty css */
|
6
|
-
const
|
6
|
+
const _hoisted_1 = {
|
7
7
|
key: "popup-content",
|
8
8
|
class: "pd-small z-index-6 popup-wrapper"
|
9
|
-
}
|
9
|
+
};
|
10
|
+
const _hoisted_2 = {
|
10
11
|
key: 0,
|
11
12
|
class: "mn-b-small"
|
12
|
-
}
|
13
|
+
};
|
14
|
+
const _sfc_main = {
|
13
15
|
__name: "Popup",
|
14
16
|
props: {
|
15
17
|
isPopupOpen: {
|
16
18
|
type: Boolean,
|
17
|
-
default:
|
19
|
+
default: false
|
18
20
|
},
|
19
21
|
style: String,
|
20
22
|
title: String
|
21
23
|
},
|
22
24
|
emits: ["close-popup"],
|
23
|
-
setup(
|
24
|
-
const
|
25
|
-
|
26
|
-
|
25
|
+
setup(__props, { emit: __emit }) {
|
26
|
+
const props = __props;
|
27
|
+
const emits = __emit;
|
28
|
+
function closePopup() {
|
29
|
+
emits("close-popup");
|
27
30
|
}
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
+
watch(() => props.isPopupOpen, (newVal) => {
|
32
|
+
if (newVal) {
|
33
|
+
document.body.classList.add("no-scroll");
|
34
|
+
} else {
|
35
|
+
document.body.classList.remove("no-scroll");
|
36
|
+
}
|
37
|
+
});
|
38
|
+
useRoute();
|
39
|
+
useRouter();
|
40
|
+
const text = {
|
31
41
|
messages: {
|
32
42
|
en: {},
|
33
43
|
ru: {}
|
34
44
|
}
|
35
|
-
}
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
45
|
+
};
|
46
|
+
useI18n(text);
|
47
|
+
return (_ctx, _cache) => {
|
48
|
+
return openBlock(), createBlock(Transition, {
|
49
|
+
name: "TransitionTranslateY",
|
50
|
+
appear: ""
|
51
|
+
}, {
|
52
|
+
default: withCtx(() => [
|
53
|
+
__props.isPopupOpen ? (openBlock(), createBlock(Teleport, {
|
54
|
+
key: 0,
|
55
|
+
to: "body"
|
56
|
+
}, [
|
57
|
+
__props.isPopupOpen ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
58
|
+
createVNode(Transition, {
|
59
|
+
name: "TransitionTranslateY",
|
60
|
+
mode: "out-in"
|
61
|
+
}, {
|
62
|
+
default: withCtx(() => [
|
63
|
+
createElementVNode("section", mergeProps({ class: "pos-relative z-index-4" }, _ctx.$attrs, {
|
64
|
+
class: _ctx.$attrs.class
|
65
|
+
}), [
|
66
|
+
__props.title ? (openBlock(), createElementBlock("h4", _hoisted_2, toDisplayString(__props.title), 1)) : createCommentVNode("", true),
|
67
|
+
createVNode(_sfc_main$1, {
|
68
|
+
fill: "rgb(var(--white))",
|
69
|
+
onClick: _cache[0] || (_cache[0] = ($event) => closePopup()),
|
70
|
+
class: "cursor-pointer bg-second pd-micro radius-extra pos-absolute pos-t-0 pos-r-0 mn-t-semi mn-r-semi hover-scale-1 i-medium z-index-5"
|
71
|
+
}),
|
72
|
+
renderSlot(_ctx.$slots, "default")
|
73
|
+
], 16)
|
74
|
+
]),
|
75
|
+
_: 3
|
76
|
+
}),
|
77
|
+
createElementVNode("div", {
|
78
|
+
onClick: _cache[1] || (_cache[1] = ($event) => closePopup()),
|
79
|
+
class: normalizeClass([{ "active": __props.isPopupOpen === true }, "color-overlay z-index-3"])
|
80
|
+
}, null, 2)
|
81
|
+
])) : createCommentVNode("", true)
|
82
|
+
])) : createCommentVNode("", true)
|
83
|
+
]),
|
84
|
+
_: 3
|
85
|
+
});
|
86
|
+
};
|
73
87
|
}
|
74
88
|
};
|
75
89
|
export {
|
76
|
-
|
90
|
+
_sfc_main as default
|
77
91
|
};
|
92
|
+
//# sourceMappingURL=Popup.vue2.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Popup.vue2.js","sources":["../../../../../src/components/Popup/Popup.vue"],"sourcesContent":["<template>\n\n\t\t<transition name=\"TransitionTranslateY\" appear>\n\t\t\t\t<teleport to=\"body\" v-if=\"isPopupOpen\">\n\t\t\t\t\t<div v-if=\"isPopupOpen\" key=\"popup-content\" class=\"pd-small z-index-6 popup-wrapper\">\n\n\t\t\t\t\t\t<transition name=\"TransitionTranslateY\" mode=\"out-in\">\n\t\t\t\t\t\t\t<section class=\"pos-relative z-index-4\" v-bind=\"$attrs\" :class=\"$attrs.class\">\n\t\t\t\t\t\t\t\t\t<h4 v-if=\"title\" class=\"mn-b-small\">{{title}}</h4>\n\t\t\t\t\t\t\t\t\t<IconCross :fill=\"'rgb(var(--white))'\" @click=\"closePopup()\" class=\"cursor-pointer bg-second pd-micro radius-extra pos-absolute pos-t-0 pos-r-0 mn-t-semi mn-r-semi hover-scale-1 i-medium z-index-5\"/>\n\t\t\t\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t\t\t</section> \n\t\t\t\t\t\t</transition>\n\n\t\t\t\t\t\t<div \n\t\t\t\t\t\t\t@click=\"closePopup()\" \n\t\t\t\t\t :class=\"{'active':isPopupOpen === true}\" \n\t\t\t\t\t class=\"color-overlay z-index-3\">\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t</div>\n\t\t\t</teleport>\n\t\t</transition>\n\n</template>\n\n<script setup>\nimport { computed, watch, onMounted, ref, nextTick } from 'vue';\n// Import libs\nimport { useRoute, useRouter } from 'vue-router'\nimport { useI18n } from 'vue-i18n'\n// Icons\nimport IconCross from '@pf/src/modules/icons/navigation/IconCross.vue';\n// Define props\nconst props = defineProps({\n isPopupOpen: {\n \ttype: Boolean,\n\t default: false\n },\n style: String,\n title: String,\n});\nconst emits = defineEmits(['close-popup'])\n\nfunction closePopup() {\n emits(\"close-popup\");\n} \n\nwatch(() => props.isPopupOpen, (newVal) => {\n if (newVal) {\n document.body.classList.add('no-scroll');\n } else {\n document.body.classList.remove('no-scroll');\n }\n});\n\n// Accessing router and store\nconst route = useRoute()\nconst router = useRouter()\n// Localization\nconst text = {\n \tmessages: {\n\t en: {},\n\t ru: {}\n\t}\n}\nconst { t } = useI18n(text)\n</script>\n\n<style lang=\"scss\">\n\t.no-scroll {\n\t overflow: hidden;\n\t}\n\n\t.popup-wrapper {\n\t\tdisplay: flex;\n\t\tposition: fixed;\n\n\t\talign-items: center;\n\t\tjustify-content: center;\n\n\t\twidth: 100%;\n\t\theight: 100%;\n\n\t\tleft: 0;\n\t\ttop: 0;\n\n\t\tz-index: 40;\n\n\t\t.popup {\n\t\t\tposition: absolute;\n\t\t\theight: auto;\n\t\t\tpadding: 2rem;\n\t\t\tmin-width: 24rem;\n\t\t\tborder-radius: 2rem;\n\t\t\toverflow: hidden;\n\n\t\t\tcolor: white;\n\t\t\tbackground: black;\n\n\t\t\tz-index: 40;\n\t\t}\n\t}\n\n\t.color-overlay {\n\t\tdisplay: block;\n\t\tposition: fixed;\n\n\t\tleft: 0;\n\t\ttop: 0;\n\n\t\twidth: 100%;\n\t\theight: 100%;\n\n\t\tbackground: rgba(0,0,0,0.0);\n\t\tpointer-events: none;\n\n\t\ttransform: scale(1.5);\n\n\t\ttransition: all 0.5s cubic-bezier(.31,.79,.24,.92);\n\n\t\t&.active {\n\t\t\tbackground: rgba(#000,0.25);\n\t\t\tpointer-events: all;\n\t\t}\n\t}\n</style>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,UAAM,QAAQ;AAQd,UAAM,QAAQ;AAEd,aAAS,aAAa;AACpB,YAAM,aAAa;AAAA,IACrB;AAEA,UAAM,MAAM,MAAM,aAAa,CAAC,WAAW;AACzC,UAAI,QAAQ;AACV,iBAAS,KAAK,UAAU,IAAI,WAAW;AAAA,MAC3C,OAAS;AACL,iBAAS,KAAK,UAAU,OAAO,WAAW;AAAA,MAC3C;AAAA,IACH,CAAC;AAGa,aAAU;AACT,cAAW;AAE1B,UAAM,OAAO;AAAA,MACV,UAAU;AAAA,QACR,IAAI,CAAE;AAAA,QACN,IAAI,CAAE;AAAA,MACT;AAAA,IACF;AACc,YAAQ,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|