@utrecht/web-component-library-stencil 1.0.0-alpha.214 → 1.0.0-alpha.217
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/loader.cjs.js +1 -1
- package/dist/cjs/utrecht-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/utrecht-button_2.cjs.entry.js +3 -3
- package/dist/cjs/utrecht-contact-card-template.cjs.entry.js +1 -1
- package/dist/cjs/utrecht-digid-button.cjs.entry.js +1 -1
- package/dist/cjs/utrecht-html-content.cjs.entry.js +1 -1
- package/dist/cjs/utrecht.cjs.js +1 -1
- package/dist/collection/breadcrumb/web-component/index.css +1 -0
- package/dist/collection/button/css/stories/02-appearance.js +57 -0
- package/dist/collection/button/css/template.js +82 -0
- package/dist/collection/button/{html.js → html/template.js} +24 -0
- package/dist/collection/button/web-component/index.css +172 -0
- package/dist/collection/button/{stencil.js → web-component/index.stencil.js} +20 -3
- package/dist/collection/button/web-component/template.js +44 -0
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/digid-button/css/template.js +1 -1
- package/dist/collection/digid-button/web-component/index.stencil.js +1 -1
- package/dist/collection/html-content/web-component/index.css +92 -4
- package/dist/collection/logo-button/css/template.js +1 -1
- package/dist/collection/search-bar/css/template.js +1 -1
- package/dist/collection/templates/contact-card-template/web-component/index.css +1 -0
- package/dist/custom-elements/index.js +19 -19
- package/dist/esm/loader.js +1 -1
- package/dist/esm/utrecht-breadcrumb.entry.js +1 -1
- package/dist/esm/utrecht-button_2.entry.js +3 -3
- package/dist/esm/utrecht-contact-card-template.entry.js +1 -1
- package/dist/esm/utrecht-digid-button.entry.js +1 -1
- package/dist/esm/utrecht-html-content.entry.js +1 -1
- package/dist/esm/utrecht.js +1 -1
- package/dist/types/button/{stencil.d.ts → web-component/index.stencil.d.ts} +2 -1
- package/dist/types/components.d.ts +2 -0
- package/dist/utrecht/p-2f6b12df.entry.js +1 -0
- package/dist/utrecht/p-48781e7c.entry.js +1 -0
- package/dist/utrecht/{p-52b840b4.entry.js → p-6964ffc4.entry.js} +1 -1
- package/dist/utrecht/p-a315cd84.entry.js +1 -0
- package/dist/utrecht/p-c91a33c5.entry.js +1 -0
- package/dist/utrecht/utrecht.esm.js +1 -1
- package/package.json +2 -2
- package/dist/collection/button/bem.js +0 -37
- package/dist/collection/button/stencil.css +0 -106
- package/dist/utrecht/p-494a2de2.entry.js +0 -1
- package/dist/utrecht/p-8410a51f.entry.js +0 -1
- package/dist/utrecht/p-aa7f0306.entry.js +0 -1
- package/dist/utrecht/p-ce352a8d.entry.js +0 -1
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license EUPL-1.2
|
|
3
|
+
* Copyright (c) 2021 Robbert Broersma
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @license EUPL-1.2
|
|
7
|
+
* Copyright (c) 2021 The Knights Who Say NIH! B.V.
|
|
8
|
+
* Copyright (c) 2021 Gemeente Utrecht
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* @license EUPL-1.2
|
|
12
|
+
* Copyright (c) 2021 Gemeente Utrecht
|
|
13
|
+
* Copyright (c) 2021 Robbert Broersma
|
|
14
|
+
*/
|
|
15
|
+
/* stylelint-disable-next-line block-no-empty */
|
|
16
|
+
.utrecht-button {
|
|
17
|
+
background-color: var(--utrecht-button-background-color);
|
|
18
|
+
border-color: var(--utrecht-button-border-color, transparent);
|
|
19
|
+
border-bottom-color: var(--utrecht-button-border-bottom-color, var(--utrecht-button-border-color, transparent));
|
|
20
|
+
border-radius: var(--utrecht-button-border-radius);
|
|
21
|
+
border-style: solid;
|
|
22
|
+
border-width: var(--utrecht-button-border-width, 0);
|
|
23
|
+
border-bottom-width: var(--utrecht-button-border-bottom-width, var(--utrecht-button-border-width, 0));
|
|
24
|
+
color: var(--utrecht-button-color);
|
|
25
|
+
font-family: var(--utrecht-button-font-family, var(--utrecht-document-font-family));
|
|
26
|
+
font-size: var(--utrecht-button-font-size, var(--utrecht-document-font-family));
|
|
27
|
+
font-weight: var(--utrecht-button-font-weight);
|
|
28
|
+
inline-size: var(--utrecht-button-inline-size, auto);
|
|
29
|
+
letter-spacing: var(--utrecht-button-letter-spacing);
|
|
30
|
+
line-height: var(--utrecht-button-line-height);
|
|
31
|
+
min-block-size: var(--utrecht-button-min-block-size, 44px);
|
|
32
|
+
min-inline-size: var(--utrecht-button-min-inline-size, 44px);
|
|
33
|
+
padding-block-end: var(--utrecht-button-padding-block-end);
|
|
34
|
+
padding-block-start: var(--utrecht-button-padding-block-start);
|
|
35
|
+
padding-inline-end: var(--utrecht-button-padding-inline-end);
|
|
36
|
+
padding-inline-start: var(--utrecht-button-padding-inline-start);
|
|
37
|
+
text-transform: var(--utrecht-button-text-transform);
|
|
38
|
+
user-select: none;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.utrecht-button--distanced {
|
|
42
|
+
margin-block-end: var(--utrecht-button-margin-block-end);
|
|
43
|
+
margin-block-start: var(--utrecht-button-margin-block-start);
|
|
44
|
+
margin-inline-end: var(--utrecht-button-margin-inline-end);
|
|
45
|
+
margin-inline-start: var(--utrecht-button-margin-inline-start);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.utrecht-button--submit {
|
|
49
|
+
/* lower priority specificty than busy and disabled cursor */
|
|
50
|
+
cursor: var(--utrecht-action-submit-cursor);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.utrecht-button--busy {
|
|
54
|
+
cursor: var(--utrecht-action-busy-cursor);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.utrecht-button:disabled,
|
|
58
|
+
.utrecht-button--disabled {
|
|
59
|
+
background-color: var(--utrecht-button-disabled-background-color, var(--utrecht-button-background-color));
|
|
60
|
+
border-color: var(--utrecht-button-disabled-border-color, var(--utrecht-button-border-color));
|
|
61
|
+
color: var(--utrecht-button-disabled-color, var(--utrecht-button-color));
|
|
62
|
+
cursor: var(--utrecht-action-disabled-cursor);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.utrecht-button:active:not(:disabled):not([aria-disabled=true]):not(.utrecht-button--disabled),
|
|
66
|
+
.utrecht-button--active {
|
|
67
|
+
background-color: var(--utrecht-button-active-background-color, var(--utrecht-button-background-color));
|
|
68
|
+
border-color: var(--utrecht-button-active-border-color, var(--utrecht-button-border-color));
|
|
69
|
+
color: var(--utrecht-button-active-color, var(--utrecht-button-color));
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.utrecht-button--focus-visible, .utrecht-button:focus:not(:disabled):not([aria-disabled=true]):not(.utrecht-button--disabled) {
|
|
73
|
+
/* the pseudo-class for `:focus-visible` is implemented via the mixin */
|
|
74
|
+
box-shadow: 0 0 0 var(--utrecht-focus-box-shadow-spread-radius, 0) var(--utrecht-focus-box-shadow-color, transparent);
|
|
75
|
+
outline-color: var(--utrecht-focus-outline-color, transparent);
|
|
76
|
+
outline-offset: var(--utrecht-focus-outline-offset, 0);
|
|
77
|
+
outline-style: var(--utrecht-focus-outline-style, solid);
|
|
78
|
+
outline-width: var(--utrecht-focus-outline-width, 0);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.utrecht-button--focus, .utrecht-button:focus:not(:disabled):not([aria-disabled=true]):not(.utrecht-button--disabled) {
|
|
82
|
+
background-color: var(--utrecht-button-focus-background-color, var(--utrecht-button-background-color));
|
|
83
|
+
border-color: var(--utrecht-button-focus-border-color, var(--utrecht-button-border-color));
|
|
84
|
+
color: var(--utrecht-button-focus-color, var(--utrecht-button-color));
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* override the `:focus` selector above */
|
|
88
|
+
/* stylelint-disable-next-line no-descending-specificity */
|
|
89
|
+
.utrecht-button:focus:not(:focus-visible) {
|
|
90
|
+
/* undo focus ring */
|
|
91
|
+
box-shadow: none;
|
|
92
|
+
outline-style: none;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.utrecht-button--hover:not(:disabled),
|
|
96
|
+
.utrecht-button:hover:not(:disabled):not([aria-disabled=true]):not(.utrecht-button--disabled) {
|
|
97
|
+
background-color: var(--utrecht-button-hover-background-color, var(--utrecht-button-background-color));
|
|
98
|
+
border-color: var(--utrecht-button-hover-border-color, var(--utrecht-button-border-color));
|
|
99
|
+
color: var(--utrecht-button-hover-color, var(--utrecht-button-color));
|
|
100
|
+
transform: scale(var(--utrecht-button-focus-transform-scale, 1));
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.utrecht-button--primary-action {
|
|
104
|
+
background-color: var(--utrecht-button-primary-action-background-color, var(--utrecht-button-background-color));
|
|
105
|
+
border-color: var(--utrecht-button-primary-action-border-color, var(--utrecht-button-border-color));
|
|
106
|
+
border-width: var(--utrecht-button-primary-action-border-width, var(--utrecht-button-border-width));
|
|
107
|
+
color: var(--utrecht-button-primary-action-color, var(--utrecht-button-color));
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.utrecht-button--primary-action.utrecht-button--hover:not(:disabled),
|
|
111
|
+
.utrecht-button--primary-action.utrecht-button:hover:not(:disabled):not([aria-disabled=true]):not(.utrecht-button--disabled) {
|
|
112
|
+
background-color: var(--utrecht-button-primary-action-hover-background-color, var(--utrecht-button-primary-action-background-color, var(--utrecht-button-hover-background-color, var(--utrecht-button-background-color))));
|
|
113
|
+
border-color: var(--utrecht-button-primary-action-hover-border-color, var(--utrecht-button-primary-action-border-color, var(--utrecht-button-hover-border-color, var(--utrecht-button-border-color))));
|
|
114
|
+
color: var(--utrecht-button-primary-action-hover-color, var(--utrecht-button-primary-action-color, var(--utrecht-button-hover-color, var(--utrecht-button-color))));
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.utrecht-button--primary-action.utrecht-button:disabled,
|
|
118
|
+
.utrecht-button--primary-action.utrecht-button--disabled {
|
|
119
|
+
background-color: var(--utrecht-button-primary-action-disabled-background-color, var(--utrecht-button-disabled-background-color, var(--utrecht-button-background-color)));
|
|
120
|
+
border-color: var(--utrecht-button-primary-action-disabled-border-color, var(--utrecht-button-disabled-border-color, var(--utrecht-button-border-color)));
|
|
121
|
+
color: var(--utrecht-button-primary-action-disabled-color, var(--utrecht-button-disabled-color, var(--utrecht-button-color)));
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.utrecht-button--secondary-action {
|
|
125
|
+
background-color: var(--utrecht-button-secondary-action-background-color, var(--utrecht-button-background-color));
|
|
126
|
+
border-color: var(--utrecht-button-secondary-action-border-color, var(--utrecht-button-border-color));
|
|
127
|
+
border-width: var(--utrecht-button-secondary-action-border-width, var(--utrecht-button-border-width));
|
|
128
|
+
color: var(--utrecht-button-secondary-action-color, var(--utrecht-button-color));
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.utrecht-button--secondary-action.utrecht-button--hover:not(:disabled),
|
|
132
|
+
.utrecht-button--secondary-action.utrecht-button:hover:not(:disabled):not([aria-disabled=true]):not(.utrecht-button--disabled) {
|
|
133
|
+
background-color: var(--utrecht-button-secondary-action-hover-background-color, var(--utrecht-button-secondary-action-background-color, var(--utrecht-button-hover-background-color, var(--utrecht-button-background-color))));
|
|
134
|
+
border-color: var(--utrecht-button-secondary-action-hover-border-color, var(--utrecht-button-secondary-action-border-color, var(--utrecht-button-hover-border-color, var(--utrecht-button-border-color))));
|
|
135
|
+
color: var(--utrecht-button-secondary-action-hover-color, var(--utrecht-button-secondary-action-color, var(--utrecht-button-hover-color, var(--utrecht-button-color))));
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.utrecht-button--secondary-action.utrecht-button:disabled,
|
|
139
|
+
.utrecht-button--secondary-action.utrecht-button--disabled {
|
|
140
|
+
background-color: var(--utrecht-button-secondary-action-disabled-background-color, var(--utrecht-button-disabled-background-color, var(--utrecht-button-background-color)));
|
|
141
|
+
border-color: var(--utrecht-button-secondary-action-disabled-border-color, var(--utrecht-button-disabled-border-color, var(--utrecht-button-border-color)));
|
|
142
|
+
color: var(--utrecht-button-secondary-action-disabled-color, var(--utrecht-button-disabled-color, var(--utrecht-button-color)));
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.utrecht-button--subtle {
|
|
146
|
+
background-color: var(--utrecht-button-subtle-background-color, var(--utrecht-button-background-color));
|
|
147
|
+
border-color: var(--utrecht-button-subtle-border-color, var(--utrecht-button-border-color));
|
|
148
|
+
border-width: var(--utrecht-button-subtle-border-width, var(--utrecht-button-border-width));
|
|
149
|
+
color: var(--utrecht-button-subtle-color, var(--utrecht-button-color));
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.utrecht-button--subtle.utrecht-button--hover:not(:disabled),
|
|
153
|
+
.utrecht-button--subtle.utrecht-button:hover:not(:disabled):not([aria-disabled=true]):not(.utrecht-button--disabled) {
|
|
154
|
+
background-color: var(--utrecht-button-subtle-hover-background-color, var(--utrecht-button-subtle-background-color, var(--utrecht-button-hover-background-color, var(--utrecht-button-background-color))));
|
|
155
|
+
border-color: var(--utrecht-button-subtle-hover-border-color, var(--utrecht-button-subtle-border-color, var(--utrecht-button-hover-border-color, var(--utrecht-button-border-color))));
|
|
156
|
+
color: var(--utrecht-button-subtle-hover-color, var(--utrecht-button-subtle-color, var(--utrecht-button-hover-color, var(--utrecht-button-color))));
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.utrecht-button--subtle.utrecht-button:disabled,
|
|
160
|
+
.utrecht-button--subtle.utrecht-button--disabled {
|
|
161
|
+
background-color: var(--utrecht-button-subtle-disabled-background-color, var(--utrecht-button-disabled-background-color, var(--utrecht-button-background-color)));
|
|
162
|
+
border-color: var(--utrecht-button-subtle-disabled-border-color, var(--utrecht-button-disabled-border-color, var(--utrecht-button-border-color)));
|
|
163
|
+
color: var(--utrecht-button-subtle-disabled-color, var(--utrecht-button-disabled-color, var(--utrecht-button-color)));
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
:host {
|
|
167
|
+
display: inline-block;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
:host([hidden]) {
|
|
171
|
+
display: none !important;
|
|
172
|
+
}
|
|
@@ -24,18 +24,35 @@ export class Button {
|
|
|
24
24
|
handleSubmit();
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
|
-
return (h("button", { class: clsx('utrecht-button', this.busy && 'utrecht-button--busy', this.disabled && 'utrecht-button--disabled', this.type === 'submit' && 'utrecht-button--submit'), "aria-busy": this.busy ? 'true' : null, disabled: this.disabled, type: this.type || 'button', onClick: handleClick },
|
|
27
|
+
return (h("button", { class: clsx('utrecht-button', this.busy && 'utrecht-button--busy', this.disabled && 'utrecht-button--disabled', this.type === 'submit' && 'utrecht-button--submit', this.appearance === 'primary-action-button' && 'utrecht-button--primary-action', this.appearance === 'secondary-action-button' && 'utrecht-button--secondary-action', this.appearance === 'subtle-button' && 'utrecht-button--subtle'), "aria-busy": this.busy ? 'true' : null, disabled: this.disabled, type: this.type || 'button', onClick: handleClick },
|
|
28
28
|
h("slot", null)));
|
|
29
29
|
}
|
|
30
30
|
static get is() { return "utrecht-button"; }
|
|
31
31
|
static get encapsulation() { return "shadow"; }
|
|
32
32
|
static get originalStyleUrls() { return {
|
|
33
|
-
"$": ["
|
|
33
|
+
"$": ["index.scss"]
|
|
34
34
|
}; }
|
|
35
35
|
static get styleUrls() { return {
|
|
36
|
-
"$": ["
|
|
36
|
+
"$": ["index.css"]
|
|
37
37
|
}; }
|
|
38
38
|
static get properties() { return {
|
|
39
|
+
"appearance": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"mutable": false,
|
|
42
|
+
"complexType": {
|
|
43
|
+
"original": "string",
|
|
44
|
+
"resolved": "string",
|
|
45
|
+
"references": {}
|
|
46
|
+
},
|
|
47
|
+
"required": false,
|
|
48
|
+
"optional": false,
|
|
49
|
+
"docs": {
|
|
50
|
+
"tags": [],
|
|
51
|
+
"text": ""
|
|
52
|
+
},
|
|
53
|
+
"attribute": "appearance",
|
|
54
|
+
"reflect": false
|
|
55
|
+
},
|
|
39
56
|
"busy": {
|
|
40
57
|
"type": "boolean",
|
|
41
58
|
"mutable": false,
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license EUPL-1.2
|
|
3
|
+
* Copyright (c) 2021 Gemeente Utrecht
|
|
4
|
+
* Copyright (c) 2021 Robbert Broersma
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export const defaultArgs = {
|
|
8
|
+
busy: false,
|
|
9
|
+
disabled: false,
|
|
10
|
+
textContent: '',
|
|
11
|
+
type: '',
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export const argTypes = {
|
|
15
|
+
appearance: {
|
|
16
|
+
description: 'Appearance',
|
|
17
|
+
control: { type: 'select' },
|
|
18
|
+
options: ['', 'button', 'primary-action-button', 'secondary-action-button', 'subtle-button'],
|
|
19
|
+
},
|
|
20
|
+
busy: {
|
|
21
|
+
description: 'Busy',
|
|
22
|
+
control: 'boolean',
|
|
23
|
+
},
|
|
24
|
+
disabled: {
|
|
25
|
+
description: 'Disabled',
|
|
26
|
+
control: 'boolean',
|
|
27
|
+
},
|
|
28
|
+
textContent: {
|
|
29
|
+
description: 'Button text',
|
|
30
|
+
control: 'text',
|
|
31
|
+
},
|
|
32
|
+
type: {
|
|
33
|
+
description: 'Type',
|
|
34
|
+
type: {
|
|
35
|
+
name: 'enum',
|
|
36
|
+
},
|
|
37
|
+
options: ['', 'button', 'reset', 'submit'],
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export const Button = ({ appearance = '', busy = false, disabled = false, textContent = '', type = '' }) =>
|
|
42
|
+
`<utrecht-button${appearance ? ` appearance="${appearance}"` : ''}${busy ? ' busy="true"' : ''}${
|
|
43
|
+
disabled ? ' disabled' : ''
|
|
44
|
+
}${type ? ` type="${type}"` : ''}>${textContent}</utrecht-button>`;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"./badge-data/web-component/index.stencil.js",
|
|
7
7
|
"./badge-status/web-component/index.stencil.js",
|
|
8
8
|
"./breadcrumb/web-component/index.stencil.js",
|
|
9
|
-
"./button/stencil.js",
|
|
9
|
+
"./button/web-component/index.stencil.js",
|
|
10
10
|
"./checkbox/web-component/index.stencil.js",
|
|
11
11
|
"./custom-checkbox/web-component/index.stencil.js",
|
|
12
12
|
"./digid-button/web-component/index.stencil.js",
|
|
@@ -10,7 +10,7 @@ export const defaultArgs = {
|
|
|
10
10
|
|
|
11
11
|
export const DigidButton = ({ label = '', textContent = '' }) => `<div class="utrecht-digid-button">
|
|
12
12
|
<utrecht-digid-logo class="utrecht-digid-button__logo"></utrecht-digid-logo>
|
|
13
|
-
<button class="utrecht-digid-button__button utrecht-button" type="button"${
|
|
13
|
+
<button class="utrecht-digid-button__button utrecht-button utrecht-button--primary-action" type="button"${
|
|
14
14
|
label ? ` aria-label="${label}"` : ''
|
|
15
15
|
}>${textContent}</button>
|
|
16
16
|
</div>`;
|
|
@@ -8,7 +8,7 @@ export class DigidButton {
|
|
|
8
8
|
render() {
|
|
9
9
|
return (h("div", { class: "utrecht-digid-button" },
|
|
10
10
|
h("utrecht-digid-logo", { class: "utrecht-digid-button__logo" }),
|
|
11
|
-
h("utrecht-button", { class: "utrecht-digid-button__button", type: this.type || null },
|
|
11
|
+
h("utrecht-button", { appearance: "primary-action-button", class: "utrecht-digid-button__button", type: this.type || null },
|
|
12
12
|
h("slot", null))));
|
|
13
13
|
}
|
|
14
14
|
static get is() { return "utrecht-digid-button"; }
|
|
@@ -71,19 +71,22 @@
|
|
|
71
71
|
.utrecht-html input[type=reset i],
|
|
72
72
|
.utrecht-html input[type=submit i],
|
|
73
73
|
.utrecht-html button {
|
|
74
|
-
background-color: var(--utrecht-button-
|
|
74
|
+
background-color: var(--utrecht-button-background-color);
|
|
75
75
|
border-color: var(--utrecht-button-border-color, transparent);
|
|
76
|
+
border-bottom-color: var(--utrecht-button-border-bottom-color, var(--utrecht-button-border-color, transparent));
|
|
76
77
|
border-radius: var(--utrecht-button-border-radius);
|
|
77
78
|
border-style: solid;
|
|
78
79
|
border-width: var(--utrecht-button-border-width, 0);
|
|
79
|
-
|
|
80
|
+
border-bottom-width: var(--utrecht-button-border-bottom-width, var(--utrecht-button-border-width, 0));
|
|
81
|
+
color: var(--utrecht-button-color);
|
|
80
82
|
font-family: var(--utrecht-button-font-family, var(--utrecht-document-font-family));
|
|
81
83
|
font-size: var(--utrecht-button-font-size, var(--utrecht-document-font-family));
|
|
82
84
|
font-weight: var(--utrecht-button-font-weight);
|
|
83
85
|
inline-size: var(--utrecht-button-inline-size, auto);
|
|
84
86
|
letter-spacing: var(--utrecht-button-letter-spacing);
|
|
85
|
-
|
|
86
|
-
min-
|
|
87
|
+
line-height: var(--utrecht-button-line-height);
|
|
88
|
+
min-block-size: var(--utrecht-button-min-block-size, 44px);
|
|
89
|
+
min-inline-size: var(--utrecht-button-min-inline-size, 44px);
|
|
87
90
|
padding-block-end: var(--utrecht-button-padding-block-end);
|
|
88
91
|
padding-block-start: var(--utrecht-button-padding-block-start);
|
|
89
92
|
padding-inline-end: var(--utrecht-button-padding-inline-end);
|
|
@@ -179,6 +182,90 @@
|
|
|
179
182
|
transform: scale(var(--utrecht-button-focus-transform-scale, 1));
|
|
180
183
|
}
|
|
181
184
|
|
|
185
|
+
.utrecht-button--primary-action {
|
|
186
|
+
background-color: var(--utrecht-button-primary-action-background-color, var(--utrecht-button-background-color));
|
|
187
|
+
border-color: var(--utrecht-button-primary-action-border-color, var(--utrecht-button-border-color));
|
|
188
|
+
border-width: var(--utrecht-button-primary-action-border-width, var(--utrecht-button-border-width));
|
|
189
|
+
color: var(--utrecht-button-primary-action-color, var(--utrecht-button-color));
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.utrecht-button--primary-action.utrecht-button--hover:not(:disabled), .utrecht-html button.utrecht-button--primary-action:not(:disabled):hover:not([aria-disabled=true]),
|
|
193
|
+
.utrecht-button--primary-action.utrecht-button:hover:not(:disabled):not([aria-disabled=true]):not(.utrecht-button--disabled),
|
|
194
|
+
.utrecht-html input.utrecht-button--primary-action[type=button i]:hover:not(:disabled):not([aria-disabled=true]):not(.utrecht-button--disabled),
|
|
195
|
+
.utrecht-html input.utrecht-button--primary-action[type=reset i]:hover:not(:disabled):not([aria-disabled=true]):not(.utrecht-button--disabled),
|
|
196
|
+
.utrecht-html input.utrecht-button--primary-action[type=submit i]:hover:not(:disabled):not([aria-disabled=true]):not(.utrecht-button--disabled) {
|
|
197
|
+
background-color: var(--utrecht-button-primary-action-hover-background-color, var(--utrecht-button-primary-action-background-color, var(--utrecht-button-hover-background-color, var(--utrecht-button-background-color))));
|
|
198
|
+
border-color: var(--utrecht-button-primary-action-hover-border-color, var(--utrecht-button-primary-action-border-color, var(--utrecht-button-hover-border-color, var(--utrecht-button-border-color))));
|
|
199
|
+
color: var(--utrecht-button-primary-action-hover-color, var(--utrecht-button-primary-action-color, var(--utrecht-button-hover-color, var(--utrecht-button-color))));
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.utrecht-button--primary-action.utrecht-button:disabled, .utrecht-html input.utrecht-button--primary-action[type=button i]:disabled,
|
|
203
|
+
.utrecht-html input.utrecht-button--primary-action[type=reset i]:disabled,
|
|
204
|
+
.utrecht-html input.utrecht-button--primary-action[type=submit i]:disabled,
|
|
205
|
+
.utrecht-html button.utrecht-button--primary-action:disabled,
|
|
206
|
+
.utrecht-button--primary-action.utrecht-button--disabled,
|
|
207
|
+
.utrecht-html button.utrecht-button--primary-action[aria-disabled=true] {
|
|
208
|
+
background-color: var(--utrecht-button-primary-action-disabled-background-color, var(--utrecht-button-disabled-background-color, var(--utrecht-button-background-color)));
|
|
209
|
+
border-color: var(--utrecht-button-primary-action-disabled-border-color, var(--utrecht-button-disabled-border-color, var(--utrecht-button-border-color)));
|
|
210
|
+
color: var(--utrecht-button-primary-action-disabled-color, var(--utrecht-button-disabled-color, var(--utrecht-button-color)));
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.utrecht-button--secondary-action {
|
|
214
|
+
background-color: var(--utrecht-button-secondary-action-background-color, var(--utrecht-button-background-color));
|
|
215
|
+
border-color: var(--utrecht-button-secondary-action-border-color, var(--utrecht-button-border-color));
|
|
216
|
+
border-width: var(--utrecht-button-secondary-action-border-width, var(--utrecht-button-border-width));
|
|
217
|
+
color: var(--utrecht-button-secondary-action-color, var(--utrecht-button-color));
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.utrecht-button--secondary-action.utrecht-button--hover:not(:disabled), .utrecht-html button.utrecht-button--secondary-action:not(:disabled):hover:not([aria-disabled=true]),
|
|
221
|
+
.utrecht-button--secondary-action.utrecht-button:hover:not(:disabled):not([aria-disabled=true]):not(.utrecht-button--disabled),
|
|
222
|
+
.utrecht-html input.utrecht-button--secondary-action[type=button i]:hover:not(:disabled):not([aria-disabled=true]):not(.utrecht-button--disabled),
|
|
223
|
+
.utrecht-html input.utrecht-button--secondary-action[type=reset i]:hover:not(:disabled):not([aria-disabled=true]):not(.utrecht-button--disabled),
|
|
224
|
+
.utrecht-html input.utrecht-button--secondary-action[type=submit i]:hover:not(:disabled):not([aria-disabled=true]):not(.utrecht-button--disabled) {
|
|
225
|
+
background-color: var(--utrecht-button-secondary-action-hover-background-color, var(--utrecht-button-secondary-action-background-color, var(--utrecht-button-hover-background-color, var(--utrecht-button-background-color))));
|
|
226
|
+
border-color: var(--utrecht-button-secondary-action-hover-border-color, var(--utrecht-button-secondary-action-border-color, var(--utrecht-button-hover-border-color, var(--utrecht-button-border-color))));
|
|
227
|
+
color: var(--utrecht-button-secondary-action-hover-color, var(--utrecht-button-secondary-action-color, var(--utrecht-button-hover-color, var(--utrecht-button-color))));
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.utrecht-button--secondary-action.utrecht-button:disabled, .utrecht-html input.utrecht-button--secondary-action[type=button i]:disabled,
|
|
231
|
+
.utrecht-html input.utrecht-button--secondary-action[type=reset i]:disabled,
|
|
232
|
+
.utrecht-html input.utrecht-button--secondary-action[type=submit i]:disabled,
|
|
233
|
+
.utrecht-html button.utrecht-button--secondary-action:disabled,
|
|
234
|
+
.utrecht-button--secondary-action.utrecht-button--disabled,
|
|
235
|
+
.utrecht-html button.utrecht-button--secondary-action[aria-disabled=true] {
|
|
236
|
+
background-color: var(--utrecht-button-secondary-action-disabled-background-color, var(--utrecht-button-disabled-background-color, var(--utrecht-button-background-color)));
|
|
237
|
+
border-color: var(--utrecht-button-secondary-action-disabled-border-color, var(--utrecht-button-disabled-border-color, var(--utrecht-button-border-color)));
|
|
238
|
+
color: var(--utrecht-button-secondary-action-disabled-color, var(--utrecht-button-disabled-color, var(--utrecht-button-color)));
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.utrecht-button--subtle {
|
|
242
|
+
background-color: var(--utrecht-button-subtle-background-color, var(--utrecht-button-background-color));
|
|
243
|
+
border-color: var(--utrecht-button-subtle-border-color, var(--utrecht-button-border-color));
|
|
244
|
+
border-width: var(--utrecht-button-subtle-border-width, var(--utrecht-button-border-width));
|
|
245
|
+
color: var(--utrecht-button-subtle-color, var(--utrecht-button-color));
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.utrecht-button--subtle.utrecht-button--hover:not(:disabled), .utrecht-html button.utrecht-button--subtle:not(:disabled):hover:not([aria-disabled=true]),
|
|
249
|
+
.utrecht-button--subtle.utrecht-button:hover:not(:disabled):not([aria-disabled=true]):not(.utrecht-button--disabled),
|
|
250
|
+
.utrecht-html input.utrecht-button--subtle[type=button i]:hover:not(:disabled):not([aria-disabled=true]):not(.utrecht-button--disabled),
|
|
251
|
+
.utrecht-html input.utrecht-button--subtle[type=reset i]:hover:not(:disabled):not([aria-disabled=true]):not(.utrecht-button--disabled),
|
|
252
|
+
.utrecht-html input.utrecht-button--subtle[type=submit i]:hover:not(:disabled):not([aria-disabled=true]):not(.utrecht-button--disabled) {
|
|
253
|
+
background-color: var(--utrecht-button-subtle-hover-background-color, var(--utrecht-button-subtle-background-color, var(--utrecht-button-hover-background-color, var(--utrecht-button-background-color))));
|
|
254
|
+
border-color: var(--utrecht-button-subtle-hover-border-color, var(--utrecht-button-subtle-border-color, var(--utrecht-button-hover-border-color, var(--utrecht-button-border-color))));
|
|
255
|
+
color: var(--utrecht-button-subtle-hover-color, var(--utrecht-button-subtle-color, var(--utrecht-button-hover-color, var(--utrecht-button-color))));
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.utrecht-button--subtle.utrecht-button:disabled, .utrecht-html input.utrecht-button--subtle[type=button i]:disabled,
|
|
259
|
+
.utrecht-html input.utrecht-button--subtle[type=reset i]:disabled,
|
|
260
|
+
.utrecht-html input.utrecht-button--subtle[type=submit i]:disabled,
|
|
261
|
+
.utrecht-html button.utrecht-button--subtle:disabled,
|
|
262
|
+
.utrecht-button--subtle.utrecht-button--disabled,
|
|
263
|
+
.utrecht-html button.utrecht-button--subtle[aria-disabled=true] {
|
|
264
|
+
background-color: var(--utrecht-button-subtle-disabled-background-color, var(--utrecht-button-disabled-background-color, var(--utrecht-button-background-color)));
|
|
265
|
+
border-color: var(--utrecht-button-subtle-disabled-border-color, var(--utrecht-button-disabled-border-color, var(--utrecht-button-border-color)));
|
|
266
|
+
color: var(--utrecht-button-subtle-disabled-color, var(--utrecht-button-disabled-color, var(--utrecht-button-color)));
|
|
267
|
+
}
|
|
268
|
+
|
|
182
269
|
/* override the `:focus` selector above */
|
|
183
270
|
/* stylelint-disable-next-line no-descending-specificity */
|
|
184
271
|
/**
|
|
@@ -596,6 +683,7 @@ however browsers don't seem to have implemented great looking supixel tweening y
|
|
|
596
683
|
}
|
|
597
684
|
|
|
598
685
|
.utrecht-link--focus, .utrecht-html a:focus, .utrecht-link:focus {
|
|
686
|
+
background-color: var(--utrecht-link-focus-background-color, transparent);
|
|
599
687
|
color: var(--utrecht-link-focus-color, var(--utrecht-link-color));
|
|
600
688
|
text-decoration: var(--utrecht-link-focus-text-decoration, var(--utrecht-link-text-decoration, underline));
|
|
601
689
|
text-decoration-skip: none;
|
|
@@ -11,7 +11,7 @@ export const defaultArgs = {
|
|
|
11
11
|
|
|
12
12
|
export const LogoButton = ({ label = '', textContent = '', logo = '' }) => `<div class="utrecht-logo-button">
|
|
13
13
|
<utrecht-${logo}-logo class="utrecht-logo-button__logo"></utrecht-${logo}-logo>
|
|
14
|
-
<button class="utrecht-logo-button__button utrecht-button" type="button"${
|
|
14
|
+
<button class="utrecht-logo-button__button utrecht-button utrecht-button--primary-action" type="button"${
|
|
15
15
|
label ? ` aria-label="${label}"` : ''
|
|
16
16
|
}>${textContent}</button>
|
|
17
17
|
</div>`;
|
|
@@ -11,5 +11,5 @@ export const SearchBar = ({
|
|
|
11
11
|
value,
|
|
12
12
|
}) => `<form class="utrecht-search-bar" role="search" aria-label="${formLabel}">
|
|
13
13
|
<input type="search" class="utrecht-search-bar__input utrecht-textbox utrecht-textbox utrecht-textbox--html-input" name="q" autocomplete="off" spellcheck="false" value="${value}" aria-label="${inputLabel}">
|
|
14
|
-
<button type="submit" value="Zoeken" class="utrecht-search-bar__button utrecht-button">${buttonLabel}</button>
|
|
14
|
+
<button type="submit" value="Zoeken" class="utrecht-search-bar__button utrecht-button utrecht-button--primary-action">${buttonLabel}</button>
|
|
15
15
|
</form>`;
|
|
@@ -107,6 +107,7 @@ however browsers don't seem to have implemented great looking supixel tweening y
|
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
.utrecht-link--focus, .utrecht-link:focus {
|
|
110
|
+
background-color: var(--utrecht-link-focus-background-color, transparent);
|
|
110
111
|
color: var(--utrecht-link-focus-color, var(--utrecht-link-color));
|
|
111
112
|
text-decoration: var(--utrecht-link-focus-text-decoration, var(--utrecht-link-text-decoration, underline));
|
|
112
113
|
text-decoration-skip: none;
|