@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.
Files changed (175) hide show
  1. package/README.md +31 -1
  2. package/dist/cjs/chunks/index.js +530 -179
  3. package/dist/cjs/chunks/p-alert.js +14 -16
  4. package/dist/cjs/chunks/p-avatar.js +16 -0
  5. package/dist/cjs/chunks/p-btn.js +4 -1
  6. package/dist/cjs/chunks/p-card.js +4 -0
  7. package/dist/cjs/chunks/p-dropdown-select.js +34 -0
  8. package/dist/cjs/chunks/p-input-number.js +32 -0
  9. package/dist/cjs/chunks/p-input-percent.js +15 -4
  10. package/dist/cjs/chunks/p-input.js +28 -0
  11. package/dist/cjs/chunks/p-pagination-info.js +9 -5
  12. package/dist/cjs/chunks/p-pagination.js +23 -13
  13. package/dist/cjs/chunks/p-select-btn.js +2 -1
  14. package/dist/cjs/chunks/p-select.js +33 -0
  15. package/dist/cjs/chunks/p-table-loader.js +20 -0
  16. package/dist/cjs/chunks/p-tabs.js +12 -0
  17. package/dist/cjs/chunks/p-textarea.js +20 -0
  18. package/dist/cjs/index.js +72 -29
  19. package/dist/cjs/inputClasses.js +3 -3
  20. package/dist/cjs/p-checkbox.js +8 -1
  21. package/dist/cjs/p-chips.js +17 -1
  22. package/dist/cjs/p-close-btn.js +6 -1
  23. package/dist/cjs/p-drawer.js +90 -2
  24. package/dist/cjs/p-dropdown.js +2 -1
  25. package/dist/cjs/p-icon.js +2 -1
  26. package/dist/cjs/p-input-search.js +13 -1
  27. package/dist/cjs/p-loading.js +3 -3
  28. package/dist/cjs/p-modal.js +125 -43
  29. package/dist/cjs/p-select-pill.js +36 -2
  30. package/dist/cjs/p-skeleton-loader.js +17 -1
  31. package/dist/cjs/p-table-filter-icon.js +4 -1
  32. package/dist/cjs/p-table-header-cell.js +32 -2
  33. package/dist/cjs/p-table-td.js +1 -1
  34. package/dist/cjs/p-table.js +2 -0
  35. package/dist/cjs/p-toggle.js +22 -1
  36. package/dist/cjs/usePTableHeaderWrap.js +38 -0
  37. package/dist/es/chunks/index.js +530 -179
  38. package/dist/es/chunks/p-alert.js +14 -16
  39. package/dist/es/chunks/p-avatar.js +16 -0
  40. package/dist/es/chunks/p-btn.js +5 -2
  41. package/dist/es/chunks/p-card.js +4 -0
  42. package/dist/es/chunks/p-dropdown-select.js +34 -0
  43. package/dist/es/chunks/p-input-number.js +32 -0
  44. package/dist/es/chunks/p-input-percent.js +15 -4
  45. package/dist/es/chunks/p-input.js +28 -0
  46. package/dist/es/chunks/p-pagination-info.js +9 -5
  47. package/dist/es/chunks/p-pagination.js +24 -14
  48. package/dist/es/chunks/p-select-btn.js +2 -1
  49. package/dist/es/chunks/p-select.js +33 -0
  50. package/dist/es/chunks/p-table-loader.js +20 -0
  51. package/dist/es/chunks/p-tabs.js +12 -0
  52. package/dist/es/chunks/p-textarea.js +20 -0
  53. package/dist/es/index.js +77 -34
  54. package/dist/es/inputClasses.js +4 -4
  55. package/dist/es/p-checkbox.js +8 -1
  56. package/dist/es/p-chips.js +17 -1
  57. package/dist/es/p-close-btn.js +6 -1
  58. package/dist/es/p-drawer.js +90 -2
  59. package/dist/es/p-dropdown.js +2 -1
  60. package/dist/es/p-icon.js +2 -1
  61. package/dist/es/p-input-search.js +13 -1
  62. package/dist/es/p-loading.js +3 -3
  63. package/dist/es/p-modal.js +125 -43
  64. package/dist/es/p-select-pill.js +36 -2
  65. package/dist/es/p-skeleton-loader.js +17 -1
  66. package/dist/es/p-table-filter-icon.js +4 -1
  67. package/dist/es/p-table-header-cell.js +32 -2
  68. package/dist/es/p-table-td.js +1 -1
  69. package/dist/es/p-table.js +2 -0
  70. package/dist/es/p-toggle.js +22 -1
  71. package/dist/es/usePTableHeaderWrap.js +38 -0
  72. package/dist/squirrel/components/p-action-bar/p-action-bar.vue.d.ts +15 -3
  73. package/dist/squirrel/components/p-alert/p-alert.vue.d.ts +18 -5
  74. package/dist/squirrel/components/p-avatar/p-avatar.vue.d.ts +36 -1
  75. package/dist/squirrel/components/p-btn/p-btn.vue.d.ts +21 -5
  76. package/dist/squirrel/components/p-card/p-card.vue.d.ts +21 -8
  77. package/dist/squirrel/components/p-checkbox/p-checkbox.vue.d.ts +26 -8
  78. package/dist/squirrel/components/p-chips/p-chips.vue.d.ts +24 -0
  79. package/dist/squirrel/components/p-close-btn/p-close-btn.vue.d.ts +14 -1
  80. package/dist/squirrel/components/p-date-picker/p-date-picker.vue.d.ts +17 -1
  81. package/dist/squirrel/components/p-drawer/p-drawer.vue.d.ts +153 -15
  82. package/dist/squirrel/components/p-dropdown/p-dropdown.vue.d.ts +11 -2
  83. package/dist/squirrel/components/p-dropdown-select/p-dropdown-select.vue.d.ts +70 -2
  84. package/dist/squirrel/components/p-file-upload/p-file-upload.vue.d.ts +71 -7
  85. package/dist/squirrel/components/p-icon/p-icon.types.d.ts +1 -0
  86. package/dist/squirrel/components/p-icon/p-icon.vue.d.ts +5 -1
  87. package/dist/squirrel/components/p-info-icon/p-info-icon.vue.d.ts +12 -5
  88. package/dist/squirrel/components/p-inline-date-picker/p-inline-date-picker.vue.d.ts +28 -8
  89. package/dist/squirrel/components/p-input/p-input.vue.d.ts +74 -9
  90. package/dist/squirrel/components/p-input-number/p-input-number.vue.d.ts +83 -12
  91. package/dist/squirrel/components/p-input-percent/p-input-percent.vue.d.ts +23 -3
  92. package/dist/squirrel/components/p-input-search/p-input-search.vue.d.ts +25 -1
  93. package/dist/squirrel/components/p-link/p-link.vue.d.ts +1 -1
  94. package/dist/squirrel/components/p-loading/p-loading.vue.d.ts +1 -1
  95. package/dist/squirrel/components/p-modal/p-modal.vue.d.ts +190 -16
  96. package/dist/squirrel/components/p-pagination/p-pagination.vue.d.ts +23 -13
  97. package/dist/squirrel/components/p-pagination-info/p-pagination-info.vue.d.ts +17 -9
  98. package/dist/squirrel/components/p-progress-bar/p-progress-bar.vue.d.ts +21 -1
  99. package/dist/squirrel/components/p-ring-loader/p-ring-loader.vue.d.ts +11 -1
  100. package/dist/squirrel/components/p-select/p-select.vue.d.ts +77 -7
  101. package/dist/squirrel/components/p-select-btn/p-select-btn.vue.d.ts +68 -11
  102. package/dist/squirrel/components/p-select-list/p-select-list.vue.d.ts +2 -2
  103. package/dist/squirrel/components/p-select-pill/p-select-pill.vue.d.ts +72 -2
  104. package/dist/squirrel/components/p-skeleton-loader/p-skeleton-loader.vue.d.ts +40 -0
  105. package/dist/squirrel/components/p-steps/p-steps.vue.d.ts +13 -1
  106. package/dist/squirrel/components/p-table/p-table.types.d.ts +1 -0
  107. package/dist/squirrel/components/p-table/p-table.vue.d.ts +33 -1
  108. package/dist/squirrel/components/p-table/usePTableHeaderWrap.d.ts +4 -0
  109. package/dist/squirrel/components/p-table-header-cell/p-table-filter-icon.vue.d.ts +7 -1
  110. package/dist/squirrel/components/p-table-header-cell/p-table-header-cell.vue.d.ts +59 -4
  111. package/dist/squirrel/components/p-table-loader/p-table-loader.vue.d.ts +41 -1
  112. package/dist/squirrel/components/p-table-sort/p-table-sort.vue.d.ts +13 -3
  113. package/dist/squirrel/components/p-table-td/p-table-td.vue.d.ts +13 -1
  114. package/dist/squirrel/components/p-tabs/p-tabs.vue.d.ts +34 -3
  115. package/dist/squirrel/components/p-tabs-pills/p-tabs-pills.vue.d.ts +23 -1
  116. package/dist/squirrel/components/p-textarea/p-textarea.vue.d.ts +53 -9
  117. package/dist/squirrel/components/p-toggle/p-toggle.vue.d.ts +51 -4
  118. package/dist/squirrel.css +68 -68
  119. package/package.json +24 -22
  120. package/squirrel/components/p-action-bar/p-action-bar.stories.js +5 -5
  121. package/squirrel/components/p-action-bar/p-action-bar.vue +30 -3
  122. package/squirrel/components/p-alert/p-alert.spec.js +4 -4
  123. package/squirrel/components/p-alert/p-alert.stories.js +19 -13
  124. package/squirrel/components/p-alert/p-alert.vue +33 -11
  125. package/squirrel/components/p-avatar/p-avatar.vue +28 -0
  126. package/squirrel/components/p-btn/p-btn.vue +35 -0
  127. package/squirrel/components/p-card/p-card.vue +24 -1
  128. package/squirrel/components/p-checkbox/p-checkbox.vue +23 -1
  129. package/squirrel/components/p-chips/p-chips.vue +24 -0
  130. package/squirrel/components/p-close-btn/p-close-btn.vue +15 -0
  131. package/squirrel/components/p-date-picker/p-date-picker.vue +23 -1
  132. package/squirrel/components/p-drawer/p-drawer.vue +95 -0
  133. package/squirrel/components/p-dropdown/p-dropdown.vue +12 -1
  134. package/squirrel/components/p-dropdown-select/p-dropdown-select.vue +41 -0
  135. package/squirrel/components/p-file-upload/p-file-upload.vue +58 -3
  136. package/squirrel/components/p-icon/p-icon.types.ts +1 -0
  137. package/squirrel/components/p-icon/p-icon.vue +16 -0
  138. package/squirrel/components/p-info-icon/p-info-icon.vue +19 -0
  139. package/squirrel/components/p-inline-date-picker/p-inline-date-picker.vue +32 -0
  140. package/squirrel/components/p-input/p-input.vue +61 -1
  141. package/squirrel/components/p-input-number/p-input-number.vue +78 -1
  142. package/squirrel/components/p-input-percent/p-input-percent.vue +27 -3
  143. package/squirrel/components/p-input-search/p-input-search.vue +30 -2
  144. package/squirrel/components/p-link/p-link.vue +13 -0
  145. package/squirrel/components/p-loading/p-loading.vue +9 -2
  146. package/squirrel/components/p-modal/p-modal-basic.spec.js +29 -3
  147. package/squirrel/components/p-modal/p-modal.vue +182 -35
  148. package/squirrel/components/p-pagination/p-pagination.vue +28 -8
  149. package/squirrel/components/p-pagination-info/p-pagination-info.vue +16 -4
  150. package/squirrel/components/p-progress-bar/p-progress-bar.vue +31 -4
  151. package/squirrel/components/p-ring-loader/p-ring-loader.vue +17 -0
  152. package/squirrel/components/p-select/p-select.vue +50 -1
  153. package/squirrel/components/p-select-btn/p-select-btn.vue +90 -2
  154. package/squirrel/components/p-select-list/p-select-list.vue +7 -0
  155. package/squirrel/components/p-select-pill/p-select-pill.vue +52 -2
  156. package/squirrel/components/p-skeleton-loader/p-skeleton-loader.vue +24 -0
  157. package/squirrel/components/p-steps/p-steps.vue +25 -0
  158. package/squirrel/components/p-table/p-table.spec.js +51 -15
  159. package/squirrel/components/p-table/p-table.types.ts +2 -0
  160. package/squirrel/components/p-table/p-table.vue +46 -4
  161. package/squirrel/components/p-table/usePTableHeaderWrap.spec.js +118 -0
  162. package/squirrel/components/p-table/usePTableHeaderWrap.ts +45 -0
  163. package/squirrel/components/p-table-header-cell/p-table-filter-icon.vue +9 -0
  164. package/squirrel/components/p-table-header-cell/p-table-header-cell.spec.js +5 -1
  165. package/squirrel/components/p-table-header-cell/p-table-header-cell.vue +38 -1
  166. package/squirrel/components/p-table-loader/p-table-loader.vue +28 -0
  167. package/squirrel/components/p-table-sort/p-table-sort.vue +19 -1
  168. package/squirrel/components/p-table-td/p-table-td.vue +20 -0
  169. package/squirrel/components/p-tabs/p-tabs.stories.js +2 -2
  170. package/squirrel/components/p-tabs/p-tabs.vue +33 -1
  171. package/squirrel/components/p-tabs-pills/p-tabs-pills.vue +33 -0
  172. package/squirrel/components/p-textarea/p-textarea.vue +43 -1
  173. package/squirrel/components/p-toggle/p-toggle.vue +44 -1
  174. package/squirrel/assets/pagination-left-icon.svg +0 -5
  175. package/squirrel/assets/pagination-right-icon.svg +0 -5
