@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,12 +1,12 @@
1
- import w from "./p-alert.js";
2
- import C from "./p-close-btn.js";
3
- import { defineComponent as $, resolveComponent as d, openBlock as i, createBlock as p, Teleport as B, createVNode as r, Transition as f, withCtx as a, withDirectives as u, createElementVNode as t, normalizeClass as s, normalizeStyle as h, vShow as m, renderSlot as o, createCommentVNode as l, createElementBlock as b, toDisplayString as c } from "vue";
4
- import { _ as k } from "./chunks/_plugin-vue_export-helper.js";
5
- const S = $({
1
+ import PAlert from "./p-alert.js";
2
+ import PCloseBtn from "./p-close-btn.js";
3
+ import { defineComponent, resolveComponent, openBlock, createBlock, Teleport, createVNode, Transition, withCtx, withDirectives, createElementVNode, normalizeClass, normalizeStyle, vShow, renderSlot, createCommentVNode, createElementBlock, toDisplayString } from "vue";
4
+ import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
5
+ const _sfc_main = defineComponent({
6
6
  name: "PDrawer",
7
7
  components: {
8
- PAlert: w,
9
- PCloseBtn: C
8
+ PAlert,
9
+ PCloseBtn
10
10
  },
11
11
  props: {
12
12
  appendTo: {
@@ -19,7 +19,7 @@ const S = $({
19
19
  },
20
20
  disabled: {
21
21
  type: Boolean,
22
- default: !1
22
+ default: false
23
23
  },
24
24
  errorMsg: {
25
25
  type: String,
@@ -51,11 +51,11 @@ const S = $({
51
51
  },
52
52
  live: {
53
53
  type: Boolean,
54
- default: !1
54
+ default: false
55
55
  },
56
56
  modelValue: {
57
57
  type: Boolean,
58
- default: !1
58
+ default: false
59
59
  },
60
60
  closeLabel: {
61
61
  type: String,
@@ -63,19 +63,19 @@ const S = $({
63
63
  },
64
64
  showBackdrop: {
65
65
  type: Boolean,
66
- default: !1
66
+ default: false
67
67
  },
68
68
  enableClose: {
69
69
  type: Boolean,
70
- default: !0
70
+ default: true
71
71
  }
72
72
  },
73
73
  emits: ["update:modelValue", "before-open", "opening", "opened", "before-close", "closing", "closed"],
74
74
  data() {
75
75
  return {
76
76
  id: null,
77
- show: !1,
78
- mount: !1
77
+ show: false,
78
+ mount: false
79
79
  };
80
80
  },
81
81
  computed: {
@@ -87,22 +87,32 @@ const S = $({
87
87
  }
88
88
  },
89
89
  created() {
90
- this.live && (this.mount = !0);
90
+ if (this.live) {
91
+ this.mount = true;
92
+ }
91
93
  },
92
94
  mounted() {
93
- this.id = "drawer-" + this.$.uid, this.$watch(
95
+ this.id = "drawer-" + this.$.uid;
96
+ this.$watch(
94
97
  "modelValue",
95
- (e) => {
96
- e ? (this.mount = !0, this.$nextTick(() => {
97
- this.show = !0;
98
- })) : this.show = !1;
98
+ (newVal) => {
99
+ if (newVal) {
100
+ this.mount = true;
101
+ this.$nextTick(() => {
102
+ this.show = true;
103
+ });
104
+ } else {
105
+ this.show = false;
106
+ }
99
107
  },
100
- { immediate: !0 }
108
+ { immediate: true }
101
109
  );
102
110
  },
103
111
  methods: {
104
112
  close() {
105
- this.enableClose === !0 && this.$emit("update:modelValue", !1);
113
+ if (this.enableClose === true) {
114
+ this.$emit("update:modelValue", false);
115
+ }
106
116
  },
107
117
  beforeOpen() {
108
118
  this.$emit("before-open");
@@ -120,116 +130,125 @@ const S = $({
120
130
  this.$emit("closing");
121
131
  },
122
132
  closed() {
123
- this.live || (this.mount = !1), this.$nextTick(() => {
133
+ if (!this.live) {
134
+ this.mount = false;
135
+ }
136
+ this.$nextTick(() => {
124
137
  this.$emit("closed");
125
138
  });
126
139
  }
127
140
  }
128
- }), L = ["data-drawer-id", "aria-label", "aria-describedby", "aria-labelledby"], I = ["id"], E = {
141
+ });
142
+ const _hoisted_1 = ["data-drawer-id", "aria-label", "aria-describedby", "aria-labelledby"];
143
+ const _hoisted_2 = ["id"];
144
+ const _hoisted_3 = {
129
145
  key: 0,
130
146
  class: "px-6 pt-6"
131
- }, O = { class: "whitespace-pre-line" }, z = { class: "footer p-6" };
132
- function A(e, n, P, V, T, D) {
133
- const v = d("PCloseBtn"), g = d("PAlert");
134
- return e.mount ? (i(), p(B, {
147
+ };
148
+ const _hoisted_4 = { class: "whitespace-pre-line" };
149
+ const _hoisted_5 = { class: "footer p-6" };
150
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
151
+ const _component_PCloseBtn = resolveComponent("PCloseBtn");
152
+ const _component_PAlert = resolveComponent("PAlert");
153
+ return _ctx.mount ? (openBlock(), createBlock(Teleport, {
135
154
  key: 0,
136
- to: e.appendTo
155
+ to: _ctx.appendTo
137
156
  }, [
138
- r(f, {
157
+ createVNode(Transition, {
139
158
  name: "pd-backdrop-transition",
140
159
  "enter-active-class": "fadeIn",
141
160
  "leave-active-class": "fadeOut"
142
161
  }, {
143
- default: a(() => [
144
- u(t("div", {
145
- class: s(["fixed bottom-0 left-0 right-0 top-0 bg-black bg-opacity-20", { "cursor-pointer": e.enableClose }]),
146
- style: h({ "z-index": e.zIndex - 1 }),
162
+ default: withCtx(() => [
163
+ withDirectives(createElementVNode("div", {
164
+ class: normalizeClass(["fixed bottom-0 left-0 right-0 top-0 bg-black bg-opacity-20", { "cursor-pointer": _ctx.enableClose }]),
165
+ style: normalizeStyle({ "z-index": _ctx.zIndex - 1 }),
147
166
  tabindex: "-1",
148
- onClick: n[0] || (n[0] = (...y) => e.close && e.close(...y))
167
+ onClick: _cache[0] || (_cache[0] = (...args) => _ctx.close && _ctx.close(...args))
149
168
  }, null, 6), [
150
- [m, e.show && e.showBackdrop]
169
+ [vShow, _ctx.show && _ctx.showBackdrop]
151
170
  ])
152
171
  ]),
153
172
  _: 1
154
173
  }),
155
- r(f, {
174
+ createVNode(Transition, {
156
175
  name: "drawer-transition",
157
- "enter-active-class": e.transitionInClass,
158
- "leave-active-class": e.transitionOutClass,
159
- onBeforeEnter: e.beforeOpen,
160
- onEnter: e.opening,
161
- onAfterEnter: e.opened,
162
- onBeforeLeave: e.beforeClose,
163
- onLeave: e.closing,
164
- onAfterLeave: e.closed
176
+ "enter-active-class": _ctx.transitionInClass,
177
+ "leave-active-class": _ctx.transitionOutClass,
178
+ onBeforeEnter: _ctx.beforeOpen,
179
+ onEnter: _ctx.opening,
180
+ onAfterEnter: _ctx.opened,
181
+ onBeforeLeave: _ctx.beforeClose,
182
+ onLeave: _ctx.closing,
183
+ onAfterLeave: _ctx.closed
165
184
  }, {
166
- default: a(() => [
167
- u(t("div", {
168
- "data-drawer-id": e.id,
185
+ default: withCtx(() => [
186
+ withDirectives(createElementVNode("div", {
187
+ "data-drawer-id": _ctx.id,
169
188
  tabindex: "-1",
170
- class: s([e.drawerClass, e.position === "right" ? "drawer-right" : "drawer-left"]),
171
- style: h({ "z-index": e.zIndex, ...e.drawerStyle }),
189
+ class: normalizeClass([_ctx.drawerClass, _ctx.position === "right" ? "drawer-right" : "drawer-left"]),
190
+ style: normalizeStyle({ "z-index": _ctx.zIndex, ..._ctx.drawerStyle }),
172
191
  role: "dialog",
173
- "aria-label": e.title,
192
+ "aria-label": _ctx.title,
174
193
  "aria-modal": "false",
175
- "aria-describedby": `${e.id}-content`,
176
- "aria-labelledby": `${e.id}-title`
194
+ "aria-describedby": `${_ctx.id}-content`,
195
+ "aria-labelledby": `${_ctx.id}-title`
177
196
  }, [
178
- o(e.$slots, "title-wrapper", {}, () => [
179
- t("div", {
180
- class: s([
197
+ renderSlot(_ctx.$slots, "title-wrapper", {}, () => [
198
+ createElementVNode("div", {
199
+ class: normalizeClass([
181
200
  "flex items-center border-b border-p-gray-30 px-6 pb-4 pt-4",
182
- { "flex-row-reverse": e.position === "right" }
201
+ { "flex-row-reverse": _ctx.position === "right" }
183
202
  ])
184
203
  }, [
185
- e.enableClose ? (i(), p(v, {
204
+ _ctx.enableClose ? (openBlock(), createBlock(_component_PCloseBtn, {
186
205
  key: 0,
187
- "aria-label": e.closeLabel,
206
+ "aria-label": _ctx.closeLabel,
188
207
  class: "flex-0",
189
- disabled: e.disabled,
190
- onClick: e.close
191
- }, null, 8, ["aria-label", "disabled", "onClick"])) : l("", !0),
192
- o(e.$slots, "title", {}, () => [
193
- e.title ? (i(), b("h3", {
208
+ disabled: _ctx.disabled,
209
+ onClick: _ctx.close
210
+ }, null, 8, ["aria-label", "disabled", "onClick"])) : createCommentVNode("", true),
211
+ renderSlot(_ctx.$slots, "title", {}, () => [
212
+ _ctx.title ? (openBlock(), createElementBlock("h3", {
194
213
  key: 0,
195
- id: `${e.id}-title`,
196
- class: s(["flex-1 text-xl font-medium", { "text-right": e.position === "left" }])
197
- }, c(e.title), 11, I)) : l("", !0)
198
- ], !0)
214
+ id: `${_ctx.id}-title`,
215
+ class: normalizeClass(["flex-1 text-xl font-medium", { "text-right": _ctx.position === "left" }])
216
+ }, toDisplayString(_ctx.title), 11, _hoisted_2)) : createCommentVNode("", true)
217
+ ], true)
199
218
  ], 2)
200
- ], !0),
201
- e.errorMsg ? (i(), b("div", E, [
202
- r(g, { type: "error" }, {
203
- default: a(() => [
204
- t("div", O, c(e.errorMsg), 1)
219
+ ], true),
220
+ _ctx.errorMsg ? (openBlock(), createElementBlock("div", _hoisted_3, [
221
+ createVNode(_component_PAlert, { type: "error" }, {
222
+ default: withCtx(() => [
223
+ createElementVNode("div", _hoisted_4, toDisplayString(_ctx.errorMsg), 1)
205
224
  ]),
206
225
  _: 1
207
226
  })
208
- ])) : l("", !0),
209
- o(e.$slots, "content-wrapper", {}, () => [
210
- t("div", {
211
- class: s([
227
+ ])) : createCommentVNode("", true),
228
+ renderSlot(_ctx.$slots, "content-wrapper", {}, () => [
229
+ createElementVNode("div", {
230
+ class: normalizeClass([
212
231
  "relative grow overflow-y-auto overflow-x-hidden px-6 pt-6",
213
- { "pointer-events-none opacity-50": e.disabled }
232
+ { "pointer-events-none opacity-50": _ctx.disabled }
214
233
  ])
215
234
  }, [
216
- o(e.$slots, "default", {}, void 0, !0)
235
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
217
236
  ], 2)
218
- ], !0),
219
- o(e.$slots, "footer-wrapper", {}, () => [
220
- t("div", z, [
221
- o(e.$slots, "footer", {}, void 0, !0)
237
+ ], true),
238
+ renderSlot(_ctx.$slots, "footer-wrapper", {}, () => [
239
+ createElementVNode("div", _hoisted_5, [
240
+ renderSlot(_ctx.$slots, "footer", {}, void 0, true)
222
241
  ])
223
- ], !0)
224
- ], 14, L), [
225
- [m, e.show]
242
+ ], true)
243
+ ], 14, _hoisted_1), [
244
+ [vShow, _ctx.show]
226
245
  ])
227
246
  ]),
228
247
  _: 3
229
248
  }, 8, ["enter-active-class", "leave-active-class", "onBeforeEnter", "onEnter", "onAfterEnter", "onBeforeLeave", "onLeave", "onAfterLeave"])
230
- ], 8, ["to"])) : l("", !0);
249
+ ], 8, ["to"])) : createCommentVNode("", true);
231
250
  }
232
- const q = /* @__PURE__ */ k(S, [["render", A], ["__scopeId", "data-v-a0b8be1e"]]);
251
+ const pDrawer = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-a0b8be1e"]]);
233
252
  export {
234
- q as default
253
+ pDrawer as default
235
254
  };
@@ -1,4 +1,4 @@
1
- import { a as f } from "./chunks/p-dropdown-select.js";
1
+ import { a as _sfc_main } from "./chunks/p-dropdown-select.js";
2
2
  export {
3
- f as default
3
+ _sfc_main as default
4
4
  };
@@ -1,9 +1,10 @@
1
- import { setupListKeyboardNavigation as i } from "./listKeyboardNavigation.js";
2
- import { defineComponent as p, resolveComponent as a, openBlock as d, createBlock as l, mergeProps as c, createSlots as f, renderList as h, withCtx as m, renderSlot as u, normalizeProps as v, guardReactiveProps as y } from "vue";
3
- import { _ as w } from "./chunks/_plugin-vue_export-helper.js";
4
- const g = "Escape", $ = p({
1
+ import { setupListKeyboardNavigation } from "./listKeyboardNavigation.js";
2
+ import { defineComponent, resolveComponent, openBlock, createBlock, mergeProps, createSlots, renderList, withCtx, renderSlot, normalizeProps, guardReactiveProps } from "vue";
3
+ import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
4
+ const ESCAPE_KEY = "Escape";
5
+ const _sfc_main = defineComponent({
5
6
  name: "PDropdown",
6
- inheritAttrs: !1,
7
+ inheritAttrs: false,
7
8
  props: {
8
9
  /**
9
10
  * Enables navigation for `.dropdown-item` using the up/down keys.
@@ -11,14 +12,14 @@ const g = "Escape", $ = p({
11
12
  */
12
13
  enableArrowNavigation: {
13
14
  type: Boolean,
14
- default: !0
15
+ default: true
15
16
  },
16
17
  /**
17
18
  * Enables closing the dropdown with the Escape key.
18
19
  */
19
20
  enableCloseOnEsc: {
20
21
  type: Boolean,
21
- default: !0
22
+ default: true
22
23
  },
23
24
  /**
24
25
  * The selector that the arrow navigation function will use to
@@ -58,23 +59,31 @@ const g = "Escape", $ = p({
58
59
  return {
59
60
  defaultAttrs: {
60
61
  triggers: ["click"],
61
- "auto-hide": !0,
62
+ "auto-hide": true,
62
63
  theme: "p-dropdown-theme",
63
64
  "popper-class": "dropdown",
64
65
  placement: "bottom-start",
65
66
  distance: 4,
66
67
  delay: 0,
67
- handleResize: !0
68
+ handleResize: true
68
69
  },
69
70
  navigationSvc: null
70
71
  };
71
72
  },
72
73
  watch: {
73
74
  reference: {
74
- async handler(e, o) {
75
- if (e && o !== e) {
76
- const t = this.$refs.vPopper.$refs.popper;
77
- t && (t.$_detachPopperNode(), t.shown && t.hide({ skipDelay: !0 }), this.reference && (t.$_referenceNode = this.reference));
75
+ async handler(nV, oV) {
76
+ if (nV && oV !== nV) {
77
+ const popper = this.$refs.vPopper.$refs.popper;
78
+ if (popper) {
79
+ popper.$_detachPopperNode();
80
+ if (popper.shown) {
81
+ popper.hide({ skipDelay: true });
82
+ }
83
+ if (this.reference) {
84
+ popper.$_referenceNode = this.reference;
85
+ }
86
+ }
78
87
  }
79
88
  }
80
89
  }
@@ -87,34 +96,44 @@ const g = "Escape", $ = p({
87
96
  },
88
97
  methods: {
89
98
  onShow() {
90
- this.enableArrowNavigation && (this.navigationSvc ? this.navigationSvc.init() : this.navigationSvc = i({
91
- itemContainer: this.$refs.vPopper.$refs.popperContent.$el
92
- })), this.enableCloseOnEsc && document.addEventListener("keydown", this.popoverEscKeydown);
99
+ if (this.enableArrowNavigation) {
100
+ if (this.navigationSvc) {
101
+ this.navigationSvc.init();
102
+ } else {
103
+ this.navigationSvc = setupListKeyboardNavigation({
104
+ itemContainer: this.$refs.vPopper.$refs.popperContent.$el
105
+ });
106
+ }
107
+ }
108
+ this.enableCloseOnEsc && document.addEventListener("keydown", this.popoverEscKeydown);
93
109
  },
94
110
  popoverEscKeydown(e) {
95
- e.key === g && this.$refs.vPopper.$refs.popper.hide();
111
+ e.key === ESCAPE_KEY && this.$refs.vPopper.$refs.popper.hide();
96
112
  },
97
113
  destroy() {
98
- var e;
99
- (e = this.navigationSvc) == null || e.destroy(), document.removeEventListener("keydown", this.popoverEscKeydown);
114
+ var _a;
115
+ (_a = this.navigationSvc) == null ? void 0 : _a.destroy();
116
+ document.removeEventListener("keydown", this.popoverEscKeydown);
100
117
  }
101
118
  }
102
119
  });
103
- function S(e, o, t, b, E, P) {
104
- const n = a("VDropdown");
105
- return d(), l(n, c({ ref: "vPopper" }, { ...e.defaultAttrs, ...e.$attrs }, {
106
- onShow: e.onShow,
107
- onHide: e.destroy
108
- }), f({ _: 2 }, [
109
- h(e.$slots, (_, r) => ({
110
- name: r,
111
- fn: m((s) => [
112
- u(e.$slots, r, v(y(s || {})))
113
- ])
114
- }))
120
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
121
+ const _component_VDropdown = resolveComponent("VDropdown");
122
+ return openBlock(), createBlock(_component_VDropdown, mergeProps({ ref: "vPopper" }, { ..._ctx.defaultAttrs, ..._ctx.$attrs }, {
123
+ onShow: _ctx.onShow,
124
+ onHide: _ctx.destroy
125
+ }), createSlots({ _: 2 }, [
126
+ renderList(_ctx.$slots, (_, slot) => {
127
+ return {
128
+ name: slot,
129
+ fn: withCtx((scope) => [
130
+ renderSlot(_ctx.$slots, slot, normalizeProps(guardReactiveProps(scope || {})))
131
+ ])
132
+ };
133
+ })
115
134
  ]), 1040, ["onShow", "onHide"]);
116
135
  }
117
- const D = /* @__PURE__ */ w($, [["render", S]]);
136
+ const PDropdown = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
118
137
  export {
119
- D as default
138
+ PDropdown as default
120
139
  };
@@ -1,13 +1,21 @@
1
- const B = (t) => {
2
- var o;
3
- return !t || !t.includes(".") ? "" : (o = t.split(".").pop()) == null ? void 0 : o.toLowerCase();
4
- }, c = (t, o = 2) => {
5
- if (!+t || t <= 0)
1
+ const getFileExtension = (fileName) => {
2
+ var _a;
3
+ if (!fileName || !fileName.includes(".")) {
4
+ return "";
5
+ }
6
+ return (_a = fileName.split(".").pop()) == null ? void 0 : _a.toLowerCase();
7
+ };
8
+ const formatBytes = (bytes, decimals = 2) => {
9
+ if (!+bytes || bytes <= 0) {
6
10
  return "0 B";
7
- const n = 1e3, s = o < 0 ? 0 : o, e = ["B", "KB", "MB", "GB", "TB", "PB"], r = Math.floor(Math.log(t) / Math.log(n));
8
- return `${parseFloat((t / Math.pow(n, r)).toFixed(s))} ${e[r]}`;
11
+ }
12
+ const k = 1e3;
13
+ const dm = decimals < 0 ? 0 : decimals;
14
+ const sizes = ["B", "KB", "MB", "GB", "TB", "PB"];
15
+ const i = Math.floor(Math.log(bytes) / Math.log(k));
16
+ return `${parseFloat((bytes / Math.pow(k, i)).toFixed(dm))} ${sizes[i]}`;
9
17
  };
10
18
  export {
11
- c as formatBytes,
12
- B as getFileExtension
19
+ formatBytes,
20
+ getFileExtension
13
21
  };
@@ -1,7 +1,11 @@
1
- import { defineComponent as c, resolveComponent as p, openBlock as r, createBlock as l, withCtx as e, renderSlot as s, createTextVNode as a, toDisplayString as i, pushScopeId as _, popScopeId as d, createElementVNode as f } from "vue";
2
- import { _ as m } from "./chunks/_plugin-vue_export-helper.js";
3
- const u = (o) => (_("data-v-189b159e"), o = o(), d(), o), I = /* @__PURE__ */ u(() => /* @__PURE__ */ f("i", { class: "bg-info-circle-icon block h-3 w-3" }, null, -1)), h = /* @__PURE__ */ c({
4
- name: "PInfoIcon",
1
+ import { defineComponent, resolveComponent, openBlock, createBlock, withCtx, renderSlot, createTextVNode, toDisplayString, pushScopeId, popScopeId, createElementVNode } from "vue";
2
+ import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
3
+ const _withScopeId = (n) => (pushScopeId("data-v-189b159e"), n = n(), popScopeId(), n);
4
+ const _hoisted_1 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("i", { class: "bg-info-circle-icon block h-3 w-3" }, null, -1));
5
+ const _sfc_main = /* @__PURE__ */ defineComponent({
6
+ ...{
7
+ name: "PInfoIcon"
8
+ },
5
9
  __name: "p-info-icon",
6
10
  props: {
7
11
  text: {
@@ -9,23 +13,24 @@ const u = (o) => (_("data-v-189b159e"), o = o(), d(), o), I = /* @__PURE__ */ u(
9
13
  default: ""
10
14
  }
11
15
  },
12
- setup(o) {
13
- return (t, x) => {
14
- const n = p("VTooltip");
15
- return r(), l(n, null, {
16
- popper: e(() => [
17
- s(t.$slots, "default", {}, () => [
18
- a(i(o.text), 1)
19
- ], !0)
16
+ setup(__props) {
17
+ return (_ctx, _cache) => {
18
+ const _component_VTooltip = resolveComponent("VTooltip");
19
+ return openBlock(), createBlock(_component_VTooltip, null, {
20
+ popper: withCtx(() => [
21
+ renderSlot(_ctx.$slots, "default", {}, () => [
22
+ createTextVNode(toDisplayString(__props.text), 1)
23
+ ], true)
20
24
  ]),
21
- default: e(() => [
22
- I
25
+ default: withCtx(() => [
26
+ _hoisted_1
23
27
  ]),
24
28
  _: 3
25
29
  });
26
30
  };
27
31
  }
28
- }), V = /* @__PURE__ */ m(h, [["__scopeId", "data-v-189b159e"]]);
32
+ });
33
+ const PInfoIcon = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-189b159e"]]);
29
34
  export {
30
- V as default
35
+ PInfoIcon as default
31
36
  };