@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
@@ -0,0 +1,180 @@
1
+ import * as Figma from 'figma-api';
2
+ import * as dotenv from 'dotenv';
3
+ import * as fs from 'fs';
4
+ import {GetFileResult} from 'figma-api/lib/api-types';
5
+ import {
6
+ IconRef,
7
+ getCssColorIcon,
8
+ getStylesForNode,
9
+ kebabToUpperCamelCase,
10
+ } from './convert-icons';
11
+
12
+ dotenv.config();
13
+
14
+ const documentId = 'TPoHGyeEtlcpnNekOa4lY3';
15
+
16
+ const useCache = false;
17
+
18
+ const iconMapUrl: {url: string; name: string; typeA: boolean}[] = [
19
+ {
20
+ url: 'https://www.figma.com/file/TPoHGyeEtlcpnNekOa4lY3/OpenBridge-CAM?type=design&node-id=850-47442&mode=design&t=QA1ohadrbRZxW1ss-4',
21
+ name: '14-alarm-unack',
22
+ typeA: true,
23
+ },
24
+ {
25
+ url: 'https://www.figma.com/file/TPoHGyeEtlcpnNekOa4lY3/OpenBridge-CAM?type=design&node-id=850-47508&mode=design&t=QA1ohadrbRZxW1ss-4',
26
+ name: '14-alarm-unack',
27
+ typeA: false,
28
+ },
29
+ {
30
+ url: 'https://www.figma.com/file/TPoHGyeEtlcpnNekOa4lY3/OpenBridge-CAM?type=design&node-id=850-47481&mode=design&t=QA1ohadrbRZxW1ss-4',
31
+ name: '14-alarm-silenced',
32
+ typeA: true,
33
+ },
34
+ {
35
+ url: 'https://www.figma.com/file/TPoHGyeEtlcpnNekOa4lY3/OpenBridge-CAM?type=design&node-id=850-47505&mode=design&t=QA1ohadrbRZxW1ss-4',
36
+ name: '14-alarm-silenced',
37
+ typeA: false,
38
+ },
39
+ {
40
+ url: 'https://www.figma.com/file/TPoHGyeEtlcpnNekOa4lY3/OpenBridge-CAM?type=design&node-id=850-47445&mode=design&t=QA1ohadrbRZxW1ss-4',
41
+ name: '14-warning-unack',
42
+ typeA: true,
43
+ },
44
+ {
45
+ url: 'https://www.figma.com/file/TPoHGyeEtlcpnNekOa4lY3/OpenBridge-CAM?type=design&node-id=850-47475&mode=design&t=QA1ohadrbRZxW1ss-4',
46
+ name: '14-warning-unack',
47
+ typeA: false,
48
+ },
49
+ ];
50
+
51
+ const iconMap: {id: string; name: string; typeA: boolean}[] = iconMapUrl.map(
52
+ (icon) => {
53
+ let id = icon.url.match(/node-id=([0-9/-]+)/)![1];
54
+ // replace - with :
55
+ id = id.replace(/-/g, ':');
56
+ return {id, name: icon.name, typeA: icon.typeA};
57
+ }
58
+ );
59
+
60
+ const iconDir = './src/components/alert-icon/icons';
61
+
62
+ export async function main() {
63
+ // delete all icons
64
+
65
+ if (fs.existsSync(iconDir)) {
66
+ const files = fs.readdirSync(iconDir);
67
+ for (const file of files) {
68
+ fs.unlinkSync(`${iconDir}/${file}`);
69
+ }
70
+ } else {
71
+ fs.mkdirSync(iconDir);
72
+ }
73
+
74
+ const api = new Figma.Api({
75
+ personalAccessToken: process.env.FIGMA_TOKEN as string,
76
+ });
77
+
78
+ const cachepath = './script/.cache-figma-alert.json';
79
+ let file: GetFileResult;
80
+ if (fs.existsSync(cachepath) && useCache) {
81
+ file = JSON.parse(fs.readFileSync(cachepath, 'utf8'));
82
+ } else {
83
+ file = await api.getFile(documentId, {ids: ['850:47441']});
84
+ // save to cache
85
+ fs.writeFileSync(cachepath, JSON.stringify(file, null, 2));
86
+ }
87
+ console.log('Got page');
88
+ const page = file.document.children.find(
89
+ (p) => p.name === 'Icons'
90
+ ) as Figma.Node<'CANVAS'>;
91
+ const frames = page.children.filter(
92
+ (child) => child.name === 'Frame 3'
93
+ ) as Figma.Node<'FRAME'>[];
94
+ const styles = file.styles;
95
+
96
+ const knownIds = iconMap.map((icon) => icon.id);
97
+ let icons = frames.flatMap((frame): IconRef[] => {
98
+ return frame.children
99
+ .filter((child) => knownIds.includes(child.id))
100
+ .map((child) => {
101
+ const icon = iconMap.find((icon) => icon.id === child.id);
102
+ const name = icon!.name + (icon!.typeA ? '-a' : '-b');
103
+ const javascriptName = 'svg' + kebabToUpperCamelCase(name);
104
+ return {
105
+ name: name,
106
+ id: child.id,
107
+ javascriptName: javascriptName,
108
+ styles: getStylesForNode(child, styles),
109
+ };
110
+ });
111
+ });
112
+
113
+ // remove duplicate icon names
114
+ const seen = new Set();
115
+ icons = icons.filter((icon) => {
116
+ const duplicate = seen.has(icon.javascriptName);
117
+ seen.add(icon.javascriptName);
118
+ if (duplicate) {
119
+ console.log('Duplicate icon name', icon.name);
120
+ }
121
+ return !duplicate;
122
+ });
123
+
124
+ // download all icons
125
+ if (!useCache) {
126
+ const split = 50;
127
+ for (let i = 0; i < icons.length; i += split) {
128
+ console.log('Got images', i);
129
+ const iconChunks = icons.slice(i, i + split);
130
+ const images = await api.getImage(documentId, {
131
+ ids: iconChunks.map((icon) => icon.id).join(','),
132
+ scale: 1,
133
+ format: 'svg',
134
+ });
135
+
136
+ // write icons to disk
137
+ await Promise.all(
138
+ Object.keys(images.images).map(async (nodeId) => {
139
+ const icon = icons.find((icon) => icon.id === nodeId);
140
+ const imageUrl = images.images[nodeId];
141
+ if (icon && imageUrl) {
142
+ // download icons
143
+ const request = await fetch(imageUrl);
144
+ const imageData = await request.text();
145
+ fs.writeFileSync(
146
+ `./script/.cache/alert-icons/${icon.name}.svg`,
147
+ imageData
148
+ );
149
+ }
150
+ })
151
+ );
152
+ }
153
+ }
154
+
155
+ const fileImport: string[] = [];
156
+ for (const icon of icons) {
157
+ const imageData = fs.readFileSync(
158
+ `./script/.cache/alert-icons/${icon.name}.svg`,
159
+ 'utf8'
160
+ );
161
+ const cssColorIcon = getCssColorIcon(imageData, icon);
162
+
163
+ // convert icon.name from kebab case to upper cammel case
164
+ const name = icon.name.toLowerCase();
165
+
166
+ const component = `import {svg} from 'lit';
167
+ export const ${icon.javascriptName} = svg\`${cssColorIcon}\`;
168
+ `;
169
+ fs.writeFileSync(`${iconDir}/icon-${name}.ts`, component);
170
+ fileImport.push(
171
+ `import {${icon.javascriptName}} from './icons/icon-${name}';`
172
+ );
173
+ }
174
+
175
+ fileImport.sort();
176
+ console.log(fileImport.join('\n'));
177
+ console.log('done');
178
+ }
179
+
180
+ main();
@@ -2,6 +2,12 @@ import * as Figma from 'figma-api';
2
2
  import * as dotenv from 'dotenv';