@@ -9,66 +9,132 @@ const __default__ = defineComponent({
9
9
  PCloseBtn
10
10
  },
11
11
  props: {
12
+ /**
13
+ * Target element to append the drawer to.
14
+ * Usually 'body' for proper z-index stacking.
15
+ */
12
16
  appendTo: {
13
17
  type: String,
14
18
  default: "body"
15
19
  },
20
+ /**
21
+ * Title displayed in the drawer header.
22
+ * Used for accessibility and visual identification.
23
+ */
16
24
  title: {
17
25
  type: String,
18
26
  default: ""
19
27
  },
28
+ /**
29
+ * Whether the drawer content is disabled.
30
+ * Prevents user interaction with drawer content.
31
+ */
20
32
  disabled: {
21
33
  type: Boolean,
22
34
  default: false
23
35
  },
36
+ /**
37
+ * Error message to display in the drawer.
38
+ * Shows an error alert above the drawer content.
39
+ */
24
40
  errorMsg: {
25
41
  type: String,
26
42
  default: ""
27
43
  },
44
+ /**
45
+ * The position of the drawer on the screen.
46
+ * Valid values: 'left', 'right'
47
+ * @values left, right
48
+ */
28
49
  position: {
29
50
  type: String,
30
51
  default: "right"
31
52
  },
53
+ /**
54
+ * Base z-index for the drawer.
55
+ * Higher values ensure the drawer appears above other content.
56
+ */
32
57
  zIndex: {
33
58
  type: Number,
34
59
  default: 900
35
60
  },
61
+ /**
62
+ * Inline styles for the drawer element.
63
+ * Applied directly to the drawer element.
64
+ */
36
65
  drawerStyle: {
37
66
  type: Object,
38
67
  default: () => ({})
39
68
  },
69
+ /**
70
+ * CSS class for the drawer container.
71
+ * Controls the base styling of the drawer.
72
+ */
40
73
  drawerClass: {
41
74
  type: String,
42
75
  default: "drawer"
43
76
  },
77
+ /**
78
+ * CSS class for the drawer entrance animation.
79
+ * Overrides the default position-based animation.
80
+ */
44
81
  inClass: {
45
82
  type: String,
46
83
  default: ""
47
84
  },
85
+ /**
86
+ * CSS class for the drawer exit animation.
87
+ * Overrides the default position-based animation.
88
+ */
48
89
  outClass: {
49
90
  type: String,
50
91
  default: ""
51
92
  },
93
+ /**
94
+ * Whether the drawer should be mounted immediately.
95
+ * Useful for drawers that are always present in the DOM.
96
+ */
52
97
  live: {
53
98
  type: Boolean,
54
99
  default: false
55
100
  },
101
+ /**
102
+ * Controls the visibility of the drawer (v-model).
103
+ * Supports two-way binding for drawer state.
104
+ */
56
105
  modelValue: {
57
106
  type: Boolean,
58
107
  default: false
59
108
  },
109
+ /**
110
+ * Accessibility label for the close button.
111
+ * Used by screen readers for better accessibility.
112
+ */
60
113
  closeLabel: {
61
114
  type: String,
62
115
  default: "Close"
63
116
  },
117
+ /**
118
+ * Whether to show the backdrop behind the drawer.
119
+ * When true, displays a semi-transparent overlay.
120
+ */
64
121
  showBackdrop: {
65
122
  type: Boolean,
66
123
  default: false
67
124
  },
125
+ /**
126
+ * Whether the drawer can be closed by user interaction.
127
+ * Controls close button visibility and backdrop click behavior.
128
+ */
68
129
  enableClose: {
69
130
  type: Boolean,
70
131
  default: true
71
132
  },
133
+ /**
134
+ * Width of the drawer.
135
+ * Must be a valid CSS width value ending with 'px'.
136
+ * @values 460px, 600px, 800px, etc.
137
+ */
72
138
  width: {
73
139
  type: String,
74
140
  default: "460px",
@@ -77,6 +143,28 @@ const __default__ = defineComponent({
77
143
  }
78
144
  }
79
145
  },
146
+ /**
147
+ * Emitted before the drawer starts opening.
148
+ */
149
+ /**
150
+ * Emitted when the drawer is opening (animation in progress).
151
+ */
152
+ /**
153
+ * Emitted when the drawer has finished opening.
154
+ */
155
+ /**
156
+ * Emitted before the drawer starts closing.
157
+ */
158
+ /**
159
+ * Emitted when the drawer is closing (animation in progress).
160
+ */
161
+ /**
162
+ * Emitted when the drawer has finished closing.
163
+ */
164
+ /**
165
+ * Emitted when the drawer visibility changes (v-model).
166
+ * @param {boolean} value - The new visibility state
167
+ */
80
168
  emits: ["update:modelValue", "before-open", "opening", "opened", "before-close", "closing", "closed"],
81
169
  data() {
82
170
  return {
@@ -148,7 +236,7 @@ const __default__ = defineComponent({
148
236
  });
149
237
  const __injectCSSVars__ = () => {
150
238
  useCssVars((_ctx) => ({
151
- "508822d0": _ctx.width
239
+ "0ae27020": _ctx.width
152
240
  }));
153
241
  };
154
242
  const __setup__ = __default__.setup;
@@ -265,7 +353,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
265
353
  }, 8, ["enter-active-class", "leave-active-class", "onBeforeEnter", "onEnter", "onAfterEnter", "onBeforeLeave", "onLeave", "onAfterLeave"])
266
354
  ], 8, ["to"])) : createCommentVNode("", true);
