@pequity/squirrel 8.4.4 → 8.4.5

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 (151) hide show
  1. package/README.md +2 -1
  2. package/dist/cjs/chunks/p-alert.js +3 -0
  3. package/dist/cjs/chunks/p-avatar.js +16 -0
  4. package/dist/cjs/chunks/p-btn.js +3 -0
  5. package/dist/cjs/chunks/p-card.js +4 -0
  6. package/dist/cjs/chunks/p-dropdown-select.js +34 -0
  7. package/dist/cjs/chunks/p-input-number.js +32 -0
  8. package/dist/cjs/chunks/p-input-percent.js +13 -2
  9. package/dist/cjs/chunks/p-input.js +28 -0
  10. package/dist/cjs/chunks/p-pagination-info.js +9 -5
  11. package/dist/cjs/chunks/p-pagination.js +23 -13
  12. package/dist/cjs/chunks/p-select-btn.js +2 -1
  13. package/dist/cjs/chunks/p-select.js +33 -0
  14. package/dist/cjs/chunks/p-table-loader.js +20 -0
  15. package/dist/cjs/chunks/p-tabs.js +12 -0
  16. package/dist/cjs/chunks/p-textarea.js +20 -0
  17. package/dist/cjs/index.js +40 -3
  18. package/dist/cjs/p-checkbox.js +8 -1
  19. package/dist/cjs/p-chips.js +17 -1
  20. package/dist/cjs/p-close-btn.js +6 -1
  21. package/dist/cjs/p-drawer.js +90 -2
  22. package/dist/cjs/p-dropdown.js +2 -1
  23. package/dist/cjs/p-input-search.js +13 -1
  24. package/dist/cjs/p-loading.js +1 -1
  25. package/dist/cjs/p-modal.js +82 -2
  26. package/dist/cjs/p-select-pill.js +36 -2
  27. package/dist/cjs/p-skeleton-loader.js +17 -1
  28. package/dist/cjs/p-table-filter-icon.js +4 -1
  29. package/dist/cjs/p-table-header-cell.js +29 -0
  30. package/dist/cjs/p-table-td.js +1 -1
  31. package/dist/cjs/p-toggle.js +22 -1
  32. package/dist/es/chunks/p-alert.js +3 -0
  33. package/dist/es/chunks/p-avatar.js +16 -0
  34. package/dist/es/chunks/p-btn.js +3 -0
  35. package/dist/es/chunks/p-card.js +4 -0
  36. package/dist/es/chunks/p-dropdown-select.js +34 -0
  37. package/dist/es/chunks/p-input-number.js +32 -0
  38. package/dist/es/chunks/p-input-percent.js +13 -2
  39. package/dist/es/chunks/p-input.js +28 -0
  40. package/dist/es/chunks/p-pagination-info.js +9 -5
  41. package/dist/es/chunks/p-pagination.js +24 -14
  42. package/dist/es/chunks/p-select-btn.js +2 -1
  43. package/dist/es/chunks/p-select.js +33 -0
  44. package/dist/es/chunks/p-table-loader.js +20 -0
  45. package/dist/es/chunks/p-tabs.js +12 -0
  46. package/dist/es/chunks/p-textarea.js +20 -0
  47. package/dist/es/index.js +40 -3
  48. package/dist/es/p-checkbox.js +8 -1
  49. package/dist/es/p-chips.js +17 -1
  50. package/dist/es/p-close-btn.js +6 -1
  51. package/dist/es/p-drawer.js +90 -2
  52. package/dist/es/p-dropdown.js +2 -1
  53. package/dist/es/p-input-search.js +13 -1
  54. package/dist/es/p-loading.js +1 -1
  55. package/dist/es/p-modal.js +82 -2
  56. package/dist/es/p-select-pill.js +36 -2
  57. package/dist/es/p-skeleton-loader.js +17 -1
  58. package/dist/es/p-table-filter-icon.js +4 -1
  59. package/dist/es/p-table-header-cell.js +29 -0
  60. package/dist/es/p-table-td.js +1 -1
  61. package/dist/es/p-toggle.js +22 -1
  62. package/dist/squirrel/components/p-action-bar/p-action-bar.vue.d.ts +14 -2
  63. package/dist/squirrel/components/p-alert/p-alert.vue.d.ts +16 -3
  64. package/dist/squirrel/components/p-avatar/p-avatar.vue.d.ts +35 -0
  65. package/dist/squirrel/components/p-btn/p-btn.vue.d.ts +18 -2
  66. package/dist/squirrel/components/p-card/p-card.vue.d.ts +20 -7
  67. package/dist/squirrel/components/p-checkbox/p-checkbox.vue.d.ts +25 -7
  68. package/dist/squirrel/components/p-chips/p-chips.vue.d.ts +24 -0
  69. package/dist/squirrel/components/p-close-btn/p-close-btn.vue.d.ts +13 -0
  70. package/dist/squirrel/components/p-date-picker/p-date-picker.vue.d.ts +16 -0
  71. package/dist/squirrel/components/p-drawer/p-drawer.vue.d.ts +141 -3
  72. package/dist/squirrel/components/p-dropdown/p-dropdown.vue.d.ts +11 -2
  73. package/dist/squirrel/components/p-dropdown-select/p-dropdown-select.vue.d.ts +69 -1
  74. package/dist/squirrel/components/p-file-upload/p-file-upload.vue.d.ts +70 -6
  75. package/dist/squirrel/components/p-icon/p-icon.vue.d.ts +4 -0
  76. package/dist/squirrel/components/p-info-icon/p-info-icon.vue.d.ts +11 -4
  77. package/dist/squirrel/components/p-inline-date-picker/p-inline-date-picker.vue.d.ts +27 -7
  78. package/dist/squirrel/components/p-input/p-input.vue.d.ts +73 -8
  79. package/dist/squirrel/components/p-input-number/p-input-number.vue.d.ts +83 -12
  80. package/dist/squirrel/components/p-input-percent/p-input-percent.vue.d.ts +22 -2
  81. package/dist/squirrel/components/p-input-search/p-input-search.vue.d.ts +24 -0
  82. package/dist/squirrel/components/p-modal/p-modal.vue.d.ts +185 -15
  83. package/dist/squirrel/components/p-pagination/p-pagination.vue.d.ts +22 -12
  84. package/dist/squirrel/components/p-pagination-info/p-pagination-info.vue.d.ts +16 -8
  85. package/dist/squirrel/components/p-progress-bar/p-progress-bar.vue.d.ts +20 -0
  86. package/dist/squirrel/components/p-ring-loader/p-ring-loader.vue.d.ts +10 -0
  87. package/dist/squirrel/components/p-select/p-select.vue.d.ts +76 -6
  88. package/dist/squirrel/components/p-select-btn/p-select-btn.vue.d.ts +67 -10
  89. package/dist/squirrel/components/p-select-list/p-select-list.vue.d.ts +1 -1
  90. package/dist/squirrel/components/p-select-pill/p-select-pill.vue.d.ts +72 -2
  91. package/dist/squirrel/components/p-skeleton-loader/p-skeleton-loader.vue.d.ts +40 -0
  92. package/dist/squirrel/components/p-steps/p-steps.vue.d.ts +12 -0
  93. package/dist/squirrel/components/p-table/p-table.vue.d.ts +32 -0
  94. package/dist/squirrel/components/p-table-header-cell/p-table-filter-icon.vue.d.ts +6 -0
  95. package/dist/squirrel/components/p-table-header-cell/p-table-header-cell.vue.d.ts +56 -1
  96. package/dist/squirrel/components/p-table-loader/p-table-loader.vue.d.ts +40 -0
  97. package/dist/squirrel/components/p-table-sort/p-table-sort.vue.d.ts +12 -2
  98. package/dist/squirrel/components/p-table-td/p-table-td.vue.d.ts +12 -0
  99. package/dist/squirrel/components/p-tabs/p-tabs.vue.d.ts +33 -2
  100. package/dist/squirrel/components/p-tabs-pills/p-tabs-pills.vue.d.ts +22 -0
  101. package/dist/squirrel/components/p-textarea/p-textarea.vue.d.ts +52 -8
  102. package/dist/squirrel/components/p-toggle/p-toggle.vue.d.ts +50 -3
  103. package/dist/squirrel.css +68 -68
  104. package/package.json +15 -15
  105. package/squirrel/components/p-action-bar/p-action-bar.stories.js +5 -5
  106. package/squirrel/components/p-action-bar/p-action-bar.vue +30 -3
  107. package/squirrel/components/p-alert/p-alert.vue +24 -0
  108. package/squirrel/components/p-avatar/p-avatar.vue +28 -0
  109. package/squirrel/components/p-btn/p-btn.vue +35 -0
  110. package/squirrel/components/p-card/p-card.vue +24 -1
  111. package/squirrel/components/p-checkbox/p-checkbox.vue +23 -1
  112. package/squirrel/components/p-chips/p-chips.vue +24 -0
  113. package/squirrel/components/p-close-btn/p-close-btn.vue +15 -0
  114. package/squirrel/components/p-date-picker/p-date-picker.vue +23 -1
  115. package/squirrel/components/p-drawer/p-drawer.vue +95 -0
  116. package/squirrel/components/p-dropdown/p-dropdown.vue +12 -1
  117. package/squirrel/components/p-dropdown-select/p-dropdown-select.vue +41 -0
  118. package/squirrel/components/p-file-upload/p-file-upload.vue +58 -3
  119. package/squirrel/components/p-icon/p-icon.vue +16 -0
  120. package/squirrel/components/p-info-icon/p-info-icon.vue +19 -0
  121. package/squirrel/components/p-inline-date-picker/p-inline-date-picker.vue +32 -0
  122. package/squirrel/components/p-input/p-input.vue +61 -1
  123. package/squirrel/components/p-input-number/p-input-number.vue +78 -1
  124. package/squirrel/components/p-input-percent/p-input-percent.vue +27 -3
  125. package/squirrel/components/p-input-search/p-input-search.vue +30 -2
  126. package/squirrel/components/p-link/p-link.vue +13 -0
  127. package/squirrel/components/p-loading/p-loading.vue +9 -2
  128. package/squirrel/components/p-modal/p-modal.vue +138 -2
  129. package/squirrel/components/p-pagination/p-pagination.vue +28 -8
  130. package/squirrel/components/p-pagination-info/p-pagination-info.vue +16 -4
  131. package/squirrel/components/p-progress-bar/p-progress-bar.vue +31 -4
  132. package/squirrel/components/p-ring-loader/p-ring-loader.vue +17 -0
  133. package/squirrel/components/p-select/p-select.vue +50 -1
  134. package/squirrel/components/p-select-btn/p-select-btn.vue +90 -2
  135. package/squirrel/components/p-select-list/p-select-list.vue +7 -0
  136. package/squirrel/components/p-select-pill/p-select-pill.vue +52 -2
  137. package/squirrel/components/p-skeleton-loader/p-skeleton-loader.vue +24 -0
  138. package/squirrel/components/p-steps/p-steps.vue +25 -0
  139. package/squirrel/components/p-table/p-table.vue +39 -0
  140. package/squirrel/components/p-table-header-cell/p-table-filter-icon.vue +9 -0
  141. package/squirrel/components/p-table-header-cell/p-table-header-cell.vue +36 -0
  142. package/squirrel/components/p-table-loader/p-table-loader.vue +28 -0
  143. package/squirrel/components/p-table-sort/p-table-sort.vue +19 -1
  144. package/squirrel/components/p-table-td/p-table-td.vue +20 -0
  145. package/squirrel/components/p-tabs/p-tabs.stories.js +2 -2
  146. package/squirrel/components/p-tabs/p-tabs.vue +33 -1
  147. package/squirrel/components/p-tabs-pills/p-tabs-pills.vue +33 -0
  148. package/squirrel/components/p-textarea/p-textarea.vue +43 -1
  149. package/squirrel/components/p-toggle/p-toggle.vue +44 -1
  150. package/squirrel/assets/pagination-left-icon.svg +0 -5
  151. package/squirrel/assets/pagination-right-icon.svg +0 -5
