@filip.mazev/blocks 1.4.3 → 1.4.5

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.
Files changed (52) hide show
  1. package/README.md +1 -1
  2. package/_index.scss +1 -1
  3. package/core/styles/_field-state.scss +16 -4
  4. package/core/styles/_index.scss +0 -1
  5. package/core/styles/_mixins.scss +2 -2
  6. package/core/styles/_motion.scss +1 -1
  7. package/core/styles/_palettes.scss +127 -132
  8. package/core/styles/_slider.scss +158 -40
  9. package/core/styles/_theme-engine.scss +43 -63
  10. package/core/styles/_utilities.scss +3 -4
  11. package/core/styles/_validation.scss +6 -1
  12. package/core/styles/_variables.scss +24 -14
  13. package/core/styles/themes/_cyberpunk-theme.scss +1 -1
  14. package/core/styles/themes/_green-theme.scss +1 -1
  15. package/core/styles/themes/_high-contrast-theme.scss +152 -133
  16. package/core/styles/themes/_orange-theme.scss +1 -1
  17. package/core/styles/themes/_purple-theme.scss +1 -1
  18. package/core/styles/themes/_red-theme.scss +1 -1
  19. package/core/styles/themes/_white-theme.scss +26 -20
  20. package/effects/README.md +5 -9
  21. package/effects/effects.css +200 -121
  22. package/effects/runtime/README.md +19 -11
  23. package/fesm2022/filip.mazev-blocks-core.mjs +27 -22
  24. package/fesm2022/filip.mazev-blocks-core.mjs.map +1 -1
  25. package/fesm2022/filip.mazev-blocks-effects-runtime.mjs +887 -67
  26. package/fesm2022/filip.mazev-blocks-effects-runtime.mjs.map +1 -1
  27. package/fesm2022/filip.mazev-blocks-effects.mjs +8 -48
  28. package/fesm2022/filip.mazev-blocks-effects.mjs.map +1 -1
  29. package/fesm2022/filip.mazev-blocks-forms.mjs +65 -61
  30. package/fesm2022/filip.mazev-blocks-forms.mjs.map +1 -1
  31. package/fesm2022/filip.mazev-blocks-modal.mjs +29 -32
  32. package/fesm2022/filip.mazev-blocks-modal.mjs.map +1 -1
  33. package/fesm2022/filip.mazev-blocks-navigation.mjs +35 -1
  34. package/fesm2022/filip.mazev-blocks-navigation.mjs.map +1 -1
  35. package/fesm2022/filip.mazev-blocks-primitives.mjs +106 -32
  36. package/fesm2022/filip.mazev-blocks-primitives.mjs.map +1 -1
  37. package/fesm2022/filip.mazev-blocks-toastr.mjs +5 -7
  38. package/fesm2022/filip.mazev-blocks-toastr.mjs.map +1 -1
  39. package/fesm2022/filip.mazev-blocks.mjs +1 -1
  40. package/fesm2022/filip.mazev-blocks.mjs.map +1 -1
  41. package/navigation/README.md +44 -0
  42. package/package.json +1 -1
  43. package/schematics/ng-add/index.js +4 -1
  44. package/types/filip.mazev-blocks-core.d.ts +3 -4
  45. package/types/filip.mazev-blocks-effects-runtime.d.ts +10 -8
  46. package/types/filip.mazev-blocks-effects.d.ts +5 -17
  47. package/types/filip.mazev-blocks-forms.d.ts +13 -11
  48. package/types/filip.mazev-blocks-modal.d.ts +1 -0
  49. package/types/filip.mazev-blocks-navigation.d.ts +20 -4
  50. package/types/filip.mazev-blocks-primitives.d.ts +12 -2
  51. package/types/filip.mazev-blocks-toastr.d.ts +4 -4
  52. package/types/filip.mazev-blocks.d.ts +1 -1
@@ -1,151 +1,170 @@
1
1
  @use '../palettes' as *;
2
2
  @use '../theme-engine' as *;
3
3
 
