@oicl/openbridge-webcomponents-full-bundle 2.2.0-next.19 → 2.2.0-next.20
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 +43 -35
- package/bundle/openbridge-webcomponents.bundle.js.map +1 -1
- package/custom-elements.json +108 -7
- package/dist/components/button/button.d.ts +8 -0
- package/dist/components/button/button.d.ts.map +1 -1
- package/dist/components/button/button.js +6 -0
- package/dist/components/button/button.js.map +1 -1
- package/dist/components/command-menu/command-menu.d.ts +42 -14
- package/dist/components/command-menu/command-menu.d.ts.map +1 -1
- package/dist/components/command-menu/command-menu.js +25 -6
- package/dist/components/command-menu/command-menu.js.map +1 -1
- package/dist/components/start-stop-switch/start-stop-switch.css_inline.js +3 -22
- package/dist/components/start-stop-switch/start-stop-switch.d.ts +3 -2
- package/dist/components/start-stop-switch/start-stop-switch.d.ts.map +1 -1
- package/dist/components/start-stop-switch/start-stop-switch.js +9 -7
- package/dist/components/start-stop-switch/start-stop-switch.js.map +1 -1
- package/docs/MigrationGuide22.mdx +10 -2
- package/docs/migration-guide-2-2/renamed-slots.md +7 -0
- package/package.json +1 -1
- package/src/components/button/button.spec.ts +75 -0
- package/src/components/button/button.stories.ts +2 -0
- package/src/components/button/button.ts +10 -0
- package/src/components/command-menu/command-menu.spec.ts +125 -0
- package/src/components/command-menu/command-menu.stories.ts +41 -4
- package/src/components/command-menu/command-menu.ts +57 -20
- package/src/components/start-stop-switch/start-stop-switch.css +2 -20
- package/src/components/start-stop-switch/start-stop-switch.spec.ts +59 -0
- package/src/components/start-stop-switch/start-stop-switch.ts +19 -9
- package/src/components/tabbed-card/tabbed-card.stories.ts +1 -1
|
@@ -16017,6 +16017,7 @@ var ObcButton = class ObcButton extends i$4 {
|
|
|
16017
16017
|
this.href = void 0;
|
|
16018
16018
|
this.target = void 0;
|
|
16019
16019
|
this.segmentPosition = "single";
|
|
16020
|
+
this.ariaLabel = null;
|
|
16020
16021
|
}
|
|
16021
16022
|
renderLeadingIcon() {
|
|
16022
16023
|
if (this.showLeadingIcon) return u$2`
|
|
@@ -16049,6 +16050,7 @@ var ObcButton = class ObcButton extends i$4 {
|
|
|
16049
16050
|
?disabled=${this.disabled}
|
|
16050
16051
|
href=${o$6(this.href)}
|
|
16051
16052
|
target=${o$6(this.target)}
|
|
16053
|
+
aria-label=${o$6(this.ariaLabel ?? void 0)}
|
|
16052
16054
|
part="wrapper"
|
|
16053
16055
|
>
|
|
16054
16056
|
<div class="visible-wrapper" part="visible-wrapper">
|
|
@@ -16076,6 +16078,10 @@ __decorate([n$4({ type: Boolean })], ObcButton.prototype, "showTrailingIcon", vo
|
|
|
16076
16078
|
__decorate([n$4({ type: String })], ObcButton.prototype, "href", void 0);
|
|
16077
16079
|
__decorate([n$4({ type: String })], ObcButton.prototype, "target", void 0);
|
|
16078
16080
|
__decorate([n$4({ type: String })], ObcButton.prototype, "segmentPosition", void 0);
|
|
16081
|
+
__decorate([n$4({
|
|
16082
|
+
type: String,
|
|
16083
|
+
attribute: "aria-label"
|
|
16084
|
+
})], ObcButton.prototype, "ariaLabel", void 0);
|
|
16079
16085
|
ObcButton = __decorate([customElement("obc-button")], ObcButton);
|
|
16080
16086
|
// src/building-blocks/readout-block/readout-block.css?inline
|
|
16081
16087
|
var readout_block_default = i$7`* {
|
|
@@ -97683,10 +97689,6 @@ var start_stop_switch_default = i$7`* {
|
|
|
97683
97689
|
width: fit-content;
|
|
97684
97690
|
justify-content: center;
|
|
97685
97691
|
align-items: center;
|
|
97686
|
-
|
|
97687
|
-
padding: 0;
|
|
97688
|
-
background: transparent;
|
|
97689
|
-
border: none;
|
|
97690
97692
|
min-width: var(--ui-components-start-stop-switch-touch-target-size);
|
|
97691
97693
|
cursor: grab;
|
|
97692
97694
|
|
|
@@ -97695,16 +97697,9 @@ var start_stop_switch_default = i$7`* {
|
|
|
97695
97697
|
right 0.1s ease-in-out,
|
|
97696
97698
|
width 0.2s ease-in-out;
|
|
97697
97699
|
|
|
97698
|
-
/*
|
|
97700
|
+
/* Prevent any visual changes on active/pressed state */
|
|
97699
97701
|
}
|
|
97700
97702
|
|
|
97701
|
-
.button:focus-visible {
|
|
97702
|
-
outline: none;
|
|
97703
|
-
box-shadow: none;
|
|
97704
|
-
}
|
|
97705
|
-
|
|
97706
|
-
/* Prevent any visual changes on active/pressed state */
|
|
97707
|
-
|
|
97708
97703
|
.button:active {
|
|
97709
97704
|
cursor: grabbing;
|
|
97710
97705
|
}
|
|
@@ -97779,17 +97774,9 @@ var start_stop_switch_default = i$7`* {
|
|
|
97779
97774
|
border-color: var(--indent-disabled-border-color);
|
|
97780
97775
|
}
|
|
97781
97776
|
|
|
97782
|
-
/*
|
|
97777
|
+
/* A disabled switch has nothing to drag: the state label stands alone */
|
|
97783
97778
|
.wrapper.disabled .button {
|
|
97784
|
-
|
|
97785
|
-
width: 1px;
|
|
97786
|
-
height: 1px;
|
|
97787
|
-
padding: 0;
|
|
97788
|
-
margin: -1px;
|
|
97789
|
-
overflow: hidden;
|
|
97790
|
-
clip: rect(0, 0, 0, 0);
|
|
97791
|
-
white-space: nowrap;
|
|
97792
|
-
border: 0;
|
|
97779
|
+
display: none;
|
|
97793
97780
|
}
|
|
97794
97781
|
|
|
97795
97782
|
.wrapper.disabled .state {
|
|
@@ -97970,10 +97957,11 @@ var ObcStartStopSwitch = class ObcStartStopSwitch extends i$4 {
|
|
|
97970
97957
|
this.dragging = false;
|
|
97971
97958
|
const maxOffset = this.trackWidth - this.buttonWidth;
|
|
97972
97959
|
const percent = ((this.checked ? maxOffset : 0) + this.dragOffset) / maxOffset;
|
|
97973
|
-
|
|
97960
|
+
const canCommit = !this.disabled;
|
|
97961
|
+
if (canCommit && !this.checked && percent > DRAG_COMPLETE_THRESHOLD) {
|
|
97974
97962
|
this.checked = true;
|
|
97975
97963
|
this.dispatchChangeEvent();
|
|
97976
|
-
} else if (this.checked && percent < .09999999999999998) {
|
|
97964
|
+
} else if (canCommit && this.checked && percent < .09999999999999998) {
|
|
97977
97965
|
this.checked = false;
|
|
97978
97966
|
this.dispatchChangeEvent();
|
|
97979
97967
|
}
|
|
@@ -98076,16 +98064,15 @@ var ObcStartStopSwitch = class ObcStartStopSwitch extends i$4 {
|
|
|
98076
98064
|
aria-checked=${isChecked ? "true" : "false"}
|
|
98077
98065
|
aria-disabled=${this.disabled ? "true" : "false"}
|
|
98078
98066
|
aria-label=${o$6(forwardedAriaLabel)}
|
|
98067
|
+
aria-describedby=${o$6(this.hasDescription ? "description" : void 0)}
|
|
98079
98068
|
@keydown=${this.handleKeydown}
|
|
98080
98069
|
>
|
|
98081
98070
|
<div class="button-track">
|
|
98082
|
-
<
|
|
98071
|
+
<div
|
|
98083
98072
|
class="button"
|
|
98084
98073
|
style=${this.getButtonStyle()}
|
|
98085
98074
|
@mousedown=${this.disabled ? void 0 : this.onDragStart}
|
|
98086
98075
|
@touchstart=${this.disabled ? void 0 : this.onDragStart}
|
|
98087
|
-
?disabled=${this.disabled}
|
|
98088
|
-
tabindex="-1"
|
|
98089
98076
|
>
|
|
98090
98077
|
${!this.disabled ? b`
|
|
98091
98078
|
<div class="button-visible">
|
|
@@ -98100,7 +98087,7 @@ var ObcStartStopSwitch = class ObcStartStopSwitch extends i$4 {
|
|
|
98100
98087
|
</div>
|
|
98101
98088
|
</div>
|
|
98102
98089
|
` : ""}
|
|
98103
|
-
</
|
|
98090
|
+
</div>
|
|
98104
98091
|
${!this.disabled ? b`<div class="button-track-checked"></div>` : ""}
|
|
98105
98092
|
<div class="checked state">
|
|
98106
98093
|
<slot name="checked-state-icon"></slot>
|
|
@@ -98117,7 +98104,9 @@ var ObcStartStopSwitch = class ObcStartStopSwitch extends i$4 {
|
|
|
98117
98104
|
</div>
|
|
98118
98105
|
${this.hasAlert ? b`<div class="alert-frame"></div>` : ""}
|
|
98119
98106
|
</div>
|
|
98120
|
-
${this.hasDescription ? b`<div class="description"
|
|
98107
|
+
${this.hasDescription ? b`<div class="description" id="description">
|
|
98108
|
+
${this.description}
|
|
98109
|
+
</div>` : ""}
|
|
98121
98110
|
</div>
|
|
98122
98111
|
</div>
|
|
98123
98112
|
</div>
|
|
@@ -98162,6 +98151,9 @@ var ObcCommandMenu = class ObcCommandMenu extends i$4 {
|
|
|
98162
98151
|
this.softDismissController = new PopoverController(this);
|
|
98163
98152
|
this.inCommand = false;
|
|
98164
98153
|
this.showLocation = true;
|
|
98154
|
+
this.disabled = false;
|
|
98155
|
+
this.hasActionDescription = false;
|
|
98156
|
+
this.actionDescription = "Action description";
|
|
98165
98157
|
}
|
|
98166
98158
|
render() {
|
|
98167
98159
|
return b`
|
|
@@ -98199,23 +98191,36 @@ var ObcCommandMenu = class ObcCommandMenu extends i$4 {
|
|
|
98199
98191
|
@change=${this.onChange}
|
|
98200
98192
|
.checked=${this.inCommand}
|
|
98201
98193
|
.size=${"large"}
|
|
98194
|
+
.disabled=${this.disabled}
|
|
98195
|
+
.hasDescription=${this.hasActionDescription}
|
|
98196
|
+
.description=${this.actionDescription}
|
|
98202
98197
|
>
|
|
98203
98198
|
<div slot="to-checked-action-label">
|
|
98204
|
-
<slot name="
|
|
98199
|
+
<slot name="toggle-action-to-in-command-label">
|
|
98200
|
+
<slot name="toogle-action-to-in-command-label"></slot>
|
|
98201
|
+
</slot>
|
|
98205
98202
|
</div>
|
|
98206
98203
|
<div slot="to-unchecked-action-label">
|
|
98207
|
-
<slot name="
|
|
98204
|
+
<slot name="toggle-action-to-no-command-label">
|
|
98205
|
+
<slot name="toogle-action-to-no-command-label"></slot>
|
|
98206
|
+
</slot>
|
|
98208
98207
|
</div>
|
|
98209
98208
|
<div slot="checked-state-label">
|
|
98210
|
-
<slot name="
|
|
98209
|
+
<slot name="toggle-state-in-command-label">
|
|
98210
|
+
<slot name="toogle-state-in-command-label"></slot>
|
|
98211
|
+
</slot>
|
|
98211
98212
|
</div>
|
|
98212
98213
|
<div slot="checked-state-icon">
|
|
98213
|
-
<slot name="
|
|
98214
|
-
<
|
|
98214
|
+
<slot name="toggle-state-in-command-icon">
|
|
98215
|
+
<slot name="toogle-state-in-command-icon">
|
|
98216
|
+
<obi-command-in></obi-command-in>
|
|
98217
|
+
</slot>
|
|
98215
98218
|
</slot>
|
|
98216
98219
|
</div>
|
|
98217
98220
|
<div slot="unchecked-state-label">
|
|
98218
|
-
<slot name="
|
|
98221
|
+
<slot name="toggle-state-no-command-label">
|
|
98222
|
+
<slot name="toogle-state-no-command-label"></slot>
|
|
98223
|
+
</slot>
|
|
98219
98224
|
</div>
|
|
98220
98225
|
</obc-start-stop-switch>
|
|
98221
98226
|
</div>
|
|
@@ -98249,6 +98254,9 @@ __decorate([n$4({
|
|
|
98249
98254
|
type: Boolean,
|
|
98250
98255
|
attribute: false
|
|
98251
98256
|
})], ObcCommandMenu.prototype, "showLocation", void 0);
|
|
98257
|
+
__decorate([n$4({ type: Boolean })], ObcCommandMenu.prototype, "disabled", void 0);
|
|
98258
|
+
__decorate([n$4({ type: Boolean })], ObcCommandMenu.prototype, "hasActionDescription", void 0);
|
|
98259
|
+
__decorate([n$4({ type: String })], ObcCommandMenu.prototype, "actionDescription", void 0);
|
|
98252
98260
|
ObcCommandMenu = __decorate([customElement("obc-command-menu")], ObcCommandMenu);
|
|
98253
98261
|
// src/components/communication-table/communication-table.css?inline
|
|
98254
98262
|
var communication_table_default = i$7`* {
|