@pequity/squirrel 1.0.20-beta.2 → 1.0.20-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. package/dist/cjs/chunks/_plugin-vue_export-helper.js +9 -1
  2. package/dist/cjs/chunks/p-action-bar.js +60 -1
  3. package/dist/cjs/chunks/p-card.js +28 -1
  4. package/dist/cjs/chunks/p-checkbox.js +24 -1
  5. package/dist/cjs/chunks/p-dropdown-select.js +414 -1
  6. package/dist/cjs/chunks/p-input-percent.js +53 -1
  7. package/dist/cjs/chunks/p-pagination-info.js +66 -1
  8. package/dist/cjs/chunks/p-pagination.js +122 -1
  9. package/dist/cjs/chunks/p-ring-loader.js +81 -1
  10. package/dist/cjs/chunks/p-select-btn.js +97 -1
  11. package/dist/cjs/chunks/p-select.js +123 -1
  12. package/dist/cjs/chunks/p-table-loader.js +70 -1
  13. package/dist/cjs/chunks/p-tabs.js +52 -1
  14. package/dist/cjs/config.js +105 -1
  15. package/dist/cjs/currency.js +9 -1
  16. package/dist/cjs/dom.js +27 -1
  17. package/dist/cjs/index.js +976 -1
  18. package/dist/cjs/inputClassesMixin.js +50 -1
  19. package/dist/cjs/inputClassesShared.js +76 -1
  20. package/dist/cjs/listKeyboardNavigation.js +110 -1
  21. package/dist/cjs/number.js +9 -1
  22. package/dist/cjs/object.js +4 -1
  23. package/dist/cjs/p-action-bar.js +3 -1
  24. package/dist/cjs/p-alert.js +65 -1
  25. package/dist/cjs/p-avatar.js +71 -1
  26. package/dist/cjs/p-btn.js +358 -2
  27. package/dist/cjs/p-card.js +3 -1
  28. package/dist/cjs/p-checkbox.js +3 -1
  29. package/dist/cjs/p-chips.js +110 -1
  30. package/dist/cjs/p-close-btn.js +36 -1
  31. package/dist/cjs/p-date-picker.js +139 -1
  32. package/dist/cjs/p-drawer.js +253 -1
  33. package/dist/cjs/p-dropdown-select.js +3 -1
  34. package/dist/cjs/p-dropdown.js +138 -1
  35. package/dist/cjs/p-file-upload.js +21 -1
  36. package/dist/cjs/p-info-icon.js +35 -1
  37. package/dist/cjs/p-inline-date-picker.js +142 -1
  38. package/dist/cjs/p-input-number.js +146 -1
  39. package/dist/cjs/p-input-percent.js +3 -1
  40. package/dist/cjs/p-input-search.js +110 -1
  41. package/dist/cjs/p-input.js +89 -1
  42. package/dist/cjs/p-loading.js +38 -1
  43. package/dist/cjs/p-modal.js +369 -1
  44. package/dist/cjs/p-pagination-info.js +3 -1
  45. package/dist/cjs/p-pagination.js +3 -1
  46. package/dist/cjs/p-progress-bar.js +41 -1
  47. package/dist/cjs/p-ring-loader.js +3 -1
  48. package/dist/cjs/p-select-btn.js +3 -1
  49. package/dist/cjs/p-select-list.js +4 -1
  50. package/dist/cjs/p-select-pill.js +111 -1
  51. package/dist/cjs/p-select.js +3 -1
  52. package/dist/cjs/p-skeleton-loader.js +73 -1
  53. package/dist/cjs/p-table-filter-icon.js +20 -1
  54. package/dist/cjs/p-table-header-cell.js +75 -1
  55. package/dist/cjs/p-table-loader.js +3 -1
  56. package/dist/cjs/p-table-sort.js +8 -1
  57. package/dist/cjs/p-table-td.js +88 -1
  58. package/dist/cjs/p-table.js +12 -1
  59. package/dist/cjs/p-tabs.js +3 -1
  60. package/dist/cjs/p-textarea.js +73 -1
  61. package/dist/cjs/p-toggle.js +114 -1
  62. package/dist/cjs/pagination.js +29 -1
  63. package/dist/cjs/string.js +12 -1
  64. package/dist/cjs/tailwind.js +4353 -1
  65. package/dist/cjs/text.js +16 -1
  66. package/dist/cjs/useInputClasses.js +44 -1
  67. package/dist/cjs/usePLoading.js +35 -1
  68. package/dist/cjs/usePModal.js +21 -1
  69. package/dist/cjs/usePTableColResize.js +81 -1
  70. package/dist/cjs/usePTableRowVirtualizer.js +31 -1
  71. package/dist/cjs/useSelectList.js +256 -1
  72. package/dist/es/chunks/_plugin-vue_export-helper.js +7 -6
  73. package/dist/es/chunks/p-action-bar.js +45 -36
  74. package/dist/es/chunks/p-card.js +18 -14
  75. package/dist/es/chunks/p-checkbox.js +14 -11
  76. package/dist/es/chunks/p-dropdown-select.js +232 -183
  77. package/dist/es/chunks/p-input-percent.js +34 -25
  78. package/dist/es/chunks/p-pagination-info.js +30 -24
  79. package/dist/es/chunks/p-pagination.js +78 -48
  80. package/dist/es/chunks/p-ring-loader.js +63 -40
  81. package/dist/es/chunks/p-select-btn.js +80 -59
  82. package/dist/es/chunks/p-select.js +81 -54
  83. package/dist/es/chunks/p-table-loader.js +46 -32
  84. package/dist/es/chunks/p-tabs.js +35 -29
  85. package/dist/es/config.js +2 -2
  86. package/dist/es/currency.js +3 -3
  87. package/dist/es/dom.js +24 -12
  88. package/dist/es/index.js +703 -561
  89. package/dist/es/inputClassesMixin.js +20 -14
  90. package/dist/es/inputClassesShared.js +60 -45
  91. package/dist/es/listKeyboardNavigation.js +86 -36
  92. package/dist/es/number.js +7 -2
  93. package/dist/es/object.js +2 -2
  94. package/dist/es/p-action-bar.js +2 -2
  95. package/dist/es/p-alert.js +35 -30
  96. package/dist/es/p-avatar.js +30 -27
  97. package/dist/es/p-btn.js +209 -164
  98. package/dist/es/p-card.js +2 -2
  99. package/dist/es/p-checkbox.js +2 -2
  100. package/dist/es/p-chips.js +60 -40
  101. package/dist/es/p-close-btn.js +20 -16
  102. package/dist/es/p-date-picker.js +66 -58
  103. package/dist/es/p-drawer.js +108 -89
  104. package/dist/es/p-dropdown-select.js +2 -2
  105. package/dist/es/p-dropdown.js +52 -33
  106. package/dist/es/p-file-upload.js +17 -9
  107. package/dist/es/p-info-icon.js +21 -16
  108. package/dist/es/p-inline-date-picker.js +64 -53
  109. package/dist/es/p-input-number.js +84 -66
  110. package/dist/es/p-input-percent.js +2 -2
  111. package/dist/es/p-input-search.js +43 -41
  112. package/dist/es/p-input.js +51 -45
  113. package/dist/es/p-loading.js +31 -22
  114. package/dist/es/p-modal.js +261 -174
  115. package/dist/es/p-pagination-info.js +2 -2
  116. package/dist/es/p-pagination.js +2 -2
  117. package/dist/es/p-progress-bar.js +26 -23
  118. package/dist/es/p-ring-loader.js +2 -2
  119. package/dist/es/p-select-btn.js +2 -2
  120. package/dist/es/p-select-list.js +2 -2
  121. package/dist/es/p-select-pill.js +58 -41
  122. package/dist/es/p-select.js +2 -2
  123. package/dist/es/p-skeleton-loader.js +34 -29
  124. package/dist/es/p-table-filter-icon.js +11 -11
  125. package/dist/es/p-table-header-cell.js +38 -33
  126. package/dist/es/p-table-loader.js +2 -2
  127. package/dist/es/p-table-sort.js +2 -2
  128. package/dist/es/p-table-td.js +76 -29
  129. package/dist/es/p-table.js +10 -6
  130. package/dist/es/p-tabs.js +2 -2
  131. package/dist/es/p-textarea.js +36 -34
  132. package/dist/es/p-toggle.js +53 -48
  133. package/dist/es/pagination.js +25 -8
  134. package/dist/es/string.js +10 -2
  135. package/dist/es/tailwind.js +1660 -1101
  136. package/dist/es/text.js +13 -8
  137. package/dist/es/useInputClasses.js +38 -22
  138. package/dist/es/usePLoading.js +31 -15
  139. package/dist/es/usePModal.js +15 -12
  140. package/dist/es/usePTableColResize.js +71 -39
  141. package/dist/es/usePTableRowVirtualizer.js +24 -15
  142. package/dist/es/useSelectList.js +234 -121
  143. package/dist/style.css +2124 -1
  144. package/package.json +1 -1
