@volverjs/style 0.1.9-beta.5 → 0.1.9-beta.7

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/package.json CHANGED
@@ -24,7 +24,7 @@
24
24
  "bugs": {
25
25
  "url": "https://github.com/volverjs/style/issues"
26
26
  },
27
- "version": "0.1.9-beta.5",
27
+ "version": "0.1.9-beta.7",
28
28
  "engines": {
29
29
  "node": ">= 12.x"
30
30
  },
@@ -37,33 +37,33 @@
37
37
  "dist/*"
38
38
  ],
39
39
  "devDependencies": {
40
- "@iconify/vue": "^4.1.0",
40
+ "@iconify/vue": "^4.1.1",
41
41
  "@vitejs/plugin-vue": "^4.1.0",
42
42
  "@vueuse/core": "^9.13.0",
43
43
  "@vueuse/head": "^1.1.23",
44
- "eslint": "^8.36.0",
44
+ "eslint": "^8.38.0",
45
45
  "eslint-config-prettier": "^8.8.0",
46
- "eslint-plugin-vue": "^9.9.0",
47
- "glob": "^9.3.1",
46
+ "eslint-plugin-vue": "^9.10.0",
47
+ "glob": "^10.0.0",
48
48
  "icss-utils": "^5.1.0",
49
49
  "markdown-it-anchor": "^8.6.7",
50
50
  "markdown-it-prism": "^2.3.0",
51
51
  "postcss": "^8.4.21",
52
52
  "postcss-html": "^1.5.0",
53
- "postcss-preset-env": "^8.0.1",
53
+ "postcss-preset-env": "^8.3.1",
54
54
  "prism-themes": "^1.9.0",
55
55
  "prismjs": "1.29.0",
56
56
  "remark": "^14.0.2",
57
57
  "remark-frontmatter": "^4.0.1",
58
58
  "remark-gfm": "^3.0.1",
59
59
  "remark-lint": "^9.1.1",
60
- "sass": "^1.59.3",
61
- "stylelint": "^15.3.0",
60
+ "sass": "^1.62.0",
61
+ "stylelint": "^15.4.0",
62
62
  "stylelint-config-prettier": "^9.0.5",
63
- "stylelint-config-recommended-scss": "^9.0.1",
63
+ "stylelint-config-recommended-scss": "^10.0.0",
64
64
  "stylelint-config-recommended-vue": "^1.4.0",
65
- "stylelint-config-standard-scss": "^7.0.1",
66
- "unplugin-auto-import": "^0.15.1",
65
+ "stylelint-config-standard-scss": "^8.0.0",
66
+ "unplugin-auto-import": "^0.15.2",
67
67
  "unplugin-vue-components": "^0.24.1",
68
68
  "vite": "^4.2.1",
69
69
  "vite-plugin-css-export": "^2.0.0",
@@ -73,7 +73,7 @@
73
73
  "vite-plugin-pages": "^0.29.0",
74
74
  "vite-plugin-stylelint": "^4.3.0",
75
75
  "vite-plugin-vue-layouts": "^0.8.0",
76
- "vite-ssg": "^0.22.1",
76
+ "vite-ssg": "^0.22.2",
77
77
  "vite-ssg-sitemap": "^0.4.3",
78
78
  "vue": "^3.2.47",
79
79
  "vue-live": "2.4.10",
package/src/export.scss CHANGED
@@ -4,6 +4,7 @@
4
4
 
5
5
  // context
6
6
  @use 'context' as *;
7
+ @use './themes/dark/context' as *;
7
8
 
8
9
  :export {
9
10
  // ============================================================== */
@@ -31,6 +32,52 @@
31
32
  }
32
33
  }
33
34
 
