@pequity/squirrel 1.0.20-beta.2 → 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 -1
  4. package/package.json +20 -22
  5. package/dist/cjs/chunks/_plugin-vue_export-helper.js +0 -1
  6. package/dist/cjs/chunks/p-action-bar.js +0 -1
  7. package/dist/cjs/chunks/p-card.js +0 -1
  8. package/dist/cjs/chunks/p-checkbox.js +0 -1
  9. package/dist/cjs/chunks/p-dropdown-select.js +0 -1
  10. package/dist/cjs/chunks/p-input-percent.js +0 -1
  11. package/dist/cjs/chunks/p-pagination-info.js +0 -1
  12. package/dist/cjs/chunks/p-pagination.js +0 -1
  13. package/dist/cjs/chunks/p-ring-loader.js +0 -1
  14. package/dist/cjs/chunks/p-select-btn.js +0 -1
  15. package/dist/cjs/chunks/p-select.js +0 -1
  16. package/dist/cjs/chunks/p-table-loader.js +0 -1
  17. package/dist/cjs/chunks/p-tabs.js +0 -1
  18. package/dist/cjs/config.js +0 -1
  19. package/dist/cjs/currency.js +0 -1
  20. package/dist/cjs/dom.js +0 -1
  21. package/dist/cjs/index.js +0 -1
  22. package/dist/cjs/inputClassesMixin.js +0 -1
  23. package/dist/cjs/inputClassesShared.js +0 -1
  24. package/dist/cjs/listKeyboardNavigation.js +0 -1
  25. package/dist/cjs/number.js +0 -1
  26. package/dist/cjs/object.js +0 -1
  27. package/dist/cjs/p-action-bar.js +0 -1
  28. package/dist/cjs/p-alert.js +0 -1
  29. package/dist/cjs/p-avatar.js +0 -1
  30. package/dist/cjs/p-btn.js +0 -5
  31. package/dist/cjs/p-card.js +0 -1
  32. package/dist/cjs/p-checkbox.js +0 -1
  33. package/dist/cjs/p-chips.js +0 -1
  34. package/dist/cjs/p-close-btn.js +0 -1
  35. package/dist/cjs/p-date-picker.js +0 -1
  36. package/dist/cjs/p-drawer.js +0 -1
  37. package/dist/cjs/p-dropdown-select.js +0 -1
  38. package/dist/cjs/p-dropdown.js +0 -1
  39. package/dist/cjs/p-file-upload.js +0 -1
  40. package/dist/cjs/p-info-icon.js +0 -1
  41. package/dist/cjs/p-inline-date-picker.js +0 -1
  42. package/dist/cjs/p-input-number.js +0 -1
  43. package/dist/cjs/p-input-percent.js +0 -1
  44. package/dist/cjs/p-input-search.js +0 -1
  45. package/dist/cjs/p-input.js +0 -1
  46. package/dist/cjs/p-loading.js +0 -1
  47. package/dist/cjs/p-modal.js +0 -1
  48. package/dist/cjs/p-pagination-info.js +0 -1
  49. package/dist/cjs/p-pagination.js +0 -1
  50. package/dist/cjs/p-progress-bar.js +0 -1
  51. package/dist/cjs/p-ring-loader.js +0 -1
  52. package/dist/cjs/p-select-btn.js +0 -1
  53. package/dist/cjs/p-select-list.js +0 -1
  54. package/dist/cjs/p-select-pill.js +0 -1
  55. package/dist/cjs/p-select.js +0 -1
  56. package/dist/cjs/p-skeleton-loader.js +0 -1
  57. package/dist/cjs/p-table-filter-icon.js +0 -1
  58. package/dist/cjs/p-table-header-cell.js +0 -1
  59. package/dist/cjs/p-table-loader.js +0 -1
  60. package/dist/cjs/p-table-sort.js +0 -1
  61. package/dist/cjs/p-table-td.js +0 -1
  62. package/dist/cjs/p-table.js +0 -1
  63. package/dist/cjs/p-tabs.js +0 -1
  64. package/dist/cjs/p-textarea.js +0 -1
  65. package/dist/cjs/p-toggle.js +0 -1
  66. package/dist/cjs/pagination.js +0 -1
  67. package/dist/cjs/string.js +0 -1
  68. package/dist/cjs/tailwind.js +0 -1
  69. package/dist/cjs/text.js +0 -1
  70. package/dist/cjs/useInputClasses.js +0 -1
  71. package/dist/cjs/usePLoading.js +0 -1
  72. package/dist/cjs/usePModal.js +0 -1
  73. package/dist/cjs/usePTableColResize.js +0 -1
  74. package/dist/cjs/usePTableRowVirtualizer.js +0 -1
  75. package/dist/cjs/useSelectList.js +0 -1
  76. package/dist/es/chunks/_plugin-vue_export-helper.js +0 -9
  77. package/dist/es/chunks/p-action-bar.js +0 -52
  78. package/dist/es/chunks/p-card.js +0 -25
  79. package/dist/es/chunks/p-checkbox.js +0 -22
  80. package/dist/es/chunks/p-dropdown-select.js +0 -366
  81. package/dist/es/chunks/p-input-percent.js +0 -45
  82. package/dist/es/chunks/p-pagination-info.js +0 -61
  83. package/dist/es/chunks/p-pagination.js +0 -93
  84. package/dist/es/chunks/p-ring-loader.js +0 -59
  85. package/dist/es/chunks/p-select-btn.js +0 -77
  86. package/dist/es/chunks/p-select.js +0 -97
  87. package/dist/es/chunks/p-table-loader.js +0 -57
  88. package/dist/es/chunks/p-tabs.js +0 -47
  89. package/dist/es/config.js +0 -105
  90. package/dist/es/currency.js +0 -9
  91. package/dist/es/dom.js +0 -15
  92. package/dist/es/index.js +0 -836
  93. package/dist/es/inputClassesMixin.js +0 -45
  94. package/dist/es/inputClassesShared.js +0 -61
  95. package/dist/es/listKeyboardNavigation.js +0 -60
  96. package/dist/es/number.js +0 -4
  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 -61
  100. package/dist/es/p-avatar.js +0 -69
  101. package/dist/es/p-btn.js +0 -317
  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 -91
  105. package/dist/es/p-close-btn.js +0 -33
  106. package/dist/es/p-date-picker.js +0 -132
  107. package/dist/es/p-drawer.js +0 -235
  108. package/dist/es/p-dropdown-select.js +0 -4
  109. package/dist/es/p-dropdown.js +0 -120
  110. package/dist/es/p-file-upload.js +0 -13
  111. package/dist/es/p-info-icon.js +0 -31
  112. package/dist/es/p-inline-date-picker.js +0 -132
  113. package/dist/es/p-input-number.js +0 -129
  114. package/dist/es/p-input-percent.js +0 -4
  115. package/dist/es/p-input-search.js +0 -109
  116. package/dist/es/p-input.js +0 -84
  117. package/dist/es/p-loading.js +0 -30
  118. package/dist/es/p-modal.js +0 -283
  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 -39
  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 -95
  126. package/dist/es/p-select.js +0 -4
  127. package/dist/es/p-skeleton-loader.js +0 -69
  128. package/dist/es/p-table-filter-icon.js +0 -21
  129. package/dist/es/p-table-header-cell.js +0 -71
  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 -42
  133. package/dist/es/p-table.js +0 -8
  134. package/dist/es/p-tabs.js +0 -4
  135. package/dist/es/p-textarea.js +0 -72
  136. package/dist/es/p-toggle.js +0 -110
  137. package/dist/es/pagination.js +0 -12
  138. package/dist/es/string.js +0 -4
  139. package/dist/es/tailwind.js +0 -3794
  140. package/dist/es/text.js +0 -11
  141. package/dist/es/useInputClasses.js +0 -28
  142. package/dist/es/usePLoading.js +0 -19
  143. package/dist/es/usePModal.js +0 -18
  144. package/dist/es/usePTableColResize.js +0 -49
  145. package/dist/es/usePTableRowVirtualizer.js +0 -22
  146. package/dist/es/useSelectList.js +0 -143
