@pequity/squirrel 5.4.1 → 5.4.2

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 (80) hide show
  1. package/dist/cjs/chunks/p-action-bar.js +10 -11
  2. package/dist/cjs/chunks/p-date-picker.js +108 -0
  3. package/dist/cjs/chunks/p-dropdown-select.js +7 -8
  4. package/dist/cjs/chunks/p-inline-date-picker.js +112 -0
  5. package/dist/cjs/chunks/p-input-percent.js +3 -5
  6. package/dist/cjs/chunks/p-pagination-info.js +1 -1
  7. package/dist/cjs/chunks/p-pagination.js +12 -16
  8. package/dist/cjs/index.js +47 -52
  9. package/dist/cjs/p-btn.js +8 -5
  10. package/dist/cjs/p-chips.js +3 -5
  11. package/dist/cjs/p-date-picker.js +2 -138
  12. package/dist/cjs/p-info-icon.js +1 -3
  13. package/dist/cjs/p-inline-date-picker.js +2 -143
  14. package/dist/cjs/p-table-td.js +3 -5
  15. package/dist/es/chunks/p-action-bar.js +10 -11
  16. package/dist/es/chunks/p-date-picker.js +109 -0
  17. package/dist/es/chunks/p-dropdown-select.js +7 -8
  18. package/dist/es/chunks/p-inline-date-picker.js +113 -0
  19. package/dist/es/chunks/p-input-percent.js +3 -5
  20. package/dist/es/chunks/p-pagination-info.js +1 -1
  21. package/dist/es/chunks/p-pagination.js +12 -16
  22. package/dist/es/index.js +96 -101
  23. package/dist/es/p-btn.js +8 -5
  24. package/dist/es/p-chips.js +4 -6
  25. package/dist/es/p-date-picker.js +2 -138
  26. package/dist/es/p-info-icon.js +2 -4
  27. package/dist/es/p-inline-date-picker.js +2 -143
  28. package/dist/es/p-table-td.js +4 -6
  29. package/dist/squirrel/components/p-action-bar/p-action-bar.vue.d.ts +5 -14
  30. package/dist/squirrel/components/p-alert/p-alert.vue.d.ts +4 -4
  31. package/dist/squirrel/components/p-avatar/p-avatar.vue.d.ts +5 -5
  32. package/dist/squirrel/components/p-btn/p-btn.vue.d.ts +40 -5
  33. package/dist/squirrel/components/p-card/p-card.vue.d.ts +4 -4
  34. package/dist/squirrel/components/p-checkbox/p-checkbox.vue.d.ts +5 -5
  35. package/dist/squirrel/components/p-chips/p-chips.vue.d.ts +5 -5
  36. package/dist/squirrel/components/p-close-btn/p-close-btn.vue.d.ts +4 -4
  37. package/dist/squirrel/components/p-date-picker/p-date-picker.vue.d.ts +35 -128
  38. package/dist/squirrel/components/p-drawer/p-drawer.vue.d.ts +37 -5
  39. package/dist/squirrel/components/p-dropdown/p-dropdown.vue.d.ts +5 -5
  40. package/dist/squirrel/components/p-dropdown-select/p-dropdown-select.vue.d.ts +128 -29
  41. package/dist/squirrel/components/p-file-upload/p-file-upload.vue.d.ts +5 -5
  42. package/dist/squirrel/components/p-icon/p-icon.vue.d.ts +1 -10
  43. package/dist/squirrel/components/p-info-icon/p-info-icon.vue.d.ts +2 -23
  44. package/dist/squirrel/components/p-input/p-input.vue.d.ts +9 -9
  45. package/dist/squirrel/components/p-input-number/p-input-number.vue.d.ts +40 -10
  46. package/dist/squirrel/components/p-input-percent/p-input-percent.vue.d.ts +5 -5
  47. package/dist/squirrel/components/p-input-search/p-input-search.vue.d.ts +121 -5
  48. package/dist/squirrel/components/p-link/p-link.vue.d.ts +1 -10
  49. package/dist/squirrel/components/p-loading/p-loading.vue.d.ts +1 -1
  50. package/dist/squirrel/components/p-modal/p-modal.vue.d.ts +5 -5
  51. package/dist/squirrel/components/p-pagination/p-pagination.vue.d.ts +5 -5
  52. package/dist/squirrel/components/p-pagination-info/p-pagination-info.vue.d.ts +4 -4
  53. package/dist/squirrel/components/p-progress-bar/p-progress-bar.vue.d.ts +3 -3
  54. package/dist/squirrel/components/p-ring-loader/p-ring-loader.vue.d.ts +4 -4
  55. package/dist/squirrel/components/p-select/p-select.vue.d.ts +5 -5
  56. package/dist/squirrel/components/p-select-btn/p-select-btn.vue.d.ts +4 -45
  57. package/dist/squirrel/components/p-select-list/p-select-list.vue.d.ts +128 -29
  58. package/dist/squirrel/components/p-select-list/useSelectList.d.ts +4 -4
  59. package/dist/squirrel/components/p-select-pill/p-select-pill.vue.d.ts +5 -5
  60. package/dist/squirrel/components/p-skeleton-loader/p-skeleton-loader.vue.d.ts +4 -4
  61. package/dist/squirrel/components/p-table/p-table.vue.d.ts +10 -47
  62. package/dist/squirrel/components/p-table/usePTableColResize.d.ts +4 -4
  63. package/dist/squirrel/components/p-table/usePTableRowVirtualizer.d.ts +10 -4
  64. package/dist/squirrel/components/p-table-header-cell/p-table-filter-icon.vue.d.ts +4 -4
  65. package/dist/squirrel/components/p-table-header-cell/p-table-header-cell.vue.d.ts +48 -5
  66. package/dist/squirrel/components/p-table-loader/p-table-loader.vue.d.ts +4 -4
  67. package/dist/squirrel/components/p-table-sort/p-table-sort.vue.d.ts +5 -5
  68. package/dist/squirrel/components/p-table-td/p-table-td.vue.d.ts +2 -25
  69. package/dist/squirrel/components/p-tabs/p-tabs.vue.d.ts +5 -5
  70. package/dist/squirrel/components/p-textarea/p-textarea.vue.d.ts +9 -9
  71. package/dist/squirrel/components/p-toggle/p-toggle.vue.d.ts +9 -9
  72. package/dist/squirrel/composables/useInputClasses.d.ts +1 -1
  73. package/dist/squirrel/utils/inputClassesMixin.d.ts +4 -4
  74. package/package.json +24 -24
  75. package/squirrel/components/p-btn/p-btn.spec.js +33 -4
  76. package/squirrel/components/p-btn/p-btn.vue +5 -2
  77. package/squirrel/components/p-date-picker/p-date-picker.vue +79 -86
  78. package/squirrel/components/p-inline-date-picker/p-inline-date-picker.spec.js +12 -14
  79. package/squirrel/components/p-inline-date-picker/p-inline-date-picker.vue +87 -99
  80. package/dist/squirrel/components/p-inline-date-picker/p-inline-date-picker.vue.d.ts +0 -154
