@pequity/squirrel 1.0.29-beta.1 → 1.2.3
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.
- package/dist/cjs/chunks/p-dropdown-select.js +1 -1
- package/dist/cjs/index.js +114 -9
- package/dist/cjs/p-action-bar.js +0 -2
- package/dist/cjs/p-loading.js +3 -3
- package/dist/es/chunks/p-dropdown-select.js +3 -3
- package/dist/es/index.js +155 -50
- package/dist/es/p-action-bar.js +1 -4
- package/dist/es/p-dropdown-select.js +1 -1
- package/dist/es/p-loading.js +3 -3
- package/dist/squirrel/components/index.d.ts +2 -1
- package/dist/squirrel/components/p-action-bar/p-action-bar.types.d.ts +10 -0
- package/dist/squirrel/components/p-action-bar/p-action-bar.vue.d.ts +21 -33
- package/dist/squirrel/components/p-input-number/p-input-number.vue.d.ts +1 -1
- package/dist/squirrel/index.d.ts +1 -1
- package/dist/style.css +52 -56
- package/package.json +26 -26
- package/squirrel/components/index.ts +2 -0
- package/squirrel/components/p-action-bar/p-action-bar.spec.js +60 -3
- package/squirrel/components/p-action-bar/p-action-bar.stories.js +17 -0
- package/squirrel/components/p-action-bar/p-action-bar.types.ts +10 -0
- package/squirrel/components/p-action-bar/p-action-bar.vue +50 -24
- package/squirrel/components/p-loading/p-loading.vue +1 -1
- package/dist/cjs/chunks/p-action-bar.js +0 -60
- package/dist/es/chunks/p-action-bar.js +0 -61
|
@@ -159,7 +159,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
159
159
|
const emit = __emit;
|
|
160
160
|
const props = __props;
|
|
161
161
|
const nextFrame = () => new Promise((resolve) => requestAnimationFrame(() => requestAnimationFrame(resolve)));
|
|
162
|
-
const nextLoop = (ms) => new Promise((resolve) => setTimeout(resolve,
|
|
162
|
+
const nextLoop = (ms) => new Promise((resolve) => setTimeout(resolve, 0));
|
|
163
163
|
const P_DROPDOWN_DEFAULTS = {
|
|
164
164
|
triggerStyle: { display: "block" },
|
|
165
165
|
triggers: [],
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const config = require("./config.js");
|
|
4
|
-
const
|
|
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");
|
|
5
8
|
const pAlert = require("./p-alert.js");
|
|
6
9
|
const pAvatar = require("./p-avatar.js");
|
|
7
|
-
const pBtn = require("./p-btn.js");
|
|
8
10
|
const pCard_vue_vue_type_script_setup_true_lang = require("./chunks/p-card.js");
|
|
9
11
|
const pCheckbox_vue_vue_type_script_setup_true_lang = require("./chunks/p-checkbox.js");
|
|
10
12
|
const pChips = require("./p-chips.js");
|
|
11
|
-
const pCloseBtn = require("./p-close-btn.js");
|
|
12
13
|
const pDatePicker = require("./p-date-picker.js");
|
|
13
14
|
const pDrawer = require("./p-drawer.js");
|
|
14
|
-
const pDropdown = require("./p-dropdown.js");
|
|
15
15
|
const pDropdownSelect_vue_vue_type_script_setup_true_lang = require("./chunks/p-dropdown-select.js");
|
|
16
|
-
const vue = require("vue");
|
|
17
16
|
const pFileUpload$1 = require("./p-file-upload.js");
|
|
18
17
|
const lodashEs = require("lodash-es");
|
|
19
18
|
const useInputClasses = require("./useInputClasses.js");
|
|
@@ -61,6 +60,112 @@ const dom = require("./dom.js");
|
|
|
61
60
|
const object = require("./object.js");
|
|
62
61
|
const listKeyboardNavigation = require("./listKeyboardNavigation.js");
|
|
63
62
|
const number = require("./number.js");
|
|
63
|
+
const _hoisted_1$4 = {
|
|
64
|
+
class: "fixed bottom-6 left-1/2 flex h-12 -translate-x-1/2 select-none flex-row items-center rounded-lg bg-p-purple-60 px-2 text-sm font-medium text-white",
|
|
65
|
+
role: "alertdialog"
|
|
66
|
+
};
|
|
67
|
+
const _hoisted_2$4 = { class: "px-3" };
|
|
68
|
+
const _hoisted_3$4 = /* @__PURE__ */ vue.createElementVNode("div", { class: "mx-4 h-9 w-0.5 rounded bg-p-purple-50" }, null, -1);
|
|
69
|
+
const _hoisted_4$4 = { class: "flex" };
|
|
70
|
+
const _hoisted_5$4 = { class: "flex items-center gap-2 px-1 py-0.5" };
|
|
71
|
+
const _hoisted_6$4 = { class: "flex items-center gap-2 px-1 py-0.5" };
|
|
72
|
+
const _hoisted_7$3 = { class: "flex flex-col bg-p-purple-60" };
|
|
73
|
+
const _hoisted_8$1 = { class: "flex items-center gap-2 px-1 py-0.5" };
|
|
74
|
+
const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
|
|
75
|
+
__name: "p-action-bar",
|
|
76
|
+
props: {
|
|
77
|
+
label: {},
|
|
78
|
+
actions: {}
|
|
79
|
+
},
|
|
80
|
+
emits: ["click:dismiss", "click:action"],
|
|
81
|
+
setup(__props) {
|
|
82
|
+
return (_ctx, _cache) => {
|
|
83
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$4, [
|
|
84
|
+
vue.createVNode(pCloseBtn, {
|
|
85
|
+
variant: "dark",
|
|
86
|
+
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click:dismiss"))
|
|
87
|
+
}),
|
|
88
|
+
vue.createElementVNode("p", _hoisted_2$4, vue.toDisplayString(_ctx.label), 1),
|
|
89
|
+
_hoisted_3$4,
|
|
90
|
+
vue.createElementVNode("div", _hoisted_4$4, [
|
|
91
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.actions, (actionOrMenu) => {
|
|
92
|
+
return vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
93
|
+
key: `action-${actionOrMenu.label}`
|
|
94
|
+
}, [
|
|
95
|
+
!actionOrMenu.subActions ? (vue.openBlock(), vue.createBlock(pBtn, {
|
|
96
|
+
key: 0,
|
|
97
|
+
size: "sm",
|
|
98
|
+
type: "secondary-ghost-dark",
|
|
99
|
+
onClick: ($event) => _ctx.$emit("click:action", actionOrMenu.name)
|
|
100
|
+
}, {
|
|
101
|
+
default: vue.withCtx(() => [
|
|
102
|
+
vue.createElementVNode("div", _hoisted_5$4, [
|
|
103
|
+
actionOrMenu.icon ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(actionOrMenu.icon), {
|
|
104
|
+
key: 0,
|
|
105
|
+
class: "h-4 w-4"
|
|
106
|
+
})) : vue.createCommentVNode("", true),
|
|
107
|
+
vue.createElementVNode("div", null, vue.toDisplayString(actionOrMenu.label), 1)
|
|
108
|
+
])
|
|
109
|
+
]),
|
|
110
|
+
_: 2
|
|
111
|
+
}, 1032, ["onClick"])) : (vue.openBlock(), vue.createBlock(pDropdown, {
|
|
112
|
+
key: 1,
|
|
113
|
+
placement: "top",
|
|
114
|
+
strategy: "fixed"
|
|
115
|
+
}, {
|
|
116
|
+
popper: vue.withCtx(() => [
|
|
117
|
+
vue.createElementVNode("div", _hoisted_7$3, [
|
|
118
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(actionOrMenu.subActions, (subaction) => {
|
|
119
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
120
|
+
key: `subaction-${subaction.name}`
|
|
121
|
+
}, [
|
|
122
|
+
vue.createVNode(pBtn, {
|
|
123
|
+
size: "sm",
|
|
124
|
+
class: "w-full",
|
|
125
|
+
type: "secondary-ghost-dark",
|
|
126
|
+
onClick: ($event) => _ctx.$emit("click:action", subaction.name)
|
|
127
|
+
}, {
|
|
128
|
+
default: vue.withCtx(() => [
|
|
129
|
+
vue.createElementVNode("div", _hoisted_8$1, [
|
|
130
|
+
subaction.icon ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(subaction.icon), {
|
|
131
|
+
key: 0,
|
|
132
|
+
class: "h-4 w-4"
|
|
133
|
+
})) : vue.createCommentVNode("", true),
|
|
134
|
+
vue.createElementVNode("div", null, vue.toDisplayString(subaction.label), 1)
|
|
135
|
+
])
|
|
136
|
+
]),
|
|
137
|
+
_: 2
|
|
138
|
+
}, 1032, ["onClick"])
|
|
139
|
+
]);
|
|
140
|
+
}), 128))
|
|
141
|
+
])
|
|
142
|
+
]),
|
|
143
|
+
default: vue.withCtx(() => [
|
|
144
|
+
vue.createVNode(pBtn, {
|
|
145
|
+
size: "sm",
|
|
146
|
+
type: "secondary-ghost-dark"
|
|
147
|
+
}, {
|
|
148
|
+
default: vue.withCtx(() => [
|
|
149
|
+
vue.createElementVNode("div", _hoisted_6$4, [
|
|
150
|
+
actionOrMenu.icon ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(actionOrMenu.icon), {
|
|
151
|
+
key: 0,
|
|
152
|
+
class: "h-4 w-4"
|
|
153
|
+
})) : vue.createCommentVNode("", true),
|
|
154
|
+
vue.createElementVNode("div", null, vue.toDisplayString(actionOrMenu.label), 1)
|
|
155
|
+
])
|
|
156
|
+
]),
|
|
157
|
+
_: 2
|
|
158
|
+
}, 1024)
|
|
159
|
+
]),
|
|
160
|
+
_: 2
|
|
161
|
+
}, 1024))
|
|
162
|
+
], 64);
|
|
163
|
+
}), 128))
|
|
164
|
+
])
|
|
165
|
+
]);
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
});
|
|
64
169
|
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";
|
|
65
170
|
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";
|
|
66
171
|
const _withScopeId = (n) => (vue.pushScopeId("data-v-d07a8f64"), n = n(), vue.popScopeId(), n);
|
|
@@ -927,17 +1032,16 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
927
1032
|
}
|
|
928
1033
|
const pTableSort = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
929
1034
|
exports.config = config.config;
|
|
930
|
-
exports.
|
|
1035
|
+
exports.PBtn = pBtn;
|
|
1036
|
+
exports.PCloseBtn = pCloseBtn;
|
|
1037
|
+
exports.PDropdown = pDropdown;
|
|
931
1038
|
exports.PAlert = pAlert;
|
|
932
1039
|
exports.PAvatar = pAvatar;
|
|
933
|
-
exports.PBtn = pBtn;
|
|
934
1040
|
exports.PCard = pCard_vue_vue_type_script_setup_true_lang._sfc_main;
|
|
935
1041
|
exports.PCheckbox = pCheckbox_vue_vue_type_script_setup_true_lang._sfc_main;
|
|
936
1042
|
exports.PChips = pChips;
|
|
937
|
-
exports.PCloseBtn = pCloseBtn;
|
|
938
1043
|
exports.PDatePicker = pDatePicker;
|
|
939
1044
|
exports.PDrawer = pDrawer;
|
|
940
|
-
exports.PDropdown = pDropdown;
|
|
941
1045
|
exports.PDropdownSelect = pDropdownSelect_vue_vue_type_script_setup_true_lang._sfc_main;
|
|
942
1046
|
exports.useInputClasses = useInputClasses.useInputClasses;
|
|
943
1047
|
exports.PFilterIcon = pTableFilterIcon;
|
|
@@ -1004,6 +1108,7 @@ exports.isVisible = dom.isVisible;
|
|
|
1004
1108
|
exports.isObject = object.isObject;
|
|
1005
1109
|
exports.setupListKeyboardNavigation = listKeyboardNavigation.setupListKeyboardNavigation;
|
|
1006
1110
|
exports.toNumberOrNull = number.toNumberOrNull;
|
|
1111
|
+
exports.PActionBar = _sfc_main$4;
|
|
1007
1112
|
exports.PFileUpload = pFileUpload;
|
|
1008
1113
|
exports.PSelectList = _sfc_main$2;
|
|
1009
1114
|
exports.PTable = pTable;
|
package/dist/cjs/p-action-bar.js
CHANGED
package/dist/cjs/p-loading.js
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
const vue = require("vue");
|
|
3
3
|
const usePLoading = require("./usePLoading.js");
|
|
4
4
|
const _pluginVue_exportHelper = require("./chunks/_plugin-vue_export-helper.js");
|
|
5
|
-
const _withScopeId = (n) => (vue.pushScopeId("data-v-
|
|
5
|
+
const _withScopeId = (n) => (vue.pushScopeId("data-v-122d5e30"), n = n(), vue.popScopeId(), n);
|
|
6
6
|
const _hoisted_1 = {
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "fixed left-0 top-0 z-[120] flex w-full justify-center",
|
|
9
9
|
"aria-live": "polite",
|
|
10
10
|
"aria-busy": "true"
|
|
11
11
|
};
|
|
12
|
-
const _hoisted_2 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("div", { class: "
|
|
12
|
+
const _hoisted_2 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("div", { class: "h-8 rounded-b border-x border-b border-p-gray-30 bg-p-blue-10 px-4 pt-2 text-sm font-semibold leading-none text-p-purple-60 shadow-sm" }, " Loading... ", -1));
|
|
13
13
|
const _hoisted_3 = [
|
|
14
14
|
_hoisted_2
|
|
15
15
|
];
|
|
@@ -34,5 +34,5 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
|
-
const pLoading = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
37
|
+
const pLoading = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-122d5e30"]]);
|
|
38
38
|
module.exports = pLoading;
|
|
@@ -158,7 +158,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
158
158
|
const emit = __emit;
|
|
159
159
|
const props = __props;
|
|
160
160
|
const nextFrame = () => new Promise((resolve) => requestAnimationFrame(() => requestAnimationFrame(resolve)));
|
|
161
|
-
const nextLoop = (ms) => new Promise((resolve) => setTimeout(resolve,
|
|
161
|
+
const nextLoop = (ms) => new Promise((resolve) => setTimeout(resolve, 0));
|
|
162
162
|
const P_DROPDOWN_DEFAULTS = {
|
|
163
163
|
triggerStyle: { display: "block" },
|
|
164
164
|
triggers: [],
|
|
@@ -410,6 +410,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
410
410
|
}
|
|
411
411
|
});
|
|
412
412
|
export {
|
|
413
|
-
|
|
414
|
-
|
|
413
|
+
_sfc_main as _,
|
|
414
|
+
_imports_0 as a
|
|
415
415
|
};
|
package/dist/es/index.js
CHANGED
|
@@ -1,35 +1,34 @@
|
|
|
1
1
|
import { config } from "./config.js";
|
|
2
|
-
import {
|
|
2
|
+
import { defineComponent, openBlock, createElementBlock, createVNode, createElementVNode, toDisplayString, Fragment, renderList, createBlock, withCtx, resolveDynamicComponent, createCommentVNode, shallowRef, ref, computed, onMounted, normalizeClass, unref, withModifiers, createTextVNode, withDirectives, vShow, pushScopeId, popScopeId, useAttrs, resolveDirective, normalizeStyle, isRef, renderSlot, provide, onBeforeUnmount, watch, mergeProps, 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";
|
|
3
6
|
import { default as default2 } from "./p-alert.js";
|
|
4
7
|
import { default as default3 } from "./p-avatar.js";
|
|
5
|
-
import {
|
|
6
|
-
import { _ as _2 } from "./chunks/p-
|
|
7
|
-
import {
|
|
8
|
-
import { default as default5 } from "./p-
|
|
9
|
-
import { default as default6 } from "./p-
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { default as default9 } from "./p-dropdown.js";
|
|
13
|
-
import { _ as _imports_0$2 } from "./chunks/p-dropdown-select.js";
|
|
14
|
-
import { a } 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";
|
|
8
|
+
import { _ } from "./chunks/p-card.js";
|
|
9
|
+
import { _ as _2 } from "./chunks/p-checkbox.js";
|
|
10
|
+
import { default as default4 } from "./p-chips.js";
|
|
11
|
+
import { default as default5 } from "./p-date-picker.js";
|
|
12
|
+
import { default as default6 } from "./p-drawer.js";
|
|
13
|
+
import { a as _imports_0$2 } from "./chunks/p-dropdown-select.js";
|
|
14
|
+
import { _ as _3 } from "./chunks/p-dropdown-select.js";
|
|
16
15
|
import { formatBytes, getFileExtension } from "./p-file-upload.js";
|
|
17
16
|
import { uniq, kebabCase } from "lodash-es";
|
|
18
17
|
import { useInputClasses } from "./useInputClasses.js";
|
|
19
18
|
import { useToast } from "vue-toastification";
|
|
20
19
|
import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
|
|
21
|
-
import { default as
|
|
22
|
-
import { default as
|
|
23
|
-
import { default as
|
|
24
|
-
import { default as
|
|
25
|
-
import { default as
|
|
20
|
+
import { default as default7 } from "./p-table-filter-icon.js";
|
|
21
|
+
import { default as default8 } from "./p-info-icon.js";
|
|
22
|
+
import { default as default9 } from "./p-inline-date-picker.js";
|
|
23
|
+
import { default as default10 } from "./p-input.js";
|
|
24
|
+
import { default as default11 } from "./p-input-number.js";
|
|
26
25
|
import { _ as _4 } from "./chunks/p-input-percent.js";
|
|
27
26
|
import PInputSearch from "./p-input-search.js";
|
|
28
|
-
import { default as
|
|
29
|
-
import { default as
|
|
27
|
+
import { default as default12 } from "./p-loading.js";
|
|
28
|
+
import { default as default13 } from "./p-modal.js";
|
|
30
29
|
import { _ as _5 } from "./chunks/p-pagination.js";
|
|
31
30
|
import { _ as _6 } from "./chunks/p-pagination-info.js";
|
|
32
|
-
import { default as
|
|
31
|
+
import { default as default14 } from "./p-progress-bar.js";
|
|
33
32
|
import { _ as _7 } from "./chunks/p-ring-loader.js";
|
|
34
33
|
import { _ as _8 } from "./chunks/p-select.js";
|
|
35
34
|
import { _ as _9 } from "./chunks/p-select-btn.js";
|
|
@@ -37,22 +36,22 @@ import { SIZES } from "./p-select-list.js";
|
|
|
37
36
|
import { splitStringForHighlight } from "./text.js";
|
|
38
37
|
import { toString } from "./string.js";
|
|
39
38
|
import { useSelectList } from "./useSelectList.js";
|
|
40
|
-
import { default as
|
|
41
|
-
import { default as
|
|
39
|
+
import { default as default15 } from "./p-select-pill.js";
|
|
40
|
+
import { default as default16 } from "./p-skeleton-loader.js";
|
|
42
41
|
import PTableHeaderCell from "./p-table-header-cell.js";
|
|
43
42
|
import { colsInjectionKey, isFirstColFixedInjectionKey, isLastColFixedInjectionKey, isColsResizableInjectionKey } from "./p-table.js";
|
|
44
43
|
import { MIN_WIDTH_COL_RESIZE } from "./p-table.js";
|
|
45
44
|
import { usePTableColResize } from "./usePTableColResize.js";
|
|
46
45
|
import { _ as _10 } from "./chunks/p-table-loader.js";
|
|
47
46
|
import { SORTING_TYPES } from "./p-table-sort.js";
|
|
48
|
-
import { default as
|
|
47
|
+
import { default as default17 } from "./p-table-td.js";
|
|
49
48
|
import { _ as _11 } from "./chunks/p-tabs.js";
|
|
50
|
-
import { default as
|
|
51
|
-
import { default as
|
|
49
|
+
import { default as default18 } from "./p-textarea.js";
|
|
50
|
+
import { default as default19 } from "./p-toggle.js";
|
|
52
51
|
import { usePLoading } from "./usePLoading.js";
|
|
53
52
|
import { usePModal } from "./usePModal.js";
|
|
54
53
|
import { usePTableRowVirtualizer } from "./usePTableRowVirtualizer.js";
|
|
55
|
-
import { default as
|
|
54
|
+
import { default as default20 } from "./inputClassesMixin.js";
|
|
56
55
|
import { CURRENCY_INPUT_DEFAULTS } from "./currency.js";
|
|
57
56
|
import { getColor, getColorDeep, getScreen } from "./tailwind.js";
|
|
58
57
|
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";
|
|
@@ -61,6 +60,112 @@ import { getNextActiveElement, isElement, isVisible } from "./dom.js";
|
|
|
61
60
|
import { isObject } from "./object.js";
|
|
62
61
|
import { setupListKeyboardNavigation } from "./listKeyboardNavigation.js";
|
|
63
62
|
import { toNumberOrNull } from "./number.js";
|
|
63
|
+
const _hoisted_1$4 = {
|
|
64
|
+
class: "fixed bottom-6 left-1/2 flex h-12 -translate-x-1/2 select-none flex-row items-center rounded-lg bg-p-purple-60 px-2 text-sm font-medium text-white",
|
|
65
|
+
role: "alertdialog"
|
|
66
|
+
};
|
|
67
|
+
const _hoisted_2$4 = { class: "px-3" };
|
|
68
|
+
const _hoisted_3$4 = /* @__PURE__ */ createElementVNode("div", { class: "mx-4 h-9 w-0.5 rounded bg-p-purple-50" }, null, -1);
|
|
69
|
+
const _hoisted_4$4 = { class: "flex" };
|
|
70
|
+
const _hoisted_5$4 = { class: "flex items-center gap-2 px-1 py-0.5" };
|
|
71
|
+
const _hoisted_6$4 = { class: "flex items-center gap-2 px-1 py-0.5" };
|
|
72
|
+
const _hoisted_7$3 = { class: "flex flex-col bg-p-purple-60" };
|
|
73
|
+
const _hoisted_8$1 = { class: "flex items-center gap-2 px-1 py-0.5" };
|
|
74
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
75
|
+
__name: "p-action-bar",
|
|
76
|
+
props: {
|
|
77
|
+
label: {},
|
|
78
|
+
actions: {}
|
|
79
|
+
},
|
|
80
|
+
emits: ["click:dismiss", "click:action"],
|
|
81
|
+
setup(__props) {
|
|
82
|
+
return (_ctx, _cache) => {
|
|
83
|
+
return openBlock(), createElementBlock("div", _hoisted_1$4, [
|
|
84
|
+
createVNode(PCloseBtn, {
|
|
85
|
+
variant: "dark",
|
|
86
|
+
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click:dismiss"))
|
|
87
|
+
}),
|
|
88
|
+
createElementVNode("p", _hoisted_2$4, toDisplayString(_ctx.label), 1),
|
|
89
|
+
_hoisted_3$4,
|
|
90
|
+
createElementVNode("div", _hoisted_4$4, [
|
|
91
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.actions, (actionOrMenu) => {
|
|
92
|
+
return openBlock(), createElementBlock(Fragment, {
|
|
93
|
+
key: `action-${actionOrMenu.label}`
|
|
94
|
+
}, [
|
|
95
|
+
!actionOrMenu.subActions ? (openBlock(), createBlock(PBtn, {
|
|
96
|
+
key: 0,
|
|
97
|
+
size: "sm",
|
|
98
|
+
type: "secondary-ghost-dark",
|
|
99
|
+
onClick: ($event) => _ctx.$emit("click:action", actionOrMenu.name)
|
|
100
|
+
}, {
|
|
101
|
+
default: withCtx(() => [
|
|
102
|
+
createElementVNode("div", _hoisted_5$4, [
|
|
103
|
+
actionOrMenu.icon ? (openBlock(), createBlock(resolveDynamicComponent(actionOrMenu.icon), {
|
|
104
|
+
key: 0,
|
|
105
|
+
class: "h-4 w-4"
|
|
106
|
+
})) : createCommentVNode("", true),
|
|
107
|
+
createElementVNode("div", null, toDisplayString(actionOrMenu.label), 1)
|
|
108
|
+
])
|
|
109
|
+
]),
|
|
110
|
+
_: 2
|
|
111
|
+
}, 1032, ["onClick"])) : (openBlock(), createBlock(PDropdown, {
|
|
112
|
+
key: 1,
|
|
113
|
+
placement: "top",
|
|
114
|
+
strategy: "fixed"
|
|
115
|
+
}, {
|
|
116
|
+
popper: withCtx(() => [
|
|
117
|
+
createElementVNode("div", _hoisted_7$3, [
|
|
118
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(actionOrMenu.subActions, (subaction) => {
|
|
119
|
+
return openBlock(), createElementBlock("div", {
|
|
120
|
+
key: `subaction-${subaction.name}`
|
|
121
|
+
}, [
|
|
122
|
+
createVNode(PBtn, {
|
|
123
|
+
size: "sm",
|
|
124
|
+
class: "w-full",
|
|
125
|
+
type: "secondary-ghost-dark",
|
|
126
|
+
onClick: ($event) => _ctx.$emit("click:action", subaction.name)
|
|
127
|
+
}, {
|
|
128
|
+
default: withCtx(() => [
|
|
129
|
+
createElementVNode("div", _hoisted_8$1, [
|
|
130
|
+
subaction.icon ? (openBlock(), createBlock(resolveDynamicComponent(subaction.icon), {
|
|
131
|
+
key: 0,
|
|
132
|
+
class: "h-4 w-4"
|
|
133
|
+
})) : createCommentVNode("", true),
|
|
134
|
+
createElementVNode("div", null, toDisplayString(subaction.label), 1)
|
|
135
|
+
])
|
|
136
|
+
]),
|
|
137
|
+
_: 2
|
|
138
|
+
}, 1032, ["onClick"])
|
|
139
|
+
]);
|
|
140
|
+
}), 128))
|
|
141
|
+
])
|
|
142
|
+
]),
|
|
143
|
+
default: withCtx(() => [
|
|
144
|
+
createVNode(PBtn, {
|
|
145
|
+
size: "sm",
|
|
146
|
+
type: "secondary-ghost-dark"
|
|
147
|
+
}, {
|
|
148
|
+
default: withCtx(() => [
|
|
149
|
+
createElementVNode("div", _hoisted_6$4, [
|
|
150
|
+
actionOrMenu.icon ? (openBlock(), createBlock(resolveDynamicComponent(actionOrMenu.icon), {
|
|
151
|
+
key: 0,
|
|
152
|
+
class: "h-4 w-4"
|
|
153
|
+
})) : createCommentVNode("", true),
|
|
154
|
+
createElementVNode("div", null, toDisplayString(actionOrMenu.label), 1)
|
|
155
|
+
])
|
|
156
|
+
]),
|
|
157
|
+
_: 2
|
|
158
|
+
}, 1024)
|
|
159
|
+
]),
|
|
160
|
+
_: 2
|
|
161
|
+
}, 1024))
|
|
162
|
+
], 64);
|
|
163
|
+
}), 128))
|
|
164
|
+
])
|
|
165
|
+
]);
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
});
|
|
64
169
|
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";
|
|
65
170
|
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";
|
|
66
171
|
const _withScopeId = (n) => (pushScopeId("data-v-d07a8f64"), n = n(), popScopeId(), n);
|
|
@@ -937,45 +1042,45 @@ export {
|
|
|
937
1042
|
LABEL_REQUIRED,
|
|
938
1043
|
LABEL_SIZES,
|
|
939
1044
|
MIN_WIDTH_COL_RESIZE,
|
|
940
|
-
|
|
1045
|
+
_sfc_main$4 as PActionBar,
|
|
941
1046
|
default2 as PAlert,
|
|
942
1047
|
default3 as PAvatar,
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
1048
|
+
PBtn,
|
|
1049
|
+
_ as PCard,
|
|
1050
|
+
_2 as PCheckbox,
|
|
1051
|
+
default4 as PChips,
|
|
1052
|
+
PCloseBtn,
|
|
1053
|
+
default5 as PDatePicker,
|
|
1054
|
+
default6 as PDrawer,
|
|
1055
|
+
PDropdown,
|
|
1056
|
+
_3 as PDropdownSelect,
|
|
952
1057
|
pFileUpload as PFileUpload,
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
1058
|
+
default7 as PFilterIcon,
|
|
1059
|
+
default8 as PInfoIcon,
|
|
1060
|
+
default9 as PInlineDatePicker,
|
|
1061
|
+
default10 as PInput,
|
|
1062
|
+
default11 as PInputNumber,
|
|
958
1063
|
_4 as PInputPercent,
|
|
959
1064
|
PInputSearch,
|
|
960
|
-
|
|
961
|
-
|
|
1065
|
+
default12 as PLoading,
|
|
1066
|
+
default13 as PModal,
|
|
962
1067
|
_5 as PPagination,
|
|
963
1068
|
_6 as PPaginationInfo,
|
|
964
|
-
|
|
1069
|
+
default14 as PProgressBar,
|
|
965
1070
|
_7 as PRingLoader,
|
|
966
1071
|
_8 as PSelect,
|
|
967
1072
|
_9 as PSelectBtn,
|
|
968
1073
|
_sfc_main$2 as PSelectList,
|
|
969
|
-
|
|
970
|
-
|
|
1074
|
+
default15 as PSelectPill,
|
|
1075
|
+
default16 as PSkeletonLoader,
|
|
971
1076
|
pTable as PTable,
|
|
972
1077
|
PTableHeaderCell,
|
|
973
1078
|
_10 as PTableLoader,
|
|
974
1079
|
pTableSort as PTableSort,
|
|
975
|
-
|
|
1080
|
+
default17 as PTableTd,
|
|
976
1081
|
_11 as PTabs,
|
|
977
|
-
|
|
978
|
-
|
|
1082
|
+
default18 as PTextarea,
|
|
1083
|
+
default19 as PToggle,
|
|
979
1084
|
SELECT_ARROW,
|
|
980
1085
|
SELECT_BASE,
|
|
981
1086
|
SELECT_SIZES,
|
|
@@ -992,7 +1097,7 @@ export {
|
|
|
992
1097
|
getColorDeep,
|
|
993
1098
|
getNextActiveElement,
|
|
994
1099
|
getScreen,
|
|
995
|
-
|
|
1100
|
+
default20 as inputClassesMixin,
|
|
996
1101
|
isColsResizableInjectionKey,
|
|
997
1102
|
isElement,
|
|
998
1103
|
isFirstColFixedInjectionKey,
|
package/dist/es/p-action-bar.js
CHANGED
package/dist/es/p-loading.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { defineComponent, openBlock, createBlock, Transition, withCtx, unref, createElementBlock, createCommentVNode, pushScopeId, popScopeId, createElementVNode } from "vue";
|
|
2
2
|
import { usePLoading } from "./usePLoading.js";
|
|
3
3
|
import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
|
|
4
|
-
const _withScopeId = (n) => (pushScopeId("data-v-
|
|
4
|
+
const _withScopeId = (n) => (pushScopeId("data-v-122d5e30"), n = n(), popScopeId(), n);
|
|
5
5
|
const _hoisted_1 = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "fixed left-0 top-0 z-[120] flex w-full justify-center",
|
|
8
8
|
"aria-live": "polite",
|
|
9
9
|
"aria-busy": "true"
|
|
10
10
|
};
|
|
11
|
-
const _hoisted_2 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "
|
|
11
|
+
const _hoisted_2 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "h-8 rounded-b border-x border-b border-p-gray-30 bg-p-blue-10 px-4 pt-2 text-sm font-semibold leading-none text-p-purple-60 shadow-sm" }, " Loading... ", -1));
|
|
12
12
|
const _hoisted_3 = [
|
|
13
13
|
_hoisted_2
|
|
14
14
|
];
|
|
@@ -33,7 +33,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
|
-
const pLoading = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
36
|
+
const pLoading = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-122d5e30"]]);
|
|
37
37
|
export {
|
|
38
38
|
pLoading as default
|
|
39
39
|
};
|
|
@@ -39,6 +39,7 @@ import PTextarea from './p-textarea/p-textarea.vue';
|
|
|
39
39
|
import PToggle from './p-toggle/p-toggle.vue';
|
|
40
40
|
import { type FileUploadFile } from './p-file-upload/p-file-upload.types';
|
|
41
41
|
import { type HeaderCellAttrs, MIN_WIDTH_COL_RESIZE, type TableCol, type ThAttrs, colsInjectionKey, isColsResizableInjectionKey, isFirstColFixedInjectionKey, isLastColFixedInjectionKey } from './p-table/p-table.types';
|
|
42
|
+
import { type PActionBarAction } from './p-action-bar/p-action-bar.types';
|
|
42
43
|
import { SORTING_TYPES, type SortingType, type SortingTypeWithoutNoSorting } from './p-table-sort/p-table-sort.config';
|
|
43
44
|
import { type Size } from './p-btn/p-btn.types';
|
|
44
45
|
import { usePLoading } from './p-loading/usePLoading';
|
|
@@ -46,4 +47,4 @@ import { usePModal } from './p-modal/usePModal';
|
|
|
46
47
|
import { usePTableColResize } from './p-table/usePTableColResize';
|
|
47
48
|
import { usePTableRowVirtualizer } from './p-table/usePTableRowVirtualizer';
|
|
48
49
|
import { useSelectList } from './p-select-list/useSelectList';
|
|
49
|
-
export { PActionBar, PAlert, PAvatar, PBtn, PCard, PCheckbox, PChips, PCloseBtn, PDatePicker, PDrawer, PDropdown, PDropdownSelect, PFileUpload, PFilterIcon, PInfoIcon, PInlineDatePicker, PInput, PInputNumber, PInputPercent, PInputSearch, 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, colsInjectionKey, isColsResizableInjectionKey, isFirstColFixedInjectionKey, isLastColFixedInjectionKey, usePModal, usePTableColResize, usePTableRowVirtualizer, useSelectList, usePLoading, SortingType, SortingTypeWithoutNoSorting, Size, FileUploadFile, HeaderCellAttrs, TableCol, ThAttrs, };
|
|
50
|
+
export { PActionBar, PActionBarAction, PAlert, PAvatar, PBtn, PCard, PCheckbox, PChips, PCloseBtn, PDatePicker, PDrawer, PDropdown, PDropdownSelect, PFileUpload, PFilterIcon, PInfoIcon, PInlineDatePicker, PInput, PInputNumber, PInputPercent, PInputSearch, 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, colsInjectionKey, isColsResizableInjectionKey, isFirstColFixedInjectionKey, isLastColFixedInjectionKey, usePModal, usePTableColResize, usePTableRowVirtualizer, useSelectList, usePLoading, SortingType, SortingTypeWithoutNoSorting, Size, FileUploadFile, HeaderCellAttrs, TableCol, ThAttrs, };
|
|
@@ -1,35 +1,23 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
|
|
3
|
-
label:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}[]>;
|
|
13
|
-
required: true;
|
|
14
|
-
};
|
|
15
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
16
|
-
"click:dismiss": (...args: any[]) => void;
|
|
17
|
-
"click:action": (...args: any[]) => void;
|
|
18
|
-
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
19
|
-
label: {
|
|
20
|
-
type: StringConstructor;
|
|
21
|
-
required: true;
|
|
22
|
-
};
|
|
23
|
-
actions: {
|
|
24
|
-
type: PropType<{
|
|
25
|
-
name: string;
|
|
26
|
-
label: string;
|
|
27
|
-
icon?: string | undefined;
|
|
28
|
-
}[]>;
|
|
29
|
-
required: true;
|
|
30
|
-
};
|
|
31
|
-
}>> & {
|
|
32
|
-
"onClick:dismiss"?: ((...args: any[]) => any) | undefined;
|
|
33
|
-
"onClick:action"?: ((...args: any[]) => any) | undefined;
|
|
1
|
+
import { type PActionBarAction } from './p-action-bar.types';
|
|
2
|
+
type Props = {
|
|
3
|
+
label: string;
|
|
4
|
+
actions: PActionBarAction[];
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<Props>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
|
+
"click:dismiss": () => void;
|
|
8
|
+
"click:action": (value: string | undefined) => void;
|
|
9
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<Props>>> & {
|
|
10
|
+
"onClick:dismiss"?: (() => any) | undefined;
|
|
11
|
+
"onClick:action"?: ((value: string | undefined) => any) | undefined;
|
|
34
12
|
}, {}, {}>;
|
|
35
13
|
export default _default;
|
|
14
|
+
|
|
15
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
16
|
+
type __VLS_TypePropsToOption<T> = {
|
|
17
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
18
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
19
|
+
} : {
|
|
20
|
+
type: import('vue').PropType<T[K]>;
|
|
21
|
+
required: true;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -79,7 +79,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
79
79
|
rounded: boolean;
|
|
80
80
|
required: boolean;
|
|
81
81
|
errorMsg: string;
|
|
82
|
-
}, {}>, import("vue").ComponentOptionsMixin, ("
|
|
82
|
+
}, {}>, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
83
83
|
modelValue: {
|
|
84
84
|
type: PropType<string | number | null | undefined>;
|
|
85
85
|
default: null;
|
package/dist/squirrel/index.d.ts
CHANGED