@pequity/squirrel 5.3.0 → 5.3.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 (108) hide show
  1. package/dist/cjs/chunks/{p-icon.js → p-action-bar.js} +141 -1
  2. package/dist/cjs/chunks/p-dropdown-select.js +1 -1
  3. package/dist/cjs/component.js +4 -27
  4. package/dist/cjs/index.js +12 -147
  5. package/dist/cjs/p-action-bar.js +2 -0
  6. package/dist/cjs/p-loading.js +1 -1
  7. package/dist/cjs/string.js +13 -32
  8. package/dist/cjs/useSelectList.js +1 -1
  9. package/dist/es/chunks/{p-icon.js → p-action-bar.js} +143 -3
  10. package/dist/es/chunks/p-dropdown-select.js +3 -3
  11. package/dist/es/component.js +5 -27
  12. package/dist/es/index.js +52 -187
  13. package/dist/es/p-action-bar.js +4 -1
  14. package/dist/es/p-dropdown-select.js +1 -1
  15. package/dist/es/p-loading.js +1 -1
  16. package/dist/es/string.js +14 -32
  17. package/dist/es/useSelectList.js +1 -1
  18. package/dist/squirrel/squirrel/components/index.d.ts +53 -0
  19. package/dist/squirrel/{components → squirrel/components}/p-action-bar/p-action-bar.vue.d.ts +1 -1
  20. package/dist/squirrel/{components → squirrel/components}/p-btn/p-btn.vue.d.ts +1 -1
  21. package/dist/squirrel/{components → squirrel/components}/p-dropdown/p-dropdown.vue.d.ts +1 -1
  22. package/dist/squirrel/{components → squirrel/components}/p-dropdown-select/p-dropdown-select.vue.d.ts +1 -1
  23. package/dist/squirrel/{components → squirrel/components}/p-file-upload/p-file-upload.vue.d.ts +1 -1
  24. package/dist/squirrel/{components → squirrel/components}/p-icon/p-icon.vue.d.ts +1 -1
  25. package/dist/squirrel/{components → squirrel/components}/p-input-percent/p-input-percent.vue.d.ts +1 -1
  26. package/dist/squirrel/{components → squirrel/components}/p-input-search/p-input-search.vue.d.ts +1 -1
  27. package/dist/squirrel/{components → squirrel/components}/p-select/p-select.vue.d.ts +1 -1
  28. package/dist/squirrel/{components → squirrel/components}/p-select-btn/p-select-btn.vue.d.ts +1 -1
  29. package/dist/squirrel/{components → squirrel/components}/p-select-list/p-select-list.utils.d.ts +1 -1
  30. package/dist/squirrel/{components → squirrel/components}/p-select-list/p-select-list.vue.d.ts +1 -1
  31. package/dist/squirrel/{components → squirrel/components}/p-select-list/useSelectList.d.ts +1 -1
  32. package/dist/squirrel/{components → squirrel/components}/p-table/p-table.vue.d.ts +1 -1
  33. package/dist/squirrel/{components → squirrel/components}/p-table-sort/p-table-sort.vue.d.ts +1 -1
  34. package/dist/squirrel/squirrel/composables/index.d.ts +2 -0
  35. package/dist/squirrel/{composables → squirrel/composables}/useInputClasses.d.ts +1 -1
  36. package/dist/squirrel/squirrel/index.d.ts +5 -0
  37. package/dist/squirrel/squirrel/utils/component.spec.d.ts +1 -0
  38. package/dist/squirrel/{utils → squirrel/utils}/index.d.ts +12 -12
  39. package/dist/squirrel/{utils → squirrel/utils}/inputClassesMixin.d.ts +1 -1
  40. package/dist/squirrel/squirrel/utils/string.spec.d.ts +1 -0
  41. package/dist/squirrel/tests/vitest.helpers.d.ts +12 -0
  42. package/dist/style.css +129 -129
  43. package/package.json +3 -3
  44. package/dist/cjs/chunks/component.js +0 -4
  45. package/dist/cjs/chunks/string.js +0 -13
  46. package/dist/es/chunks/component.js +0 -5
  47. package/dist/es/chunks/string.js +0 -14
  48. package/dist/squirrel/components/index.d.ts +0 -53
  49. package/dist/squirrel/composables/index.d.ts +0 -2
  50. package/dist/squirrel/index.d.ts +0 -5
  51. /package/dist/squirrel/{utils/component.spec.d.ts → squirrel/components/p-action-bar/p-action-bar.spec.d.ts} +0 -0
  52. /package/dist/squirrel/{components → squirrel/components}/p-action-bar/p-action-bar.types.d.ts +0 -0
  53. /package/dist/squirrel/{components → squirrel/components}/p-alert/p-alert.vue.d.ts +0 -0
  54. /package/dist/squirrel/{utils/string.spec.d.ts → squirrel/components/p-avatar/p-avatar.spec.d.ts} +0 -0
  55. /package/dist/squirrel/{components → squirrel/components}/p-avatar/p-avatar.vue.d.ts +0 -0
  56. /package/dist/squirrel/{components → squirrel/components}/p-btn/p-btn.types.d.ts +0 -0
  57. /package/dist/squirrel/{components → squirrel/components}/p-card/p-card.vue.d.ts +0 -0
  58. /package/dist/squirrel/{components → squirrel/components}/p-checkbox/p-checkbox.vue.d.ts +0 -0
  59. /package/dist/squirrel/{components → squirrel/components}/p-chips/p-chips.vue.d.ts +0 -0
  60. /package/dist/squirrel/{components → squirrel/components}/p-close-btn/p-close-btn.vue.d.ts +0 -0
  61. /package/dist/squirrel/{components → squirrel/components}/p-date-picker/p-date-picker.vue.d.ts +0 -0
  62. /package/dist/squirrel/{components → squirrel/components}/p-drawer/p-drawer.vue.d.ts +0 -0
  63. /package/dist/squirrel/{components → squirrel/components}/p-file-upload/p-file-upload.types.d.ts +0 -0
  64. /package/dist/squirrel/{components → squirrel/components}/p-file-upload/p-file-upload.utils.d.ts +0 -0
  65. /package/dist/squirrel/{components → squirrel/components}/p-icon/p-icon.types.d.ts +0 -0
  66. /package/dist/squirrel/{components → squirrel/components}/p-info-icon/p-info-icon.vue.d.ts +0 -0
  67. /package/dist/squirrel/{components → squirrel/components}/p-inline-date-picker/p-inline-date-picker.vue.d.ts +0 -0
  68. /package/dist/squirrel/{components → squirrel/components}/p-input/p-input.vue.d.ts +0 -0
  69. /package/dist/squirrel/{components → squirrel/components}/p-input-number/p-input-number.vue.d.ts +0 -0
  70. /package/dist/squirrel/{components → squirrel/components}/p-link/p-link.vue.d.ts +0 -0
  71. /package/dist/squirrel/{components → squirrel/components}/p-loading/p-loading.vue.d.ts +0 -0
  72. /package/dist/squirrel/{components → squirrel/components}/p-loading/usePLoading.d.ts +0 -0
  73. /package/dist/squirrel/{components → squirrel/components}/p-modal/p-modal.vue.d.ts +0 -0
  74. /package/dist/squirrel/{components → squirrel/components}/p-modal/usePModal.d.ts +0 -0
  75. /package/dist/squirrel/{components → squirrel/components}/p-pagination/p-pagination.vue.d.ts +0 -0
  76. /package/dist/squirrel/{components → squirrel/components}/p-pagination-info/p-pagination-info.vue.d.ts +0 -0
  77. /package/dist/squirrel/{components → squirrel/components}/p-progress-bar/p-progress-bar.vue.d.ts +0 -0
  78. /package/dist/squirrel/{components → squirrel/components}/p-ring-loader/p-ring-loader.vue.d.ts +0 -0
  79. /package/dist/squirrel/{components → squirrel/components}/p-select-list/p-select-list.types.d.ts +0 -0
  80. /package/dist/squirrel/{components → squirrel/components}/p-select-pill/p-select-pill.vue.d.ts +0 -0
  81. /package/dist/squirrel/{components → squirrel/components}/p-skeleton-loader/p-skeleton-loader.vue.d.ts +0 -0
  82. /package/dist/squirrel/{components → squirrel/components}/p-table/p-table.types.d.ts +0 -0
  83. /package/dist/squirrel/{components → squirrel/components}/p-table/usePTableColResize.d.ts +0 -0
  84. /package/dist/squirrel/{components → squirrel/components}/p-table/usePTableRowVirtualizer.d.ts +0 -0
  85. /package/dist/squirrel/{components → squirrel/components}/p-table-header-cell/p-table-filter-icon.vue.d.ts +0 -0
  86. /package/dist/squirrel/{components → squirrel/components}/p-table-header-cell/p-table-header-cell.vue.d.ts +0 -0
  87. /package/dist/squirrel/{components → squirrel/components}/p-table-loader/p-table-loader.vue.d.ts +0 -0
  88. /package/dist/squirrel/{components → squirrel/components}/p-table-sort/p-table-sort.config.d.ts +0 -0
  89. /package/dist/squirrel/{components → squirrel/components}/p-table-td/p-table-td.vue.d.ts +0 -0
  90. /package/dist/squirrel/{components → squirrel/components}/p-tabs/p-tabs.vue.d.ts +0 -0
  91. /package/dist/squirrel/{components → squirrel/components}/p-textarea/p-textarea.vue.d.ts +0 -0
  92. /package/dist/squirrel/{components → squirrel/components}/p-toggle/p-toggle.vue.d.ts +0 -0
  93. /package/dist/squirrel/{tailwind → squirrel/tailwind}/config.d.ts +0 -0
  94. /package/dist/squirrel/{utils → squirrel/utils}/component.d.ts +0 -0
  95. /package/dist/squirrel/{utils → squirrel/utils}/currency.d.ts +0 -0
  96. /package/dist/squirrel/{utils → squirrel/utils}/dom.d.ts +0 -0
  97. /package/dist/squirrel/{utils → squirrel/utils}/inputClassesShared.d.ts +0 -0
  98. /package/dist/squirrel/{utils → squirrel/utils}/link.d.ts +0 -0
  99. /package/dist/squirrel/{utils → squirrel/utils}/listKeyboardNavigation.d.ts +0 -0
  100. /package/dist/squirrel/{utils → squirrel/utils}/number.d.ts +0 -0
  101. /package/dist/squirrel/{utils → squirrel/utils}/object.d.ts +0 -0
  102. /package/dist/squirrel/{utils → squirrel/utils}/pagination.d.ts +0 -0
  103. /package/dist/squirrel/{utils → squirrel/utils}/sanitization.d.ts +0 -0
  104. /package/dist/squirrel/{utils → squirrel/utils}/string.d.ts +0 -0
  105. /package/dist/squirrel/{utils → squirrel/utils}/tailwind.d.ts +0 -0
  106. /package/dist/squirrel/{utils → squirrel/utils}/text.d.ts +0 -0
  107. /package/squirrel/components/p-action-bar/{p-action-bar.spec.js → p-action-bar.spec.ts} +0 -0
  108. /package/squirrel/components/p-avatar/{p-avatar.spec.js → p-avatar.spec.ts} +0 -0
