@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
@@ -3,7 +3,12 @@ var __defProp = Object.defineProperty;
3
3
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4
4
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
5
  const vue = require("vue");
6
+ const pBtn = require("../p-btn.js");
7
+ const pCloseBtn = require("../p-close-btn.js");
8
+ const pDropdown = require("../p-dropdown.js");
6
9
  const pIcon = require("../p-icon.js");
10
+ const component = require("../component.js");
11
+ const string = require("../string.js");
7
12
  /**
8
13
  * (c) Iconify
9
14
  *
@@ -2162,7 +2167,7 @@ function defineIconifyIcon(name = "iconify-icon") {
2162
2167
  return IconifyIcon;
2163
2168
  }
2164
2169
  defineIconifyIcon() || exportFunctions();
2165
- const _sfc_main = /* @__PURE__ */ vue.defineComponent({
2170
+ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
2166
2171
  ...{
2167
2172
  name: "PIcon"
2168
2173
  },
@@ -2177,4 +2182,139 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
2177
2182
  };
2178
2183
  }
2179
2184
  });
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
+ 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" };
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" };
2193
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
2194
+ ...{
2195
+ name: "PActionBar",
2196
+ inheritAttrs: false
2197
+ },
2198
+ __name: "p-action-bar",
2199
+ props: {
2200
+ show: { type: Boolean },
2201
+ label: {},
2202
+ actions: {}
2203
+ },
2204
+ emits: ["click:dismiss", "click:action"],
2205
+ setup(__props) {
2206
+ return (_ctx, _cache) => {
2207
+ return vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
2208
+ _ctx.show ? (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
2209
+ key: 0,
2210
+ class: "fixed bottom-6 left-1/2 z-[100] -translate-x-2/4",
2211
+ role: "alertdialog"
2212
+ }, _ctx.$attrs), [
2213
+ vue.createElementVNode("div", _hoisted_1, [
2214
+ vue.createVNode(pCloseBtn, {
2215
+ variant: "dark",
2216
+ onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click:dismiss"))
2217
+ }),
2218
+ vue.createElementVNode("p", _hoisted_2, vue.toDisplayString(_ctx.label), 1),
2219
+ _hoisted_3,
2220
+ vue.createElementVNode("div", _hoisted_4, [
2221
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.actions, (actionOrMenu) => {
2222
+ return vue.openBlock(), vue.createElementBlock(vue.Fragment, {
2223
+ key: `action-${actionOrMenu.label}`
2224
+ }, [
2225
+ !actionOrMenu.subActions ? (vue.openBlock(), vue.createBlock(pBtn, {
2226
+ key: 0,
2227
+ size: "sm",
2228
+ type: "secondary-ghost-dark",
2229
+ onClick: ($event) => _ctx.$emit("click:action", actionOrMenu.name)
2230
+ }, {
2231
+ default: vue.withCtx(() => [
2232
+ vue.createElementVNode("div", _hoisted_5, [
2233
+ vue.unref(component.isComponent)(actionOrMenu.icon) ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(actionOrMenu.icon), {
2234
+ key: 0,
2235
+ class: "h-4 w-4"
2236
+ })) : vue.createCommentVNode("", true),
2237
+ vue.unref(string.isString)(actionOrMenu.icon) ? (vue.openBlock(), vue.createBlock(_sfc_main$1, {
2238
+ key: 1,
2239
+ icon: actionOrMenu.icon,
2240
+ width: "16px",
2241
+ height: "16px"
2242
+ }, null, 8, ["icon"])) : vue.createCommentVNode("", true),
2243
+ vue.createElementVNode("div", null, vue.toDisplayString(actionOrMenu.label), 1)
2244
+ ])
2245
+ ]),
2246
+ _: 2
2247
+ }, 1032, ["onClick"])) : (vue.openBlock(), vue.createBlock(pDropdown, {
2248
+ key: 1,
2249
+ placement: "top",
2250
+ strategy: "fixed"
2251
+ }, {
2252
+ popper: vue.withCtx(() => [
2253
+ vue.createElementVNode("div", _hoisted_7, [
2254
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(actionOrMenu.subActions, (subaction) => {
2255
+ return vue.openBlock(), vue.createElementBlock("div", {
2256
+ key: `subaction-${subaction.name}`
2257
+ }, [
2258
+ vue.createVNode(pBtn, {
2259
+ size: "sm",
2260
+ class: "w-full",
2261
+ type: "secondary-ghost-dark",
2262
+ onClick: ($event) => _ctx.$emit("click:action", subaction.name)
2263
+ }, {
2264
+ default: vue.withCtx(() => [
2265
+ vue.createElementVNode("div", _hoisted_8, [
2266
+ vue.unref(component.isComponent)(subaction.icon) ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(subaction.icon), {
2267
+ key: 0,
2268
+ class: "h-4 w-4"
2269
+ })) : vue.createCommentVNode("", true),
2270
+ vue.unref(string.isString)(subaction.icon) ? (vue.openBlock(), vue.createBlock(_sfc_main$1, {
2271
+ key: 1,
2272
+ icon: subaction.icon,
2273
+ width: "16px",
2274
+ height: "16px"
2275
+ }, null, 8, ["icon"])) : vue.createCommentVNode("", true),
2276
+ vue.createElementVNode("div", null, vue.toDisplayString(subaction.label), 1)
2277
+ ])
2278
+ ]),
2279
+ _: 2
2280
+ }, 1032, ["onClick"])
2281
+ ]);
2282
+ }), 128))
2283
+ ])
2284
+ ]),
2285
+ default: vue.withCtx(() => [
2286
+ vue.createVNode(pBtn, {
2287
+ size: "sm",
2288
+ type: "secondary-ghost-dark"
2289
+ }, {
2290
+ default: vue.withCtx(() => [
2291
+ vue.createElementVNode("div", _hoisted_6, [
2292
+ vue.unref(component.isComponent)(actionOrMenu.icon) ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(actionOrMenu.icon), {
2293
+ key: 0,
2294
+ class: "h-4 w-4"
2295
+ })) : vue.createCommentVNode("", true),
2296
+ vue.unref(string.isString)(actionOrMenu.icon) ? (vue.openBlock(), vue.createBlock(_sfc_main$1, {
2297
+ key: 1,
2298
+ icon: actionOrMenu.icon,
2299
+ width: "16px",
2300
+ height: "16px"
2301
+ }, null, 8, ["icon"])) : vue.createCommentVNode("", true),
2302
+ vue.createElementVNode("div", null, vue.toDisplayString(actionOrMenu.label), 1)
2303
+ ])
2304
+ ]),
2305
+ _: 2
2306
+ }, 1024)
2307
+ ]),
2308
+ _: 2
2309
+ }, 1024))
2310
+ ], 64);
2311
+ }), 128))
2312
+ ])
2313
+ ])
2314
+ ], 16)) : vue.createCommentVNode("", true)
2315
+ ]);
2316
+ };
2317
+ }
2318
+ });
2180
2319
  exports._sfc_main = _sfc_main;
