@hyalo/angular 0.0.0-stage → 0.1.0
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/CHANGELOG.md +41 -0
- package/LICENSE +21 -0
- package/README.md +32 -3
- package/fesm2022/hyalo-angular-accordion.mjs +230 -0
- package/fesm2022/hyalo-angular-accordion.mjs.map +1 -0
- package/fesm2022/hyalo-angular-button.mjs +203 -0
- package/fesm2022/hyalo-angular-button.mjs.map +1 -0
- package/fesm2022/hyalo-angular-card.mjs +221 -0
- package/fesm2022/hyalo-angular-card.mjs.map +1 -0
- package/fesm2022/hyalo-angular-choice.mjs +788 -0
- package/fesm2022/hyalo-angular-choice.mjs.map +1 -0
- package/fesm2022/hyalo-angular-dialog.mjs +571 -0
- package/fesm2022/hyalo-angular-dialog.mjs.map +1 -0
- package/fesm2022/hyalo-angular-field.mjs +312 -0
- package/fesm2022/hyalo-angular-field.mjs.map +1 -0
- package/fesm2022/hyalo-angular-icon.mjs +343 -0
- package/fesm2022/hyalo-angular-icon.mjs.map +1 -0
- package/fesm2022/hyalo-angular-interaction.mjs +455 -0
- package/fesm2022/hyalo-angular-interaction.mjs.map +1 -0
- package/fesm2022/hyalo-angular-navbar.mjs +343 -0
- package/fesm2022/hyalo-angular-navbar.mjs.map +1 -0
- package/fesm2022/hyalo-angular-overlay.mjs +94 -0
- package/fesm2022/hyalo-angular-overlay.mjs.map +1 -0
- package/fesm2022/hyalo-angular-popover-overlay-kit-6wPwnxln.mjs +3 -0
- package/fesm2022/hyalo-angular-popover.mjs +487 -0
- package/fesm2022/hyalo-angular-popover.mjs.map +1 -0
- package/fesm2022/hyalo-angular-segmented.mjs +223 -0
- package/fesm2022/hyalo-angular-segmented.mjs.map +1 -0
- package/fesm2022/hyalo-angular-select.mjs +464 -0
- package/fesm2022/hyalo-angular-select.mjs.map +1 -0
- package/fesm2022/hyalo-angular-tabs.mjs +324 -0
- package/fesm2022/hyalo-angular-tabs.mjs.map +1 -0
- package/fesm2022/hyalo-angular-theme.mjs +94 -0
- package/fesm2022/hyalo-angular-theme.mjs.map +1 -0
- package/fesm2022/hyalo-angular-toast.mjs +322 -0
- package/fesm2022/hyalo-angular-toast.mjs.map +1 -0
- package/fesm2022/hyalo-angular.mjs +473 -0
- package/fesm2022/hyalo-angular.mjs.map +1 -0
- package/package.json +133 -3
- package/styles/hyalo-core.css +25 -0
- package/styles/hyalo.css +17 -0
- package/styles/overlays/dialog.css +9 -0
- package/styles/overlays/popover.css +9 -0
- package/styles/overlays/select.css +9 -0
- package/styles/overlays/toast.css +8 -0
- package/styles/palettes/aurora.css +47 -0
- package/styles/palettes/ember.css +47 -0
- package/styles/palettes/graphite.css +47 -0
- package/styles/palettes/ocean.css +47 -0
- package/styles/palettes/orchid.css +47 -0
- package/styles/palettes/rose.css +47 -0
- package/styles/parts/card.css +49 -0
- package/styles/parts/dialog.css +116 -0
- package/styles/parts/drawer.css +124 -0
- package/styles/parts/field.css +36 -0
- package/styles/parts/glass.css +137 -0
- package/styles/parts/motion.css +82 -0
- package/styles/parts/navbar.css +55 -0
- package/styles/parts/popover.css +27 -0
- package/styles/parts/presence.css +55 -0
- package/styles/parts/reset.css +42 -0
- package/styles/parts/select.css +46 -0
- package/styles/parts/themes.css +105 -0
- package/styles/parts/toast.css +128 -0
- package/styles/parts/tokens.css +151 -0
- package/styles/parts/typography.css +64 -0
- package/types/hyalo-angular-accordion.d.ts +74 -0
- package/types/hyalo-angular-button.d.ts +88 -0
- package/types/hyalo-angular-card.d.ts +61 -0
- package/types/hyalo-angular-choice.d.ts +259 -0
- package/types/hyalo-angular-dialog.d.ts +170 -0
- package/types/hyalo-angular-field.d.ts +135 -0
- package/types/hyalo-angular-icon.d.ts +122 -0
- package/types/hyalo-angular-interaction.d.ts +131 -0
- package/types/hyalo-angular-navbar.d.ts +110 -0
- package/types/hyalo-angular-overlay.d.ts +31 -0
- package/types/hyalo-angular-popover.d.ts +142 -0
- package/types/hyalo-angular-segmented.d.ts +79 -0
- package/types/hyalo-angular-select.d.ts +130 -0
- package/types/hyalo-angular-tabs.d.ts +102 -0
- package/types/hyalo-angular-theme.d.ts +46 -0
- package/types/hyalo-angular-toast.d.ts +79 -0
- package/types/hyalo-angular.d.ts +345 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @hyalo/angular core stylesheet: reset, tokens, themes, glass, motion,
|
|
3
|
+
* typography, and the slot styles of card, navbar and field. Use it instead
|
|
4
|
+
* of hyalo.css to leave out the overlay styles, and add the ones the app
|
|
5
|
+
* uses from overlays/:
|
|
6
|
+
*
|
|
7
|
+
* "styles": [
|
|
8
|
+
* "node_modules/@hyalo/angular/styles/hyalo-core.css",
|
|
9
|
+
* "node_modules/@hyalo/angular/styles/overlays/dialog.css",
|
|
10
|
+
* "src/styles.css"
|
|
11
|
+
* ]
|
|
12
|
+
*
|
|
13
|
+
* Everything sits in cascade layers, so unlayered app CSS always wins.
|
|
14
|
+
*/
|
|
15
|
+
@layer hy.reset, hy.tokens, hy.base, hy.utilities;
|
|
16
|
+
|
|
17
|
+
@import './parts/reset.css' layer(hy.reset);
|
|
18
|
+
@import './parts/tokens.css' layer(hy.tokens);
|
|
19
|
+
@import './parts/themes.css' layer(hy.tokens);
|
|
20
|
+
@import './parts/glass.css' layer(hy.base);
|
|
21
|
+
@import './parts/motion.css' layer(hy.base);
|
|
22
|
+
@import './parts/card.css' layer(hy.base);
|
|
23
|
+
@import './parts/navbar.css' layer(hy.base);
|
|
24
|
+
@import './parts/field.css' layer(hy.base);
|
|
25
|
+
@import './parts/typography.css' layer(hy.utilities);
|
package/styles/hyalo.css
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @hyalo/angular stylesheet. Add it once to the app's global styles:
|
|
3
|
+
*
|
|
4
|
+
* "styles": ["node_modules/@hyalo/angular/styles/hyalo.css", "src/styles.css"]
|
|
5
|
+
*
|
|
6
|
+
* It is hyalo-core.css plus every file in overlays/. To ship only the
|
|
7
|
+
* overlays the app uses, list those next to hyalo-core.css instead.
|
|
8
|
+
*
|
|
9
|
+
* Everything sits in cascade layers, so unlayered app CSS always wins.
|
|
10
|
+
*/
|
|
11
|
+
@layer hy.reset, hy.tokens, hy.base, hy.utilities;
|
|
12
|
+
|
|
13
|
+
@import './hyalo-core.css';
|
|
14
|
+
@import './overlays/select.css';
|
|
15
|
+
@import './overlays/dialog.css';
|
|
16
|
+
@import './overlays/popover.css';
|
|
17
|
+
@import './overlays/toast.css';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Panel styles for HyDialog and HyDrawer from @hyalo/angular/dialog,
|
|
3
|
+
* which render in CDK overlays.
|
|
4
|
+
* Add it next to hyalo-core.css. hyalo.css already includes it.
|
|
5
|
+
*/
|
|
6
|
+
@layer hy.reset, hy.tokens, hy.base, hy.utilities;
|
|
7
|
+
|
|
8
|
+
@import '../parts/dialog.css' layer(hy.base);
|
|
9
|
+
@import '../parts/drawer.css' layer(hy.base);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Panel styles for hyTooltip and hyPopover from @hyalo/angular/popover,
|
|
3
|
+
* which render in CDK overlays.
|
|
4
|
+
* Add it next to hyalo-core.css. hyalo.css already includes it.
|
|
5
|
+
*/
|
|
6
|
+
@layer hy.reset, hy.tokens, hy.base, hy.utilities;
|
|
7
|
+
|
|
8
|
+
@import '../parts/presence.css' layer(hy.base);
|
|
9
|
+
@import '../parts/popover.css' layer(hy.base);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Panel styles for hy-select from @hyalo/angular/select, which renders
|
|
3
|
+
* in a CDK overlay.
|
|
4
|
+
* Add it next to hyalo-core.css. hyalo.css already includes it.
|
|
5
|
+
*/
|
|
6
|
+
@layer hy.reset, hy.tokens, hy.base, hy.utilities;
|
|
7
|
+
|
|
8
|
+
@import '../parts/select.css' layer(hy.base);
|
|
9
|
+
@import '../parts/presence.css' layer(hy.base);
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Aurora palette: teal on cool sea-glass neutrals.
|
|
3
|
+
*
|
|
4
|
+
* Loaded on demand, never part of hyalo.css. Set data-hy-palette="aurora" on
|
|
5
|
+
* <html> after this file has loaded, and remove the attribute to go back to
|
|
6
|
+
* the built-in palette. HyPalette does both for you.
|
|
7
|
+
*
|
|
8
|
+
* Each colour is written once with light-dark(), which resolves against the
|
|
9
|
+
* color-scheme that themes.css sets. Forced themes, the OS setting and
|
|
10
|
+
* .hy-theme-dark islands all keep working without repeating the values.
|
|
11
|
+
*
|
|
12
|
+
* The html in the selector outranks the dark theme rules in themes.css, so
|
|
13
|
+
* the palette wins in whatever order the two stylesheets load.
|
|
14
|
+
*/
|
|
15
|
+
@layer hy.tokens {
|
|
16
|
+
html:root[data-hy-palette='aurora'],
|
|
17
|
+
[data-hy-palette='aurora'] .hy-theme-dark {
|
|
18
|
+
--hy-bg: light-dark(#ecf3f2, #081110);
|
|
19
|
+
--hy-surface-1: light-dark(#ffffff, #0f1a19);
|
|
20
|
+
--hy-surface-2: light-dark(#f4f9f8, #152321);
|
|
21
|
+
--hy-surface-3: light-dark(#e2ecea, #1c2c2a);
|
|
22
|
+
--hy-surface-4: light-dark(#d3e0dd, #263735);
|
|
23
|
+
--hy-ink: light-dark(#0c1c1b, #e8f3f1);
|
|
24
|
+
--hy-ink-2: light-dark(#344a48, #b2c6c3);
|
|
25
|
+
--hy-ink-3: light-dark(#4d6462, #87a09c);
|
|
26
|
+
--hy-ink-2-glass: light-dark(#273c3a, #c6d8d5);
|
|
27
|
+
--hy-ink-3-glass: light-dark(#3d5351, #a0b6b2);
|
|
28
|
+
--hy-line: light-dark(rgb(12 28 27 / 0.12), rgb(232 243 241 / 0.12));
|
|
29
|
+
--hy-line-strong: light-dark(rgb(12 28 27 / 0.24), rgb(232 243 241 / 0.26));
|
|
30
|
+
--hy-primary: light-dark(#0f766e, #2dd4bf);
|
|
31
|
+
--hy-primary-hover: light-dark(#0b625b, #5eead4);
|
|
32
|
+
--hy-primary-ink: light-dark(#ffffff, #04201d);
|
|
33
|
+
--hy-primary-wash: light-dark(rgb(15 118 110 / 0.12), rgb(45 212 191 / 0.16));
|
|
34
|
+
--hy-secondary: light-dark(#6d3fc4, #b9a2ff);
|
|
35
|
+
--hy-secondary-ink: light-dark(#ffffff, #1a0f33);
|
|
36
|
+
--hy-glass-border: light-dark(rgb(12 28 27 / 0.08), rgb(255 255 255 / 0.08));
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/* Same as the high contrast rule in themes.css, which this file outranks. */
|
|
40
|
+
@media (prefers-contrast: more) {
|
|
41
|
+
html:root[data-hy-palette='aurora'],
|
|
42
|
+
[data-hy-palette='aurora'] .hy-theme-dark {
|
|
43
|
+
--hy-line: var(--hy-line-strong);
|
|
44
|
+
--hy-ink-3: var(--hy-ink-2);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Ember palette: burnt orange on warm stone.
|
|
3
|
+
*
|
|
4
|
+
* Loaded on demand, never part of hyalo.css. Set data-hy-palette="ember" on
|
|
5
|
+
* <html> after this file has loaded, and remove the attribute to go back to
|
|
6
|
+
* the built-in palette. HyPalette does both for you.
|
|
7
|
+
*
|
|
8
|
+
* Each colour is written once with light-dark(), which resolves against the
|
|
9
|
+
* color-scheme that themes.css sets. Forced themes, the OS setting and
|
|
10
|
+
* .hy-theme-dark islands all keep working without repeating the values.
|
|
11
|
+
*
|
|
12
|
+
* The html in the selector outranks the dark theme rules in themes.css, so
|
|
13
|
+
* the palette wins in whatever order the two stylesheets load.
|
|
14
|
+
*/
|
|
15
|
+
@layer hy.tokens {
|
|
16
|
+
html:root[data-hy-palette='ember'],
|
|
17
|
+
[data-hy-palette='ember'] .hy-theme-dark {
|
|
18
|
+
--hy-bg: light-dark(#f6f1ec, #120c08);
|
|
19
|
+
--hy-surface-1: light-dark(#fffdfb, #1b1410);
|
|
20
|
+
--hy-surface-2: light-dark(#faf6f2, #231a15);
|
|
21
|
+
--hy-surface-3: light-dark(#efe7df, #2c221b);
|
|
22
|
+
--hy-surface-4: light-dark(#e4d9ce, #382c24);
|
|
23
|
+
--hy-ink: light-dark(#1f1610, #f6eee8);
|
|
24
|
+
--hy-ink-2: light-dark(#4d3f35, #cdbfb4);
|
|
25
|
+
--hy-ink-3: light-dark(#67584c, #a3948a);
|
|
26
|
+
--hy-ink-2-glass: light-dark(#3f3229, #dccfc5);
|
|
27
|
+
--hy-ink-3-glass: light-dark(#554739, #b6a79c);
|
|
28
|
+
--hy-line: light-dark(rgb(31 22 16 / 0.12), rgb(246 238 232 / 0.12));
|
|
29
|
+
--hy-line-strong: light-dark(rgb(31 22 16 / 0.24), rgb(246 238 232 / 0.26));
|
|
30
|
+
--hy-primary: light-dark(#b33b0a, #fb923c);
|
|
31
|
+
--hy-primary-hover: light-dark(#983209, #fdba74);
|
|
32
|
+
--hy-primary-ink: light-dark(#ffffff, #1f0f04);
|
|
33
|
+
--hy-primary-wash: light-dark(rgb(179 59 10 / 0.12), rgb(251 146 60 / 0.16));
|
|
34
|
+
--hy-secondary: light-dark(#365a85, #9dbbe0);
|
|
35
|
+
--hy-secondary-ink: light-dark(#ffffff, #0b1626);
|
|
36
|
+
--hy-glass-border: light-dark(rgb(31 22 16 / 0.08), rgb(255 255 255 / 0.08));
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/* Same as the high contrast rule in themes.css, which this file outranks. */
|
|
40
|
+
@media (prefers-contrast: more) {
|
|
41
|
+
html:root[data-hy-palette='ember'],
|
|
42
|
+
[data-hy-palette='ember'] .hy-theme-dark {
|
|
43
|
+
--hy-line: var(--hy-line-strong);
|
|
44
|
+
--hy-ink-3: var(--hy-ink-2);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Graphite palette: monochrome, ink as the primary.
|
|
3
|
+
*
|
|
4
|
+
* Loaded on demand, never part of hyalo.css. Set data-hy-palette="graphite" on
|
|
5
|
+
* <html> after this file has loaded, and remove the attribute to go back to
|
|
6
|
+
* the built-in palette. HyPalette does both for you.
|
|
7
|
+
*
|
|
8
|
+
* Each colour is written once with light-dark(), which resolves against the
|
|
9
|
+
* color-scheme that themes.css sets. Forced themes, the OS setting and
|
|
10
|
+
* .hy-theme-dark islands all keep working without repeating the values.
|
|
11
|
+
*
|
|
12
|
+
* The html in the selector outranks the dark theme rules in themes.css, so
|
|
13
|
+
* the palette wins in whatever order the two stylesheets load.
|
|
14
|
+
*/
|
|
15
|
+
@layer hy.tokens {
|
|
16
|
+
html:root[data-hy-palette='graphite'],
|
|
17
|
+
[data-hy-palette='graphite'] .hy-theme-dark {
|
|
18
|
+
--hy-bg: light-dark(#f0f0f1, #0b0b0c);
|
|
19
|
+
--hy-surface-1: light-dark(#ffffff, #141416);
|
|
20
|
+
--hy-surface-2: light-dark(#f7f7f8, #1b1b1e);
|
|
21
|
+
--hy-surface-3: light-dark(#e8e8ea, #232327);
|
|
22
|
+
--hy-surface-4: light-dark(#dcdcdf, #2d2d32);
|
|
23
|
+
--hy-ink: light-dark(#111113, #f1f1f3);
|
|
24
|
+
--hy-ink-2: light-dark(#3d3d43, #c0c0c6);
|
|
25
|
+
--hy-ink-3: light-dark(#5a5a62, #95959d);
|
|
26
|
+
--hy-ink-2-glass: light-dark(#2f2f34, #d0d0d5);
|
|
27
|
+
--hy-ink-3-glass: light-dark(#48484f, #aaaab1);
|
|
28
|
+
--hy-line: light-dark(rgb(17 17 19 / 0.12), rgb(241 241 243 / 0.12));
|
|
29
|
+
--hy-line-strong: light-dark(rgb(17 17 19 / 0.24), rgb(241 241 243 / 0.26));
|
|
30
|
+
--hy-primary: light-dark(#1f1f23, #ececef);
|
|
31
|
+
--hy-primary-hover: light-dark(#38383e, #ffffff);
|
|
32
|
+
--hy-primary-ink: light-dark(#ffffff, #111113);
|
|
33
|
+
--hy-primary-wash: light-dark(rgb(31 31 35 / 0.1), rgb(236 236 239 / 0.14));
|
|
34
|
+
--hy-secondary: light-dark(#1f5fd1, #82aaff);
|
|
35
|
+
--hy-secondary-ink: light-dark(#ffffff, #0a1530);
|
|
36
|
+
--hy-glass-border: light-dark(rgb(17 17 19 / 0.08), rgb(255 255 255 / 0.08));
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/* Same as the high contrast rule in themes.css, which this file outranks. */
|
|
40
|
+
@media (prefers-contrast: more) {
|
|
41
|
+
html:root[data-hy-palette='graphite'],
|
|
42
|
+
[data-hy-palette='graphite'] .hy-theme-dark {
|
|
43
|
+
--hy-line: var(--hy-line-strong);
|
|
44
|
+
--hy-ink-3: var(--hy-ink-2);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Ocean palette: deep sky blue on misty slate.
|
|
3
|
+
*
|
|
4
|
+
* Loaded on demand, never part of hyalo.css. Set data-hy-palette="ocean" on
|
|
5
|
+
* <html> after this file has loaded, and remove the attribute to go back to
|
|
6
|
+
* the built-in palette. HyPalette does both for you.
|
|
7
|
+
*
|
|
8
|
+
* Each colour is written once with light-dark(), which resolves against the
|
|
9
|
+
* color-scheme that themes.css sets. Forced themes, the OS setting and
|
|
10
|
+
* .hy-theme-dark islands all keep working without repeating the values.
|
|
11
|
+
*
|
|
12
|
+
* The html in the selector outranks the dark theme rules in themes.css, so
|
|
13
|
+
* the palette wins in whatever order the two stylesheets load.
|
|
14
|
+
*/
|
|
15
|
+
@layer hy.tokens {
|
|
16
|
+
html:root[data-hy-palette='ocean'],
|
|
17
|
+
[data-hy-palette='ocean'] .hy-theme-dark {
|
|
18
|
+
--hy-bg: light-dark(#edf3f8, #07101a);
|
|
19
|
+
--hy-surface-1: light-dark(#ffffff, #0e1824);
|
|
20
|
+
--hy-surface-2: light-dark(#f5f9fc, #14202e);
|
|
21
|
+
--hy-surface-3: light-dark(#e3ecf3, #1b2938);
|
|
22
|
+
--hy-surface-4: light-dark(#d4e0ea, #253446);
|
|
23
|
+
--hy-ink: light-dark(#0b1926, #e9f2fa);
|
|
24
|
+
--hy-ink-2: light-dark(#344757, #b3c4d4);
|
|
25
|
+
--hy-ink-3: light-dark(#4e6274, #889bad);
|
|
26
|
+
--hy-ink-2-glass: light-dark(#273a4a, #c7d6e3);
|
|
27
|
+
--hy-ink-3-glass: light-dark(#3e5164, #a1b3c4);
|
|
28
|
+
--hy-line: light-dark(rgb(11 25 38 / 0.12), rgb(233 242 250 / 0.12));
|
|
29
|
+
--hy-line-strong: light-dark(rgb(11 25 38 / 0.24), rgb(233 242 250 / 0.26));
|
|
30
|
+
--hy-primary: light-dark(#0369a1, #38bdf8);
|
|
31
|
+
--hy-primary-hover: light-dark(#025a8a, #7dd3fc);
|
|
32
|
+
--hy-primary-ink: light-dark(#ffffff, #041826);
|
|
33
|
+
--hy-primary-wash: light-dark(rgb(3 105 161 / 0.12), rgb(56 189 248 / 0.16));
|
|
34
|
+
--hy-secondary: light-dark(#b13f22, #ff9f80);
|
|
35
|
+
--hy-secondary-ink: light-dark(#ffffff, #2a0c04);
|
|
36
|
+
--hy-glass-border: light-dark(rgb(11 25 38 / 0.08), rgb(255 255 255 / 0.08));
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/* Same as the high contrast rule in themes.css, which this file outranks. */
|
|
40
|
+
@media (prefers-contrast: more) {
|
|
41
|
+
html:root[data-hy-palette='ocean'],
|
|
42
|
+
[data-hy-palette='ocean'] .hy-theme-dark {
|
|
43
|
+
--hy-line: var(--hy-line-strong);
|
|
44
|
+
--hy-ink-3: var(--hy-ink-2);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Orchid palette: violet on lilac-grey.
|
|
3
|
+
*
|
|
4
|
+
* Loaded on demand, never part of hyalo.css. Set data-hy-palette="orchid" on
|
|
5
|
+
* <html> after this file has loaded, and remove the attribute to go back to
|
|
6
|
+
* the built-in palette. HyPalette does both for you.
|
|
7
|
+
*
|
|
8
|
+
* Each colour is written once with light-dark(), which resolves against the
|
|
9
|
+
* color-scheme that themes.css sets. Forced themes, the OS setting and
|
|
10
|
+
* .hy-theme-dark islands all keep working without repeating the values.
|
|
11
|
+
*
|
|
12
|
+
* The html in the selector outranks the dark theme rules in themes.css, so
|
|
13
|
+
* the palette wins in whatever order the two stylesheets load.
|
|
14
|
+
*/
|
|
15
|
+
@layer hy.tokens {
|
|
16
|
+
html:root[data-hy-palette='orchid'],
|
|
17
|
+
[data-hy-palette='orchid'] .hy-theme-dark {
|
|
18
|
+
--hy-bg: light-dark(#f3f0f8, #0e0b14);
|
|
19
|
+
--hy-surface-1: light-dark(#ffffff, #17131f);
|
|
20
|
+
--hy-surface-2: light-dark(#f8f6fb, #1e1928);
|
|
21
|
+
--hy-surface-3: light-dark(#ebe6f3, #272132);
|
|
22
|
+
--hy-surface-4: light-dark(#ded7ea, #322a3f);
|
|
23
|
+
--hy-ink: light-dark(#1a1426, #f2eefa);
|
|
24
|
+
--hy-ink-2: light-dark(#463d55, #c4bbd4);
|
|
25
|
+
--hy-ink-3: light-dark(#605670, #9a90ac);
|
|
26
|
+
--hy-ink-2-glass: light-dark(#372e45, #d3cbe1);
|
|
27
|
+
--hy-ink-3-glass: light-dark(#4e445d, #afa5c1);
|
|
28
|
+
--hy-line: light-dark(rgb(26 20 38 / 0.12), rgb(242 238 250 / 0.12));
|
|
29
|
+
--hy-line-strong: light-dark(rgb(26 20 38 / 0.24), rgb(242 238 250 / 0.26));
|
|
30
|
+
--hy-primary: light-dark(#7634cc, #c39bff);
|
|
31
|
+
--hy-primary-hover: light-dark(#632bb0, #d5b8ff);
|
|
32
|
+
--hy-primary-ink: light-dark(#ffffff, #160a2a);
|
|
33
|
+
--hy-primary-wash: light-dark(rgb(118 52 204 / 0.12), rgb(195 155 255 / 0.16));
|
|
34
|
+
--hy-secondary: light-dark(#0f6f66, #5fd8c8);
|
|
35
|
+
--hy-secondary-ink: light-dark(#ffffff, #04201d);
|
|
36
|
+
--hy-glass-border: light-dark(rgb(26 20 38 / 0.08), rgb(255 255 255 / 0.08));
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/* Same as the high contrast rule in themes.css, which this file outranks. */
|
|
40
|
+
@media (prefers-contrast: more) {
|
|
41
|
+
html:root[data-hy-palette='orchid'],
|
|
42
|
+
[data-hy-palette='orchid'] .hy-theme-dark {
|
|
43
|
+
--hy-line: var(--hy-line-strong);
|
|
44
|
+
--hy-ink-3: var(--hy-ink-2);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Rose palette: raspberry on blush.
|
|
3
|
+
*
|
|
4
|
+
* Loaded on demand, never part of hyalo.css. Set data-hy-palette="rose" on
|
|
5
|
+
* <html> after this file has loaded, and remove the attribute to go back to
|
|
6
|
+
* the built-in palette. HyPalette does both for you.
|
|
7
|
+
*
|
|
8
|
+
* Each colour is written once with light-dark(), which resolves against the
|
|
9
|
+
* color-scheme that themes.css sets. Forced themes, the OS setting and
|
|
10
|
+
* .hy-theme-dark islands all keep working without repeating the values.
|
|
11
|
+
*
|
|
12
|
+
* The html in the selector outranks the dark theme rules in themes.css, so
|
|
13
|
+
* the palette wins in whatever order the two stylesheets load.
|
|
14
|
+
*/
|
|
15
|
+
@layer hy.tokens {
|
|
16
|
+
html:root[data-hy-palette='rose'],
|
|
17
|
+
[data-hy-palette='rose'] .hy-theme-dark {
|
|
18
|
+
--hy-bg: light-dark(#f8f0f2, #130a0e);
|
|
19
|
+
--hy-surface-1: light-dark(#ffffff, #1c1217);
|
|
20
|
+
--hy-surface-2: light-dark(#fcf6f7, #24181e);
|
|
21
|
+
--hy-surface-3: light-dark(#f1e5e8, #2e1f26);
|
|
22
|
+
--hy-surface-4: light-dark(#e7d6db, #3a2931);
|
|
23
|
+
--hy-ink: light-dark(#22121a, #f9edf1);
|
|
24
|
+
--hy-ink-2: light-dark(#523b45, #d3bcc5);
|
|
25
|
+
--hy-ink-3: light-dark(#6c535e, #a8919b);
|
|
26
|
+
--hy-ink-2-glass: light-dark(#432f38, #e0ccd4);
|
|
27
|
+
--hy-ink-3-glass: light-dark(#5a434d, #bba3ad);
|
|
28
|
+
--hy-line: light-dark(rgb(34 18 26 / 0.12), rgb(249 237 241 / 0.12));
|
|
29
|
+
--hy-line-strong: light-dark(rgb(34 18 26 / 0.24), rgb(249 237 241 / 0.26));
|
|
30
|
+
--hy-primary: light-dark(#b8175a, #f472b6);
|
|
31
|
+
--hy-primary-hover: light-dark(#9e134d, #f9a8d4);
|
|
32
|
+
--hy-primary-ink: light-dark(#ffffff, #2a0718);
|
|
33
|
+
--hy-primary-wash: light-dark(rgb(184 23 90 / 0.12), rgb(244 114 182 / 0.16));
|
|
34
|
+
--hy-secondary: light-dark(#4b44b5, #aaa6ff);
|
|
35
|
+
--hy-secondary-ink: light-dark(#ffffff, #120f33);
|
|
36
|
+
--hy-glass-border: light-dark(rgb(34 18 26 / 0.08), rgb(255 255 255 / 0.08));
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/* Same as the high contrast rule in themes.css, which this file outranks. */
|
|
40
|
+
@media (prefers-contrast: more) {
|
|
41
|
+
html:root[data-hy-palette='rose'],
|
|
42
|
+
[data-hy-palette='rose'] .hy-theme-dark {
|
|
43
|
+
--hy-line: var(--hy-line-strong);
|
|
44
|
+
--hy-ink-3: var(--hy-ink-2);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Card slots. These classes come from directives on projected content, so
|
|
3
|
+
* they are styled globally instead of from inside the component.
|
|
4
|
+
*/
|
|
5
|
+
.hy-card__media {
|
|
6
|
+
display: block;
|
|
7
|
+
margin-block: calc(var(--_pad) * -1) var(--hy-space-2);
|
|
8
|
+
margin-inline: calc(var(--_pad) * -1);
|
|
9
|
+
inline-size: calc(100% + var(--_pad) * 2);
|
|
10
|
+
max-inline-size: none;
|
|
11
|
+
aspect-ratio: var(--hy-card-media-ratio, 16 / 10);
|
|
12
|
+
object-fit: cover;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.hy-card__header {
|
|
16
|
+
margin: 0;
|
|
17
|
+
font-size: var(--hy-step-2);
|
|
18
|
+
font-weight: 620;
|
|
19
|
+
line-height: var(--hy-leading-tight);
|
|
20
|
+
color: var(--hy-ink);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.hy-card__footer {
|
|
24
|
+
display: flex;
|
|
25
|
+
align-items: center;
|
|
26
|
+
gap: var(--hy-space-3);
|
|
27
|
+
margin-block-start: var(--hy-space-2);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.hy-card__link {
|
|
31
|
+
color: inherit;
|
|
32
|
+
text-decoration: none;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.hy-card__link::after {
|
|
36
|
+
content: '';
|
|
37
|
+
position: absolute;
|
|
38
|
+
inset: 0;
|
|
39
|
+
border-radius: inherit;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.hy-card__link:focus-visible {
|
|
43
|
+
outline: none;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.hy-card :is(button, a:not(.hy-card__link), input, select, textarea, label) {
|
|
47
|
+
position: relative;
|
|
48
|
+
z-index: 1;
|
|
49
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Dialogs and drawers. Both render in CDK overlays, so their styles live
|
|
3
|
+
* here. The panel is the .cdk-dialog-container inside the pane.
|
|
4
|
+
*
|
|
5
|
+
* The CDK injects its structural overlay styles without a layer, and
|
|
6
|
+
* unlayered rules beat everything in ours. That is why the container's
|
|
7
|
+
* display needs !important and the dialog widths are set inline from
|
|
8
|
+
* HyDialog instead of here.
|
|
9
|
+
*/
|
|
10
|
+
.hy-dialog-pane,
|
|
11
|
+
.hy-drawer-pane {
|
|
12
|
+
max-inline-size: 100vw;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.hy-dialog-pane > .cdk-dialog-container,
|
|
16
|
+
.hy-drawer-pane > .cdk-dialog-container {
|
|
17
|
+
display: flex !important;
|
|
18
|
+
flex-direction: column;
|
|
19
|
+
gap: var(--hy-space-4);
|
|
20
|
+
inline-size: 100%;
|
|
21
|
+
max-block-size: inherit;
|
|
22
|
+
padding: var(--hy-dialog-padding, var(--hy-space-7));
|
|
23
|
+
overflow: auto;
|
|
24
|
+
color: var(--hy-ink);
|
|
25
|
+
outline: none;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/*
|
|
29
|
+
* Content opened as a component puts its own host element in between.
|
|
30
|
+
* Let the parts inside it join the panel's flex layout.
|
|
31
|
+
*/
|
|
32
|
+
:is(.hy-dialog-pane, .hy-drawer-pane)
|
|
33
|
+
> .cdk-dialog-container
|
|
34
|
+
> :not(.hy-dialog__title, .hy-dialog__content, .hy-dialog__actions, .hy-drawer__grabber) {
|
|
35
|
+
display: contents;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/*
|
|
39
|
+
* The animation runs on the glass panel, not the pane. An ancestor with
|
|
40
|
+
* opacity below 1 becomes the backdrop root, so the panel's blur would see
|
|
41
|
+
* nothing behind it until the fade ended, then snap in.
|
|
42
|
+
*/
|
|
43
|
+
.hy-dialog-pane > .cdk-dialog-container {
|
|
44
|
+
border-radius: var(--hy-dialog-radius, var(--hy-radius-l));
|
|
45
|
+
max-block-size: calc(100dvh - 2 * var(--hy-space-6));
|
|
46
|
+
animation: hy-dialog-in var(--hy-dur-enter) var(--hy-ease-out);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.hy-dialog-pane[data-state='closing'] > .cdk-dialog-container {
|
|
50
|
+
animation: hy-dialog-out var(--hy-dur-exit) var(--hy-ease-inout) forwards;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.hy-dialog-pane {
|
|
54
|
+
inline-size: calc(100vw - 2 * var(--hy-space-4));
|
|
55
|
+
max-block-size: calc(100dvh - 2 * var(--hy-space-6));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@media (max-width: 40rem) {
|
|
59
|
+
.hy-dialog--full {
|
|
60
|
+
inline-size: 100vw;
|
|
61
|
+
block-size: 100dvh;
|
|
62
|
+
max-block-size: none;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.hy-dialog--full > .cdk-dialog-container {
|
|
66
|
+
border-radius: 0;
|
|
67
|
+
max-block-size: none;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/* Content parts */
|
|
72
|
+
.hy-dialog__title {
|
|
73
|
+
margin: 0;
|
|
74
|
+
font-size: var(--hy-step-2);
|
|
75
|
+
font-weight: 640;
|
|
76
|
+
line-height: var(--hy-leading-tight);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.hy-dialog__content {
|
|
80
|
+
margin: 0;
|
|
81
|
+
flex: 1;
|
|
82
|
+
color: var(--hy-ink-2);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.hy-dialog__actions {
|
|
86
|
+
display: flex;
|
|
87
|
+
flex-wrap: wrap;
|
|
88
|
+
justify-content: flex-end;
|
|
89
|
+
gap: var(--hy-space-2);
|
|
90
|
+
margin-block-start: var(--hy-space-2);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/*
|
|
94
|
+
* Out the way it came in. The blur grows with the panel, so the glass reads
|
|
95
|
+
* as material arriving rather than a picture fading in. With reduced motion
|
|
96
|
+
* --hy-move is 0 and only the fade is left.
|
|
97
|
+
*/
|
|
98
|
+
@keyframes hy-dialog-in {
|
|
99
|
+
from {
|
|
100
|
+
opacity: 0;
|
|
101
|
+
translate: 0 calc(0.75rem * var(--hy-move));
|
|
102
|
+
scale: calc(1 - 0.03 * var(--hy-move));
|
|
103
|
+
backdrop-filter: blur(0) saturate(100%);
|
|
104
|
+
-webkit-backdrop-filter: blur(0) saturate(100%);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
@keyframes hy-dialog-out {
|
|
109
|
+
to {
|
|
110
|
+
opacity: 0;
|
|
111
|
+
translate: 0 calc(0.75rem * var(--hy-move));
|
|
112
|
+
scale: calc(1 - 0.03 * var(--hy-move));
|
|
113
|
+
backdrop-filter: blur(0) saturate(100%);
|
|
114
|
+
-webkit-backdrop-filter: blur(0) saturate(100%);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Drawers and bottom sheets. Shares the panel and content styles in dialog.css.
|
|
3
|
+
*
|
|
4
|
+
* With motion on, the panel runs on a spring from TypeScript (see sheet.ts)
|
|
5
|
+
* and gets .hy-sheet-driven, which turns the keyframes off. The keyframes
|
|
6
|
+
* here are the reduced-motion path: a cross-fade, since --hy-move is 0.
|
|
7
|
+
* Like dialogs, the panel animates and not the pane, so its blur works.
|
|
8
|
+
*/
|
|
9
|
+
.hy-drawer-pane > .cdk-dialog-container {
|
|
10
|
+
block-size: 100%;
|
|
11
|
+
padding: var(--hy-drawer-padding, var(--hy-space-7));
|
|
12
|
+
border-radius: 0;
|
|
13
|
+
/* Side drawers are dragged sideways; vertical touches still scroll. */
|
|
14
|
+
touch-action: pan-y;
|
|
15
|
+
animation: hy-drawer-in var(--hy-dur-enter) var(--hy-ease-out);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.hy-drawer-pane > .cdk-dialog-container.hy-sheet-driven {
|
|
19
|
+
animation: none;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.hy-drawer-pane > .cdk-dialog-container[data-dragging] {
|
|
23
|
+
user-select: none;
|
|
24
|
+
cursor: grabbing;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.hy-drawer--start > .cdk-dialog-container {
|
|
28
|
+
border-start-end-radius: var(--hy-drawer-radius, var(--hy-radius-l));
|
|
29
|
+
border-end-end-radius: var(--hy-drawer-radius, var(--hy-radius-l));
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.hy-drawer--end > .cdk-dialog-container {
|
|
33
|
+
border-start-start-radius: var(--hy-drawer-radius, var(--hy-radius-l));
|
|
34
|
+
border-end-start-radius: var(--hy-drawer-radius, var(--hy-radius-l));
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.hy-drawer--bottom > .cdk-dialog-container {
|
|
38
|
+
position: relative;
|
|
39
|
+
max-block-size: 85dvh;
|
|
40
|
+
border-start-start-radius: var(--hy-drawer-radius, var(--hy-radius-l));
|
|
41
|
+
border-start-end-radius: var(--hy-drawer-radius, var(--hy-radius-l));
|
|
42
|
+
padding-block-end: max(var(--hy-drawer-padding, var(--hy-space-7)), env(safe-area-inset-bottom));
|
|
43
|
+
touch-action: pan-x pan-y;
|
|
44
|
+
animation-name: hy-sheet-in;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* The handle that says "this can be pulled down". */
|
|
48
|
+
.hy-drawer__grabber {
|
|
49
|
+
position: absolute;
|
|
50
|
+
inset-block-start: 0;
|
|
51
|
+
inset-inline: 0;
|
|
52
|
+
block-size: var(--hy-space-6);
|
|
53
|
+
touch-action: none;
|
|
54
|
+
cursor: grab;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.hy-drawer__grabber::before {
|
|
58
|
+
content: '';
|
|
59
|
+
position: absolute;
|
|
60
|
+
inset-block-start: var(--hy-space-2);
|
|
61
|
+
inset-inline-start: 50%;
|
|
62
|
+
inline-size: 2.25rem;
|
|
63
|
+
block-size: 0.3125rem;
|
|
64
|
+
translate: -50% 0;
|
|
65
|
+
border-radius: var(--hy-radius-pill);
|
|
66
|
+
background: color-mix(in srgb, var(--hy-ink) 28%, transparent);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.hy-drawer__grabber:dir(rtl)::before {
|
|
70
|
+
translate: 50% 0;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.hy-drawer--start {
|
|
74
|
+
--_from: -100%;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.hy-drawer--end {
|
|
78
|
+
--_from: 100%;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
[dir='rtl'] .hy-drawer--start {
|
|
82
|
+
--_from: 100%;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
[dir='rtl'] .hy-drawer--end {
|
|
86
|
+
--_from: -100%;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.hy-drawer-pane[data-state='closing'] > .cdk-dialog-container {
|
|
90
|
+
animation: hy-drawer-out var(--hy-dur-exit) var(--hy-ease-inout) forwards;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.hy-drawer--bottom[data-state='closing'] > .cdk-dialog-container {
|
|
94
|
+
animation-name: hy-sheet-out;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/* Without movement (--hy-move: 0) these fade instead of slide. */
|
|
98
|
+
@keyframes hy-drawer-in {
|
|
99
|
+
from {
|
|
100
|
+
opacity: var(--hy-move);
|
|
101
|
+
translate: calc(var(--_from) * var(--hy-move)) 0;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
@keyframes hy-drawer-out {
|
|
106
|
+
to {
|
|
107
|
+
opacity: var(--hy-move);
|
|
108
|
+
translate: calc(var(--_from) * var(--hy-move)) 0;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
@keyframes hy-sheet-in {
|
|
113
|
+
from {
|
|
114
|
+
opacity: var(--hy-move);
|
|
115
|
+
translate: 0 calc(100% * var(--hy-move));
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
@keyframes hy-sheet-out {
|
|
120
|
+
to {
|
|
121
|
+
opacity: var(--hy-move);
|
|
122
|
+
translate: 0 calc(100% * var(--hy-move));
|
|
123
|
+
}
|
|
124
|
+
}
|