@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
@@ -11,10 +11,18 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
11
11
  },
12
12
  __name: "p-input-search",
13
13
  props: {
14
+ /**
15
+ * The search query value (v-model).
16
+ * Controls the input field content and visibility of the clear button.
17
+ */
14
18
  modelValue: {
15
19
  type: String,
16
20
  default: ""
17
21
  },
22
+ /**
23
+ * The size of the search input.
24
+ * Affects the overall dimensions and icon positioning.
25
+ */
18
26
  size: {
19
27
  type: String,
20
28
  default: "md",
@@ -22,6 +30,10 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
22
30
  return pBtn_types.SIZES.includes(value);
23
31
  }
24
32
  },
33
+ /**
34
+ * Whether to show the enter key icon when the input is focused.
35
+ * Provides visual feedback that pressing enter will trigger a search.
36
+ */
25
37
  showEnterIcon: {
26
38
  type: Boolean,
27
39
  default: false
@@ -115,5 +127,5 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
115
127
  };
116
128
  }
117
129
  });
118
- const PInputSearch = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-0e51ff56"]]);
130
+ const PInputSearch = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-ce44730a"]]);
119
131
  module.exports = PInputSearch;
@@ -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 = {
@@ -116,5 +116,5 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
116
116
  };
117
117
  }
118
118
  });
119
- const pLoading = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-9ad56d4f"]]);
119
+ const pLoading = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-7e116004"]]);
120
120
  module.exports = pLoading;
@@ -26,82 +26,162 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
26
26
  },
27
27
  __name: "p-modal",
