vueless 0.0.43 → 0.0.45
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/index.js +16 -0
- package/package.json +17 -18
- package/ui.data-table/index.stories.js +44 -3
- package/web-types.json +1 -1
package/index.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { createLocale, LocaleSymbol } from "./composable.locale";
|
|
2
|
+
|
|
3
|
+
export { default as createVueI18nAdapter } from "./adatper.locale/vue-i18n";
|
|
4
|
+
export { default as defaultEnLocale } from "./adatper.locale/locales/en";
|
|
5
|
+
|
|
6
|
+
export function createVueless(options = {}) {
|
|
7
|
+
const locale = createLocale(options.locale);
|
|
8
|
+
|
|
9
|
+
const install = (app) => {
|
|
10
|
+
app.provide(LocaleSymbol, locale);
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
return {
|
|
14
|
+
install,
|
|
15
|
+
};
|
|
16
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vueless",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.45",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Vue Styleless Component Framework.",
|
|
6
6
|
"homepage": "https://vueless.com",
|
|
@@ -21,19 +21,19 @@
|
|
|
21
21
|
"sb:dev": "storybook dev -p 6006 --docs --no-open",
|
|
22
22
|
"sb:build": "STORYBOOK_VUELESS_ENV=1 storybook build --docs",
|
|
23
23
|
"sb:preview": "vite preview --host --outDir=storybook-static",
|
|
24
|
-
"
|
|
24
|
+
"package:prepare": "node src/gen.web-types && rm -rf dist && mkdir -p dist && cp -r src/. package.json LICENSE web-types.json README.md dist/ && rm -rf dist/assets && node dist.prepare"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@kyvg/vue3-notification": "^3.2.1",
|
|
28
|
-
"@material-symbols/svg-500": "^0.
|
|
29
|
-
"@tailwindcss/forms": "^0.5.
|
|
30
|
-
"@uppy/core": "^3.
|
|
31
|
-
"@uppy/drag-drop": "^3.0
|
|
32
|
-
"@uppy/vue": "^1.
|
|
28
|
+
"@material-symbols/svg-500": "^0.17.3",
|
|
29
|
+
"@tailwindcss/forms": "^0.5.7",
|
|
30
|
+
"@uppy/core": "^3.10.1",
|
|
31
|
+
"@uppy/drag-drop": "^3.1.0",
|
|
32
|
+
"@uppy/vue": "^1.1.2",
|
|
33
33
|
"cva": "^1.0.0-beta.1",
|
|
34
34
|
"lodash-es": "^4.17.21",
|
|
35
|
-
"tailwind-merge": "^2.
|
|
36
|
-
"tailwindcss": "^3.
|
|
35
|
+
"tailwind-merge": "^2.3.0",
|
|
36
|
+
"tailwindcss": "^3.4.3",
|
|
37
37
|
"vue-tippy": "^6.0.0-beta.0",
|
|
38
38
|
"vuedraggable": "^4.1.0",
|
|
39
39
|
"vuex": "^4.1.0"
|
|
@@ -41,7 +41,6 @@
|
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@release-it/bumper": "^6.0.1",
|
|
43
43
|
"@vitejs/plugin-vue": "^5.0.4",
|
|
44
|
-
"@vue/compiler-sfc": "^3.4.19",
|
|
45
44
|
"@vue/eslint-config-prettier": "^9.0.0",
|
|
46
45
|
"@vueless/plugin-vite": "^0.0.1",
|
|
47
46
|
"@vueless/storybook": "^0.0.8",
|
|
@@ -49,22 +48,22 @@
|
|
|
49
48
|
"cssnano": "^6.1.2",
|
|
50
49
|
"eslint": "^8.55.0",
|
|
51
50
|
"eslint-plugin-node": "^11.1.0",
|
|
52
|
-
"eslint-plugin-prettier": "^5.
|
|
51
|
+
"eslint-plugin-prettier": "^5.1.3",
|
|
53
52
|
"eslint-plugin-storybook": "^0.8.0",
|
|
54
|
-
"eslint-plugin-tailwindcss": "^3.
|
|
55
|
-
"eslint-plugin-vue": "^9.
|
|
53
|
+
"eslint-plugin-tailwindcss": "^3.15.1",
|
|
54
|
+
"eslint-plugin-vue": "^9.25.0",
|
|
56
55
|
"globby": "^13.2.2",
|
|
57
|
-
"postcss": "^8.4.
|
|
58
|
-
"prettier": "^3.
|
|
56
|
+
"postcss": "^8.4.38",
|
|
57
|
+
"prettier": "^3.2.5",
|
|
59
58
|
"prettier-eslint": "^16.3.0",
|
|
60
|
-
"release-it": "^17.2.
|
|
59
|
+
"release-it": "^17.2.1",
|
|
61
60
|
"vite": "^5.2.10",
|
|
62
61
|
"vite-plugin-compression": "^0.5.1",
|
|
63
62
|
"vite-plugin-eslint": "^1.8.1",
|
|
64
|
-
"vue": "^3.4.
|
|
63
|
+
"vue": "^3.4.25"
|
|
65
64
|
},
|
|
66
65
|
"resolutions": {
|
|
67
|
-
"jackspeak": "2.
|
|
66
|
+
"jackspeak": "2.3.6"
|
|
68
67
|
},
|
|
69
68
|
"repository": {
|
|
70
69
|
"type": "git",
|
|
@@ -31,7 +31,7 @@ export default {
|
|
|
31
31
|
{ key: "key_4", label: "title 4" },
|
|
32
32
|
],
|
|
33
33
|
itemsRow: {
|
|
34
|
-
id:
|
|
34
|
+
id: "",
|
|
35
35
|
isChecked: false,
|
|
36
36
|
key_1: {
|
|
37
37
|
primaryRow: "primaryRow",
|
|
@@ -49,6 +49,10 @@ export default {
|
|
|
49
49
|
primaryRow: "primaryRow",
|
|
50
50
|
secondaryRow: "secondaryRow",
|
|
51
51
|
},
|
|
52
|
+
date: {
|
|
53
|
+
primaryRow: 1709046013,
|
|
54
|
+
separatorDate: new Date(1709046013 * 1000).toString(),
|
|
55
|
+
},
|
|
52
56
|
},
|
|
53
57
|
numberOfRow: 5,
|
|
54
58
|
},
|
|
@@ -70,15 +74,28 @@ const DefaultTemplate = (args) => ({
|
|
|
70
74
|
`,
|
|
71
75
|
computed: {
|
|
72
76
|
itemsData() {
|
|
73
|
-
|
|
77
|
+
let rows = [];
|
|
74
78
|
|
|
75
79
|
for (let i = 0; i < args.numberOfRow; i++) rows.push(args.itemsRow);
|
|
80
|
+
rows = rows.map((item) => (item.id = getRandomId()));
|
|
76
81
|
|
|
77
82
|
return rows;
|
|
78
83
|
},
|
|
79
84
|
},
|
|
80
85
|
});
|
|
81
86
|
|
|
87
|
+
const EmptyTemplate = (args) => ({
|
|
88
|
+
components: { UTable },
|
|
89
|
+
setup() {
|
|
90
|
+
const slots = getSlotNames(UTable.name);
|
|
91
|
+
|
|
92
|
+
return { args, slots };
|
|
93
|
+
},
|
|
94
|
+
template: `
|
|
95
|
+
<UTable v-bind="args" :rows="[]" />
|
|
96
|
+
`,
|
|
97
|
+
});
|
|
98
|
+
|
|
82
99
|
const SlotTemplate = (args) => ({
|
|
83
100
|
components: { UTable, UButton, UTableCell, ULink, UMoney, UBadge },
|
|
84
101
|
setup() {
|
|
@@ -154,13 +171,22 @@ defaultCells.args = {
|
|
|
154
171
|
`,
|
|
155
172
|
};
|
|
156
173
|
|
|
174
|
+
export const Empty = EmptyTemplate.bind({});
|
|
175
|
+
Empty.args = {};
|
|
176
|
+
|
|
177
|
+
export const Filters = EmptyTemplate.bind({});
|
|
178
|
+
Empty.args = { filters: true };
|
|
179
|
+
|
|
180
|
+
export const Resource = DefaultTemplate.bind({});
|
|
181
|
+
Resource.args = { resource: "/7010--resource" };
|
|
182
|
+
|
|
157
183
|
export const selectable = DefaultTemplate.bind({});
|
|
158
184
|
selectable.args = { selectable: true };
|
|
159
185
|
|
|
160
186
|
// TODO: Don't work fixed footer. Find how to fix it.
|
|
161
187
|
export const fixedFooter = SlotTemplate.bind({});
|
|
162
188
|
fixedFooter.args = {
|
|
163
|
-
|
|
189
|
+
stickyFooter: true,
|
|
164
190
|
selectable: true,
|
|
165
191
|
slotTemplate: `
|
|
166
192
|
<template #tfoot>
|
|
@@ -180,6 +206,21 @@ stickyHeader.args = { stickyHeader: true };
|
|
|
180
206
|
export const compact = DefaultTemplate.bind({});
|
|
181
207
|
compact.args = { compact: true };
|
|
182
208
|
|
|
209
|
+
export const DateDivider = DefaultTemplate.bind({});
|
|
210
|
+
DateDivider.args = {
|
|
211
|
+
dateDivider: true,
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
export const DateDividerCustomLabel = DefaultTemplate.bind({});
|
|
215
|
+
DateDivider.args = {
|
|
216
|
+
dateDivider: [
|
|
217
|
+
{
|
|
218
|
+
date: new Date(1709046013 * 1000).toString(),
|
|
219
|
+
label: "Label for this date",
|
|
220
|
+
},
|
|
221
|
+
],
|
|
222
|
+
};
|
|
223
|
+
|
|
183
224
|
export const slotDefault = SlotTemplate.bind({});
|
|
184
225
|
slotDefault.args = {
|
|
185
226
|
slotTemplate: `
|