@@ -1,283 +0,0 @@
1
- import { defineComponent as R, useCssVars as G, ref as c, onBeforeMount as J, onMounted as Q, getCurrentInstance as X, watch as Y, nextTick as E, onBeforeUnmount as _, openBlock as g, createBlock as M, Teleport as ee, createVNode as k, Transition as V, withCtx as I, withDirectives as $, createElementVNode as i, normalizeClass as h, normalizeStyle as A, vShow as z, renderSlot as m, createElementBlock as L, toDisplayString as W, createCommentVNode as p, withModifiers as te, createTextVNode as le } from "vue";
2
- import ae from "./p-alert.js";
3
- import oe from "./p-close-btn.js";
4
- import { usePModal as ne } from "./usePModal.js";
5
- import { _ as se } from "./chunks/_plugin-vue_export-helper.js";
6
- const ie = ["data-pm-backdrop-id"], re = ["data-pm-wrapper-id", "aria-label", "aria-describedby", "aria-labelledby"], de = ["data-pm-id"], ue = { class: "flex pb-4 pl-8 pr-4 pt-4" }, ce = ["id"], fe = { class: "ml-auto" }, me = {
7
- key: 0,
8
- class: "mb-4 px-8"
9
- }, pe = ["id"], ve = { class: "mt-6 px-8 pt-6" }, N = 'a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), [tabindex]:not([tabindex="-1"])', be = /* @__PURE__ */ R({
10
- name: "PModal",
11
- __name: "p-modal",
12
- props: {
13
- name: {
14
- type: String,
15
- default: ""
16
- },
17
- title: {
18
- type: String,
19
- default: ""
20
- },
21
- baseZindex: {
22
- type: Number,
23
- default: 1051
24
- },
25
- bgClass: {
26
- type: [String, Object, Array],
27
- default: "fixed bottom-0 left-0 right-0 top-0 bg-black bg-opacity-20"
28
- },
29
- wrapperClass: {
30
- type: [String, Object, Array],
31
- 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"
32
- },
33
- modalClass: {
34
- type: [String, Object, Array],
35
- default: "pm relative flex flex-col rounded-2xl pb-6 cursor-default bg-surface shadow-xl"
36
- },
37
- modalStyle: {
38
- type: [String, Object, Array],
39
- default: ""
40
- },
41
- inClass: {
42
- type: String,
43
- default: "slideInTop"
44
- },
45
- outClass: {
46
- type: String,
47
- default: "slideOutTop"
48
- },
49
- bgInClass: {
50
- type: String,
51
- default: "fadeIn"
52
- },
53
- bgOutClass: {
54
- type: String,
55
- default: "fadeOut"
56
- },
57
- appendTo: {
58
- type: String,
59
- default: "body"
60
- },
61
- live: {
62
- type: Boolean,
63
- default: !1
64
- },
65
- enableClose: {
66
- type: Boolean,
67
- default: !0
68
- },
69
- modelValue: {
70
- type: Boolean,
71
- default: !1
72
- },
73
- closeLabel: {
74
- type: String,
75
- default: "Close"
76
- },
77
- disabled: {
78
- type: Boolean,
79
- default: !1
80
- },
81
- errorMsg: {
82
- type: String,
83
- default: ""
84
- },
85
- maxWidth: {
86
- type: String,
87
- default: "500px"
88
- }
89
- },
90
- emits: [
91
- "before-open",
92
- "opening",
93
- "opened",
94
- "before-close",
95
- "closing",
96
- "closed",
97
- "update:modelValue"
98
- ],
99
- setup(t, { emit: Z }) {
100
- G((e) => ({
101
- "8a536574": t.maxWidth
102
- }));
103
- let v = 0;
104
- const s = Z, o = t, x = ne(), r = c(0), n = c(""), b = c(!1), y = c(!1), d = c(null), f = c(null);
105
- J(() => {
106
- o.live && (y.value = !0);
107
- }), Q(() => {
108
- var l;
109
- n.value = "pm-" + ((l = X()) == null ? void 0 : l.uid);
110
- const e = o.name ? () => x.state.modals[o.name] : () => o.modelValue;
111
- Y(
112
- e,
113
- (a) => {
114
- a ? (y.value = !0, E(() => {
115
- b.value = !0;
116
- })) : b.value = !1;
117
- },
118
- {
119
- immediate: !0
120
- }
121
- );
122
- }), _(() => {
123
- d.value = null, o.name && x.hide(o.name);
124
- });
125
- const C = () => {
126
- o.enableClose === !0 && (s("update:modelValue", !1), o.name && x.hide(o.name));
127
- }, j = (e) => {
128
- e.target === f.value && C();
129
- }, q = (e) => {
130
- var l;
131
- if ((e.which === 27 || e.keyCode === 27) && C(), e.which === 9 || e.keyCode === 9) {
132
- const a = [].slice.call((l = f.value) == null ? void 0 : l.querySelectorAll(N)).filter(function(u) {
133
- return !!(u.offsetWidth || u.offsetHeight || u.getClientRects().length);
134
- });
135
- e.shiftKey ? (e.target === a[0] || e.target === f.value) && (e.preventDefault(), a[a.length - 1].focus()) : e.target === a[a.length - 1] && (e.preventDefault(), a[0].focus());
136
- }
137
- }, B = () => [].slice.call(document.querySelectorAll("[data-pm-wrapper-id]")).filter((e) => e.style.display !== "none"), O = () => B().reduce((e, l) => parseInt(l.style.zIndex) > e ? parseInt(l.style.zIndex) : e, 0), T = (e) => {
138
- const l = e.querySelector("[autofocus]");
139
- if (l)
140
- l.focus();
141
- else {
142
- const a = e.querySelectorAll(N);
143
- a.length ? a[0].focus() : e.focus();
144
- }
145
- }, D = () => {
146
- d.value = document.activeElement;
147
- const e = O();
148
- v ? r.value = v + 2 : r.value = e === 0 ? o.baseZindex : e + 2, v = r.value, s("before-open");
149
- }, F = () => {
150
- s("opening");
151
- }, P = () => {
152
- T(f.value), s("opened");
153
- }, K = () => {
154
- s("before-close");
155
- }, U = () => {
156
- s("closing");
157
- }, H = () => {
158
- r.value = 0, o.live || (y.value = !1), E(() => {
159
- window.requestAnimationFrame(() => {
160
- var l, a;
161
- const e = O();
162
- if (e > 0) {
163
- const u = B();
164
- for (let S = 0; S < u.length; S++) {
165
- const w = u[S];
166
- if (parseInt(w.style.zIndex) === e) {
167
- w.contains(d.value) ? (l = d.value) == null || l.focus() : T(w);
168
- break;
169
- }
170
- }
171
- } else
172
- document.body.contains(d.value) && ((a = d.value) == null || a.focus());
173
- v = 0, s("closed");
174
- });
175
- });
176
- };
177
- return (e, l) => y.value ? (g(), M(ee, {
178
- key: 0,
179
- to: t.appendTo
180
- }, [
181
- k(V, {
182
- name: "pm-backdrop-transition",
183
- "enter-active-class": t.bgInClass,
184
- "leave-active-class": t.bgOutClass
185
- }, {
186
- default: I(() => [
187
- $(i("div", {
188
- "data-pm-backdrop-id": n.value,
189
- class: h(t.bgClass),
190
- style: A({ "z-index": r.value - 1 })
191
- }, null, 14, ie), [
192
- [z, b.value]
193
- ])
194
- ]),
195
- _: 1
196
- }, 8, ["enter-active-class", "leave-active-class"]),
197
- k(V, {
198
- name: "pm-transition",
199
- "enter-active-class": t.inClass,
200
- "leave-active-class": t.outClass,
201
- onBeforeEnter: D,
202
- onEnter: F,
203
- onAfterEnter: P,
204
- onBeforeLeave: K,
205
- onLeave: U,
206
- onAfterLeave: H
207
- }, {
208
- default: I(() => [
209
- $(i("div", {
210
- ref_key: "pmWrapper",
211
- ref: f,
212
- "data-pm-wrapper-id": n.value,
213
- tabindex: "-1",
214
- class: h(t.wrapperClass),
215
- style: A({ "z-index": r.value, cursor: t.enableClose ? "pointer" : "default" }),
216
- role: "dialog",
217
- "aria-label": t.title,
218
- "aria-modal": "true",
219
- "aria-describedby": `${n.value}-content`,
220
- "aria-labelledby": `${n.value}-title`,
221
- onClick: l[0] || (l[0] = (a) => j(a)),
222
- onKeydown: l[1] || (l[1] = (a) => q(a))
223
- }, [
224
- i("div", {
225
- ref: "pm",
226
- "data-pm-id": n.value,
227
- class: h(t.modalClass),
228
- style: A(t.modalStyle)
229
- }, [
230
- m(e.$slots, "title-wrapper", {}, () => [
231
- i("div", ue, [
232
- t.title ? (g(), L("h3", {
233
- key: 0,
234
- id: `${n.value}-title`,
235
- class: "mr-auto pt-4 text-xl font-semibold"
236
- }, W(t.title), 9, ce)) : p("", !0),
237
- i("div", fe, [
238
- t.enableClose ? (g(), M(oe, {
239
- key: 0,
240
- disabled: t.disabled,
241
- "aria-label": t.closeLabel,
242
- onClick: te(C, ["prevent"])
243
- }, null, 8, ["disabled", "aria-label"])) : p("", !0)
244
- ])
245
- ])
246
- ], !0),
247
- t.errorMsg ? (g(), L("div", me, [
248
- k(ae, { type: "error" }, {
249
- default: I(() => [
250
- le(W(t.errorMsg), 1)
251
- ]),
252
- _: 1
253
- })
254
- ])) : p("", !0),
255
- m(e.$slots, "content-wrapper", {}, () => [
256
- i("div", {
257
- id: `${n.value}-content`,
258
- class: h([
259
- "relative grow overflow-y-auto overflow-x-hidden px-8",
260
- { "pointer-events-none opacity-50": t.disabled }
261
- ])
262
- }, [
263
- m(e.$slots, "default", {}, void 0, !0)
264
- ], 10, pe)
265
- ], !0),
266
- e.$slots.footer ? m(e.$slots, "footer-wrapper", { key: 1 }, () => [
267
- i("div", ve, [
268
- m(e.$slots, "footer", {}, void 0, !0)
269
- ])
270
- ], !0) : p("", !0)
271
- ], 14, de)
272
- ], 46, re), [
273
- [z, b.value]
274
- ])
275
- ]),
276
- _: 3
277
- }, 8, ["enter-active-class", "leave-active-class"])
278
- ], 8, ["to"])) : p("", !0);
279
- }
280
- }), Se = /* @__PURE__ */ se(be, [["__scopeId", "data-v-ee599a02"]]);
281
- export {
282
- Se as default
283
- };
@@ -1,4 +0,0 @@
1
- import { _ as f } from "./chunks/p-pagination-info.js";
2
- export {
3
- f as default
4
- };
@@ -1,4 +0,0 @@
1
- import { _ as f } from "./chunks/p-pagination.js";
2
- export {
3
- f as default
4
- };
@@ -1,39 +0,0 @@
1
- import { defineComponent as l, resolveDirective as n, openBlock as r, createElementBlock as o, Fragment as i, renderList as a, withDirectives as p, normalizeStyle as u } from "vue";
2
- import { _ as c } from "./chunks/_plugin-vue_export-helper.js";
3
- const d = l({
4
- name: "PProgressBar",
5
- props: {
6
- total: {
7
- type: Number,
8
- required: !0
9
- },
10
- items: {
11
- type: Array,
12
- required: !0
13
- }
14
- }
15
- }), f = {
16
- class: "flex justify-start overflow-hidden rounded bg-p-blue-20",
17
- role: "progressbar"
18
- };
19
- function _(t, m, v, g, y, b) {
20
- const s = n("tooltip");
21
- return r(), o("div", f, [
22
- (r(!0), o(i, null, a(t.items, (e) => p((r(), o("div", {
23
- key: `progress-value-${e.color}`,
24
- class: "h-full",
25
- style: u({ width: `${e.value / t.total * 100}%`, background: e.color })
26
- }, null, 4)), [
27
- [
28
- s,
29
- e.label,
30
- void 0,
31
- { top: !0 }
32
- ]
33
- ])), 128))
34
- ]);
35
- }
36
- const k = /* @__PURE__ */ c(d, [["render", _]]);
37
- export {
38
- k as default
39
- };
@@ -1,4 +0,0 @@
1
- import { _ as f } from "./chunks/p-ring-loader.js";
2
- export {
3
- f as default
4
- };
@@ -1,4 +0,0 @@
1
- import { _ as f } from "./chunks/p-select-btn.js";
2
- export {
3
- f as default
4
- };
@@ -1,4 +0,0 @@
1
- const t = { sm: "h-8 text-sm", md: "h-10 text-base", lg: "h-12 text-lg" };
2
- export {
3
- t as SIZES
4
- };
@@ -1,95 +0,0 @@
1
- import { defineComponent as f, openBlock as i, createElementBlock as s, createElementVNode as o, Fragment as m, renderList as c, normalizeClass as h, toDisplayString as a, createCommentVNode as y } from "vue";
2
- import { _ as b } from "./chunks/_plugin-vue_export-helper.js";
3
- const u = { sm: "h-7 px-4 text-xs", md: "h-9 px-5 text-sm", lg: "h-11 px-7 text-base" }, r = "text-p-purple-60", S = (e) => {
4
- const t = e.cloneNode(!0);
5
- t.style.visibility = "hidden", document.body.appendChild(t);
6
- const d = t.querySelector(`button.${r}`), n = { width: `${d.offsetWidth}px`, left: `${d.offsetLeft}px` };
7
- return document.body.removeChild(t), n;
8
- }, x = f({
9
- props: {
10
- modelValue: {
11
- type: [String, Number],
12
- default: ""
13
- },
14
- items: {
15
- type: Array,
16
- default: () => []
17
- },
18
- itemText: {
19
- type: String,
20
- default: "text"
21
- },
22
- itemSubtext: {
23
- type: String,
24
- default: "subtext"
25
- },
26
- itemValue: {
27
- type: [String, Number],
28
- default: "value"
29
- },
30
- size: {
31
- type: String,
32
- default: "md",
33
- validator(e) {
34
- return Object.keys(u).includes(e);
35
- }
36
- }
37
- },
38
- emits: ["update:modelValue"],
39
- data() {
40
- return {
41
- SIZES: u,
42
- ACTIVE_CLASS: r
43
- };
44
- },
45
- watch: {
46
- modelValue: {
47
- handler() {
48
- setTimeout(() => this.setPillStyle(), 60);
49
- },
50
- immediate: !0
51
- }
52
- },
53
- methods: {
54
- click(e, t) {
55
- t.disabled || this.$emit("update:modelValue", t[this.itemValue]);
56
- },
57
- setPillStyle() {
58
- const e = this.$el.querySelector(`button.${r}`);
59
- if (!e)
60
- return;
61
- const t = e.offsetWidth !== 0 ? { left: `${e.offsetLeft}px`, width: `${e.offsetWidth}px` } : S(this.$el);
62
- this.$refs.pill.style.left = t.left, this.$refs.pill.style.width = t.width;
63
- }
64
- }
65
- }), $ = { class: "relative inline-flex rounded-full border-2 border-p-gray-30 bg-p-gray-30 text-center font-semibold text-p-gray-50" }, g = {
66
- ref: "pill",
67
- class: "absolute left-0 top-0 inline-block h-full rounded-full bg-surface duration-200 ease-in-out"
68
- }, V = ["disabled", "onClick"], v = { class: "flex" }, C = {
69
- key: 0,
70
- class: "pl-1 opacity-50"
71
- };
72
- function k(e, t, d, n, _, E) {
73
- return i(), s("div", $, [
74
- o("div", g, null, 512),
75
- (i(!0), s(m, null, c(e.items, (l) => (i(), s("button", {
76
- key: l[e.itemValue],
77
- disabled: l.disabled,
78
- class: h(["z-10 duration-700", [
79
- e.SIZES[e.size],
80
- e.modelValue === l[e.itemValue] ? `${e.ACTIVE_CLASS} hover:text-p-purple-70` : "hover:text-p-gray-60",
81
- { "opacity-25": l.disabled }
82
- ]]),
83
- onClick: (p) => e.click(p, l)
84
- }, [
85
- o("div", v, [
86
- o("div", null, a(l[e.itemText]), 1),
87
- l[e.itemSubtext] ? (i(), s("div", C, a(l[e.itemSubtext]), 1)) : y("", !0)
88
- ])
89
- ], 10, V))), 128))
90
- ]);
91
- }
92
- const L = /* @__PURE__ */ b(x, [["render", k]]);
93
- export {
94
- L as default
95
- };
@@ -1,4 +0,0 @@
1
- import { _ as f } from "./chunks/p-select.js";
2
- export {
3
- f as default
4
- };
@@ -1,69 +0,0 @@
1
- import { defineComponent as l, openBlock as o, createElementBlock as n, normalizeClass as i, createElementVNode as c, normalizeStyle as d, renderSlot as m } from "vue";
2
- import { _ as g } from "./chunks/_plugin-vue_export-helper.js";
3
- const r = {
4
- rectangle: "rectangle",
5
- circle: "circle"
6
- }, p = {
7
- [r.rectangle]: "rounded",
8
- [r.circle]: "rounded-full"
9
- }, a = "#ffffff", u = (e) => {
10
- const t = e.replace("#", "");
11
- return typeof e == "string" && e.startsWith("#") && t.length === 6 && !isNaN(+("0x" + t));
12
- }, f = (e) => {
13
- var t;
14
- return `${(t = e.match(/\w\w/g)) == null ? void 0 : t.map((s) => +`0x${s}`)}`;
15
- }, h = l({
16
- name: "PSkeletonLoader",
17
- props: {
18
- type: {
19
- type: String,
20
- default: r.rectangle,
21
- validator(e) {
22
- return Object.values(r).includes(e);
23
- }
24
- },
25
- bgClass: {
26
- type: String,
27
- default: "bg-p-gray-30"
28
- },
29
- cssClass: {
30
- type: String,
31
- default: ""
32
- },
33
- shimmerColor: {
34
- type: String,
35
- default: a
36
- }
37
- },
38
- data() {
39
- return {
40
- LOADER_TYPES: r
41
- };
42
- },
43
- computed: {
44
- shimmerStyle() {
45
- const e = u(this.shimmerColor) ? f(this.shimmerColor) : a;
46
- return {
47
- backgroundImage: `linear-gradient(90deg, rgba(${e}, 0) 0%, rgba(${e}, 0.2) 20%, rgba(${e}, 0.5) 60%, rgba(${e}, 0))`
48
- };
49
- },
50
- loaderClass() {
51
- return this.cssClass ? this.cssClass : p[this.type];
52
- }
53
- }
54
- });
55
- function S(e, t, s, b, C, y) {
56
- return o(), n("div", {
57
- class: i([e.bgClass, e.loaderClass, "relative overflow-hidden"])
58
- }, [
59
- c("div", {
60
- class: "shimmer absolute bottom-0 left-0 right-0 top-0",
61
- style: d(e.shimmerStyle)
62
- }, null, 4),
63
- m(e.$slots, "default", {}, void 0, !0)
64
- ], 2);
65
- }
66
- const v = /* @__PURE__ */ g(h, [["render", S], ["__scopeId", "data-v-53e537dc"]]);
67
- export {
68
- v as default
69
- };
@@ -1,21 +0,0 @@
1
- import { defineComponent as t, openBlock as r, createElementBlock as o, mergeProps as a } from "vue";
2
- import { _ as n } from "./chunks/_plugin-vue_export-helper.js";
3
- const s = t({
4
- name: "PTableFilterIcon",
5
- inheritAttrs: !1,
6
- props: {
7
- active: {
8
- type: Boolean,
9
- default: !1
10
- }
11
- }
12
- });
13
- function c(e, i, l, p, f, d) {
14
- return r(), o("div", a({
15
- class: ["h-5 w-5 shrink-0 cursor-pointer filter", { active: e.active }]
16
- }, e.$attrs), null, 16);
17
- }
18
- const u = /* @__PURE__ */ n(s, [["render", c], ["__scopeId", "data-v-cbac2434"]]);
19
- export {
20
- u as default
21
- };
@@ -1,71 +0,0 @@
1
- import p from "./p-info-icon.js";
2
- import f from "./p-table-filter-icon.js";
3
- import { defineComponent as d, resolveComponent as l, openBlock as t, createElementBlock as n, createElementVNode as m, normalizeClass as i, toDisplayString as u, createBlock as v, createCommentVNode as r, createVNode as T } from "vue";
4
- import { _ as C } from "./chunks/_plugin-vue_export-helper.js";
5
- const I = "text-xs leading-5 font-bold uppercase truncate shrink", k = d({
6
- name: "PTableHeaderCell",
7
- components: {
8
- PTableFilterIcon: f,
9
- PInfoIcon: p
10
- },
11
- props: {
12
- text: {
13
- type: String,
14
- default: ""
15
- },
16
- textClass: {
17
- type: [String, Object, Array],
18
- default: "text-left"
19
- },
20
- filterActive: {
21
- type: Boolean,
22
- default: !1
23
- },
24
- showFilterIcon: {
25
- type: Boolean,
26
- default: !1
27
- },
28
- tooltipText: {
29
- type: String,
30
- default: ""
31
- }
32
- },
33
- emits: ["click-filter-icon"],
34
- data() {
35
- return {
36
- DEFAULT_CLASSES: I
37
- };
38
- }
39
- }), S = { class: "flex items-center overflow-hidden" }, h = ["title"], y = {
40
- key: 0,
41
- class: "relative ml-1 mr-auto h-3 w-3 shrink-0"
42
- };
43
- function A(e, o, b, x, P, F) {
44
- const a = l("PInfoIcon"), s = l("PTableFilterIcon");
45
- return t(), n("div", S, [
46
- m("div", {
47
- class: i([
48
- e.DEFAULT_CLASSES,
49
- e.textClass,
50
- e.filterActive ? "text-active-blue" : "text-p-purple-60",
51
- { "mr-auto": !e.tooltipText }
52
- ]),
53
- title: e.text
54
- }, u(e.text), 11, h),
55
- e.tooltipText ? (t(), n("div", y, [
56
- e.tooltipText ? (t(), v(a, {
57
- key: 0,
58
- text: e.tooltipText
59
- }, null, 8, ["text"])) : r("", !0)
60
- ])) : r("", !0),
61
- T(s, {
62
- class: i(["ml-2", { hidden: !e.showFilterIcon }]),
63
- active: e.filterActive,
64
- onClick: o[0] || (o[0] = (c) => e.$emit("click-filter-icon", c, e.filterActive))
65
- }, null, 8, ["class", "active"])
66
- ]);
67
- }
68
- const $ = /* @__PURE__ */ C(k, [["render", A]]);
69
- export {
70
- $ as default
71
- };
@@ -1,4 +0,0 @@
1
- import { _ as f } from "./chunks/p-table-loader.js";
2
- export {
3
- f as default
4
- };
@@ -1,8 +0,0 @@
1
- const e = Object.freeze({
2
- NO_SORTING: "noSorting",
3
- ASC: "asc",
4
- DESC: "desc"
5
- });
6
- export {
7
- e as SORTING_TYPES
8
- };
@@ -1,42 +0,0 @@
1
- import { defineComponent as I, inject as r, ref as a, computed as t, openBlock as h, createElementBlock as v, Fragment as _, createElementVNode as d, mergeProps as F, normalizeClass as w, renderSlot as j, unref as x, createCommentVNode as S, pushScopeId as k, popScopeId as z } from "vue";
2
- import { colsInjectionKey as L, isFirstColFixedInjectionKey as T, isLastColFixedInjectionKey as B, isColsResizableInjectionKey as E } from "./p-table.js";
3
- import { _ as K } from "./chunks/_plugin-vue_export-helper.js";
4
- const N = (l) => (k("data-v-50608a90"), l = l(), z(), l), P = /* @__PURE__ */ N(() => /* @__PURE__ */ d("div", { class: "dropdown-anchor" }, null, -1)), R = {
5
- key: 0,
6
- class: "min-w-[80px] border-l border-p-gray-30 bg-gradient-to-r from-white via-p-gray-10 to-p-gray-10"
7
- }, V = /* @__PURE__ */ I({
8
- name: "PTableTd",
9
- inheritAttrs: !1,
10
- __name: "p-table-td",
11
- props: {
12
- colIndex: {},
13
- isEditable: { type: Boolean, default: !1 },
14
- isSelected: { type: Boolean, default: !1 }
15
- },
16
- setup(l) {
17
- const s = l, p = r(L, a([])), i = r(T, a(!1)), o = r(B, a(!1)), b = r(E, a(!1)), u = t(() => s.colIndex === 0), m = t(() => s.colIndex === 1), C = t(() => s.colIndex === p.value.length - 2), n = t(() => s.colIndex === p.value.length - 1), g = t(() => {
18
- const e = [
19
- // Common classes for all cells
20
- "p-0 h-full text-sm"
21
- ];
22
- return s.isEditable && e.push("cursor-pointer"), i.value && u.value ? (e.push("td-col-fixed-border-b"), e.push("first:sticky first:left-0 first:z-10")) : o.value && n.value ? e.push("td-col-fixed-border-b", "last:sticky last:right-0 last:z-10") : e.push("border-b border-p-gray-30"), s.isSelected ? e.push("bg-p-blue-15 group-hover/row:bg-p-blue-15") : e.push("bg-white group-hover/row:bg-p-blue-10"), e;
23
- }), y = t(() => {
24
- const e = ["py-2"], c = i.value && u.value, f = o.value && n.value;
25
- return !c && !f && e.push("w-max"), c ? e.push("td-shadow-right flex flex-col h-full justify-center px-3") : f ? e.push("td-shadow-left flex flex-col h-full justify-center px-3") : i.value && m.value ? e.push("pl-4 pr-2") : o.value && C.value ? e.push("pr-4 pl-2") : e.push("px-2"), e;
26
- });
27
- return (e, c) => (h(), v(_, null, [
28
- d("td", F({ class: g.value }, e.$attrs), [
29
- P,
30
- d("div", {
31
- class: w(y.value)
32
- }, [
33
- j(e.$slots, "default", {}, void 0, !0)
34
- ], 2)
35
- ], 16),
36
- x(b) && n.value && !x(o) ? (h(), v("td", R)) : S("", !0)
37
- ], 64));
38
- }
39
- }), q = /* @__PURE__ */ K(V, [["__scopeId", "data-v-50608a90"]]);
40
- export {
41
- q as default
42
- };
@@ -1,8 +0,0 @@
1
- const o = Symbol("cols"), s = Symbol("isFirstColFixed"), i = Symbol("isLastColFixed"), e = Symbol("isColsResizable"), l = 80;
2
- export {
3
- l as MIN_WIDTH_COL_RESIZE,
4
- o as colsInjectionKey,
5
- e as isColsResizableInjectionKey,
6
- s as isFirstColFixedInjectionKey,
7
- i as isLastColFixedInjectionKey
8
- };
package/dist/es/p-tabs.js DELETED
@@ -1,4 +0,0 @@
1
- import { _ as f } from "./chunks/p-tabs.js";
2
- export {
3
- f as default
4
- };