@@ -4,7 +4,7 @@ import PInputSearch from "../p-input-search.js";
4
4
  import { SIZES } from "../p-select-list.js";
5
5
  import { omit } from "lodash-es";
6
6
  import { splitStringForHighlight } from "../text.js";
7
- import { t as toString } from "./string.js";
7
+ import { toString } from "../string.js";
8
8
  import { useInputClasses } from "../useInputClasses.js";
9
9
  import { useSelectList } from "../useSelectList.js";
10
10
  const _imports_0 = "data:image/svg+xml,%3csvg%20width='18'%20height='12'%20viewBox='0%200%2018%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M16.1383%200.166992L6.30411%209.83366L1.69828%205.27533L0.526611%206.46033L5.71578%2011.597C5.87174%2011.7509%206.08205%2011.8372%206.3012%2011.8372C6.52034%2011.8372%206.73065%2011.7509%206.88661%2011.597L17.3033%201.35366L16.1383%200.166992Z'%20fill='%231A123B'%20/%3e%3c/svg%3e";
@@ -410,6 +410,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
410
410
  }
411
411
  });
412
412
  export {
413
- _sfc_main as _,
414
- _imports_0 as a
413
+ _imports_0 as _,
414
+ _sfc_main as a
415
415
  };
@@ -1,27 +1,5 @@
1
- import { _ as _sfc_main } from "./chunks/p-icon.js";
2
- import { i as isComponent } from "./chunks/component.js";
3
- describe("isComponent", () => {
4
- it("should return true for a valid component object", () => {
5
- expect(isComponent(_sfc_main)).toBe(true);
6
- });
7
- it("should return false for null", () => {
8
- expect(isComponent(null)).toBe(false);
9
- });
10
- it.each([
11
- ["string", "string"],
12
- ["number", 123],
13
- ["boolean", true],
14
- ["undefined", void 0],
15
- ["symbol", Symbol("symbol")],
16
- ["function", () => {
17
- }],
18
- ["array", []],
19
- ["date", /* @__PURE__ */ new Date()],
20
- ["regexp", /regex/],
21
- ["error", new Error("error")],
22
- ["map", /* @__PURE__ */ new Map()],
23
- ["set", /* @__PURE__ */ new Set()]
24
- ])("should return false for a non-component object: %s", (_, value) => {
25
- expect(isComponent(value)).toBe(false);
26
- });
27
- });
1
+ import { isPlainObject } from "lodash-es";
2
+ const isComponent = (val) => isPlainObject(val);
3
+ export {
4
+ isComponent
5
+ };
package/dist/es/index.js CHANGED
@@ -1,61 +1,60 @@
1
1
  import { config } from "./config.js";
