@pequity/squirrel 1.0.18 → 1.0.20-beta.1

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 (147) hide show
  1. package/dist/cjs/chunks/_plugin-vue_export-helper.js +1 -0
  2. package/dist/cjs/chunks/p-action-bar.js +1 -0
  3. package/dist/cjs/chunks/p-card.js +1 -0
  4. package/dist/cjs/chunks/p-checkbox.js +1 -0
  5. package/dist/cjs/chunks/p-dropdown-select.js +1 -0
  6. package/dist/cjs/chunks/p-input-percent.js +1 -0
  7. package/dist/cjs/chunks/p-pagination-info.js +1 -0
  8. package/dist/cjs/chunks/p-pagination.js +1 -0
  9. package/dist/cjs/chunks/p-ring-loader.js +1 -0
  10. package/dist/cjs/chunks/p-select-btn.js +1 -0
  11. package/dist/cjs/chunks/p-select.js +1 -0
  12. package/dist/cjs/chunks/p-table-loader.js +1 -0
  13. package/dist/cjs/chunks/p-tabs.js +1 -0
  14. package/dist/cjs/config.js +1 -0
  15. package/dist/cjs/currency.js +1 -0
  16. package/dist/cjs/dom.js +1 -0
  17. package/dist/cjs/index.js +1 -0
  18. package/dist/cjs/inputClassesMixin.js +1 -0
  19. package/dist/cjs/inputClassesShared.js +1 -0
  20. package/dist/cjs/listKeyboardNavigation.js +1 -0
  21. package/dist/cjs/number.js +1 -0
  22. package/dist/cjs/object.js +1 -0
  23. package/dist/cjs/p-action-bar.js +1 -0
  24. package/dist/cjs/p-alert.js +1 -0
  25. package/dist/cjs/p-avatar.js +1 -0
  26. package/dist/cjs/p-btn.js +5 -0
  27. package/dist/cjs/p-card.js +1 -0
  28. package/dist/cjs/p-checkbox.js +1 -0
  29. package/dist/cjs/p-chips.js +1 -0
  30. package/dist/cjs/p-close-btn.js +1 -0
  31. package/dist/cjs/p-date-picker.js +1 -0
  32. package/dist/cjs/p-drawer.js +1 -0
  33. package/dist/cjs/p-dropdown-select.js +1 -0
  34. package/dist/cjs/p-dropdown.js +1 -0
  35. package/dist/cjs/p-file-upload.js +1 -0
  36. package/dist/cjs/p-info-icon.js +1 -0
  37. package/dist/cjs/p-inline-date-picker.js +1 -0
  38. package/dist/cjs/p-input-number.js +1 -0
  39. package/dist/cjs/p-input-percent.js +1 -0
  40. package/dist/cjs/p-input-search.js +1 -0
  41. package/dist/cjs/p-input.js +1 -0
  42. package/dist/cjs/p-loading.js +1 -0
  43. package/dist/cjs/p-modal.js +1 -0
  44. package/dist/cjs/p-pagination-info.js +1 -0
  45. package/dist/cjs/p-pagination.js +1 -0
  46. package/dist/cjs/p-progress-bar.js +1 -0
  47. package/dist/cjs/p-ring-loader.js +1 -0
  48. package/dist/cjs/p-select-btn.js +1 -0
  49. package/dist/cjs/p-select-list.js +1 -0
  50. package/dist/cjs/p-select-pill.js +1 -0
  51. package/dist/cjs/p-select.js +1 -0
  52. package/dist/cjs/p-skeleton-loader.js +1 -0
  53. package/dist/cjs/p-table-filter-icon.js +1 -0
  54. package/dist/cjs/p-table-header-cell.js +1 -0
  55. package/dist/cjs/p-table-loader.js +1 -0
  56. package/dist/cjs/p-table-sort.js +1 -0
  57. package/dist/cjs/p-table-td.js +1 -0
  58. package/dist/cjs/p-table.js +1 -0
  59. package/dist/cjs/p-tabs.js +1 -0
  60. package/dist/cjs/p-textarea.js +1 -0
  61. package/dist/cjs/p-toggle.js +1 -0
  62. package/dist/cjs/pagination.js +1 -0
  63. package/dist/cjs/string.js +1 -0
  64. package/dist/cjs/tailwind.js +1 -0
  65. package/dist/cjs/text.js +1 -0
  66. package/dist/cjs/useInputClasses.js +1 -0
  67. package/dist/cjs/usePLoading.js +1 -0
  68. package/dist/cjs/usePModal.js +1 -0
  69. package/dist/cjs/usePTableColResize.js +1 -0
  70. package/dist/cjs/usePTableRowVirtualizer.js +1 -0
  71. package/dist/cjs/useSelectList.js +1 -0
  72. package/dist/es/chunks/_plugin-vue_export-helper.js +9 -0
  73. package/dist/es/chunks/p-action-bar.js +52 -0
  74. package/dist/es/chunks/p-card.js +25 -0
  75. package/dist/es/chunks/p-checkbox.js +22 -0
  76. package/dist/es/chunks/p-dropdown-select.js +366 -0
  77. package/dist/es/chunks/p-input-percent.js +45 -0
  78. package/dist/es/chunks/p-pagination-info.js +61 -0
  79. package/dist/es/chunks/p-pagination.js +93 -0
  80. package/dist/es/chunks/p-ring-loader.js +59 -0
  81. package/dist/es/chunks/p-select-btn.js +77 -0
  82. package/dist/es/chunks/p-select.js +97 -0
  83. package/dist/es/chunks/p-table-loader.js +57 -0
  84. package/dist/es/chunks/p-tabs.js +47 -0
  85. package/dist/es/config.js +105 -0
  86. package/dist/es/currency.js +9 -0
  87. package/dist/es/dom.js +15 -0
  88. package/dist/es/index.js +794 -0
  89. package/dist/es/inputClassesMixin.js +45 -0
  90. package/dist/es/inputClassesShared.js +61 -0
  91. package/dist/es/listKeyboardNavigation.js +60 -0
  92. package/dist/es/number.js +4 -0
  93. package/dist/es/object.js +4 -0
  94. package/dist/es/p-action-bar.js +4 -0
  95. package/dist/es/p-alert.js +61 -0
  96. package/dist/es/p-avatar.js +69 -0
  97. package/dist/es/p-btn.js +317 -0
  98. package/dist/es/p-card.js +4 -0
  99. package/dist/es/p-checkbox.js +4 -0
  100. package/dist/es/p-chips.js +91 -0
  101. package/dist/es/p-close-btn.js +33 -0
  102. package/dist/es/p-date-picker.js +132 -0
  103. package/dist/es/p-drawer.js +235 -0
  104. package/dist/es/p-dropdown-select.js +4 -0
  105. package/dist/es/p-dropdown.js +120 -0
  106. package/dist/es/p-file-upload.js +13 -0
  107. package/dist/es/p-info-icon.js +31 -0
  108. package/dist/es/p-inline-date-picker.js +132 -0
  109. package/dist/es/p-input-number.js +129 -0
  110. package/dist/es/p-input-percent.js +4 -0
  111. package/dist/es/p-input-search.js +109 -0
  112. package/dist/es/p-input.js +84 -0
  113. package/dist/es/p-loading.js +30 -0
  114. package/dist/es/p-modal.js +283 -0
  115. package/dist/es/p-pagination-info.js +4 -0
  116. package/dist/es/p-pagination.js +4 -0
  117. package/dist/es/p-progress-bar.js +39 -0
  118. package/dist/es/p-ring-loader.js +4 -0
  119. package/dist/es/p-select-btn.js +4 -0
  120. package/dist/es/p-select-list.js +4 -0
  121. package/dist/es/p-select-pill.js +95 -0
  122. package/dist/es/p-select.js +4 -0
  123. package/dist/es/p-skeleton-loader.js +69 -0
  124. package/dist/es/p-table-filter-icon.js +21 -0
  125. package/dist/es/p-table-header-cell.js +71 -0
  126. package/dist/es/p-table-loader.js +4 -0
  127. package/dist/es/p-table-sort.js +8 -0
  128. package/dist/es/p-table-td.js +42 -0
  129. package/dist/es/p-table.js +8 -0
  130. package/dist/es/p-tabs.js +4 -0
  131. package/dist/es/p-textarea.js +72 -0
  132. package/dist/es/p-toggle.js +110 -0
  133. package/dist/es/pagination.js +12 -0
  134. package/dist/es/string.js +4 -0
  135. package/dist/es/tailwind.js +3794 -0
  136. package/dist/es/text.js +11 -0
  137. package/dist/es/useInputClasses.js +28 -0
  138. package/dist/es/usePLoading.js +19 -0
  139. package/dist/es/usePModal.js +18 -0
  140. package/dist/es/usePTableColResize.js +49 -0
  141. package/dist/es/usePTableRowVirtualizer.js +22 -0
  142. package/dist/es/useSelectList.js +143 -0
  143. package/dist/style.css +1 -1
  144. package/package.json +22 -20
  145. package/squirrel/assets/squirrel.css +5 -16
  146. package/dist/squirrel.cjs.js +0 -5
  147. package/dist/squirrel.es.js +0 -8220
