@oicl/openbridge-webcomponents 2.0.0-next.50 → 2.0.0-next.51
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 +18016 -17042
- package/bundle/openbridge-webcomponents.bundle.js.map +1 -1
- package/custom-elements.json +857 -3
- package/dist/components/icon-button/icon-button.css.js +18 -18
- 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.map +1 -1
- package/dist/integration-systems/integration-bar/integration-bar.css.js +97 -0
- package/dist/integration-systems/integration-bar/integration-bar.css.js.map +1 -0
- package/dist/integration-systems/integration-bar/integration-bar.d.ts +91 -0
- package/dist/integration-systems/integration-bar/integration-bar.d.ts.map +1 -0
- package/dist/integration-systems/integration-bar/integration-bar.js +279 -0
- package/dist/integration-systems/integration-bar/integration-bar.js.map +1 -0
- package/dist/integration-systems/integration-button/integration-button.css.js +457 -149
- package/dist/integration-systems/integration-button/integration-button.css.js.map +1 -1
- package/dist/integration-systems/integration-button/integration-button.d.ts +37 -1
- package/dist/integration-systems/integration-button/integration-button.d.ts.map +1 -1
- package/dist/integration-systems/integration-button/integration-button.js +202 -36
- package/dist/integration-systems/integration-button/integration-button.js.map +1 -1
- package/dist/integration-systems/integration-dropdown-button/integration-dropdown-button.css.js +7 -1
- package/dist/integration-systems/integration-dropdown-button/integration-dropdown-button.css.js.map +1 -1
- package/dist/integration-systems/integration-vessel-menu/integration-vessel-menu.css.js +75 -0
- package/dist/integration-systems/integration-vessel-menu/integration-vessel-menu.css.js.map +1 -0
- package/dist/integration-systems/integration-vessel-menu/integration-vessel-menu.d.ts +37 -0
- package/dist/integration-systems/integration-vessel-menu/integration-vessel-menu.d.ts.map +1 -0
- package/dist/integration-systems/integration-vessel-menu/integration-vessel-menu.js +72 -0
- package/dist/integration-systems/integration-vessel-menu/integration-vessel-menu.js.map +1 -0
- package/dist/integration-systems/integration-vessel-selector/integration-vessel-selector.css.js +21 -8
- package/dist/integration-systems/integration-vessel-selector/integration-vessel-selector.css.js.map +1 -1
- package/dist/integration-systems/integration-vessel-selector/integration-vessel-selector.d.ts +2 -0
- package/dist/integration-systems/integration-vessel-selector/integration-vessel-selector.d.ts.map +1 -1
- package/dist/integration-systems/integration-vessel-selector/integration-vessel-selector.js +5 -0
- package/dist/integration-systems/integration-vessel-selector/integration-vessel-selector.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integration-button.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"integration-button.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -4,6 +4,15 @@ export interface IntegrationButtonReadout {
|
|
|
4
4
|
value: string;
|
|
5
5
|
unit: string;
|
|
6
6
|
}
|
|
7
|
+
export declare enum IntegrationButtonVariant {
|
|
8
|
+
normal = "normal",
|
|
9
|
+
flat = "flat"
|
|
10
|
+
}
|
|
11
|
+
export declare enum IntegrationButtonType {
|
|
12
|
+
hug = "hug",
|
|
13
|
+
regular = "regular",
|
|
14
|
+
rich = "rich"
|
|
15
|
+
}
|
|
7
16
|
/**
|
|
8
17
|
* `<obc-integration-button>` – A button component for integration systems.
|
|
9
18
|
*
|
|
@@ -11,20 +20,47 @@ export interface IntegrationButtonReadout {
|
|
|
11
20
|
* @slot trailing-icon - Icon after label (shown when `hasTrailingIcon` is true)
|
|
12
21
|
* @slot trailing-icon2 - Icon after label (shown when `hasTrailingIcon2` is true)
|
|
13
22
|
* @slot label - Label text
|
|
14
|
-
* @slot status - Status text
|
|
23
|
+
* @slot status - Status/description text (shown when `hasStatus` is true)
|
|
15
24
|
* @slot info-label - Info label text
|
|
16
25
|
* @slot info-status - Info status text
|
|
26
|
+
* @slot integration-vessel-menu - Integration vessel menu to be shown when button is in activated state
|
|
27
|
+
*
|
|
28
|
+
* @fires click - Fired when the internal button is activated.
|
|
29
|
+
*
|
|
30
|
+
* @property {boolean} hasTrailingIcon - Shows the `trailing-icon` slot.
|
|
31
|
+
* @property {boolean} hasTrailingIcon2 - Shows the `trailing-icon2` slot.
|
|
32
|
+
* @property {boolean} hasLeadingIcon - Shows the `leading-icon` slot.
|
|
33
|
+
* @property {boolean} hasstatus - Shows the `status` slot.
|
|
34
|
+
* @property {IntegrationButtonReadout[]} readouts - List of readout items shown in the rich type.
|
|
35
|
+
* @property {boolean} disabled - Disables the internal button.
|
|
36
|
+
* @property {boolean} activated - Applies active state styling while a selection is pending.
|
|
37
|
+
* @property {boolean} selected - Applies selected state styling.
|
|
38
|
+
* @property {boolean} dividerBottom - Shows a bottom divider under the button.
|
|
39
|
+
* @property {boolean} dividerRight - Shows a right divider to separate from adjacent buttons.
|
|
40
|
+
* @property {IntegrationButtonVariant} variant - Visual variant (`normal` or `flat`).
|
|
41
|
+
* @property {IntegrationButtonType} type - Layout type (`hug`, `regular`, or `rich`).
|
|
17
42
|
*/
|
|
18
43
|
export declare class ObcIntegrationButton extends LitElement {
|
|
19
44
|
hasTrailingIcon: boolean;
|
|
20
45
|
hasTrailingIcon2: boolean;
|
|
21
46
|
hasLeadingIcon: boolean;
|
|
47
|
+
hasStatus: boolean;
|
|
22
48
|
readouts: IntegrationButtonReadout[];
|
|
23
49
|
disabled: boolean;
|
|
50
|
+
activated: boolean;
|
|
24
51
|
selected: boolean;
|
|
25
52
|
dividerBottom: boolean;
|
|
53
|
+
dividerRight: boolean;
|
|
54
|
+
variant: IntegrationButtonVariant;
|
|
55
|
+
type: IntegrationButtonType;
|
|
56
|
+
private getButtonClasses;
|
|
57
|
+
private onIntegrationVesselMenuClick;
|
|
58
|
+
renderRich(): import('lit-html').TemplateResult<1>;
|
|
59
|
+
renderRegular(): import('lit-html').TemplateResult<1>;
|
|
60
|
+
renderHug(): import('lit-html').TemplateResult<1>;
|
|
26
61
|
render(): import('lit-html').TemplateResult<1>;
|
|
27
62
|
static styles: import('lit').CSSResult;
|
|
63
|
+
updated(): void;
|
|
28
64
|
}
|
|
29
65
|
declare global {
|
|
30
66
|
interface HTMLElementTagNameMap {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integration-button.d.ts","sourceRoot":"","sources":["../../../src/integration-systems/integration-button/integration-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAA2B,MAAM,KAAK,CAAC;AAMzD,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AAED
|
|
1
|
+
{"version":3,"file":"integration-button.d.ts","sourceRoot":"","sources":["../../../src/integration-systems/integration-button/integration-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAA2B,MAAM,KAAK,CAAC;AAMzD,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AAED,oBAAY,wBAAwB;IAClC,MAAM,WAAW;IACjB,IAAI,SAAS;CACd;AAED,oBAAY,qBAAqB;IAC/B,GAAG,QAAQ;IACX,OAAO,YAAY;IACnB,IAAI,SAAS;CACd;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,qBACa,oBAAqB,SAAQ,UAAU;IACvB,eAAe,UAAS;IACxB,gBAAgB,UAAS;IACzB,cAAc,UAAS;IACvB,SAAS,UAAS;IAE7C,QAAQ,EAAE,wBAAwB,EAAE,CAAM;IACf,QAAQ,UAAS;IACjB,SAAS,UAAS;IAClB,QAAQ,UAAS;IACjB,aAAa,UAAS;IACtB,YAAY,UAAS;IACtB,OAAO,EAAE,wBAAwB,CACzB;IACR,IAAI,EAAE,qBAAqB,CACrB;IAEhC,OAAO,CAAC,gBAAgB;IAYxB,OAAO,CAAC,4BAA4B;IAIpC,UAAU;IA2EV,aAAa;IAgDb,SAAS;IAgDA,MAAM;IAef,OAAgB,MAAM,0BAA2B;IAExC,OAAO;CAajB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,wBAAwB,EAAE,oBAAoB,CAAC;KAChD;CACF"}
|
|
@@ -13,61 +13,210 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
13
13
|
if (kind && result) __defProp(target, key, result);
|
|
14
14
|
return result;
|
|
15
15
|
};
|
|
16
|
+
var IntegrationButtonVariant = /* @__PURE__ */ ((IntegrationButtonVariant2) => {
|
|
17
|
+
IntegrationButtonVariant2["normal"] = "normal";
|
|
18
|
+
IntegrationButtonVariant2["flat"] = "flat";
|
|
19
|
+
return IntegrationButtonVariant2;
|
|
20
|
+
})(IntegrationButtonVariant || {});
|
|
21
|
+
var IntegrationButtonType = /* @__PURE__ */ ((IntegrationButtonType2) => {
|
|
22
|
+
IntegrationButtonType2["hug"] = "hug";
|
|
23
|
+
IntegrationButtonType2["regular"] = "regular";
|
|
24
|
+
IntegrationButtonType2["rich"] = "rich";
|
|
25
|
+
return IntegrationButtonType2;
|
|
26
|
+
})(IntegrationButtonType || {});
|
|
16
27
|
let ObcIntegrationButton = class extends LitElement {
|
|
17
28
|
constructor() {
|
|
18
29
|
super(...arguments);
|
|
19
30
|
this.hasTrailingIcon = false;
|
|
20
31
|
this.hasTrailingIcon2 = false;
|
|
21
32
|
this.hasLeadingIcon = false;
|
|
33
|
+
this.hasStatus = false;
|
|
22
34
|
this.readouts = [];
|
|
23
35
|
this.disabled = false;
|
|
36
|
+
this.activated = false;
|
|
24
37
|
this.selected = false;
|
|
25
38
|
this.dividerBottom = false;
|
|
39
|
+
this.dividerRight = false;
|
|
40
|
+
this.variant = "normal";
|
|
41
|
+
this.type = "regular";
|
|
26
42
|
}
|
|
27
|
-
|
|
43
|
+
getButtonClasses() {
|
|
44
|
+
return {
|
|
45
|
+
"touch-target": true,
|
|
46
|
+
selected: this.selected,
|
|
47
|
+
activated: this.activated,
|
|
48
|
+
disabled: this.disabled,
|
|
49
|
+
"has-description": this.hasStatus,
|
|
50
|
+
["variant-" + this.variant]: true,
|
|
51
|
+
["type-" + this.type]: true
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
onIntegrationVesselMenuClick(event) {
|
|
55
|
+
event.stopPropagation();
|
|
56
|
+
}
|
|
57
|
+
renderRich() {
|
|
28
58
|
return html`
|
|
29
|
-
<button
|
|
59
|
+
<div class="button-horizontal-divider-container">
|
|
60
|
+
<div class="button-vertical-divider-container">
|
|
61
|
+
<button
|
|
62
|
+
class=${classMap(this.getButtonClasses())}
|
|
63
|
+
?disabled=${this.disabled}
|
|
64
|
+
>
|
|
65
|
+
<div class="content-container">
|
|
66
|
+
<div class="main-container">
|
|
67
|
+
${this.hasLeadingIcon ? html`<div class="icon leading">
|
|
68
|
+
<slot name="leading-icon"></slot>
|
|
69
|
+
</div>` : nothing}
|
|
70
|
+
<div class="text-container">
|
|
71
|
+
<div class="label"><slot name="label"></slot></div>
|
|
72
|
+
${this.hasStatus ? html`<div class="status">
|
|
73
|
+
<slot name="status"></slot>
|
|
74
|
+
</div>` : nothing}
|
|
75
|
+
</div>
|
|
76
|
+
${this.hasTrailingIcon ? html`<div class="icon-container">
|
|
77
|
+
${this.hasTrailingIcon2 ? html`<slot
|
|
78
|
+
name="trailing-icon2"
|
|
79
|
+
class="icon trailing"
|
|
80
|
+
></slot>` : nothing}
|
|
81
|
+
<slot name="trailing-icon" class="icon trailing"></slot>
|
|
82
|
+
</div>` : nothing}
|
|
83
|
+
</div>
|
|
84
|
+
<div class="info-container">
|
|
85
|
+
<div class="info-item">
|
|
86
|
+
<slot class="info-label" name="info-label"></slot>
|
|
87
|
+
<slot class="info-status" name="info-status"></slot>
|
|
88
|
+
</div>
|
|
89
|
+
${this.readouts.map(
|
|
90
|
+
(readout) => html`
|
|
91
|
+
<div class="info-readout-item">
|
|
92
|
+
<div class="info-item-label">${readout.label}</div>
|
|
93
|
+
<div class="info-item-value">${readout.value}</div>
|
|
94
|
+
<div class="info-item-unit">${readout.unit}</div>
|
|
95
|
+
</div>
|
|
96
|
+
`
|
|
97
|
+
)}
|
|
98
|
+
</div>
|
|
99
|
+
</div>
|
|
100
|
+
</button>
|
|
101
|
+
${this.dividerRight ? html`<div class="divider-right"></div>` : html`<div
|
|
102
|
+
class="divider-right"
|
|
103
|
+
style="visibility: hidden;"
|
|
104
|
+
></div>`}
|
|
105
|
+
</div>
|
|
106
|
+
${this.dividerBottom ? html`<div class="divider-bottom"></div>` : nothing}
|
|
107
|
+
</div>
|
|
108
|
+
<div
|
|
30
109
|
class=${classMap({
|
|
31
|
-
|
|
32
|
-
|
|
110
|
+
"integration-vessel-menu-container": true,
|
|
111
|
+
show: this.activated
|
|
33
112
|
})}
|
|
34
|
-
|
|
113
|
+
@click=${this.onIntegrationVesselMenuClick}
|
|
35
114
|
>
|
|
36
|
-
<
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
115
|
+
<slot name="integration-vessel-menu"></slot>
|
|
116
|
+
</div>
|
|
117
|
+
`;
|
|
118
|
+
}
|
|
119
|
+
renderRegular() {
|
|
120
|
+
return html`
|
|
121
|
+
<div class="button-vertical-divider-container">
|
|
122
|
+
<button
|
|
123
|
+
class=${classMap(this.getButtonClasses())}
|
|
124
|
+
?disabled=${this.disabled}
|
|
125
|
+
>
|
|
126
|
+
<div class="content-container">
|
|
127
|
+
${this.hasLeadingIcon ? html`<div class="icon leading">
|
|
128
|
+
<slot name="leading-icon"></slot>
|
|
129
|
+
</div>` : nothing}
|
|
130
|
+
<div class="text-container">
|
|
131
|
+
<div class="label"><slot name="label"></slot></div>
|
|
132
|
+
${this.hasStatus ? html`<div class="status"><slot name="status"></slot></div>` : nothing}
|
|
133
|
+
</div>
|
|
134
|
+
${this.hasTrailingIcon ? html`<div class="icon-container">
|
|
135
|
+
${this.hasTrailingIcon2 ? html`<slot
|
|
136
|
+
name="trailing-icon2"
|
|
137
|
+
class="icon trailing"
|
|
138
|
+
></slot>` : nothing}
|
|
139
|
+
<slot name="trailing-icon" class="icon trailing"></slot>
|
|
140
|
+
</div>` : nothing}
|
|
43
141
|
</div>
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
142
|
+
</button>
|
|
143
|
+
${this.dividerRight ? html`<div class="divider-right"></div>` : html`<div class="divider-right" style="visibility: hidden;"></div>`}
|
|
144
|
+
</div>
|
|
145
|
+
<div
|
|
146
|
+
class=${classMap({
|
|
147
|
+
"integration-vessel-menu-container": true,
|
|
148
|
+
show: this.activated
|
|
149
|
+
})}
|
|
150
|
+
@click=${this.onIntegrationVesselMenuClick}
|
|
151
|
+
>
|
|
152
|
+
<slot name="integration-vessel-menu"></slot>
|
|
153
|
+
</div>
|
|
154
|
+
`;
|
|
155
|
+
}
|
|
156
|
+
renderHug() {
|
|
157
|
+
return html`
|
|
158
|
+
<div class="button-vertical-divider-container">
|
|
159
|
+
<button
|
|
160
|
+
class=${classMap(this.getButtonClasses())}
|
|
161
|
+
?disabled=${this.disabled}
|
|
162
|
+
>
|
|
163
|
+
<div class="content-container">
|
|
164
|
+
${this.hasLeadingIcon ? html`<div class="icon leading">
|
|
165
|
+
<slot name="leading-icon"></slot>
|
|
166
|
+
</div>` : nothing}
|
|
167
|
+
<div class="text-container">
|
|
168
|
+
<div class="label"><slot name="label"></slot></div>
|
|
169
|
+
${this.hasStatus ? html`<div class="status"><slot name="status"></slot></div>` : nothing}
|
|
170
|
+
</div>
|
|
171
|
+
${this.hasTrailingIcon ? html`<div class="icon-container">
|
|
172
|
+
${this.hasTrailingIcon2 ? html`<slot
|
|
173
|
+
name="trailing-icon2"
|
|
174
|
+
class="icon trailing"
|
|
175
|
+
></slot>` : nothing}
|
|
176
|
+
<slot name="trailing-icon" class="icon trailing"></slot>
|
|
177
|
+
</div>` : nothing}
|
|
56
178
|
</div>
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
179
|
+
</button>
|
|
180
|
+
${this.dividerRight ? html`<div class="divider-right"></div>` : html`<div class="divider-right" style="visibility: hidden;"></div>`}
|
|
181
|
+
</div>
|
|
182
|
+
<div
|
|
183
|
+
class=${classMap({
|
|
184
|
+
"integration-vessel-menu-container": true,
|
|
185
|
+
show: this.activated
|
|
186
|
+
})}
|
|
187
|
+
@click=${this.onIntegrationVesselMenuClick}
|
|
188
|
+
>
|
|
189
|
+
<slot name="integration-vessel-menu"></slot>
|
|
190
|
+
</div>
|
|
69
191
|
`;
|
|
70
192
|
}
|
|
193
|
+
render() {
|
|
194
|
+
switch (this.type) {
|
|
195
|
+
case "hug": {
|
|
196
|
+
return this.renderHug();
|
|
197
|
+
}
|
|
198
|
+
case "rich": {
|
|
199
|
+
return this.renderRich();
|
|
200
|
+
}
|
|
201
|
+
case "regular":
|
|
202
|
+
default: {
|
|
203
|
+
return this.renderRegular();
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
updated() {
|
|
208
|
+
let dividerHeight = 40;
|
|
209
|
+
if (this.type === "hug") {
|
|
210
|
+
dividerHeight = 32;
|
|
211
|
+
}
|
|
212
|
+
if (this.type === "rich") {
|
|
213
|
+
dividerHeight = 64;
|
|
214
|
+
}
|
|
215
|
+
this.style.setProperty(
|
|
216
|
+
"--integration-button-divider-height",
|
|
217
|
+
`${dividerHeight}px`
|
|
218
|
+
);
|
|
219
|
+
}
|
|
71
220
|
};
|
|
72
221
|
ObcIntegrationButton.styles = unsafeCSS(compentStyle);
|
|
73
222
|
__decorateClass([
|
|
@@ -79,22 +228,39 @@ __decorateClass([
|
|
|
79
228
|
__decorateClass([
|
|
80
229
|
property({ type: Boolean })
|
|
81
230
|
], ObcIntegrationButton.prototype, "hasLeadingIcon", 2);
|
|
231
|
+
__decorateClass([
|
|
232
|
+
property({ type: Boolean })
|
|
233
|
+
], ObcIntegrationButton.prototype, "hasStatus", 2);
|
|
82
234
|
__decorateClass([
|
|
83
235
|
property({ type: Array, attribute: false })
|
|
84
236
|
], ObcIntegrationButton.prototype, "readouts", 2);
|
|
85
237
|
__decorateClass([
|
|
86
238
|
property({ type: Boolean })
|
|
87
239
|
], ObcIntegrationButton.prototype, "disabled", 2);
|
|
240
|
+
__decorateClass([
|
|
241
|
+
property({ type: Boolean })
|
|
242
|
+
], ObcIntegrationButton.prototype, "activated", 2);
|
|
88
243
|
__decorateClass([
|
|
89
244
|
property({ type: Boolean })
|
|
90
245
|
], ObcIntegrationButton.prototype, "selected", 2);
|
|
91
246
|
__decorateClass([
|
|
92
247
|
property({ type: Boolean })
|
|
93
248
|
], ObcIntegrationButton.prototype, "dividerBottom", 2);
|
|
249
|
+
__decorateClass([
|
|
250
|
+
property({ type: Boolean })
|
|
251
|
+
], ObcIntegrationButton.prototype, "dividerRight", 2);
|
|
252
|
+
__decorateClass([
|
|
253
|
+
property({ type: String })
|
|
254
|
+
], ObcIntegrationButton.prototype, "variant", 2);
|
|
255
|
+
__decorateClass([
|
|
256
|
+
property({ type: String })
|
|
257
|
+
], ObcIntegrationButton.prototype, "type", 2);
|
|
94
258
|
ObcIntegrationButton = __decorateClass([
|
|
95
259
|
customElement("obc-integration-button")
|
|
96
260
|
], ObcIntegrationButton);
|
|
97
261
|
export {
|
|
262
|
+
IntegrationButtonType,
|
|
263
|
+
IntegrationButtonVariant,
|
|
98
264
|
ObcIntegrationButton
|
|
99
265
|
};
|
|
100
266
|
//# sourceMappingURL=integration-button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integration-button.js","sources":["../../../src/integration-systems/integration-button/integration-button.ts"],"sourcesContent":["import {LitElement, html, nothing, unsafeCSS} from 'lit';\nimport {customElement} from '../../decorator.js';\nimport compentStyle from './integration-button.css?inline';\nimport {property} from 'lit/decorators.js';\nimport {classMap} from 'lit/directives/class-map.js';\n\nexport interface IntegrationButtonReadout {\n label: string;\n value: string;\n unit: string;\n}\n\n/**\n * `<obc-integration-button>` – A button component for integration systems.\n *\n * @slot leading-icon - Icon before label (shown when `hasLeadingIcon` is true)\n * @slot trailing-icon - Icon after label (shown when `hasTrailingIcon` is true)\n * @slot trailing-icon2 - Icon after label (shown when `hasTrailingIcon2` is true)\n * @slot label - Label text\n * @slot status - Status text\n * @slot info-label - Info label text\n * @slot info-status - Info status text\n */\n@customElement('obc-integration-button')\nexport class ObcIntegrationButton extends LitElement {\n @property({type: Boolean}) hasTrailingIcon = false;\n @property({type: Boolean}) hasTrailingIcon2 = false;\n @property({type: Boolean}) hasLeadingIcon = false;\n @property({type: Array, attribute: false})\n readouts: IntegrationButtonReadout[] = [];\n @property({type: Boolean}) disabled = false;\n @property({type: Boolean}) selected = false;\n @property({type: Boolean}) dividerBottom = false;\n\n override render() {\n return html`\n <button\n class=${classMap({\n wrapper: true,\n selected: this.selected,\n })}\n ?disabled=${this.disabled}\n >\n <div class=\"main-container\">\n ${this.hasLeadingIcon\n ? html`<div class=\"icon leading\">\n <slot name=\"leading-icon\"></slot>\n </div>`\n : nothing}\n <div class=\"text-container\">\n <div class=\"label\"><slot name=\"label\"></slot></div>\n <div class=\"status\"><slot name=\"status\"></slot></div>\n </div>\n ${this.hasTrailingIcon\n ? html`<div class=\"icon-container\">\n ${this.hasTrailingIcon2\n ? html`<slot\n name=\"trailing-icon2\"\n class=\"icon trailing\"\n ></slot>`\n : nothing}\n <slot name=\"trailing-icon\" class=\"icon trailing\"></slot>\n </div>`\n : nothing}\n </div>\n <div class=\"info-container\">\n <div class=\"info-item\">\n <slot class=\"info-label\" name=\"info-label\"></slot>\n <slot class=\"info-status\" name=\"info-status\"></slot>\n </div>\n ${this.readouts.map(\n (readout) => html`\n <div class=\"info-readout-item\">\n <div class=\"info-item-label\">${readout.label}</div>\n <div class=\"info-item-value\">${readout.value}</div>\n <div class=\"info-item-unit\">${readout.unit}</div>\n </div>\n `\n )}\n </div>\n </button>\n ${this.dividerBottom ? html`<div class=\"divider-bottom\"></div>` : nothing}\n `;\n }\n\n static override styles = unsafeCSS(compentStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-integration-button': ObcIntegrationButton;\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAwBO,IAAM,uBAAN,cAAmC,WAAW;AAAA,EAA9C,cAAA;AAAA,UAAA,GAAA,SAAA;AACsB,SAAA,kBAAk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AAAA,GANd,qBAMgB,WAAA,YAAA,CAAA;AACA,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GAPd,qBAOgB,WAAA,YAAA,CAAA;AACA,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GARd,qBAQgB,WAAA,iBAAA,CAAA;AARhB,uBAAN,gBAAA;AAAA,EADN,cAAc,wBAAwB;AAAA,GAC1B,oBAAA;"}
|
|
1
|
+
{"version":3,"file":"integration-button.js","sources":["../../../src/integration-systems/integration-button/integration-button.ts"],"sourcesContent":["import {LitElement, html, nothing, unsafeCSS} from 'lit';\nimport {customElement} from '../../decorator.js';\nimport compentStyle from './integration-button.css?inline';\nimport {property} from 'lit/decorators.js';\nimport {classMap} from 'lit/directives/class-map.js';\n\nexport interface IntegrationButtonReadout {\n label: string;\n value: string;\n unit: string;\n}\n\nexport enum IntegrationButtonVariant {\n normal = 'normal',\n flat = 'flat',\n}\n\nexport enum IntegrationButtonType {\n hug = 'hug',\n regular = 'regular',\n rich = 'rich',\n}\n\n/**\n * `<obc-integration-button>` – A button component for integration systems.\n *\n * @slot leading-icon - Icon before label (shown when `hasLeadingIcon` is true)\n * @slot trailing-icon - Icon after label (shown when `hasTrailingIcon` is true)\n * @slot trailing-icon2 - Icon after label (shown when `hasTrailingIcon2` is true)\n * @slot label - Label text\n * @slot status - Status/description text (shown when `hasStatus` is true)\n * @slot info-label - Info label text\n * @slot info-status - Info status text\n * @slot integration-vessel-menu - Integration vessel menu to be shown when button is in activated state\n *\n * @fires click - Fired when the internal button is activated.\n *\n * @property {boolean} hasTrailingIcon - Shows the `trailing-icon` slot.\n * @property {boolean} hasTrailingIcon2 - Shows the `trailing-icon2` slot.\n * @property {boolean} hasLeadingIcon - Shows the `leading-icon` slot.\n * @property {boolean} hasstatus - Shows the `status` slot.\n * @property {IntegrationButtonReadout[]} readouts - List of readout items shown in the rich type.\n * @property {boolean} disabled - Disables the internal button.\n * @property {boolean} activated - Applies active state styling while a selection is pending.\n * @property {boolean} selected - Applies selected state styling.\n * @property {boolean} dividerBottom - Shows a bottom divider under the button.\n * @property {boolean} dividerRight - Shows a right divider to separate from adjacent buttons.\n * @property {IntegrationButtonVariant} variant - Visual variant (`normal` or `flat`).\n * @property {IntegrationButtonType} type - Layout type (`hug`, `regular`, or `rich`).\n */\n@customElement('obc-integration-button')\nexport class ObcIntegrationButton extends LitElement {\n @property({type: Boolean}) hasTrailingIcon = false;\n @property({type: Boolean}) hasTrailingIcon2 = false;\n @property({type: Boolean}) hasLeadingIcon = false;\n @property({type: Boolean}) hasStatus = false;\n @property({type: Array, attribute: false})\n readouts: IntegrationButtonReadout[] = [];\n @property({type: Boolean}) disabled = false;\n @property({type: Boolean}) activated = false;\n @property({type: Boolean}) selected = false;\n @property({type: Boolean}) dividerBottom = false;\n @property({type: Boolean}) dividerRight = false;\n @property({type: String}) variant: IntegrationButtonVariant =\n IntegrationButtonVariant.normal;\n @property({type: String}) type: IntegrationButtonType =\n IntegrationButtonType.regular;\n\n private getButtonClasses() {\n return {\n 'touch-target': true,\n selected: this.selected,\n activated: this.activated,\n disabled: this.disabled,\n 'has-description': this.hasStatus,\n ['variant-' + this.variant]: true,\n ['type-' + this.type]: true,\n };\n }\n\n private onIntegrationVesselMenuClick(event: Event) {\n event.stopPropagation();\n }\n\n renderRich() {\n return html`\n <div class=\"button-horizontal-divider-container\">\n <div class=\"button-vertical-divider-container\">\n <button\n class=${classMap(this.getButtonClasses())}\n ?disabled=${this.disabled}\n >\n <div class=\"content-container\">\n <div class=\"main-container\">\n ${this.hasLeadingIcon\n ? html`<div class=\"icon leading\">\n <slot name=\"leading-icon\"></slot>\n </div>`\n : nothing}\n <div class=\"text-container\">\n <div class=\"label\"><slot name=\"label\"></slot></div>\n ${this.hasStatus\n ? html`<div class=\"status\">\n <slot name=\"status\"></slot>\n </div>`\n : nothing}\n </div>\n ${this.hasTrailingIcon\n ? html`<div class=\"icon-container\">\n ${this.hasTrailingIcon2\n ? html`<slot\n name=\"trailing-icon2\"\n class=\"icon trailing\"\n ></slot>`\n : nothing}\n <slot name=\"trailing-icon\" class=\"icon trailing\"></slot>\n </div>`\n : nothing}\n </div>\n <div class=\"info-container\">\n <div class=\"info-item\">\n <slot class=\"info-label\" name=\"info-label\"></slot>\n <slot class=\"info-status\" name=\"info-status\"></slot>\n </div>\n ${this.readouts.map(\n (readout) => html`\n <div class=\"info-readout-item\">\n <div class=\"info-item-label\">${readout.label}</div>\n <div class=\"info-item-value\">${readout.value}</div>\n <div class=\"info-item-unit\">${readout.unit}</div>\n </div>\n `\n )}\n </div>\n </div>\n </button>\n ${this.dividerRight\n ? html`<div class=\"divider-right\"></div>`\n : html`<div\n class=\"divider-right\"\n style=\"visibility: hidden;\"\n ></div>`}\n </div>\n ${this.dividerBottom\n ? html`<div class=\"divider-bottom\"></div>`\n : nothing}\n </div>\n <div\n class=${classMap({\n 'integration-vessel-menu-container': true,\n show: this.activated,\n })}\n @click=${this.onIntegrationVesselMenuClick}\n >\n <slot name=\"integration-vessel-menu\"></slot>\n </div>\n `;\n }\n\n renderRegular() {\n return html`\n <div class=\"button-vertical-divider-container\">\n <button\n class=${classMap(this.getButtonClasses())}\n ?disabled=${this.disabled}\n >\n <div class=\"content-container\">\n ${this.hasLeadingIcon\n ? html`<div class=\"icon leading\">\n <slot name=\"leading-icon\"></slot>\n </div>`\n : nothing}\n <div class=\"text-container\">\n <div class=\"label\"><slot name=\"label\"></slot></div>\n ${this.hasStatus\n ? html`<div class=\"status\"><slot name=\"status\"></slot></div>`\n : nothing}\n </div>\n ${this.hasTrailingIcon\n ? html`<div class=\"icon-container\">\n ${this.hasTrailingIcon2\n ? html`<slot\n name=\"trailing-icon2\"\n class=\"icon trailing\"\n ></slot>`\n : nothing}\n <slot name=\"trailing-icon\" class=\"icon trailing\"></slot>\n </div>`\n : nothing}\n </div>\n </button>\n ${this.dividerRight\n ? html`<div class=\"divider-right\"></div>`\n : html`<div class=\"divider-right\" style=\"visibility: hidden;\"></div>`}\n </div>\n <div\n class=${classMap({\n 'integration-vessel-menu-container': true,\n show: this.activated,\n })}\n @click=${this.onIntegrationVesselMenuClick}\n >\n <slot name=\"integration-vessel-menu\"></slot>\n </div>\n `;\n }\n\n renderHug() {\n return html`\n <div class=\"button-vertical-divider-container\">\n <button\n class=${classMap(this.getButtonClasses())}\n ?disabled=${this.disabled}\n >\n <div class=\"content-container\">\n ${this.hasLeadingIcon\n ? html`<div class=\"icon leading\">\n <slot name=\"leading-icon\"></slot>\n </div>`\n : nothing}\n <div class=\"text-container\">\n <div class=\"label\"><slot name=\"label\"></slot></div>\n ${this.hasStatus\n ? html`<div class=\"status\"><slot name=\"status\"></slot></div>`\n : nothing}\n </div>\n ${this.hasTrailingIcon\n ? html`<div class=\"icon-container\">\n ${this.hasTrailingIcon2\n ? html`<slot\n name=\"trailing-icon2\"\n class=\"icon trailing\"\n ></slot>`\n : nothing}\n <slot name=\"trailing-icon\" class=\"icon trailing\"></slot>\n </div>`\n : nothing}\n </div>\n </button>\n ${this.dividerRight\n ? html`<div class=\"divider-right\"></div>`\n : html`<div class=\"divider-right\" style=\"visibility: hidden;\"></div>`}\n </div>\n <div\n class=${classMap({\n 'integration-vessel-menu-container': true,\n show: this.activated,\n })}\n @click=${this.onIntegrationVesselMenuClick}\n >\n <slot name=\"integration-vessel-menu\"></slot>\n </div>\n `;\n }\n\n override render() {\n switch (this.type) {\n case IntegrationButtonType.hug: {\n return this.renderHug();\n }\n case IntegrationButtonType.rich: {\n return this.renderRich();\n }\n case IntegrationButtonType.regular:\n default: {\n return this.renderRegular();\n }\n }\n }\n\n static override styles = unsafeCSS(compentStyle);\n\n override updated() {\n let dividerHeight = 40;\n if (this.type === IntegrationButtonType.hug) {\n dividerHeight = 32;\n }\n if (this.type === IntegrationButtonType.rich) {\n dividerHeight = 64;\n }\n this.style.setProperty(\n '--integration-button-divider-height',\n `${dividerHeight}px`\n );\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-integration-button': ObcIntegrationButton;\n }\n}\n"],"names":["IntegrationButtonVariant","IntegrationButtonType"],"mappings":";;;;;;;;;;;;;;;AAYO,IAAK,6CAAAA,8BAAL;AACLA,4BAAA,QAAA,IAAS;AACTA,4BAAA,MAAA,IAAO;AAFG,SAAAA;AAAA,GAAA,4BAAA,CAAA,CAAA;AAKL,IAAK,0CAAAC,2BAAL;AACLA,yBAAA,KAAA,IAAM;AACNA,yBAAA,SAAA,IAAU;AACVA,yBAAA,MAAA,IAAO;AAHG,SAAAA;AAAA,GAAA,yBAAA,CAAA,CAAA;AAkCL,IAAM,uBAAN,cAAmC,WAAW;AAAA,EAA9C,cAAA;AAAA,UAAA,GAAA,SAAA;AACsB,SAAA,kBAAkB;AAClB,SAAA,mBAAmB;AACnB,SAAA,iBAAiB;AACjB,SAAA,YAAY;AAEvC,SAAA,WAAuC,CAAA;AACZ,SAAA,WAAW;AACX,SAAA,YAAY;AACZ,SAAA,WAAW;AACX,SAAA,gBAAgB;AAChB,SAAA,eAAe;AAChB,SAAA,UACxB;AACwB,SAAA,OACxB;AAAA,EAAA;AAAA,EAEM,mBAAmB;AACzB,WAAO;AAAA,MACL,gBAAgB;AAAA,MAChB,UAAU,KAAK;AAAA,MACf,WAAW,KAAK;AAAA,MAChB,UAAU,KAAK;AAAA,MACf,mBAAmB,KAAK;AAAA,MACxB,CAAC,aAAa,KAAK,OAAO,GAAG;AAAA,MAC7B,CAAC,UAAU,KAAK,IAAI,GAAG;AAAA,IAAA;AAAA,EAE3B;AAAA,EAEQ,6BAA6B,OAAc;AACjD,UAAM,gBAAA;AAAA,EACR;AAAA,EAEA,aAAa;AACX,WAAO;AAAA;AAAA;AAAA;AAAA,oBAIS,SAAS,KAAK,kBAAkB,CAAC;AAAA,wBAC7B,KAAK,QAAQ;AAAA;AAAA;AAAA;AAAA,kBAInB,KAAK,iBACH;AAAA;AAAA,8BAGA,OAAO;AAAA;AAAA;AAAA,oBAGP,KAAK,YAC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AAM,QAAA,CAAQ;AAAA,GAHd,qBAGgB,WAAA,kBAAA,CAAA;AACA,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GAJd,qBAIgB,WAAA,aAAA,CAAA;AAE3B,gBAAA;AAAA,EADC,SAAS,EAAC,MAAM,OAAO,WAAW,OAAM;AAAA,GAL9B,qBAMX,WAAA,YAAA,CAAA;AAC2B,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GAPd,qBAOgB,WAAA,YAAA,CAAA;AACA,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GARd,qBAQgB,WAAA,aAAA,CAAA;AACA,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GATd,qBASgB,WAAA,YAAA,CAAA;AACA,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GAVd,qBAUgB,WAAA,iBAAA,CAAA;AACA,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GAXd,qBAWgB,WAAA,gBAAA,CAAA;AACD,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAA,CAAO;AAAA,GAZb,qBAYe,WAAA,WAAA,CAAA;AAEA,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAA,CAAO;AAAA,GAdb,qBAce,WAAA,QAAA,CAAA;AAdf,uBAAN,gBAAA;AAAA,EADN,cAAc,wBAAwB;AAAA,GAC1B,oBAAA;"}
|
package/dist/integration-systems/integration-dropdown-button/integration-dropdown-button.css.js
CHANGED
|
@@ -177,7 +177,7 @@ const compentStyle = css`
|
|
|
177
177
|
border-radius: 12px;
|
|
178
178
|
background: var(--integration-container-global-color);
|
|
179
179
|
box-shadow: var(--shadow-floating);
|
|
180
|
-
padding: 4px;
|
|
180
|
+
padding: 4px 0;
|
|
181
181
|
|
|
182
182
|
overflow-y: auto;
|
|
183
183
|
}
|
|
@@ -190,6 +190,7 @@ const compentStyle = css`
|
|
|
190
190
|
min-height: var(
|
|
191
191
|
--menu-navigation-components-navigation-item-touch-target-size
|
|
192
192
|
);
|
|
193
|
+
margin: 0 4px;
|
|
193
194
|
padding: 0px
|
|
194
195
|
var(--menu-navigation-components-navigation-item-padding-horizontal);
|
|
195
196
|
border-radius: var(
|
|
@@ -410,6 +411,11 @@ const compentStyle = css`
|
|
|
410
411
|
display: none;
|
|
411
412
|
}
|
|
412
413
|
|
|
414
|
+
slot[name="fleet"] {
|
|
415
|
+
display: flex;
|
|
416
|
+
flex: 1;
|
|
417
|
+
}
|
|
418
|
+
|
|
413
419
|
.wrapper option.fleet-option {
|
|
414
420
|
display: flex;
|
|
415
421
|
align-items: center;
|
package/dist/integration-systems/integration-dropdown-button/integration-dropdown-button.css.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integration-dropdown-button.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"integration-dropdown-button.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
const componentStyle = css`
|
|
3
|
+
* {
|
|
4
|
+
-webkit-tap-highlight-color: transparent;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
* {
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.wrapper {
|
|
12
|
+
border-color: var(--integration-normal-enabled-border-color);
|
|
13
|
+
background-color: var(--integration-normal-enabled-background-color);
|
|
14
|
+
border-width: 1px;
|
|
15
|
+
border-style: solid;
|
|
16
|
+
--base-border-color: var(--integration-normal-enabled-border-color);
|
|
17
|
+
--base-background-color: var(--integration-normal-enabled-background-color);
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-direction: column;
|
|
20
|
+
height: 100%;
|
|
21
|
+
min-width: 788px;
|
|
22
|
+
align-items: center;
|
|
23
|
+
background: var(--container-global-color);
|
|
24
|
+
border-radius: var(
|
|
25
|
+
--app-components-integration-system-dropdown-menu-border-radius
|
|
26
|
+
);
|
|
27
|
+
border: 2px solid var(--integration-border-menu-outline-color);
|
|
28
|
+
box-shadow: var(--shadow-floating-x) var(--shadow-floating-y)
|
|
29
|
+
var(--shadow-floating-blur) var(--shadow-raised-spread)
|
|
30
|
+
var(--shadow-floating-color);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.footer-container {
|
|
34
|
+
width: 100%;
|
|
35
|
+
display: flex;
|
|
36
|
+
height: var(
|
|
37
|
+
--app-components-integration-system-dropdown-menu-action-container-height
|
|
38
|
+
);
|
|
39
|
+
padding: 0
|
|
40
|
+
var(--app-components-integration-system-dropdown-menu-padding-horizontal);
|
|
41
|
+
gap: var(--app-components-alert-menu-button-spacing);
|
|
42
|
+
border-top: 1px solid var(--border-divider-color);
|
|
43
|
+
background: var(--container-global-color);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.footer-container obc-button {
|
|
47
|
+
flex-grow: 1;
|
|
48
|
+
white-space: nowrap;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.content-container {
|
|
52
|
+
display: flex;
|
|
53
|
+
justify-content: center;
|
|
54
|
+
align-items: stretch;
|
|
55
|
+
align-self: stretch;
|
|
56
|
+
min-height: 0;
|
|
57
|
+
flex: 1;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.alert-list {
|
|
61
|
+
width: 100%;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.leading-icon {
|
|
65
|
+
color: var(--integration-on-normal-neutral-color);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.container-title {
|
|
69
|
+
color: var(--integration-on-normal-neutral-color);
|
|
70
|
+
}
|
|
71
|
+
`;
|
|
72
|
+
export {
|
|
73
|
+
componentStyle as default
|
|
74
|
+
};
|
|
75
|
+
//# sourceMappingURL=integration-vessel-menu.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integration-vessel-menu.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import '../../components/button/button.js';
|
|
3
|
+
import '../../components/icon-button/icon-button.js';
|
|
4
|
+
import '../../icons/icon-placeholder.js';
|
|
5
|
+
import '../../building-blocks/alert-list/alert-list.js';
|
|
6
|
+
/**
|
|
7
|
+
* `<obc-integration-vessel-menu>` – A menu to be shown when selecting a obc-integration-button from a obc-integration-bar.
|
|
8
|
+
*
|
|
9
|
+
* @slot leading-icon - Icon shown in the header.
|
|
10
|
+
* @slot title - Header title text.
|
|
11
|
+
* @slot button-1-leading-icon - Leading icon for the first button.
|
|
12
|
+
* @slot button-1-label - Label for the first button.
|
|
13
|
+
* @slot button-2-leading-icon - Leading icon for the second button.
|
|
14
|
+
* @slot button-2-label - Label for the second button.
|
|
15
|
+
* @slot button-3-leading-icon - Leading icon for the third button.
|
|
16
|
+
* @slot button-3-label - Label for the third button.
|
|
17
|
+
* @slot content - Main content shown in the content area.
|
|
18
|
+
* @slot alarms - Alarm items rendered inside the alert list.
|
|
19
|
+
*
|
|
20
|
+
* @property {number} numberOfButtons - Number of buttons to render (up to 3).
|
|
21
|
+
*
|
|
22
|
+
* @fires button1-click - Fired when the first button is clicked.
|
|
23
|
+
* @fires button2-click - Fired when the second button is clicked.
|
|
24
|
+
* @fires button3-click - Fired when the third button is clicked.
|
|
25
|
+
*/
|
|
26
|
+
export declare class ObcIntegrationVesselMenu extends LitElement {
|
|
27
|
+
numberOfButtons: number;
|
|
28
|
+
private renderButtons;
|
|
29
|
+
protected render(): import('lit-html').TemplateResult<1>;
|
|
30
|
+
static styles: import('lit').CSSResult;
|
|
31
|
+
}
|
|
32
|
+
declare global {
|
|
33
|
+
interface HTMLElementTagNameMap {
|
|
34
|
+
'obc-integration-vessel-menu': ObcIntegrationVesselMenu;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=integration-vessel-menu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integration-vessel-menu.d.ts","sourceRoot":"","sources":["../../../src/integration-systems/integration-vessel-menu/integration-vessel-menu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAkB,MAAM,KAAK,CAAC;AAMhD,OAAO,mCAAmC,CAAC;AAC3C,OAAO,6CAA6C,CAAC;AACrD,OAAO,iCAAiC,CAAC;AACzC,OAAO,gDAAgD,CAAC;AAExD;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,qBACa,wBAAyB,SAAQ,UAAU;IAC5B,eAAe,SAAK;IAE9C,OAAO,CAAC,aAAa;cAmBF,MAAM;IAoBzB,OAAgB,MAAM,0BAA6B;CACpD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,6BAA6B,EAAE,wBAAwB,CAAC;KACzD;CACF"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { unsafeCSS, LitElement, html } from "lit";
|
|
2
|
+
import { property } from "lit/decorators.js";
|
|
3
|
+
import { classMap } from "lit/directives/class-map.js";
|
|
4
|
+
import { customElement } from "../../decorator.js";
|
|
5
|
+
import componentStyle from "./integration-vessel-menu.css.js";
|
|
6
|
+
import "../../components/button/button.js";
|
|
7
|
+
import "../../components/icon-button/icon-button.js";
|
|
8
|
+
import "../../icons/icon-placeholder.js";
|
|
9
|
+
import "../../building-blocks/alert-list/alert-list.js";
|
|
10
|
+
var __defProp = Object.defineProperty;
|
|
11
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
13
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
14
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
15
|
+
if (decorator = decorators[i])
|
|
16
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
17
|
+
if (kind && result) __defProp(target, key, result);
|
|
18
|
+
return result;
|
|
19
|
+
};
|
|
20
|
+
let ObcIntegrationVesselMenu = class extends LitElement {
|
|
21
|
+
constructor() {
|
|
22
|
+
super(...arguments);
|
|
23
|
+
this.numberOfButtons = 3;
|
|
24
|
+
}
|
|
25
|
+
renderButtons() {
|
|
26
|
+
return html`${Array.from({ length: this.numberOfButtons }, (_, i) => {
|
|
27
|
+
const buttonNum = i + 1;
|
|
28
|
+
return html`<obc-button
|
|
29
|
+
@click=${() => this.dispatchEvent(new CustomEvent(`button${buttonNum}-click`))}
|
|
30
|
+
?showLeadingIcon=${true}
|
|
31
|
+
?fullWidth=${true}
|
|
32
|
+
class="button"
|
|
33
|
+
>
|
|
34
|
+
<slot
|
|
35
|
+
name="button-${buttonNum}-leading-icon"
|
|
36
|
+
slot="leading-icon"
|
|
37
|
+
></slot>
|
|
38
|
+
<slot name="button-${buttonNum}-label"></slot>
|
|
39
|
+
</obc-button>`;
|
|
40
|
+
})}`;
|
|
41
|
+
}
|
|
42
|
+
render() {
|
|
43
|
+
return html`
|
|
44
|
+
<div
|
|
45
|
+
class=${classMap({
|
|
46
|
+
wrapper: true
|
|
47
|
+
})}
|
|
48
|
+
>
|
|
49
|
+
<div class="footer-container">${this.renderButtons()}</div>
|
|
50
|
+
<div class="content-area">
|
|
51
|
+
<slot name="content"></slot>
|
|
52
|
+
</div>
|
|
53
|
+
<div class="content-container">
|
|
54
|
+
<obc-alert-list class="alert-list"
|
|
55
|
+
><slot name="alarms"> </slot>
|
|
56
|
+
</obc-alert-list>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
`;
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
ObcIntegrationVesselMenu.styles = unsafeCSS(componentStyle);
|
|
63
|
+
__decorateClass([
|
|
64
|
+
property({ type: Number })
|
|
65
|
+
], ObcIntegrationVesselMenu.prototype, "numberOfButtons", 2);
|
|
66
|
+
ObcIntegrationVesselMenu = __decorateClass([
|
|
67
|
+
customElement("obc-integration-vessel-menu")
|
|
68
|
+
], ObcIntegrationVesselMenu);
|
|
69
|
+
export {
|
|
70
|
+
ObcIntegrationVesselMenu
|
|
71
|
+
};
|
|
72
|
+
//# sourceMappingURL=integration-vessel-menu.js.map
|