@oicl/openbridge-webcomponents-full-bundle 2.0.0-next.61 → 2.0.0-next.62
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 +181 -166
- package/bundle/openbridge-webcomponents.bundle.js.map +1 -1
- package/custom-elements.json +12 -64
- package/dist/icons/icon-03-tidal-stream.js +2 -2
- package/dist/icons/icon-03-tidal-stream.js.map +1 -1
- package/dist/icons/icon-add-row-above.js +1 -1
- package/dist/icons/icon-add-row-above.js.map +1 -1
- package/dist/icons/icon-alarm-acknowledged-iec.js +1 -1
- package/dist/icons/icon-alarm-acknowledged-iec.js.map +1 -1
- package/dist/icons/icon-alarm-emergency-iec.js +2 -2
- package/dist/icons/icon-alarm-emergency-iec.js.map +1 -1
- package/dist/icons/icon-alarm-rectified-iec.js +1 -1
- package/dist/icons/icon-alarm-rectified-iec.js.map +1 -1
- package/dist/icons/icon-alarm-silenced-iec.js +2 -2
- package/dist/icons/icon-alarm-silenced-iec.js.map +1 -1
- package/dist/icons/icon-alarm-unacknowledged-iec.js +2 -2
- package/dist/icons/icon-alarm-unacknowledged-iec.js.map +1 -1
- package/dist/icons/icon-alert-empty.js +1 -1
- package/dist/icons/icon-alert-empty.js.map +1 -1
- package/dist/icons/icon-caution-color-iec.js +1 -1
- package/dist/icons/icon-caution-color-iec.js.map +1 -1
- package/dist/icons/icon-caution-empty.js +1 -1
- package/dist/icons/icon-caution-empty.js.map +1 -1
- package/dist/icons/icon-connector-corner.js +1 -1
- package/dist/icons/icon-connector-corner.js.map +1 -1
- package/dist/icons/icon-connector-straight.js +1 -1
- package/dist/icons/icon-connector-straight.js.map +1 -1
- package/dist/icons/icon-connector-threeway.js +1 -1
- package/dist/icons/icon-connector-threeway.js.map +1 -1
- package/dist/icons/icon-light-rain-showers-night-colour.js +2 -2
- package/dist/icons/icon-light-rain-showers-night-colour.js.map +1 -1
- package/dist/icons/icon-rain-showers-night.js +2 -2
- package/dist/icons/icon-rain-showers-night.js.map +1 -1
- package/dist/icons/icon-simplified-buoy-default.js +2 -2
- package/dist/icons/icon-simplified-buoy-default.js.map +1 -1
- package/dist/icons/icon-simplified-buoy-safe-water.js +2 -2
- package/dist/icons/icon-simplified-buoy-safe-water.js.map +1 -1
- package/dist/icons/icon-simplified-buoy-special-purpose.js +2 -2
- package/dist/icons/icon-simplified-buoy-special-purpose.js.map +1 -1
- package/dist/icons/icon-switch-03-off.js +2 -2
- package/dist/icons/icon-switch-03-off.js.map +1 -1
- package/dist/icons/icon-switch-horizontal-off-large.js +2 -2
- package/dist/icons/icon-switch-horizontal-off-large.js.map +1 -1
- package/dist/icons/icon-switch-horizontal-off.js +2 -2
- package/dist/icons/icon-switch-horizontal-off.js.map +1 -1
- package/dist/icons/icon-vessel-generic-anchored-colour.js +3 -3
- package/dist/icons/icon-vessel-generic-anchored-colour.js.map +1 -1
- package/dist/icons/icon-vessel-generic-default-colour.js +2 -2
- package/dist/icons/icon-vessel-generic-default-colour.js.map +1 -1
- package/dist/icons/icon-vessel-generic-fast-colour.js +5 -5
- package/dist/icons/icon-vessel-generic-fast-colour.js.map +1 -1
- package/dist/icons/icon-vessel-generic-medium-colour.js +4 -4
- package/dist/icons/icon-vessel-generic-medium-colour.js.map +1 -1
- package/dist/icons/icon-vessel-generic-slow-colour.js +3 -3
- package/dist/icons/icon-vessel-generic-slow-colour.js.map +1 -1
- package/dist/icons/icon-vessel-generic-stopped-colour.js +4 -4
- package/dist/icons/icon-vessel-generic-stopped-colour.js.map +1 -1
- package/dist/icons/icon-vessel-type-barge-colour.js +4 -4
- package/dist/icons/icon-vessel-type-barge-colour.js.map +1 -1
- package/dist/icons/icon-vessel-type-cargo-colour.js +5 -5
- package/dist/icons/icon-vessel-type-cargo-colour.js.map +1 -1
- package/dist/icons/icon-vessel-type-cruise-colour.js +3 -3
- package/dist/icons/icon-vessel-type-cruise-colour.js.map +1 -1
- package/dist/icons/icon-vessel-type-fishing-colour.js +4 -4
- package/dist/icons/icon-vessel-type-fishing-colour.js.map +1 -1
- package/dist/icons/icon-vessel-type-fishing-filled.js +2 -2
- package/dist/icons/icon-vessel-type-fishing-filled.js.map +1 -1
- package/dist/icons/icon-vessel-type-generic-colour.js +3 -3
- package/dist/icons/icon-vessel-type-generic-colour.js.map +1 -1
- package/dist/icons/icon-vessel-type-lifeboat-colour.js +4 -4
- package/dist/icons/icon-vessel-type-lifeboat-colour.js.map +1 -1
- package/dist/icons/icon-vessel-type-military-colour.js +3 -3
- package/dist/icons/icon-vessel-type-military-colour.js.map +1 -1
- package/dist/icons/icon-vessel-type-motor-boat-colour.js +2 -2
- package/dist/icons/icon-vessel-type-motor-boat-colour.js.map +1 -1
- package/dist/icons/icon-vessel-type-passenger-colour.js +10 -10
- package/dist/icons/icon-vessel-type-passenger-colour.js.map +1 -1
- package/dist/icons/icon-vessel-type-pilot-colour.js +5 -5
- package/dist/icons/icon-vessel-type-pilot-colour.js.map +1 -1
- package/dist/icons/icon-vessel-type-psv-colour.js +5 -5
- package/dist/icons/icon-vessel-type-psv-colour.js.map +1 -1
- package/dist/icons/icon-vessel-type-sailing-colour.js +2 -2
- package/dist/icons/icon-vessel-type-sailing-colour.js.map +1 -1
- package/dist/icons/icon-vessel-type-sar-colour.js +3 -3
- package/dist/icons/icon-vessel-type-sar-colour.js.map +1 -1
- package/dist/icons/icon-vessel-type-smallcraft-colour.js +2 -2
- package/dist/icons/icon-vessel-type-smallcraft-colour.js.map +1 -1
- package/dist/icons/icon-vessel-type-speed-craft-colour.js +2 -2
- package/dist/icons/icon-vessel-type-speed-craft-colour.js.map +1 -1
- package/dist/icons/icon-vessel-type-tanker-colour.js +5 -5
- package/dist/icons/icon-vessel-type-tanker-colour.js.map +1 -1
- package/dist/icons/icon-vessel-type-tug-colour.js +4 -4
- package/dist/icons/icon-vessel-type-tug-colour.js.map +1 -1
- package/dist/icons/icon-vessel-type-unknown-colour.js +3 -3
- package/dist/icons/icon-vessel-type-unknown-colour.js.map +1 -1
- package/dist/icons/icon-warning-acknowledged-iec.js +1 -1
- package/dist/icons/icon-warning-acknowledged-iec.js.map +1 -1
- package/dist/icons/icon-warning-empty.js +1 -1
- package/dist/icons/icon-warning-empty.js.map +1 -1
- package/dist/icons/icon-warning-noack-iec.js +2 -2
- package/dist/icons/icon-warning-noack-iec.js.map +1 -1
- package/dist/icons/icon-warning-rectified-iec.js +1 -1
- package/dist/icons/icon-warning-rectified-iec.js.map +1 -1
- package/dist/icons/icon-warning-silenced-iec.js +1 -1
- package/dist/icons/icon-warning-silenced-iec.js.map +1 -1
- package/dist/icons/icon-warning-transferred-iec.js +1 -1
- package/dist/icons/icon-warning-transferred-iec.js.map +1 -1
- package/dist/icons/icon-warning-unacknowledged-iec.js +1 -1
- package/dist/icons/icon-warning-unacknowledged-iec.js.map +1 -1
- package/dist/integration-systems/integration-vessel-menu/integration-vessel-menu.css.js +34 -9
- package/dist/integration-systems/integration-vessel-menu/integration-vessel-menu.css.js.map +1 -1
- package/dist/integration-systems/integration-vessel-menu/integration-vessel-menu.d.ts +3 -16
- package/dist/integration-systems/integration-vessel-menu/integration-vessel-menu.d.ts.map +1 -1
- package/dist/integration-systems/integration-vessel-menu/integration-vessel-menu.js +14 -24
- package/dist/integration-systems/integration-vessel-menu/integration-vessel-menu.js.map +1 -1
- package/dist/openbridge.css +237 -65
- package/package.json +3 -2
- package/script/check-css-variables.ts +1 -8
- package/script/check-icon-hex-leaks.ts +70 -0
- package/script/convert-icons.ts +79 -8
- package/script/download-alert-icons.ts +13 -0
- package/script/download-icons.ts +53 -14
- package/script/figmavariables.json +18 -1
- package/src/icons/icon-03-tidal-stream.ts +2 -2
- package/src/icons/icon-add-row-above.ts +1 -1
- package/src/icons/icon-alarm-acknowledged-iec.ts +1 -1
- package/src/icons/icon-alarm-emergency-iec.ts +2 -2
- package/src/icons/icon-alarm-rectified-iec.ts +1 -1
- package/src/icons/icon-alarm-silenced-iec.ts +2 -2
- package/src/icons/icon-alarm-unacknowledged-iec.ts +2 -2
- package/src/icons/icon-alert-empty.ts +1 -1
- package/src/icons/icon-caution-color-iec.ts +1 -1
- package/src/icons/icon-caution-empty.ts +1 -1
- package/src/icons/icon-connector-corner.ts +1 -1
- package/src/icons/icon-connector-straight.ts +1 -1
- package/src/icons/icon-connector-threeway.ts +1 -1
- package/src/icons/icon-light-rain-showers-night-colour.ts +2 -2
- package/src/icons/icon-rain-showers-night.ts +2 -2
- package/src/icons/icon-simplified-buoy-default.ts +2 -2
- package/src/icons/icon-simplified-buoy-safe-water.ts +2 -2
- package/src/icons/icon-simplified-buoy-special-purpose.ts +2 -2
- package/src/icons/icon-switch-03-off.ts +2 -2
- package/src/icons/icon-switch-horizontal-off-large.ts +2 -2
- package/src/icons/icon-switch-horizontal-off.ts +2 -2
- package/src/icons/icon-vessel-generic-anchored-colour.ts +3 -3
- package/src/icons/icon-vessel-generic-default-colour.ts +2 -2
- package/src/icons/icon-vessel-generic-fast-colour.ts +5 -5
- package/src/icons/icon-vessel-generic-medium-colour.ts +4 -4
- package/src/icons/icon-vessel-generic-slow-colour.ts +3 -3
- package/src/icons/icon-vessel-generic-stopped-colour.ts +4 -4
- package/src/icons/icon-vessel-type-barge-colour.ts +4 -4
- package/src/icons/icon-vessel-type-cargo-colour.ts +5 -5
- package/src/icons/icon-vessel-type-cruise-colour.ts +3 -3
- package/src/icons/icon-vessel-type-fishing-colour.ts +4 -4
- package/src/icons/icon-vessel-type-fishing-filled.ts +2 -2
- package/src/icons/icon-vessel-type-generic-colour.ts +3 -3
- package/src/icons/icon-vessel-type-lifeboat-colour.ts +4 -4
- package/src/icons/icon-vessel-type-military-colour.ts +3 -3
- package/src/icons/icon-vessel-type-motor-boat-colour.ts +2 -2
- package/src/icons/icon-vessel-type-passenger-colour.ts +10 -10
- package/src/icons/icon-vessel-type-pilot-colour.ts +5 -5
- package/src/icons/icon-vessel-type-psv-colour.ts +5 -5
- package/src/icons/icon-vessel-type-sailing-colour.ts +2 -2
- package/src/icons/icon-vessel-type-sar-colour.ts +3 -3
- package/src/icons/icon-vessel-type-smallcraft-colour.ts +2 -2
- package/src/icons/icon-vessel-type-speed-craft-colour.ts +2 -2
- package/src/icons/icon-vessel-type-tanker-colour.ts +5 -5
- package/src/icons/icon-vessel-type-tug-colour.ts +4 -4
- package/src/icons/icon-vessel-type-unknown-colour.ts +3 -3
- package/src/icons/icon-warning-acknowledged-iec.ts +1 -1
- package/src/icons/icon-warning-empty.ts +1 -1
- package/src/icons/icon-warning-noack-iec.ts +2 -2
- package/src/icons/icon-warning-rectified-iec.ts +1 -1
- package/src/icons/icon-warning-silenced-iec.ts +1 -1
- package/src/icons/icon-warning-transferred-iec.ts +1 -1
- package/src/icons/icon-warning-unacknowledged-iec.ts +1 -1
- package/src/integration-systems/integration-bar/integration-bar.stories.ts +69 -40
- package/src/integration-systems/integration-vessel-menu/integration-vessel-menu.css +33 -9
- package/src/integration-systems/integration-vessel-menu/integration-vessel-menu.stories.ts +54 -25
- package/src/integration-systems/integration-vessel-menu/integration-vessel-menu.ts +14 -38
- package/src/palettes/variables.css +237 -65
|
@@ -3,6 +3,7 @@ import {ObcIntegrationBar} from './integration-bar.js';
|
|
|
3
3
|
import './integration-bar.js';
|
|
4
4
|
import {html, nothing} from 'lit';
|
|
5
5
|
import '../../components/dropdown-button/dropdown-button.js';
|
|
6
|
+
import '../../components/button/button.js';
|
|
6
7
|
import '../../components/clock/clock.js';
|
|
7
8
|
import '../integration-vessel-menu/integration-vessel-menu.js';
|
|
8
9
|
import {
|
|
@@ -104,16 +105,23 @@ function renderIntegrationButtons({
|
|
|
104
105
|
<div slot="info-status">Info Status</div>
|
|
105
106
|
<div slot="status">Status</div>
|
|
106
107
|
${showIntegrationMenu
|
|
107
|
-
? html`<obc-integration-vessel-menu
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
<
|
|
108
|
+
? html`<obc-integration-vessel-menu slot="integration-vessel-menu"
|
|
109
|
+
><obc-button
|
|
110
|
+
slot="buttons"
|
|
111
|
+
?fullWidth=${true}
|
|
112
|
+
?showLeadingIcon=${true}
|
|
113
|
+
@click=${() => console.log('Boat Button 1 clicked')}
|
|
114
|
+
><obi-placeholder slot="leading-icon"></obi-placeholder
|
|
115
|
+
>Select</obc-button
|
|
116
|
+
>
|
|
117
|
+
<obc-button
|
|
118
|
+
slot="buttons"
|
|
119
|
+
?fullWidth=${true}
|
|
120
|
+
?showLeadingIcon=${true}
|
|
121
|
+
@click=${() => console.log('Boat Button 2 clicked')}
|
|
122
|
+
><obi-placeholder slot="leading-icon"></obi-placeholder
|
|
123
|
+
>Dismiss</obc-button
|
|
124
|
+
>
|
|
117
125
|
<div slot="content" style="padding: 24px;">
|
|
118
126
|
<p>Boat is working just fine.</p>
|
|
119
127
|
</div></obc-integration-vessel-menu
|
|
@@ -141,16 +149,23 @@ function renderIntegrationButtons({
|
|
|
141
149
|
<div slot="info-status">Info Status</div>
|
|
142
150
|
<div slot="status">Status</div>
|
|
143
151
|
${showIntegrationMenu
|
|
144
|
-
? html`<obc-integration-vessel-menu
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
<
|
|
152
|
+
? html`<obc-integration-vessel-menu slot="integration-vessel-menu"
|
|
153
|
+
><obc-button
|
|
154
|
+
slot="buttons"
|
|
155
|
+
?fullWidth=${true}
|
|
156
|
+
?showLeadingIcon=${true}
|
|
157
|
+
@click=${() => console.log('Space Ship Button 1 clicked')}
|
|
158
|
+
><obi-placeholder slot="leading-icon"></obi-placeholder
|
|
159
|
+
>Select</obc-button
|
|
160
|
+
>
|
|
161
|
+
<obc-button
|
|
162
|
+
slot="buttons"
|
|
163
|
+
?fullWidth=${true}
|
|
164
|
+
?showLeadingIcon=${true}
|
|
165
|
+
@click=${() => console.log('Space Ship Button 2 clicked')}
|
|
166
|
+
><obi-placeholder slot="leading-icon"></obi-placeholder
|
|
167
|
+
>Dismiss</obc-button
|
|
168
|
+
>
|
|
154
169
|
<div slot="content" style="padding: 24px;">
|
|
155
170
|
<p>Space Ship is working just fine.</p>
|
|
156
171
|
</div></obc-integration-vessel-menu
|
|
@@ -178,16 +193,23 @@ function renderIntegrationButtons({
|
|
|
178
193
|
<div slot="info-status">Info Status</div>
|
|
179
194
|
<div slot="status">Status</div>
|
|
180
195
|
${showIntegrationMenu
|
|
181
|
-
? html`<obc-integration-vessel-menu
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
<
|
|
196
|
+
? html`<obc-integration-vessel-menu slot="integration-vessel-menu"
|
|
197
|
+
><obc-button
|
|
198
|
+
slot="buttons"
|
|
199
|
+
?fullWidth=${true}
|
|
200
|
+
?showLeadingIcon=${true}
|
|
201
|
+
@click=${() => console.log('Vessel Button 1 clicked')}
|
|
202
|
+
><obi-placeholder slot="leading-icon"></obi-placeholder
|
|
203
|
+
>Select</obc-button
|
|
204
|
+
>
|
|
205
|
+
<obc-button
|
|
206
|
+
slot="buttons"
|
|
207
|
+
?fullWidth=${true}
|
|
208
|
+
?showLeadingIcon=${true}
|
|
209
|
+
@click=${() => console.log('Vessel Button 2 clicked')}
|
|
210
|
+
><obi-placeholder slot="leading-icon"></obi-placeholder
|
|
211
|
+
>Dismiss</obc-button
|
|
212
|
+
>
|
|
191
213
|
<div slot="content" style="padding: 24px;">
|
|
192
214
|
<p>Vessel is working just fine.</p>
|
|
193
215
|
</div></obc-integration-vessel-menu
|
|
@@ -215,16 +237,23 @@ function renderIntegrationButtons({
|
|
|
215
237
|
<div slot="info-status">Info Status</div>
|
|
216
238
|
<div slot="status">Status</div>
|
|
217
239
|
${showIntegrationMenu
|
|
218
|
-
? html`<obc-integration-vessel-menu
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
<
|
|
240
|
+
? html`<obc-integration-vessel-menu slot="integration-vessel-menu"
|
|
241
|
+
><obc-button
|
|
242
|
+
slot="buttons"
|
|
243
|
+
?fullWidth=${true}
|
|
244
|
+
?showLeadingIcon=${true}
|
|
245
|
+
@click=${() => console.log('Last Button 1 clicked')}
|
|
246
|
+
><obi-placeholder slot="leading-icon"></obi-placeholder
|
|
247
|
+
>Select</obc-button
|
|
248
|
+
>
|
|
249
|
+
<obc-button
|
|
250
|
+
slot="buttons"
|
|
251
|
+
?fullWidth=${true}
|
|
252
|
+
?showLeadingIcon=${true}
|
|
253
|
+
@click=${() => console.log('Last Button 2 clicked')}
|
|
254
|
+
><obi-placeholder slot="leading-icon"></obi-placeholder
|
|
255
|
+
>Dismiss</obc-button
|
|
256
|
+
>
|
|
228
257
|
<div slot="content" style="padding: 24px;">
|
|
229
258
|
<p>Last is working just fine.</p>
|
|
230
259
|
</div></obc-integration-vessel-menu
|
|
@@ -6,8 +6,6 @@
|
|
|
6
6
|
@mixin style style=integration-normal noClick=true;
|
|
7
7
|
display: flex;
|
|
8
8
|
flex-direction: column;
|
|
9
|
-
height: 100%;
|
|
10
|
-
min-width: 788px;
|
|
11
9
|
align-items: center;
|
|
12
10
|
background: var(--container-global-color);
|
|
13
11
|
border-radius: var(
|
|
@@ -22,31 +20,57 @@
|
|
|
22
20
|
.footer-container {
|
|
23
21
|
width: 100%;
|
|
24
22
|
display: flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
align-self: stretch;
|
|
25
25
|
height: var(
|
|
26
26
|
--app-components-integration-system-dropdown-menu-action-container-height
|
|
27
27
|
);
|
|
28
|
-
padding:
|
|
29
|
-
var(--app-components-integration-system-
|
|
30
|
-
gap: var(--app-components-
|
|
28
|
+
padding: var(--app-components-integration-system-menu-padding-vertical)
|
|
29
|
+
var(--app-components-integration-system-menu-padding-horizontal);
|
|
30
|
+
gap: var(--app-components-integration-system-menu-action-spacing);
|
|
31
31
|
border-top: 1px solid var(--border-divider-color);
|
|
32
32
|
background: var(--container-global-color);
|
|
33
|
+
border-radius: 12px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.content-area {
|
|
37
|
+
display: flex;
|
|
38
|
+
flex-direction: column;
|
|
39
|
+
align-items: flex-start;
|
|
40
|
+
gap: 8px;
|
|
41
|
+
align-self: stretch;
|
|
42
|
+
border-radius: 8px;
|
|
33
43
|
}
|
|
34
44
|
|
|
35
|
-
.footer-container obc-button {
|
|
36
|
-
|
|
45
|
+
.footer-container slot[name="buttons"]::slotted(:not(obc-button)) {
|
|
46
|
+
display: contents;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.footer-container slot[name="buttons"]::slotted(*) {
|
|
50
|
+
display: flex;
|
|
51
|
+
flex: 1 1 0px;
|
|
52
|
+
width: 100%;
|
|
37
53
|
white-space: nowrap;
|
|
38
54
|
}
|
|
39
55
|
|
|
56
|
+
.buttons-slot {
|
|
57
|
+
display: contents;
|
|
58
|
+
}
|
|
59
|
+
|
|
40
60
|
.content-container {
|
|
41
61
|
display: flex;
|
|
42
62
|
justify-content: center;
|
|
43
|
-
align-items:
|
|
63
|
+
align-items: flex-start;
|
|
44
64
|
align-self: stretch;
|
|
45
65
|
min-height: 0;
|
|
46
66
|
flex: 1;
|
|
67
|
+
border-radius: 8px;
|
|
68
|
+
&.hidealarmlist {
|
|
69
|
+
display: none;
|
|
70
|
+
}
|
|
47
71
|
}
|
|
48
72
|
|
|
49
|
-
.
|
|
73
|
+
.alertlist {
|
|
50
74
|
width: 100%;
|
|
51
75
|
}
|
|
52
76
|
|
|
@@ -106,13 +106,10 @@ const meta: Meta<ObcIntegrationVesselMenu> = {
|
|
|
106
106
|
title: 'Integration Systems/Integration Vessel Menu',
|
|
107
107
|
component: 'obc-integration-vessel-menu',
|
|
108
108
|
tags: ['alpha'],
|
|
109
|
-
args: {
|
|
109
|
+
args: {hideAlarmList: false},
|
|
110
110
|
argTypes: {
|
|
111
|
-
|
|
112
|
-
control: '
|
|
113
|
-
min: 0,
|
|
114
|
-
max: 3,
|
|
115
|
-
step: 1,
|
|
111
|
+
hideAlarmList: {
|
|
112
|
+
control: 'boolean',
|
|
116
113
|
},
|
|
117
114
|
},
|
|
118
115
|
parameters: {
|
|
@@ -129,7 +126,7 @@ export default meta;
|
|
|
129
126
|
type Story = StoryObj<ObcIntegrationVesselMenu>;
|
|
130
127
|
|
|
131
128
|
interface IntegrationVesselMenuArgs {
|
|
132
|
-
|
|
129
|
+
hideAlarmList: boolean;
|
|
133
130
|
}
|
|
134
131
|
|
|
135
132
|
type IntegrationVesselMenuTemplate = (
|
|
@@ -137,34 +134,61 @@ type IntegrationVesselMenuTemplate = (
|
|
|
137
134
|
) => ReturnType<typeof html>;
|
|
138
135
|
|
|
139
136
|
const template: IntegrationVesselMenuTemplate = (args) => html`
|
|
140
|
-
<obc-integration-vessel-menu
|
|
141
|
-
.numberOfButtons=${args.numberOfButtons}
|
|
142
|
-
@button-1-click=${() => console.log('Button 1 clicked')}
|
|
143
|
-
@button-2-click=${() => console.log('Button 2 clicked')}
|
|
144
|
-
@button-3-click=${() => console.log('Button 3 clicked')}
|
|
145
|
-
>
|
|
137
|
+
<obc-integration-vessel-menu .hideAlarmList=${args.hideAlarmList}>
|
|
146
138
|
<div slot="content" style="padding: 24px;">
|
|
147
139
|
<div style="width: 496px; height: 256;">
|
|
148
140
|
<p>Content area</p>
|
|
149
141
|
</div>
|
|
150
142
|
</div>
|
|
151
|
-
<
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
143
|
+
<obc-button
|
|
144
|
+
slot="buttons"
|
|
145
|
+
@click=${() => console.log('Button 1 clicked')}
|
|
146
|
+
?fullWidth=${true}
|
|
147
|
+
>
|
|
148
|
+
<div>Action 1</div>
|
|
149
|
+
</obc-button>
|
|
150
|
+
<obc-button
|
|
151
|
+
slot="buttons"
|
|
152
|
+
@click=${() => console.log('Button 2 clicked')}
|
|
153
|
+
?fullWidth=${true}
|
|
154
|
+
>
|
|
155
|
+
Ac. 2
|
|
156
|
+
</obc-button>
|
|
157
|
+
<obc-button
|
|
158
|
+
slot="buttons"
|
|
159
|
+
@click=${() => console.log('Button 3 clicked')}
|
|
160
|
+
?fullWidth=${true}
|
|
161
|
+
>
|
|
162
|
+
Action number 3
|
|
163
|
+
</obc-button>
|
|
164
|
+
|
|
157
165
|
${renderAlarms()}
|
|
158
166
|
</obc-integration-vessel-menu>
|
|
159
167
|
`;
|
|
160
168
|
|
|
161
169
|
const templateWithoutAlarms: IntegrationVesselMenuTemplate = (args) => html`
|
|
162
|
-
<obc-integration-vessel-menu
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
170
|
+
<obc-integration-vessel-menu .hideAlarmList=${args.hideAlarmList}>
|
|
171
|
+
<obc-button
|
|
172
|
+
slot="buttons"
|
|
173
|
+
@click=${() => console.log('Button 1 clicked')}
|
|
174
|
+
?fullWidth=${true}
|
|
175
|
+
>
|
|
176
|
+
Action 1
|
|
177
|
+
</obc-button>
|
|
178
|
+
<obc-button
|
|
179
|
+
slot="buttons"
|
|
180
|
+
@click=${() => console.log('Button 2 clicked')}
|
|
181
|
+
?fullWidth=${true}
|
|
182
|
+
>
|
|
183
|
+
Ac. 2
|
|
184
|
+
</obc-button>
|
|
185
|
+
<obc-button
|
|
186
|
+
slot="buttons"
|
|
187
|
+
@click=${() => console.log('Button 3 clicked')}
|
|
188
|
+
?fullWidth=${true}
|
|
189
|
+
>
|
|
190
|
+
Action number 3
|
|
191
|
+
</obc-button>
|
|
168
192
|
<div slot="content" style="padding: 24px;">
|
|
169
193
|
<p>Add content here</p>
|
|
170
194
|
</div>
|
|
@@ -178,3 +202,8 @@ export const Default: Story = {
|
|
|
178
202
|
export const WithoutAlarms: Story = {
|
|
179
203
|
render: templateWithoutAlarms,
|
|
180
204
|
};
|
|
205
|
+
|
|
206
|
+
export const WithoutAlarmsHideEmptyAlarmList: Story = {
|
|
207
|
+
render: templateWithoutAlarms,
|
|
208
|
+
args: {hideAlarmList: true},
|
|
209
|
+
};
|
|
@@ -12,46 +12,15 @@ import '../../building-blocks/alert-list/alert-list.js';
|
|
|
12
12
|
/**
|
|
13
13
|
* `<obc-integration-vessel-menu>` – A menu to be shown when selecting a obc-integration-button from a obc-integration-bar.
|
|
14
14
|
*
|
|
15
|
-
* @slot
|
|
16
|
-
* @slot title - Header title text.
|
|
17
|
-
* @slot button-1-leading-icon - Leading icon for the first button.
|
|
18
|
-
* @slot button-1-label - Label for the first button.
|
|
19
|
-
* @slot button-2-leading-icon - Leading icon for the second button.
|
|
20
|
-
* @slot button-2-label - Label for the second button.
|
|
21
|
-
* @slot button-3-leading-icon - Leading icon for the third button.
|
|
22
|
-
* @slot button-3-label - Label for the third button.
|
|
15
|
+
* @slot buttons - Buttons shown in the footer.
|
|
23
16
|
* @slot content - Main content shown in the content area.
|
|
24
17
|
* @slot alarms - Alarm items rendered inside the alert list.
|
|
25
|
-
*
|
|
26
|
-
* @property {number} numberOfButtons - Number of buttons to render (up to 3).
|
|
27
|
-
*
|
|
28
|
-
* @fires button1-click - Fired when the first button is clicked.
|
|
29
|
-
* @fires button2-click - Fired when the second button is clicked.
|
|
30
|
-
* @fires button3-click - Fired when the third button is clicked.
|
|
31
18
|
*/
|
|
32
19
|
|
|
33
20
|
@customElement('obc-integration-vessel-menu')
|
|
34
21
|
export class ObcIntegrationVesselMenu extends LitElement {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
private renderButtons() {
|
|
38
|
-
return html`${Array.from({length: this.numberOfButtons}, (_, i) => {
|
|
39
|
-
const buttonNum = i + 1;
|
|
40
|
-
return html`<obc-button
|
|
41
|
-
@click=${() =>
|
|
42
|
-
this.dispatchEvent(new CustomEvent(`button${buttonNum}-click`))}
|
|
43
|
-
?showLeadingIcon=${true}
|
|
44
|
-
?fullWidth=${true}
|
|
45
|
-
class="button"
|
|
46
|
-
>
|
|
47
|
-
<slot
|
|
48
|
-
name="button-${buttonNum}-leading-icon"
|
|
49
|
-
slot="leading-icon"
|
|
50
|
-
></slot>
|
|
51
|
-
<slot name="button-${buttonNum}-label"></slot>
|
|
52
|
-
</obc-button>`;
|
|
53
|
-
})}`;
|
|
54
|
-
}
|
|
22
|
+
/** Hide the alarm list, ensuring it doesn't take space (display: none). */
|
|
23
|
+
@property({type: Boolean}) hideAlarmList = false;
|
|
55
24
|
|
|
56
25
|
protected override render() {
|
|
57
26
|
return html`
|
|
@@ -60,13 +29,20 @@ export class ObcIntegrationVesselMenu extends LitElement {
|
|
|
60
29
|
wrapper: true,
|
|
61
30
|
})}
|
|
62
31
|
>
|
|
63
|
-
<div class="footer-container"
|
|
32
|
+
<div class="footer-container">
|
|
33
|
+
<slot name="buttons" class="buttons-slot"></slot>
|
|
34
|
+
</div>
|
|
64
35
|
<div class="content-area">
|
|
65
36
|
<slot name="content"></slot>
|
|
66
37
|
</div>
|
|
67
|
-
<div
|
|
68
|
-
|
|
69
|
-
|
|
38
|
+
<div
|
|
39
|
+
class=${classMap({
|
|
40
|
+
'content-container': true,
|
|
41
|
+
hidealarmlist: this.hideAlarmList,
|
|
42
|
+
})}
|
|
43
|
+
>
|
|
44
|
+
<obc-alert-list class="alertlist"
|
|
45
|
+
><slot name="alarms"></slot>
|
|
70
46
|
</obc-alert-list>
|
|
71
47
|
</div>
|
|
72
48
|
</div>
|