@utrecht/web-component-library-stencil 4.1.1 → 4.2.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/dist/cjs/index-df3f0e01.js +10 -18
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{utrecht-action-group_46.cjs.entry.js → utrecht-action-group_48.cjs.entry.js} +58 -29
- package/dist/cjs/utrecht-action-group_48.cjs.entry.js.map +1 -0
- package/dist/cjs/utrecht-document.cjs.entry.js +22 -0
- package/dist/cjs/utrecht-document.cjs.entry.js.map +1 -0
- package/dist/cjs/utrecht-html-content.cjs.entry.js +1 -1
- package/dist/cjs/utrecht-html-content.cjs.entry.js.map +1 -1
- package/dist/cjs/utrecht-page-content.cjs.entry.js +22 -0
- package/dist/cjs/utrecht-page-content.cjs.entry.js.map +1 -0
- package/dist/cjs/utrecht-page.cjs.entry.js +22 -0
- package/dist/cjs/utrecht-page.cjs.entry.js.map +1 -0
- package/dist/cjs/utrecht.cjs.js +1 -1
- package/dist/collection/components/alert.css +4 -0
- package/dist/collection/components/html-content.css +88 -2
- package/dist/collection/components/nav-bar.css +7 -0
- package/dist/collection/components/nav-bar.js +26 -1
- package/dist/collection/components/nav-bar.js.map +1 -1
- package/dist/collection/components/page-layout.css +1 -1
- package/dist/collection/components/root.css +80 -5
- package/dist/collection/components/spotlight-section.css +3 -0
- package/dist/components/utrecht-alert.js +1 -1
- package/dist/components/utrecht-alert.js.map +1 -1
- package/dist/components/utrecht-html-content.js +1 -1
- package/dist/components/utrecht-html-content.js.map +1 -1
- package/dist/components/utrecht-nav-bar.js +6 -3
- package/dist/components/utrecht-nav-bar.js.map +1 -1
- package/dist/components/utrecht-page-layout.js +1 -1
- package/dist/components/utrecht-page-layout.js.map +1 -1
- package/dist/components/utrecht-root.js +1 -1
- package/dist/components/utrecht-root.js.map +1 -1
- package/dist/components/utrecht-spotlight-section.js +1 -1
- package/dist/components/utrecht-spotlight-section.js.map +1 -1
- package/dist/esm/index-6be72d1f.js +10 -18
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utrecht-action-group_46.entry.js → utrecht-action-group_48.entry.js} +54 -27
- package/dist/esm/utrecht-action-group_48.entry.js.map +1 -0
- package/dist/esm/utrecht-document.entry.js +18 -0
- package/dist/esm/utrecht-document.entry.js.map +1 -0
- package/dist/esm/utrecht-html-content.entry.js +1 -1
- package/dist/esm/utrecht-html-content.entry.js.map +1 -1
- package/dist/esm/utrecht-page-content.entry.js +18 -0
- package/dist/esm/utrecht-page-content.entry.js.map +1 -0
- package/dist/esm/utrecht-page.entry.js +18 -0
- package/dist/esm/utrecht-page.entry.js.map +1 -0
- package/dist/esm/utrecht.js +1 -1
- package/dist/types/components/nav-bar.d.ts +1 -0
- package/dist/types/components.d.ts +2 -0
- package/dist/utrecht/p-017a87d7.entry.js +2 -0
- package/dist/utrecht/p-017a87d7.entry.js.map +1 -0
- package/dist/utrecht/p-0f1d450b.entry.js +2 -0
- package/dist/utrecht/p-0f1d450b.entry.js.map +1 -0
- package/dist/utrecht/{p-56bc0920.entry.js → p-159b7585.entry.js} +2 -2
- package/dist/utrecht/{p-56bc0920.entry.js.map → p-159b7585.entry.js.map} +1 -1
- package/dist/utrecht/p-39f7b42b.entry.js +2 -0
- package/dist/utrecht/p-39f7b42b.entry.js.map +1 -0
- package/dist/utrecht/p-8be41005.entry.js +2 -0
- package/dist/utrecht/p-8be41005.entry.js.map +1 -0
- package/dist/utrecht/utrecht.esm.js +1 -1
- package/dist/utrecht/utrecht.esm.js.map +1 -1
- package/package.json +83 -83
- package/dist/cjs/utrecht-action-group_46.cjs.entry.js.map +0 -1
- package/dist/cjs/utrecht-nav-bar.cjs.entry.js +0 -22
- package/dist/cjs/utrecht-nav-bar.cjs.entry.js.map +0 -1
- package/dist/cjs/utrecht-page-body.cjs.entry.js +0 -22
- package/dist/cjs/utrecht-page-body.cjs.entry.js.map +0 -1
- package/dist/cjs/utrecht-page-footer.cjs.entry.js +0 -22
- package/dist/cjs/utrecht-page-footer.cjs.entry.js.map +0 -1
- package/dist/cjs/utrecht-page-layout.cjs.entry.js +0 -22
- package/dist/cjs/utrecht-page-layout.cjs.entry.js.map +0 -1
- package/dist/cjs/utrecht-root.cjs.entry.js +0 -22
- package/dist/cjs/utrecht-root.cjs.entry.js.map +0 -1
- package/dist/esm/utrecht-action-group_46.entry.js.map +0 -1
- package/dist/esm/utrecht-nav-bar.entry.js +0 -18
- package/dist/esm/utrecht-nav-bar.entry.js.map +0 -1
- package/dist/esm/utrecht-page-body.entry.js +0 -18
- package/dist/esm/utrecht-page-body.entry.js.map +0 -1
- package/dist/esm/utrecht-page-footer.entry.js +0 -18
- package/dist/esm/utrecht-page-footer.entry.js.map +0 -1
- package/dist/esm/utrecht-page-layout.entry.js +0 -18
- package/dist/esm/utrecht-page-layout.entry.js.map +0 -1
- package/dist/esm/utrecht-root.entry.js +0 -18
- package/dist/esm/utrecht-root.entry.js.map +0 -1
- package/dist/utrecht/p-07df436f.entry.js +0 -2
- package/dist/utrecht/p-07df436f.entry.js.map +0 -1
- package/dist/utrecht/p-2af9fcf9.entry.js +0 -2
- package/dist/utrecht/p-2af9fcf9.entry.js.map +0 -1
- package/dist/utrecht/p-510d3f77.entry.js +0 -2
- package/dist/utrecht/p-510d3f77.entry.js.map +0 -1
- package/dist/utrecht/p-5a2b91cf.entry.js +0 -2
- package/dist/utrecht/p-5a2b91cf.entry.js.map +0 -1
- package/dist/utrecht/p-b3dbf1ca.entry.js +0 -2
- package/dist/utrecht/p-b3dbf1ca.entry.js.map +0 -1
- package/dist/utrecht/p-f516287a.entry.js +0 -2
- package/dist/utrecht/p-f516287a.entry.js.map +0 -1
|
@@ -1941,25 +1941,111 @@ however browsers don't seem to have implemented great looking supixel tweening y
|
|
|
1941
1941
|
font-variant-ligatures: none;
|
|
1942
1942
|
}
|
|
1943
1943
|
.utrecht-html ul {
|
|
1944
|
+
--_utrecht-unordered-list-list-style-type: var(--utrecht-unordered-list-list-style-type, "●");
|
|
1945
|
+
--_utrecht-unordered-list-marker-font-size: var(--utrecht-unordered-list-marker-font-size, "1rem");
|
|
1944
1946
|
/* Configure `box-sizing` and `text-align` for `--center` */
|
|
1945
1947
|
box-sizing: border-box;
|
|
1946
1948
|
font-family: var(--utrecht-document-font-family, inherit);
|
|
1947
1949
|
font-size: var(--utrecht-unordered-list-font-size, var(--utrecht-document-font-size, inherit));
|
|
1948
1950
|
line-height: var(--utrecht-unordered-list-line-height, var(--utrecht-document-line-height, inherit));
|
|
1951
|
+
/* Using list style type instead of ::marker allows for more cross browser compatibility */
|
|
1952
|
+
list-style-type: var(--_utrecht-unordered-list-list-style-type, "●");
|
|
1949
1953
|
margin-block-end: calc(var(--utrecht-space-around, 0) * var(--utrecht-unordered-list-margin-block-end, var(--utrecht-paragraph-margin-block-end, 0)));
|
|
1950
1954
|
margin-block-start: calc(var(--utrecht-space-around, 0) * var(--utrecht-unordered-list-margin-block-start, var(--utrecht-paragraph-margin-block-start, 0)));
|
|
1951
|
-
|
|
1955
|
+
margin-inline-start: var(--utrecht-unordered-list-margin-inline-start, 1ch);
|
|
1956
|
+
padding-inline-start: var(--utrecht-unordered-list-padding-inline-start, 0);
|
|
1952
1957
|
text-align: start;
|
|
1953
1958
|
--utrecht-space-around: 1;
|
|
1959
|
+
--_utrecht-unordered-list-list-style-type: var(
|
|
1960
|
+
--utrecht-unordered-list-level-1-list-style-type,
|
|
1961
|
+
var(--utrecht-unordered-list-list-style-type, ●)
|
|
1962
|
+
);
|
|
1963
|
+
--_utrecht-unordered-list-marker-font-size: var(
|
|
1964
|
+
--utrecht-unordered-list-level-1-marker-font-size,
|
|
1965
|
+
var(--utrecht-unordered-list-marker-font-size, 1em)
|
|
1966
|
+
);
|
|
1954
1967
|
}
|
|
1955
1968
|
.utrecht-html ul > li {
|
|
1956
1969
|
margin-block-end: var(--utrecht-unordered-list-item-margin-block-end);
|
|
1957
1970
|
margin-block-start: var(--utrecht-unordered-list-item-margin-block-start);
|
|
1958
1971
|
padding-inline-start: var(--utrecht-unordered-list-item-padding-inline-start, 1ch);
|
|
1959
1972
|
}
|
|
1973
|
+
.utrecht-html {
|
|
1974
|
+
/* Child combinator (>) to prevent styling nested ordered lists */
|
|
1975
|
+
}
|
|
1960
1976
|
.utrecht-html ul > li::marker {
|
|
1961
1977
|
color: var(--utrecht-unordered-list-marker-color);
|
|
1962
|
-
|
|
1978
|
+
font-size: var(--_utrecht-unordered-list-marker-font-size, 1em);
|
|
1979
|
+
}
|
|
1980
|
+
.utrecht-html ul > li > ul {
|
|
1981
|
+
--_utrecht-unordered-list-list-style-type: var(
|
|
1982
|
+
--utrecht-unordered-list-level-2-list-style-type,
|
|
1983
|
+
var(--utrecht-unordered-list-list-style-type, ○)
|
|
1984
|
+
);
|
|
1985
|
+
--_utrecht-unordered-list-marker-font-size: var(
|
|
1986
|
+
--utrecht-unordered-list-level-2-marker-font-size,
|
|
1987
|
+
var(--utrecht-unordered-list-marker-font-size, 1em)
|
|
1988
|
+
);
|
|
1989
|
+
}
|
|
1990
|
+
.utrecht-html ul > li > ul > li > ul {
|
|
1991
|
+
--_utrecht-unordered-list-list-style-type: var(
|
|
1992
|
+
--utrecht-unordered-list-level-3-list-style-type,
|
|
1993
|
+
var(--utrecht-unordered-list-list-style-type, ◆)
|
|
1994
|
+
);
|
|
1995
|
+
--_utrecht-unordered-list-marker-font-size: var(
|
|
1996
|
+
--utrecht-unordered-list-level-3-marker-font-size,
|
|
1997
|
+
var(--utrecht-unordered-list-marker-font-size, 1em)
|
|
1998
|
+
);
|
|
1999
|
+
}
|
|
2000
|
+
.utrecht-html ul > li > ul > li > ul > li > ul {
|
|
2001
|
+
--_utrecht-unordered-list-list-style-type: var(
|
|
2002
|
+
--utrecht-unordered-list-level-4-list-style-type,
|
|
2003
|
+
var(--utrecht-unordered-list-list-style-type, ◇)
|
|
2004
|
+
);
|
|
2005
|
+
--_utrecht-unordered-list-marker-font-size: var(
|
|
2006
|
+
--utrecht-unordered-list-level-4-marker-font-size,
|
|
2007
|
+
var(--utrecht-unordered-list-marker-font-size, 1em)
|
|
2008
|
+
);
|
|
2009
|
+
}
|
|
2010
|
+
.utrecht-html ul > li > ul > li > ul > li > ul > li > ul {
|
|
2011
|
+
--_utrecht-unordered-list-list-style-type: var(
|
|
2012
|
+
--utrecht-unordered-list-level-5-list-style-type,
|
|
2013
|
+
var(--utrecht-unordered-list-list-style-type, ■)
|
|
2014
|
+
);
|
|
2015
|
+
--_utrecht-unordered-list-marker-font-size: var(
|
|
2016
|
+
--utrecht-unordered-list-level-5-marker-font-size,
|
|
2017
|
+
var(--utrecht-unordered-list-marker-font-size, 1em)
|
|
2018
|
+
);
|
|
2019
|
+
}
|
|
2020
|
+
.utrecht-html ul > li > ul > li > ul > li > ul > li > ul > li > ul {
|
|
2021
|
+
--_utrecht-unordered-list-list-style-type: var(
|
|
2022
|
+
--utrecht-unordered-list-level-6-list-style-type,
|
|
2023
|
+
var(--utrecht-unordered-list-list-style-type, □)
|
|
2024
|
+
);
|
|
2025
|
+
--_utrecht-unordered-list-marker-font-size: var(
|
|
2026
|
+
--utrecht-unordered-list-level-6-marker-font-size,
|
|
2027
|
+
var(--utrecht-unordered-list-marker-font-size, 1em)
|
|
2028
|
+
);
|
|
2029
|
+
}
|
|
2030
|
+
.utrecht-html ul > li > ul > li > ul > li > ul > li > ul > li > ul > li > ul {
|
|
2031
|
+
--_utrecht-unordered-list-list-style-type: var(
|
|
2032
|
+
--utrecht-unordered-list-level-7-list-style-type,
|
|
2033
|
+
var(--utrecht-unordered-list-list-style-type, ▲)
|
|
2034
|
+
);
|
|
2035
|
+
--_utrecht-unordered-list-marker-font-size: var(
|
|
2036
|
+
--utrecht-unordered-list-level-7-marker-font-size,
|
|
2037
|
+
var(--utrecht-unordered-list-marker-font-size, 1em)
|
|
2038
|
+
);
|
|
2039
|
+
}
|
|
2040
|
+
.utrecht-html ul > li > ul > li > ul > li > ul > li > ul > li > ul > li > ul > li > ul {
|
|
2041
|
+
--_utrecht-unordered-list-list-style-type: var(
|
|
2042
|
+
--utrecht-unordered-list-level-8-list-style-type,
|
|
2043
|
+
var(--utrecht-unordered-list-list-style-type, △)
|
|
2044
|
+
);
|
|
2045
|
+
--_utrecht-unordered-list-marker-font-size: var(
|
|
2046
|
+
--utrecht-unordered-list-level-8-marker-font-size,
|
|
2047
|
+
var(--utrecht-unordered-list-marker-font-size, 1em)
|
|
2048
|
+
);
|
|
1963
2049
|
}
|
|
1964
2050
|
:where(.utrecht-html) :where(:focus-visible) {
|
|
1965
2051
|
/* - The browser default focus ring should apply when these CSS custom properties are not set.
|
|
@@ -35,4 +35,11 @@ div {
|
|
|
35
35
|
|
|
36
36
|
:host([hidden]) {
|
|
37
37
|
display: none !important;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
:host([sticky]) {
|
|
41
|
+
background-color: var(--utrecht-nav-bar-background-color, Canvas);
|
|
42
|
+
color: var(--utrecht-nav-bar-color, CanvasText);
|
|
43
|
+
inset-block-start: 0;
|
|
44
|
+
position: sticky;
|
|
38
45
|
}
|
|
@@ -5,8 +5,11 @@ import { h } from "@stencil/core";
|
|
|
5
5
|
* Copyright (c) 2021-2024 Gemeente Utrecht
|
|
6
6
|
*/
|
|
7
7
|
export class NavBar {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.sticky = false;
|
|
10
|
+
}
|
|
8
11
|
render() {
|
|
9
|
-
return (h("div", { key: '
|
|
12
|
+
return (h("div", { key: '77525d5333f5b21f82d6fe12c05e8aa3d7630d4c' }, h("slot", { key: '0eee79b3ce4c2a7b786b55aa7dbbb6fb0687e915' })));
|
|
10
13
|
}
|
|
11
14
|
static get is() { return "utrecht-nav-bar"; }
|
|
12
15
|
static get encapsulation() { return "shadow"; }
|
|
@@ -20,5 +23,27 @@ export class NavBar {
|
|
|
20
23
|
"$": ["nav-bar.css"]
|
|
21
24
|
};
|
|
22
25
|
}
|
|
26
|
+
static get properties() {
|
|
27
|
+
return {
|
|
28
|
+
"sticky": {
|
|
29
|
+
"type": "boolean",
|
|
30
|
+
"mutable": false,
|
|
31
|
+
"complexType": {
|
|
32
|
+
"original": "boolean",
|
|
33
|
+
"resolved": "boolean",
|
|
34
|
+
"references": {}
|
|
35
|
+
},
|
|
36
|
+
"required": false,
|
|
37
|
+
"optional": false,
|
|
38
|
+
"docs": {
|
|
39
|
+
"tags": [],
|
|
40
|
+
"text": ""
|
|
41
|
+
},
|
|
42
|
+
"attribute": "sticky",
|
|
43
|
+
"reflect": false,
|
|
44
|
+
"defaultValue": "false"
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
}
|
|
23
48
|
}
|
|
24
49
|
//# sourceMappingURL=nav-bar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nav-bar.js","sourceRoot":"","sources":["../../src/components/nav-bar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"nav-bar.js","sourceRoot":"","sources":["../../src/components/nav-bar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAEnD;;;;GAIG;AAOH,MAAM,OAAO,MAAM;;sBACS,KAAK;;IAE/B,MAAM;QACJ,OAAO,CACL;YACE,8DAAa,CACT,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Prop } from '@stencil/core';\n\n/**\n * @license EUPL-1.2\n * Copyright (c) 2020-2024 Frameless B.V.\n * Copyright (c) 2021-2024 Gemeente Utrecht\n */\n\n@Component({\n tag: 'utrecht-nav-bar',\n styleUrl: 'nav-bar.scss',\n shadow: true,\n})\nexport class NavBar {\n @Prop() sticky: boolean = false;\n\n render() {\n return (\n <div>\n <slot></slot>\n </div>\n );\n }\n}\n"]}
|
|
@@ -20,6 +20,15 @@
|
|
|
20
20
|
/* Override the browser focus ring with our own focus ring.
|
|
21
21
|
* Use `:where()` so the CSS selector specificity is `0,0,0`.
|
|
22
22
|
*/
|
|
23
|
+
/**
|
|
24
|
+
* Only use this on Root components with an explicit height, that is not calculated based on its children.
|
|
25
|
+
*/
|
|
26
|
+
/**
|
|
27
|
+
* Use this mixin for `<html class="utrecht-root">`.
|
|
28
|
+
*/
|
|
29
|
+
/**
|
|
30
|
+
* Use this mixin for `<body class="utrecht-root">`.
|
|
31
|
+
*/
|
|
23
32
|
/**
|
|
24
33
|
* The focus indicator should be applied to all elements that have the `:focus-visible` state.
|
|
25
34
|
*/
|
|
@@ -56,37 +65,103 @@
|
|
|
56
65
|
* are positioned relative to the root component.
|
|
57
66
|
* - ensure text content fits at 400% zoom by enabling hypenation.
|
|
58
67
|
* - do not influence the `rem` unit by avoiding `font-size` on the root element.
|
|
68
|
+
* - reset `body` element styles for `margin`
|
|
69
|
+
* - reset `dialog` element styles for `border`, `margin` and `padding`
|
|
59
70
|
*/
|
|
60
|
-
/*
|
|
71
|
+
/* Prevent a less accessible page with lower text contrast, because other CSS is downgrading from `subpixel-antialiased` to `antialiased`.
|
|
72
|
+
* Reset `font-smoothing: antialiasing` to `auto`, and prefer automatic (`subpixel-antialiasing`) behavior for high-dpi screens. */
|
|
61
73
|
-webkit-font-smoothing: auto !important;
|
|
62
74
|
-moz-osx-font-smoothing: auto !important;
|
|
63
|
-
/* For some new properties,
|
|
75
|
+
/* For some new properties, temporarily provide the `utrecht.body.*` design tokens as fallback for backwards compatibility. */
|
|
76
|
+
/**
|
|
77
|
+
* When the Root component is positioned above another content,
|
|
78
|
+
* the text must remain legible. Avoid a transparent background,
|
|
79
|
+
* causing underlying content to interfere with contents of Root.
|
|
80
|
+
*
|
|
81
|
+
* When no `background-color` design token is specified, fallback
|
|
82
|
+
* to the system `Canvas` color.
|
|
83
|
+
*/
|
|
64
84
|
background-color: var(--utrecht-root-background-color, Canvas);
|
|
65
|
-
|
|
85
|
+
/* Avoid `border` on a `dialog` element. */
|
|
86
|
+
border: 0;
|
|
87
|
+
/*
|
|
88
|
+
* Avoid overflowing scroll container because of a `border` or `padding`,
|
|
89
|
+
* by configuring `box-sizing: border-box`.
|
|
90
|
+
*/
|
|
91
|
+
box-sizing: border-box;
|
|
92
|
+
/**
|
|
93
|
+
* Prevent there is insufficient color contrast for text, when no design tokens
|
|
94
|
+
* for `color` and `background-color` are specified. In that case use
|
|
95
|
+
* the system default colors `Canvas` and `CanvasText`.
|
|
96
|
+
*/
|
|
66
97
|
color: var(--utrecht-root-color, CanvasText);
|
|
67
98
|
font-family: var(--utrecht-root-font-family);
|
|
68
99
|
font-size-adjust: var(--utrecht-root-font-size-adjust, 0.5);
|
|
69
100
|
font-weight: var(--utrecht-root-font-weight, var(--utrecht-body-font-weight));
|
|
101
|
+
/* Avoid changing the meaning of text by adding word-breaks without hyphenation,
|
|
102
|
+
* in languages where this is appropriate. Browsers will hyphenate based on the language of the text
|
|
103
|
+
* as specified in the `lang` HTML-attribute.
|
|
104
|
+
*/
|
|
70
105
|
-webkit-hyphens: auto;
|
|
71
106
|
-moz-hyphens: auto;
|
|
72
107
|
-ms-hyphens: auto;
|
|
73
108
|
hyphens: auto;
|
|
74
109
|
inline-size: 100%;
|
|
75
|
-
|
|
76
|
-
|
|
110
|
+
/* Avoid `margin` on the `body` and `dialog` element. */
|
|
111
|
+
/* stylelint-disable-next-line property-disallowed-list */
|
|
112
|
+
margin: 0;
|
|
113
|
+
min-block-size: 100%;
|
|
77
114
|
overflow-wrap: break-word;
|
|
115
|
+
/* Avoid `padding` on the `dialog` element. */
|
|
116
|
+
/* stylelint-disable-next-line property-disallowed-list */
|
|
117
|
+
padding: 0;
|
|
118
|
+
/* Position fixed and sticky elements relative to the Root component,
|
|
119
|
+
* such as the Skip Link or a Sticky Navigation Bar.
|
|
120
|
+
*
|
|
121
|
+
* While the `html` element supports this out-of-the-box,
|
|
122
|
+
* adding `position: relative` adds support for elements such as `div` and `dialog`.
|
|
123
|
+
*/
|
|
78
124
|
position: relative;
|
|
125
|
+
/* Prefer legibility over rendering speed, for all font-sizes.
|
|
126
|
+
*
|
|
127
|
+
* When user tests and metrics indicate slow performance, we should reconsider this choice.
|
|
128
|
+
*
|
|
129
|
+
* For specific parts of the page that require high performance, this setting should
|
|
130
|
+
* be disabled locally using `text-rendering: auto`.
|
|
131
|
+
*
|
|
132
|
+
* https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/text-rendering
|
|
133
|
+
*/
|
|
79
134
|
text-rendering: optimizeLegibility;
|
|
135
|
+
/* Ensure the font-size is rendered predictably on mobile screens,
|
|
136
|
+
* by disabling the `text-size-adjust` text inflation algorithm.
|
|
137
|
+
*
|
|
138
|
+
* The responsibility now shifts to configuring the design tokens with
|
|
139
|
+
* sufficiently large font-sizes.
|
|
140
|
+
*
|
|
141
|
+
* https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/text-size-adjust
|
|
142
|
+
*/
|
|
80
143
|
-moz-text-size-adjust: none;
|
|
81
144
|
-webkit-text-size-adjust: none;
|
|
82
145
|
text-size-adjust: none;
|
|
146
|
+
/* Provide a built-in name for page transitions. */
|
|
147
|
+
view-transition-name: root;
|
|
83
148
|
}
|
|
84
149
|
@media (prefers-reduced-motion: no-preference) {
|
|
85
150
|
:host {
|
|
151
|
+
/* Provide a better user experience for keyboard users, by enabling smooth scrolling.
|
|
152
|
+
* With smooth scrolling it is easier to track where the next focusable item is in relation
|
|
153
|
+
* to the previous position.
|
|
154
|
+
*
|
|
155
|
+
* Avoid this extra motion for users with specific motion preferences, by only enabling this feature
|
|
156
|
+
* when no preference is specified.
|
|
157
|
+
*
|
|
158
|
+
* https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/scroll-behavior
|
|
159
|
+
*/
|
|
86
160
|
scroll-behavior: smooth;
|
|
87
161
|
}
|
|
88
162
|
}
|
|
89
163
|
:host {
|
|
164
|
+
/* For some new properties, temporarily provide the `utrecht.body.*` design tokens as fallback for backwards compatibility. */
|
|
90
165
|
font-size: var(--utrecht-root-font-size, var(--utrecht-body-font-size));
|
|
91
166
|
line-height: var(--utrecht-root-line-height, var(--utrecht-body-line-height));
|
|
92
167
|
}
|
|
@@ -20,12 +20,15 @@
|
|
|
20
20
|
border-style: solid;
|
|
21
21
|
border-width: var(--_utrecht-spotlight-section-border-width, var(--utrecht-spotlight-section-border-width, 0));
|
|
22
22
|
color: var(--_utrecht-spotlight-section-color, var(--utrecht-spotlight-section-color));
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-direction: column;
|
|
23
25
|
margin-block-end: calc(var(--utrecht-space-around, 0) * var(--utrecht-spotlight-section-margin-block-end, 0));
|
|
24
26
|
margin-block-start: calc(var(--utrecht-space-around, 0) * var(--utrecht-spotlight-section-margin-block-start, 0));
|
|
25
27
|
padding-block-end: var(--utrecht-spotlight-section-padding-block-end);
|
|
26
28
|
padding-block-start: var(--utrecht-spotlight-section-padding-block-start);
|
|
27
29
|
padding-inline-end: var(--utrecht-spotlight-section-padding-inline-end);
|
|
28
30
|
padding-inline-start: var(--utrecht-spotlight-section-padding-inline-start);
|
|
31
|
+
row-gap: var(--utrecht-spotlight-section-row-gap);
|
|
29
32
|
}
|
|
30
33
|
|
|
31
34
|
.utrecht-spotlight-section--info {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, h } from './p-2f0ff193.js';
|
|
2
2
|
import { c as clsx } from './p-e91d8a25.js';
|
|
3
3
|
|
|
4
|
-
const alertCss = ".utrecht-alert{background-color:var(--_utrecht-alert-background-color, var(--utrecht-alert-background-color));border-color:var(--_utrecht-alert-border-color, var(--utrecht-alert-border-color));border-radius:var(--utrecht-alert-border-radius, 0);border-style:solid;border-width:var(--_utrecht-alert-border-width, var(--utrecht-alert-border-width, 0));color:var(--_utrecht-alert-color, var(--utrecht-alert-color));column-gap:var(--utrecht-alert-column-gap);display:flex;flex-direction:row;margin-block-end:calc(var(--utrecht-space-around, 0) * var(--utrecht-alert-margin-block-end, 0));margin-block-start:calc(var(--utrecht-space-around, 0) * var(--utrecht-alert-margin-block-start, 0));padding-block-end:var(--utrecht-alert-padding-block-end);padding-block-start:var(--utrecht-alert-padding-block-start);padding-inline-end:var(--utrecht-alert-padding-inline-end);padding-inline-start:var(--utrecht-alert-padding-inline-start)}.utrecht-alert__icon{--utrecht-icon-color:var(--_utrecht-alert-icon-color, var(--utrecht-alert-icon-color));--utrecht-icon-size:var(--utrecht-alert-icon-size);--utrecht-icon-inset-block-start:var(--utrecht-alert-icon-inset-block-start)}.utrecht-alert__content{row-gap:var(--utrecht-alert-content-row-gap)}.utrecht-alert__message{--utrecht-heading-color:var(--utrecht-alert-color);--utrecht-paragraph-color:var(--utrecht-alert-color);row-gap:var(--utrecht-alert-message-row-gap)}.utrecht-alert--info{--_utrecht-alert-icon-color:var(--utrecht-alert-icon-info-color);--_utrecht-alert-background-color:var(--utrecht-alert-info-background-color);--_utrecht-alert-border-color:var(--utrecht-alert-info-border-color);--_utrecht-alert-border-width:var(--utrecht-alert-info-border-width);--_utrecht-alert-color:var(--utrecht-alert-info-color)}.utrecht-alert--ok{--_utrecht-alert-icon-color:var(--utrecht-alert-icon-ok-color);--_utrecht-alert-background-color:var(--utrecht-alert-ok-background-color);--_utrecht-alert-border-color:var(--utrecht-alert-ok-border-color);--_utrecht-alert-border-width:var(--utrecht-alert-ok-border-width);--_utrecht-alert-color:var(--utrecht-alert-ok-color)}.utrecht-alert--warning{--_utrecht-alert-icon-color:var(--utrecht-alert-icon-warning-color);--_utrecht-alert-background-color:var(--utrecht-alert-warning-background-color);--_utrecht-alert-border-color:var(--utrecht-alert-warning-border-color);--_utrecht-alert-border-width:var(--utrecht-alert-warning-border-width);--_utrecht-alert-color:var(--utrecht-alert-warning-color)}.utrecht-alert--error{--_utrecht-alert-icon-color:var(--utrecht-alert-icon-error-color);--_utrecht-alert-background-color:var(--utrecht-alert-error-background-color);--_utrecht-alert-border-color:var(--utrecht-alert-error-border-color);--_utrecht-alert-border-width:var(--utrecht-alert-error-border-width);--_utrecht-alert-color:var(--utrecht-alert-error-color)}:host{display:block}:host([hidden]){display:none !important}";
|
|
4
|
+
const alertCss = ".utrecht-alert{background-color:var(--_utrecht-alert-background-color, var(--utrecht-alert-background-color));border-color:var(--_utrecht-alert-border-color, var(--utrecht-alert-border-color));border-radius:var(--utrecht-alert-border-radius, 0);border-style:solid;border-width:var(--_utrecht-alert-border-width, var(--utrecht-alert-border-width, 0));color:var(--_utrecht-alert-color, var(--utrecht-alert-color));column-gap:var(--utrecht-alert-column-gap);display:flex;flex-direction:row;margin-block-end:calc(var(--utrecht-space-around, 0) * var(--utrecht-alert-margin-block-end, 0));margin-block-start:calc(var(--utrecht-space-around, 0) * var(--utrecht-alert-margin-block-start, 0));padding-block-end:var(--utrecht-alert-padding-block-end);padding-block-start:var(--utrecht-alert-padding-block-start);padding-inline-end:var(--utrecht-alert-padding-inline-end);padding-inline-start:var(--utrecht-alert-padding-inline-start)}.utrecht-alert__icon{--utrecht-icon-color:var(--_utrecht-alert-icon-color, var(--utrecht-alert-icon-color));--utrecht-icon-size:var(--utrecht-alert-icon-size);--utrecht-icon-inset-block-start:var(--utrecht-alert-icon-inset-block-start)}.utrecht-alert__content{display:flex;flex-direction:column;row-gap:var(--utrecht-alert-content-row-gap)}.utrecht-alert__message{--utrecht-heading-color:var(--utrecht-alert-color);--utrecht-paragraph-color:var(--utrecht-alert-color);display:flex;flex-direction:column;row-gap:var(--utrecht-alert-message-row-gap)}.utrecht-alert--info{--_utrecht-alert-icon-color:var(--utrecht-alert-icon-info-color);--_utrecht-alert-background-color:var(--utrecht-alert-info-background-color);--_utrecht-alert-border-color:var(--utrecht-alert-info-border-color);--_utrecht-alert-border-width:var(--utrecht-alert-info-border-width);--_utrecht-alert-color:var(--utrecht-alert-info-color)}.utrecht-alert--ok{--_utrecht-alert-icon-color:var(--utrecht-alert-icon-ok-color);--_utrecht-alert-background-color:var(--utrecht-alert-ok-background-color);--_utrecht-alert-border-color:var(--utrecht-alert-ok-border-color);--_utrecht-alert-border-width:var(--utrecht-alert-ok-border-width);--_utrecht-alert-color:var(--utrecht-alert-ok-color)}.utrecht-alert--warning{--_utrecht-alert-icon-color:var(--utrecht-alert-icon-warning-color);--_utrecht-alert-background-color:var(--utrecht-alert-warning-background-color);--_utrecht-alert-border-color:var(--utrecht-alert-warning-border-color);--_utrecht-alert-border-width:var(--utrecht-alert-warning-border-width);--_utrecht-alert-color:var(--utrecht-alert-warning-color)}.utrecht-alert--error{--_utrecht-alert-icon-color:var(--utrecht-alert-icon-error-color);--_utrecht-alert-background-color:var(--utrecht-alert-error-background-color);--_utrecht-alert-border-color:var(--utrecht-alert-error-border-color);--_utrecht-alert-border-width:var(--utrecht-alert-error-border-width);--_utrecht-alert-color:var(--utrecht-alert-error-color)}:host{display:block}:host([hidden]){display:none !important}";
|
|
5
5
|
const UtrechtAlertStyle0 = alertCss;
|
|
6
6
|
|
|
7
7
|
const enumGuard = (values) => (x) => values.includes(x);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"utrecht-alert.js","mappings":";;;AAAA,MAAM,QAAQ,GAAG,
|
|
1
|
+
{"file":"utrecht-alert.js","mappings":";;;AAAA,MAAM,QAAQ,GAAG,25FAA25F,CAAC;AAC76F,2BAAe,QAAQ;;ACQvB,MAAM,SAAS,GACb,CAAoB,MAAoB,KACxC,CAAC,CAAU,KACT,MAAM,CAAC,QAAQ,CAAC,CAAM,CAAC,CAAC;AAE5B,MAAM,KAAK,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAU,CAAC;AAE3C,MAAM,WAAW,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC;AAErC,MAAM,KAAK,GAAG,CAAC,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,CAAU,CAAC;AAE1D,MAAM,WAAW,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC;AAErC,MAAM,UAAU,GAAiC;IAC/C,IAAI,EAAE,QAAQ;IACd,EAAE,EAAE,QAAQ;IACZ,OAAO,EAAE,OAAO;IAChB,KAAK,EAAE,OAAO;CACf,CAAC;MAOW,KAAK;;;;;;;IAGhB,MAAM;QACJ,MAAM,YAAY,GAAG,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC;QACjE,MAAM,YAAY,GAAG,WAAW,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,GAAG,UAAU,CAAC,YAAY,CAAC,GAAG,QAAQ,CAAC;QACjG,QACE,4DAAK,KAAK,EAAE,IAAI,CAAC,eAAe,EAAE,kBAAkB,YAAY,EAAE,CAAC,IACjE,4DAAK,KAAK,EAAC,qBAAqB,IAC9B,6DAAM,IAAI,EAAC,MAAM,GAAQ,CACrB,EACN,4DAAK,KAAK,EAAC,wBAAwB,IACjC,4DAAK,KAAK,EAAC,wBAAwB,EAAC,IAAI,EAAE,YAAY,IACpD,8DAAa,CACT,CACF,CACF,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/alert.scss?tag=utrecht-alert&encapsulation=shadow","src/components/alert.tsx"],"sourcesContent":["/**\n * @license EUPL-1.2\n * Copyright (c) 2020-2024 Frameless B.V.\n * Copyright (c) 2021-2024 Gemeente Utrecht\n */\n\n@use \"~@utrecht/alert-css/src\" as *;\n\n:host {\n display: block;\n}\n\n:host([hidden]) {\n display: none !important;\n}\n","/**\n * @license EUPL-1.2\n * Copyright (c) 2020-2024 Frameless B.V.\n * Copyright (c) 2021-2024 Gemeente Utrecht\n */\n\nimport { Component, h, Prop } from '@stencil/core';\nimport clsx from 'clsx';\n\nconst enumGuard =\n <T extends unknown>(values: readonly T[]) =>\n (x: unknown): x is T =>\n values.includes(x as T);\n\nconst ROLES = ['status', 'alert'] as const;\ntype AlertRole = (typeof ROLES)[number];\nconst isAlertRole = enumGuard(ROLES);\n\nconst TYPES = ['error', 'warning', 'info', 'ok'] as const;\ntype AlertType = (typeof TYPES)[number];\nconst isAlertType = enumGuard(TYPES);\n\nconst typeToRole: Record<AlertType, AlertRole> = {\n info: 'status',\n ok: 'status',\n warning: 'alert',\n error: 'alert',\n};\n\n@Component({\n tag: 'utrecht-alert',\n styleUrl: 'alert.scss',\n shadow: true,\n})\nexport class Alert {\n @Prop() type: string;\n\n render() {\n const computedType = isAlertType(this.type) ? this.type : 'info';\n const computedRole = isAlertRole(typeToRole[computedType]) ? typeToRole[computedType] : 'status';\n return (\n <div class={clsx('utrecht-alert', `utrecht-alert--${computedType}`)}>\n <div class=\"utrecht-alert__icon\">\n <slot name=\"icon\"></slot>\n </div>\n <div class=\"utrecht-alert__content\">\n <div class=\"utrecht-alert__message\" role={computedRole}>\n <slot></slot>\n </div>\n </div>\n </div>\n );\n }\n}\n"],"version":3}
|