2320
+ exports._sfc_main$1 = _sfc_main$1;
@@ -5,7 +5,7 @@ const pInputSearch = require("../p-input-search.js");
5
5
  const pSelectList = require("../p-select-list.js");
6
6
  const lodashEs = require("lodash-es");
7
7
  const text = require("../text.js");
8
- const string = require("./string.js");
8
+ const string = require("../string.js");
9
9
  const useInputClasses = require("../useInputClasses.js");
10
10
  const useSelectList = require("../useSelectList.js");
11
11
  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";
@@ -1,28 +1,5 @@
1
1
  "use strict";
2
- const pIcon_vue_vue_type_script_setup_true_lang = require("./chunks/p-icon.js");
3
- const component = require("./chunks/component.js");
4
- describe("isComponent", () => {
5
- it("should return true for a valid component object", () => {
6
- expect(component.isComponent(pIcon_vue_vue_type_script_setup_true_lang._sfc_main)).toBe(true);
7
- });
8
- it("should return false for null", () => {
9
- expect(component.isComponent(null)).toBe(false);
10
- });
11
- it.each([
12
- ["string", "string"],
13
- ["number", 123],
14
- ["boolean", true],
15
- ["undefined", void 0],
16
- ["symbol", Symbol("symbol")],
17
- ["function", () => {
18
- }],
19
- ["array", []],
20
- ["date", /* @__PURE__ */ new Date()],
21
- ["regexp", /regex/],
22
- ["error", new Error("error")],
23
- ["map", /* @__PURE__ */ new Map()],
24
- ["set", /* @__PURE__ */ new Set()]
25
- ])("should return false for a non-component object: %s", (_, value) => {
26
- expect(component.isComponent(value)).toBe(false);
27
- });
28
- });
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const lodashEs = require("lodash-es");
4
+ const isComponent = (val) => lodashEs.isPlainObject(val);
5
+ exports.isComponent = isComponent;
package/dist/cjs/index.js CHANGED
@@ -1,21 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const config = require("./config.js");
4
- const vue = require("vue");
5
- const pBtn = require("./p-btn.js");
6
- const pCloseBtn = require("./p-close-btn.js");
7
- const pDropdown = require("./p-dropdown.js");
8
- const pIcon_vue_vue_type_script_setup_true_lang = require("./chunks/p-icon.js");
9
- const component = require("./chunks/component.js");
10
- const string = require("./chunks/string.js");
4
+ const pActionBar_vue_vue_type_script_setup_true_lang = require("./chunks/p-action-bar.js");
11
5
  const pAlert = require("./p-alert.js");
