@oicl/openbridge-webcomponents 0.0.7 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (282) hide show
  1. package/.release-it.json +12 -0
  2. package/.storybook/main.ts +19 -0
  3. package/.storybook/preview.ts +11 -0
  4. package/.vscode/launch.json +16 -0
  5. package/CHANGELOG.md +106 -41
  6. package/README.md +8 -0
  7. package/__snapshots__/alert-icon--primary.png +0 -0
  8. package/__snapshots__/application-alert-button--notification.png +0 -0
  9. package/__snapshots__/application-alert-button--running.png +0 -0
  10. package/__snapshots__/application-notification-message--large-single-message.png +0 -0
  11. package/__snapshots__/application-notification-message--large.png +0 -0
  12. package/__snapshots__/application-notification-message--primary.png +0 -0
  13. package/__snapshots__/button-rich-button--bottom-with-boarder.png +0 -0
  14. package/__snapshots__/button-rich-button--bottom.png +0 -0
  15. package/__snapshots__/button-rich-button--center.png +0 -0
  16. package/__snapshots__/button-rich-button--double-line.png +0 -0
  17. package/__snapshots__/button-rich-button--multi-line.png +0 -0
  18. package/__snapshots__/button-rich-button--regular-no-icons.png +0 -0
  19. package/__snapshots__/button-rich-button--regular.png +0 -0
  20. package/__snapshots__/button-rich-button--single-line.png +0 -0
  21. package/__snapshots__/button-rich-button--top-with-boarder.png +0 -0
  22. package/__snapshots__/button-rich-button--top.png +0 -0
  23. package/__snapshots__/button-rich-button--with-graphic-border.png +0 -0
  24. package/__snapshots__/button-rich-button--with-graphic-info.png +0 -0
  25. package/__snapshots__/button-rich-button--with-graphic.png +0 -0
  26. package/__snapshots__/button-rich-button--with-status.png +0 -0
  27. package/__snapshots__/button-vendor-button--primary.png +0 -0
  28. package/__snapshots__/icons-icon--list.png +0 -0
  29. package/__snapshots__/icons-icon--use-font-color.png +0 -0
  30. package/custom-elements.json +2134 -531
  31. package/dist/components/alert-button/alert-button.css.js +4 -12
  32. package/dist/components/alert-button/alert-button.css.js.map +1 -1
  33. package/dist/components/alert-button/alert-button.d.ts +11 -1
  34. package/dist/components/alert-button/alert-button.d.ts.map +1 -1
  35. package/dist/components/alert-button/alert-button.js +21 -1
  36. package/dist/components/alert-button/alert-button.js.map +1 -1
  37. package/dist/components/alert-icon/alert-icon.d.ts +36 -0
  38. package/dist/components/alert-icon/alert-icon.d.ts.map +1 -0
  39. package/dist/components/alert-icon/alert-icon.js +84 -0
  40. package/dist/components/alert-icon/alert-icon.js.map +1 -0
  41. package/dist/components/alert-icon/icons/icon-14-alarm-silenced-a.d.ts +2 -0
  42. package/dist/components/alert-icon/icons/icon-14-alarm-silenced-a.d.ts.map +1 -0
  43. package/dist/components/alert-icon/icons/icon-14-alarm-silenced-a.js +13 -0
  44. package/dist/components/alert-icon/icons/icon-14-alarm-silenced-a.js.map +1 -0
  45. package/dist/components/alert-icon/icons/icon-14-alarm-silenced-b.d.ts +2 -0
  46. package/dist/components/alert-icon/icons/icon-14-alarm-silenced-b.d.ts.map +1 -0
  47. package/dist/components/alert-icon/icons/icon-14-alarm-silenced-b.js +20 -0
  48. package/dist/components/alert-icon/icons/icon-14-alarm-silenced-b.js.map +1 -0
  49. package/dist/components/alert-icon/icons/icon-14-alarm-unack-a.d.ts +2 -0
  50. package/dist/components/alert-icon/icons/icon-14-alarm-unack-a.d.ts.map +1 -0
  51. package/dist/components/alert-icon/icons/icon-14-alarm-unack-a.js +12 -0
  52. package/dist/components/alert-icon/icons/icon-14-alarm-unack-a.js.map +1 -0
  53. package/dist/components/alert-icon/icons/icon-14-alarm-unack-b.d.ts +2 -0
  54. package/dist/components/alert-icon/icons/icon-14-alarm-unack-b.d.ts.map +1 -0
  55. package/dist/components/alert-icon/icons/icon-14-alarm-unack-b.js +19 -0
  56. package/dist/components/alert-icon/icons/icon-14-alarm-unack-b.js.map +1 -0
  57. package/dist/components/alert-icon/icons/icon-14-warning-unack-a.d.ts +2 -0
  58. package/dist/components/alert-icon/icons/icon-14-warning-unack-a.d.ts.map +1 -0
  59. package/dist/components/alert-icon/icons/icon-14-warning-unack-a.js +12 -0
  60. package/dist/components/alert-icon/icons/icon-14-warning-unack-a.js.map +1 -0
  61. package/dist/components/alert-icon/icons/icon-14-warning-unack-b.d.ts +2 -0
  62. package/dist/components/alert-icon/icons/icon-14-warning-unack-b.d.ts.map +1 -0
  63. package/dist/components/alert-icon/icons/icon-14-warning-unack-b.js +12 -0
  64. package/dist/components/alert-icon/icons/icon-14-warning-unack-b.js.map +1 -0
  65. package/dist/components/alert-topbar-element/alert-topbar-element.d.ts +13 -0
  66. package/dist/components/alert-topbar-element/alert-topbar-element.d.ts.map +1 -1
  67. package/dist/components/alert-topbar-element/alert-topbar-element.js +10 -0
  68. package/dist/components/alert-topbar-element/alert-topbar-element.js.map +1 -1
  69. package/dist/components/button/button.css.js +2 -2
  70. package/dist/components/navigation-item/navigation-item.css.js +2 -1
  71. package/dist/components/navigation-item/navigation-item.css.js.map +1 -1
  72. package/dist/components/notification-button/notification-button.css.js +1 -1
  73. package/dist/components/rich-button/rich-button.css.js +192 -0
  74. package/dist/components/rich-button/rich-button.css.js.map +1 -0
  75. package/dist/components/rich-button/rich-button.d.ts +33 -0
  76. package/dist/components/rich-button/rich-button.d.ts.map +1 -0
  77. package/dist/components/rich-button/rich-button.js +118 -0
  78. package/dist/components/rich-button/rich-button.js.map +1 -0
  79. package/dist/components/vendor-button/vendor-button.css.js +48 -0
  80. package/dist/components/vendor-button/vendor-button.css.js.map +1 -0
  81. package/dist/components/vendor-button/vendor-button.d.ts +13 -0
  82. package/dist/components/vendor-button/vendor-button.d.ts.map +1 -0
  83. package/dist/components/vendor-button/vendor-button.js +42 -0
  84. package/dist/components/vendor-button/vendor-button.js.map +1 -0
  85. package/dist/icons/{icon-07-target-radar.d.ts → icon-01-content-copy.d.ts} +3 -3
  86. package/dist/icons/{icon-07-target-radar.d.ts.map → icon-01-content-copy.d.ts.map} +1 -1
  87. package/dist/icons/{icon-07-target-radar.js → icon-01-content-copy.js} +10 -10
  88. package/dist/icons/icon-01-content-copy.js.map +1 -0
  89. package/dist/icons/{icon-07-target-ias-selected.d.ts → icon-01-content-cut.d.ts} +3 -3
  90. package/dist/icons/icon-01-content-cut.d.ts.map +1 -0
  91. package/dist/icons/icon-01-content-cut.js +52 -0
  92. package/dist/icons/icon-01-content-cut.js.map +1 -0
  93. package/dist/icons/{icon-07-target-radar-selected.d.ts → icon-01-content-paste.d.ts} +3 -3
  94. package/dist/icons/icon-01-content-paste.d.ts.map +1 -0
  95. package/dist/icons/icon-01-content-paste.js +52 -0
  96. package/dist/icons/icon-01-content-paste.js.map +1 -0
  97. package/dist/icons/icon-02-dock-bottom.d.ts +14 -0
  98. package/dist/icons/icon-02-dock-bottom.d.ts.map +1 -0
  99. package/dist/icons/icon-02-dock-bottom.js +52 -0
  100. package/dist/icons/icon-02-dock-bottom.js.map +1 -0
  101. package/dist/icons/{icon-07-target-ias.d.ts → icon-02-dock-left.d.ts} +3 -3
  102. package/dist/icons/icon-02-dock-left.d.ts.map +1 -0
  103. package/dist/icons/{icon-07-target-ias.js → icon-02-dock-left.js} +10 -24
  104. package/dist/icons/icon-02-dock-left.js.map +1 -0
  105. package/dist/icons/icon-02-dock-right.d.ts +14 -0
  106. package/dist/icons/icon-02-dock-right.d.ts.map +1 -0
  107. package/dist/icons/icon-02-dock-right.js +52 -0
  108. package/dist/icons/icon-02-dock-right.js.map +1 -0
  109. package/dist/icons/icon-03-license.d.ts +14 -0
  110. package/dist/icons/icon-03-license.d.ts.map +1 -0
  111. package/dist/icons/icon-03-license.js +52 -0
  112. package/dist/icons/icon-03-license.js.map +1 -0
  113. package/dist/icons/icon-03-star-unchecked.js +1 -1
  114. package/dist/icons/icon-03-star-unchecked.js.map +1 -1
  115. package/dist/icons/icon-04-colorcalibrated.d.ts.map +1 -1
  116. package/dist/icons/icon-04-colorcalibrated.js +2 -14
  117. package/dist/icons/icon-04-colorcalibrated.js.map +1 -1
  118. package/dist/icons/icon-07-target-associated-ais-camera.d.ts +14 -0
  119. package/dist/icons/icon-07-target-associated-ais-camera.d.ts.map +1 -0
  120. package/dist/icons/icon-07-target-associated-ais-camera.js +54 -0
  121. package/dist/icons/icon-07-target-associated-ais-camera.js.map +1 -0
  122. package/dist/icons/icon-07-target-associated-camera-radar.d.ts +14 -0
  123. package/dist/icons/icon-07-target-associated-camera-radar.d.ts.map +1 -0
  124. package/dist/icons/icon-07-target-associated-camera-radar.js +52 -0
  125. package/dist/icons/icon-07-target-associated-camera-radar.js.map +1 -0
  126. package/dist/icons/icon-07-target-associated-radar-camera.d.ts +14 -0
  127. package/dist/icons/icon-07-target-associated-radar-camera.d.ts.map +1 -0
  128. package/dist/icons/icon-07-target-associated-radar-camera.js +54 -0
  129. package/dist/icons/icon-07-target-associated-radar-camera.js.map +1 -0
  130. package/dist/icons/icon-07-target-camera.d.ts +14 -0
  131. package/dist/icons/icon-07-target-camera.d.ts.map +1 -0
  132. package/dist/icons/icon-07-target-camera.js +52 -0
  133. package/dist/icons/icon-07-target-camera.js.map +1 -0
  134. package/dist/icons/icon-08-backward-fast.js +1 -1
  135. package/dist/icons/icon-08-backward-fast.js.map +1 -1
  136. package/dist/icons/icon-08-backward-stopped.js +1 -1
  137. package/dist/icons/icon-08-backward-stopped.js.map +1 -1
  138. package/dist/icons/icon-08-forward-fast.js +1 -1
  139. package/dist/icons/icon-08-forward-fast.js.map +1 -1
  140. package/dist/icons/icon-08-forward-stopped.js +1 -1
  141. package/dist/icons/icon-08-forward-stopped.js.map +1 -1
  142. package/dist/icons/icon-08-motor-off-horisontal.js +1 -1
  143. package/dist/icons/icon-08-motor-off-horisontal.js.map +1 -1
  144. package/dist/icons/icon-09-switch-horizontal-off-large.js +1 -1
  145. package/dist/icons/icon-09-switch-horizontal-off-large.js.map +1 -1
  146. package/dist/icons/icon-09-switch-horizontal-off.js +1 -1
  147. package/dist/icons/icon-09-switch-horizontal-off.js.map +1 -1
  148. package/dist/icons/icon-10-autonomous.js +3 -3
  149. package/dist/icons/icon-10-autonomous.js.map +1 -1
  150. package/dist/icons/icon-14-alert-rectified.js +1 -1
  151. package/dist/icons/icon-14-alert-rectified.js.map +1 -1
  152. package/dist/icons/icon-14-alertheader-aggregated-large.d.ts +14 -0
  153. package/dist/icons/icon-14-alertheader-aggregated-large.d.ts.map +1 -0
  154. package/dist/icons/icon-14-alertheader-aggregated-large.js +52 -0
  155. package/dist/icons/icon-14-alertheader-aggregated-large.js.map +1 -0
  156. package/dist/icons/icon-14-alertheader-group-large.d.ts +14 -0
  157. package/dist/icons/icon-14-alertheader-group-large.d.ts.map +1 -0
  158. package/dist/icons/icon-14-alertheader-group-large.js +54 -0
  159. package/dist/icons/icon-14-alertheader-group-large.js.map +1 -0
  160. package/dist/icons/icon-14-exclamationmark.js +4 -4
  161. package/dist/icons/icon-14-exclamationmark.js.map +1 -1
  162. package/dist/icons/icon-14-rectified.js +1 -1
  163. package/dist/icons/icon-14-rectified.js.map +1 -1
  164. package/dist/icons/icon-18-ais-anchored.js +4 -4
  165. package/dist/icons/icon-18-ais-anchored.js.map +1 -1
  166. package/dist/icons/icon-18-ais-notunderway.js +1 -1
  167. package/dist/icons/icon-18-ais-notunderway.js.map +1 -1
  168. package/dist/icons/icon-iec-02-ais-target-activated-selected.d.ts +14 -0
  169. package/dist/icons/icon-iec-02-ais-target-activated-selected.d.ts.map +1 -0
  170. package/dist/icons/icon-iec-02-ais-target-activated-selected.js +52 -0
  171. package/dist/icons/icon-iec-02-ais-target-activated-selected.js.map +1 -0
  172. package/dist/icons/icon-iec-02-ais-target-activated.d.ts +14 -0
  173. package/dist/icons/icon-iec-02-ais-target-activated.d.ts.map +1 -0
  174. package/dist/icons/icon-iec-02-ais-target-activated.js +52 -0
  175. package/dist/icons/icon-iec-02-ais-target-activated.js.map +1 -0
  176. package/dist/icons/icon-iec-02-associated-target-ais.d.ts +14 -0
  177. package/dist/icons/icon-iec-02-associated-target-ais.d.ts.map +1 -0
  178. package/dist/icons/icon-iec-02-associated-target-ais.js +52 -0
  179. package/dist/icons/icon-iec-02-associated-target-ais.js.map +1 -0
  180. package/dist/icons/icon-iec-02-associated-target-radar.d.ts +14 -0
  181. package/dist/icons/icon-iec-02-associated-target-radar.d.ts.map +1 -0
  182. package/dist/icons/icon-iec-02-associated-target-radar.js +52 -0
  183. package/dist/icons/icon-iec-02-associated-target-radar.js.map +1 -0
  184. package/dist/icons/icon-iec-02-radar-target-tracked-selected.d.ts +14 -0
  185. package/dist/icons/icon-iec-02-radar-target-tracked-selected.d.ts.map +1 -0
  186. package/dist/icons/icon-iec-02-radar-target-tracked-selected.js +60 -0
  187. package/dist/icons/icon-iec-02-radar-target-tracked-selected.js.map +1 -0
  188. package/dist/icons/icon-iec-02-radar-target-tracked.d.ts +14 -0
  189. package/dist/icons/icon-iec-02-radar-target-tracked.d.ts.map +1 -0
  190. package/dist/icons/icon-iec-02-radar-target-tracked.js +52 -0
  191. package/dist/icons/icon-iec-02-radar-target-tracked.js.map +1 -0
  192. package/dist/icons/index.d.ts +19 -4
  193. package/dist/icons/index.d.ts.map +1 -1
  194. package/dist/icons/index.js +19 -4
  195. package/dist/icons/index.js.map +1 -1
  196. package/dist/icons/names.d.ts.map +1 -1
  197. package/dist/icons/names.js +19 -4
  198. package/dist/icons/names.js.map +1 -1
  199. package/dist/navigation-instruments/thruster/thruster.d.ts +2 -1
  200. package/dist/navigation-instruments/thruster/thruster.d.ts.map +1 -1
  201. package/dist/navigation-instruments/thruster/thruster.js +45 -25
  202. package/dist/navigation-instruments/thruster/thruster.js.map +1 -1
  203. package/fix-generated.cjs +4 -0
  204. package/new-component.ts +7 -8
  205. package/package.json +7 -2
  206. package/script/convert-icons.ts +177 -0
  207. package/script/download-alert-icons.ts +180 -0
  208. package/script/download-icons.ts +7 -141
  209. package/src/components/alert-button/alert-button.css +1 -12
  210. package/src/components/alert-button/alert-button.stories.ts +2 -0
  211. package/src/components/alert-button/alert-button.ts +29 -4
  212. package/src/components/alert-icon/alert-icon.stories.ts +35 -0
  213. package/src/components/alert-icon/alert-icon.ts +75 -0
  214. package/src/components/alert-icon/icons/icon-14-alarm-silenced-a.ts +9 -0
  215. package/src/components/alert-icon/icons/icon-14-alarm-silenced-b.ts +16 -0
  216. package/src/components/alert-icon/icons/icon-14-alarm-unack-a.ts +8 -0
  217. package/src/components/alert-icon/icons/icon-14-alarm-unack-b.ts +15 -0
  218. package/src/components/alert-icon/icons/icon-14-warning-unack-a.ts +8 -0
  219. package/src/components/alert-icon/icons/icon-14-warning-unack-b.ts +8 -0
  220. package/src/components/alert-topbar-element/alert-topbar-element.stories.ts +4 -0
  221. package/src/components/alert-topbar-element/alert-topbar-element.ts +17 -0
  222. package/src/components/notification-message/notification-message.stories.ts +26 -10
  223. package/src/components/rich-button/rich-button.css +131 -0
  224. package/src/components/rich-button/rich-button.stories.ts +232 -0
  225. package/src/components/rich-button/rich-button.ts +97 -0
  226. package/src/components/vendor-button/vendor-button.css +10 -0
  227. package/src/components/vendor-button/vendor-button.stories.ts +19 -0
  228. package/src/components/vendor-button/vendor-button.ts +25 -0
  229. package/src/icons/icon-01-content-copy.ts +40 -0
  230. package/src/icons/icon-01-content-cut.ts +40 -0
  231. package/src/icons/icon-01-content-paste.ts +40 -0
  232. package/src/icons/icon-02-dock-bottom.ts +40 -0
  233. package/src/icons/icon-02-dock-left.ts +40 -0
  234. package/src/icons/icon-02-dock-right.ts +40 -0
  235. package/src/icons/icon-03-license.ts +40 -0
  236. package/src/icons/icon-03-star-unchecked.ts +1 -1
  237. package/src/icons/icon-04-colorcalibrated.ts +2 -14
  238. package/src/icons/icon-07-target-associated-ais-camera.ts +42 -0
  239. package/src/icons/icon-07-target-associated-camera-radar.ts +40 -0
  240. package/src/icons/icon-07-target-associated-radar-camera.ts +42 -0
  241. package/src/icons/icon-07-target-camera.ts +40 -0
  242. package/src/icons/icon-08-backward-fast.ts +1 -1
  243. package/src/icons/icon-08-backward-stopped.ts +1 -1
  244. package/src/icons/icon-08-forward-fast.ts +1 -1
  245. package/src/icons/icon-08-forward-stopped.ts +1 -1
  246. package/src/icons/icon-08-motor-off-horisontal.ts +1 -1
  247. package/src/icons/icon-09-switch-horizontal-off-large.ts +1 -1
  248. package/src/icons/icon-09-switch-horizontal-off.ts +1 -1
  249. package/src/icons/icon-10-autonomous.ts +3 -3
  250. package/src/icons/icon-14-alert-rectified.ts +1 -1
  251. package/src/icons/icon-14-alertheader-aggregated-large.ts +40 -0
  252. package/src/icons/icon-14-alertheader-group-large.ts +42 -0
  253. package/src/icons/icon-14-exclamationmark.ts +4 -4
  254. package/src/icons/icon-14-rectified.ts +1 -1
  255. package/src/icons/icon-18-ais-anchored.ts +4 -4
  256. package/src/icons/icon-18-ais-notunderway.ts +1 -1
  257. package/src/icons/icon-iec-02-ais-target-activated-selected.ts +40 -0
  258. package/src/icons/icon-iec-02-ais-target-activated.ts +40 -0
  259. package/src/icons/icon-iec-02-associated-target-ais.ts +40 -0
  260. package/src/icons/icon-iec-02-associated-target-radar.ts +40 -0
  261. package/src/icons/icon-iec-02-radar-target-tracked-selected.ts +48 -0
  262. package/src/icons/icon-iec-02-radar-target-tracked.ts +40 -0
  263. package/src/icons/index.ts +19 -4
  264. package/src/icons/names.ts +19 -4
  265. package/src/icons.stories.ts +78 -0
  266. package/src/navigation-instruments/thruster/thruster.stories.ts +18 -1
  267. package/src/navigation-instruments/thruster/thruster.ts +43 -27
  268. package/.yarnrc.yml +0 -1
  269. package/dist/icons/icon-07-target-ias-selected.d.ts.map +0 -1
  270. package/dist/icons/icon-07-target-ias-selected.js +0 -60
  271. package/dist/icons/icon-07-target-ias-selected.js.map +0 -1
  272. package/dist/icons/icon-07-target-ias.d.ts.map +0 -1
  273. package/dist/icons/icon-07-target-ias.js.map +0 -1
  274. package/dist/icons/icon-07-target-radar-selected.d.ts.map +0 -1
  275. package/dist/icons/icon-07-target-radar-selected.js +0 -60
  276. package/dist/icons/icon-07-target-radar-selected.js.map +0 -1
  277. package/dist/icons/icon-07-target-radar.js.map +0 -1
  278. package/src/icons/icon-07-target-ias-selected.ts +0 -48
  279. package/src/icons/icon-07-target-ias.ts +0 -54
  280. package/src/icons/icon-07-target-radar-selected.ts +0 -48
  281. package/src/icons/icon-07-target-radar.ts +0 -40
  282. package/test.svg +0 -3
