@pequity/squirrel 8.4.5 → 8.5.0
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/README.md +29 -0
- package/dist/cjs/chunks/index.js +530 -179
- package/dist/cjs/chunks/p-alert.js +11 -16
- package/dist/cjs/chunks/p-btn.js +1 -1
- package/dist/cjs/chunks/p-input-percent.js +2 -2
- package/dist/cjs/index.js +33 -27
- package/dist/cjs/inputClasses.js +3 -3
- package/dist/cjs/p-icon.js +2 -1
- package/dist/cjs/p-loading.js +2 -2
- package/dist/cjs/p-modal.js +45 -43
- package/dist/cjs/p-table-header-cell.js +3 -2
- package/dist/cjs/p-table.js +2 -0
- package/dist/cjs/usePTableHeaderWrap.js +38 -0
- package/dist/es/chunks/index.js +530 -179
- package/dist/es/chunks/p-alert.js +11 -16
- package/dist/es/chunks/p-btn.js +2 -2
- package/dist/es/chunks/p-input-percent.js +2 -2
- package/dist/es/index.js +39 -33
- package/dist/es/inputClasses.js +4 -4
- package/dist/es/p-icon.js +2 -1
- package/dist/es/p-loading.js +2 -2
- package/dist/es/p-modal.js +45 -43
- package/dist/es/p-table-header-cell.js +3 -2
- package/dist/es/p-table.js +2 -0
- package/dist/es/usePTableHeaderWrap.js +38 -0
- package/dist/squirrel/components/p-action-bar/p-action-bar.vue.d.ts +1 -1
- package/dist/squirrel/components/p-alert/p-alert.vue.d.ts +2 -2
- package/dist/squirrel/components/p-avatar/p-avatar.vue.d.ts +1 -1
- package/dist/squirrel/components/p-btn/p-btn.vue.d.ts +3 -3
- package/dist/squirrel/components/p-card/p-card.vue.d.ts +1 -1
- package/dist/squirrel/components/p-checkbox/p-checkbox.vue.d.ts +1 -1
- package/dist/squirrel/components/p-close-btn/p-close-btn.vue.d.ts +1 -1
- package/dist/squirrel/components/p-date-picker/p-date-picker.vue.d.ts +1 -1
- package/dist/squirrel/components/p-drawer/p-drawer.vue.d.ts +12 -12
- package/dist/squirrel/components/p-dropdown-select/p-dropdown-select.vue.d.ts +1 -1
- package/dist/squirrel/components/p-file-upload/p-file-upload.vue.d.ts +1 -1
- package/dist/squirrel/components/p-icon/p-icon.types.d.ts +1 -0
- package/dist/squirrel/components/p-icon/p-icon.vue.d.ts +1 -1
- package/dist/squirrel/components/p-info-icon/p-info-icon.vue.d.ts +1 -1
- package/dist/squirrel/components/p-inline-date-picker/p-inline-date-picker.vue.d.ts +1 -1
- package/dist/squirrel/components/p-input/p-input.vue.d.ts +1 -1
- package/dist/squirrel/components/p-input-percent/p-input-percent.vue.d.ts +1 -1
- package/dist/squirrel/components/p-input-search/p-input-search.vue.d.ts +1 -1
- package/dist/squirrel/components/p-link/p-link.vue.d.ts +1 -1
- package/dist/squirrel/components/p-loading/p-loading.vue.d.ts +1 -1
- package/dist/squirrel/components/p-modal/p-modal.vue.d.ts +5 -1
- package/dist/squirrel/components/p-pagination/p-pagination.vue.d.ts +1 -1
- package/dist/squirrel/components/p-pagination-info/p-pagination-info.vue.d.ts +1 -1
- package/dist/squirrel/components/p-progress-bar/p-progress-bar.vue.d.ts +1 -1
- package/dist/squirrel/components/p-ring-loader/p-ring-loader.vue.d.ts +1 -1
- package/dist/squirrel/components/p-select/p-select.vue.d.ts +1 -1
- package/dist/squirrel/components/p-select-btn/p-select-btn.vue.d.ts +1 -1
- package/dist/squirrel/components/p-select-list/p-select-list.vue.d.ts +1 -1
- package/dist/squirrel/components/p-steps/p-steps.vue.d.ts +1 -1
- package/dist/squirrel/components/p-table/p-table.types.d.ts +1 -0
- package/dist/squirrel/components/p-table/p-table.vue.d.ts +1 -1
- package/dist/squirrel/components/p-table/usePTableHeaderWrap.d.ts +4 -0
- package/dist/squirrel/components/p-table-header-cell/p-table-filter-icon.vue.d.ts +1 -1
- package/dist/squirrel/components/p-table-header-cell/p-table-header-cell.vue.d.ts +3 -3
- package/dist/squirrel/components/p-table-loader/p-table-loader.vue.d.ts +1 -1
- package/dist/squirrel/components/p-table-sort/p-table-sort.vue.d.ts +1 -1
- package/dist/squirrel/components/p-table-td/p-table-td.vue.d.ts +1 -1
- package/dist/squirrel/components/p-tabs/p-tabs.vue.d.ts +1 -1
- package/dist/squirrel/components/p-tabs-pills/p-tabs-pills.vue.d.ts +1 -1
- package/dist/squirrel/components/p-textarea/p-textarea.vue.d.ts +1 -1
- package/dist/squirrel/components/p-toggle/p-toggle.vue.d.ts +1 -1
- package/dist/squirrel.css +22 -22
- package/package.json +23 -21
- package/squirrel/components/p-alert/p-alert.spec.js +4 -4
- package/squirrel/components/p-alert/p-alert.stories.js +19 -13
- package/squirrel/components/p-alert/p-alert.vue +9 -11
- package/squirrel/components/p-icon/p-icon.types.ts +1 -0
- package/squirrel/components/p-modal/p-modal-basic.spec.js +29 -3
- package/squirrel/components/p-modal/p-modal.vue +44 -33
- package/squirrel/components/p-table/p-table.spec.js +51 -15
- package/squirrel/components/p-table/p-table.types.ts +2 -0
- package/squirrel/components/p-table/p-table.vue +7 -4
- package/squirrel/components/p-table/usePTableHeaderWrap.spec.js +118 -0
- package/squirrel/components/p-table/usePTableHeaderWrap.ts +45 -0
- package/squirrel/components/p-table-header-cell/p-table-header-cell.spec.js +5 -1
- package/squirrel/components/p-table-header-cell/p-table-header-cell.vue +2 -1
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const vue = require("vue");
|
|
3
3
|
const pIcon_vue_vue_type_script_setup_true_lang = require("./p-icon.js");
|
|
4
|
-
const _hoisted_1 = { class: "flex" };
|
|
5
|
-
const _hoisted_2 = { class: "pr-2" };
|
|
4
|
+
const _hoisted_1 = { class: "flex items-center gap-4" };
|
|
6
5
|
const ALERT_TYPES = {
|
|
7
|
-
info: { classes: `bg-info text-on-info`, icon: "
|
|
8
|
-
warning: { classes: `bg-warning text-on-warning`, icon: "
|
|
9
|
-
error: { classes: `bg-error text-on-error`, icon: "
|
|
10
|
-
success: { classes: `bg-success text-on-success`, icon: "
|
|
6
|
+
info: { classes: `bg-info text-on-info`, icon: "material-symbols:info-outline" },
|
|
7
|
+
warning: { classes: `bg-warning text-on-warning`, icon: "warning" },
|
|
8
|
+
error: { classes: `bg-error text-on-error`, icon: "cancel-circle" },
|
|
9
|
+
success: { classes: `bg-success text-on-success`, icon: "ok-circle" }
|
|
11
10
|
};
|
|
12
11
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
13
12
|
...{
|
|
@@ -30,19 +29,15 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
30
29
|
const props = __props;
|
|
31
30
|
return (_ctx, _cache) => {
|
|
32
31
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
33
|
-
class: vue.normalizeClass(["rounded p-4 text-xs font-semibold", ALERT_TYPES[props.type].classes]),
|
|
32
|
+
class: vue.normalizeClass(["rounded-lg p-4 text-xs font-semibold", ALERT_TYPES[props.type].classes]),
|
|
34
33
|
role: "alert"
|
|
35
34
|
}, [
|
|
36
35
|
vue.createElementVNode("div", _hoisted_1, [
|
|
37
|
-
vue.
|
|
38
|
-
vue.
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
class: "-mb-0.5",
|
|
43
|
-
inline: ""
|
|
44
|
-
}, null, 8, ["icon"])
|
|
45
|
-
])
|
|
36
|
+
vue.renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
37
|
+
vue.createVNode(pIcon_vue_vue_type_script_setup_true_lang._sfc_main, {
|
|
38
|
+
icon: ALERT_TYPES[props.type].icon,
|
|
39
|
+
width: "20"
|
|
40
|
+
}, null, 8, ["icon"])
|
|
46
41
|
]),
|
|
47
42
|
vue.createElementVNode("div", null, [
|
|
48
43
|
vue.renderSlot(_ctx.$slots, "default")
|
package/dist/cjs/chunks/p-btn.js
CHANGED
|
@@ -69,7 +69,7 @@ const btnClasses = {
|
|
|
69
69
|
size: "md"
|
|
70
70
|
}
|
|
71
71
|
};
|
|
72
|
-
const btn = index.
|
|
72
|
+
const btn = index.T(btnClasses);
|
|
73
73
|
const BUTTON_TYPES = Object.keys(btnClasses.variants.type);
|
|
74
74
|
const BUTTON_NATIVE_TYPES = ["button", "submit", "reset"];
|
|
75
75
|
const LOADER_SIZES = { sm: 24, md: 30, lg: 40 };
|
|
@@ -50,9 +50,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
50
50
|
prefix: vue.withCtx(() => [
|
|
51
51
|
vue.createElementVNode("div", {
|
|
52
52
|
class: vue.normalizeClass(["absolute flex items-center", prefixClasses[__props.size]])
|
|
53
|
-
}, _cache[1] || (_cache[1] = [
|
|
53
|
+
}, [..._cache[1] || (_cache[1] = [
|
|
54
54
|
vue.createElementVNode("div", null, "%", -1)
|
|
55
|
-
]), 2)
|
|
55
|
+
])], 2)
|
|
56
56
|
]),
|
|
57
57
|
_: 1
|
|
58
58
|
}, 8, ["modelValue", "size"]);
|
package/dist/cjs/index.js
CHANGED
|
@@ -45,6 +45,7 @@ const pSkeletonLoader = require("./p-skeleton-loader.js");
|
|
|
45
45
|
const pSteps_vue_vue_type_script_setup_true_lang = require("./chunks/p-steps.js");
|
|
46
46
|
const pTable$1 = require("./p-table.js");
|
|
47
47
|
const usePTableColResize = require("./usePTableColResize.js");
|
|
48
|
+
const usePTableHeaderWrap = require("./usePTableHeaderWrap.js");
|
|
48
49
|
const pTableHeaderCell = require("./p-table-header-cell.js");
|
|
49
50
|
const pTableTd = require("./p-table-td.js");
|
|
50
51
|
const _pluginVue_exportHelper = require("./chunks/_plugin-vue_export-helper.js");
|
|
@@ -81,7 +82,7 @@ const _hoisted_6$3 = {
|
|
|
81
82
|
key: 1,
|
|
82
83
|
class: "flex flex-col items-center"
|
|
83
84
|
};
|
|
84
|
-
const _hoisted_7$
|
|
85
|
+
const _hoisted_7$1 = { class: "mt-2 text-p-purple-60" };
|
|
85
86
|
const _hoisted_8 = ["accept", "multiple", "disabled"];
|
|
86
87
|
const _hoisted_9 = { class: "max-h-48 overflow-y-auto overflow-x-hidden" };
|
|
87
88
|
const _hoisted_10 = ["title"];
|
|
@@ -305,7 +306,7 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
|
305
306
|
width: "32",
|
|
306
307
|
class: "text-primary"
|
|
307
308
|
}),
|
|
308
|
-
vue.createElementVNode("div", _hoisted_7$
|
|
309
|
+
vue.createElementVNode("div", _hoisted_7$1, "Drop " + vue.toDisplayString(fileWord.value), 1)
|
|
309
310
|
])),
|
|
310
311
|
vue.createElementVNode("input", {
|
|
311
312
|
ref_key: "fileInputRef",
|
|
@@ -370,7 +371,7 @@ const _hoisted_6$2 = {
|
|
|
370
371
|
class: "ml-auto fill-p-purple-60 pl-2",
|
|
371
372
|
src: pDropdownSelect_vue_vue_type_script_setup_true_lang._imports_0
|
|
372
373
|
};
|
|
373
|
-
const _hoisted_7
|
|
374
|
+
const _hoisted_7 = {
|
|
374
375
|
key: 1,
|
|
375
376
|
class: "ml-auto h-4 w-[26px] pl-2"
|
|
376
377
|
};
|
|
@@ -674,7 +675,7 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
674
675
|
}), 128))
|
|
675
676
|
], 8, _hoisted_5$2)
|
|
676
677
|
]),
|
|
677
|
-
vue.unref(isSelected)(vue.unref(getValue)(row.index)) ? (vue.openBlock(), vue.createElementBlock("img", _hoisted_6$2)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_7
|
|
678
|
+
vue.unref(isSelected)(vue.unref(getValue)(row.index)) ? (vue.openBlock(), vue.createElementBlock("img", _hoisted_6$2)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_7))
|
|
678
679
|
], 2)
|
|
679
680
|
], 14, _hoisted_4$2)), [
|
|
680
681
|
[_directive_close_popper, __props.closePopperOnSelect && !__props.multiple]
|
|
@@ -699,15 +700,14 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
699
700
|
}
|
|
700
701
|
});
|
|
701
702
|
const _hoisted_1$1 = ["data-col-id"];
|
|
702
|
-
const _hoisted_2$1 =
|
|
703
|
-
const _hoisted_3$1 =
|
|
704
|
-
const _hoisted_4$1 = {
|
|
703
|
+
const _hoisted_2$1 = ["onMousedown", "onDblclick"];
|
|
704
|
+
const _hoisted_3$1 = {
|
|
705
705
|
key: 0,
|
|
706
706
|
class: "min-w-[80px] bg-gradient-to-r from-white via-p-gray-10 to-p-gray-10"
|
|
707
707
|
};
|
|
708
|
-
const
|
|
709
|
-
const
|
|
710
|
-
const
|
|
708
|
+
const _hoisted_4$1 = { key: 0 };
|
|
709
|
+
const _hoisted_5$1 = { class: "py-2" };
|
|
710
|
+
const _hoisted_6$1 = { key: 1 };
|
|
711
711
|
const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
712
712
|
...{ name: "PTable" },
|
|
713
713
|
__name: "p-table",
|
|
@@ -745,6 +745,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
745
745
|
vue.computed(() => props.colsResizable)
|
|
746
746
|
);
|
|
747
747
|
const scrollWrapper = vue.ref(null);
|
|
748
|
+
const theadRef = vue.useTemplateRef("theadRef");
|
|
748
749
|
const ths = vue.ref([]);
|
|
749
750
|
const {
|
|
750
751
|
isColResizing,
|
|
@@ -758,6 +759,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
758
759
|
enabled: vue.computed(() => props.colsResizable),
|
|
759
760
|
ths
|
|
760
761
|
});
|
|
762
|
+
const { hasWrap } = usePTableHeaderWrap.usePTableHeaderWrap(theadRef);
|
|
761
763
|
const tbodyElement = vue.ref(null);
|
|
762
764
|
const updateThsRefs = (el, index2) => {
|
|
763
765
|
if (el instanceof Element) {
|
|
@@ -844,7 +846,10 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
844
846
|
{ "first-col-fixed": _ctx.isFirstColFixed }
|
|
845
847
|
]
|
|
846
848
|
}, vue.toHandlers(_ctx.colsResizable ? { mousemove: vue.unref(colResize) } : {}, true)), [
|
|
847
|
-
vue.createElementVNode("thead",
|
|
849
|
+
vue.createElementVNode("thead", {
|
|
850
|
+
ref_key: "theadRef",
|
|
851
|
+
ref: theadRef
|
|
852
|
+
}, [
|
|
848
853
|
vue.createElementVNode("tr", null, [
|
|
849
854
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(props.cols, (col, i) => {
|
|
850
855
|
return vue.openBlock(), vue.createElementBlock("th", vue.mergeProps({
|
|
@@ -860,7 +865,9 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
860
865
|
class: vue.normalizeClass(thDivClasses(i)),
|
|
861
866
|
style: vue.normalizeStyle(bgColorStyle(col))
|
|
862
867
|
}, [
|
|
863
|
-
vue.createElementVNode("div",
|
|
868
|
+
vue.createElementVNode("div", {
|
|
869
|
+
class: vue.normalizeClass(["flex", { "h-10": vue.unref(hasWrap) }])
|
|
870
|
+
}, [
|
|
864
871
|
vue.renderSlot(_ctx.$slots, `prepend-header-cell-${vue.unref(lodashEs.kebabCase)(col.name)}`, { col }, void 0, true),
|
|
865
872
|
vue.createVNode(pTableHeaderCell, vue.mergeProps({
|
|
866
873
|
text: col.title,
|
|
@@ -872,14 +879,14 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
872
879
|
}, { ref_for: true }, col.headerCellAttrs, {
|
|
873
880
|
onClickFilterIcon: ($event) => _ctx.$emit("click-filter-icon", $event, col)
|
|
874
881
|
}), null, 16, ["text", "filter-active", "show-filter-icon", "tooltip-text", "class", "text-color", "onClickFilterIcon"])
|
|
875
|
-
]),
|
|
882
|
+
], 2),
|
|
876
883
|
_ctx.colsResizable && i !== 0 && !(i === _ctx.cols.length - 1 && _ctx.isLastColFixed) ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
877
884
|
key: 0,
|
|
878
|
-
class: vue.normalizeClass(["absolute
|
|
885
|
+
class: vue.normalizeClass(["absolute right-0 top-1/2 z-110 h-5 w-2 -translate-y-1/2 cursor-col-resize after:absolute after:bottom-0 after:z-110 after:block after:h-full after:w-2 after:cursor-col-resize after:border-r-2 after:border-dashed after:border-p-gray-30", i === _ctx.cols.length - 1 ? "after:right-0.5" : "after:right-0"]),
|
|
879
886
|
"data-resize-handle": "",
|
|
880
887
|
onMousedown: ($event) => vue.unref(colResizeStart)($event, i),
|
|
881
888
|
onDblclick: ($event) => vue.unref(colResizeFitToData)(i)
|
|
882
|
-
}, null, 42,
|
|
889
|
+
}, null, 42, _hoisted_2$1)) : vue.createCommentVNode("", true)
|
|
883
890
|
], 6),
|
|
884
891
|
_ctx.subheader ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
885
892
|
key: 0,
|
|
@@ -889,14 +896,14 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
889
896
|
], 2)) : vue.createCommentVNode("", true)
|
|
890
897
|
], 16, _hoisted_1$1);
|
|
891
898
|
}), 128)),
|
|
892
|
-
_ctx.colsResizable && !_ctx.isLastColFixed ? (vue.openBlock(), vue.createElementBlock("th",
|
|
899
|
+
_ctx.colsResizable && !_ctx.isLastColFixed ? (vue.openBlock(), vue.createElementBlock("th", _hoisted_3$1)) : vue.createCommentVNode("", true)
|
|
893
900
|
])
|
|
894
|
-
]),
|
|
901
|
+
], 512),
|
|
895
902
|
vue.createElementVNode("tbody", {
|
|
896
903
|
ref_key: "tbodyElement",
|
|
897
904
|
ref: tbodyElement
|
|
898
905
|
}, [
|
|
899
|
-
_ctx.virtualizer.paddingTop > 0 ? (vue.openBlock(), vue.createElementBlock("tr",
|
|
906
|
+
_ctx.virtualizer.paddingTop > 0 ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_4$1, [
|
|
900
907
|
vue.createElementVNode("td", {
|
|
901
908
|
style: vue.normalizeStyle({ height: `${_ctx.virtualizer.paddingTop}px` })
|
|
902
909
|
}, null, 4)
|
|
@@ -915,7 +922,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
915
922
|
default: vue.withCtx(() => [
|
|
916
923
|
vue.renderSlot(_ctx.$slots, "cell", vue.mergeProps({ ref_for: true }, { col, colIndex, rowData, rowIndex, cellData: rowData[col.name] }), () => [
|
|
917
924
|
vue.renderSlot(_ctx.$slots, `cell-${vue.unref(lodashEs.kebabCase)(col.name)}`, vue.mergeProps({ ref_for: true }, { col, rowData, rowIndex, cellData: rowData[col.name] }), () => [
|
|
918
|
-
vue.createElementVNode("div",
|
|
925
|
+
vue.createElementVNode("div", _hoisted_5$1, vue.toDisplayString(rowData[col.name]), 1)
|
|
919
926
|
], true)
|
|
920
927
|
], true)
|
|
921
928
|
]),
|
|
@@ -926,7 +933,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
926
933
|
]);
|
|
927
934
|
}), 128))
|
|
928
935
|
], true),
|
|
929
|
-
_ctx.virtualizer.paddingBottom > 0 ? (vue.openBlock(), vue.createElementBlock("tr",
|
|
936
|
+
_ctx.virtualizer.paddingBottom > 0 ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_6$1, [
|
|
930
937
|
vue.createElementVNode("td", {
|
|
931
938
|
style: vue.normalizeStyle({ height: `${_ctx.virtualizer.paddingBottom}px` })
|
|
932
939
|
}, null, 4)
|
|
@@ -937,7 +944,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
937
944
|
};
|
|
938
945
|
}
|
|
939
946
|
});
|
|
940
|
-
const pTable = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
947
|
+
const pTable = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main$1, [["__scopeId", "data-v-8af637b9"]]);
|
|
941
948
|
const _imports_0 = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_1019_75838)'%3e%3cpath%20d='M11.6533%203.37331L8.47329%200.18664C8.41131%200.124154%208.33758%200.074558%208.25634%200.0407122C8.1751%200.00686641%208.08796%20-0.0105591%207.99995%20-0.0105591C7.91194%20-0.0105591%207.82481%200.00686641%207.74357%200.0407122C7.66233%200.074558%207.58859%200.124154%207.52662%200.18664L4.34662%203.37331C4.253%203.46615%204.18902%203.58468%204.16277%203.71388C4.13651%203.84309%204.14916%203.97719%204.19911%204.09921C4.24906%204.22123%204.33407%204.3257%204.44339%204.39941C4.55271%204.47312%204.68144%204.51275%204.81329%204.51331H6.81329C6.83571%204.51054%206.85846%204.51235%206.88016%204.51865C6.90186%204.52494%206.92205%204.53559%206.93951%204.54993C6.95697%204.56427%206.97133%204.58201%206.98172%204.60207C6.99211%204.62214%206.99832%204.6441%206.99995%204.66664V14.9933C6.99995%2015.2585%207.10531%2015.5129%207.29285%2015.7004C7.48038%2015.888%207.73474%2015.9933%207.99995%2015.9933C8.26517%2015.9933%208.51952%2015.888%208.70706%2015.7004C8.8946%2015.5129%208.99995%2015.2585%208.99995%2014.9933V4.66664C8.99995%204.62244%209.01751%204.58004%209.04877%204.54879C9.08002%204.51753%209.12242%204.49997%209.16662%204.49997H11.1666C11.2985%204.49942%2011.4272%204.45978%2011.5365%204.38608C11.6458%204.31237%2011.7308%204.2079%2011.7808%204.08587C11.8307%203.96385%2011.8434%203.82976%2011.8171%203.70055C11.7909%203.57134%2011.7269%203.45282%2011.6333%203.35997L11.6533%203.37331Z'%20fill='%23424E6E'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_1019_75838'%3e%3crect%20width='16'%20height='16'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e";
|
|
942
949
|
const _imports_1 = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_1019_80096)'%3e%3cpath%20d='M11.6533%203.37331L8.47329%200.18664C8.41131%200.124154%208.33758%200.074558%208.25634%200.0407122C8.1751%200.00686641%208.08796%20-0.0105591%207.99995%20-0.0105591C7.91194%20-0.0105591%207.82481%200.00686641%207.74357%200.0407122C7.66233%200.074558%207.58859%200.124154%207.52662%200.18664L4.34662%203.37331C4.253%203.46615%204.18902%203.58468%204.16277%203.71388C4.13651%203.84309%204.14916%203.97719%204.19911%204.09921C4.24906%204.22123%204.33407%204.3257%204.44339%204.39941C4.55271%204.47312%204.68144%204.51275%204.81329%204.51331H6.81329C6.83571%204.51054%206.85846%204.51235%206.88016%204.51865C6.90186%204.52494%206.92205%204.53559%206.93951%204.54993C6.95697%204.56427%206.97133%204.58201%206.98172%204.60207C6.99211%204.62214%206.99832%204.6441%206.99995%204.66664V14.9933C6.99995%2015.2585%207.10531%2015.5129%207.29285%2015.7004C7.48038%2015.888%207.73474%2015.9933%207.99995%2015.9933C8.26517%2015.9933%208.51952%2015.888%208.70706%2015.7004C8.8946%2015.5129%208.99995%2015.2585%208.99995%2014.9933V4.66664C8.99995%204.62244%209.01751%204.58004%209.04877%204.54879C9.08002%204.51753%209.12242%204.49997%209.16662%204.49997H11.1666C11.2985%204.49942%2011.4272%204.45978%2011.5365%204.38608C11.6458%204.31237%2011.7308%204.2079%2011.7808%204.08587C11.8307%203.96385%2011.8434%203.82976%2011.8171%203.70055C11.7909%203.57134%2011.7269%203.45282%2011.6333%203.35997L11.6533%203.37331Z'%20fill='%23323CEB'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_1019_80096'%3e%3crect%20width='16'%20height='16'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e";
|
|
943
950
|
const _imports_2 = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_1019_75842)'%3e%3cpath%20d='M11.8%2011.8933C11.75%2011.7716%2011.665%2011.6674%2011.5559%2011.5938C11.4467%2011.5203%2011.3183%2011.4807%2011.1866%2011.48H9.18664C9.16473%2011.4828%209.14248%2011.4812%209.12119%2011.4753C9.0999%2011.4694%209.07999%2011.4594%209.06262%2011.4457C9.04525%2011.4321%209.03077%2011.4151%209.02001%2011.3958C9.00926%2011.3765%209.00245%2011.3553%208.99997%2011.3333V1C8.99997%200.734784%208.89462%200.48043%208.70708%200.292893C8.51954%200.105357%208.26519%200%207.99997%200C7.73476%200%207.4804%200.105357%207.29287%200.292893C7.10533%200.48043%206.99997%200.734784%206.99997%201V11.3333C6.99997%2011.3775%206.98241%2011.4199%206.95116%2011.4512C6.9199%2011.4824%206.87751%2011.5%206.83331%2011.5H4.83331C4.70146%2011.5006%204.57273%2011.5402%204.46341%2011.6139C4.35409%2011.6876%204.26908%2011.7921%204.21913%2011.9141C4.16918%2012.0361%204.15653%2012.1702%204.18279%2012.2994C4.20904%2012.4286%204.27302%2012.5472%204.36664%2012.64L7.54664%2015.8267C7.60861%2015.8892%207.68235%2015.9387%207.76359%2015.9726C7.84483%2016.0064%207.93196%2016.0239%208.01997%2016.0239C8.10798%2016.0239%208.19512%2016.0064%208.27636%2015.9726C8.3576%2015.9387%208.43133%2015.8892%208.49331%2015.8267L11.6733%2012.64C11.7677%2012.5431%2011.8303%2012.4198%2011.853%2012.2864C11.8756%2012.153%2011.8571%2012.0159%2011.8%2011.8933Z'%20fill='%23424E6E'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_1019_75842'%3e%3crect%20width='16'%20height='16'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e";
|
|
@@ -1086,12 +1093,11 @@ exports.toNumberOrNull = number.toNumberOrNull;
|
|
|
1086
1093
|
exports.isObject = object.isObject;
|
|
1087
1094
|
exports.createPagingRange = pagination.createPagingRange;
|
|
1088
1095
|
exports.sanitizeUrl = sanitization.sanitizeUrl;
|
|
1089
|
-
exports.cn = index.
|
|
1090
|
-
exports.cnBase = index.
|
|
1091
|
-
exports.createTV = index.
|
|
1092
|
-
exports.defaultConfig = index.
|
|
1093
|
-
exports.tv = index.
|
|
1094
|
-
exports.voidEmpty = index.x;
|
|
1096
|
+
exports.cn = index.i;
|
|
1097
|
+
exports.cnBase = index.u;
|
|
1098
|
+
exports.createTV = index.C;
|
|
1099
|
+
exports.defaultConfig = index.Q;
|
|
1100
|
+
exports.tv = index.T;
|
|
1095
1101
|
exports.PFileUpload = _sfc_main$3;
|
|
1096
1102
|
exports.PSelectList = _sfc_main$2;
|
|
1097
1103
|
exports.PTable = pTable;
|
package/dist/cjs/inputClasses.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const index = require("./chunks/index.js");
|
|
4
|
-
const inputClasses = index.
|
|
4
|
+
const inputClasses = index.T({
|
|
5
5
|
slots: {
|
|
6
6
|
input: "w-full rounded border-0 bg-surface text-night ring-1 ring-inset ring-p-gray-30 placeholder:text-p-gray-40 hover:ring-primary focus:outline-none focus:ring-2 focus:ring-primary disabled:cursor-default disabled:bg-p-blue-10 disabled:ring-p-gray-30 disabled:hover:ring-p-gray-30",
|
|
7
7
|
label: "mb-1 block font-medium",
|
|
@@ -92,7 +92,7 @@ const inputClasses = index.ce({
|
|
|
92
92
|
size: "md"
|
|
93
93
|
}
|
|
94
94
|
});
|
|
95
|
-
const textareaClasses = index.
|
|
95
|
+
const textareaClasses = index.T({
|
|
96
96
|
extend: inputClasses,
|
|
97
97
|
slots: {
|
|
98
98
|
input: "resize-y overflow-auto"
|
|
@@ -111,7 +111,7 @@ const textareaClasses = index.ce({
|
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
});
|
|
114
|
-
const selectClasses = index.
|
|
114
|
+
const selectClasses = index.T({
|
|
115
115
|
extend: inputClasses,
|
|
116
116
|
slots: {
|
|
117
117
|
input: "squirrel-bg-chevron-down appearance-none truncate bg-no-repeat"
|
package/dist/cjs/p-icon.js
CHANGED
|
@@ -36,6 +36,7 @@ const P_ICON_ALIASES = {
|
|
|
36
36
|
upload: "tdesign:upload",
|
|
37
37
|
info: "streamline:information-circle",
|
|
38
38
|
help: "ph:question",
|
|
39
|
-
search: "streamline:magnifying-glass-solid"
|
|
39
|
+
search: "streamline:magnifying-glass-solid",
|
|
40
|
+
warning: "ri:error-warning-line"
|
|
40
41
|
};
|
|
41
42
|
exports.P_ICON_ALIASES = P_ICON_ALIASES;
|
package/dist/cjs/p-loading.js
CHANGED
|
@@ -10,7 +10,7 @@ const _hoisted_1$1 = {
|
|
|
10
10
|
viewBox: "0 0 24 24"
|
|
11
11
|
};
|
|
12
12
|
function render(_ctx, _cache) {
|
|
13
|
-
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$1, _cache[0] || (_cache[0] = [
|
|
13
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$1, [..._cache[0] || (_cache[0] = [
|
|
14
14
|
vue.createElementVNode("path", {
|
|
15
15
|
fill: "currentColor",
|
|
16
16
|
d: "M12 1a11 11 0 1 0 11 11A11 11 0 0 0 12 1m0 19a8 8 0 1 1 8-8 8 8 0 0 1-8 8",
|
|
@@ -28,7 +28,7 @@ function render(_ctx, _cache) {
|
|
|
28
28
|
values: "0 12 12;360 12 12"
|
|
29
29
|
})
|
|
30
30
|
], -1)
|
|
31
|
-
]));
|
|
31
|
+
])]);
|
|
32
32
|
}
|
|
33
33
|
const PLoadingSpinner = { render };
|
|
34
34
|
const _hoisted_1 = {
|
package/dist/cjs/p-modal.js
CHANGED
|
@@ -72,7 +72,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
72
72
|
*/
|
|
73
73
|
modalBaseClass: {
|
|
74
74
|
type: [String, Object, Array],
|
|
75
|
-
default: "pm relative flex flex-col rounded-2xl
|
|
75
|
+
default: "pm relative flex flex-col rounded-2xl cursor-default bg-surface shadow-xl"
|
|
76
76
|
},
|
|
77
77
|
/**
|
|
78
78
|
* Additional CSS classes for the modal content.
|
|
@@ -190,7 +190,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
190
190
|
emits: ["before-open", "opening", "opened", "before-close", "closing", "closed", "update:modelValue", "click:overlay"],
|
|
191
191
|
setup(__props, { emit: __emit }) {
|
|
192
192
|
vue.useCssVars((_ctx) => ({
|
|
193
|
-
"
|
|
193
|
+
"a8364442": __props.maxWidth
|
|
194
194
|
}));
|
|
195
195
|
let animatingZIndex = 0;
|
|
196
196
|
const emit = __emit;
|
|
@@ -390,49 +390,51 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
390
390
|
vue.createElementVNode("div", {
|
|
391
391
|
ref: "pm",
|
|
392
392
|
"data-pm-id": id.value,
|
|
393
|
-
class: vue.normalizeClass([__props.modalBaseClass, __props.modalClass]),
|
|
393
|
+
class: vue.normalizeClass([__props.modalBaseClass, __props.modalClass, { "pb-6": !_ctx.$slots["modal-wrapper"] }]),
|
|
394
394
|
style: vue.normalizeStyle(__props.modalStyle)
|
|
395
395
|
}, [
|
|
396
|
-
vue.renderSlot(_ctx.$slots, "
|
|
397
|
-
vue.
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
vue.
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
396
|
+
vue.renderSlot(_ctx.$slots, "modal-wrapper", {}, () => [
|
|
397
|
+
vue.renderSlot(_ctx.$slots, "title-wrapper", {}, () => [
|
|
398
|
+
vue.createElementVNode("div", _hoisted_4, [
|
|
399
|
+
__props.title ? (vue.openBlock(), vue.createElementBlock("h3", {
|
|
400
|
+
key: 0,
|
|
401
|
+
id: `${id.value}-title`,
|
|
402
|
+
class: "mr-auto pt-4 text-xl font-semibold"
|
|
403
|
+
}, vue.toDisplayString(__props.title), 9, _hoisted_5)) : vue.createCommentVNode("", true),
|
|
404
|
+
vue.createElementVNode("div", _hoisted_6, [
|
|
405
|
+
vue.createVNode(pCloseBtn, {
|
|
406
|
+
disabled: __props.disabled,
|
|
407
|
+
class: vue.normalizeClass({ invisible: !__props.enableClose }),
|
|
408
|
+
"aria-label": __props.closeLabel,
|
|
409
|
+
onClick: vue.withModifiers(close, ["prevent"])
|
|
410
|
+
}, null, 8, ["disabled", "class", "aria-label"])
|
|
411
|
+
])
|
|
410
412
|
])
|
|
411
|
-
])
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
],
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
vue.
|
|
435
|
-
]
|
|
413
|
+
], true),
|
|
414
|
+
__props.errorMsg ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7, [
|
|
415
|
+
vue.createVNode(pAlert_vue_vue_type_script_setup_true_lang._sfc_main, { type: "error" }, {
|
|
416
|
+
default: vue.withCtx(() => [
|
|
417
|
+
vue.createTextVNode(vue.toDisplayString(__props.errorMsg), 1)
|
|
418
|
+
]),
|
|
419
|
+
_: 1
|
|
420
|
+
})
|
|
421
|
+
])) : vue.createCommentVNode("", true),
|
|
422
|
+
vue.renderSlot(_ctx.$slots, "content-wrapper", {}, () => [
|
|
423
|
+
vue.createElementVNode("div", {
|
|
424
|
+
id: `${id.value}-content`,
|
|
425
|
+
class: vue.normalizeClass([
|
|
426
|
+
"relative grow overflow-y-auto overflow-x-hidden px-8",
|
|
427
|
+
{ "pointer-events-none opacity-50": __props.disabled }
|
|
428
|
+
])
|
|
429
|
+
}, [
|
|
430
|
+
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
431
|
+
], 10, _hoisted_8)
|
|
432
|
+
], true),
|
|
433
|
+
vue.renderSlot(_ctx.$slots, "footer-wrapper", {}, () => [
|
|
434
|
+
_ctx.$slots.footer ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_9, [
|
|
435
|
+
vue.renderSlot(_ctx.$slots, "footer", {}, void 0, true)
|
|
436
|
+
])) : vue.createCommentVNode("", true)
|
|
437
|
+
], true)
|
|
436
438
|
], true)
|
|
437
439
|
], 14, _hoisted_3)
|
|
438
440
|
], 46, _hoisted_2), [
|
|
@@ -445,5 +447,5 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
445
447
|
};
|
|
446
448
|
}
|
|
447
449
|
});
|
|
448
|
-
const pModal = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
450
|
+
const pModal = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-5c370dbc"]]);
|
|
449
451
|
module.exports = pModal;
|
|
@@ -3,7 +3,7 @@ const pInfoIcon_vue_vue_type_script_setup_true_lang = require("./chunks/p-info-i
|
|
|
3
3
|
const pTableFilterIcon = require("./p-table-filter-icon.js");
|
|
4
4
|
const vue = require("vue");
|
|
5
5
|
const _pluginVue_exportHelper = require("./chunks/_plugin-vue_export-helper.js");
|
|
6
|
-
const DEFAULT_CLASSES = `text-xs leading-5 font-semibold
|
|
6
|
+
const DEFAULT_CLASSES = `text-xs leading-5 font-semibold line-clamp-2 break-words hyphens-auto whitespace-normal max-h-10 shrink`;
|
|
7
7
|
const _sfc_main = vue.defineComponent({
|
|
8
8
|
name: "PTableHeaderCell",
|
|
9
9
|
components: {
|
|
@@ -98,7 +98,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
98
98
|
vue.createElementVNode("div", {
|
|
99
99
|
class: vue.normalizeClass([_ctx.DEFAULT_CLASSES, _ctx.textClass, _ctx.textColorClass, { "mr-auto": !_ctx.tooltipText }]),
|
|
100
100
|
style: vue.normalizeStyle(_ctx.style),
|
|
101
|
-
title: _ctx.text
|
|
101
|
+
title: _ctx.text,
|
|
102
|
+
"data-p-table-header-text": ""
|
|
102
103
|
}, vue.toDisplayString(_ctx.text), 15, _hoisted_2),
|
|
103
104
|
_ctx.tooltipText ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3, [
|
|
104
105
|
_ctx.tooltipText ? (vue.openBlock(), vue.createBlock(_component_PInfoIcon, {
|
package/dist/cjs/p-table.js
CHANGED
|
@@ -5,6 +5,8 @@ const isFirstColFixedInjectionKey = Symbol("isFirstColFixed");
|
|
|
5
5
|
const isLastColFixedInjectionKey = Symbol("isLastColFixed");
|
|
6
6
|
const isColsResizableInjectionKey = Symbol("isColsResizable");
|
|
7
7
|
const MIN_WIDTH_COL_RESIZE = 80;
|
|
8
|
+
const HEADER_CELL_ONE_LINE_HEIGHT = 20;
|
|
9
|
+
exports.HEADER_CELL_ONE_LINE_HEIGHT = HEADER_CELL_ONE_LINE_HEIGHT;
|
|
8
10
|
exports.MIN_WIDTH_COL_RESIZE = MIN_WIDTH_COL_RESIZE;
|
|
9
11
|
exports.colsInjectionKey = colsInjectionKey;
|
|
10
12
|
exports.isColsResizableInjectionKey = isColsResizableInjectionKey;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const pTable = require("./p-table.js");
|
|
4
|
+
const vue = require("vue");
|
|
5
|
+
const usePTableHeaderWrap = (theadRef) => {
|
|
6
|
+
let headerObserver = null;
|
|
7
|
+
const hasWrap = vue.ref(false);
|
|
8
|
+
const setupObserver = () => {
|
|
9
|
+
if (!theadRef.value) return;
|
|
10
|
+
headerObserver = new ResizeObserver(() => {
|
|
11
|
+
if (theadRef.value) {
|
|
12
|
+
const textDivs = theadRef.value.querySelectorAll("[data-p-table-header-text]");
|
|
13
|
+
for (const div of textDivs) {
|
|
14
|
+
if (div.offsetHeight > pTable.HEADER_CELL_ONE_LINE_HEIGHT) {
|
|
15
|
+
hasWrap.value = true;
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
hasWrap.value = false;
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
headerObserver.observe(theadRef.value);
|
|
23
|
+
};
|
|
24
|
+
const cleanupObserver = () => {
|
|
25
|
+
if (headerObserver) {
|
|
26
|
+
headerObserver.disconnect();
|
|
27
|
+
headerObserver = null;
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
vue.onMounted(() => {
|
|
31
|
+
setupObserver();
|
|
32
|
+
});
|
|
33
|
+
vue.onBeforeUnmount(() => {
|
|
34
|
+
cleanupObserver();
|
|
35
|
+
});
|
|
36
|
+
return { hasWrap };
|
|
37
|
+
};
|
|
38
|
+
exports.usePTableHeaderWrap = usePTableHeaderWrap;
|