12
6
  const pAvatar = require("./p-avatar.js");
7
+ const pBtn = require("./p-btn.js");
13
8
  const pCard_vue_vue_type_script_setup_true_lang = require("./chunks/p-card.js");
14
9
  const pCheckbox = require("./p-checkbox.js");
15
10
  const pChips = require("./p-chips.js");
11
+ const pCloseBtn = require("./p-close-btn.js");
16
12
  const pDatePicker = require("./p-date-picker.js");
17
13
  const pDrawer = require("./p-drawer.js");
14
+ const pDropdown = require("./p-dropdown.js");
18
15
  const pDropdownSelect_vue_vue_type_script_setup_true_lang = require("./chunks/p-dropdown-select.js");
16
+ const vue = require("vue");
19
17
  const pFileUpload$1 = require("./p-file-upload.js");
20
18
  const lodashEs = require("lodash-es");
21
19
  const useInputClasses = require("./useInputClasses.js");
@@ -39,6 +37,7 @@ const pSelect_vue_vue_type_script_setup_true_lang = require("./chunks/p-select.j
39
37
  const pSelectBtn_vue_vue_type_script_setup_true_lang = require("./chunks/p-select-btn.js");
40
38
  const pSelectList = require("./p-select-list.js");
41
39
  const text = require("./text.js");
40
+ const string = require("./string.js");
42
41
  const useSelectList = require("./useSelectList.js");
43
42
  const pSelectPill = require("./p-select-pill.js");
44
43
  const pSkeletonLoader = require("./p-skeleton-loader.js");
@@ -65,140 +64,6 @@ const object = require("./object.js");
65
64
  const sanitization = require("./sanitization.js");
66
65
  const listKeyboardNavigation = require("./listKeyboardNavigation.js");
67
66
  const number = require("./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__ */ vue.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__ */ vue.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 vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
91
- _ctx.show ? (vue.openBlock(), vue.createElementBlock("div", vue.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
- vue.createElementVNode("div", _hoisted_1$4, [
97
- vue.createVNode(pCloseBtn, {
98
- variant: "dark",
99
- onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click:dismiss"))
100
- }),
101
- vue.createElementVNode("p", _hoisted_2$4, vue.toDisplayString(_ctx.label), 1),
102
- _hoisted_3$4,
103
- vue.createElementVNode("div", _hoisted_4$4, [
104
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.actions, (actionOrMenu) => {
105
- return vue.openBlock(), vue.createElementBlock(vue.Fragment, {
106
- key: `action-${actionOrMenu.label}`
107
- }, [
108
- !actionOrMenu.subActions ? (vue.openBlock(), vue.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: vue.withCtx(() => [
115
- vue.createElementVNode("div", _hoisted_5$4, [
116
- vue.unref(component.isComponent)(actionOrMenu.icon) ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(actionOrMenu.icon), {
117
- key: 0,
118
- class: "h-4 w-4"
119
- })) : vue.createCommentVNode("", true),
120
- vue.unref(string.isString)(actionOrMenu.icon) ? (vue.openBlock(), vue.createBlock(pIcon_vue_vue_type_script_setup_true_lang._sfc_main, {
121
- key: 1,
122
- icon: actionOrMenu.icon,
123
- width: "16px",
124
- height: "16px"
125
- }, null, 8, ["icon"])) : vue.createCommentVNode("", true),
126
- vue.createElementVNode("div", null, vue.toDisplayString(actionOrMenu.label), 1)
127
- ])
128
- ]),
129
- _: 2
130
- }, 1032, ["onClick"])) : (vue.openBlock(), vue.createBlock(pDropdown, {
131
- key: 1,
132
- placement: "top",
133
- strategy: "fixed"
134
- }, {
135
- popper: vue.withCtx(() => [
136
- vue.createElementVNode("div", _hoisted_7$3, [
137
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(actionOrMenu.subActions, (subaction) => {
138
- return vue.openBlock(), vue.createElementBlock("div", {
139
- key: `subaction-${subaction.name}`
140
- }, [
141
- vue.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: vue.withCtx(() => [
148
- vue.createElementVNode("div", _hoisted_8$1, [
149
- vue.unref(component.isComponent)(subaction.icon) ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(subaction.icon), {
150
- key: 0,
151
- class: "h-4 w-4"
152
- })) : vue.createCommentVNode("", true),
153
- vue.unref(string.isString)(subaction.icon) ? (vue.openBlock(), vue.createBlock(pIcon_vue_vue_type_script_setup_true_lang._sfc_main, {
154
- key: 1,
155
- icon: subaction.icon,
156
- width: "16px",
157
- height: "16px"
158
- }, null, 8, ["icon"])) : vue.createCommentVNode("", true),
159
- vue.createElementVNode("div", null, vue.toDisplayString(subaction.label), 1)
160
- ])
161
- ]),
162
- _: 2
163
- }, 1032, ["onClick"])
164
- ]);
165
- }), 128))
166
- ])
167
- ]),
168
- default: vue.withCtx(() => [
169
- vue.createVNode(pBtn, {
170
- size: "sm",
171
- type: "secondary-ghost-dark"
172
- }, {
173
- default: vue.withCtx(() => [
174
- vue.createElementVNode("div", _hoisted_6$4, [
175
- vue.unref(component.isComponent)(actionOrMenu.icon) ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(actionOrMenu.icon), {
176
- key: 0,
177
- class: "h-4 w-4"
178
- })) : vue.createCommentVNode("", true),
179
- vue.unref(string.isString)(actionOrMenu.icon) ? (vue.openBlock(), vue.createBlock(pIcon_vue_vue_type_script_setup_true_lang._sfc_main, {
180
- key: 1,
181
- icon: actionOrMenu.icon,
182
- width: "16px",
183
- height: "16px"
184
- }, null, 8, ["icon"])) : vue.createCommentVNode("", true),
185
- vue.createElementVNode("div", null, vue.toDisplayString(actionOrMenu.label), 1)
186
- ])
187
- ]),
188
- _: 2
189
- }, 1024)
190
- ]),
191
- _: 2
192
- }, 1024))
193
- ], 64);
194
- }), 128))
195
- ])
196
- ])
197
- ], 16)) : vue.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) => (vue.pushScopeId("data-v-d07a8f64"), n = n(), vue.popScopeId(), n);
@@ -1071,18 +936,18 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
1071
936
  }
