@utrecht/web-component-library-stencil 1.0.0-alpha.82 → 1.0.0-alpha.86
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-icon-arrow.cjs.entry.js +19 -0
- package/dist/cjs/utrecht-icon-cross.cjs.entry.js +19 -0
- package/dist/cjs/utrecht-icon-facebook.cjs.entry.js +1 -1
- package/dist/cjs/utrecht-icon-filter.cjs.entry.js +19 -0
- package/dist/cjs/utrecht-icon-instagram.cjs.entry.js +1 -1
- package/dist/cjs/utrecht-icon-linkedin.cjs.entry.js +1 -1
- package/dist/cjs/utrecht-icon-list.cjs.entry.js +19 -0
- package/dist/cjs/utrecht-icon-loupe.cjs.entry.js +19 -0
- package/dist/cjs/utrecht-icon-twitter.cjs.entry.js +1 -1
- package/dist/cjs/utrecht-icon-whatsapp.cjs.entry.js +1 -1
- package/dist/cjs/utrecht-icon-zoomin.cjs.entry.js +19 -0
- package/dist/cjs/utrecht-icon-zoomout.cjs.entry.js +19 -0
- package/dist/cjs/utrecht.cjs.js +1 -1
- package/dist/collection/alternate-lang-link/bem.js +21 -0
- package/dist/collection/alternate-lang-nav/bem.js +12 -0
- package/dist/collection/article/bem.js +6 -0
- package/dist/collection/badge-counter/bem.js +7 -0
- package/dist/collection/badge-data/bem.js +6 -0
- package/dist/collection/badge-status/bem.js +7 -0
- package/dist/collection/blockquote/bem.js +24 -0
- package/dist/collection/breadcrumb/bem.js +34 -0
- package/dist/collection/button/bem.js +21 -0
- package/dist/collection/collection-manifest.json +7 -0
- package/dist/collection/emphasis/bem.js +19 -0
- package/dist/collection/form-field-checkbox/bem.js +10 -0
- package/dist/collection/form-field-checkbox-group/bem.js +33 -0
- package/dist/collection/form-field-description/bem.js +14 -0
- package/dist/collection/form-field-radio/bem.js +10 -0
- package/dist/collection/form-field-radio-group/bem.js +20 -0
- package/dist/collection/form-fieldset/bem.js +10 -0
- package/dist/collection/form-label/bem.js +22 -0
- package/dist/collection/form-toggle/bem.js +47 -0
- package/dist/collection/heading-1/bem.js +11 -0
- package/dist/collection/heading-2/bem.js +11 -0
- package/dist/collection/heading-3/bem.js +11 -0
- package/dist/collection/heading-4/bem.js +11 -0
- package/dist/collection/heading-5/bem.js +11 -0
- package/dist/collection/heading-6/bem.js +11 -0
- package/dist/collection/icon/arrow.stencil.js +17 -0
- package/dist/collection/icon/cross.stencil.js +17 -0
- package/dist/collection/icon/filter.stencil.js +18 -0
- package/dist/collection/icon/list.stencil.js +21 -0
- package/dist/collection/icon/loupe.stencil.js +17 -0
- package/dist/collection/icon/stencil.css +3 -0
- package/dist/collection/icon/zoomin.stencil.js +18 -0
- package/dist/collection/icon/zoomout.stencil.js +17 -0
- package/dist/collection/link/bem.js +38 -0
- package/dist/collection/link-list/bem.js +10 -0
- package/dist/collection/link-social/bem.js +20 -0
- package/dist/collection/logo/bem.js +33 -0
- package/dist/collection/mapcontrolbutton/bem.js +25 -0
- package/dist/collection/menulijst/bem.js +18 -0
- package/dist/collection/nav-top/bem.js +23 -0
- package/dist/collection/navigatie sidenav/bem.js +43 -0
- package/dist/collection/navigatie topnav/bem.js +25 -0
- package/dist/collection/ordered-list/bem.js +13 -0
- package/dist/collection/page-footer/bem.js +7 -0
- package/dist/collection/pagination/bem.js +54 -0
- package/dist/collection/paragraph/bem.js +14 -0
- package/dist/collection/pre-heading/bem.js +15 -0
- package/dist/collection/search-bar/bem.js +15 -0
- package/dist/collection/select/bem.js +38 -0
- package/dist/collection/separator/bem.js +16 -0
- package/dist/collection/textbox/bem.js +32 -0
- package/dist/collection/unordered-list/bem.js +25 -0
- package/dist/custom-elements/index.d.ts +42 -0
- package/dist/custom-elements/index.js +166 -54
- package/dist/esm/loader.js +1 -1
- package/dist/esm/utrecht-icon-arrow.entry.js +15 -0
- package/dist/esm/utrecht-icon-cross.entry.js +15 -0
- package/dist/esm/utrecht-icon-facebook.entry.js +1 -1
- package/dist/esm/utrecht-icon-filter.entry.js +15 -0
- package/dist/esm/utrecht-icon-instagram.entry.js +1 -1
- package/dist/esm/utrecht-icon-linkedin.entry.js +1 -1
- package/dist/esm/utrecht-icon-list.entry.js +15 -0
- package/dist/esm/utrecht-icon-loupe.entry.js +15 -0
- package/dist/esm/utrecht-icon-twitter.entry.js +1 -1
- package/dist/esm/utrecht-icon-whatsapp.entry.js +1 -1
- package/dist/esm/utrecht-icon-zoomin.entry.js +15 -0
- package/dist/esm/utrecht-icon-zoomout.entry.js +15 -0
- package/dist/esm/utrecht.js +1 -1
- package/dist/icon/arrow.stencil.d.ts +3 -0
- package/dist/icon/arrow.stencil.js +23 -0
- package/dist/icon/cross.stencil.d.ts +3 -0
- package/dist/icon/cross.stencil.js +23 -0
- package/dist/icon/filter.stencil.d.ts +3 -0
- package/dist/icon/filter.stencil.js +24 -0
- package/dist/icon/list.stencil.d.ts +3 -0
- package/dist/icon/list.stencil.js +27 -0
- package/dist/icon/loupe.stencil.d.ts +3 -0
- package/dist/icon/loupe.stencil.js +23 -0
- package/dist/icon/zoomin.stencil.d.ts +3 -0
- package/dist/icon/zoomin.stencil.js +24 -0
- package/dist/icon/zoomout.stencil.d.ts +3 -0
- package/dist/icon/zoomout.stencil.js +23 -0
- package/dist/types/components.d.ts +91 -0
- package/dist/types/icon/arrow.stencil.d.ts +3 -0
- package/dist/types/icon/cross.stencil.d.ts +3 -0
- package/dist/types/icon/filter.stencil.d.ts +3 -0
- package/dist/types/icon/list.stencil.d.ts +3 -0
- package/dist/types/icon/loupe.stencil.d.ts +3 -0
- package/dist/types/icon/zoomin.stencil.d.ts +3 -0
- package/dist/types/icon/zoomout.stencil.d.ts +3 -0
- package/dist/utrecht/{p-b2b8b19a.entry.js → p-02530cfd.entry.js} +1 -1
- package/dist/utrecht/p-152c934f.entry.js +1 -0
- package/dist/utrecht/p-170e6d71.entry.js +1 -0
- package/dist/utrecht/p-2606f67e.entry.js +1 -0
- package/dist/utrecht/p-3d543bd7.entry.js +1 -0
- package/dist/utrecht/{p-4d181c2e.entry.js → p-5177f4f1.entry.js} +1 -1
- package/dist/utrecht/p-5d15fb5c.entry.js +1 -0
- package/dist/utrecht/p-a5113af3.entry.js +1 -0
- package/dist/utrecht/p-a80a05c9.entry.js +1 -0
- package/dist/utrecht/{p-3d53697f.entry.js → p-d0413cfd.entry.js} +1 -1
- package/dist/utrecht/{p-df4e1301.entry.js → p-e276040c.entry.js} +1 -1
- package/dist/utrecht/p-ff065ee5.entry.js +1 -0
- package/dist/utrecht/utrecht.esm.js +1 -1
- package/package.json +2 -2
- package/dist/utrecht/p-3a929416.entry.js +0 -1
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
disabled: false,
|
|
11
|
+
focus: false,
|
|
12
|
+
hover: false,
|
|
13
|
+
icon: null,
|
|
14
|
+
label: '',
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const MapControlButton = ({ disabled = false, focus = false, hover = false, label = '', icon = null }) =>
|
|
18
|
+
`<button type="button" class="${clsx('utrecht-mapcontrolbutton', {
|
|
19
|
+
'utrecht-mapcontrolbutton--hover': hover,
|
|
20
|
+
'utrecht-mapcontrolbutton--focus': focus,
|
|
21
|
+
'utrecht-mapcontrolbutton--disabled': disabled,
|
|
22
|
+
})}"${disabled ? ' aria-disabled="true"' : ''}>
|
|
23
|
+
${icon ? `<${icon} class="utrecht-mapcontrolbutton__icon"></${icon}>` : ''}
|
|
24
|
+
${label ? `<span class="utrecht-mapcontrolbutton__label">${label}</span>` : ''}
|
|
25
|
+
</button>`;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license EUPL-1.2
|
|
3
|
+
* Copyright (c) 2021 Gemeente Utrecht
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export const Menulijst = ({ href = 'https://example.com/' }) =>
|
|
7
|
+
`<ul class="utrecht-menulijst">
|
|
8
|
+
<li class="utrecht-menulijst__item utrecht-menulijst__item--active">
|
|
9
|
+
<a class="utrecht-menulijst__link" href="${href}">Menu item label #1</a>
|
|
10
|
+
</li>
|
|
11
|
+
<li class="utrecht-menulijst__item">
|
|
12
|
+
<a class="utrecht-menulijst__link" href="${href}">Menu item label #2</a>
|
|
13
|
+
</li>
|
|
14
|
+
<li class="utrecht-menulijst__item">
|
|
15
|
+
<a class="utrecht-menulijst__link" href="${href}">Menu item label #3</a>
|
|
16
|
+
</li>
|
|
17
|
+
</ul>
|
|
18
|
+
`;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license EUPL-1.2
|
|
3
|
+
* Copyright (c) 2021 Gemeente Utrecht
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import clsx from 'clsx';
|
|
7
|
+
|
|
8
|
+
export const TopNav = ({ items }) => `<div class="utrecht-navhtml">
|
|
9
|
+
<nav class="topnav">
|
|
10
|
+
<ul class="utrecht-topnav__list">${items.map(
|
|
11
|
+
({ href, title, current, focus }) => `
|
|
12
|
+
<li class="utrecht-topnav__item">
|
|
13
|
+
<a class="${clsx(
|
|
14
|
+
'utrecht-topnav__link',
|
|
15
|
+
current && 'utrecht-topnav__link--current',
|
|
16
|
+
focus && 'utrecht-topnav__link--focus',
|
|
17
|
+
)}" href="${href}">${title}</a>
|
|
18
|
+
</li>`,
|
|
19
|
+
)}
|
|
20
|
+
</ul>
|
|
21
|
+
</nav>
|
|
22
|
+
</div>
|
|
23
|
+
`;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license EUPL-1.2
|
|
3
|
+
* Copyright (c) 2021 Gemeente Utrecht
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import clsx from 'clsx';
|
|
7
|
+
|
|
8
|
+
export const SideNav = ({ items }) => `<nav class="utrecht-sidenav">
|
|
9
|
+
<ul class="utrecht-sidenav__list">${items
|
|
10
|
+
.map(
|
|
11
|
+
({ href, title, current, focus, children, sibling, haschildren }) => `<li class="${clsx(
|
|
12
|
+
'utrecht-sidenav__item',
|
|
13
|
+
sibling && 'utrecht-sidenav__item--sibling',
|
|
14
|
+
haschildren && 'utrecht-sidenav__item--has-children',
|
|
15
|
+
)}">
|
|
16
|
+
<a class="${clsx(
|
|
17
|
+
'utrecht-sidenav__link',
|
|
18
|
+
current && 'utrecht-sidenav__link--current',
|
|
19
|
+
focus && 'utrecht-sidenav__link--focus',
|
|
20
|
+
sibling && 'utrecht-sidenav__link--sibling',
|
|
21
|
+
haschildren && 'utrecht-sidenav__link--has-children',
|
|
22
|
+
)}" href="${href}">${title}</a><span></span>
|
|
23
|
+
${
|
|
24
|
+
children
|
|
25
|
+
? `<ul class="utrecht-sidenav__list utrecht-sidenav__list--child">${children
|
|
26
|
+
.map(
|
|
27
|
+
({ href, title, current, focus }) =>
|
|
28
|
+
`<li class="utrecht-sidenav__item utrecht-sidenav__item--child"><a class="${clsx(
|
|
29
|
+
'utrecht-sidenav__link utrecht-sidenav__link--child',
|
|
30
|
+
current && 'utrecht-sidenav__link--current utrecht-sidenav__link--child--current',
|
|
31
|
+
focus && 'utrecht-sidenav__link--focus',
|
|
32
|
+
)}" href="${href}">${title}</a></li>`,
|
|
33
|
+
)
|
|
34
|
+
.join('')}
|
|
35
|
+
</ul><span></span>`
|
|
36
|
+
: ''
|
|
37
|
+
}
|
|
38
|
+
</li>`,
|
|
39
|
+
)
|
|
40
|
+
.join('')}
|
|
41
|
+
</ul>
|
|
42
|
+
</nav>
|
|
43
|
+
`;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license EUPL-1.2
|
|
3
|
+
* Copyright (c) 2021 Gemeente Utrecht
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import clsx from 'clsx';
|
|
7
|
+
|
|
8
|
+
export const TopNav = ({ items }) => `<div class="utrecht-navhtml">
|
|
9
|
+
<nav class="topnav">
|
|
10
|
+
<ul class="utrecht-topnav__list">${items
|
|
11
|
+
.map(
|
|
12
|
+
({ href, title, current, focus }) => `
|
|
13
|
+
<li class="utrecht-topnav__item">
|
|
14
|
+
<a class="${clsx(
|
|
15
|
+
'utrecht-topnav__link',
|
|
16
|
+
current && 'utrecht-topnav__link--current',
|
|
17
|
+
focus && 'utrecht-topnav__link--focus',
|
|
18
|
+
)}" href="${href}">${title}</a>
|
|
19
|
+
</li>`,
|
|
20
|
+
)
|
|
21
|
+
.join('')}
|
|
22
|
+
</ul>
|
|
23
|
+
</nav>
|
|
24
|
+
</div>
|
|
25
|
+
`;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license EUPL-1.2
|
|
3
|
+
* Copyright (c) 2021 Robbert Broersma
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import clsx from 'clsx';
|
|
7
|
+
|
|
8
|
+
export const OrderedList = ({ distanced = false }) =>
|
|
9
|
+
`<ol class="${clsx('utrecht-ordered-list', distanced && 'utrecht-ordered-list--distanced')}">
|
|
10
|
+
<li class="utrecht-ordered-list__item">Lorem</li>
|
|
11
|
+
<li class="utrecht-ordered-list__item">Ipsum</li>
|
|
12
|
+
<li class="utrecht-ordered-list__item">Dolor</li>
|
|
13
|
+
</ol>`;
|
|
@@ -0,0 +1,54 @@
|
|
|
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
|
+
};
|
|
11
|
+
|
|
12
|
+
export const LinkTemplate = ({ disabled = false, href = '', rel = null, textContent = '', title = '' }) =>
|
|
13
|
+
`<${disabled ? 'span' : 'a'} href="${href}" class="${clsx(
|
|
14
|
+
'utrecht-pagination__relative-link',
|
|
15
|
+
disabled && 'utrecht-pagination__relative-link--disabled',
|
|
16
|
+
rel === 'next' && 'utrecht-pagination__relative-link--next',
|
|
17
|
+
rel === 'prev' && 'utrecht-pagination__relative-link--prev',
|
|
18
|
+
)}"${rel ? ` rel="${rel}"` : ''}${title ? ` aria-label="${title}"` : ''}>${textContent}</${disabled ? 'span' : 'a'}>`;
|
|
19
|
+
|
|
20
|
+
export const ItemTemplate = ({ current = false, href = '', rel = null, textContent = '' }) =>
|
|
21
|
+
`<a class="${clsx(
|
|
22
|
+
'utrecht-pagination__page-link',
|
|
23
|
+
current && 'utrecht-pagination__page-link--current',
|
|
24
|
+
)}" href="${href}"${current ? ' aria-current="true"' : ''}${rel ? ` rel="${rel}"` : ''}>${textContent}</a>`;
|
|
25
|
+
|
|
26
|
+
export const Pagination = ({ currentIndex = -1, distanced = false, links = [], next = null, prev = null }) =>
|
|
27
|
+
`<nav class="${clsx(
|
|
28
|
+
'utrecht-pagination',
|
|
29
|
+
distanced && 'utrecht-pagination--distanced',
|
|
30
|
+
)}"><span class="utrecht-pagination__before">${
|
|
31
|
+
prev ? LinkTemplate({ ...prev, rel: 'prev', textContent: 'Vorige' }) : ''
|
|
32
|
+
}</span><span role="group" class="utrecht-pagination__pages">${links
|
|
33
|
+
.sort((a, b) => (a.index === b.index ? 0 : a.index > b.index ? 1 : -1))
|
|
34
|
+
.map((link, arrayIndex) => {
|
|
35
|
+
const index = typeof link.index === 'number' ? link.index : arrayIndex;
|
|
36
|
+
return {
|
|
37
|
+
index,
|
|
38
|
+
current: typeof currentIndex === 'number' && index === currentIndex,
|
|
39
|
+
rel:
|
|
40
|
+
typeof currentIndex === 'number'
|
|
41
|
+
? index === currentIndex + 1
|
|
42
|
+
? 'next'
|
|
43
|
+
: index === currentIndex - 1
|
|
44
|
+
? 'prev'
|
|
45
|
+
: null
|
|
46
|
+
: null,
|
|
47
|
+
textContent: link.index || index,
|
|
48
|
+
...link,
|
|
49
|
+
};
|
|
50
|
+
})
|
|
51
|
+
.map((link) => ItemTemplate(link))
|
|
52
|
+
.join('')}</span><span class="utrecht-pagination__before">${
|
|
53
|
+
next ? LinkTemplate({ ...next, rel: 'next', textContent: 'Volgende' }) : ''
|
|
54
|
+
}</span></nav>`;
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
lead: false,
|
|
10
|
+
textContent: '',
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const Paragraph = ({ textContent = '', lead = false }) =>
|
|
14
|
+
`<p class="${clsx('utrecht-paragraph', { 'utrecht-paragraph--lead': lead })}">${textContent}</p>`;
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
};
|
|
11
|
+
|
|
12
|
+
export const PreHeading = ({ textContent = '', distanced = false }) =>
|
|
13
|
+
`<div class="${clsx('utrecht-pre-heading', {
|
|
14
|
+
'utrecht-pre-heading--distanced': distanced,
|
|
15
|
+
})}">${textContent}</div>`;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license EUPL-1.2
|
|
3
|
+
* Copyright (c) 2021 Gemeente Utrecht
|
|
4
|
+
* Copyright (c) 2021 Robbert Broersma
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export const SearchBar = ({
|
|
8
|
+
buttonLabel,
|
|
9
|
+
formLabel,
|
|
10
|
+
inputLabel,
|
|
11
|
+
value,
|
|
12
|
+
}) => `<form class="utrecht-search-bar" role="search" aria-label="${formLabel}">
|
|
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>
|
|
15
|
+
</form>`;
|
|
@@ -0,0 +1,38 @@
|
|
|
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
|
+
disabled: false,
|
|
11
|
+
focus: false,
|
|
12
|
+
invalid: false,
|
|
13
|
+
options: [],
|
|
14
|
+
required: false,
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const Select = ({ disabled = false, focus = false, invalid = false, options = [], required = false }) =>
|
|
18
|
+
`<select${invalid ? ' aria-invalid="true"' : ''}${disabled ? ' disabled' : ''}${
|
|
19
|
+
required ? ' required' : ''
|
|
20
|
+
} class="${clsx('utrecht-select', {
|
|
21
|
+
'utrecht-select--disabled': disabled,
|
|
22
|
+
'utrecht-select--focus': focus,
|
|
23
|
+
'utrecht-select--invalid': invalid,
|
|
24
|
+
'utrecht-select--required': required,
|
|
25
|
+
})}">
|
|
26
|
+
${options
|
|
27
|
+
.map(
|
|
28
|
+
({ label, selected, value }) =>
|
|
29
|
+
`<option${selected ? ' selected' : ''}${value ? ` value="${value}"` : ''}>${label}</option>`,
|
|
30
|
+
)
|
|
31
|
+
.join('\n ')}
|
|
32
|
+
</select>`;
|
|
33
|
+
|
|
34
|
+
export const exampleOptions = [
|
|
35
|
+
{ value: '1', label: 'Option #1' },
|
|
36
|
+
{ value: '2', label: 'Option #2', selected: true },
|
|
37
|
+
{ value: '3', label: 'Option #3' },
|
|
38
|
+
];
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
};
|
|
11
|
+
|
|
12
|
+
export const Separator = ({ distanced = false }) =>
|
|
13
|
+
`<div role="separator" aria-orientation="horizontal" class="${clsx(
|
|
14
|
+
'utrecht-separator',
|
|
15
|
+
distanced && 'utrecht-separator--distanced',
|
|
16
|
+
)}"></div>`;
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
disabled: false,
|
|
10
|
+
focus: false,
|
|
11
|
+
invalid: false,
|
|
12
|
+
readOnly: false,
|
|
13
|
+
required: false,
|
|
14
|
+
value: '',
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const TextBox = ({
|
|
18
|
+
disabled = false,
|
|
19
|
+
focus = false,
|
|
20
|
+
invalid = false,
|
|
21
|
+
readOnly = false,
|
|
22
|
+
required = false,
|
|
23
|
+
value = '',
|
|
24
|
+
}) =>
|
|
25
|
+
`<input class="${clsx(
|
|
26
|
+
'utrecht-textbox',
|
|
27
|
+
disabled && 'utrecht-textbox--disabled',
|
|
28
|
+
focus && 'utrecht-textbox--focus',
|
|
29
|
+
invalid && 'utrecht-textbox--invalid',
|
|
30
|
+
readOnly && 'utrecht-textbox--readonly',
|
|
31
|
+
required && 'utrecht-textbox--required',
|
|
32
|
+
)}" value="${value}">`;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license EUPL-1.2
|
|
3
|
+
* Copyright (c) 2021 Robbert Broersma
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import clsx from 'clsx';
|
|
7
|
+
|
|
8
|
+
export const UnorderedList = ({ distanced = false }) =>
|
|
9
|
+
`<ul class="${clsx('utrecht-unordered-list', distanced && 'utrecht-unordered-list--distanced')}">
|
|
10
|
+
<li class="utrecht-unordered-list__item">Lorem</li>
|
|
11
|
+
<li class="utrecht-unordered-list__item">Ipsum</li>
|
|
12
|
+
<li class="utrecht-unordered-list__item">Dolor</li>
|
|
13
|
+
</ul>`;
|
|
14
|
+
|
|
15
|
+
export const UnorderedListNested = ({ distanced = false }) =>
|
|
16
|
+
`<ul class="${clsx('utrecht-unordered-list', distanced && 'utrecht-unordered-list--distanced')}">
|
|
17
|
+
<li class="utrecht-unordered-list__item">Lorem</li>
|
|
18
|
+
<li class="utrecht-unordered-list__item">Ipsum
|
|
19
|
+
<ul class="utrecht-unordered-list utrecht-unordered-list--nested">
|
|
20
|
+
<li class="utrecht-unordered-list__item">Lorem</li>
|
|
21
|
+
<li class="utrecht-unordered-list__item">Ipsum</li>
|
|
22
|
+
</ul>
|
|
23
|
+
</li>
|
|
24
|
+
<li class="utrecht-unordered-list__item">Dolor</li>
|
|
25
|
+
</ul>`;
|
|
@@ -134,12 +134,30 @@ export const UtrechtHtmlContent: {
|
|
|
134
134
|
new (): UtrechtHtmlContent;
|
|
135
135
|
};
|
|
136
136
|
|
|
137
|
+
interface UtrechtIconArrow extends Components.UtrechtIconArrow, HTMLElement {}
|
|
138
|
+
export const UtrechtIconArrow: {
|
|
139
|
+
prototype: UtrechtIconArrow;
|
|
140
|
+
new (): UtrechtIconArrow;
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
interface UtrechtIconCross extends Components.UtrechtIconCross, HTMLElement {}
|
|
144
|
+
export const UtrechtIconCross: {
|
|
145
|
+
prototype: UtrechtIconCross;
|
|
146
|
+
new (): UtrechtIconCross;
|
|
147
|
+
};
|
|
148
|
+
|
|
137
149
|
interface UtrechtIconFacebook extends Components.UtrechtIconFacebook, HTMLElement {}
|
|
138
150
|
export const UtrechtIconFacebook: {
|
|
139
151
|
prototype: UtrechtIconFacebook;
|
|
140
152
|
new (): UtrechtIconFacebook;
|
|
141
153
|
};
|
|
142
154
|
|
|
155
|
+
interface UtrechtIconFilter extends Components.UtrechtIconFilter, HTMLElement {}
|
|
156
|
+
export const UtrechtIconFilter: {
|
|
157
|
+
prototype: UtrechtIconFilter;
|
|
158
|
+
new (): UtrechtIconFilter;
|
|
159
|
+
};
|
|
160
|
+
|
|
143
161
|
interface UtrechtIconInstagram extends Components.UtrechtIconInstagram, HTMLElement {}
|
|
144
162
|
export const UtrechtIconInstagram: {
|
|
145
163
|
prototype: UtrechtIconInstagram;
|
|
@@ -152,6 +170,18 @@ export const UtrechtIconLinkedin: {
|
|
|
152
170
|
new (): UtrechtIconLinkedin;
|
|
153
171
|
};
|
|
154
172
|
|
|
173
|
+
interface UtrechtIconList extends Components.UtrechtIconList, HTMLElement {}
|
|
174
|
+
export const UtrechtIconList: {
|
|
175
|
+
prototype: UtrechtIconList;
|
|
176
|
+
new (): UtrechtIconList;
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
interface UtrechtIconLoupe extends Components.UtrechtIconLoupe, HTMLElement {}
|
|
180
|
+
export const UtrechtIconLoupe: {
|
|
181
|
+
prototype: UtrechtIconLoupe;
|
|
182
|
+
new (): UtrechtIconLoupe;
|
|
183
|
+
};
|
|
184
|
+
|
|
155
185
|
interface UtrechtIconTwitter extends Components.UtrechtIconTwitter, HTMLElement {}
|
|
156
186
|
export const UtrechtIconTwitter: {
|
|
157
187
|
prototype: UtrechtIconTwitter;
|
|
@@ -164,6 +194,18 @@ export const UtrechtIconWhatsapp: {
|
|
|
164
194
|
new (): UtrechtIconWhatsapp;
|
|
165
195
|
};
|
|
166
196
|
|
|
197
|
+
interface UtrechtIconZoomin extends Components.UtrechtIconZoomin, HTMLElement {}
|
|
198
|
+
export const UtrechtIconZoomin: {
|
|
199
|
+
prototype: UtrechtIconZoomin;
|
|
200
|
+
new (): UtrechtIconZoomin;
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
interface UtrechtIconZoomout extends Components.UtrechtIconZoomout, HTMLElement {}
|
|
204
|
+
export const UtrechtIconZoomout: {
|
|
205
|
+
prototype: UtrechtIconZoomout;
|
|
206
|
+
new (): UtrechtIconZoomout;
|
|
207
|
+
};
|
|
208
|
+
|
|
167
209
|
interface UtrechtLogo extends Components.UtrechtLogo, HTMLElement {}
|
|
168
210
|
export const UtrechtLogo: {
|
|
169
211
|
prototype: UtrechtLogo;
|