@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,133 @@
|
|
1
|
-
"use strict";
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
3
|
+
const vue = require("vue");
|
4
|
+
const Loader = require("../Loader/Loader.vue2.cjs");
|
5
|
+
;/* empty css */
|
6
|
+
const _hoisted_1 = ["disabled"];
|
7
|
+
const _hoisted_2 = { key: 0 };
|
8
|
+
const _hoisted_3 = { key: 1 };
|
9
|
+
const _hoisted_4 = {
|
10
|
+
key: 2,
|
11
|
+
class: "t-semi loading t-black"
|
12
|
+
};
|
13
|
+
const _hoisted_5 = {
|
14
|
+
key: 3,
|
15
|
+
class: "error"
|
16
|
+
};
|
17
|
+
const _hoisted_6 = {
|
18
|
+
key: 0,
|
19
|
+
class: "button-counter"
|
20
|
+
};
|
21
|
+
const _sfc_main = {
|
22
|
+
__name: "Button",
|
23
|
+
props: {
|
24
|
+
submit: {
|
25
|
+
type: Function,
|
26
|
+
default: async () => {
|
27
|
+
console.log("Button click.");
|
28
|
+
}
|
29
|
+
},
|
30
|
+
text: {
|
31
|
+
type: Object,
|
32
|
+
default: (textComponent) => {
|
33
|
+
console.log(textComponent);
|
34
|
+
return textComponent = {
|
35
|
+
...textComponent.text,
|
36
|
+
success: "✔",
|
37
|
+
error: "✖"
|
38
|
+
};
|
39
|
+
}
|
40
|
+
},
|
41
|
+
counter: {
|
42
|
+
type: Object
|
43
|
+
},
|
44
|
+
callback: {
|
45
|
+
type: Function,
|
46
|
+
default: async () => {
|
47
|
+
console.log("Button callback.");
|
48
|
+
}
|
49
|
+
},
|
50
|
+
callbackDelay: {
|
51
|
+
type: Number,
|
52
|
+
default: 750
|
53
|
+
},
|
54
|
+
showSucces: {
|
55
|
+
type: Boolean,
|
56
|
+
default: true
|
57
|
+
},
|
58
|
+
showLoader: {
|
59
|
+
type: Boolean,
|
60
|
+
default: true
|
61
|
+
},
|
62
|
+
validation: {
|
63
|
+
type: Boolean,
|
64
|
+
default: false
|
65
|
+
}
|
66
|
+
},
|
67
|
+
emits: ["error"],
|
68
|
+
setup(__props, { emit: __emit }) {
|
69
|
+
const props = __props;
|
70
|
+
const emits = __emit;
|
71
|
+
const button = vue.ref(null);
|
72
|
+
const error = vue.ref(null);
|
73
|
+
const loading = vue.ref(false);
|
74
|
+
const finished = vue.ref(false);
|
75
|
+
async function Submit() {
|
76
|
+
button.value.style["pointer-events"] = "none";
|
77
|
+
error.value = null;
|
78
|
+
loading.value = true;
|
79
|
+
const resetButton = () => {
|
80
|
+
if (button.value) {
|
81
|
+
button.value.classList.replace("bg-second", "bg-main");
|
82
|
+
button.value.style.pointerEvents = "auto";
|
83
|
+
loading.value = false;
|
84
|
+
finished.value = false;
|
85
|
+
error.value = null;
|
86
|
+
}
|
87
|
+
};
|
88
|
+
try {
|
89
|
+
await props.submit();
|
90
|
+
button.value.classList.replace("bg-main", "bg-second");
|
91
|
+
loading.value = false;
|
92
|
+
if (props.showSucces) {
|
93
|
+
finished.value = true;
|
94
|
+
setTimeout(resetButton, 500);
|
95
|
+
} else {
|
96
|
+
resetButton();
|
97
|
+
}
|
98
|
+
if (props.callback) setTimeout(() => props.callback(), props.callbackDelay);
|
99
|
+
} catch (err) {
|
100
|
+
emits("error", err);
|
101
|
+
button.value.classList.replace("bg-main", "bg-fourth-nano");
|
102
|
+
error.value = props.error;
|
103
|
+
setTimeout(() => {
|
104
|
+
resetButton();
|
105
|
+
button.value.classList.replace("bg-fourth-nano", "bg-main");
|
106
|
+
}, 1330);
|
107
|
+
}
|
108
|
+
}
|
109
|
+
return (_ctx, _cache) => {
|
110
|
+
return vue.openBlock(), vue.createElementBlock("button", {
|
111
|
+
onClick: vue.withModifiers(Submit, ["stop"]),
|
112
|
+
disabled: __props.validation,
|
113
|
+
ref_key: "button",
|
114
|
+
ref: button,
|
115
|
+
class: "button"
|
116
|
+
}, [
|
117
|
+
vue.createVNode(vue.Transition, { name: "FromTop" }, {
|
118
|
+
default: vue.withCtx(() => [
|
119
|
+
!loading.value && !error.value && !finished.value || !__props.showLoader ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2, [
|
120
|
+
vue.renderSlot(_ctx.$slots, "default")
|
121
|
+
])) : loading.value && !error.value && __props.showLoader ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3, [
|
122
|
+
vue.createVNode(Loader.default, { class: "pos-relative pos-t-0 pos-l-0 loading" })
|
123
|
+
])) : finished.value && __props.showSucces ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4, vue.toDisplayString(__props.text.success), 1)) : error.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_5, vue.toDisplayString(error.value), 1)) : vue.createCommentVNode("", true)
|
124
|
+
]),
|
125
|
+
_: 3
|
126
|
+
}),
|
127
|
+
__props.counter ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_6, vue.toDisplayString(__props.counter), 1)) : vue.createCommentVNode("", true)
|
128
|
+
], 8, _hoisted_1);
|
129
|
+
};
|
130
|
+
}
|
131
|
+
};
|
132
|
+
exports.default = _sfc_main;
|
133
|
+
//# sourceMappingURL=Button.vue2.cjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Button.vue2.cjs","sources":["../../../../../src/components/Button/Button.vue"],"sourcesContent":["<script setup>\n\timport { ref } from 'vue'\n\n\timport Loader from '@pf/src/components/Loader/Loader.vue'\n\n\tconst props = defineProps({\n\t\tsubmit: {\n\t\t\ttype: Function,\n\t\t\tdefault: async () => { console.log('Button click.') }\n\t\t},\n\t\ttext: {\n\t\t\ttype: Object,\n\t\t\tdefault: (textComponent) => {\n\t\t\t\tconsole.log(textComponent)\n\t\t\t\treturn textComponent = {\n\t\t\t\t\t...textComponent.text,\n\t\t\t\t\tsuccess: '✔',\n\t\t\t\t\terror: '✖'\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tcounter: {\n\t type: Object\n\t },\n\t\tcallback: {\n\t\t\ttype: Function,\n\t\t\tdefault: async () => { console.log('Button callback.') }\n\t\t},\n\t\tcallbackDelay: {\n\t\t\ttype: Number,\n\t\t\tdefault: 750\n\t\t},\n\t\tshowSucces: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true\n\t\t},\n\t\tshowLoader: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true\n\t\t},\n\t\tvalidation: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false\n\t\t},\n\t})\t\n\n\tconst emits = defineEmits(['error'])\n\n\tconst button = ref(null);\n\tconst error = ref(null);\n\tconst loading = ref(false);\n\tconst finished = ref(false);\n\n\tasync function Submit() {\n\t button.value.style['pointer-events'] = 'none';\n\t error.value = null;\n\t loading.value = true;\n\n\t // Функция для сброса состояния кнопки.\n\t const resetButton = () => {\n\t if (button.value) {\n button.value.classList.replace('bg-second', 'bg-main');\n button.value.style.pointerEvents = 'auto';\n loading.value = false;\n finished.value = false;\n error.value = null;\n\t }\n\t };\n\n\t try {\n\t await props.submit();\n\n\t button.value.classList.replace('bg-main', 'bg-second');\n\n\t loading.value = false;\n\n\t // Используем функцию сброса состояния кнопки здесь.\n\t if (props.showSucces) { \n\t\t\t\t\t\t\tfinished.value = true;\n\t setTimeout(resetButton, 500);\n\t } else {\n\t resetButton();\n\t }\n\n\t // Если есть callback, мы также установим таймер для его вызова.\n\t if (props.callback) setTimeout(() => props.callback(), props.callbackDelay);\n\n\t } catch (err) {\n\t \t\temits('error',err)\n\t // Если возникла ошибка, мы изменяем стили и устанавливаем сообщение об ошибке.\n\t button.value.classList.replace('bg-main', 'bg-fourth-nano');\n\t error.value = props.error;\n\t \n\t // После задержки снова сбрасываем состояние кнопки.\n\t setTimeout(() => {\n\t resetButton();\n\t // Так как класс кнопки был изменен, вернем его в исходное состояние.\n\t button.value.classList.replace('bg-fourth-nano', 'bg-main');\n\t }, 1330);\n\t }\n\t}\n\n</script>\n\n<template>\n\t<button @click.stop=\"Submit\" :disabled=\"validation\" ref=\"button\" class=\"button\">\n\t\t<transition name=\"FromTop\" >\n\t\t\t<!-- Slot -->\n\t\t\t<span v-if=\"!loading && !error && !finished || !showLoader\"><slot></slot></span>\n\t\t\t<!-- Loading Circle Animation -->\n\t\t\t<span v-else-if=\"loading && !error && showLoader\"><Loader class=\"pos-relative pos-t-0 pos-l-0 loading\"/></span>\n\t\t\t<!-- <Loader v-else-if=\"loading && !error && showLoader\"/> -->\n\t\t\t<!-- Success -->\n\t\t\t<span v-else-if=\"finished && showSucces\" class=\"t-semi loading t-black\">{{text.success}}</span>\n\t\t\t<!-- Error if not finished -->\n\t\t\t<span v-else-if=\"error\" class=\"error\">{{ error }}</span>\n\t\t</transition>\n\t\t<!-- Counter -->\n\t\t<p v-if=\"counter\" class=\"button-counter\">{{counter}}</p> \n\n\t</button> \n</template>\n\n\n<style lang=\"scss\">\n\tbutton[disabled] {\n\t\tbackground: grey; \n\t\t&:hover {\n\t\t\tbackground: grey; \n\t\t} \n\t}\n\n\t.FromTop-enter-active,\n\t.FromTop-leave-active {\n\t\ttransform: translateY(0);\n\t\topacity: 1;\n\t\ttransition: all 0.5s ease; \n\t\t\n\t}\n\t.FromTop-enter-from,\n\t.FromTop-leave-to {\n\t\tposition: absolute;\n\t\ttransform: translateY(-1rem);\n\t\topacity: 0;\n\t\ttransition: all 0.5s ease;\n\t}\n\n\t.button {\n\t\tdisplay: flex;\n\t\twidth: fit-content;\n\n\t\tpadding: 1rem 1.75rem;\n\t\tborder-radius: 3rem;\n\n\t\ttransform: scale(1);\n\t\topacity: 1;\n\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\t\n\t\tcolor: black;\n\t\ttext-align: center;\n\t\ttext-transform: uppercase;\n\t\tfont-size: 1rem;\n\t\tletter-spacing: 5%;\n\n\t\ttransition: all 0.33s ease;\n\t \n\t\t&:hover {\n\t\t\tcursor: pointer;\n\t\t\topacity: 0.9;\n\t\t}\n\n\t\t&:active {\n\t\t\ttransform: scale(0.95);\n\t\t}\n\n\t\t&-small {\n\t\t\tpadding: 0.5rem 0.75rem;\n\t\t\tborder-radius: 0.5rem;\n\t\t\theight: fit-content;\n\t\t}\n\n\t\t.button-counter {\n\t\t\tposition: absolute;\n\t\t\tright: -8px;\n\t bottom: -8px;\n\t background: yellow;\n\t height: 16px;\n\t border-radius: 16px;\n\t width: 16px;\n\t font-weight: 500;\n\t text-align: center;\n\t line-height: 16px;\n\t font-size: 10px;\n\t\t}\n\t}\n</style>"],"names":["ref"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKC,UAAM,QAAQ;AAyCd,UAAM,QAAQ;AAEd,UAAM,SAASA,QAAI,IAAI;AACvB,UAAM,QAAQA,QAAI,IAAI;AACtB,UAAM,UAAUA,QAAI,KAAK;AACzB,UAAM,WAAWA,QAAI,KAAK;AAE1B,mBAAe,SAAS;AACpB,aAAO,MAAM,MAAM,gBAAgB,IAAI;AACvC,YAAM,QAAQ;AACd,cAAQ,QAAQ;AAGhB,YAAM,cAAc,MAAM;AACtB,YAAI,OAAO,OAAO;AACf,iBAAO,MAAM,UAAU,QAAQ,aAAa,SAAS;AACrD,iBAAO,MAAM,MAAM,gBAAgB;AACnC,kBAAQ,QAAQ;AAChB,mBAAS,QAAQ;AACjB,gBAAM,QAAQ;AAAA,QAChB;AAAA,MACV;AAEK,UAAI;AACA,cAAM,MAAM;AAEZ,eAAO,MAAM,UAAU,QAAQ,WAAW,WAAW;AAErD,gBAAQ,QAAQ;AAGhB,YAAI,MAAM,YAAY;AACxB,mBAAS,QAAQ;AACX,qBAAW,aAAa,GAAG;AAAA,QACxC,OAAgB;AACH;QACH;AAGD,YAAI,MAAM,SAAU,YAAW,MAAM,MAAM,SAAU,GAAE,MAAM,aAAa;AAAA,MAE7E,SAAQ,KAAK;AACZ,cAAM,SAAQ,GAAG;AAEf,eAAO,MAAM,UAAU,QAAQ,WAAW,gBAAgB;AAC1D,cAAM,QAAQ,MAAM;AAGpB,mBAAW,MAAM;AACb;AAEA,iBAAO,MAAM,UAAU,QAAQ,kBAAkB,SAAS;AAAA,QAC7D,GAAE,IAAI;AAAA,MACV;AAAA,IACJ;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -1,16 +1,22 @@
|
|
1
|
-
import { ref
|
2
|
-
import
|
1
|
+
import { ref, openBlock, createElementBlock, withModifiers, createVNode, Transition, withCtx, renderSlot, toDisplayString, createCommentVNode } from "vue";
|
2
|
+
import Loader from "../Loader/Loader.vue2.js";
|
3
3
|
/* empty css */
|
4
|
-
const
|
4
|
+
const _hoisted_1 = ["disabled"];
|
5
|
+
const _hoisted_2 = { key: 0 };
|
6
|
+
const _hoisted_3 = { key: 1 };
|
7
|
+
const _hoisted_4 = {
|
5
8
|
key: 2,
|
6
9
|
class: "t-semi loading t-black"
|
7
|
-
}
|
10
|
+
};
|
11
|
+
const _hoisted_5 = {
|
8
12
|
key: 3,
|
9
13
|
class: "error"
|
10
|
-
}
|
14
|
+
};
|
15
|
+
const _hoisted_6 = {
|
11
16
|
key: 0,
|
12
17
|
class: "button-counter"
|
13
|
-
}
|
18
|
+
};
|
19
|
+
const _sfc_main = {
|
14
20
|
__name: "Button",
|
15
21
|
props: {
|
16
22
|
submit: {
|
@@ -21,11 +27,14 @@ const B = ["disabled"], L = { key: 0 }, S = { key: 1 }, T = {
|
|
21
27
|
},
|
22
28
|
text: {
|
23
29
|
type: Object,
|
24
|
-
default: (
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
30
|
+
default: (textComponent) => {
|
31
|
+
console.log(textComponent);
|
32
|
+
return textComponent = {
|
33
|
+
...textComponent.text,
|
34
|
+
success: "✔",
|
35
|
+
error: "✖"
|
36
|
+
};
|
37
|
+
}
|
29
38
|
},
|
30
39
|
counter: {
|
31
40
|
type: Object
|
@@ -42,54 +51,83 @@ const B = ["disabled"], L = { key: 0 }, S = { key: 1 }, T = {
|
|
42
51
|
},
|
43
52
|
showSucces: {
|
44
53
|
type: Boolean,
|
45
|
-
default:
|
54
|
+
default: true
|
46
55
|
},
|
47
56
|
showLoader: {
|
48
57
|
type: Boolean,
|
49
|
-
default:
|
58
|
+
default: true
|
50
59
|
},
|
51
60
|
validation: {
|
52
61
|
type: Boolean,
|
53
|
-
default:
|
62
|
+
default: false
|
54
63
|
}
|
55
64
|
},
|
56
65
|
emits: ["error"],
|
57
|
-
setup(
|
58
|
-
const
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
66
|
+
setup(__props, { emit: __emit }) {
|
67
|
+
const props = __props;
|
68
|
+
const emits = __emit;
|
69
|
+
const button = ref(null);
|
70
|
+
const error = ref(null);
|
71
|
+
const loading = ref(false);
|
72
|
+
const finished = ref(false);
|
73
|
+
async function Submit() {
|
74
|
+
button.value.style["pointer-events"] = "none";
|
75
|
+
error.value = null;
|
76
|
+
loading.value = true;
|
77
|
+
const resetButton = () => {
|
78
|
+
if (button.value) {
|
79
|
+
button.value.classList.replace("bg-second", "bg-main");
|
80
|
+
button.value.style.pointerEvents = "auto";
|
81
|
+
loading.value = false;
|
82
|
+
finished.value = false;
|
83
|
+
error.value = null;
|
84
|
+
}
|
63
85
|
};
|
64
86
|
try {
|
65
|
-
await
|
66
|
-
|
67
|
-
|
68
|
-
|
87
|
+
await props.submit();
|
88
|
+
button.value.classList.replace("bg-main", "bg-second");
|
89
|
+
loading.value = false;
|
90
|
+
if (props.showSucces) {
|
91
|
+
finished.value = true;
|
92
|
+
setTimeout(resetButton, 500);
|
93
|
+
} else {
|
94
|
+
resetButton();
|
95
|
+
}
|
96
|
+
if (props.callback) setTimeout(() => props.callback(), props.callbackDelay);
|
97
|
+
} catch (err) {
|
98
|
+
emits("error", err);
|
99
|
+
button.value.classList.replace("bg-main", "bg-fourth-nano");
|
100
|
+
error.value = props.error;
|
101
|
+
setTimeout(() => {
|
102
|
+
resetButton();
|
103
|
+
button.value.classList.replace("bg-fourth-nano", "bg-main");
|
69
104
|
}, 1330);
|
70
105
|
}
|
71
106
|
}
|
72
|
-
return (
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
107
|
+
return (_ctx, _cache) => {
|
108
|
+
return openBlock(), createElementBlock("button", {
|
109
|
+
onClick: withModifiers(Submit, ["stop"]),
|
110
|
+
disabled: __props.validation,
|
111
|
+
ref_key: "button",
|
112
|
+
ref: button,
|
113
|
+
class: "button"
|
114
|
+
}, [
|
115
|
+
createVNode(Transition, { name: "FromTop" }, {
|
116
|
+
default: withCtx(() => [
|
117
|
+
!loading.value && !error.value && !finished.value || !__props.showLoader ? (openBlock(), createElementBlock("span", _hoisted_2, [
|
118
|
+
renderSlot(_ctx.$slots, "default")
|
119
|
+
])) : loading.value && !error.value && __props.showLoader ? (openBlock(), createElementBlock("span", _hoisted_3, [
|
120
|
+
createVNode(Loader, { class: "pos-relative pos-t-0 pos-l-0 loading" })
|
121
|
+
])) : finished.value && __props.showSucces ? (openBlock(), createElementBlock("span", _hoisted_4, toDisplayString(__props.text.success), 1)) : error.value ? (openBlock(), createElementBlock("span", _hoisted_5, toDisplayString(error.value), 1)) : createCommentVNode("", true)
|
122
|
+
]),
|
123
|
+
_: 3
|
124
|
+
}),
|
125
|
+
__props.counter ? (openBlock(), createElementBlock("p", _hoisted_6, toDisplayString(__props.counter), 1)) : createCommentVNode("", true)
|
126
|
+
], 8, _hoisted_1);
|
127
|
+
};
|
91
128
|
}
|
92
129
|
};
|
93
130
|
export {
|
94
|
-
|
131
|
+
_sfc_main as default
|
95
132
|
};
|
133
|
+
//# sourceMappingURL=Button.vue2.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Button.vue2.js","sources":["../../../../../src/components/Button/Button.vue"],"sourcesContent":["<script setup>\n\timport { ref } from 'vue'\n\n\timport Loader from '@pf/src/components/Loader/Loader.vue'\n\n\tconst props = defineProps({\n\t\tsubmit: {\n\t\t\ttype: Function,\n\t\t\tdefault: async () => { console.log('Button click.') }\n\t\t},\n\t\ttext: {\n\t\t\ttype: Object,\n\t\t\tdefault: (textComponent) => {\n\t\t\t\tconsole.log(textComponent)\n\t\t\t\treturn textComponent = {\n\t\t\t\t\t...textComponent.text,\n\t\t\t\t\tsuccess: '✔',\n\t\t\t\t\terror: '✖'\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tcounter: {\n\t type: Object\n\t },\n\t\tcallback: {\n\t\t\ttype: Function,\n\t\t\tdefault: async () => { console.log('Button callback.') }\n\t\t},\n\t\tcallbackDelay: {\n\t\t\ttype: Number,\n\t\t\tdefault: 750\n\t\t},\n\t\tshowSucces: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true\n\t\t},\n\t\tshowLoader: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true\n\t\t},\n\t\tvalidation: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false\n\t\t},\n\t})\t\n\n\tconst emits = defineEmits(['error'])\n\n\tconst button = ref(null);\n\tconst error = ref(null);\n\tconst loading = ref(false);\n\tconst finished = ref(false);\n\n\tasync function Submit() {\n\t button.value.style['pointer-events'] = 'none';\n\t error.value = null;\n\t loading.value = true;\n\n\t // Функция для сброса состояния кнопки.\n\t const resetButton = () => {\n\t if (button.value) {\n button.value.classList.replace('bg-second', 'bg-main');\n button.value.style.pointerEvents = 'auto';\n loading.value = false;\n finished.value = false;\n error.value = null;\n\t }\n\t };\n\n\t try {\n\t await props.submit();\n\n\t button.value.classList.replace('bg-main', 'bg-second');\n\n\t loading.value = false;\n\n\t // Используем функцию сброса состояния кнопки здесь.\n\t if (props.showSucces) { \n\t\t\t\t\t\t\tfinished.value = true;\n\t setTimeout(resetButton, 500);\n\t } else {\n\t resetButton();\n\t }\n\n\t // Если есть callback, мы также установим таймер для его вызова.\n\t if (props.callback) setTimeout(() => props.callback(), props.callbackDelay);\n\n\t } catch (err) {\n\t \t\temits('error',err)\n\t // Если возникла ошибка, мы изменяем стили и устанавливаем сообщение об ошибке.\n\t button.value.classList.replace('bg-main', 'bg-fourth-nano');\n\t error.value = props.error;\n\t \n\t // После задержки снова сбрасываем состояние кнопки.\n\t setTimeout(() => {\n\t resetButton();\n\t // Так как класс кнопки был изменен, вернем его в исходное состояние.\n\t button.value.classList.replace('bg-fourth-nano', 'bg-main');\n\t }, 1330);\n\t }\n\t}\n\n</script>\n\n<template>\n\t<button @click.stop=\"Submit\" :disabled=\"validation\" ref=\"button\" class=\"button\">\n\t\t<transition name=\"FromTop\" >\n\t\t\t<!-- Slot -->\n\t\t\t<span v-if=\"!loading && !error && !finished || !showLoader\"><slot></slot></span>\n\t\t\t<!-- Loading Circle Animation -->\n\t\t\t<span v-else-if=\"loading && !error && showLoader\"><Loader class=\"pos-relative pos-t-0 pos-l-0 loading\"/></span>\n\t\t\t<!-- <Loader v-else-if=\"loading && !error && showLoader\"/> -->\n\t\t\t<!-- Success -->\n\t\t\t<span v-else-if=\"finished && showSucces\" class=\"t-semi loading t-black\">{{text.success}}</span>\n\t\t\t<!-- Error if not finished -->\n\t\t\t<span v-else-if=\"error\" class=\"error\">{{ error }}</span>\n\t\t</transition>\n\t\t<!-- Counter -->\n\t\t<p v-if=\"counter\" class=\"button-counter\">{{counter}}</p> \n\n\t</button> \n</template>\n\n\n<style lang=\"scss\">\n\tbutton[disabled] {\n\t\tbackground: grey; \n\t\t&:hover {\n\t\t\tbackground: grey; \n\t\t} \n\t}\n\n\t.FromTop-enter-active,\n\t.FromTop-leave-active {\n\t\ttransform: translateY(0);\n\t\topacity: 1;\n\t\ttransition: all 0.5s ease; \n\t\t\n\t}\n\t.FromTop-enter-from,\n\t.FromTop-leave-to {\n\t\tposition: absolute;\n\t\ttransform: translateY(-1rem);\n\t\topacity: 0;\n\t\ttransition: all 0.5s ease;\n\t}\n\n\t.button {\n\t\tdisplay: flex;\n\t\twidth: fit-content;\n\n\t\tpadding: 1rem 1.75rem;\n\t\tborder-radius: 3rem;\n\n\t\ttransform: scale(1);\n\t\topacity: 1;\n\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\t\n\t\tcolor: black;\n\t\ttext-align: center;\n\t\ttext-transform: uppercase;\n\t\tfont-size: 1rem;\n\t\tletter-spacing: 5%;\n\n\t\ttransition: all 0.33s ease;\n\t \n\t\t&:hover {\n\t\t\tcursor: pointer;\n\t\t\topacity: 0.9;\n\t\t}\n\n\t\t&:active {\n\t\t\ttransform: scale(0.95);\n\t\t}\n\n\t\t&-small {\n\t\t\tpadding: 0.5rem 0.75rem;\n\t\t\tborder-radius: 0.5rem;\n\t\t\theight: fit-content;\n\t\t}\n\n\t\t.button-counter {\n\t\t\tposition: absolute;\n\t\t\tright: -8px;\n\t bottom: -8px;\n\t background: yellow;\n\t height: 16px;\n\t border-radius: 16px;\n\t width: 16px;\n\t font-weight: 500;\n\t text-align: center;\n\t line-height: 16px;\n\t font-size: 10px;\n\t\t}\n\t}\n</style>"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKC,UAAM,QAAQ;AAyCd,UAAM,QAAQ;AAEd,UAAM,SAAS,IAAI,IAAI;AACvB,UAAM,QAAQ,IAAI,IAAI;AACtB,UAAM,UAAU,IAAI,KAAK;AACzB,UAAM,WAAW,IAAI,KAAK;AAE1B,mBAAe,SAAS;AACpB,aAAO,MAAM,MAAM,gBAAgB,IAAI;AACvC,YAAM,QAAQ;AACd,cAAQ,QAAQ;AAGhB,YAAM,cAAc,MAAM;AACtB,YAAI,OAAO,OAAO;AACf,iBAAO,MAAM,UAAU,QAAQ,aAAa,SAAS;AACrD,iBAAO,MAAM,MAAM,gBAAgB;AACnC,kBAAQ,QAAQ;AAChB,mBAAS,QAAQ;AACjB,gBAAM,QAAQ;AAAA,QAChB;AAAA,MACV;AAEK,UAAI;AACA,cAAM,MAAM;AAEZ,eAAO,MAAM,UAAU,QAAQ,WAAW,WAAW;AAErD,gBAAQ,QAAQ;AAGhB,YAAI,MAAM,YAAY;AACxB,mBAAS,QAAQ;AACX,qBAAW,aAAa,GAAG;AAAA,QACxC,OAAgB;AACH;QACH;AAGD,YAAI,MAAM,SAAU,YAAW,MAAM,MAAM,SAAU,GAAE,MAAM,aAAa;AAAA,MAE7E,SAAQ,KAAK;AACZ,cAAM,SAAQ,GAAG;AAEf,eAAO,MAAM,UAAU,QAAQ,WAAW,gBAAgB;AAC1D,cAAM,QAAQ,MAAM;AAGpB,mBAAW,MAAM;AACb;AAEA,iBAAO,MAAM,UAAU,QAAQ,kBAAkB,SAAS;AAAA,QAC7D,GAAE,IAAI;AAAA,MACV;AAAA,IACJ;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -1 +1,32 @@
|
|
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 _hoisted_1 = { class: "t-trimmed font-main" };
|
6
|
+
const _hoisted_2 = { class: "font-main t-truncate" };
|
7
|
+
const _hoisted_3 = {
|
8
|
+
key: 1,
|
9
|
+
class: "pd-b-micro pd-t-micro pd-r-thin pd-l-thin radius-small t-semi bg-white"
|
10
|
+
};
|
11
|
+
const _sfc_main = {
|
12
|
+
__name: "Chips",
|
13
|
+
props: ["chips"],
|
14
|
+
setup(__props) {
|
15
|
+
return (_ctx, _cache) => {
|
16
|
+
var _a;
|
17
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
18
|
+
((_a = __props.chips) == null ? void 0 : _a.length) ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 0 }, vue.renderList(__props.chips, (chip, index) => {
|
19
|
+
return vue.openBlock(), vue.createElementBlock("span", {
|
20
|
+
class: vue.normalizeClass([_ctx.$attrs.class || "p-medium", "mn-r-nano d-inline-block w-max pd-b-micro pd-t-micro pd-r-thin pd-l-thin radius-small t-medium bg-main"])
|
21
|
+
}, [
|
22
|
+
vue.createElementVNode("span", _hoisted_2, vue.toDisplayString(chip.text ? chip.text : chip), 1)
|
23
|
+
], 2);
|
24
|
+
}), 256)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_3, [
|
25
|
+
vue.renderSlot(_ctx.$slots, "default")
|
26
|
+
]))
|
27
|
+
]);
|
28
|
+
};
|
29
|
+
}
|
30
|
+
};
|
31
|
+
exports.default = _sfc_main;
|
32
|
+
//# sourceMappingURL=Chips.vue.cjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Chips.vue.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -1,26 +1,32 @@
|
|
1
|
-
import { openBlock
|
1
|
+
import { openBlock, createElementBlock, Fragment, renderList, normalizeClass, createElementVNode, toDisplayString, renderSlot } from "vue";
|
2
2
|
/* empty css */
|
3
|
-
const
|
3
|
+
const _hoisted_1 = { class: "t-trimmed font-main" };
|
4
|
+
const _hoisted_2 = { class: "font-main t-truncate" };
|
5
|
+
const _hoisted_3 = {
|
4
6
|
key: 1,
|
5
7
|
class: "pd-b-micro pd-t-micro pd-r-thin pd-l-thin radius-small t-semi bg-white"
|
6
|
-
}
|
8
|
+
};
|
9
|
+
const _sfc_main = {
|
7
10
|
__name: "Chips",
|
8
11
|
props: ["chips"],
|
9
|
-
setup(
|
10
|
-
return (
|
11
|
-
var
|
12
|
-
return
|
13
|
-
(
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
12
|
+
setup(__props) {
|
13
|
+
return (_ctx, _cache) => {
|
14
|
+
var _a;
|
15
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
16
|
+
((_a = __props.chips) == null ? void 0 : _a.length) ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(__props.chips, (chip, index) => {
|
17
|
+
return openBlock(), createElementBlock("span", {
|
18
|
+
class: normalizeClass([_ctx.$attrs.class || "p-medium", "mn-r-nano d-inline-block w-max pd-b-micro pd-t-micro pd-r-thin pd-l-thin radius-small t-medium bg-main"])
|
19
|
+
}, [
|
20
|
+
createElementVNode("span", _hoisted_2, toDisplayString(chip.text ? chip.text : chip), 1)
|
21
|
+
], 2);
|
22
|
+
}), 256)) : (openBlock(), createElementBlock("div", _hoisted_3, [
|
23
|
+
renderSlot(_ctx.$slots, "default")
|
19
24
|
]))
|
20
25
|
]);
|
21
26
|
};
|
22
27
|
}
|
23
28
|
};
|
24
29
|
export {
|
25
|
-
|
30
|
+
_sfc_main as default
|
26
31
|
};
|
32
|
+
//# sourceMappingURL=Chips.vue.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Chips.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -1 +1,64 @@
|
|
1
|
-
"use strict";
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
3
|
+
const vue = require("vue");
|
4
|
+
const clickOutside = require("../FieldPhone/click-outside.cjs");
|
5
|
+
;/* empty css */
|
6
|
+
const _hoisted_1 = {
|
7
|
+
key: 0,
|
8
|
+
class: "w-100 h-100 flex-center flex"
|
9
|
+
};
|
10
|
+
const _hoisted_2 = { key: 1 };
|
11
|
+
const _sfc_main = {
|
12
|
+
__name: "Dropdown",
|
13
|
+
props: {
|
14
|
+
label: {
|
15
|
+
type: [String, Object],
|
16
|
+
default: "Open"
|
17
|
+
},
|
18
|
+
align: {
|
19
|
+
type: String,
|
20
|
+
default: "left"
|
21
|
+
}
|
22
|
+
},
|
23
|
+
setup(__props) {
|
24
|
+
let vClickOutside = clickOutside.default;
|
25
|
+
const props = __props;
|
26
|
+
const isOpen = vue.ref(false);
|
27
|
+
const isComponentLabel = vue.computed(() => typeof props.label === "object");
|
28
|
+
function clickedOutside() {
|
29
|
+
isOpen.value = false;
|
30
|
+
}
|
31
|
+
return (_ctx, _cache) => {
|
32
|
+
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
|
33
|
+
class: "dropdown pos-relative",
|
34
|
+
onClick: _cache[0] || (_cache[0] = vue.withModifiers(($event) => isOpen.value = !isOpen.value, ["stop"]))
|
35
|
+
}, [
|
36
|
+
isComponentLabel.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
37
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(__props.label.component), vue.mergeProps(__props.label.props, {
|
38
|
+
class: __props.label.class
|
39
|
+
}), null, 16, ["class"]))
|
40
|
+
])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, vue.toDisplayString(__props.label), 1)),
|
41
|
+
vue.createVNode(vue.Transition, {
|
42
|
+
name: "TransitionTranslateY",
|
43
|
+
mode: "out-in"
|
44
|
+
}, {
|
45
|
+
default: vue.withCtx(() => [
|
46
|
+
vue.withDirectives(vue.createElementVNode("div", {
|
47
|
+
style: vue.normalizeStyle({ left: __props.align === "left" ? "0" : "auto", right: __props.align === "right" ? "0" : "auto" }),
|
48
|
+
class: "dropdown-content radius-big"
|
49
|
+
}, [
|
50
|
+
vue.renderSlot(_ctx.$slots, "default")
|
51
|
+
], 4), [
|
52
|
+
[vue.vShow, isOpen.value]
|
53
|
+
])
|
54
|
+
]),
|
55
|
+
_: 3
|
56
|
+
})
|
57
|
+
])), [
|
58
|
+
[vue.unref(vClickOutside), clickedOutside]
|
59
|
+
]);
|
60
|
+
};
|
61
|
+
}
|
62
|
+
};
|
63
|
+
exports.default = _sfc_main;
|
64
|
+
//# sourceMappingURL=Dropdown.vue.cjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Dropdown.vue.cjs","sources":["../../../../../src/components/Dropdown/Dropdown.vue"],"sourcesContent":["<template>\n <div class=\"dropdown pos-relative\" v-click-outside=\"clickedOutside\" @click.stop=\"isOpen = !isOpen\">\n <div v-if=\"isComponentLabel\" class=\"w-100 h-100 flex-center flex\">\n <component :is=\"label.component\" v-bind=\"label.props\" :class=\"label.class\"></component>\n </div>\n <div v-else>\n {{ label }}\n </div>\n <transition name=\"TransitionTranslateY\" mode=\"out-in\">\n <div \n v-show=\"isOpen\" \n :style=\"{ left: align === 'left' ? '0' : 'auto', right: align === 'right' ? '0' : 'auto' }\" \n class=\"dropdown-content radius-big\" \n >\n <slot></slot>\n </div>\n </transition>\n </div>\n</template>\n\n<script setup>\nimport { ref, computed } from 'vue';\nimport clickOutside from '../FieldPhone/click-outside';\n\nlet vClickOutside = clickOutside\n\nconst props = defineProps({\n label: {\n type: [String, Object],\n default: 'Open'\n },\n align: {\n type: String,\n default: 'left'\n }\n})\n\nconst isOpen = ref(false);\nconst isComponentLabel = computed(() => typeof props.label === 'object');\n\nfunction clickedOutside () {\n isOpen.value = false\n}\n</script>\n\n<style >\n.dropdown-content {\n display: block;\n position: absolute;\n box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);\n z-index: 1;\n}\n\n/*.dropdown:hover .dropdown-content {\n display: block;\n}*/\n</style>\n"],"names":["clickOutside","ref","computed"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAwBA,QAAI,gBAAgBA,aAAY;AAEhC,UAAM,QAAQ;AAWd,UAAM,SAASC,IAAAA,IAAI,KAAK;AACxB,UAAM,mBAAmBC,IAAQ,SAAC,MAAM,OAAO,MAAM,UAAU,QAAQ;AAEvE,aAAS,iBAAkB;AACzB,aAAO,QAAQ;AAAA,IACjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -1,10 +1,12 @@
|
|
1
|
-
import { ref
|
2
|
-
import
|
1
|
+
import { ref, computed, withDirectives, openBlock, createElementBlock, withModifiers, createBlock, resolveDynamicComponent, mergeProps, toDisplayString, createVNode, Transition, withCtx, createElementVNode, normalizeStyle, renderSlot, vShow, unref } from "vue";
|
2
|
+
import clickOutside from "../FieldPhone/click-outside.js";
|
3
3
|
/* empty css */
|
4
|
-
const
|
4
|
+
const _hoisted_1 = {
|
5
5
|
key: 0,
|
6
6
|
class: "w-100 h-100 flex-center flex"
|
7
|
-
}
|
7
|
+
};
|
8
|
+
const _hoisted_2 = { key: 1 };
|
9
|
+
const _sfc_main = {
|
8
10
|
__name: "Dropdown",
|
9
11
|
props: {
|
10
12
|
label: {
|
@@ -16,42 +18,47 @@ const B = {
|
|
16
18
|
default: "left"
|
17
19
|
}
|
18
20
|
},
|
19
|
-
setup(
|
20
|
-
let
|
21
|
-
const
|
22
|
-
|
23
|
-
|
21
|
+
setup(__props) {
|
22
|
+
let vClickOutside = clickOutside;
|
23
|
+
const props = __props;
|
24
|
+
const isOpen = ref(false);
|
25
|
+
const isComponentLabel = computed(() => typeof props.label === "object");
|
26
|
+
function clickedOutside() {
|
27
|
+
isOpen.value = false;
|
24
28
|
}
|
25
|
-
return (
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
(
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
29
|
+
return (_ctx, _cache) => {
|
30
|
+
return withDirectives((openBlock(), createElementBlock("div", {
|
31
|
+
class: "dropdown pos-relative",
|
32
|
+
onClick: _cache[0] || (_cache[0] = withModifiers(($event) => isOpen.value = !isOpen.value, ["stop"]))
|
33
|
+
}, [
|
34
|
+
isComponentLabel.value ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
35
|
+
(openBlock(), createBlock(resolveDynamicComponent(__props.label.component), mergeProps(__props.label.props, {
|
36
|
+
class: __props.label.class
|
37
|
+
}), null, 16, ["class"]))
|
38
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_2, toDisplayString(__props.label), 1)),
|
39
|
+
createVNode(Transition, {
|
40
|
+
name: "TransitionTranslateY",
|
41
|
+
mode: "out-in"
|
42
|
+
}, {
|
43
|
+
default: withCtx(() => [
|
44
|
+
withDirectives(createElementVNode("div", {
|
45
|
+
style: normalizeStyle({ left: __props.align === "left" ? "0" : "auto", right: __props.align === "right" ? "0" : "auto" }),
|
46
|
+
class: "dropdown-content radius-big"
|
47
|
+
}, [
|
48
|
+
renderSlot(_ctx.$slots, "default")
|
49
|
+
], 4), [
|
50
|
+
[vShow, isOpen.value]
|
51
|
+
])
|
52
|
+
]),
|
53
|
+
_: 3
|
54
|
+
})
|
55
|
+
])), [
|
56
|
+
[unref(vClickOutside), clickedOutside]
|
57
|
+
]);
|
58
|
+
};
|
53
59
|
}
|
54
60
|
};
|
55
61
|
export {
|
56
|
-
|
62
|
+
_sfc_main as default
|
57
63
|
};
|
64
|
+
//# sourceMappingURL=Dropdown.vue.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Dropdown.vue.js","sources":["../../../../../src/components/Dropdown/Dropdown.vue"],"sourcesContent":["<template>\n <div class=\"dropdown pos-relative\" v-click-outside=\"clickedOutside\" @click.stop=\"isOpen = !isOpen\">\n <div v-if=\"isComponentLabel\" class=\"w-100 h-100 flex-center flex\">\n <component :is=\"label.component\" v-bind=\"label.props\" :class=\"label.class\"></component>\n </div>\n <div v-else>\n {{ label }}\n </div>\n <transition name=\"TransitionTranslateY\" mode=\"out-in\">\n <div \n v-show=\"isOpen\" \n :style=\"{ left: align === 'left' ? '0' : 'auto', right: align === 'right' ? '0' : 'auto' }\" \n class=\"dropdown-content radius-big\" \n >\n <slot></slot>\n </div>\n </transition>\n </div>\n</template>\n\n<script setup>\nimport { ref, computed } from 'vue';\nimport clickOutside from '../FieldPhone/click-outside';\n\nlet vClickOutside = clickOutside\n\nconst props = defineProps({\n label: {\n type: [String, Object],\n default: 'Open'\n },\n align: {\n type: String,\n default: 'left'\n }\n})\n\nconst isOpen = ref(false);\nconst isComponentLabel = computed(() => typeof props.label === 'object');\n\nfunction clickedOutside () {\n isOpen.value = false\n}\n</script>\n\n<style >\n.dropdown-content {\n display: block;\n position: absolute;\n box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);\n z-index: 1;\n}\n\n/*.dropdown:hover .dropdown-content {\n display: block;\n}*/\n</style>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAwBA,QAAI,gBAAgB;AAEpB,UAAM,QAAQ;AAWd,UAAM,SAAS,IAAI,KAAK;AACxB,UAAM,mBAAmB,SAAS,MAAM,OAAO,MAAM,UAAU,QAAQ;AAEvE,aAAS,iBAAkB;AACzB,aAAO,QAAQ;AAAA,IACjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -4,7 +4,7 @@ const vue = require("vue");
|
|
4
4
|
const SkeletonEvent = require("../../modules/icons/skeletons/SkeletonEvent.vue.cjs");
|
5
5
|
;/* empty css */
|
6
6
|
const EmptyState = require("../EmptyState/EmptyState.vue.cjs");
|
7
|
-
const Dropdown = require("../Dropdown/Dropdown.
|
7
|
+
const Dropdown = require("../Dropdown/Dropdown.vue.cjs");
|
8
8
|
const Calendar = require("../DatePicker/Calendar.vue2.cjs");
|
9
9
|
const BottomSheet = require("../BottomSheet/BottomSheet.vue.cjs");
|
10
10
|
const BlockSearch = require("../../modules/globals/views/components/blocks/BlockSearch.vue.cjs");
|
@@ -2,7 +2,7 @@ import { mergeModels, useModel, ref, watch, onMounted, onUnmounted, openBlock, c
|
|
2
2
|
import SkeletonEvent from "../../modules/icons/skeletons/SkeletonEvent.vue.js";
|
3
3
|
/* empty css */
|
4
4
|
import _sfc_main$a from "../EmptyState/EmptyState.vue.js";
|
5
|
-
import _sfc_main$5 from "../Dropdown/Dropdown.
|
5
|
+
import _sfc_main$5 from "../Dropdown/Dropdown.vue.js";
|
6
6
|
import _sfc_main$7 from "../DatePicker/Calendar.vue2.js";
|
7
7
|
import _sfc_main$3 from "../BottomSheet/BottomSheet.vue.js";
|
8
8
|
import _sfc_main$1 from "../../modules/globals/views/components/blocks/BlockSearch.vue.js";
|