1072
937
  const pTableSort = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["render", _sfc_render]]);
1073
938
  exports.config = config.config;
1074
- exports.PBtn = pBtn;
1075
- exports.PCloseBtn = pCloseBtn;
1076
- exports.PDropdown = pDropdown;
1077
- exports.PIcon = pIcon_vue_vue_type_script_setup_true_lang._sfc_main;
1078
- exports.toString = string.toString;
939
+ exports.PActionBar = pActionBar_vue_vue_type_script_setup_true_lang._sfc_main;
940
+ exports.PIcon = pActionBar_vue_vue_type_script_setup_true_lang._sfc_main$1;
1079
941
  exports.PAlert = pAlert;
1080
942
  exports.PAvatar = pAvatar;
943
+ exports.PBtn = pBtn;
1081
944
  exports.PCard = pCard_vue_vue_type_script_setup_true_lang._sfc_main;
1082
945
  exports.PCheckbox = pCheckbox;
1083
946
  exports.PChips = pChips;
947
+ exports.PCloseBtn = pCloseBtn;
1084
948
  exports.PDatePicker = pDatePicker;
1085
949
  exports.PDrawer = pDrawer;
950
+ exports.PDropdown = pDropdown;
1086
951
  exports.PDropdownSelect = pDropdownSelect_vue_vue_type_script_setup_true_lang._sfc_main;