28
28
  props: {
29
+ /**
30
+ * Unique name for the modal when using the modal service.
31
+ * Used for programmatic control of the modal.
32
+ */
29
33
  name: {
30
34
  type: String,
31
35
  default: ""
32
36
  },
37
+ /**
38
+ * Title displayed in the modal header.
39
+ * Used for accessibility and visual identification.
40
+ */
33
41
  title: {
34
42
  type: String,
35
43
  default: ""
36
44
  },
45
+ /**
46
+ * Base z-index for the modal.
47
+ * Higher values ensure the modal appears above other content.
48
+ */
37
49
  baseZindex: {
38
50
  type: Number,
39
51
  default: 1051
40
52
  },
53
+ /**
54
+ * CSS classes for the backdrop element.
55
+ * Controls the appearance of the modal overlay.
56
+ */
41
57
  bgClass: {
42
58
  type: [String, Object, Array],
43
59
  default: "fixed bottom-0 left-0 right-0 top-0 bg-black/20"
44
60
  },
61
+ /**
62
+ * CSS classes for the modal wrapper element.
63
+ * Controls the positioning and layout of the modal container.
64
+ */
45
65
  wrapperClass: {
46
66
  type: [String, Object, Array],
47
67
  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"
48
68
  },
69
+ /**
70
+ * Base CSS classes for the modal content.
71
+ * Controls the appearance of the modal dialog itself.
72
+ */
49
73
  modalBaseClass: {
50
74
  type: [String, Object, Array],
51
- default: "pm relative flex flex-col rounded-2xl pb-6 cursor-default bg-surface shadow-xl"
75
+ default: "pm relative flex flex-col rounded-2xl cursor-default bg-surface shadow-xl"
52
76
  },
77
+ /**
78
+ * Additional CSS classes for the modal content.
79
+ * Merged with modalBaseClass for custom styling.
80
+ */
53
81
  modalClass: {
54
82
  type: [String, Object, Array],
55
83
  default: ""
56
84
  },
85
+ /**
86
+ * Inline styles for the modal content.
87
+ * Applied directly to the modal element.
88
+ */
57
89
  modalStyle: {
58
90
  type: [String, Object, Array],
59
91
  default: ""
60
92
  },
93
+ /**
94
+ * CSS class for the modal entrance animation.
95
+ * Controls how the modal appears.
96
+ */
61
97
  inClass: {
62
98
  type: String,
63
99
  default: "slideInTop"
64
100
  },
101
+ /**
102
+ * CSS class for the modal exit animation.
103
+ * Controls how the modal disappears.
104
+ */
65
105
  outClass: {
66
106
  type: String,
67
107
  default: "slideOutTop"
68
108
  },
109
+ /**
110
+ * CSS class for the backdrop entrance animation.
111
+ * Controls how the backdrop appears.
112
+ */
69
113
  bgInClass: {
70
114
  type: String,
71
115
  default: "fadeIn"
72
116
  },
117
+ /**
118
+ * CSS class for the backdrop exit animation.
119
+ * Controls how the backdrop disappears.
120
+ */
73
121
  bgOutClass: {
74
122
  type: String,
75
123
  default: "fadeOut"
76
124
  },
125
+ /**
126
+ * Target element to append the modal to.
127
+ * Usually 'body' for proper z-index stacking.
128
+ */
77
129
  appendTo: {
78
130
  type: String,
79
131
  default: "body"
80
132
  },
133
+ /**
134
+ * Whether the modal should be mounted immediately.
135
+ * Useful for modals that are always present in the DOM.
136
+ */
81
137
  live: {
82
138
  type: Boolean,
83
139
  default: false
84
140
  },
141
+ /**
142
+ * Whether the modal can be closed by user interaction.
143
+ * Controls close button visibility and backdrop click behavior.
144
+ */
85
145
  enableClose: {
86
146
  type: Boolean,
87
147
  default: true
88
148
  },
149
+ /**
150
+ * Controls the visibility of the modal (v-model).
151
+ * Supports two-way binding for modal state.
152
+ */
89
153
  modelValue: {
90
154
  type: Boolean,
91
155
  default: false
92
156
  },
157
+ /**
158
+ * Accessibility label for the close button.
159
+ * Used by screen readers for better accessibility.
160
+ */
93
161
  closeLabel: {
94
162
  type: String,
95
163
  default: "Close"
96
164
  },
165
+ /**
166
+ * Whether the modal content is disabled.
167
+ * Prevents user interaction with modal content.
168
+ */
97
169
  disabled: {
98
170
  type: Boolean,
99
171
  default: false
100
172
  },
173
+ /**
174
+ * Error message to display in the modal.
175
+ * Shows an error alert above the modal content.
176
+ */
101
177
  errorMsg: {
102
178
  type: String,
103
179
  default: ""
104
180
  },
181
+ /**
182
+ * Maximum width of the modal.
183
+ * Controls the responsive behavior of the modal.
184
+ */
105
185
  maxWidth: {
106
186
  type: String,
107
187
  default: "500px"
@@ -110,7 +190,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
110
190
  emits: ["before-open", "opening", "opened", "before-close", "closing", "closed", "update:modelValue", "click:overlay"],
111
191
  setup(__props, { emit: __emit }) {
112
192
  vue.useCssVars((_ctx) => ({
113
- "29225c6f": __props.maxWidth
193
+ "a8364442": __props.maxWidth
114
194
  }));
115
195
  let animatingZIndex = 0;
116
196
  const emit = __emit;
@@ -310,49 +390,51 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
310
390
  vue.createElementVNode("div", {
311
391
  ref: "pm",
312
392
  "data-pm-id": id.value,
313
- class: vue.normalizeClass([__props.modalBaseClass, __props.modalClass]),
393
+ class: vue.normalizeClass([__props.modalBaseClass, __props.modalClass, { "pb-6": !_ctx.$slots["modal-wrapper"] }]),
314
394
  style: vue.normalizeStyle(__props.modalStyle)
315
395
  }, [
316
- vue.renderSlot(_ctx.$slots, "title-wrapper", {}, () => [
317
- vue.createElementVNode("div", _hoisted_4, [
318
- __props.title ? (vue.openBlock(), vue.createElementBlock("h3", {
319
- key: 0,
320
- id: `${id.value}-title`,
321
- class: "mr-auto pt-4 text-xl font-semibold"
322
- }, vue.toDisplayString(__props.title), 9, _hoisted_5)) : vue.createCommentVNode("", true),
323
- vue.createElementVNode("div", _hoisted_6, [
324
- vue.createVNode(pCloseBtn, {
325
- disabled: __props.disabled,
326
- class: vue.normalizeClass({ invisible: !__props.enableClose }),
327
- "aria-label": __props.closeLabel,
328
- onClick: vue.withModifiers(close, ["prevent"])
329
- }, null, 8, ["disabled", "class", "aria-label"])
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
+ ])
330
412
  ])
331
- ])
332
- ], true),
333
- __props.errorMsg ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7, [
334
- vue.createVNode(pAlert_vue_vue_type_script_setup_true_lang._sfc_main, { type: "error" }, {
335
- default: vue.withCtx(() => [
336
- vue.createTextVNode(vue.toDisplayString(__props.errorMsg), 1)
337
- ]),
338
- _: 1
339
- })
340
- ])) : vue.createCommentVNode("", true),
341
- vue.renderSlot(_ctx.$slots, "content-wrapper", {}, () => [
342
- vue.createElementVNode("div", {
343
- id: `${id.value}-content`,
344
- class: vue.normalizeClass([
345
- "relative grow overflow-y-auto overflow-x-hidden px-8",
346
- { "pointer-events-none opacity-50": __props.disabled }
347
- ])
348
- }, [
349
- vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
350
- ], 10, _hoisted_8)
351
- ], true),
352
- vue.renderSlot(_ctx.$slots, "footer-wrapper", {}, () => [
353
- _ctx.$slots.footer ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_9, [
354
- vue.renderSlot(_ctx.$slots, "footer", {}, void 0, true)
355
- ])) : vue.createCommentVNode("", true)
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)
356
438
  ], true)
