@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.
Files changed (161) hide show
  1. package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +133 -1
  2. package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs.map +1 -0
  3. package/dist/prometheus-framework/src/components/Button/Button.vue2.js +82 -44
  4. package/dist/prometheus-framework/src/components/Button/Button.vue2.js.map +1 -0
  5. package/dist/prometheus-framework/src/components/Chips/Chips.vue.cjs +32 -1
  6. package/dist/prometheus-framework/src/components/Chips/Chips.vue.cjs.map +1 -0
  7. package/dist/prometheus-framework/src/components/Chips/Chips.vue.js +20 -14
  8. package/dist/prometheus-framework/src/components/Chips/Chips.vue.js.map +1 -0
  9. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs +64 -1
  10. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs.map +1 -0
  11. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +45 -38
  12. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js.map +1 -0
  13. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
  14. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +1 -1
  15. package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +121 -1
  16. package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs.map +1 -0
  17. package/dist/prometheus-framework/src/components/Field/Field.vue2.js +97 -76
  18. package/dist/prometheus-framework/src/components/Field/Field.vue2.js.map +1 -0
  19. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
  20. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
  21. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +92 -1
  22. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs.map +1 -0
  23. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +69 -54
  24. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js.map +1 -0
  25. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +127 -1
  26. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs.map +1 -0
  27. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +75 -51
  28. package/dist/prometheus-framework/src/components/Select/Select.vue2.js.map +1 -0
  29. package/dist/prometheus-framework/src/modules/auth/views/components/layouts/Auth.vue.cjs +2 -2
  30. package/dist/prometheus-framework/src/modules/auth/views/components/layouts/Auth.vue.js +2 -2
  31. package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterCode.vue.cjs +1 -1
  32. package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterCode.vue.js +1 -1
  33. package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterPassword.vue.cjs +2 -2
  34. package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterPassword.vue.js +2 -2
  35. package/dist/prometheus-framework/src/modules/auth/views/components/pages/Invite.vue.cjs +2 -2
  36. package/dist/prometheus-framework/src/modules/auth/views/components/pages/Invite.vue.js +2 -2
  37. package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.cjs +2 -2
  38. package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.js +2 -2
  39. package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.cjs +2 -2
  40. package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.js +2 -2
  41. package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignUp.vue.cjs +2 -2
  42. package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignUp.vue.js +2 -2
  43. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
  44. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +1 -1
  45. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  46. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  47. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +3 -3
  48. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +3 -3
  49. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +3 -3
  50. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +3 -3
  51. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +2 -2
  52. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +2 -2
  53. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
  54. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +1 -1
  55. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
  56. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +1 -1
  57. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +2 -2
  58. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +2 -2
  59. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  60. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  61. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +3 -3
  62. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +3 -3
  63. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +3 -3
  64. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +3 -3
  65. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.cjs +1 -1
  66. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.js +1 -1
  67. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +5 -5
  68. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +5 -5
  69. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockSearch.vue.cjs +1 -1
  70. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockSearch.vue.js +1 -1
  71. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +2 -2
  72. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.js +2 -2
  73. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.cjs +1 -1
  74. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.js +1 -1
  75. package/dist/prometheus-framework/src/modules/globals/views/components/partials/Header.vue.cjs +2 -2
  76. package/dist/prometheus-framework/src/modules/globals/views/components/partials/Header.vue.js +2 -2
  77. package/dist/prometheus-framework/src/modules/globals/views/components/partials/NavigationBar.vue.cjs +1 -1
  78. package/dist/prometheus-framework/src/modules/globals/views/components/partials/NavigationBar.vue.js +1 -1
  79. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +2 -2
  80. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +2 -2
  81. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
  82. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
  83. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +4 -4
  84. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +4 -4
  85. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +3 -3
  86. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +3 -3
  87. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +2 -2
  88. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +2 -2
  89. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
  90. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
  91. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
  92. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
  93. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
  94. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
  95. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  96. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  97. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +4 -4
  98. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +4 -4
  99. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  100. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +1 -1
  101. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +4 -4
  102. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +4 -4
  103. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +2 -2
  104. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +2 -2
  105. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +3 -3
  106. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +3 -3
  107. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +3 -3
  108. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +3 -3
  109. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +6 -6
  110. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +6 -6
  111. package/dist/prometheus-framework/src/modules/pages/views/components/blocks/CardPage.vue.cjs +2 -2
  112. package/dist/prometheus-framework/src/modules/pages/views/components/blocks/CardPage.vue.js +2 -2
  113. package/dist/prometheus-framework/src/modules/pages/views/components/pages/PageEdit.vue.cjs +2 -2
  114. package/dist/prometheus-framework/src/modules/pages/views/components/pages/PageEdit.vue.js +2 -2
  115. package/dist/prometheus-framework/src/modules/pages/views/components/partials/SidebarPages.vue.cjs +2 -2
  116. package/dist/prometheus-framework/src/modules/pages/views/components/partials/SidebarPages.vue.js +2 -2
  117. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +2 -2
  118. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +2 -2
  119. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
  120. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
  121. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
  122. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
  123. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
  124. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
  125. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -1
  126. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +1 -1
  127. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +3 -3
  128. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +3 -3
  129. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +3 -3
  130. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +3 -3
  131. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +3 -3
  132. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +3 -3
  133. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
  134. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +1 -1
  135. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +3 -3
  136. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +3 -3
  137. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
  138. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
  139. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +3 -3
  140. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +3 -3
  141. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
  142. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +1 -1
  143. package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs +2 -2
  144. package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.js +2 -2
  145. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.cjs +2 -2
  146. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js +2 -2
  147. package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.cjs +1 -1
  148. package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.js +1 -1
  149. package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.cjs +4 -4
  150. package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.js +4 -4
  151. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +3 -3
  152. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +3 -3
  153. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +2 -2
  154. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +2 -2
  155. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.cjs +1 -1
  156. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.js +1 -1
  157. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +2 -2
  158. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +2 -2
  159. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +5 -5
  160. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +5 -5
  161. package/package.json +1 -1
