@teipublisher/pb-components 2.26.1-next.3 → 3.0.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.
Files changed (154) hide show
  1. package/.github/workflows/main.yml +3 -3
  2. package/.github/workflows/node.js.yml +3 -3
  3. package/.github/workflows/release.js.yml +4 -4
  4. package/.releaserc.json +2 -2
  5. package/CHANGELOG.md +262 -11
  6. package/Dockerfile +78 -70
  7. package/css/components.css +5 -5
  8. package/css/leaflet/images/layers.png +0 -0
  9. package/dist/demo/components.css +46 -1
  10. package/dist/demo/pb-browse-docs2.html +1 -1
  11. package/dist/demo/pb-dialog.html +3 -5
  12. package/dist/demo/pb-drawer2.html +1 -1
  13. package/dist/demo/pb-facsimile.html +2 -2
  14. package/dist/demo/pb-grid.html +19 -6
  15. package/dist/demo/pb-leaflet-map.html +1 -1
  16. package/dist/demo/pb-login.html +0 -2
  17. package/dist/demo/pb-message.html +1 -2
  18. package/dist/demo/pb-progress.html +2 -2
  19. package/dist/demo/pb-repeat.html +1 -3
  20. package/dist/demo/pb-search.html +7 -4
  21. package/dist/demo/pb-search3.html +1 -1
  22. package/dist/demo/pb-search4.html +2 -2
  23. package/dist/demo/pb-view3.html +1 -1
  24. package/dist/{iron-form-3b8dcaa7.js → iron-form-dfb3e3b1.js} +95 -95
  25. package/dist/paper-checkbox-645e1077.js +200 -0
  26. package/dist/{paper-icon-button-b1d31571.js → paper-icon-button-984162bd.js} +1 -1
  27. package/dist/{paper-checkbox-515a5284.js → paper-inky-focus-behavior-fa16796b.js} +58 -247
  28. package/dist/{paper-listbox-a3b7175c.js → paper-listbox-5f5d1cec.js} +152 -162
  29. package/dist/pb-code-editor.js +25 -20
  30. package/dist/pb-component-docs.js +68 -64
  31. package/dist/pb-components-bundle.js +1983 -2293
  32. package/dist/pb-edit-app.js +167 -107
  33. package/dist/pb-elements.json +176 -120
  34. package/dist/{pb-i18n-0611135a.js → pb-i18n-4cc00bfe.js} +1 -1
  35. package/dist/pb-leaflet-map.js +23 -23
  36. package/dist/pb-mei.js +56 -41
  37. package/dist/{pb-mixin-b1caa22e.js → pb-mixin-886ece32.js} +1 -1
  38. package/dist/pb-odd-editor.js +1023 -782
  39. package/dist/pb-tify.js +2 -2
  40. package/dist/vaadin-element-mixin-beb74ffd.js +545 -0
  41. package/gh-pages.js +5 -3
  42. package/i18n/common/en.json +6 -0
  43. package/i18n/common/pl.json +2 -2
  44. package/lib/openseadragon.min.js +6 -6
  45. package/package.json +3 -3
  46. package/pb-elements.json +176 -120
  47. package/src/assets/components.css +5 -5
  48. package/src/authority/airtable.js +20 -21
  49. package/src/authority/anton.js +129 -129
  50. package/src/authority/custom.js +23 -21
  51. package/src/authority/geonames.js +38 -32
  52. package/src/authority/gnd.js +50 -42
  53. package/src/authority/kbga.js +137 -134
  54. package/src/authority/metagrid.js +44 -46
  55. package/src/authority/reconciliation.js +66 -67
  56. package/src/authority/registry.js +4 -4
  57. package/src/docs/pb-component-docs.js +2 -2
  58. package/src/docs/pb-component-view.js +5 -5
  59. package/src/docs/pb-components-list.js +2 -2
  60. package/src/docs/pb-demo-snippet.js +2 -2
  61. package/src/dts-client.js +299 -297
  62. package/src/dts-select-endpoint.js +90 -82
  63. package/src/parse-date-service.js +184 -135
  64. package/src/pb-ajax.js +158 -171
  65. package/src/pb-authority-lookup.js +191 -156
  66. package/src/pb-autocomplete.js +292 -280
  67. package/src/pb-blacklab-highlight.js +264 -259
  68. package/src/pb-blacklab-results.js +236 -221
  69. package/src/pb-browse-docs.js +540 -475
  70. package/src/pb-browse.js +68 -65
  71. package/src/pb-clipboard.js +79 -76
  72. package/src/pb-code-editor.js +110 -102
  73. package/src/pb-code-highlight.js +209 -204
  74. package/src/pb-codepen.js +79 -72
  75. package/src/pb-collapse.js +211 -151
  76. package/src/pb-combo-box.js +190 -190
  77. package/src/pb-components-bundle.js +1 -1
  78. package/src/pb-components.js +1 -0
  79. package/src/pb-custom-form.js +173 -153
  80. package/src/pb-dialog.js +98 -62
  81. package/src/pb-document.js +89 -90
  82. package/src/pb-download.js +212 -196
  83. package/src/pb-drawer.js +145 -148
  84. package/src/pb-edit-app.js +301 -229
  85. package/src/pb-edit-xml.js +100 -97
  86. package/src/pb-events.js +114 -107
  87. package/src/pb-facs-link.js +104 -102
  88. package/src/pb-facsimile.js +474 -410
  89. package/src/pb-formula.js +151 -153
  90. package/src/pb-geolocation.js +129 -131
  91. package/src/pb-grid-action.js +53 -56
  92. package/src/pb-grid.js +231 -228
  93. package/src/pb-highlight.js +140 -140
  94. package/src/pb-hotkeys.js +40 -42
  95. package/src/pb-i18n.js +101 -104
  96. package/src/pb-image-strip.js +84 -78
  97. package/src/pb-lang.js +142 -57
  98. package/src/pb-leaflet-map.js +488 -485
  99. package/src/pb-link.js +126 -124
  100. package/src/pb-load.js +431 -429
  101. package/src/pb-login.js +299 -244
  102. package/src/pb-manage-odds.js +352 -336
  103. package/src/pb-map-icon.js +89 -89
  104. package/src/pb-map-layer.js +85 -85
  105. package/src/pb-markdown.js +90 -99
  106. package/src/pb-media-query.js +74 -72
  107. package/src/pb-mei.js +306 -295
  108. package/src/pb-message.js +139 -97
  109. package/src/pb-mixin.js +269 -264
  110. package/src/pb-navigation.js +80 -95
  111. package/src/pb-observable.js +38 -38
  112. package/src/pb-odd-editor.js +1054 -958
  113. package/src/pb-odd-elementspec-editor.js +349 -298
  114. package/src/pb-odd-model-editor.js +1075 -909
  115. package/src/pb-odd-parameter-editor.js +200 -178
  116. package/src/pb-odd-rendition-editor.js +136 -124
  117. package/src/pb-page.js +431 -422
  118. package/src/pb-paginate.js +228 -179
  119. package/src/pb-panel.js +198 -182
  120. package/src/pb-popover-themes.js +15 -8
  121. package/src/pb-popover.js +296 -287
  122. package/src/pb-print-preview.js +127 -127
  123. package/src/pb-progress.js +51 -51
  124. package/src/pb-repeat.js +105 -104
  125. package/src/pb-restricted.js +84 -77
  126. package/src/pb-search.js +256 -228
  127. package/src/pb-select-feature.js +127 -120
  128. package/src/pb-select-odd.js +132 -124
  129. package/src/pb-select-template.js +89 -78
  130. package/src/pb-select.js +251 -227
  131. package/src/pb-split-list.js +179 -174
  132. package/src/pb-svg.js +80 -79
  133. package/src/pb-table-column.js +54 -54
  134. package/src/pb-table-grid.js +221 -203
  135. package/src/pb-tabs.js +61 -63
  136. package/src/pb-tify.js +154 -154
  137. package/src/pb-timeline.js +382 -249
  138. package/src/pb-toggle-feature.js +195 -187
  139. package/src/pb-upload.js +184 -174
  140. package/src/pb-version.js +30 -30
  141. package/src/pb-view-annotate.js +135 -98
  142. package/src/pb-view.js +1282 -1270
  143. package/src/pb-zoom.js +127 -45
  144. package/src/polymer-hack.js +1 -1
  145. package/src/search-result-service.js +256 -223
  146. package/src/seed-element.js +13 -20
  147. package/src/settings.js +4 -4
  148. package/src/theming.js +98 -91
  149. package/src/urls.js +289 -289
  150. package/src/utils.js +53 -51
  151. package/css/pb-styles.css +0 -51
  152. package/dist/vaadin-element-mixin-fe4a4883.js +0 -527
  153. package/src/assets/pb-styles.css +0 -51
  154. package/src/pb-light-dom.js +0 -41