3
3
  import * as fs from 'fs';
4
4
  import {GetFileResult} from 'figma-api/lib/api-types';
5
+ import {
6
+ getCssColorIcon,
7
+ getSingleColorIcon,
8
+ getStylesForNode,
9
+ kebabToUpperCamelCase,
10
+ } from './convert-icons';
5
11
 
6
12
  dotenv.config();
7
13
 
@@ -141,7 +147,7 @@ export class Obi${upperCammelCaseName} extends LitElement {
141
147
  \`;
142
148
  }
143
149
 
144
- static override styles = unsafeCSS(css)\`
150
+ static override styles = css\`
145
151
  .wrapper {
146
152
  height: 100%;
147
153
  width: 100%;
@@ -175,144 +181,4 @@ declare global {
175
181
  console.log('done');
176
182
  }
177
183
 
178
- function getSingleColorIcon(imageData: string, icon: IconRef): string {
179
- // replace fill color with currentColor
180
- const fillRegex = /fill="[^"]+"/g;
181
- const replace = 'fill="currentColor"';
182
- let imageDataNew = imageData.replace(fillRegex, replace);
183
-
184
- // remove fillOpacity
185
- const fillOpacityRegex = /fill-opacity="[^"]+"/g;
186
- imageDataNew = imageDataNew.replace(fillOpacityRegex, '');
187
-
188
- return imageDataNew;
189
- }
190
-
191
- function getCssColorIcon(imageData: string, icon: IconRef): string {
192
- // replace fill color with currentColor
193
- const fillRegex = /fill="([^"]+)"/g;
194
-
195
- const replace = (match: string, color: string) => {
196
- const cssClass = icon.styles[color];
197
- if (cssClass === undefined) {
198
- if (color === 'black') return 'fill="currentColor"';
199
- if (color === 'none') return 'fill="none"';
200
- if (color === 'white') return 'fill="none"';
201
- console.warn(
202
- 'No css class for color',
203
- color,
204
- icon.name,
205
- Object.keys(icon.styles)
206
- );
207
- return 'fill="currentColor"';
208
- }
209
- return `style="fill: var(--${cssClass.cssClass})"`;
210
- };
211
- imageData = imageData.replace(fillRegex, replace);
212
-
213
- // remove fillOpacity
214
- const fillOpacityRegex = /fill-opacity="[^"]+"/g;
215
- imageData = imageData.replace(fillOpacityRegex, '');
216
-
217
- return imageData;
218
- }
219
-
220
- function kebabToUpperCamelCase(kebabCase: string): string {
221
- const words = kebabCase.replace(/ /g, '').split('-');
222
- const upperCamelCase = words
223
- .map((word) => word.charAt(0).toUpperCase() + word.slice(1))
224
- .join('');
225
- return upperCamelCase;
226
- }
227
-
228
- function getStylesForNode(
229
- node: Figma.Node,
230
- styles: {[styleId: string]: Figma.Style}
231
- ): {[colorCode: string]: {cssClass: string}} {
232
- let out = {};
233
-
234
- if ('children' in node) {
235
- for (const child of node.children) {
236
- out = {...out, ...getStylesForNode(child, styles)};
237
- if ('fills' in child && 'styles' in child) {
238
- let fils: string | undefined;
239
- child.fills.forEach((fill) => {
240
- if (fill.type === 'SOLID') {
241
- if (fils !== undefined) {
242
- console.warn(
243
- 'Multiple fills',
244
- fils,
245
- rgbaToHexOrColorName(fill.color!)
246
- );
247
- }
248
- fils = rgbaToHexOrColorName(fill.color!);
249
- }
250
- });
251
- if (fils !== undefined && child.styles && 'fill' in child.styles) {
252
- const styleId = child.styles.fill as string;
253
- const figmaStyle = styles[styleId];
254
- const cssClass = styleToCssClass(figmaStyle);
255
- out[fils] = {cssClass: cssClass};
256
- }
257
- }
258
- if ('strokes' in child && 'styles' in child) {
259
- let strokes: string;
260
- child.strokes.forEach((fill) => {
261
- if (fill.type === 'SOLID') {
262
- if (strokes !== undefined) {
263
- console.warn(
264
- 'Multiple strokes',
265
- strokes,
266
- rgbaToHexOrColorName(fill.color!)
267
- );
268
- }
269
- strokes = rgbaToHexOrColorName(fill.color!);
270
- }
271
- });
272
- if (strokes !== undefined && child.styles?.stroke) {
273
- const styleId = child.styles.stroke;
274
- const figmaStyle = styles[styleId];
275
- const cssClass = styleToCssClass(figmaStyle);
276
- out[strokes] = {cssClass: cssClass};
277
- }
278
- }
279
- if ('fillOverrideTable' in child) {
280
- for (const fill of Object.values(child.fillOverrideTable)) {
281
- if (fill === null) continue;
282
- if (!('inheritFillStyleId' in fill)) continue;
283
- const styleId = fill.inheritFillStyleId;
284
- const figmaStyle = styles[styleId];
285
- const color = rgbaToHexOrColorName(fill.fills[0].color!);
286
- const cssClass = styleToCssClass(figmaStyle);
287
- out[color] = {cssClass: cssClass};
288
- }
289
- }
290
- }
291
- }
292
- return out;
293
- }
294
-
295
- function decimalToHex(d: number): string {
296
- const v = Math.round(d * 255).toString(16);
297
- return v.length === 1 ? `0${v}` : v;
298
- }
299
-
300
- function rgbaToHexOrColorName(rgba: Figma.Color): string {
301
- const isBlack = rgba.r === 0 && rgba.g === 0 && rgba.b === 0 && rgba.a === 1;
302
- const isWhite = rgba.r === 1 && rgba.g === 1 && rgba.b === 1 && rgba.a === 1;
303
- if (isBlack) {
304
- return 'black';
305
- } else if (isWhite) {
306
- return 'white';
307
- } else {
308
- return `#${decimalToHex(rgba.r)}${decimalToHex(rgba.g)}${decimalToHex(
309
- rgba.b
310
- )}`.toUpperCase();
311
- }
312
- }
313
-
314
- function styleToCssClass(style: Figma.Style): string {
315
- return style.name.replace(/[\/ ]/g, '-').toLocaleLowerCase();
316
- }
317
-
318
184
  main();
@@ -32,10 +32,6 @@
32
32
  }
33
33
  }
34
34
 
35
- & .badge {
36
- color: var(--on-normal-active-color, #1A1A1A);
37
- }
38
-
39
35
  & .icon {
40
36
  height: 24px;
41
37
  width: 24px;
@@ -63,14 +59,7 @@
63
59
 
64
60
  &.type-alarm {
65
61
  @mixin style style=alarm visibleWrapperClass=.visible-wrapper;
66
-
67
- & .visible-wrapper {
68
- color: var(--on-alarm-active-color, #FFF);
69
-
70
- & .badge {
71
- color: var(--on-alarm-active-color, #FFF);
72
- }
73
- }
62
+ color: var(--on-alarm-active-color);
74
63
  }
75
64
 
76
65
  &.type-warning {
@@ -11,6 +11,8 @@ const meta: Meta<typeof ObcAlertButton> = {
11
11
  nAlerts: 2,
12
12
  counter: true,
13
13
  standalone: false,
14
+ blinkAlarmValue: true,
15
+ blinkWarningValue: true,
14
16
  },
15
17
  argTypes: {
16
18
  nAlerts: {
@@ -3,9 +3,18 @@ import {customElement, property} from 'lit/decorators.js';
3
3
  import compentStyle from './alert-button.css?inline';
4
4
  import '../../icons/icon-14-alerts';
5
5
  import {AlertType} from '../../types';
6
+ import {classMap} from 'lit/directives/class-map.js';
6
7
 
7
8
  /**
8
- * Represents an alert button component.
9
+ * Button used for alerts and notification
10
+ *
11
+ * @prop {number} nAlerts - Number of alerts.
12
+ * @prop {AlertType} alertType - Type of alert.
13
+ * @prop {boolean} standalone - If the button is standalone and not used together with an notification-message.
14
+ * @prop {boolean} counter - If the button should display a counter.
15
+ * @prop {boolean} blinkAlarmValue - This value should alternate between true and false to make the icon blink.
16
+ * It should be synchronized with the blinkValue of other alarms.
17
+ * @prop {boolean} blinkWarningValue - This value should alternate between true and false to make the icon blink.
9
18
  *
10
19
  * @fires click - Fires when the button is clicked.
11
20
  */
@@ -15,13 +24,29 @@ export class ObcAlertButton extends LitElement {
15
24
  @property({type: String, attribute: 'alert-type'}) alertType = AlertType.None;
16
25
  @property({type: Boolean}) standalone = false;
17
26
  @property({type: Boolean}) counter = false;
27
+ @property({type: Boolean, attribute: 'blink-alarm-value'}) blinkAlarmValue =
28
+ false;
29
+ @property({type: Boolean, attribute: 'blink-warning-value'})
30
+ blinkWarningValue = false;
18
31
 
19
32
  override render() {
33
+ let alertType = this.alertType;
34
+ if (this.alertType === AlertType.Alarm && !this.blinkAlarmValue) {
35
+ alertType = AlertType.None;
36
+ } else if (
37
+ this.alertType === AlertType.Warning &&
38
+ !this.blinkWarningValue
39
+ ) {
40
+ alertType = AlertType.None;
41
+ }
20
42
  return html`