@@ -1 +1,133 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=require("../Loader/Loader.vue2.cjs");;/* empty css */const v=["disabled"],b={key:0},m={key:1},k={key:2,class:"t-semi loading t-black"},y={key:3,class:"error"},p={key:0,class:"button-counter"},g={__name:"Button",props:{submit:{type:Function,default:async()=>{console.log("Button click.")}},text:{type:Object,default:t=>(console.log(t),t={...t.text,success:"✔",error:"✖"})},counter:{type:Object},callback:{type:Function,default:async()=>{console.log("Button callback.")}},callbackDelay:{type:Number,default:750},showSucces:{type:Boolean,default:!0},showLoader:{type:Boolean,default:!0},validation:{type:Boolean,default:!1}},emits:["error"],setup(t,{emit:r}){const o=t,i=r,l=e.ref(null),a=e.ref(null),s=e.ref(!1),n=e.ref(!1);async function d(){l.value.style["pointer-events"]="none",a.value=null,s.value=!0;const c=()=>{l.value&&(l.value.classList.replace("bg-second","bg-main"),l.value.style.pointerEvents="auto",s.value=!1,n.value=!1,a.value=null)};try{await o.submit(),l.value.classList.replace("bg-main","bg-second"),s.value=!1,o.showSucces?(n.value=!0,setTimeout(c,500)):c(),o.callback&&setTimeout(()=>o.callback(),o.callbackDelay)}catch(u){i("error",u),l.value.classList.replace("bg-main","bg-fourth-nano"),a.value=o.error,setTimeout(()=>{c(),l.value.classList.replace("bg-fourth-nano","bg-main")},1330)}}return(c,u)=>(e.openBlock(),e.createElementBlock("button",{onClick:e.withModifiers(d,["stop"]),disabled:t.validation,ref_key:"button",ref:l,class:"button"},[e.createVNode(e.Transition,{name:"FromTop"},{default:e.withCtx(()=>[!s.value&&!a.value&&!n.value||!t.showLoader?(e.openBlock(),e.createElementBlock("span",b,[e.renderSlot(c.$slots,"default")])):s.value&&!a.value&&t.showLoader?(e.openBlock(),e.createElementBlock("span",m,[e.createVNode(f.default,{class:"pos-relative pos-t-0 pos-l-0 loading"})])):n.value&&t.showSucces?(e.openBlock(),e.createElementBlock("span",k,e.toDisplayString(t.text.success),1)):a.value?(e.openBlock(),e.createElementBlock("span",y,e.toDisplayString(a.value),1)):e.createCommentVNode("",!0)]),_:3}),t.counter?(e.openBlock(),e.createElementBlock("p",p,e.toDisplayString(t.counter),1)):e.createCommentVNode("",!0)],8,v))}};exports.default=g;
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 as r, openBlock as o, createElementBlock as s, withModifiers as h, createVNode as f, Transition as p, withCtx as k, renderSlot as g, toDisplayString as i, createCommentVNode as b } from "vue";
2
- import w from "../Loader/Loader.vue2.js";
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 B = ["disabled"], L = { key: 0 }, S = { key: 1 }, T = {
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
- }, x = {
14
+ };
15
+ const _hoisted_6 = {
11
16
  key: 0,
12
17
  class: "button-counter"
13
- }, j = {
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: (e) => (console.log(e), e = {
25
- ...e.text,
26
- success: "✔",
27
- error: "✖"
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: !0
54
+ default: true
46
55
  },
47
56
  showLoader: {
48
57
  type: Boolean,
49
- default: !0
58
+ default: true
50
59
  },
51
60
  validation: {
52
61
  type: Boolean,
53
- default: !1
62
+ default: false
54
63
  }
55
64
  },
56
65
  emits: ["error"],
57
- setup(e, { emit: v }) {
58
- const l = e, m = v, t = r(null), a = r(null), n = r(!1), u = r(!1);
59
- async function y() {
60
- t.value.style["pointer-events"] = "none", a.value = null, n.value = !0;
61
- const c = () => {
62
- t.value && (t.value.classList.replace("bg-second", "bg-main"), t.value.style.pointerEvents = "auto", n.value = !1, u.value = !1, a.value = null);
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 l.submit(), t.value.classList.replace("bg-main", "bg-second"), n.value = !1, l.showSucces ? (u.value = !0, setTimeout(c, 500)) : c(), l.callback && setTimeout(() => l.callback(), l.callbackDelay);
66
- } catch (d) {
67
- m("error", d), t.value.classList.replace("bg-main", "bg-fourth-nano"), a.value = l.error, setTimeout(() => {
68
- c(), t.value.classList.replace("bg-fourth-nano", "bg-main");
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 (c, d) => (o(), s("button", {
73
- onClick: h(y, ["stop"]),
74
- disabled: e.validation,
75
- ref_key: "button",
76
- ref: t,
77
- class: "button"
78
- }, [
79
- f(p, { name: "FromTop" }, {
80
- default: k(() => [
81
- !n.value && !a.value && !u.value || !e.showLoader ? (o(), s("span", L, [
82
- g(c.$slots, "default")
83
- ])) : n.value && !a.value && e.showLoader ? (o(), s("span", S, [
84
- f(w, { class: "pos-relative pos-t-0 pos-l-0 loading" })
85
- ])) : u.value && e.showSucces ? (o(), s("span", T, i(e.text.success), 1)) : a.value ? (o(), s("span", _, i(a.value), 1)) : b("", !0)
86
- ]),
87
- _: 3
88
- }),
89
- e.counter ? (o(), s("p", x, i(e.counter), 1)) : b("", !0)
90
- ], 8, B));
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
- j as default
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";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */const i={class:"t-trimmed font-main"},l={class:"font-main t-truncate"},o={key:1,class:"pd-b-micro pd-t-micro pd-r-thin pd-l-thin radius-small t-semi bg-white"},a={__name:"Chips",props:["chips"],setup(n){return(s,c)=>{var r;return e.openBlock(),e.createElementBlock("div",i,[(r=n.chips)!=null&&r.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(n.chips,(t,d)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass([s.$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"])},[e.createElementVNode("span",l,e.toDisplayString(t.text?t.text:t),1)],2))),256)):(e.openBlock(),e.createElementBlock("div",o,[e.renderSlot(s.$slots,"default")]))])}}};exports.default=a;
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 as t, createElementBlock as e, Fragment as a, renderList as m, normalizeClass as o, createElementVNode as d, toDisplayString as l, renderSlot as c } from "vue";
1
+ import { openBlock, createElementBlock, Fragment, renderList, normalizeClass, createElementVNode, toDisplayString, renderSlot } from "vue";
2
2
  /* empty css */
