@statistikzh/leu 0.3.0 → 0.4.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/.github/workflows/deploy-github-pages.yaml +33 -0
- package/.storybook/main.js +27 -1
- package/.storybook/manager-head.html +1 -0
- package/.storybook/manager.js +9 -0
- package/.storybook/preview-head.html +1 -1
- package/.storybook/preview.js +59 -5
- package/.storybook/static/logo.svg +19 -0
- package/.storybook/theme.js +7 -0
- package/CHANGELOG.md +30 -0
- package/README.md +1 -1
- package/dist/Button.js +15 -18
- package/dist/ButtonGroup.js +5 -7
- package/dist/Checkbox.js +101 -84
- package/dist/CheckboxGroup.js +41 -37
- package/dist/{Chip-5f70d04f.js → Chip-dac7337d.js} +5 -1
- package/dist/ChipGroup.js +2 -5
- package/dist/ChipLink.js +4 -7
- package/dist/ChipRemovable.js +4 -7
- package/dist/ChipSelectable.js +4 -7
- package/dist/Dropdown.js +55 -26
- package/dist/Input.js +29 -28
- package/dist/Menu.js +2 -5
- package/dist/MenuItem.js +30 -15
- package/dist/Pagination.js +54 -54
- package/dist/Radio.js +7 -6
- package/dist/RadioGroup.js +41 -39
- package/dist/Select.js +55 -43
- package/dist/Table.js +137 -120
- package/dist/{defineElement-ba770aed.js → _rollupPluginBabelHelpers-20f659f4.js} +1 -15
- package/dist/defineElement-47d4f665.js +15 -0
- package/dist/index.js +29 -19
- package/dist/leu-button-group.js +7 -3
- package/dist/leu-button.js +6 -3
- package/dist/leu-checkbox-group.js +6 -3
- package/dist/leu-checkbox.js +6 -3
- package/dist/leu-chip-group.js +6 -3
- package/dist/leu-chip-link.js +7 -4
- package/dist/leu-chip-removable.js +7 -4
- package/dist/leu-chip-selectable.js +7 -4
- package/dist/leu-dropdown.js +13 -3
- package/dist/leu-input.js +7 -3
- package/dist/leu-menu-item.js +8 -3
- package/dist/leu-menu.js +6 -3
- package/dist/leu-pagination.js +8 -3
- package/dist/leu-popup-4bf6f1f4.js +216 -0
- package/dist/leu-radio-group.js +6 -3
- package/dist/leu-radio.js +6 -3
- package/dist/leu-select.js +14 -3
- package/dist/leu-table.js +9 -3
- package/package.json +24 -12
- package/scripts/generate-component/templates/[Name].js +0 -5
- package/scripts/generate-component/templates/[name].css +1 -1
- package/scripts/generate-component/templates/[namespace]-[name].js +5 -2
- package/src/components/accordion/Accordion.js +0 -6
- package/src/components/accordion/leu-accordion.js +5 -2
- package/src/components/accordion/stories/accordion.stories.js +7 -4
- package/src/components/accordion/test/accordion.test.js +92 -2
- package/src/components/breadcrumb/Breadcrumb.js +310 -0
- package/src/components/breadcrumb/breadcrumb.css +114 -0
- package/src/components/breadcrumb/leu-breadcrumb.js +6 -0
- package/src/components/breadcrumb/stories/breadcrumb.stories.js +73 -0
- package/src/components/breadcrumb/test/breadcrumb.test.js +141 -0
- package/src/components/button/Button.js +10 -15
- package/src/components/button/button.css +3 -3
- package/src/components/button/leu-button.js +5 -2
- package/src/components/button/stories/button.stories.js +58 -37
- package/src/components/button/test/button.test.js +112 -2
- package/src/components/button-group/ButtonGroup.js +1 -7
- package/src/components/button-group/leu-button-group.js +5 -2
- package/src/components/button-group/stories/button-group.stories.js +6 -0
- package/src/components/button-group/test/button-group.test.js +79 -3
- package/src/components/checkbox/Checkbox.js +6 -85
- package/src/components/checkbox/CheckboxGroup.js +8 -38
- package/src/components/checkbox/checkbox-group.css +29 -0
- package/src/components/checkbox/checkbox.css +76 -0
- package/src/components/checkbox/leu-checkbox-group.js +5 -2
- package/src/components/checkbox/leu-checkbox.js +5 -2
- package/src/components/checkbox/stories/checkbox-group.stories.js +44 -21
- package/src/components/checkbox/stories/checkbox.stories.js +7 -1
- package/src/components/checkbox/test/checkbox-group.test.js +124 -0
- package/src/components/checkbox/test/checkbox.test.js +72 -59
- package/src/components/chip/Chip.js +1 -0
- package/src/components/chip/ChipGroup.js +0 -5
- package/src/components/chip/ChipLink.js +1 -6
- package/src/components/chip/ChipRemovable.js +1 -6
- package/src/components/chip/ChipSelectable.js +1 -6
- package/src/components/chip/exports.js +4 -10
- package/src/components/chip/leu-chip-group.js +5 -2
- package/src/components/chip/leu-chip-link.js +5 -2
- package/src/components/chip/leu-chip-removable.js +5 -2
- package/src/components/chip/leu-chip-selectable.js +5 -2
- package/src/components/chip/stories/chip-group.stories.js +18 -6
- package/src/components/chip/stories/chip-link.stories.js +16 -4
- package/src/components/chip/stories/chip-removable.stories.js +15 -4
- package/src/components/chip/stories/chip-selectable.stories.js +13 -3
- package/src/components/chip/test/chip-group.test.js +124 -0
- package/src/components/chip/test/chip-link.test.js +58 -0
- package/src/components/chip/test/chip-removable.test.js +79 -0
- package/src/components/chip/test/chip-selectable.test.js +95 -0
- package/src/components/chip/test/chip.test.js +1 -1
- package/src/components/dropdown/Dropdown.js +52 -24
- package/src/components/dropdown/dropdown.css +1 -2
- package/src/components/dropdown/leu-dropdown.js +5 -2
- package/src/components/dropdown/stories/dropdown.stories.js +11 -5
- package/src/components/dropdown/test/dropdown.test.js +6 -6
- package/src/components/icon/icon.js +1 -1
- package/src/components/icon/test/icon.test.js +66 -0
- package/src/components/input/Input.js +18 -24
- package/src/components/input/input.css +9 -6
- package/src/components/input/leu-input.js +5 -2
- package/src/components/input/stories/input.stories.js +8 -2
- package/src/components/input/test/input.test.js +431 -4
- package/src/components/menu/Menu.js +0 -5
- package/src/components/menu/MenuItem.js +20 -13
- package/src/components/menu/leu-menu-item.js +5 -2
- package/src/components/menu/leu-menu.js +5 -2
- package/src/components/menu/menu-item.css +5 -2
- package/src/components/menu/stories/menu-item.stories.js +13 -4
- package/src/components/menu/stories/menu.stories.js +11 -5
- package/src/components/menu/test/menu-item.test.js +180 -0
- package/src/components/menu/test/menu.test.js +10 -2
- package/src/components/pagination/Pagination.js +53 -65
- package/src/components/pagination/leu-pagination.js +5 -2
- package/src/components/pagination/stories/pagination.stories.js +17 -9
- package/src/components/pagination/test/pagination.test.js +191 -5
- package/src/components/popup/Popup.js +200 -0
- package/src/components/popup/leu-popup.js +6 -0
- package/src/components/popup/popup.css +27 -0
- package/src/components/popup/stories/popup.stories.js +58 -0
- package/src/components/popup/test/popup.test.js +29 -0
- package/src/components/radio/Radio.js +2 -6
- package/src/components/radio/RadioGroup.js +6 -38
- package/src/components/radio/leu-radio-group.js +5 -2
- package/src/components/radio/leu-radio.js +5 -2
- package/src/components/radio/radio-group.css +29 -0
- package/src/components/radio/stories/radio-group.stories.js +38 -19
- package/src/components/radio/stories/radio.stories.js +7 -1
- package/src/components/radio/test/radio-group.test.js +86 -0
- package/src/components/radio/test/radio.test.js +108 -17
- package/src/components/select/Select.js +34 -31
- package/src/components/select/leu-select.js +5 -2
- package/src/components/select/select.css +13 -13
- package/src/components/select/stories/select.stories.js +15 -168
- package/src/components/select/test/fixtures.js +162 -0
- package/src/components/select/test/select.test.js +236 -12
- package/src/components/table/Table.js +43 -118
- package/src/components/table/leu-table.js +5 -2
- package/src/components/table/stories/table.stories.js +20 -10
- package/src/components/table/table.css +99 -0
- package/src/components/table/test/table.test.js +1 -1
- package/src/lib/utils.js +17 -0
- package/{web-dev-server-storybook.config.mjs → web-dev-server.config.mjs} +1 -2
- package/web-test-runner.config.mjs +15 -2
|
@@ -1,33 +1,25 @@
|
|
|
1
1
|
import { html } from "lit"
|
|
2
|
-
import { fixture, expect } from "@open-wc/testing"
|
|
2
|
+
import { fixture, expect, elementUpdated, oneEvent } from "@open-wc/testing"
|
|
3
|
+
import { sendKeys } from "@web/test-runner-commands"
|
|
3
4
|
|
|
4
5
|
import "../leu-radio.js"
|
|
5
|
-
import "../leu-radio-group.js"
|
|
6
6
|
|
|
7
7
|
async function defaultFixture() {
|
|
8
8
|
return fixture(html`
|
|
9
|
-
<leu-radio
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
>Etwas Länger</leu-radio
|
|
16
|
-
>
|
|
17
|
-
<leu-radio identifier="3" value="3" name="radio-button"
|
|
18
|
-
>Ein langes Label um sicher ein umbruch zu erzwingen</leu-radio
|
|
19
|
-
>
|
|
20
|
-
</leu-radio-group>
|
|
9
|
+
<leu-radio
|
|
10
|
+
identifier="b"
|
|
11
|
+
value="3"
|
|
12
|
+
name="radio-button"
|
|
13
|
+
label="Ein langes Label um sicher ein umbruch zu erzwingen"
|
|
14
|
+
></leu-radio>
|
|
21
15
|
`)
|
|
22
16
|
}
|
|
23
17
|
|
|
24
18
|
describe("LeuRadio", () => {
|
|
25
19
|
it("is a defined element", async () => {
|
|
26
|
-
const elRadio =
|
|
27
|
-
const elRadioGroup = await customElements.get("leu-radio-group")
|
|
20
|
+
const elRadio = customElements.get("leu-radio")
|
|
28
21
|
|
|
29
22
|
await expect(elRadio).not.to.be.undefined
|
|
30
|
-
await expect(elRadioGroup).not.to.be.undefined
|
|
31
23
|
})
|
|
32
24
|
|
|
33
25
|
it("passes the a11y audit", async () => {
|
|
@@ -35,4 +27,103 @@ describe("LeuRadio", () => {
|
|
|
35
27
|
|
|
36
28
|
await expect(el).shadowDom.to.be.accessible()
|
|
37
29
|
})
|
|
30
|
+
|
|
31
|
+
it("is not checked by default", async () => {
|
|
32
|
+
const el = await defaultFixture()
|
|
33
|
+
|
|
34
|
+
expect(el.checked).to.be.false
|
|
35
|
+
})
|
|
36
|
+
|
|
37
|
+
it("sets the checked property when the checkbox", async () => {
|
|
38
|
+
const el = await defaultFixture()
|
|
39
|
+
const checkbox = el.shadowRoot.querySelector("input")
|
|
40
|
+
|
|
41
|
+
checkbox.click()
|
|
42
|
+
await elementUpdated(el)
|
|
43
|
+
|
|
44
|
+
expect(el.checked).to.be.true
|
|
45
|
+
|
|
46
|
+
checkbox.click()
|
|
47
|
+
await elementUpdated(el)
|
|
48
|
+
|
|
49
|
+
expect(el.checked).to.be.true
|
|
50
|
+
})
|
|
51
|
+
|
|
52
|
+
it("sets the checked property when the checkbox", async () => {
|
|
53
|
+
const el = await defaultFixture()
|
|
54
|
+
const label = el.shadowRoot.querySelector("label")
|
|
55
|
+
|
|
56
|
+
label.click()
|
|
57
|
+
await elementUpdated(el)
|
|
58
|
+
|
|
59
|
+
expect(el.checked).to.be.true
|
|
60
|
+
|
|
61
|
+
label.click()
|
|
62
|
+
await elementUpdated(el)
|
|
63
|
+
|
|
64
|
+
expect(el.checked).to.be.true
|
|
65
|
+
})
|
|
66
|
+
|
|
67
|
+
it("does not set the checked property when disabled", async () => {
|
|
68
|
+
const el = await defaultFixture()
|
|
69
|
+
const checkbox = el.shadowRoot.querySelector("input")
|
|
70
|
+
const label = el.shadowRoot.querySelector("label")
|
|
71
|
+
|
|
72
|
+
el.disabled = true
|
|
73
|
+
await elementUpdated(el)
|
|
74
|
+
|
|
75
|
+
checkbox.click()
|
|
76
|
+
await elementUpdated(el)
|
|
77
|
+
|
|
78
|
+
expect(el.checked).to.be.false
|
|
79
|
+
|
|
80
|
+
label.click()
|
|
81
|
+
await elementUpdated(el)
|
|
82
|
+
|
|
83
|
+
expect(el.checked).to.be.false
|
|
84
|
+
})
|
|
85
|
+
|
|
86
|
+
it("toggles the checked property when the space key is pressed", async () => {
|
|
87
|
+
const el = await defaultFixture()
|
|
88
|
+
el.focus()
|
|
89
|
+
|
|
90
|
+
await sendKeys({
|
|
91
|
+
press: "Space",
|
|
92
|
+
})
|
|
93
|
+
|
|
94
|
+
expect(el.checked).to.be.true
|
|
95
|
+
|
|
96
|
+
await sendKeys({
|
|
97
|
+
press: "Space",
|
|
98
|
+
})
|
|
99
|
+
|
|
100
|
+
expect(el.checked).to.be.true
|
|
101
|
+
})
|
|
102
|
+
|
|
103
|
+
it("fires a change event when clicked", async () => {
|
|
104
|
+
const el = await defaultFixture()
|
|
105
|
+
const checkbox = el.shadowRoot.querySelector("input")
|
|
106
|
+
|
|
107
|
+
setTimeout(() => checkbox.click())
|
|
108
|
+
const event = await oneEvent(el, "change")
|
|
109
|
+
|
|
110
|
+
expect(event).to.exist
|
|
111
|
+
})
|
|
112
|
+
|
|
113
|
+
it("fires an input event when clicked", async () => {
|
|
114
|
+
const el = await defaultFixture()
|
|
115
|
+
const checkbox = el.shadowRoot.querySelector("input")
|
|
116
|
+
|
|
117
|
+
setTimeout(() => checkbox.click())
|
|
118
|
+
const event = await oneEvent(el, "input")
|
|
119
|
+
|
|
120
|
+
expect(event).to.exist
|
|
121
|
+
})
|
|
122
|
+
|
|
123
|
+
it("applies the identifier to the input and the label", async () => {
|
|
124
|
+
const el = await defaultFixture()
|
|
125
|
+
|
|
126
|
+
expect(el.shadowRoot.querySelector("input").id).to.equal("b")
|
|
127
|
+
expect(el.shadowRoot.querySelector("label").htmlFor).to.equal("b")
|
|
128
|
+
})
|
|
38
129
|
})
|
|
@@ -6,12 +6,12 @@ import { ifDefined } from "lit/directives/if-defined.js"
|
|
|
6
6
|
import { createRef, ref } from "lit/directives/ref.js"
|
|
7
7
|
|
|
8
8
|
import { Icon } from "../icon/icon.js"
|
|
9
|
-
import { defineElement } from "../../lib/defineElement.js"
|
|
10
9
|
import { HasSlotController } from "../../lib/hasSlotController.js"
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
10
|
+
import "../button/leu-button.js"
|
|
11
|
+
import "../menu/leu-menu.js"
|
|
12
|
+
import "../menu/leu-menu-item.js"
|
|
13
|
+
import "../input/leu-input.js"
|
|
14
|
+
import "../popup/leu-popup.js"
|
|
15
15
|
|
|
16
16
|
import styles from "./select.css"
|
|
17
17
|
|
|
@@ -34,7 +34,7 @@ export class LeuSelect extends LitElement {
|
|
|
34
34
|
disabled: { type: Boolean, reflect: true },
|
|
35
35
|
filterable: { type: Boolean, reflect: true },
|
|
36
36
|
multiple: { type: Boolean, reflect: true },
|
|
37
|
-
optionFilter: {
|
|
37
|
+
optionFilter: { state: true },
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
|
|
@@ -251,17 +251,18 @@ export class LeuSelect extends LitElement {
|
|
|
251
251
|
before=${ifDefined(beforeIcon)}
|
|
252
252
|
@click=${() => this.selectOption(option)}
|
|
253
253
|
role="option"
|
|
254
|
+
label=${LeuSelect.getOptionLabel(option)}
|
|
254
255
|
?active=${isSelected}
|
|
255
256
|
aria-selected=${isSelected}
|
|
256
257
|
>
|
|
257
|
-
${LeuSelect.getOptionLabel(option)}
|
|
258
258
|
</leu-menu-item>`
|
|
259
259
|
})
|
|
260
|
-
: html`<leu-menu-item
|
|
261
|
-
|
|
260
|
+
: html`<leu-menu-item
|
|
261
|
+
label=${this.optionFilter === ""
|
|
262
262
|
? "Keine Optionen"
|
|
263
|
-
: "Keine Resultate"}
|
|
264
|
-
|
|
263
|
+
: "Keine Resultate"}
|
|
264
|
+
disabled
|
|
265
|
+
></leu-menu-item>`}
|
|
265
266
|
</leu-menu>
|
|
266
267
|
`
|
|
267
268
|
}
|
|
@@ -274,8 +275,8 @@ export class LeuSelect extends LitElement {
|
|
|
274
275
|
@input=${this.handleFilterInput}
|
|
275
276
|
clearable
|
|
276
277
|
ref=${ref(this.optionFilterRef)}
|
|
277
|
-
|
|
278
|
-
>`
|
|
278
|
+
label="Nach Stichwort filtern"
|
|
279
|
+
></leu-input>`
|
|
279
280
|
}
|
|
280
281
|
|
|
281
282
|
return nothing
|
|
@@ -314,6 +315,7 @@ export class LeuSelect extends LitElement {
|
|
|
314
315
|
aria-expanded="${this.open}"
|
|
315
316
|
role="combobox"
|
|
316
317
|
ref=${ref(this.toggleButtonRef)}
|
|
318
|
+
slot="anchor"
|
|
317
319
|
>
|
|
318
320
|
<span class="label" id="select-label">${this.label}</span>
|
|
319
321
|
<span class="value"> ${this.getDisplayValue(this.value)} </span>
|
|
@@ -346,25 +348,26 @@ export class LeuSelect extends LitElement {
|
|
|
346
348
|
aria-labelledby="select-label"
|
|
347
349
|
@keydown=${this.handleKeyDown}
|
|
348
350
|
>
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
351
|
+
<leu-popup
|
|
352
|
+
?active=${this.open}
|
|
353
|
+
placement="bottom-start"
|
|
354
|
+
flip
|
|
355
|
+
matchSize="width"
|
|
356
|
+
autoSize="height"
|
|
357
|
+
autoSizePadding="8"
|
|
354
358
|
>
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
359
|
+
${this.renderToggleButton()}
|
|
360
|
+
<dialog
|
|
361
|
+
id="select-dialog"
|
|
362
|
+
class="select-menu-container"
|
|
363
|
+
?open=${this.open}
|
|
364
|
+
>
|
|
365
|
+
<slot name="before" class="before"></slot>
|
|
366
|
+
${this.renderFilterInput()} ${this.renderMenu()}
|
|
367
|
+
${this.renderApplyButton()}
|
|
368
|
+
<slot name="after" class="after"></slot>
|
|
369
|
+
</dialog>
|
|
370
|
+
</leu-popup>
|
|
360
371
|
</div> `
|
|
361
372
|
}
|
|
362
373
|
}
|
|
363
|
-
|
|
364
|
-
export function defineSelectElements() {
|
|
365
|
-
defineButtonElements()
|
|
366
|
-
defineMenuElements()
|
|
367
|
-
defineMenuItemElements()
|
|
368
|
-
defineInputElements()
|
|
369
|
-
defineElement("select", LeuSelect)
|
|
370
|
-
}
|
|
@@ -165,18 +165,22 @@
|
|
|
165
165
|
}
|
|
166
166
|
|
|
167
167
|
.select-menu-container {
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
168
|
+
position: static;
|
|
169
|
+
overflow: auto;
|
|
170
|
+
|
|
171
|
+
display: flex;
|
|
172
|
+
flex-direction: column;
|
|
173
|
+
|
|
171
174
|
width: 100%;
|
|
172
|
-
|
|
173
|
-
|
|
175
|
+
max-height: var(--auto-size-available-height);
|
|
176
|
+
|
|
174
177
|
padding: 0;
|
|
175
178
|
margin: 0;
|
|
176
|
-
|
|
177
|
-
|
|
179
|
+
|
|
180
|
+
border: none;
|
|
181
|
+
border-radius: 1px;
|
|
182
|
+
background-color: white;
|
|
178
183
|
box-shadow: var(--select-box-shadow-regular), var(--select-box-shadow-short);
|
|
179
|
-
overflow: auto;
|
|
180
184
|
}
|
|
181
185
|
|
|
182
186
|
.select-menu {
|
|
@@ -184,11 +188,7 @@
|
|
|
184
188
|
padding: 0;
|
|
185
189
|
margin: 0;
|
|
186
190
|
overflow: auto;
|
|
187
|
-
max-height:
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
.select-menu.multiple {
|
|
191
|
-
max-height: 21rem;
|
|
191
|
+
max-height: 100%;
|
|
192
192
|
}
|
|
193
193
|
|
|
194
194
|
.before,
|
|
@@ -2,10 +2,17 @@ import { html } from "lit"
|
|
|
2
2
|
import { ifDefined } from "lit/directives/if-defined.js"
|
|
3
3
|
|
|
4
4
|
import "../leu-select.js"
|
|
5
|
+
import { MUNICIPALITIES } from "../test/fixtures.js"
|
|
5
6
|
|
|
6
7
|
export default {
|
|
7
|
-
title: "
|
|
8
|
+
title: "Select",
|
|
8
9
|
component: "leu-select",
|
|
10
|
+
parameters: {
|
|
11
|
+
design: {
|
|
12
|
+
type: "figma",
|
|
13
|
+
url: "https://www.figma.com/file/d6Pv21UVUbnBs3AdcZijHmbN/KTZH-Design-System?type=design&node-id=17340-82208&mode=design&t=lzVrtq8lxYVJU5TB-11",
|
|
14
|
+
},
|
|
15
|
+
},
|
|
9
16
|
}
|
|
10
17
|
|
|
11
18
|
const OPTIONS_EXAMPLES = [
|
|
@@ -14,168 +21,6 @@ const OPTIONS_EXAMPLES = [
|
|
|
14
21
|
"Option 3",
|
|
15
22
|
"Sehr lange Option um zu schauen was passiert, wenn es zu lang wird.",
|
|
16
23
|
]
|
|
17
|
-
const OPTIONS_MUNICIPALITIES = [
|
|
18
|
-
"Aeugst am Albis",
|
|
19
|
-
"Affoltern am Albis",
|
|
20
|
-
"Bonstetten",
|
|
21
|
-
"Hausen am Albis",
|
|
22
|
-
"Hedingen",
|
|
23
|
-
"Kappel am Albis",
|
|
24
|
-
"Knonau",
|
|
25
|
-
"Maschwanden",
|
|
26
|
-
"Mettmenstetten",
|
|
27
|
-
"Obfelden",
|
|
28
|
-
"Ottenbach",
|
|
29
|
-
"Rifferswil",
|
|
30
|
-
"Stallikon",
|
|
31
|
-
"Wettswil am Albis",
|
|
32
|
-
"Benken (ZH)",
|
|
33
|
-
"Berg am Irchel",
|
|
34
|
-
"Buch am Irchel",
|
|
35
|
-
"Dachsen",
|
|
36
|
-
"Dorf",
|
|
37
|
-
"Feuerthalen",
|
|
38
|
-
"Flaach",
|
|
39
|
-
"Flurlingen",
|
|
40
|
-
"Henggart",
|
|
41
|
-
"Kleinandelfingen",
|
|
42
|
-
"Laufen-Uhwiesen",
|
|
43
|
-
"Marthalen",
|
|
44
|
-
"Ossingen",
|
|
45
|
-
"Rheinau",
|
|
46
|
-
"Thalheim an der Thur",
|
|
47
|
-
"Trüllikon",
|
|
48
|
-
"Truttikon",
|
|
49
|
-
"Volken",
|
|
50
|
-
"Bachenbülach",
|
|
51
|
-
"Bassersdorf",
|
|
52
|
-
"Bülach",
|
|
53
|
-
"Dietlikon",
|
|
54
|
-
"Eglisau",
|
|
55
|
-
"Embrach",
|
|
56
|
-
"Freienstein-Teufen",
|
|
57
|
-
"Glattfelden",
|
|
58
|
-
"Hochfelden",
|
|
59
|
-
"Höri",
|
|
60
|
-
"Hüntwangen",
|
|
61
|
-
"Kloten",
|
|
62
|
-
"Lufingen",
|
|
63
|
-
"Nürensdorf",
|
|
64
|
-
"Oberembrach",
|
|
65
|
-
"Opfikon",
|
|
66
|
-
"Rafz",
|
|
67
|
-
"Rorbas",
|
|
68
|
-
"Wallisellen",
|
|
69
|
-
"Wasterkingen",
|
|
70
|
-
"Wil (ZH)",
|
|
71
|
-
"Winkel",
|
|
72
|
-
"Bachs",
|
|
73
|
-
"Boppelsen",
|
|
74
|
-
"Buchs (ZH)",
|
|
75
|
-
"Dällikon",
|
|
76
|
-
"Dänikon",
|
|
77
|
-
"Dielsdorf",
|
|
78
|
-
"Hüttikon",
|
|
79
|
-
"Neerach",
|
|
80
|
-
"Niederglatt",
|
|
81
|
-
"Niederhasli",
|
|
82
|
-
"Niederweningen",
|
|
83
|
-
"Oberglatt",
|
|
84
|
-
"Oberweningen",
|
|
85
|
-
"Otelfingen",
|
|
86
|
-
"Regensberg",
|
|
87
|
-
"Regensdorf",
|
|
88
|
-
"Rümlang",
|
|
89
|
-
"Schleinikon",
|
|
90
|
-
"Schöfflisdorf",
|
|
91
|
-
"Stadel",
|
|
92
|
-
"Steinmaur",
|
|
93
|
-
"Weiach",
|
|
94
|
-
"Bäretswil",
|
|
95
|
-
"Bubikon",
|
|
96
|
-
"Dürnten",
|
|
97
|
-
"Fischenthal",
|
|
98
|
-
"Gossau (ZH)",
|
|
99
|
-
"Grüningen",
|
|
100
|
-
"Hinwil",
|
|
101
|
-
"Rüti (ZH)",
|
|
102
|
-
"Seegräben",
|
|
103
|
-
"Wald (ZH)",
|
|
104
|
-
"Wetzikon (ZH)",
|
|
105
|
-
"Adliswil",
|
|
106
|
-
"Kilchberg (ZH)",
|
|
107
|
-
"Langnau am Albis",
|
|
108
|
-
"Oberrieden",
|
|
109
|
-
"Richterswil",
|
|
110
|
-
"Rüschlikon",
|
|
111
|
-
"Thalwil",
|
|
112
|
-
"Erlenbach (ZH)",
|
|
113
|
-
"Herrliberg",
|
|
114
|
-
"Hombrechtikon",
|
|
115
|
-
"Küsnacht (ZH)",
|
|
116
|
-
"Männedorf",
|
|
117
|
-
"Meilen",
|
|
118
|
-
"Oetwil am See",
|
|
119
|
-
"Stäfa",
|
|
120
|
-
"Uetikon am See",
|
|
121
|
-
"Zumikon",
|
|
122
|
-
"Zollikon",
|
|
123
|
-
"Fehraltorf",
|
|
124
|
-
"Hittnau",
|
|
125
|
-
"Lindau",
|
|
126
|
-
"Pfäffikon",
|
|
127
|
-
"Russikon",
|
|
128
|
-
"Weisslingen",
|
|
129
|
-
"Wila",
|
|
130
|
-
"Wildberg",
|
|
131
|
-
"Dübendorf",
|
|
132
|
-
"Egg",
|
|
133
|
-
"Fällanden",
|
|
134
|
-
"Greifensee",
|
|
135
|
-
"Maur",
|
|
136
|
-
"Mönchaltorf",
|
|
137
|
-
"Schwerzenbach",
|
|
138
|
-
"Uster",
|
|
139
|
-
"Volketswil",
|
|
140
|
-
"Wangen-Brüttisellen",
|
|
141
|
-
"Altikon",
|
|
142
|
-
"Brütten",
|
|
143
|
-
"Dägerlen",
|
|
144
|
-
"Dättlikon",
|
|
145
|
-
"Dinhard",
|
|
146
|
-
"Ellikon an der Thur",
|
|
147
|
-
"Elsau",
|
|
148
|
-
"Hagenbuch",
|
|
149
|
-
"Hettlingen",
|
|
150
|
-
"Neftenbach",
|
|
151
|
-
"Pfungen",
|
|
152
|
-
"Rickenbach (ZH)",
|
|
153
|
-
"Schlatt (ZH)",
|
|
154
|
-
"Seuzach",
|
|
155
|
-
"Turbenthal",
|
|
156
|
-
"Winterthur",
|
|
157
|
-
"Zell (ZH)",
|
|
158
|
-
"Aesch (ZH)",
|
|
159
|
-
"Birmensdorf (ZH)",
|
|
160
|
-
"Dietikon",
|
|
161
|
-
"Geroldswil",
|
|
162
|
-
"Oberengstringen",
|
|
163
|
-
"Oetwil an der Limmat",
|
|
164
|
-
"Schlieren",
|
|
165
|
-
"Uitikon",
|
|
166
|
-
"Unterengstringen",
|
|
167
|
-
"Urdorf",
|
|
168
|
-
"Weiningen (ZH)",
|
|
169
|
-
"Zürich",
|
|
170
|
-
"Andelfingen",
|
|
171
|
-
"Stammheim",
|
|
172
|
-
"Wädenswil",
|
|
173
|
-
"Elgg",
|
|
174
|
-
"Horgen",
|
|
175
|
-
"Illnau-Effretikon",
|
|
176
|
-
"Bauma",
|
|
177
|
-
"Wiesendangen",
|
|
178
|
-
]
|
|
179
24
|
|
|
180
25
|
function Template({
|
|
181
26
|
label,
|
|
@@ -189,6 +34,7 @@ function Template({
|
|
|
189
34
|
after,
|
|
190
35
|
}) {
|
|
191
36
|
return html`
|
|
37
|
+
<div style="margin-top: 50vh"></div>
|
|
192
38
|
<leu-select
|
|
193
39
|
class="dropdown"
|
|
194
40
|
.options=${options}
|
|
@@ -202,6 +48,7 @@ function Template({
|
|
|
202
48
|
${before ? html`<div slot="before">${before}</div>` : ""}
|
|
203
49
|
${after ? html`<div slot="after">${after}</div>` : ""}
|
|
204
50
|
</leu-select>
|
|
51
|
+
<div style="margin-top: 50vh"></div>
|
|
205
52
|
`
|
|
206
53
|
}
|
|
207
54
|
|
|
@@ -263,7 +110,7 @@ DisabledFilled.args = {
|
|
|
263
110
|
export const Filterable = Template.bind({})
|
|
264
111
|
Filterable.args = {
|
|
265
112
|
label: "Gemeinde",
|
|
266
|
-
options:
|
|
113
|
+
options: MUNICIPALITIES,
|
|
267
114
|
clearable: true,
|
|
268
115
|
disabled: false,
|
|
269
116
|
filterable: true,
|
|
@@ -273,7 +120,7 @@ Filterable.args = {
|
|
|
273
120
|
export const BeforeAfterSlot = TemplateSlots.bind({})
|
|
274
121
|
BeforeAfterSlot.args = {
|
|
275
122
|
label: "Gemeinde",
|
|
276
|
-
options:
|
|
123
|
+
options: MUNICIPALITIES,
|
|
277
124
|
clearable: true,
|
|
278
125
|
disabled: false,
|
|
279
126
|
filterable: false,
|
|
@@ -283,7 +130,7 @@ BeforeAfterSlot.args = {
|
|
|
283
130
|
export const Multiple = Template.bind({})
|
|
284
131
|
Multiple.args = {
|
|
285
132
|
label: "Gemeinde",
|
|
286
|
-
options:
|
|
133
|
+
options: MUNICIPALITIES,
|
|
287
134
|
clearable: true,
|
|
288
135
|
disabled: false,
|
|
289
136
|
filterable: true,
|
|
@@ -293,8 +140,8 @@ Multiple.args = {
|
|
|
293
140
|
export const MultipleFilled = Template.bind({})
|
|
294
141
|
MultipleFilled.args = {
|
|
295
142
|
label: "Gemeinde",
|
|
296
|
-
options:
|
|
297
|
-
value:
|
|
143
|
+
options: MUNICIPALITIES,
|
|
144
|
+
value: MUNICIPALITIES.slice(0, 2),
|
|
298
145
|
clearable: true,
|
|
299
146
|
disabled: false,
|
|
300
147
|
filterable: true,
|