@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
package/README.md CHANGED
@@ -151,7 +151,8 @@ Commit messages have to follow the commit message format when contributing.
151
151
  ---
152
152
 
153
153
  When adding a new component to the library, please make sure to add unit tests and Storybook stories for it.
154
- We strive to maintain a high level of code quality and test coverage in this project.
154
+ All components must be documented with comprehensive JSDoc comments following the `vue-component-meta` standards.
155
+ We strive to maintain a high level of code quality, test coverage, and documentation in this project.
155
156
 
156
157
  ## Project setup for development
157
158
 
@@ -15,6 +15,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
15
15
  },
16
16
  __name: "p-alert",
17
17
  props: {
18
+ /**
19
+ * The type of the alert which determines its appearance and icon
20
+ */
18
21
  type: {
19
22
  type: String,
20
23
  default: "info",
@@ -12,23 +12,39 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
12
12
  },
13
13
  __name: "p-avatar",
14
14
  props: {
15
+ /**
16
+ * The shape of the avatar
17
+ */
15
18
  shape: {
16
19
  type: String,
17
20
  default: "circle",
18
21
  validator: (value) => SHAPES.includes(value)
19
22
  },
23
+ /**
24
+ * URL of the image to display
25
+ */
20
26
  imageSrc: {
21
27
  type: String,
22
28
  default: ""
23
29
  },
30
+ /**
31
+ * Text to display when image is not available
32
+ * Also used as the alt text for the image
33
+ */
24
34
  label: {
25
35
  type: String,
26
36
  required: true
27
37
  },
38
+ /**
39
+ * Additional CSS classes to apply to the image
40
+ */
28
41
  imageClass: {
29
42
  type: String,
30
43
  default: ""
31
44
  },
45
+ /**
46
+ * Additional CSS classes to apply to the label container
47
+ */
32
48
  labelClass: {
33
49
  type: String,
34
50
  default: ""
@@ -138,6 +138,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
138
138
  type: String,
139
139
  default: ""
140
140
  },
141
+ /**
142
+ * The icon to display on the right side of the button
143
+ */
141
144
  iconRight: {
142
145
  type: String,
143
146
  default: ""
@@ -6,6 +6,10 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
6
6
  ...{ name: "PCard" },
7
7
  __name: "p-card",
8
8
  props: {
9
+ /**
10
+ * The title of the card - displayed at the top
11
+ * If not provided, you can use the title slot instead
12
+ */
9
13
  title: {
10
14
  type: String,
11
15
  default: ""
@@ -49,6 +49,10 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
49
49
  },
50
50
  __name: "p-dropdown-select",
51
51
  props: {
52
+ /**
53
+ * The selected value(s) for the dropdown (v-model).
54
+ * Can be a single value or array of values depending on multiple prop.
55
+ */
52
56
  modelValue: {
53
57
  type: [String, Number, Boolean, Array, Object],
54
58
  default: null
@@ -70,18 +74,30 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
70
74
  type: Array,
71
75
  default: () => []
72
76
  },
77
+ /**
78
+ * Label text displayed above the dropdown.
79
+ */
73
80
  label: {
74
81
  type: String,
75
82
  default: ""
76
83
  },
84
+ /**
85
+ * Error message to display below the dropdown.
86
+ */
77
87
  errorMsg: {
78
88
  type: String,
79
89
  default: ""
80
90
  },
91
+ /**
92
+ * Whether the field is required.
93
+ */
81
94
  required: {
82
95
  type: Boolean,
83
96
  default: false
84
97
  },
98
+ /**
99
+ * The size of the dropdown component.
100
+ */
85
101
  size: {
86
102
  type: String,
87
103
  default: "md",
@@ -118,26 +134,44 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
118
134
  type: Number,
119
135
  default: 7
120
136
  },
137
+ /**
138
+ * Additional attributes to apply to the dropdown menu.
139
+ */
121
140
  dropdownMenuAttrs: {
122
141
  type: Object,
123
142
  default: () => ({})
124
143
  },
144
+ /**
145
+ * CSS classes to apply to the dropdown menu.
146
+ */
125
147
  dropdownMenuClass: {
126
148
  type: String,
127
149
  default: "overflow-x-hidden"
128
150
  },
151
+ /**
152
+ * Inline styles to apply to the dropdown menu.
153
+ */
129
154
  dropdownMenuStyle: {
130
155
  type: Object,
131
156
  default: () => ({})
132
157
  },
158
+ /**
159
+ * Props to pass to the underlying PDropdown component.
160
+ */
133
161
  pDropdownProps: {
134
162
  type: Object,
135
163
  default: () => ({})
136
164
  },
165
+ /**
166
+ * Whether to enable search functionality within the dropdown.
167
+ */
137
168
  searchable: {
138
169
  type: Boolean,
139
170
  default: false
140
171
  },
172
+ /**
173
+ * Whether to show a clear button when items are selected.
174
+ */
141
175
  clearable: {
142
176
  type: Boolean,
143
177
  default: false
@@ -17,22 +17,42 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
17
17
  },
18
18
  __name: "p-input-number",
19
19
  props: {
20
+ /**
21
+ * The current numeric value of the input (v-model).
22
+ * Supports two-way binding for form inputs.
23
+ */
20
24
  modelValue: {
21
25
  type: [Number, String],
22
26
  default: null
23
27
  },
28
+ /**
29
+ * Text label for the input field.
30
+ * If not provided, you can use the label slot instead.
31
+ */
24
32
  label: {
25
33
  type: String,
26
34
  default: ""
27
35
  },
36
+ /**
37
+ * Error message to display below the input.
38
+ * When provided, the input will show error styling.
39
+ */
28
40
  errorMsg: {
29
41
  type: String,
30
42
  default: ""
31
43
  },
44
+ /**
45
+ * Whether the input is required.
46
+ * Adds required attribute and visual indicator.
47
+ */
32
48
  required: {
33
49
  type: Boolean,
34
50
  default: false
35
51
  },
52
+ /**
53
+ * The size of the input - affects padding, font size, and spacing.
54
+ * Valid values: 'sm', 'md', 'lg'
55
+ */
36
56
  size: {
37
57
  type: String,
38
58
  default: "md",
@@ -40,14 +60,26 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
40
60
  return pBtn_types.SIZES.includes(value);
41
61
  }
42
62
  },
63
+ /**
64
+ * Whether to select all text when the input receives focus.
65
+ * Provides better UX for number input fields.
66
+ */
43
67
  selectOnClick: {
44
68
  type: Boolean,
45
69
  default: true
46
70
  },
71
+ /**
72
+ * Text for the info tooltip displayed next to the label.
73
+ * Uses PInfoIcon component for consistent tooltip styling.
74
+ */
47
75
  tooltipText: {
48
76
  type: String,
49
77
  default: ""
50
78
  },
79
+ /**
80
+ * String to display as prefix in the input field.
81
+ * Can be overridden by the prefix slot for custom content.
82
+ */
51
83
  prefixString: {
52
84
  type: String,
53
85
  default: ""
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  const vue = require("vue");
3
3
  const pInputNumber_vue_vue_type_script_setup_true_lang = require("./p-input-number.js");
4
+ const number = require("../number.js");
4
5
  const lodashEs = require("lodash-es");
5
6
  const _sfc_main = /* @__PURE__ */ vue.defineComponent({
6
7
  ...{
@@ -8,10 +9,20 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
8
9
  },
9
10
  __name: "p-input-percent",
10
11
  props: {
12
+ /**
13
+ * The current value (v-model).
14
+ * Stored as a decimal (0.5 = 50%) but displayed as a percentage.
15
+ * Supports two-way binding for form inputs.
16
+ */
11
17
  modelValue: {
12
18
  type: [Number, String],
13
19
  default: null
14
20
  },
21
+ /**
22
+ * The size of the input field.
23
+ * Valid values: 'sm', 'md', 'lg'
24
+ * @values sm, md, lg
25
+ */
15
26
  size: {
16
27
  type: String,
17
28
  default: "md"
@@ -27,8 +38,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
27
38
  const props = __props;
28
39
  const emit = __emit;
29
40
  const convertedValue = vue.computed({
30
- get: () => lodashEs.isNumber(props.modelValue) ? props.modelValue * 100 : props.modelValue,
31
- set: (nV) => emit("update:modelValue", lodashEs.isNumber(nV) ? nV / 100 : nV)
41
+ get: () => lodashEs.isNumber(props.modelValue) ? props.modelValue * 100 : number.toNumberOrNull(props.modelValue),
42
+ set: (nV) => emit("update:modelValue", lodashEs.isNumber(nV) ? nV / 100 : number.toNumberOrNull(nV))
32
43
  });
33
44
  return (_ctx, _cache) => {
34
45
  return vue.openBlock(), vue.createBlock(pInputNumber_vue_vue_type_script_setup_true_lang._sfc_main, {
@@ -15,10 +15,18 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
15
15
  },
16
16
  __name: "p-input",
17
17
  props: {
18
+ /**
19
+ * The current value of the input (v-model).
20
+ * Supports two-way binding for form inputs.
21
+ */
18
22
  modelValue: {
19
23
  type: [String, Number, Boolean, null],
20
24
  default: ""
21
25
  },
26
+ /**
27
+ * The type of the input field.
28
+ * Valid values: 'text', 'password'
29
+ */
22
30
  type: {
23
31
  type: String,
24
32
  default: INPUT_TYPES.TEXT,
@@ -26,18 +34,34 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
26
34
  return Object.values(INPUT_TYPES).includes(value);
27
35
  }
28
36
  },
37
+ /**
38
+ * Text label for the input field.
39
+ * If not provided, you can use the label slot instead.
40
+ */
29
41
  label: {
30
42
  type: String,
31
43
  default: ""
32
44
  },
45
+ /**
46
+ * Error message to display below the input.
47
+ * When provided, the input will show error styling.
48
+ */
33
49
  errorMsg: {
34
50
  type: String,
35
51
  default: ""
36
52
  },
53
+ /**
54
+ * Whether the input is required.
55
+ * Adds required attribute and visual indicator.
56
+ */
37
57
  required: {
38
58
  type: Boolean,
39
59
  default: false
40
60
  },
61
+ /**
62
+ * The size of the input - affects padding, font size, and spacing.
63
+ * Valid values: 'sm', 'md', 'lg'
64
+ */
41
65
  size: {
42
66
  type: String,
43
67
  default: "md",
@@ -45,6 +69,10 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
45
69
  return pBtn_types.SIZES.includes(value);
46
70
  }
47
71
  },
72
+ /**
73
+ * Whether the input has rounded corners.
74
+ * Applies rounded styling to the input field.
75
+ */
48
76
  rounded: {
49
77
  type: Boolean,
50
78
  default: false
@@ -10,28 +10,32 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
10
10
  __name: "p-pagination-info",
11
11
  props: {
12
12
  /**
13
- * The current page.
13
+ * The current page number (1-based).
14
+ * Used to calculate the starting item number in the display range.
14
15
  */
15
16
  currentPage: {
16
17
  type: Number,
17
18
  default: 0
18
19
  },
19
20
  /**
20
- * The amount of data pagination iterates through.
21
+ * The total number of items across all pages.
22
+ * Used to calculate the total count and ending item number.
21
23
  */
22
24
  count: {
23
25
  type: Number,
24
26
  default: 0
25
27
  },
26
28
  /**
27
- * The amount of data to be displayed at 1 page. Used to calculate the `from` and `to` limits.
29
+ * The number of items displayed per page.
30
+ * Used to calculate the `from` and `to` limits for the current page.
28
31
  */
29
32
  pageSize: {
30
33
  type: Number,
31
34
  default: 0
32
35
  },
33
36
  /**
34
- * Whether the pagination is loading.
37
+ * Whether the pagination data is loading.
38
+ * When true, shows a skeleton loader instead of the info text.
35
39
  */
36
40
  loading: {
37
41
  type: Boolean,
@@ -57,7 +61,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
57
61
  __props.count ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
58
62
  vue.createTextVNode("Showing " + vue.toDisplayString(from.value) + " to " + vue.toDisplayString(to.value) + " of " + vue.toDisplayString(__props.count) + " results", 1)
59
63
  ], 64)) : vue.renderSlot(_ctx.$slots, "no-results", { key: 1 }, () => [
60
- _cache[0] || (_cache[0] = vue.createTextVNode("No results found"))
64
+ _cache[0] || (_cache[0] = vue.createTextVNode("No results found", -1))
61
65
  ])
62
66
  ]));
63
67
  };
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  const vue = require("vue");
3
+ const pIcon_vue_vue_type_script_setup_true_lang = require("./p-icon.js");
3
4
  const pSkeletonLoader = require("../p-skeleton-loader.js");
4
5
  const pagination = require("../pagination.js");
5
- const _imports_0 = "data:image/svg+xml,%3csvg%20width='8'%20height='12'%20viewBox='0%200%208%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0.25%205.99968C0.25%205.64968%200.4%205.34968%200.65%205.14968L6.25%200.249681C6.65%20-0.100319%207.2%20-0.0503187%207.55%200.349681C7.85%200.749681%207.85%201.29968%207.45%201.59968L2.55%205.89968C2.5%205.94968%202.5%205.99968%202.55%206.04968L7.45%2010.3497C7.85%2010.6997%207.9%2011.2497%207.55%2011.6497C7.2%2012.0497%206.65%2012.0997%206.25%2011.7497C6.25%2011.7497%206.25%2011.7497%206.2%2011.6997L0.65%206.84968C0.4%206.64968%200.25%206.29968%200.25%205.99968Z'%20fill='%23918da1'%20/%3e%3c/svg%3e";
6
- const _imports_1 = "data:image/svg+xml,%3csvg%20width='8'%20height='14'%20viewBox='0%200%208%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M7.75695%206.98136C7.75695%207.33136%207.60695%207.63136%207.35695%207.83136L1.75695%2012.7814C1.35695%2013.1314%200.756947%2013.0814%200.456947%2012.6814C0.156947%2012.2814%200.156947%2011.7314%200.556947%2011.3814L5.45695%207.08136C5.50695%207.03136%205.50695%206.98136%205.45695%206.88136L0.556947%202.58136C0.156947%202.23136%200.156947%201.63136%200.506947%201.28136C0.856947%200.931361%201.40695%200.881361%201.80695%201.18136L7.40695%206.08136C7.60695%206.33136%207.75695%206.63136%207.75695%206.98136Z'%20fill='%23918da1'%20/%3e%3c/svg%3e";
7
6
  const _hoisted_1 = {
8
7
  key: 1,
9
8
  class: "flex text-p-gray-40"
@@ -22,35 +21,40 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
22
21
  __name: "p-pagination",
23
22
  props: {
24
23
  /**
25
- * The current page.
24
+ * The current page number (v-model).
25
+ * Controls which page is visually active and navigable.
26
26
  */
27
27
  modelValue: {
28
28
  type: Number,
29
29
  default: null
30
30
  },
31
31
  /**
32
- * The amount of data pagination should iterate through.
32
+ * The total amount of items to paginate through.
33
+ * Used to calculate the total number of pages.
33
34
  */
34
35
  count: {
35
36
  type: Number,
36
37
  default: 0
37
38
  },
38
39
  /**
39
- * The amount of data to be displayed at 1 page. Used to calculate the length of pagination.
40
+ * The number of items to display per page.
41
+ * Used to calculate the total number of pages.
40
42
  */
41
43
  pageSize: {
42
44
  type: Number,
43
45
  default: 10
44
46
  },
45
47
  /**
46
- * The amount of pages to be displayed before and after the current page.
48
+ * The number of pages to show before and after the current page.
49
+ * Controls the range of page numbers displayed around the current page.
47
50
  */
48
51
  pageOffset: {
49
52
  type: Number,
50
53
  default: 2
51
54
  },
52
55
  /**
53
- * Whether the pagination is loading.
56
+ * Whether the pagination is in a loading state.
57
+ * When true, shows a skeleton loader instead of the pagination controls.
54
58
  */
55
59
  loading: {
56
60
  type: Boolean,
@@ -83,9 +87,12 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
83
87
  class: vue.normalizeClass([BTN_CLASS, Number(__props.modelValue) <= 1 ? ARROW_INACTIVE_CLASS : ARROW_ACTIVE_CLASS]),
84
88
  "aria-label": "go to the previous page",
85
89
  onClick: _cache[0] || (_cache[0] = ($event) => setPage(Number(__props.modelValue) - 1))
86
- }, _cache[2] || (_cache[2] = [
87
- vue.createElementVNode("img", { src: _imports_0 }, null, -1)
88
- ]), 2),
90
+ }, [
91
+ vue.createVNode(pIcon_vue_vue_type_script_setup_true_lang._sfc_main, {
92
+ icon: "chevron-left",
93
+ width: "24px"
94
+ })
95
+ ], 2),
89
96
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(pages.value, (page, index) => {
90
97
  return vue.openBlock(), vue.createElementBlock("div", {
91
98
  key: index,
@@ -107,9 +114,12 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
107
114
  class: vue.normalizeClass([BTN_CLASS, __props.modelValue === pageCount.value ? ARROW_INACTIVE_CLASS : ARROW_ACTIVE_CLASS]),
108
115
  "aria-label": "go to the next page",
109
116
  onClick: _cache[1] || (_cache[1] = ($event) => setPage(Number(__props.modelValue) + 1))
110
- }, _cache[3] || (_cache[3] = [
111
- vue.createElementVNode("img", { src: _imports_1 }, null, -1)
112
- ]), 2)
117
+ }, [
118
+ vue.createVNode(pIcon_vue_vue_type_script_setup_true_lang._sfc_main, {
119
+ icon: "chevron-right",
120
+ width: "24px"
121
+ })
122
+ ], 2)
113
123
  ])) : vue.createCommentVNode("", true)
114
124
  ], 64);
115
125
  };
