vueless 0.0.6 → 0.0.8
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/.eslintignore +0 -1
- package/.storybook/configs/main.config.js +1 -1
- package/.storybook/decorators/vue3SourceDecorator.js +1 -1
- package/.storybook/index.pcss +3 -0
- package/.storybook/preview.js +5 -13
- package/.storybook/themes/vueless.docs.theme.js +1 -1
- package/.storybook/themes/vueless.theme.js +1 -1
- package/package.json +7 -5
- package/src/service.tailwind/index.js +1 -5
- package/src/service.ui/index.js +1 -1
- package/src/ui.form-checkbox-group/index.vue +1 -1
- package/src/ui.form-radio-card/index.vue +24 -24
- package/src/ui.form-radio-group/index.vue +1 -0
- package/src/ui.image-icon/index.vue +1 -1
- package/tailwind.config.js +3 -61
- package/vite.config.mjs +5 -6
- package/web-types.json +1 -1
- /package/{.eslintrc.js → .eslintrc.cjs} +0 -0
- /package/src/ui.notify/{index.stories.js → index.sto_ries.js} +0 -0
package/.eslintignore
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { addons, makeDecorator } from "@storybook/preview-api";
|
|
2
2
|
import { h, onMounted, watch } from "vue";
|
|
3
|
-
import { setBrandColor } from "
|
|
3
|
+
import { setBrandColor } from "vueless/src/service.ui";
|
|
4
4
|
|
|
5
5
|
export const vue3SourceDecorator = makeDecorator({
|
|
6
6
|
name: "vue3SourceDecorator",
|
package/.storybook/preview.js
CHANGED
|
@@ -4,32 +4,24 @@ import { vue3SourceDecorator } from "./decorators/vue3SourceDecorator";
|
|
|
4
4
|
|
|
5
5
|
// Vue plugins
|
|
6
6
|
import { createStore } from "vuex";
|
|
7
|
-
import
|
|
8
|
-
import NotifyServiceDefault from "../src/ui.notify/services";
|
|
7
|
+
import NotifyServiceDefault from "vueless/src/ui.notify/services";
|
|
9
8
|
|
|
10
9
|
// Tailwind styles
|
|
11
|
-
import "
|
|
10
|
+
import "./index.pcss";
|
|
12
11
|
|
|
13
12
|
// Common stores
|
|
14
|
-
import loader from "
|
|
15
|
-
import loaderTop from "
|
|
16
|
-
import breakpoint from "
|
|
13
|
+
import loader from "vueless/src/ui.loader-rendering/store";
|
|
14
|
+
import loaderTop from "vueless/src/ui.loader-top/store";
|
|
15
|
+
import breakpoint from "vueless/src/ui.viewport/store";
|
|
17
16
|
|
|
18
17
|
// Create store instance
|
|
19
18
|
const store = createStore({
|
|
20
19
|
modules: { loader, loaderTop, breakpoint },
|
|
21
20
|
});
|
|
22
21
|
|
|
23
|
-
// Create router instance
|
|
24
|
-
const router = createRouter({
|
|
25
|
-
history: createWebHistory("/"),
|
|
26
|
-
routes: [{ path: "/:pathMatch(.*)*", component: () => import("../src/ui.container-page") }],
|
|
27
|
-
});
|
|
28
|
-
|
|
29
22
|
// Create storybook app instance
|
|
30
23
|
const storybookApp = (app) => {
|
|
31
24
|
app.use(store);
|
|
32
|
-
app.use(router);
|
|
33
25
|
app.use(new NotifyServiceDefault().notifyInstance);
|
|
34
26
|
};
|
|
35
27
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vueless",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Vue Styleless Component Framework.",
|
|
6
6
|
"homepage": "https://vueless.com",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"release:production-major": "release-it major --ci",
|
|
17
17
|
"sb:dev-full": "STORYBOOK_FULL=1 storybook dev -p 6006 --no-open",
|
|
18
18
|
"sb:dev": "storybook dev -p 6006 --docs --no-open",
|
|
19
|
-
"sb:build": "
|
|
19
|
+
"sb:build": "storybook build",
|
|
20
20
|
"sb:preview": "vite preview --host --outDir=storybook-static",
|
|
21
21
|
"vueless:update": "yarn add -D file:../vite-plugin-vueless file:../vueless-storybook",
|
|
22
22
|
"postinstall": "node .web-types-gen"
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
"@vueless/storybook": "file:../vueless-storybook",
|
|
44
44
|
"@vueless/vite-plugin": "file:../vite-plugin-vueless",
|
|
45
45
|
"autoprefixer": "^10.4.19",
|
|
46
|
+
"cssnano": "^6.1.2",
|
|
46
47
|
"eslint": "^8.55.0",
|
|
47
48
|
"eslint-plugin-node": "^11.1.0",
|
|
48
49
|
"eslint-plugin-prettier": "^5.0.1",
|
|
@@ -56,9 +57,10 @@
|
|
|
56
57
|
"vite": "^5.1.1",
|
|
57
58
|
"vite-plugin-compression": "^0.5.1",
|
|
58
59
|
"vite-plugin-eslint": "^1.8.1",
|
|
59
|
-
"vue": "^3.4.19"
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
"vue": "^3.4.19"
|
|
61
|
+
},
|
|
62
|
+
"resolutions": {
|
|
63
|
+
"string-width": "4.2.3"
|
|
62
64
|
},
|
|
63
65
|
"repository": {
|
|
64
66
|
"type": "git",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import colors from "tailwindcss/colors";
|
|
1
|
+
import colors from "tailwindcss/colors.js";
|
|
2
2
|
import forms from "@tailwindcss/forms";
|
|
3
3
|
import vuelessConfig from "../../vueless.config.js";
|
|
4
4
|
|
|
@@ -82,10 +82,6 @@ export default class TailwindServiceDefault {
|
|
|
82
82
|
"./src/**/*.{js,ts,jsx,tsx,vue}",
|
|
83
83
|
"./vueless.config.{js,ts}",
|
|
84
84
|
"./node_modules/vueless/**/*.{js,ts,vue}",
|
|
85
|
-
// TODO: remove it after creating the package
|
|
86
|
-
"./.vueless/**/*.{js,ts,vue}",
|
|
87
|
-
"./.vueless-layouts/**/*.{js,ts,vue}",
|
|
88
|
-
"./.vueless-services/**/*.{js,ts,vue}",
|
|
89
85
|
],
|
|
90
86
|
safelist: isProd ? prodSafelist : devSafelist,
|
|
91
87
|
theme: {
|
package/src/service.ui/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { defineConfig } from "cva";
|
|
|
3
3
|
import { twMerge } from "tailwind-merge";
|
|
4
4
|
import colors from "tailwindcss/colors";
|
|
5
5
|
import { brandColors, grayColors } from "../service.tailwind";
|
|
6
|
-
import vuelessConfig from "
|
|
6
|
+
import vuelessConfig from "../../../../vueless.config.js";
|
|
7
7
|
|
|
8
8
|
/*
|
|
9
9
|
Export cva (class variance authority) methods extended with tailwind-merge.
|
|
@@ -35,8 +35,8 @@ import { isEqual } from "lodash-es";
|
|
|
35
35
|
|
|
36
36
|
import UIService, { getRandomId } from "../service.ui";
|
|
37
37
|
|
|
38
|
-
import UCheckbox from "../ui.form-checkbox";
|
|
39
38
|
import ULabel from "../ui.form-label";
|
|
39
|
+
import UCheckbox from "../ui.form-checkbox";
|
|
40
40
|
|
|
41
41
|
import { UCheckboxGroup } from "./constants";
|
|
42
42
|
import defaultConfig from "./configs/default.config";
|
|
@@ -112,33 +112,33 @@ const props = defineProps({
|
|
|
112
112
|
},
|
|
113
113
|
});
|
|
114
114
|
|
|
115
|
-
const labelConfig = {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
};
|
|
115
|
+
// const labelConfig = {
|
|
116
|
+
// wrapper: {
|
|
117
|
+
// base: `
|
|
118
|
+
// rounded-lg border border-solid border-gray-300 cursor-pointer relative w-full
|
|
119
|
+
// hover:border-gray-400 focus-within:border-gray-500 focus-within:ring-4 focus-within:ring-gray-600/[.15]
|
|
120
|
+
// px-6 py-4`,
|
|
121
|
+
// },
|
|
122
|
+
// label: {
|
|
123
|
+
// base: "h-full w-full cursor-pointer",
|
|
124
|
+
// variants: {
|
|
125
|
+
// placement: {
|
|
126
|
+
// topInside: "left-0 !top-0",
|
|
127
|
+
// },
|
|
128
|
+
// },
|
|
129
|
+
// },
|
|
130
|
+
// description: {
|
|
131
|
+
// variants: {
|
|
132
|
+
// placement: {
|
|
133
|
+
// topInside: "pl-0",
|
|
134
|
+
// },
|
|
135
|
+
// },
|
|
136
|
+
// },
|
|
137
|
+
// };
|
|
138
138
|
|
|
139
139
|
const emit = defineEmits(["update:modelValue"]);
|
|
140
140
|
|
|
141
|
-
const { radioAttrs, iconAttrs, wrapperAttrs
|
|
141
|
+
const { radioAttrs, iconAttrs, wrapperAttrs /* labelAttrs */ } = useAttrs(props);
|
|
142
142
|
|
|
143
143
|
const isMobileDevice = computed(() => {
|
|
144
144
|
return store.getters["breakpoint/isMobileDevice"];
|
|
@@ -148,7 +148,7 @@ let generatedIcons = [];
|
|
|
148
148
|
|
|
149
149
|
if (import.meta.env.PROD) {
|
|
150
150
|
generatedIcons = Object.entries(
|
|
151
|
-
import.meta.glob(
|
|
151
|
+
import.meta.glob(`../../../../src/assets/images/.generated/**/*.svg`, {
|
|
152
152
|
eager: true,
|
|
153
153
|
query: "?component",
|
|
154
154
|
}),
|
package/tailwind.config.js
CHANGED
|
@@ -1,69 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
/** @type {import('tailwindcss').Config} */
|
|
2
|
+
import { vuelessPreset } from "./src/service.tailwind";
|
|
2
3
|
|
|
3
4
|
export default {
|
|
4
|
-
|
|
5
|
+
presets: [vuelessPreset],
|
|
5
6
|
theme: {
|
|
6
7
|
fontFamily: {
|
|
7
8
|
roboto: ["Roboto", "sans-serif"],
|
|
8
9
|
},
|
|
9
|
-
extend: {
|
|
10
|
-
spacing: {
|
|
11
|
-
100: "25rem", // 400px
|
|
12
|
-
125: "31.25rem", // 500px
|
|
13
|
-
150: "37.5rem", // 600px
|
|
14
|
-
175: "43.75rem", // 700px
|
|
15
|
-
200: "50rem", // 800px
|
|
16
|
-
225: "56.25rem", // 900px
|
|
17
|
-
250: "62.5rem", // 1000px
|
|
18
|
-
275: "68.75rem", // 1100px
|
|
19
|
-
300: "75rem", // 1200px
|
|
20
|
-
"safe-top": "env(safe-area-inset-top)",
|
|
21
|
-
"safe-bottom": "env(safe-area-inset-bottom)",
|
|
22
|
-
"safe-left": "env(safe-area-inset-left)",
|
|
23
|
-
"safe-right": "env(safe-area-inset-right)",
|
|
24
|
-
"mobile-menu-height": "3.5rem",
|
|
25
|
-
},
|
|
26
|
-
fontSize: {
|
|
27
|
-
"2xs": ["0.625rem", "0.75rem"], // 10px
|
|
28
|
-
xs: ["0.75rem", "0.875rem"], // 12px
|
|
29
|
-
sm: ["0.875rem", "1rem"], // 14px
|
|
30
|
-
base: ["1rem", "1.1875rem"], // 16px
|
|
31
|
-
lg: ["1.125rem", "1.3125rem"], // 18px
|
|
32
|
-
xl: ["1.375rem", "1.6rem"], // 22px
|
|
33
|
-
"2xl": ["1.5rem", "1.75rem"], // 24px
|
|
34
|
-
"3xl": ["1.75rem", "2.0625rem"], // 28px
|
|
35
|
-
"4xl": ["2rem", "2.3125rem"], // 32px
|
|
36
|
-
"5xl": ["3rem", "3.5rem"], // 48px
|
|
37
|
-
},
|
|
38
|
-
opacity: {
|
|
39
|
-
15: ".15",
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
colors: {
|
|
43
|
-
transparent: "transparent",
|
|
44
|
-
current: "currentColor",
|
|
45
|
-
brand: withOpacity("--brand-color"),
|
|
46
|
-
gray: colors.gray,
|
|
47
|
-
red: colors.red,
|
|
48
|
-
yellow: colors.amber,
|
|
49
|
-
green: colors.green,
|
|
50
|
-
blue: colors.blue,
|
|
51
|
-
violet: colors.violet,
|
|
52
|
-
black: colors.black,
|
|
53
|
-
white: colors.white,
|
|
54
|
-
orange: colors.orange,
|
|
55
|
-
fuchsia: colors.fuchsia,
|
|
56
|
-
},
|
|
57
10
|
},
|
|
58
|
-
plugins: [require("@tailwindcss/forms")],
|
|
59
11
|
};
|
|
60
|
-
|
|
61
|
-
function withOpacity(variableName) {
|
|
62
|
-
return ({ opacityValue }) => {
|
|
63
|
-
if (opacityValue !== undefined) {
|
|
64
|
-
return `rgba(var(${variableName}), ${opacityValue})`;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
return `rgb(var(${variableName}))`;
|
|
68
|
-
};
|
|
69
|
-
}
|
package/vite.config.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineConfig } from "vite";
|
|
2
2
|
import path from "path";
|
|
3
|
-
|
|
3
|
+
// Plugins
|
|
4
4
|
import Vue from "@vitejs/plugin-vue";
|
|
5
5
|
import Eslint from "vite-plugin-eslint";
|
|
6
6
|
import { Vueless, VuelessUnpluginComponents } from "@vueless/vite-plugin";
|
|
@@ -9,25 +9,24 @@ export default defineConfig({
|
|
|
9
9
|
plugins: [
|
|
10
10
|
Vue(),
|
|
11
11
|
Eslint(),
|
|
12
|
-
Vueless(),
|
|
12
|
+
Vueless({ mode: "storybook", env: "vueless" }),
|
|
13
13
|
VuelessUnpluginComponents(),
|
|
14
14
|
],
|
|
15
15
|
resolve: {
|
|
16
16
|
extensions: [".vue", ".mjs", ".js", ".ts", ".mdx"],
|
|
17
17
|
alias: {
|
|
18
|
+
"../../../../vueless.config.js": path.resolve(__dirname, "./vueless.config.js"),
|
|
18
19
|
"vueless/src": path.resolve(__dirname, "./src"),
|
|
19
20
|
},
|
|
20
21
|
},
|
|
21
22
|
optimizeDeps: {
|
|
22
23
|
include: [
|
|
23
24
|
"vuex",
|
|
24
|
-
"vue-i18n",
|
|
25
|
-
"vue-router",
|
|
26
25
|
"vue-tippy",
|
|
27
26
|
"@uppy/core",
|
|
28
27
|
"@uppy/vue/src/drag-drop",
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
"@kyvg/vue3-notification",
|
|
29
|
+
"@tailwindcss/forms",
|
|
31
30
|
"tailwindcss/colors.js",
|
|
32
31
|
"cva",
|
|
33
32
|
"tailwind-merge",
|
package/web-types.json
CHANGED
|
File without changes
|
|
File without changes
|