@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.
Files changed (146) hide show
  1. package/dist/squirrel.cjs.js +5 -0
  2. package/dist/squirrel.es.js +8220 -0
  3. package/dist/style.css +1 -2124
  4. package/package.json +20 -22
  5. package/dist/cjs/chunks/_plugin-vue_export-helper.js +0 -9
  6. package/dist/cjs/chunks/p-action-bar.js +0 -60
  7. package/dist/cjs/chunks/p-card.js +0 -28
  8. package/dist/cjs/chunks/p-checkbox.js +0 -24
  9. package/dist/cjs/chunks/p-dropdown-select.js +0 -414
  10. package/dist/cjs/chunks/p-input-percent.js +0 -53
  11. package/dist/cjs/chunks/p-pagination-info.js +0 -66
  12. package/dist/cjs/chunks/p-pagination.js +0 -122
  13. package/dist/cjs/chunks/p-ring-loader.js +0 -81
  14. package/dist/cjs/chunks/p-select-btn.js +0 -97
  15. package/dist/cjs/chunks/p-select.js +0 -123
  16. package/dist/cjs/chunks/p-table-loader.js +0 -70
  17. package/dist/cjs/chunks/p-tabs.js +0 -52
  18. package/dist/cjs/config.js +0 -105
  19. package/dist/cjs/currency.js +0 -9
  20. package/dist/cjs/dom.js +0 -27
  21. package/dist/cjs/index.js +0 -976
  22. package/dist/cjs/inputClassesMixin.js +0 -50
  23. package/dist/cjs/inputClassesShared.js +0 -76
  24. package/dist/cjs/listKeyboardNavigation.js +0 -110
  25. package/dist/cjs/number.js +0 -9
  26. package/dist/cjs/object.js +0 -4
  27. package/dist/cjs/p-action-bar.js +0 -3
  28. package/dist/cjs/p-alert.js +0 -65
  29. package/dist/cjs/p-avatar.js +0 -71
  30. package/dist/cjs/p-btn.js +0 -361
  31. package/dist/cjs/p-card.js +0 -3
  32. package/dist/cjs/p-checkbox.js +0 -3
  33. package/dist/cjs/p-chips.js +0 -110
  34. package/dist/cjs/p-close-btn.js +0 -36
  35. package/dist/cjs/p-date-picker.js +0 -139
  36. package/dist/cjs/p-drawer.js +0 -253
  37. package/dist/cjs/p-dropdown-select.js +0 -3
  38. package/dist/cjs/p-dropdown.js +0 -138
  39. package/dist/cjs/p-file-upload.js +0 -21
  40. package/dist/cjs/p-info-icon.js +0 -35
  41. package/dist/cjs/p-inline-date-picker.js +0 -142
  42. package/dist/cjs/p-input-number.js +0 -146
  43. package/dist/cjs/p-input-percent.js +0 -3
  44. package/dist/cjs/p-input-search.js +0 -110
  45. package/dist/cjs/p-input.js +0 -89
  46. package/dist/cjs/p-loading.js +0 -38
  47. package/dist/cjs/p-modal.js +0 -369
  48. package/dist/cjs/p-pagination-info.js +0 -3
  49. package/dist/cjs/p-pagination.js +0 -3
  50. package/dist/cjs/p-progress-bar.js +0 -41
  51. package/dist/cjs/p-ring-loader.js +0 -3
  52. package/dist/cjs/p-select-btn.js +0 -3
  53. package/dist/cjs/p-select-list.js +0 -4
  54. package/dist/cjs/p-select-pill.js +0 -111
  55. package/dist/cjs/p-select.js +0 -3
  56. package/dist/cjs/p-skeleton-loader.js +0 -73
  57. package/dist/cjs/p-table-filter-icon.js +0 -20
  58. package/dist/cjs/p-table-header-cell.js +0 -75
  59. package/dist/cjs/p-table-loader.js +0 -3
  60. package/dist/cjs/p-table-sort.js +0 -8
  61. package/dist/cjs/p-table-td.js +0 -88
  62. package/dist/cjs/p-table.js +0 -12
  63. package/dist/cjs/p-tabs.js +0 -3
  64. package/dist/cjs/p-textarea.js +0 -73
  65. package/dist/cjs/p-toggle.js +0 -114
  66. package/dist/cjs/pagination.js +0 -29
  67. package/dist/cjs/string.js +0 -12
  68. package/dist/cjs/tailwind.js +0 -4353
  69. package/dist/cjs/text.js +0 -16
  70. package/dist/cjs/useInputClasses.js +0 -44
  71. package/dist/cjs/usePLoading.js +0 -35
  72. package/dist/cjs/usePModal.js +0 -21
  73. package/dist/cjs/usePTableColResize.js +0 -81
  74. package/dist/cjs/usePTableRowVirtualizer.js +0 -31
  75. package/dist/cjs/useSelectList.js +0 -256
  76. package/dist/es/chunks/_plugin-vue_export-helper.js +0 -10
  77. package/dist/es/chunks/p-action-bar.js +0 -61
  78. package/dist/es/chunks/p-card.js +0 -29
  79. package/dist/es/chunks/p-checkbox.js +0 -25
  80. package/dist/es/chunks/p-dropdown-select.js +0 -415
  81. package/dist/es/chunks/p-input-percent.js +0 -54
  82. package/dist/es/chunks/p-pagination-info.js +0 -67
  83. package/dist/es/chunks/p-pagination.js +0 -123
  84. package/dist/es/chunks/p-ring-loader.js +0 -82
  85. package/dist/es/chunks/p-select-btn.js +0 -98
  86. package/dist/es/chunks/p-select.js +0 -124
  87. package/dist/es/chunks/p-table-loader.js +0 -71
  88. package/dist/es/chunks/p-tabs.js +0 -53
  89. package/dist/es/config.js +0 -105
  90. package/dist/es/currency.js +0 -9
  91. package/dist/es/dom.js +0 -27
  92. package/dist/es/index.js +0 -978
  93. package/dist/es/inputClassesMixin.js +0 -51
  94. package/dist/es/inputClassesShared.js +0 -76
  95. package/dist/es/listKeyboardNavigation.js +0 -110
  96. package/dist/es/number.js +0 -9
  97. package/dist/es/object.js +0 -4
  98. package/dist/es/p-action-bar.js +0 -4
  99. package/dist/es/p-alert.js +0 -66
  100. package/dist/es/p-avatar.js +0 -72
  101. package/dist/es/p-btn.js +0 -362
  102. package/dist/es/p-card.js +0 -4
  103. package/dist/es/p-checkbox.js +0 -4
  104. package/dist/es/p-chips.js +0 -111
  105. package/dist/es/p-close-btn.js +0 -37
  106. package/dist/es/p-date-picker.js +0 -140
  107. package/dist/es/p-drawer.js +0 -254
  108. package/dist/es/p-dropdown-select.js +0 -4
  109. package/dist/es/p-dropdown.js +0 -139
  110. package/dist/es/p-file-upload.js +0 -21
  111. package/dist/es/p-info-icon.js +0 -36
  112. package/dist/es/p-inline-date-picker.js +0 -143
  113. package/dist/es/p-input-number.js +0 -147
  114. package/dist/es/p-input-percent.js +0 -4
  115. package/dist/es/p-input-search.js +0 -111
  116. package/dist/es/p-input.js +0 -90
  117. package/dist/es/p-loading.js +0 -39
  118. package/dist/es/p-modal.js +0 -370
  119. package/dist/es/p-pagination-info.js +0 -4
  120. package/dist/es/p-pagination.js +0 -4
  121. package/dist/es/p-progress-bar.js +0 -42
  122. package/dist/es/p-ring-loader.js +0 -4
  123. package/dist/es/p-select-btn.js +0 -4
  124. package/dist/es/p-select-list.js +0 -4
  125. package/dist/es/p-select-pill.js +0 -112
  126. package/dist/es/p-select.js +0 -4
  127. package/dist/es/p-skeleton-loader.js +0 -74
  128. package/dist/es/p-table-filter-icon.js +0 -21
  129. package/dist/es/p-table-header-cell.js +0 -76
  130. package/dist/es/p-table-loader.js +0 -4
  131. package/dist/es/p-table-sort.js +0 -8
  132. package/dist/es/p-table-td.js +0 -89
  133. package/dist/es/p-table.js +0 -12
  134. package/dist/es/p-tabs.js +0 -4
  135. package/dist/es/p-textarea.js +0 -74
  136. package/dist/es/p-toggle.js +0 -115
  137. package/dist/es/pagination.js +0 -29
  138. package/dist/es/string.js +0 -12
  139. package/dist/es/tailwind.js +0 -4353
  140. package/dist/es/text.js +0 -16
  141. package/dist/es/useInputClasses.js +0 -44
  142. package/dist/es/usePLoading.js +0 -35
  143. package/dist/es/usePModal.js +0 -21
  144. package/dist/es/usePTableColResize.js +0 -81
  145. package/dist/es/usePTableRowVirtualizer.js +0 -31
  146. package/dist/es/useSelectList.js +0 -256