1087
952
  exports.useInputClasses = useInputClasses.useInputClasses;
1088
953
  exports.PFilterIcon = pTableFilterIcon;
@@ -1102,6 +967,7 @@ exports.PRingLoader = pRingLoader_vue_vue_type_script_setup_true_lang._sfc_main;
1102
967
  exports.PSelect = pSelect_vue_vue_type_script_setup_true_lang._sfc_main;
1103
968
  exports.PSelectBtn = pSelectBtn_vue_vue_type_script_setup_true_lang._sfc_main;
1104
969
  exports.splitStringForHighlight = text.splitStringForHighlight;
970
+ exports.toString = string.toString;
1105
971
  exports.useSelectList = useSelectList.useSelectList;
1106
972
  exports.PSelectPill = pSelectPill;
1107
973
  exports.PSkeletonLoader = pSkeletonLoader;
@@ -1151,7 +1017,6 @@ exports.isObject = object.isObject;
1151
1017
  exports.sanitizeUrl = sanitization.sanitizeUrl;
1152
1018
  exports.setupListKeyboardNavigation = listKeyboardNavigation.setupListKeyboardNavigation;
1153
1019
  exports.toNumberOrNull = number.toNumberOrNull;
1154
- exports.PActionBar = _sfc_main$4;
1155
1020
  exports.PFileUpload = pFileUpload;
1156
1021
  exports.PSelectList = _sfc_main$2;
1157
1022
  exports.PTable = pTable;
@@ -1 +1,3 @@
1
1
  "use strict";
2
+ const pActionBar_vue_vue_type_script_setup_true_lang = require("./chunks/p-action-bar.js");
3
+ module.exports = pActionBar_vue_vue_type_script_setup_true_lang._sfc_main;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  const vue = require("vue");
3
- const component = require("./chunks/component.js");
3
+ const component = require("./component.js");
4
4
  const usePLoading = require("./usePLoading.js");
5
5
  const _pluginVue_exportHelper = require("./chunks/_plugin-vue_export-helper.js");
6
6
  const _hoisted_1 = {
@@ -1,33 +1,14 @@
1
1
  "use strict";
2
- const string = require("./chunks/string.js");
3
- describe("toString", () => {
4
- it.each(["", /* @__PURE__ */ new Date(), NaN, Infinity, {}, [], true, false, null, void 0])(
5
- "returns an empty string if input is %s",
6
- (val) => {
7
- expect(string.toString(val)).toBe("");
8
- }
9
- );
10
- it("returns a string when the value is a string", () => {
11
- expect(string.toString("test")).toBe("test");
12
- });
13
- it("converts the value to a string when the value is a number", () => {
14
- expect(string.toString(290349822e-2)).toBe("2903498.22");
15
- });
16
- });
17
- describe("isString", () => {
18
- it("should return true for a string", () => {
19
- expect(string.isString("hello")).toBe(true);
20
- });
21
- it.each([
22
- [123, false],
23
- [{}, false],
24
- [[], false],
25
- [null, false],
26
- [void 0, false],
27
- [true, false],
28
- [() => {
29
- }, false]
30
- ])("should return %s for %p", (input, expected) => {
31
- expect(string.isString(input)).toBe(expected);
32
- });
33
- });
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const isString = (val) => typeof val === "string";
4
+ const toString = (value) => {
5
+ if (typeof value === "number" && (!isFinite(value) || isNaN(value))) {
6
+ return "";
7
+ }
8
+ if (typeof value !== "string" && typeof value !== "number") {
9
+ return "";
10
+ }
11
+ return String(value);
12
+ };
13
+ exports.isString = isString;
14
+ exports.toString = toString;
@@ -4,7 +4,7 @@ const vue = require("vue");
4
4
  const listKeyboardNavigation = require("./listKeyboardNavigation.js");
5
5
  const lodashEs = require("lodash-es");
6
6
  const object = require("./object.js");
7
- const string = require("./chunks/string.js");
7
+ const string = require("./string.js");
8
8
  const vueVirtual = require("@tanstack/vue-virtual");
9
9
  const createInternalItems = (items) => {
10
10
  let arr = Array.isArray(items) ? items.slice() : [];
@@ -1,8 +1,13 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
- import { defineComponent, openBlock, createElementBlock, normalizeProps, guardReactiveProps, unref } from "vue";
4
+ import { defineComponent, openBlock, createElementBlock, normalizeProps, guardReactiveProps, unref, createBlock, Teleport, mergeProps, createElementVNode, createVNode, toDisplayString, Fragment, renderList, withCtx, resolveDynamicComponent, createCommentVNode } from "vue";
5
+ import PBtn from "../p-btn.js";
6
+ import PCloseBtn from "../p-close-btn.js";
7
+ import PDropdown from "../p-dropdown.js";
5
8
  import { P_ICON_ALIASES } from "../p-icon.js";
9
+ import { isComponent } from "../component.js";
10
+ import { isString } from "../string.js";
6
11
  /**
7
12
  * (c) Iconify
8
13
  *
@@ -2161,7 +2166,7 @@ function defineIconifyIcon(name = "iconify-icon") {
2161
2166
  return IconifyIcon;
2162
2167
  }
2163
2168
  defineIconifyIcon() || exportFunctions();
2164
- const _sfc_main = /* @__PURE__ */ defineComponent({
2169
+ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2165
2170
  ...{
2166
2171
  name: "PIcon"
2167
2172
  },
@@ -2176,6 +2181,141 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2176
2181
  };
2177
2182
  }
2178
2183
  });
