@filip.mazev/blocks 1.4.3 → 1.4.4
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/README.md +1 -1
- package/_index.scss +1 -1
- package/core/styles/_field-state.scss +16 -4
- package/core/styles/_index.scss +0 -1
- package/core/styles/_mixins.scss +2 -2
- package/core/styles/_motion.scss +1 -1
- package/core/styles/_palettes.scss +127 -132
- package/core/styles/_slider.scss +158 -40
- package/core/styles/_theme-engine.scss +43 -63
- package/core/styles/_utilities.scss +3 -4
- package/core/styles/_validation.scss +6 -1
- package/core/styles/_variables.scss +24 -14
- package/core/styles/themes/_cyberpunk-theme.scss +1 -1
- package/core/styles/themes/_green-theme.scss +1 -1
- package/core/styles/themes/_high-contrast-theme.scss +152 -133
- package/core/styles/themes/_orange-theme.scss +1 -1
- package/core/styles/themes/_purple-theme.scss +1 -1
- package/core/styles/themes/_red-theme.scss +1 -1
- package/core/styles/themes/_white-theme.scss +26 -20
- package/effects/README.md +5 -9
- package/effects/effects.css +200 -121
- package/effects/runtime/README.md +19 -11
- package/fesm2022/filip.mazev-blocks-core.mjs +27 -22
- package/fesm2022/filip.mazev-blocks-core.mjs.map +1 -1
- package/fesm2022/filip.mazev-blocks-effects-runtime.mjs +887 -67
- package/fesm2022/filip.mazev-blocks-effects-runtime.mjs.map +1 -1
- package/fesm2022/filip.mazev-blocks-effects.mjs +8 -48
- package/fesm2022/filip.mazev-blocks-effects.mjs.map +1 -1
- package/fesm2022/filip.mazev-blocks-forms.mjs +65 -61
- package/fesm2022/filip.mazev-blocks-forms.mjs.map +1 -1
- package/fesm2022/filip.mazev-blocks-modal.mjs +29 -32
- package/fesm2022/filip.mazev-blocks-modal.mjs.map +1 -1
- package/fesm2022/filip.mazev-blocks-navigation.mjs +35 -1
- package/fesm2022/filip.mazev-blocks-navigation.mjs.map +1 -1
- package/fesm2022/filip.mazev-blocks-primitives.mjs +106 -32
- package/fesm2022/filip.mazev-blocks-primitives.mjs.map +1 -1
- package/fesm2022/filip.mazev-blocks-toastr.mjs +5 -7
- package/fesm2022/filip.mazev-blocks-toastr.mjs.map +1 -1
- package/fesm2022/filip.mazev-blocks.mjs +1 -1
- package/fesm2022/filip.mazev-blocks.mjs.map +1 -1
- package/navigation/README.md +44 -0
- package/package.json +1 -1
- package/schematics/ng-add/index.js +4 -1
- package/types/filip.mazev-blocks-core.d.ts +3 -4
- package/types/filip.mazev-blocks-effects-runtime.d.ts +10 -8
- package/types/filip.mazev-blocks-effects.d.ts +5 -17
- package/types/filip.mazev-blocks-forms.d.ts +13 -11
- package/types/filip.mazev-blocks-modal.d.ts +1 -0
- package/types/filip.mazev-blocks-navigation.d.ts +21 -5
- package/types/filip.mazev-blocks-primitives.d.ts +10 -0
- package/types/filip.mazev-blocks-toastr.d.ts +4 -4
- 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(
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
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
|
-
|
|
142
|
-
|
|
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
|
-
|
|
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,22 +1,28 @@
|
|
|
1
1
|
@use '../theme-engine' as *;
|
|
2
2
|
|
|
3
|
-
$white-light-theme: make-light-theme(
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
-
|
|
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
|
-
| `
|
|
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.
|
|
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
|
|