@@ -8,7 +8,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
8
8
  },
9
9
  __name: "p-select-btn",
10
10
  props: {
11
- modelValue: { default: null },
11
+ modelValue: { type: [String, Number, Boolean, null, Array], default: null },
12
12
  items: { default: () => [] },
13
13
  itemValue: { default: "value" },
14
14
  itemText: { default: "text" },
@@ -56,6 +56,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
56
56
  return index !== -1;
57
57
  }
58
58
  }
59
+ return false;
59
60
  };
60
61
  return (_ctx, _cache) => {
61
62
  const _directive_tooltip = vue.resolveDirective("tooltip");
@@ -13,26 +13,51 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
13
13
  },
14
14
  __name: "p-select",
15
15
  props: {
16
+ /**
17
+ * The current selected value (v-model).
18
+ * Supports two-way binding for form inputs.
19
+ */
16
20
  modelValue: {
17
21
  type: [String, Number, Boolean, null],
18
22
  default: ""
19
23
  },
24
+ /**
25
+ * Array of objects representing the select options.
26
+ * Each object should have properties specified by itemText and itemValue.
27
+ * @example [{ text: 'Option 1', value: 1 }, { text: 'Option 2', value: 2 }]
28
+ */
20
29
  items: {
21
30
  type: Array,
22
31
  default: () => []
23
32
  },
33
+ /**
34
+ * Text label for the select field.
35
+ * If not provided, you can use the label slot instead.
36
+ */
24
37
  label: {
25
38
  type: String,
26
39
  default: ""
27
40
  },
41
+ /**
42
+ * Error message to display below the select.
43
+ * When provided, the select will show error styling.
44
+ */
28
45
  errorMsg: {
29
46
  type: String,
30
47
  default: ""
31
48
  },
49
+ /**
50
+ * Whether the select is required.
51
+ * Adds required attribute and visual indicator.
52
+ */
32
53
  required: {
33
54
  type: Boolean,
34
55
  default: false
35
56
  },
57
+ /**
58
+ * The size of the select - affects padding, font size, and spacing.
59
+ * Valid values: 'sm', 'md', 'lg'
60
+ */
36
61
  size: {
37
62
  type: String,
38
63
  default: "md",
@@ -40,10 +65,18 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
40
65
  return pBtn_types.SIZES.includes(value);
41
66
  }
42
67
  },
