@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.
- package/dist/cjs/chunks/_plugin-vue_export-helper.js +9 -1
- package/dist/cjs/chunks/p-action-bar.js +60 -1
- package/dist/cjs/chunks/p-card.js +28 -1
- package/dist/cjs/chunks/p-checkbox.js +24 -1
- package/dist/cjs/chunks/p-dropdown-select.js +414 -1
- package/dist/cjs/chunks/p-input-percent.js +53 -1
- package/dist/cjs/chunks/p-pagination-info.js +66 -1
- package/dist/cjs/chunks/p-pagination.js +122 -1
- package/dist/cjs/chunks/p-ring-loader.js +81 -1
- package/dist/cjs/chunks/p-select-btn.js +97 -1
- package/dist/cjs/chunks/p-select.js +123 -1
- package/dist/cjs/chunks/p-table-loader.js +70 -1
- package/dist/cjs/chunks/p-tabs.js +52 -1
- package/dist/cjs/config.js +105 -1
- package/dist/cjs/currency.js +9 -1
- package/dist/cjs/dom.js +27 -1
- package/dist/cjs/index.js +976 -1
- package/dist/cjs/inputClassesMixin.js +50 -1
- package/dist/cjs/inputClassesShared.js +76 -1
- package/dist/cjs/listKeyboardNavigation.js +110 -1
- package/dist/cjs/number.js +9 -1
- package/dist/cjs/object.js +4 -1
- package/dist/cjs/p-action-bar.js +3 -1
- package/dist/cjs/p-alert.js +65 -1
- package/dist/cjs/p-avatar.js +71 -1
- package/dist/cjs/p-btn.js +358 -2
- package/dist/cjs/p-card.js +3 -1
- package/dist/cjs/p-checkbox.js +3 -1
- package/dist/cjs/p-chips.js +110 -1
- package/dist/cjs/p-close-btn.js +36 -1
- package/dist/cjs/p-date-picker.js +139 -1
- package/dist/cjs/p-drawer.js +253 -1
- package/dist/cjs/p-dropdown-select.js +3 -1
- package/dist/cjs/p-dropdown.js +138 -1
- package/dist/cjs/p-file-upload.js +21 -1
- package/dist/cjs/p-info-icon.js +35 -1
- package/dist/cjs/p-inline-date-picker.js +142 -1
- package/dist/cjs/p-input-number.js +146 -1
- package/dist/cjs/p-input-percent.js +3 -1
- package/dist/cjs/p-input-search.js +110 -1
- package/dist/cjs/p-input.js +89 -1
- package/dist/cjs/p-loading.js +38 -1
- package/dist/cjs/p-modal.js +369 -1
- package/dist/cjs/p-pagination-info.js +3 -1
- package/dist/cjs/p-pagination.js +3 -1
- package/dist/cjs/p-progress-bar.js +41 -1
- package/dist/cjs/p-ring-loader.js +3 -1
- package/dist/cjs/p-select-btn.js +3 -1
- package/dist/cjs/p-select-list.js +4 -1
- package/dist/cjs/p-select-pill.js +111 -1
- package/dist/cjs/p-select.js +3 -1
- package/dist/cjs/p-skeleton-loader.js +73 -1
- package/dist/cjs/p-table-filter-icon.js +20 -1
- package/dist/cjs/p-table-header-cell.js +75 -1
- package/dist/cjs/p-table-loader.js +3 -1
- package/dist/cjs/p-table-sort.js +8 -1
- package/dist/cjs/p-table-td.js +88 -1
- package/dist/cjs/p-table.js +12 -1
- package/dist/cjs/p-tabs.js +3 -1
- package/dist/cjs/p-textarea.js +73 -1
- package/dist/cjs/p-toggle.js +114 -1
- package/dist/cjs/pagination.js +29 -1
- package/dist/cjs/string.js +12 -1
- package/dist/cjs/tailwind.js +4353 -1
- package/dist/cjs/text.js +16 -1
- package/dist/cjs/useInputClasses.js +44 -1
- package/dist/cjs/usePLoading.js +35 -1
- package/dist/cjs/usePModal.js +21 -1
- package/dist/cjs/usePTableColResize.js +81 -1
- package/dist/cjs/usePTableRowVirtualizer.js +31 -1
- package/dist/cjs/useSelectList.js +256 -1
- package/dist/es/chunks/_plugin-vue_export-helper.js +7 -6
- package/dist/es/chunks/p-action-bar.js +45 -36
- package/dist/es/chunks/p-card.js +18 -14
- package/dist/es/chunks/p-checkbox.js +14 -11
- package/dist/es/chunks/p-dropdown-select.js +232 -183
- package/dist/es/chunks/p-input-percent.js +34 -25
- package/dist/es/chunks/p-pagination-info.js +30 -24
- package/dist/es/chunks/p-pagination.js +78 -48
- package/dist/es/chunks/p-ring-loader.js +63 -40
- package/dist/es/chunks/p-select-btn.js +80 -59
- package/dist/es/chunks/p-select.js +81 -54
- package/dist/es/chunks/p-table-loader.js +46 -32
- package/dist/es/chunks/p-tabs.js +35 -29
- package/dist/es/config.js +2 -2
- package/dist/es/currency.js +3 -3
- package/dist/es/dom.js +24 -12
- package/dist/es/index.js +703 -561
- package/dist/es/inputClassesMixin.js +20 -14
- package/dist/es/inputClassesShared.js +60 -45
- package/dist/es/listKeyboardNavigation.js +86 -36
- package/dist/es/number.js +7 -2
- package/dist/es/object.js +2 -2
- package/dist/es/p-action-bar.js +2 -2
- package/dist/es/p-alert.js +35 -30
- package/dist/es/p-avatar.js +30 -27
- package/dist/es/p-btn.js +209 -164
- package/dist/es/p-card.js +2 -2
- package/dist/es/p-checkbox.js +2 -2
- package/dist/es/p-chips.js +60 -40
- package/dist/es/p-close-btn.js +20 -16
- package/dist/es/p-date-picker.js +66 -58
- package/dist/es/p-drawer.js +108 -89
- package/dist/es/p-dropdown-select.js +2 -2
- package/dist/es/p-dropdown.js +52 -33
- package/dist/es/p-file-upload.js +17 -9
- package/dist/es/p-info-icon.js +21 -16
- package/dist/es/p-inline-date-picker.js +64 -53
- package/dist/es/p-input-number.js +84 -66
- package/dist/es/p-input-percent.js +2 -2
- package/dist/es/p-input-search.js +43 -41
- package/dist/es/p-input.js +51 -45
- package/dist/es/p-loading.js +31 -22
- package/dist/es/p-modal.js +261 -174
- package/dist/es/p-pagination-info.js +2 -2
- package/dist/es/p-pagination.js +2 -2
- package/dist/es/p-progress-bar.js +26 -23
- package/dist/es/p-ring-loader.js +2 -2
- package/dist/es/p-select-btn.js +2 -2
- package/dist/es/p-select-list.js +2 -2
- package/dist/es/p-select-pill.js +58 -41
- package/dist/es/p-select.js +2 -2
- package/dist/es/p-skeleton-loader.js +34 -29
- package/dist/es/p-table-filter-icon.js +11 -11
- package/dist/es/p-table-header-cell.js +38 -33
- package/dist/es/p-table-loader.js +2 -2
- package/dist/es/p-table-sort.js +2 -2
- package/dist/es/p-table-td.js +76 -29
- package/dist/es/p-table.js +10 -6
- package/dist/es/p-tabs.js +2 -2
- package/dist/es/p-textarea.js +36 -34
- package/dist/es/p-toggle.js +53 -48
- package/dist/es/pagination.js +25 -8
- package/dist/es/string.js +10 -2
- package/dist/es/tailwind.js +1660 -1101
- package/dist/es/text.js +13 -8
- package/dist/es/useInputClasses.js +38 -22
- package/dist/es/usePLoading.js +31 -15
- package/dist/es/usePModal.js +15 -12
- package/dist/es/usePTableColResize.js +71 -39
- package/dist/es/usePTableRowVirtualizer.js +24 -15
- package/dist/es/useSelectList.js +234 -121
- package/dist/style.css +2124 -1
- package/package.json +1 -1
package/dist/es/p-modal.js
CHANGED
|
@@ -1,13 +1,25 @@
|
|
|
1
|
-
import { defineComponent
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { usePModal
|
|
5
|
-
import { _ as
|
|
6
|
-
const
|
|
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
|
-
}
|
|
10
|
-
|
|
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:
|
|
75
|
+
default: false
|
|
64
76
|
},
|
|
65
77
|
enableClose: {
|
|
66
78
|
type: Boolean,
|
|
67
|
-
default:
|
|
79
|
+
default: true
|
|
68
80
|
},
|
|
69
81
|
modelValue: {
|
|
70
82
|
type: Boolean,
|
|
71
|
-
default:
|
|
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:
|
|
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(
|
|
100
|
-
|
|
101
|
-
"8a536574":
|
|
111
|
+
setup(__props, { emit: __emit }) {
|
|
112
|
+
useCssVars((_ctx) => ({
|
|
113
|
+
"8a536574": __props.maxWidth
|
|
102
114
|
}));
|
|
103
|
-
let
|
|
104
|
-
const
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
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:
|
|
147
|
+
immediate: true
|
|
120
148
|
}
|
|
121
149
|
);
|
|
122
|
-
}), _(() => {
|
|
123
|
-
d.value = null, o.name && x.hide(o.name);
|
|
124
150
|
});
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
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
|
-
|
|
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
|
-
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
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
|
-
|
|
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
|
|
161
|
-
const
|
|
162
|
-
if (
|
|
163
|
-
const
|
|
164
|
-
for (let
|
|
165
|
-
const
|
|
166
|
-
if (parseInt(
|
|
167
|
-
|
|
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(
|
|
173
|
-
|
|
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 (
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
"
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
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
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
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
|
-
|
|
241
|
-
"
|
|
242
|
-
|
|
243
|
-
|
|
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
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
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
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
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
|
-
})
|
|
366
|
+
});
|
|
367
|
+
const pModal = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ee599a02"]]);
|
|
281
368
|
export {
|
|
282
|
-
|
|
369
|
+
pModal as default
|
|
283
370
|
};
|
package/dist/es/p-pagination.js
CHANGED
|
@@ -1,39 +1,42 @@
|
|
|
1
|
-
import { defineComponent
|
|
2
|
-
import { _ as
|
|
3
|
-
const
|
|
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:
|
|
8
|
+
required: true
|
|
9
9
|
},
|
|
10
10
|
items: {
|
|
11
11
|
type: Array,
|
|
12
|
-
required:
|
|
12
|
+
required: true
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
-
})
|
|
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
|
|
20
|
-
const
|
|
21
|
-
return
|
|
22
|
-
(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
[
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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
|
|
39
|
+
const pProgressBar = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
37
40
|
export {
|
|
38
|
-
|
|
41
|
+
pProgressBar as default
|
|
39
42
|
};
|
package/dist/es/p-ring-loader.js
CHANGED
package/dist/es/p-select-btn.js
CHANGED
package/dist/es/p-select-list.js
CHANGED