35
+ // colors exported with no vars
36
+ @each $key, $value in $colors-computed {
37
+ @if type-of($value) == 'map' {
38
+ @each $subKey, $subValue in $value {
39
+ @if type-of($value) not 'map' {
40
+ @if not
41
+ str-index($subKey, 'hue') and not
42
+ str-index($subKey, 'saturation') and not
43
+ str-index($subKey, 'lightness')
44
+ {
45
+ @if '' + $key == $subKey {
46
+ #{'colors-computed__' + $key}: $subValue;
47
+ } @else {
48
+ #{'colors-computed__' + $key + '-' + $subKey}: $subValue;
49
+ }
50
+ }
51
+ }
52
+ }
53
+ } @else if $key != 'scheme' {
54
+ #{'colors-computed__' + $key}: $value;
55
+ }
56
+ }
57
+
58
+ // dark colors exported with no vars
59
+ @each $key, $value in $dark-colors-computed {
60
+ @if type-of($value) == 'map' {
61
+ @each $subKey, $subValue in $value {
62
+ @if type-of($value) not 'map' {
63
+ @if not
64
+ str-index($subKey, 'hue') and not
65
+ str-index($subKey, 'saturation') and not
66
+ str-index($subKey, 'lightness')
67
+ {
68
+ @if '' + $key == $subKey {
69
+ #{'dark-colors-computed__' + $key}: $subValue;
70
+ } @else {
71
+ #{'dark-colors-computed__' + $key + '-' + $subKey}: $subValue;
72
+ }
73
+ }
74
+ }
75
+ }
76
+ } @else if $key != 'scheme' {
77
+ #{'dark-colors-computed__' + $key}: $value;
78
+ }
79
+ }
80
+
34
81
  // #endregion
35
82
 
36
83
  // ==============================================================
@@ -280,11 +327,6 @@
280
327
  #{'max-height__' + $key}: $value;
281
328
  }
282
329
 
283
- // max height
284
- @each $key, $value in $max-height {
285
- #{'max-height__' + $key}: $value;
286
- }
287
-
288
330
  // #endregion
289
331
 
290
332
  // ============================================================== */
@@ -421,6 +463,10 @@
421
463
  #{'box-shadow__' + $key}: $value;
422
464
  }
423
465
 
466
+ @each $key, $value in $box-shadow-no-vars {
467
+ #{'box-shadow-no-vars__' + $key}: $value;
468
+ }
469
+
424
470
  // opacity
