@utrecht/web-component-library-stencil 1.1.1-alpha.8 → 1.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/utrecht-alert_46.cjs.entry.js +6 -6
- package/dist/cjs/utrecht-alert_46.cjs.entry.js.map +1 -1
- package/dist/cjs/utrecht-breadcrumb-nav.cjs.entry.js +1 -1
- package/dist/cjs/utrecht-breadcrumb-nav.cjs.entry.js.map +1 -1
- package/dist/cjs/utrecht-form-toggle.cjs.entry.js +1 -1
- package/dist/cjs/utrecht-form-toggle.cjs.entry.js.map +1 -1
- 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-textarea.cjs.entry.js +1 -1
- package/dist/cjs/utrecht-textarea.cjs.entry.js.map +1 -1
- package/dist/cjs/utrecht-textbox.cjs.entry.js +1 -1
- package/dist/cjs/utrecht-textbox.cjs.entry.js.map +1 -1
- package/dist/collection/components/badge-counter.css +2 -2
- package/dist/collection/components/breadcrumb-nav.css +11 -12
- package/dist/collection/components/code-block.css +3 -2
- package/dist/collection/components/code.css +2 -1
- package/dist/collection/components/form-field-checkbox.css +1 -1
- package/dist/collection/components/form-field-textarea.css +3 -2
- package/dist/collection/components/form-field-textbox.css +85 -14
- package/dist/collection/components/form-toggle.css +4 -0
- package/dist/collection/components/html-content.css +40 -11
- package/dist/collection/components/textarea.css +2 -1
- package/dist/collection/components/textbox.css +84 -13
- package/dist/components/utrecht-badge-counter.js +1 -1
- package/dist/components/utrecht-badge-counter.js.map +1 -1
- package/dist/components/utrecht-breadcrumb-nav.js +1 -1
- package/dist/components/utrecht-breadcrumb-nav.js.map +1 -1
- package/dist/components/utrecht-code-block.js +1 -1
- package/dist/components/utrecht-code-block.js.map +1 -1
- package/dist/components/utrecht-code.js +1 -1
- package/dist/components/utrecht-code.js.map +1 -1
- package/dist/components/utrecht-form-field-checkbox.js +1 -1
- package/dist/components/utrecht-form-field-checkbox.js.map +1 -1
- package/dist/components/utrecht-form-field-textarea.js +1 -1
- package/dist/components/utrecht-form-field-textarea.js.map +1 -1
- package/dist/components/utrecht-form-field-textbox.js +1 -1
- package/dist/components/utrecht-form-field-textbox.js.map +1 -1
- package/dist/components/utrecht-form-toggle.js +1 -1
- package/dist/components/utrecht-form-toggle.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-textarea.js +1 -1
- package/dist/components/utrecht-textarea.js.map +1 -1
- package/dist/components/utrecht-textbox.js +1 -1
- package/dist/components/utrecht-textbox.js.map +1 -1
- package/dist/esm/utrecht-alert_46.entry.js +6 -6
- package/dist/esm/utrecht-alert_46.entry.js.map +1 -1
- package/dist/esm/utrecht-breadcrumb-nav.entry.js +1 -1
- package/dist/esm/utrecht-breadcrumb-nav.entry.js.map +1 -1
- package/dist/esm/utrecht-form-toggle.entry.js +1 -1
- package/dist/esm/utrecht-form-toggle.entry.js.map +1 -1
- 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-textarea.entry.js +1 -1
- package/dist/esm/utrecht-textarea.entry.js.map +1 -1
- package/dist/esm/utrecht-textbox.entry.js +1 -1
- package/dist/esm/utrecht-textbox.entry.js.map +1 -1
- package/dist/utrecht/p-13ef5daa.entry.js +2 -0
- package/dist/utrecht/{p-5e5531b8.entry.js.map → p-13ef5daa.entry.js.map} +1 -1
- package/dist/utrecht/p-5eb23cc4.entry.js +2 -0
- package/dist/utrecht/{p-061a1ee7.entry.js.map → p-5eb23cc4.entry.js.map} +1 -1
- package/dist/utrecht/p-875e9fcb.entry.js +2 -0
- package/dist/utrecht/{p-2b4835a5.entry.js.map → p-875e9fcb.entry.js.map} +1 -1
- package/dist/utrecht/{p-98916c46.entry.js → p-cf934f95.entry.js} +2 -2
- package/dist/utrecht/{p-98916c46.entry.js.map → p-cf934f95.entry.js.map} +1 -1
- package/dist/utrecht/p-ee79524c.entry.js +2 -0
- package/dist/utrecht/{p-790f0e65.entry.js.map → p-ee79524c.entry.js.map} +1 -1
- package/dist/utrecht/p-efc5ce95.entry.js +2 -0
- package/dist/utrecht/{p-27870586.entry.js.map → p-efc5ce95.entry.js.map} +1 -1
- package/dist/utrecht/utrecht.esm.js +1 -1
- package/package.json +7 -9
- package/LICENSE.txt +0 -287
- package/dist/utrecht/p-061a1ee7.entry.js +0 -2
- package/dist/utrecht/p-27870586.entry.js +0 -2
- package/dist/utrecht/p-2b4835a5.entry.js +0 -2
- package/dist/utrecht/p-5e5531b8.entry.js +0 -2
- package/dist/utrecht/p-790f0e65.entry.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"utrecht-textbox.entry.cjs.js","mappings":";;;;;;;AAAA,MAAM,UAAU,GAAG,
|
|
1
|
+
{"file":"utrecht-textbox.entry.cjs.js","mappings":";;;;;;;AAAA,MAAM,UAAU,GAAG,8xWAA8xW;;MCapyW,OAAO;;;;;;;4BACyD,EAAE;wBAChC,KAAK;uBACN,KAAK;mBAClB,EAAE;mBACF,EAAE;uBACP,EAAE;2BACE,EAAE;wBACoC,KAAK;wBAC5B,KAAK;oBACV,EAAE;qBAClB,EAAE;;IAM1B,MAAM;QACJ,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;QAElH,QACEA,mBACE,KAAK,EAAEC,WAAI,CACT,iBAAiB,EACjB,6BAA6B,EAC7B,QAAQ,IAAI,2BAA2B,EACvC,OAAO,IAAI,0BAA0B,EACrC,QAAQ,IAAI,2BAA2B,CACxC,EACD,IAAI,EAAE,IAAI,IAAI,MAAM,EACpB,YAAY,EAAE,YAAY,GAAG,YAAY,GAAG,IAAI,EAChD,QAAQ,EAAE,QAAQ,EAClB,GAAG,EAAC,MAAM,EACV,GAAG,EAAE,OAAO,GAAG,KAAK,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,GAAG,OAAO,GAAG,KAAK,QAAQ,GAAG,GAAG,GAAG,IAAI,EACjF,GAAG,EAAE,OAAO,GAAG,KAAK,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,GAAG,OAAO,GAAG,KAAK,QAAQ,GAAG,GAAG,GAAG,IAAI,EACjF,OAAO,EAAE,OAAO,GAAG,OAAO,GAAG,IAAI,EACjC,WAAW,EAAE,WAAW,IAAI,IAAI,EAChC,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,CAAC,GAAG,KAAK,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,EAC3C,QAAQ,EAAE,CAAC,GAAG,KAAK,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,EAC/C,OAAO,EAAE,CAAC,GAAG,KAAK,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,EAC7C,OAAO,EAAE,CAAC,GAAG;gBACX,IAAI,CAAC,KAAK,GAAI,GAAG,CAAC,MAA2B,CAAC,KAAK,CAAC;gBACpD,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;aAC7B,GACD,EACF;KACH;;;;;;","names":["h","clsx"],"sources":["src/components/textbox.scss?tag=utrecht-textbox&encapsulation=shadow","src/components/textbox.tsx"],"sourcesContent":["/**\n * @license EUPL-1.2\n * Copyright (c) 2021 Robbert Broersma\n */\n\n@import \"~@utrecht/components/textbox/css\";\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) 2021 Robbert Broersma\n */\n\nimport { Component, Event, EventEmitter, h, Prop } from '@stencil/core';\nimport clsx from 'clsx';\n\n@Component({\n tag: 'utrecht-textbox',\n styleUrl: 'textbox.scss',\n shadow: true,\n})\nexport class Textbox {\n @Prop({ attribute: 'autocomplete', reflect: true }) autoComplete: string = '';\n @Prop({ reflect: true }) disabled: boolean = false;\n @Prop({ reflect: true }) invalid: boolean = false;\n @Prop() min: number | string = '';\n @Prop() max: number | string = '';\n @Prop() pattern: string = '';\n @Prop() placeholder: string = '';\n @Prop({ attribute: 'readonly', reflect: true }) readOnly: boolean = false;\n @Prop({ reflect: true }) required: boolean = false;\n @Prop({ reflect: true }) type: string = '';\n @Prop() value: string = '';\n @Event() utrechtBlur: EventEmitter;\n @Event() utrechtChange: EventEmitter;\n @Event() utrechtFocus: EventEmitter;\n @Event() utrechtInput: EventEmitter;\n\n render() {\n const { autoComplete, disabled, invalid, min, max, pattern, placeholder, readOnly, required, type, value } = this;\n\n return (\n <input\n class={clsx(\n 'utrecht-textbox',\n 'utrecht-textbox--html-input',\n disabled && 'utrecht-textbox--disabled',\n invalid && 'utrecht-textbox--invalid',\n readOnly && 'utrecht-textbox--readonly',\n )}\n type={type || 'text'}\n autoComplete={autoComplete ? autoComplete : null}\n disabled={disabled}\n dir=\"auto\"\n min={typeof min === 'number' ? String(min) : typeof min === 'string' ? min : null}\n max={typeof max === 'number' ? String(max) : typeof max === 'string' ? max : null}\n pattern={pattern ? pattern : null}\n placeholder={placeholder || null}\n readonly={readOnly}\n required={required}\n value={value}\n onBlur={(evt) => this.utrechtBlur.emit(evt)}\n onChange={(evt) => this.utrechtChange.emit(evt)}\n onFocus={(evt) => this.utrechtFocus.emit(evt)}\n onInput={(evt) => {\n this.value = (evt.target as HTMLInputElement).value;\n this.utrechtInput.emit(evt);\n }}\n />\n );\n }\n}\n"],"version":3}
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
border-radius: var(--utrecht-badge-counter-border-radius, var(--utrecht-badge-border-radius, 0.5ch));
|
|
25
25
|
color: var(--utrecht-badge-counter-color, var(--utrecht-badge-color, hsl(0, 0%, 100%)));
|
|
26
26
|
display: inline-block;
|
|
27
|
-
font-family: var(--utrecht-document-font-family, sans-serif);
|
|
28
|
-
font-size: var(--utrecht-badge-counter-font-size);
|
|
27
|
+
font-family: var(--utrecht-badge-counter-font-family, var(--utrecht-badge-font-family, var(--utrecht-document-font-family, sans-serif)));
|
|
28
|
+
font-size: var(--utrecht-badge-counter-font-size, var(--utrecht-badge-font-size));
|
|
29
29
|
font-style: var(--utrecht-badge-counter-font-style, normal); /* no inheritance */
|
|
30
30
|
font-weight: var(--utrecht-badge-counter-font-weight, var(--utrecht-badge-font-weight, bold)); /* no inheritance */
|
|
31
31
|
line-height: 1;
|
|
@@ -71,24 +71,23 @@
|
|
|
71
71
|
padding-inline-start: var(--utrecht-breadcrumb-nav-item-padding-inline-start, 8px);
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
+
.utrecht-breadcrumb-nav__link--current {
|
|
75
|
+
--utrecht-link-current-font-weight: var(--utrecht-breadcrumb-nav-link-current-font-weight, inherit);
|
|
76
|
+
/* configure the `current` `cursor` only when the current state is applied */
|
|
77
|
+
--_utrecht-breadcrumb-nav-link-current-cursor: var(--utrecht-action-inert-cursor, default);
|
|
78
|
+
font-weight: var(--utrecht-breadcrumb-nav-link-current-font-weight, inherit);
|
|
79
|
+
}
|
|
80
|
+
|
|
74
81
|
.utrecht-breadcrumb-nav__link--disabled {
|
|
75
82
|
--utrecht-link-placeholder-color: var(
|
|
76
83
|
--utrecht-breadcrumb-nav-link-disabled-color,
|
|
77
84
|
var(--utrecht-breadcrumb-nav-link-color)
|
|
78
85
|
);
|
|
86
|
+
/* configure the `disabled` `cursor` only when the current state is applied */
|
|
87
|
+
--_utrecht-breadcrumb-nav-link-disabled-cursor: var(--utrecht-action-disabled-cursor, not-allowed);
|
|
79
88
|
background-color: var(--utrecht-breadcrumb-nav-link-disabled-background-color, var(--utrecht-breadcrumb-nav-link-background-color));
|
|
80
|
-
|
|
81
|
-
cursor: var(--
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.utrecht-breadcrumb-nav__link--current {
|
|
85
|
-
/*
|
|
86
|
-
* `current` should apply to `disabled` links too, and it should override `disabled`.
|
|
87
|
-
* The override is the reason why this selector is not ordered alphabetically.
|
|
88
|
-
*/
|
|
89
|
-
--utrecht-link-current-font-weight: var(--utrecht-breadcrumb-nav-link-current-font-weight, inherit);
|
|
90
|
-
cursor: var(--utrecht-action-inert-cursor, default);
|
|
91
|
-
font-weight: var(--utrecht-breadcrumb-nav-link-current-font-weight, inherit);
|
|
89
|
+
/* Use the `current` cursor when available, otherwise use the `disabled` cursor */
|
|
90
|
+
cursor: var(--_utrecht-breadcrumb-nav-link-current-cursor, var(--_utrecht-breadcrumb-nav-link-disabled-cursor));
|
|
92
91
|
}
|
|
93
92
|
|
|
94
93
|
/* stylelint-disable-next-line block-no-empty */
|
|
@@ -20,10 +20,11 @@
|
|
|
20
20
|
*/
|
|
21
21
|
.utrecht-code-block {
|
|
22
22
|
/* Use `monospace` as fallback both when the custom property isn't set and when the font is not available */
|
|
23
|
+
/* Use `inherit` as font-size, to override interfering CSS such as: `code { font-size: 16px }` */
|
|
23
24
|
background-color: var(--utrecht-code-background-color);
|
|
24
25
|
color: var(--utrecht-code-color);
|
|
25
26
|
font-family: var(--utrecht-code-font-family, monospace), monospace;
|
|
26
|
-
font-size: var(--utrecht-code-font-size);
|
|
27
|
+
font-size: var(--utrecht-code-font-size, inherit);
|
|
27
28
|
font-variant-ligatures: none;
|
|
28
29
|
line-height: var(--utrecht-code-line-height);
|
|
29
30
|
--utrecht-code-color: var(--utrecht-code-block-color, inherit);
|
|
@@ -33,7 +34,7 @@
|
|
|
33
34
|
--utrecht-code-font-family: var(--utrecht-code-block-font-family, monospace);
|
|
34
35
|
background-color: var(--utrecht-code-block-background-color);
|
|
35
36
|
display: block;
|
|
36
|
-
font-size: var(--utrecht-code-block-font-size, var(--utrecht-code-font-size));
|
|
37
|
+
font-size: var(--utrecht-code-block-font-size, var(--utrecht-code-font-size, inherit));
|
|
37
38
|
line-height: var(--utrecht-code-block-line-height, var(--utrecht-code-line-height));
|
|
38
39
|
margin-block-end: var(--utrecht-code-block-margin-block-end);
|
|
39
40
|
margin-block-start: var(--utrecht-code-block-margin-block-start);
|
|
@@ -15,10 +15,11 @@
|
|
|
15
15
|
*/
|
|
16
16
|
.utrecht-code {
|
|
17
17
|
/* Use `monospace` as fallback both when the custom property isn't set and when the font is not available */
|
|
18
|
+
/* Use `inherit` as font-size, to override interfering CSS such as: `code { font-size: 16px }` */
|
|
18
19
|
background-color: var(--utrecht-code-background-color);
|
|
19
20
|
color: var(--utrecht-code-color);
|
|
20
21
|
font-family: var(--utrecht-code-font-family, monospace), monospace;
|
|
21
|
-
font-size: var(--utrecht-code-font-size);
|
|
22
|
+
font-size: var(--utrecht-code-font-size, inherit);
|
|
22
23
|
font-variant-ligatures: none;
|
|
23
24
|
line-height: var(--utrecht-code-line-height);
|
|
24
25
|
}
|
|
@@ -138,8 +138,8 @@
|
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
.utrecht-form-label--disabled {
|
|
141
|
+
color: var(--utrecht-form-label-disabled-color, var(--utrecht-form-label-color));
|
|
141
142
|
cursor: var(--utrecht-action-disabled-cursor, revert);
|
|
142
|
-
font-weight: var(--utrecht-form-label-disabled-color, var(--utrecht-form-label-color));
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
.utrecht-form-label--radio {
|
|
@@ -138,8 +138,8 @@
|
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
.utrecht-form-label--disabled {
|
|
141
|
+
color: var(--utrecht-form-label-disabled-color, var(--utrecht-form-label-color));
|
|
141
142
|
cursor: var(--utrecht-action-disabled-cursor, revert);
|
|
142
|
-
font-weight: var(--utrecht-form-label-disabled-color, var(--utrecht-form-label-color));
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
.utrecht-form-label--radio {
|
|
@@ -225,7 +225,8 @@
|
|
|
225
225
|
inline-size: 100%;
|
|
226
226
|
line-height: var(--utrecht-textarea-line-height, initial);
|
|
227
227
|
max-inline-size: var(--utrecht-textarea-max-inline-size, var(--utrecht-form-control-max-inline-size));
|
|
228
|
-
min-block-size: var(--utrecht-textarea-min-block-size);
|
|
228
|
+
min-block-size: var(--utrecht-textarea-min-block-size, var(--utrecht-pointer-target-min-size, 44px));
|
|
229
|
+
min-inline-size: var(--utrecht-pointer-target-min-size, 44px);
|
|
229
230
|
padding-block-end: var(--utrecht-textarea-padding-block-end, var(--utrecht-form-control-padding-block-end, 0));
|
|
230
231
|
padding-block-start: var(--utrecht-textarea-padding-block-start, var(--utrecht-form-control-padding-block-start, 0));
|
|
231
232
|
padding-inline-end: var(--utrecht-textarea-padding-inline-end, var(--utrecht-form-control-padding-inline-end, initial));
|
|
@@ -138,8 +138,8 @@
|
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
.utrecht-form-label--disabled {
|
|
141
|
+
color: var(--utrecht-form-label-disabled-color, var(--utrecht-form-label-color));
|
|
141
142
|
cursor: var(--utrecht-action-disabled-cursor, revert);
|
|
142
|
-
font-weight: var(--utrecht-form-label-disabled-color, var(--utrecht-form-label-color));
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
.utrecht-form-label--radio {
|
|
@@ -209,6 +209,28 @@
|
|
|
209
209
|
* https://github.com/hudochenkov/stylelint-order/pull/162 */
|
|
210
210
|
/* stylelint-disable order/properties-alphabetical-order */
|
|
211
211
|
.utrecht-textbox {
|
|
212
|
+
/* The average character inline-size is an approximation, with a default that works for Dutch text.
|
|
213
|
+
* The average might need to be configured specifically, for other scripts (CJK characters)
|
|
214
|
+
* and very wide or very narrow fonts.
|
|
215
|
+
* For monospace fonts it can be set to `1ch`.
|
|
216
|
+
*/
|
|
217
|
+
--_utrecht-textbox-value-char: 0.667em + 0.334ch;
|
|
218
|
+
/* Because this element uses `border-box` box-sizing, we need to manually add up the
|
|
219
|
+
* border width, padding width and the content width.
|
|
220
|
+
*
|
|
221
|
+
* Browsers and browser addons can add buttons inside the content box, for example
|
|
222
|
+
* for autocomplete. To avoid overlap between the UI and the text, we reserve
|
|
223
|
+
* some additional pixels to make space. We use 44px in accordance with the WCAG target size.
|
|
224
|
+
*
|
|
225
|
+
* When you are certain an element has no such UI, you can set the `autocomplete-ui-size` to `0px` (not to `0`).
|
|
226
|
+
*/
|
|
227
|
+
--_utrecht-textbox-max-inline-size: calc(
|
|
228
|
+
calc(var(--utrecht-textbox-value-max-length) * var(--_utrecht-textbox-value-char)) +
|
|
229
|
+
var(--utrecht-textbox-padding-inline-end, var(--utrecht-form-control-padding-inline-end, 0)) +
|
|
230
|
+
var(--utrecht-textbox-padding-inline-start, var(--utrecht-form-control-padding-inline-start, 0)) +
|
|
231
|
+
var(--utrecht-textbox-border-width, var(--utrecht-form-control-border-width, 0)) +
|
|
232
|
+
var(--utrecht-textbox-autocomplete-ui-size, 44px)
|
|
233
|
+
);
|
|
212
234
|
background-color: var(--utrecht-textbox-background-color, var(--utrecht-form-control-background-color));
|
|
213
235
|
block-size: initial; /* harden */
|
|
214
236
|
border-width: var(--utrecht-textbox-border-width, var(--utrecht-form-control-border-width));
|
|
@@ -223,7 +245,9 @@
|
|
|
223
245
|
font-weight: initial; /* harden */
|
|
224
246
|
inline-size: 100%;
|
|
225
247
|
line-height: var(--utrecht-textbox-line-height, var(--utrecht-form-control-line-height, initial));
|
|
226
|
-
|
|
248
|
+
min-block-size: var(--utrecht-pointer-target-min-size, 44px);
|
|
249
|
+
min-inline-size: var(--utrecht-pointer-target-min-size, 44px);
|
|
250
|
+
max-inline-size: min(var(--_utrecht-textbox-max-inline-size, 100%), var(--utrecht-textbox-max-inline-size, var(--utrecht-form-control-max-inline-size)));
|
|
227
251
|
padding-block-end: var(--utrecht-textbox-padding-block-end, var(--utrecht-form-control-padding-block-end, 0));
|
|
228
252
|
padding-block-start: var(--utrecht-textbox-padding-block-start, var(--utrecht-form-control-padding-block-start, 0));
|
|
229
253
|
padding-inline-end: var(--utrecht-textbox-padding-inline-end, var(--utrecht-form-control-padding-inline-end, initial));
|
|
@@ -246,16 +270,16 @@
|
|
|
246
270
|
}
|
|
247
271
|
|
|
248
272
|
.utrecht-textbox--disabled {
|
|
249
|
-
background-color: var(--utrecht-textbox-disabled-background-color, var(--utrecht-form-control-disabled-background-color, var(--utrecht-
|
|
250
|
-
border-color: var(--utrecht-textbox-disabled-border-color, var(--utrecht-form-control-disabled-border-color, var(--utrecht-
|
|
251
|
-
color: var(--utrecht-textbox-disabled-color, var(--utrecht-form-control-disabled-color, var(--utrecht-
|
|
273
|
+
background-color: var(--utrecht-textbox-disabled-background-color, var(--utrecht-form-control-disabled-background-color, var(--utrecht-textbox-background-color, var(--utrecht-form-control-background-color))));
|
|
274
|
+
border-color: var(--utrecht-textbox-disabled-border-color, var(--utrecht-form-control-disabled-border-color, var(--utrecht-textbox-border-color, var(--utrecht-form-control-border-color))));
|
|
275
|
+
color: var(--utrecht-textbox-disabled-color, var(--utrecht-form-control-disabled-color, var(--utrecht-textbox-color, var(--utrecht-form-control-color))));
|
|
252
276
|
cursor: var(--utrecht-action-disabled-cursor, not-allowed);
|
|
253
277
|
}
|
|
254
278
|
|
|
255
279
|
.utrecht-textbox--focus {
|
|
256
|
-
background-color: var(--utrecht-textbox-focus-background-color, var(--utrecht-form-control-focus-background-color, var(--utrecht-
|
|
257
|
-
border-color: var(--utrecht-textbox-focus-border-color, var(--utrecht-form-control-focus-border-color, var(--utrecht-
|
|
258
|
-
color: var(--utrecht-textbox-focus-color, var(--utrecht-form-control-focus-color, var(--utrecht-
|
|
280
|
+
background-color: var(--utrecht-textbox-focus-background-color, var(--utrecht-form-control-focus-background-color, var(--utrecht-textbox-background-color, var(--utrecht-form-control-background-color))));
|
|
281
|
+
border-color: var(--utrecht-textbox-focus-border-color, var(--utrecht-form-control-focus-border-color, var(--utrecht-textbox-border-color, var(--utrecht-form-control-border-color))));
|
|
282
|
+
color: var(--utrecht-textbox-focus-color, var(--utrecht-form-control-focus-color, var(--utrecht-textbox-color, var(--utrecht-form-control-color))));
|
|
259
283
|
}
|
|
260
284
|
|
|
261
285
|
.utrecht-textbox--focus-visible {
|
|
@@ -294,6 +318,53 @@
|
|
|
294
318
|
font-variant-numeric: slashed-zero;
|
|
295
319
|
}
|
|
296
320
|
|
|
321
|
+
.utrecht-textbox--postal-code-nl-size {
|
|
322
|
+
/* Dutch postal code: 4 numbers, 1 space and 2 letters */
|
|
323
|
+
--utrecht-textbox-value-max-length: 7;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
.utrecht-textbox--house-number-size {
|
|
327
|
+
/* Dutch house number is 99999 at most: 5 numbers */
|
|
328
|
+
--utrecht-textbox-value-max-length: 5;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
.utrecht-textbox--house-letter-size {
|
|
332
|
+
/* Dutch house letter is 1 letter */
|
|
333
|
+
--utrecht-textbox-value-max-length: 1;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
.utrecht-textbox--house-addition-size {
|
|
337
|
+
/* Dutch house addition is optional, between 1 and 4 alphanumeric characters */
|
|
338
|
+
--utrecht-textbox-value-max-length: 4;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
.utrecht-textbox--voorvoegsel-size {
|
|
342
|
+
/* "Tabel 36 Voorvoegselstabel" by "Rijksdienst voor Identiteitsgegevens" has a list
|
|
343
|
+
* of all allowed values. The longest value is 10 characters.
|
|
344
|
+
* The class name is in Dutch because it is a Dutch concept. */
|
|
345
|
+
--utrecht-textbox-value-max-length: 10;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
.utrecht-textbox--tel-size {
|
|
349
|
+
/* International telephone number standard E.164 allows 15 numbers, with optional space for 4 spaces */
|
|
350
|
+
--utrecht-textbox-value-max-length: 19;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
.utrecht-textbox--tel-nl-size {
|
|
354
|
+
/* Dutch telephone number: 10 number, typically with at most 3 spaces */
|
|
355
|
+
--utrecht-textbox-value-max-length: 13;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
.utrecht-textbox--iban-size {
|
|
359
|
+
/* Maximum IBAN: 33 characters, plus 8 spaces (one space after every 4 characters) */
|
|
360
|
+
--utrecht-textbox-value-max-length: 41;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
.utrecht-textbox--iban-nl-size {
|
|
364
|
+
/* Dutch IBAN: 18 characters, plus 4 spaces (one space after every 4 characters) */
|
|
365
|
+
--utrecht-textbox-value-max-length: 22;
|
|
366
|
+
}
|
|
367
|
+
|
|
297
368
|
/**
|
|
298
369
|
* This class name is experimental.
|
|
299
370
|
*/
|
|
@@ -325,9 +396,9 @@
|
|
|
325
396
|
*/
|
|
326
397
|
}
|
|
327
398
|
.utrecht-textbox--html-input:focus {
|
|
328
|
-
background-color: var(--utrecht-textbox-focus-background-color, var(--utrecht-form-control-focus-background-color, var(--utrecht-
|
|
329
|
-
border-color: var(--utrecht-textbox-focus-border-color, var(--utrecht-form-control-focus-border-color, var(--utrecht-
|
|
330
|
-
color: var(--utrecht-textbox-focus-color, var(--utrecht-form-control-focus-color, var(--utrecht-
|
|
399
|
+
background-color: var(--utrecht-textbox-focus-background-color, var(--utrecht-form-control-focus-background-color, var(--utrecht-textbox-background-color, var(--utrecht-form-control-background-color))));
|
|
400
|
+
border-color: var(--utrecht-textbox-focus-border-color, var(--utrecht-form-control-focus-border-color, var(--utrecht-textbox-border-color, var(--utrecht-form-control-border-color))));
|
|
401
|
+
color: var(--utrecht-textbox-focus-color, var(--utrecht-form-control-focus-color, var(--utrecht-textbox-color, var(--utrecht-form-control-color))));
|
|
331
402
|
/* - The browser default focus ring should apply when these CSS custom properties are not set.
|
|
332
403
|
* - Make the `box-shadow` value available, so components that have their own `box-shadow`
|
|
333
404
|
* can combine it with the focus ring box shadow.
|
|
@@ -365,9 +436,9 @@
|
|
|
365
436
|
color: var(--utrecht-textbox-read-only-color, var(--utrecht-form-control-read-only-color, var(--utrecht-textbox-color, var(--utrecht-form-control-color))));
|
|
366
437
|
}
|
|
367
438
|
.utrecht-textbox--html-input:disabled {
|
|
368
|
-
background-color: var(--utrecht-textbox-disabled-background-color, var(--utrecht-form-control-disabled-background-color, var(--utrecht-
|
|
369
|
-
border-color: var(--utrecht-textbox-disabled-border-color, var(--utrecht-form-control-disabled-border-color, var(--utrecht-
|
|
370
|
-
color: var(--utrecht-textbox-disabled-color, var(--utrecht-form-control-disabled-color, var(--utrecht-
|
|
439
|
+
background-color: var(--utrecht-textbox-disabled-background-color, var(--utrecht-form-control-disabled-background-color, var(--utrecht-textbox-background-color, var(--utrecht-form-control-background-color))));
|
|
440
|
+
border-color: var(--utrecht-textbox-disabled-border-color, var(--utrecht-form-control-disabled-border-color, var(--utrecht-textbox-border-color, var(--utrecht-form-control-border-color))));
|
|
441
|
+
color: var(--utrecht-textbox-disabled-color, var(--utrecht-form-control-disabled-color, var(--utrecht-textbox-color, var(--utrecht-form-control-color))));
|
|
371
442
|
cursor: var(--utrecht-action-disabled-cursor, not-allowed);
|
|
372
443
|
}
|
|
373
444
|
.utrecht-textbox--html-input::placeholder {
|
|
@@ -110,6 +110,10 @@
|
|
|
110
110
|
inline-size: 100%;
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
+
.utrecht-form-toggle__track--html-label {
|
|
114
|
+
cursor: inherit;
|
|
115
|
+
}
|
|
116
|
+
|
|
113
117
|
.utrecht-form-toggle__track--checked, .utrecht-form-toggle--html-checkbox .utrecht-form-toggle__checkbox:checked ~ .utrecht-form-toggle__track {
|
|
114
118
|
background-color: var(--utrecht-form-toggle-checked-accent-color, var(--utrecht-form-toggle-accent-color));
|
|
115
119
|
}
|
|
@@ -809,10 +809,11 @@ however browsers don't seem to have implemented great looking supixel tweening y
|
|
|
809
809
|
}
|
|
810
810
|
.utrecht-html code {
|
|
811
811
|
/* Use `monospace` as fallback both when the custom property isn't set and when the font is not available */
|
|
812
|
+
/* Use `inherit` as font-size, to override interfering CSS such as: `code { font-size: 16px }` */
|
|
812
813
|
background-color: var(--utrecht-code-background-color);
|
|
813
814
|
color: var(--utrecht-code-color);
|
|
814
815
|
font-family: var(--utrecht-code-font-family, monospace), monospace;
|
|
815
|
-
font-size: var(--utrecht-code-font-size);
|
|
816
|
+
font-size: var(--utrecht-code-font-size, inherit);
|
|
816
817
|
font-variant-ligatures: none;
|
|
817
818
|
line-height: var(--utrecht-code-line-height);
|
|
818
819
|
}
|
|
@@ -1103,10 +1104,11 @@ however browsers don't seem to have implemented great looking supixel tweening y
|
|
|
1103
1104
|
}
|
|
1104
1105
|
.utrecht-html pre:has(> code:only-child) {
|
|
1105
1106
|
/* Use `monospace` as fallback both when the custom property isn't set and when the font is not available */
|
|
1107
|
+
/* Use `inherit` as font-size, to override interfering CSS such as: `code { font-size: 16px }` */
|
|
1106
1108
|
background-color: var(--utrecht-code-background-color);
|
|
1107
1109
|
color: var(--utrecht-code-color);
|
|
1108
1110
|
font-family: var(--utrecht-code-font-family, monospace), monospace;
|
|
1109
|
-
font-size: var(--utrecht-code-font-size);
|
|
1111
|
+
font-size: var(--utrecht-code-font-size, inherit);
|
|
1110
1112
|
font-variant-ligatures: none;
|
|
1111
1113
|
line-height: var(--utrecht-code-line-height);
|
|
1112
1114
|
--utrecht-code-color: var(--utrecht-code-block-color, inherit);
|
|
@@ -1116,7 +1118,7 @@ however browsers don't seem to have implemented great looking supixel tweening y
|
|
|
1116
1118
|
--utrecht-code-font-family: var(--utrecht-code-block-font-family, monospace);
|
|
1117
1119
|
background-color: var(--utrecht-code-block-background-color);
|
|
1118
1120
|
display: block;
|
|
1119
|
-
font-size: var(--utrecht-code-block-font-size, var(--utrecht-code-font-size));
|
|
1121
|
+
font-size: var(--utrecht-code-block-font-size, var(--utrecht-code-font-size, inherit));
|
|
1120
1122
|
line-height: var(--utrecht-code-block-line-height, var(--utrecht-code-line-height));
|
|
1121
1123
|
margin-block-end: var(--utrecht-code-block-margin-block-end);
|
|
1122
1124
|
margin-block-start: var(--utrecht-code-block-margin-block-start);
|
|
@@ -1323,6 +1325,8 @@ however browsers don't seem to have implemented great looking supixel tweening y
|
|
|
1323
1325
|
font-family: var(--utrecht-select-font-family, var(--utrecht-form-control-font-family));
|
|
1324
1326
|
font-size: var(--utrecht-select-font-size, var(--utrecht-form-control-font-size));
|
|
1325
1327
|
inline-size: 100%;
|
|
1328
|
+
min-block-size: var(--utrecht-select-min-block-size, var(--utrecht-pointer-target-min-size, 44px));
|
|
1329
|
+
min-inline-size: var(--utrecht-pointer-target-min-size, 44px);
|
|
1326
1330
|
max-inline-size: var(--utrecht-select-max-inline-size, var(--utrecht-form-control-max-inline-size));
|
|
1327
1331
|
padding-block-end: var(--utrecht-select-padding-block-end, var(--utrecht-form-control-padding-block-end));
|
|
1328
1332
|
padding-block-start: var(--utrecht-select-padding-block-start, var(--utrecht-form-control-padding-block-start));
|
|
@@ -1510,7 +1514,8 @@ however browsers don't seem to have implemented great looking supixel tweening y
|
|
|
1510
1514
|
inline-size: 100%;
|
|
1511
1515
|
line-height: var(--utrecht-textarea-line-height, initial);
|
|
1512
1516
|
max-inline-size: var(--utrecht-textarea-max-inline-size, var(--utrecht-form-control-max-inline-size));
|
|
1513
|
-
min-block-size: var(--utrecht-textarea-min-block-size);
|
|
1517
|
+
min-block-size: var(--utrecht-textarea-min-block-size, var(--utrecht-pointer-target-min-size, 44px));
|
|
1518
|
+
min-inline-size: var(--utrecht-pointer-target-min-size, 44px);
|
|
1514
1519
|
padding-block-end: var(--utrecht-textarea-padding-block-end, var(--utrecht-form-control-padding-block-end, 0));
|
|
1515
1520
|
padding-block-start: var(--utrecht-textarea-padding-block-start, var(--utrecht-form-control-padding-block-start, 0));
|
|
1516
1521
|
padding-inline-end: var(--utrecht-textarea-padding-inline-end, var(--utrecht-form-control-padding-inline-end, initial));
|
|
@@ -1588,6 +1593,28 @@ however browsers don't seem to have implemented great looking supixel tweening y
|
|
|
1588
1593
|
.utrecht-html input[type=time i],
|
|
1589
1594
|
.utrecht-html input[type=url i],
|
|
1590
1595
|
.utrecht-html input[type=week i] {
|
|
1596
|
+
/* The average character inline-size is an approximation, with a default that works for Dutch text.
|
|
1597
|
+
* The average might need to be configured specifically, for other scripts (CJK characters)
|
|
1598
|
+
* and very wide or very narrow fonts.
|
|
1599
|
+
* For monospace fonts it can be set to `1ch`.
|
|
1600
|
+
*/
|
|
1601
|
+
--_utrecht-textbox-value-char: 0.667em + 0.334ch;
|
|
1602
|
+
/* Because this element uses `border-box` box-sizing, we need to manually add up the
|
|
1603
|
+
* border width, padding width and the content width.
|
|
1604
|
+
*
|
|
1605
|
+
* Browsers and browser addons can add buttons inside the content box, for example
|
|
1606
|
+
* for autocomplete. To avoid overlap between the UI and the text, we reserve
|
|
1607
|
+
* some additional pixels to make space. We use 44px in accordance with the WCAG target size.
|
|
1608
|
+
*
|
|
1609
|
+
* When you are certain an element has no such UI, you can set the `autocomplete-ui-size` to `0px` (not to `0`).
|
|
1610
|
+
*/
|
|
1611
|
+
--_utrecht-textbox-max-inline-size: calc(
|
|
1612
|
+
calc(var(--utrecht-textbox-value-max-length) * var(--_utrecht-textbox-value-char)) +
|
|
1613
|
+
var(--utrecht-textbox-padding-inline-end, var(--utrecht-form-control-padding-inline-end, 0)) +
|
|
1614
|
+
var(--utrecht-textbox-padding-inline-start, var(--utrecht-form-control-padding-inline-start, 0)) +
|
|
1615
|
+
var(--utrecht-textbox-border-width, var(--utrecht-form-control-border-width, 0)) +
|
|
1616
|
+
var(--utrecht-textbox-autocomplete-ui-size, 44px)
|
|
1617
|
+
);
|
|
1591
1618
|
background-color: var(--utrecht-textbox-background-color, var(--utrecht-form-control-background-color));
|
|
1592
1619
|
block-size: initial; /* harden */
|
|
1593
1620
|
border-width: var(--utrecht-textbox-border-width, var(--utrecht-form-control-border-width));
|
|
@@ -1602,7 +1629,9 @@ however browsers don't seem to have implemented great looking supixel tweening y
|
|
|
1602
1629
|
font-weight: initial; /* harden */
|
|
1603
1630
|
inline-size: 100%;
|
|
1604
1631
|
line-height: var(--utrecht-textbox-line-height, var(--utrecht-form-control-line-height, initial));
|
|
1605
|
-
|
|
1632
|
+
min-block-size: var(--utrecht-pointer-target-min-size, 44px);
|
|
1633
|
+
min-inline-size: var(--utrecht-pointer-target-min-size, 44px);
|
|
1634
|
+
max-inline-size: min(var(--_utrecht-textbox-max-inline-size, 100%), var(--utrecht-textbox-max-inline-size, var(--utrecht-form-control-max-inline-size)));
|
|
1606
1635
|
padding-block-end: var(--utrecht-textbox-padding-block-end, var(--utrecht-form-control-padding-block-end, 0));
|
|
1607
1636
|
padding-block-start: var(--utrecht-textbox-padding-block-start, var(--utrecht-form-control-padding-block-start, 0));
|
|
1608
1637
|
padding-inline-end: var(--utrecht-textbox-padding-inline-end, var(--utrecht-form-control-padding-inline-end, initial));
|
|
@@ -1627,9 +1656,9 @@ however browsers don't seem to have implemented great looking supixel tweening y
|
|
|
1627
1656
|
.utrecht-html input[type=time i]:focus,
|
|
1628
1657
|
.utrecht-html input[type=url i]:focus,
|
|
1629
1658
|
.utrecht-html input[type=week i]:focus {
|
|
1630
|
-
background-color: var(--utrecht-textbox-focus-background-color, var(--utrecht-form-control-focus-background-color, var(--utrecht-
|
|
1631
|
-
border-color: var(--utrecht-textbox-focus-border-color, var(--utrecht-form-control-focus-border-color, var(--utrecht-
|
|
1632
|
-
color: var(--utrecht-textbox-focus-color, var(--utrecht-form-control-focus-color, var(--utrecht-
|
|
1659
|
+
background-color: var(--utrecht-textbox-focus-background-color, var(--utrecht-form-control-focus-background-color, var(--utrecht-textbox-background-color, var(--utrecht-form-control-background-color))));
|
|
1660
|
+
border-color: var(--utrecht-textbox-focus-border-color, var(--utrecht-form-control-focus-border-color, var(--utrecht-textbox-border-color, var(--utrecht-form-control-border-color))));
|
|
1661
|
+
color: var(--utrecht-textbox-focus-color, var(--utrecht-form-control-focus-color, var(--utrecht-textbox-color, var(--utrecht-form-control-color))));
|
|
1633
1662
|
/* - The browser default focus ring should apply when these CSS custom properties are not set.
|
|
1634
1663
|
* - Make the `box-shadow` value available, so components that have their own `box-shadow`
|
|
1635
1664
|
* can combine it with the focus ring box shadow.
|
|
@@ -1727,9 +1756,9 @@ however browsers don't seem to have implemented great looking supixel tweening y
|
|
|
1727
1756
|
.utrecht-html input[type=time i]:disabled,
|
|
1728
1757
|
.utrecht-html input[type=url i]:disabled,
|
|
1729
1758
|
.utrecht-html input[type=week i]:disabled {
|
|
1730
|
-
background-color: var(--utrecht-textbox-disabled-background-color, var(--utrecht-form-control-disabled-background-color, var(--utrecht-
|
|
1731
|
-
border-color: var(--utrecht-textbox-disabled-border-color, var(--utrecht-form-control-disabled-border-color, var(--utrecht-
|
|
1732
|
-
color: var(--utrecht-textbox-disabled-color, var(--utrecht-form-control-disabled-color, var(--utrecht-
|
|
1759
|
+
background-color: var(--utrecht-textbox-disabled-background-color, var(--utrecht-form-control-disabled-background-color, var(--utrecht-textbox-background-color, var(--utrecht-form-control-background-color))));
|
|
1760
|
+
border-color: var(--utrecht-textbox-disabled-border-color, var(--utrecht-form-control-disabled-border-color, var(--utrecht-textbox-border-color, var(--utrecht-form-control-border-color))));
|
|
1761
|
+
color: var(--utrecht-textbox-disabled-color, var(--utrecht-form-control-disabled-color, var(--utrecht-textbox-color, var(--utrecht-form-control-color))));
|
|
1733
1762
|
cursor: var(--utrecht-action-disabled-cursor, not-allowed);
|
|
1734
1763
|
}
|
|
1735
1764
|
.utrecht-html input:not([type])::placeholder,
|
|
@@ -42,7 +42,8 @@
|
|
|
42
42
|
inline-size: 100%;
|
|
43
43
|
line-height: var(--utrecht-textarea-line-height, initial);
|
|
44
44
|
max-inline-size: var(--utrecht-textarea-max-inline-size, var(--utrecht-form-control-max-inline-size));
|
|
45
|
-
min-block-size: var(--utrecht-textarea-min-block-size);
|
|
45
|
+
min-block-size: var(--utrecht-textarea-min-block-size, var(--utrecht-pointer-target-min-size, 44px));
|
|
46
|
+
min-inline-size: var(--utrecht-pointer-target-min-size, 44px);
|
|
46
47
|
padding-block-end: var(--utrecht-textarea-padding-block-end, var(--utrecht-form-control-padding-block-end, 0));
|
|
47
48
|
padding-block-start: var(--utrecht-textarea-padding-block-start, var(--utrecht-form-control-padding-block-start, 0));
|
|
48
49
|
padding-inline-end: var(--utrecht-textarea-padding-inline-end, var(--utrecht-form-control-padding-inline-end, initial));
|
|
@@ -26,6 +26,28 @@
|
|
|
26
26
|
* https://github.com/hudochenkov/stylelint-order/pull/162 */
|
|
27
27
|
/* stylelint-disable order/properties-alphabetical-order */
|
|
28
28
|
.utrecht-textbox {
|
|
29
|
+
/* The average character inline-size is an approximation, with a default that works for Dutch text.
|
|
30
|
+
* The average might need to be configured specifically, for other scripts (CJK characters)
|
|
31
|
+
* and very wide or very narrow fonts.
|
|
32
|
+
* For monospace fonts it can be set to `1ch`.
|
|
33
|
+
*/
|
|
34
|
+
--_utrecht-textbox-value-char: 0.667em + 0.334ch;
|
|
35
|
+
/* Because this element uses `border-box` box-sizing, we need to manually add up the
|
|
36
|
+
* border width, padding width and the content width.
|
|
37
|
+
*
|
|
38
|
+
* Browsers and browser addons can add buttons inside the content box, for example
|
|
39
|
+
* for autocomplete. To avoid overlap between the UI and the text, we reserve
|
|
40
|
+
* some additional pixels to make space. We use 44px in accordance with the WCAG target size.
|
|
41
|
+
*
|
|
42
|
+
* When you are certain an element has no such UI, you can set the `autocomplete-ui-size` to `0px` (not to `0`).
|
|
43
|
+
*/
|
|
44
|
+
--_utrecht-textbox-max-inline-size: calc(
|
|
45
|
+
calc(var(--utrecht-textbox-value-max-length) * var(--_utrecht-textbox-value-char)) +
|
|
46
|
+
var(--utrecht-textbox-padding-inline-end, var(--utrecht-form-control-padding-inline-end, 0)) +
|
|
47
|
+
var(--utrecht-textbox-padding-inline-start, var(--utrecht-form-control-padding-inline-start, 0)) +
|
|
48
|
+
var(--utrecht-textbox-border-width, var(--utrecht-form-control-border-width, 0)) +
|
|
49
|
+
var(--utrecht-textbox-autocomplete-ui-size, 44px)
|
|
50
|
+
);
|
|
29
51
|
background-color: var(--utrecht-textbox-background-color, var(--utrecht-form-control-background-color));
|
|
30
52
|
block-size: initial; /* harden */
|
|
31
53
|
border-width: var(--utrecht-textbox-border-width, var(--utrecht-form-control-border-width));
|
|
@@ -40,7 +62,9 @@
|
|
|
40
62
|
font-weight: initial; /* harden */
|
|
41
63
|
inline-size: 100%;
|
|
42
64
|
line-height: var(--utrecht-textbox-line-height, var(--utrecht-form-control-line-height, initial));
|
|
43
|
-
|
|
65
|
+
min-block-size: var(--utrecht-pointer-target-min-size, 44px);
|
|
66
|
+
min-inline-size: var(--utrecht-pointer-target-min-size, 44px);
|
|
67
|
+
max-inline-size: min(var(--_utrecht-textbox-max-inline-size, 100%), var(--utrecht-textbox-max-inline-size, var(--utrecht-form-control-max-inline-size)));
|
|
44
68
|
padding-block-end: var(--utrecht-textbox-padding-block-end, var(--utrecht-form-control-padding-block-end, 0));
|
|
45
69
|
padding-block-start: var(--utrecht-textbox-padding-block-start, var(--utrecht-form-control-padding-block-start, 0));
|
|
46
70
|
padding-inline-end: var(--utrecht-textbox-padding-inline-end, var(--utrecht-form-control-padding-inline-end, initial));
|
|
@@ -63,16 +87,16 @@
|
|
|
63
87
|
}
|
|
64
88
|
|
|
65
89
|
.utrecht-textbox--disabled {
|
|
66
|
-
background-color: var(--utrecht-textbox-disabled-background-color, var(--utrecht-form-control-disabled-background-color, var(--utrecht-
|
|
67
|
-
border-color: var(--utrecht-textbox-disabled-border-color, var(--utrecht-form-control-disabled-border-color, var(--utrecht-
|
|
68
|
-
color: var(--utrecht-textbox-disabled-color, var(--utrecht-form-control-disabled-color, var(--utrecht-
|
|
90
|
+
background-color: var(--utrecht-textbox-disabled-background-color, var(--utrecht-form-control-disabled-background-color, var(--utrecht-textbox-background-color, var(--utrecht-form-control-background-color))));
|
|
91
|
+
border-color: var(--utrecht-textbox-disabled-border-color, var(--utrecht-form-control-disabled-border-color, var(--utrecht-textbox-border-color, var(--utrecht-form-control-border-color))));
|
|
92
|
+
color: var(--utrecht-textbox-disabled-color, var(--utrecht-form-control-disabled-color, var(--utrecht-textbox-color, var(--utrecht-form-control-color))));
|
|
69
93
|
cursor: var(--utrecht-action-disabled-cursor, not-allowed);
|
|
70
94
|
}
|
|
71
95
|
|
|
72
96
|
.utrecht-textbox--focus {
|
|
73
|
-
background-color: var(--utrecht-textbox-focus-background-color, var(--utrecht-form-control-focus-background-color, var(--utrecht-
|
|
74
|
-
border-color: var(--utrecht-textbox-focus-border-color, var(--utrecht-form-control-focus-border-color, var(--utrecht-
|
|
75
|
-
color: var(--utrecht-textbox-focus-color, var(--utrecht-form-control-focus-color, var(--utrecht-
|
|
97
|
+
background-color: var(--utrecht-textbox-focus-background-color, var(--utrecht-form-control-focus-background-color, var(--utrecht-textbox-background-color, var(--utrecht-form-control-background-color))));
|
|
98
|
+
border-color: var(--utrecht-textbox-focus-border-color, var(--utrecht-form-control-focus-border-color, var(--utrecht-textbox-border-color, var(--utrecht-form-control-border-color))));
|
|
99
|
+
color: var(--utrecht-textbox-focus-color, var(--utrecht-form-control-focus-color, var(--utrecht-textbox-color, var(--utrecht-form-control-color))));
|
|
76
100
|
}
|
|
77
101
|
|
|
78
102
|
.utrecht-textbox--focus-visible {
|
|
@@ -111,6 +135,53 @@
|
|
|
111
135
|
font-variant-numeric: slashed-zero;
|
|
112
136
|
}
|
|
113
137
|
|
|
138
|
+
.utrecht-textbox--postal-code-nl-size {
|
|
139
|
+
/* Dutch postal code: 4 numbers, 1 space and 2 letters */
|
|
140
|
+
--utrecht-textbox-value-max-length: 7;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.utrecht-textbox--house-number-size {
|
|
144
|
+
/* Dutch house number is 99999 at most: 5 numbers */
|
|
145
|
+
--utrecht-textbox-value-max-length: 5;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.utrecht-textbox--house-letter-size {
|
|
149
|
+
/* Dutch house letter is 1 letter */
|
|
150
|
+
--utrecht-textbox-value-max-length: 1;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.utrecht-textbox--house-addition-size {
|
|
154
|
+
/* Dutch house addition is optional, between 1 and 4 alphanumeric characters */
|
|
155
|
+
--utrecht-textbox-value-max-length: 4;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.utrecht-textbox--voorvoegsel-size {
|
|
159
|
+
/* "Tabel 36 Voorvoegselstabel" by "Rijksdienst voor Identiteitsgegevens" has a list
|
|
160
|
+
* of all allowed values. The longest value is 10 characters.
|
|
161
|
+
* The class name is in Dutch because it is a Dutch concept. */
|
|
162
|
+
--utrecht-textbox-value-max-length: 10;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.utrecht-textbox--tel-size {
|
|
166
|
+
/* International telephone number standard E.164 allows 15 numbers, with optional space for 4 spaces */
|
|
167
|
+
--utrecht-textbox-value-max-length: 19;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.utrecht-textbox--tel-nl-size {
|
|
171
|
+
/* Dutch telephone number: 10 number, typically with at most 3 spaces */
|
|
172
|
+
--utrecht-textbox-value-max-length: 13;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.utrecht-textbox--iban-size {
|
|
176
|
+
/* Maximum IBAN: 33 characters, plus 8 spaces (one space after every 4 characters) */
|
|
177
|
+
--utrecht-textbox-value-max-length: 41;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.utrecht-textbox--iban-nl-size {
|
|
181
|
+
/* Dutch IBAN: 18 characters, plus 4 spaces (one space after every 4 characters) */
|
|
182
|
+
--utrecht-textbox-value-max-length: 22;
|
|
183
|
+
}
|
|
184
|
+
|
|
114
185
|
/**
|
|
115
186
|
* This class name is experimental.
|
|
116
187
|
*/
|
|
@@ -142,9 +213,9 @@
|
|
|
142
213
|
*/
|
|
143
214
|
}
|
|
144
215
|
.utrecht-textbox--html-input:focus {
|
|
145
|
-
background-color: var(--utrecht-textbox-focus-background-color, var(--utrecht-form-control-focus-background-color, var(--utrecht-
|
|
146
|
-
border-color: var(--utrecht-textbox-focus-border-color, var(--utrecht-form-control-focus-border-color, var(--utrecht-
|
|
147
|
-
color: var(--utrecht-textbox-focus-color, var(--utrecht-form-control-focus-color, var(--utrecht-
|
|
216
|
+
background-color: var(--utrecht-textbox-focus-background-color, var(--utrecht-form-control-focus-background-color, var(--utrecht-textbox-background-color, var(--utrecht-form-control-background-color))));
|
|
217
|
+
border-color: var(--utrecht-textbox-focus-border-color, var(--utrecht-form-control-focus-border-color, var(--utrecht-textbox-border-color, var(--utrecht-form-control-border-color))));
|
|
218
|
+
color: var(--utrecht-textbox-focus-color, var(--utrecht-form-control-focus-color, var(--utrecht-textbox-color, var(--utrecht-form-control-color))));
|
|
148
219
|
/* - The browser default focus ring should apply when these CSS custom properties are not set.
|
|
149
220
|
* - Make the `box-shadow` value available, so components that have their own `box-shadow`
|
|
150
221
|
* can combine it with the focus ring box shadow.
|
|
@@ -182,9 +253,9 @@
|
|
|
182
253
|
color: var(--utrecht-textbox-read-only-color, var(--utrecht-form-control-read-only-color, var(--utrecht-textbox-color, var(--utrecht-form-control-color))));
|
|
183
254
|
}
|
|
184
255
|
.utrecht-textbox--html-input:disabled {
|
|
185
|
-
background-color: var(--utrecht-textbox-disabled-background-color, var(--utrecht-form-control-disabled-background-color, var(--utrecht-
|
|
186
|
-
border-color: var(--utrecht-textbox-disabled-border-color, var(--utrecht-form-control-disabled-border-color, var(--utrecht-
|
|
187
|
-
color: var(--utrecht-textbox-disabled-color, var(--utrecht-form-control-disabled-color, var(--utrecht-
|
|
256
|
+
background-color: var(--utrecht-textbox-disabled-background-color, var(--utrecht-form-control-disabled-background-color, var(--utrecht-textbox-background-color, var(--utrecht-form-control-background-color))));
|
|
257
|
+
border-color: var(--utrecht-textbox-disabled-border-color, var(--utrecht-form-control-disabled-border-color, var(--utrecht-textbox-border-color, var(--utrecht-form-control-border-color))));
|
|
258
|
+
color: var(--utrecht-textbox-disabled-color, var(--utrecht-form-control-disabled-color, var(--utrecht-textbox-color, var(--utrecht-form-control-color))));
|
|
188
259
|
cursor: var(--utrecht-action-disabled-cursor, not-allowed);
|
|
189
260
|
}
|
|
190
261
|
.utrecht-textbox--html-input::placeholder {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
2
|
|
|
3
|
-
const badgeCounterCss = ".utrecht-badge-counter{background-color:var(--utrecht-badge-counter-background-color, var(--utrecht-badge-background-color, hsl(0, 0%, 0%)));border-radius:var(--utrecht-badge-counter-border-radius, var(--utrecht-badge-border-radius, 0.5ch));color:var(--utrecht-badge-counter-color, var(--utrecht-badge-color, hsl(0, 0%, 100%)));display:inline-block;font-family:var(--utrecht-document-font-family, sans-serif);font-size:var(--utrecht-badge-counter-font-size);font-style:var(--utrecht-badge-counter-font-style, normal);font-weight:var(--utrecht-badge-counter-font-weight, var(--utrecht-badge-font-weight, bold));line-height:1;max-block-size:max-content;max-inline-size:max-content;min-block-size:var(--utrecht-badge-counter-min-size, 1em);min-inline-size:var(--utrecht-badge-counter-min-size, 1em);padding-block-end:var(--utrecht-badge-counter-padding-block, var(--utrecht-badge-padding-block, 0.5ex));padding-block-start:var(--utrecht-badge-counter-padding-block, var(--utrecht-badge-padding-block, 0.5ex));padding-inline-end:var(--utrecht-badge-counter-padding-inline, var(--utrecht-badge-padding-inline, 0.5ch));padding-inline-start:var(--utrecht-badge-counter-padding-inline, var(--utrecht-badge-padding-inline, 0.5ch));text-align:center;text-decoration:none;white-space:nowrap}@media screen and (-ms-high-contrast: active), screen and (forced-colors: active){.utrecht-badge-counter{border-color:currentColor;border-style:solid;border-width:1px}}:host{display:inline-block}:host([hidden]){display:none !important}";
|
|
3
|
+
const badgeCounterCss = ".utrecht-badge-counter{background-color:var(--utrecht-badge-counter-background-color, var(--utrecht-badge-background-color, hsl(0, 0%, 0%)));border-radius:var(--utrecht-badge-counter-border-radius, var(--utrecht-badge-border-radius, 0.5ch));color:var(--utrecht-badge-counter-color, var(--utrecht-badge-color, hsl(0, 0%, 100%)));display:inline-block;font-family:var(--utrecht-badge-counter-font-family, var(--utrecht-badge-font-family, var(--utrecht-document-font-family, sans-serif)));font-size:var(--utrecht-badge-counter-font-size, var(--utrecht-badge-font-size));font-style:var(--utrecht-badge-counter-font-style, normal);font-weight:var(--utrecht-badge-counter-font-weight, var(--utrecht-badge-font-weight, bold));line-height:1;max-block-size:max-content;max-inline-size:max-content;min-block-size:var(--utrecht-badge-counter-min-size, 1em);min-inline-size:var(--utrecht-badge-counter-min-size, 1em);padding-block-end:var(--utrecht-badge-counter-padding-block, var(--utrecht-badge-padding-block, 0.5ex));padding-block-start:var(--utrecht-badge-counter-padding-block, var(--utrecht-badge-padding-block, 0.5ex));padding-inline-end:var(--utrecht-badge-counter-padding-inline, var(--utrecht-badge-padding-inline, 0.5ch));padding-inline-start:var(--utrecht-badge-counter-padding-inline, var(--utrecht-badge-padding-inline, 0.5ch));text-align:center;text-decoration:none;white-space:nowrap}@media screen and (-ms-high-contrast: active), screen and (forced-colors: active){.utrecht-badge-counter{border-color:currentColor;border-style:solid;border-width:1px}}:host{display:inline-block}:host([hidden]){display:none !important}";
|
|
4
4
|
|
|
5
5
|
const BadgeCounter = /*@__PURE__*/ proxyCustomElement(class BadgeCounter extends HTMLElement {
|
|
6
6
|
constructor() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"utrecht-badge-counter.js","mappings":";;AAAA,MAAM,eAAe,GAAG,
|
|
1
|
+
{"file":"utrecht-badge-counter.js","mappings":";;AAAA,MAAM,eAAe,GAAG,ylDAAylD;;MCapmD,YAAY;;;;;;;;;IAKvB,MAAM;QACJ,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;QAEpC,MAAM,OAAO,GAAG,OAAO,GAAG,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;QACpG,MAAM,YAAY,GAAG,CAAC,CAAS,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QAC/F,MAAM,WAAW,GAAG,OAAO,GAAG,GAAG,YAAY,CAAC,GAAG,CAAC,GAAG,GAAG,OAAO,KAAK,KAAK,QAAQ,GAAG,YAAY,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;QAE7G,OAAO,WAAK,KAAK,EAAC,uBAAuB,IAAE,WAAW,GAAG,WAAW,GAAG,eAAa,CAAO,CAAC;KAC7F;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/badge-counter.scss?tag=utrecht-badge-counter&encapsulation=shadow","src/components/badge-counter.tsx"],"sourcesContent":["/**\n * @license EUPL-1.2\n * Copyright (c) 2020-2022 Gemeente Utrecht\n * Copyright (c) 2020-2022 Frameless B.V.\n */\n\n@import \"~@utrecht/components/badge-counter/css\";\n\n:host {\n display: inline-block;\n}\n\n:host([hidden]) {\n display: none !important;\n}\n","/**\n * @license EUPL-1.2\n * Copyright (c) 2020-2022 Gemeente Utrecht\n * Copyright (c) 2020-2022 Frameless B.V.\n */\n\nimport { Component, h, Prop } from '@stencil/core';\n\n@Component({\n tag: 'utrecht-badge-counter',\n styleUrl: 'badge-counter.scss',\n shadow: true,\n})\nexport class BadgeCounter {\n @Prop() value: number;\n @Prop() max: number;\n @Prop() locale: string;\n\n render() {\n const { locale, max, value } = this;\n\n const limited = typeof max === 'number' && typeof value === 'number' && Number(value) > Number(max);\n const formatNumber = (n: number) => (locale ? Intl.NumberFormat(locale).format(n) : String(n));\n const textContent = limited ? `${formatNumber(max)}+` : typeof value === 'number' ? formatNumber(value) : '';\n\n return <div class=\"utrecht-badge-counter\">{textContent ? textContent : <slot></slot>}</div>;\n }\n}\n"],"version":3}
|