@oicl/openbridge-webcomponents 0.0.13 → 0.0.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/__snapshots__/automation-button--damper-badges.png +0 -0
  3. package/__snapshots__/automation-button--damper-off.png +0 -0
  4. package/__snapshots__/automation-button--damper-on.png +0 -0
  5. package/__snapshots__/automation-button--motor-off.png +0 -0
  6. package/__snapshots__/automation-button--motor-on.png +0 -0
  7. package/__snapshots__/automation-button--switch-off.png +0 -0
  8. package/__snapshots__/automation-button--switch-on.png +0 -0
  9. package/__snapshots__/automation-button--three-way-valve-open-right.png +0 -0
  10. package/__snapshots__/automation-button--valve-alert.png +0 -0
  11. package/__snapshots__/automation-button--valve-badges.png +0 -0
  12. package/__snapshots__/automation-button--valve-closed.png +0 -0
  13. package/__snapshots__/automation-button--valve-open.png +0 -0
  14. package/__snapshots__/automation-button--valve-progress.png +0 -0
  15. package/__snapshots__/automation-readout--usage-with-pipe-bottom.png +0 -0
  16. package/__snapshots__/automation-readout--usage-with-pipe-left.png +0 -0
  17. package/__snapshots__/automation-readout--usage-with-pipe-right.png +0 -0
  18. package/__snapshots__/automation-readout--usage-with-pipe-top.png +0 -0
  19. package/__snapshots__/automation-tank--compact.png +0 -0
  20. package/__snapshots__/automation-tank--vertical-with-badges.png +0 -0
  21. package/__snapshots__/automation-tank--vertical.png +0 -0
  22. package/__snapshots__/line-corner-line--primary.png +0 -0
  23. package/__snapshots__/line-cross--primary.png +0 -0
  24. package/__snapshots__/line-direction--primary.png +0 -0
  25. package/__snapshots__/line-end-point-line--primary.png +0 -0
  26. package/__snapshots__/line-example--air.png +0 -0
  27. package/__snapshots__/line-example--connector.png +0 -0
  28. package/__snapshots__/line-example--electric.png +0 -0
  29. package/__snapshots__/line-example--fluid.png +0 -0
  30. package/__snapshots__/line-horizontal-line--primary.png +0 -0
  31. package/__snapshots__/line-overlap--primary.png +0 -0
  32. package/__snapshots__/line-three-way-line--primary.png +0 -0
  33. package/__snapshots__/line-vertical-line--primary.png +0 -0
  34. package/custom-elements.json +404 -379
  35. package/dist/automation/automation-button/automation-button.css.js +75 -0
  36. package/dist/automation/automation-button/automation-button.css.js.map +1 -1
  37. package/dist/automation/automation-button/automation-button.d.ts.map +1 -1
  38. package/dist/automation/automation-button/automation-button.js +46 -44
  39. package/dist/automation/automation-button/automation-button.js.map +1 -1
  40. package/dist/automation/automation-tank/automation-tank.css.js +2 -1
  41. package/dist/automation/automation-tank/automation-tank.css.js.map +1 -1
  42. package/dist/automation/corner-line/corner-line.d.ts.map +1 -1
  43. package/dist/automation/corner-line/corner-line.js +6 -0
  44. package/dist/automation/corner-line/corner-line.js.map +1 -1
  45. package/dist/automation/direction-line/direction-line.d.ts.map +1 -1
  46. package/dist/automation/direction-line/direction-line.js +5 -0
  47. package/dist/automation/direction-line/direction-line.js.map +1 -1
  48. package/dist/automation/end-point-line/end-point-line.d.ts.map +1 -1
  49. package/dist/automation/end-point-line/end-point-line.js +23 -0
  50. package/dist/automation/end-point-line/end-point-line.js.map +1 -1
  51. package/dist/automation/horizontal-line/horizontal-line.d.ts.map +1 -1
  52. package/dist/automation/horizontal-line/horizontal-line.js +2 -1
  53. package/dist/automation/horizontal-line/horizontal-line.js.map +1 -1
  54. package/dist/automation/line-cross/line-cross.d.ts.map +1 -1
  55. package/dist/automation/line-cross/line-cross.js +6 -0
  56. package/dist/automation/line-cross/line-cross.js.map +1 -1
  57. package/dist/automation/line-overlap/line-overlap.d.ts.map +1 -1
  58. package/dist/automation/line-overlap/line-overlap.js +6 -0
  59. package/dist/automation/line-overlap/line-overlap.js.map +1 -1
  60. package/dist/automation/three-way-line/three-way-line.d.ts.map +1 -1
  61. package/dist/automation/three-way-line/three-way-line.js +6 -0
  62. package/dist/automation/three-way-line/three-way-line.js.map +1 -1
  63. package/dist/automation/vertical-line/vertical-line.d.ts.map +1 -1
  64. package/dist/automation/vertical-line/vertical-line.js +2 -1
  65. package/dist/automation/vertical-line/vertical-line.js.map +1 -1
  66. package/dist/storybook-util.d.ts +2 -1
  67. package/dist/storybook-util.d.ts.map +1 -1
  68. package/dist/storybook-util.js +40 -0
  69. package/dist/storybook-util.js.map +1 -1
  70. package/package.json +1 -1
  71. package/src/automation/automation-button/automation-button.css +81 -0
  72. package/src/automation/automation-button/automation-button.stories.ts +2 -0
  73. package/src/automation/automation-button/automation-button.ts +61 -59
  74. package/src/automation/automation-readout/automation-readout.stories.ts +8 -31
  75. package/src/automation/automation-tank/automation-tank.css +2 -1
  76. package/src/automation/automation-tank/automation-tank.stories.ts +2 -8
  77. package/src/automation/corner-line/corner-line.stories.ts +2 -0
  78. package/src/automation/corner-line/corner-line.ts +6 -0
  79. package/src/automation/direction-line/direction-line.stories.ts +2 -0
  80. package/src/automation/direction-line/direction-line.ts +5 -0
  81. package/src/automation/end-point-line/end-point-line.stories.ts +2 -0
  82. package/src/automation/end-point-line/end-point-line.ts +23 -0
  83. package/src/automation/horizontal-line/horizontal-line.stories.ts +2 -0
  84. package/src/automation/horizontal-line/horizontal-line.ts +2 -1
  85. package/src/automation/line-cross/line-cross.stories.ts +2 -0
  86. package/src/automation/line-cross/line-cross.ts +6 -0
  87. package/src/automation/line-overlap/line-overlap.stories.ts +2 -0
  88. package/src/automation/line-overlap/line-overlap.ts +6 -0
  89. package/src/automation/line.stories.ts +4 -4
  90. package/src/automation/three-way-line/three-way-line.stories.ts +2 -0
  91. package/src/automation/three-way-line/three-way-line.ts +6 -0
  92. package/src/automation/vertical-line/vertical-line.stories.ts +2 -36
  93. package/src/automation/vertical-line/vertical-line.ts +2 -1
  94. package/src/storybook-util.ts +41 -1
@@ -9,7 +9,14 @@ const compentStyle = css`* {
9
9
  }
10
10
  }
11
11
 
12
+ .outer-wrapper {
13
+ width: 0;
14
+ height: 0;
15
+ }
16
+
12
17
  .wrapper {
18
+ position: absolute;
19
+
13
20
  display: flex;
14
21
  flex-direction: row;
15
22
  align-items: center;
@@ -22,6 +29,74 @@ const compentStyle = css`* {
22
29
  border-radius: 6px;
23
30
  }
24
31
 