68
+ /**
69
+ * Property name to use as the display text for each option.
70
+ * Defaults to 'text' - each item should have this property.
71
+ */
43
72
  itemText: {
44
73
  type: String,
45
74
  default: "text"
46
75
  },
76
+ /**
77
+ * Property name to use as the value for each option.
78
+ * Defaults to 'value' - each item should have this property.
79
+ */
47
80
  itemValue: {
48
81
  type: [String, Number, Boolean, null],
49
82
  default: "value"
@@ -15,22 +15,42 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
15
15
  },
16
16
  __name: "p-table-loader",
17
17
  props: {
18
+ /**
19
+ * The number of rows to display in the skeleton table.
20
+ * Controls the vertical size of the loading placeholder.
21
+ */
18
22
  rows: {
19
23
  type: [Number, String],
20
24
  default: 4
21
25
  },
26
+ /**
27
+ * The number of columns to display in the skeleton table.
28
+ * Controls the horizontal size of the loading placeholder.
29
+ */
22
30
  columns: {
23
31
  type: [Number, String],
24
32
  default: 6
25
33
  },
34
+ /**
35
+ * CSS classes to apply to each table cell.
36
+ * Allows customization of cell padding and styling.
37
+ */
26
38
  tdClasses: {
27
39
  type: String,
28
40
  default: "px-4 py-5"
29
41
  },
42
+ /**
43
+ * CSS classes to apply to the skeleton loader within each cell.
44
+ * Controls the height and appearance of individual skeleton elements.
45
+ */
30
46
  tdSkeletonClasses: {
31
47
  type: String,
32
48
  default: "h-5"
33
49
  },
50
+ /**
51
+ * Whether to display subheaders in the table header.
52
+ * Adds an additional row below the main header for more complex table structures.
53
+ */
34
54
  withSubheader: {
35
55
  type: Boolean,
36
56
  default: false
@@ -8,14 +8,26 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
8
8
  },
9
9
  __name: "p-tabs",
10
10
  props: {
11
+ /**
12
+ * Array of tab objects to display.
13
+ * Each tab should have a name, title, and optional icon and route.
14
+ */
11
15
  tabs: {
12
16
  type: Array,
13
17
  required: true
14
18
  },
19
+ /**
20
+ * The currently active tab name.
21
+ * Controls which tab is visually highlighted.
22
+ */
15
23
  activeTab: {
16
24
  type: String,
17
25
  required: true
18
26
  },
27
+ /**
28
+ * Left padding for the tabs container in pixels.
29
+ * Useful for aligning tabs with other content.
30
+ */
19
31
  tabsLeftPadding: {
20
32
  type: Number,
21
33
  default: 0
@@ -11,22 +11,42 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
11
11
  },
12
12
  __name: "p-textarea",
13
13
  props: {
14
+ /**
15
+ * The current value of the textarea (v-model).
16
+ * Supports two-way binding for form inputs.
17
+ */
14
18
  modelValue: {
15
19
  type: [String, Number, null],
16
20
  default: ""
17
21
  },
22
+ /**
23
+ * Text label for the textarea field.
24
+ * If not provided, you can use the label slot instead.
25
+ */
18
26
  label: {
19
27
  type: String,
20
28
  default: ""
21
29
  },
30
+ /**
31
+ * Error message to display below the textarea.
32
+ * When provided, the textarea will show error styling.
33
+ */
22
34
  errorMsg: {
23
35
  type: String,
24
36
  default: ""
25
37
  },
38
+ /**
39
+ * Whether the textarea is required.
40
+ * Adds required attribute and visual indicator.
41
+ */
26
42
  required: {
27
43
  type: Boolean,
28
44
  default: false
29
45
  },
46
+ /**
47
+ * The size of the textarea - affects padding, font size, and spacing.
48
+ * Valid values: 'sm', 'md', 'lg'
49
+ */
30
50
  size: {
31
51
  type: String,
32
52
  default: "md",