@@ -0,0 +1,91 @@
1
+ import { defineComponent as m, openBlock as h, createElementBlock as p, createElementVNode as t, renderSlot as a, Fragment as C, renderList as u, toDisplayString as c, withDirectives as v, vShow as w, pushScopeId as b, popScopeId as $ } from "vue";
2
+ import { isObject as k } from "lodash-es";
3
+ import { _ as x } from "./chunks/_plugin-vue_export-helper.js";
4
+ const g = m({
5
+ name: "PChips",
6
+ props: {
7
+ items: {
8
+ type: Array,
9
+ default: () => [],
10
+ required: !0
11
+ },
12
+ itemText: {
13
+ type: String,
14
+ default: "text"
15
+ }
16
+ },
17
+ emits: ["click:chip", "click:overflow"],
18
+ data() {
19
+ return {
20
+ maxChipsDisplayed: 1
21
+ };
22
+ },
23
+ watch: {
24
+ items() {
25
+ this.resizeFilterChips();
26
+ }
27
+ },
28
+ mounted() {
29
+ this.resizeFilterChips(), this.$nextTick(() => {
30
+ window.addEventListener("resize", this.resizeFilterChips);
31
+ });
32
+ },
33
+ beforeUnmount() {
34
+ window.removeEventListener("resize", this.resizeFilterChips);
35
+ },
36
+ methods: {
37
+ resizeFilterChips() {
38
+ this.maxChipsDisplayed = this.items.length, this.$nextTick(() => {
39
+ if (!this.$refs.filterChipsRowInner)
40
+ return;
41
+ const e = this.$refs.filterChipsRow, r = this.$refs.filterChipsRowInner, d = this.$refs.afterSlotContainer, f = this.$refs.beforeSlotContainer, o = r.children;
42
+ let n = 0;
43
+ const l = f.offsetWidth + d.offsetWidth + 42;
44
+ for (let s = 0; s < o.length; s++)
45
+ if (n += o[s].offsetWidth, n + l >= e.offsetWidth) {
46
+ this.maxChipsDisplayed = s;
47
+ break;
48
+ }
49
+ });
50
+ },
51
+ getItemText(e) {
52
+ return typeof e == "string" ? e : k(e) ? e[this.itemText] : "";
53
+ }
54
+ }
55
+ }), y = (e) => (b("data-v-40bc335f"), e = e(), $(), e), S = {
56
+ ref: "filterChipsRow",
57
+ class: "flex w-full items-center"
58
+ }, _ = { ref: "beforeSlotContainer" }, I = {
59
+ ref: "filterChipsRowInner",
60
+ class: "flex divide-x divide-p-blue-30 overflow-hidden rounded-md border border-p-blue-30 text-xs font-medium text-p-purple-60"
61
+ }, E = ["onClick"], D = { class: "inline-block truncate" }, W = /* @__PURE__ */ y(() => /* @__PURE__ */ t("i", { class: "bg-cross ml-2 inline-block h-1.5 w-1.5" }, null, -1)), z = { ref: "afterSlotContainer" };
62
+ function R(e, r, d, f, o, n) {
63
+ return h(), p("div", S, [
64
+ t("div", _, [
65
+ a(e.$slots, "before", {}, void 0, !0)
66
+ ], 512),
67
+ t("div", I, [
68
+ (h(!0), p(C, null, u(e.items.slice(0, e.maxChipsDisplayed), (i, l) => (h(), p("div", {
69
+ key: `${e.getItemText(i)}_${l}`,
70
+ class: "flex cursor-pointer items-center px-3 py-1 hover:bg-p-blue-20",
71
+ onClick: (s) => e.$emit("click:chip", i)
72
+ }, [
73
+ t("div", D, c(e.getItemText(i)), 1),
74
+ W
75
+ ], 8, E))), 128)),
76
+ v(t("div", {
77
+ class: "cursor-pointer px-3 py-1 hover:bg-p-blue-20",
78
+ onClick: r[0] || (r[0] = (i) => e.$emit("click:overflow"))
79
+ }, " +" + c(e.items.length - e.maxChipsDisplayed), 513), [
80
+ [w, e.items.length > e.maxChipsDisplayed]
81
+ ])
82
+ ], 512),
83
+ t("div", z, [
84
+ a(e.$slots, "after", {}, void 0, !0)
85
+ ], 512)
86
+ ], 512);
87
+ }
88
+ const B = /* @__PURE__ */ x(g, [["render", R], ["__scopeId", "data-v-40bc335f"]]);
89
+ export {
90
+ B as default
91
+ };
@@ -0,0 +1,33 @@
1
+ import { defineComponent as r, openBlock as o, createElementBlock as s, normalizeClass as t, createElementVNode as c } from "vue";
2
+ import { _ as i } from "./chunks/_plugin-vue_export-helper.js";
3
+ const l = /* @__PURE__ */ r({
4
+ __name: "p-close-btn",
5
+ props: {
6
+ variant: {
7
+ type: String,
8
+ default: "transparent"
9
+ }
10
+ },
11
+ setup(e) {
12
+ const a = {
13
+ transparent: ["bg-transparent", "hover:bg-p-gray-20"],
14
+ gray: ["bg-p-gray-10", "hover:bg-p-gray-20"],
15
+ dark: ["bg-transparent"]
16
+ }, n = {
17
+ transparent: "x-black-icon",
18
+ gray: "x-black-icon",
19
+ dark: "x-white-icon"
20
+ };
21
+ return (p, b) => (o(), s("button", {
22
+ type: "button",
23
+ class: t(["inline-flex h-8 w-8 cursor-pointer items-center justify-center rounded focus:outline-none disabled:cursor-default disabled:opacity-30 disabled:hover:bg-white", a[e.variant]])
24
+ }, [
25
+ c("i", {
26
+ class: t(["block h-3 w-3 bg-center bg-no-repeat", n[e.variant]])
27
+ }, null, 2)
28
+ ], 2));
29
+ }
30
+ }), g = /* @__PURE__ */ i(l, [["__scopeId", "data-v-f61993bb"]]);
31
+ export {
32
+ g as default
33
+ };
@@ -0,0 +1,132 @@
1
+ import r from "dayjs";
2
+ import p from "./inputClassesMixin.js";
3
+ import { DatePicker as h } from "v-calendar";
4
+ import { defineComponent as c, resolveComponent as f, openBlock as i, createElementBlock as o, normalizeClass as s, normalizeStyle as D, renderSlot as y, toDisplayString as n, createCommentVNode as b, createVNode as k, withCtx as g, createElementVNode as d, mergeProps as $, toHandlers as C, withDirectives as M, vShow as S } from "vue";
5
+ import { isString as V, isDate as v } from "lodash-es";
6
+ import { _ as P } from "./chunks/_plugin-vue_export-helper.js";
7
+ const Y = { highlight: { class: "bg-primary", contentClass: "text-white" } }, z = {
8
+ // The mask for the input
9
+ input: "DD-MMM-YYYY",
10
+ // The mask for the model value
11
+ data: "YYYY-MM-DD"
12
+ }, w = c({
13
+ name: "PDatePicker",
14
+ components: {
15
+ DatePicker: h
16
+ },
17
+ mixins: [p],
18
+ inheritAttrs: !1,
19
+ props: {
20
+ modelValue: {
21
+ type: String,
22
+ default: ""
23
+ },
24
+ label: {
25
+ type: String,
26
+ default: ""
27
+ },
28
+ errorMsg: {
29
+ type: String,
30
+ default: ""
31
+ },
32
+ required: {
33
+ type: Boolean,
34
+ default: !1
35
+ },
36
+ minDate: {
37
+ type: Date,
38
+ default: null
39
+ },
40
+ maxDate: {
41
+ type: Date,
42
+ default: null
43
+ },
44
+ timezone: {
45
+ type: String,
46
+ default: ""
47
+ }
48
+ },
49
+ emits: ["update:modelValue"],
50
+ data() {
51
+ return {
52
+ // innerValue is a Date object
53
+ innerValue: null,
54
+ stopWatch: !1,
55
+ selectAttribute: Y
56
+ };
57
+ },
58
+ computed: {
59
+ displayPlaceholder() {
60
+ return V(this.$attrs.placeholder) ? this.$attrs.placeholder : this.masks.input;
61
+ },
62
+ masks() {
63
+ return Object.assign(z, this.$attrs.masks);
64
+ },
65
+ attrs() {
66
+ const { class: e, style: t, ...l } = this.$attrs;
67
+ return l;
68
+ },
69
+ style() {
70
+ return this.$attrs.style;
71
+ }
72
+ },
73
+ watch: {
74
+ modelValue: {
75
+ handler(e) {
76
+ this.stopWatch || (this.innerValue = e ? r(e, this.masks.data).toDate() : null);
77
+ },
78
+ immediate: !0
79
+ },
80
+ innerValue(e) {
81
+ const t = v(e) && e.toString() !== "Invalid Date" ? r(e).format(this.masks.data) : null;
82
+ this.stopWatch = !0, this.$emit("update:modelValue", t), this.$nextTick(() => {
83
+ this.stopWatch = !1;
84
+ });
85
+ }
86
+ }
87
+ }), A = ["data-has-error"], E = ["value", "placeholder"];
88
+ function W(e, t, l, B, N, j) {
89
+ const m = f("DatePicker");
90
+ return i(), o("div", {
91
+ class: s([{ hidden: e.$attrs.hidden }, e.$attrs.class]),
92
+ "data-has-error": !!e.errorMsg,
93
+ style: D(e.style)
94
+ }, [
95
+ y(e.$slots, "label", {
96
+ label: e.label,
97
+ labelClasses: e.labelClasses
98
+ }, () => [
99
+ e.label ? (i(), o("label", {
100
+ key: 0,
101
+ class: s(e.labelClasses)
102
+ }, n(e.label), 3)) : b("", !0)
103
+ ]),
104
+ k(m, {
105
+ modelValue: e.innerValue,
106
+ "onUpdate:modelValue": t[0] || (t[0] = (a) => e.innerValue = a),
107
+ "select-attribute": e.selectAttribute,
108
+ popover: { visibility: "click", placement: "auto" },
109
+ "min-date": e.minDate || null,
110
+ "max-date": e.maxDate || null,
111
+ masks: e.masks,
112
+ timezone: e.timezone
113
+ }, {
114
+ default: g(({ inputValue: a, inputEvents: u }) => [
115
+ d("input", $({
116
+ class: [e.inputClasses, { "cursor-pointer": !e.attrs.disabled }],
117
+ value: a
118
+ }, e.attrs, { placeholder: e.displayPlaceholder }, C(u, !0)), null, 16, E)
119
+ ]),
120
+ _: 1
121
+ }, 8, ["modelValue", "select-attribute", "min-date", "max-date", "masks", "timezone"]),
122
+ M(d("div", {
123
+ class: s(e.errorMsgClasses)
124
+ }, n(e.errorMsg), 3), [
125
+ [S, e.errorMsg]
126
+ ])
127
+ ], 14, A);
128
+ }
129
+ const K = /* @__PURE__ */ P(w, [["render", W]]);
130
+ export {
131
+ K as default
132
+ };
@@ -0,0 +1,235 @@
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 = $({
6
+ name: "PDrawer",
7
+ components: {
8
+ PAlert: w,
9
+ PCloseBtn: C
10
+ },
11
+ props: {
12
+ appendTo: {
13
+ type: String,
14
+ default: "body"
15
+ },
16
+ title: {
17
+ type: String,
18
+ default: ""
19
+ },
20
+ disabled: {
21
+ type: Boolean,
22
+ default: !1
23
+ },
24
+ errorMsg: {
25
+ type: String,
26
+ default: ""
27
+ },
28
+ position: {
29
+ type: String,
30
+ default: "right"
31
+ },
32
+ zIndex: {
33
+ type: Number,
34
+ default: 900
35
+ },
36
+ drawerStyle: {
37
+ type: Object,
38
+ default: () => ({})
39
+ },
40
+ drawerClass: {
41
+ type: String,
42
+ default: "drawer"
43
+ },
44
+ inClass: {
45
+ type: String,
46
+ default: ""
47
+ },
48
+ outClass: {
49
+ type: String,
50
+ default: ""
51
+ },
52
+ live: {
53
+ type: Boolean,
54
+ default: !1
55
+ },
56
+ modelValue: {
57
+ type: Boolean,
58
+ default: !1
59
+ },
60
+ closeLabel: {
61
+ type: String,
62
+ default: "Close"
63
+ },
64
+ showBackdrop: {
65
+ type: Boolean,
66
+ default: !1
67
+ },
68
+ enableClose: {
69
+ type: Boolean,
70
+ default: !0
71
+ }
72
+ },
73
+ emits: ["update:modelValue", "before-open", "opening", "opened", "before-close", "closing", "closed"],
74
+ data() {
75
+ return {
76
+ id: null,
77
+ show: !1,
78
+ mount: !1
79
+ };
80
+ },
81
+ computed: {
82
+ transitionInClass() {
83
+ return this.inClass || this.position === "right" ? "slideInRight" : "slideInLeft";
84
+ },
85
+ transitionOutClass() {
86
+ return this.outClass || this.position === "right" ? "slideOutRight" : "slideOutLeft";
87
+ }
88
+ },
89
+ created() {
90
+ this.live && (this.mount = !0);
91
+ },
92
+ mounted() {
93
+ this.id = "drawer-" + this.$.uid, this.$watch(
94
+ "modelValue",
95
+ (e) => {
96
+ e ? (this.mount = !0, this.$nextTick(() => {
97
+ this.show = !0;
98
+ })) : this.show = !1;
99
+ },
100
+ { immediate: !0 }
101
+ );
102
+ },
103
+ methods: {
104
+ close() {
105
+ this.enableClose === !0 && this.$emit("update:modelValue", !1);
106
+ },
107
+ beforeOpen() {
108
+ this.$emit("before-open");
109
+ },
110
+ opening() {
111
+ this.$emit("opening");
112
+ },
113
+ opened() {
114
+ this.$emit("opened");
115
+ },
116
+ beforeClose() {
117
+ this.$emit("before-close");
118
+ },
119
+ closing() {
120
+ this.$emit("closing");
121
+ },
122
+ closed() {
123
+ this.live || (this.mount = !1), this.$nextTick(() => {
124
+ this.$emit("closed");
125
+ });
126
+ }
127
+ }
128
+ }), L = ["data-drawer-id", "aria-label", "aria-describedby", "aria-labelledby"], I = ["id"], E = {
129
+ key: 0,
130
+ 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, {
135
+ key: 0,
136
+ to: e.appendTo
137
+ }, [
138
+ r(f, {
139
+ name: "pd-backdrop-transition",
140
+ "enter-active-class": "fadeIn",
141
+ "leave-active-class": "fadeOut"
142
+ }, {
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 }),
147
+ tabindex: "-1",
148
+ onClick: n[0] || (n[0] = (...y) => e.close && e.close(...y))
149
+ }, null, 6), [
150
+ [m, e.show && e.showBackdrop]
151
+ ])
152
+ ]),
153
+ _: 1
154
+ }),
155
+ r(f, {
156
+ 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
165
+ }, {
166
+ default: a(() => [
167
+ u(t("div", {
168
+ "data-drawer-id": e.id,
169
+ tabindex: "-1",
170
+ class: s([e.drawerClass, e.position === "right" ? "drawer-right" : "drawer-left"]),
171
+ style: h({ "z-index": e.zIndex, ...e.drawerStyle }),
172
+ role: "dialog",
173
+ "aria-label": e.title,
174
+ "aria-modal": "false",
175
+ "aria-describedby": `${e.id}-content`,
176
+ "aria-labelledby": `${e.id}-title`
177
+ }, [
178
+ o(e.$slots, "title-wrapper", {}, () => [
179
+ t("div", {
180
+ class: s([
181
+ "flex items-center border-b border-p-gray-30 px-6 pb-4 pt-4",
182
+ { "flex-row-reverse": e.position === "right" }
183
+ ])
184
+ }, [
185
+ e.enableClose ? (i(), p(v, {
186
+ key: 0,
187
+ "aria-label": e.closeLabel,
188
+ 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", {
194
+ 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)
199
+ ], 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)
205
+ ]),
206
+ _: 1
207
+ })
208
+ ])) : l("", !0),
209
+ o(e.$slots, "content-wrapper", {}, () => [
210
+ t("div", {
211
+ class: s([
212
+ "relative grow overflow-y-auto overflow-x-hidden px-6 pt-6",
213
+ { "pointer-events-none opacity-50": e.disabled }
214
+ ])
215
+ }, [
216
+ o(e.$slots, "default", {}, void 0, !0)
217
+ ], 2)
218
+ ], !0),
219
+ o(e.$slots, "footer-wrapper", {}, () => [
220
+ t("div", z, [
221
+ o(e.$slots, "footer", {}, void 0, !0)
222
+ ])
223
+ ], !0)
224
+ ], 14, L), [
225
+ [m, e.show]
226
+ ])
227
+ ]),
228
+ _: 3
229
+ }, 8, ["enter-active-class", "leave-active-class", "onBeforeEnter", "onEnter", "onAfterEnter", "onBeforeLeave", "onLeave", "onAfterLeave"])
230
+ ], 8, ["to"])) : l("", !0);
231
+ }
232
+ const q = /* @__PURE__ */ k(S, [["render", A], ["__scopeId", "data-v-a0b8be1e"]]);
233
+ export {
234
+ q as default
235
+ };
@@ -0,0 +1,4 @@
1
+ import { a as f } from "./chunks/p-dropdown-select.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,120 @@
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({
5
+ name: "PDropdown",
6
+ inheritAttrs: !1,
7
+ props: {
8
+ /**
9
+ * Enables navigation for `.dropdown-item` using the up/down keys.
10
+ * This can be set to false when we're creating a generic popover.
11
+ */
12
+ enableArrowNavigation: {
13
+ type: Boolean,
14
+ default: !0
15
+ },
16
+ /**
17
+ * Enables closing the dropdown with the Escape key.
18
+ */
19
+ enableCloseOnEsc: {
20
+ type: Boolean,
21
+ default: !0
22
+ },
23
+ /**
24
+ * The selector that the arrow navigation function will use to
25
+ * match the items in the list.
26
+ */
27
+ itemSelector: {
28
+ type: String,
29
+ default: ".dropdown-item:not(.disabled), .dropdown-item:not(:disabled)"
30
+ },
31
+ /**
32
+ * The CSS class of the "focused" dropdown item
33
+ */
34
+ itemFocusClass: {
35
+ type: String,
36
+ default: "focus"
37
+ },
38
+ /**
39
+ * v-tooltip wraps the popper trigger with a div that has `display: inline-block` set by default.
40
+ * This prop is used to override the CSS style of that wrapper div
41
+ */
42
+ triggerStyle: {
43
+ type: Object,
44
+ default: () => ({
45
+ display: "inline-block"
46
+ })
47
+ },
48
+ /**
49
+ * Custom reference element that is used to position the popper.
50
+ * Can be changed at runtime to create a dynamically positioned dropdown.
51
+ */
52
+ reference: {
53
+ type: HTMLElement,
54
+ default: null
55
+ }
56
+ },
57
+ data() {
58
+ return {
59
+ defaultAttrs: {
60
+ triggers: ["click"],
61
+ "auto-hide": !0,
62
+ theme: "p-dropdown-theme",
63
+ "popper-class": "dropdown",
64
+ placement: "bottom-start",
65
+ distance: 4,
66
+ delay: 0,
67
+ handleResize: !0
68
+ },
69
+ navigationSvc: null
70
+ };
71
+ },
72
+ watch: {
73
+ 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));
78
+ }
79
+ }
80
+ }
81
+ },
82
+ mounted() {
83
+ Object.assign(this.$refs.vPopper.$refs.popper.$el.style, this.triggerStyle);
84
+ },
85
+ beforeUnmount() {
86
+ this.destroy();
87
+ },
88
+ methods: {
89
+ 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);
93
+ },
94
+ popoverEscKeydown(e) {
95
+ e.key === g && this.$refs.vPopper.$refs.popper.hide();
96
+ },
97
+ destroy() {
98
+ var e;
99
+ (e = this.navigationSvc) == null || e.destroy(), document.removeEventListener("keydown", this.popoverEscKeydown);
100
+ }
101
+ }
102
+ });
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
+ }))
115
+ ]), 1040, ["onShow", "onHide"]);
116
+ }
117
+ const D = /* @__PURE__ */ w($, [["render", S]]);
118
+ export {
119
+ D as default
120
+ };
@@ -0,0 +1,13 @@
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)
6
+ 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]}`;
9
+ };
10
+ export {
11
+ c as formatBytes,
12
+ B as getFileExtension
13
+ };
@@ -0,0 +1,31 @@
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",
5
+ __name: "p-info-icon",
6
+ props: {
7
+ text: {
8
+ type: String,
9
+ default: ""
10
+ }
11
+ },
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)
20
+ ]),
21
+ default: e(() => [
22
+ I
23
+ ]),
24
+ _: 3
25
+ });
26
+ };
27
+ }
28
+ }), V = /* @__PURE__ */ m(h, [["__scopeId", "data-v-189b159e"]]);
29
+ export {
30
+ V as default
31
+ };