@@ -2184,12 +2184,11 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
2184
2184
  });
2185
2185
  const _hoisted_1 = { class: "flex h-12 w-max select-none items-center rounded-lg bg-p-purple-60 px-2 text-sm font-medium text-white" };
2186
2186
  const _hoisted_2 = { class: "whitespace-nowrap px-3" };
2187
- const _hoisted_3 = /* @__PURE__ */ vue.createElementVNode("div", { class: "mx-4 h-9 w-0.5 shrink-0 rounded bg-p-purple-50" }, null, -1);
2188
- const _hoisted_4 = { class: "flex" };
2187
+ const _hoisted_3 = { class: "flex" };
2188
+ const _hoisted_4 = { class: "flex items-center gap-2 px-1 py-0.5" };
2189
2189
  const _hoisted_5 = { class: "flex items-center gap-2 px-1 py-0.5" };
2190
- const _hoisted_6 = { class: "flex items-center gap-2 px-1 py-0.5" };
2191
- const _hoisted_7 = { class: "flex flex-col bg-p-purple-60" };
2192
- const _hoisted_8 = { class: "flex items-center gap-2 px-1 py-0.5" };
2190
+ const _hoisted_6 = { class: "flex flex-col bg-p-purple-60" };
2191
+ const _hoisted_7 = { class: "flex items-center gap-2 px-1 py-0.5" };
2193
2192
  const _sfc_main = /* @__PURE__ */ vue.defineComponent({
2194
2193
  ...{
2195
2194
  name: "PActionBar",
@@ -2216,8 +2215,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
2216
2215
  onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click:dismiss"))
2217
2216
  }),
2218
2217
  vue.createElementVNode("p", _hoisted_2, vue.toDisplayString(_ctx.label), 1),
2219
- _hoisted_3,
2220
- vue.createElementVNode("div", _hoisted_4, [
2218
+ _cache[1] || (_cache[1] = vue.createElementVNode("div", { class: "mx-4 h-9 w-0.5 shrink-0 rounded bg-p-purple-50" }, null, -1)),
2219
+ vue.createElementVNode("div", _hoisted_3, [
2221
2220
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.actions, (actionOrMenu) => {
2222
2221
  return vue.openBlock(), vue.createElementBlock(vue.Fragment, {
2223
2222
  key: `action-${actionOrMenu.label}`
@@ -2229,7 +2228,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
2229
2228
  onClick: ($event) => _ctx.$emit("click:action", actionOrMenu.name)
2230
2229
  }, {
2231
2230
  default: vue.withCtx(() => [
2232
- vue.createElementVNode("div", _hoisted_5, [
2231
+ vue.createElementVNode("div", _hoisted_4, [
2233
2232
  vue.unref(component.isComponent)(actionOrMenu.icon) ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(actionOrMenu.icon), {
2234
2233
  key: 0,
2235
2234
  class: "h-4 w-4"
@@ -2250,7 +2249,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
2250
2249
  strategy: "fixed"
2251
2250
  }, {
2252
2251
  popper: vue.withCtx(() => [
2253
- vue.createElementVNode("div", _hoisted_7, [
2252
+ vue.createElementVNode("div", _hoisted_6, [
2254
2253
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(actionOrMenu.subActions, (subaction) => {
2255
2254
  return vue.openBlock(), vue.createElementBlock("div", {
2256
2255
  key: `subaction-${subaction.name}`
@@ -2262,7 +2261,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
2262
2261
  onClick: ($event) => _ctx.$emit("click:action", subaction.name)
2263
2262
  }, {
2264
2263
  default: vue.withCtx(() => [
2265
- vue.createElementVNode("div", _hoisted_8, [
2264
+ vue.createElementVNode("div", _hoisted_7, [
2266
2265
  vue.unref(component.isComponent)(subaction.icon) ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(subaction.icon), {
2267
2266
  key: 0,
2268
2267
  class: "h-4 w-4"
@@ -2288,7 +2287,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
2288
2287
  type: "secondary-ghost-dark"
2289
2288
  }, {
2290
2289
  default: vue.withCtx(() => [
2291
- vue.createElementVNode("div", _hoisted_6, [
2290
+ vue.createElementVNode("div", _hoisted_5, [
2292
2291
  vue.unref(component.isComponent)(actionOrMenu.icon) ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(actionOrMenu.icon), {
2293
2292
  key: 0,
2294
2293
  class: "h-4 w-4"
@@ -0,0 +1,108 @@
1
+ "use strict";
2
+ const vue = require("vue");
3
+ const pInput = require("../p-input.js");
4
+ const dayjs = require("dayjs");
5
+ const vCalendar = require("v-calendar");
6
+ const lodashEs = require("lodash-es");
7
+ const useInputClasses = require("../useInputClasses.js");
8
+ const _hoisted_1 = ["data-has-error"];
9
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
10
+ ...{
11
+ name: "PDatePicker",
12
+ inheritAttrs: false
13
+ },
14
+ __name: "p-date-picker",
15
+ props: {
16
+ modelValue: { default: "" },
17
+ label: { default: "" },
18
+ errorMsg: { default: "" },
19
+ required: { type: Boolean, default: false },
20
+ minDate: { default: null },
21
+ maxDate: { default: null },
22
+ timezone: { default: "" }
23
+ },
24
+ emits: ["update:modelValue"],
25
+ setup(__props, { emit: __emit }) {
26
+ const selectAttribute = { highlight: { class: "bg-primary", contentClass: "text-white" } };
27
+ const DEFAULT_MASKS = {
28
+ // The mask for the input
29
+ input: "DD-MMM-YYYY",
30
+ // The mask for the model value
31
+ data: "YYYY-MM-DD"
32
+ };
33
+ const props = __props;
34
+ const emit = __emit;
35
+ const { labelClasses, errorMsgClasses } = useInputClasses.useInputClasses(props);
36
+ const attrs = vue.useAttrs();
37
+ const innerValue = vue.ref(null);
38
+ const stopWatch = vue.ref(false);
39
+ const masks = vue.computed(() => {
40
+ return Object.assign(DEFAULT_MASKS, attrs.masks);
41
+ });
42
+ const displayPlaceholder = vue.computed(() => {
43
+ return lodashEs.isString(attrs.placeholder) ? attrs.placeholder : masks.value.input;
44
+ });
45
+ const attrsWithoutClassAndStyle = vue.computed(() => {
46
+ const { class: classes, style: style2, ...rest } = attrs;
47
+ return rest;
48
+ });
49
+ const style = vue.computed(() => {
50
+ return attrs.style;
51
+ });
52
+ vue.watch(
53
+ () => props.modelValue,
54
+ (nV) => {
55
+ if (!stopWatch.value) {
56
+ innerValue.value = nV ? dayjs(nV, masks.value.data).toDate() : null;
57
+ }
58
+ },
59
+ { immediate: true }
60
+ );
61
+ vue.watch(innerValue, (nV) => {
62
+ const toEmit = lodashEs.isDate(nV) && nV.toString() !== "Invalid Date" ? dayjs(nV).format(masks.value.data) : null;
63
+ stopWatch.value = true;
64
+ emit("update:modelValue", toEmit);
65
+ vue.nextTick(() => {
66
+ stopWatch.value = false;
67
+ });
68
+ });
69
+ return (_ctx, _cache) => {
70
+ return vue.openBlock(), vue.createElementBlock("div", {
71
+ class: vue.normalizeClass([{ hidden: _ctx.$attrs.hidden }, _ctx.$attrs.class]),
72
+ "data-has-error": !!_ctx.errorMsg,
73
+ style: vue.normalizeStyle(style.value)
74
+ }, [
75
+ vue.renderSlot(_ctx.$slots, "label", {
76
+ label: _ctx.label,
77
+ labelClasses: vue.unref(labelClasses)
78
+ }, () => [
79
+ _ctx.label ? (vue.openBlock(), vue.createElementBlock("label", {
80
+ key: 0,
81
+ class: vue.normalizeClass(vue.unref(labelClasses))
82
+ }, vue.toDisplayString(_ctx.label), 3)) : vue.createCommentVNode("", true)
83
+ ]),
84
+ vue.createVNode(vue.unref(vCalendar.DatePicker), {
85
+ modelValue: innerValue.value,
86
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => innerValue.value = $event),
87
+ "select-attribute": selectAttribute,
88
+ popover: { visibility: "click", placement: "auto" },
89
+ "min-date": _ctx.minDate || null,
90
+ "max-date": _ctx.maxDate || null,
91
+ masks: masks.value,
92
+ timezone: _ctx.timezone
93
+ }, {
94
+ default: vue.withCtx(({ inputValue, inputEvents }) => [
95
+ vue.createVNode(pInput, vue.mergeProps({ value: inputValue }, attrsWithoutClassAndStyle.value, { placeholder: displayPlaceholder.value }, vue.toHandlers(inputEvents)), null, 16, ["value", "placeholder"])
96
+ ]),
97
+ _: 1
98
+ }, 8, ["modelValue", "min-date", "max-date", "masks", "timezone"]),
99
+ vue.withDirectives(vue.createElementVNode("div", {
100
+ class: vue.normalizeClass(vue.unref(errorMsgClasses))
101
+ }, vue.toDisplayString(_ctx.errorMsg), 3), [
102
+ [vue.vShow, _ctx.errorMsg]
103
+ ])
104
+ ], 14, _hoisted_1);
105
+ };
106
+ }
107
+ });
108
+ exports._sfc_main = _sfc_main;
@@ -21,10 +21,9 @@ const _hoisted_4 = {
21
21
  };
22
22
  const _hoisted_5 = { class: "text-p-purple-60" };
23
23
  const _hoisted_6 = { class: "flex flex-row" };
24
- const _hoisted_7 = /* @__PURE__ */ vue.createElementVNode("span", { class: "px-1 leading-none" }, ".", -1);
25
- const _hoisted_8 = ["onClick"];
26
- const _hoisted_9 = ["title"];
27
- const _hoisted_10 = {
24
+ const _hoisted_7 = ["onClick"];
25
+ const _hoisted_8 = ["title"];
26
+ const _hoisted_9 = {
28
27
  key: 0,
29
28
  class: "ml-auto fill-p-purple-60 pl-2",
30
29
  src: _imports_0
@@ -297,7 +296,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
297
296
  onClick: _cache[2] || (_cache[2] = //@ts-ignore
298
297
  (...args) => vue.unref(selectAll) && vue.unref(selectAll)(...args))
299
298
  }, " Select all filtered ", 2)),
300
- _hoisted_7,
299
+ _cache[6] || (_cache[6] = vue.createElementVNode("span", { class: "px-1 leading-none" }, ".", -1)),
301
300
  vue.createElementVNode("a", {
302
301
  class: vue.normalizeClass([vue.unref(selectedItems).length ? "cursor-pointer" : "pointer-events-none opacity-50"]),
303
302
  onClick: _cache[3] || (_cache[3] = //@ts-ignore
@@ -364,11 +363,11 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
364
363
  class: vue.normalizeClass({ "bg-p-blue-20": index === 1 })
365
364
  }, vue.toDisplayString(str), 3);
366
365
  }), 128))
367
- ], 8, _hoisted_9)
366
+ ], 8, _hoisted_8)
368
367
  ]),
369
- vue.unref(isSelected)(vue.unref(getValue)(row.index)) ? (vue.openBlock(), vue.createElementBlock("img", _hoisted_10)) : vue.createCommentVNode("", true)
368
+ vue.unref(isSelected)(vue.unref(getValue)(row.index)) ? (vue.openBlock(), vue.createElementBlock("img", _hoisted_9)) : vue.createCommentVNode("", true)
370
369
  ], 2)
371
- ], 14, _hoisted_8)), [
370
+ ], 14, _hoisted_7)), [
372
371
  [_directive_close_popper, !__props.multiple]
373
372
  ])
374
373
  ], 4);
@@ -0,0 +1,112 @@
1
+ "use strict";
2
+ const vue = require("vue");
3
+ const dayjs = require("dayjs");
4
+ const vCalendar = require("v-calendar");
5
+ const useInputClasses = require("../useInputClasses.js");
6
+ const _hoisted_1 = ["data-has-error"];
7
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
8
+ ...{
9
+ name: "PInlineDatePicker",
10
+ inheritAttrs: false
11
+ },
12
+ __name: "p-inline-date-picker",
13
+ props: {
14
+ modelValue: { default: "" },
15
+ label: { default: "" },
16
+ errorMsg: { default: "" },
17
+ required: { type: Boolean, default: false },
18
+ minDate: { default: null },
19
+ maxDate: { default: null },
20
+ timezone: { default: "" }
21
+ },
22
+ emits: ["update:modelValue"],
23
+ setup(__props, { emit: __emit }) {
24
+ const selectAttribute = {
25
+ highlight: { class: "bg-primary", contentClass: "text-white" }
26
+ };
27
+ const DEFAULT_MASKS = {
28
+ // The mask for the input
29
+ input: "DD-MMM-YYYY",
30
+ // The mask for the model value
31
+ data: "YYYY-MM-DD"
32
+ };
33
+ const props = __props;
34
+ const emit = __emit;
35
+ const { labelClasses, errorMsgClasses } = useInputClasses.useInputClasses(props);
36
+ const attrs = vue.useAttrs();
37
+ const innerValue = vue.ref(null);
38
+ const datepickerRef = vue.ref(null);
39
+ const masks = vue.computed(() => {
40
+ return Object.assign(DEFAULT_MASKS, attrs.masks);
41
+ });
42
+ const listeners = vue.computed(() => {
43
+ return Object.keys(attrs).reduce((acc, curr) => {
44
+ if (curr.startsWith("on")) {
45
+ return { ...acc, [curr]: attrs[curr] };
46
+ } else {
47
+ return acc;
48
+ }
49
+ }, {});
50
+ });
51
+ const style = vue.computed(() => {
52
+ return attrs.style;
53
+ });
54
+ const styleDatepicker = vue.computed(() => {
55
+ return props.errorMsg ? { border: "1px solid #f0453c" } : {};
56
+ });
57
+ const dayclick = (e) => {
58
+ emit("update:modelValue", e.id);
59
+ };
60
+ vue.watch(
61
+ () => props.modelValue,
62
+ async (nV) => {
63
+ const date = dayjs(nV, masks.value.data).toDate();
64
+ if (nV && date.toString() === "Invalid Date") {
65
+ emit("update:modelValue", null);
66
+ return;
67
+ }
68
+ innerValue.value = nV ? dayjs(nV, masks.value.data).toDate() : null;
69
+ const datepicker = datepickerRef.value;
70
+ if (datepicker && typeof datepicker.move === "function" && innerValue.value) {
71
+ await datepicker.move(innerValue.value);
72
+ }
73
+ },
74
+ { immediate: true }
75
+ );
76
+ return (_ctx, _cache) => {
77
+ return vue.openBlock(), vue.createElementBlock("div", {
78
+ class: vue.normalizeClass([{ hidden: _ctx.$attrs.hidden }, _ctx.$attrs.class]),
79
+ "data-has-error": !!_ctx.errorMsg,
80
+ style: vue.normalizeStyle(style.value)
81
+ }, [
82
+ vue.renderSlot(_ctx.$slots, "label", {
83
+ label: _ctx.label,
84
+ labelClasses: vue.unref(labelClasses)
85
+ }, () => [
86
+ _ctx.label ? (vue.openBlock(), vue.createElementBlock("label", {
87
+ key: 0,
88
+ class: vue.normalizeClass(vue.unref(labelClasses))
89
+ }, vue.toDisplayString(_ctx.label), 3)) : vue.createCommentVNode("", true)
90
+ ]),
91
+ vue.createVNode(vue.unref(vCalendar.DatePicker), vue.mergeProps({
92
+ ref_key: "datepickerRef",
93
+ ref: datepickerRef,
94
+ class: { "pointer-events-none opacity-70": _ctx.$attrs.disabled },
95
+ "model-value": innerValue.value,
96
+ "select-attribute": selectAttribute,
97
+ "min-date": _ctx.minDate || null,
98
+ "max-date": _ctx.maxDate || null,
99
+ masks: masks.value,
100
+ style: styleDatepicker.value,
101
+ timezone: _ctx.timezone
102
+ }, listeners.value, { onDayclick: dayclick }), null, 16, ["class", "model-value", "min-date", "max-date", "masks", "style", "timezone"]),
103
+ vue.withDirectives(vue.createElementVNode("div", {
104
+ class: vue.normalizeClass(vue.unref(errorMsgClasses))
105
+ }, vue.toDisplayString(_ctx.errorMsg), 3), [
106
+ [vue.vShow, _ctx.errorMsg]
107
+ ])
108
+ ], 14, _hoisted_1);
109
+ };
110
+ }
111
+ });
112
+ exports._sfc_main = _sfc_main;
@@ -2,10 +2,6 @@
2
2
  const vue = require("vue");
3
3
  const pInputNumber = require("../p-input-number.js");
4
4
  const lodashEs = require("lodash-es");
5
- const _hoisted_1 = /* @__PURE__ */ vue.createElementVNode("div", null, "%", -1);
6
- const _hoisted_2 = [
7
- _hoisted_1
8
- ];
9
5
  const _sfc_main = /* @__PURE__ */ vue.defineComponent({
10
6
  ...{
11
7
  name: "PInputPercent"
@@ -43,7 +39,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
43
39
  prefix: vue.withCtx(() => [
44
40
  vue.createElementVNode("div", {
45
41
  class: vue.normalizeClass(["absolute flex items-center", prefixClasses[__props.size]])
46
- }, _hoisted_2, 2)
42
+ }, _cache[1] || (_cache[1] = [
43
+ vue.createElementVNode("div", null, "%", -1)
44
+ ]), 2)
47
45
  ]),
48
46
  _: 1
49
47
  }, 8, ["modelValue", "size"]);
@@ -57,7 +57,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
57
57
  __props.count ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
58
58
  vue.createTextVNode("Showing " + vue.toDisplayString(from.value) + " to " + vue.toDisplayString(to.value) + " of " + vue.toDisplayString(__props.count) + " results", 1)
59
59
  ], 64)) : vue.renderSlot(_ctx.$slots, "no-results", { key: 1 }, () => [
60
- vue.createTextVNode("No results found")
60
+ _cache[0] || (_cache[0] = vue.createTextVNode("No results found"))
61
61
  ])
62
62
  ]));
63
63
  };
@@ -8,17 +8,9 @@ const _hoisted_1 = {
8
8
  key: 1,
9
9
  class: "flex text-p-gray-40"
10
10
  };
11
- const _hoisted_2 = /* @__PURE__ */ vue.createElementVNode("img", { src: _imports_0 }, null, -1);
12
- const _hoisted_3 = [
13
- _hoisted_2
14
- ];
15
- const _hoisted_4 = ["onClick"];
16
- const _hoisted_5 = { class: "flex" };
17
- const _hoisted_6 = ["aria-label"];
18
- const _hoisted_7 = /* @__PURE__ */ vue.createElementVNode("img", { src: _imports_1 }, null, -1);
19
- const _hoisted_8 = [
20
- _hoisted_7
21
- ];
11
+ const _hoisted_2 = ["onClick"];
12
+ const _hoisted_3 = { class: "flex" };
13
+ const _hoisted_4 = ["aria-label"];
22
14
  const DOTS = "...";
23
15
  const BTN_CLASS = "w-6 h-6 flex justify-center items-center mx-1 font-semibold text-sm leading-none";
24
16
  const BTN_ACTIVE_CLASS = "text-p-purple-60 bg-p-gray-30 rounded-lg";
@@ -91,29 +83,33 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
91
83
  class: vue.normalizeClass([BTN_CLASS, Number(__props.modelValue) <= 1 ? ARROW_INACTIVE_CLASS : ARROW_ACTIVE_CLASS]),
92
84
  "aria-label": "go to the previous page",
93
85
  onClick: _cache[0] || (_cache[0] = ($event) => setPage(Number(__props.modelValue) - 1))
94
- }, _hoisted_3, 2),
86
+ }, _cache[2] || (_cache[2] = [
87
+ vue.createElementVNode("img", { src: _imports_0 }, null, -1)
88
+ ]), 2),
95
89
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(pages.value, (page, index) => {
96
90
  return vue.openBlock(), vue.createElementBlock("div", {
97
91
  key: index,
98
92
  onClick: ($event) => setPage(Number(page))
99
93
  }, [
100
- vue.createElementVNode("div", _hoisted_5, [
94
+ vue.createElementVNode("div", _hoisted_3, [
101
95
  page !== DOTS ? (vue.openBlock(), vue.createElementBlock("div", {
102
96
  key: 0,
103
97
  class: vue.normalizeClass([BTN_CLASS, page === __props.modelValue ? BTN_ACTIVE_CLASS : BTN_INACTIVE_CLASS]),
104
98
  "aria-label": `go to page ${page}`
105
- }, vue.toDisplayString(page), 11, _hoisted_6)) : (vue.openBlock(), vue.createElementBlock("div", {
99
+ }, vue.toDisplayString(page), 11, _hoisted_4)) : (vue.openBlock(), vue.createElementBlock("div", {
106
100
  key: 1,
107
101
  class: vue.normalizeClass(BTN_CLASS)
108
102
  }, vue.toDisplayString(DOTS)))
109
103
  ])
110
- ], 8, _hoisted_4);
104
+ ], 8, _hoisted_2);
111
105
  }), 128)),
112
106
  vue.createElementVNode("div", {
113
107
  class: vue.normalizeClass([BTN_CLASS, __props.modelValue === pageCount.value ? ARROW_INACTIVE_CLASS : ARROW_ACTIVE_CLASS]),
114
108
  "aria-label": "go to the next page",
115
109
  onClick: _cache[1] || (_cache[1] = ($event) => setPage(Number(__props.modelValue) + 1))
116
- }, _hoisted_8, 2)
110
+ }, _cache[3] || (_cache[3] = [
111
+ vue.createElementVNode("img", { src: _imports_1 }, null, -1)
112
+ ]), 2)
117
113
  ])) : vue.createCommentVNode("", true)
118
114
  ], 64);
119
115
  };