2
- import { defineComponent, openBlock, createBlock, Teleport, createElementBlock, mergeProps, createElementVNode, createVNode, toDisplayString, Fragment, renderList, withCtx, unref, resolveDynamicComponent, createCommentVNode, shallowRef, ref, computed, onMounted, normalizeClass, withModifiers, createTextVNode, withDirectives, vShow, pushScopeId, popScopeId, useAttrs, resolveDirective, normalizeStyle, isRef, renderSlot, provide, onBeforeUnmount, watch, toHandlers } from "vue";
3
- import PBtn from "./p-btn.js";
4
- import PCloseBtn from "./p-close-btn.js";
5
- import PDropdown from "./p-dropdown.js";
6
- import { _ as _sfc_main$5 } from "./chunks/p-icon.js";
7
- import { i as isComponent } from "./chunks/component.js";
8
- import { i as isString, t as toString } from "./chunks/string.js";
2
+ import { _, a } from "./chunks/p-action-bar.js";
9
3
  import { default as default2 } from "./p-alert.js";
10
4
  import { default as default3 } from "./p-avatar.js";
11
- import { _ } from "./chunks/p-card.js";
12
- import { default as default4 } from "./p-checkbox.js";
13
- import { default as default5 } from "./p-chips.js";
14
- import { default as default6 } from "./p-date-picker.js";
15
- import { default as default7 } from "./p-drawer.js";
16
- import { a as _imports_0$2 } from "./chunks/p-dropdown-select.js";
17
- import { _ as _2 } from "./chunks/p-dropdown-select.js";
5
+ import { default as default4 } from "./p-btn.js";
6
+ import { _ as _2 } from "./chunks/p-card.js";
7
+ import { default as default5 } from "./p-checkbox.js";
8
+ import { default as default6 } from "./p-chips.js";
9
+ import { default as default7 } from "./p-close-btn.js";
10
+ import { default as default8 } from "./p-date-picker.js";
11
+ import { default as default9 } from "./p-drawer.js";
12
+ import { default as default10 } from "./p-dropdown.js";
13
+ import { _ as _imports_0$2 } from "./chunks/p-dropdown-select.js";
14
+ import { a as a2 } from "./chunks/p-dropdown-select.js";
15
+ import { defineComponent, shallowRef, ref, computed, onMounted, openBlock, createElementBlock, normalizeClass, unref, toDisplayString, createCommentVNode, createElementVNode, withModifiers, createTextVNode, Fragment, renderList, withDirectives, vShow, pushScopeId, popScopeId, useAttrs, resolveDirective, normalizeStyle, createVNode, isRef, renderSlot, provide, onBeforeUnmount, watch, mergeProps, toHandlers } from "vue";
18
16
  import { formatBytes, getFileExtension } from "./p-file-upload.js";
19
17
  import { uniq, kebabCase } from "lodash-es";
20
18
  import { useInputClasses } from "./useInputClasses.js";
21
19
  import { useToast } from "vue-toastification";
22
20
  import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
23
- import { default as default8 } from "./p-table-filter-icon.js";
24
- import { default as default9 } from "./p-info-icon.js";
25
- import { default as default10 } from "./p-inline-date-picker.js";
26
- import { default as default11 } from "./p-input.js";
27
- import { default as default12 } from "./p-input-number.js";
21
+ import { default as default11 } from "./p-table-filter-icon.js";
22
+ import { default as default12 } from "./p-info-icon.js";
23
+ import { default as default13 } from "./p-inline-date-picker.js";
24
+ import { default as default14 } from "./p-input.js";
25
+ import { default as default15 } from "./p-input-number.js";
28
26
  import { _ as _3 } from "./chunks/p-input-percent.js";