@@ -13,18 +13,33 @@ import {classMap} from 'lit/directives/class-map.js';
13
13
  * Element that displays the alert in topbar
14
14
  * Use the element in the alerts slot in topbar
15
15
  *
16
+ * @prop {number} nAlerts - Number of alerts.
17
+ * @prop {AlertType} alertType - Type of alert.
18
+ * @prop {boolean} blinkAlarmValue - This value should alternate between true and false to make the icon blink.
19
+ * It should be synchronized with the blinkValue of other alarms.
20
+ * @prop {boolean} blinkWarningValue - This value should alternate between true and false to make the icon blink.
21
+ * @prop {boolean} showAck - If the ack button should be shown.
22
+ * @prop {boolean} alertMuted - If the alert is muted.
23
+ * @prop {boolean} minimized - If the alert is minimized.
24
+ * @prop {number} maxWidth - The maximum width of the alert.
25
+ *
16
26
  * @fires muteclick - Fired when the mute button is clicked
17
27
  * @fires ackclick - Fired when the ack button is clicked
18
28
  * @fires alertclick - Fired when the alert button is clicked
19
29
  * @fires messageclick - Fired when the message is clicked
20
30
  *
21
31
  * @slot - The message to display in the alert element of type `obc-notification-message-item`
32
+ * @slot empty - The message to display when there are no alerts
22
33
  */
