@oicl/openbridge-webcomponents-full-bundle 2.1.0 → 2.2.0-next.2
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/bundle/openbridge-webcomponents.bundle.js +59 -16
- package/bundle/openbridge-webcomponents.bundle.js.map +1 -1
- package/custom-elements.json +121 -9
- package/dist/components/icon-button/icon-button.d.ts +2 -0
- package/dist/components/icon-button/icon-button.d.ts.map +1 -1
- package/dist/components/icon-button/icon-button.js +4 -0
- package/dist/components/icon-button/icon-button.js.map +1 -1
- package/dist/components/split-button/split-button.css.js +5 -0
- package/dist/components/split-button/split-button.css.js.map +1 -1
- package/dist/components/split-button/split-button.d.ts +35 -5
- package/dist/components/split-button/split-button.d.ts.map +1 -1
- package/dist/components/split-button/split-button.js +23 -5
- package/dist/components/split-button/split-button.js.map +1 -1
- package/dist/components/top-bar/top-bar.css.js +2 -2
- package/dist/components/top-bar/top-bar.css.js.map +1 -1
- package/dist/components/top-bar/top-bar.d.ts +23 -8
- package/dist/components/top-bar/top-bar.d.ts.map +1 -1
- package/dist/components/top-bar/top-bar.js +25 -9
- package/dist/components/top-bar/top-bar.js.map +1 -1
- package/package.json +1 -1
- package/src/components/icon-button/icon-button.ts +5 -0
- package/src/components/split-button/split-button.css +7 -0
- package/src/components/split-button/split-button.spec.ts +241 -0
- package/src/components/split-button/split-button.stories.ts +118 -2
- package/src/components/split-button/split-button.ts +53 -9
- package/src/components/textarea-field/textarea-field.spec.ts +30 -0
- package/src/components/top-bar/top-bar-more-button.spec.ts +60 -0
- package/src/components/top-bar/top-bar.css +2 -2
- package/src/components/top-bar/top-bar.ts +47 -14
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {LitElement, html, unsafeCSS} from 'lit';
|
|
1
|
+
import {LitElement, PropertyValues, html, unsafeCSS} from 'lit';
|
|
2
2
|
import {property} from 'lit/decorators.js';
|
|
3
3
|
import {classMap} from 'lit/directives/class-map.js';
|
|
4
4
|
import {msg} from '@lit/localize';
|
|
@@ -81,7 +81,8 @@ export enum ObcTopBarMenuButtonIcon {
|
|
|
81
81
|
* - `menu-button-clicked` – Fired when the menu button is clicked.
|
|
82
82
|
* - `dimming-button-clicked` – Fired when the dimming (day/night) button is clicked.
|
|
83
83
|
* - `apps-button-clicked` – Fired when the apps button is clicked.
|
|
84
|
-
* - `
|
|
84
|
+
* - `more-button-clicked` – Fired when the more button is clicked.
|
|
85
|
+
* - `left-more-button-clicked` – Deprecated alias of `more-button-clicked`, fired with it; removed in 4.0.0.
|
|
85
86
|
* - `user-button-clicked` – Fired when the user/profile button is clicked.
|
|
86
87
|
* - `close` – Fired in settings mode when the close button is clicked.
|
|
87
88
|
* - `back` – Fired in settings mode when the back button is clicked.
|
|
@@ -132,8 +133,8 @@ export enum ObcTopBarMenuButtonIcon {
|
|
|
132
133
|
* @availableWhen dimmingButtonActivated showDimmingButton==true && inactive==false
|
|
133
134
|
* @property appsButtonActivated - Highlights the apps button as active.
|
|
134
135
|
* @availableWhen appsButtonActivated showAppsButton==true && inactive==false
|
|
135
|
-
* @property
|
|
136
|
-
* @availableWhen
|
|
136
|
+
* @property moreButtonActivated - Highlights the more button as active.
|
|
137
|
+
* @availableWhen moreButtonActivated inactive==false
|
|
137
138
|
* @property userButtonActivated - Highlights the user/profile button as active.
|
|
138
139
|
* @availableWhen userButtonActivated showUserButton==true && inactive==false
|
|
139
140
|
* @property userButtonDisabled - Disables the user/profile button.
|
|
@@ -163,13 +164,16 @@ export enum ObcTopBarMenuButtonIcon {
|
|
|
163
164
|
* @fires menu-button-clicked - Fired when the menu button is clicked
|
|
164
165
|
* @fires dimming-button-clicked - Fired when the dimming (day/night) button is clicked
|
|
165
166
|
* @fires apps-button-clicked - Fired when the apps button is clicked
|
|
166
|
-
* @fires
|
|
167
|
+
* @fires more-button-clicked - Fired when the more button is clicked
|
|
168
|
+
* @fires left-more-button-clicked - Deprecated: listen to `more-button-clicked` instead. Fired together with it; removed in 4.0.0.
|
|
167
169
|
* @fires user-button-clicked - Fired when the user/profile button is clicked
|
|
168
170
|
* @fires close - Fired in settings mode when the close button is clicked
|
|
169
171
|
* @fires back - Fired in settings mode when the back button is clicked
|
|
170
172
|
* @fires emergency-brightness-start - Fired when the menu button is held for 500ms. This should increase the brightness of the screen slowly. Used when the screen is too dark.
|
|
171
173
|
* @fires emergency-brightness-stop - Fired when the menu button is released.
|
|
172
174
|
* @fires {BreadcrumbClickEvent} breadcrumb-click - Fired when a breadcrumb item is clicked.
|
|
175
|
+
* @csspart more-button - The more button shown below the breakpoints.
|
|
176
|
+
* @csspart left-more-button - Deprecated alias of the `more-button` part; removed in 4.0.0.
|
|
173
177
|
* @stable
|
|
174
178
|
*/
|
|
175
179
|
@customElement('obc-top-bar')
|
|
@@ -190,7 +194,13 @@ export class ObcTopBar extends LitElement {
|
|
|
190
194
|
appsButtonActivated = false;
|
|
191
195
|
|
|
192
196
|
@property({type: Boolean})
|
|
193
|
-
|
|
197
|
+
moreButtonActivated = false;
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* @deprecated Use `moreButtonActivated`. Removed in 4.0.0.
|
|
201
|
+
*/
|
|
202
|
+
@property({type: Boolean})
|
|
203
|
+
leftMoreButtonActivated?: boolean;
|
|
194
204
|
|
|
195
205
|
@property({type: Boolean})
|
|
196
206
|
userButtonActivated = false;
|
|
@@ -253,9 +263,30 @@ export class ObcTopBar extends LitElement {
|
|
|
253
263
|
this.dispatchEvent(new CustomEvent('apps-button-clicked'));
|
|
254
264
|
}
|
|
255
265
|
|
|
256
|
-
|
|
266
|
+
/**
|
|
267
|
+
* Copies the deprecated `leftMoreButtonActivated` into
|
|
268
|
+
* `moreButtonActivated`. A plain field rather than a getter/setter alias:
|
|
269
|
+
* the Vue wrapper writes every prop back on its second render, and a getter
|
|
270
|
+
* would then write `false` over the new property.
|
|
271
|
+
*/
|
|
272
|
+
override willUpdate(changed: PropertyValues<this>): void {
|
|
273
|
+
super.willUpdate(changed);
|
|
274
|
+
if (
|
|
275
|
+
changed.has('leftMoreButtonActivated') &&
|
|
276
|
+
this.leftMoreButtonActivated !== undefined
|
|
277
|
+
) {
|
|
278
|
+
this.moreButtonActivated = this.leftMoreButtonActivated;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
private moreButtonClicked() {
|
|
283
|
+
/**
|
|
284
|
+
* Fired when the more button is clicked.
|
|
285
|
+
* @event more-button-clicked
|
|
286
|
+
*/
|
|
287
|
+
this.dispatchEvent(new CustomEvent('more-button-clicked'));
|
|
257
288
|
/**
|
|
258
|
-
*
|
|
289
|
+
* Deprecated alias of `more-button-clicked`; removed in 4.0.0.
|
|
259
290
|
* @event left-more-button-clicked
|
|
260
291
|
*/
|
|
261
292
|
this.dispatchEvent(new CustomEvent('left-more-button-clicked'));
|
|
@@ -413,13 +444,15 @@ export class ObcTopBar extends LitElement {
|
|
|
413
444
|
|
|
414
445
|
const breakpointMoreButton = Math.max(
|
|
415
446
|
this.appButtonBreakpointPx,
|
|
416
|
-
this.dimmingButtonBreakpointPx
|
|
447
|
+
this.dimmingButtonBreakpointPx,
|
|
448
|
+
this.userButtonBreakpointPx,
|
|
449
|
+
this.appIconBreakpointPx
|
|
417
450
|
);
|
|
418
451
|
|
|
419
452
|
return html`
|
|
420
453
|
<style>
|
|
421
454
|
@media (max-width: ${breakpointMoreButton}px) {
|
|
422
|
-
.
|
|
455
|
+
.more-button {
|
|
423
456
|
display: revert !important;
|
|
424
457
|
}
|
|
425
458
|
|
|
@@ -519,12 +552,12 @@ export class ObcTopBar extends LitElement {
|
|
|
519
552
|
${
|
|
520
553
|
!this.inactive
|
|
521
554
|
? html`<obc-icon-button
|
|
522
|
-
class="
|
|
523
|
-
part="left-more-button"
|
|
555
|
+
class="more-button"
|
|
556
|
+
part="more-button left-more-button"
|
|
524
557
|
variant="flat"
|
|
525
558
|
aria-label=${msg('More')}
|
|
526
|
-
@click=${this.
|
|
527
|
-
?activated=${this.
|
|
559
|
+
@click=${this.moreButtonClicked}
|
|
560
|
+
?activated=${this.moreButtonActivated}
|
|
528
561
|
>
|
|
529
562
|
<obi-more-vertical-google></obi-more-vertical-google>
|
|
530
563
|
</obc-icon-button>`
|