29
27
  import PInputSearch from "./p-input-search.js";
30
28
  import { _ as _4 } from "./chunks/p-link.js";
31
- import { default as default13 } from "./p-loading.js";
32
- import { default as default14 } from "./p-modal.js";
29
+ import { default as default16 } from "./p-loading.js";
30
+ import { default as default17 } from "./p-modal.js";
33
31
  import { _ as _5 } from "./chunks/p-pagination.js";
34
32
  import { _ as _6 } from "./chunks/p-pagination-info.js";
35
- import { default as default15 } from "./p-progress-bar.js";
33
+ import { default as default18 } from "./p-progress-bar.js";
36
34
  import { _ as _7 } from "./chunks/p-ring-loader.js";
37
35
  import { _ as _8 } from "./chunks/p-select.js";
38
36
  import { _ as _9 } from "./chunks/p-select-btn.js";
39
37
  import { SIZES } from "./p-select-list.js";
40
38
  import { splitStringForHighlight } from "./text.js";
39
+ import { toString } from "./string.js";
41
40
  import { useSelectList } from "./useSelectList.js";
42
- import { default as default16 } from "./p-select-pill.js";
43
- import { default as default17 } from "./p-skeleton-loader.js";
41
+ import { default as default19 } from "./p-select-pill.js";
42
+ import { default as default20 } from "./p-skeleton-loader.js";
44
43
  import PTableHeaderCell from "./p-table-header-cell.js";
45
44
  import { colsInjectionKey, isFirstColFixedInjectionKey, isLastColFixedInjectionKey, isColsResizableInjectionKey } from "./p-table.js";
46
45
  import { MIN_WIDTH_COL_RESIZE } from "./p-table.js";
47
46
  import { usePTableColResize } from "./usePTableColResize.js";
48
47
  import { _ as _10 } from "./chunks/p-table-loader.js";
49
48
  import { SORTING_TYPES } from "./p-table-sort.js";
50
- import { default as default18 } from "./p-table-td.js";
49
+ import { default as default21 } from "./p-table-td.js";
51
50
  import { _ as _11 } from "./chunks/p-tabs.js";
52
- import { default as default19 } from "./p-textarea.js";
53
- import { default as default20 } from "./p-toggle.js";
51
+ import { default as default22 } from "./p-textarea.js";
52
+ import { default as default23 } from "./p-toggle.js";
54
53
  import { P_ICON_ALIASES } from "./p-icon.js";
55
54
  import { usePLoading } from "./usePLoading.js";
56
55
  import { usePModal } from "./usePModal.js";
57
56
  import { usePTableRowVirtualizer } from "./usePTableRowVirtualizer.js";
58
- import { default as default21 } from "./inputClassesMixin.js";
57
+ import { default as default24 } from "./inputClassesMixin.js";
59
58
  import { CURRENCY_INPUT_DEFAULTS } from "./currency.js";
60
59
  import { getColor, getColorDeep, getScreen } from "./tailwind.js";
61
60
  import { ERROR_MSG, INPUT_BASE, INPUT_ERROR, INPUT_NORMAL, INPUT_SIZES, LABEL_BASE, LABEL_REQUIRED, LABEL_SIZES, SELECT_ARROW, SELECT_BASE, SELECT_SIZES, SPACING_LEFT, SPACING_PREFIX, SPACING_RIGHT, SPACING_SUFFIX, TEXTAREA_BASE } from "./inputClassesShared.js";
@@ -65,140 +64,6 @@ import { isObject } from "./object.js";
65
64
  import { sanitizeUrl } from "./sanitization.js";
66
65
  import { setupListKeyboardNavigation } from "./listKeyboardNavigation.js";
67
66
  import { toNumberOrNull } from "./number.js";