32
+ .wrapper.label-bottom {
33
+ top: -33px;
34
+ transform: translateX(-50%);
35
+ }
36
+
37
+ .wrapper.label-right {
38
+ left: -33px;
39
+ transform: translateY(-50%);
40
+ }
41
+
42
+ .wrapper.label-top{
43
+ bottom: -33px;
44
+ transform: translateX(-50%);
45
+ }
46
+
47
+ .wrapper.label-left {
48
+ right: -33px;
49
+ transform: translateY(-50%);
50
+ }
51
+
52
+ .wrapper.size-small.label-bottom {
53
+ top: -25px;
54
+ }
55
+
56
+ .wrapper.size-small.label-right {
57
+ left: -25px;
58
+ }
59
+
60
+ .wrapper.size-small.label-top{
61
+ bottom: -25px;
62
+ }
63
+
64
+ .wrapper.size-small.label-left {
65
+ right: -25px;
66
+ }
67
+
68
+ .wrapper.size-large.label-bottom {
69
+ top: -41px;
70
+ }
71
+
72
+ .wrapper.size-large.label-right {
73
+ left: -41px;
74
+ }
75
+
76
+ .wrapper.size-large.label-top{
77
+ bottom: -41px;
78
+ }
79
+
80
+ .wrapper.size-large.label-left {
81
+ right: -41px;
82
+ }
83
+
84
+ .wrapper.size-xl.label-bottom {
85
+ top: -57px;
86
+ }
87
+
88
+ .wrapper.size-xl.label-right {
89
+ left: -57px;
90
+ }
91
+
92
+ .wrapper.size-xl.label-top{
93
+ bottom: -57px;
94
+ }
95
+
96
+ .wrapper.size-xl.label-left {
97
+ right: -57px;
98
+ }
99
+
25
100
  .wrapper {
26
101
  border-color: var(--flat-enabled-border-color);
27
102
  background-color: var(--flat-enabled-background-color);
@@ -1 +1 @@
1
- {"version":3,"file":"automation-button.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"automation-button.d.ts","sourceRoot":"","sources":["../../../src/automation/automation-button/automation-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,UAAU,EAAkB,MAAM,KAAK,CAAC;AAIpE,OAAO,6BAA6B,CAAC;AACrC,OAAO,kCAAkC,CAAC;AAC1C,OAAO,qCAAqC,CAAC;AAC7C,OAAO,8BAA8B,CAAC;AACtC,OAAO,mCAAmC,CAAC;AAC3C,OAAO,sCAAsC,CAAC;AAC9C,OAAO,6BAA6B,CAAC;AACrC,OAAO,8BAA8B,CAAC;AACtC,OAAO,gCAAgC,CAAC;AACxC,OAAO,gCAAgC,CAAC;AACxC,OAAO,mCAAmC,CAAC;AAE3C,oBAAY,oBAAoB;IAC9B,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,EAAE,OAAO;CACV;AAED,oBAAY,uBAAuB;IACjC,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,MAAM,WAAW;CAClB;AAED,oBAAY,qBAAqB;IAC/B,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,YAAY,kBAAkB;IAC9B,UAAU,gBAAgB;IAC1B,MAAM,WAAW;CAClB;AAED,oBAAY,yBAAyB;IACnC,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,QAAQ,aAAa;CACtB;AAED,oBAAY,0BAA0B;IACpC,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,MAAM,WAAW;CAClB;AAED,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,KAAK,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,kCAAkC;IACjD,IAAI,EAAE,WAAW,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,SAAS,CAAC;IAChB,SAAS,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;CAC7C;AAED,oBAAY,6BAA6B;IACvC,GAAG,QAAQ;IACX,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,KAAK,UAAU;CAChB;AAED,oBAAY,yBAAyB;IACnC,OAAO,YAAY;IACnB,WAAW,iBAAiB;IAC5B,cAAc,oBAAoB;IAClC,QAAQ,aAAa;IACrB,YAAY,kBAAkB;IAC9B,eAAe,qBAAqB;IACpC,OAAO,YAAY;CACpB;AAED,MAAM,MAAM,qBAAqB,GAC7B,0BAA0B,GAC1B,wBAAwB,GACxB,kCAAkC,CAAC;AA6CvC,qBACa,mBAAoB,SAAQ,UAAU;IACvB,IAAI,EAAE,oBAAoB,CACrB;IACL,OAAO,EAAE,uBAAuB,CACxB;IACR,KAAK,EAAE,qBAAqB,CACzB;IACc,MAAM,EAAE,qBAAqB,EAAE,CACrE;IACqB,aAAa,EAAE,6BAA6B,CAC/B;IACb,SAAS,EAAE,yBAAyB,CAC1B;IACV,UAAU,EAAE,0BAA0B,CAC3B;IACV,KAAK,EAAE,OAAO,CAAS;IACvB,QAAQ,EAAE,OAAO,CAAS;IAC3B,SAAS,EAAE,yBAAyB,CAC1B;IAE3B,MAAM;IAqEf,OAAgB,MAAM,0BAA2B;IAEjD,OAAO,CAAC,kBAAkB;IAkC1B,OAAO,CAAC,gBAAgB;CA2GzB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,uBAAuB,EAAE,mBAAmB,CAAC;KAC9C;CACF"}
1
+ {"version":3,"file":"automation-button.d.ts","sourceRoot":"","sources":["../../../src/automation/automation-button/automation-button.ts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AAI,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;CAC7C;AAED,oBAAY,6BAA6B;IACvC,GAAG,QAAQ;IACX,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,KAAK,UAAU;CAChB;AAED,oBAAY,yBAAyB;IACnC,OAAO,YAAY;IACnB,WAAW,iBAAiB;IAC5B,cAAc,oBAAoB;IAClC,QAAQ,aAAa;IACrB,YAAY,kBAAkB;IAC9B,eAAe,qBAAqB;IACpC,OAAO,YAAY;CACpB;AAED,MAAM,MAAM,qBAAqB,GAC7B,0BAA0B,GAC1B,wBAAwB,GACxB,kCAAkC,CAAC;AA6CvC,qBACa,mBAAoB,SAAQ,UAAU;IACvB,IAAI,EAAE,oBAAoB,CACrB;IACL,OAAO,EAAE,uBAAuB,CACxB;IACR,KAAK,EAAE,qBAAqB,CACzB;IACc,MAAM,EAAE,qBAAqB,EAAE,CACrE;IACqB,aAAa,EAAE,6BAA6B,CAC/B;IACb,SAAS,EAAE,yBAAyB,CAC1B;IACV,UAAU,EAAE,0BAA0B,CAC3B;IACV,KAAK,EAAE,OAAO,CAAS;IACvB,QAAQ,EAAE,OAAO,CAAS;IAC3B,SAAS,EAAE,yBAAyB,CAC1B;IAE3B,MAAM;IAuEf,OAAgB,MAAM,0BAA2B;IAEjD,OAAO,CAAC,kBAAkB;IAkC1B,OAAO,CAAC,gBAAgB;CA2GzB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,uBAAuB,EAAE,mBAAmB,CAAC;KAC9C;CACF"}
@@ -133,8 +133,9 @@ let ObcAutomationButton = class extends LitElement {
133
133
  const progressSpinner = this.getProgressSpinner();
134
134
  const direction = this.getDirectionIcon();
135
135
  return html`
136
- <button
137
- class=${classMap({
136
+ <div class="outer-wrapper">
137
+ <button
138
+ class=${classMap({
138
139
  wrapper: true,
139
140
  ["size-" + this.size]: true,
140
141
  ["variant-" + this.variant]: true,
@@ -145,49 +146,50 @@ let ObcAutomationButton = class extends LitElement {
145
146
  alert: this.alert,
146
147
  progress: this.progress
147
148
  })}
148
- >
149
- <div class="icon-holder">
150
- ${direction}
151
- ${this.variant !== "double" || this.size !== "small" ? html`<div class="icon-primary">
152
- <slot name="icon"></slot>
153
- </div>` : ""}
154
- ${progressSpinner}
155
- ${this.alert ? html`<svg
156
- class="alert-icon"
157
- width="18"
158
- height="31"
159
- viewBox="0 0 18 31"
160
- fill="none"
161
- xmlns="http://www.w3.org/2000/svg"
162
- >
163
- <path
164
- d="M 0 0 L 16 0 C 17.1046 0 18 0.8954 18 2 V 14.7889 C 18 15.5786 17.7662 16.3506 17.3282 17.0077 L 9 30 V 3 L 7 1 H 0 Z"
165
- fill="var(--alert-alarm-color)"
166
- />
167
- <path
168
- d="M12 4H14V11.5H12V4Z"
169
- fill="var(--on-alarm-active-color)"
170
- />
171
- <path
172
- d="M12 13.5H14V15.5H12V13.5Z"
173
- fill="var(--on-alarm-active-color)"
174
- />
175
- </svg> ` : ""}
176
- <div class="badge-top-right">
177
- <slot name="badge-top-right"></slot>
178
- </div>
179
- <div class="badge-top-left">
180
- <slot name="badge-top-left"></slot>
181
- </div>
182
- <div class="badge-bottom-left">
183
- <slot name="badge-bottom-left"></slot>
184
- </div>
185
- <div class="badge-bottom-right">
186
- <slot name="badge-bottom-right"></slot>
149
+ >
150
+ <div class="icon-holder">
151
+ ${direction}
152
+ ${this.variant !== "double" || this.size !== "small" ? html`<div class="icon-primary">
153
+ <slot name="icon"></slot>
154
+ </div>` : ""}
155
+ ${progressSpinner}
156
+ ${this.alert ? html`<svg
157
+ class="alert-icon"
158
+ width="18"
159
+ height="31"
160
+ viewBox="0 0 18 31"
161
+ fill="none"
162
+ xmlns="http://www.w3.org/2000/svg"
163
+ >
164
+ <path
165
+ d="M 0 0 L 16 0 C 17.1046 0 18 0.8954 18 2 V 14.7889 C 18 15.5786 17.7662 16.3506 17.3282 17.0077 L 9 30 V 3 L 7 1 H 0 Z"
166
+ fill="var(--alert-alarm-color)"
167
+ />
168
+ <path
169
+ d="M12 4H14V11.5H12V4Z"
170
+ fill="var(--on-alarm-active-color)"
171
+ />
172
+ <path
173
+ d="M12 13.5H14V15.5H12V13.5Z"
174
+ fill="var(--on-alarm-active-color)"
175
+ />
176
+ </svg> ` : ""}
177
+ <div class="badge-top-right">
178
+ <slot name="badge-top-right"></slot>
179
+ </div>
180
+ <div class="badge-top-left">
181
+ <slot name="badge-top-left"></slot>
182
+ </div>
183
+ <div class="badge-bottom-left">
184
+ <slot name="badge-bottom-left"></slot>
185
+ </div>
186
+ <div class="badge-bottom-right">
187
+ <slot name="badge-bottom-right"></slot>
188
+ </div>
187
189
  </div>
188
- </div>
189
- <div class="label">${labels}</div>
190
- </button>
190
+ <div class="label">${labels}</div>
191
+ </button>
192
+ </div>
191
193
  `;
192
194
  }
193
195
  getProgressSpinner() {
@@ -1 +1 @@
1
- {"version":3,"file":"automation-button.js","sources":["../../../src/automation/automation-button/automation-button.ts"],"sourcesContent":["import {HTMLTemplateResult, LitElement, html, unsafeCSS} from 'lit';\nimport {customElement, property} from 'lit/decorators.js';\nimport compentStyle from './automation-button.css?inline';\nimport {classMap} from 'lit/directives/class-map.js';\nimport '../../icons/icon-08-forward';\nimport '../../icons/icon-08-forward-fast';\nimport '../../icons/icon-08-forward-stopped';\nimport '../../icons/icon-08-backward';\nimport '../../icons/icon-08-backward-fast';\nimport '../../icons/icon-08-backward-stopped';\nimport '../../icons/icon-08-standby';\nimport '../../icons/icon-02-arrow-up';\nimport '../../icons/icon-02-arrow-down';\nimport '../../icons/icon-02-arrow-back';\nimport '../../icons/icon-02-arrow-forward';\n\nexport enum AutomationButtonSize {\n small = 'small',\n regular = 'regular',\n large = 'large',\n xl = 'xl',\n}\n\nexport enum AutomationButtonVariant {\n regular = 'regular',\n double = 'double',\n switch = 'switch',\n}\n\nexport enum AutomationButtonState {\n closed = 'closed',\n open = 'open',\n openEnhanced = 'open-enhanced',\n openMedium = 'open-medium',\n static = 'static',\n}\n\nexport enum AutomationButtonLabelSize {\n small = 'small',\n regular = 'regular',\n enhanced = 'enhanced',\n}\n\nexport enum AutomationBottonLabelStyle {\n regular = 'regular',\n enhanced = 'enhanced',\n active = 'active',\n}\n\nexport interface AutomationButtonStateLabel {\n type: 'state';\n text: string;\n bold: boolean;\n}\n\nexport interface AutomationButtonTagLabel {\n type: 'tag';\n text: string;\n showHash: boolean;\n}\n\nexport interface AutomationButtonDirectonValueLabel {\n type: 'direction';\n value: number;\n nDigits: number;\n unit: 'percent';\n direction: 'up' | 'down' | 'left' | 'right';\n}\n\nexport enum AutomationButtonLabelPosition {\n top = 'top',\n bottom = 'bottom',\n left = 'left',\n right = 'right',\n}\n\nexport enum AutomationButtonDirection {\n forward = 'forward',\n forwardFast = 'forward-fast',\n forwardStopped = 'forward-stopped',\n backward = 'backward',\n backwardFast = 'backward-fast',\n backwardStopped = 'backward-stopped',\n standby = 'standby',\n}\n\nexport type AutomationButtonLabel =\n | AutomationButtonStateLabel\n | AutomationButtonTagLabel\n | AutomationButtonDirectonValueLabel;\n\nfunction renderLabel(label: AutomationButtonLabel): HTMLTemplateResult {\n if (label.type === 'state') {\n return html`<div class=\"state ${label.bold ? 'bold' : ''}\">\n ${label.text}\n </div>`;\n } else if (label.type === 'tag') {\n return html`<div class=\"tag\">\n ${label.showHash ? html`<div class=\"hash\">#</div>` : null} ${label.text}\n </div>`;\n } else {\n const v = label.value.toFixed(0);\n const zeroPadding =\n v.length < label.nDigits ? '0'.repeat(label.nDigits - v.length) : '';\n\n let directionIcon: HTMLTemplateResult;\n if (label.direction === 'up') {\n directionIcon = html`<obi-02-arrow-up\n class=\"direction-icon\"\n ></obi-02-arrow-up>`;\n } else if (label.direction === 'down') {\n directionIcon = html`<obi-02-arrow-down\n class=\"direction-icon\"\n ></obi-02-arrow-down>`;\n } else if (label.direction === 'left') {\n directionIcon = html`<obi-02-arrow-back\n class=\"direction-icon\"\n ></obi-02-arrow-back>`;\n } else if (label.direction === 'right') {\n directionIcon = html`<obi-02-arrow-forward\n class=\"direction-icon\"\n ></obi-02-arrow-forward>`;\n } else {\n throw new Error('Invalid direction');\n }\n return html` <div class=\"direction\">\n ${directionIcon}\n <span class=\"zeros\">${zeroPadding}</span>\n <span class=\"value\">${v}</span>\n <span class=\"unit\">${label.unit === 'percent' ? '%' : label.unit}</span>\n </div>`;\n }\n}\n\n@customElement('obc-automation-button')\nexport class ObcAutomationButton extends LitElement {\n @property({type: String}) size: AutomationButtonSize =\n AutomationButtonSize.regular;\n @property({type: String}) variant: AutomationButtonVariant =\n AutomationButtonVariant.regular;\n @property({type: String}) state: AutomationButtonState =\n AutomationButtonState.open;\n @property({type: Array, attribute: false}) labels: AutomationButtonLabel[] =\n [];\n @property({type: String}) labelPosition: AutomationButtonLabelPosition =\n AutomationButtonLabelPosition.bottom;\n @property({type: String}) labelSize: AutomationButtonLabelSize =\n AutomationButtonLabelSize.regular;\n @property({type: String}) labelStyle: AutomationBottonLabelStyle =\n AutomationBottonLabelStyle.regular;\n @property({type: Boolean}) alert: boolean = false;\n @property({type: Boolean}) progress: boolean = false;\n @property({type: String}) direction: AutomationButtonDirection =\n AutomationButtonDirection.forward;\n\n override render() {\n const labels = this.labels.map(renderLabel);\n const progressSpinner = this.getProgressSpinner();\n const direction = this.getDirectionIcon();\n\n return html`\n <button\n class=${classMap({\n wrapper: true,\n ['size-' + this.size]: true,\n ['variant-' + this.variant]: true,\n ['state-' + this.state]: true,\n ['label-' + this.labelPosition]: true,\n ['label-size-' + this.labelSize]: true,\n ['label-style-' + this.labelStyle]: true,\n alert: this.alert,\n progress: this.progress,\n })}\n >\n <div class=\"icon-holder\">\n ${direction}\n ${this.variant !== AutomationButtonVariant.double ||\n this.size !== AutomationButtonSize.small\n ? html`<div class=\"icon-primary\">\n <slot name=\"icon\"></slot>\n </div>`\n : ''}\n ${progressSpinner}\n ${this.alert\n ? html`<svg\n class=\"alert-icon\"\n width=\"18\"\n height=\"31\"\n viewBox=\"0 0 18 31\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M 0 0 L 16 0 C 17.1046 0 18 0.8954 18 2 V 14.7889 C 18 15.5786 17.7662 16.3506 17.3282 17.0077 L 9 30 V 3 L 7 1 H 0 Z\"\n fill=\"var(--alert-alarm-color)\"\n />\n <path\n d=\"M12 4H14V11.5H12V4Z\"\n fill=\"var(--on-alarm-active-color)\"\n />\n <path\n d=\"M12 13.5H14V15.5H12V13.5Z\"\n fill=\"var(--on-alarm-active-color)\"\n />\n </svg> `\n : ''}\n <div class=\"badge-top-right\">\n <slot name=\"badge-top-right\"></slot>\n </div>\n <div class=\"badge-top-left\">\n <slot name=\"badge-top-left\"></slot>\n </div>\n <div class=\"badge-bottom-left\">\n <slot name=\"badge-bottom-left\"></slot>\n </div>\n <div class=\"badge-bottom-right\">\n <slot name=\"badge-bottom-right\"></slot>\n </div>\n </div>\n <div class=\"label\">${labels}</div>\n </button>\n `;\n }\n\n static override styles = unsafeCSS(compentStyle);\n\n private getProgressSpinner(): null | HTMLTemplateResult {\n if (!this.progress) {\n return null;\n }\n\n let spinnerWidth: number;\n if (this.size === AutomationButtonSize.small) {\n spinnerWidth = 40;\n } else if (this.size === AutomationButtonSize.regular) {\n spinnerWidth = 56;\n } else if (this.size === AutomationButtonSize.large) {\n spinnerWidth = 72;\n } else {\n spinnerWidth = 104;\n }\n const progressSpinner = html`<svg\n width=\"${spinnerWidth}\"\n height=\"${spinnerWidth}\"\n viewBox=\"0 0 ${spinnerWidth} ${spinnerWidth}\"\n fill=\"none\"\n class=\"progress-spinner\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M2 ${spinnerWidth / 2} A ${spinnerWidth / 2 - 2} ${spinnerWidth / 2 -\n 2} 0 0 1 ${spinnerWidth / 2} 2\"\n stroke=\"var(--instrument-enhanced-secondary-color)\"\n stroke-width=\"4\"\n stroke-linecap=\"round\"\n />\n </svg> `;\n return progressSpinner;\n }\n\n private getDirectionIcon(): null | HTMLTemplateResult {\n if (this.variant !== AutomationButtonVariant.double) {\n return null;\n } else if (this.direction === AutomationButtonDirection.forward) {\n return html`<svg\n class=\"icon-direction\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M8 5 v 14 L 20 12Z\"\n stroke=\"var(--automation-device-tertiary-color)\"\n fill=\"var(--automation-device-primary-color)\"\n vector-effect=\"non-scaling-stroke\"\n />\n </svg> `;\n } else if (this.direction === AutomationButtonDirection.forwardFast) {\n return html`<svg\n class=\"icon-direction\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M3.5 5 v 14 l 8.5 -7 Z M14.5 5 v 14 l 8.5 -7 Z\"\n stroke=\"var(--automation-device-tertiary-color)\"\n fill=\"var(--automation-device-primary-color)\"\n vector-effect=\"non-scaling-stroke\"\n />\n </svg> `;\n } else if (this.direction === AutomationButtonDirection.forwardStopped) {\n return html`<svg\n class=\"icon-direction\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M8 5 v 14 L 20 12Z\"\n fill=\"var(--automation-device-tertiary-color)\"\n stroke=\"var(--automation-device-tertiary-inverted-color)\"\n vector-effect=\"non-scaling-stroke\"\n />\n </svg> `;\n } else if (this.direction === AutomationButtonDirection.backward) {\n return html`<svg\n class=\"icon-direction\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M16 5 v 14 L 4 12Z\"\n stroke=\"var(--automation-device-tertiary-color)\"\n fill=\"var(--automation-device-primary-color)\"\n vector-effect=\"non-scaling-stroke\"\n />\n </svg>`;\n } else if (this.direction === AutomationButtonDirection.backwardFast) {\n return html`<svg\n class=\"icon-direction\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M20.5 5 v 14 l -8.5 -7 Z M9.5 5 v 14 l -8.5 -7 Z\"\n stroke=\"var(--automation-device-tertiary-color)\"\n fill=\"var(--automation-device-primary-color)\"\n vector-effect=\"non-scaling-stroke\"\n />\n </svg>`;\n } else if (this.direction === AutomationButtonDirection.backwardStopped) {\n return html`<svg\n class=\"icon-direction\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M16 5 v 14 L 4 12Z\"\n fill=\"var(--automation-device-tertiary-color)\"\n stroke=\"var(--automation-device-tertiary-inverted-color)\"\n vector-effect=\"non-scaling-stroke\"\n />\n </svg> `;\n } else if (this.direction === AutomationButtonDirection.standby) {\n return html`<obi-08-standby\n class=\"icon-direction\"\n use-css-color\n ></obi-08-standby>`;\n }\n throw new Error('Invalid direction');\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-automation-button': ObcAutomationButton;\n }\n}\n"],"names":["AutomationButtonSize","AutomationButtonVariant","AutomationButtonState","AutomationButtonLabelSize","AutomationBottonLabelStyle","AutomationButtonLabelPosition","AutomationButtonDirection"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAgBY,IAAA,yCAAAA,0BAAL;AACLA,wBAAA,OAAQ,IAAA;AACRA,wBAAA,SAAU,IAAA;AACVA,wBAAA,OAAQ,IAAA;AACRA,wBAAA,IAAK,IAAA;AAJKA,SAAAA;AAAA,GAAA,wBAAA,CAAA,CAAA;AAOA,IAAA,4CAAAC,6BAAL;AACLA,2BAAA,SAAU,IAAA;AACVA,2BAAA,QAAS,IAAA;AACTA,2BAAA,QAAS,IAAA;AAHCA,SAAAA;AAAA,GAAA,2BAAA,CAAA,CAAA;AAMA,IAAA,0CAAAC,2B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AA;AAEA,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,QAAO;AAAA,GAXb,oBAWe,WAAA,aAAA,CAAA;AAEA,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,QAAO;AAAA,GAbb,oBAae,WAAA,cAAA,CAAA;AAEC,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,SAAQ;AAAA,GAfd,oBAegB,WAAA,SAAA,CAAA;AACA,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,SAAQ;AAAA,GAhBd,oBAgBgB,WAAA,YAAA,CAAA;AACD,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,QAAO;AAAA,GAjBb,oBAiBe,WAAA,aAAA,CAAA;AAjBf,sBAAN,gBAAA;AAAA,EADN,cAAc,uBAAuB;AAAA,GACzB,mBAAA;"}
1
+ {"version":3,"file":"automation-button.js","sources":["../../../src/automation/automation-button/automation-button.ts"],"sourcesContent":["import {HTMLTemplateResult, LitElement, html, unsafeCSS} from 'lit';\nimport {customElement, property} from 'lit/decorators.js';\nimport compentStyle from './automation-button.css?inline';\nimport {classMap} from 'lit/directives/class-map.js';\nimport '../../icons/icon-08-forward';\nimport '../../icons/icon-08-forward-fast';\nimport '../../icons/icon-08-forward-stopped';\nimport '../../icons/icon-08-backward';\nimport '../../icons/icon-08-backward-fast';\nimport '../../icons/icon-08-backward-stopped';\nimport '../../icons/icon-08-standby';\nimport '../../icons/icon-02-arrow-up';\nimport '../../icons/icon-02-arrow-down';\nimport '../../icons/icon-02-arrow-back';\nimport '../../icons/icon-02-arrow-forward';\n\nexport enum AutomationButtonSize {\n small = 'small',\n regular = 'regular',\n large = 'large',\n xl = 'xl',\n}\n\nexport enum AutomationButtonVariant {\n regular = 'regular',\n double = 'double',\n switch = 'switch',\n}\n\nexport enum AutomationButtonState {\n closed = 'closed',\n open = 'open',\n openEnhanced = 'open-enhanced',\n openMedium = 'open-medium',\n static = 'static',\n}\n\nexport enum AutomationButtonLabelSize {\n small = 'small',\n regular = 'regular',\n enhanced = 'enhanced',\n}\n\nexport enum AutomationBottonLabelStyle {\n regular = 'regular',\n enhanced = 'enhanced',\n active = 'active',\n}\n\nexport interface AutomationButtonStateLabel {\n type: 'state';\n text: string;\n bold: boolean;\n}\n\nexport interface AutomationButtonTagLabel {\n type: 'tag';\n text: string;\n showHash: boolean;\n}\n\nexport interface AutomationButtonDirectonValueLabel {\n type: 'direction';\n value: number;\n nDigits: number;\n unit: 'percent';\n direction: 'up' | 'down' | 'left' | 'right';\n}\n\nexport enum AutomationButtonLabelPosition {\n top = 'top',\n bottom = 'bottom',\n left = 'left',\n right = 'right',\n}\n\nexport enum AutomationButtonDirection {\n forward = 'forward',\n forwardFast = 'forward-fast',\n forwardStopped = 'forward-stopped',\n backward = 'backward',\n backwardFast = 'backward-fast',\n backwardStopped = 'backward-stopped',\n standby = 'standby',\n}\n\nexport type AutomationButtonLabel =\n | AutomationButtonStateLabel\n | AutomationButtonTagLabel\n | AutomationButtonDirectonValueLabel;\n\nfunction renderLabel(label: AutomationButtonLabel): HTMLTemplateResult {\n if (label.type === 'state') {\n return html`<div class=\"state ${label.bold ? 'bold' : ''}\">\n ${label.text}\n </div>`;\n } else if (label.type === 'tag') {\n return html`<div class=\"tag\">\n ${label.showHash ? html`<div class=\"hash\">#</div>` : null} ${label.text}\n </div>`;\n } else {\n const v = label.value.toFixed(0);\n const zeroPadding =\n v.length < label.nDigits ? '0'.repeat(label.nDigits - v.length) : '';\n\n let directionIcon: HTMLTemplateResult;\n if (label.direction === 'up') {\n directionIcon = html`<obi-02-arrow-up\n class=\"direction-icon\"\n ></obi-02-arrow-up>`;\n } else if (label.direction === 'down') {\n directionIcon = html`<obi-02-arrow-down\n class=\"direction-icon\"\n ></obi-02-arrow-down>`;\n } else if (label.direction === 'left') {\n directionIcon = html`<obi-02-arrow-back\n class=\"direction-icon\"\n ></obi-02-arrow-back>`;\n } else if (label.direction === 'right') {\n directionIcon = html`<obi-02-arrow-forward\n class=\"direction-icon\"\n ></obi-02-arrow-forward>`;\n } else {\n throw new Error('Invalid direction');\n }\n return html` <div class=\"direction\">\n ${directionIcon}\n <span class=\"zeros\">${zeroPadding}</span>\n <span class=\"value\">${v}</span>\n <span class=\"unit\">${label.unit === 'percent' ? '%' : label.unit}</span>\n </div>`;\n }\n}\n\n@customElement('obc-automation-button')\nexport class ObcAutomationButton extends LitElement {\n @property({type: String}) size: AutomationButtonSize =\n AutomationButtonSize.regular;\n @property({type: String}) variant: AutomationButtonVariant =\n AutomationButtonVariant.regular;\n @property({type: String}) state: AutomationButtonState =\n AutomationButtonState.open;\n @property({type: Array, attribute: false}) labels: AutomationButtonLabel[] =\n [];\n @property({type: String}) labelPosition: AutomationButtonLabelPosition =\n AutomationButtonLabelPosition.bottom;\n @property({type: String}) labelSize: AutomationButtonLabelSize =\n AutomationButtonLabelSize.regular;\n @property({type: String}) labelStyle: AutomationBottonLabelStyle =\n AutomationBottonLabelStyle.regular;\n @property({type: Boolean}) alert: boolean = false;\n @property({type: Boolean}) progress: boolean = false;\n @property({type: String}) direction: AutomationButtonDirection =\n AutomationButtonDirection.forward;\n\n override render() {\n const labels = this.labels.map(renderLabel);\n const progressSpinner = this.getProgressSpinner();\n const direction = this.getDirectionIcon();\n\n return html`\n <div class=\"outer-wrapper\">\n <button\n class=${classMap({\n wrapper: true,\n ['size-' + this.size]: true,\n ['variant-' + this.variant]: true,\n ['state-' + this.state]: true,\n ['label-' + this.labelPosition]: true,\n ['label-size-' + this.labelSize]: true,\n ['label-style-' + this.labelStyle]: true,\n alert: this.alert,\n progress: this.progress,\n })}\n >\n <div class=\"icon-holder\">\n ${direction}\n ${this.variant !== AutomationButtonVariant.double ||\n this.size !== AutomationButtonSize.small\n ? html`<div class=\"icon-primary\">\n <slot name=\"icon\"></slot>\n </div>`\n : ''}\n ${progressSpinner}\n ${this.alert\n ? html`<svg\n class=\"alert-icon\"\n width=\"18\"\n height=\"31\"\n viewBox=\"0 0 18 31\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M 0 0 L 16 0 C 17.1046 0 18 0.8954 18 2 V 14.7889 C 18 15.5786 17.7662 16.3506 17.3282 17.0077 L 9 30 V 3 L 7 1 H 0 Z\"\n fill=\"var(--alert-alarm-color)\"\n />\n <path\n d=\"M12 4H14V11.5H12V4Z\"\n fill=\"var(--on-alarm-active-color)\"\n />\n <path\n d=\"M12 13.5H14V15.5H12V13.5Z\"\n fill=\"var(--on-alarm-active-color)\"\n />\n </svg> `\n : ''}\n <div class=\"badge-top-right\">\n <slot name=\"badge-top-right\"></slot>\n </div>\n <div class=\"badge-top-left\">\n <slot name=\"badge-top-left\"></slot>\n </div>\n <div class=\"badge-bottom-left\">\n <slot name=\"badge-bottom-left\"></slot>\n </div>\n <div class=\"badge-bottom-right\">\n <slot name=\"badge-bottom-right\"></slot>\n </div>\n </div>\n <div class=\"label\">${labels}</div>\n </button>\n </div>\n `;\n }\n\n static override styles = unsafeCSS(compentStyle);\n\n private getProgressSpinner(): null | HTMLTemplateResult {\n if (!this.progress) {\n return null;\n }\n\n let spinnerWidth: number;\n if (this.size === AutomationButtonSize.small) {\n spinnerWidth = 40;\n } else if (this.size === AutomationButtonSize.regular) {\n spinnerWidth = 56;\n } else if (this.size === AutomationButtonSize.large) {\n spinnerWidth = 72;\n } else {\n spinnerWidth = 104;\n }\n const progressSpinner = html`<svg\n width=\"${spinnerWidth}\"\n height=\"${spinnerWidth}\"\n viewBox=\"0 0 ${spinnerWidth} ${spinnerWidth}\"\n fill=\"none\"\n class=\"progress-spinner\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M2 ${spinnerWidth / 2} A ${spinnerWidth / 2 - 2} ${spinnerWidth / 2 -\n 2} 0 0 1 ${spinnerWidth / 2} 2\"\n stroke=\"var(--instrument-enhanced-secondary-color)\"\n stroke-width=\"4\"\n stroke-linecap=\"round\"\n />\n </svg> `;\n return progressSpinner;\n }\n\n private getDirectionIcon(): null | HTMLTemplateResult {\n if (this.variant !== AutomationButtonVariant.double) {\n return null;\n } else if (this.direction === AutomationButtonDirection.forward) {\n return html`<svg\n class=\"icon-direction\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M8 5 v 14 L 20 12Z\"\n stroke=\"var(--automation-device-tertiary-color)\"\n fill=\"var(--automation-device-primary-color)\"\n vector-effect=\"non-scaling-stroke\"\n />\n </svg> `;\n } else if (this.direction === AutomationButtonDirection.forwardFast) {\n return html`<svg\n class=\"icon-direction\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M3.5 5 v 14 l 8.5 -7 Z M14.5 5 v 14 l 8.5 -7 Z\"\n stroke=\"var(--automation-device-tertiary-color)\"\n fill=\"var(--automation-device-primary-color)\"\n vector-effect=\"non-scaling-stroke\"\n />\n </svg> `;\n } else if (this.direction === AutomationButtonDirection.forwardStopped) {\n return html`<svg\n class=\"icon-direction\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M8 5 v 14 L 20 12Z\"\n fill=\"var(--automation-device-tertiary-color)\"\n stroke=\"var(--automation-device-tertiary-inverted-color)\"\n vector-effect=\"non-scaling-stroke\"\n />\n </svg> `;\n } else if (this.direction === AutomationButtonDirection.backward) {\n return html`<svg\n class=\"icon-direction\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M16 5 v 14 L 4 12Z\"\n stroke=\"var(--automation-device-tertiary-color)\"\n fill=\"var(--automation-device-primary-color)\"\n vector-effect=\"non-scaling-stroke\"\n />\n </svg>`;\n } else if (this.direction === AutomationButtonDirection.backwardFast) {\n return html`<svg\n class=\"icon-direction\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M20.5 5 v 14 l -8.5 -7 Z M9.5 5 v 14 l -8.5 -7 Z\"\n stroke=\"var(--automation-device-tertiary-color)\"\n fill=\"var(--automation-device-primary-color)\"\n vector-effect=\"non-scaling-stroke\"\n />\n </svg>`;\n } else if (this.direction === AutomationButtonDirection.backwardStopped) {\n return html`<svg\n class=\"icon-direction\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M16 5 v 14 L 4 12Z\"\n fill=\"var(--automation-device-tertiary-color)\"\n stroke=\"var(--automation-device-tertiary-inverted-color)\"\n vector-effect=\"non-scaling-stroke\"\n />\n </svg> `;\n } else if (this.direction === AutomationButtonDirection.standby) {\n return html`<obi-08-standby\n class=\"icon-direction\"\n use-css-color\n ></obi-08-standby>`;\n }\n throw new Error('Invalid direction');\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-automation-button': ObcAutomationButton;\n }\n}\n"],"names":["AutomationButtonSize","AutomationButtonVariant","AutomationButtonState","AutomationButtonLabelSize","AutomationBottonLabelStyle","AutomationButtonLabelPosition","AutomationButtonDirection"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAgBY,IAAA,yCAAAA,0BAAL;AACLA,wBAAA,OAAQ,IAAA;AACRA,wBAAA,SAAU,IAAA;AACVA,wBAAA,OAAQ,IAAA;AACRA,wBAAA,IAAK,IAAA;AAJKA,SAAAA;AAAA,GAAA,wBAAA,CAAA,CAAA;AAOA,IAAA,4CAAAC,6BAAL;AACLA,2BAAA,SAAU,IAAA;AACVA,2BAAA,QAAS,IAAA;AACTA,2BAAA,QAAS,IAAA;AAHCA,SAAAA;AAAA,GAAA,2BAAA,CAAA,CAAA;AAMA,IAAA,0CAA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e,WAAA,iBAAA,CAAA;AAEA,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,QAAO;AAAA,GAXb,oBAWe,WAAA,aAAA,CAAA;AAEA,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,QAAO;AAAA,GAbb,oBAae,WAAA,cAAA,CAAA;AAEC,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,SAAQ;AAAA,GAfd,oBAegB,WAAA,SAAA,CAAA;AACA,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,SAAQ;AAAA,GAhBd,oBAgBgB,WAAA,YAAA,CAAA;AACD,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,QAAO;AAAA,GAjBb,oBAiBe,WAAA,aAAA,CAAA;AAjBf,sBAAN,gBAAA;AAAA,EADN,cAAc,uBAAuB;AAAA,GACzB,mBAAA;"}
@@ -16,6 +16,7 @@ const compentStyle = css`* {
16
16
  /* This is a hack to make the badge appear above the content */
17
17
  position: relative;
18
18
  top: -20px;
19
+ transform: translateX(-50%);
19
20
  }
20
21
 
21
22
  .badges {
@@ -91,7 +92,7 @@ const compentStyle = css`* {
91
92
  }
92
93
 
93
94
  .header {
94
- width: 140px;
95
+ width: 150px;
95
96
  display: flex;
96
97
  align-items: center;
97
98
  justify-content: space-between;
@@ -1 +1 @@
1
- {"version":3,"file":"automation-tank.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"automation-tank.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"corner-line.d.ts","sourceRoot":"","sources":["../../../src/automation/corner-line/corner-line.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAY,MAAM,KAAK,CAAC;AAE1C,OAAO,EAAC,UAAU,EAAa,QAAQ,EAAY,MAAM,UAAU,CAAC;AAEpE,oBAAY,mBAAmB;IAC7B,QAAQ,cAAc;IACtB,OAAO,aAAa;IACpB,WAAW,iBAAiB;IAC5B,UAAU,gBAAgB;CAC3B;AAED,MAAM,MAAM,uBAAuB,GAC/B,WAAW,GACX,UAAU,GACV,cAAc,GACd,aAAa,CAAC;AAElB,qBACa,aAAc,SAAQ,UAAU;IACjB,MAAM,EAAE,UAAU,CAAqB;IACvC,SAAS,EAAE,uBAAuB,CAC7B;IACL,QAAQ,EAAE,QAAQ,CAAkB;IAErD,MAAM;IA0Hf,OAAgB,MAAM,0BAKpB;CACH;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,iBAAiB,EAAE,aAAa,CAAC;KAClC;CACF"}
1
+ {"version":3,"file":"corner-line.d.ts","sourceRoot":"","sources":["../../../src/automation/corner-line/corner-line.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAY,MAAM,KAAK,CAAC;AAE1C,OAAO,EAAC,UAAU,EAAa,QAAQ,EAAY,MAAM,UAAU,CAAC;AAEpE,oBAAY,mBAAmB;IAC7B,QAAQ,cAAc;IACtB,OAAO,aAAa;IACpB,WAAW,iBAAiB;IAC5B,UAAU,gBAAgB;CAC3B;AAED,MAAM,MAAM,uBAAuB,GAC/B,WAAW,GACX,UAAU,GACV,cAAc,GACd,aAAa,CAAC;AAElB,qBACa,aAAc,SAAQ,UAAU;IACjB,MAAM,EAAE,UAAU,CAAqB;IACvC,SAAS,EAAE,uBAAuB,CAC7B;IACL,QAAQ,EAAE,QAAQ,CAAkB;IAErD,MAAM;IA0Hf,OAAgB,MAAM,0BAWpB;CACH;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,iBAAiB,EAAE,aAAa,CAAC;KAClC;CACF"}
@@ -141,6 +141,12 @@ ObcCornerLine.styles = css`
141
141
  display: block;
142
142
  line-height: 0;
143
143
  }
144
+
145
+ svg {
146
+ position: relative;
147
+ top: -12px;
148
+ left: -12px;
149
+ }
144
150
  `;
145
151
  __decorateClass([
146
152
  property({ type: String })
@@ -1 +1 @@
1
- {"version":3,"file":"corner-line.js","sources":["../../../src/automation/corner-line/corner-line.ts"],"sourcesContent":["import {LitElement, html, css} from 'lit';\nimport {customElement, property} from 'lit/decorators.js';\nimport {LineMedium, lineColor, LineType, lineWidth} from '../index';\n\nexport enum CornerLineDirection {\n topRight = 'top-right',\n topLeft = 'top-left',\n bottomRight = 'bottom-right',\n bottomLeft = 'bottom-left',\n}\n\nexport type CornerLineDirectionType =\n | 'top-right'\n | 'top-left'\n | 'bottom-right'\n | 'bottom-left';\n\n@customElement('obc-corner-line')\nexport class ObcCornerLine extends LitElement {\n @property({type: String}) medium: LineMedium = LineMedium.normal;\n @property({type: String}) direction: CornerLineDirectionType =\n CornerLineDirection.topRight;\n @property({type: String}) lineType: LineType = LineType.fluid;\n\n override render() {\n let rotation = 270;\n if (this.direction === CornerLineDirection.topLeft) {\n rotation = 180;\n } else if (this.direction === CornerLineDirection.bottomLeft) {\n rotation = 90;\n } else if (this.direction === CornerLineDirection.bottomRight) {\n rotation = 0;\n }\n\n if (this.lineType === LineType.connector) {\n return html`\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n transform=\"rotate(${rotation})\"\n >\n <path\n d=\"M16.5 11.5L15 11.5C14.9951 11.5 14.9902 11.5 14.9853 11.5C13.0826 11.5079 11.5382 13.0339 11.5007 14.9294C11.5002 14.9529 11.5 14.9764 11.5 15V16.5L12.5 16.5L12.5 15C12.5 13.6355 13.5932 12.5263 14.9516 12.5005C14.9677 12.5002 14.9838 12.5 15 12.5L16.5 12.5V11.5Z\"\n fill=\"var(--element-neutral-color)\"\n />\n <path\n d=\"M24 11.5H22.5V12.5L24 12.5V11.5Z\"\n fill=\"var(--element-neutral-color)\"\n />\n <path\n d=\"M21 11.5H18V12.5L21 12.5V11.5Z\"\n fill=\"var(--element-neutral-color)\"\n />\n <path\n d=\"M11.5 18V21H12.5L12.5 18H11.5Z\"\n fill=\"var(--element-neutral-color)\"\n />\n <path\n d=\"M11.5 22.5V24H12.5V22.5H11.5Z\"\n fill=\"var(--element-neutral-color)\"\n />\n </svg>\n `;\n }\n\n const color = lineColor(this.medium);\n const width = lineWidth(this.lineType);\n\n const r1 = 6 - 0.5 - width / 2;\n const r2 = 6 + 0.5 + width / 2;\n\n if (this.lineType === LineType.air) {\n const r1 = 2.5;\n const r2 = 11.5;\n return html`\n <svg\n class=\"line\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n height=\"24\"\n width=\"24\"\n transform=\"rotate(${rotation})\"\n >\n <path\n d=\"M 17 24 v -4 a 3 3 0 0 1 3 -3 h 4 v -10 h -6 a 11 11 0 0 0 -11 11 v 6 z\"\n stroke=\"none\"\n fill=\"var(${color.inner})\"\n />\n <path\n d=\"M ${12 +\n 0.5 +\n width / 2} 24 v -4 a ${r1} ${r1} 0 0 1 ${r1} -${r1} h 4\"\n stroke-width=\"1\"\n stroke=\"var(${color.outer})\"\n fill=\"none\"\n />\n <path\n d=\"M ${12 -\n 0.5 -\n width / 2} 24 v -6 a ${r2} ${r2} 0 0 1 ${r2} -${r2} h 6\"\n stroke-width=\"1\"\n stroke=\"var(${color.outer})\"\n fill=\"none\"\n />\n </svg>\n `;\n } else {\n return html`\n <svg\n class=\"line\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n height=\"24\"\n width=\"24\"\n transform=\"rotate(${rotation})\"\n >\n <path\n d=\"M 12 24 v -6 a 6 6 0 0 1 6 -6 h 6\"\n stroke-width=${width}\n stroke=\"var(${color.inner})\"\n fill=\"none\"\n />\n <path\n d=\"M ${12 +\n 0.5 +\n width / 2} 24 v -6 a ${r1} ${r1} 0 0 1 ${r1} -${r1} h 6\"\n stroke-width=\"1\"\n stroke=\"var(${color.outer})\"\n fill=\"none\"\n />\n <path\n d=\"M ${12 -\n 0.5 -\n width / 2} 24 v -6 a ${r2} ${r2} 0 0 1 ${r2} -${r2} h 6\"\n stroke-width=\"1\"\n stroke=\"var(${color.outer})\"\n fill=\"none\"\n />\n </svg>\n `;\n }\n }\n\n static override styles = css`\n :host {\n display: block;\n line-height: 0;\n }\n `;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-corner-line': ObcCornerLine;\n }\n}\n"],"names":["CornerLineDirection","r1","r2"],"mappings":";;;;;;;;;;;;;;AAIY,IAAA,wCAAAA,yBAAL;AACLA,uBAAA,UAAW,IAAA;AACXA,uBAAA,SAAU,IAAA;AACVA,uBAAA,aAAc,IAAA;AACdA,uBAAA,YAAa,IAAA;AAJHA,SAAAA;AAAA,GAAA,uBAAA,CAAA,CAAA;AAcC,IAAA,gBAAN,cAA4B,WAAW;AAAA,EAAvC,cAAA;AAAA,UAAA,GAAA,SAAA;AACqB,SAAA,SAAqB,WAAW;AAExD,SAAA,YAAA;AACwB,SAAA,WAAqB,SAAS;AAAA,EAAA;AAAA,EAE/C,SAAS;AAChB,QAAI,WAAW;AACX,QAAA,KAAK,cAAc,YAA6B;AACvC,iBAAA;AAAA,IAAA,WACF,KAAK,cAAc,eAAgC;AACjD,iBAAA;AAAA,IAAA,WACF,KAAK,cAAc,gBAAiC;AAClD,iBAAA;AAAA,IACb;AAEI,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,CAAC,cAAc,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE;AAAA;AAAA,0BAEpC,MAAM,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA,IAKjC;AAAA,EACF;AAQF;AAtIa,cAgIK,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AA/HC,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,QAAO;AAAA,GADb,cACe,WAAA,UAAA,CAAA;AACA,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,QAAO;AAAA,GAFb,cAEe,WAAA,aAAA,CAAA;AAEA,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,QAAO;AAAA,GAJb,cAIe,WAAA,YAAA,CAAA;AAJf,gBAAN,gBAAA;AAAA,EADN,cAAc,iBAAiB;AAAA,GACnB,aAAA;"}
1
+ {"version":3,"file":"corner-line.js","sources":["../../../src/automation/corner-line/corner-line.ts"],"sourcesContent":["import {LitElement, html, css} from 'lit';\nimport {customElement, property} from 'lit/decorators.js';\nimport {LineMedium, lineColor, LineType, lineWidth} from '../index';\n\nexport enum CornerLineDirection {\n topRight = 'top-right',\n topLeft = 'top-left',\n bottomRight = 'bottom-right',\n bottomLeft = 'bottom-left',\n}\n\nexport type CornerLineDirectionType =\n | 'top-right'\n | 'top-left'\n | 'bottom-right'\n | 'bottom-left';\n\n@customElement('obc-corner-line')\nexport class ObcCornerLine extends LitElement {\n @property({type: String}) medium: LineMedium = LineMedium.normal;\n @property({type: String}) direction: CornerLineDirectionType =\n CornerLineDirection.topRight;\n @property({type: String}) lineType: LineType = LineType.fluid;\n\n override render() {\n let rotation = 270;\n if (this.direction === CornerLineDirection.topLeft) {\n rotation = 180;\n } else if (this.direction === CornerLineDirection.bottomLeft) {\n rotation = 90;\n } else if (this.direction === CornerLineDirection.bottomRight) {\n rotation = 0;\n }\n\n if (this.lineType === LineType.connector) {\n return html`\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n transform=\"rotate(${rotation})\"\n >\n <path\n d=\"M16.5 11.5L15 11.5C14.9951 11.5 14.9902 11.5 14.9853 11.5C13.0826 11.5079 11.5382 13.0339 11.5007 14.9294C11.5002 14.9529 11.5 14.9764 11.5 15V16.5L12.5 16.5L12.5 15C12.5 13.6355 13.5932 12.5263 14.9516 12.5005C14.9677 12.5002 14.9838 12.5 15 12.5L16.5 12.5V11.5Z\"\n fill=\"var(--element-neutral-color)\"\n />\n <path\n d=\"M24 11.5H22.5V12.5L24 12.5V11.5Z\"\n fill=\"var(--element-neutral-color)\"\n />\n <path\n d=\"M21 11.5H18V12.5L21 12.5V11.5Z\"\n fill=\"var(--element-neutral-color)\"\n />\n <path\n d=\"M11.5 18V21H12.5L12.5 18H11.5Z\"\n fill=\"var(--element-neutral-color)\"\n />\n <path\n d=\"M11.5 22.5V24H12.5V22.5H11.5Z\"\n fill=\"var(--element-neutral-color)\"\n />\n </svg>\n `;\n }\n\n const color = lineColor(this.medium);\n const width = lineWidth(this.lineType);\n\n const r1 = 6 - 0.5 - width / 2;\n const r2 = 6 + 0.5 + width / 2;\n\n if (this.lineType === LineType.air) {\n const r1 = 2.5;\n const r2 = 11.5;\n return html`\n <svg\n class=\"line\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n height=\"24\"\n width=\"24\"\n transform=\"rotate(${rotation})\"\n >\n <path\n d=\"M 17 24 v -4 a 3 3 0 0 1 3 -3 h 4 v -10 h -6 a 11 11 0 0 0 -11 11 v 6 z\"\n stroke=\"none\"\n fill=\"var(${color.inner})\"\n />\n <path\n d=\"M ${12 +\n 0.5 +\n width / 2} 24 v -4 a ${r1} ${r1} 0 0 1 ${r1} -${r1} h 4\"\n stroke-width=\"1\"\n stroke=\"var(${color.outer})\"\n fill=\"none\"\n />\n <path\n d=\"M ${12 -\n 0.5 -\n width / 2} 24 v -6 a ${r2} ${r2} 0 0 1 ${r2} -${r2} h 6\"\n stroke-width=\"1\"\n stroke=\"var(${color.outer})\"\n fill=\"none\"\n />\n </svg>\n `;\n } else {\n return html`\n <svg\n class=\"line\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n height=\"24\"\n width=\"24\"\n transform=\"rotate(${rotation})\"\n >\n <path\n d=\"M 12 24 v -6 a 6 6 0 0 1 6 -6 h 6\"\n stroke-width=${width}\n stroke=\"var(${color.inner})\"\n fill=\"none\"\n />\n <path\n d=\"M ${12 +\n 0.5 +\n width / 2} 24 v -6 a ${r1} ${r1} 0 0 1 ${r1} -${r1} h 6\"\n stroke-width=\"1\"\n stroke=\"var(${color.outer})\"\n fill=\"none\"\n />\n <path\n d=\"M ${12 -\n 0.5 -\n width / 2} 24 v -6 a ${r2} ${r2} 0 0 1 ${r2} -${r2} h 6\"\n stroke-width=\"1\"\n stroke=\"var(${color.outer})\"\n fill=\"none\"\n />\n </svg>\n `;\n }\n }\n\n static override styles = css`\n :host {\n display: block;\n line-height: 0;\n }\n\n svg {\n position: relative;\n top: -12px;\n left: -12px;\n }\n `;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-corner-line': ObcCornerLine;\n }\n}\n"],"names":["CornerLineDirection","r1","r2"],"mappings":";;;;;;;;;;;;;;AAIY,IAAA,wCAAAA,yBAAL;AACLA,uBAAA,UAAW,IAAA;AACXA,uBAAA,SAAU,IAAA;AACVA,uBAAA,aAAc,IAAA;AACdA,uBAAA,YAAa,IAAA;AAJHA,SAAAA;AAAA,GAAA,uBAAA,CAAA,CAAA;AAcC,IAAA,gBAAN,cAA4B,WAAW;AAAA,EAAvC,cAAA;AAAA,UAAA,GAAA,SAAA;AACqB,SAAA,SAAqB,WAAW;AAExD,SAAA,YAAA;AACwB,SAAA,WAAqB,SAAS;AAAA,EAAA;AAAA,EAE/C,SAAS;AAChB,QAAI,WAAW;AACX,QAAA,KAAK,cAAc,YAA6B;AACvC,iBAAA;AAAA,IAAA,WACF,K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EAAE,KAAK,EAAE;AAAA;AAAA,0BAEpC,MAAM,KAAK;AAAA;AAAA;AAAA;AAAA,mBAIlB,KACP,MACA,QAAQ,CAAC,cAAc,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE;AAAA;AAAA,0BAEpC,MAAM,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA,IAKjC;AAAA,EACF;AAcF;AA5Ia,cAgIK,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA/HC,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,QAAO;AAAA,GADb,cACe,WAAA,UAAA,CAAA;AACA,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,QAAO;AAAA,GAFb,cAEe,WAAA,aAAA,CAAA;AAEA,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,QAAO;AAAA,GAJb,cAIe,WAAA,YAAA,CAAA;AAJf,gBAAN,gBAAA;AAAA,EADN,cAAc,iBAAiB;AAAA,GACnB,aAAA;"}
@@ -1 +1 @@
1
- {"version":3,"file":"direction-line.d.ts","sourceRoot":"","sources":["../../../src/automation/direction-line/direction-line.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAY,MAAM,KAAK,CAAC;AAE1C,OAAO,EAAC,UAAU,EAAE,QAAQ,EAAuB,MAAM,IAAI,CAAC;AAE9D,qBACa,gBAAiB,SAAQ,UAAU;IACpB,MAAM,EAAE,UAAU,CAAqB;IACvC,QAAQ,EAAE,QAAQ,CAAkB;IAErD,MAAM;IA0Cf,OAAgB,MAAM,0BAKpB;CACH;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,oBAAoB,EAAE,gBAAgB,CAAC;KACxC;CACF"}
1
+ {"version":3,"file":"direction-line.d.ts","sourceRoot":"","sources":["../../../src/automation/direction-line/direction-line.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAY,MAAM,KAAK,CAAC;AAE1C,OAAO,EAAC,UAAU,EAAE,QAAQ,EAAuB,MAAM,IAAI,CAAC;AAE9D,qBACa,gBAAiB,SAAQ,UAAU;IACpB,MAAM,EAAE,UAAU,CAAqB;IACvC,QAAQ,EAAE,QAAQ,CAAkB;IAErD,MAAM;IA0Cf,OAAgB,MAAM,0BAUpB;CACH;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,oBAAoB,EAAE,gBAAgB,CAAC;KACxC;CACF"}
@@ -64,6 +64,11 @@ ObcDirectionLine.styles = css`
64
64
  display: block;
65
65
  line-height: 0;
66
66
  }
67
+
68
+ svg {
69
+ position: relative;
70
+ top: -12px;
71
+ }
67
72
  `;
68
73
  __decorateClass([
69
74
  property({ type: String })
@@ -1 +1 @@
1
- {"version":3,"file":"direction-line.js","sources":["../../../src/automation/direction-line/direction-line.ts"],"sourcesContent":["import {LitElement, css, html} from 'lit';\nimport {customElement, property} from 'lit/decorators.js';\nimport {LineMedium, LineType, lineColor, lineWidth} from '..';\n\n@customElement('obc-direction-line')\nexport class ObcDirectionLine extends LitElement {\n @property({type: String}) medium: LineMedium = LineMedium.normal;\n @property({type: String}) lineType: LineType = LineType.fluid;\n\n override render() {\n if (this.lineType === LineType.connector) {\n throw new Error('Connector line type not supported for line overlap');\n }\n\n const color = lineColor(this.medium);\n const width = lineWidth(this.lineType) + 1;\n const h = width / 2;\n return html`\n <svg\n class=\"line\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n mask=\"url(#clip)\"\n d=\"M-1 ${12 - h}H25v${width}H-1z\"\n fill=\"var(${color.inner})\"\n stroke=\"var(${color.outer})\"\n />\n <path\n transform=\"translate(8 6)\"\n d=\"M0.5 0L6.5 6L0.5 12H3.31068L9.31068 6L3.31068 0H0.5Z\"\n fill=\"var(${color.outer})\"\n />\n <defs>\n <mask id=\"clip\">\n <rect width=\"100%\" height=\"100%\" fill=\"white\" />\n <path\n transform=\"translate(6.5 6)\"\n d=\"M0.5 0L6.5 6L0.5 12v1H6.31068v-1L12.31068 6L6.31068 0v-1H0.5v1Z\"\n fill=\"black\"\n />\n </mask>\n </defs>\n </svg>\n `;\n }\n\n static override styles = css`\n :host {\n display: block;\n line-height: 0;\n }\n `;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-direction-line': ObcDirectionLine;\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAKa,IAAA,mBAAN,cAA+B,WAAW;AAAA,EAA1C,cAAA;AAAA,UAAA,GAAA,SAAA;AACqB,SAAA,SAAqB,WAAW;AAChC,SAAA,WAAqB,SAAS;AAAA,EAAA;AAAA,EAE/C,SAAS;AACZ,QAAA,KAAK,aAAa,SAAS,WAAW;AAClC,YAAA,IAAI,MAAM,oDAAoD;AAAA,IACtE;AAEM,UAAA,QAAQ,UAAU,KAAK,MAAM;AACnC,UAAM,QAAQ,UAAU,KAAK,QAAQ,IAAI;AACzC,UAAM,IAAI,QAAQ;AACX,WAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAWQ,KAAK,CAAC,OAAO,KAAK;AAAA,sBACf,MAAM,KAAK;AAAA,wBACT,MAAM,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA,sBAKb,MAAM,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAc/B;AAQF;AApDa,iBA8CK,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AA7CC,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,QAAO;AAAA,GADb,iBACe,WAAA,UAAA,CAAA;AACA,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,QAAO;AAAA,GAFb,iBAEe,WAAA,YAAA,CAAA;AAFf,mBAAN,gBAAA;AAAA,EADN,cAAc,oBAAoB;AAAA,GACtB,gBAAA;"}
1
+ {"version":3,"file":"direction-line.js","sources":["../../../src/automation/direction-line/direction-line.ts"],"sourcesContent":["import {LitElement, css, html} from 'lit';\nimport {customElement, property} from 'lit/decorators.js';\nimport {LineMedium, LineType, lineColor, lineWidth} from '..';\n\n@customElement('obc-direction-line')\nexport class ObcDirectionLine extends LitElement {\n @property({type: String}) medium: LineMedium = LineMedium.normal;\n @property({type: String}) lineType: LineType = LineType.fluid;\n\n override render() {\n if (this.lineType === LineType.connector) {\n throw new Error('Connector line type not supported for line overlap');\n }\n\n const color = lineColor(this.medium);\n const width = lineWidth(this.lineType) + 1;\n const h = width / 2;\n return html`\n <svg\n class=\"line\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n mask=\"url(#clip)\"\n d=\"M-1 ${12 - h}H25v${width}H-1z\"\n fill=\"var(${color.inner})\"\n stroke=\"var(${color.outer})\"\n />\n <path\n transform=\"translate(8 6)\"\n d=\"M0.5 0L6.5 6L0.5 12H3.31068L9.31068 6L3.31068 0H0.5Z\"\n fill=\"var(${color.outer})\"\n />\n <defs>\n <mask id=\"clip\">\n <rect width=\"100%\" height=\"100%\" fill=\"white\" />\n <path\n transform=\"translate(6.5 6)\"\n d=\"M0.5 0L6.5 6L0.5 12v1H6.31068v-1L12.31068 6L6.31068 0v-1H0.5v1Z\"\n fill=\"black\"\n />\n </mask>\n </defs>\n </svg>\n `;\n }\n\n static override styles = css`\n :host {\n display: block;\n line-height: 0;\n }\n\n svg {\n position: relative;\n top: -12px;\n }\n `;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-direction-line': ObcDirectionLine;\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAKa,IAAA,mBAAN,cAA+B,WAAW;AAAA,EAA1C,cAAA;AAAA,UAAA,GAAA,SAAA;AACqB,SAAA,SAAqB,WAAW;AAChC,SAAA,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qB;IACvC,SAAS,EAAE,iBAAiB,CAC9B;IACE,QAAQ,EAAE,QAAQ,CAAkB;IAErD,MAAM;IAsDf,OAAgB,MAAM,0BAKpB;CACH;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,oBAAoB,EAAE,eAAe,CAAC;KACvC;CACF"}
1
+ {"version":3,"file":"end-point-line.d.ts","sourceRoot":"","sources":["../../../src/automation/end-point-line/end-point-line.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAY,MAAM,KAAK,CAAC;AAE1C,OAAO,EAAC,UAAU,EAAE,QAAQ,EAAuB,MAAM,IAAI,CAAC;AAC9D,oBAAY,iBAAiB;IAC3B,GAAG,QAAQ;IACX,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,IAAI,SAAS;CACd;AAED,qBACa,eAAgB,SAAQ,UAAU;IACnB,MAAM,EAAE,UAAU,CAAqB;IACvC,SAAS,EAAE,iBAAiB,CAC9B;IACE,QAAQ,EAAE,QAAQ,CAAkB;IAErD,MAAM;IAuDf,OAAgB,MAAM,0BA2BpB;CACH;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,oBAAoB,EAAE,eAAe,CAAC;KACvC;CACF"}
@@ -65,6 +65,7 @@ let ObcEndPointLine = class extends LitElement {
65
65
  fill="none"
66
66
  xmlns="http://www.w3.org/2000/svg"
67
67
  transform="rotate(${rotation})"
68
+ class="${this.direction}"
68
69
  >
69
70
  <path
70
71
  d="M${12 - h} 25 V${12 + h}h-${(terminalWidth - width) / 2}v-${width}h${terminalWidth}v${width}h-${(terminalWidth - width) / 2}V25Z"
@@ -80,6 +81,28 @@ ObcEndPointLine.styles = css`
80
81
  display: block;
81
82
  line-height: 0;
82
83
  }
84
+
85
+ svg {
86
+ position: relative;
87
+
88
+ &.top,
89
+ &.bottom {
90
+ left: -12px;
91
+ }
92
+
93
+ &.bottom {
94
+ top: -24px;
95
+ }
96
+
97
+ &.left,
98
+ &.right {
99
+ top: -12px;
100
+ }
101
+
102
+ &.right {
103
+ left: -24px;
104
+ }
105
+ }
83
106
  `;
84
107
  __decorateClass([
85
108
  property({ type: String })
@@ -1 +1 @@
1
- {"version":3,"file":"end-point-line.js","sources":["../../../src/automation/end-point-line/end-point-line.ts"],"sourcesContent":["import {LitElement, css, html} from 'lit';\nimport {customElement, property} from 'lit/decorators.js';\nimport {LineMedium, LineType, lineColor, lineWidth} from '..';\nexport enum EndPointDirection {\n top = 'top',\n right = 'right',\n bottom = 'bottom',\n left = 'left',\n}\n\n@customElement('obc-end-point-line')\nexport class ObcEndPointLine extends LitElement {\n @property({type: String}) medium: LineMedium = LineMedium.normal;\n @property({type: String}) direction: EndPointDirection =\n EndPointDirection.top;\n @property({type: String}) lineType: LineType = LineType.fluid;\n\n override render() {\n let rotation = 0;\n if (this.direction === EndPointDirection.top) {\n rotation = 180;\n } else if (this.direction === EndPointDirection.right) {\n rotation = 270;\n } else if (this.direction === EndPointDirection.bottom) {\n rotation = 0;\n } else if (this.direction === EndPointDirection.left) {\n rotation = 90;\n }\n\n if (this.lineType === LineType.connector) {\n throw new Error(\n 'Connector line type is not supported for end-point line'\n );\n }\n\n const color = lineColor(this.medium);\n const width = lineWidth(this.lineType) + 1;\n const h = width / 2;\n let terminalWidth: number;\n if (this.lineType === LineType.electric) {\n terminalWidth = 15;\n } else if (this.lineType === LineType.air) {\n terminalWidth = 22;\n } else if (this.lineType === LineType.fluid) {\n terminalWidth = 16;\n } else {\n throw new Error('Invalid line type');\n }\n terminalWidth -= 1;\n\n return html`\n <svg\n class=\"line\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n transform=\"rotate(${rotation})\"\n >\n <path\n d=\"M${12 - h} 25 V${12 + h}h-${(terminalWidth - width) /\n 2}v-${width}h${terminalWidth}v${width}h-${(terminalWidth - width) /\n 2}V25Z\"\n fill=\"var(${color.inner})\"\n stroke=\"var(${color.outer})\"\n />\n </svg>\n `;\n }\n\n static override styles = css`\n :host {\n display: block;\n line-height: 0;\n }\n `;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-end-point-line': ObcEndPointLine;\n }\n}\n"],"names":["EndPointDirection"],"mappings":";;;;;;;;;;;;;;AAGY,IAAA,sCAAAA,uBAAL;AACLA,qBAAA,KAAM,IAAA;AACNA,qBAAA,OAAQ,IAAA;AACRA,qBAAA,QAAS,IAAA;AACTA,qBAAA,MAAO,IAAA;AAJGA,SAAAA;AAAA,GAAA,qBAAA,CAAA,CAAA;AAQC,IAAA,kBAAN,cAA8B,WAAW;AAAA,EAAzC,cAAA;AAAA,UAAA,GAAA,SAAA;AACqB,SAAA,SAAqB,WAAW;AAExD,SAAA,YAAA;AACwB,SAAA,WAAqB,SAAS;AAAA,EAAA;AAAA,EAE/C,SAAS;AAChB,QAAI,WAAW;AACX,QAAA,KAAK,cAAc,OAAuB;AACjC,iBAAA;AAAA,IAAA,WACF,KAAK,cAAc,SAAyB;AAC1C,iBAAA;AAAA,IAAA,WACF,KAAK,cAAc,UAA0B;AAC3C,iBAAA;AAAA,IAAA,WACF,KAAK,cAAc,QAAwB;AACzC,iBAAA;AAAA,IACb;AAEI,QAAA,KAAK,aAAa,SAAS,WAAW;AACxC,YAAM,IAAI;AAAA,QACR;AAAA,MAAA;AAAA,IAEJ;AAEM,UAAA,QAAQ,UAAU,KAAK,MAAM;AACnC,UAAM,QAAQ,UAAU,KAAK,QAAQ,IAAI;AACzC,UAAM,IAAI,QAAQ;AACd,QAAA;AACA,QAAA,KAAK,aAAa,SAAS,UAAU;AACvB,sBAAA;AAAA,IACP,WAAA,KAAK,aAAa,SAAS,KAAK;AACzB,sBAAA;AAAA,IACP,WAAA,KAAK,aAAa,SAAS,OAAO;AAC3B,sBAAA;AAAA,IAAA,OACX;AACC,YAAA,IAAI,MAAM,mBAAmB;AAAA,IACrC;AACiB,qBAAA;AAEV,WAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAQiB,QAAQ;AAAA;AAAA;AAAA,gBAGpB,KAAK,CAAC,QAAQ,KAAK,CAAC,MAAM,gBAAgB,SAChD,CAAC,KAAK,KAAK,IAAI,aAAa,IAAI,KAAK,MAAM,gBAAgB,SAC3D,CAAC;AAAA,sBACW,MAAM,KAAK;AAAA,wBACT,MAAM,KAAK;AAAA;AAAA;AAAA;AAAA,EAIjC;AAQF;AAlEa,gBA4DK,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AA3DC,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,QAAO;AAAA,GADb,gBACe,WAAA,UAAA,CAAA;AACA,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,QAAO;AAAA,GAFb,gBAEe,WAAA,aAAA,CAAA;AAEA,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,QAAO;AAAA,GAJb,gBAIe,WAAA,YAAA,CAAA;AAJf,kBAAN,gBAAA;AAAA,EADN,cAAc,oBAAoB;AAAA,GACtB,eAAA;"}
1
+ {"version":3,"file":"end-point-line.js","sources":["../../../src/automation/end-point-line/end-point-line.ts"],"sourcesContent":["import {LitElement, css, html} from 'lit';\nimport {customElement, property} from 'lit/decorators.js';\nimport {LineMedium, LineType, lineColor, lineWidth} from '..';\nexport enum EndPointDirection {\n top = 'top',\n right = 'right',\n bottom = 'bottom',\n left = 'left',\n}\n\n@customElement('obc-end-point-line')\nexport class ObcEndPointLine extends LitElement {\n @property({type: String}) medium: LineMedium = LineMedium.normal;\n @property({type: String}) direction: EndPointDirection =\n EndPointDirection.top;\n @property({type: String}) lineType: LineType = LineType.fluid;\n\n override render() {\n let rotation = 0;\n if (this.direction === EndPointDirection.top) {\n rotation = 180;\n } else if (this.direction === EndPointDirection.right) {\n rotation = 270;\n } else if (this.direction === EndPointDirection.bottom) {\n rotation = 0;\n } else if (this.direction === EndPointDirection.left) {\n rotation = 90;\n }\n\n if (this.lineType === LineType.connector) {\n throw new Error(\n 'Connector line type is not supported for end-point line'\n );\n }\n\n const color = lineColor(this.medium);\n const width = lineWidth(this.lineType) + 1;\n const h = width / 2;\n let terminalWidth: number;\n if (this.lineType === LineType.electric) {\n terminalWidth = 15;\n } else if (this.lineType === LineType.air) {\n terminalWidth = 22;\n } else if (this.lineType === LineType.fluid) {\n terminalWidth = 16;\n } else {\n throw new Error('Invalid line type');\n }\n terminalWidth -= 1;\n\n return html`\n <svg\n class=\"line\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n transform=\"rotate(${rotation})\"\n class=\"${this.direction}\"\n >\n <path\n d=\"M${12 - h} 25 V${12 + h}h-${(terminalWidth - width) /\n 2}v-${width}h${terminalWidth}v${width}h-${(terminalWidth - width) /\n 2}V25Z\"\n fill=\"var(${color.inner})\"\n stroke=\"var(${color.outer})\"\n />\n </svg>\n `;\n }\n\n static override styles = css`\n :host {\n display: block;\n line-height: 0;\n }\n\n svg {\n position: relative;\n\n &.top,\n &.bottom {\n left: -12px;\n }\n\n &.bottom {\n top: -24px;\n }\n\n &.left,\n &.right {\n top: -12px;\n }\n\n &.right {\n left: -24px;\n }\n }\n `;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-end-point-line': ObcEndPointLine;\n }\n}\n"],"names":["EndPointDirection"],"mappings":";;;;;;;;;;;;;;AAGY,IAAA,sCAAAA,uBAAL;AACLA,qBAAA,KAAM,IAAA;AACNA,qBAAA,OAAQ,IAAA;AACRA,qBAAA,QAAS,IAAA;AACTA,qBAAA,MAAO,IAAA;AAJGA,SAAAA;AAAA,GAAA,qBAAA,CAAA,CAAA;AAQC,IAAA,kBAAN,cAA8B,WAAW;AAAA,EAAzC,cAAA;AAAA,UAAA,GAAA,SAAA;AACqB,SAAA,SAAqB,WAAW;AAExD,SAAA,YAAA;AACwB,SAAA,WAAqB,SAAS;AAAA,EAAA;AAAA,EAE/C,SA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AO;AAAA,GADb,gBACe,WAAA,UAAA,CAAA;AACA,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,QAAO;AAAA,GAFb,gBAEe,WAAA,aAAA,CAAA;AAEA,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,QAAO;AAAA,GAJb,gBAIe,WAAA,YAAA,CAAA;AAJf,kBAAN,gBAAA;AAAA,EADN,cAAc,oBAAoB;AAAA,GACtB,eAAA;"}
@@ -1 +1 @@
1
- {"version":3,"file":"horizontal-line.d.ts","sourceRoot":"","sources":["../../../src/automation/horizontal-line/horizontal-line.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAY,MAAM,KAAK,CAAC;AAE1C,OAAO,EAAC,UAAU,EAAa,QAAQ,EAAY,MAAM,UAAU,CAAC;AAEpE,qBACa,iBAAkB,SAAQ,UAAU;IACrB,MAAM,EAAE,UAAU,CAAqB;IACvC,QAAQ,EAAE,QAAQ,CAAkB;IACpC,MAAM,EAAE,MAAM,CAAK;IAEpC,MAAM;IAiEf,OAAgB,MAAM,0BASpB;CACH;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,qBAAqB,EAAE,iBAAiB,CAAC;KAC1C;CACF"}
1
+ {"version":3,"file":"horizontal-line.d.ts","sourceRoot":"","sources":["../../../src/automation/horizontal-line/horizontal-line.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAY,MAAM,KAAK,CAAC;AAE1C,OAAO,EAAC,UAAU,EAAa,QAAQ,EAAY,MAAM,UAAU,CAAC;AAEpE,qBACa,iBAAkB,SAAQ,UAAU;IACrB,MAAM,EAAE,UAAU,CAAqB;IACvC,QAAQ,EAAE,QAAQ,CAAkB;IACpC,MAAM,EAAE,MAAM,CAAK;IAEpC,MAAM;IAiEf,OAAgB,MAAM,0BAUpB;CACH;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,qBAAqB,EAAE,iBAAiB,CAAC;KAC1C;CACF"}
@@ -87,9 +87,10 @@ ObcHorizontalLine.styles = css`
87
87
  display: block;
88
88
  line-height: 0;
89
89
  }
90
- .line {
90
+ svg {
91
91
  position: relative;
92
92
  left: -0.5px;
93
+ top: -12px;
93
94
  }
94
95
  `;
95
96
  __decorateClass([
@@ -1 +1 @@
1
- {"version":3,"file":"horizontal-line.js","sources":["../../../src/automation/horizontal-line/horizontal-line.ts"],"sourcesContent":["import {LitElement, html, css} from 'lit';\nimport {customElement, property} from 'lit/decorators.js';\nimport {LineMedium, lineColor, LineType, lineWidth} from '../index';\n\n@customElement('obc-horizontal-line')\nexport class ObcHorizontalLine extends LitElement {\n @property({type: String}) medium: LineMedium = LineMedium.normal;\n @property({type: String}) lineType: LineType = LineType.fluid;\n @property({type: Number}) length: number = 1;\n\n override render() {\n if (this.lineType === LineType.connector) {\n const length = this.length * 24;\n return html`<svg\n width=\"${length}\"\n height=\"24\"\n viewBox=\"0 0 ${length} 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <line\n x1=\"0\"\n y1=\"12\"\n x2=\"${length}\"\n y2=\"12\"\n stroke-width=\"1\"\n stroke=\"var(--element-neutral-color)\"\n stroke-dasharray=\"4,2\"\n stroke-dashoffset=\"2\"\n />\n </svg> `;\n }\n\n const color = lineColor(this.medium);\n const length = this.length * 24 + 1;\n const width = lineWidth(this.lineType);\n\n return html`\n <div class=\"wrapper\" style=\"height: 24px; width: ${this.length * 24}px;\">\n <svg\n class=\"line\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"-.5 0 ${length} 24\"\n height=\"24\"\n width=${length}\n >\n <line\n x1=\"-0.5\"\n y1=\"12\"\n x2=\"${length - 0.5}\"\n y2=\"12\"\n stroke-width=${width}\n stroke=\"var(${color.inner})\"\n />\n <line\n x1=\"-0.5\"\n y1=\"${12 - 0.5 - width / 2}\"\n x2=\"${length - 0.5}\"\n y2=\"${12 - 0.5 - width / 2}\"\n stroke-width=\"1\"\n stroke=\"var(${color.outer})\"\n />\n <line\n x1=\"-0.5\"\n y1=\"${12 + 0.5 + width / 2}\"\n x2=\"${length - 0.5}\"\n y2=\"${12 + 0.5 + width / 2}\"\n stroke-width=\"1\"\n stroke=\"var(${color.outer})\"\n />\n </svg>\n </div>\n `;\n }\n\n static override styles = css`\n :host {\n display: block;\n line-height: 0;\n }\n .line {\n position: relative;\n left: -0.5px;\n }\n `;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-horizontal-line': ObcHorizontalLine;\n }\n}\n"],"names":["length"],"mappings":";;;;;;;;;;;;;;AAKa,IAAA,oBAAN,cAAgC,WAAW;AAAA,EAA3C,cAAA;AAAA,UAAA,GAAA,SAAA;AACqB,SAAA,SAAqB,WAAW;AAChC,SAAA,WAAqB,SAAS;AACb,SAAA,SAAA;AAAA,EAAA;AAAA,EAElC,SAAS;AACZ,QAAA,KAAK,aAAa,SAAS,WAAW;AAClCA,YAAAA,UAAS,KAAK,SAAS;AACtB,aAAA;AAAA,iBACIA,OAAM;AAAA;AAAA,uBAEAA,OAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAObA,OAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQlB;AAEM,UAAA,QAAQ,UAAU,KAAK,MAAM;AAC7B,UAAA,SAAS,KAAK,SAAS,KAAK;AAC5B,UAAA,QAAQ,UAAU,KAAK,QAAQ;AAE9B,WAAA;AAAA,yDAC8C,KAAK,SAAS,EAAE;AAAA;AAAA;AAAA;AAAA,2BAI9C,MAAM;AAAA;AAAA,kBAEf,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA,kBAKN,SAAS,GAAG;AAAA;AAAA,2BAEH,KAAK;AAAA,0BACN,MAAM,KAAK;AAAA;AAAA;AAAA;AAAA,kBAInB,KAAK,MAAM,QAAQ,CAAC;AAAA,kBACpB,SAAS,GAAG;AAAA,kBACZ,KAAK,MAAM,QAAQ,CAAC;AAAA;AAAA,0BAEZ,MAAM,KAAK;AAAA;AAAA;AAAA;AAAA,kBAInB,KAAK,MAAM,QAAQ,CAAC;AAAA,kBACpB,SAAS,GAAG;AAAA,kBACZ,KAAK,MAAM,QAAQ,CAAC;AAAA;AAAA,0BAEZ,MAAM,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA,EAKnC;AAYF;AAhFa,kBAsEK,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AArEC,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,QAAO;AAAA,GADb,kBACe,WAAA,UAAA,CAAA;AACA,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,QAAO;AAAA,GAFb,kBAEe,WAAA,YAAA,CAAA;AACA,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,QAAO;AAAA,GAHb,kBAGe,WAAA,UAAA,CAAA;AAHf,oBAAN,gBAAA;AAAA,EADN,cAAc,qBAAqB;AAAA,GACvB,iBAAA;"}
1
+ {"version":3,"file":"horizontal-line.js","sources":["../../../src/automation/horizontal-line/horizontal-line.ts"],"sourcesContent":["import {LitElement, html, css} from 'lit';\nimport {customElement, property} from 'lit/decorators.js';\nimport {LineMedium, lineColor, LineType, lineWidth} from '../index';\n\n@customElement('obc-horizontal-line')\nexport class ObcHorizontalLine extends LitElement {\n @property({type: String}) medium: LineMedium = LineMedium.normal;\n @property({type: String}) lineType: LineType = LineType.fluid;\n @property({type: Number}) length: number = 1;\n\n override render() {\n if (this.lineType === LineType.connector) {\n const length = this.length * 24;\n return html`<svg\n width=\"${length}\"\n height=\"24\"\n viewBox=\"0 0 ${length} 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <line\n x1=\"0\"\n y1=\"12\"\n x2=\"${length}\"\n y2=\"12\"\n stroke-width=\"1\"\n stroke=\"var(--element-neutral-color)\"\n stroke-dasharray=\"4,2\"\n stroke-dashoffset=\"2\"\n />\n </svg> `;\n }\n\n const color = lineColor(this.medium);\n const length = this.length * 24 + 1;\n const width = lineWidth(this.lineType);\n\n return html`\n <div class=\"wrapper\" style=\"height: 24px; width: ${this.length * 24}px;\">\n <svg\n class=\"line\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"-.5 0 ${length} 24\"\n height=\"24\"\n width=${length}\n >\n <line\n x1=\"-0.5\"\n y1=\"12\"\n x2=\"${length - 0.5}\"\n y2=\"12\"\n stroke-width=${width}\n stroke=\"var(${color.inner})\"\n />\n <line\n x1=\"-0.5\"\n y1=\"${12 - 0.5 - width / 2}\"\n x2=\"${length - 0.5}\"\n y2=\"${12 - 0.5 - width / 2}\"\n stroke-width=\"1\"\n stroke=\"var(${color.outer})\"\n />\n <line\n x1=\"-0.5\"\n y1=\"${12 + 0.5 + width / 2}\"\n x2=\"${length - 0.5}\"\n y2=\"${12 + 0.5 + width / 2}\"\n stroke-width=\"1\"\n stroke=\"var(${color.outer})\"\n />\n </svg>\n </div>\n `;\n }\n\n static override styles = css`\n :host {\n display: block;\n line-height: 0;\n }\n svg {\n position: relative;\n left: -0.5px;\n top: -12px;\n }\n `;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-horizontal-line': ObcHorizontalLine;\n }\n}\n"],"names":["length"],"mappings":";;;;;;;;;;;;;;AAKa,IAAA,oBAAN,cAAgC,WAAW;AAAA,EAA3C,cAAA;AAAA,UAAA,GAAA,SAAA;AACqB,SAAA,SAAqB,WAAW;AAChC,SAAA,WAAqB,SAAS;AACb,SAAA,SAAA;AAAA,EAAA;AAAA,EAElC,SAAS;AACZ,QAAA,KAAK,aAAa,SAAS,WAAW;AAClCA,YAAAA,UAAS,KAAK,SAAS;AACtB,aAAA;AAAA,iBACIA,OAAM;AAAA;AAAA,uBAEAA,OAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAObA,OAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQlB;AAEM,UAAA,QAA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AU,EAAE,QAAQ,EAAuB,MAAM,IAAI,CAAC;AAE9D,qBACa,YAAa,SAAQ,UAAU;IAChB,MAAM,EAAE,UAAU,CAAqB;IACvC,QAAQ,EAAE,QAAQ,CAAkB;IAErD,MAAM;IA+Ff,OAAgB,MAAM,0BAKpB;CACH;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,gBAAgB,EAAE,YAAY,CAAC;KAChC;CACF"}
1
+ {"version":3,"file":"line-cross.d.ts","sourceRoot":"","sources":["../../../src/automation/line-cross/line-cross.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAY,MAAM,KAAK,CAAC;AAE1C,OAAO,EAAC,UAAU,EAAE,QAAQ,EAAuB,MAAM,IAAI,CAAC;AAE9D,qBACa,YAAa,SAAQ,UAAU;IAChB,MAAM,EAAE,UAAU,CAAqB;IACvC,QAAQ,EAAE,QAAQ,CAAkB;IAErD,MAAM;IA+Ff,OAAgB,MAAM,0BAWpB;CACH;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,gBAAgB,EAAE,YAAY,CAAC;KAChC;CACF"}
@@ -114,6 +114,12 @@ ObcLineCross.styles = css`
114
114
  display: block;
115
115
  line-height: 0;
116
116
  }
117
+
118
+ svg {
119
+ position: relative;
120
+ top: -12px;
121
+ left: -12px;
122
+ }
117
123
  `;
118
124
  __decorateClass([
119
125
  property({ type: String })
@@ -1 +1 @@
1
- {"version":3,"file":"line-cross.js","sources":["../../../src/automation/line-cross/line-cross.ts"],"sourcesContent":["import {LitElement, css, html} from 'lit';\nimport {customElement, property} from 'lit/decorators.js';\nimport {LineMedium, LineType, lineColor, lineWidth} from '..';\n\n@customElement('obc-line-cross')\nexport class ObcLineCross extends LitElement {\n @property({type: String}) medium: LineMedium = LineMedium.normal;\n @property({type: String}) lineType: LineType = LineType.fluid;\n\n override render() {\n if (this.lineType === LineType.connector) {\n return html`\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M11.5 1.83333V0H12.5V1.83333H11.5Z\"\n fill=\"var(--element-neutral-color)\"\n />\n <path\n d=\"M11.5 7.33333V3.66667H12.5V7.33333H11.5Z\"\n fill=\"var(--element-neutral-color)\"\n />\n <path\n d=\"M11.5 11V9.16667H12.5V11H11.5Z\"\n fill=\"var(--element-neutral-color)\"\n />\n <path\n d=\"M0 12.5H2V11.5H0V12.5Z\"\n fill=\"var(--element-neutral-color)\"\n />\n <path\n d=\"M4 12.5H8V11.5H4V12.5Z\"\n fill=\"var(--element-neutral-color)\"\n />\n <path\n d=\"M10 12.5H14V11.5H10V12.5Z\"\n fill=\"var(--element-neutral-color)\"\n />\n <path\n d=\"M16 12.5H20V11.5H16V12.5Z\"\n fill=\"var(--element-neutral-color)\"\n />\n <path\n d=\"M22 12.5H24V11.5H22V12.5Z\"\n fill=\"var(--element-neutral-color)\"\n />\n <path\n d=\"M11.5 13V14.8333H12.5V13H11.5Z\"\n fill=\"var(--element-neutral-color)\"\n />\n <path\n d=\"M11.5 16.6667V20.3333H12.5V16.6667H11.5Z\"\n fill=\"var(--element-neutral-color)\"\n />\n <path\n d=\"M11.5 22.1667V24H12.5V22.1667H11.5Z\"\n fill=\"var(--element-neutral-color)\"\n />\n </svg>\n `;\n }\n\n const color = lineColor(this.medium);\n const width = lineWidth(this.lineType) + 1;\n const h = width / 2;\n\n let r: number;\n if (this.lineType === LineType.electric) {\n r = 4.5;\n } else if (this.lineType === LineType.air) {\n r = 10;\n } else if (this.lineType === LineType.fluid) {\n r = 6;\n } else {\n throw new Error('Invalid line type');\n }\n\n return html`\n <svg\n class=\"line\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M-1 ${12 - h} H${12 - r} A${r} ${r} 0 0 1 ${12 - h} ${12 -\n r} V${-1}\n h${width} V${12 - r} A${r} ${r} 0 0 1 ${12 + r} ${12 - h} H25\n V${12 + h} H${12 + r} A${r} ${r} 0 0 1 ${12 + h} ${12 + r} V25\n h-${width} V${12 + r} A${r} ${r} 0 0 1 ${12 - r} ${12 + h} H-1 Z\"\n fill=\"var(${color.inner})\"\n stroke=\"var(${color.outer})\"\n />\n </svg>\n `;\n }\n\n static override styles = css`\n :host {\n display: block;\n line-height: 0;\n }\n `;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-line-cross': ObcLineCross;\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAKa,IAAA,eAAN,cAA2B,WAAW;AAAA,EAAtC,cAAA;AAAA,UAAA,GAAA,SAAA;AACqB,SAAA,SAAqB,WAAW;AAChC,SAAA,WAAqB,SAAS;AAAA,EAAA;AAAA,EAE/C,SAAS;AACZ,QAAA,KAAK,aAAa,SAAS,WAAW;AACjC,aAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAsDT;AAEM,UAAA,QAAQ,UAAU,KAAK,MAAM;AACnC,UAAM,QAAQ,UAAU,KAAK,QAAQ,IAAI;AACzC,UAAM,IAAI,QAAQ;AAEd,QAAA;AACA,QAAA,KAAK,aAAa,SAAS,UAAU;AACnC,UAAA;AAAA,IACK,WAAA,KAAK,aAAa,SAAS,KAAK;AACrC,UAAA;AAAA,IACK,WAAA,KAAK,aAAa,SAAS,OAAO;AACvC,UAAA;AAAA,IAAA,OACC;AACC,YAAA,IAAI,MAAM,mBAAmB;AAAA,IACrC;AAEO,WAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAUQ,KAAK,CAAC,KAAK,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,KAAK,CAAC,IAAI,KACzD,CAAC,KAAK,EAAE;AAAA,eACH,KAAK,KAAK,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,KAAK,CAAC,IAAI,KAAK,CAAC;AAAA,eACrD,KAAK,CAAC,KAAK,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,KAAK,CAAC,IAAI,KAAK,CAAC;AAAA,gBACrD,KAAK,KAAK,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,KAAK,CAAC,IAAI,KAAK,CAAC;AAAA,sBAC/C,MAAM,KAAK;AAAA,wBACT,MAAM,KAAK;AAAA;AAAA;AAAA;AAAA,EAIjC;AAQF;AAzGa,aAmGK,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAlGC,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,QAAO;AAAA,GADb,aACe,WAAA,UAAA,CAAA;AACA,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,QAAO;AAAA,GAFb,aAEe,WAAA,YAAA,CAAA;AAFf,eAAN,gBAAA;AAAA,EADN,cAAc,gBAAgB;AAAA,GAClB,YAAA;"}
1
+ {"version":3,"file":"line-cross.js","sources":["../../../src/automation/line-cross/line-cross.ts"],"sourcesContent":["import {LitElement, css, html} from 'lit';\nimport {customElement, property} from 'lit/decorators.js';\nimport {LineMedium, LineType, lineColor, lineWidth} from '..';\n\n@customElement('obc-line-cross')\nexport class ObcLineCross extends LitElement {\n @property({type: String}) medium: LineMedium = LineMedium.normal;\n @property({type: String}) lineType: LineType = LineType.fluid;\n\n override render() {\n if (this.lineType === LineType.connector) {\n return html`\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M11.5 1.83333V0H12.5V1.83333H11.5Z\"\n fill=\"var(--element-neutral-color)\"\n />\n <path\n d=\"M11.5 7.33333V3.66667H12.5V7.33333H11.5Z\"\n fill=\"var(--element-neutral-color)\"\n />\n <path\n d=\"M11.5 11V9.16667H12.5V11H11.5Z\"\n fill=\"var(--element-neutral-color)\"\n />\n <path\n d=\"M0 12.5H2V11.5H0V12.5Z\"\n fill=\"var(--element-neutral-color)\"\n />\n <path\n d=\"M4 12.5H8V11.5H4V12.5Z\"\n fill=\"var(--element-neutral-color)\"\n />\n <path\n d=\"M10 12.5H14V11.5H10V12.5Z\"\n fill=\"var(--element-neutral-color)\"\n />\n <path\n d=\"M16 12.5H20V11.5H16V12.5Z\"\n fill=\"var(--element-neutral-color)\"\n />\n <path\n d=\"M22 12.5H24V11.5H22V12.5Z\"\n fill=\"var(--element-neutral-color)\"\n />\n <path\n d=\"M11.5 13V14.8333H12.5V13H11.5Z\"\n fill=\"var(--element-neutral-color)\"\n />\n <path\n d=\"M11.5 16.6667V20.3333H12.5V16.6667H11.5Z\"\n fill=\"var(--element-neutral-color)\"\n />\n <path\n d=\"M11.5 22.1667V24H12.5V22.1667H11.5Z\"\n fill=\"var(--element-neutral-color)\"\n />\n </svg>\n `;\n }\n\n const color = lineColor(this.medium);\n const width = lineWidth(this.lineType) + 1;\n const h = width / 2;\n\n let r: number;\n if (this.lineType === LineType.electric) {\n r = 4.5;\n } else if (this.lineType === LineType.air) {\n r = 10;\n } else if (this.lineType === LineType.fluid) {\n r = 6;\n } else {\n throw new Error('Invalid line type');\n }\n\n return html`\n <svg\n class=\"line\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M-1 ${12 - h} H${12 - r} A${r} ${r} 0 0 1 ${12 - h} ${12 -\n r} V${-1}\n h${width} V${12 - r} A${r} ${r} 0 0 1 ${12 + r} ${12 - h} H25\n V${12 + h} H${12 + r} A${r} ${r} 0 0 1 ${12 + h} ${12 + r} V25\n h-${width} V${12 + r} A${r} ${r} 0 0 1 ${12 - r} ${12 + h} H-1 Z\"\n fill=\"var(${color.inner})\"\n stroke=\"var(${color.outer})\"\n />\n </svg>\n `;\n }\n\n static override styles = css`\n :host {\n display: block;\n line-height: 0;\n }\n\n svg {\n position: relative;\n top: -12px;\n left: -12px;\n }\n `;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-line-cross': ObcLineCross;\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAKa,IAAA,eAAN,cAA2B,WAAW;AAAA,EAAtC,cAAA;AAAA,UAAA,GAAA,SAAA;AACqB,SAAA,SAAqB,WAAW;AAChC,SAAA,WAAqB,SAAS;AAAA,EAAA;AAAA,EAE/C,SAAS;AACZ,QAAA,KAAK,aAAa,SAAS,WAAW;AACjC,aAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAsDT;AAEM,UAAA,QAAQ,UAAU,KAAK,MAAM;AACnC,UAAM,QAAQ,UAAU,KAAK,QAAQ,IAAI;AACzC,UAAM,IAAI,QAAQ;AAEd,QAAA;AACA,QAAA,KAAK,aAAa,SAAS,UAAU;AACnC,UAAA;AAAA,IACK,WAAA,KAAK,aAAa,SAAS,KAAK;AACrC,UAAA;AAAA,IACK,WAAA,KAAK,aAAa,SAAS,OAAO;AACvC,UAAA;AAAA,IAAA,OACC;AACC,YAAA,IAAI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D,MAAM;IA+Cf,OAAgB,MAAM,0BAKpB;CACH;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,kBAAkB,EAAE,cAAc,CAAC;KACpC;CACF"}
1
+ {"version":3,"file":"line-overlap.d.ts","sourceRoot":"","sources":["../../../src/automation/line-overlap/line-overlap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAY,MAAM,KAAK,CAAC;AAE1C,OAAO,EAAC,UAAU,EAAE,QAAQ,EAAuB,MAAM,IAAI,CAAC;AAE9D,qBACa,cAAe,SAAQ,UAAU;IAClB,MAAM,EAAE,UAAU,CAAqB;IACvC,QAAQ,EAAE,QAAQ,CAAkB;IAErD,MAAM;IA+Cf,OAAgB,MAAM,0BAWpB;CACH;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,kBAAkB,EAAE,cAAc,CAAC;KACpC;CACF"}
@@ -68,6 +68,12 @@ ObcLineOverlap.styles = css`
68
68
  display: block;
69
69
  line-height: 0;
70
70
  }
71
+
72
+ svg {
73
+ position: relative;
74
+ left: -12px;
75
+ top: -12px;
76
+ }
71
77
  `;
72
78
  __decorateClass([
73
79
  property({ type: String })