@pequity/squirrel 5.4.7 → 5.4.9
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 +1 -1
- package/dist/cjs/chunks/p-date-picker.js +143 -85
- package/dist/cjs/chunks/p-dropdown-select.js +4 -4
- package/dist/cjs/chunks/p-inline-date-picker.js +117 -67
- package/dist/cjs/chunks/p-link.js +1 -1
- package/dist/cjs/chunks/p-select.js +1 -1
- package/dist/cjs/index.js +37 -37
- package/dist/cjs/p-btn.js +2 -2
- package/dist/cjs/p-checkbox.js +1 -1
- package/dist/cjs/p-chips.js +2 -2
- package/dist/cjs/p-input-number.js +3 -3
- package/dist/cjs/p-input-search.js +1 -1
- package/dist/cjs/p-loading.js +2 -2
- package/dist/cjs/p-modal.js +2 -2
- package/dist/cjs/p-skeleton-loader.js +1 -1
- package/dist/cjs/p-table-td.js +1 -1
- package/dist/cjs/p-toggle.js +1 -1
- package/dist/cjs/tailwind.js +2 -2
- package/dist/cjs/usePTableRowVirtualizer.js +1 -1
- package/dist/cjs/useSelectList.js +3 -3
- package/dist/es/chunks/p-date-picker.js +144 -86
- package/dist/es/chunks/p-dropdown-select.js +4 -4
- package/dist/es/chunks/p-inline-date-picker.js +118 -68
- package/dist/es/chunks/p-link.js +1 -1
- package/dist/es/chunks/p-select.js +1 -1
- package/dist/es/index.js +35 -35
- package/dist/es/p-btn.js +2 -2
- package/dist/es/p-checkbox.js +1 -1
- package/dist/es/p-chips.js +2 -2
- package/dist/es/p-input-number.js +3 -3
- package/dist/es/p-input-search.js +1 -1
- package/dist/es/p-loading.js +2 -2
- package/dist/es/p-modal.js +2 -2
- package/dist/es/p-skeleton-loader.js +1 -1
- package/dist/es/p-table-td.js +1 -1
- package/dist/es/p-toggle.js +1 -1
- package/dist/es/tailwind.js +2 -2
- package/dist/es/usePTableRowVirtualizer.js +1 -1
- package/dist/es/useSelectList.js +3 -3
- package/dist/squirrel/components/index.d.ts +13 -13
- package/dist/squirrel/components/p-btn/p-btn.vue.d.ts +2 -2
- package/dist/squirrel/components/p-card/p-card.vue.d.ts +3 -2
- package/dist/squirrel/components/p-checkbox/p-checkbox.vue.d.ts +2 -1
- package/dist/squirrel/components/p-close-btn/p-close-btn.vue.d.ts +1 -1
- package/dist/squirrel/components/p-date-picker/p-date-picker.vue.d.ts +27 -30
- package/dist/squirrel/components/p-drawer/p-drawer.vue.d.ts +3 -3
- package/dist/squirrel/components/p-dropdown-select/p-dropdown-select.vue.d.ts +8 -7
- package/dist/squirrel/components/p-file-upload/p-file-upload.vue.d.ts +1 -1
- package/dist/squirrel/components/p-icon/p-icon.vue.d.ts +2 -2
- package/dist/squirrel/components/p-info-icon/p-info-icon.vue.d.ts +2 -1
- package/dist/squirrel/components/p-inline-date-picker/p-inline-date-picker.vue.d.ts +46 -0
- package/dist/squirrel/components/p-input/p-input.vue.d.ts +1 -1
- package/dist/squirrel/components/p-input-number/p-input-number.vue.d.ts +1 -1
- package/dist/squirrel/components/p-input-percent/p-input-percent.vue.d.ts +1 -1
- package/dist/squirrel/components/p-input-search/p-input-search.vue.d.ts +2 -2
- package/dist/squirrel/components/p-link/p-link.vue.d.ts +2 -1
- package/dist/squirrel/components/p-modal/p-modal.vue.d.ts +5 -4
- package/dist/squirrel/components/p-pagination-info/p-pagination-info.vue.d.ts +2 -1
- package/dist/squirrel/components/p-ring-loader/p-ring-loader.vue.d.ts +1 -1
- package/dist/squirrel/components/p-select/p-select.vue.d.ts +3 -2
- package/dist/squirrel/components/p-select-btn/p-select-btn.vue.d.ts +3 -2
- package/dist/squirrel/components/p-select-list/p-select-list.vue.d.ts +6 -5
- package/dist/squirrel/components/p-select-pill/p-select-pill.vue.d.ts +1 -1
- package/dist/squirrel/components/p-table/p-table.vue.d.ts +3 -2
- package/dist/squirrel/components/p-table-loader/p-table-loader.vue.d.ts +1 -1
- package/dist/squirrel/components/p-table-sort/p-table-sort.vue.d.ts +1 -1
- package/dist/squirrel/components/p-table-td/p-table-td.vue.d.ts +2 -1
- package/dist/squirrel/components/p-tabs/p-tabs.vue.d.ts +2 -2
- package/dist/squirrel/components/p-textarea/p-textarea.vue.d.ts +1 -1
- package/dist/squirrel/components/p-toggle/p-toggle.vue.d.ts +1 -1
- package/dist/squirrel/index.d.ts +1 -1
- package/dist/squirrel/utils/index.d.ts +8 -8
- package/dist/squirrel/utils/inputClassesMixin.d.ts +1 -1
- package/dist/style.css +98 -989
- package/package.json +30 -32
- package/squirrel/assets/squirrel.css +45 -6
- package/squirrel/components/index.ts +37 -37
- package/squirrel/components/p-action-bar/p-action-bar.spec.ts +1 -1
- package/squirrel/components/p-action-bar/p-action-bar.stories.js +2 -2
- package/squirrel/components/p-action-bar/p-action-bar.vue +1 -1
- package/squirrel/components/p-alert/p-alert.vue +1 -1
- package/squirrel/components/p-btn/p-btn.spec.js +2 -2
- package/squirrel/components/p-btn/p-btn.vue +4 -4
- package/squirrel/components/p-checkbox/p-checkbox.vue +1 -1
- package/squirrel/components/p-chips/p-chips.vue +1 -1
- package/squirrel/components/p-date-picker/p-date-picker.spec.js +292 -0
- package/squirrel/components/p-date-picker/p-date-picker.stories.js +3 -3
- package/squirrel/components/p-date-picker/p-date-picker.vue +45 -90
- package/squirrel/components/p-dropdown/p-dropdown.spec.js +1 -1
- package/squirrel/components/p-dropdown/p-dropdown.vue +1 -1
- package/squirrel/components/p-dropdown-select/p-dropdown-select.spec.js +4 -4
- package/squirrel/components/p-dropdown-select/p-dropdown-select.stories.js +2 -2
- package/squirrel/components/p-dropdown-select/p-dropdown-select.vue +8 -8
- package/squirrel/components/p-file-upload/p-file-upload.vue +2 -2
- package/squirrel/components/p-icon/p-icon.spec.js +1 -1
- package/squirrel/components/p-icon/p-icon.stories.js +1 -1
- package/squirrel/components/p-icon/p-icon.vue +2 -2
- package/squirrel/components/p-inline-date-picker/p-inline-date-picker.spec.js +21 -45
- package/squirrel/components/p-inline-date-picker/p-inline-date-picker.stories.js +3 -3
- package/squirrel/components/p-inline-date-picker/p-inline-date-picker.vue +16 -85
- package/squirrel/components/p-input/p-input.stories.js +1 -1
- package/squirrel/components/p-input/p-input.vue +1 -1
- package/squirrel/components/p-input-number/p-input-number.stories.js +1 -1
- package/squirrel/components/p-input-number/p-input-number.vue +3 -3
- package/squirrel/components/p-input-percent/p-input-percent.stories.js +1 -1
- package/squirrel/components/p-input-percent/p-input-percent.vue +1 -1
- package/squirrel/components/p-input-search/p-input-search.stories.js +1 -1
- package/squirrel/components/p-input-search/p-input-search.vue +1 -1
- package/squirrel/components/p-link/p-link.spec.js +1 -1
- package/squirrel/components/p-link/p-link.vue +1 -1
- package/squirrel/components/p-loading/p-loading.spec.js +2 -2
- package/squirrel/components/p-loading/p-loading.stories.js +2 -2
- package/squirrel/components/p-loading/p-loading.vue +1 -1
- package/squirrel/components/p-loading/usePLoading.ts +1 -1
- package/squirrel/components/p-modal/p-modal-basic.spec.js +1 -1
- package/squirrel/components/p-modal/p-modal-events.spec.js +1 -1
- package/squirrel/components/p-modal/p-modal-features.spec.js +1 -1
- package/squirrel/components/p-modal/p-modal.vue +3 -3
- package/squirrel/components/p-pagination/p-pagination.vue +1 -1
- package/squirrel/components/p-progress-bar/p-progess-bar.spec.js +1 -1
- package/squirrel/components/p-progress-bar/p-progress-bar.vue +1 -1
- package/squirrel/components/p-select/p-select.spec.js +1 -1
- package/squirrel/components/p-select/p-select.stories.js +1 -1
- package/squirrel/components/p-select/p-select.vue +1 -1
- package/squirrel/components/p-select-btn/p-select-btn.spec.js +1 -1
- package/squirrel/components/p-select-btn/p-select-btn.stories.js +1 -1
- package/squirrel/components/p-select-btn/p-select-btn.vue +1 -1
- package/squirrel/components/p-select-list/p-select-list.spec.js +4 -4
- package/squirrel/components/p-select-list/p-select-list.vue +5 -5
- package/squirrel/components/p-select-list/useSelectList.ts +3 -3
- package/squirrel/components/p-select-pill/p-select-pill.spec.js +1 -1
- package/squirrel/components/p-select-pill/p-select-pill.stories.js +2 -2
- package/squirrel/components/p-select-pill/p-select-pill.vue +1 -1
- package/squirrel/components/p-skeleton-loader/p-skeleton-loader.vue +1 -1
- package/squirrel/components/p-table/p-table.spec.js +2 -2
- package/squirrel/components/p-table/p-table.vue +4 -4
- package/squirrel/components/p-table/usePTableColResize.spec.js +1 -1
- package/squirrel/components/p-table/usePTableColResize.ts +1 -1
- package/squirrel/components/p-table/usePTableRowVirtualizer.ts +1 -1
- package/squirrel/components/p-table-sort/p-table-sort.spec.js +1 -1
- package/squirrel/components/p-table-sort/p-table-sort.stories.js +1 -1
- package/squirrel/components/p-table-sort/p-table-sort.vue +1 -1
- package/squirrel/components/p-table-td/p-table-td.spec.js +3 -3
- package/squirrel/components/p-table-td/p-table-td.stories.js +1 -1
- package/squirrel/components/p-table-td/p-table-td.vue +2 -2
- package/squirrel/components/p-tabs/p-tabs.vue +1 -1
- package/squirrel/components/p-textarea/p-textarea.stories.js +1 -1
- package/squirrel/components/p-textarea/p-textarea.vue +1 -1
- package/squirrel/components/p-toggle/p-toggle.stories.js +1 -1
- package/squirrel/components/p-toggle/p-toggle.vue +1 -1
- package/squirrel/composables/useInputClasses.spec.js +1 -1
- package/squirrel/index.ts +1 -1
- package/squirrel/utils/component.ts +1 -1
- package/squirrel/utils/index.ts +18 -18
- package/squirrel/utils/inputClassesMixin.ts +1 -1
- package/squirrel/utils/pagination.spec.js +2 -2
- package/squirrel/utils/sanitization.spec.js +1 -1
- package/squirrel/utils/tailwind.ts +3 -2
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pequity/squirrel",
|
|
3
3
|
"description": "Squirrel component library",
|
|
4
|
-
"version": "5.4.
|
|
5
|
-
"packageManager": "pnpm@9.12.
|
|
4
|
+
"version": "5.4.9",
|
|
5
|
+
"packageManager": "pnpm@9.12.3",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"preinstall": "npx only-allow pnpm",
|
|
@@ -38,12 +38,11 @@
|
|
|
38
38
|
"main": "./dist/cjs/index.js",
|
|
39
39
|
"module": "./dist/es/index.js",
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"@popperjs/core": "^2.11.8",
|
|
42
41
|
"@tanstack/vue-virtual": "^3.8.3",
|
|
42
|
+
"@vuepic/vue-datepicker": "^9.0.3",
|
|
43
43
|
"dayjs": "^1.11.12",
|
|
44
44
|
"floating-vue": "^5.2.2",
|
|
45
45
|
"lodash-es": "^4.17.21",
|
|
46
|
-
"v-calendar": "^3.1.2",
|
|
47
46
|
"vue": "^3.4.33",
|
|
48
47
|
"vue-currency-input": "^3.1.0",
|
|
49
48
|
"vue-router": "^4.4.0",
|
|
@@ -52,35 +51,35 @@
|
|
|
52
51
|
"devDependencies": {
|
|
53
52
|
"@commitlint/cli": "^19.5.0",
|
|
54
53
|
"@commitlint/config-conventional": "^19.5.0",
|
|
55
|
-
"@pequity/eslint-config": "^
|
|
56
|
-
"@playwright/test": "^1.48.
|
|
57
|
-
"@popperjs/core": "2.11.8",
|
|
54
|
+
"@pequity/eslint-config": "^1.0.1",
|
|
55
|
+
"@playwright/test": "^1.48.2",
|
|
58
56
|
"@semantic-release/changelog": "^6.0.3",
|
|
59
57
|
"@semantic-release/git": "^10.0.1",
|
|
60
|
-
"@storybook/addon-a11y": "^8.
|
|
61
|
-
"@storybook/addon-actions": "^8.
|
|
62
|
-
"@storybook/addon-essentials": "^8.
|
|
63
|
-
"@storybook/addon-interactions": "^8.
|
|
64
|
-
"@storybook/addon-links": "^8.
|
|
65
|
-
"@storybook/blocks": "^8.
|
|
66
|
-
"@storybook/manager-api": "^8.
|
|
67
|
-
"@storybook/test": "^8.
|
|
58
|
+
"@storybook/addon-a11y": "^8.4.2",
|
|
59
|
+
"@storybook/addon-actions": "^8.4.2",
|
|
60
|
+
"@storybook/addon-essentials": "^8.4.2",
|
|
61
|
+
"@storybook/addon-interactions": "^8.4.2",
|
|
62
|
+
"@storybook/addon-links": "^8.4.2",
|
|
63
|
+
"@storybook/blocks": "^8.4.2",
|
|
64
|
+
"@storybook/manager-api": "^8.4.2",
|
|
65
|
+
"@storybook/test": "^8.4.2",
|
|
68
66
|
"@storybook/test-runner": "^0.19.1",
|
|
69
|
-
"@storybook/theming": "^8.
|
|
70
|
-
"@storybook/vue3": "^8.
|
|
71
|
-
"@storybook/vue3-vite": "^8.
|
|
72
|
-
"@tanstack/vue-virtual": "3.10.
|
|
67
|
+
"@storybook/theming": "^8.4.2",
|
|
68
|
+
"@storybook/vue3": "^8.4.2",
|
|
69
|
+
"@storybook/vue3-vite": "^8.4.2",
|
|
70
|
+
"@tanstack/vue-virtual": "3.10.9",
|
|
73
71
|
"@types/jsdom": "^21.1.7",
|
|
74
72
|
"@types/lodash-es": "^4.17.12",
|
|
75
|
-
"@types/node": "^22.
|
|
76
|
-
"@vitejs/plugin-vue": "^5.1.
|
|
77
|
-
"@vitest/coverage-v8": "^2.1.
|
|
73
|
+
"@types/node": "^22.9.0",
|
|
74
|
+
"@vitejs/plugin-vue": "^5.1.5",
|
|
75
|
+
"@vitest/coverage-v8": "^2.1.4",
|
|
78
76
|
"@vue/compiler-sfc": "3.5.12",
|
|
79
77
|
"@vue/test-utils": "^2.4.6",
|
|
78
|
+
"@vuepic/vue-datepicker": "^10.0.0",
|
|
80
79
|
"autoprefixer": "^10.4.20",
|
|
81
80
|
"dayjs": "1.11.13",
|
|
82
|
-
"eslint": "^
|
|
83
|
-
"eslint-plugin-storybook": "^0.
|
|
81
|
+
"eslint": "^9.14.0",
|
|
82
|
+
"eslint-plugin-storybook": "^0.11.0",
|
|
84
83
|
"floating-vue": "5.2.2",
|
|
85
84
|
"glob": "^11.0.0",
|
|
86
85
|
"husky": "^9.1.6",
|
|
@@ -89,24 +88,23 @@
|
|
|
89
88
|
"lint-staged": "^15.2.10",
|
|
90
89
|
"lodash-es": "4.17.21",
|
|
91
90
|
"make-coverage-badge": "^1.2.0",
|
|
92
|
-
"postcss": "^8.4.
|
|
91
|
+
"postcss": "^8.4.49",
|
|
93
92
|
"prettier": "^3.3.3",
|
|
94
93
|
"prettier-plugin-tailwindcss": "^0.6.8",
|
|
95
94
|
"resolve-tspaths": "^0.8.22",
|
|
96
95
|
"rimraf": "^6.0.1",
|
|
97
|
-
"sass": "^1.80.
|
|
98
|
-
"semantic-release": "^24.
|
|
99
|
-
"storybook": "^8.
|
|
96
|
+
"sass": "^1.80.6",
|
|
97
|
+
"semantic-release": "^24.2.0",
|
|
98
|
+
"storybook": "^8.4.2",
|
|
100
99
|
"svgo": "^3.3.2",
|
|
101
100
|
"tailwindcss": "^3.4.14",
|
|
102
101
|
"typescript": "5.6.3",
|
|
103
|
-
"
|
|
104
|
-
"
|
|
105
|
-
"vitest": "^2.1.3",
|
|
102
|
+
"vite": "^5.4.11",
|
|
103
|
+
"vitest": "^2.1.4",
|
|
106
104
|
"vue": "3.5.12",
|
|
107
105
|
"vue-currency-input": "3.1.0",
|
|
108
106
|
"vue-router": "4.4.5",
|
|
109
107
|
"vue-toastification": "2.0.0-rc.5",
|
|
110
|
-
"vue-tsc": "2.1.
|
|
108
|
+
"vue-tsc": "2.1.10"
|
|
111
109
|
}
|
|
112
110
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@import 'floating-vue/dist/style.css';
|
|
2
2
|
@import 'vue-toastification/dist/index.css';
|
|
3
|
-
@import '
|
|
3
|
+
@import '@vuepic/vue-datepicker/dist/main.css';
|
|
4
4
|
|
|
5
5
|
:root {
|
|
6
6
|
/* Design system colors */
|
|
@@ -76,16 +76,55 @@
|
|
|
76
76
|
overflow-wrap: break-word;
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
/* Datepicker - v-calendar */
|
|
80
|
-
.vc-container.vc-blue {
|
|
81
|
-
font-family: Inter;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
79
|
/* Skeleton fade */
|
|
85
80
|
.skeleton-fade {
|
|
86
81
|
mask-image: linear-gradient(rgba(0, 0, 0, 1), transparent);
|
|
87
82
|
}
|
|
88
83
|
|
|
84
|
+
/* Date picker - Vue datepicker */
|
|
85
|
+
:root {
|
|
86
|
+
--dp-font-family: 'Inter', 'Helvetica', 'Arial', 'sans-serif';
|
|
87
|
+
--dp-cell-border-radius: 50%;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.dp__theme_light {
|
|
91
|
+
--dp-background-color: rgb(var(--color-surface));
|
|
92
|
+
--dp-text-color: rgb(var(--color-on-surface));
|
|
93
|
+
--dp-hover-color: rgb(var(--color-p-blue-10));
|
|
94
|
+
--dp-hover-text-color: rgb(var(--color-p-gray-100));
|
|
95
|
+
--dp-hover-icon-color: rgb(var(--color-p-gray-40));
|
|
96
|
+
--dp-primary-color: rgb(var(--color-primary));
|
|
97
|
+
--dp-primary-disabled-color: rgb(var(--color-p-blue-40));
|
|
98
|
+
--dp-primary-text-color: rgb(var(--color-surface));
|
|
99
|
+
--dp-secondary-color: rgb(var(--color-p-gray-30));
|
|
100
|
+
--dp-border-color: rgb(var(--color-p-gray-30));
|
|
101
|
+
--dp-menu-border-color: rgb(var(--color-p-gray-30));
|
|
102
|
+
--dp-border-color-hover: rgb(var(--color-p-gray-30));
|
|
103
|
+
--dp-border-color-focus: rgb(var(--color-p-gray-30));
|
|
104
|
+
--dp-disabled-color: rgb(var(--color-p-blue-10));
|
|
105
|
+
--dp-scroll-bar-background: rgb(var(--color-p-blue-10));
|
|
106
|
+
--dp-scroll-bar-color: rgb(var(--color-p-gray-40));
|
|
107
|
+
--dp-success-color: rgb(var(--color-on-success));
|
|
108
|
+
--dp-success-color-disabled: rgb(var(--color-p-green-40));
|
|
109
|
+
--dp-icon-color: rgb(var(--color-p-gray-40));
|
|
110
|
+
--dp-danger-color: rgb(var(--color-on-error));
|
|
111
|
+
--dp-marker-color: rgb(var(--color-on-error));
|
|
112
|
+
--dp-tooltip-color: rgb(var(--color-p-blue-10));
|
|
113
|
+
--dp-disabled-color-text: rgb(var(--color-p-gray-40));
|
|
114
|
+
--dp-highlight-color: rgb(var(--color-p-blue-15));
|
|
115
|
+
--dp-range-between-dates-background-color: var(--dp-hover-color, rgb(var(--color-p-blue-10)));
|
|
116
|
+
--dp-range-between-dates-text-color: var(--dp-hover-text-color, rgb(var(--color-p-gray-100)));
|
|
117
|
+
--dp-range-between-border-color: var(--dp-hover-color, rgb(var(--color-p-blue-10)));
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.dp__theme_light .dp__today {
|
|
121
|
+
border: 1px solid rgb(var(--color-p-blue-40));
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
[data-has-error='true'] .dp__theme_light {
|
|
125
|
+
border-color: var(--dp-danger-color, rgb(var(--color-on-error)));
|
|
126
|
+
}
|
|
127
|
+
|
|
89
128
|
/* Toasts - vue-toastification */
|
|
90
129
|
.Vue-Toastification__toast {
|
|
91
130
|
font-family: Inter;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { type PActionBarAction } from '@squirrel/components/p-action-bar/p-action-bar.types';
|
|
1
2
|
import PActionBar from '@squirrel/components/p-action-bar/p-action-bar.vue';
|
|
2
3
|
import PAlert from '@squirrel/components/p-alert/p-alert.vue';
|
|
3
4
|
import PAvatar from '@squirrel/components/p-avatar/p-avatar.vue';
|
|
5
|
+
import { type Size } from '@squirrel/components/p-btn/p-btn.types';
|
|
4
6
|
import PBtn from '@squirrel/components/p-btn/p-btn.vue';
|
|
5
7
|
import PCard from '@squirrel/components/p-card/p-card.vue';
|
|
6
8
|
import PCheckbox from '@squirrel/components/p-checkbox/p-checkbox.vue';
|
|
@@ -10,8 +12,9 @@ import PDatePicker from '@squirrel/components/p-date-picker/p-date-picker.vue';
|
|
|
10
12
|
import PDrawer from '@squirrel/components/p-drawer/p-drawer.vue';
|
|
11
13
|
import PDropdown from '@squirrel/components/p-dropdown/p-dropdown.vue';
|
|
12
14
|
import PDropdownSelect from '@squirrel/components/p-dropdown-select/p-dropdown-select.vue';
|
|
15
|
+
import { type FileUploadFile } from '@squirrel/components/p-file-upload/p-file-upload.types';
|
|
13
16
|
import PFileUpload from '@squirrel/components/p-file-upload/p-file-upload.vue';
|
|
14
|
-
import
|
|
17
|
+
import { P_ICON_ALIASES, type PIconAlias } from '@squirrel/components/p-icon/p-icon.types';
|
|
15
18
|
import PIcon from '@squirrel/components/p-icon/p-icon.vue';
|
|
16
19
|
import PInfoIcon from '@squirrel/components/p-info-icon/p-info-icon.vue';
|
|
17
20
|
import PInlineDatePicker from '@squirrel/components/p-inline-date-picker/p-inline-date-picker.vue';
|
|
@@ -21,7 +24,9 @@ import PInputPercent from '@squirrel/components/p-input-percent/p-input-percent.
|
|
|
21
24
|
import PInputSearch from '@squirrel/components/p-input-search/p-input-search.vue';
|
|
22
25
|
import PLink from '@squirrel/components/p-link/p-link.vue';
|
|
23
26
|
import PLoading from '@squirrel/components/p-loading/p-loading.vue';
|
|
27
|
+
import { usePLoading } from '@squirrel/components/p-loading/usePLoading';
|
|
24
28
|
import PModal from '@squirrel/components/p-modal/p-modal.vue';
|
|
29
|
+
import { usePModal } from '@squirrel/components/p-modal/usePModal';
|
|
25
30
|
import PPagination from '@squirrel/components/p-pagination/p-pagination.vue';
|
|
26
31
|
import PPaginationInfo from '@squirrel/components/p-pagination-info/p-pagination-info.vue';
|
|
27
32
|
import PProgressBar from '@squirrel/components/p-progress-bar/p-progress-bar.vue';
|
|
@@ -29,42 +34,45 @@ import PRingLoader from '@squirrel/components/p-ring-loader/p-ring-loader.vue';
|
|
|
29
34
|
import PSelect from '@squirrel/components/p-select/p-select.vue';
|
|
30
35
|
import PSelectBtn from '@squirrel/components/p-select-btn/p-select-btn.vue';
|
|
31
36
|
import PSelectList from '@squirrel/components/p-select-list/p-select-list.vue';
|
|
37
|
+
import { useSelectList } from '@squirrel/components/p-select-list/useSelectList';
|
|
32
38
|
import PSelectPill from '@squirrel/components/p-select-pill/p-select-pill.vue';
|
|
33
39
|
import PSkeletonLoader from '@squirrel/components/p-skeleton-loader/p-skeleton-loader.vue';
|
|
34
|
-
import PTable from '@squirrel/components/p-table/p-table.vue';
|
|
35
|
-
import PTableHeaderCell from '@squirrel/components/p-table-header-cell/p-table-header-cell.vue';
|
|
36
|
-
import PTableLoader from '@squirrel/components/p-table-loader/p-table-loader.vue';
|
|
37
|
-
import PTableSort from '@squirrel/components/p-table-sort/p-table-sort.vue';
|
|
38
|
-
import PTableTd from '@squirrel/components/p-table-td/p-table-td.vue';
|
|
39
|
-
import PTabs from '@squirrel/components/p-tabs/p-tabs.vue';
|
|
40
|
-
import PTextarea from '@squirrel/components/p-textarea/p-textarea.vue';
|
|
41
|
-
import PToggle from '@squirrel/components/p-toggle/p-toggle.vue';
|
|
42
|
-
import { type FileUploadFile } from '@squirrel/components/p-file-upload/p-file-upload.types';
|
|
43
40
|
import {
|
|
44
|
-
type HeaderCellAttrs,
|
|
45
|
-
MIN_WIDTH_COL_RESIZE,
|
|
46
|
-
type TableCol,
|
|
47
|
-
type ThAttrs,
|
|
48
41
|
colsInjectionKey,
|
|
42
|
+
type HeaderCellAttrs,
|
|
49
43
|
isColsResizableInjectionKey,
|
|
50
44
|
isFirstColFixedInjectionKey,
|
|
51
45
|
isLastColFixedInjectionKey,
|
|
46
|
+
MIN_WIDTH_COL_RESIZE,
|
|
47
|
+
type TableCol,
|
|
48
|
+
type ThAttrs,
|
|
52
49
|
} from '@squirrel/components/p-table/p-table.types';
|
|
53
|
-
import
|
|
54
|
-
import {
|
|
50
|
+
import PTable from '@squirrel/components/p-table/p-table.vue';
|
|
51
|
+
import { usePTableColResize } from '@squirrel/components/p-table/usePTableColResize';
|
|
52
|
+
import { usePTableRowVirtualizer } from '@squirrel/components/p-table/usePTableRowVirtualizer';
|
|
53
|
+
import PFilterIcon from '@squirrel/components/p-table-header-cell/p-table-filter-icon.vue';
|
|
54
|
+
import PTableHeaderCell from '@squirrel/components/p-table-header-cell/p-table-header-cell.vue';
|
|
55
|
+
import PTableLoader from '@squirrel/components/p-table-loader/p-table-loader.vue';
|
|
55
56
|
import {
|
|
56
57
|
SORTING_TYPES,
|
|
57
58
|
type SortingType,
|
|
58
59
|
type SortingTypeWithoutNoSorting,
|
|
59
60
|
} from '@squirrel/components/p-table-sort/p-table-sort.config';
|
|
60
|
-
import
|
|
61
|
-
import
|
|
62
|
-
import
|
|
63
|
-
import
|
|
64
|
-
import
|
|
65
|
-
import { useSelectList } from '@squirrel/components/p-select-list/useSelectList';
|
|
61
|
+
import PTableSort from '@squirrel/components/p-table-sort/p-table-sort.vue';
|
|
62
|
+
import PTableTd from '@squirrel/components/p-table-td/p-table-td.vue';
|
|
63
|
+
import PTabs from '@squirrel/components/p-tabs/p-tabs.vue';
|
|
64
|
+
import PTextarea from '@squirrel/components/p-textarea/p-textarea.vue';
|
|
65
|
+
import PToggle from '@squirrel/components/p-toggle/p-toggle.vue';
|
|
66
66
|
|
|
67
67
|
export {
|
|
68
|
+
colsInjectionKey,
|
|
69
|
+
FileUploadFile,
|
|
70
|
+
HeaderCellAttrs,
|
|
71
|
+
isColsResizableInjectionKey,
|
|
72
|
+
isFirstColFixedInjectionKey,
|
|
73
|
+
isLastColFixedInjectionKey,
|
|
74
|
+
MIN_WIDTH_COL_RESIZE,
|
|
75
|
+
P_ICON_ALIASES,
|
|
68
76
|
PActionBar,
|
|
69
77
|
PActionBarAction,
|
|
70
78
|
PAlert,
|
|
@@ -81,6 +89,7 @@ export {
|
|
|
81
89
|
PFileUpload,
|
|
82
90
|
PFilterIcon,
|
|
83
91
|
PIcon,
|
|
92
|
+
PIconAlias,
|
|
84
93
|
PInfoIcon,
|
|
85
94
|
PInlineDatePicker,
|
|
86
95
|
PInput,
|
|
@@ -107,24 +116,15 @@ export {
|
|
|
107
116
|
PTabs,
|
|
108
117
|
PTextarea,
|
|
109
118
|
PToggle,
|
|
119
|
+
Size,
|
|
110
120
|
SORTING_TYPES,
|
|
111
|
-
MIN_WIDTH_COL_RESIZE,
|
|
112
|
-
P_ICON_ALIASES,
|
|
113
|
-
colsInjectionKey,
|
|
114
|
-
isColsResizableInjectionKey,
|
|
115
|
-
isFirstColFixedInjectionKey,
|
|
116
|
-
isLastColFixedInjectionKey,
|
|
117
|
-
usePModal,
|
|
118
|
-
usePTableColResize,
|
|
119
|
-
usePTableRowVirtualizer,
|
|
120
|
-
useSelectList,
|
|
121
|
-
usePLoading,
|
|
122
121
|
SortingType,
|
|
123
122
|
SortingTypeWithoutNoSorting,
|
|
124
|
-
Size,
|
|
125
|
-
FileUploadFile,
|
|
126
|
-
HeaderCellAttrs,
|
|
127
123
|
TableCol,
|
|
128
124
|
ThAttrs,
|
|
129
|
-
|
|
125
|
+
usePLoading,
|
|
126
|
+
usePModal,
|
|
127
|
+
usePTableColResize,
|
|
128
|
+
usePTableRowVirtualizer,
|
|
129
|
+
useSelectList,
|
|
130
130
|
};
|
|
@@ -135,7 +135,7 @@ describe('PActionBar.vue', () => {
|
|
|
135
135
|
expect(icons[2].attributes().icon).toBe('test-icon-3');
|
|
136
136
|
});
|
|
137
137
|
|
|
138
|
-
it('attrs fall through
|
|
138
|
+
it('attrs fall through', async () => {
|
|
139
139
|
const wrapper = createComponentWrapper({
|
|
140
140
|
props: {
|
|
141
141
|
show: true,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import FileUploadIcon from '@squirrel/assets/file-upload-upload-icon.svg?inline';
|
|
2
|
-
import PActionBar from '@squirrel/components/p-action-bar/p-action-bar.vue';
|
|
3
|
-
import PBtn from '@squirrel/components/p-btn/p-btn.vue';
|
|
4
2
|
import PaginateLeftIcon from '@squirrel/assets/pagination-left-icon.svg?inline';
|
|
5
3
|
import PaginateRightIcon from '@squirrel/assets/pagination-right-icon.svg?inline';
|
|
4
|
+
import PActionBar from '@squirrel/components/p-action-bar/p-action-bar.vue';
|
|
5
|
+
import PBtn from '@squirrel/components/p-btn/p-btn.vue';
|
|
6
6
|
import { action } from '@storybook/addon-actions';
|
|
7
7
|
import { expect, fn, userEvent, waitFor, within } from '@storybook/test';
|
|
8
8
|
|
|
@@ -56,11 +56,11 @@
|
|
|
56
56
|
</template>
|
|
57
57
|
|
|
58
58
|
<script setup lang="ts">
|
|
59
|
+
import { type PActionBarAction } from '@squirrel/components/p-action-bar/p-action-bar.types';
|
|
59
60
|
import PBtn from '@squirrel/components/p-btn/p-btn.vue';
|
|
60
61
|
import PCloseBtn from '@squirrel/components/p-close-btn/p-close-btn.vue';
|
|
61
62
|
import PDropdown from '@squirrel/components/p-dropdown/p-dropdown.vue';
|
|
62
63
|
import PIcon from '@squirrel/components/p-icon/p-icon.vue';
|
|
63
|
-
import { type PActionBarAction } from '@squirrel/components/p-action-bar/p-action-bar.types';
|
|
64
64
|
import { isComponent } from '@squirrel/utils/component';
|
|
65
65
|
import { isString } from '@squirrel/utils/string';
|
|
66
66
|
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
|
|
21
21
|
<script lang="ts">
|
|
22
22
|
import { type Color, getColor } from '@squirrel/utils/tailwind';
|
|
23
|
-
import { type PropType
|
|
23
|
+
import { defineComponent, type PropType } from 'vue';
|
|
24
24
|
|
|
25
25
|
const ALERT_TYPES = {
|
|
26
26
|
info: `bg-info text-on-info`,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import PBtn from '@squirrel/components/p-btn/p-btn.vue';
|
|
2
|
-
import { createWrapperFor } from '@tests/vitest.helpers';
|
|
3
2
|
import { sanitizeUrl } from '@squirrel/utils/sanitization';
|
|
3
|
+
import { createWrapperFor } from '@tests/vitest.helpers';
|
|
4
4
|
|
|
5
5
|
vi.mock('@squirrel/utils/sanitization', () => {
|
|
6
6
|
return {
|
|
@@ -223,7 +223,7 @@ describe('PBtn.vue', () => {
|
|
|
223
223
|
expect(button.attributes()['aria-selected']).toBe('true');
|
|
224
224
|
});
|
|
225
225
|
|
|
226
|
-
it('
|
|
226
|
+
it('sanitizes an invalid link', async () => {
|
|
227
227
|
const wrapper = createWrapperFor(PBtn, {
|
|
228
228
|
props: {
|
|
229
229
|
to: 'javascript:evil()',
|
|
@@ -33,13 +33,13 @@
|
|
|
33
33
|
</template>
|
|
34
34
|
|
|
35
35
|
<script lang="ts">
|
|
36
|
-
import PRingLoader from '@squirrel/components/p-ring-loader/p-ring-loader.vue';
|
|
37
|
-
import { type Color, getColorDeep } from '@squirrel/utils/tailwind';
|
|
38
|
-
import { type PropType, defineComponent } from 'vue';
|
|
39
|
-
import { type RouteLocationRaw, RouterLink } from 'vue-router';
|
|
40
36
|
import { type Size } from '@squirrel/components/p-btn/p-btn.types';
|
|
37
|
+
import PRingLoader from '@squirrel/components/p-ring-loader/p-ring-loader.vue';
|
|
41
38
|
import { isExternalLink } from '@squirrel/utils/link';
|
|
42
39
|
import { sanitizeUrl } from '@squirrel/utils/sanitization';
|
|
40
|
+
import { type Color, getColorDeep } from '@squirrel/utils/tailwind';
|
|
41
|
+
import { defineComponent, type PropType } from 'vue';
|
|
42
|
+
import { type RouteLocationRaw, RouterLink } from 'vue-router';
|
|
43
43
|
|
|
44
44
|
const BUTTON_TYPES = {
|
|
45
45
|
PRIMARY: 'primary',
|