2184
+ 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" };
2185
+ const _hoisted_2 = { class: "whitespace-nowrap px-3" };
2186
+ const _hoisted_3 = /* @__PURE__ */ createElementVNode("div", { class: "mx-4 h-9 w-0.5 shrink-0 rounded bg-p-purple-50" }, null, -1);
2187
+ const _hoisted_4 = { class: "flex" };
2188
+ const _hoisted_5 = { class: "flex items-center gap-2 px-1 py-0.5" };
2189
+ const _hoisted_6 = { class: "flex items-center gap-2 px-1 py-0.5" };
2190
+ const _hoisted_7 = { class: "flex flex-col bg-p-purple-60" };
2191
+ const _hoisted_8 = { class: "flex items-center gap-2 px-1 py-0.5" };
2192
+ const _sfc_main = /* @__PURE__ */ defineComponent({
2193
+ ...{
2194
+ name: "PActionBar",
2195
+ inheritAttrs: false
2196
+ },
2197
+ __name: "p-action-bar",
2198
+ props: {
2199
+ show: { type: Boolean },
2200
+ label: {},
2201
+ actions: {}
2202
+ },
2203
+ emits: ["click:dismiss", "click:action"],
2204
+ setup(__props) {
2205
+ return (_ctx, _cache) => {
2206
+ return openBlock(), createBlock(Teleport, { to: "body" }, [
2207
+ _ctx.show ? (openBlock(), createElementBlock("div", mergeProps({
2208
+ key: 0,
2209
+ class: "fixed bottom-6 left-1/2 z-[100] -translate-x-2/4",
2210
+ role: "alertdialog"
2211
+ }, _ctx.$attrs), [
2212
+ createElementVNode("div", _hoisted_1, [
2213
+ createVNode(PCloseBtn, {
2214
+ variant: "dark",
2215
+ onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click:dismiss"))
2216
+ }),
2217
+ createElementVNode("p", _hoisted_2, toDisplayString(_ctx.label), 1),
2218
+ _hoisted_3,
2219
+ createElementVNode("div", _hoisted_4, [
2220
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.actions, (actionOrMenu) => {
2221
+ return openBlock(), createElementBlock(Fragment, {
2222
+ key: `action-${actionOrMenu.label}`
2223
+ }, [
2224
+ !actionOrMenu.subActions ? (openBlock(), createBlock(PBtn, {
2225
+ key: 0,
2226
+ size: "sm",
2227
+ type: "secondary-ghost-dark",
2228
+ onClick: ($event) => _ctx.$emit("click:action", actionOrMenu.name)
2229
+ }, {
2230
+ default: withCtx(() => [
2231
+ createElementVNode("div", _hoisted_5, [
2232
+ unref(isComponent)(actionOrMenu.icon) ? (openBlock(), createBlock(resolveDynamicComponent(actionOrMenu.icon), {
2233
+ key: 0,
2234
+ class: "h-4 w-4"
2235
+ })) : createCommentVNode("", true),
2236
+ unref(isString)(actionOrMenu.icon) ? (openBlock(), createBlock(_sfc_main$1, {
2237
+ key: 1,
2238
+ icon: actionOrMenu.icon,
2239
+ width: "16px",
2240
+ height: "16px"
2241
+ }, null, 8, ["icon"])) : createCommentVNode("", true),
2242
+ createElementVNode("div", null, toDisplayString(actionOrMenu.label), 1)
2243
+ ])
2244
+ ]),
2245
+ _: 2
2246
+ }, 1032, ["onClick"])) : (openBlock(), createBlock(PDropdown, {
2247
+ key: 1,
2248
+ placement: "top",
2249
+ strategy: "fixed"
2250
+ }, {
2251
+ popper: withCtx(() => [
2252
+ createElementVNode("div", _hoisted_7, [
2253
+ (openBlock(true), createElementBlock(Fragment, null, renderList(actionOrMenu.subActions, (subaction) => {
2254
+ return openBlock(), createElementBlock("div", {
2255
+ key: `subaction-${subaction.name}`
2256
+ }, [
2257
+ createVNode(PBtn, {
2258
+ size: "sm",
2259
+ class: "w-full",
2260
+ type: "secondary-ghost-dark",
2261
+ onClick: ($event) => _ctx.$emit("click:action", subaction.name)
2262
+ }, {
2263
+ default: withCtx(() => [
2264
+ createElementVNode("div", _hoisted_8, [
2265
+ unref(isComponent)(subaction.icon) ? (openBlock(), createBlock(resolveDynamicComponent(subaction.icon), {
2266
+ key: 0,
2267
+ class: "h-4 w-4"
2268
+ })) : createCommentVNode("", true),
2269
+ unref(isString)(subaction.icon) ? (openBlock(), createBlock(_sfc_main$1, {
2270
+ key: 1,
2271
+ icon: subaction.icon,
2272
+ width: "16px",
2273
+ height: "16px"
2274
+ }, null, 8, ["icon"])) : createCommentVNode("", true),
2275
+ createElementVNode("div", null, toDisplayString(subaction.label), 1)
2276
+ ])
2277
+ ]),
2278
+ _: 2
2279
+ }, 1032, ["onClick"])
2280
+ ]);
2281
+ }), 128))
2282
+ ])
2283
+ ]),
2284
+ default: withCtx(() => [
2285
+ createVNode(PBtn, {
2286
+ size: "sm",
2287
+ type: "secondary-ghost-dark"
2288
+ }, {
2289
+ default: withCtx(() => [
2290
+ createElementVNode("div", _hoisted_6, [
2291
+ unref(isComponent)(actionOrMenu.icon) ? (openBlock(), createBlock(resolveDynamicComponent(actionOrMenu.icon), {
2292
+ key: 0,
2293
+ class: "h-4 w-4"
2294
+ })) : createCommentVNode("", true),
2295
+ unref(isString)(actionOrMenu.icon) ? (openBlock(), createBlock(_sfc_main$1, {
2296
+ key: 1,
2297
+ icon: actionOrMenu.icon,
2298
+ width: "16px",
2299
+ height: "16px"
2300
+ }, null, 8, ["icon"])) : createCommentVNode("", true),
2301
+ createElementVNode("div", null, toDisplayString(actionOrMenu.label), 1)
2302
+ ])
2303
+ ]),
2304
+ _: 2
2305
+ }, 1024)
2306
+ ]),
2307
+ _: 2
2308
+ }, 1024))
2309
+ ], 64);
2310
+ }), 128))
2311
+ ])
2312
+ ])
2313
+ ], 16)) : createCommentVNode("", true)
2314
+ ]);
2315
+ };
2316
+ }
2317
+ });
2179
2318
  export {
2180
- _sfc_main as _
2319
+ _sfc_main as _,
2320
+ _sfc_main$1 as a
2181
2321
  };