@oicl/openbridge-webcomponents 0.0.15-dev-20241203183951 → 0.0.15-dev-20241203184948

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/__snapshots__/building-blocks-poi-line--primary.png +0 -0
  2. package/__snapshots__/button-poi-target-button--primary.png +0 -0
  3. package/__snapshots__/navigation-instruments-poi-target--primary.png +0 -0
  4. package/custom-elements.json +76 -43
  5. package/dist/components/poi-target-button/poi-target-button.css.js +65 -77
  6. package/dist/components/poi-target-button/poi-target-button.css.js.map +1 -1
  7. package/dist/components/poi-target-button/poi-target-button.d.ts +2 -1
  8. package/dist/components/poi-target-button/poi-target-button.d.ts.map +1 -1
  9. package/dist/components/poi-target-button/poi-target-button.js +7 -4
  10. package/dist/components/poi-target-button/poi-target-button.js.map +1 -1
  11. package/dist/navigation-instruments/poi-graphic-line/poi-config.d.ts +14 -11
  12. package/dist/navigation-instruments/poi-graphic-line/poi-config.d.ts.map +1 -1
  13. package/dist/navigation-instruments/poi-graphic-line/poi-config.js +18 -42
  14. package/dist/navigation-instruments/poi-graphic-line/poi-config.js.map +1 -1
  15. package/dist/navigation-instruments/poi-graphic-line/poi-graphic-line.d.ts +9 -3
  16. package/dist/navigation-instruments/poi-graphic-line/poi-graphic-line.d.ts.map +1 -1
  17. package/dist/navigation-instruments/poi-graphic-line/poi-graphic-line.js +147 -42
  18. package/dist/navigation-instruments/poi-graphic-line/poi-graphic-line.js.map +1 -1
  19. package/dist/navigation-instruments/poi-line/poi-line.css.js +8 -7
  20. package/dist/navigation-instruments/poi-line/poi-line.css.js.map +1 -1
  21. package/dist/navigation-instruments/poi-line/poi-line.d.ts +1 -1
  22. package/dist/navigation-instruments/poi-line/poi-line.d.ts.map +1 -1
  23. package/dist/navigation-instruments/poi-line/poi-line.js +28 -10
  24. package/dist/navigation-instruments/poi-line/poi-line.js.map +1 -1
  25. package/dist/navigation-instruments/poi-line/pointerDot.d.ts +7 -1
  26. package/dist/navigation-instruments/poi-line/pointerDot.d.ts.map +1 -1
  27. package/dist/navigation-instruments/poi-line/pointerDot.js +96 -99
  28. package/dist/navigation-instruments/poi-line/pointerDot.js.map +1 -1
  29. package/dist/navigation-instruments/poi-target/arrow.d.ts.map +1 -1
  30. package/dist/navigation-instruments/poi-target/arrow.js +1 -0
  31. package/dist/navigation-instruments/poi-target/arrow.js.map +1 -1
  32. package/dist/navigation-instruments/poi-target/poi-target.css.js +9 -11
  33. package/dist/navigation-instruments/poi-target/poi-target.css.js.map +1 -1
  34. package/dist/navigation-instruments/poi-target/poi-target.d.ts +4 -0
  35. package/dist/navigation-instruments/poi-target/poi-target.d.ts.map +1 -1
  36. package/dist/navigation-instruments/poi-target/poi-target.js +21 -20
  37. package/dist/navigation-instruments/poi-target/poi-target.js.map +1 -1
  38. package/package.json +1 -1
  39. package/src/components/poi-target-button/poi-target-button.css +20 -10
  40. package/src/components/poi-target-button/poi-target-button.stories.ts +6 -0
  41. package/src/components/poi-target-button/poi-target-button.ts +7 -2
  42. package/src/navigation-instruments/poi-graphic-line/poi-config.ts +24 -27
  43. package/src/navigation-instruments/poi-graphic-line/poi-graphic-line.stories.ts +3 -4
  44. package/src/navigation-instruments/poi-graphic-line/poi-graphic-line.ts +145 -38
  45. package/src/navigation-instruments/poi-line/poi-line.css +8 -7
  46. package/src/navigation-instruments/poi-line/poi-line.stories.ts +5 -5
  47. package/src/navigation-instruments/poi-line/poi-line.ts +29 -8
  48. package/src/navigation-instruments/poi-line/pointerDot.ts +115 -99
  49. package/src/navigation-instruments/poi-target/arrow.ts +1 -0
  50. package/src/navigation-instruments/poi-target/poi-target.css +9 -13
  51. package/src/navigation-instruments/poi-target/poi-target.stories.ts +5 -5
  52. package/src/navigation-instruments/poi-target/poi-target.ts +31 -23