package/src/pb-select.js CHANGED
@@ -1,12 +1,11 @@
1
1
  import { LitElement, html, css } from 'lit-element';
2
- import "@polymer/paper-dropdown-menu/paper-dropdown-menu";
3
- import "@polymer/paper-listbox";
4
- import "@polymer/paper-item";
5
- import "@polymer/iron-label/iron-label.js";
6
- import { translate } from "./pb-i18n.js";
2
+ import '@polymer/paper-dropdown-menu/paper-dropdown-menu';
3
+ import '@polymer/paper-listbox';
4
+ import '@polymer/paper-item';
5
+ import '@polymer/iron-label/iron-label.js';
6
+ import { translate } from './pb-i18n.js';
7
7
  import { pbMixin, waitOnce } from './pb-mixin.js';
8
8
 
9
-
10
9
  /**
11
10
  * Replacement for an HTML select element with additional features:
12
11
  *
@@ -19,256 +18,281 @@ import { pbMixin, waitOnce } from './pb-mixin.js';
19
18
  * @csspart label - the label shown above a multi-selection box (does not apply to single-selection)
20
19
  */
21
20
  export class PbSelect extends pbMixin(LitElement) {
22
- static get properties() {
23
- return {
24
- /**
25
- * Label to display above the select or inside if nothing is selected
26
- */
27
- label: {
28
- type: String
29
- },
30
- /**
31
- * Initial value to select. If not set, no item will be selected
32
- */
33
- value: {
34
- type: String,
35
- reflect: true
36
- },
37
- /**
38
- * If `multi` is set, specify initial values via this property
39
- * instead of using `value`
40
- */
41
- values: {
42
- type: Array,
43
- reflect: true
44
- },
45
- /**
46
- * name used when submitted inside a form
47
- */
48
- name: {
49
- type: String
50
- },
51
- /**
52
- * Optional URL to query for suggestions. If relative, it is interpreted
53
- * relative to the endpoint defined on a surrounding `pb-page`.
54
- */
55
- source: {
56
- type: String
57
- },
58
- multi: {
59
- type: Boolean
60
- },
61
- _items: {
62
- type: Array
63
- },
64
- _selected: {
65
- type: Array
66
- },
67
- ...super.properties
68
- };
69
- }
21
+ static get properties() {
22
+ return {
23
+ /**
24
+ * Label to display above the select or inside if nothing is selected
25
+ */
26
+ label: {
27
+ type: String,
28
+ },
29
+ /**
30
+ * Initial value to select. If not set, no item will be selected
31
+ */
32
+ value: {
33
+ type: String,
34
+ reflect: true,
35
+ },
36
+ /**
37
+ * If `multi` is set, specify initial values via this property
38
+ * instead of using `value`
39
+ */
40
+ values: {
41
+ type: Array,
42
+ reflect: true,
43
+ },
44
+ /**
45
+ * name used when submitted inside a form
46
+ */
47
+ name: {
48
+ type: String,
49
+ },
50
+ /**
51
+ * Optional URL to query for suggestions. If relative, it is interpreted
52
+ * relative to the endpoint defined on a surrounding `pb-page`.
53
+ */
54
+ source: {
55
+ type: String,
56
+ },
57
+ multi: {
58
+ type: Boolean,
59
+ },
60
+ _items: {
61
+ type: Array,
62
+ },
63
+ _selected: {
64
+ type: Array,
65
+ },
66
+ ...super.properties,
67
+ };
68
+ }
70
69
 
71
- constructor() {
72
- super();
73
- this.value = null;
74
- this.values = [];
75
- this._items = [];
76
- this._selected = [];
77
- this._inIronForm = false;
78
- }
70
+ constructor() {
71
+ super();
72
+ this.value = null;
73
+ this.values = [];
74
+ this._items = [];
75
+ this._selected = [];
76
+ this._inIronForm = false;
77
+ }
79
78
 
80
- connectedCallback() {
81
- super.connectedCallback();
79
+ connectedCallback() {
80
+ super.connectedCallback();
82
81
 
83
- this.subscribeTo('pb-i18n-update', this._refresh.bind(this));
84
- // in multi-select mode, copy any value set via 'value' to 'values'
85
- if (this.multi) {
86
- if (this.values.length === 0 && this.value) {
87
- this.values = [this.value];
88
- }
89
- // delete this.value so it is not picked up by iron-form
90
- this.value = undefined;
91
- }
82
+ this.subscribeTo('pb-i18n-update', this._refresh.bind(this));
83
+ // in multi-select mode, copy any value set via 'value' to 'values'
84
+ if (this.multi) {
85
+ if (this.values.length === 0 && this.value) {
86
+ this.values = [this.value];
87
+ }
88
+ // delete this.value so it is not picked up by iron-form
89
+ this.value = undefined;
92
90
  }
91
+ }
93
92
 
94
- firstUpdated() {
95
- super.firstUpdated();
93
+ firstUpdated() {
94
+ super.firstUpdated();
96
95
 
97
- this._inIronForm = this.closest('iron-form, pb-search,pb-custom-form');
96
+ this._inIronForm = this.closest('iron-form, pb-search,pb-custom-form');
98
97
 
99
- const slot = this.shadowRoot.querySelector('[name="subform"]');
100
- if (slot) {
101
- slot.assignedNodes().forEach((node) => {
102
- if (this.name) {
103
- node.addEventListener('change', this._loadRemote.bind(this));
104
- }
105
- const inputs = node.querySelectorAll('[name]');
106
- inputs.forEach((input) => {
107
- input.addEventListener('change', this._loadRemote.bind(this));
108
- });
109
- });
98
+ const slot = this.shadowRoot.querySelector('[name="subform"]');
99
+ if (slot) {
100
+ slot.assignedNodes().forEach(node => {
101
+ if (this.name) {
102
+ node.addEventListener('change', this._loadRemote.bind(this));
110
103
  }
111
- waitOnce('pb-page-ready', () => {
112
- this._loadRemote();
104
+ const inputs = node.querySelectorAll('[name]');
105
+ inputs.forEach(input => {
106
+ input.addEventListener('change', this._loadRemote.bind(this));
113
107
  });
108
+ });
114
109
  }
110
+ waitOnce('pb-page-ready', () => {
111
+ this._loadRemote();
112
+ });
113
+ }
115
114
 
116
- _refresh() {
117
- const listbox = this.shadowRoot.getElementById('list');
118
- if (listbox) {
119
- setTimeout(() => {
120
- const old = listbox.selected;
121
- listbox.selected = undefined;
122
- listbox.selected = old;
123
- });
124
- }
115
+ _refresh() {
116
+ const listbox = this.shadowRoot.getElementById('list');
117
+ if (listbox) {
118
+ setTimeout(() => {
119
+ const old = listbox.selected;
120
+ listbox.selected = undefined;
121
+ listbox.selected = old;
122
+ });
125
123
  }
124
+ }
126
125
 
127
- _clear(selector) {
128
- const slot = this.shadowRoot.querySelector(selector);
129
- if (slot) {
130
- slot.assignedNodes().forEach((node) => {
131
- node.parentNode.removeChild(node);
132
- });
133
- }
126
+ _clear(selector) {
127
+ const slot = this.shadowRoot.querySelector(selector);
128
+ if (slot) {
129
+ slot.assignedNodes().forEach(node => {
130
+ node.parentNode.removeChild(node);
131
+ });
134
132
  }
133
+ }
135
134
 
136
- _loadRemote() {
137
- if (!this.source) {
138
- return // nothing to do
139
- }
135
+ _loadRemote() {
136
+ if (!this.source) {
137
+ return; // nothing to do
138
+ }
140
139
 
141
- let url = this.toAbsoluteURL(this.source);
142
- url += url.includes('?') ? '&' : '?';
143
- url += this._getParameters();
140
+ let url = this.toAbsoluteURL(this.source);
141
+ url += url.includes('?') ? '&' : '?';
142
+ url += this._getParameters();
144
143
 
145
- console.log('<pb-select> loading items from %s', url);
144
+ console.log('<pb-select> loading items from %s', url);
146
145
 
147
- fetch(url, {
148
- method: 'GET',
149
- mode: 'cors',
150
- credentials: 'same-origin'
151
- })
152
- .then((response) => response.json())
153
- .then((json) => {
154
- this._clear('slot:not([name])');
155
- const items = json.map(PbSelect.jsonEntry2item);
156
- console.log('<pb-select> loaded %d items', items.length);
157
- this._items = items;
158
- })
159
- .catch(() => console.error('<pb-select> request to %s failed', url));
160
- }
146
+ fetch(url, {
147
+ method: 'GET',
148
+ mode: 'cors',
149
+ credentials: 'same-origin',
150
+ })
151
+ .then(response => response.json())
152
+ .then(json => {
153
+ this._clear('slot:not([name])');
154
+ const items = json.map(PbSelect.jsonEntry2item);
155
+ console.log('<pb-select> loaded %d items', items.length);
156
+ this._items = items;
157
+ })
158
+ .catch(() => console.error('<pb-select> request to %s failed', url));
159
+ }
161
160
 
162
- static jsonEntry2item (item) {
163
- return {
164
- label: item.text,
165
- value: item.value
166
- };
167
- }
161
+ static jsonEntry2item(item) {
162
+ return {
163
+ label: item.text,
164
+ value: item.value,
165
+ };
166
+ }
168
167
 
169
- _getParameters() {
170
- const slot = this.shadowRoot.querySelector('[name="subform"]');
171
- const params = [];
172
- if (slot) {
173
- slot.assignedNodes().forEach((node) => {
174
- const inputs = node.querySelectorAll('[name]');
175
- inputs.forEach((input) => {
176
- params.push(`${input.name}=${encodeURIComponent(input.value)}`);
177
- });
178
- });
179
- }
180
- return params.join('&');
168
+ _getParameters() {
169
+ const slot = this.shadowRoot.querySelector('[name="subform"]');
170
+ const params = [];
171
+ if (slot) {
172
+ slot.assignedNodes().forEach(node => {
173
+ const inputs = node.querySelectorAll('[name]');
174
+ inputs.forEach(input => {
175
+ params.push(`${input.name}=${encodeURIComponent(input.value)}`);
176
+ });
177
+ });
181
178
  }
179
+ return params.join('&');
180
+ }
182
181
 
183
- render() {
184
- if (this.multi) {
185
- return html`
186
- <slot name="subform"></slot>
187
- <iron-label for="list" part="label">${translate(this.label)}</iron-label>
188
- ${
189
- this.multi ?
190
- html`<paper-listbox id="list" slot="dropdown-content" class="dropdown-content"
191
- .selectedValues="${this.values}" multi
192
- attr-for-selected="value" @iron-select="${this._changed}" @iron-deselect="${this._changed}">
193
- <slot></slot>
194
- ${this._items.map((item) => html`<paper-item value="${item.value}">${item.label}</paper-item>`)}
195
- </paper-listbox>` :
196
- html`<paper-listbox id="list" slot="dropdown-content" class="dropdown-content"
197
- .selected="${this.value}"
198
- attr-for-selected="value" @iron-select="${this._changed}" @iron-deselect="${this._changed}">
199
- <slot></slot>
200
- ${this._items.map((item) => html`<paper-item value="${item.value}">${item.label}</paper-item>`)}
201
- </paper-listbox>`
202
- }
203
- <slot name="output"></slot>
204
- `;
205
- }
206
- return html`
207
- <slot name="subform"></slot>
208
- <paper-dropdown-menu label="${translate(this.label)}">
209
- <paper-listbox id="list" slot="dropdown-content" class="dropdown-content" .selected="${this.value}"
210
- attr-for-selected="value" @iron-select="${this._changed}">
211
- <slot></slot>
212
- ${this._items.map((item) => html`<paper-item value="${item.value}">${item.label}</paper-item>`)}
213
- </paper-listbox>
214
- </paper-dropdown-menu>
215
- <slot name="output"></slot>
216
- `;
182
+ render() {
183
+ if (this.multi) {
184
+ return html`
185
+ <slot name="subform"></slot>
186
+ <iron-label for="list" part="label">${translate(this.label)}</iron-label>
187
+ ${this.multi
188
+ ? html`<paper-listbox
189
+ id="list"
190
+ slot="dropdown-content"
191
+ class="dropdown-content"
192
+ .selectedValues="${this.values}"
193
+ multi
194
+ attr-for-selected="value"
195
+ @iron-select="${this._changed}"
196
+ @iron-deselect="${this._changed}"
197
+ >
198
+ <slot></slot>
199
+ ${this._items.map(
200
+ item => html`<paper-item value="${item.value}">${item.label}</paper-item>`,
201
+ )}
202
+ </paper-listbox>`
203
+ : html`<paper-listbox
204
+ id="list"
205
+ slot="dropdown-content"
206
+ class="dropdown-content"
207
+ .selected="${this.value}"
208
+ attr-for-selected="value"
209
+ @iron-select="${this._changed}"
210
+ @iron-deselect="${this._changed}"
211
+ >
212
+ <slot></slot>
213
+ ${this._items.map(
214
+ item => html`<paper-item value="${item.value}">${item.label}</paper-item>`,
215
+ )}
216
+ </paper-listbox>`}
217
+ <slot name="output"></slot>
218
+ `;
217
219
  }
220
+ return html`
221
+ <slot name="subform"></slot>
222
+ <paper-dropdown-menu label="${translate(this.label)}">
223
+ <paper-listbox
224
+ id="list"
225
+ slot="dropdown-content"
226
+ class="dropdown-content"
227
+ .selected="${this.value}"
228
+ attr-for-selected="value"
229
+ @iron-select="${this._changed}"
230
+ >
231
+ <slot></slot>
232
+ ${this._items.map(
233
+ item => html`<paper-item value="${item.value}">${item.label}</paper-item>`,
234
+ )}
235
+ </paper-listbox>
236
+ </paper-dropdown-menu>
237
+ <slot name="output"></slot>
238
+ `;
239
+ }
218
240
 
219
- _changed() {
220
- const list = this.shadowRoot.getElementById('list');
221
- const oldSelected = Array.of(this._selected);
222
- if (this.multi) {
223
- this._selected = list.selectedValues;
224
- this.values = this._selected;
225
- } else {
226
- this._selected = [list.selected];
227
- this.value = list.selected;
228
- }
241
+ _changed() {
242
+ const list = this.shadowRoot.getElementById('list');
243
+ const oldSelected = Array.of(this._selected);
244
+ if (this.multi) {
245
+ this._selected = list.selectedValues;
246
+ this.values = this._selected;
247
+ } else {
248
+ this._selected = [list.selected];
249
+ this.value = list.selected;
250
+ }
229
251
 
230
- // check if selected items really changed
231
- if (this._selected.length === oldSelected.length &&
232
- this._selected.every((val, index) => val === oldSelected[index])) {
233
- return;
234
- }
252
+ // check if selected items really changed
253
+ if (
254
+ this._selected.length === oldSelected.length &&
255
+ this._selected.every((val, index) => val === oldSelected[index])
256
+ ) {
257
+ return;
258
+ }
235
259
 
236
- if (!this._inIronForm || this.multi) {
237
- this._clear('[name="output"]');
260
+ if (!this._inIronForm || this.multi) {
261
+ this._clear('[name="output"]');
238
262
 
239
- const vals = this.multi ? this.values : [this.value];
240
- vals.forEach((val) => {
241
- const hidden = document.createElement('input');
242
- hidden.type = 'hidden';
243
- hidden.name = this.name;
244
- hidden.value = val;
245
- hidden.slot = 'output';
246
- this.appendChild(hidden);
247
- });
248
- }
249
- this.dispatchEvent(new CustomEvent('change'));
263
+ const vals = this.multi ? this.values : [this.value];
264
+ vals.forEach(val => {
265
+ const hidden = document.createElement('input');
266
+ hidden.type = 'hidden';
267
+ hidden.name = this.name;
268
+ hidden.value = val;
269
+ hidden.slot = 'output';
270
+ this.appendChild(hidden);
271
+ });
250
272
  }
273
+ this.dispatchEvent(new CustomEvent('change'));
274
+ }
251
275
 
252
- static get styles() {
253
- return css`
254
- :host {
255
- display: flex;
256
- flex-direction: column;
257
- position:relative;
258
- margin-top:1rem;
259
- }
276
+ static get styles() {
277
+ return css`
278
+ :host {
279
+ display: flex;
280
+ flex-direction: column;
281
+ position: relative;
282
+ margin-top: 1rem;
283
+ }
260
284
 
261
- iron-label {
262
- font: var(--pb-base-font);
263
- font-size:var(--pb-font-caption);
264
- font-weight: 400;
265
- color: var(--pb-color-lighter);
266
- }
267
-
268
- paper-listbox{
269
- overflow:auto;
270
- }
271
- `;
272
- }
285
+ iron-label {
286
+ font: var(--pb-base-font);
287
+ font-size: var(--pb-font-caption);
288
+ font-weight: 400;
289
+ color: var(--pb-color-lighter);
290
+ }
291
+
292
+ paper-listbox {
293
+ overflow: auto;
294
+ }
295
+ `;
296
+ }
273
297
  }
274
298
  customElements.define('pb-select', PbSelect);