3
- const p = { class: "t-trimmed font-main" }, h = { class: "font-main t-truncate" }, u = {
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
- }, k = {
8
+ };
9
+ const _sfc_main = {
7
10
  __name: "Chips",
8
11
  props: ["chips"],
9
- setup(n) {
10
- return (i, _) => {
11
- var r;
12
- return t(), e("div", p, [
13
- (r = n.chips) != null && r.length ? (t(!0), e(a, { key: 0 }, m(n.chips, (s, f) => (t(), e("span", {
14
- class: o([i.$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"])
15
- }, [
16
- d("span", h, l(s.text ? s.text : s), 1)
17
- ], 2))), 256)) : (t(), e("div", u, [
18
- c(i.$slots, "default")
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
- k as default
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";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("../FieldPhone/click-outside.cjs");;/* empty css */const u={key:0,class:"w-100 h-100 flex-center flex"},d={key:1},f={__name:"Dropdown",props:{label:{type:[String,Object],default:"Open"},align:{type:String,default:"left"}},setup(t){let n=r.default;const i=t,l=e.ref(!1),a=e.computed(()=>typeof i.label=="object");function s(){l.value=!1}return(c,o)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"dropdown pos-relative",onClick:o[0]||(o[0]=e.withModifiers(v=>l.value=!l.value,["stop"]))},[a.value?(e.openBlock(),e.createElementBlock("div",u,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.label.component),e.mergeProps(t.label.props,{class:t.label.class}),null,16,["class"]))])):(e.openBlock(),e.createElementBlock("div",d,e.toDisplayString(t.label),1)),e.createVNode(e.Transition,{name:"TransitionTranslateY",mode:"out-in"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{style:e.normalizeStyle({left:t.align==="left"?"0":"auto",right:t.align==="right"?"0":"auto"}),class:"dropdown-content radius-big"},[e.renderSlot(c.$slots,"default")],4),[[e.vShow,l.value]])]),_:3})])),[[e.unref(n),s]])}};exports.default=f;
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 as u, computed as f, withDirectives as a, openBlock as l, createElementBlock as o, withModifiers as m, createBlock as p, resolveDynamicComponent as v, mergeProps as b, toDisplayString as g, createVNode as k, Transition as y, withCtx as h, createElementVNode as w, normalizeStyle as O, renderSlot as S, vShow as C, unref as x } from "vue";
2
- import D from "../FieldPhone/click-outside.js";
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 B = {
4
+ const _hoisted_1 = {
5
5
  key: 0,
6
6
  class: "w-100 h-100 flex-center flex"
7
- }, T = { key: 1 }, $ = {
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(e) {
20
- let i = D;
21
- const s = e, t = u(!1), r = f(() => typeof s.label == "object");
22
- function c() {
23
- t.value = !1;
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 (d, n) => a((l(), o("div", {
26
- class: "dropdown pos-relative",
27
- onClick: n[0] || (n[0] = m((j) => t.value = !t.value, ["stop"]))
28
- }, [
29
- r.value ? (l(), o("div", B, [
30
- (l(), p(v(e.label.component), b(e.label.props, {
31
- class: e.label.class
32
- }), null, 16, ["class"]))
33
- ])) : (l(), o("div", T, g(e.label), 1)),
34
- k(y, {
35
- name: "TransitionTranslateY",
36
- mode: "out-in"
37
- }, {
38
- default: h(() => [
39
- a(w("div", {
40
- style: O({ left: e.align === "left" ? "0" : "auto", right: e.align === "right" ? "0" : "auto" }),
41
- class: "dropdown-content radius-big"
42
- }, [
43
- S(d.$slots, "default")
44
- ], 4), [
45
- [C, t.value]
46
- ])
47
- ]),
48
- _: 3
49
- })
50
- ])), [
51
- [x(i), c]
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
- $ as default
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.vue2.cjs");
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.vue2.js";
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";