425
471
  @each $key, $value in $opacity {
426
472
  #{'opacity__' + $key}: $value;
@@ -24,6 +24,14 @@ $color-surface-palette: (
24
24
  info: hsl(var(--color-info-hue) var(--color-info-saturation) 90%),
25
25
  warning: hsl(var(--color-warning-hue) var(--color-warning-saturation) 90%),
26
26
  ) !default;
27
+ $color-surface-palette-no-vars: (
28
+ brand: hsl(color.hue($color-brand) color.saturation($color-brand) 90%),
29
+ accent: hsl(color.hue($color-accent) color.saturation($color-accent) 90%),
30
+ success: hsl(color.hue($color-success) color.saturation($color-success) 90%),
31
+ danger: hsl(color.hue($color-danger) color.saturation($color-danger) 90%),
32
+ info: hsl(color.hue($color-info) color.saturation($color-info) 90%),
33
+ warning: hsl(color.hue($color-warning) color.saturation($color-warning) 90%),
34
+ ) !default;
27
35
  $color-shadow: hsl(color.hue($color-brand) 50% 20%) !default;
28
36
  $color-backdrop: hsla(color.hue($color-brand) 50% 20% / 20%) !default;
29
37
  $color-alpha: hsla(0deg 0% 0% / 0%) !default;
@@ -56,3 +64,47 @@ $colors: (
56
64
  backdrop: hsla-map($color-backdrop, 'backdrop'),
57
65
  alpha: color-alpha-map($color-alpha, 'alpha', $steps: 5, $scale: 5%),
58
66
  ) !default;
67
+
68
+ // colors-computed map
69
+ $colors-computed: (
70
+ scheme: $color-scheme,
71
+ transparent: $color-transparent,
72
+ black: hsla-map($color-black, 'black', $noVarExport: true),
73
+ white: hsla-map($color-white, 'white', $noVarExport: true),
74
+ shadow: hsla-map($color-shadow, 'shadow', $noVarExport: true),
75
+ backdrop: hsla-map($color-backdrop, 'backdrop', $noVarExport: true),
76
+ alpha:
77
+ color-alpha-map(
78
+ $color-alpha,
79
+ 'alpha',
80
+ $steps: 5,
81
+ $scale: 5%,
82
+ $noVarExport: true
83
+ ),
84
+ brand: color-shades-map($color-brand, 'brand', $noVarExport: true),
85
+ accent: color-shades-map($color-accent, 'accent', $noVarExport: true),
86
+ success: color-shades-map($color-success, 'success', $noVarExport: true),
87
+ danger: color-shades-map($color-danger, 'danger', $noVarExport: true),
88
+ info: color-shades-map($color-info, 'info', $noVarExport: true),
89
+ warning: color-shades-map($color-warning, 'warning', $noVarExport: true),
90
+ gray: color-shades-map($color-gray, 'gray', $scale: 15%, $noVarExport: true),
91
+ word:
92
+ color-lighten-map(
93
+ $color-word,
94
+ 'word',
95
+ $scale: 12%,
96
+ $fixed: true,
97
+ $noVarExport: true
98
+ ),
99
+ surface:
100
+ map.merge(
101
+ color-darken-map(
102
+ $color-surface,
103
+ 'surface',
104
+ $scale: 2%,
105
+ $fixed: true,
106
+ $noVarExport: true
107
+ ),
108
+ $color-surface-palette-no-vars
109
+ ),
110
+ ) !default;
@@ -1,3 +1,7 @@
1
+ @use 'sass:color';
2
+ @use 'sass:map';
3
+ @use './colors';
4
+
1
5
  // box-shadow
2
6
  $box-shadow: (
3
7
  sm:
@@ -17,6 +21,29 @@ $box-shadow: (
17
21
  none: '0 0 #0000',
18
22
  ) !default;
19
23
 
24
+ // box-shadow without css vars
25
+ $color-shadow-hue: color.hue(colors.$color-shadow);
26
+ $color-shadow-saturation: color.saturation(colors.$color-shadow);
27
+ $color-shadow-lightness: color.lightness(colors.$color-shadow);
28
+
29
+ $box-shadow-no-vars: (
30
+ sm:
31
+ '0 1px 2px 0 hsla(#{$color-shadow-hue} #{$color-shadow-saturation} #{$color-shadow-lightness} / 5%)',
32
+ shadow:
33
+ '0 1px 3px 0 hsla(#{$color-shadow-hue} #{$color-shadow-saturation} #{$color-shadow-lightness} / 10%), 0 1px 2px -1px hsla(#{$color-shadow-hue} #{$color-shadow-saturation} #{$color-shadow-lightness} / 10%)',
34
+ md:
35
+ '0 4px 6px -1px hsla(#{$color-shadow-hue} #{$color-shadow-saturation} #{$color-shadow-lightness} / 10%), 0 2px 4px -2px hsla(#{$color-shadow-hue} #{$color-shadow-saturation} #{$color-shadow-lightness} / 10%)',
36
+ lg:
37
+ '0 10px 15px -3px hsla(#{$color-shadow-hue} #{$color-shadow-saturation} #{$color-shadow-lightness} / 10%), 0 4px 6px -4px hsla(#{$color-shadow-hue} #{$color-shadow-saturation} #{$color-shadow-lightness} / 10%)',
38
+ xl:
39
+ '0 20px 25px -5px hsla(#{$color-shadow-hue} #{$color-shadow-saturation} #{$color-shadow-lightness} / 10%), 0 8px 10px -6px hsla(#{$color-shadow-hue} #{$color-shadow-saturation} #{$color-shadow-lightness} / 10%)',
40
+ 2xl:
41
+ '0 25px 50px -12px hsla(#{$color-shadow-hue} #{$color-shadow-saturation} #{$color-shadow-lightness} / 25%)',
42
+ inner:
43
+ 'inset 0 2px 4px 0 hsla(#{$color-shadow-hue} #{$color-shadow-saturation} #{$color-shadow-lightness} / 5%)',
44
+ none: '0 0 #0000'
45
+ ) !default;
46
+
20
47
  // opacity
21
48
  $opacity: (
22
49
  0: 0,
@@ -9,6 +9,5 @@ $vv-dropdown-optgroup: (
9
9
  text-transform: uppercase,
10
10
  font-size: var(--text-xs),
11
11
  font-weight: var(--font-bold),
12
- colot: var(--color-word-3),
13
12
  background-color: var(--color-surface-2),
14
13
  );
@@ -282,6 +282,7 @@ $vv-input-text: (
282
282
  wrapper: (
283
283
  pseudo: (
284
284
  after: (
285
+ opacity: var(--opacity-100),
285
286
  animation: var(--animation-indeterminate),
286
287
  ),
287
288
  ),
@@ -24,6 +24,7 @@ $vv-nav: (
24
24
  will-change: background-color color,
25
25
  transition: var(--transition-all),
26
26
  color: var(--color-word-3),
27
+ cursor: pointer,
27
28
  [padding]: var(--nav-item-padding),
28
29
  state: (
29
30
  hover: (
@@ -39,12 +39,14 @@ $vv-radio: (
39
39
  element: (
40
40
  input: (
41
41
  _alias: "> input[type='radio']",
42
- border: var(--spacing-2) solid var(--input-color),
42
+ border-width: var(--spacing-2),
43
+ border-style: solid,
44
+ border-color: var(--input-color),
43
45
  min-width: var(--spacing-20),
44
46
  height: var(--spacing-20),
45
47
  border-radius: 50%,
46
48
  margin: 0 var(--input-label-gap) 0 0,
47
- background: transparent,
49
+ background-color: transparent,
48
50
  cursor: pointer,
49
51
  position: relative,
50
52
  pseudo: (
@@ -52,7 +54,7 @@ $vv-radio: (
52
54
  position: absolute,
53
55
  width: 70%,
54
56
  height: 70%,
55
- background: var(--input-color),
57
+ background-color: var(--input-color),
56
58
  inset: 50% 50%,
57
59
  border-radius: 50%,
58
60
  transform: translate(-50%, -50%) scale(0),
@@ -226,6 +226,7 @@ $vv-select: (
226
226
  wrapper: (
227
227
  pseudo: (
228
228
  after: (
229
+ opacity: var(--opacity-100),
229
230
  animation: var(--animation-indeterminate),
230
231
  ),
231
232
  ),
@@ -8,6 +8,11 @@ $vv-table: (
8
8
  _alias: 'caption',
9
9
  caption-side: bottom,
10
10
  [padding]: var(--table-cell-padding),
11
+ state: (
12
+ empty: (
13
+ display: none,
14
+ ),
15
+ ),
11
16
  ),
12
17
  tr: (
13
18
  _alias: 'tr',
@@ -202,6 +202,7 @@ $vv-textarea: (
202
202
  wrapper: (
203
203
  pseudo: (
204
204
  after: (
205
+ opacity: var(--opacity-100),
205
206
  animation: var(--animation-indeterminate),
206
207
  ),
207
208
  ),
@@ -16,6 +16,14 @@ $dark-color-surface-palette: (
16
16
  info: hsl(var(--color-info-hue) var(--color-info-saturation) 10%),
17
17
  warning: hsl(var(--color-warning-hue) var(--color-warning-saturation) 10%),
18
18
  ) !default;
19
+ $dark-color-surface-palette-no-vars: (
20
+ brand: hsl(color.hue($color-brand) color.saturation($color-brand) 10%),
21
+ accent: hsl(color.hue($color-accent) color.saturation($color-accent) 10%),
22
+ success: hsl(color.hue($color-success) color.saturation($color-success) 10%),
23
+ danger: hsl(color.hue($color-danger) color.saturation($color-danger) 10%),
24
+ info: hsl(color.hue($color-info) color.saturation($color-info) 10%),
25
+ warning: hsl(color.hue($color-warning) color.saturation($color-warning) 10%),
26
+ ) !default;
19
27
 
20
28
  // color map
21
29
  $dark-colors: (
@@ -33,3 +41,35 @@ $dark-colors: (
33
41
  ),
34
42
  alpha: color-alpha-map($dark-color-alpha, 'alpha', $steps: 5, $scale: 5%),
35
43
  ) !default;
44
+
45
+ // dark-colors computed map
46
+ $dark-colors-computed: (
47
+ scheme: $dark-color-scheme,
48
+ word:
49
+ color-darken-map(
50
+ $dark-color-word,
51
+ 'word',
52
+ $scale: 12%,
53
+ $fixed: true,
54
+ $noVarExport: true
55
+ ),
56
+ surface:
57
+ map.merge(
58
+ color-lighten-map(
59
+ $dark-color-surface,
60
+ 'surface',
61
+ $scale: 5%,
62
+ $fixed: true,
63
+ $noVarExport: true
64
+ ),
65
+ $dark-color-surface-palette-no-vars
66
+ ),
67
+ alpha:
68
+ color-alpha-map(
69
+ $dark-color-alpha,
70
+ 'alpha',
71
+ $steps: 5,
72
+ $scale: 5%,
73
+ $noVarExport: true
74
+ ),
75
+ ) !default;