357
439
  ], 14, _hoisted_3)
358
440
  ], 46, _hoisted_2), [
@@ -365,5 +447,5 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
365
447
  };
366
448
  }
367
449
  });
368
- const pModal = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-a511ac01"]]);
450
+ const pModal = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-5c370dbc"]]);
369
451
  module.exports = pModal;
@@ -15,26 +15,51 @@ const getOffsetValues = (container) => {
15
15
  const _sfc_main = vue.defineComponent({
16
16
  name: "PSelectPill",
17
17
  props: {
18
+ /**
19
+ * The currently selected value (v-model).
20
+ * Should match one of the item values in the items array.
21
+ */
18
22
  modelValue: {
19
23
  type: [String, Number],
20
24
  default: ""
21
25
  },
26
+ /**
27
+ * Array of options to display as pills.
28
+ * Each option should have text, value, and optional subtext and disabled properties.
29
+ */
22
30
  items: {
23
31
  type: Array,
24
32
  default: () => []
25
33
  },
34
+ /**
35
+ * Property name to use as the item display text.
36
+ * Used for button label content.
37
+ */
26
38
  itemText: {
27
39
  type: String,
28
40
  default: "text"
29
41
  },
42
+ /**
43
+ * Property name to use as the item subtext.
44
+ * Displayed below the main text when provided.
45
+ */
30
46
  itemSubtext: {
31
47
  type: String,
32
48
  default: "subtext"
33
49
  },
50
+ /**
51
+ * Property name to use as the item value.
52
+ * Used for selection comparison and v-model binding.
53
+ */
34
54
  itemValue: {
35
55
  type: [String, Number],
36
56
  default: "value"
37
57
  },
58
+ /**
59
+ * The size of the pill buttons.
60
+ * Valid values: 'sm', 'md', 'lg'
61
+ * @values sm, md, lg
62
+ */
38
63
  size: {
39
64
  type: String,
40
65
  default: "md",
@@ -43,7 +68,13 @@ const _sfc_main = vue.defineComponent({
43
68
  }
44
69
  }
45
70
  },
46
- emits: ["update:modelValue"],
71
+ emits: {
72
+ /**
73
+ * Emitted when the selected value changes.
74
+ * @param {string | number} value - The new selected value
75
+ */
76
+ "update:modelValue": (value) => true
77
+ },
47
78
  data() {
48
79
  return {
49
80
  SIZES,
@@ -70,7 +101,10 @@ const _sfc_main = vue.defineComponent({
70
101
  methods: {
71
102
  click(e, option) {
72
103
  if (!option.disabled) {
73
- this.$emit("update:modelValue", option[this.itemValue]);
104
+ const value = option[this.itemValue];
105
+ if (typeof value === "string" || typeof value === "number") {
106
+ this.$emit("update:modelValue", value);
107
+ }
74
108
  }
75
109
  },
76
110
  setPillStyle() {
@@ -18,6 +18,10 @@ const hexToRgb = (hex) => `${hex.match(/\w\w/g)?.map((x) => +`0x${x}`)}`;
18
18
  const _sfc_main = vue.defineComponent({
19
19
  name: "PSkeletonLoader",
20
20
  props: {
21
+ /**
22
+ * The shape type of the skeleton loader.
23
+ * Determines the border radius and overall appearance.
24
+ */
21
25
  type: {
22
26
  type: String,
23
27
  default: LOADER_TYPES.rectangle,
@@ -25,14 +29,26 @@ const _sfc_main = vue.defineComponent({
25
29
  return Object.values(LOADER_TYPES).includes(value);
26
30
  }
27
31
  },
32
+ /**
33
+ * The background CSS class for the skeleton loader.
34
+ * Controls the base color of the loading placeholder.
35
+ */
28
36
  bgClass: {
29
37
  type: String,
30
38
  default: "bg-p-gray-30"
31
39
  },
40
+ /**
41
+ * Additional CSS classes to apply to the loader.
42
+ * Allows for custom styling beyond the default type-based classes.
43
+ */
32
44
  cssClass: {
33
45
  type: String,
34
46
  default: ""
35
47
  },
48
+ /**
49
+ * The color of the shimmer effect in hex format.
50
+ * Controls the color of the animated shimmer overlay.
51
+ */
36
52
  shimmerColor: {
37
53
  type: String,
38
54
  default: SHIMMER_COLOR
@@ -66,5 +82,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
66
82
  vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
67
83
  ], 2);
68
84
  }
69
- const PSkeletonLoader = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-3d77f34f"]]);
85
+ const PSkeletonLoader = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-1beaf57b"]]);
70
86
  module.exports = PSkeletonLoader;
@@ -8,6 +8,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
8
8
  },
9
9
  __name: "p-table-filter-icon",
10
10
  props: {
11
+ /**
12
+ * Whether the filter icon is active (filtered state).
13
+ */
11
14
  active: {
12
15
  type: Boolean,
13
16
  default: false
@@ -21,5 +24,5 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
21
24
  };
22
25
  }
23
26
  });
24
- const PTableFilterIcon = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-84864117"]]);
27
+ const PTableFilterIcon = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-5c047926"]]);
25
28
  module.exports = PTableFilterIcon;
@@ -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 truncate shrink`;
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: {
@@ -11,31 +11,60 @@ const _sfc_main = vue.defineComponent({
11
11
  PInfoIcon: pInfoIcon_vue_vue_type_script_setup_true_lang._sfc_main
12
12
  },
13
13
  props: {
14
+ /**
15
+ * The text content to display in the header cell.
16
+ * Also used as the title attribute for accessibility.
17
+ */
14
18
  text: {
15
19
  type: String,
16
20
  default: ""
17
21
  },
22
+ /**
23
+ * CSS classes to apply to the text element.
24
+ * Can be a string, object, or array for flexible styling.
25
+ */
18
26
  textClass: {
19
27
  type: [String, Object, Array],
20
28
  default: "text-left"
21
29
  },
30
+ /**
31
+ * Whether the filter icon is in an active state.
32
+ * Controls the visual appearance of the filter icon and text color.
33
+ */
22
34
  filterActive: {
23
35
  type: Boolean,
24
36
  default: false
25
37
  },
38
+ /**
39
+ * Whether to show the filter icon.
40
+ * When false, the filter icon is hidden regardless of other states.
41
+ */
26
42
  showFilterIcon: {
27
43
  type: Boolean,
28
44
  default: false
29
45
  },
46
+ /**
47
+ * Tooltip text to display when hovering over the info icon.
48
+ * When provided, shows an info icon with the tooltip content.
49
+ */
30
50
  tooltipText: {
31
51
  type: String,
32
52
  default: ""
33
53
  },
54
+ /**
55
+ * Custom text color to apply to the header text.
56
+ * Overrides the default text color when provided.
57
+ */
34
58
  textColor: {
35
59
  type: String,
36
60
  default: ""
37
61
  }
38
62
  },
63
+ /**
64
+ * Emitted when the filter icon is clicked.
65
+ * @param {Event} event - The click event
66
+ * @param {boolean} filterActive - The current filter active state
67
+ */
39
68
  emits: ["click-filter-icon"],
40
69
  data() {
41
70
  return {
@@ -69,7 +98,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
69
98
  vue.createElementVNode("div", {
70
99
  class: vue.normalizeClass([_ctx.DEFAULT_CLASSES, _ctx.textClass, _ctx.textColorClass, { "mr-auto": !_ctx.tooltipText }]),
71
100
  style: vue.normalizeStyle(_ctx.style),
72
- title: _ctx.text
101
+ title: _ctx.text,
102
+ "data-p-table-header-text": ""
73
103
  }, vue.toDisplayString(_ctx.text), 15, _hoisted_2),
74
104
  _ctx.tooltipText ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3, [
75
105
  _ctx.tooltipText ? (vue.openBlock(), vue.createBlock(_component_PInfoIcon, {
@@ -82,5 +82,5 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
82
82
  };
83
83
  }
84
84
  });
85
- const PTableTd = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-c9978e26"]]);
85
+ const PTableTd = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-9a0c95c7"]]);
86
86
  module.exports = PTableTd;
@@ -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;
@@ -35,22 +35,43 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
35
35
  },
36
36
  __name: "p-toggle",
37
37
  props: {
38
+ /**
39
+ * The current toggle state (v-model).
40
+ * Supports two-way binding for form inputs.
41
+ */
38
42
  modelValue: {
39
43
  type: Boolean,
40
44
  default: false
41
45
  },
46
+ /**
47
+ * Text label for the toggle switch.
48
+ * If not provided, you can use the label slot instead.
49
+ */
42
50
  label: {
43
51
  type: String,
44
52
  default: ""
45
53
  },
54
+ /**
55
+ * Error message to display below the toggle.
56
+ * When provided, the toggle will show error styling.
57
+ */
46
58
  errorMsg: {
47
59
  type: String,
48
60
  default: ""
49
61
  },
62
+ /**
63
+ * Whether the toggle is required.
64
+ * Adds required attribute and visual indicator.
65
+ */
50
66
  required: {
51
67
  type: Boolean,
52
68
  default: false
53
69
  },
70
+ /**
71
+ * The size of the toggle switch.
72
+ * Valid values: 'sm', 'md', 'lg'
73
+ * @values sm, md, lg
74
+ */
54
75
  size: {
55
76
  type: String,
56
77
  default: "md",
@@ -123,5 +144,5 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
123
144
  };
124
145
  }
125
146
  });
126
- const pToggle = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-c544a8a9"]]);
147
+ const pToggle = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-af725f56"]]);
127
148
  module.exports = pToggle;
@@ -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;