4
- $high-contrast-light-theme: validate-theme(('bg-canvas': $hc-white,
5
- 'bg-surface': $hc-white,
6
- 'bg-surface-alt': $hc-white,
7
- 'bg-element': $hc-white,
8
- 'bg-element-hover': $hc-yellow,
9
- 'bg-element-active': $hc-yellow,
10
- 'bg-neutral': $hc-white,
11
- 'bg-neutral-hover': $hc-yellow,
12
- 'bg-neutral-active': $hc-yellow,
13
-
14
- 'primary': $hc-black,
15
- 'primary-hover': $hc-black,
16
- 'primary-active': $hc-black,
17
- 'primary-subtle': $hc-white,
18
- 'on-primary': $hc-white,
19
-
20
- 'text-heading': $hc-black,
21
- 'text-primary': $hc-black,
22
- 'text-secondary': $hc-black,
23
- 'text-brand': $hc-black,
24
- 'text-inverse': $hc-white,
25
- 'text-info': $hc-cyan,
26
- 'text-success': $hc-green,
27
- 'text-warn': $hc-yellow,
28
- 'text-danger': $hc-red,
29
-
30
- 'border-subtle': $hc-black,
31
- 'border-default': $hc-black,
32
- 'border-strong': $hc-black,
33
- 'border-brand': $hc-black,
34
- 'border-info': $hc-black,
35
- 'border-success': $hc-black,
36
- 'border-warn': $hc-black,
37
- 'border-danger': $hc-black,
38
-
39
- 'bg-info': $hc-white,
40
- 'bg-info-hover': $hc-white,
41
- 'bg-info-active': $hc-white,
42
- 'bg-info-disabled': $hc-white,
43
- 'bg-info-subtle': $hc-white,
44
-
45
- 'bg-success': $hc-white,
46
- 'bg-success-hover': $hc-white,
47
- 'bg-success-active': $hc-white,
48
- 'bg-success-disabled': $hc-white,
49
- 'bg-success-subtle': $hc-white,
50
-
51
- 'bg-warn': $hc-white,
52
- 'bg-warn-hover': $hc-white,
53
- 'bg-warn-active': $hc-white,
54
- 'bg-warn-disabled': $hc-white,
55
- 'bg-warn-subtle': $hc-white,
56
-
57
- 'bg-danger': $hc-white,
58
- 'bg-danger-hover': $hc-white,
59
- 'bg-danger-active': $hc-white,
60
- 'bg-danger-disabled': $hc-white,
61
- 'bg-danger-subtle': $hc-white,
62
-
63
- 'scroll-bg': $hc-white,
64
- 'scroll-thumb': $hc-black,
65
- 'scroll-thumb-hover': $hc-yellow,
66
-
67
- 'meta-brand-palette': 'neutral'), 'high-contrast-light') !default;
68
-
69
- $high-contrast-dark-theme: validate-theme(('bg-canvas': $hc-black,
70
- 'bg-surface': $hc-black,
71
- 'bg-surface-alt': $hc-black,
72
- 'bg-element': $hc-black,
73
- 'bg-element-hover': $hc-yellow,
74
- 'bg-element-active': $hc-yellow,
75
- 'bg-neutral': $hc-black,
76
- 'bg-neutral-hover': $hc-yellow,
77
- 'bg-neutral-active': $hc-yellow,
78
-
79
- 'primary': $hc-white,
80
- 'primary-hover': $hc-white,
81
- 'primary-active': $hc-white,
82
- 'primary-subtle': $hc-black,
83
- 'on-primary': $hc-black,
84
-
85
- 'text-heading': $hc-white,
86
- 'text-primary': $hc-white,
87
- 'text-secondary': $hc-white,
88
- 'text-brand': $hc-white,
89
- 'text-inverse': $hc-black,
90
- 'text-info': $hc-cyan,
91
- 'text-success': $hc-green,
92
- 'text-warn': $hc-yellow,
93
- 'text-danger': $hc-red,
94
-
95
- 'border-subtle': $hc-white,
96
- 'border-default': $hc-white,
97
- 'border-strong': $hc-white,
98
- 'border-brand': $hc-white,
99
- 'border-info': $hc-white,
100
- 'border-success': $hc-white,
101
- 'border-warn': $hc-white,
102
- 'border-danger': $hc-white,
103
-
104
- 'bg-info': $hc-black,
105
- 'bg-info-hover': $hc-black,
106
- 'bg-info-active': $hc-black,
107
- 'bg-info-disabled': $hc-black,
108
- 'bg-info-subtle': $hc-black,
109
-
110
- 'bg-success': $hc-black,
111
- 'bg-success-hover': $hc-black,
112
- 'bg-success-active': $hc-black,
113
- 'bg-success-disabled': $hc-black,
114
- 'bg-success-subtle': $hc-black,
115
-
116
- 'bg-warn': $hc-black,
117
- 'bg-warn-hover': $hc-black,
118
- 'bg-warn-active': $hc-black,
119
- 'bg-warn-disabled': $hc-black,
120
- 'bg-warn-subtle': $hc-black,
121
-
122
- 'bg-danger': $hc-black,
123
- 'bg-danger-hover': $hc-black,
124
- 'bg-danger-active': $hc-black,
125
- 'bg-danger-disabled': $hc-black,
126
- 'bg-danger-subtle': $hc-black,
127
-
128
- 'scroll-bg': $hc-black,
129
- 'scroll-thumb': $hc-white,
130
- 'scroll-thumb-hover': $hc-yellow,
131
-
132
- 'meta-brand-palette': 'neutral'), 'high-contrast-dark') !default;
4
+ $high-contrast-light-theme: validate-theme(
5
+ (
6
+ 'bg-canvas': $hc-white,
7
+ 'bg-surface': $hc-white,
8
+ 'bg-surface-alt': $hc-white,
9
+ 'bg-element': $hc-white,
10
+ 'bg-element-hover': $hc-yellow,
11
+ 'bg-element-active': $hc-yellow,
12
+ 'bg-neutral': $hc-white,
13
+ 'bg-neutral-hover': $hc-yellow,
14
+ 'bg-neutral-active': $hc-yellow,
15
+
16
+ 'primary': $hc-black,
17
+ 'primary-hover': $hc-black,
18
+ 'primary-active': $hc-black,
19
+ 'primary-subtle': $hc-white,
20
+ 'on-primary': $hc-white,
21
+
22
+ 'text-heading': $hc-black,
23
+ 'text-primary': $hc-black,
24
+ 'text-secondary': $hc-black,
25
+ 'text-brand': $hc-black,
26
+ 'text-inverse': $hc-white,
27
+ 'text-info': $hc-cyan,
28
+ 'text-success': $hc-green,
29
+ 'text-warn': $hc-yellow,
30
+ 'text-danger': $hc-red,
31
+
32
+ 'border-subtle': $hc-black,
33
+ 'border-default': $hc-black,
34
+ 'border-strong': $hc-black,
35
+ 'border-brand': $hc-black,
36
+ 'border-info': $hc-black,
37
+ 'border-success': $hc-black,
38
+ 'border-warn': $hc-black,
39
+ 'border-danger': $hc-black,
40
+
41
+ 'bg-info': $hc-white,
42
+ 'bg-info-hover': $hc-white,
43
+ 'bg-info-active': $hc-white,
44
+ 'bg-info-disabled': $hc-white,
45
+ 'bg-info-subtle': $hc-white,
46
+
47
+ 'bg-success': $hc-white,
48
+ 'bg-success-hover': $hc-white,
49
+ 'bg-success-active': $hc-white,
50
+ 'bg-success-disabled': $hc-white,
51
+ 'bg-success-subtle': $hc-white,
52
+
53
+ 'bg-warn': $hc-white,
54
+ 'bg-warn-hover': $hc-white,
55
+ 'bg-warn-active': $hc-white,
56
+ 'bg-warn-disabled': $hc-white,
57
+ 'bg-warn-subtle': $hc-white,
58
+
59
+ 'bg-danger': $hc-white,
60
+ 'bg-danger-hover': $hc-white,
61
+ 'bg-danger-active': $hc-white,
62
+ 'bg-danger-disabled': $hc-white,
63
+ 'bg-danger-subtle': $hc-white,
64
+
65
+ 'scroll-bg': $hc-white,
66
+ 'scroll-thumb': $hc-black,
67
+ 'scroll-thumb-hover': $hc-yellow,
68
+
69
+ 'meta-brand-palette': 'neutral',
70
+ ),
71
+ 'high-contrast-light'
72
+ ) !default;
73
+ $high-contrast-dark-theme: validate-theme(
74
+ (
75
+ 'bg-canvas': $hc-black,
76
+ 'bg-surface': $hc-black,
77
+ 'bg-surface-alt': $hc-black,
78
+ 'bg-element': $hc-black,
79
+ 'bg-element-hover': $hc-yellow,
80
+ 'bg-element-active': $hc-yellow,
81
+ 'bg-neutral': $hc-black,
82
+ 'bg-neutral-hover': $hc-yellow,
83
+ 'bg-neutral-active': $hc-yellow,
84
+
85
+ 'primary': $hc-white,
86
+ 'primary-hover': $hc-white,
87
+ 'primary-active': $hc-white,
88
+ 'primary-subtle': $hc-black,
89
+ 'on-primary': $hc-black,
90
+
91
+ 'text-heading': $hc-white,
92
+ 'text-primary': $hc-white,
93
+ 'text-secondary': $hc-white,
94
+ 'text-brand': $hc-white,
95
+ 'text-inverse': $hc-black,
96
+ 'text-info': $hc-cyan,
97
+ 'text-success': $hc-green,
98
+ 'text-warn': $hc-yellow,
99
+ 'text-danger': $hc-red,
100
+
101
+ 'border-subtle': $hc-white,
102
+ 'border-default': $hc-white,
103
+ 'border-strong': $hc-white,
104
+ 'border-brand': $hc-white,
105
+ 'border-info': $hc-white,
106
+ 'border-success': $hc-white,
107
+ 'border-warn': $hc-white,
108
+ 'border-danger': $hc-white,
109
+
110
+ 'bg-info': $hc-black,
111
+ 'bg-info-hover': $hc-black,
112
+ 'bg-info-active': $hc-black,
113
+ 'bg-info-disabled': $hc-black,
114
+ 'bg-info-subtle': $hc-black,
115
+
116
+ 'bg-success': $hc-black,
117
+ 'bg-success-hover': $hc-black,
118
+ 'bg-success-active': $hc-black,
119
+ 'bg-success-disabled': $hc-black,
120
+ 'bg-success-subtle': $hc-black,
121
+
122
+ 'bg-warn': $hc-black,
123
+ 'bg-warn-hover': $hc-black,
124
+ 'bg-warn-active': $hc-black,
125
+ 'bg-warn-disabled': $hc-black,
126
+ 'bg-warn-subtle': $hc-black,
127
+
128
+ 'bg-danger': $hc-black,
129
+ 'bg-danger-hover': $hc-black,
130
+ 'bg-danger-active': $hc-black,
131
+ 'bg-danger-disabled': $hc-black,
132
+ 'bg-danger-subtle': $hc-black,
133
+
134
+ 'scroll-bg': $hc-black,
135
+ 'scroll-thumb': $hc-white,
136
+ 'scroll-thumb-hover': $hc-yellow,
137
+
138
+ 'meta-brand-palette': 'neutral',
139
+ ),
140
+ 'high-contrast-dark'
141
+ ) !default;
142
+
133
143
  // The Blocks high-contrast palette is an explicit accessibility choice, independent of OS media queries.
