@pequity/squirrel 1.0.20-beta.3 → 1.0.20
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/squirrel.cjs.js +5 -0
- package/dist/squirrel.es.js +8220 -0
- package/dist/style.css +1 -2124
- package/package.json +20 -22
- package/dist/cjs/chunks/_plugin-vue_export-helper.js +0 -9
- package/dist/cjs/chunks/p-action-bar.js +0 -60
- package/dist/cjs/chunks/p-card.js +0 -28
- package/dist/cjs/chunks/p-checkbox.js +0 -24
- package/dist/cjs/chunks/p-dropdown-select.js +0 -414
- package/dist/cjs/chunks/p-input-percent.js +0 -53
- package/dist/cjs/chunks/p-pagination-info.js +0 -66
- package/dist/cjs/chunks/p-pagination.js +0 -122
- package/dist/cjs/chunks/p-ring-loader.js +0 -81
- package/dist/cjs/chunks/p-select-btn.js +0 -97
- package/dist/cjs/chunks/p-select.js +0 -123
- package/dist/cjs/chunks/p-table-loader.js +0 -70
- package/dist/cjs/chunks/p-tabs.js +0 -52
- package/dist/cjs/config.js +0 -105
- package/dist/cjs/currency.js +0 -9
- package/dist/cjs/dom.js +0 -27
- package/dist/cjs/index.js +0 -976
- package/dist/cjs/inputClassesMixin.js +0 -50
- package/dist/cjs/inputClassesShared.js +0 -76
- package/dist/cjs/listKeyboardNavigation.js +0 -110
- package/dist/cjs/number.js +0 -9
- package/dist/cjs/object.js +0 -4
- package/dist/cjs/p-action-bar.js +0 -3
- package/dist/cjs/p-alert.js +0 -65
- package/dist/cjs/p-avatar.js +0 -71
- package/dist/cjs/p-btn.js +0 -361
- package/dist/cjs/p-card.js +0 -3
- package/dist/cjs/p-checkbox.js +0 -3
- package/dist/cjs/p-chips.js +0 -110
- package/dist/cjs/p-close-btn.js +0 -36
- package/dist/cjs/p-date-picker.js +0 -139
- package/dist/cjs/p-drawer.js +0 -253
- package/dist/cjs/p-dropdown-select.js +0 -3
- package/dist/cjs/p-dropdown.js +0 -138
- package/dist/cjs/p-file-upload.js +0 -21
- package/dist/cjs/p-info-icon.js +0 -35
- package/dist/cjs/p-inline-date-picker.js +0 -142
- package/dist/cjs/p-input-number.js +0 -146
- package/dist/cjs/p-input-percent.js +0 -3
- package/dist/cjs/p-input-search.js +0 -110
- package/dist/cjs/p-input.js +0 -89
- package/dist/cjs/p-loading.js +0 -38
- package/dist/cjs/p-modal.js +0 -369
- package/dist/cjs/p-pagination-info.js +0 -3
- package/dist/cjs/p-pagination.js +0 -3
- package/dist/cjs/p-progress-bar.js +0 -41
- package/dist/cjs/p-ring-loader.js +0 -3
- package/dist/cjs/p-select-btn.js +0 -3
- package/dist/cjs/p-select-list.js +0 -4
- package/dist/cjs/p-select-pill.js +0 -111
- package/dist/cjs/p-select.js +0 -3
- package/dist/cjs/p-skeleton-loader.js +0 -73
- package/dist/cjs/p-table-filter-icon.js +0 -20
- package/dist/cjs/p-table-header-cell.js +0 -75
- package/dist/cjs/p-table-loader.js +0 -3
- package/dist/cjs/p-table-sort.js +0 -8
- package/dist/cjs/p-table-td.js +0 -88
- package/dist/cjs/p-table.js +0 -12
- package/dist/cjs/p-tabs.js +0 -3
- package/dist/cjs/p-textarea.js +0 -73
- package/dist/cjs/p-toggle.js +0 -114
- package/dist/cjs/pagination.js +0 -29
- package/dist/cjs/string.js +0 -12
- package/dist/cjs/tailwind.js +0 -4353
- package/dist/cjs/text.js +0 -16
- package/dist/cjs/useInputClasses.js +0 -44
- package/dist/cjs/usePLoading.js +0 -35
- package/dist/cjs/usePModal.js +0 -21
- package/dist/cjs/usePTableColResize.js +0 -81
- package/dist/cjs/usePTableRowVirtualizer.js +0 -31
- package/dist/cjs/useSelectList.js +0 -256
- package/dist/es/chunks/_plugin-vue_export-helper.js +0 -10
- package/dist/es/chunks/p-action-bar.js +0 -61
- package/dist/es/chunks/p-card.js +0 -29
- package/dist/es/chunks/p-checkbox.js +0 -25
- package/dist/es/chunks/p-dropdown-select.js +0 -415
- package/dist/es/chunks/p-input-percent.js +0 -54
- package/dist/es/chunks/p-pagination-info.js +0 -67
- package/dist/es/chunks/p-pagination.js +0 -123
- package/dist/es/chunks/p-ring-loader.js +0 -82
- package/dist/es/chunks/p-select-btn.js +0 -98
- package/dist/es/chunks/p-select.js +0 -124
- package/dist/es/chunks/p-table-loader.js +0 -71
- package/dist/es/chunks/p-tabs.js +0 -53
- package/dist/es/config.js +0 -105
- package/dist/es/currency.js +0 -9
- package/dist/es/dom.js +0 -27
- package/dist/es/index.js +0 -978
- package/dist/es/inputClassesMixin.js +0 -51
- package/dist/es/inputClassesShared.js +0 -76
- package/dist/es/listKeyboardNavigation.js +0 -110
- package/dist/es/number.js +0 -9
- package/dist/es/object.js +0 -4
- package/dist/es/p-action-bar.js +0 -4
- package/dist/es/p-alert.js +0 -66
- package/dist/es/p-avatar.js +0 -72
- package/dist/es/p-btn.js +0 -362
- package/dist/es/p-card.js +0 -4
- package/dist/es/p-checkbox.js +0 -4
- package/dist/es/p-chips.js +0 -111
- package/dist/es/p-close-btn.js +0 -37
- package/dist/es/p-date-picker.js +0 -140
- package/dist/es/p-drawer.js +0 -254
- package/dist/es/p-dropdown-select.js +0 -4
- package/dist/es/p-dropdown.js +0 -139
- package/dist/es/p-file-upload.js +0 -21
- package/dist/es/p-info-icon.js +0 -36
- package/dist/es/p-inline-date-picker.js +0 -143
- package/dist/es/p-input-number.js +0 -147
- package/dist/es/p-input-percent.js +0 -4
- package/dist/es/p-input-search.js +0 -111
- package/dist/es/p-input.js +0 -90
- package/dist/es/p-loading.js +0 -39
- package/dist/es/p-modal.js +0 -370
- package/dist/es/p-pagination-info.js +0 -4
- package/dist/es/p-pagination.js +0 -4
- package/dist/es/p-progress-bar.js +0 -42
- package/dist/es/p-ring-loader.js +0 -4
- package/dist/es/p-select-btn.js +0 -4
- package/dist/es/p-select-list.js +0 -4
- package/dist/es/p-select-pill.js +0 -112
- package/dist/es/p-select.js +0 -4
- package/dist/es/p-skeleton-loader.js +0 -74
- package/dist/es/p-table-filter-icon.js +0 -21
- package/dist/es/p-table-header-cell.js +0 -76
- package/dist/es/p-table-loader.js +0 -4
- package/dist/es/p-table-sort.js +0 -8
- package/dist/es/p-table-td.js +0 -89
- package/dist/es/p-table.js +0 -12
- package/dist/es/p-tabs.js +0 -4
- package/dist/es/p-textarea.js +0 -74
- package/dist/es/p-toggle.js +0 -115
- package/dist/es/pagination.js +0 -29
- package/dist/es/string.js +0 -12
- package/dist/es/tailwind.js +0 -4353
- package/dist/es/text.js +0 -16
- package/dist/es/useInputClasses.js +0 -44
- package/dist/es/usePLoading.js +0 -35
- package/dist/es/usePModal.js +0 -21
- package/dist/es/usePTableColResize.js +0 -81
- package/dist/es/usePTableRowVirtualizer.js +0 -31
- package/dist/es/useSelectList.js +0 -256
package/dist/cjs/p-drawer.js
DELETED
|
@@ -1,253 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const pAlert = require("./p-alert.js");
|
|
3
|
-
const pCloseBtn = require("./p-close-btn.js");
|
|
4
|
-
const vue = require("vue");
|
|
5
|
-
const _pluginVue_exportHelper = require("./chunks/_plugin-vue_export-helper.js");
|
|
6
|
-
const _sfc_main = vue.defineComponent({
|
|
7
|
-
name: "PDrawer",
|
|
8
|
-
components: {
|
|
9
|
-
PAlert: pAlert,
|
|
10
|
-
PCloseBtn: pCloseBtn
|
|
11
|
-
},
|
|
12
|
-
props: {
|
|
13
|
-
appendTo: {
|
|
14
|
-
type: String,
|
|
15
|
-
default: "body"
|
|
16
|
-
},
|
|
17
|
-
title: {
|
|
18
|
-
type: String,
|
|
19
|
-
default: ""
|
|
20
|
-
},
|
|
21
|
-
disabled: {
|
|
22
|
-
type: Boolean,
|
|
23
|
-
default: false
|
|
24
|
-
},
|
|
25
|
-
errorMsg: {
|
|
26
|
-
type: String,
|
|
27
|
-
default: ""
|
|
28
|
-
},
|
|
29
|
-
position: {
|
|
30
|
-
type: String,
|
|
31
|
-
default: "right"
|
|
32
|
-
},
|
|
33
|
-
zIndex: {
|
|
34
|
-
type: Number,
|
|
35
|
-
default: 900
|
|
36
|
-
},
|
|
37
|
-
drawerStyle: {
|
|
38
|
-
type: Object,
|
|
39
|
-
default: () => ({})
|
|
40
|
-
},
|
|
41
|
-
drawerClass: {
|
|
42
|
-
type: String,
|
|
43
|
-
default: "drawer"
|
|
44
|
-
},
|
|
45
|
-
inClass: {
|
|
46
|
-
type: String,
|
|
47
|
-
default: ""
|
|
48
|
-
},
|
|
49
|
-
outClass: {
|
|
50
|
-
type: String,
|
|
51
|
-
default: ""
|
|
52
|
-
},
|
|
53
|
-
live: {
|
|
54
|
-
type: Boolean,
|
|
55
|
-
default: false
|
|
56
|
-
},
|
|
57
|
-
modelValue: {
|
|
58
|
-
type: Boolean,
|
|
59
|
-
default: false
|
|
60
|
-
},
|
|
61
|
-
closeLabel: {
|
|
62
|
-
type: String,
|
|
63
|
-
default: "Close"
|
|
64
|
-
},
|
|
65
|
-
showBackdrop: {
|
|
66
|
-
type: Boolean,
|
|
67
|
-
default: false
|
|
68
|
-
},
|
|
69
|
-
enableClose: {
|
|
70
|
-
type: Boolean,
|
|
71
|
-
default: true
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
emits: ["update:modelValue", "before-open", "opening", "opened", "before-close", "closing", "closed"],
|
|
75
|
-
data() {
|
|
76
|
-
return {
|
|
77
|
-
id: null,
|
|
78
|
-
show: false,
|
|
79
|
-
mount: false
|
|
80
|
-
};
|
|
81
|
-
},
|
|
82
|
-
computed: {
|
|
83
|
-
transitionInClass() {
|
|
84
|
-
return this.inClass || this.position === "right" ? "slideInRight" : "slideInLeft";
|
|
85
|
-
},
|
|
86
|
-
transitionOutClass() {
|
|
87
|
-
return this.outClass || this.position === "right" ? "slideOutRight" : "slideOutLeft";
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
created() {
|
|
91
|
-
if (this.live) {
|
|
92
|
-
this.mount = true;
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
|
-
mounted() {
|
|
96
|
-
this.id = "drawer-" + this.$.uid;
|
|
97
|
-
this.$watch(
|
|
98
|
-
"modelValue",
|
|
99
|
-
(newVal) => {
|
|
100
|
-
if (newVal) {
|
|
101
|
-
this.mount = true;
|
|
102
|
-
this.$nextTick(() => {
|
|
103
|
-
this.show = true;
|
|
104
|
-
});
|
|
105
|
-
} else {
|
|
106
|
-
this.show = false;
|
|
107
|
-
}
|
|
108
|
-
},
|
|
109
|
-
{ immediate: true }
|
|
110
|
-
);
|
|
111
|
-
},
|
|
112
|
-
methods: {
|
|
113
|
-
close() {
|
|
114
|
-
if (this.enableClose === true) {
|
|
115
|
-
this.$emit("update:modelValue", false);
|
|
116
|
-
}
|
|
117
|
-
},
|
|
118
|
-
beforeOpen() {
|
|
119
|
-
this.$emit("before-open");
|
|
120
|
-
},
|
|
121
|
-
opening() {
|
|
122
|
-
this.$emit("opening");
|
|
123
|
-
},
|
|
124
|
-
opened() {
|
|
125
|
-
this.$emit("opened");
|
|
126
|
-
},
|
|
127
|
-
beforeClose() {
|
|
128
|
-
this.$emit("before-close");
|
|
129
|
-
},
|
|
130
|
-
closing() {
|
|
131
|
-
this.$emit("closing");
|
|
132
|
-
},
|
|
133
|
-
closed() {
|
|
134
|
-
if (!this.live) {
|
|
135
|
-
this.mount = false;
|
|
136
|
-
}
|
|
137
|
-
this.$nextTick(() => {
|
|
138
|
-
this.$emit("closed");
|
|
139
|
-
});
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
});
|
|
143
|
-
const _hoisted_1 = ["data-drawer-id", "aria-label", "aria-describedby", "aria-labelledby"];
|
|
144
|
-
const _hoisted_2 = ["id"];
|
|
145
|
-
const _hoisted_3 = {
|
|
146
|
-
key: 0,
|
|
147
|
-
class: "px-6 pt-6"
|
|
148
|
-
};
|
|
149
|
-
const _hoisted_4 = { class: "whitespace-pre-line" };
|
|
150
|
-
const _hoisted_5 = { class: "footer p-6" };
|
|
151
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
152
|
-
const _component_PCloseBtn = vue.resolveComponent("PCloseBtn");
|
|
153
|
-
const _component_PAlert = vue.resolveComponent("PAlert");
|
|
154
|
-
return _ctx.mount ? (vue.openBlock(), vue.createBlock(vue.Teleport, {
|
|
155
|
-
key: 0,
|
|
156
|
-
to: _ctx.appendTo
|
|
157
|
-
}, [
|
|
158
|
-
vue.createVNode(vue.Transition, {
|
|
159
|
-
name: "pd-backdrop-transition",
|
|
160
|
-
"enter-active-class": "fadeIn",
|
|
161
|
-
"leave-active-class": "fadeOut"
|
|
162
|
-
}, {
|
|
163
|
-
default: vue.withCtx(() => [
|
|
164
|
-
vue.withDirectives(vue.createElementVNode("div", {
|
|
165
|
-
class: vue.normalizeClass(["fixed bottom-0 left-0 right-0 top-0 bg-black bg-opacity-20", { "cursor-pointer": _ctx.enableClose }]),
|
|
166
|
-
style: vue.normalizeStyle({ "z-index": _ctx.zIndex - 1 }),
|
|
167
|
-
tabindex: "-1",
|
|
168
|
-
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.close && _ctx.close(...args))
|
|
169
|
-
}, null, 6), [
|
|
170
|
-
[vue.vShow, _ctx.show && _ctx.showBackdrop]
|
|
171
|
-
])
|
|
172
|
-
]),
|
|
173
|
-
_: 1
|
|
174
|
-
}),
|
|
175
|
-
vue.createVNode(vue.Transition, {
|
|
176
|
-
name: "drawer-transition",
|
|
177
|
-
"enter-active-class": _ctx.transitionInClass,
|
|
178
|
-
"leave-active-class": _ctx.transitionOutClass,
|
|
179
|
-
onBeforeEnter: _ctx.beforeOpen,
|
|
180
|
-
onEnter: _ctx.opening,
|
|
181
|
-
onAfterEnter: _ctx.opened,
|
|
182
|
-
onBeforeLeave: _ctx.beforeClose,
|
|
183
|
-
onLeave: _ctx.closing,
|
|
184
|
-
onAfterLeave: _ctx.closed
|
|
185
|
-
}, {
|
|
186
|
-
default: vue.withCtx(() => [
|
|
187
|
-
vue.withDirectives(vue.createElementVNode("div", {
|
|
188
|
-
"data-drawer-id": _ctx.id,
|
|
189
|
-
tabindex: "-1",
|
|
190
|
-
class: vue.normalizeClass([_ctx.drawerClass, _ctx.position === "right" ? "drawer-right" : "drawer-left"]),
|
|
191
|
-
style: vue.normalizeStyle({ "z-index": _ctx.zIndex, ..._ctx.drawerStyle }),
|
|
192
|
-
role: "dialog",
|
|
193
|
-
"aria-label": _ctx.title,
|
|
194
|
-
"aria-modal": "false",
|
|
195
|
-
"aria-describedby": `${_ctx.id}-content`,
|
|
196
|
-
"aria-labelledby": `${_ctx.id}-title`
|
|
197
|
-
}, [
|
|
198
|
-
vue.renderSlot(_ctx.$slots, "title-wrapper", {}, () => [
|
|
199
|
-
vue.createElementVNode("div", {
|
|
200
|
-
class: vue.normalizeClass([
|
|
201
|
-
"flex items-center border-b border-p-gray-30 px-6 pb-4 pt-4",
|
|
202
|
-
{ "flex-row-reverse": _ctx.position === "right" }
|
|
203
|
-
])
|
|
204
|
-
}, [
|
|
205
|
-
_ctx.enableClose ? (vue.openBlock(), vue.createBlock(_component_PCloseBtn, {
|
|
206
|
-
key: 0,
|
|
207
|
-
"aria-label": _ctx.closeLabel,
|
|
208
|
-
class: "flex-0",
|
|
209
|
-
disabled: _ctx.disabled,
|
|
210
|
-
onClick: _ctx.close
|
|
211
|
-
}, null, 8, ["aria-label", "disabled", "onClick"])) : vue.createCommentVNode("", true),
|
|
212
|
-
vue.renderSlot(_ctx.$slots, "title", {}, () => [
|
|
213
|
-
_ctx.title ? (vue.openBlock(), vue.createElementBlock("h3", {
|
|
214
|
-
key: 0,
|
|
215
|
-
id: `${_ctx.id}-title`,
|
|
216
|
-
class: vue.normalizeClass(["flex-1 text-xl font-medium", { "text-right": _ctx.position === "left" }])
|
|
217
|
-
}, vue.toDisplayString(_ctx.title), 11, _hoisted_2)) : vue.createCommentVNode("", true)
|
|
218
|
-
], true)
|
|
219
|
-
], 2)
|
|
220
|
-
], true),
|
|
221
|
-
_ctx.errorMsg ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3, [
|
|
222
|
-
vue.createVNode(_component_PAlert, { type: "error" }, {
|
|
223
|
-
default: vue.withCtx(() => [
|
|
224
|
-
vue.createElementVNode("div", _hoisted_4, vue.toDisplayString(_ctx.errorMsg), 1)
|
|
225
|
-
]),
|
|
226
|
-
_: 1
|
|
227
|
-
})
|
|
228
|
-
])) : vue.createCommentVNode("", true),
|
|
229
|
-
vue.renderSlot(_ctx.$slots, "content-wrapper", {}, () => [
|
|
230
|
-
vue.createElementVNode("div", {
|
|
231
|
-
class: vue.normalizeClass([
|
|
232
|
-
"relative grow overflow-y-auto overflow-x-hidden px-6 pt-6",
|
|
233
|
-
{ "pointer-events-none opacity-50": _ctx.disabled }
|
|
234
|
-
])
|
|
235
|
-
}, [
|
|
236
|
-
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
237
|
-
], 2)
|
|
238
|
-
], true),
|
|
239
|
-
vue.renderSlot(_ctx.$slots, "footer-wrapper", {}, () => [
|
|
240
|
-
vue.createElementVNode("div", _hoisted_5, [
|
|
241
|
-
vue.renderSlot(_ctx.$slots, "footer", {}, void 0, true)
|
|
242
|
-
])
|
|
243
|
-
], true)
|
|
244
|
-
], 14, _hoisted_1), [
|
|
245
|
-
[vue.vShow, _ctx.show]
|
|
246
|
-
])
|
|
247
|
-
]),
|
|
248
|
-
_: 3
|
|
249
|
-
}, 8, ["enter-active-class", "leave-active-class", "onBeforeEnter", "onEnter", "onAfterEnter", "onBeforeLeave", "onLeave", "onAfterLeave"])
|
|
250
|
-
], 8, ["to"])) : vue.createCommentVNode("", true);
|
|
251
|
-
}
|
|
252
|
-
const pDrawer = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-a0b8be1e"]]);
|
|
253
|
-
module.exports = pDrawer;
|
package/dist/cjs/p-dropdown.js
DELETED
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const listKeyboardNavigation = require("./listKeyboardNavigation.js");
|
|
3
|
-
const vue = require("vue");
|
|
4
|
-
const _pluginVue_exportHelper = require("./chunks/_plugin-vue_export-helper.js");
|
|
5
|
-
const ESCAPE_KEY = "Escape";
|
|
6
|
-
const _sfc_main = vue.defineComponent({
|
|
7
|
-
name: "PDropdown",
|
|
8
|
-
inheritAttrs: false,
|
|
9
|
-
props: {
|
|
10
|
-
/**
|
|
11
|
-
* Enables navigation for `.dropdown-item` using the up/down keys.
|
|
12
|
-
* This can be set to false when we're creating a generic popover.
|
|
13
|
-
*/
|
|
14
|
-
enableArrowNavigation: {
|
|
15
|
-
type: Boolean,
|
|
16
|
-
default: true
|
|
17
|
-
},
|
|
18
|
-
/**
|
|
19
|
-
* Enables closing the dropdown with the Escape key.
|
|
20
|
-
*/
|
|
21
|
-
enableCloseOnEsc: {
|
|
22
|
-
type: Boolean,
|
|
23
|
-
default: true
|
|
24
|
-
},
|
|
25
|
-
/**
|
|
26
|
-
* The selector that the arrow navigation function will use to
|
|
27
|
-
* match the items in the list.
|
|
28
|
-
*/
|
|
29
|
-
itemSelector: {
|
|
30
|
-
type: String,
|
|
31
|
-
default: ".dropdown-item:not(.disabled), .dropdown-item:not(:disabled)"
|
|
32
|
-
},
|
|
33
|
-
/**
|
|
34
|
-
* The CSS class of the "focused" dropdown item
|
|
35
|
-
*/
|
|
36
|
-
itemFocusClass: {
|
|
37
|
-
type: String,
|
|
38
|
-
default: "focus"
|
|
39
|
-
},
|
|
40
|
-
/**
|
|
41
|
-
* v-tooltip wraps the popper trigger with a div that has `display: inline-block` set by default.
|
|
42
|
-
* This prop is used to override the CSS style of that wrapper div
|
|
43
|
-
*/
|
|
44
|
-
triggerStyle: {
|
|
45
|
-
type: Object,
|
|
46
|
-
default: () => ({
|
|
47
|
-
display: "inline-block"
|
|
48
|
-
})
|
|
49
|
-
},
|
|
50
|
-
/**
|
|
51
|
-
* Custom reference element that is used to position the popper.
|
|
52
|
-
* Can be changed at runtime to create a dynamically positioned dropdown.
|
|
53
|
-
*/
|
|
54
|
-
reference: {
|
|
55
|
-
type: HTMLElement,
|
|
56
|
-
default: null
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
data() {
|
|
60
|
-
return {
|
|
61
|
-
defaultAttrs: {
|
|
62
|
-
triggers: ["click"],
|
|
63
|
-
"auto-hide": true,
|
|
64
|
-
theme: "p-dropdown-theme",
|
|
65
|
-
"popper-class": "dropdown",
|
|
66
|
-
placement: "bottom-start",
|
|
67
|
-
distance: 4,
|
|
68
|
-
delay: 0,
|
|
69
|
-
handleResize: true
|
|
70
|
-
},
|
|
71
|
-
navigationSvc: null
|
|
72
|
-
};
|
|
73
|
-
},
|
|
74
|
-
watch: {
|
|
75
|
-
reference: {
|
|
76
|
-
async handler(nV, oV) {
|
|
77
|
-
if (nV && oV !== nV) {
|
|
78
|
-
const popper = this.$refs.vPopper.$refs.popper;
|
|
79
|
-
if (popper) {
|
|
80
|
-
popper.$_detachPopperNode();
|
|
81
|
-
if (popper.shown) {
|
|
82
|
-
popper.hide({ skipDelay: true });
|
|
83
|
-
}
|
|
84
|
-
if (this.reference) {
|
|
85
|
-
popper.$_referenceNode = this.reference;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
|
-
mounted() {
|
|
93
|
-
Object.assign(this.$refs.vPopper.$refs.popper.$el.style, this.triggerStyle);
|
|
94
|
-
},
|
|
95
|
-
beforeUnmount() {
|
|
96
|
-
this.destroy();
|
|
97
|
-
},
|
|
98
|
-
methods: {
|
|
99
|
-
onShow() {
|
|
100
|
-
if (this.enableArrowNavigation) {
|
|
101
|
-
if (this.navigationSvc) {
|
|
102
|
-
this.navigationSvc.init();
|
|
103
|
-
} else {
|
|
104
|
-
this.navigationSvc = listKeyboardNavigation.setupListKeyboardNavigation({
|
|
105
|
-
itemContainer: this.$refs.vPopper.$refs.popperContent.$el
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
this.enableCloseOnEsc && document.addEventListener("keydown", this.popoverEscKeydown);
|
|
110
|
-
},
|
|
111
|
-
popoverEscKeydown(e) {
|
|
112
|
-
e.key === ESCAPE_KEY && this.$refs.vPopper.$refs.popper.hide();
|
|
113
|
-
},
|
|
114
|
-
destroy() {
|
|
115
|
-
var _a;
|
|
116
|
-
(_a = this.navigationSvc) == null ? void 0 : _a.destroy();
|
|
117
|
-
document.removeEventListener("keydown", this.popoverEscKeydown);
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
});
|
|
121
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
122
|
-
const _component_VDropdown = vue.resolveComponent("VDropdown");
|
|
123
|
-
return vue.openBlock(), vue.createBlock(_component_VDropdown, vue.mergeProps({ ref: "vPopper" }, { ..._ctx.defaultAttrs, ..._ctx.$attrs }, {
|
|
124
|
-
onShow: _ctx.onShow,
|
|
125
|
-
onHide: _ctx.destroy
|
|
126
|
-
}), vue.createSlots({ _: 2 }, [
|
|
127
|
-
vue.renderList(_ctx.$slots, (_, slot) => {
|
|
128
|
-
return {
|
|
129
|
-
name: slot,
|
|
130
|
-
fn: vue.withCtx((scope) => [
|
|
131
|
-
vue.renderSlot(_ctx.$slots, slot, vue.normalizeProps(vue.guardReactiveProps(scope || {})))
|
|
132
|
-
])
|
|
133
|
-
};
|
|
134
|
-
})
|
|
135
|
-
]), 1040, ["onShow", "onHide"]);
|
|
136
|
-
}
|
|
137
|
-
const PDropdown = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
138
|
-
module.exports = PDropdown;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const getFileExtension = (fileName) => {
|
|
4
|
-
var _a;
|
|
5
|
-
if (!fileName || !fileName.includes(".")) {
|
|
6
|
-
return "";
|
|
7
|
-
}
|
|
8
|
-
return (_a = fileName.split(".").pop()) == null ? void 0 : _a.toLowerCase();
|
|
9
|
-
};
|
|
10
|
-
const formatBytes = (bytes, decimals = 2) => {
|
|
11
|
-
if (!+bytes || bytes <= 0) {
|
|
12
|
-
return "0 B";
|
|
13
|
-
}
|
|
14
|
-
const k = 1e3;
|
|
15
|
-
const dm = decimals < 0 ? 0 : decimals;
|
|
16
|
-
const sizes = ["B", "KB", "MB", "GB", "TB", "PB"];
|
|
17
|
-
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
18
|
-
return `${parseFloat((bytes / Math.pow(k, i)).toFixed(dm))} ${sizes[i]}`;
|
|
19
|
-
};
|
|
20
|
-
exports.formatBytes = formatBytes;
|
|
21
|
-
exports.getFileExtension = getFileExtension;
|
package/dist/cjs/p-info-icon.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const vue = require("vue");
|
|
3
|
-
const _pluginVue_exportHelper = require("./chunks/_plugin-vue_export-helper.js");
|
|
4
|
-
const _withScopeId = (n) => (vue.pushScopeId("data-v-189b159e"), n = n(), vue.popScopeId(), n);
|
|
5
|
-
const _hoisted_1 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("i", { class: "bg-info-circle-icon block h-3 w-3" }, null, -1));
|
|
6
|
-
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
7
|
-
...{
|
|
8
|
-
name: "PInfoIcon"
|
|
9
|
-
},
|
|
10
|
-
__name: "p-info-icon",
|
|
11
|
-
props: {
|
|
12
|
-
text: {
|
|
13
|
-
type: String,
|
|
14
|
-
default: ""
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
setup(__props) {
|
|
18
|
-
return (_ctx, _cache) => {
|
|
19
|
-
const _component_VTooltip = vue.resolveComponent("VTooltip");
|
|
20
|
-
return vue.openBlock(), vue.createBlock(_component_VTooltip, null, {
|
|
21
|
-
popper: vue.withCtx(() => [
|
|
22
|
-
vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
23
|
-
vue.createTextVNode(vue.toDisplayString(__props.text), 1)
|
|
24
|
-
], true)
|
|
25
|
-
]),
|
|
26
|
-
default: vue.withCtx(() => [
|
|
27
|
-
_hoisted_1
|
|
28
|
-
]),
|
|
29
|
-
_: 3
|
|
30
|
-
});
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
const PInfoIcon = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-189b159e"]]);
|
|
35
|
-
module.exports = PInfoIcon;
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const dayjs = require("dayjs");
|
|
3
|
-
const inputClassesMixin = require("./inputClassesMixin.js");
|
|
4
|
-
const vCalendar = require("v-calendar");
|
|
5
|
-
const vue = require("vue");
|
|
6
|
-
const _pluginVue_exportHelper = require("./chunks/_plugin-vue_export-helper.js");
|
|
7
|
-
const selectAttribute = { highlight: { class: "bg-primary", contentClass: "text-white" } };
|
|
8
|
-
const DEFAULT_MASKS = {
|
|
9
|
-
// The mask for the input
|
|
10
|
-
input: "DD-MMM-YYYY",
|
|
11
|
-
// The mask for the model value
|
|
12
|
-
data: "YYYY-MM-DD"
|
|
13
|
-
};
|
|
14
|
-
const _sfc_main = vue.defineComponent({
|
|
15
|
-
name: "PInlineDatePicker",
|
|
16
|
-
components: {
|
|
17
|
-
DatePicker: vCalendar.DatePicker
|
|
18
|
-
},
|
|
19
|
-
mixins: [inputClassesMixin],
|
|
20
|
-
inheritAttrs: false,
|
|
21
|
-
props: {
|
|
22
|
-
modelValue: {
|
|
23
|
-
type: String,
|
|
24
|
-
default: ""
|
|
25
|
-
},
|
|
26
|
-
label: {
|
|
27
|
-
type: String,
|
|
28
|
-
default: ""
|
|
29
|
-
},
|
|
30
|
-
errorMsg: {
|
|
31
|
-
type: String,
|
|
32
|
-
default: ""
|
|
33
|
-
},
|
|
34
|
-
required: {
|
|
35
|
-
type: Boolean,
|
|
36
|
-
default: false
|
|
37
|
-
},
|
|
38
|
-
minDate: {
|
|
39
|
-
type: Date,
|
|
40
|
-
default: null
|
|
41
|
-
},
|
|
42
|
-
maxDate: {
|
|
43
|
-
type: Date,
|
|
44
|
-
default: null
|
|
45
|
-
},
|
|
46
|
-
timezone: {
|
|
47
|
-
type: String,
|
|
48
|
-
default: ""
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
emits: ["update:modelValue"],
|
|
52
|
-
data() {
|
|
53
|
-
return {
|
|
54
|
-
// innerValue is a Date object
|
|
55
|
-
innerValue: null,
|
|
56
|
-
selectAttribute
|
|
57
|
-
};
|
|
58
|
-
},
|
|
59
|
-
computed: {
|
|
60
|
-
masks() {
|
|
61
|
-
return Object.assign(DEFAULT_MASKS, this.$attrs.masks);
|
|
62
|
-
},
|
|
63
|
-
attrs() {
|
|
64
|
-
const { class: classes, style, ...rest } = this.$attrs;
|
|
65
|
-
return rest;
|
|
66
|
-
},
|
|
67
|
-
listeners() {
|
|
68
|
-
return Object.keys(this.$attrs).reduce((acc, curr) => {
|
|
69
|
-
if (curr.startsWith("on")) {
|
|
70
|
-
return { ...acc, [curr]: this.$attrs[curr] };
|
|
71
|
-
} else {
|
|
72
|
-
return acc;
|
|
73
|
-
}
|
|
74
|
-
}, {});
|
|
75
|
-
},
|
|
76
|
-
style() {
|
|
77
|
-
return this.$attrs.style;
|
|
78
|
-
},
|
|
79
|
-
styleDatepicker() {
|
|
80
|
-
return this.errorMsg ? { border: "1px solid var(--color-on-error)" } : {};
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
watch: {
|
|
84
|
-
modelValue: {
|
|
85
|
-
handler(nV) {
|
|
86
|
-
const date = dayjs(nV, this.masks.data).toDate();
|
|
87
|
-
if (nV && date.toString() === "Invalid Date") {
|
|
88
|
-
this.$emit("update:modelValue", null);
|
|
89
|
-
return;
|
|
90
|
-
}
|
|
91
|
-
this.innerValue = nV ? dayjs(nV, this.masks.data).toDate() : null;
|
|
92
|
-
const datepicker = this.$refs.datepicker;
|
|
93
|
-
if (datepicker && this.innerValue) {
|
|
94
|
-
datepicker.move(this.innerValue);
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
|
-
immediate: true
|
|
98
|
-
}
|
|
99
|
-
},
|
|
100
|
-
methods: {
|
|
101
|
-
dayclick(e) {
|
|
102
|
-
this.$emit("update:modelValue", e.id);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
const _hoisted_1 = ["data-has-error"];
|
|
107
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
108
|
-
const _component_DatePicker = vue.resolveComponent("DatePicker");
|
|
109
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
110
|
-
class: vue.normalizeClass([{ hidden: _ctx.$attrs.hidden }, _ctx.$attrs.class]),
|
|
111
|
-
"data-has-error": !!_ctx.errorMsg,
|
|
112
|
-
style: vue.normalizeStyle(_ctx.style)
|
|
113
|
-
}, [
|
|
114
|
-
vue.renderSlot(_ctx.$slots, "label", {
|
|
115
|
-
label: _ctx.label,
|
|
116
|
-
labelClasses: _ctx.labelClasses
|
|
117
|
-
}, () => [
|
|
118
|
-
_ctx.label ? (vue.openBlock(), vue.createElementBlock("label", {
|
|
119
|
-
key: 0,
|
|
120
|
-
class: vue.normalizeClass(_ctx.labelClasses)
|
|
121
|
-
}, vue.toDisplayString(_ctx.label), 3)) : vue.createCommentVNode("", true)
|
|
122
|
-
]),
|
|
123
|
-
vue.createVNode(_component_DatePicker, vue.mergeProps({
|
|
124
|
-
ref: "datepicker",
|
|
125
|
-
class: { "pointer-events-none opacity-70": _ctx.$attrs.disabled },
|
|
126
|
-
"model-value": _ctx.innerValue,
|
|
127
|
-
"select-attribute": _ctx.selectAttribute,
|
|
128
|
-
"min-date": _ctx.minDate || null,
|
|
129
|
-
"max-date": _ctx.maxDate || null,
|
|
130
|
-
masks: _ctx.masks,
|
|
131
|
-
style: _ctx.styleDatepicker,
|
|
132
|
-
timezone: _ctx.timezone
|
|
133
|
-
}, _ctx.listeners, { onDayclick: _ctx.dayclick }), null, 16, ["class", "model-value", "select-attribute", "min-date", "max-date", "masks", "style", "timezone", "onDayclick"]),
|
|
134
|
-
vue.withDirectives(vue.createElementVNode("div", {
|
|
135
|
-
class: vue.normalizeClass(_ctx.errorMsgClasses)
|
|
136
|
-
}, vue.toDisplayString(_ctx.errorMsg), 3), [
|
|
137
|
-
[vue.vShow, _ctx.errorMsg]
|
|
138
|
-
])
|
|
139
|
-
], 14, _hoisted_1);
|
|
140
|
-
}
|
|
141
|
-
const pInlineDatePicker = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
142
|
-
module.exports = pInlineDatePicker;
|