267
355
  }
268
- const pDrawer = /* @__PURE__ */ _export_sfc(__default__, [["render", _sfc_render], ["__scopeId", "data-v-95d3e794"]]);
356
+ const pDrawer = /* @__PURE__ */ _export_sfc(__default__, [["render", _sfc_render], ["__scopeId", "data-v-b08a9ced"]]);
269
357
  export {
270
358
  pDrawer as default
271
359
  };
@@ -23,6 +23,7 @@ const _sfc_main = defineComponent({
23
23
  },
24
24
  /**
25
25
  * Enables closing the dropdown with the Escape key.
26
+ * When true, pressing Escape will close the dropdown.
26
27
  */
27
28
  enableCloseOnEsc: {
28
29
  type: Boolean,
@@ -30,7 +31,7 @@ const _sfc_main = defineComponent({
30
31
  },
31
32
  /**
32
33
  * v-tooltip wraps the popper trigger with a div that has `display: inline-block` set by default.
33
- * This prop is used to override the CSS style of that wrapper div
34
+ * This prop is used to override the CSS style of that wrapper div.
34
35
  */
35
36
  triggerStyle: {
36
37
  type: Object,
package/dist/es/p-icon.js CHANGED
@@ -34,7 +34,8 @@ const P_ICON_ALIASES = {
34
34
  upload: "tdesign:upload",
35
35
  info: "streamline:information-circle",
36
36
  help: "ph:question",
37
- search: "streamline:magnifying-glass-solid"
37
+ search: "streamline:magnifying-glass-solid",
38
+ warning: "ri:error-warning-line"
38
39
  };
39
40
  export {
40
41
  P_ICON_ALIASES
@@ -10,10 +10,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
10
10
  },
11
11
  __name: "p-input-search",
12
12
  props: {
13
+ /**
14
+ * The search query value (v-model).
15
+ * Controls the input field content and visibility of the clear button.
16
+ */
13
17
  modelValue: {
14
18
  type: String,
15
19
  default: ""
16
20
  },
21
+ /**
22
+ * The size of the search input.
23
+ * Affects the overall dimensions and icon positioning.
24
+ */
17
25
  size: {
18
26
  type: String,
19
27
  default: "md",
@@ -21,6 +29,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
21
29
  return SIZES.includes(value);
22
30
  }
23
31
  },
32
+ /**
33
+ * Whether to show the enter key icon when the input is focused.
34
+ * Provides visual feedback that pressing enter will trigger a search.
35
+ */
24
36
  showEnterIcon: {
25
37
  type: Boolean,
26
38
  default: false
@@ -114,7 +126,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
114
126
  };
115
127
  }
116
128
  });
117
- const PInputSearch = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-0e51ff56"]]);
129
+ const PInputSearch = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ce44730a"]]);
118
130
  export {
119
131
  PInputSearch as default
120
132
  };
@@ -9,7 +9,7 @@ const _hoisted_1$1 = {
9
9
  viewBox: "0 0 24 24"
10
10
  };
11
11
  function render(_ctx, _cache) {
12
- return openBlock(), createElementBlock("svg", _hoisted_1$1, _cache[0] || (_cache[0] = [
12
+ return openBlock(), createElementBlock("svg", _hoisted_1$1, [..._cache[0] || (_cache[0] = [
13
13
  createElementVNode("path", {
14
14
  fill: "currentColor",
15
15
  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",
@@ -27,7 +27,7 @@ function render(_ctx, _cache) {
27
27
  values: "0 12 12;360 12 12"
28
28
  })
29
29
  ], -1)
30
- ]));
30
+ ])]);
31
31
  }