21
43
  <button
22
- class="wrapper type-${this.alertType} ${this.counter
23
- ? 'counter'
24
- : null} ${this.standalone ? 'standalone' : null}"
44
+ class=${classMap({
45
+ wrapper: true,
46
+ [`type-${alertType}`]: true,
47
+ counter: this.counter,
48
+ standalone: this.standalone,
49
+ })}
25
50
  >
26
51
  <div class="visible-wrapper">
27
52
  <obi-14-alerts class="icon"></obi-14-alerts>
@@ -0,0 +1,35 @@
1
+ import type {Meta, StoryObj} from '@storybook/web-components';
2
+ import {ObcAlertIcon, AlertIconNames} from './alert-icon';
3
+ import './alert-icon';
4
+ import {html} from 'lit';
5
+
6
+ const meta: Meta<typeof ObcAlertIcon> = {
7
+ title: 'Alert/Icon',
8
+ tags: ['autodocs'],
9
+ component: 'obc-alert-icon',
10
+ args: {
11
+ name: 'alarm-unack',
12
+ blinkValue: true,
13
+ },
14
+ argTypes: {
15
+ name: {
16
+ options: AlertIconNames,
17
+ control: {type: 'radio'},
18
+ },
19
+ blinkValue: {
20
+ control: {type: 'boolean'},
21
+ },
22
+ },
23
+ render: (args) =>
24
+ html` <div style="width:64px;height:64px">
25
+ <obc-alert-icon
26
+ ?blink-value=${args.blinkValue}
27
+ name=${args.name}
28
+ ></obc-alert-icon>
29
+ </div>`,
30
+ } satisfies Meta<ObcAlertIcon>;
31
+
32
+ export default meta;
33
+ type Story = StoryObj<ObcAlertIcon>;
34
+
35
+ export const Primary: Story = {};
@@ -0,0 +1,75 @@
1
+ import {LitElement, html, css} from 'lit';
2
+ import {customElement, property} from 'lit/decorators.js';
3
+ import {classMap} from 'lit/directives/class-map.js';
4
+ import {svg14AlarmSilencedA} from './icons/icon-14-alarm-silenced-a';
5
+ import {svg14AlarmSilencedB} from './icons/icon-14-alarm-silenced-b';
6
+ import {svg14AlarmUnackA} from './icons/icon-14-alarm-unack-a';
7
+ import {svg14AlarmUnackB} from './icons/icon-14-alarm-unack-b';
8
+ import {svg14WarningUnackA} from './icons/icon-14-warning-unack-a';
9
+ import {svg14WarningUnackB} from './icons/icon-14-warning-unack-b';
10
+
11
+ const mapping = {
12
+ 'alarm-silenced': {a: svg14AlarmSilencedA, b: svg14AlarmSilencedB},
13
+ 'alarm-unack': {a: svg14AlarmUnackA, b: svg14AlarmUnackB},
14
+ 'warning-unack': {a: svg14WarningUnackA, b: svg14WarningUnackB},
15
+ };
16
+
17
+ export const AlertIconNames = Object.keys(mapping) as AlertIconName[];
18
+ export type AlertIconName = keyof typeof mapping;
19
+
20
+ /**
21
+ * Icon used for alerts and notification with blinking effect
22
+ *
23
+ * @prop {boolean} blinkValue - This value should alternate between true and false to make the icon blink.
24
+ * @prop {AlertIconName} name - Name of the icon.
25
+ */
26
+ @customElement('obc-alert-icon')
27
+ export class ObcAlertIcon extends LitElement {
28
+ @property({type: Boolean, attribute: 'blink-value'}) blinkValue = false;
29
+ @property({type: String}) name: AlertIconName = 'alarm-unack';
30
+
31
+ override render() {
32
+ const icons = mapping[this.name];
33
+ return html`
34
+ <div
35
+ class=${classMap({
36
+ wrapper: true,
37
+ 'show-a': this.blinkValue,
38
+ 'show-b': !this.blinkValue,
39
+ })}
40
+ >
41
+ <span class="a">${icons.a}</span>
42
+ <span class="b">${icons.b}</span>
43
+ </div>
44
+ `;
45
+ }
46
+
47
+ static override styles = css`
48
+ .wrapper {
49
+ height: 100%;
50
+ width: 100%;
51
+ }
52
+ .wrapper * {
53
+ height: 100%;
54
+ width: 100%;
55
+ }
56
+ .a,
57
+ .b {
58
+ display: none;
59
+ }
60
+
61
+ .show-a .a {
62
+ display: revert;
63
+ }
64
+
65
+ .show-b .b {
66
+ display: revert;
67
+ }
68
+ `;
69
+ }
70
+
71
+ declare global {
72
+ interface HTMLElementTagNameMap {
73
+ 'obc-alert-icon': ObcAlertIcon;
74
+ }
75
+ }
@@ -0,0 +1,9 @@
1
+ import {svg} from 'lit';
2
+ export const svg14AlarmSilencedA = svg`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
3
+ <path d="M11.1409 1.51681C11.5032 0.82773 12.4968 0.827732 12.8591 1.51681L22.8888 20.5936C23.2254 21.2338 22.7573 22 22.0297 22H1.97033C1.24266 22 0.774615 21.2338 1.11121 20.5936L11.1409 1.51681Z" fill="var(--alarm-enabled-background-color)"/>
4
+ <path d="M6.99848 10.8967L7.88021 10.015L17.3 19.2682L16.4183 20.1499L15.1363 18.868C14.4859 19.387 13.7168 19.7747 12.8788 19.9623V18.6741C13.3791 18.5303 13.8356 18.2864 14.2421 17.98L11.6281 15.366V19.487L8.50138 16.3603H6V12.6082H8.50138L8.68273 12.4206L6.99848 10.8967Z" style="fill: var(--on-alarm-active-color)"/>
5
+ <path d="M15.7491 15.9476C15.9117 15.4911 16.0055 14.9971 16.0055 14.4843C16.0055 12.5019 14.6861 10.826 12.8788 10.2882V9C15.3864 9.56906 17.2562 11.8078 17.2562 14.4843C17.2562 15.3535 17.0561 16.1727 16.7059 16.9044L15.7491 15.9476Z" style="fill: var(--on-alarm-active-color)"/>
6
+ <path d="M12.8788 11.9641C13.8043 12.4269 14.4422 13.3774 14.4422 14.4843C14.4422 14.5343 14.4359 14.5843 14.4297 14.6344L12.8788 13.0835V11.9641Z" style="fill: var(--on-alarm-active-color)"/>
7
+ <path d="M10.4525 10.6572L11.6281 9.48152V11.8328L10.4525 10.6572Z" style="fill: var(--on-alarm-active-color)"/>
8
+ </svg>
9
+ `;
@@ -0,0 +1,16 @@
1
+ import {svg} from 'lit';
2
+ export const svg14AlarmSilencedB = svg`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
3
+ <g clip-path="url(#clip0_850_47505)">
4
+ <path d="M13.3017 1.28413L12.8591 1.51681L13.3017 1.28413C12.752 0.238626 11.248 0.238621 10.6983 1.28413L11.1314 1.51182L10.6983 1.28413L0.668648 20.3609C0.154023 21.3397 0.872928 22.5 1.97033 22.5H22.0297C23.1271 22.5 23.846 21.3397 23.3314 20.3609L13.3017 1.28413Z" style="stroke: var(--element-neutral-color)" />
5
+ <path d="M6.99848 10.8967L7.88021 10.015L17.3 19.2682L16.4183 20.1499L15.1363 18.868C14.4859 19.387 13.7168 19.7747 12.8788 19.9623V18.6741C13.3791 18.5303 13.8356 18.2864 14.2421 17.98L11.6281 15.366V19.487L8.50138 16.3603H6V12.6082H8.50138L8.68273 12.4206L6.99848 10.8967Z" style="fill: var(--element-neutral-color)" />
6
+ <path d="M15.7491 15.9476C15.9117 15.4911 16.0055 14.9971 16.0055 14.4843C16.0055 12.5019 14.6861 10.826 12.8788 10.2882V9C15.3864 9.56906 17.2562 11.8078 17.2562 14.4843C17.2562 15.3535 17.0561 16.1727 16.7059 16.9044L15.7491 15.9476Z" style="fill: var(--element-neutral-color)" />
7
+ <path d="M12.8788 11.9641C13.8043 12.4269 14.4422 13.3774 14.4422 14.4843C14.4422 14.5343 14.4359 14.5843 14.4297 14.6344L12.8788 13.0835V11.9641Z" style="fill: var(--element-neutral-color)" />
8
+ <path d="M10.4525 10.6572L11.6281 9.48152V11.8328L10.4525 10.6572Z" style="fill: var(--element-neutral-color)" />
9
+ </g>
10
+ <defs>
11
+ <clipPath id="clip0_850_47505">
12
+ <rect width="24" height="24" fill="none"/>
13
+ </clipPath>
14
+ </defs>
15
+ </svg>
16
+ `;
@@ -0,0 +1,8 @@
1
+ import {svg} from 'lit';
2
+ export const svg14AlarmUnackA = svg`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
3
+ <path d="M11.1409 1.51681C11.5032 0.82773 12.4968 0.827732 12.8591 1.51681L22.8888 20.5936C23.2254 21.2338 22.7573 22 22.0297 22H1.97033C1.24266 22 0.774615 21.2338 1.11121 20.5936L11.1409 1.51681Z" fill="var(--alarm-enabled-background-color)"/>
4
+ <path d="M8.50855 16.3814L11.6442 19.5171V9.4829L8.50855 12.6186H6V16.3814H8.50855Z" style="fill: var(--on-alarm-active-color)"/>
5
+ <path d="M14.4664 14.5C14.4664 13.39 13.8267 12.4367 12.8985 11.9726V17.0211C13.8267 16.5633 14.4664 15.61 14.4664 14.5Z" style="fill: var(--on-alarm-active-color)"/>
6
+ <path d="M12.8985 10.2919C14.7109 10.8312 16.0342 12.512 16.0342 14.5C16.0342 16.488 14.7109 18.1688 12.8985 18.7081V20C15.4133 19.4293 17.2885 17.1842 17.2885 14.5C17.2885 11.8159 15.4133 9.5707 12.8985 9V10.2919Z" style="fill: var(--on-alarm-active-color)"/>
7
+ </svg>
8
+ `;
@@ -0,0 +1,15 @@
1
+ import {svg} from 'lit';
2
+ export const svg14AlarmUnackB = svg`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
3
+ <g clip-path="url(#clip0_850_47508)">
4
+ <path d="M13.3017 1.28413L12.8591 1.51681L13.3017 1.28413C12.752 0.238626 11.248 0.238621 10.6983 1.28413L11.1314 1.51182L10.6983 1.28413L0.668648 20.3609C0.154023 21.3397 0.872928 22.5 1.97033 22.5H22.0297C23.1271 22.5 23.846 21.3397 23.3314 20.3609L13.3017 1.28413Z" style="stroke: var(--element-neutral-color)" />
5
+ <path d="M8.50855 16.3814L11.6442 19.5171V9.4829L8.50855 12.6186H6V16.3814H8.50855Z" style="fill: var(--element-neutral-color)" />
6
+ <path d="M14.4664 14.5C14.4664 13.39 13.8267 12.4367 12.8985 11.9726V17.0211C13.8267 16.5633 14.4664 15.61 14.4664 14.5Z" style="fill: var(--element-neutral-color)" />
7
+ <path d="M12.8985 10.2919C14.7109 10.8312 16.0342 12.512 16.0342 14.5C16.0342 16.488 14.7109 18.1688 12.8985 18.7081V20C15.4133 19.4293 17.2885 17.1842 17.2885 14.5C17.2885 11.8159 15.4133 9.5707 12.8985 9V10.2919Z" style="fill: var(--element-neutral-color)" />
8
+ </g>
9
+ <defs>
10
+ <clipPath id="clip0_850_47508">
11
+ <rect width="24" height="24" fill="none"/>
12
+ </clipPath>
13
+ </defs>
14
+ </svg>
15
+ `;
@@ -0,0 +1,8 @@
1
+ import {svg} from 'lit';
2
+ export const svg14WarningUnackA = svg`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
3
+ <circle cx="12" cy="12" r="10.5" style="fill: var(--warning-enabled-background-color)" style="stroke: var(--element-active-color)"/>
4
+ <path d="M8.50855 13.8814L11.6442 17.0171V6.9829L8.50855 10.1186H6V13.8814H8.50855Z" style="fill: var(--on-warning-active-color)" />
5
+ <path d="M14.4664 12C14.4664 10.89 13.8267 9.93672 12.8985 9.47263V14.5211C13.8267 14.0633 14.4664 13.11 14.4664 12Z" style="fill: var(--on-warning-active-color)" />
6
+ <path d="M12.8985 7.7919C14.7109 8.33124 16.0342 10.012 16.0342 12C16.0342 13.988 14.7109 15.6688 12.8985 16.2081V17.5C15.4133 16.9293 17.2885 14.6842 17.2885 12C17.2885 9.31585 15.4133 7.0707 12.8985 6.5V7.7919Z" style="fill: var(--on-warning-active-color)" />
7
+ </svg>
8
+ `;
@@ -0,0 +1,8 @@
1
+ import {svg} from 'lit';
2
+ export const svg14WarningUnackB = svg`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
3
+ <circle cx="12" cy="12" r="10.5" style="stroke: var(--element-neutral-color)" />
4
+ <path d="M8.50855 13.8814L11.6442 17.0171V6.9829L8.50855 10.1186H6V13.8814H8.50855Z" style="fill: var(--element-neutral-color)" />
5
+ <path d="M14.4664 12C14.4664 10.89 13.8267 9.93672 12.8985 9.47263V14.5211C13.8267 14.0633 14.4664 13.11 14.4664 12Z" style="fill: var(--element-neutral-color)" />
6
+ <path d="M12.8985 7.7919C14.7109 8.33124 16.0342 10.012 16.0342 12C16.0342 13.988 14.7109 15.6688 12.8985 16.2081V17.5C15.4133 16.9293 17.2885 14.6842 17.2885 12C17.2885 9.31585 15.4133 7.0707 12.8985 6.5V7.7919Z" style="fill: var(--element-neutral-color)" />
7
+ </svg>
8
+ `;
@@ -18,6 +18,8 @@ const meta: Meta<typeof ObcAlertTopbarElement> = {
18
18
  minimized: false,
19
19
  showAck: true,
20
20
  alertMuted: false,
21
+ blinkAlarmValue: true,
22
+ blinkWarningValue: true,
21
23
  },
22
24
  argTypes: {
23
25
  alertType: {
@@ -30,6 +32,8 @@ const meta: Meta<typeof ObcAlertTopbarElement> = {
30
32
  n-alerts=${args.nAlerts}
31
33
  alert-type=${args.alertType}
32
34
  max-width=${args.maxWidth}
35
+ ?blink-alarm-value=${args.blinkAlarmValue}
36
+ ?blink-warning-value=${args.blinkWarningValue}
33
37
  ?minimized=${args.minimized}
34
38
  ?show-ack=${args.showAck}
35
39
  ?alert-muted=${args.alertMuted}