68
- const _hoisted_1$4 = { class: "flex h-12 w-max select-none items-center rounded-lg bg-p-purple-60 px-2 text-sm font-medium text-white" };
69
- const _hoisted_2$4 = { class: "whitespace-nowrap px-3" };
70
- const _hoisted_3$4 = /* @__PURE__ */ createElementVNode("div", { class: "mx-4 h-9 w-0.5 shrink-0 rounded bg-p-purple-50" }, null, -1);
71
- const _hoisted_4$4 = { class: "flex" };
72
- const _hoisted_5$4 = { class: "flex items-center gap-2 px-1 py-0.5" };
73
- const _hoisted_6$4 = { class: "flex items-center gap-2 px-1 py-0.5" };
74
- const _hoisted_7$3 = { class: "flex flex-col bg-p-purple-60" };
75
- const _hoisted_8$1 = { class: "flex items-center gap-2 px-1 py-0.5" };
76
- const _sfc_main$4 = /* @__PURE__ */ defineComponent({
77
- ...{
78
- name: "PActionBar",
79
- inheritAttrs: false
80
- },
81
- __name: "p-action-bar",
82
- props: {
83
- show: { type: Boolean },
84
- label: {},
85
- actions: {}
86
- },
87
- emits: ["click:dismiss", "click:action"],
88
- setup(__props) {
89
- return (_ctx, _cache) => {
90
- return openBlock(), createBlock(Teleport, { to: "body" }, [
91
- _ctx.show ? (openBlock(), createElementBlock("div", mergeProps({
92
- key: 0,
93
- class: "fixed bottom-6 left-1/2 z-[100] -translate-x-2/4",
94
- role: "alertdialog"
95
- }, _ctx.$attrs), [
96
- createElementVNode("div", _hoisted_1$4, [
97
- createVNode(PCloseBtn, {
98
- variant: "dark",
99
- onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click:dismiss"))
100
- }),
101
- createElementVNode("p", _hoisted_2$4, toDisplayString(_ctx.label), 1),
102
- _hoisted_3$4,
103
- createElementVNode("div", _hoisted_4$4, [
104
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.actions, (actionOrMenu) => {
105
- return openBlock(), createElementBlock(Fragment, {
106
- key: `action-${actionOrMenu.label}`
107
- }, [
108
- !actionOrMenu.subActions ? (openBlock(), createBlock(PBtn, {
109
- key: 0,
110
- size: "sm",
111
- type: "secondary-ghost-dark",
112
- onClick: ($event) => _ctx.$emit("click:action", actionOrMenu.name)
113
- }, {
114
- default: withCtx(() => [
115
- createElementVNode("div", _hoisted_5$4, [
116
- unref(isComponent)(actionOrMenu.icon) ? (openBlock(), createBlock(resolveDynamicComponent(actionOrMenu.icon), {
117
- key: 0,
118
- class: "h-4 w-4"
119
- })) : createCommentVNode("", true),
120
- unref(isString)(actionOrMenu.icon) ? (openBlock(), createBlock(_sfc_main$5, {
121
- key: 1,
122
- icon: actionOrMenu.icon,
123
- width: "16px",
124
- height: "16px"
125
- }, null, 8, ["icon"])) : createCommentVNode("", true),
126
- createElementVNode("div", null, toDisplayString(actionOrMenu.label), 1)
127
- ])
128
- ]),
129
- _: 2
130
- }, 1032, ["onClick"])) : (openBlock(), createBlock(PDropdown, {
131
- key: 1,
132
- placement: "top",
133
- strategy: "fixed"
134
- }, {
135
- popper: withCtx(() => [
136
- createElementVNode("div", _hoisted_7$3, [
137
- (openBlock(true), createElementBlock(Fragment, null, renderList(actionOrMenu.subActions, (subaction) => {
138
- return openBlock(), createElementBlock("div", {
139
- key: `subaction-${subaction.name}`
140
- }, [
141
- createVNode(PBtn, {
142
- size: "sm",
143
- class: "w-full",
144
- type: "secondary-ghost-dark",
145
- onClick: ($event) => _ctx.$emit("click:action", subaction.name)
146
- }, {
147
- default: withCtx(() => [
148
- createElementVNode("div", _hoisted_8$1, [
149
- unref(isComponent)(subaction.icon) ? (openBlock(), createBlock(resolveDynamicComponent(subaction.icon), {
150
- key: 0,
151
- class: "h-4 w-4"
152
- })) : createCommentVNode("", true),
153
- unref(isString)(subaction.icon) ? (openBlock(), createBlock(_sfc_main$5, {
154
- key: 1,
155
- icon: subaction.icon,
156
- width: "16px",
157
- height: "16px"
158
- }, null, 8, ["icon"])) : createCommentVNode("", true),
159
- createElementVNode("div", null, toDisplayString(subaction.label), 1)
160
- ])
161
- ]),
162
- _: 2
163
- }, 1032, ["onClick"])
164
- ]);
165
- }), 128))
166
- ])
167
- ]),
168
- default: withCtx(() => [
169
- createVNode(PBtn, {
170
- size: "sm",
171
- type: "secondary-ghost-dark"
172
- }, {
173
- default: withCtx(() => [
174
- createElementVNode("div", _hoisted_6$4, [
175
- unref(isComponent)(actionOrMenu.icon) ? (openBlock(), createBlock(resolveDynamicComponent(actionOrMenu.icon), {
176
- key: 0,
177
- class: "h-4 w-4"
178
- })) : createCommentVNode("", true),
179
- unref(isString)(actionOrMenu.icon) ? (openBlock(), createBlock(_sfc_main$5, {
180
- key: 1,
181
- icon: actionOrMenu.icon,
182
- width: "16px",
183
- height: "16px"
184
- }, null, 8, ["icon"])) : createCommentVNode("", true),
185
- createElementVNode("div", null, toDisplayString(actionOrMenu.label), 1)
186
- ])
187
- ]),
188
- _: 2
189
- }, 1024)
190
- ]),
191
- _: 2
192
- }, 1024))
193
- ], 64);
194
- }), 128))
195
- ])
196
- ])
197
- ], 16)) : createCommentVNode("", true)
198
- ]);
199
- };
200
- }
201
- });
202
67
  const _imports_0$1 = "data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M5.8335%206.25016L10.0002%202.0835L14.1668%206.25016'%20stroke='%23767189'%20stroke-width='1.25'%20/%3e%3cpath%20d='M10%202.0835V13.7502'%20stroke='%23767189'%20stroke-width='1.25'%20/%3e%3cpath%20d='M2.91675%2015V18.3333H17.0834V15'%20stroke='%23767189'%20stroke-width='1.25'%20/%3e%3c/svg%3e";
203
68
  const _imports_1$1 = "data:image/svg+xml,%3csvg%20width='48'%20height='48'%20viewBox='0%200%2048%2048'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M33%2012H14V44H42V21L33%2012Z'%20stroke='%231A123B'%20stroke-width='3'%20/%3e%3cpath%20d='M9%2036H6V4H25L28%207'%20stroke='%231A123B'%20stroke-width='3'%20/%3e%3cpath%20d='M37%2030H19M28%2021V39'%20stroke='%231A123B'%20stroke-width='3'%20/%3e%3c/svg%3e";
204
69
  const _withScopeId = (n) => (pushScopeId("data-v-d07a8f64"), n = n(), popScopeId(), n);