@@ -5,7 +5,7 @@ import {POIStyle} from './poi-config';
5
5
 
6
6
  const meta: Meta<typeof ObcPoiGraphicLine> = {
7
7
  title: 'Building blocks/POI Graphic Line',
8
- tags: ['autodocs', '6.0'],
8
+ tags: ['autodocs'],
9
9
  component: 'obc-poi-graphic-line',
10
10
  argTypes: {
11
11
  lineStyle: {
@@ -15,13 +15,12 @@ const meta: Meta<typeof ObcPoiGraphicLine> = {
15
15
  },
16
16
  },
17
17
 
18
- height: {control: {type: 'range', min: 32, max: 192, step: 2}},
18
+ lineHeight: {control: {type: 'range', min: 32, max: 192, step: 2}},
19
19
  },
20
20
  args: {
21
- height: 100,
21
+ lineHeight: 96,
22
22
  lineStyle: POIStyle.Enhanced,
23
23
  },
24
- decorators: [],
25
24
  } satisfies Meta<ObcPoiGraphicLine>;
26
25
 
27
26
  export default meta;
@@ -1,67 +1,67 @@
1
1
  import {LitElement, html, unsafeCSS} from 'lit';
2
2
  import {customElement, property} from 'lit/decorators.js';
3
- import {POIStyle, POIState, POIStyleConfig, POI_STYLES} from './poi-config';
3
+ import {POILineParams, POIStyle, POI_LINE_CONFIG} from './poi-config';
4
4
  import componentStyle from './poi-graphic-line.css?inline';
5
5
 
6
- function getLineColors(style: POIStyle): POIStyleConfig {
7
- const colors = POI_STYLES[style];
8
- if (!colors) {
9
- throw new Error(`Style: ${style} not supported`);
10
- }
11
- return colors;
12
- }
13
-
14
6
  @customElement('obc-poi-graphic-line')
