@pequity/squirrel 8.4.4 → 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 +31 -1
- package/dist/cjs/chunks/index.js +530 -179
- package/dist/cjs/chunks/p-alert.js +14 -16
- package/dist/cjs/chunks/p-avatar.js +16 -0
- package/dist/cjs/chunks/p-btn.js +4 -1
- package/dist/cjs/chunks/p-card.js +4 -0
- package/dist/cjs/chunks/p-dropdown-select.js +34 -0
- package/dist/cjs/chunks/p-input-number.js +32 -0
- package/dist/cjs/chunks/p-input-percent.js +15 -4
- package/dist/cjs/chunks/p-input.js +28 -0
- package/dist/cjs/chunks/p-pagination-info.js +9 -5
- package/dist/cjs/chunks/p-pagination.js +23 -13
- package/dist/cjs/chunks/p-select-btn.js +2 -1
- package/dist/cjs/chunks/p-select.js +33 -0
- package/dist/cjs/chunks/p-table-loader.js +20 -0
- package/dist/cjs/chunks/p-tabs.js +12 -0
- package/dist/cjs/chunks/p-textarea.js +20 -0
- package/dist/cjs/index.js +72 -29
- package/dist/cjs/inputClasses.js +3 -3
- package/dist/cjs/p-checkbox.js +8 -1
- package/dist/cjs/p-chips.js +17 -1
- package/dist/cjs/p-close-btn.js +6 -1
- package/dist/cjs/p-drawer.js +90 -2
- package/dist/cjs/p-dropdown.js +2 -1
- package/dist/cjs/p-icon.js +2 -1
- package/dist/cjs/p-input-search.js +13 -1
- package/dist/cjs/p-loading.js +3 -3
- package/dist/cjs/p-modal.js +125 -43
- package/dist/cjs/p-select-pill.js +36 -2
- package/dist/cjs/p-skeleton-loader.js +17 -1
- package/dist/cjs/p-table-filter-icon.js +4 -1
- package/dist/cjs/p-table-header-cell.js +32 -2
- package/dist/cjs/p-table-td.js +1 -1
- package/dist/cjs/p-table.js +2 -0
- package/dist/cjs/p-toggle.js +22 -1
- package/dist/cjs/usePTableHeaderWrap.js +38 -0
- package/dist/es/chunks/index.js +530 -179
- package/dist/es/chunks/p-alert.js +14 -16
- package/dist/es/chunks/p-avatar.js +16 -0
- package/dist/es/chunks/p-btn.js +5 -2
- package/dist/es/chunks/p-card.js +4 -0
- package/dist/es/chunks/p-dropdown-select.js +34 -0
- package/dist/es/chunks/p-input-number.js +32 -0
- package/dist/es/chunks/p-input-percent.js +15 -4
- package/dist/es/chunks/p-input.js +28 -0
- package/dist/es/chunks/p-pagination-info.js +9 -5
- package/dist/es/chunks/p-pagination.js +24 -14
- package/dist/es/chunks/p-select-btn.js +2 -1
- package/dist/es/chunks/p-select.js +33 -0
- package/dist/es/chunks/p-table-loader.js +20 -0
- package/dist/es/chunks/p-tabs.js +12 -0
- package/dist/es/chunks/p-textarea.js +20 -0
- package/dist/es/index.js +77 -34
- package/dist/es/inputClasses.js +4 -4
- package/dist/es/p-checkbox.js +8 -1
- package/dist/es/p-chips.js +17 -1
- package/dist/es/p-close-btn.js +6 -1
- package/dist/es/p-drawer.js +90 -2
- package/dist/es/p-dropdown.js +2 -1
- package/dist/es/p-icon.js +2 -1
- package/dist/es/p-input-search.js +13 -1
- package/dist/es/p-loading.js +3 -3
- package/dist/es/p-modal.js +125 -43
- package/dist/es/p-select-pill.js +36 -2
- package/dist/es/p-skeleton-loader.js +17 -1
- package/dist/es/p-table-filter-icon.js +4 -1
- package/dist/es/p-table-header-cell.js +32 -2
- package/dist/es/p-table-td.js +1 -1
- package/dist/es/p-table.js +2 -0
- package/dist/es/p-toggle.js +22 -1
- package/dist/es/usePTableHeaderWrap.js +38 -0
- package/dist/squirrel/components/p-action-bar/p-action-bar.vue.d.ts +15 -3
- package/dist/squirrel/components/p-alert/p-alert.vue.d.ts +18 -5
- package/dist/squirrel/components/p-avatar/p-avatar.vue.d.ts +36 -1
- package/dist/squirrel/components/p-btn/p-btn.vue.d.ts +21 -5
- package/dist/squirrel/components/p-card/p-card.vue.d.ts +21 -8
- package/dist/squirrel/components/p-checkbox/p-checkbox.vue.d.ts +26 -8
- package/dist/squirrel/components/p-chips/p-chips.vue.d.ts +24 -0
- package/dist/squirrel/components/p-close-btn/p-close-btn.vue.d.ts +14 -1
- package/dist/squirrel/components/p-date-picker/p-date-picker.vue.d.ts +17 -1
- package/dist/squirrel/components/p-drawer/p-drawer.vue.d.ts +153 -15
- package/dist/squirrel/components/p-dropdown/p-dropdown.vue.d.ts +11 -2
- package/dist/squirrel/components/p-dropdown-select/p-dropdown-select.vue.d.ts +70 -2
- package/dist/squirrel/components/p-file-upload/p-file-upload.vue.d.ts +71 -7
- package/dist/squirrel/components/p-icon/p-icon.types.d.ts +1 -0
- package/dist/squirrel/components/p-icon/p-icon.vue.d.ts +5 -1
- package/dist/squirrel/components/p-info-icon/p-info-icon.vue.d.ts +12 -5
- package/dist/squirrel/components/p-inline-date-picker/p-inline-date-picker.vue.d.ts +28 -8
- package/dist/squirrel/components/p-input/p-input.vue.d.ts +74 -9
- package/dist/squirrel/components/p-input-number/p-input-number.vue.d.ts +83 -12
- package/dist/squirrel/components/p-input-percent/p-input-percent.vue.d.ts +23 -3
- package/dist/squirrel/components/p-input-search/p-input-search.vue.d.ts +25 -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 +190 -16
- package/dist/squirrel/components/p-pagination/p-pagination.vue.d.ts +23 -13
- package/dist/squirrel/components/p-pagination-info/p-pagination-info.vue.d.ts +17 -9
- package/dist/squirrel/components/p-progress-bar/p-progress-bar.vue.d.ts +21 -1
- package/dist/squirrel/components/p-ring-loader/p-ring-loader.vue.d.ts +11 -1
- package/dist/squirrel/components/p-select/p-select.vue.d.ts +77 -7
- package/dist/squirrel/components/p-select-btn/p-select-btn.vue.d.ts +68 -11
- package/dist/squirrel/components/p-select-list/p-select-list.vue.d.ts +2 -2
- package/dist/squirrel/components/p-select-pill/p-select-pill.vue.d.ts +72 -2
- package/dist/squirrel/components/p-skeleton-loader/p-skeleton-loader.vue.d.ts +40 -0
- package/dist/squirrel/components/p-steps/p-steps.vue.d.ts +13 -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 +33 -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 +7 -1
- package/dist/squirrel/components/p-table-header-cell/p-table-header-cell.vue.d.ts +59 -4
- package/dist/squirrel/components/p-table-loader/p-table-loader.vue.d.ts +41 -1
- package/dist/squirrel/components/p-table-sort/p-table-sort.vue.d.ts +13 -3
- package/dist/squirrel/components/p-table-td/p-table-td.vue.d.ts +13 -1
- package/dist/squirrel/components/p-tabs/p-tabs.vue.d.ts +34 -3
- package/dist/squirrel/components/p-tabs-pills/p-tabs-pills.vue.d.ts +23 -1
- package/dist/squirrel/components/p-textarea/p-textarea.vue.d.ts +53 -9
- package/dist/squirrel/components/p-toggle/p-toggle.vue.d.ts +51 -4
- package/dist/squirrel.css +68 -68
- package/package.json +24 -22
- package/squirrel/components/p-action-bar/p-action-bar.stories.js +5 -5
- package/squirrel/components/p-action-bar/p-action-bar.vue +30 -3
- 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 +33 -11
- package/squirrel/components/p-avatar/p-avatar.vue +28 -0
- package/squirrel/components/p-btn/p-btn.vue +35 -0
- package/squirrel/components/p-card/p-card.vue +24 -1
- package/squirrel/components/p-checkbox/p-checkbox.vue +23 -1
- package/squirrel/components/p-chips/p-chips.vue +24 -0
- package/squirrel/components/p-close-btn/p-close-btn.vue +15 -0
- package/squirrel/components/p-date-picker/p-date-picker.vue +23 -1
- package/squirrel/components/p-drawer/p-drawer.vue +95 -0
- package/squirrel/components/p-dropdown/p-dropdown.vue +12 -1
- package/squirrel/components/p-dropdown-select/p-dropdown-select.vue +41 -0
- package/squirrel/components/p-file-upload/p-file-upload.vue +58 -3
- package/squirrel/components/p-icon/p-icon.types.ts +1 -0
- package/squirrel/components/p-icon/p-icon.vue +16 -0
- package/squirrel/components/p-info-icon/p-info-icon.vue +19 -0
- package/squirrel/components/p-inline-date-picker/p-inline-date-picker.vue +32 -0
- package/squirrel/components/p-input/p-input.vue +61 -1
- package/squirrel/components/p-input-number/p-input-number.vue +78 -1
- package/squirrel/components/p-input-percent/p-input-percent.vue +27 -3
- package/squirrel/components/p-input-search/p-input-search.vue +30 -2
- package/squirrel/components/p-link/p-link.vue +13 -0
- package/squirrel/components/p-loading/p-loading.vue +9 -2
- package/squirrel/components/p-modal/p-modal-basic.spec.js +29 -3
- package/squirrel/components/p-modal/p-modal.vue +182 -35
- package/squirrel/components/p-pagination/p-pagination.vue +28 -8
- package/squirrel/components/p-pagination-info/p-pagination-info.vue +16 -4
- package/squirrel/components/p-progress-bar/p-progress-bar.vue +31 -4
- package/squirrel/components/p-ring-loader/p-ring-loader.vue +17 -0
- package/squirrel/components/p-select/p-select.vue +50 -1
- package/squirrel/components/p-select-btn/p-select-btn.vue +90 -2
- package/squirrel/components/p-select-list/p-select-list.vue +7 -0
- package/squirrel/components/p-select-pill/p-select-pill.vue +52 -2
- package/squirrel/components/p-skeleton-loader/p-skeleton-loader.vue +24 -0
- package/squirrel/components/p-steps/p-steps.vue +25 -0
- 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 +46 -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-filter-icon.vue +9 -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 +38 -1
- package/squirrel/components/p-table-loader/p-table-loader.vue +28 -0
- package/squirrel/components/p-table-sort/p-table-sort.vue +19 -1
- package/squirrel/components/p-table-td/p-table-td.vue +20 -0
- package/squirrel/components/p-tabs/p-tabs.stories.js +2 -2
- package/squirrel/components/p-tabs/p-tabs.vue +33 -1
- package/squirrel/components/p-tabs-pills/p-tabs-pills.vue +33 -0
- package/squirrel/components/p-textarea/p-textarea.vue +43 -1
- package/squirrel/components/p-toggle/p-toggle.vue +44 -1
- package/squirrel/assets/pagination-left-icon.svg +0 -5
- package/squirrel/assets/pagination-right-icon.svg +0 -5
|
@@ -7,6 +7,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
7
7
|
},
|
|
8
8
|
__name: "p-table-filter-icon",
|
|
9
9
|
props: {
|
|
10
|
+
/**
|
|
11
|
+
* Whether the filter icon is active (filtered state).
|
|
12
|
+
*/
|
|
10
13
|
active: {
|
|
11
14
|
type: Boolean,
|
|
12
15
|
default: false
|
|
@@ -20,7 +23,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
20
23
|
};
|
|
21
24
|
}
|
|
22
25
|
});
|
|
23
|
-
const PTableFilterIcon = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
26
|
+
const PTableFilterIcon = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-5c047926"]]);
|
|
24
27
|
export {
|
|
25
28
|
PTableFilterIcon as default
|
|
26
29
|
};
|
|
@@ -2,7 +2,7 @@ import { _ as _sfc_main$1 } from "./chunks/p-info-icon.js";
|
|
|
2
2
|
import PTableFilterIcon from "./p-table-filter-icon.js";
|
|
3
3
|
import { defineComponent, resolveComponent, createElementBlock, openBlock, createElementVNode, createCommentVNode, createVNode, normalizeStyle, normalizeClass, toDisplayString, createBlock } from "vue";
|
|
4
4
|
import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
|
|
5
|
-
const DEFAULT_CLASSES = `text-xs leading-5 font-semibold
|
|
5
|
+
const DEFAULT_CLASSES = `text-xs leading-5 font-semibold line-clamp-2 break-words hyphens-auto whitespace-normal max-h-10 shrink`;
|
|
6
6
|
const _sfc_main = defineComponent({
|
|
7
7
|
name: "PTableHeaderCell",
|
|
8
8
|
components: {
|
|
@@ -10,31 +10,60 @@ const _sfc_main = defineComponent({
|
|
|
10
10
|
PInfoIcon: _sfc_main$1
|
|
11
11
|
},
|
|
12
12
|
props: {
|
|
13
|
+
/**
|
|
14
|
+
* The text content to display in the header cell.
|
|
15
|
+
* Also used as the title attribute for accessibility.
|
|
16
|
+
*/
|
|
13
17
|
text: {
|
|
14
18
|
type: String,
|
|
15
19
|
default: ""
|
|
16
20
|
},
|
|
21
|
+
/**
|
|
22
|
+
* CSS classes to apply to the text element.
|
|
23
|
+
* Can be a string, object, or array for flexible styling.
|
|
24
|
+
*/
|
|
17
25
|
textClass: {
|
|
18
26
|
type: [String, Object, Array],
|
|
19
27
|
default: "text-left"
|
|
20
28
|
},
|
|
29
|
+
/**
|
|
30
|
+
* Whether the filter icon is in an active state.
|
|
31
|
+
* Controls the visual appearance of the filter icon and text color.
|
|
32
|
+
*/
|
|
21
33
|
filterActive: {
|
|
22
34
|
type: Boolean,
|
|
23
35
|
default: false
|
|
24
36
|
},
|
|
37
|
+
/**
|
|
38
|
+
* Whether to show the filter icon.
|
|
39
|
+
* When false, the filter icon is hidden regardless of other states.
|
|
40
|
+
*/
|
|
25
41
|
showFilterIcon: {
|
|
26
42
|
type: Boolean,
|
|
27
43
|
default: false
|
|
28
44
|
},
|
|
45
|
+
/**
|
|
46
|
+
* Tooltip text to display when hovering over the info icon.
|
|
47
|
+
* When provided, shows an info icon with the tooltip content.
|
|
48
|
+
*/
|
|
29
49
|
tooltipText: {
|
|
30
50
|
type: String,
|
|
31
51
|
default: ""
|
|
32
52
|
},
|
|
53
|
+
/**
|
|
54
|
+
* Custom text color to apply to the header text.
|
|
55
|
+
* Overrides the default text color when provided.
|
|
56
|
+
*/
|
|
33
57
|
textColor: {
|
|
34
58
|
type: String,
|
|
35
59
|
default: ""
|
|
36
60
|
}
|
|
37
61
|
},
|
|
62
|
+
/**
|
|
63
|
+
* Emitted when the filter icon is clicked.
|
|
64
|
+
* @param {Event} event - The click event
|
|
65
|
+
* @param {boolean} filterActive - The current filter active state
|
|
66
|
+
*/
|
|
38
67
|
emits: ["click-filter-icon"],
|
|
39
68
|
data() {
|
|
40
69
|
return {
|
|
@@ -68,7 +97,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
68
97
|
createElementVNode("div", {
|
|
69
98
|
class: normalizeClass([_ctx.DEFAULT_CLASSES, _ctx.textClass, _ctx.textColorClass, { "mr-auto": !_ctx.tooltipText }]),
|
|
70
99
|
style: normalizeStyle(_ctx.style),
|
|
71
|
-
title: _ctx.text
|
|
100
|
+
title: _ctx.text,
|
|
101
|
+
"data-p-table-header-text": ""
|
|
72
102
|
}, toDisplayString(_ctx.text), 15, _hoisted_2),
|
|
73
103
|
_ctx.tooltipText ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
74
104
|
_ctx.tooltipText ? (openBlock(), createBlock(_component_PInfoIcon, {
|
package/dist/es/p-table-td.js
CHANGED
|
@@ -81,7 +81,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
83
|
});
|
|
84
|
-
const PTableTd = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
84
|
+
const PTableTd = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-9a0c95c7"]]);
|
|
85
85
|
export {
|
|
86
86
|
PTableTd as default
|
|
87
87
|
};
|
package/dist/es/p-table.js
CHANGED
|
@@ -3,7 +3,9 @@ const isFirstColFixedInjectionKey = Symbol("isFirstColFixed");
|
|
|
3
3
|
const isLastColFixedInjectionKey = Symbol("isLastColFixed");
|
|
4
4
|
const isColsResizableInjectionKey = Symbol("isColsResizable");
|
|
5
5
|
const MIN_WIDTH_COL_RESIZE = 80;
|
|
6
|
+
const HEADER_CELL_ONE_LINE_HEIGHT = 20;
|
|
6
7
|
export {
|
|
8
|
+
HEADER_CELL_ONE_LINE_HEIGHT,
|
|
7
9
|
MIN_WIDTH_COL_RESIZE,
|
|
8
10
|
colsInjectionKey,
|
|
9
11
|
isColsResizableInjectionKey,
|
package/dist/es/p-toggle.js
CHANGED
|
@@ -34,22 +34,43 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
34
34
|
},
|
|
35
35
|
__name: "p-toggle",
|
|
36
36
|
props: {
|
|
37
|
+
/**
|
|
38
|
+
* The current toggle state (v-model).
|
|
39
|
+
* Supports two-way binding for form inputs.
|
|
40
|
+
*/
|
|
37
41
|
modelValue: {
|
|
38
42
|
type: Boolean,
|
|
39
43
|
default: false
|
|
40
44
|
},
|
|
45
|
+
/**
|
|
46
|
+
* Text label for the toggle switch.
|
|
47
|
+
* If not provided, you can use the label slot instead.
|
|
48
|
+
*/
|
|
41
49
|
label: {
|
|
42
50
|
type: String,
|
|
43
51
|
default: ""
|
|
44
52
|
},
|
|
53
|
+
/**
|
|
54
|
+
* Error message to display below the toggle.
|
|
55
|
+
* When provided, the toggle will show error styling.
|
|
56
|
+
*/
|
|
45
57
|
errorMsg: {
|
|
46
58
|
type: String,
|
|
47
59
|
default: ""
|
|
48
60
|
},
|
|
61
|
+
/**
|
|
62
|
+
* Whether the toggle is required.
|
|
63
|
+
* Adds required attribute and visual indicator.
|
|
64
|
+
*/
|
|
49
65
|
required: {
|
|
50
66
|
type: Boolean,
|
|
51
67
|
default: false
|
|
52
68
|
},
|
|
69
|
+
/**
|
|
70
|
+
* The size of the toggle switch.
|
|
71
|
+
* Valid values: 'sm', 'md', 'lg'
|
|
72
|
+
* @values sm, md, lg
|
|
73
|
+
*/
|
|
53
74
|
size: {
|
|
54
75
|
type: String,
|
|
55
76
|
default: "md",
|
|
@@ -122,7 +143,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
122
143
|
};
|
|
123
144
|
}
|
|
124
145
|
});
|
|
125
|
-
const pToggle = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
146
|
+
const pToggle = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-af725f56"]]);
|
|
126
147
|
export {
|
|
127
148
|
pToggle as default
|
|
128
149
|
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { HEADER_CELL_ONE_LINE_HEIGHT } from "./p-table.js";
|
|
2
|
+
import { ref, onMounted, onBeforeUnmount } from "vue";
|
|
3
|
+
const usePTableHeaderWrap = (theadRef) => {
|
|
4
|
+
let headerObserver = null;
|
|
5
|
+
const hasWrap = ref(false);
|
|
6
|
+
const setupObserver = () => {
|
|
7
|
+
if (!theadRef.value) return;
|
|
8
|
+
headerObserver = new ResizeObserver(() => {
|
|
9
|
+
if (theadRef.value) {
|
|
10
|
+
const textDivs = theadRef.value.querySelectorAll("[data-p-table-header-text]");
|
|
11
|
+
for (const div of textDivs) {
|
|
12
|
+
if (div.offsetHeight > HEADER_CELL_ONE_LINE_HEIGHT) {
|
|
13
|
+
hasWrap.value = true;
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
hasWrap.value = false;
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
headerObserver.observe(theadRef.value);
|
|
21
|
+
};
|
|
22
|
+
const cleanupObserver = () => {
|
|
23
|
+
if (headerObserver) {
|
|
24
|
+
headerObserver.disconnect();
|
|
25
|
+
headerObserver = null;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
onMounted(() => {
|
|
29
|
+
setupObserver();
|
|
30
|
+
});
|
|
31
|
+
onBeforeUnmount(() => {
|
|
32
|
+
cleanupObserver();
|
|
33
|
+
});
|
|
34
|
+
return { hasWrap };
|
|
35
|
+
};
|
|
36
|
+
export {
|
|
37
|
+
usePTableHeaderWrap
|
|
38
|
+
};
|
|
@@ -1,14 +1,26 @@
|
|
|
1
1
|
import { type PActionBarAction } from './p-action-bar.types';
|
|
2
2
|
type Props = {
|
|
3
|
+
/**
|
|
4
|
+
* Controls visibility of the action bar.
|
|
5
|
+
* When true, the action bar is displayed at the bottom of the screen.
|
|
6
|
+
*/
|
|
3
7
|
show: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* The main text displayed in the action bar.
|
|
10
|
+
* Provides context for the available actions.
|
|
11
|
+
*/
|
|
4
12
|
label: string;
|
|
13
|
+
/**
|
|
14
|
+
* Array of action objects to be rendered as buttons or dropdowns.
|
|
15
|
+
* Each action can have an icon, label, and optional sub-actions.
|
|
16
|
+
*/
|
|
5
17
|
actions: PActionBarAction[];
|
|
6
18
|
};
|
|
7
|
-
declare const _default: import("vue").DefineComponent<Props,
|
|
19
|
+
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8
20
|
"click:dismiss": () => any;
|
|
9
|
-
"click:action": (
|
|
21
|
+
"click:action": (name: string | undefined) => any;
|
|
10
22
|
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
11
23
|
"onClick:dismiss"?: (() => any) | undefined;
|
|
12
|
-
"onClick:action"?: ((
|
|
24
|
+
"onClick:action"?: ((name: string | undefined) => any) | undefined;
|
|
13
25
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
26
|
export default _default;
|
|
@@ -18,23 +18,36 @@ declare const ALERT_TYPES: {
|
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
20
|
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
21
|
+
/**
|
|
22
|
+
* The type of the alert which determines its appearance and icon
|
|
23
|
+
*/
|
|
21
24
|
type: {
|
|
22
25
|
type: PropType<keyof typeof ALERT_TYPES>;
|
|
23
26
|
default: string;
|
|
24
27
|
validator(value: keyof typeof ALERT_TYPES): boolean;
|
|
25
28
|
};
|
|
26
|
-
}>,
|
|
29
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
30
|
+
/**
|
|
31
|
+
* The type of the alert which determines its appearance and icon
|
|
32
|
+
*/
|
|
27
33
|
type: {
|
|
28
34
|
type: PropType<keyof typeof ALERT_TYPES>;
|
|
29
35
|
default: string;
|
|
30
36
|
validator(value: keyof typeof ALERT_TYPES): boolean;
|
|
31
37
|
};
|
|
32
38
|
}>> & Readonly<{}>, {
|
|
33
|
-
type: "info" | "
|
|
39
|
+
type: "info" | "warning" | "error" | "success";
|
|
34
40
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
41
|
+
/**
|
|
42
|
+
* Custom icon slot - use this to override the default alert type icon.
|
|
43
|
+
* If not provided, a default icon will be shown based on the alert type.
|
|
44
|
+
*/
|
|
45
|
+
icon?: () => unknown;
|
|
46
|
+
/**
|
|
47
|
+
* Default slot - the main content of the alert message.
|
|
48
|
+
* This should contain the text or HTML to display in the alert.
|
|
49
|
+
*/
|
|
50
|
+
default?: () => unknown;
|
|
38
51
|
}>;
|
|
39
52
|
export default _default;
|
|
40
53
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -1,46 +1,81 @@
|
|
|
1
1
|
import { type PropType } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Available avatar shapes
|
|
4
|
+
*/
|
|
2
5
|
declare const SHAPES: readonly ["rectangle", "circle"];
|
|
3
6
|
type Shape = (typeof SHAPES)[number];
|
|
4
7
|
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
8
|
+
/**
|
|
9
|
+
* The shape of the avatar
|
|
10
|
+
*/
|
|
5
11
|
shape: {
|
|
6
12
|
type: PropType<Shape>;
|
|
7
13
|
default: string;
|
|
8
14
|
validator: (value: Shape) => boolean;
|
|
9
15
|
};
|
|
16
|
+
/**
|
|
17
|
+
* URL of the image to display
|
|
18
|
+
*/
|
|
10
19
|
imageSrc: {
|
|
11
20
|
type: StringConstructor;
|
|
12
21
|
default: string;
|
|
13
22
|
};
|
|
23
|
+
/**
|
|
24
|
+
* Text to display when image is not available
|
|
25
|
+
* Also used as the alt text for the image
|
|
26
|
+
*/
|
|
14
27
|
label: {
|
|
15
28
|
type: StringConstructor;
|
|
16
29
|
required: true;
|
|
17
30
|
};
|
|
31
|
+
/**
|
|
32
|
+
* Additional CSS classes to apply to the image
|
|
33
|
+
*/
|
|
18
34
|
imageClass: {
|
|
19
35
|
type: StringConstructor;
|
|
20
36
|
default: string;
|
|
21
37
|
};
|
|
38
|
+
/**
|
|
39
|
+
* Additional CSS classes to apply to the label container
|
|
40
|
+
*/
|
|
22
41
|
labelClass: {
|
|
23
42
|
type: StringConstructor;
|
|
24
43
|
default: string;
|
|
25
44
|
};
|
|
26
|
-
}>,
|
|
45
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
46
|
+
/**
|
|
47
|
+
* The shape of the avatar
|
|
48
|
+
*/
|
|
27
49
|
shape: {
|
|
28
50
|
type: PropType<Shape>;
|
|
29
51
|
default: string;
|
|
30
52
|
validator: (value: Shape) => boolean;
|
|
31
53
|
};
|
|
54
|
+
/**
|
|
55
|
+
* URL of the image to display
|
|
56
|
+
*/
|
|
32
57
|
imageSrc: {
|
|
33
58
|
type: StringConstructor;
|
|
34
59
|
default: string;
|
|
35
60
|
};
|
|
61
|
+
/**
|
|
62
|
+
* Text to display when image is not available
|
|
63
|
+
* Also used as the alt text for the image
|
|
64
|
+
*/
|
|
36
65
|
label: {
|
|
37
66
|
type: StringConstructor;
|
|
38
67
|
required: true;
|
|
39
68
|
};
|
|
69
|
+
/**
|
|
70
|
+
* Additional CSS classes to apply to the image
|
|
71
|
+
*/
|
|
40
72
|
imageClass: {
|
|
41
73
|
type: StringConstructor;
|
|
42
74
|
default: string;
|
|
43
75
|
};
|
|
76
|
+
/**
|
|
77
|
+
* Additional CSS classes to apply to the label container
|
|
78
|
+
*/
|
|
44
79
|
labelClass: {
|
|
45
80
|
type: StringConstructor;
|
|
46
81
|
default: string;
|
|
@@ -3,6 +3,9 @@ import PIcon from '../p-icon/p-icon.vue';
|
|
|
3
3
|
import { type VariantProps } from 'tailwind-variants';
|
|
4
4
|
import { type PropType } from 'vue';
|
|
5
5
|
import { type RouteLocationRaw } from 'vue-router';
|
|
6
|
+
/**
|
|
7
|
+
* Type for the icon prop
|
|
8
|
+
*/
|
|
6
9
|
type Icon = InstanceType<typeof PIcon>['$props']['icon'];
|
|
7
10
|
declare const btn: import("tailwind-variants").TVReturnType<{
|
|
8
11
|
readonly type: {
|
|
@@ -212,6 +215,9 @@ declare const btn: import("tailwind-variants").TVReturnType<{
|
|
|
212
215
|
readonly loader: "absolute bottom-0 left-0 right-0 top-0 flex items-center justify-center font-medium";
|
|
213
216
|
readonly icon: "shrink-0";
|
|
214
217
|
}, undefined, unknown, unknown, undefined>>;
|
|
218
|
+
/**
|
|
219
|
+
* Native button types (HTML attribute values)
|
|
220
|
+
*/
|
|
215
221
|
declare const BUTTON_NATIVE_TYPES: readonly ["button", "submit", "reset"];
|
|
216
222
|
type ButtonNativeType = (typeof BUTTON_NATIVE_TYPES)[number];
|
|
217
223
|
type ButtonType = NonNullable<VariantProps<typeof btn>['type']>;
|
|
@@ -269,11 +275,14 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<import("vu
|
|
|
269
275
|
type: PropType<Icon>;
|
|
270
276
|
default: string;
|
|
271
277
|
};
|
|
278
|
+
/**
|
|
279
|
+
* The icon to display on the right side of the button
|
|
280
|
+
*/
|
|
272
281
|
iconRight: {
|
|
273
282
|
type: PropType<Icon>;
|
|
274
283
|
default: string;
|
|
275
284
|
};
|
|
276
|
-
}>,
|
|
285
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
277
286
|
/**
|
|
278
287
|
* The button style e.g primary, secondary, primary-outline, secondary-outline, error, success, primary-link
|
|
279
288
|
*/
|
|
@@ -327,21 +336,28 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<import("vu
|
|
|
327
336
|
type: PropType<Icon>;
|
|
328
337
|
default: string;
|
|
329
338
|
};
|
|
339
|
+
/**
|
|
340
|
+
* The icon to display on the right side of the button
|
|
341
|
+
*/
|
|
330
342
|
iconRight: {
|
|
331
343
|
type: PropType<Icon>;
|
|
332
344
|
default: string;
|
|
333
345
|
};
|
|
334
346
|
}>> & Readonly<{}>, {
|
|
335
|
-
icon: "delete" | "edit" | "send" | "settings" | "empty" | "chevron-left" | "chevron-right" | "chevron-up" | "chevron-down" | "ok-circle" | "cancel-circle" | "ok" | "cancel" | "ok-bold" | "cancel-bold" | "archive" | "lock" | "drag-horizontal" | "email" | "location" | "calendar" | "save" | "copy" | "plus" | "add" | "more" | "filters" | "bar-chart" | "list" | "formula" | "refresh" | "download" | "upload" | "info" | "help" | "search" | (string & {});
|
|
336
|
-
type: ButtonType;
|
|
347
|
+
icon: "delete" | "edit" | "send" | "settings" | "empty" | "chevron-left" | "chevron-right" | "chevron-up" | "chevron-down" | "ok-circle" | "cancel-circle" | "ok" | "cancel" | "ok-bold" | "cancel-bold" | "archive" | "lock" | "drag-horizontal" | "email" | "location" | "calendar" | "save" | "copy" | "plus" | "add" | "more" | "filters" | "bar-chart" | "list" | "formula" | "refresh" | "download" | "upload" | "info" | "help" | "search" | "warning" | (string & {});
|
|
337
348
|
size: "sm" | "md" | "lg";
|
|
349
|
+
type: ButtonType;
|
|
338
350
|
nativeType: "button" | "submit" | "reset";
|
|
339
351
|
loading: boolean;
|
|
340
352
|
selected: boolean;
|
|
341
353
|
to: string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric;
|
|
342
|
-
iconRight: "delete" | "edit" | "send" | "settings" | "empty" | "chevron-left" | "chevron-right" | "chevron-up" | "chevron-down" | "ok-circle" | "cancel-circle" | "ok" | "cancel" | "ok-bold" | "cancel-bold" | "archive" | "lock" | "drag-horizontal" | "email" | "location" | "calendar" | "save" | "copy" | "plus" | "add" | "more" | "filters" | "bar-chart" | "list" | "formula" | "refresh" | "download" | "upload" | "info" | "help" | "search" | (string & {});
|
|
354
|
+
iconRight: "delete" | "edit" | "send" | "settings" | "empty" | "chevron-left" | "chevron-right" | "chevron-up" | "chevron-down" | "ok-circle" | "cancel-circle" | "ok" | "cancel" | "ok-bold" | "cancel-bold" | "archive" | "lock" | "drag-horizontal" | "email" | "location" | "calendar" | "save" | "copy" | "plus" | "add" | "more" | "filters" | "bar-chart" | "list" | "formula" | "refresh" | "download" | "upload" | "info" | "help" | "search" | "warning" | (string & {});
|
|
343
355
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
|
|
344
|
-
|
|
356
|
+
/**
|
|
357
|
+
* Default slot - the content of the button.
|
|
358
|
+
* This should contain the text or HTML to display inside the button.
|
|
359
|
+
*/
|
|
360
|
+
default?: () => void;
|
|
345
361
|
}>;
|
|
346
362
|
export default _default;
|
|
347
363
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -1,17 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
type __VLS_Slots = {
|
|
2
|
+
/**
|
|
3
|
+
* Title slot - custom content for the card title.
|
|
4
|
+
* Receives the titleClass prop for consistent styling.
|
|
5
|
+
*/
|
|
6
|
+
title?: (props: {
|
|
7
|
+
titleClass: string;
|
|
8
|
+
}) => void;
|
|
9
|
+
/**
|
|
10
|
+
* Default slot - the main content of the card.
|
|
11
|
+
*/
|
|
12
|
+
default?: () => void;
|
|
8
13
|
};
|
|
9
14
|
declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
15
|
+
/**
|
|
16
|
+
* The title of the card - displayed at the top
|
|
17
|
+
* If not provided, you can use the title slot instead
|
|
18
|
+
*/
|
|
10
19
|
title: {
|
|
11
20
|
type: StringConstructor;
|
|
12
21
|
default: string;
|
|
13
22
|
};
|
|
14
|
-
}>,
|
|
23
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
24
|
+
/**
|
|
25
|
+
* The title of the card - displayed at the top
|
|
26
|
+
* If not provided, you can use the title slot instead
|
|
27
|
+
*/
|
|
15
28
|
title: {
|
|
16
29
|
type: StringConstructor;
|
|
17
30
|
default: string;
|
|
@@ -1,31 +1,49 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
label?: (
|
|
1
|
+
type __VLS_Slots = {
|
|
2
|
+
/**
|
|
3
|
+
* Content displayed before the checkbox
|
|
4
|
+
*/
|
|
5
|
+
'label-before'?: () => void;
|
|
6
|
+
/**
|
|
7
|
+
* Custom label content - overrides the label prop
|
|
8
|
+
*/
|
|
9
|
+
label?: () => void;
|
|
6
10
|
};
|
|
7
11
|
declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
12
|
+
/**
|
|
13
|
+
* The checked state of the checkbox (v-model)
|
|
14
|
+
*/
|
|
8
15
|
modelValue: {
|
|
9
16
|
type: BooleanConstructor;
|
|
10
17
|
default: boolean;
|
|
11
18
|
};
|
|
19
|
+
/**
|
|
20
|
+
* Text label for the checkbox
|
|
21
|
+
* Ignored if using the label slot
|
|
22
|
+
*/
|
|
12
23
|
label: {
|
|
13
24
|
type: StringConstructor;
|
|
14
25
|
default: string;
|
|
15
26
|
};
|
|
16
|
-
}>,
|
|
17
|
-
"update:modelValue": (
|
|
27
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
28
|
+
"update:modelValue": (val: boolean) => any;
|
|
18
29
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
30
|
+
/**
|
|
31
|
+
* The checked state of the checkbox (v-model)
|
|
32
|
+
*/
|
|
19
33
|
modelValue: {
|
|
20
34
|
type: BooleanConstructor;
|
|
21
35
|
default: boolean;
|
|
22
36
|
};
|
|
37
|
+
/**
|
|
38
|
+
* Text label for the checkbox
|
|
39
|
+
* Ignored if using the label slot
|
|
40
|
+
*/
|
|
23
41
|
label: {
|
|
24
42
|
type: StringConstructor;
|
|
25
43
|
default: string;
|
|
26
44
|
};
|
|
27
45
|
}>> & Readonly<{
|
|
28
|
-
"onUpdate:modelValue"?: ((
|
|
46
|
+
"onUpdate:modelValue"?: ((val: boolean) => any) | undefined;
|
|
29
47
|
}>, {
|
|
30
48
|
label: string;
|
|
31
49
|
modelValue: boolean;
|
|
@@ -1,8 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A chips component that displays a horizontal list of items with overflow handling.
|
|
3
|
+
* Automatically calculates how many chips can fit in the available space and shows
|
|
4
|
+
* an overflow indicator when there are more items than can be displayed.
|
|
5
|
+
* Supports custom item text properties and before/after slot content.
|
|
6
|
+
*
|
|
7
|
+
* @displayName PChips
|
|
8
|
+
*/
|
|
1
9
|
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
10
|
+
/**
|
|
11
|
+
* Array of items to display as chips.
|
|
12
|
+
* Can be strings or objects with a text property.
|
|
13
|
+
*/
|
|
2
14
|
items: {
|
|
3
15
|
type: ArrayConstructor;
|
|
4
16
|
default: () => never[];
|
|
5
17
|
};
|
|
18
|
+
/**
|
|
19
|
+
* Property name to use as the item display text.
|
|
20
|
+
* Used when items are objects to extract the text value.
|
|
21
|
+
*/
|
|
6
22
|
itemText: {
|
|
7
23
|
type: StringConstructor;
|
|
8
24
|
default: string;
|
|
@@ -13,10 +29,18 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
13
29
|
resizeFilterChips(): void;
|
|
14
30
|
getItemText<T>(item: T): "" | (T & string) | (T & object)[keyof T];
|
|
15
31
|
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click:chip" | "click:overflow")[], "click:chip" | "click:overflow", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
32
|
+
/**
|
|
33
|
+
* Array of items to display as chips.
|
|
34
|
+
* Can be strings or objects with a text property.
|
|
35
|
+
*/
|
|
16
36
|
items: {
|
|
17
37
|
type: ArrayConstructor;
|
|
18
38
|
default: () => never[];
|
|
19
39
|
};
|
|
40
|
+
/**
|
|
41
|
+
* Property name to use as the item display text.
|
|
42
|
+
* Used when items are objects to extract the text value.
|
|
43
|
+
*/
|
|
20
44
|
itemText: {
|
|
21
45
|
type: StringConstructor;
|
|
22
46
|
default: string;
|
|
@@ -1,11 +1,24 @@
|
|
|
1
1
|
import { type PropType } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Available visual variants for the close button.
|
|
4
|
+
*/
|
|
2
5
|
type Variant = 'transparent' | 'gray' | 'dark';
|
|
3
6
|
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
7
|
+
/**
|
|
8
|
+
* The visual variant of the close button.
|
|
9
|
+
* Controls the background color and hover effects.
|
|
10
|
+
* Valid values: 'transparent', 'gray', 'dark'
|
|
11
|
+
*/
|
|
4
12
|
variant: {
|
|
5
13
|
type: PropType<Variant>;
|
|
6
14
|
default: string;
|
|
7
15
|
};
|
|
8
|
-
}>,
|
|
16
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
17
|
+
/**
|
|
18
|
+
* The visual variant of the close button.
|
|
19
|
+
* Controls the background color and hover effects.
|
|
20
|
+
* Valid values: 'transparent', 'gray', 'dark'
|
|
21
|
+
*/
|
|
9
22
|
variant: {
|
|
10
23
|
type: PropType<Variant>;
|
|
11
24
|
default: string;
|
|
@@ -1,14 +1,30 @@
|
|
|
1
1
|
import { type VueDatePickerProps } from '@vuepic/vue-datepicker';
|
|
2
2
|
type Props = {
|
|
3
|
+
/**
|
|
4
|
+
* Text label for the date picker field.
|
|
5
|
+
* Passed to the underlying PInput component.
|
|
6
|
+
*/
|
|
3
7
|
label?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Error message to display below the date picker.
|
|
10
|
+
* Passed to the underlying PInput component and shows error styling.
|
|
11
|
+
*/
|
|
4
12
|
errorMsg?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Whether the date picker is required.
|
|
15
|
+
* Passed to the underlying PInput component and adds visual indicator.
|
|
16
|
+
*/
|
|
5
17
|
required?: boolean;
|
|
6
18
|
} & VueDatePickerProps;
|
|
7
19
|
type __VLS_Props = Props;
|
|
8
20
|
type __VLS_PublicProps = __VLS_Props & {
|
|
21
|
+
/**
|
|
22
|
+
* The selected date value (v-model).
|
|
23
|
+
* Supports two-way binding for form inputs.
|
|
24
|
+
*/
|
|
9
25
|
modelValue?: Date | string | null;
|
|
10
26
|
};
|
|
11
|
-
declare const _default: import("vue").DefineComponent<__VLS_PublicProps,
|
|
27
|
+
declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
28
|
"update:modelValue": (value: string | Date | null) => any;
|
|
13
29
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
14
30
|
"onUpdate:modelValue"?: ((value: string | Date | null) => any) | undefined;
|