@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.
- package/README.md +2 -1
- package/dist/cjs/chunks/p-alert.js +3 -0
- package/dist/cjs/chunks/p-avatar.js +16 -0
- package/dist/cjs/chunks/p-btn.js +3 -0
- package/dist/cjs/chunks/p-card.js +4 -0
- package/dist/cjs/chunks/p-dropdown-select.js +34 -0
- package/dist/cjs/chunks/p-input-number.js +32 -0
- package/dist/cjs/chunks/p-input-percent.js +13 -2
- package/dist/cjs/chunks/p-input.js +28 -0
- package/dist/cjs/chunks/p-pagination-info.js +9 -5
- package/dist/cjs/chunks/p-pagination.js +23 -13
- package/dist/cjs/chunks/p-select-btn.js +2 -1
- package/dist/cjs/chunks/p-select.js +33 -0
- package/dist/cjs/chunks/p-table-loader.js +20 -0
- package/dist/cjs/chunks/p-tabs.js +12 -0
- package/dist/cjs/chunks/p-textarea.js +20 -0
- package/dist/cjs/index.js +40 -3
- package/dist/cjs/p-checkbox.js +8 -1
- package/dist/cjs/p-chips.js +17 -1
- package/dist/cjs/p-close-btn.js +6 -1
- package/dist/cjs/p-drawer.js +90 -2
- package/dist/cjs/p-dropdown.js +2 -1
- package/dist/cjs/p-input-search.js +13 -1
- package/dist/cjs/p-loading.js +1 -1
- package/dist/cjs/p-modal.js +82 -2
- package/dist/cjs/p-select-pill.js +36 -2
- package/dist/cjs/p-skeleton-loader.js +17 -1
- package/dist/cjs/p-table-filter-icon.js +4 -1
- package/dist/cjs/p-table-header-cell.js +29 -0
- package/dist/cjs/p-table-td.js +1 -1
- package/dist/cjs/p-toggle.js +22 -1
- package/dist/es/chunks/p-alert.js +3 -0
- package/dist/es/chunks/p-avatar.js +16 -0
- package/dist/es/chunks/p-btn.js +3 -0
- package/dist/es/chunks/p-card.js +4 -0
- package/dist/es/chunks/p-dropdown-select.js +34 -0
- package/dist/es/chunks/p-input-number.js +32 -0
- package/dist/es/chunks/p-input-percent.js +13 -2
- package/dist/es/chunks/p-input.js +28 -0
- package/dist/es/chunks/p-pagination-info.js +9 -5
- package/dist/es/chunks/p-pagination.js +24 -14
- package/dist/es/chunks/p-select-btn.js +2 -1
- package/dist/es/chunks/p-select.js +33 -0
- package/dist/es/chunks/p-table-loader.js +20 -0
- package/dist/es/chunks/p-tabs.js +12 -0
- package/dist/es/chunks/p-textarea.js +20 -0
- package/dist/es/index.js +40 -3
- package/dist/es/p-checkbox.js +8 -1
- package/dist/es/p-chips.js +17 -1
- package/dist/es/p-close-btn.js +6 -1
- package/dist/es/p-drawer.js +90 -2
- package/dist/es/p-dropdown.js +2 -1
- package/dist/es/p-input-search.js +13 -1
- package/dist/es/p-loading.js +1 -1
- package/dist/es/p-modal.js +82 -2
- package/dist/es/p-select-pill.js +36 -2
- package/dist/es/p-skeleton-loader.js +17 -1
- package/dist/es/p-table-filter-icon.js +4 -1
- package/dist/es/p-table-header-cell.js +29 -0
- package/dist/es/p-table-td.js +1 -1
- package/dist/es/p-toggle.js +22 -1
- package/dist/squirrel/components/p-action-bar/p-action-bar.vue.d.ts +14 -2
- package/dist/squirrel/components/p-alert/p-alert.vue.d.ts +16 -3
- package/dist/squirrel/components/p-avatar/p-avatar.vue.d.ts +35 -0
- package/dist/squirrel/components/p-btn/p-btn.vue.d.ts +18 -2
- package/dist/squirrel/components/p-card/p-card.vue.d.ts +20 -7
- package/dist/squirrel/components/p-checkbox/p-checkbox.vue.d.ts +25 -7
- package/dist/squirrel/components/p-chips/p-chips.vue.d.ts +24 -0
- package/dist/squirrel/components/p-close-btn/p-close-btn.vue.d.ts +13 -0
- package/dist/squirrel/components/p-date-picker/p-date-picker.vue.d.ts +16 -0
- package/dist/squirrel/components/p-drawer/p-drawer.vue.d.ts +141 -3
- package/dist/squirrel/components/p-dropdown/p-dropdown.vue.d.ts +11 -2
- package/dist/squirrel/components/p-dropdown-select/p-dropdown-select.vue.d.ts +69 -1
- package/dist/squirrel/components/p-file-upload/p-file-upload.vue.d.ts +70 -6
- package/dist/squirrel/components/p-icon/p-icon.vue.d.ts +4 -0
- package/dist/squirrel/components/p-info-icon/p-info-icon.vue.d.ts +11 -4
- package/dist/squirrel/components/p-inline-date-picker/p-inline-date-picker.vue.d.ts +27 -7
- package/dist/squirrel/components/p-input/p-input.vue.d.ts +73 -8
- package/dist/squirrel/components/p-input-number/p-input-number.vue.d.ts +83 -12
- package/dist/squirrel/components/p-input-percent/p-input-percent.vue.d.ts +22 -2
- package/dist/squirrel/components/p-input-search/p-input-search.vue.d.ts +24 -0
- package/dist/squirrel/components/p-modal/p-modal.vue.d.ts +185 -15
- package/dist/squirrel/components/p-pagination/p-pagination.vue.d.ts +22 -12
- package/dist/squirrel/components/p-pagination-info/p-pagination-info.vue.d.ts +16 -8
- package/dist/squirrel/components/p-progress-bar/p-progress-bar.vue.d.ts +20 -0
- package/dist/squirrel/components/p-ring-loader/p-ring-loader.vue.d.ts +10 -0
- package/dist/squirrel/components/p-select/p-select.vue.d.ts +76 -6
- package/dist/squirrel/components/p-select-btn/p-select-btn.vue.d.ts +67 -10
- package/dist/squirrel/components/p-select-list/p-select-list.vue.d.ts +1 -1
- package/dist/squirrel/components/p-select-pill/p-select-pill.vue.d.ts +72 -2
- package/dist/squirrel/components/p-skeleton-loader/p-skeleton-loader.vue.d.ts +40 -0
- package/dist/squirrel/components/p-steps/p-steps.vue.d.ts +12 -0
- package/dist/squirrel/components/p-table/p-table.vue.d.ts +32 -0
- package/dist/squirrel/components/p-table-header-cell/p-table-filter-icon.vue.d.ts +6 -0
- package/dist/squirrel/components/p-table-header-cell/p-table-header-cell.vue.d.ts +56 -1
- package/dist/squirrel/components/p-table-loader/p-table-loader.vue.d.ts +40 -0
- package/dist/squirrel/components/p-table-sort/p-table-sort.vue.d.ts +12 -2
- package/dist/squirrel/components/p-table-td/p-table-td.vue.d.ts +12 -0
- package/dist/squirrel/components/p-tabs/p-tabs.vue.d.ts +33 -2
- package/dist/squirrel/components/p-tabs-pills/p-tabs-pills.vue.d.ts +22 -0
- package/dist/squirrel/components/p-textarea/p-textarea.vue.d.ts +52 -8
- package/dist/squirrel/components/p-toggle/p-toggle.vue.d.ts +50 -3
- package/dist/squirrel.css +68 -68
- package/package.json +15 -15
- package/squirrel/components/p-action-bar/p-action-bar.stories.js +5 -5
- package/squirrel/components/p-action-bar/p-action-bar.vue +30 -3
- package/squirrel/components/p-alert/p-alert.vue +24 -0
- package/squirrel/components/p-avatar/p-avatar.vue +28 -0
- package/squirrel/components/p-btn/p-btn.vue +35 -0
- package/squirrel/components/p-card/p-card.vue +24 -1
- package/squirrel/components/p-checkbox/p-checkbox.vue +23 -1
- package/squirrel/components/p-chips/p-chips.vue +24 -0
- package/squirrel/components/p-close-btn/p-close-btn.vue +15 -0
- package/squirrel/components/p-date-picker/p-date-picker.vue +23 -1
- package/squirrel/components/p-drawer/p-drawer.vue +95 -0
- package/squirrel/components/p-dropdown/p-dropdown.vue +12 -1
- package/squirrel/components/p-dropdown-select/p-dropdown-select.vue +41 -0
- package/squirrel/components/p-file-upload/p-file-upload.vue +58 -3
- package/squirrel/components/p-icon/p-icon.vue +16 -0
- package/squirrel/components/p-info-icon/p-info-icon.vue +19 -0
- package/squirrel/components/p-inline-date-picker/p-inline-date-picker.vue +32 -0
- package/squirrel/components/p-input/p-input.vue +61 -1
- package/squirrel/components/p-input-number/p-input-number.vue +78 -1
- package/squirrel/components/p-input-percent/p-input-percent.vue +27 -3
- package/squirrel/components/p-input-search/p-input-search.vue +30 -2
- package/squirrel/components/p-link/p-link.vue +13 -0
- package/squirrel/components/p-loading/p-loading.vue +9 -2
- package/squirrel/components/p-modal/p-modal.vue +138 -2
- package/squirrel/components/p-pagination/p-pagination.vue +28 -8
- package/squirrel/components/p-pagination-info/p-pagination-info.vue +16 -4
- package/squirrel/components/p-progress-bar/p-progress-bar.vue +31 -4
- package/squirrel/components/p-ring-loader/p-ring-loader.vue +17 -0
- package/squirrel/components/p-select/p-select.vue +50 -1
- package/squirrel/components/p-select-btn/p-select-btn.vue +90 -2
- package/squirrel/components/p-select-list/p-select-list.vue +7 -0
- package/squirrel/components/p-select-pill/p-select-pill.vue +52 -2
- package/squirrel/components/p-skeleton-loader/p-skeleton-loader.vue +24 -0
- package/squirrel/components/p-steps/p-steps.vue +25 -0
- package/squirrel/components/p-table/p-table.vue +39 -0
- package/squirrel/components/p-table-header-cell/p-table-filter-icon.vue +9 -0
- package/squirrel/components/p-table-header-cell/p-table-header-cell.vue +36 -0
- package/squirrel/components/p-table-loader/p-table-loader.vue +28 -0
- package/squirrel/components/p-table-sort/p-table-sort.vue +19 -1
- package/squirrel/components/p-table-td/p-table-td.vue +20 -0
- package/squirrel/components/p-tabs/p-tabs.stories.js +2 -2
- package/squirrel/components/p-tabs/p-tabs.vue +33 -1
- package/squirrel/components/p-tabs-pills/p-tabs-pills.vue +33 -0
- package/squirrel/components/p-textarea/p-textarea.vue +43 -1
- package/squirrel/components/p-toggle/p-toggle.vue +44 -1
- package/squirrel/assets/pagination-left-icon.svg +0 -5
- package/squirrel/assets/pagination-right-icon.svg +0 -5
|
@@ -15,30 +15,72 @@ import { type Size, SIZES } from '@squirrel/components/p-btn/p-btn.types';
|
|
|
15
15
|
import { useInputClasses } from '@squirrel/composables/useInputClasses';
|
|
16
16
|
import { computed, type PropType, type StyleValue, useAttrs } from 'vue';
|
|
17
17
|
|
|
18
|
+
/**
|
|
19
|
+
* A textarea component for multi-line text input.
|
|
20
|
+
* Provides consistent styling and behavior with other form components.
|
|
21
|
+
* Supports custom labels, error states, and various sizes.
|
|
22
|
+
*
|
|
23
|
+
* @displayName PTextarea
|
|
24
|
+
*/
|
|
18
25
|
defineOptions({
|
|
19
26
|
name: 'PTextarea',
|
|
20
27
|
inheritAttrs: false,
|
|
21
28
|
});
|
|
22
29
|
|
|
23
|
-
const emit = defineEmits
|
|
30
|
+
const emit = defineEmits<{
|
|
31
|
+
/**
|
|
32
|
+
* Emitted when the textarea value changes.
|
|
33
|
+
* @param {string} value - The new textarea value
|
|
34
|
+
*/
|
|
35
|
+
'update:modelValue': [value: string];
|
|
36
|
+
}>();
|
|
37
|
+
|
|
38
|
+
defineSlots<{
|
|
39
|
+
/**
|
|
40
|
+
* Custom label content - overrides the label prop.
|
|
41
|
+
* @param {string} label - The label text
|
|
42
|
+
* @param {string} label-classes - CSS classes for the label
|
|
43
|
+
*/
|
|
44
|
+
label?: (props: { label: string; labelClasses: string }) => unknown;
|
|
45
|
+
}>();
|
|
24
46
|
|
|
25
47
|
const props = defineProps({
|
|
48
|
+
/**
|
|
49
|
+
* The current value of the textarea (v-model).
|
|
50
|
+
* Supports two-way binding for form inputs.
|
|
51
|
+
*/
|
|
26
52
|
modelValue: {
|
|
27
53
|
type: [String, Number, null] as PropType<string | number | null>,
|
|
28
54
|
default: '',
|
|
29
55
|
},
|
|
56
|
+
/**
|
|
57
|
+
* Text label for the textarea field.
|
|
58
|
+
* If not provided, you can use the label slot instead.
|
|
59
|
+
*/
|
|
30
60
|
label: {
|
|
31
61
|
type: String,
|
|
32
62
|
default: '',
|
|
33
63
|
},
|
|
64
|
+
/**
|
|
65
|
+
* Error message to display below the textarea.
|
|
66
|
+
* When provided, the textarea will show error styling.
|
|
67
|
+
*/
|
|
34
68
|
errorMsg: {
|
|
35
69
|
type: String,
|
|
36
70
|
default: '',
|
|
37
71
|
},
|
|
72
|
+
/**
|
|
73
|
+
* Whether the textarea is required.
|
|
74
|
+
* Adds required attribute and visual indicator.
|
|
75
|
+
*/
|
|
38
76
|
required: {
|
|
39
77
|
type: Boolean,
|
|
40
78
|
default: false,
|
|
41
79
|
},
|
|
80
|
+
/**
|
|
81
|
+
* The size of the textarea - affects padding, font size, and spacing.
|
|
82
|
+
* Valid values: 'sm', 'md', 'lg'
|
|
83
|
+
*/
|
|
42
84
|
size: {
|
|
43
85
|
type: String as PropType<Size>,
|
|
44
86
|
default: 'md',
|
|
@@ -56,30 +56,73 @@ const TOGGLE_CLASSES = [
|
|
|
56
56
|
</script>
|
|
57
57
|
|
|
58
58
|
<script setup lang="ts">
|
|
59
|
+
/**
|
|
60
|
+
* A toggle switch component that provides a modern switch interface.
|
|
61
|
+
* Supports different sizes, labels, error states, and accessibility features.
|
|
62
|
+
* Uses a checkbox input with custom styling for the toggle appearance.
|
|
63
|
+
*
|
|
64
|
+
* @displayName PToggle
|
|
65
|
+
*/
|
|
59
66
|
defineOptions({
|
|
60
67
|
name: 'PToggle',
|
|
61
68
|
inheritAttrs: false,
|
|
62
69
|
});
|
|
63
70
|
|
|
64
|
-
|
|
71
|
+
defineSlots<{
|
|
72
|
+
/**
|
|
73
|
+
* Custom label content - overrides the label prop.
|
|
74
|
+
* @param {string} label - The label text
|
|
75
|
+
* @param {string} label-classes - CSS classes for the label
|
|
76
|
+
*/
|
|
77
|
+
label?: (props: { label: string; labelClasses: string }) => unknown;
|
|
78
|
+
}>();
|
|
79
|
+
|
|
80
|
+
const emit = defineEmits<{
|
|
81
|
+
/**
|
|
82
|
+
* Emitted when the toggle state changes.
|
|
83
|
+
* @param {boolean} value - The new toggle state
|
|
84
|
+
*/
|
|
85
|
+
'update:modelValue': [value: boolean];
|
|
86
|
+
}>();
|
|
65
87
|
|
|
66
88
|
const props = defineProps({
|
|
89
|
+
/**
|
|
90
|
+
* The current toggle state (v-model).
|
|
91
|
+
* Supports two-way binding for form inputs.
|
|
92
|
+
*/
|
|
67
93
|
modelValue: {
|
|
68
94
|
type: Boolean,
|
|
69
95
|
default: false,
|
|
70
96
|
},
|
|
97
|
+
/**
|
|
98
|
+
* Text label for the toggle switch.
|
|
99
|
+
* If not provided, you can use the label slot instead.
|
|
100
|
+
*/
|
|
71
101
|
label: {
|
|
72
102
|
type: String,
|
|
73
103
|
default: '',
|
|
74
104
|
},
|
|
105
|
+
/**
|
|
106
|
+
* Error message to display below the toggle.
|
|
107
|
+
* When provided, the toggle will show error styling.
|
|
108
|
+
*/
|
|
75
109
|
errorMsg: {
|
|
76
110
|
type: String,
|
|
77
111
|
default: '',
|
|
78
112
|
},
|
|
113
|
+
/**
|
|
114
|
+
* Whether the toggle is required.
|
|
115
|
+
* Adds required attribute and visual indicator.
|
|
116
|
+
*/
|
|
79
117
|
required: {
|
|
80
118
|
type: Boolean,
|
|
81
119
|
default: false,
|
|
82
120
|
},
|
|
121
|
+
/**
|
|
122
|
+
* The size of the toggle switch.
|
|
123
|
+
* Valid values: 'sm', 'md', 'lg'
|
|
124
|
+
* @values sm, md, lg
|
|
125
|
+
*/
|
|
83
126
|
size: {
|
|
84
127
|
type: String as PropType<Size>,
|
|
85
128
|
default: 'md',
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
<svg width="8" height="12" viewBox="0 0 8 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path
|
|
3
|
-
d="M0.25 5.99968C0.25 5.64968 0.4 5.34968 0.65 5.14968L6.25 0.249681C6.65 -0.100319 7.2 -0.0503187 7.55 0.349681C7.85 0.749681 7.85 1.29968 7.45 1.59968L2.55 5.89968C2.5 5.94968 2.5 5.99968 2.55 6.04968L7.45 10.3497C7.85 10.6997 7.9 11.2497 7.55 11.6497C7.2 12.0497 6.65 12.0997 6.25 11.7497C6.25 11.7497 6.25 11.7497 6.2 11.6997L0.65 6.84968C0.4 6.64968 0.25 6.29968 0.25 5.99968Z"
|
|
4
|
-
fill="#918da1" />
|
|
5
|
-
</svg>
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
<svg width="8" height="14" viewBox="0 0 8 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path
|
|
3
|
-
d="M7.75695 6.98136C7.75695 7.33136 7.60695 7.63136 7.35695 7.83136L1.75695 12.7814C1.35695 13.1314 0.756947 13.0814 0.456947 12.6814C0.156947 12.2814 0.156947 11.7314 0.556947 11.3814L5.45695 7.08136C5.50695 7.03136 5.50695 6.98136 5.45695 6.88136L0.556947 2.58136C0.156947 2.23136 0.156947 1.63136 0.506947 1.28136C0.856947 0.931361 1.40695 0.881361 1.80695 1.18136L7.40695 6.08136C7.60695 6.33136 7.75695 6.63136 7.75695 6.98136Z"
|
|
4
|
-
fill="#918da1" />
|
|
5
|
-
</svg>
|