23
34
  @customElement('obc-alert-topbar-element')
24
35
  export class ObcAlertTopbarElement extends LitElement {
25
36
  @property({type: Number, attribute: 'n-alerts'}) nAlerts = 0;
26
37
  @property({type: String, attribute: 'alert-type'}) alertType: AlertType =
27
38
  AlertType.None;
39
+ @property({type: Boolean, attribute: 'blink-alarm-value'}) blinkAlarmValue =
40
+ false;
41
+ @property({type: Boolean, attribute: 'blink-warning-value'})
42
+ blinkWarningValue = false;
28
43
  @property({type: Boolean, attribute: 'show-ack'}) showAck = false;
29
44
  @property({type: Boolean, attribute: 'alert-muted'}) alertMuted = false;
30
45
  @property({type: Boolean}) minimized = false;
@@ -92,6 +107,8 @@ export class ObcAlertTopbarElement extends LitElement {
92
107
  alert-type=${this.alertType}
93
108
  n-alerts=${this.nAlerts}
94
109
  ?counter=${!empty}
110
+ ?blink-alarm-value=${this.blinkAlarmValue}
111
+ ?blink-warning-value=${this.blinkWarningValue}
95
112
  @click=${() => this.dispatchEvent(new CustomEvent('alertclick'))}
96
113
  ></obc-alert-button>
97
114
  </div>
@@ -2,7 +2,7 @@ import type {Meta, StoryObj} from '@storybook/web-components';
2
2
  import {ObcNotificationMessage} from './notification-message';
3
3
  import './notification-message';
4
4
  import '../notification-message-item/notification-message-item';
5
- import '../../icons/icon-14-alarm-unack';
5
+ import '../alert-icon/alert-icon';
6
6
  import {html} from 'lit';
7
7
 
8
8
  const meta: Meta<typeof ObcNotificationMessage> = {
@@ -20,7 +20,11 @@ export const Primary: Story = {
20
20
  render: () => html`
21
21
  <obc-notification-message>
22
22
  <obc-notification-message-item time="2023-01-01T13:37:01+01:00">
23
- <obi-14-alarm-unack slot="icon" use-css-color></obi-14-alarm-unack>
23
+ <obc-alert-icon
24
+ slot="icon"
25
+ name="alarm-unack"
26
+ blink-value
27
+ ></obc-alert-icon>
24
28
  <div slot="message">This is a message</div>
25
29
  </obc-notification-message-item>
26
30
  <div slot="empty">No active alerts</div>
@@ -40,11 +44,19 @@ export const Large: Story = {
40
44
  render: () => html`
41
45
  <obc-notification-message large>
42
46
  <obc-notification-message-item time="2023-01-01T13:37:01+01:00">
43
- <obi-14-alarm-unack slot="icon" use-css-color></obi-14-alarm-unack>
47
+ <obc-alert-icon
48
+ slot="icon"
49
+ name="alarm-unack"
50
+ blink-value
51
+ ></obc-alert-icon>
44
52
  <div slot="message">This is a message</div>
45
53
  </obc-notification-message-item>
46
54
  <obc-notification-message-item time="2023-01-01T13:37:01+01:00">
47
- <obi-14-alarm-unack slot="icon" use-css-color></obi-14-alarm-unack>
55
+ <obc-alert-icon
56
+ slot="icon"
57
+ name="alarm-unack"
58
+ blink-value
59
+ ></obc-alert-icon>
48
60
  <div slot="message">This is a message</div>
49
61
  </obc-notification-message-item>
50
62
  <div slot="empty">No active alerts</div>
@@ -53,13 +65,17 @@ export const Large: Story = {
53
65
  };
54
66
 
55
67
  export const LargeSingleMessage: Story = {
56
- render: () => `
68
+ render: () => html`
57
69
  <obc-notification-message large>
58
- <obc-notification-message-item time="2023-01-01T13:37:01+01:00">
59
- <obi-14-alarm-unack slot="icon" use-css-color></obi-14-alarm-unack>
60
- <div slot="message">This is a message</div>
61
- </obc-notification-message-item>
62
- <div slot="empty">No active alerts</div>
70
+ <obc-notification-message-item time="2023-01-01T13:37:01+01:00">
71
+ <obc-alert-icon
72
+ slot="icon"
73
+ name="alarm-unack"
74
+ blink-value
75
+ ></obc-alert-icon>
76
+ <div slot="message">This is a message</div>
77
+ </obc-notification-message-item>
78
+ <div slot="empty">No active alerts</div>
63
79
  </obc-notification-message>
64
80
  `,
65
81
  };
@@ -0,0 +1,131 @@
1
+ * {
2
+ box-sizing: border-box;
3
+ }
4
+
5
+ .wrapper {
6
+ position: relative;
7
+ }
8
+
9
+ .wrapper:not(.info) {
10
+ background-color: var(--container-background-color);
11
+ box-shadow: var(--shadow-flat);
12
+ overflow: hidden;
13
+
14
+ &.top, &.regular {
15
+ border-top-left-radius: 6px;
16
+ border-top-right-radius: 6px;
17
+ }
18
+
19
+ &.bottom, &.regular {
20
+ border-bottom-left-radius: 6px;
21
+ border-bottom-right-radius: 6px;
22
+ }
23
+ }
24
+
25
+ button {
26
+ width: 100%;
27
+ appearance: none;
28
+ display: flex;
29
+ flex-direction: column;
30
+ text-align: left;
31
+ padding: 0;
32
+ border-width: 0 !important;
33
+ background-color: transparent;
34
+ }
35
+
36
+ .wrapper:not(.info) button {
37
+ @mixin style style=flat;
38
+ }
39
+
40
+ .top.border button, .center.border button {
41
+ border-bottom: 1px solid var(--border-outline-color) !important;
42
+ }
43
+
44
+ .bottom.border button{
45
+ border-top: 1px solid var(--border-outline-color) !important;
46
+ }
47
+
48
+ .container {
49
+ width: 100%;
50
+ display: flex;
51
+ align-items: center;
52
+ gap: 8px;
53
+ padding: 8px;
54
+ }
55
+
56
+ .wrapper.single-line .container {
57
+ padding-top: 4px;
58
+ padding-bottom: 4px;
59
+ }
60
+
61
+ .container-content {
62
+ display: flex;
63
+ align-items: center;
64
+ flex-grow: 1;
65
+ gap: 8px;
66
+ padding: 8px;
67
+ min-width: 0;
68
+ }
69
+
70
+ .content {
71
+ display: flex;
72
+ flex-direction: column;
73
+ min-width: 0;
74
+ }
75
+
76
+ .leading-icon {
77
+ display: block;
78
+ width: 32px;
79
+ height: 24px;
80
+ padding-right: 8px;
81
+ color: var(--element-neutral-color);
82
+ flex-shrink: 0;
83
+ flex-grow: 0;
84
+ }
85
+
86
+ .trailing-icon {
87
+ width: 40px;
88
+ height: 24px;
89
+ padding-left: 8px;
90
+ padding-right: 8px;
91
+ color: var(--element-neutral-color);
92
+ flex-shrink: 0;
93
+ flex-grow: 0;
94
+
95
+ }
96
+
97
+ ::slotted([slot="label"]) {
98
+ @mixin font-body;
99
+ color: var(--element-active-color);
100
+ }
101
+
102
+ ::slotted([slot="description"]) {
103
+ @mixin font-label;
104
+ color: var(--element-neutral-color);
105
+ }
106
+
107
+ .double-line ::slotted([slot="description"]) {
108
+ white-space: nowrap;
109
+ overflow: hidden;
110
+ text-overflow: ellipsis;
111
+ }
112
+
113
+ .status {
114
+ @mixin font-body;
115
+ color: var(--element-neutral-color);
116
+ }
117
+
118
+ .graphic {
119
+ width: 100%;
120
+ }
121
+
122
+ .graphic-border .graphic {
123
+ border-bottom: 1px solid var(--border-outline-color);
124
+ margin-bottom: -1px;
125
+ }
126
+
127
+ .info .graphic {
128
+ border-radius: 6px;
129
+ box-shadow: var(--shadow-flat);
130
+ overflow: hidden;
131
+ }
@@ -0,0 +1,232 @@
1
+ import type {Meta, StoryObj} from '@storybook/web-components';
2
+ import {ObcRichButton} from './rich-button';
3
+ import './rich-button';
4
+ import {html} from 'lit';
5
+ import '../../icons/icon-01-placeholder';
6
+ import '../../icons/icon-02-chevron-right';
7
+ import '../../icons/icon-01-print';
8
+ import '../../icons/icon-03-support';
9
+ import {spread} from '@open-wc/lit-helpers';
10
+
11
+ const meta: Meta<typeof ObcRichButton> = {
12
+ title: 'Button/Rich button',
13
+ tags: ['autodocs'],
14
+ component: 'obc-rich-button',
15
+ args: {
16
+ position: 'regular',
17
+ size: 'multi-line',
18
+ hasLeadingIcon: true,
19
+ hasTrailingIcon: true,
20
+ },
21
+ parameters: {
22
+ backgrounds: {
23
+ default: 'container-section-color',
24
+ },
25
+ },
26
+ argTypes: {
27
+ position: {
28
+ control: {type: 'select'},
29
+ options: ['regular', 'top', 'bottom', 'center'],
30
+ },
31
+ size: {
32
+ control: {type: 'select'},
33
+ options: ['single-line', 'double-line', 'multi-line'],
34
+ },
35
+ },
36
+ decorators: (story) => html`<div style="width: 400px;">${story()}</div>`,
37
+ render: (args) =>
38
+ html`<obc-rich-button
39
+ position=${args.position}
40
+ size=${args.size}
41
+ ?has-graphic=${args.hasGraphic}
42
+ ?has-leading-icon=${args.hasLeadingIcon}
43
+ ?has-trailing-icon=${args.hasTrailingIcon}
44
+ ?has-status=${args.hasStatus}
45
+ ?border=${args.border}
46
+ >
47
+ <obi-01-placeholder slot="leading-icon"></obi-01-placeholder>
48
+ <div slot="label">Title</div>
49
+ <div slot="description">
50
+ Description with multiple lines of text and more than one line of
51
+ description
52
+ </div>
53
+ <obi-02-chevron-right slot="trailing-icon"></obi-02-chevron-right>
54
+ </obc-rich-button> `,
55
+ } satisfies Meta<ObcRichButton>;
56
+
57
+ export default meta;
58
+ type Story = StoryObj<ObcRichButton>;
59
+
60
+ export const Regular: Story = {};
61
+
62
+ export const RegularNoIcons: Story = {
63
+ args: {
64
+ hasLeadingIcon: false,
65
+ hasTrailingIcon: false,
66
+ },
67
+ };
68
+
69
+ export const Top: Story = {
70
+ args: {
71
+ position: 'top',
72
+ },
73
+ };
74
+
75
+ export const TopWithBoarder: Story = {
76
+ args: {
77
+ position: 'top',
78
+ border: true,
79
+ },
80
+ };
81
+
82
+ export const Bottom: Story = {
83
+ args: {
84
+ position: 'bottom',
85
+ },
86
+ };
87
+
88
+ export const BottomWithBoarder: Story = {
89
+ args: {
90
+ position: 'bottom',
91
+ border: true,
92
+ },
93
+ };
94
+
95
+ export const Center: Story = {
96
+ args: {
97
+ position: 'center',
98
+ },
99
+ };
100
+
101
+ export const SingleLine: Story = {
102
+ args: {
103
+ size: 'single-line',
104
+ },
105
+ };
106
+
107
+ export const DoubleLine: Story = {
108
+ args: {
109
+ size: 'double-line',
110
+ },
111
+ };
112
+
113
+ export const MultiLine: Story = {
114
+ args: {
115
+ size: 'multi-line',
116
+ },
117
+ };
118
+
119
+ export const WithStatus: Story = {
120
+ args: {
121
+ size: 'double-line',
122
+ hasStatus: true,
123
+ hasLeadingIcon: true,
124
+ hasTrailingIcon: true,
125
+ },
126
+ render: (args) =>
127
+ html`<obc-rich-button ${spread(args)}>
128
+ <obi-01-placeholder slot="leading-icon"></obi-01-placeholder>
129
+ <div slot="label">Title</div>
130
+ <div slot="status">Status</div>
131
+ <obi-02-chevron-right slot="trailing-icon"></obi-02-chevron-right>
132
+ </obc-rich-button> `,
133
+ };
134
+
135
+ export const WithGraphic: Story = {
136
+ args: {
137
+ size: 'double-line',
138
+ hasStatus: true,
139
+ hasLeadingIcon: true,
140
+ hasTrailingIcon: true,
141
+ hasGraphic: true,
142
+ graphicBorder: false,
143
+ },
144
+ render: (args) =>
145
+ html`<obc-rich-button
146
+ position=${args.position}
147
+ size=${args.size}
148
+ ?has-graphic=${args.hasGraphic}
149
+ ?has-leading-icon=${args.hasLeadingIcon}
150
+ ?has-trailing-icon=${args.hasTrailingIcon}
151
+ ?has-status=${args.hasStatus}
152
+ ?graphic-border=${args.graphicBorder}
153
+ >
154
+ <div
155
+ slot="graphic"
156
+ style="width: 100%; height: 120px; color: var(--element-neutral-color); padding-top: 40px; padding-bottom: 32px"
157
+ >
158
+ <obi-01-print></obi-01-print>
159
+ </div>
160
+ <obi-01-placeholder slot="leading-icon"></obi-01-placeholder>
161
+ <div slot="label">Title</div>
162
+ <div slot="status">Status</div>
163
+ <obi-02-chevron-right slot="trailing-icon"></obi-02-chevron-right>
164
+ </obc-rich-button> `,
165
+ };
166
+
167
+ export const WithGraphicBorder: Story = {
168
+ args: {
169
+ size: 'double-line',
170
+ hasStatus: true,
171
+ hasLeadingIcon: true,
172
+ hasTrailingIcon: true,
173
+ hasGraphic: true,
174
+ graphicBorder: true,
175
+ },
176
+ render: (args) =>
177
+ html`<obc-rich-button
178
+ position=${args.position}
179
+ size=${args.size}
180
+ ?has-graphic=${args.hasGraphic}
181
+ ?has-leading-icon=${args.hasLeadingIcon}
182
+ ?has-trailing-icon=${args.hasTrailingIcon}
183
+ ?has-status=${args.hasStatus}
184
+ ?graphic-border=${args.graphicBorder}
185
+ >
186
+ <div
187
+ slot="graphic"
188
+ style="width: 100%; height: 120px; color: var(--element-neutral-color); padding-top: 40px; padding-bottom: 32px"
189
+ >
190
+ <obi-01-print></obi-01-print>
191
+ </div>
192
+ <obi-01-placeholder slot="leading-icon"></obi-01-placeholder>
193
+ <div slot="label">Title</div>
194
+ <div slot="status">Status</div>
195
+ <obi-02-chevron-right slot="trailing-icon"></obi-02-chevron-right>
196
+ </obc-rich-button> `,
197
+ };
198
+
199
+ export const WithGraphicInfo: Story = {
200
+ args: {
201
+ size: 'multi-line',
202
+ hasLeadingIcon: false,
203
+ hasTrailingIcon: false,
204
+ hasGraphic: true,
205
+ graphicBorder: false,
206
+ info: true,
207
+ },
208
+ render: (args) =>
209
+ html`<obc-rich-button
210
+ position=${args.position}
211
+ size=${args.size}
212
+ ?has-graphic=${args.hasGraphic}
213
+ ?has-leading-icon=${args.hasLeadingIcon}
214
+ ?has-trailing-icon=${args.hasTrailingIcon}
215
+ ?graphic-border=${args.graphicBorder}
216
+ ?info=${args.info}
217
+ >
218
+ <div
219
+ slot="graphic"
220
+ style="width: 100%; height: 120px; color: var(--element-active-inverted-color); background: var(--instrument-enhanced-secondary-color); padding-top: 40px; padding-bottom: 32px"
221
+ >
222
+ <obi-03-support></obi-03-support>
223
+ </div>
224
+ <obi-01-placeholder slot="leading-icon"></obi-01-placeholder>
225
+ <div slot="label">Title</div>
226
+ <div slot="description">
227
+ A long description, with a text spanning over multiple lines. Lorem
228
+ ipsum dolor sit amet, consectetur adipiscing elit.
229
+ </div>
230
+ <obi-02-chevron-right slot="trailing-icon"></obi-02-chevron-right>
231
+ </obc-rich-button> `,
232
+ };
@@ -0,0 +1,97 @@
1
+ import {LitElement, html, nothing, unsafeCSS} from 'lit';
2
+ import {customElement, property} from 'lit/decorators.js';
3
+ import compentStyle from './rich-button.css?inline';
4
+ import {classMap} from 'lit/directives/class-map.js';
5
+
6
+ export enum ObcRichButtonPosition {
7
+ Regular = 'regular',
8
+ Top = 'top',
9
+ Bottom = 'bottom',
10
+ Center = 'center',
11
+ }
12
+ export type ObcRichButtonPositionType = 'regular' | 'top' | 'bottom' | 'center';
13
+
14
+ export enum ObcRichButtonSize {
15
+ SingleLine = 'single-line',
16
+ DoubleLine = 'double-line',
17
+ MultiLine = 'multi-line',
18
+ }
19
+ export type ObcRichButtonSizeType =
20
+ | 'single-line'
21
+ | 'double-line'
22
+ | 'multi-line';
23
+
24
+ @customElement('obc-rich-button')
25
+ export class ObcRichButton extends LitElement {
26
+ @property({type: String}) position: ObcRichButtonPositionType =
27
+ ObcRichButtonPosition.Regular;
28
+ @property({type: String}) size: ObcRichButtonSizeType =
29
+ ObcRichButtonSize.SingleLine;
30
+ @property({type: Boolean}) info = false;
31
+ @property({type: Boolean, attribute: 'has-leading-icon'}) hasLeadingIcon =
32
+ false;
33
+ @property({type: Boolean, attribute: 'has-trailing-icon'}) hasTrailingIcon =
34
+ false;
35
+ @property({type: Boolean, attribute: 'has-status'}) hasStatus = false;
36
+ @property({type: Boolean, attribute: 'has-graphic'}) hasGraphic = false;
37
+ @property({type: Boolean, attribute: 'graphic-border'}) graphicBorder = false;
38
+ @property({type: Boolean}) border = false;
39
+
40
+ override render() {
41
+ return html`
42
+ <div
43
+ class=${classMap({
44
+ wrapper: true,
45
+ [this.position]: true,
46
+ [this.size]: true,
47
+ 'graphic-border': this.graphicBorder,
48
+ info: this.info,
49
+ border: this.border,
50
+ })}
51
+ >
52
+ <button>
53
+ ${this.hasGraphic
54
+ ? html`<div class="graphic"><slot name="graphic"></slot></div>`
55
+ : nothing}
56
+ <div class="container">
57
+ <div class="container-content">
58
+ ${this.hasLeadingIcon
59
+ ? html`<div class="leading-icon">
60
+ <slot name="leading-icon"></slot>
61
+ </div>`
62
+ : nothing}
63
+ <div class="content">
64
+ <slot name="label"></slot>
65
+ ${this.size === ObcRichButtonSize.SingleLine
66
+ ? nothing
67
+ : html`<slot name="description"></slot>`}
68
+ </div>
69
+ </div>
70
+ ${this.hasStatus
71
+ ? html`
72
+ <div class="status">
73
+ <slot name="status"></slot>
74
+ </div>
75
+ `
76
+ : nothing}
77
+ ${this.hasTrailingIcon
78
+ ? html`
79
+ <div class="trailing-icon">
80
+ <slot name="trailing-icon"></slot>
81
+ </div>
82
+ `
83
+ : nothing}
84
+ </div>
85
+ </button>
86
+ </div>
87
+ `;
88
+ }
89
+
90
+ static override styles = unsafeCSS(compentStyle);
91
+ }
92
+
93
+ declare global {
94
+ interface HTMLElementTagNameMap {
95
+ 'obc-rich-button': ObcRichButton;
96
+ }
97
+ }
@@ -0,0 +1,10 @@
1
+ .wrapper {
2
+ width: 100%;
3
+ @mixin style style=flat;
4
+ @mixin outline-inward;
5
+
6
+ & img {
7
+ width: 100%;
8
+ height: 100%;
9
+ }
10
+ }
@@ -0,0 +1,19 @@
1
+ import type {Meta, StoryObj} from '@storybook/web-components';
2
+ import {ObcVendorButton} from './vendor-button';
3
+ import './vendor-button';
4
+ import {html} from 'lit';
5
+
6
+ const meta: Meta<typeof ObcVendorButton> = {
7
+ title: 'Button/Vendor button',
8
+ tags: ['autodocs'],
9
+ component: 'obc-vendor-button',
10
+ args: {
11
+ imageSrc: 'https://openbridge-demo.web.app/companylogo-day.png',
12
+ },
13
+ decorators: [(story) => html`<div style="width:300px">${story()}</div>`],
14
+ } satisfies Meta<ObcVendorButton>;
15
+
16
+ export default meta;
17
+ type Story = StoryObj<ObcVendorButton>;
18
+
19
+ export const Primary: Story = {};
@@ -0,0 +1,25 @@
1
+ import {LitElement, html, unsafeCSS} from 'lit';
2
+ import {customElement, property} from 'lit/decorators.js';
3
+ import compentStyle from './vendor-button.css?inline';
4
+
5
+ @customElement('obc-vendor-button')
6
+ export class ObcVendorButton extends LitElement {
7
+ @property({type: String, attribute: 'image-src'}) imageSrc = '';
8
+ @property({type: String}) alt = 'logo';
9
+
10
+ override render() {
11
+ return html`
12
+ <button class="wrapper">
13
+ <img src=${this.imageSrc} alt=${this.alt} />
14
+ </button>
15
+ `;
16
+ }
17
+
18
+ static override styles = unsafeCSS(compentStyle);
19
+ }
20
+
21
+ declare global {
22
+ interface HTMLElementTagNameMap {
23
+ 'obc-vendor-button': ObcVendorButton;
24
+ }
25
+ }
@@ -0,0 +1,40 @@
1
+ import {LitElement, html, css, svg} from 'lit';
2
+ import {customElement, property} from 'lit/decorators.js';
3
+
4
+ @customElement('obi-01-content-copy')
5
+ export class Obi01ContentCopy extends LitElement {
6
+ @property({type: Boolean, attribute: 'use-css-color'}) useCssColor = false;
7
+
8
+ private icon = svg`<svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
9
+ <path d="M9 18C8.45 18 7.97917 17.8042 7.5875 17.4125C7.19583 17.0208 7 16.55 7 16V4C7 3.45 7.19583 2.97917 7.5875 2.5875C7.97917 2.19583 8.45 2 9 2H18C18.55 2 19.0208 2.19583 19.4125 2.5875C19.8042 2.97917 20 3.45 20 4V16C20 16.55 19.8042 17.0208 19.4125 17.4125C19.0208 17.8042 18.55 18 18 18H9ZM9 16H18V4H9V16ZM5 22C4.45 22 3.97917 21.8042 3.5875 21.4125C3.19583 21.0208 3 20.55 3 20V6H5V20H16V22H5Z" fill="currentColor"/>
10
+ </svg>
11
+ `;
12
+
13
+ private iconCss = svg`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
14
+ <path d="M9 18C8.45 18 7.97917 17.8042 7.5875 17.4125C7.19583 17.0208 7 16.55 7 16V4C7 3.45 7.19583 2.97917 7.5875 2.5875C7.97917 2.19583 8.45 2 9 2H18C18.55 2 19.0208 2.19583 19.4125 2.5875C19.8042 2.97917 20 3.45 20 4V16C20 16.55 19.8042 17.0208 19.4125 17.4125C19.0208 17.8042 18.55 18 18 18H9ZM9 16H18V4H9V16ZM5 22C4.45 22 3.97917 21.8042 3.5875 21.4125C3.19583 21.0208 3 20.55 3 20V6H5V20H16V22H5Z" style="fill: var(--element-active-color)"/>
15
+ </svg>
16
+ `;
17
+
18
+ override render() {
19
+ return html`
20
+ <div class="wrapper">${this.useCssColor ? this.iconCss : this.icon}</div>
21
+ `;
22
+ }
23
+
24
+ static override styles = css`
25
+ .wrapper {
26
+ height: 100%;
27
+ width: 100%;
28
+ }
29
+ .wrapper > * {
30
+ height: 100%;
31
+ width: 100%;
32
+ }
33
+ `;
34
+ }
35
+
36
+ declare global {
37
+ interface HTMLElementTagNameMap {
38
+ 'obi-01-content-copy': Obi01ContentCopy;
39
+ }
40
+ }