@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
package/dist/Table.js
CHANGED
|
@@ -1,12 +1,118 @@
|
|
|
1
|
-
import { _ as _defineProperty
|
|
1
|
+
import { _ as _defineProperty } from './_rollupPluginBabelHelpers-20f659f4.js';
|
|
2
2
|
import { css, LitElement, html, nothing } from 'lit';
|
|
3
3
|
import { classMap } from 'lit/directives/class-map.js';
|
|
4
4
|
import { styleMap } from 'lit/directives/style-map.js';
|
|
5
5
|
import { createRef, ref } from 'lit/directives/ref.js';
|
|
6
6
|
import { I as Icon } from './icon-03e86700.js';
|
|
7
|
-
import
|
|
7
|
+
import './leu-pagination.js';
|
|
8
|
+
import './defineElement-47d4f665.js';
|
|
9
|
+
import './Pagination.js';
|
|
10
|
+
import 'lit/directives/live.js';
|
|
11
|
+
import './leu-button.js';
|
|
8
12
|
import './Button.js';
|
|
9
13
|
|
|
14
|
+
var css_248z = css`:host {
|
|
15
|
+
position: relative;
|
|
16
|
+
display: block;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
div.scroll {
|
|
20
|
+
display: inline-block;
|
|
21
|
+
width: 100%;
|
|
22
|
+
overflow: auto;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
div.shadow {
|
|
26
|
+
position: absolute;
|
|
27
|
+
left: 0;
|
|
28
|
+
top: 0;
|
|
29
|
+
width: 100%;
|
|
30
|
+
height: 100%;
|
|
31
|
+
pointer-events: none;
|
|
32
|
+
z-index: 1;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
div.pagination {
|
|
36
|
+
height: calc(100% - 66px);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
table {
|
|
40
|
+
width: 100%;
|
|
41
|
+
border-spacing: 0;
|
|
42
|
+
color: rgba(0, 0, 0, 0.6);
|
|
43
|
+
font-size: 16px;
|
|
44
|
+
font-family: var(--leu-font-regular);
|
|
45
|
+
line-height: 1.5;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
td {
|
|
49
|
+
padding: 12px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
th {
|
|
53
|
+
padding: 16px 16px 8px;
|
|
54
|
+
text-align: left;
|
|
55
|
+
font-size: 12px;
|
|
56
|
+
font-weight: normal;
|
|
57
|
+
font-family: var(--leu-font-black);
|
|
58
|
+
background: var(--table-even-row-bg);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
td:first-child,
|
|
62
|
+
th:first-child {
|
|
63
|
+
left: 0;
|
|
64
|
+
background: inherit;
|
|
65
|
+
z-index: 1;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
tr {
|
|
69
|
+
background: #fff;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
tbody tr:nth-child(odd) {
|
|
73
|
+
background: var(--leu-color-black-5);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
button {
|
|
77
|
+
background: none;
|
|
78
|
+
cursor: pointer;
|
|
79
|
+
line-height: 1.5;
|
|
80
|
+
padding: 0;
|
|
81
|
+
border: 0;
|
|
82
|
+
width: 100%;
|
|
83
|
+
display: flex;
|
|
84
|
+
align-items: flex-center;
|
|
85
|
+
font-size: inherit;
|
|
86
|
+
font-family: inherit;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
thead svg {
|
|
90
|
+
display: inline-block;
|
|
91
|
+
color: var(--leu-color-accent-blue);
|
|
92
|
+
padding: 0;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
table.sticky td:first-child,
|
|
96
|
+
table.sticky th:first-child {
|
|
97
|
+
position: sticky;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
div.shadow-left table.sticky td:first-child,
|
|
101
|
+
div.shadow-left table.sticky th:first-child {
|
|
102
|
+
box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
|
|
103
|
+
-webkit-clip-path: inset(0 -15px 0 0);
|
|
104
|
+
clip-path: inset(0 -15px 0 0);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
div.shadow-left {
|
|
108
|
+
box-shadow: inset 5px 0 5px -5px rgba(0, 0, 0, 0.5);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
div.shadow-right {
|
|
112
|
+
box-shadow: inset -5px 0 5px -5px rgba(0, 0, 0, 0.5);
|
|
113
|
+
}
|
|
114
|
+
`;
|
|
115
|
+
|
|
10
116
|
/**
|
|
11
117
|
* @tagname leu-table
|
|
12
118
|
*/
|
|
@@ -20,7 +126,7 @@ class LeuTable extends LitElement {
|
|
|
20
126
|
/** @type {boolean} */
|
|
21
127
|
this.firstColumnSticky = false;
|
|
22
128
|
/** @type {number} */
|
|
23
|
-
this.
|
|
129
|
+
this.itemsPerPage = null;
|
|
24
130
|
/** @type {number} */
|
|
25
131
|
this.sortIndex = null;
|
|
26
132
|
/** @type {boolean} */
|
|
@@ -38,13 +144,25 @@ class LeuTable extends LitElement {
|
|
|
38
144
|
this._shadowRight = false;
|
|
39
145
|
/** @internal */
|
|
40
146
|
this._scrollRef = createRef();
|
|
147
|
+
|
|
41
148
|
/** @internal */
|
|
42
|
-
this.
|
|
43
|
-
|
|
44
|
-
|
|
149
|
+
this._page = 1;
|
|
150
|
+
this._resizeObserver = new ResizeObserver(() => {
|
|
151
|
+
this.shadowToggle(this._scrollRef.value);
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
disconnectedCallback() {
|
|
155
|
+
this._resizeObserver.disconnect();
|
|
156
|
+
}
|
|
157
|
+
attributeChangedCallback(name, oldVal, newVal) {
|
|
158
|
+
super.attributeChangedCallback(name, oldVal, newVal);
|
|
159
|
+
if (name === "itemsperpage" || name === "data") {
|
|
160
|
+
this._page = 1;
|
|
161
|
+
}
|
|
45
162
|
}
|
|
46
163
|
firstUpdated() {
|
|
47
164
|
this.shadowToggle(this._scrollRef.value);
|
|
165
|
+
this._resizeObserver.observe(this._scrollRef.value);
|
|
48
166
|
}
|
|
49
167
|
shadowToggle(target) {
|
|
50
168
|
this._shadowLeft = target.scrollLeftMax > 0 && target.scrollLeft > 0;
|
|
@@ -91,7 +209,7 @@ class LeuTable extends LitElement {
|
|
|
91
209
|
return this.data.sort(this.sortOrderAsc ? col.sort.asc : col.sort.desc);
|
|
92
210
|
}
|
|
93
211
|
get _data() {
|
|
94
|
-
return this.
|
|
212
|
+
return this.itemsPerPage && this.itemsPerPage > 0 ? this._sortedData.slice((this._page - 1) * this.itemsPerPage, this._page * this.itemsPerPage) : this._sortedData;
|
|
95
213
|
}
|
|
96
214
|
render() {
|
|
97
215
|
const scrollClasses = {
|
|
@@ -101,12 +219,12 @@ class LeuTable extends LitElement {
|
|
|
101
219
|
const shadowClassesLeft = {
|
|
102
220
|
shadow: true,
|
|
103
221
|
"shadow-left": !this.firstColumnSticky && this._shadowLeft,
|
|
104
|
-
pagination: this.
|
|
222
|
+
pagination: this.itemsPerPage > 0
|
|
105
223
|
};
|
|
106
224
|
const shadowClassesRight = {
|
|
107
225
|
shadow: true,
|
|
108
226
|
"shadow-right": this._shadowRight,
|
|
109
|
-
pagination: this.
|
|
227
|
+
pagination: this.itemsPerPage > 0
|
|
110
228
|
};
|
|
111
229
|
const stickyClass = {
|
|
112
230
|
sticky: this.firstColumnSticky
|
|
@@ -142,17 +260,13 @@ class LeuTable extends LitElement {
|
|
|
142
260
|
<div class=${classMap(shadowClassesRight)}></div>
|
|
143
261
|
</div>
|
|
144
262
|
|
|
145
|
-
${this.
|
|
263
|
+
${this.itemsPerPage > 0 ? html`
|
|
146
264
|
<leu-pagination
|
|
147
|
-
.
|
|
148
|
-
.
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
this.
|
|
152
|
-
// after render
|
|
153
|
-
setTimeout(() => {
|
|
154
|
-
this.shadowToggle(this._scrollRef.value);
|
|
155
|
-
}, 0);
|
|
265
|
+
.numOfItems=${this._sortedData.length}
|
|
266
|
+
.itemsPerPage=${this.itemsPerPage}
|
|
267
|
+
page=${this._page}
|
|
268
|
+
@leu:pagechange=${e => {
|
|
269
|
+
this._page = e.detail.page;
|
|
156
270
|
}}
|
|
157
271
|
>
|
|
158
272
|
</leu-pagination>
|
|
@@ -160,93 +274,7 @@ class LeuTable extends LitElement {
|
|
|
160
274
|
`;
|
|
161
275
|
}
|
|
162
276
|
}
|
|
163
|
-
_defineProperty(LeuTable, "styles",
|
|
164
|
-
:host {
|
|
165
|
-
position: relative;
|
|
166
|
-
display: block;
|
|
167
|
-
}
|
|
168
|
-
div.scroll {
|
|
169
|
-
display: inline-block;
|
|
170
|
-
width: 100%;
|
|
171
|
-
overflow: auto;
|
|
172
|
-
}
|
|
173
|
-
div.shadow {
|
|
174
|
-
position: absolute;
|
|
175
|
-
left: 0;
|
|
176
|
-
top: 0;
|
|
177
|
-
width: 100%;
|
|
178
|
-
height: 100%;
|
|
179
|
-
pointer-events: none;
|
|
180
|
-
z-index: 1;
|
|
181
|
-
}
|
|
182
|
-
div.pagination {
|
|
183
|
-
height: calc(100% - 66px);
|
|
184
|
-
}
|
|
185
|
-
table {
|
|
186
|
-
width: 100%;
|
|
187
|
-
border-spacing: 0;
|
|
188
|
-
color: rgb(0 0 0 / 60%);
|
|
189
|
-
font-size: 16px;
|
|
190
|
-
font-family: var(--leu-font-regular);
|
|
191
|
-
line-height: 1.5;
|
|
192
|
-
}
|
|
193
|
-
td {
|
|
194
|
-
padding: 12px;
|
|
195
|
-
}
|
|
196
|
-
th {
|
|
197
|
-
padding: 16px 16px 8px;
|
|
198
|
-
text-align: left;
|
|
199
|
-
font-size: 12px;
|
|
200
|
-
font-weight: normal;
|
|
201
|
-
font-family: var(--leu-font-black);
|
|
202
|
-
background: var(--table-even-row-bg);
|
|
203
|
-
}
|
|
204
|
-
td:first-child,
|
|
205
|
-
th:first-child {
|
|
206
|
-
left: 0;
|
|
207
|
-
background: inherit;
|
|
208
|
-
z-index: 1;
|
|
209
|
-
}
|
|
210
|
-
tr {
|
|
211
|
-
background: #fff;
|
|
212
|
-
}
|
|
213
|
-
tbody tr:nth-child(odd) {
|
|
214
|
-
background: var(--leu-color-black-5);
|
|
215
|
-
}
|
|
216
|
-
button {
|
|
217
|
-
background: none;
|
|
218
|
-
cursor: pointer;
|
|
219
|
-
line-height: 1.5;
|
|
220
|
-
padding: 0;
|
|
221
|
-
border: 0;
|
|
222
|
-
width: 100%;
|
|
223
|
-
display: flex;
|
|
224
|
-
align-items: flex-center;
|
|
225
|
-
font-size: inherit;
|
|
226
|
-
font-family: inherit;
|
|
227
|
-
}
|
|
228
|
-
thead svg {
|
|
229
|
-
display: inline-block;
|
|
230
|
-
color: var(--leu-color-accent-blue);
|
|
231
|
-
padding: 0;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
table.sticky td:first-child,
|
|
235
|
-
table.sticky th:first-child {
|
|
236
|
-
position: sticky;
|
|
237
|
-
}
|
|
238
|
-
div.shadow-left table.sticky td:first-child,
|
|
239
|
-
div.shadow-left table.sticky th:first-child {
|
|
240
|
-
box-shadow: 0 0 5px rgb(0 0 0 / 50%);
|
|
241
|
-
clip-path: inset(0 -15px 0 0);
|
|
242
|
-
}
|
|
243
|
-
div.shadow-left {
|
|
244
|
-
box-shadow: inset 5px 0 5px -5px rgb(0 0 0 / 50%);
|
|
245
|
-
}
|
|
246
|
-
div.shadow-right {
|
|
247
|
-
box-shadow: inset -5px 0 5px -5px rgb(0 0 0 / 50%);
|
|
248
|
-
}
|
|
249
|
-
`);
|
|
277
|
+
_defineProperty(LeuTable, "styles", css_248z);
|
|
250
278
|
_defineProperty(LeuTable, "properties", {
|
|
251
279
|
columns: {
|
|
252
280
|
type: Array
|
|
@@ -258,7 +286,7 @@ _defineProperty(LeuTable, "properties", {
|
|
|
258
286
|
type: Boolean,
|
|
259
287
|
reflect: true
|
|
260
288
|
},
|
|
261
|
-
|
|
289
|
+
itemsPerPage: {
|
|
262
290
|
type: Number,
|
|
263
291
|
reflect: true
|
|
264
292
|
},
|
|
@@ -275,25 +303,14 @@ _defineProperty(LeuTable, "properties", {
|
|
|
275
303
|
reflect: true
|
|
276
304
|
},
|
|
277
305
|
_shadowLeft: {
|
|
278
|
-
type: Boolean,
|
|
279
306
|
state: true
|
|
280
307
|
},
|
|
281
308
|
_shadowRight: {
|
|
282
|
-
type: Boolean,
|
|
283
309
|
state: true
|
|
284
310
|
},
|
|
285
|
-
|
|
286
|
-
type: Number,
|
|
287
|
-
state: true
|
|
288
|
-
},
|
|
289
|
-
_max: {
|
|
290
|
-
type: Number,
|
|
311
|
+
_page: {
|
|
291
312
|
state: true
|
|
292
313
|
}
|
|
293
314
|
});
|
|
294
|
-
function defineTableElements() {
|
|
295
|
-
definePaginationElements();
|
|
296
|
-
defineElement("table", LeuTable);
|
|
297
|
-
}
|
|
298
315
|
|
|
299
|
-
export { LeuTable
|
|
316
|
+
export { LeuTable };
|
|
@@ -27,18 +27,4 @@ function _toPropertyKey(arg) {
|
|
|
27
27
|
return typeof key === "symbol" ? key : String(key);
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
* Adds a definition for a custom element to the custom element
|
|
32
|
-
* registry if it isn't defined before. Prefixes the name with `leu-`.
|
|
33
|
-
* @param {string} name
|
|
34
|
-
* @param {HTMLElement} constructor
|
|
35
|
-
*/
|
|
36
|
-
function defineElement(name, constructor) {
|
|
37
|
-
if (!customElements.get(`leu-${name}`)) {
|
|
38
|
-
customElements.define(`leu-${name}`, constructor);
|
|
39
|
-
} else {
|
|
40
|
-
console.info(`leu-${name} is already defined`);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export { _defineProperty as _, defineElement as d };
|
|
30
|
+
export { _defineProperty as _ };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adds a definition for a custom element to the custom element
|
|
3
|
+
* registry if it isn't defined before. Prefixes the name with `leu-`.
|
|
4
|
+
* @param {string} name
|
|
5
|
+
* @param {HTMLElement} constructor
|
|
6
|
+
*/
|
|
7
|
+
function defineElement(name, constructor) {
|
|
8
|
+
if (!customElements.get(`leu-${name}`)) {
|
|
9
|
+
customElements.define(`leu-${name}`, constructor);
|
|
10
|
+
} else {
|
|
11
|
+
console.info(`leu-${name} is already defined`);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export { defineElement as d };
|
package/dist/index.js
CHANGED
|
@@ -1,26 +1,36 @@
|
|
|
1
|
-
export { BUTTON_EXPANDED_OPTIONS, BUTTON_SIZES, BUTTON_TYPES, BUTTON_VARIANTS, LeuButton
|
|
2
|
-
export { LeuButtonGroup
|
|
3
|
-
export { LeuCheckbox
|
|
4
|
-
export { LeuCheckboxGroup
|
|
5
|
-
export { LeuChipGroup
|
|
6
|
-
export { LeuChipLink
|
|
7
|
-
export { LeuChipRemovable
|
|
8
|
-
export { LeuChipSelectable
|
|
9
|
-
export { LeuDropdown
|
|
10
|
-
export { LeuInput, SIZE_TYPES
|
|
11
|
-
export { LeuMenu
|
|
12
|
-
export { LeuMenuItem
|
|
13
|
-
export { LeuPagination
|
|
14
|
-
export { LeuRadio
|
|
15
|
-
export { LeuRadioGroup
|
|
16
|
-
export { LeuSelect
|
|
17
|
-
export { LeuTable
|
|
18
|
-
import './
|
|
1
|
+
export { BUTTON_EXPANDED_OPTIONS, BUTTON_SIZES, BUTTON_TYPES, BUTTON_VARIANTS, LeuButton } from './Button.js';
|
|
2
|
+
export { LeuButtonGroup } from './ButtonGroup.js';
|
|
3
|
+
export { LeuCheckbox } from './Checkbox.js';
|
|
4
|
+
export { LeuCheckboxGroup } from './CheckboxGroup.js';
|
|
5
|
+
export { LeuChipGroup } from './ChipGroup.js';
|
|
6
|
+
export { LeuChipLink } from './ChipLink.js';
|
|
7
|
+
export { LeuChipRemovable } from './ChipRemovable.js';
|
|
8
|
+
export { LeuChipSelectable } from './ChipSelectable.js';
|
|
9
|
+
export { LeuDropdown } from './Dropdown.js';
|
|
10
|
+
export { LeuInput, SIZE_TYPES } from './Input.js';
|
|
11
|
+
export { LeuMenu } from './Menu.js';
|
|
12
|
+
export { LeuMenuItem } from './MenuItem.js';
|
|
13
|
+
export { LeuPagination } from './Pagination.js';
|
|
14
|
+
export { LeuRadio } from './Radio.js';
|
|
15
|
+
export { LeuRadioGroup } from './RadioGroup.js';
|
|
16
|
+
export { LeuSelect } from './Select.js';
|
|
17
|
+
export { LeuTable } from './Table.js';
|
|
18
|
+
import './_rollupPluginBabelHelpers-20f659f4.js';
|
|
19
19
|
import 'lit';
|
|
20
20
|
import 'lit/directives/class-map.js';
|
|
21
21
|
import './icon-03e86700.js';
|
|
22
|
-
import './
|
|
22
|
+
import './leu-button.js';
|
|
23
|
+
import './defineElement-47d4f665.js';
|
|
24
|
+
import './Chip-dac7337d.js';
|
|
25
|
+
import './leu-menu.js';
|
|
26
|
+
import './leu-menu-item.js';
|
|
27
|
+
import './leu-popup-4bf6f1f4.js';
|
|
28
|
+
import '@floating-ui/dom';
|
|
23
29
|
import 'lit/directives/if-defined.js';
|
|
30
|
+
import 'lit/directives/live.js';
|
|
24
31
|
import 'lit/directives/ref.js';
|
|
32
|
+
import 'lit/static-html.js';
|
|
25
33
|
import 'lit/directives/map.js';
|
|
34
|
+
import './leu-input.js';
|
|
26
35
|
import 'lit/directives/style-map.js';
|
|
36
|
+
import './leu-pagination.js';
|
package/dist/leu-button-group.js
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import './
|
|
1
|
+
import { d as defineElement } from './defineElement-47d4f665.js';
|
|
2
|
+
import { LeuButtonGroup } from './ButtonGroup.js';
|
|
3
|
+
import './_rollupPluginBabelHelpers-20f659f4.js';
|
|
3
4
|
import 'lit';
|
|
5
|
+
import './leu-button.js';
|
|
4
6
|
import './Button.js';
|
|
5
7
|
import 'lit/directives/class-map.js';
|
|
6
8
|
import './icon-03e86700.js';
|
|
7
9
|
|
|
8
|
-
|
|
10
|
+
defineElement("button-group", LeuButtonGroup);
|
|
11
|
+
|
|
12
|
+
export { LeuButtonGroup };
|
package/dist/leu-button.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import './
|
|
1
|
+
import { d as defineElement } from './defineElement-47d4f665.js';
|
|
2
|
+
import { LeuButton } from './Button.js';
|
|
3
|
+
import './_rollupPluginBabelHelpers-20f659f4.js';
|
|
3
4
|
import 'lit';
|
|
4
5
|
import 'lit/directives/class-map.js';
|
|
5
6
|
import './icon-03e86700.js';
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
defineElement("button", LeuButton);
|
|
9
|
+
|
|
10
|
+
export { LeuButton };
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import './
|
|
1
|
+
import { d as defineElement } from './defineElement-47d4f665.js';
|
|
2
|
+
import { LeuCheckboxGroup } from './CheckboxGroup.js';
|
|
3
|
+
import './_rollupPluginBabelHelpers-20f659f4.js';
|
|
3
4
|
import 'lit';
|
|
4
5
|
import 'lit/directives/class-map.js';
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
defineElement("checkbox-group", LeuCheckboxGroup);
|
|
8
|
+
|
|
9
|
+
export { LeuCheckboxGroup };
|
package/dist/leu-checkbox.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import './
|
|
1
|
+
import { d as defineElement } from './defineElement-47d4f665.js';
|
|
2
|
+
import { LeuCheckbox } from './Checkbox.js';
|
|
3
|
+
import './_rollupPluginBabelHelpers-20f659f4.js';
|
|
3
4
|
import 'lit';
|
|
4
5
|
import './icon-03e86700.js';
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
defineElement("checkbox", LeuCheckbox);
|
|
8
|
+
|
|
9
|
+
export { LeuCheckbox };
|
package/dist/leu-chip-group.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import './
|
|
1
|
+
import { d as defineElement } from './defineElement-47d4f665.js';
|
|
2
|
+
import { LeuChipGroup } from './ChipGroup.js';
|
|
3
|
+
import './_rollupPluginBabelHelpers-20f659f4.js';
|
|
3
4
|
import 'lit';
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
defineElement("chip-group", LeuChipGroup);
|
|
7
|
+
|
|
8
|
+
export { LeuChipGroup };
|
package/dist/leu-chip-link.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import './
|
|
1
|
+
import { d as defineElement } from './defineElement-47d4f665.js';
|
|
2
|
+
import { LeuChipLink } from './ChipLink.js';
|
|
3
|
+
import './_rollupPluginBabelHelpers-20f659f4.js';
|
|
3
4
|
import 'lit';
|
|
4
|
-
import './Chip-
|
|
5
|
+
import './Chip-dac7337d.js';
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
defineElement("chip-link", LeuChipLink);
|
|
8
|
+
|
|
9
|
+
export { LeuChipLink };
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import './
|
|
1
|
+
import { d as defineElement } from './defineElement-47d4f665.js';
|
|
2
|
+
import { LeuChipRemovable } from './ChipRemovable.js';
|
|
3
|
+
import './_rollupPluginBabelHelpers-20f659f4.js';
|
|
3
4
|
import 'lit';
|
|
4
|
-
import './Chip-
|
|
5
|
+
import './Chip-dac7337d.js';
|
|
5
6
|
import './icon-03e86700.js';
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
defineElement("chip-removable", LeuChipRemovable);
|
|
9
|
+
|
|
10
|
+
export { LeuChipRemovable };
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import './
|
|
1
|
+
import { d as defineElement } from './defineElement-47d4f665.js';
|
|
2
|
+
import { LeuChipSelectable } from './ChipSelectable.js';
|
|
3
|
+
import './_rollupPluginBabelHelpers-20f659f4.js';
|
|
3
4
|
import 'lit';
|
|
4
|
-
import './Chip-
|
|
5
|
+
import './Chip-dac7337d.js';
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
defineElement("chip-selectable", LeuChipSelectable);
|
|
8
|
+
|
|
9
|
+
export { LeuChipSelectable };
|
package/dist/leu-dropdown.js
CHANGED
|
@@ -1,10 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import './
|
|
1
|
+
import { d as defineElement } from './defineElement-47d4f665.js';
|
|
2
|
+
import { LeuDropdown } from './Dropdown.js';
|
|
3
|
+
import './_rollupPluginBabelHelpers-20f659f4.js';
|
|
3
4
|
import 'lit';
|
|
5
|
+
import './leu-button.js';
|
|
4
6
|
import './Button.js';
|
|
5
7
|
import 'lit/directives/class-map.js';
|
|
6
8
|
import './icon-03e86700.js';
|
|
9
|
+
import './leu-menu.js';
|
|
7
10
|
import './Menu.js';
|
|
11
|
+
import './leu-menu-item.js';
|
|
8
12
|
import './MenuItem.js';
|
|
13
|
+
import 'lit/static-html.js';
|
|
14
|
+
import 'lit/directives/if-defined.js';
|
|
15
|
+
import './leu-popup-4bf6f1f4.js';
|
|
16
|
+
import '@floating-ui/dom';
|
|
9
17
|
|
|
10
|
-
|
|
18
|
+
defineElement("dropdown", LeuDropdown);
|
|
19
|
+
|
|
20
|
+
export { LeuDropdown };
|
package/dist/leu-input.js
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import './
|
|
1
|
+
import { d as defineElement } from './defineElement-47d4f665.js';
|
|
2
|
+
import { LeuInput } from './Input.js';
|
|
3
|
+
import './_rollupPluginBabelHelpers-20f659f4.js';
|
|
3
4
|
import 'lit';
|
|
4
5
|
import 'lit/directives/class-map.js';
|
|
5
6
|
import 'lit/directives/if-defined.js';
|
|
7
|
+
import 'lit/directives/live.js';
|
|
6
8
|
import 'lit/directives/ref.js';
|
|
7
9
|
import './icon-03e86700.js';
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
defineElement("input", LeuInput);
|
|
12
|
+
|
|
13
|
+
export { LeuInput };
|
package/dist/leu-menu-item.js
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import './
|
|
1
|
+
import { d as defineElement } from './defineElement-47d4f665.js';
|
|
2
|
+
import { LeuMenuItem } from './MenuItem.js';
|
|
3
|
+
import './_rollupPluginBabelHelpers-20f659f4.js';
|
|
3
4
|
import 'lit';
|
|
5
|
+
import 'lit/static-html.js';
|
|
6
|
+
import 'lit/directives/if-defined.js';
|
|
4
7
|
import './icon-03e86700.js';
|
|
5
8
|
|
|
6
|
-
|
|
9
|
+
defineElement("menu-item", LeuMenuItem);
|
|
10
|
+
|
|
11
|
+
export { LeuMenuItem };
|
package/dist/leu-menu.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import './
|
|
1
|
+
import { d as defineElement } from './defineElement-47d4f665.js';
|
|
2
|
+
import { LeuMenu } from './Menu.js';
|
|
3
|
+
import './_rollupPluginBabelHelpers-20f659f4.js';
|
|
3
4
|
import 'lit';
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
defineElement("menu", LeuMenu);
|
|
7
|
+
|
|
8
|
+
export { LeuMenu };
|
package/dist/leu-pagination.js
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import './
|
|
1
|
+
import { d as defineElement } from './defineElement-47d4f665.js';
|
|
2
|
+
import { LeuPagination } from './Pagination.js';
|
|
3
|
+
import './_rollupPluginBabelHelpers-20f659f4.js';
|
|
3
4
|
import 'lit';
|
|
5
|
+
import 'lit/directives/live.js';
|
|
6
|
+
import './leu-button.js';
|
|
4
7
|
import './Button.js';
|
|
5
8
|
import 'lit/directives/class-map.js';
|
|
6
9
|
import './icon-03e86700.js';
|
|
7
10
|
|
|
8
|
-
|
|
11
|
+
defineElement("pagination", LeuPagination);
|
|
12
|
+
|
|
13
|
+
export { LeuPagination };
|