@utrecht/web-component-library-stencil 1.0.0-alpha.293 → 1.0.0-alpha.294
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/collection/article/web-component/index.css +6 -3
- package/dist/collection/article/web-component/index.stencil.js +5 -0
- package/dist/collection/backdrop/web-component/index.css +6 -3
- package/dist/collection/backdrop/web-component/index.stencil.js +2 -1
- package/dist/collection/badge-counter/web-component/index.css +4 -2
- package/dist/collection/badge-counter/web-component/index.stencil.js +2 -1
- package/dist/collection/badge-data/web-component/index.css +6 -3
- package/dist/collection/badge-data/web-component/index.stencil.js +2 -1
- package/dist/collection/badge-status/web-component/index.css +6 -3
- package/dist/collection/badge-status/web-component/index.stencil.js +2 -1
- package/dist/collection/html-content/web-component/index.css +4 -2
- package/dist/collection/link-list/css/template.js +1 -1
- package/dist/components/article/web-component/index.stencil.d.ts +5 -0
- package/dist/components/article/web-component/index.stencil.js +5 -0
- package/dist/components/backdrop/web-component/index.stencil.d.ts +5 -0
- package/dist/components/backdrop/web-component/index.stencil.js +5 -4
- package/dist/components/badge-counter/web-component/index.stencil.d.ts +5 -0
- package/dist/components/badge-counter/web-component/index.stencil.js +5 -4
- package/dist/components/badge-data/web-component/index.stencil.d.ts +5 -0
- package/dist/components/badge-data/web-component/index.stencil.js +5 -4
- package/dist/components/badge-status/web-component/index.stencil.d.ts +5 -0
- package/dist/components/badge-status/web-component/index.stencil.js +5 -4
- package/dist/packages/web-component-library-stencil/dist/types/article/web-component/index.stencil.d.ts +5 -0
- package/dist/packages/web-component-library-stencil/dist/types/backdrop/web-component/index.stencil.d.ts +5 -0
- package/dist/packages/web-component-library-stencil/dist/types/badge-counter/web-component/index.stencil.d.ts +5 -0
- package/dist/packages/web-component-library-stencil/dist/types/badge-data/web-component/index.stencil.d.ts +5 -0
- package/dist/packages/web-component-library-stencil/dist/types/badge-status/web-component/index.stencil.d.ts +5 -0
- package/dist/types/article/web-component/index.stencil.d.ts +5 -0
- package/dist/types/backdrop/web-component/index.stencil.d.ts +5 -0
- package/dist/types/badge-counter/web-component/index.stencil.d.ts +5 -0
- package/dist/types/badge-data/web-component/index.stencil.d.ts +5 -0
- package/dist/types/badge-status/web-component/index.stencil.d.ts +5 -0
- package/package.json +2 -2
- package/dist/collection/alternate-lang-nav/css/template.js +0 -12
- package/dist/collection/article/css/template.js +0 -6
- package/dist/collection/article/html/template.js +0 -5
- package/dist/collection/article/web-component/template.js +0 -1
- package/dist/collection/backdrop/css/template.js +0 -28
- package/dist/collection/backdrop/web-component/template.js +0 -17
- package/dist/collection/badge-counter/css/template.js +0 -7
- package/dist/collection/badge-counter/web-component/template.js +0 -4
- package/dist/collection/badge-data/css/template.js +0 -6
- package/dist/collection/badge-data/web-component/template.js +0 -1
- package/dist/collection/badge-status/css/template.js +0 -7
- package/dist/collection/badge-status/web-component/template.js +0 -4
- package/dist/collection/breadcrumb/css/template.js +0 -41
- package/dist/collection/button/css/stories/02-appearance.js +0 -57
- package/dist/collection/button/css/template.js +0 -82
- package/dist/collection/button/html/template.js +0 -41
- package/dist/collection/button/web-component/template.js +0 -44
- package/dist/collection/button-group/css/template.js +0 -13
- package/dist/collection/button-link/css/template.js +0 -25
- package/dist/collection/checkbox/css/template.js +0 -19
- package/dist/collection/checkbox/html/template.js +0 -14
- package/dist/collection/checkbox/web-component/template.js +0 -8
- package/dist/collection/custom-checkbox/css/template.js +0 -46
- package/dist/collection/custom-checkbox/web-component/template.js +0 -22
- package/dist/collection/custom-radio-button/css/template.js +0 -30
- package/dist/collection/digid-button/css/template.js +0 -16
- package/dist/collection/digid-button/web-component/template.js +0 -1
- package/dist/collection/link/css/template.js +0 -57
- package/dist/collection/link/html/template.js +0 -11
- package/dist/collection/page/css/template.js +0 -6
- package/dist/collection/page/web-component/template.js +0 -5
- package/dist/collection/page-content/css/template.js +0 -10
- package/dist/collection/page-content/web-component/template.js +0 -1
- package/dist/collection/paragraph/web-component/template.js +0 -12
- package/dist/collection/unordered-list/css/template.js +0 -28
- package/dist/collection/unordered-list/html/template.js +0 -22
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license EUPL-1.2
|
|
3
|
-
* Copyright (c) 2022 Robbert Broersma
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import { Button } from '../template';
|
|
7
|
-
|
|
8
|
-
export const defaultArgs = {
|
|
9
|
-
textContent: '',
|
|
10
|
-
defaultButton: true,
|
|
11
|
-
primaryActionButton: false,
|
|
12
|
-
secondaryActionButton: false,
|
|
13
|
-
subtleButton: false,
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export const ButtonTable = ({
|
|
17
|
-
textContent = '',
|
|
18
|
-
defaultButton = true,
|
|
19
|
-
primaryActionButton = false,
|
|
20
|
-
secondaryActionButton = false,
|
|
21
|
-
subtleButton = false,
|
|
22
|
-
}) => {
|
|
23
|
-
const appearances = [
|
|
24
|
-
defaultButton && 'button',
|
|
25
|
-
primaryActionButton && 'primary-action-button',
|
|
26
|
-
secondaryActionButton && 'secondary-action-button',
|
|
27
|
-
subtleButton && 'subtle-button',
|
|
28
|
-
].filter(Boolean);
|
|
29
|
-
return `<table class="utrecht-table" style="inline-size: auto">
|
|
30
|
-
<thead class="utrecht--table__header">
|
|
31
|
-
<tr class="utrecht-table__row">
|
|
32
|
-
<th class="utrecht-table__header-cell"></th>
|
|
33
|
-
<th class="utrecht-table__header-cell">Default</th>
|
|
34
|
-
<th class="utrecht-table__header-cell">Active</th>
|
|
35
|
-
<th class="utrecht-table__header-cell">Hover</th>
|
|
36
|
-
<th class="utrecht-table__header-cell">Focus</th>
|
|
37
|
-
<th class="utrecht-table__header-cell">Focus visible</th>
|
|
38
|
-
<th class="utrecht-table__header-cell">Disabled</th>
|
|
39
|
-
</tr>
|
|
40
|
-
</thead>
|
|
41
|
-
<tbody class="utrecht--table__body">${appearances
|
|
42
|
-
.map(
|
|
43
|
-
(appearance) => `
|
|
44
|
-
<tr class="utrecht-table__row">
|
|
45
|
-
<th class="utrecht-table__header-cell">${appearance}</th>
|
|
46
|
-
<td class="utrecht-table__cell">${Button({ appearance, textContent })}</td>
|
|
47
|
-
<td class="utrecht-table__cell">${Button({ appearance, textContent, active: true })}</td>
|
|
48
|
-
<td class="utrecht-table__cell">${Button({ appearance, textContent, hover: true })}</td>
|
|
49
|
-
<td class="utrecht-table__cell">${Button({ appearance, textContent, focus: true })}</td>
|
|
50
|
-
<td class="utrecht-table__cell">${Button({ appearance, textContent, focus: true, focusVisible: true })}</td>
|
|
51
|
-
<td class="utrecht-table__cell">${Button({ appearance, textContent, disabled: true })}</td>
|
|
52
|
-
</tr>`,
|
|
53
|
-
)
|
|
54
|
-
.join('')}
|
|
55
|
-
</tbody>
|
|
56
|
-
</table>`;
|
|
57
|
-
};
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license EUPL-1.2
|
|
3
|
-
* Copyright (c) 2021 Gemeente Utrecht
|
|
4
|
-
* Copyright (c) 2021 Robbert Broersma
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import clsx from 'clsx';
|
|
8
|
-
|
|
9
|
-
export const defaultArgs = {
|
|
10
|
-
active: false,
|
|
11
|
-
appearance: 'button',
|
|
12
|
-
busy: false,
|
|
13
|
-
disabled: false,
|
|
14
|
-
focus: false,
|
|
15
|
-
focusVisible: false,
|
|
16
|
-
hover: false,
|
|
17
|
-
textContent: '',
|
|
18
|
-
type: 'button',
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export const argTypes = {
|
|
22
|
-
active: {
|
|
23
|
-
description: 'Active',
|
|
24
|
-
control: 'boolean',
|
|
25
|
-
},
|
|
26
|
-
appearance: {
|
|
27
|
-
description: 'Appearance',
|
|
28
|
-
control: { type: 'select' },
|
|
29
|
-
options: ['', 'button', 'primary-action-button', 'secondary-action-button', 'subtle-button'],
|
|
30
|
-
},
|
|
31
|
-
busy: {
|
|
32
|
-
description: 'Busy',
|
|
33
|
-
control: 'boolean',
|
|
34
|
-
},
|
|
35
|
-
disabled: {
|
|
36
|
-
description: 'Disabled',
|
|
37
|
-
control: 'boolean',
|
|
38
|
-
},
|
|
39
|
-
focus: {
|
|
40
|
-
description: 'Focus',
|
|
41
|
-
control: 'boolean',
|
|
42
|
-
},
|
|
43
|
-
focusVisible: {
|
|
44
|
-
description: 'Focus visible',
|
|
45
|
-
control: 'boolean',
|
|
46
|
-
},
|
|
47
|
-
hover: {
|
|
48
|
-
description: 'Hover',
|
|
49
|
-
control: 'boolean',
|
|
50
|
-
},
|
|
51
|
-
textContent: {
|
|
52
|
-
description: 'Button text',
|
|
53
|
-
control: 'text',
|
|
54
|
-
},
|
|
55
|
-
type: {
|
|
56
|
-
control: { type: 'select' },
|
|
57
|
-
options: ['', 'button', 'reset', 'submit'],
|
|
58
|
-
},
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
export const Button = ({
|
|
62
|
-
active = false,
|
|
63
|
-
appearance = null,
|
|
64
|
-
busy = false,
|
|
65
|
-
disabled = false,
|
|
66
|
-
focus = false,
|
|
67
|
-
focusVisible = false,
|
|
68
|
-
hover = false,
|
|
69
|
-
textContent = '',
|
|
70
|
-
type = 'button',
|
|
71
|
-
}) =>
|
|
72
|
-
`<button class="${clsx('utrecht-button', {
|
|
73
|
-
'utrecht-button--active': active,
|
|
74
|
-
'utrecht-button--busy': busy,
|
|
75
|
-
'utrecht-button--hover': hover,
|
|
76
|
-
'utrecht-button--focus': focus,
|
|
77
|
-
'utrecht-button--focus-visible': focusVisible,
|
|
78
|
-
'utrecht-button--disabled': disabled,
|
|
79
|
-
'utrecht-button--primary-action': appearance === 'primary-action-button',
|
|
80
|
-
'utrecht-button--secondary-action': appearance === 'secondary-action-button',
|
|
81
|
-
'utrecht-button--subtle': appearance === 'subtle-button',
|
|
82
|
-
})}"${disabled ? ' aria-disabled="true"' : ''} type="${type}">${textContent}</button>`;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license EUPL-1.2
|
|
3
|
-
* Copyright (c) 2021 Robbert Broersma
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
export const defaultArgs = {
|
|
7
|
-
busy: false,
|
|
8
|
-
disabled: false,
|
|
9
|
-
focusable: false,
|
|
10
|
-
textContent: '',
|
|
11
|
-
type: 'button',
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export const argTypes = {
|
|
15
|
-
busy: {
|
|
16
|
-
description: 'Busy',
|
|
17
|
-
control: 'boolean',
|
|
18
|
-
},
|
|
19
|
-
disabled: {
|
|
20
|
-
description: 'Disabled',
|
|
21
|
-
control: 'boolean',
|
|
22
|
-
},
|
|
23
|
-
focusable: {
|
|
24
|
-
description: 'Focusable',
|
|
25
|
-
control: 'boolean',
|
|
26
|
-
},
|
|
27
|
-
textContent: {
|
|
28
|
-
description: 'Content of the button',
|
|
29
|
-
control: 'text',
|
|
30
|
-
},
|
|
31
|
-
type: {
|
|
32
|
-
description: 'Type',
|
|
33
|
-
control: { type: 'select' },
|
|
34
|
-
options: ['', 'button', 'reset', 'submit'],
|
|
35
|
-
},
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
export const Button = ({ busy = false, disabled = false, focusable = false, textContent = '', type = 'button' }) =>
|
|
39
|
-
`<button type="${type || 'button'}"${busy ? ' aria-busy="true"' : ''}${
|
|
40
|
-
disabled ? (focusable ? ' aria-disabled="true"' : ' disabled') : ''
|
|
41
|
-
}>${textContent}</button>`;
|
|
@@ -1,44 +0,0 @@
|
|
|
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>`;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import clsx from 'clsx';
|
|
2
|
-
|
|
3
|
-
export const defaultArgs = {
|
|
4
|
-
direction: 'horizontal',
|
|
5
|
-
innerHTML: '',
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
export const ButtonGroup = ({ innerHTML = '', direction = 'horizontal' }) =>
|
|
9
|
-
`<div class="${clsx(
|
|
10
|
-
'utrecht-button-group',
|
|
11
|
-
direction === 'horizontal' && 'utrecht-button-group--horizontal',
|
|
12
|
-
direction === 'vertical' && 'utrecht-button-group--vertical',
|
|
13
|
-
)}" role="group">${innerHTML}</div>`;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import clsx from 'clsx';
|
|
2
|
-
|
|
3
|
-
export const defaultArgs = {
|
|
4
|
-
external: false,
|
|
5
|
-
hover: false,
|
|
6
|
-
href: '',
|
|
7
|
-
focus: false,
|
|
8
|
-
focusVisible: false,
|
|
9
|
-
textContent: '',
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export const ButtonLink = ({
|
|
13
|
-
external = false,
|
|
14
|
-
hover = false,
|
|
15
|
-
href = '',
|
|
16
|
-
focus = false,
|
|
17
|
-
focusVisible = false,
|
|
18
|
-
textContent = '',
|
|
19
|
-
}) =>
|
|
20
|
-
`<a role="button" href="${href}" class="${clsx(
|
|
21
|
-
'utrecht-button-link',
|
|
22
|
-
hover && 'utrecht-button-link--hover',
|
|
23
|
-
focus && 'utrecht-button-link--focus',
|
|
24
|
-
focusVisible && 'utrecht-button-link--focus-visible',
|
|
25
|
-
)}"${external ? ' rel="external noopener noreferrer"' : ''}>${textContent}</a>`;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license EUPL-1.2
|
|
3
|
-
* Copyright (c) 2021 Robbert Broersma
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import clsx from 'clsx';
|
|
7
|
-
|
|
8
|
-
export const defaultArgs = {
|
|
9
|
-
checked: false,
|
|
10
|
-
disabled: false,
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export const Checkbox = ({ checked = false, disabled = false }) =>
|
|
14
|
-
`<input type="checkbox"${checked ? ' checked' : ''}${disabled ? ' disabled' : ''} class="${clsx(
|
|
15
|
-
'utrecht-checkbox',
|
|
16
|
-
'utrecht-checkbox--html-input',
|
|
17
|
-
checked && 'utrecht-checkbox--checked',
|
|
18
|
-
disabled && 'utrecht-checkbox--disabled',
|
|
19
|
-
)}">`;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export const defaultArgs = {
|
|
2
|
-
checked: false,
|
|
3
|
-
disabled: false,
|
|
4
|
-
invalid: false,
|
|
5
|
-
required: false,
|
|
6
|
-
value: '',
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
export const Checkbox = ({ checked = false, disabled = false, invalid = false, required = false, value = '' }) =>
|
|
10
|
-
`<div class="utrecht-html">
|
|
11
|
-
<input type="checkbox"${checked ? ' checked' : ''}${invalid ? ' aria-invalid="true"' : ''}${
|
|
12
|
-
disabled ? ' disabled' : ''
|
|
13
|
-
}${required ? ' required' : ''}${value ? ` value="${value}"` : ''}>
|
|
14
|
-
</div>`;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export const defaultArgs = {
|
|
2
|
-
checked: false,
|
|
3
|
-
disabled: false,
|
|
4
|
-
value: '',
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
export const Checkbox = ({ checked = false, disabled = false, value = '' } = defaultArgs) =>
|
|
8
|
-
`<utrecht-checkbox${checked ? ' checked="true"' : ''}${disabled ? ' disabled="true"' : ''} value="${value}" />`;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license EUPL-1.2
|
|
3
|
-
* Copyright (c) 2021 Robbert Broersma
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import clsx from 'clsx';
|
|
7
|
-
|
|
8
|
-
export const defaultArgs = {
|
|
9
|
-
active: false,
|
|
10
|
-
checked: false,
|
|
11
|
-
disabled: false,
|
|
12
|
-
focus: false,
|
|
13
|
-
indeterminate: false,
|
|
14
|
-
invalid: false,
|
|
15
|
-
required: false,
|
|
16
|
-
value: '',
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export const CustomCheckbox = ({
|
|
20
|
-
active = false,
|
|
21
|
-
checked = false,
|
|
22
|
-
disabled = false,
|
|
23
|
-
focus = false,
|
|
24
|
-
indeterminate = false,
|
|
25
|
-
invalid = false,
|
|
26
|
-
required = false,
|
|
27
|
-
value = '',
|
|
28
|
-
}) =>
|
|
29
|
-
`<span class="utrecht-custom-checkbox">
|
|
30
|
-
<input type="checkbox"${checked ? ' checked' : ''}${disabled ? ' disabled' : ''}${required ? ' required' : ''}${
|
|
31
|
-
value ? ` value="${value}"` : ''
|
|
32
|
-
} class="utrecht-custom-checkbox__input">
|
|
33
|
-
<span class="${clsx(
|
|
34
|
-
'utrecht-custom-checkbox__box',
|
|
35
|
-
active && 'utrecht-custom-checkbox__box--active',
|
|
36
|
-
checked && 'utrecht-custom-checkbox__box--checked',
|
|
37
|
-
!checked && 'utrecht-custom-checkbox__box--not-checked',
|
|
38
|
-
disabled && 'utrecht-custom-checkbox__box--disabled',
|
|
39
|
-
focus && 'utrecht-custom-checkbox__box--focus',
|
|
40
|
-
invalid && 'utrecht-custom-checkbox__box--invalid',
|
|
41
|
-
indeterminate && 'utrecht-custom-checkbox__box--indeterminate',
|
|
42
|
-
)}">
|
|
43
|
-
<utrecht-icon-checkmark class="utrecht-custom-checkbox__icon utrecht-custom-checkbox__icon--checked">✔</utrecht-icon-checkmark>
|
|
44
|
-
<utrecht-icon-indeterminate class="utrecht-custom-checkbox__icon utrecht-custom-checkbox__icon--indeterminate">■</utrecht-icon-indeterminate>
|
|
45
|
-
</span>
|
|
46
|
-
</span>`;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export const defaultArgs = {
|
|
2
|
-
checked: false,
|
|
3
|
-
disabled: false,
|
|
4
|
-
indeterminate: false,
|
|
5
|
-
invalid: false,
|
|
6
|
-
required: false,
|
|
7
|
-
value: '',
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export const CustomCheckbox = ({
|
|
11
|
-
checked = false,
|
|
12
|
-
disabled = false,
|
|
13
|
-
indeterminate = false,
|
|
14
|
-
invalid = false,
|
|
15
|
-
required = false,
|
|
16
|
-
value = '',
|
|
17
|
-
}) =>
|
|
18
|
-
`<utrecht-custom-checkbox${checked ? ' checked="true"' : ''}${disabled ? ' disabled="true"' : ''}${
|
|
19
|
-
indeterminate ? ' indeterminate="true"' : ''
|
|
20
|
-
}${invalid ? ' invalid="true"' : ''}${required ? ' required="true"' : ''}${
|
|
21
|
-
value ? ` value="${value}"` : ''
|
|
22
|
-
}></utrecht-custom-checkbox>`;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license EUPL-1.2
|
|
3
|
-
* Copyright (c) 2021 Robbert Broersma
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import clsx from 'clsx';
|
|
7
|
-
|
|
8
|
-
export const defaultArgs = {
|
|
9
|
-
checked: false,
|
|
10
|
-
disabled: false,
|
|
11
|
-
active: false,
|
|
12
|
-
focus: false,
|
|
13
|
-
invalid: false,
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export const CustomRadioButton = ({
|
|
17
|
-
checked = false,
|
|
18
|
-
disabled = false,
|
|
19
|
-
active = false,
|
|
20
|
-
focus = false,
|
|
21
|
-
invalid = false,
|
|
22
|
-
}) =>
|
|
23
|
-
`<input autofocus="true" type="radio"${checked ? ' checked' : ''}${disabled ? ' disabled' : ''} class="${clsx(
|
|
24
|
-
'utrecht-custom-radio-button',
|
|
25
|
-
checked && 'utrecht-custom-radio-button--checked',
|
|
26
|
-
disabled && 'utrecht-custom-radio-button--disabled',
|
|
27
|
-
active && 'utrecht-custom-radio-button--active',
|
|
28
|
-
focus && 'utrecht-custom-radio-button--focus',
|
|
29
|
-
invalid && 'utrecht-custom-radio-button--invalid',
|
|
30
|
-
)}">`;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license EUPL-1.2
|
|
3
|
-
* Copyright (c) 2021 Robbert Broersma
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
export const defaultArgs = {
|
|
7
|
-
label: '',
|
|
8
|
-
textContent: '',
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export const DigidButton = ({ label = '', textContent = '' }) => `<div class="utrecht-digid-button">
|
|
12
|
-
<utrecht-digid-logo class="utrecht-digid-button__logo"></utrecht-digid-logo>
|
|
13
|
-
<button class="utrecht-digid-button__button utrecht-button utrecht-button--primary-action" type="button"${
|
|
14
|
-
label ? ` aria-label="${label}"` : ''
|
|
15
|
-
}>${textContent}</button>
|
|
16
|
-
</div>`;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const DigidButton = () => `<utrecht-digid-button>Inloggen</utrecht-digid-button>`;
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license EUPL-1.2
|
|
3
|
-
* Copyright (c) 2021 Gemeente Utrecht
|
|
4
|
-
* Copyright (c) 2021 Robbert Broersma
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import clsx from 'clsx';
|
|
8
|
-
|
|
9
|
-
export const defaultArgs = {
|
|
10
|
-
active: false,
|
|
11
|
-
current: false,
|
|
12
|
-
external: false,
|
|
13
|
-
hreflang: '',
|
|
14
|
-
hover: false,
|
|
15
|
-
lang: '',
|
|
16
|
-
focus: false,
|
|
17
|
-
focusVisible: false,
|
|
18
|
-
href: null,
|
|
19
|
-
telephone: false,
|
|
20
|
-
textContent: '...',
|
|
21
|
-
title: '',
|
|
22
|
-
visited: false,
|
|
23
|
-
iconleft: false,
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export const Link = ({
|
|
27
|
-
active = defaultArgs.active,
|
|
28
|
-
current = defaultArgs.current,
|
|
29
|
-
external = defaultArgs.external,
|
|
30
|
-
hreflang = defaultArgs.hreflang,
|
|
31
|
-
hover = defaultArgs.hover,
|
|
32
|
-
lang = defaultArgs.lang,
|
|
33
|
-
focus = defaultArgs.focus,
|
|
34
|
-
focusVisible = defaultArgs.focusVisible,
|
|
35
|
-
href = defaultArgs.href,
|
|
36
|
-
telephone = defaultArgs.telephone,
|
|
37
|
-
textContent = defaultArgs.textContent,
|
|
38
|
-
title = defaultArgs.title,
|
|
39
|
-
visited = defaultArgs.visited,
|
|
40
|
-
iconleft = defaultArgs.iconleft,
|
|
41
|
-
}) =>
|
|
42
|
-
`<a href="${href === null ? `https://example.com/${lang}` : href}" class="${clsx('utrecht-link', {
|
|
43
|
-
'utrecht-link--active': active,
|
|
44
|
-
'utrecht-link--alternate-lang': lang && !current,
|
|
45
|
-
'utrecht-link--current-lang': lang && current,
|
|
46
|
-
'utrecht-link--external': external,
|
|
47
|
-
'utrecht-link--focus': focus,
|
|
48
|
-
'utrecht-link--focus-visible': focusVisible,
|
|
49
|
-
'utrecht-link--hover': hover,
|
|
50
|
-
'utrecht-link--telephone': telephone,
|
|
51
|
-
'utrecht-link--visited': visited,
|
|
52
|
-
'utrecht-link--icon-left': iconleft,
|
|
53
|
-
})}"${external ? ' rel="external noopener noreferrer"' : ''}${current ? ' aria-current="page"' : ''}${
|
|
54
|
-
title ? ` title="${title}"` : ''
|
|
55
|
-
}${hreflang ? ` hreflang="${hreflang}"` : ''}${lang ? ` lang="${lang}"` : ''}${
|
|
56
|
-
!current ? ' rel="alternate"' : ''
|
|
57
|
-
}>${textContent}</a>`;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export const Link = ({ external = false, href = null, textContent = '' }) =>
|
|
2
|
-
`<section class="utrecht-html">
|
|
3
|
-
<a href="${href === null ? '#' : href}"${external ? ' rel="external noopener noreferrer"' : ''}>${textContent}</a>
|
|
4
|
-
</section>`;
|
|
5
|
-
|
|
6
|
-
export const AlternateLangLink = ({ textContent, title, current, lang, hreflang }) =>
|
|
7
|
-
`<section class="utrecht-html">
|
|
8
|
-
<a href="https://example.com/${lang}/" ${
|
|
9
|
-
current ? 'aria-current="page"' : ''
|
|
10
|
-
} title="${title}" hreflang="${hreflang}" lang="${lang}"${!current ? 'rel="alternate"' : ''}>${textContent}</a>
|
|
11
|
-
</section>`;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export const Page = ({ contentHTML = '', footerHTML = '', headerHTML = '' }) => `<utrecht-page>
|
|
2
|
-
<utrecht-page-header>${headerHTML}</utrecht-page-header>
|
|
3
|
-
<utrecht-page-content>${contentHTML}</utrecht-page-content>
|
|
4
|
-
<utrecht-page-footer>${footerHTML}</utrecht-page-footer>
|
|
5
|
-
</utrecht-page>`;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license EUPL-1.2
|
|
3
|
-
* Copyright (c) 2021 Robbert Broersma
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
export const PageContent = ({ asideHTML = null, innerHTML = '', navHTML = null }) => `<div class="utrecht-page-content">
|
|
7
|
-
${navHTML ? ` <nav class="utrecht-page-content__nav">${navHTML}</nav>` : ''}
|
|
8
|
-
<main class="utrecht-page-content__main">${innerHTML}</main>
|
|
9
|
-
${asideHTML ? `<aside class="utrecht-page-content__aside">${asideHTML}</aside>` : ''}
|
|
10
|
-
</div>`;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const PageContent = ({ innerHTML = '' }) => `<utrecht-page-content>${innerHTML}</utrecht-page-content>`;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export const defaultArgs = {
|
|
2
|
-
lead: false,
|
|
3
|
-
textContent: '',
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
export const Paragraph = ({ lead = false, textContent = '' }) =>
|
|
7
|
-
`<utrecht-paragraph ${lead ? 'lead="true"' : ''}">${textContent}</p>`;
|
|
8
|
-
|
|
9
|
-
export const Paragraphs = ({ textContent = '' }) =>
|
|
10
|
-
`<utrecht-paragraph lead="true">${textContent}</utrecht-paragraph>
|
|
11
|
-
<utrecht-paragraph">${textContent}</utrecht-paragraph>
|
|
12
|
-
<utrecht-paragraph">${textContent}</utrecht-paragraph>`;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license EUPL-1.2
|
|
3
|
-
* Copyright (c) 2021 Robbert Broersma
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import clsx from 'clsx';
|
|
7
|
-
|
|
8
|
-
export const defaultArgs = {
|
|
9
|
-
distanced: false,
|
|
10
|
-
items: [],
|
|
11
|
-
nested: false,
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export const UnorderedList = ({ distanced = false, items = [], nested = false }) =>
|
|
15
|
-
`<ul class="${clsx(
|
|
16
|
-
'utrecht-unordered-list',
|
|
17
|
-
distanced && 'utrecht-unordered-list--distanced',
|
|
18
|
-
nested && 'utrecht-unordered-list--nested',
|
|
19
|
-
)}">
|
|
20
|
-
${items
|
|
21
|
-
.map(
|
|
22
|
-
({ items: subItems, textContent }) =>
|
|
23
|
-
` <li class="utrecht-unordered-list__item">${textContent || ''}${
|
|
24
|
-
subItems ? UnorderedList({ nested: true, items: subItems }) : ''
|
|
25
|
-
}</li>`,
|
|
26
|
-
)
|
|
27
|
-
.join('\n')}
|
|
28
|
-
</ul>`;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export const UnorderedList = () =>
|
|
2
|
-
`<section class="utrecht-html">
|
|
3
|
-
<ul>
|
|
4
|
-
<li>Lorem</li>
|
|
5
|
-
<li>Ipsum</li>
|
|
6
|
-
<li>Dolor</li>
|
|
7
|
-
</ul>
|
|
8
|
-
</section>`;
|
|
9
|
-
|
|
10
|
-
export const NestedUnorderedList = () =>
|
|
11
|
-
`<section class="utrecht-html">
|
|
12
|
-
<ul>
|
|
13
|
-
<li>Lorem</li>
|
|
14
|
-
<li>Ipsum
|
|
15
|
-
<ul>
|
|
16
|
-
<li>Lorem</li>
|
|
17
|
-
<li>Ipsum</li>
|
|
18
|
-
</ul>
|
|
19
|
-
</li>
|
|
20
|
-
<li>Dolor</li>
|
|
21
|
-
</ul>
|
|
22
|
-
</section>`;
|