@@ -1,13 +1,25 @@
1
- import { defineComponent as R, useCssVars as G, ref as c, onBeforeMount as J, onMounted as Q, getCurrentInstance as X, watch as Y, nextTick as E, onBeforeUnmount as _, openBlock as g, createBlock as M, Teleport as ee, createVNode as k, Transition as V, withCtx as I, withDirectives as $, createElementVNode as i, normalizeClass as h, normalizeStyle as A, vShow as z, renderSlot as m, createElementBlock as L, toDisplayString as W, createCommentVNode as p, withModifiers as te, createTextVNode as le } from "vue";
2
- import ae from "./p-alert.js";
3
- import oe from "./p-close-btn.js";
4
- import { usePModal as ne } from "./usePModal.js";
5
- import { _ as se } from "./chunks/_plugin-vue_export-helper.js";
6
- const ie = ["data-pm-backdrop-id"], re = ["data-pm-wrapper-id", "aria-label", "aria-describedby", "aria-labelledby"], de = ["data-pm-id"], ue = { class: "flex pb-4 pl-8 pr-4 pt-4" }, ce = ["id"], fe = { class: "ml-auto" }, me = {
1
+ import { defineComponent, useCssVars, ref, onBeforeMount, onMounted, getCurrentInstance, watch, nextTick, onBeforeUnmount, openBlock, createBlock, Teleport, createVNode, Transition, withCtx, withDirectives, createElementVNode, normalizeClass, normalizeStyle, vShow, renderSlot, createElementBlock, toDisplayString, createCommentVNode, withModifiers, createTextVNode } from "vue";
2
+ import PAlert from "./p-alert.js";
3
+ import PCloseBtn from "./p-close-btn.js";
4
+ import { usePModal } from "./usePModal.js";
5
+ import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
6
+ const _hoisted_1 = ["data-pm-backdrop-id"];
7
+ const _hoisted_2 = ["data-pm-wrapper-id", "aria-label", "aria-describedby", "aria-labelledby"];
8
+ const _hoisted_3 = ["data-pm-id"];
9
+ const _hoisted_4 = { class: "flex pb-4 pl-8 pr-4 pt-4" };
10
+ const _hoisted_5 = ["id"];
11
+ const _hoisted_6 = { class: "ml-auto" };
12
+ const _hoisted_7 = {
7
13
  key: 0,
8
14
  class: "mb-4 px-8"
9
- }, pe = ["id"], ve = { class: "mt-6 px-8 pt-6" }, N = 'a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), [tabindex]:not([tabindex="-1"])', be = /* @__PURE__ */ R({
10
- name: "PModal",
15
+ };
16
+ const _hoisted_8 = ["id"];
17
+ const _hoisted_9 = { class: "mt-6 px-8 pt-6" };
18
+ const FOCUSABLE_ELEMENTS = 'a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), [tabindex]:not([tabindex="-1"])';
19
+ const _sfc_main = /* @__PURE__ */ defineComponent({
20
+ ...{
21
+ name: "PModal"
22
+ },
11
23
  __name: "p-modal",
12
24
  props: {
13
25
  name: {
@@ -60,15 +72,15 @@ const ie = ["data-pm-backdrop-id"], re = ["data-pm-wrapper-id", "aria-label", "a
60
72
  },
61
73
  live: {
62
74
  type: Boolean,
63
- default: !1
75
+ default: false
64
76
  },
65
77
  enableClose: {
66
78
  type: Boolean,
67
- default: !0
79
+ default: true
68
80
  },
69
81
  modelValue: {
70
82
  type: Boolean,
71
- default: !1
83
+ default: false
72
84
  },
73
85
  closeLabel: {
74
86
  type: String,
@@ -76,7 +88,7 @@ const ie = ["data-pm-backdrop-id"], re = ["data-pm-wrapper-id", "aria-label", "a
76
88
  },
77
89
  disabled: {
78
90
  type: Boolean,
79
- default: !1
91
+ default: false
80
92
  },
81
93
  errorMsg: {
82
94
  type: String,
@@ -96,188 +108,263 @@ const ie = ["data-pm-backdrop-id"], re = ["data-pm-wrapper-id", "aria-label", "a
96
108
  "closed",
97
109
  "update:modelValue"
98
110
  ],
99
- setup(t, { emit: Z }) {
100
- G((e) => ({
101
- "8a536574": t.maxWidth
111
+ setup(__props, { emit: __emit }) {
112
+ useCssVars((_ctx) => ({
113
+ "8a536574": __props.maxWidth
102
114
  }));
103
- let v = 0;
104
- const s = Z, o = t, x = ne(), r = c(0), n = c(""), b = c(!1), y = c(!1), d = c(null), f = c(null);
105
- J(() => {
106
- o.live && (y.value = !0);
107
- }), Q(() => {
108
- var l;
109
- n.value = "pm-" + ((l = X()) == null ? void 0 : l.uid);
110
- const e = o.name ? () => x.state.modals[o.name] : () => o.modelValue;
111
- Y(
112
- e,
113
- (a) => {
114
- a ? (y.value = !0, E(() => {
115
- b.value = !0;
116
- })) : b.value = !1;
115
+ let animatingZIndex = 0;
116
+ const emit = __emit;
117
+ const props = __props;
118
+ const modal = usePModal();
119
+ const zIndex = ref(0);
120
+ const id = ref("");
121
+ const show = ref(false);
122
+ const mount = ref(false);
123
+ const elToFocus = ref(null);
124
+ const pmWrapper = ref(null);
125
+ onBeforeMount(() => {
126
+ if (props.live) {
127
+ mount.value = true;
128
+ }
129
+ });
130
+ onMounted(() => {
131
+ var _a;
132
+ id.value = "pm-" + ((_a = getCurrentInstance()) == null ? void 0 : _a.uid);
133
+ const valueToWatch = !props.name ? () => props.modelValue : () => modal.state.modals[props.name];
134
+ watch(
135
+ valueToWatch,
136
+ (newVal) => {
137
+ if (newVal) {
138
+ mount.value = true;
139
+ nextTick(() => {
140
+ show.value = true;
141
+ });
142
+ } else {
143
+ show.value = false;
144
+ }
117
145
  },
118
146
  {
119
- immediate: !0
147
+ immediate: true
120
148
  }
121
149
  );
122
- }), _(() => {
123
- d.value = null, o.name && x.hide(o.name);
124
150
  });
125
- const C = () => {
126
- o.enableClose === !0 && (s("update:modelValue", !1), o.name && x.hide(o.name));
127
- }, j = (e) => {
128
- e.target === f.value && C();
129
- }, q = (e) => {
130
- var l;
131
- if ((e.which === 27 || e.keyCode === 27) && C(), e.which === 9 || e.keyCode === 9) {
132
- const a = [].slice.call((l = f.value) == null ? void 0 : l.querySelectorAll(N)).filter(function(u) {
133
- return !!(u.offsetWidth || u.offsetHeight || u.getClientRects().length);
151
+ onBeforeUnmount(() => {
152
+ elToFocus.value = null;
153
+ props.name && modal.hide(props.name);
154
+ });
155
+ const close = () => {
156
+ if (props.enableClose === true) {
157
+ emit("update:modelValue", false);
158
+ props.name && modal.hide(props.name);
159
+ }
160
+ };
161
+ const clickOutside = (e) => {
162
+ if (e.target === pmWrapper.value) {
163
+ close();
164
+ }
165
+ };
166
+ const keydown = (e) => {
167
+ var _a;
168
+ if (e.which === 27 || e.keyCode === 27) {
169
+ close();
170
+ }
171
+ if (e.which === 9 || e.keyCode === 9) {
172
+ const all = [].slice.call((_a = pmWrapper.value) == null ? void 0 : _a.querySelectorAll(FOCUSABLE_ELEMENTS)).filter(function(el) {
173
+ return !!(el.offsetWidth || el.offsetHeight || el.getClientRects().length);
134
174
  });
135
- e.shiftKey ? (e.target === a[0] || e.target === f.value) && (e.preventDefault(), a[a.length - 1].focus()) : e.target === a[a.length - 1] && (e.preventDefault(), a[0].focus());
175
+ if (e.shiftKey) {
176
+ if (e.target === all[0] || e.target === pmWrapper.value) {
177
+ e.preventDefault();
178
+ all[all.length - 1].focus();
179
+ }
180
+ } else {
181
+ if (e.target === all[all.length - 1]) {
182
+ e.preventDefault();
183
+ all[0].focus();
184
+ }
185
+ }
186
+ }
187
+ };
188
+ const getAllVisibleWrappers = () => {
189
+ return [].slice.call(document.querySelectorAll("[data-pm-wrapper-id]")).filter((w) => w.style.display !== "none");
190
+ };
191
+ const getTopZindex = () => {
192
+ return getAllVisibleWrappers().reduce((acc, curr) => {
193
+ return parseInt(curr.style.zIndex) > acc ? parseInt(curr.style.zIndex) : acc;
194
+ }, 0);
195
+ };
196
+ const handleFocus = (wrapper) => {
197
+ const autofocus = wrapper.querySelector("[autofocus]");
198
+ if (autofocus) {
199
+ autofocus.focus();
200
+ } else {
201
+ const focusable = wrapper.querySelectorAll(FOCUSABLE_ELEMENTS);
202
+ focusable.length ? focusable[0].focus() : wrapper.focus();
136
203
  }
137
- }, B = () => [].slice.call(document.querySelectorAll("[data-pm-wrapper-id]")).filter((e) => e.style.display !== "none"), O = () => B().reduce((e, l) => parseInt(l.style.zIndex) > e ? parseInt(l.style.zIndex) : e, 0), T = (e) => {
138
- const l = e.querySelector("[autofocus]");
139
- if (l)
140
- l.focus();
141
- else {
142
- const a = e.querySelectorAll(N);
143
- a.length ? a[0].focus() : e.focus();
204
+ };
205
+ const beforeOpen = () => {
206
+ elToFocus.value = document.activeElement;
207
+ const lastZindex = getTopZindex();
208
+ if (animatingZIndex) {
209
+ zIndex.value = animatingZIndex + 2;
210
+ } else {
211
+ zIndex.value = lastZindex === 0 ? props.baseZindex : lastZindex + 2;
212
+ }
213
+ animatingZIndex = zIndex.value;
214
+ emit("before-open");
215
+ };
216
+ const opening = () => {
217
+ emit("opening");
218
+ };
219
+ const afterOpen = () => {
220
+ handleFocus(pmWrapper.value);
221
+ emit("opened");
222
+ };
223
+ const beforeClose = () => {
224
+ emit("before-close");
225
+ };
226
+ const closing = () => {
227
+ emit("closing");
228
+ };
229
+ const afterClose = () => {
230
+ zIndex.value = 0;
231
+ if (!props.live) {
232
+ mount.value = false;
144
233
  }
145
- }, D = () => {
146
- d.value = document.activeElement;
147
- const e = O();
148
- v ? r.value = v + 2 : r.value = e === 0 ? o.baseZindex : e + 2, v = r.value, s("before-open");
149
- }, F = () => {
150
- s("opening");
151
- }, P = () => {
152
- T(f.value), s("opened");
153
- }, K = () => {
154
- s("before-close");
155
- }, U = () => {
156
- s("closing");
157
- }, H = () => {
158
- r.value = 0, o.live || (y.value = !1), E(() => {
234
+ nextTick(() => {
159
235
  window.requestAnimationFrame(() => {
160
- var l, a;
161
- const e = O();
162
- if (e > 0) {
163
- const u = B();
164
- for (let S = 0; S < u.length; S++) {
165
- const w = u[S];
166
- if (parseInt(w.style.zIndex) === e) {
167
- w.contains(d.value) ? (l = d.value) == null || l.focus() : T(w);
236
+ var _a, _b;
237
+ const lastZindex = getTopZindex();
238
+ if (lastZindex > 0) {
239
+ const all = getAllVisibleWrappers();
240
+ for (let i = 0; i < all.length; i++) {
241
+ const wrapper = all[i];
242
+ if (parseInt(wrapper.style.zIndex) === lastZindex) {
243
+ if (wrapper.contains(elToFocus.value)) {
244
+ (_a = elToFocus.value) == null ? void 0 : _a.focus();
245
+ } else {
246
+ handleFocus(wrapper);
247
+ }
168
248
  break;
169
249
  }
170
250
  }
171
- } else
172
- document.body.contains(d.value) && ((a = d.value) == null || a.focus());
173
- v = 0, s("closed");
251
+ } else {
252
+ if (document.body.contains(elToFocus.value)) {
253
+ (_b = elToFocus.value) == null ? void 0 : _b.focus();
254
+ }
255
+ }
256
+ animatingZIndex = 0;
257
+ emit("closed");
174
258
  });
175
259
  });
176
260
  };
177
- return (e, l) => y.value ? (g(), M(ee, {
178
- key: 0,
179
- to: t.appendTo
180
- }, [
181
- k(V, {
182
- name: "pm-backdrop-transition",
183
- "enter-active-class": t.bgInClass,
184
- "leave-active-class": t.bgOutClass
185
- }, {
186
- default: I(() => [
187
- $(i("div", {
188
- "data-pm-backdrop-id": n.value,
189
- class: h(t.bgClass),
190
- style: A({ "z-index": r.value - 1 })
191
- }, null, 14, ie), [
192
- [z, b.value]
193
- ])
194
- ]),
195
- _: 1
196
- }, 8, ["enter-active-class", "leave-active-class"]),
197
- k(V, {
198
- name: "pm-transition",
199
- "enter-active-class": t.inClass,
200
- "leave-active-class": t.outClass,
201
- onBeforeEnter: D,
202
- onEnter: F,
203
- onAfterEnter: P,
204
- onBeforeLeave: K,
205
- onLeave: U,
206
- onAfterLeave: H
207
- }, {
208
- default: I(() => [
209
- $(i("div", {
210
- ref_key: "pmWrapper",
211
- ref: f,
212
- "data-pm-wrapper-id": n.value,
213
- tabindex: "-1",
214
- class: h(t.wrapperClass),
215
- style: A({ "z-index": r.value, cursor: t.enableClose ? "pointer" : "default" }),
216
- role: "dialog",
217
- "aria-label": t.title,
218
- "aria-modal": "true",
219
- "aria-describedby": `${n.value}-content`,
220
- "aria-labelledby": `${n.value}-title`,
221
- onClick: l[0] || (l[0] = (a) => j(a)),
222
- onKeydown: l[1] || (l[1] = (a) => q(a))
223
- }, [
224
- i("div", {
225
- ref: "pm",
226
- "data-pm-id": n.value,
227
- class: h(t.modalClass),
228
- style: A(t.modalStyle)
261
+ return (_ctx, _cache) => {
262
+ return mount.value ? (openBlock(), createBlock(Teleport, {
263
+ key: 0,
264
+ to: __props.appendTo
265
+ }, [
266
+ createVNode(Transition, {
267
+ name: "pm-backdrop-transition",
268
+ "enter-active-class": __props.bgInClass,
269
+ "leave-active-class": __props.bgOutClass
270
+ }, {
271
+ default: withCtx(() => [
272
+ withDirectives(createElementVNode("div", {
273
+ "data-pm-backdrop-id": id.value,
274
+ class: normalizeClass(__props.bgClass),
275
+ style: normalizeStyle({ "z-index": zIndex.value - 1 })
276
+ }, null, 14, _hoisted_1), [
277
+ [vShow, show.value]
278
+ ])
279
+ ]),
280
+ _: 1
281
+ }, 8, ["enter-active-class", "leave-active-class"]),
282
+ createVNode(Transition, {
283
+ name: "pm-transition",
284
+ "enter-active-class": __props.inClass,
285
+ "leave-active-class": __props.outClass,
286
+ onBeforeEnter: beforeOpen,
287
+ onEnter: opening,
288
+ onAfterEnter: afterOpen,
289
+ onBeforeLeave: beforeClose,
290
+ onLeave: closing,
291
+ onAfterLeave: afterClose
292
+ }, {
293
+ default: withCtx(() => [
294
+ withDirectives(createElementVNode("div", {
295
+ ref_key: "pmWrapper",
296
+ ref: pmWrapper,
297
+ "data-pm-wrapper-id": id.value,
298
+ tabindex: "-1",
299
+ class: normalizeClass(__props.wrapperClass),
300
+ style: normalizeStyle({ "z-index": zIndex.value, cursor: __props.enableClose ? "pointer" : "default" }),
301
+ role: "dialog",
302
+ "aria-label": __props.title,
303
+ "aria-modal": "true",
304
+ "aria-describedby": `${id.value}-content`,
305
+ "aria-labelledby": `${id.value}-title`,
306
+ onClick: _cache[0] || (_cache[0] = ($event) => clickOutside($event)),
307
+ onKeydown: _cache[1] || (_cache[1] = ($event) => keydown($event))
229
308
  }, [
230
- m(e.$slots, "title-wrapper", {}, () => [
231
- i("div", ue, [
232
- t.title ? (g(), L("h3", {
233
- key: 0,
234
- id: `${n.value}-title`,
235
- class: "mr-auto pt-4 text-xl font-semibold"
236
- }, W(t.title), 9, ce)) : p("", !0),
237
- i("div", fe, [
238
- t.enableClose ? (g(), M(oe, {
309
+ createElementVNode("div", {
310
+ ref: "pm",
311
+ "data-pm-id": id.value,
312
+ class: normalizeClass(__props.modalClass),
313
+ style: normalizeStyle(__props.modalStyle)
314
+ }, [
315
+ renderSlot(_ctx.$slots, "title-wrapper", {}, () => [
316
+ createElementVNode("div", _hoisted_4, [
317
+ __props.title ? (openBlock(), createElementBlock("h3", {
239
318
  key: 0,
240
- disabled: t.disabled,
241
- "aria-label": t.closeLabel,
242
- onClick: te(C, ["prevent"])
243
- }, null, 8, ["disabled", "aria-label"])) : p("", !0)
319
+ id: `${id.value}-title`,
320
+ class: "mr-auto pt-4 text-xl font-semibold"
321
+ }, toDisplayString(__props.title), 9, _hoisted_5)) : createCommentVNode("", true),
322
+ createElementVNode("div", _hoisted_6, [
323
+ __props.enableClose ? (openBlock(), createBlock(PCloseBtn, {
324
+ key: 0,
325
+ disabled: __props.disabled,
326
+ "aria-label": __props.closeLabel,
327
+ onClick: withModifiers(close, ["prevent"])
328
+ }, null, 8, ["disabled", "aria-label"])) : createCommentVNode("", true)
329
+ ])
244
330
  ])
245
- ])
246
- ], !0),
247
- t.errorMsg ? (g(), L("div", me, [
248
- k(ae, { type: "error" }, {
249
- default: I(() => [
250
- le(W(t.errorMsg), 1)
251
- ]),
252
- _: 1
253
- })
254
- ])) : p("", !0),
255
- m(e.$slots, "content-wrapper", {}, () => [
256
- i("div", {
257
- id: `${n.value}-content`,
258
- class: h([
259
- "relative grow overflow-y-auto overflow-x-hidden px-8",
260
- { "pointer-events-none opacity-50": t.disabled }
331
+ ], true),
332
+ __props.errorMsg ? (openBlock(), createElementBlock("div", _hoisted_7, [
333
+ createVNode(PAlert, { type: "error" }, {
334
+ default: withCtx(() => [
335
+ createTextVNode(toDisplayString(__props.errorMsg), 1)
336
+ ]),
337
+ _: 1
338
+ })
339
+ ])) : createCommentVNode("", true),
340
+ renderSlot(_ctx.$slots, "content-wrapper", {}, () => [
341
+ createElementVNode("div", {
342
+ id: `${id.value}-content`,
343
+ class: normalizeClass([
344
+ "relative grow overflow-y-auto overflow-x-hidden px-8",
345
+ { "pointer-events-none opacity-50": __props.disabled }
346
+ ])
347
+ }, [
348
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
349
+ ], 10, _hoisted_8)
350
+ ], true),
351
+ _ctx.$slots["footer"] ? renderSlot(_ctx.$slots, "footer-wrapper", { key: 1 }, () => [
352
+ createElementVNode("div", _hoisted_9, [
353
+ renderSlot(_ctx.$slots, "footer", {}, void 0, true)
261
354
  ])
262
- }, [
263
- m(e.$slots, "default", {}, void 0, !0)
264
- ], 10, pe)
265
- ], !0),
266
- e.$slots.footer ? m(e.$slots, "footer-wrapper", { key: 1 }, () => [
267
- i("div", ve, [
268
- m(e.$slots, "footer", {}, void 0, !0)
269
- ])
270
- ], !0) : p("", !0)
271
- ], 14, de)
272
- ], 46, re), [
273
- [z, b.value]
274
- ])
275
- ]),
276
- _: 3
277
- }, 8, ["enter-active-class", "leave-active-class"])
278
- ], 8, ["to"])) : p("", !0);
355
+ ], true) : createCommentVNode("", true)
356
+ ], 14, _hoisted_3)
357
+ ], 46, _hoisted_2), [
358
+ [vShow, show.value]
359
+ ])
360
+ ]),
361
+ _: 3
362
+ }, 8, ["enter-active-class", "leave-active-class"])
363
+ ], 8, ["to"])) : createCommentVNode("", true);
364
+ };
279
365
  }
280
- }), Se = /* @__PURE__ */ se(be, [["__scopeId", "data-v-ee599a02"]]);
366
+ });
367
+ const pModal = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ee599a02"]]);
281
368
  export {
282
- Se as default
369
+ pModal as default
283
370
  };
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./chunks/p-pagination-info.js";
1
+ import { _ as _sfc_main } from "./chunks/p-pagination-info.js";
2
2
  export {
3
- f as default
3
+ _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./chunks/p-pagination.js";
1
+ import { _ as _sfc_main } from "./chunks/p-pagination.js";
2
2
  export {
3
- f as default
3
+ _sfc_main as default
4
4
  };
@@ -1,39 +1,42 @@
1
- import { defineComponent as l, resolveDirective as n, openBlock as r, createElementBlock as o, Fragment as i, renderList as a, withDirectives as p, normalizeStyle as u } from "vue";
2
- import { _ as c } from "./chunks/_plugin-vue_export-helper.js";
3
- const d = l({
1
+ import { defineComponent, resolveDirective, openBlock, createElementBlock, Fragment, renderList, withDirectives, normalizeStyle } from "vue";
2
+ import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
3
+ const _sfc_main = defineComponent({
4
4
  name: "PProgressBar",
5
5
  props: {
6
6
  total: {
7
7
  type: Number,
8
- required: !0
8
+ required: true
9
9
  },
10
10
  items: {
11
11
  type: Array,
12
- required: !0
12
+ required: true
13
13
  }
14
14
  }
15
- }), f = {
15
+ });
16
+ const _hoisted_1 = {
16
17
  class: "flex justify-start overflow-hidden rounded bg-p-blue-20",
17
18
  role: "progressbar"
18
19
  };
19
- function _(t, m, v, g, y, b) {
20
- const s = n("tooltip");
21
- return r(), o("div", f, [
22
- (r(!0), o(i, null, a(t.items, (e) => p((r(), o("div", {
23
- key: `progress-value-${e.color}`,
24
- class: "h-full",
25
- style: u({ width: `${e.value / t.total * 100}%`, background: e.color })
26
- }, null, 4)), [
27
- [
28
- s,
29
- e.label,
30
- void 0,
31
- { top: !0 }
32
- ]
33
- ])), 128))
20
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
21
+ const _directive_tooltip = resolveDirective("tooltip");
22
+ return openBlock(), createElementBlock("div", _hoisted_1, [
23
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.items, (item) => {
24
+ return withDirectives((openBlock(), createElementBlock("div", {
25
+ key: `progress-value-${item.color}`,
26
+ class: "h-full",
27
+ style: normalizeStyle({ width: `${item.value / _ctx.total * 100}%`, background: item.color })
28
+ }, null, 4)), [
29
+ [
30
+ _directive_tooltip,
31
+ item.label,
32
+ void 0,
33
+ { top: true }
34
+ ]
35
+ ]);
36
+ }), 128))
34
37
  ]);
35
38
  }
36
- const k = /* @__PURE__ */ c(d, [["render", _]]);
39
+ const pProgressBar = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
37
40
  export {
38
- k as default
41
+ pProgressBar as default
39
42
  };
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./chunks/p-ring-loader.js";
1
+ import { _ as _sfc_main } from "./chunks/p-ring-loader.js";
2
2
  export {
3
- f as default
3
+ _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./chunks/p-select-btn.js";
1
+ import { _ as _sfc_main } from "./chunks/p-select-btn.js";
2
2
  export {
3
- f as default
3
+ _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- const t = { sm: "h-8 text-sm", md: "h-10 text-base", lg: "h-12 text-lg" };
1
+ const SIZES = { sm: `h-8 text-sm`, md: `h-10 text-base`, lg: `h-12 text-lg` };
2
2
  export {
3
- t as SIZES
3
+ SIZES
4
4
  };