@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,132 @@
1
+ import r from "dayjs";
2
+ import d from "./inputClassesMixin.js";
3
+ import { DatePicker as m } from "v-calendar";
4
+ import { defineComponent as u, resolveComponent as p, openBlock as l, createElementBlock as i, normalizeClass as a, normalizeStyle as c, renderSlot as h, toDisplayString as n, createCommentVNode as y, createVNode as f, mergeProps as k, withDirectives as D, createElementVNode as b, vShow as g } from "vue";
5
+ import { _ as $ } from "./chunks/_plugin-vue_export-helper.js";
6
+ const M = { highlight: { class: "bg-primary", contentClass: "text-white" } }, v = {
7
+ // The mask for the input
8
+ input: "DD-MMM-YYYY",
9
+ // The mask for the model value
10
+ data: "YYYY-MM-DD"
11
+ }, S = u({
12
+ name: "PInlineDatePicker",
13
+ components: {
14
+ DatePicker: m
15
+ },
16
+ mixins: [d],
17
+ inheritAttrs: !1,
18
+ props: {
19
+ modelValue: {
20
+ type: String,
21
+ default: ""
22
+ },
23
+ label: {
24
+ type: String,
25
+ default: ""
26
+ },
27
+ errorMsg: {
28
+ type: String,
29
+ default: ""
30
+ },
31
+ required: {
32
+ type: Boolean,
33
+ default: !1
34
+ },
35
+ minDate: {
36
+ type: Date,
37
+ default: null
38
+ },
39
+ maxDate: {
40
+ type: Date,
41
+ default: null
42
+ },
43
+ timezone: {
44
+ type: String,
45
+ default: ""
46
+ }
47
+ },
48
+ emits: ["update:modelValue"],
49
+ data() {
50
+ return {
51
+ // innerValue is a Date object
52
+ innerValue: null,
53
+ selectAttribute: M
54
+ };
55
+ },
56
+ computed: {
57
+ masks() {
58
+ return Object.assign(v, this.$attrs.masks);
59
+ },
60
+ attrs() {
61
+ const { class: e, style: t, ...s } = this.$attrs;
62
+ return s;
63
+ },
64
+ listeners() {
65
+ return Object.keys(this.$attrs).reduce((e, t) => t.startsWith("on") ? { ...e, [t]: this.$attrs[t] } : e, {});
66
+ },
67
+ style() {
68
+ return this.$attrs.style;
69
+ },
70
+ styleDatepicker() {
71
+ return this.errorMsg ? { border: "1px solid var(--color-on-error)" } : {};
72
+ }
73
+ },
74
+ watch: {
75
+ modelValue: {
76
+ handler(e) {
77
+ const t = r(e, this.masks.data).toDate();
78
+ if (e && t.toString() === "Invalid Date") {
79
+ this.$emit("update:modelValue", null);
80
+ return;
81
+ }
82
+ this.innerValue = e ? r(e, this.masks.data).toDate() : null;
83
+ const s = this.$refs.datepicker;
84
+ s && this.innerValue && s.move(this.innerValue);
85
+ },
86
+ immediate: !0
87
+ }
88
+ },
89
+ methods: {
90
+ dayclick(e) {
91
+ this.$emit("update:modelValue", e.id);
92
+ }
93
+ }
94
+ }), C = ["data-has-error"];
95
+ function V(e, t, s, Y, P, z) {
96
+ const o = p("DatePicker");
97
+ return l(), i("div", {
98
+ class: a([{ hidden: e.$attrs.hidden }, e.$attrs.class]),
99
+ "data-has-error": !!e.errorMsg,
100
+ style: c(e.style)
101
+ }, [
102
+ h(e.$slots, "label", {
103
+ label: e.label,
104
+ labelClasses: e.labelClasses
105
+ }, () => [
106
+ e.label ? (l(), i("label", {
107
+ key: 0,
108
+ class: a(e.labelClasses)
109
+ }, n(e.label), 3)) : y("", !0)
110
+ ]),
111
+ f(o, k({
112
+ ref: "datepicker",
113
+ class: { "pointer-events-none opacity-70": e.$attrs.disabled },
114
+ "model-value": e.innerValue,
115
+ "select-attribute": e.selectAttribute,
116
+ "min-date": e.minDate || null,
117
+ "max-date": e.maxDate || null,
118
+ masks: e.masks,
119
+ style: e.styleDatepicker,
120
+ timezone: e.timezone
121
+ }, e.listeners, { onDayclick: e.dayclick }), null, 16, ["class", "model-value", "select-attribute", "min-date", "max-date", "masks", "style", "timezone", "onDayclick"]),
122
+ D(b("div", {
123
+ class: a(e.errorMsgClasses)
124
+ }, n(e.errorMsg), 3), [
125
+ [g, e.errorMsg]
126
+ ])
127
+ ], 14, C);
128
+ }
129
+ const I = /* @__PURE__ */ $(S, [["render", V]]);
130
+ export {
131
+ I as default
132
+ };
@@ -0,0 +1,129 @@
1
+ import O from "./p-info-icon.js";
2
+ import $ from "./inputClassesMixin.js";
3
+ import { useCurrencyInput as k } from "vue-currency-input";
4
+ import { defineComponent as V, computed as u, watch as b, resolveComponent as P, openBlock as r, createElementBlock as c, normalizeClass as p, normalizeStyle as M, createElementVNode as n, renderSlot as h, toDisplayString as C, createCommentVNode as d, createBlock as w, mergeProps as A, withDirectives as B, vShow as F } from "vue";
5
+ import { kebabCase as T } from "lodash-es";
6
+ import { toNumberOrNull as S } from "./number.js";
7
+ import { _ as E } from "./chunks/_plugin-vue_export-helper.js";
8
+ const L = [
9
+ "locale",
10
+ "currency",
11
+ "currencyDisplay",
12
+ "hideGroupingSeparatorOnFocus",
13
+ "hideCurrencySymbolOnFocus",
14
+ "hideNegligibleDecimalDigitsOnFocus",
15
+ "precision",
16
+ "autoDecimalDigits",
17
+ "valueRange",
18
+ "useGrouping",
19
+ "valueScaling"
20
+ ], R = V({
21
+ name: "PInputNumber",
22
+ components: {
23
+ PInfoIcon: O
24
+ },
25
+ mixins: [$],
26
+ inheritAttrs: !1,
27
+ props: {
28
+ modelValue: {
29
+ type: [Number, String],
30
+ default: null
31
+ },
32
+ label: {
33
+ type: String,
34
+ default: ""
35
+ },
36
+ errorMsg: {
37
+ type: String,
38
+ default: ""
39
+ },
40
+ required: {
41
+ type: Boolean,
42
+ default: !1
43
+ },
44
+ selectOnClick: {
45
+ type: Boolean,
46
+ default: !0
47
+ },
48
+ tooltipText: {
49
+ type: String,
50
+ default: ""
51
+ }
52
+ },
53
+ emits: ["update:modelValue", "change"],
54
+ setup(e, { attrs: t, emit: m, expose: f }) {
55
+ const a = {
56
+ locale: "en-US",
57
+ currency: "USD",
58
+ precision: 0,
59
+ currencyDisplay: "hidden"
60
+ }, y = u(() => (L.forEach((s) => {
61
+ const o = t[T(s)];
62
+ o && typeof o < "u" && (a[s] = o);
63
+ }), a)), { inputRef: l, numberValue: i, setValue: g } = k(
64
+ y.value,
65
+ !1
66
+ );
67
+ b(i, (s) => {
68
+ m("update:modelValue", S(s));
69
+ }), b(
70
+ () => e.modelValue,
71
+ (s) => {
72
+ g(S(s));
73
+ }
74
+ );
75
+ const v = u(() => {
76
+ const { class: s, style: o, ...N } = t;
77
+ return N;
78
+ }), D = u(() => t.style), I = () => {
79
+ e.selectOnClick && l.value.select();
80
+ };
81
+ return f({ setValue: g }), { inputRef: l, computedAttrs: v, style: D, focus: I };
82
+ }
83
+ }), U = ["data-has-error"], z = { class: "flex flex-row items-center" }, G = { class: "relative w-full" }, q = { key: 0 };
84
+ function j(e, t, m, f, a, y) {
85
+ const l = P("PInfoIcon");
86
+ return r(), c("div", {
87
+ class: p([{ hidden: e.$attrs.hidden }, e.$attrs.class]),
88
+ "data-has-error": !!e.errorMsg,
89
+ style: M(e.style)
90
+ }, [
91
+ n("div", z, [
92
+ h(e.$slots, "label", {
93
+ label: e.label,
94
+ labelClasses: e.labelClasses
95
+ }, () => [
96
+ e.label ? (r(), c("label", {
97
+ key: 0,
98
+ class: p(e.labelClasses)
99
+ }, C(e.label), 3)) : d("", !0)
100
+ ]),
101
+ e.tooltipText ? (r(), w(l, {
102
+ key: 0,
103
+ text: e.tooltipText,
104
+ class: "ml-1"
105
+ }, null, 8, ["text"])) : d("", !0)
106
+ ]),
107
+ n("div", G, [
108
+ e.$slots.prefix ? (r(), c("div", q, [
109
+ h(e.$slots, "prefix")
110
+ ])) : d("", !0),
111
+ n("input", A({
112
+ ref: "inputRef",
113
+ type: "text"
114
+ }, e.computedAttrs, {
115
+ class: e.inputClasses,
116
+ onFocus: t[0] || (t[0] = (...i) => e.focus && e.focus(...i))
117
+ }), null, 16)
118
+ ]),
119
+ B(n("div", {
120
+ class: p(e.errorMsgClasses)
121
+ }, C(e.errorMsg), 3), [
122
+ [F, e.errorMsg]
123
+ ])
124
+ ], 14, U);
125
+ }
126
+ const Z = /* @__PURE__ */ E(R, [["render", j]]);
127
+ export {
128
+ Z as default
129
+ };
@@ -0,0 +1,4 @@
1
+ import { _ as f } from "./chunks/p-input-percent.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,109 @@
1
+ import c from "./p-input.js";
2
+ import { INPUT_SIZES as p } from "./inputClassesShared.js";
3
+ import { defineComponent as d, resolveComponent as m, resolveDirective as h, openBlock as r, createBlock as f, mergeProps as y, withKeys as I, withCtx as s, createElementVNode as w, normalizeClass as n, withDirectives as $, createElementBlock as a, createCommentVNode as l } from "vue";
4
+ import { _ as C } from "./chunks/_plugin-vue_export-helper.js";
5
+ const b = d({
6
+ name: "PInputSearch",
7
+ components: {
8
+ PInput: c
9
+ },
10
+ inheritAttrs: !1,
11
+ props: {
12
+ modelValue: {
13
+ type: String,
14
+ default: ""
15
+ },
16
+ size: {
17
+ type: String,
18
+ default: "md",
19
+ validator(e) {
20
+ return Object.keys(p).includes(e);
21
+ }
22
+ },
23
+ showEnterIcon: {
24
+ type: Boolean,
25
+ default: !1
26
+ }
27
+ },
28
+ emits: ["update:modelValue", "enter"],
29
+ data() {
30
+ return {
31
+ query: this.modelValue,
32
+ showEnterIconOnFocus: !1
33
+ };
34
+ },
35
+ computed: {
36
+ searchIconClasses() {
37
+ return `search search-${this.size}`;
38
+ },
39
+ enterIconClasses() {
40
+ return `enter enter-${this.size}`;
41
+ },
42
+ clearIconClasses() {
43
+ return `clear clear-${this.size}`;
44
+ }
45
+ },
46
+ watch: {
47
+ modelValue(e) {
48
+ this.query = e;
49
+ },
50
+ query(e) {
51
+ this.$emit("update:modelValue", e);
52
+ }
53
+ },
54
+ methods: {
55
+ clearSearch() {
56
+ this.query = "", requestAnimationFrame(() => {
57
+ this.$refs.searchInput.$el.querySelector("input").focus();
58
+ });
59
+ },
60
+ keydownEnter() {
61
+ this.$emit("enter", this.query);
62
+ }
63
+ }
64
+ });
65
+ function q(e, o, E, v, S, V) {
66
+ const u = m("PInput"), i = h("tooltip");
67
+ return r(), f(u, y({
68
+ ref: "searchInput",
69
+ modelValue: e.query,
70
+ "onUpdate:modelValue": o[1] || (o[1] = (t) => e.query = t),
71
+ size: e.size
72
+ }, e.$attrs, {
73
+ role: "searchbox",
74
+ onFocus: o[2] || (o[2] = (t) => e.showEnterIconOnFocus = !0),
75
+ onFocusout: o[3] || (o[3] = (t) => e.showEnterIconOnFocus = !1),
76
+ onKeydown: I(e.keydownEnter, ["enter"])
77
+ }), {
78
+ prefix: s(() => [
79
+ w("i", {
80
+ class: n(["icon absolute bg-no-repeat outline-none", e.searchIconClasses])
81
+ }, null, 2)
82
+ ]),
83
+ suffix: s(() => [
84
+ e.query && e.showEnterIcon && e.showEnterIconOnFocus ? $((r(), a("i", {
85
+ key: 0,
86
+ class: n(["icon absolute bg-no-repeat outline-none", e.enterIconClasses])
87
+ }, null, 2)), [
88
+ [
89
+ i,
90
+ { content: "Press enter to search", delay: { show: 100, hide: 0 } },
91
+ void 0,
92
+ { bottom: !0 }
93
+ ]
94
+ ]) : l("", !0),
95
+ e.query ? (r(), a("button", {
96
+ key: 1,
97
+ role: "button",
98
+ "aria-label": "Clear search input",
99
+ class: n(["icon absolute cursor-pointer bg-no-repeat", e.clearIconClasses]),
100
+ onClick: o[0] || (o[0] = (...t) => e.clearSearch && e.clearSearch(...t))
101
+ }, null, 2)) : l("", !0)
102
+ ]),
103
+ _: 1
104
+ }, 16, ["modelValue", "size", "onKeydown"]);
105
+ }
106
+ const g = /* @__PURE__ */ C(b, [["render", q], ["__scopeId", "data-v-3de99c69"]]);
107
+ export {
108
+ g as default
109
+ };
@@ -0,0 +1,84 @@
1
+ import m from "./inputClassesMixin.js";
2
+ import { defineComponent as f, openBlock as s, createElementBlock as t, normalizeClass as r, normalizeStyle as y, renderSlot as a, toDisplayString as d, createCommentVNode as o, createElementVNode as i, mergeProps as $, withDirectives as h, vShow as v } from "vue";
3
+ import { _ as b } from "./chunks/_plugin-vue_export-helper.js";
4
+ const u = { TEXT: "text", PASSWORD: "password" }, g = f({
5
+ name: "PInput",
6
+ mixins: [m],
7
+ inheritAttrs: !1,
8
+ props: {
9
+ modelValue: {
10
+ type: [String, Number],
11
+ default: ""
12
+ },
13
+ type: {
14
+ type: String,
15
+ default: u.TEXT,
16
+ validator(e) {
17
+ return Object.values(u).includes(e);
18
+ }
19
+ },
20
+ label: {
21
+ type: String,
22
+ default: ""
23
+ },
24
+ errorMsg: {
25
+ type: String,
26
+ default: ""
27
+ },
28
+ required: {
29
+ type: Boolean,
30
+ default: !1
31
+ }
32
+ },
33
+ emits: ["update:modelValue"],
34
+ computed: {
35
+ attrs() {
36
+ const { class: e, style: l, ...n } = this.$attrs;
37
+ return n;
38
+ },
39
+ style() {
40
+ return this.$attrs.style;
41
+ }
42
+ }
43
+ }), S = ["data-has-error"], C = { class: "relative w-full" }, c = { key: 0 }, M = ["type", "value"], P = { key: 1 };
44
+ function T(e, l, n, V, k, E) {
45
+ return s(), t("div", {
46
+ class: r([{ hidden: e.$attrs.hidden }, e.$attrs.class]),
47
+ "data-has-error": !!e.errorMsg,
48
+ style: y(e.style)
49
+ }, [
50
+ a(e.$slots, "label", {
51
+ label: e.label,
52
+ labelClasses: e.labelClasses
53
+ }, () => [
54
+ e.label ? (s(), t("label", {
55
+ key: 0,
56
+ class: r(e.labelClasses)
57
+ }, d(e.label), 3)) : o("", !0)
58
+ ]),
59
+ i("div", C, [
60
+ e.$slots.prefix ? (s(), t("div", c, [
61
+ a(e.$slots, "prefix")
62
+ ])) : o("", !0),
63
+ i("input", $({
64
+ type: e.type,
65
+ value: e.modelValue
66
+ }, e.attrs, {
67
+ class: e.inputClasses,
68
+ onInput: l[0] || (l[0] = (p) => e.$emit("update:modelValue", p.target.value))
69
+ }), null, 16, M),
70
+ e.$slots.suffix ? (s(), t("div", P, [
71
+ a(e.$slots, "suffix")
72
+ ])) : o("", !0)
73
+ ]),
74
+ h(i("div", {
75
+ class: r(e.errorMsgClasses)
76
+ }, d(e.errorMsg), 3), [
77
+ [v, e.errorMsg]
78
+ ])
79
+ ], 14, S);
80
+ }
81
+ const B = /* @__PURE__ */ b(g, [["render", T]]);
82
+ export {
83
+ B as default
84
+ };
@@ -0,0 +1,30 @@
1
+ import { defineComponent as a, openBlock as t, createBlock as n, Transition as r, withCtx as s, unref as d, createElementBlock as c, createCommentVNode as i, pushScopeId as p, popScopeId as l, createElementVNode as _ } from "vue";
2
+ import { usePLoading as f } from "./usePLoading.js";
3
+ import { _ as m } from "./chunks/_plugin-vue_export-helper.js";
4
+ const u = (e) => (p("data-v-3a800f21"), e = e(), l(), e), b = {
5
+ key: 0,
6
+ class: "fixed left-0 top-0 z-[120] flex w-full justify-center",
7
+ "aria-live": "polite",
8
+ "aria-busy": "true"
9
+ }, h = /* @__PURE__ */ u(() => /* @__PURE__ */ _("div", { class: "bg-blue-10 h-8 rounded-b border-x border-b border-p-gray-30 px-4 pt-2 text-sm font-semibold leading-none text-p-purple-60 shadow" }, " Loading... ", -1)), x = [
10
+ h
11
+ ], g = /* @__PURE__ */ a({
12
+ name: "PLoading",
13
+ __name: "p-loading",
14
+ setup(e) {
15
+ const { show: o } = f();
16
+ return (v, w) => (t(), n(r, {
17
+ name: "pm-backdrop-transition",
18
+ "enter-active-class": "fadeInDown",
19
+ "leave-active-class": "fadeOutUp"
20
+ }, {
21
+ default: s(() => [
22
+ d(o) ? (t(), c("div", b, x)) : i("", !0)
23
+ ]),
24
+ _: 1
25
+ }));
26
+ }
27
+ }), L = /* @__PURE__ */ m(g, [["__scopeId", "data-v-3a800f21"]]);
28
+ export {
29
+ L as default
30
+ };