@@ -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;
@@ -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 {
@@ -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;
@@ -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;
@@ -14,6 +14,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
14
14
  },
15
15
  __name: "p-alert",
16
16
  props: {
17
+ /**
18
+ * The type of the alert which determines its appearance and icon
19
+ */
17
20
  type: {
18
21
  type: String,
19
22
  default: "info",
@@ -11,23 +11,39 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
11
11
  },
12
12
  __name: "p-avatar",
13
13
  props: {
14
+ /**
15
+ * The shape of the avatar
16
+ */
14
17
  shape: {
15
18
  type: String,
16
19
  default: "circle",
17
20
  validator: (value) => SHAPES.includes(value)
18
21
  },
22
+ /**
23
+ * URL of the image to display
24
+ */
19
25
  imageSrc: {
20
26
  type: String,
21
27
  default: ""
22
28
  },
29
+ /**
30
+ * Text to display when image is not available
31
+ * Also used as the alt text for the image
32
+ */
23
33
  label: {
24
34
  type: String,
25
35
  required: true
26
36
  },
37
+ /**
38
+ * Additional CSS classes to apply to the image
39
+ */
27
40
  imageClass: {
28
41
  type: String,
29
42
  default: ""
30
43
  },
44
+ /**
45
+ * Additional CSS classes to apply to the label container
46
+ */
31
47
  labelClass: {
32
48
  type: String,
33
49
  default: ""
@@ -137,6 +137,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
137
137
  type: String,
138
138
  default: ""
139
139
  },
140
+ /**
141
+ * The icon to display on the right side of the button
142
+ */
140
143
  iconRight: {
141
144
  type: String,
142
145
  default: ""
@@ -5,6 +5,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
5
5
  ...{ name: "PCard" },
6
6
  __name: "p-card",
7
7
  props: {
8
+ /**
9
+ * The title of the card - displayed at the top
10
+ * If not provided, you can use the title slot instead
11
+ */
8
12
  title: {
9
13
  type: String,
10
14
  default: ""
@@ -48,6 +48,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
48
48
  },
49
49
  __name: "p-dropdown-select",
50
50
  props: {
51
+ /**
52
+ * The selected value(s) for the dropdown (v-model).
53
+ * Can be a single value or array of values depending on multiple prop.
54
+ */
51
55
  modelValue: {
52
56
  type: [String, Number, Boolean, Array, Object],
53
57
  default: null
@@ -69,18 +73,30 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
69
73
  type: Array,
70
74
  default: () => []
71
75
  },
76
+ /**
77
+ * Label text displayed above the dropdown.
78
+ */
72
79
  label: {
73
80
  type: String,
74
81
  default: ""
75
82
  },
83
+ /**
84
+ * Error message to display below the dropdown.
85
+ */
76
86
  errorMsg: {
77
87
  type: String,
78
88
  default: ""
79
89
  },
90
+ /**
91
+ * Whether the field is required.
92
+ */
80
93
  required: {
81
94
  type: Boolean,
82
95
  default: false
83
96
  },
97
+ /**
98
+ * The size of the dropdown component.
99
+ */
84
100
  size: {
85
101
  type: String,
86
102
  default: "md",
@@ -117,26 +133,44 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
117
133
  type: Number,
118
134
  default: 7
119
135
  },
136
+ /**
137
+ * Additional attributes to apply to the dropdown menu.
138
+ */
120
139
  dropdownMenuAttrs: {
121
140
  type: Object,
122
141
  default: () => ({})
123
142
  },
143
+ /**
144
+ * CSS classes to apply to the dropdown menu.
145
+ */
124
146
  dropdownMenuClass: {
125
147
  type: String,
126
148
  default: "overflow-x-hidden"
127
149
  },
150
+ /**
151
+ * Inline styles to apply to the dropdown menu.
152
+ */
128
153
  dropdownMenuStyle: {
129
154
  type: Object,
130
155
  default: () => ({})
131
156
  },
157
+ /**
158
+ * Props to pass to the underlying PDropdown component.
159
+ */
132
160
  pDropdownProps: {
133
161
  type: Object,
134
162
  default: () => ({})
135
163
  },
164
+ /**
165
+ * Whether to enable search functionality within the dropdown.
166
+ */
136
167
  searchable: {
137
168
  type: Boolean,
138
169
  default: false
139
170
  },
171
+ /**
172
+ * Whether to show a clear button when items are selected.
173
+ */
140
174
  clearable: {
141
175
  type: Boolean,
142
176
  default: false
@@ -16,22 +16,42 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
16
16
  },
17
17
  __name: "p-input-number",
18
18
  props: {
19
+ /**
20
+ * The current numeric value of the input (v-model).
21
+ * Supports two-way binding for form inputs.
22
+ */
19
23
  modelValue: {
20
24
  type: [Number, String],
21
25
  default: null
22
26
  },
27
+ /**
28
+ * Text label for the input field.
29
+ * If not provided, you can use the label slot instead.
30
+ */
23
31
  label: {
24
32
  type: String,
25
33
  default: ""
26
34
  },
35
+ /**
36
+ * Error message to display below the input.
37
+ * When provided, the input will show error styling.
38
+ */
27
39
  errorMsg: {
28
40
  type: String,
29
41
  default: ""
30
42
  },
43
+ /**
44
+ * Whether the input is required.
45
+ * Adds required attribute and visual indicator.
46
+ */
31
47
  required: {
32
48
  type: Boolean,
33
49
  default: false
34
50
  },
51
+ /**
52
+ * The size of the input - affects padding, font size, and spacing.
53
+ * Valid values: 'sm', 'md', 'lg'
54
+ */
35
55
  size: {
36
56
  type: String,
37
57
  default: "md",
@@ -39,14 +59,26 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
39
59
  return SIZES.includes(value);
40
60
  }
41
61
  },
62
+ /**
63
+ * Whether to select all text when the input receives focus.
64
+ * Provides better UX for number input fields.
65
+ */
42
66
  selectOnClick: {
43
67
  type: Boolean,
44
68
  default: true
45
69
  },
70
+ /**
71
+ * Text for the info tooltip displayed next to the label.
72
+ * Uses PInfoIcon component for consistent tooltip styling.
73
+ */
46
74
  tooltipText: {
47
75
  type: String,
48
76
  default: ""
49
77
  },
78
+ /**
79
+ * String to display as prefix in the input field.
80
+ * Can be overridden by the prefix slot for custom content.
81
+ */
50
82
  prefixString: {
51
83
  type: String,
52
84
  default: ""
@@ -1,5 +1,6 @@
1
1
  import { defineComponent, computed, createBlock, openBlock, withCtx, createElementVNode, normalizeClass } from "vue";
2
2
  import { _ as _sfc_main$1 } from "./p-input-number.js";
3
+ import { toNumberOrNull } from "../number.js";
3
4
  import { isNumber } from "lodash-es";
4
5
  const _sfc_main = /* @__PURE__ */ defineComponent({
5
6
  ...{
@@ -7,10 +8,20 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
7
8
  },
8
9
  __name: "p-input-percent",
9
10
  props: {
11
+ /**
12
+ * The current value (v-model).
13
+ * Stored as a decimal (0.5 = 50%) but displayed as a percentage.
14
+ * Supports two-way binding for form inputs.
15
+ */
10
16
  modelValue: {
11
17
  type: [Number, String],
12
18
  default: null
13
19
  },
20
+ /**
21
+ * The size of the input field.
22
+ * Valid values: 'sm', 'md', 'lg'
23
+ * @values sm, md, lg
24
+ */
14
25
  size: {
15
26
  type: String,
16
27
  default: "md"
@@ -26,8 +37,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
26
37
  const props = __props;
27
38
  const emit = __emit;
28
39
  const convertedValue = computed({
29
- get: () => isNumber(props.modelValue) ? props.modelValue * 100 : props.modelValue,
30
- set: (nV) => emit("update:modelValue", isNumber(nV) ? nV / 100 : nV)
40
+ get: () => isNumber(props.modelValue) ? props.modelValue * 100 : toNumberOrNull(props.modelValue),
41
+ set: (nV) => emit("update:modelValue", isNumber(nV) ? nV / 100 : toNumberOrNull(nV))
31
42
  });
32
43
  return (_ctx, _cache) => {
33
44
  return openBlock(), createBlock(_sfc_main$1, {
@@ -14,10 +14,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
14
14
  },
15
15
  __name: "p-input",
16
16
  props: {
17
+ /**
18
+ * The current value of the input (v-model).
19
+ * Supports two-way binding for form inputs.
20
+ */
17
21
  modelValue: {
18
22
  type: [String, Number, Boolean, null],
19
23
  default: ""
20
24
  },
25
+ /**
26
+ * The type of the input field.
27
+ * Valid values: 'text', 'password'
28
+ */
21
29
  type: {
22
30
  type: String,
23
31
  default: INPUT_TYPES.TEXT,
@@ -25,18 +33,34 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
25
33
  return Object.values(INPUT_TYPES).includes(value);
26
34
  }
27
35
  },
36
+ /**
37
+ * Text label for the input field.
38
+ * If not provided, you can use the label slot instead.
39
+ */
28
40
  label: {
29
41
  type: String,
30
42
  default: ""
31
43
  },
44
+ /**
45
+ * Error message to display below the input.
46
+ * When provided, the input will show error styling.
47
+ */
32
48
  errorMsg: {
33
49
  type: String,
34
50
  default: ""
35
51
  },
52
+ /**
53
+ * Whether the input is required.
54
+ * Adds required attribute and visual indicator.
55
+ */
36
56
  required: {
37
57
  type: Boolean,
38
58
  default: false
39
59
  },
60
+ /**
61
+ * The size of the input - affects padding, font size, and spacing.
62
+ * Valid values: 'sm', 'md', 'lg'
63
+ */
40
64
  size: {
41
65
  type: String,
42
66
  default: "md",
@@ -44,6 +68,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
44
68
  return SIZES.includes(value);
45
69
  }
46
70
  },
71
+ /**
72
+ * Whether the input has rounded corners.
73
+ * Applies rounded styling to the input field.
74
+ */
47
75
  rounded: {
48
76
  type: Boolean,
49
77
  default: false
@@ -9,28 +9,32 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
9
9
  __name: "p-pagination-info",
10
10
  props: {
11
11
  /**
12
- * The current page.
12
+ * The current page number (1-based).
13
+ * Used to calculate the starting item number in the display range.
13
14
  */
14
15
  currentPage: {
15
16
  type: Number,
16
17
  default: 0
17
18
  },
18
19
  /**
19
- * The amount of data pagination iterates through.
20
+ * The total number of items across all pages.
21
+ * Used to calculate the total count and ending item number.
20
22
  */
21
23
  count: {
22
24
  type: Number,
23
25
  default: 0
24
26
  },
25
27
  /**
26
- * The amount of data to be displayed at 1 page. Used to calculate the `from` and `to` limits.
28
+ * The number of items displayed per page.
29
+ * Used to calculate the `from` and `to` limits for the current page.
27
30
  */
28
31
  pageSize: {
29
32
  type: Number,
30
33
  default: 0
31
34
  },
32
35
  /**
33
- * Whether the pagination is loading.
36
+ * Whether the pagination data is loading.
37
+ * When true, shows a skeleton loader instead of the info text.
34
38
  */
35
39
  loading: {
36
40
  type: Boolean,
@@ -56,7 +60,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
56
60
  __props.count ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
57
61
  createTextVNode("Showing " + toDisplayString(from.value) + " to " + toDisplayString(to.value) + " of " + toDisplayString(__props.count) + " results", 1)
58
62
  ], 64)) : renderSlot(_ctx.$slots, "no-results", { key: 1 }, () => [
59
- _cache[0] || (_cache[0] = createTextVNode("No results found"))
63
+ _cache[0] || (_cache[0] = createTextVNode("No results found", -1))
60
64
  ])
61
65
  ]));
62
66
  };