134
144
  :where(.high-contrast, .bx-high-contrast-scope) {
135
145
  [data-bx-surface] {
136
146
  --bx-glass-text: var(--bx-text-primary) !important;
137
147
  --bx-glass-edge: var(--bx-border-strong) !important;
148
+
138
149
  color: var(--bx-text-primary) !important;
139
150
  border-color: var(--bx-border-strong);
140
151
  }
141
- bx-simple-toast .simple-toast { color: var(--bx-text-primary) !important; }
142
- [data-bx-surface], .bx-glass-material {
152
+
153
+ bx-simple-toast .simple-toast {
154
+ color: var(--bx-text-primary) !important;
155
+ }
156
+
157
+ [data-bx-surface],
158
+ .bx-glass-material {
143
159
  background: var(--bx-bg-surface) !important;
144
- -webkit-backdrop-filter: none !important;
145
160
  backdrop-filter: none !important;
146
161
  box-shadow: none !important;
147
162
  }
148
- .bx-glass-light, .bx-glass-decoration::before, .bx-glass-decoration::after, .bx-glass-material::before {
163
+
164
+ .bx-glass-light,
165
+ .bx-glass-decoration::before,
166
+ .bx-glass-decoration::after,
167
+ .bx-glass-material::before {
149
168
  display: none !important;
150
169
  }
151
170
  }
@@ -1,4 +1,4 @@
1
1
  @use '../theme-engine' as *;
2
2
 
3
3
  $orange-light-theme: make-light-theme('orange');
4
- $orange-dark-theme: make-dark-theme('orange');
4
+ $orange-dark-theme: make-dark-theme('orange');
@@ -1,4 +1,4 @@
1
1
  @use '../theme-engine' as *;
2
2
 
3
3
  $purple-light-theme: make-light-theme('purple');
4
- $purple-dark-theme: make-dark-theme('purple');
4
+ $purple-dark-theme: make-dark-theme('purple');
@@ -1,4 +1,4 @@
1
1
  @use '../theme-engine' as *;
2
2
 
3
3
  $red-light-theme: make-light-theme('red');
4
- $red-dark-theme: make-dark-theme('red');
4
+ $red-dark-theme: make-dark-theme('red');
@@ -1,22 +1,28 @@
1
1
  @use '../theme-engine' as *;
2
2
 
3
- $white-light-theme: make-light-theme('neutral', $overrides: (
4
- 'primary': #525252,
5
- 'primary-hover': #404040,
6
- 'primary-active': #262626,
7
- 'primary-subtle': rgba(#737373, .12),
8
- 'on-primary': #ffffff,
9
- 'text-brand': #404040,
10
- 'border-brand': #737373
11
- ));
12
- $white-dark-theme: make-dark-theme('neutral', $overrides: (
13
- 'primary': #ffffff,
14
- 'primary-hover': #e5e5e5,
15
- 'primary-active': #d4d4d4,
16
- 'primary-subtle': rgba(#ffffff, .12),
17
- 'on-primary': #171717,
18
- 'text-brand': #f5f5f5,
19
- 'border-brand': #d4d4d4,
20
- 'scroll-thumb': #737373,
21
- 'scroll-thumb-hover': #a3a3a3
22
- ));
3
+ $white-light-theme: make-light-theme(
4
+ 'neutral',
5
+ $overrides: (
6
+ 'primary': #525252,
7
+ 'primary-hover': #404040,
8
+ 'primary-active': #262626,
9
+ 'primary-subtle': rgba(#737373, 0.12),
10
+ 'on-primary': #ffffff,
11
+ 'text-brand': #404040,
12
+ 'border-brand': #737373,
13
+ )
14
+ );
15
+ $white-dark-theme: make-dark-theme(
16
+ 'neutral',
17
+ $overrides: (
18
+ 'primary': #ffffff,
19
+ 'primary-hover': #e5e5e5,
20
+ 'primary-active': #d4d4d4,
21
+ 'primary-subtle': rgba(#ffffff, 0.12),
22
+ 'on-primary': #171717,
23
+ 'text-brand': #f5f5f5,
24
+ 'border-brand': #d4d4d4,
25
+ 'scroll-thumb': #737373,
26
+ 'scroll-thumb-hover': #a3a3a3,
27
+ )
28
+ );
package/effects/README.md CHANGED
@@ -11,9 +11,7 @@ import { ThemingService } from '@filip.mazev/blocks/core';
11
11
  private readonly theme = inject(ThemingService);
12
12
 
13
13
  this.theme.setAppearance({
14
- material: 'glass', // glass | frosted | solid
15
- blur: 10, // 0–40 pixels
16
- tint: 0.4, // 0–1 opacity
14
+ glassiness: 0.5, // 0–1; the midpoint balances clarity and tint
17
15
  quality: 'auto', // auto | baseline | enhanced
18
16
  reducedTransparency: false
19
17
  });
@@ -38,13 +36,11 @@ import { BxSurfaceDirective } from '@filip.mazev/blocks/effects';
38
36
  </section>
39
37
  ```
40
38
 
41
- Provide layout and padding using the existing Blocks styling helpers. The directive supplies the material and token-based default border and radius. Controls and actionable surfaces get automatic hover/focus lighting; decorative containers receive nearby light without responding to hover themselves. Components can override the default border and radius with their existing tokens.
39
+ Provide layout and padding using the existing Blocks styling helpers. The directive supplies the material and token-based default border and radius. Controls and actionable surfaces get automatic hover/focus lighting; decorative containers receive nearby light without responding to hover themselves. Containing one input does not turn a panel into an interactive surface. Wrappers inside `bx-form-field` retain field interaction; custom control wrappers outside a field can opt in with `bxSurfaceInteractive`. Components can override the default border and radius with their existing tokens.
42
40
 
43
41
  | Input | Default | Local override |
44
42
  | --- | --- | --- |
45
- | `bxSurface` | Global material | `glass`, `frosted`, `solid` |
46
- | `bxSurfaceBlur` | Global blur | 0–40 pixels |
47
- | `bxSurfaceTint` | Global tint | 0–1 |
43
+ | `bxSurfaceGlassiness` | Global glassiness | 0–1 |
48
44
  | `bxSurfaceInteractive` | Automatic control/action detection | Boolean; explicitly enables or disables interaction lighting and press deformation |
49
45
  | `bxSurfaceEmission` | Theme accent (error color in invalid fields) | Override the semantic color emitted on hover, press or an active state |
50
46
  | `bxSurfaceFocusEmission` | Surface emission color | Override the color emitted while a contained or associated native control has focus |
@@ -54,9 +50,9 @@ Omit local inputs to keep the surface connected to application settings. A delib
54
50
 
55
51
  ## Composition and motion
56
52
 
57
- Use a single backing per physical surface. For example, a menu owns the backing while menu-item content shares it; a form-field label does not need an extra blurred card. Apply `bxTransition="fade"` on a dropdown to fade its menu without resizing its contents. Animated overlays keep a solid theme-colored backing throughout their lifetime, avoiding a blur/tint pop at the end of motion. Other surfaces remain translucent.
53
+ Use a single backing per physical surface. For example, a menu owns the backing while menu-item content shares it; a form-field label does not need an extra blurred card. Apply `bxTransition="fade"` on a dropdown to fade its menu without resizing its contents. The fade runs on the material itself, preserving the configured translucency and blur throughout the animation.
58
54
 
59
- Buttons, links, native field surfaces and elements with actionable ARIA roles automatically illuminate their border and nearby surfaces on hover or focus. Active ARIA states keep the light enabled. Plain panels, sections and other decorative containers remain passive receivers. Give a custom clickable element its appropriate role (such as `role="button"`), or explicitly enable `bxSurfaceInteractive` for a custom interaction. Use `bxSurfaceEmission` only to override the semantic color. The source is the element’s geometry, never the mouse coordinates.
55
+ Buttons, links, native field surfaces and elements with actionable ARIA roles automatically illuminate their border and nearby surfaces on hover or focus. Active ARIA states keep the light enabled. Plain panels, sections and other decorative containers remain passive receivers, while their edges pick up subtle color from nearby foreground and background content. The runtime samples CSS backgrounds and local pixels from visible images, video and canvas, then uses paint order, depth and distance to shape the edge tint. Give a custom clickable element its appropriate role (such as `role="button"`), or explicitly enable `bxSurfaceInteractive` for a custom interaction. Use `bxSurfaceEmission` only to override the semantic color. The source is the element’s geometry, never the mouse coordinates.
60
56
 
61
57
  There is no drag-to-reposition interaction in this iteration. Spatial highlights are a lightweight lighting approximation, while backdrop blur uses browser compositing. These effects do not ray-trace arbitrary DOM content. Rendering quality can add supported enhancements, and baseline/solid modes remain available for constrained devices.
62
58