vueless 0.0.7 → 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 CHANGED
@@ -4,4 +4,3 @@
4
4
 
5
5
  # allow to format hidden folders
6
6
  !/.storybook
7
- !/.mono
@@ -1,5 +1,5 @@
1
1
  import vuelessDocsTheme from "../themes/vueless.docs.theme";
2
- import colors from "tailwindcss/colors";
2
+ import colors from "tailwindcss/colors.js";
3
3
 
4
4
  export const docs = {
5
5
  theme: vuelessDocsTheme,
@@ -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 "../../src/service.ui";
3
+ import { setBrandColor } from "vueless/src/service.ui";
4
4
 
5
5
  export const vue3SourceDecorator = makeDecorator({
6
6
  name: "vue3SourceDecorator",
@@ -0,0 +1,3 @@
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
@@ -4,32 +4,24 @@ import { vue3SourceDecorator } from "./decorators/vue3SourceDecorator";
4
4
 
5
5
  // Vue plugins
6
6
  import { createStore } from "vuex";
7
- import { createRouter, createWebHistory } from "vue-router";
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 "../index.pcss";
10
+ import "./index.pcss";
12
11
 
13
12
  // Common stores
14
- import loader from "../src/ui.loader-rendering/store";
15
- import loaderTop from "../src/ui.loader-top/store";
16
- import breakpoint from "../src/ui.viewport/store";
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
 
@@ -1,5 +1,5 @@
1
1
  import { create } from "@storybook/theming/create";
2
- import colors from "tailwindcss/colors";
2
+ import colors from "tailwindcss/colors.js";
3
3
 
4
4
  export default create({
5
5
  base: "light",
@@ -1,5 +1,5 @@
1
1
  import { create } from "@storybook/theming/create";
2
- import colors from "tailwindcss/colors";
2
+ import colors from "tailwindcss/colors.js";
3
3
 
4
4
  export default create({
5
5
  base: "light",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vueless",
3
- "version": "0.0.7",
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": "NO_PWA=1 storybook build --docs",
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
- "vue-i18n": "^9.9.1",
61
- "vue-router": "^4.2.5"
60
+ "vue": "^3.4.19"
61
+ },
62
+ "resolutions": {
63
+ "string-width": "4.2.3"
62
64
  },
63
65
  "repository": {
64
66
  "type": "git",
@@ -82,9 +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-layouts/**/*.{js,ts,vue}",
87
- "./.vueless-services/**/*.{js,ts,vue}",
88
85
  ],
89
86
  safelist: isProd ? prodSafelist : devSafelist,
90
87
  theme: {
@@ -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 "/vueless.config.js";
6
+ import vuelessConfig from "../../../../vueless.config.js";
7
7
 
8
8
  /*
9
9
  Export cva (class variance authority) methods extended with tailwind-merge.
@@ -112,33 +112,33 @@ const props = defineProps({
112
112
  },
113
113
  });
114
114
 
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
- };
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, labelAttrs } = useAttrs(props);
141
+ const { radioAttrs, iconAttrs, wrapperAttrs /* labelAttrs */ } = useAttrs(props);
142
142
 
143
143
  const isMobileDevice = computed(() => {
144
144
  return store.getters["breakpoint/isMobileDevice"];
@@ -1,69 +1,11 @@
1
- const colors = require("tailwindcss/colors");
1
+ /** @type {import('tailwindcss').Config} */
2
+ import { vuelessPreset } from "./src/service.tailwind";
2
3
 
3
4
  export default {
4
- content: ["./index.html", "./vueless.config.{js,ts}", "./src/**/*.{js,ts,vue}"],
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
- //"@kyvg/vue3-notification",
30
- //"@tailwindcss/forms",
28
+ "@kyvg/vue3-notification",
29
+ "@tailwindcss/forms",
31
30
  "tailwindcss/colors.js",
32
31
  "cva",
33
32
  "tailwind-merge",
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "framework": "vue",
3
3
  "name": "vueless",
4
- "version": "0.0.5",
4
+ "version": "0.0.7",
5
5
  "contributions": {
6
6
  "html": {
7
7
  "description-markup": "markdown",
File without changes