@@ -1081,47 +946,47 @@ export {
1081
946
  LABEL_REQUIRED,
1082
947
  LABEL_SIZES,
1083
948
  MIN_WIDTH_COL_RESIZE,
1084
- _sfc_main$4 as PActionBar,
949
+ _ as PActionBar,
1085
950
  default2 as PAlert,
1086
951
  default3 as PAvatar,
1087
- PBtn,
1088
- _ as PCard,
1089
- default4 as PCheckbox,
1090
- default5 as PChips,
1091
- PCloseBtn,
1092
- default6 as PDatePicker,
1093
- default7 as PDrawer,
1094
- PDropdown,
1095
- _2 as PDropdownSelect,
952
+ default4 as PBtn,
953
+ _2 as PCard,
954
+ default5 as PCheckbox,
955
+ default6 as PChips,
956
+ default7 as PCloseBtn,
957
+ default8 as PDatePicker,
958
+ default9 as PDrawer,
959
+ default10 as PDropdown,
960
+ a2 as PDropdownSelect,
1096
961
  pFileUpload as PFileUpload,
1097
- default8 as PFilterIcon,
1098
- _sfc_main$5 as PIcon,
1099
- default9 as PInfoIcon,
1100
- default10 as PInlineDatePicker,
1101
- default11 as PInput,
1102
- default12 as PInputNumber,
962
+ default11 as PFilterIcon,
963
+ a as PIcon,
964
+ default12 as PInfoIcon,
965
+ default13 as PInlineDatePicker,
966
+ default14 as PInput,
967
+ default15 as PInputNumber,
1103
968
  _3 as PInputPercent,
1104
969
  PInputSearch,
1105
970
  _4 as PLink,
1106
- default13 as PLoading,
1107
- default14 as PModal,
971
+ default16 as PLoading,
972
+ default17 as PModal,
1108
973
  _5 as PPagination,
1109
974
  _6 as PPaginationInfo,
1110
- default15 as PProgressBar,
975
+ default18 as PProgressBar,
1111
976
  _7 as PRingLoader,
1112
977
  _8 as PSelect,
1113
978
  _9 as PSelectBtn,
1114
979
  _sfc_main$2 as PSelectList,
1115
- default16 as PSelectPill,
1116
- default17 as PSkeletonLoader,
980
+ default19 as PSelectPill,
981
+ default20 as PSkeletonLoader,
1117
982
  pTable as PTable,
1118
983
  PTableHeaderCell,
1119
984
  _10 as PTableLoader,
1120
985
  pTableSort as PTableSort,
1121
- default18 as PTableTd,
986
+ default21 as PTableTd,
1122
987
  _11 as PTabs,
1123
- default19 as PTextarea,
1124
- default20 as PToggle,
988
+ default22 as PTextarea,
989
+ default23 as PToggle,
1125
990
  P_ICON_ALIASES,
1126
991
  SELECT_ARROW,
1127
992
  SELECT_BASE,
@@ -1139,7 +1004,7 @@ export {
1139
1004
  getColorDeep,
1140
1005
  getNextActiveElement,
1141
1006
  getScreen,
1142
- default21 as inputClassesMixin,
1007
+ default24 as inputClassesMixin,
1143
1008
  isColsResizableInjectionKey,
1144
1009
  isElement,
1145
1010
  isFirstColFixedInjectionKey,
@@ -1 +1,4 @@
1
-
1
+ import { _ as _sfc_main } from "./chunks/p-action-bar.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "./chunks/p-dropdown-select.js";
1
+ import { a as _sfc_main } from "./chunks/p-dropdown-select.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, ref, watch, toValue, onBeforeUnmount, openBlock, createBlock, Teleport, createVNode, Transition, withCtx, unref, createElementBlock, createElementVNode, normalizeStyle, resolveDynamicComponent, normalizeProps, mergeProps, normalizeClass, toDisplayString, createCommentVNode } from "vue";
2
- import { i as isComponent } from "./chunks/component.js";
2
+ import { isComponent } from "./component.js";
3
3
  import { usePLoading } from "./usePLoading.js";
4
4
  import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
5
5
  const _hoisted_1 = {
package/dist/es/string.js CHANGED
@@ -1,32 +1,14 @@
1
- import { t as toString, i as isString } from "./chunks/string.js";
2
- describe("toString", () => {
3
- it.each(["", /* @__PURE__ */ new Date(), NaN, Infinity, {}, [], true, false, null, void 0])(
4
- "returns an empty string if input is %s",
5
- (val) => {
6
- expect(toString(val)).toBe("");
7
- }
8
- );
9
- it("returns a string when the value is a string", () => {
10
- expect(toString("test")).toBe("test");
11
- });
12
- it("converts the value to a string when the value is a number", () => {
13
- expect(toString(290349822e-2)).toBe("2903498.22");
14
- });
15
- });
16
- describe("isString", () => {
17
- it("should return true for a string", () => {
18
- expect(isString("hello")).toBe(true);
19
- });
20
- it.each([
21
- [123, false],
22
- [{}, false],
23
- [[], false],
24
- [null, false],
25
- [void 0, false],
26
- [true, false],
27
- [() => {
28
- }, false]
29
- ])("should return %s for %p", (input, expected) => {
30
- expect(isString(input)).toBe(expected);
31
- });
32
- });
1
+ const isString = (val) => typeof val === "string";
2
+ const toString = (value) => {
3
+ if (typeof value === "number" && (!isFinite(value) || isNaN(value))) {
4
+ return "";
5
+ }
6
+ if (typeof value !== "string" && typeof value !== "number") {
7
+ return "";
8
+ }
9
+ return String(value);
10
+ };
11
+ export {
12
+ isString,
13
+ toString
14
+ };
@@ -2,7 +2,7 @@ import { ref, computed, watch, onUnmounted, nextTick } from "vue";
2
2
  import { setupListKeyboardNavigation } from "./listKeyboardNavigation.js";
3
3
  import { cloneDeep, uniqBy } from "lodash-es";
4
4
  import { isObject } from "./object.js";
5
- import { t as toString } from "./chunks/string.js";
5
+ import { toString } from "./string.js";
6
6
  import { useVirtualizer } from "@tanstack/vue-virtual";
7
7
  const createInternalItems = (items) => {
8
8
  let arr = Array.isArray(items) ? items.slice() : [];
@@ -0,0 +1,53 @@
1
+ import PActionBar from '../../components/p-action-bar/p-action-bar.vue';
2
+ import PAlert from '../../components/p-alert/p-alert.vue';
3
+ import PAvatar from '../../components/p-avatar/p-avatar.vue';
4
+ import PBtn from '../../components/p-btn/p-btn.vue';
5
+ import PCard from '../../components/p-card/p-card.vue';
6
+ import PCheckbox from '../../components/p-checkbox/p-checkbox.vue';
7
+ import PChips from '../../components/p-chips/p-chips.vue';
8
+ import PCloseBtn from '../../components/p-close-btn/p-close-btn.vue';
9
+ import PDatePicker from '../../components/p-date-picker/p-date-picker.vue';
10
+ import PDrawer from '../../components/p-drawer/p-drawer.vue';
11
+ import PDropdown from '../../components/p-dropdown/p-dropdown.vue';
12
+ import PDropdownSelect from '../../components/p-dropdown-select/p-dropdown-select.vue';
13
+ import PFileUpload from '../../components/p-file-upload/p-file-upload.vue';
14
+ import PFilterIcon from '../../components/p-table-header-cell/p-table-filter-icon.vue';
15
+ import PIcon from '../../components/p-icon/p-icon.vue';
16
+ import PInfoIcon from '../../components/p-info-icon/p-info-icon.vue';
17
+ import PInlineDatePicker from '../../components/p-inline-date-picker/p-inline-date-picker.vue';
18
+ import PInput from '../../components/p-input/p-input.vue';
19
+ import PInputNumber from '../../components/p-input-number/p-input-number.vue';
20
+ import PInputPercent from '../../components/p-input-percent/p-input-percent.vue';
21
+ import PInputSearch from '../../components/p-input-search/p-input-search.vue';
22
+ import PLink from '../../components/p-link/p-link.vue';
23
+ import PLoading from '../../components/p-loading/p-loading.vue';
24
+ import PModal from '../../components/p-modal/p-modal.vue';
25
+ import PPagination from '../../components/p-pagination/p-pagination.vue';
26
+ import PPaginationInfo from '../../components/p-pagination-info/p-pagination-info.vue';
27
+ import PProgressBar from '../../components/p-progress-bar/p-progress-bar.vue';
28
+ import PRingLoader from '../../components/p-ring-loader/p-ring-loader.vue';
29
+ import PSelect from '../../components/p-select/p-select.vue';
30
+ import PSelectBtn from '../../components/p-select-btn/p-select-btn.vue';
31
+ import PSelectList from '../../components/p-select-list/p-select-list.vue';
32
+ import PSelectPill from '../../components/p-select-pill/p-select-pill.vue';
33
+ import PSkeletonLoader from '../../components/p-skeleton-loader/p-skeleton-loader.vue';
34
+ import PTable from '../../components/p-table/p-table.vue';
35
+ import PTableHeaderCell from '../../components/p-table-header-cell/p-table-header-cell.vue';
36
+ import PTableLoader from '../../components/p-table-loader/p-table-loader.vue';
37
+ import PTableSort from '../../components/p-table-sort/p-table-sort.vue';
38
+ import PTableTd from '../../components/p-table-td/p-table-td.vue';
39
+ import PTabs from '../../components/p-tabs/p-tabs.vue';
40
+ import PTextarea from '../../components/p-textarea/p-textarea.vue';
41
+ import PToggle from '../../components/p-toggle/p-toggle.vue';
42
+ import { type FileUploadFile } from '../../components/p-file-upload/p-file-upload.types';
43
+ import { type HeaderCellAttrs, MIN_WIDTH_COL_RESIZE, type TableCol, type ThAttrs, colsInjectionKey, isColsResizableInjectionKey, isFirstColFixedInjectionKey, isLastColFixedInjectionKey } from '../../components/p-table/p-table.types';
44
+ import { type PActionBarAction } from '../../components/p-action-bar/p-action-bar.types';
45
+ import { type PIconAlias, P_ICON_ALIASES } from '../../components/p-icon/p-icon.types';
46
+ import { SORTING_TYPES, type SortingType, type SortingTypeWithoutNoSorting } from '../../components/p-table-sort/p-table-sort.config';
47
+ import { type Size } from '../../components/p-btn/p-btn.types';
48
+ import { usePLoading } from '../../components/p-loading/usePLoading';
49
+ import { usePModal } from '../../components/p-modal/usePModal';
50
+ import { usePTableColResize } from '../../components/p-table/usePTableColResize';
51
+ import { usePTableRowVirtualizer } from '../../components/p-table/usePTableRowVirtualizer';
52
+ import { useSelectList } from '../../components/p-select-list/useSelectList';
53
+ export { PActionBar, PActionBarAction, PAlert, PAvatar, PBtn, PCard, PCheckbox, PChips, PCloseBtn, PDatePicker, PDrawer, PDropdown, PDropdownSelect, PFileUpload, PFilterIcon, PIcon, PInfoIcon, PInlineDatePicker, PInput, PInputNumber, PInputPercent, PInputSearch, PLink, PLoading, PModal, PPagination, PPaginationInfo, PProgressBar, PRingLoader, PSelect, PSelectBtn, PSelectList, PSelectPill, PSkeletonLoader, PTable, PTableHeaderCell, PTableLoader, PTableSort, PTableTd, PTabs, PTextarea, PToggle, SORTING_TYPES, MIN_WIDTH_COL_RESIZE, P_ICON_ALIASES, colsInjectionKey, isColsResizableInjectionKey, isFirstColFixedInjectionKey, isLastColFixedInjectionKey, usePModal, usePTableColResize, usePTableRowVirtualizer, useSelectList, usePLoading, SortingType, SortingTypeWithoutNoSorting, Size, FileUploadFile, HeaderCellAttrs, TableCol, ThAttrs, PIconAlias, };
@@ -1,4 +1,4 @@
1
- import { type PActionBarAction } from './p-action-bar.types';
1
+ import { type PActionBarAction } from '../../../components/p-action-bar/p-action-bar.types';
2
2
  type Props = {
3
3
  show: boolean;
4
4
  label: string;
@@ -1,6 +1,6 @@
1
1
  import { type PropType } from 'vue';
2
2
  import { type RouteLocationRaw } from 'vue-router';
3
- import { type Size } from './p-btn.types';
3
+ import { type Size } from '../../../components/p-btn/p-btn.types';
4
4
  declare const BUTTON_TYPES: {
5
5
  readonly PRIMARY: "primary";
6
6
  readonly SECONDARY: "secondary";
@@ -1,4 +1,4 @@
1
- import { type ListKeyboardNavigationInstance } from '../../utils/listKeyboardNavigation';
1
+ import { type ListKeyboardNavigationInstance } from '../../../utils/listKeyboardNavigation';
2
2
  import { type PropType } from 'vue';
3
3
  declare const _default: import("vue").DefineComponent<{
4
4
  /**
@@ -1,5 +1,5 @@
1
1
  import { type PropType } from 'vue';
2
- import { type ModelValue, type Size } from '../p-select-list/p-select-list.types';
2
+ import { type ModelValue, type Size } from '../../../components/p-select-list/p-select-list.types';
3
3
  type AnyValue = string | number | boolean | null | undefined | Record<string, unknown>;
4
4
  type AnyObject = Record<string, AnyValue>;
5
5
  declare function __VLS_template(): {
@@ -1,4 +1,4 @@
1
- import { type FileUploadFile } from './p-file-upload.types';
1
+ import { type FileUploadFile } from '../../../components/p-file-upload/p-file-upload.types';
2
2
  import { type PropType } from 'vue';
3
3
  declare const _default: import("vue").DefineComponent<{
4
4
  modelValue: {
@@ -1,5 +1,5 @@
1
1
  import { type IconifyIconAttributes } from 'iconify-icon';
2
- import { type PIconAlias } from './p-icon.types';
2
+ import { type PIconAlias } from '../../../components/p-icon/p-icon.types';
3
3
  import 'iconify-icon';
4
4
  interface Props extends /* @vue-ignore */ Omit<IconifyIconAttributes, 'icon'> {
5
5
  icon: IconifyIconAttributes['icon'] | PIconAlias;
@@ -1,4 +1,4 @@
1
- import { type InputSize } from '../../utils/inputClassesShared';
1
+ import { type InputSize } from '../../../utils/inputClassesShared';
2
2
  import { type PropType } from 'vue';
3
3
  declare const _default: import("vue").DefineComponent<{
4
4
  modelValue: {
@@ -1,4 +1,4 @@
1
- import { type InputSize } from '../../utils/inputClassesShared';
1
+ import { type InputSize } from '../../../utils/inputClassesShared';
2
2
  import { type PropType } from 'vue';
3
3
  declare const _default: import("vue").DefineComponent<{
4
4
  modelValue: {
@@ -1,4 +1,4 @@
1
- import { type InputSize } from '../../utils/inputClassesShared';
1
+ import { type InputSize } from '../../../utils/inputClassesShared';
2
2
  import { type PropType } from 'vue';
3
3
  declare function __VLS_template(): {
4
4
  slots: {
@@ -1,4 +1,4 @@
1
- import { type Size } from '../p-btn/p-btn.types';
1
+ import { type Size } from '../../../components/p-btn/p-btn.types';
2
2
  type BtnGroupItem = Record<string, string | number | boolean>;
3
3
  type Props = {
4
4
  modelValue?: string | number | null | BtnGroupItem[];
@@ -1,3 +1,3 @@
1
- import { type AnyObject, type AnyValue } from './p-select-list.types';
1
+ import { type AnyObject, type AnyValue } from '../../../components/p-select-list/p-select-list.types';
2
2
  export declare const createInternalItems: (items: unknown[]) => AnyObject[];
3
3
  export declare const createInternalValue: (modelValue: AnyValue | AnyValue[] | AnyObject | AnyObject[], valueIsObject: boolean, multiple: boolean, itemValue: AnyValue, internalItems: AnyObject[]) => AnyValue[];
@@ -1,4 +1,4 @@
1
- import { type AnyObject, type AnyValue, type ModelValue, type Size } from './p-select-list.types';
1
+ import { type AnyObject, type AnyValue, type ModelValue, type Size } from '../../../components/p-select-list/p-select-list.types';
2
2
  import { type PropType } from 'vue';
3
3
  declare function __VLS_template(): {
4
4
  slots: Readonly<{
@@ -1,4 +1,4 @@
1
- import { type AnyObject, type AnyValue, type ModelValue, type Size } from './p-select-list.types';
1
+ import { type AnyObject, type AnyValue, type ModelValue, type Size } from '../../../components/p-select-list/p-select-list.types';
2
2
  import { type ComponentPublicInstance, type Ref } from 'vue';
3
3
  type Emits = {
4
4
  (e: 'update:modelValue', modelValue: ModelValue): void;
@@ -1,4 +1,4 @@
1
- import { type TableCol } from './p-table.types';
1
+ import { type TableCol } from '../../../components/p-table/p-table.types';
2
2
  type Props = {
3
3
  cols: TableCol[];
4
4
  colsResizable?: boolean;
@@ -1,5 +1,5 @@
1
1
  import { type PropType } from 'vue';
2
- import { type SortingType } from './p-table-sort.config';
2
+ import { type SortingType } from '../../../components/p-table-sort/p-table-sort.config';
3
3
  declare const _default: import("vue").DefineComponent<{
4
4
  modelValue: {
5
5
  type: PropType<SortingType>;
@@ -0,0 +1,2 @@
1
+ import { useInputClasses } from '../../composables/useInputClasses';
2
+ export { useInputClasses };
@@ -1,4 +1,4 @@
1
- import { type InputSize } from '../utils/inputClassesShared';
1
+ import { type InputSize } from '../../utils/inputClassesShared';
2
2
  type Props = {
3
3
  size: InputSize;
4
4
  errorMsg: string;