15
7
  export class ObcPoiGraphicLine extends LitElement {
16
- @property({type: Number}) height: number = 100;
8
+ @property({type: Number}) lineHeight: number = 96;
9
+ @property({type: Number}) width: number = 4;
10
+ @property({type: Number}) lineStart: number = 1;
17
11
  @property({type: String}) lineStyle: POIStyle = POIStyle.Enhanced;
18
- @property({type: String}) lineState: POIState = POIState.solid;
19
12
 
20
13
  override render() {
21
- const colors = getLineColors(this.lineStyle);
22
- const path = `M2 1L2 ${this.height}`;
14
+ const style = POI_LINE_CONFIG[this.lineStyle];
15
+ const filterDimensions = style.filterDimensions;
16
+ const path = `M${this.width / 2} ${this.lineStart}L${this.width / 2} ${this.lineHeight + this.lineStart}`;
23
17
 
24
- return html`<div class="wrapper">
25
- <svg width="4" height="${this.height}" viewBox="0 0 4 ${this.height}">
18
+ return html`
19
+ <svg
20
+ width="${this.width}"
21
+ height="${this.lineHeight + style.lineEnd}"
22
+ viewBox="0 0 ${this.width} ${this.lineHeight + style.lineEnd}"
23
+ fill="none"
24
+ vector-effect="non-scaling-stroke"
25
+ >
26
26
  <mask
27
- id="mask0_903_40238"
27
+ id="poi_graphic_line_mask"
28
28
  style="mask-type:alpha"
29
29
  maskUnits="userSpaceOnUse"
30
- x="0"
31
- y="0"
30
+ x="${this.width / 2 - 2}"
31
+ y="-1"
32
32
  width="4"
33
- height="${this.height}"
33
+ height="${this.lineHeight + 4}"
34
34
  >
35
35
  <path
36
36
  d="${path}"
37
- stroke="url(#paint0_linear_903_40238)"
37
+ stroke="url(#poi_graphic_line_linear_gradient)"
38
38
  stroke-width="4"
39
39
  stroke-linecap="round"
40
40
  />
41
41
  </mask>
42
- <g mask="url(#mask0_903_40238)">
43
- <g filter="url(#filter0_d_903_40238)">
42
+ <g mask="url(#poi_graphic_line_mask)">
43
+ <g filter="url(#poi_graphic_line_filter)">
44
44
  <path
45
45
  d=${path}
46
- stroke="${colors.outlineColor}"
47
- stroke-width="2"
46
+ stroke="${style.outlineColor}"
47
+ stroke-width="${style.outlineWidth}"
48
48
  stroke-linecap="round"
49
49
  />
50
50
  </g>
51
51
  <path
52
52
  d=${path}
53
- stroke="${colors.lineColor}"
54
- stroke-width="1"
53
+ stroke="${style.lineColor}"
54
+ stroke-width="${style.lineWidth}"
55
55
  stroke-linecap="round"
56
56
  />
57
57
  </g>
58
58
  <defs>
59
59
  <filter
60
- id="filter0_d_903_40238"
61
- x="0"
62
- y="0"
63
- width="4"
64
- height="${this.height}"
60
+ id="poi_graphic_line_filter"
61
+ x="${filterDimensions.x}"
62
+ y="${filterDimensions.y}"
63
+ width="${filterDimensions.width}"
64
+ height="${this.lineHeight + filterDimensions.width}"
65
65
  filterUnits="userSpaceOnUse"
66
66
  color-interpolation-filters="sRGB"
67
67
  >
@@ -76,7 +76,7 @@ export class ObcPoiGraphicLine extends LitElement {
76
76
  <feGaussianBlur stdDeviation="0.5" />
77
77
  <feColorMatrix
78
78
  type="matrix"
79
- values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"
79
+ values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ${style.shadowAlpha} 0"
80
80
  />
81
81
  <feBlend
82
82
  mode="normal"
@@ -91,11 +91,11 @@ export class ObcPoiGraphicLine extends LitElement {
91
91
  />
92
92
  </filter>
93
93
  <linearGradient
94
- id="paint0_linear_903_40238"
95
- x1="2.5"
96
- y1="1"
97
- x2="2.5"
98
- y2="${this.height}"
94
+ id="poi_graphic_line_linear_gradient"
95
+ x1="${this.width / 2 + 0.5}"
96
+ y1="${this.lineStart}"
97
+ x2="${this.width / 2 + 0.5}"
98
+ y2="${this.lineHeight + this.lineStart}"
99
99
  gradientUnits="userSpaceOnUse"
100
100
  >
101
101
  <stop stop-color="#C2C2C2" />
@@ -103,12 +103,119 @@ export class ObcPoiGraphicLine extends LitElement {
103
103
  </linearGradient>
104
104
  </defs>
105
105
  </svg>
106
- </div> `;
106
+ `;
107
107
  }
108
108
 
109
109
  static override styles = unsafeCSS(componentStyle);
110
110
  }
111
111
 
112
+ export function graphicLine({
113
+ style,
114
+ lineHeight,
115
+ totalHeight,
116
+ }: {
117
+ style: POILineParams;
118
+ lineHeight: number;
119
+ totalHeight: number;
120
+ }) {
121
+ const lineStart = 1;
122
+ const lineEnd = lineStart + lineHeight;
123
+
124
+ const width = style.width;
125
+ const filterDimensions = style.filterDimensions;
126
+ const path = `M${width / 2} ${lineStart}L${width / 2} ${lineEnd}`;
127
+
128
+ return html`
129
+ <svg
130
+ width="${width}"
131
+ height="${totalHeight}"
132
+ viewBox="0 0 ${width} ${totalHeight}"
133
+ fill="none"
134
+ vector-effect="non-scaling-stroke"
135
+ >
136
+ <mask
137
+ id="poi_graphic_line_mask"
138
+ style="mask-type:alpha"
139
+ maskUnits="userSpaceOnUse"
140
+ x="${width / 2 - 2}"
141
+ y="-1"
142
+ width="4"
143
+ height="${lineHeight + 4}"
144
+ >
145
+ <path
146
+ d="${path}"
147
+ stroke="url(#poi_graphic_line_linear_gradient)"
148
+ stroke-width="4"
149
+ stroke-linecap="round"
150
+ />
151
+ </mask>
152
+ <g mask="url(#poi_graphic_line_mask)">
153
+ <g filter="url(#poi_graphic_line_filter)">
154
+ <path
155
+ d=${path}
156
+ stroke="${style.outlineColor}"
157
+ stroke-width="${style.outlineWidth}"
158
+ stroke-linecap="round"
159
+ />
160
+ </g>
161
+ <path
162
+ d=${path}
163
+ stroke="${style.lineColor}"
164
+ stroke-width="${style.lineWidth}"
165
+ stroke-linecap="round"
166
+ />
167
+ </g>
168
+ <defs>
169
+ <filter
170
+ id="poi_graphic_line_filter"
171
+ x="${filterDimensions.x + width / 2 - 2}"
172
+ y="${filterDimensions.y}"
173
+ width="${filterDimensions.width}"
174
+ height="${lineHeight + filterDimensions.width}"
175
+ filterUnits="userSpaceOnUse"
176
+ color-interpolation-filters="sRGB"
177
+ >
178
+ <feFlood flood-opacity="0" result="BackgroundImageFix" />
179
+ <feColorMatrix
180
+ in="SourceAlpha"
181
+ type="matrix"
182
+ values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
183
+ result="hardAlpha"
184
+ />
185
+ <feOffset dy="1" />
186
+ <feGaussianBlur stdDeviation="0.5" />
187
+ <feColorMatrix
188
+ type="matrix"
189
+ values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ${style.shadowAlpha} 0"
190
+ />
191
+ <feBlend
192
+ mode="normal"
193
+ in2="BackgroundImageFix"
194
+ result="effect1_dropShadow_903_40238"
195
+ />
196
+ <feBlend
197
+ mode="normal"
198
+ in="SourceGraphic"
199
+ in2="effect1_dropShadow_903_40238"
200
+ result="shape"
201
+ />
202
+ </filter>
203
+ <linearGradient
204
+ id="poi_graphic_line_linear_gradient"
205
+ x1="${width / 2 + 0.5}"
206
+ y1="${lineStart}"
207
+ x2="${width / 2 + 0.5}"
208
+ y2="${lineEnd}"
209
+ gradientUnits="userSpaceOnUse"
210
+ >
211
+ <stop stop-color="#C2C2C2" />
212
+ <stop offset="0.989583" stop-color="#C2C2C2" stop-opacity="0" />
213
+ </linearGradient>
214
+ </defs>
215
+ </svg>
216
+ `;
217
+ }
218
+
112
219
  declare global {
113
220
  interface HTMLElementTagNameMap {
114
221
  'obc-poi-graphic-line': ObcPoiGraphicLine;
@@ -1,8 +1,9 @@
1
- .wrapper {
2
- padding: 0;
3
- width: 8px;
4
- display: flex;
5
- flex-direction: column;
6
- align-items: center;
7
- justify-content: center;
1
+ .container {
2
+ position: relative;
3
+ }
4
+
5
+ .container > * {
6
+ position: absolute;
7
+ top: -1px;
8
+ left: 0;
8
9
  }
@@ -5,18 +5,18 @@ import {POIStyle} from '../poi-graphic-line/poi-config';
5
5
 
6
6
  const meta: Meta<typeof ObcPoiLine> = {
7
7
  title: 'Building blocks/POI Line',
8
- tags: ['autodocs', '6.0'],
8
+ tags: ['autodocs'],
9
9
  component: 'obc-poi-line',
10
10
  argTypes: {
11
- lineStyle: {
11
+ poiStyle: {
12
12
  options: [POIStyle.Normal, POIStyle.Enhanced],
13
13
  control: {type: 'select'},
14
14
  },
15
- height: {control: {type: 'range', min: 32, max: 196, step: 1}},
15
+ height: {control: {type: 'range', min: 32, max: 200, step: 1}},
16
16
  },
17
17
  args: {
18
- lineStyle: POIStyle.Enhanced,
19
- height: 100,
18
+ poiStyle: POIStyle.Enhanced,
19
+ height: 96,
20
20
  },
21
21
  } satisfies Meta<ObcPoiLine>;
22
22
 
@@ -3,21 +3,42 @@ import {customElement, property} from 'lit/decorators.js';
3
3
  import compentStyle from './poi-line.css?inline';
4
4
  import '../poi-graphic-line/poi-graphic-line';
5
5
  import {renderPointerDot} from './pointerDot';
6
- import {POIStyle} from '../poi-graphic-line/poi-config';
6
+ import {POI_LINE_CONFIG, POIStyle} from '../poi-graphic-line/poi-config';
7
+ import {graphicLine} from '../poi-graphic-line/poi-graphic-line';
7
8
 
8
9
  @customElement('obc-poi-line')
9
10
  export class ObcPoiLine extends LitElement {
10
11
  @property({type: Number}) height: number = 96;
11
- @property({type: String}) lineStyle: POIStyle = POIStyle.Normal;
12
+ @property({type: String}) poiStyle: POIStyle = POIStyle.Normal;
12
13
 
13
14
  override render() {
15
+ const style = POI_LINE_CONFIG[this.poiStyle];
16
+ let lineHeight = this.height - 4;
17
+ let centerX = 2;
18
+ let centerYOffset = 1;
19
+ if (this.poiStyle === POIStyle.Normal) {
20
+ lineHeight = this.height - 3;
21
+ centerYOffset = 2;
22
+ centerX = 1;
23
+ }
24
+
25
+ const totalHeight = lineHeight + style.width + style.dotStart;
26
+
14
27
  return html`
15
- <div class="wrapper">
16
- <obc-poi-graphic-line
17
- height=${this.height}
18
- lineStyle=${this.lineStyle}
19
- ></obc-poi-graphic-line>
20
- ${renderPointerDot({lineStyle: this.lineStyle})}
28
+ <div
29
+ class="container"
30
+ style="height: ${totalHeight}px; width: ${style.width}px;"
31
+ >
32
+ ${graphicLine({style, lineHeight, totalHeight})}
33
+ ${renderPointerDot({
34
+ lineStyle: this.poiStyle,
35
+ centerX: centerX,
36
+ centerY: lineHeight + centerYOffset,
37
+ width: style.width,
38
+ vbHeight: totalHeight,
39
+ lineColor: style.lineColor,
40
+ outlineColor: style.outlineColor,
41
+ })}
21
42
  </div>
22
43
  `;
23
44
  }
@@ -1,102 +1,118 @@
1
- import {html} from 'lit';
1
+ import {html, svg} from 'lit';
2
2
  import {POIStyle} from '../poi-graphic-line/poi-config';
3
3
 
4
- export function renderPointerDot({lineStyle}: {lineStyle: POIStyle}) {
5
- if (lineStyle === POIStyle.Enhanced)
6
- return html`<svg
7
- width="8"
8
- height="8"
9
- viewBox="0 0 8 8"
10
- fill="none"
11
- xmlns="http://www.w3.org/2000/svg"
12
- >
13
- <g filter="url(#filter0_d_1761_3883)">
14
- <rect x="2" y="1" width="4" height="4" rx="2" fill="#2E5389" />
15
- <rect x="1.5" y="0.5" width="5" height="5" rx="2.5" stroke="white" />
16
- </g>
17
- <defs>
18
- <filter
19
- id="filter0_d_1761_3883"
20
- x="0"
21
- y="0"
22
- width="8"
23
- height="8"
24
- filterUnits="userSpaceOnUse"
25
- color-interpolation-filters="sRGB"
26
- >
27
- <feFlood flood-opacity="0" result="BackgroundImageFix" />
28
- <feColorMatrix
29
- in="SourceAlpha"
30
- type="matrix"
31
- values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
32
- result="hardAlpha"
33
- />
34
- <feOffset dy="1" />
35
- <feGaussianBlur stdDeviation="0.5" />
36
- <feColorMatrix
37
- type="matrix"
38
- values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"
39
- />
40
- <feBlend
41
- mode="normal"
42
- in2="BackgroundImageFix"
43
- result="effect1_dropShadow_1761_3883"
44
- />
45
- <feBlend
46
- mode="normal"
47
- in="SourceGraphic"
48
- in2="effect1_dropShadow_1761_3883"
49
- result="shape"
50
- />
51
- </filter>
52
- </defs>
53
- </svg>`;
54
- else
55
- return html`<svg
56
- width="4"
57
- height="4"
58
- viewBox="0 0 4 4"
59
- fill="none"
60
- xmlns="http://www.w3.org/2000/svg"
61
- >
62
- <g filter="url(#filter0_d_1761_4250)">
63
- <rect x="1" width="2" height="2" rx="1" fill="white" />
64
- </g>
65
- <defs>
66
- <filter
67
- id="filter0_d_1761_4250"
68
- x="0"
69
- y="0"
70
- width="4"
71
- height="4"
72
- filterUnits="userSpaceOnUse"
73
- color-interpolation-filters="sRGB"
74
- >
75
- <feFlood flood-opacity="0" result="BackgroundImageFix" />
76
- <feColorMatrix
77
- in="SourceAlpha"
78
- type="matrix"
79
- values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
80
- result="hardAlpha"
81
- />
82
- <feOffset dy="1" />
83
- <feGaussianBlur stdDeviation="0.5" />
84
- <feColorMatrix
85
- type="matrix"
86
- values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"
87
- />
88
- <feBlend
89
- mode="normal"
90
- in2="BackgroundImageFix"
91
- result="effect1_dropShadow_1761_4250"
92
- />
93
- <feBlend
94
- mode="normal"
95
- in="SourceGraphic"
96
- in2="effect1_dropShadow_1761_4250"
97
- result="shape"
98
- />
99
- </filter>
100
- </defs>
101
- </svg> `;
4
+ function createCircle({
5
+ x,
6
+ y,
7
+ width,
8
+ height,
9
+ rx,
10
+ stroke,
11
+ }: {
12
+ x: number;
13
+ y: number;
14
+ width: number;
15
+ height: number;
16
+ rx: number;
17
+ stroke: string;
18
+ }) {
19
+ return svg`<rect x="${x}" y="${y}" width="${width}" height="${height}" rx="${rx}" stroke="${stroke}">`;
20
+ }
21
+
22
+ export function renderPointerDot({
23
+ lineStyle,
24
+ centerX,
25
+ centerY,
26
+ width,
27
+ vbHeight,
28
+ lineColor,
29
+ outlineColor,
30
+ }: {
31
+ lineStyle: POIStyle;
32
+ centerX: number;
33
+ centerY: number;
34
+ width: number;
35
+ vbHeight: number;
36
+ lineColor: string;
37
+ outlineColor: string;
38
+ }) {
39
+ let innerCircle = svg`<rect
40
+ x="${centerX}"
41
+ y="${centerY}"
42
+ width="4"
43
+ height="4"
44
+ rx="2"
45
+ fill="${lineColor}"
46
+ />`;
47
+
48
+ let outerCircle = null;
49
+ let filterY = centerY;
50
+
51
+ if (lineStyle !== POIStyle.Normal) {
52
+ outerCircle = createCircle({
53
+ x: centerX - 0.5,
54
+ y: centerY - 0.5,
55
+ width: 5,
56
+ height: 5,
57
+ rx: 2.5,
58
+ stroke: outlineColor,
59
+ });
60
+ filterY = centerY - 1;
61
+ } else {
62
+ innerCircle = svg`<rect
63
+ x="${centerX}"
64
+ y="${centerY}"
65
+ width="2"
66
+ height="2"
67
+ rx="1"
68
+ fill="${lineColor}"
69
+ />`;
70
+ }
71
+
72
+ return html`<svg
73
+ width=${width}
74
+ height="${vbHeight}"
75
+ viewBox="0 0 ${width} ${vbHeight}"
76
+ fill="none"
77
+ xmlns="http://www.w3.org/2000/svg"
78
+ vector-effect="non-scaling-stroke"
79
+ >
80
+ <g filter="url(#pointerDotFilter)">${innerCircle} ${outerCircle}</g>
81
+ <defs>
82
+ <filter
83
+ id="pointerDotFilter"
84
+ x="${0}"
85
+ y="${filterY}"
86
+ width="${width}"
87
+ height="${width}"
88
+ filterUnits="userSpaceOnUse"
89
+ color-interpolation-filters="sRGB"
90
+ >
91
+ <feFlood flood-opacity="0" result="BackgroundImageFix" />
92
+ <feColorMatrix
93
+ in="SourceAlpha"
94
+ type="matrix"
95
+ values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
96
+ result="hardAlpha"
97
+ />
98
+ <feOffset dy="1" />
99
+ <feGaussianBlur stdDeviation="0.5" />
100
+ <feColorMatrix
101
+ type="matrix"
102
+ values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"
103
+ />
104
+ <feBlend
105
+ mode="normal"
106
+ in2="BackgroundImageFix"
107
+ result="pointerDotDropShadow"
108
+ />
109
+ <feBlend
110
+ mode="normal"
111
+ in="SourceGraphic"
112
+ in2="pointerDotDropShadow"
113
+ result="shape"
114
+ />
115
+ </filter>
116
+ </defs>
117
+ </svg>`;
102
118
  }
@@ -16,6 +16,7 @@ export function pointerArrow(pointerType: Pointer, value: string) {
16
16
  viewBox="0 0 16 16"
17
17
  fill="none"
18
18
  xmlns="http://www.w3.org/2000/svg"
19
+ vector-effect="non-scaling-stroke"
19
20
  >
20
21
  <g filter="url(#filter0_d_903_44142)">
21
22
  <path d=${path} fill="${fill}" stroke="var(--border-silhouette-color)" />
@@ -1,22 +1,18 @@
1
- .wrapper {
1
+ .container {
2
2
  padding: 0;
3
3
  background: transparent;
4
4
  appearance: none;
5
- width: 48px;
5
+ width: 200px;
6
6
  height: auto;
7
7
  border: none;
8
8
  display: flex;
9
+ flex-direction: row;
10
+ }
11
+
12
+ .wrapper {
13
+ position: relative;
14
+ display: flex;
9
15
  flex-direction: column;
10
16
  align-items: center;
11
- justify-content: center;
12
-
13
- &.type-arrow-left {
14
- width: 56px;
15
- flex-direction: row-reverse;
16
- }
17
-
18
- &.type-arrow-right {
19
- width: 56px;
20
- flex-direction: row;
21
- }
17
+ width: 48px;
22
18
  }
@@ -1,21 +1,21 @@
1
1
  import type {Meta, StoryObj} from '@storybook/web-components';
2
- import {ObcPoiTarget, Pointer} from './poi-target';
2
+ import {ObcPoiTarget, Pointer, TargetValue} from './poi-target';
3
3
  import './poi-target';
4
4
 
5
5
  const meta: Meta<typeof ObcPoiTarget> = {
6
6
  title: 'Navigation Instruments/POI Target',
7
- tags: ['autodocs', '6.0'],
7
+ tags: ['autodocs'],
8
8
  component: 'obc-poi-target',
9
9
  args: {
10
- height: 188,
11
- value: 'checked',
10
+ height: 192,
11
+ value: TargetValue.checked,
12
12
  pointerType: Pointer.Line,
13
13
  relativeDirection: 0,
14
14
  },
15
15
  argTypes: {
16
16
  height: {control: {type: 'range', min: 32, max: 243, step: 1}},
17
17
  value: {
18
- options: ['enabled', 'checked'],
18
+ options: [TargetValue.enabled, TargetValue.checked],
19
19
  control: {type: 'select'},
20
20
  },
21
21
  pointerType: {