@@ -1,369 +0,0 @@
1
- "use strict";
2
- const vue = require("vue");
3
- const pAlert = require("./p-alert.js");
4
- const pCloseBtn = require("./p-close-btn.js");
5
- const usePModal = require("./usePModal.js");
6
- const _pluginVue_exportHelper = require("./chunks/_plugin-vue_export-helper.js");
7
- const _hoisted_1 = ["data-pm-backdrop-id"];
8
- const _hoisted_2 = ["data-pm-wrapper-id", "aria-label", "aria-describedby", "aria-labelledby"];
9
- const _hoisted_3 = ["data-pm-id"];
10
- const _hoisted_4 = { class: "flex pb-4 pl-8 pr-4 pt-4" };
11
- const _hoisted_5 = ["id"];
12
- const _hoisted_6 = { class: "ml-auto" };
13
- const _hoisted_7 = {
14
- key: 0,
15
- class: "mb-4 px-8"
16
- };
17
- const _hoisted_8 = ["id"];
18
- const _hoisted_9 = { class: "mt-6 px-8 pt-6" };
19
- const FOCUSABLE_ELEMENTS = 'a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), [tabindex]:not([tabindex="-1"])';
20
- const _sfc_main = /* @__PURE__ */ vue.defineComponent({
21
- ...{
22
- name: "PModal"
23
- },
24
- __name: "p-modal",
25
- props: {
26
- name: {
27
- type: String,
28
- default: ""
29
- },
30
- title: {
31
- type: String,
32
- default: ""
33
- },
34
- baseZindex: {
35
- type: Number,
36
- default: 1051
37
- },
38
- bgClass: {
39
- type: [String, Object, Array],
40
- default: "fixed bottom-0 left-0 right-0 top-0 bg-black bg-opacity-20"
41
- },
42
- wrapperClass: {
43
- type: [String, Object, Array],
44
- default: "fixed bottom-0 left-0 right-0 top-0 flex flex-col items-center justify-center overflow-y-auto overflow-x-hidden outline-none"
45
- },
46
- modalClass: {
47
- type: [String, Object, Array],
48
- default: "pm relative flex flex-col rounded-2xl pb-6 cursor-default bg-surface shadow-xl"
49
- },
50
- modalStyle: {
51
- type: [String, Object, Array],
52
- default: ""
53
- },
54
- inClass: {
55
- type: String,
56
- default: "slideInTop"
57
- },
58
- outClass: {
59
- type: String,
60
- default: "slideOutTop"
61
- },
62
- bgInClass: {
63
- type: String,
64
- default: "fadeIn"
65
- },
66
- bgOutClass: {
67
- type: String,
68
- default: "fadeOut"
69
- },
70
- appendTo: {
71
- type: String,
72
- default: "body"
73
- },
74
- live: {
75
- type: Boolean,
76
- default: false
77
- },
78
- enableClose: {
79
- type: Boolean,
80
- default: true
81
- },
82
- modelValue: {
83
- type: Boolean,
84
- default: false
85
- },
86
- closeLabel: {
87
- type: String,
88
- default: "Close"
89
- },
90
- disabled: {
91
- type: Boolean,
92
- default: false
93
- },
94
- errorMsg: {
95
- type: String,
96
- default: ""
97
- },
98
- maxWidth: {
99
- type: String,
100
- default: "500px"
101
- }
102
- },
103
- emits: [
104
- "before-open",
105
- "opening",
106
- "opened",
107
- "before-close",
108
- "closing",
109
- "closed",
110
- "update:modelValue"
111
- ],
112
- setup(__props, { emit: __emit }) {
113
- vue.useCssVars((_ctx) => ({
114
- "8a536574": __props.maxWidth
115
- }));
116
- let animatingZIndex = 0;
117
- const emit = __emit;
118
- const props = __props;
119
- const modal = usePModal.usePModal();
120
- const zIndex = vue.ref(0);
121
- const id = vue.ref("");
122
- const show = vue.ref(false);
123
- const mount = vue.ref(false);
124
- const elToFocus = vue.ref(null);
125
- const pmWrapper = vue.ref(null);
126
- vue.onBeforeMount(() => {
127
- if (props.live) {
128
- mount.value = true;
129
- }
130
- });
131
- vue.onMounted(() => {
132
- var _a;
133
- id.value = "pm-" + ((_a = vue.getCurrentInstance()) == null ? void 0 : _a.uid);
134
- const valueToWatch = !props.name ? () => props.modelValue : () => modal.state.modals[props.name];
135
- vue.watch(
136
- valueToWatch,
137
- (newVal) => {
138
- if (newVal) {
139
- mount.value = true;
140
- vue.nextTick(() => {
141
- show.value = true;
142
- });
143
- } else {
144
- show.value = false;
145
- }
146
- },
147
- {
148
- immediate: true
149
- }
150
- );
151
- });
152
- vue.onBeforeUnmount(() => {
153
- elToFocus.value = null;
154
- props.name && modal.hide(props.name);
155
- });
156
- const close = () => {
157
- if (props.enableClose === true) {
158
- emit("update:modelValue", false);
159
- props.name && modal.hide(props.name);
160
- }
161
- };
162
- const clickOutside = (e) => {
163
- if (e.target === pmWrapper.value) {
164
- close();
165
- }
166
- };
167
- const keydown = (e) => {
168
- var _a;
169
- if (e.which === 27 || e.keyCode === 27) {
170
- close();
171
- }
172
- if (e.which === 9 || e.keyCode === 9) {
173
- const all = [].slice.call((_a = pmWrapper.value) == null ? void 0 : _a.querySelectorAll(FOCUSABLE_ELEMENTS)).filter(function(el) {
174
- return !!(el.offsetWidth || el.offsetHeight || el.getClientRects().length);
175
- });
176
- if (e.shiftKey) {
177
- if (e.target === all[0] || e.target === pmWrapper.value) {
178
- e.preventDefault();
179
- all[all.length - 1].focus();
180
- }
181
- } else {
182
- if (e.target === all[all.length - 1]) {
183
- e.preventDefault();
184
- all[0].focus();
185
- }
186
- }
187
- }
188
- };
189
- const getAllVisibleWrappers = () => {
190
- return [].slice.call(document.querySelectorAll("[data-pm-wrapper-id]")).filter((w) => w.style.display !== "none");
191
- };
192
- const getTopZindex = () => {
193
- return getAllVisibleWrappers().reduce((acc, curr) => {
194
- return parseInt(curr.style.zIndex) > acc ? parseInt(curr.style.zIndex) : acc;
195
- }, 0);
196
- };
197
- const handleFocus = (wrapper) => {
198
- const autofocus = wrapper.querySelector("[autofocus]");
199
- if (autofocus) {
200
- autofocus.focus();
201
- } else {
202
- const focusable = wrapper.querySelectorAll(FOCUSABLE_ELEMENTS);
203
- focusable.length ? focusable[0].focus() : wrapper.focus();
204
- }
205
- };
206
- const beforeOpen = () => {
207
- elToFocus.value = document.activeElement;
208
- const lastZindex = getTopZindex();
209
- if (animatingZIndex) {
210
- zIndex.value = animatingZIndex + 2;
211
- } else {
212
- zIndex.value = lastZindex === 0 ? props.baseZindex : lastZindex + 2;
213
- }
214
- animatingZIndex = zIndex.value;
215
- emit("before-open");
216
- };
217
- const opening = () => {
218
- emit("opening");
219
- };
220
- const afterOpen = () => {
221
- handleFocus(pmWrapper.value);
222
- emit("opened");
223
- };
224
- const beforeClose = () => {
225
- emit("before-close");
226
- };
227
- const closing = () => {
228
- emit("closing");
229
- };
230
- const afterClose = () => {
231
- zIndex.value = 0;
232
- if (!props.live) {
233
- mount.value = false;
234
- }
235
- vue.nextTick(() => {
236
- window.requestAnimationFrame(() => {
237
- var _a, _b;
238
- const lastZindex = getTopZindex();
239
- if (lastZindex > 0) {
240
- const all = getAllVisibleWrappers();
241
- for (let i = 0; i < all.length; i++) {
242
- const wrapper = all[i];
243
- if (parseInt(wrapper.style.zIndex) === lastZindex) {
244
- if (wrapper.contains(elToFocus.value)) {
245
- (_a = elToFocus.value) == null ? void 0 : _a.focus();
246
- } else {
247
- handleFocus(wrapper);
248
- }
249
- break;
250
- }
251
- }
252
- } else {
253
- if (document.body.contains(elToFocus.value)) {
254
- (_b = elToFocus.value) == null ? void 0 : _b.focus();
255
- }
256
- }
257
- animatingZIndex = 0;
258
- emit("closed");
259
- });
260
- });
261
- };
262
- return (_ctx, _cache) => {
263
- return mount.value ? (vue.openBlock(), vue.createBlock(vue.Teleport, {
264
- key: 0,
265
- to: __props.appendTo
266
- }, [
267
- vue.createVNode(vue.Transition, {
268
- name: "pm-backdrop-transition",
269
- "enter-active-class": __props.bgInClass,
270
- "leave-active-class": __props.bgOutClass
271
- }, {
272
- default: vue.withCtx(() => [
273
- vue.withDirectives(vue.createElementVNode("div", {
274
- "data-pm-backdrop-id": id.value,
275
- class: vue.normalizeClass(__props.bgClass),
276
- style: vue.normalizeStyle({ "z-index": zIndex.value - 1 })
277
- }, null, 14, _hoisted_1), [
278
- [vue.vShow, show.value]
279
- ])
280
- ]),
281
- _: 1
282
- }, 8, ["enter-active-class", "leave-active-class"]),
283
- vue.createVNode(vue.Transition, {
284
- name: "pm-transition",
285
- "enter-active-class": __props.inClass,
286
- "leave-active-class": __props.outClass,
287
- onBeforeEnter: beforeOpen,
288
- onEnter: opening,
289
- onAfterEnter: afterOpen,
290
- onBeforeLeave: beforeClose,
291
- onLeave: closing,
292
- onAfterLeave: afterClose
293
- }, {
294
- default: vue.withCtx(() => [
295
- vue.withDirectives(vue.createElementVNode("div", {
296
- ref_key: "pmWrapper",
297
- ref: pmWrapper,
298
- "data-pm-wrapper-id": id.value,
299
- tabindex: "-1",
300
- class: vue.normalizeClass(__props.wrapperClass),
301
- style: vue.normalizeStyle({ "z-index": zIndex.value, cursor: __props.enableClose ? "pointer" : "default" }),
302
- role: "dialog",
303
- "aria-label": __props.title,
304
- "aria-modal": "true",
305
- "aria-describedby": `${id.value}-content`,
306
- "aria-labelledby": `${id.value}-title`,
307
- onClick: _cache[0] || (_cache[0] = ($event) => clickOutside($event)),
308
- onKeydown: _cache[1] || (_cache[1] = ($event) => keydown($event))
309
- }, [
310
- vue.createElementVNode("div", {
311
- ref: "pm",
312
- "data-pm-id": id.value,
313
- class: vue.normalizeClass(__props.modalClass),
314
- style: vue.normalizeStyle(__props.modalStyle)
315
- }, [
316
- vue.renderSlot(_ctx.$slots, "title-wrapper", {}, () => [
317
- vue.createElementVNode("div", _hoisted_4, [
318
- __props.title ? (vue.openBlock(), vue.createElementBlock("h3", {
319
- key: 0,
320
- id: `${id.value}-title`,
321
- class: "mr-auto pt-4 text-xl font-semibold"
322
- }, vue.toDisplayString(__props.title), 9, _hoisted_5)) : vue.createCommentVNode("", true),
323
- vue.createElementVNode("div", _hoisted_6, [
324
- __props.enableClose ? (vue.openBlock(), vue.createBlock(pCloseBtn, {
325
- key: 0,
326
- disabled: __props.disabled,
327
- "aria-label": __props.closeLabel,
328
- onClick: vue.withModifiers(close, ["prevent"])
329
- }, null, 8, ["disabled", "aria-label"])) : vue.createCommentVNode("", true)
330
- ])
331
- ])
332
- ], true),
333
- __props.errorMsg ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7, [
334
- vue.createVNode(pAlert, { type: "error" }, {
335
- default: vue.withCtx(() => [
336
- vue.createTextVNode(vue.toDisplayString(__props.errorMsg), 1)
337
- ]),
338
- _: 1
339
- })
340
- ])) : vue.createCommentVNode("", true),
341
- vue.renderSlot(_ctx.$slots, "content-wrapper", {}, () => [
342
- vue.createElementVNode("div", {
343
- id: `${id.value}-content`,
344
- class: vue.normalizeClass([
345
- "relative grow overflow-y-auto overflow-x-hidden px-8",
346
- { "pointer-events-none opacity-50": __props.disabled }
347
- ])
348
- }, [
349
- vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
350
- ], 10, _hoisted_8)
351
- ], true),
352
- _ctx.$slots["footer"] ? vue.renderSlot(_ctx.$slots, "footer-wrapper", { key: 1 }, () => [
353
- vue.createElementVNode("div", _hoisted_9, [
354
- vue.renderSlot(_ctx.$slots, "footer", {}, void 0, true)
355
- ])
356
- ], true) : vue.createCommentVNode("", true)
357
- ], 14, _hoisted_3)
358
- ], 46, _hoisted_2), [
359
- [vue.vShow, show.value]
360
- ])
361
- ]),
362
- _: 3
363
- }, 8, ["enter-active-class", "leave-active-class"])
364
- ], 8, ["to"])) : vue.createCommentVNode("", true);
365
- };
366
- }
367
- });
368
- const pModal = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-ee599a02"]]);
369
- module.exports = pModal;
@@ -1,3 +0,0 @@
1
- "use strict";
2
- const pPaginationInfo_vue_vue_type_script_setup_true_lang = require("./chunks/p-pagination-info.js");
3
- module.exports = pPaginationInfo_vue_vue_type_script_setup_true_lang._sfc_main;
@@ -1,3 +0,0 @@
1
- "use strict";
2
- const pPagination_vue_vue_type_script_setup_true_lang = require("./chunks/p-pagination.js");
3
- module.exports = pPagination_vue_vue_type_script_setup_true_lang._sfc_main;
@@ -1,41 +0,0 @@
1
- "use strict";
2
- const vue = require("vue");
3
- const _pluginVue_exportHelper = require("./chunks/_plugin-vue_export-helper.js");
4
- const _sfc_main = vue.defineComponent({
5
- name: "PProgressBar",
6
- props: {
7
- total: {
8
- type: Number,
9
- required: true
10
- },
11
- items: {
12
- type: Array,
13
- required: true
14
- }
15
- }
16
- });
17
- const _hoisted_1 = {
18
- class: "flex justify-start overflow-hidden rounded bg-p-blue-20",
19
- role: "progressbar"
20
- };
21
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
22
- const _directive_tooltip = vue.resolveDirective("tooltip");
23
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
24
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.items, (item) => {
25
- return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
26
- key: `progress-value-${item.color}`,
27
- class: "h-full",
28
- style: vue.normalizeStyle({ width: `${item.value / _ctx.total * 100}%`, background: item.color })
29
- }, null, 4)), [
30
- [
31
- _directive_tooltip,
32
- item.label,
33
- void 0,
34
- { top: true }
35
- ]
36
- ]);
37
- }), 128))
38
- ]);
39
- }
40
- const pProgressBar = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["render", _sfc_render]]);
41
- module.exports = pProgressBar;
@@ -1,3 +0,0 @@
1
- "use strict";
2
- const pRingLoader_vue_vue_type_script_setup_true_lang = require("./chunks/p-ring-loader.js");
3
- module.exports = pRingLoader_vue_vue_type_script_setup_true_lang._sfc_main;
@@ -1,3 +0,0 @@
1
- "use strict";
2
- const pSelectBtn_vue_vue_type_script_setup_true_lang = require("./chunks/p-select-btn.js");
3
- module.exports = pSelectBtn_vue_vue_type_script_setup_true_lang._sfc_main;
@@ -1,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const SIZES = { sm: `h-8 text-sm`, md: `h-10 text-base`, lg: `h-12 text-lg` };
4
- exports.SIZES = SIZES;
@@ -1,111 +0,0 @@
1
- "use strict";
2
- const vue = require("vue");
3
- const _pluginVue_exportHelper = require("./chunks/_plugin-vue_export-helper.js");
4
- const SIZES = { sm: "h-7 px-4 text-xs", md: "h-9 px-5 text-sm", lg: "h-11 px-7 text-base" };
5
- const ACTIVE_CLASS = "text-p-purple-60";
6
- const getOffsetValues = (container) => {
7
- const el = container.cloneNode(true);
8
- el.style.visibility = "hidden";
9
- document.body.appendChild(el);
10
- const activeBtn = el.querySelector(`button.${ACTIVE_CLASS}`);
11
- const res = { width: `${activeBtn.offsetWidth}px`, left: `${activeBtn.offsetLeft}px` };
12
- document.body.removeChild(el);
13
- return res;
14
- };
15
- const _sfc_main = vue.defineComponent({
16
- props: {
17
- modelValue: {
18
- type: [String, Number],
19
- default: ""
20
- },
21
- items: {
22
- type: Array,
23
- default: () => []
24
- },
25
- itemText: {
26
- type: String,
27
- default: "text"
28
- },
29
- itemSubtext: {
30
- type: String,
31
- default: "subtext"
32
- },
33
- itemValue: {
34
- type: [String, Number],
35
- default: "value"
36
- },
37
- size: {
38
- type: String,
39
- default: "md",
40
- validator(value) {
41
- return Object.keys(SIZES).includes(value);
42
- }
43
- }
44
- },
45
- emits: ["update:modelValue"],
46
- data() {
47
- return {
48
- SIZES,
49
- ACTIVE_CLASS
50
- };
51
- },
52
- watch: {
53
- modelValue: {
54
- handler() {
55
- setTimeout(() => this.setPillStyle(), 60);
56
- },
57
- immediate: true
58
- }
59
- },
60
- methods: {
61
- click(e, option) {
62
- if (!option.disabled) {
63
- this.$emit("update:modelValue", option[this.itemValue]);
64
- }
65
- },
66
- setPillStyle() {
67
- const el = this.$el.querySelector(`button.${ACTIVE_CLASS}`);
68
- if (!el) {
69
- return;
70
- }
71
- const dimensions = el.offsetWidth !== 0 ? { left: `${el.offsetLeft}px`, width: `${el.offsetWidth}px` } : getOffsetValues(this.$el);
72
- this.$refs.pill.style.left = dimensions.left;
73
- this.$refs.pill.style.width = dimensions.width;
74
- }
75
- }
76
- });
77
- const _hoisted_1 = { class: "relative inline-flex rounded-full border-2 border-p-gray-30 bg-p-gray-30 text-center font-semibold text-p-gray-50" };
78
- const _hoisted_2 = {
79
- ref: "pill",
80
- class: "absolute left-0 top-0 inline-block h-full rounded-full bg-surface duration-200 ease-in-out"
81
- };
82
- const _hoisted_3 = ["disabled", "onClick"];
83
- const _hoisted_4 = { class: "flex" };
84
- const _hoisted_5 = {
85
- key: 0,
86
- class: "pl-1 opacity-50"
87
- };
88
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
89
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
90
- vue.createElementVNode("div", _hoisted_2, null, 512),
91
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.items, (o) => {
92
- return vue.openBlock(), vue.createElementBlock("button", {
93
- key: o[_ctx.itemValue],
94
- disabled: o.disabled,
95
- class: vue.normalizeClass(["z-10 duration-700", [
96
- _ctx.SIZES[_ctx.size],
97
- _ctx.modelValue === o[_ctx.itemValue] ? `${_ctx.ACTIVE_CLASS} hover:text-p-purple-70` : "hover:text-p-gray-60",
98
- { "opacity-25": o.disabled }
99
- ]]),
100
- onClick: ($event) => _ctx.click($event, o)
101
- }, [
102
- vue.createElementVNode("div", _hoisted_4, [
103
- vue.createElementVNode("div", null, vue.toDisplayString(o[_ctx.itemText]), 1),
104
- o[_ctx.itemSubtext] ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5, vue.toDisplayString(o[_ctx.itemSubtext]), 1)) : vue.createCommentVNode("", true)
105
- ])
106
- ], 10, _hoisted_3);
107
- }), 128))
108
- ]);
109
- }
110
- const pSelectPill = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["render", _sfc_render]]);
111
- module.exports = pSelectPill;
@@ -1,3 +0,0 @@
1
- "use strict";
2
- const pSelect_vue_vue_type_script_setup_true_lang = require("./chunks/p-select.js");
3
- module.exports = pSelect_vue_vue_type_script_setup_true_lang._sfc_main;
@@ -1,73 +0,0 @@
1
- "use strict";
2
- const vue = require("vue");
3
- const _pluginVue_exportHelper = require("./chunks/_plugin-vue_export-helper.js");
4
- const LOADER_TYPES = {
5
- rectangle: "rectangle",
6
- circle: "circle"
7
- };
8
- const LOADER_CSS_CLASSES = {
9
- [LOADER_TYPES.rectangle]: "rounded",
10
- [LOADER_TYPES.circle]: "rounded-full"
11
- };
12
- const SHIMMER_COLOR = "#ffffff";
13
- const isHexColor = (hexColor) => {
14
- const hex = hexColor.replace("#", "");
15
- return typeof hexColor === "string" && hexColor.startsWith("#") && hex.length === 6 && !isNaN(Number("0x" + hex));
16
- };
17
- const hexToRgb = (hex) => {
18
- var _a;
19
- return `${(_a = hex.match(/\w\w/g)) == null ? void 0 : _a.map((x) => +`0x${x}`)}`;
20
- };
21
- const _sfc_main = vue.defineComponent({
22
- name: "PSkeletonLoader",
23
- props: {
24
- type: {
25
- type: String,
26
- default: LOADER_TYPES.rectangle,
27
- validator(value) {
28
- return Object.values(LOADER_TYPES).includes(value);
29
- }
30
- },
31
- bgClass: {
32
- type: String,
33
- default: "bg-p-gray-30"
34
- },
35
- cssClass: {
36
- type: String,
37
- default: ""
38
- },
39
- shimmerColor: {
40
- type: String,
41
- default: SHIMMER_COLOR
42
- }
43
- },
44
- data() {
45
- return {
46
- LOADER_TYPES
47
- };
48
- },
49
- computed: {
50
- shimmerStyle() {
51
- const rgb = isHexColor(this.shimmerColor) ? hexToRgb(this.shimmerColor) : SHIMMER_COLOR;
52
- return {
53
- backgroundImage: `linear-gradient(90deg, rgba(${rgb}, 0) 0%, rgba(${rgb}, 0.2) 20%, rgba(${rgb}, 0.5) 60%, rgba(${rgb}, 0))`
54
- };
55
- },
56
- loaderClass() {
57
- return this.cssClass ? this.cssClass : LOADER_CSS_CLASSES[this.type];
58
- }
59
- }
60
- });
61
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
62
- return vue.openBlock(), vue.createElementBlock("div", {
63
- class: vue.normalizeClass([_ctx.bgClass, _ctx.loaderClass, "relative overflow-hidden"])
64
- }, [
65
- vue.createElementVNode("div", {
66
- class: "shimmer absolute bottom-0 left-0 right-0 top-0",
67
- style: vue.normalizeStyle(_ctx.shimmerStyle)
68
- }, null, 4),
69
- vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
70
- ], 2);
71
- }
72
- const PSkeletonLoader = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-53e537dc"]]);
73
- module.exports = PSkeletonLoader;
@@ -1,20 +0,0 @@
1
- "use strict";
2
- const vue = require("vue");
3
- const _pluginVue_exportHelper = require("./chunks/_plugin-vue_export-helper.js");
4
- const _sfc_main = vue.defineComponent({
5
- name: "PTableFilterIcon",
6
- inheritAttrs: false,
7
- props: {
8
- active: {
9
- type: Boolean,
10
- default: false
11
- }
12
- }
13
- });
14
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
15
- return vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
16
- class: ["h-5 w-5 shrink-0 cursor-pointer filter", { active: _ctx.active }]
17
- }, _ctx.$attrs), null, 16);
18
- }
19
- const PTableFilterIcon = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-cbac2434"]]);
20
- module.exports = PTableFilterIcon;