32
32
  const PLoadingSpinner = { render };
33
33
  const _hoisted_1 = {
@@ -115,7 +115,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
115
115
  };
116
116
  }
117
117
  });
118
- const pLoading = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-9ad56d4f"]]);
118
+ const pLoading = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7e116004"]]);
119
119
  export {
120
120
  pLoading as default
121
121
  };
@@ -25,82 +25,162 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
25
25
  },
26
26
  __name: "p-modal",
27
27
  props: {
28
+ /**
29
+ * Unique name for the modal when using the modal service.
30
+ * Used for programmatic control of the modal.
31
+ */
28
32
  name: {
29
33
  type: String,
30
34
  default: ""
31
35
  },
36
+ /**
37
+ * Title displayed in the modal header.
38
+ * Used for accessibility and visual identification.
39
+ */
32
40
  title: {
33
41
  type: String,
34
42
  default: ""
35
43
  },
44
+ /**
45
+ * Base z-index for the modal.
46
+ * Higher values ensure the modal appears above other content.
47
+ */
36
48
  baseZindex: {
37
49
  type: Number,
38
50
  default: 1051
39
51
  },
52
+ /**
53
+ * CSS classes for the backdrop element.
54
+ * Controls the appearance of the modal overlay.
55
+ */
40
56
  bgClass: {
41
57
  type: [String, Object, Array],
42
58
  default: "fixed bottom-0 left-0 right-0 top-0 bg-black/20"
43
59
  },
60
+ /**
61
+ * CSS classes for the modal wrapper element.
62
+ * Controls the positioning and layout of the modal container.
63
+ */
44
64
  wrapperClass: {
45
65
  type: [String, Object, Array],
46
66
  default: "fixed bottom-0 left-0 right-0 top-0 flex flex-col items-center justify-center overflow-y-auto overflow-x-hidden outline-none"
47
67
  },
68
+ /**
69
+ * Base CSS classes for the modal content.
70
+ * Controls the appearance of the modal dialog itself.
71
+ */
48
72
  modalBaseClass: {
49
73
  type: [String, Object, Array],
50
- default: "pm relative flex flex-col rounded-2xl pb-6 cursor-default bg-surface shadow-xl"
74
+ default: "pm relative flex flex-col rounded-2xl cursor-default bg-surface shadow-xl"
51
75
  },
76
+ /**
77
+ * Additional CSS classes for the modal content.
78
+ * Merged with modalBaseClass for custom styling.
79
+ */
52
80
  modalClass: {
53
81
  type: [String, Object, Array],
54
82
  default: ""
55
83
  },
84
+ /**
85
+ * Inline styles for the modal content.
86
+ * Applied directly to the modal element.
87
+ */
56
88
  modalStyle: {
57
89
  type: [String, Object, Array],
58
90
  default: ""
59
91
  },
92
+ /**
93
+ * CSS class for the modal entrance animation.
94
+ * Controls how the modal appears.
95
+ */
60
96
  inClass: {
61
97
  type: String,
62
98
  default: "slideInTop"
63
99
  },
100
+ /**
101
+ * CSS class for the modal exit animation.
102
+ * Controls how the modal disappears.
103
+ */
64
104
  outClass: {
65
105
  type: String,
66
106
  default: "slideOutTop"
67
107
  },
108
+ /**
109
+ * CSS class for the backdrop entrance animation.
110
+ * Controls how the backdrop appears.
111
+ */
68
112
  bgInClass: {
69
113
  type: String,
70
114
  default: "fadeIn"
71
115
  },
116
+ /**
117
+ * CSS class for the backdrop exit animation.
118
+ * Controls how the backdrop disappears.
119
+ */
72
120
  bgOutClass: {
73
121
  type: String,
74
122
  default: "fadeOut"
75
123
  },
124
+ /**
125
+ * Target element to append the modal to.
126
+ * Usually 'body' for proper z-index stacking.
127
+ */
76
128
  appendTo: {
77
129
  type: String,
78
130
  default: "body"
79
131
  },
132
+ /**
133
+ * Whether the modal should be mounted immediately.
134
+ * Useful for modals that are always present in the DOM.
135
+ */
80
136
  live: {
81
137
  type: Boolean,
82
138
  default: false
83
139
  },
140
+ /**
141
+ * Whether the modal can be closed by user interaction.
142
+ * Controls close button visibility and backdrop click behavior.
143
+ */
84
144
  enableClose: {
85
145
  type: Boolean,
86
146
  default: true
87
147
  },
148
+ /**
149
+ * Controls the visibility of the modal (v-model).
150
+ * Supports two-way binding for modal state.
151
+ */
88
152
  modelValue: {
89
153
  type: Boolean,
90
154
  default: false
91
155
  },
156
+ /**
157
+ * Accessibility label for the close button.
158
+ * Used by screen readers for better accessibility.
159
+ */
92
160
  closeLabel: {
93
161
  type: String,
94
162
  default: "Close"
95
163
  },
164
+ /**
165
+ * Whether the modal content is disabled.
166
+ * Prevents user interaction with modal content.
167
+ */
96
168
  disabled: {
97
169
  type: Boolean,
98
170
  default: false
99
171
  },
172
+ /**
173
+ * Error message to display in the modal.
174
+ * Shows an error alert above the modal content.
175
+ */
100
176
  errorMsg: {
101
177
  type: String,
102
178
  default: ""
103
179
  },
180
+ /**
181
+ * Maximum width of the modal.
182
+ * Controls the responsive behavior of the modal.
183
+ */
104
184
  maxWidth: {
105
185
  type: String,
106
186
  default: "500px"
@@ -109,7 +189,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
109
189
  emits: ["before-open", "opening", "opened", "before-close", "closing", "closed", "update:modelValue", "click:overlay"],
110
190
  setup(__props, { emit: __emit }) {
111
191
  useCssVars((_ctx) => ({
112
- "29225c6f": __props.maxWidth
192
+ "a8364442": __props.maxWidth
113
193
  }));
114
194
  let animatingZIndex = 0;
115
195
  const emit = __emit;
@@ -309,49 +389,51 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
309
389
  createElementVNode("div", {
310
390
  ref: "pm",
311
391
  "data-pm-id": id.value,
312
- class: normalizeClass([__props.modalBaseClass, __props.modalClass]),
392
+ class: normalizeClass([__props.modalBaseClass, __props.modalClass, { "pb-6": !_ctx.$slots["modal-wrapper"] }]),
313
393
  style: normalizeStyle(__props.modalStyle)
314
394
  }, [
315
- renderSlot(_ctx.$slots, "title-wrapper", {}, () => [
316
- createElementVNode("div", _hoisted_4, [
317
- __props.title ? (openBlock(), createElementBlock("h3", {
318
- key: 0,
319
- id: `${id.value}-title`,
320
- class: "mr-auto pt-4 text-xl font-semibold"
321
- }, toDisplayString(__props.title), 9, _hoisted_5)) : createCommentVNode("", true),
322
- createElementVNode("div", _hoisted_6, [
323
- createVNode(PCloseBtn, {
324
- disabled: __props.disabled,
325
- class: normalizeClass({ invisible: !__props.enableClose }),
326
- "aria-label": __props.closeLabel,
327
- onClick: withModifiers(close, ["prevent"])
328
- }, null, 8, ["disabled", "class", "aria-label"])
395
+ renderSlot(_ctx.$slots, "modal-wrapper", {}, () => [
396
+ renderSlot(_ctx.$slots, "title-wrapper", {}, () => [
397
+ createElementVNode("div", _hoisted_4, [
398
+ __props.title ? (openBlock(), createElementBlock("h3", {
399
+ key: 0,
400
+ id: `${id.value}-title`,
401
+ class: "mr-auto pt-4 text-xl font-semibold"
402
+ }, toDisplayString(__props.title), 9, _hoisted_5)) : createCommentVNode("", true),
403
+ createElementVNode("div", _hoisted_6, [
404
+ createVNode(PCloseBtn, {
405
+ disabled: __props.disabled,
406
+ class: normalizeClass({ invisible: !__props.enableClose }),
407
+ "aria-label": __props.closeLabel,
408
+ onClick: withModifiers(close, ["prevent"])
409
+ }, null, 8, ["disabled", "class", "aria-label"])
410
+ ])
329
411
  ])
330
- ])
331
- ], true),
332
- __props.errorMsg ? (openBlock(), createElementBlock("div", _hoisted_7, [
333
- createVNode(_sfc_main$1, { type: "error" }, {
334
- default: withCtx(() => [
335
- createTextVNode(toDisplayString(__props.errorMsg), 1)
336
- ]),
337
- _: 1
338
- })
339
- ])) : createCommentVNode("", true),
340
- renderSlot(_ctx.$slots, "content-wrapper", {}, () => [
341
- createElementVNode("div", {
342
- id: `${id.value}-content`,
343
- class: normalizeClass([
344
- "relative grow overflow-y-auto overflow-x-hidden px-8",
345
- { "pointer-events-none opacity-50": __props.disabled }
346
- ])
347
- }, [
348
- renderSlot(_ctx.$slots, "default", {}, void 0, true)
349
- ], 10, _hoisted_8)
350
- ], true),
351
- renderSlot(_ctx.$slots, "footer-wrapper", {}, () => [
352
- _ctx.$slots.footer ? (openBlock(), createElementBlock("div", _hoisted_9, [
353
- renderSlot(_ctx.$slots, "footer", {}, void 0, true)
354
- ])) : createCommentVNode("", true)
412
+ ], true),
413
+ __props.errorMsg ? (openBlock(), createElementBlock("div", _hoisted_7, [
414
+ createVNode(_sfc_main$1, { type: "error" }, {
415
+ default: withCtx(() => [
416
+ createTextVNode(toDisplayString(__props.errorMsg), 1)
417
+ ]),
418
+ _: 1
419
+ })
420
+ ])) : createCommentVNode("", true),
421
+ renderSlot(_ctx.$slots, "content-wrapper", {}, () => [
422
+ createElementVNode("div", {
423
+ id: `${id.value}-content`,
424
+ class: normalizeClass([
425
+ "relative grow overflow-y-auto overflow-x-hidden px-8",
426
+ { "pointer-events-none opacity-50": __props.disabled }
427
+ ])
428
+ }, [
429
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
430
+ ], 10, _hoisted_8)
431
+ ], true),
432
+ renderSlot(_ctx.$slots, "footer-wrapper", {}, () => [
433
+ _ctx.$slots.footer ? (openBlock(), createElementBlock("div", _hoisted_9, [
434
+ renderSlot(_ctx.$slots, "footer", {}, void 0, true)
435
+ ])) : createCommentVNode("", true)
436
+ ], true)
355
437
  ], true)
356
438
  ], 14, _hoisted_3)
357
439
  ], 46, _hoisted_2), [
@@ -364,7 +446,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
364
446
  };
365
447
  }
366
448
  });
367
- const pModal = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-a511ac01"]]);
449
+ const pModal = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-5c370dbc"]]);
368
450
  export {
369
451
  pModal as default
370
452
  };
@@ -14,26 +14,51 @@ const getOffsetValues = (container) => {
14
14
  const _sfc_main = defineComponent({
15
15
  name: "PSelectPill",
16
16
  props: {
17
+ /**
18
+ * The currently selected value (v-model).
19
+ * Should match one of the item values in the items array.
20
+ */
17
21
  modelValue: {
18
22
  type: [String, Number],
19
23
  default: ""
20
24
  },
25
+ /**
26
+ * Array of options to display as pills.
27
+ * Each option should have text, value, and optional subtext and disabled properties.
28
+ */
21
29
  items: {
22
30
  type: Array,
23
31
  default: () => []
24
32
  },
33
+ /**
34
+ * Property name to use as the item display text.
35
+ * Used for button label content.
36
+ */
25
37
  itemText: {
26
38
  type: String,
27
39
  default: "text"
28
40
  },
41
+ /**
42
+ * Property name to use as the item subtext.
43
+ * Displayed below the main text when provided.
44
+ */
29
45
  itemSubtext: {
30
46
  type: String,
31
47
  default: "subtext"
32
48
  },
49
+ /**
50
+ * Property name to use as the item value.
51
+ * Used for selection comparison and v-model binding.
52
+ */
33
53
  itemValue: {
34
54
  type: [String, Number],
35
55
  default: "value"
36
56
  },
57
+ /**
58
+ * The size of the pill buttons.
59
+ * Valid values: 'sm', 'md', 'lg'
60
+ * @values sm, md, lg
61
+ */
37
62
  size: {
38
63
  type: String,
39
64
  default: "md",
@@ -42,7 +67,13 @@ const _sfc_main = defineComponent({
42
67
  }
43
68
  }
44
69
  },
45
- emits: ["update:modelValue"],
70
+ emits: {
71
+ /**
72
+ * Emitted when the selected value changes.
73
+ * @param {string | number} value - The new selected value
74
+ */
75
+ "update:modelValue": (value) => true
76
+ },
46
77
  data() {
47
78
  return {
48
79
  SIZES,
@@ -69,7 +100,10 @@ const _sfc_main = defineComponent({
69
100
  methods: {
70
101
  click(e, option) {
71
102
  if (!option.disabled) {
72
- this.$emit("update:modelValue", option[this.itemValue]);
103
+ const value = option[this.itemValue];
104
+ if (typeof value === "string" || typeof value === "number") {
105
+ this.$emit("update:modelValue", value);
106
+ }
73
107
  }
74
108
  },
75
109
  setPillStyle() {
@@ -17,6 +17,10 @@ const hexToRgb = (hex) => `${hex.match(/\w\w/g)?.map((x) => +`0x${x}`)}`;
17
17
  const _sfc_main = defineComponent({
18
18
  name: "PSkeletonLoader",
19
19
  props: {
20
+ /**
21
+ * The shape type of the skeleton loader.
22
+ * Determines the border radius and overall appearance.
23
+ */
20
24
  type: {
21
25
  type: String,
22
26
  default: LOADER_TYPES.rectangle,
@@ -24,14 +28,26 @@ const _sfc_main = defineComponent({
24
28
  return Object.values(LOADER_TYPES).includes(value);
25
29
  }
26
30
  },
31
+ /**
32
+ * The background CSS class for the skeleton loader.
33
+ * Controls the base color of the loading placeholder.
34
+ */
27
35
  bgClass: {
28
36
  type: String,
29
37
  default: "bg-p-gray-30"
30
38
  },
39
+ /**
40
+ * Additional CSS classes to apply to the loader.
41
+ * Allows for custom styling beyond the default type-based classes.
42
+ */
31
43
  cssClass: {
32
44
  type: String,
33
45
  default: ""
34
46
  },
47
+ /**
48
+ * The color of the shimmer effect in hex format.
49
+ * Controls the color of the animated shimmer overlay.
50
+ */
35
51
  shimmerColor: {
36
52
  type: String,
37
53
  default: SHIMMER_COLOR
@@ -65,7 +81,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
65
81
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
66
82
  ], 2);
67
83
  }
68
- const PSkeletonLoader = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-3d77f34f"]]);
84
+ const PSkeletonLoader = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-1beaf57b"]]);
69
85
  export {
70
86
  PSkeletonLoader as default
71
87
  };