@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
@@ -1,103 +1,100 @@
1
- import { html } from "lit";
1
+ import { svg, html } from "lit";
2
2
  import { POIStyle } from "../poi-graphic-line/poi-config.js";
3
- function renderPointerDot({ lineStyle }) {
4
- if (lineStyle === POIStyle.Enhanced)
5
- return html`<svg
6
- width="8"
7
- height="8"
8
- viewBox="0 0 8 8"
9
- fill="none"
10
- xmlns="http://www.w3.org/2000/svg"
11
- >
12
- <g filter="url(#filter0_d_1761_3883)">
13
- <rect x="2" y="1" width="4" height="4" rx="2" fill="#2E5389" />
14
- <rect x="1.5" y="0.5" width="5" height="5" rx="2.5" stroke="white" />
15
- </g>
16
- <defs>
17
- <filter
18
- id="filter0_d_1761_3883"
19
- x="0"
20
- y="0"
21
- width="8"
22
- height="8"
23
- filterUnits="userSpaceOnUse"
24
- color-interpolation-filters="sRGB"
25
- >
26
- <feFlood flood-opacity="0" result="BackgroundImageFix" />
27
- <feColorMatrix
28
- in="SourceAlpha"
29
- type="matrix"
30
- values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
31
- result="hardAlpha"
32
- />
33
- <feOffset dy="1" />
34
- <feGaussianBlur stdDeviation="0.5" />
35
- <feColorMatrix
36
- type="matrix"
37
- values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"
38
- />
39
- <feBlend
40
- mode="normal"
41
- in2="BackgroundImageFix"
42
- result="effect1_dropShadow_1761_3883"
43
- />
44
- <feBlend
45
- mode="normal"
46
- in="SourceGraphic"
47
- in2="effect1_dropShadow_1761_3883"
48
- result="shape"
49
- />
50
- </filter>
51
- </defs>
52
- </svg>`;
53
- else
54
- return html`<svg
55
- width="4"
56
- height="4"
57
- viewBox="0 0 4 4"
58
- fill="none"
59
- xmlns="http://www.w3.org/2000/svg"
60
- >
61
- <g filter="url(#filter0_d_1761_4250)">
62
- <rect x="1" width="2" height="2" rx="1" fill="white" />
63
- </g>
64
- <defs>
65
- <filter
66
- id="filter0_d_1761_4250"
67
- x="0"
68
- y="0"
69
- width="4"
70
- height="4"
71
- filterUnits="userSpaceOnUse"
72
- color-interpolation-filters="sRGB"
73
- >
74
- <feFlood flood-opacity="0" result="BackgroundImageFix" />
75
- <feColorMatrix
76
- in="SourceAlpha"
77
- type="matrix"
78
- values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
79
- result="hardAlpha"
80
- />
81
- <feOffset dy="1" />
82
- <feGaussianBlur stdDeviation="0.5" />
83
- <feColorMatrix
84
- type="matrix"
85
- values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"
86
- />
87
- <feBlend
88
- mode="normal"
89
- in2="BackgroundImageFix"
90
- result="effect1_dropShadow_1761_4250"
91
- />
92
- <feBlend
93
- mode="normal"
94
- in="SourceGraphic"
95
- in2="effect1_dropShadow_1761_4250"
96
- result="shape"
97
- />
98
- </filter>
99
- </defs>
100
- </svg> `;
3
+ function createCircle({
4
+ x,
5
+ y,
6
+ width,
7
+ height,
8
+ rx,
9
+ stroke
10
+ }) {
11
+ return svg`<rect x="${x}" y="${y}" width="${width}" height="${height}" rx="${rx}" stroke="${stroke}">`;
12
+ }
13
+ function renderPointerDot({
14
+ lineStyle,
15
+ centerX,
16
+ centerY,
17
+ width,
18
+ vbHeight,
19
+ lineColor,
20
+ outlineColor
21
+ }) {
22
+ let innerCircle = svg`<rect
23
+ x="${centerX}"
24
+ y="${centerY}"
25
+ width="4"
26
+ height="4"
27
+ rx="2"
28
+ fill="${lineColor}"
29
+ />`;
30
+ let outerCircle = null;
31
+ let filterY = centerY;
32
+ if (lineStyle !== POIStyle.Normal) {
33
+ outerCircle = createCircle({
34
+ x: centerX - 0.5,
35
+ y: centerY - 0.5,
36
+ width: 5,
37
+ height: 5,
38
+ rx: 2.5,
39
+ stroke: outlineColor
40
+ });
41
+ filterY = centerY - 1;
42
+ } else {
43
+ innerCircle = svg`<rect
44
+ x="${centerX}"
45
+ y="${centerY}"
46
+ width="2"
47
+ height="2"
48
+ rx="1"
49
+ fill="${lineColor}"
50
+ />`;
51
+ }
52
+ return html`<svg
53
+ width=${width}
54
+ height="${vbHeight}"
55
+ viewBox="0 0 ${width} ${vbHeight}"
56
+ fill="none"
57
+ xmlns="http://www.w3.org/2000/svg"
58
+ vector-effect="non-scaling-stroke"
59
+ >
60
+ <g filter="url(#pointerDotFilter)">${innerCircle} ${outerCircle}</g>
61
+ <defs>
62
+ <filter
63
+ id="pointerDotFilter"
64
+ x="${0}"
65
+ y="${filterY}"
66
+ width="${width}"
67
+ height="${width}"
68
+ filterUnits="userSpaceOnUse"
69
+ color-interpolation-filters="sRGB"
70
+ >
71
+ <feFlood flood-opacity="0" result="BackgroundImageFix" />
72
+ <feColorMatrix
73
+ in="SourceAlpha"
74
+ type="matrix"
75
+ values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
76
+ result="hardAlpha"
77
+ />
78
+ <feOffset dy="1" />
79
+ <feGaussianBlur stdDeviation="0.5" />
80
+ <feColorMatrix
81
+ type="matrix"
82
+ values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"
83
+ />
84
+ <feBlend
85
+ mode="normal"
86
+ in2="BackgroundImageFix"
87
+ result="pointerDotDropShadow"
88
+ />
89
+ <feBlend
90
+ mode="normal"
91
+ in="SourceGraphic"
92
+ in2="pointerDotDropShadow"
93
+ result="shape"
94
+ />
95
+ </filter>
96
+ </defs>
97
+ </svg>`;
101
98
  }
102
99
  export {
103
100
  renderPointerDot
@@ -1 +1 @@
1
- {"version":3,"file":"pointerDot.js","sources":["../../../src/navigation-instruments/poi-line/pointerDot.ts"],"sourcesContent":["import {html} from 'lit';\nimport {POIStyle} from '../poi-graphic-line/poi-config';\n\nexport function renderPointerDot({lineStyle}: {lineStyle: POIStyle}) {\n if (lineStyle === POIStyle.Enhanced)\n return html`<svg\n width=\"8\"\n height=\"8\"\n viewBox=\"0 0 8 8\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <g filter=\"url(#filter0_d_1761_3883)\">\n <rect x=\"2\" y=\"1\" width=\"4\" height=\"4\" rx=\"2\" fill=\"#2E5389\" />\n <rect x=\"1.5\" y=\"0.5\" width=\"5\" height=\"5\" rx=\"2.5\" stroke=\"white\" />\n </g>\n <defs>\n <filter\n id=\"filter0_d_1761_3883\"\n x=\"0\"\n y=\"0\"\n width=\"8\"\n height=\"8\"\n filterUnits=\"userSpaceOnUse\"\n color-interpolation-filters=\"sRGB\"\n >\n <feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\" />\n <feColorMatrix\n in=\"SourceAlpha\"\n type=\"matrix\"\n values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\"\n result=\"hardAlpha\"\n />\n <feOffset dy=\"1\" />\n <feGaussianBlur stdDeviation=\"0.5\" />\n <feColorMatrix\n type=\"matrix\"\n values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0\"\n />\n <feBlend\n mode=\"normal\"\n in2=\"BackgroundImageFix\"\n result=\"effect1_dropShadow_1761_3883\"\n />\n <feBlend\n mode=\"normal\"\n in=\"SourceGraphic\"\n in2=\"effect1_dropShadow_1761_3883\"\n result=\"shape\"\n />\n </filter>\n </defs>\n </svg>`;\n else\n return html`<svg\n width=\"4\"\n height=\"4\"\n viewBox=\"0 0 4 4\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <g filter=\"url(#filter0_d_1761_4250)\">\n <rect x=\"1\" width=\"2\" height=\"2\" rx=\"1\" fill=\"white\" />\n </g>\n <defs>\n <filter\n id=\"filter0_d_1761_4250\"\n x=\"0\"\n y=\"0\"\n width=\"4\"\n height=\"4\"\n filterUnits=\"userSpaceOnUse\"\n color-interpolation-filters=\"sRGB\"\n >\n <feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\" />\n <feColorMatrix\n in=\"SourceAlpha\"\n type=\"matrix\"\n values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\"\n result=\"hardAlpha\"\n />\n <feOffset dy=\"1\" />\n <feGaussianBlur stdDeviation=\"0.5\" />\n <feColorMatrix\n type=\"matrix\"\n values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0\"\n />\n <feBlend\n mode=\"normal\"\n in2=\"BackgroundImageFix\"\n result=\"effect1_dropShadow_1761_4250\"\n />\n <feBlend\n mode=\"normal\"\n in=\"SourceGraphic\"\n in2=\"effect1_dropShadow_1761_4250\"\n result=\"shape\"\n />\n </filter>\n </defs>\n </svg> `;\n}\n"],"names":[],"mappings":";;AAGgB,SAAA,iBAAiB,EAAC,aAAmC;AACnE,MAAI,cAAc,SAAS;AAClB,WAAA;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;AAiDA,WAAA;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;AA+CX;"}
1
+ {"version":3,"file":"pointerDot.js","sources":["../../../src/navigation-instruments/poi-line/pointerDot.ts"],"sourcesContent":["import {html, svg} from 'lit';\nimport {POIStyle} from '../poi-graphic-line/poi-config';\n\nfunction createCircle({\n x,\n y,\n width,\n height,\n rx,\n stroke,\n}: {\n x: number;\n y: number;\n width: number;\n height: number;\n rx: number;\n stroke: string;\n}) {\n return svg`<rect x=\"${x}\" y=\"${y}\" width=\"${width}\" height=\"${height}\" rx=\"${rx}\" stroke=\"${stroke}\">`;\n}\n\nexport function renderPointerDot({\n lineStyle,\n centerX,\n centerY,\n width,\n vbHeight,\n lineColor,\n outlineColor,\n}: {\n lineStyle: POIStyle;\n centerX: number;\n centerY: number;\n width: number;\n vbHeight: number;\n lineColor: string;\n outlineColor: string;\n}) {\n let innerCircle = svg`<rect\n x=\"${centerX}\"\n y=\"${centerY}\"\n width=\"4\"\n height=\"4\"\n rx=\"2\"\n fill=\"${lineColor}\"\n />`;\n\n let outerCircle = null;\n let filterY = centerY;\n\n if (lineStyle !== POIStyle.Normal) {\n outerCircle = createCircle({\n x: centerX - 0.5,\n y: centerY - 0.5,\n width: 5,\n height: 5,\n rx: 2.5,\n stroke: outlineColor,\n });\n filterY = centerY - 1;\n } else {\n innerCircle = svg`<rect\n x=\"${centerX}\"\n y=\"${centerY}\"\n width=\"2\"\n height=\"2\"\n rx=\"1\"\n fill=\"${lineColor}\"\n />`;\n }\n\n return html`<svg\n width=${width}\n height=\"${vbHeight}\"\n viewBox=\"0 0 ${width} ${vbHeight}\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n vector-effect=\"non-scaling-stroke\"\n >\n <g filter=\"url(#pointerDotFilter)\">${innerCircle} ${outerCircle}</g>\n <defs>\n <filter\n id=\"pointerDotFilter\"\n x=\"${0}\"\n y=\"${filterY}\"\n width=\"${width}\"\n height=\"${width}\"\n filterUnits=\"userSpaceOnUse\"\n color-interpolation-filters=\"sRGB\"\n >\n <feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\" />\n <feColorMatrix\n in=\"SourceAlpha\"\n type=\"matrix\"\n values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\"\n result=\"hardAlpha\"\n />\n <feOffset dy=\"1\" />\n <feGaussianBlur stdDeviation=\"0.5\" />\n <feColorMatrix\n type=\"matrix\"\n values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0\"\n />\n <feBlend\n mode=\"normal\"\n in2=\"BackgroundImageFix\"\n result=\"pointerDotDropShadow\"\n />\n <feBlend\n mode=\"normal\"\n in=\"SourceGraphic\"\n in2=\"pointerDotDropShadow\"\n result=\"shape\"\n />\n </filter>\n </defs>\n </svg>`;\n}\n"],"names":[],"mappings":";;AAGA,SAAS,aAAa;AAAA,EACpB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAOG;AACM,SAAA,eAAe,CAAC,QAAQ,CAAC,YAAY,KAAK,aAAa,MAAM,SAAS,EAAE,aAAa,MAAM;AACpG;AAEO,SAAS,iBAAiB;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAQG;AACD,MAAI,cAAc;AAAA,aACP,OAAO;AAAA,aACP,OAAO;AAAA;AAAA;AAAA;AAAA,gBAIJ,SAAS;AAAA;AAGvB,MAAI,cAAc;AAClB,MAAI,UAAU;AAEV,MAAA,cAAc,SAAS,QAAQ;AACjC,kBAAc,aAAa;AAAA,MACzB,GAAG,UAAU;AAAA,MACb,GAAG,UAAU;AAAA,MACb,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,IAAI;AAAA,MACJ,QAAQ;AAAA,IAAA,CACT;AACD,cAAU,UAAU;AAAA,EAAA,OACf;AACS,kBAAA;AAAA,aACL,OAAO;AAAA,aACP,OAAO;AAAA;AAAA;AAAA;AAAA,gBAIJ,SAAS;AAAA;AAAA,EAAA;AAIhB,SAAA;AAAA,YACG,KAAK;AAAA,cACH,QAAQ;AAAA,mBACH,KAAK,IAAI,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA,yCAKK,WAAW,IAAI,WAAW;AAAA;AAAA;AAAA;AAAA,aAItD,CAAC;AAAA,aACD,OAAO;AAAA,iBACH,KAAK;AAAA,kBACJ,KAAK;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;AA+BvB;"}
@@ -1 +1 @@
1
- {"version":3,"file":"arrow.d.ts","sourceRoot":"","sources":["../../../src/navigation-instruments/poi-target/arrow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,cAAc,CAAC;AAGrC,wBAAgB,YAAY,CAAC,WAAW,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,wCA0D/D"}
1
+ {"version":3,"file":"arrow.d.ts","sourceRoot":"","sources":["../../../src/navigation-instruments/poi-target/arrow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,cAAc,CAAC;AAGrC,wBAAgB,YAAY,CAAC,WAAW,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,wCA2D/D"}
@@ -10,6 +10,7 @@ function pointerArrow(pointerType, value) {
10
10
  viewBox="0 0 16 16"
11
11
  fill="none"
12
12
  xmlns="http://www.w3.org/2000/svg"
13
+ vector-effect="non-scaling-stroke"
13
14
  >
14
15
  <g filter="url(#filter0_d_903_44142)">
15
16
  <path d=${path} fill="${fill}" stroke="var(--border-silhouette-color)" />
@@ -1 +1 @@
1
- {"version":3,"file":"arrow.js","sources":["../../../src/navigation-instruments/poi-target/arrow.ts"],"sourcesContent":["import {Pointer} from './poi-target';\nimport {html} from 'lit';\n\nexport function pointerArrow(pointerType: Pointer, value: string) {\n const path =\n pointerType === Pointer.ArrowLeft\n ? 'M10.627 4.58645L10.9802 4.93961L10.6274 5.29317L7.92644 8L10.6274 10.7068L10.9802 11.0604L10.627 11.4136L9.68699 12.3536L9.33344 12.7071L8.97988 12.3536L4.97988 8.35355L4.62633 8L4.97988 7.64645L8.97988 3.64645L9.33344 3.29289L9.68699 3.64645L10.627 4.58645Z'\n : 'M5.37301 4.58645L5.01984 4.93961L5.37262 5.29317L8.07356 8L5.37262 10.7068L5.01984 11.0604L5.37301 11.4136L6.31301 12.3536L6.66656 12.7071L7.02012 12.3536L11.0201 8.35355L11.3737 8L11.0201 7.64645L7.02012 3.64645L6.66656 3.29289L6.31301 3.64645L5.37301 4.58645Z';\n\n let fill = 'var(--instrument-regular-secondary-color)';\n if (value === 'checked') fill = 'var(--instrument-enhanced-secondary-color)';\n\n const pointer = html`<svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <g filter=\"url(#filter0_d_903_44142)\">\n <path d=${path} fill=\"${fill}\" stroke=\"var(--border-silhouette-color)\" />\n </g>\n <defs>\n <filter\n id=\"filter0_d_903_44142\"\n x=\"-1\"\n y=\"0\"\n width=\"18\"\n height=\"18\"\n filterUnits=\"userSpaceOnUse\"\n color-interpolation-filters=\"sRGB\"\n >\n <feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\" />\n <feColorMatrix\n in=\"SourceAlpha\"\n type=\"matrix\"\n values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\"\n result=\"hardAlpha\"\n />\n <feOffset dy=\"1\" />\n <feGaussianBlur stdDeviation=\"0.5\" />\n <feColorMatrix\n type=\"matrix\"\n values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0\"\n />\n <feBlend\n mode=\"normal\"\n in2=\"BackgroundImageFix\"\n result=\"effect1_dropShadow_903_44142\"\n />\n <feBlend\n mode=\"normal\"\n in=\"SourceGraphic\"\n in2=\"effect1_dropShadow_903_44142\"\n result=\"shape\"\n />\n </filter>\n </defs>\n </svg> `;\n\n return pointer;\n}\n"],"names":[],"mappings":";;AAGgB,SAAA,aAAa,aAAsB,OAAe;AAChE,QAAM,OACJ,gBAAgB,QAAQ,YACpB,uQACA;AAEN,MAAI,OAAO;AACP,MAAA,UAAU,UAAkB,QAAA;AAEhC,QAAM,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAQF,IAAI,UAAU,IAAI;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;AAwCzB,SAAA;AACT;"}
1
+ {"version":3,"file":"arrow.js","sources":["../../../src/navigation-instruments/poi-target/arrow.ts"],"sourcesContent":["import {Pointer} from './poi-target';\nimport {html} from 'lit';\n\nexport function pointerArrow(pointerType: Pointer, value: string) {\n const path =\n pointerType === Pointer.ArrowLeft\n ? 'M10.627 4.58645L10.9802 4.93961L10.6274 5.29317L7.92644 8L10.6274 10.7068L10.9802 11.0604L10.627 11.4136L9.68699 12.3536L9.33344 12.7071L8.97988 12.3536L4.97988 8.35355L4.62633 8L4.97988 7.64645L8.97988 3.64645L9.33344 3.29289L9.68699 3.64645L10.627 4.58645Z'\n : 'M5.37301 4.58645L5.01984 4.93961L5.37262 5.29317L8.07356 8L5.37262 10.7068L5.01984 11.0604L5.37301 11.4136L6.31301 12.3536L6.66656 12.7071L7.02012 12.3536L11.0201 8.35355L11.3737 8L11.0201 7.64645L7.02012 3.64645L6.66656 3.29289L6.31301 3.64645L5.37301 4.58645Z';\n\n let fill = 'var(--instrument-regular-secondary-color)';\n if (value === 'checked') fill = 'var(--instrument-enhanced-secondary-color)';\n\n const pointer = html`<svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n vector-effect=\"non-scaling-stroke\"\n >\n <g filter=\"url(#filter0_d_903_44142)\">\n <path d=${path} fill=\"${fill}\" stroke=\"var(--border-silhouette-color)\" />\n </g>\n <defs>\n <filter\n id=\"filter0_d_903_44142\"\n x=\"-1\"\n y=\"0\"\n width=\"18\"\n height=\"18\"\n filterUnits=\"userSpaceOnUse\"\n color-interpolation-filters=\"sRGB\"\n >\n <feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\" />\n <feColorMatrix\n in=\"SourceAlpha\"\n type=\"matrix\"\n values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\"\n result=\"hardAlpha\"\n />\n <feOffset dy=\"1\" />\n <feGaussianBlur stdDeviation=\"0.5\" />\n <feColorMatrix\n type=\"matrix\"\n values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0\"\n />\n <feBlend\n mode=\"normal\"\n in2=\"BackgroundImageFix\"\n result=\"effect1_dropShadow_903_44142\"\n />\n <feBlend\n mode=\"normal\"\n in=\"SourceGraphic\"\n in2=\"effect1_dropShadow_903_44142\"\n result=\"shape\"\n />\n </filter>\n </defs>\n </svg> `;\n\n return pointer;\n}\n"],"names":[],"mappings":";;AAGgB,SAAA,aAAa,aAAsB,OAAe;AAChE,QAAM,OACJ,gBAAgB,QAAQ,YACpB,uQACA;AAEN,MAAI,OAAO;AACP,MAAA,UAAU,UAAkB,QAAA;AAEhC,QAAM,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBASF,IAAI,UAAU,IAAI;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;AAwCzB,SAAA;AACT;"}
@@ -1,24 +1,22 @@
1
1
  import { css } from "lit";
2
- const compentStyle = css`.wrapper {
2
+ const compentStyle = css`.container {
3
3
  padding: 0;
4
4
  background: transparent;
5
5
  appearance: none;
6
- width: 48px;
6
+ width: 200px;
7
7
  height: auto;
8
8
  border: none;
9
9
  display: flex;
10
+ flex-direction: row;
11
+ }
12
+
13
+ .wrapper {
14
+ position: relative;
15
+ display: flex;
10
16
  flex-direction: column;
11
17
  align-items: center;
12
- justify-content: center;
18
+ width: 48px;
13
19
  }
14
- .wrapper.type-arrow-left {
15
- width: 56px;
16
- flex-direction: row-reverse;
17
- }
18
- .wrapper.type-arrow-right {
19
- width: 56px;
20
- flex-direction: row;
21
- }
22
20
  `;
23
21
  export {
24
22
  compentStyle as default
@@ -1 +1 @@
1
- {"version":3,"file":"poi-target.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"poi-target.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;"}
@@ -11,6 +11,10 @@ export declare enum Pointer {
11
11
  ArrowRight = "arrow-right",
12
12
  None = "null"
13
13
  }
14
+ /**
15
+ *
16
+ * @prop {number} height - y-coordinate of pointer (centre) if pointerType 'line' is selected.
17
+ */
14
18
  export declare class ObcPoiTarget extends LitElement {
15
19
  height: number;
16
20
  value: TargetValue;
@@ -1 +1 @@
1
- {"version":3,"file":"poi-target.d.ts","sourceRoot":"","sources":["../../../src/navigation-instruments/poi-target/poi-target.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAkB,MAAM,KAAK,CAAC;AAIhD,OAAO,sBAAsB,CAAC;AAC9B,OAAO,sDAAsD,CAAC;AAK9D,oBAAY,WAAW;IACrB,OAAO,YAAY;IACnB,OAAO,YAAY;CACpB;AA4BD,oBAAY,OAAO;IACjB,IAAI,SAAS;IACb,SAAS,eAAe;IACxB,UAAU,gBAAgB;IAC1B,IAAI,SAAS;CACd;AAED,qBACa,YAAa,SAAQ,UAAU;IAChB,MAAM,EAAE,MAAM,CAAO;IACrB,KAAK,EAAE,WAAW,CAAuB;IACzC,WAAW,EAAE,OAAO,CAAgB;IACpC,iBAAiB,SAAK;IAEvC,MAAM;IA0Cf,OAAgB,MAAM,0BAA2B;CAClD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,gBAAgB,EAAE,YAAY,CAAC;KAChC;CACF"}
1
+ {"version":3,"file":"poi-target.d.ts","sourceRoot":"","sources":["../../../src/navigation-instruments/poi-target/poi-target.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAkB,MAAM,KAAK,CAAC;AAIhD,OAAO,sBAAsB,CAAC;AAC9B,OAAO,sDAAsD,CAAC;AAK9D,oBAAY,WAAW;IACrB,OAAO,YAAY;IACnB,OAAO,YAAY;CACpB;AA4BD,oBAAY,OAAO;IACjB,IAAI,SAAS;IACb,SAAS,eAAe;IACxB,UAAU,gBAAgB;IAC1B,IAAI,SAAS;CACd;AAED;;;GAGG;AAEH,qBACa,YAAa,SAAQ,UAAU;IAChB,MAAM,EAAE,MAAM,CAAO;IACrB,KAAK,EAAE,WAAW,CAAuB;IACzC,WAAW,EAAE,OAAO,CAAgB;IACpC,iBAAiB,SAAK;IAEvC,MAAM;IA6Cf,OAAgB,MAAM,0BAA2B;CAClD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,gBAAgB,EAAE,YAAY,CAAC;KAChC;CACF"}
@@ -5,7 +5,6 @@ import { classMap } from "lit/directives/class-map.js";
5
5
  import "../poi-line/poi-line.js";
6
6
  import { PoiTargetButtonValue } from "../../components/poi-target-button/poi-target-button.js";
7
7
  import { POIStyle } from "../poi-graphic-line/poi-config.js";
8
- import { pointerArrow } from "./arrow.js";
9
8
  var __defProp = Object.defineProperty;
10
9
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
11
10
  var __decorateClass = (decorators, target, key, kind) => {
@@ -55,28 +54,27 @@ var Pointer = /* @__PURE__ */ ((Pointer2) => {
55
54
  let ObcPoiTarget = class extends LitElement {
56
55
  constructor() {
57
56
  super(...arguments);
58
- this.height = 188;
57
+ this.height = 192;
59
58
  this.value = "enabled";
60
59
  this.pointerType = "line";
61
60
  this.relativeDirection = 0;
62
61
  }
63
62
  render() {
64
63
  let pointer = null;
65
- let hasArrowPointer = false;
66
64
  switch (this.pointerType) {
67
65
  case "line":
68
- pointer = html`<obc-poi-line
69
- height=${this.height}
70
- lineStyle=${valueToPointerStyle(this.value)}
71
- ></obc-poi-line>`;
66
+ pointer = html`
67
+ <obc-poi-line
68
+ height=${this.height}
69
+ poiStyle=${valueToPointerStyle(this.value)}
70
+ ></obc-poi-line>
71
+ `;
72
72
  break;
73
73
  case "arrow-left":
74
- pointer = pointerArrow(this.pointerType, this.value);
75
- hasArrowPointer = true;
74
+ pointer = "arrow-left";
76
75
  break;
77
76
  case "arrow-right":
78
- pointer = pointerArrow(this.pointerType, this.value);
79
- hasArrowPointer = true;
77
+ pointer = "arrow-right";
80
78
  break;
81
79
  case "null":
82
80
  pointer = null;
@@ -85,18 +83,21 @@ let ObcPoiTarget = class extends LitElement {
85
83
  throw new Error(`Pointer type ${this.pointerType} not supported`);
86
84
  }
87
85
  return html`
88
- <div
89
- class=${classMap({
86
+ <div class="wrapper">
87
+ <div
88
+ class=${classMap({
90
89
  wrapper: true,
91
90
  ["type-" + this.pointerType]: true
92
91
  })}
93
- >
94
- <obc-poi-target-button
95
- .value=${valueToButtonStyle(this.value)}
96
- .hasPointer=${hasArrowPointer}
97
- .relativeDirection=${this.relativeDirection}
98
- ></obc-poi-target-button>
99
- ${pointer}
92
+ >
93
+ <obc-poi-target-button
94
+ .value=${valueToButtonStyle(this.value)}
95
+ .pointer=${this.pointerType}
96
+ .relativeDirection=${this.relativeDirection}
97
+ ></obc-poi-target-button>
98
+
99
+ ${this.pointerType === "line" ? pointer : null}
100
+ </div>
100
101
  </div>
101
102
  `;
102
103
  }
@@ -1 +1 @@
1
- {"version":3,"file":"poi-target.js","sources":["../../../src/navigation-instruments/poi-target/poi-target.ts"],"sourcesContent":["import {LitElement, html, unsafeCSS} from 'lit';\nimport {customElement, property} from 'lit/decorators.js';\nimport compentStyle from './poi-target.css?inline';\nimport {classMap} from 'lit/directives/class-map.js';\nimport '../poi-line/poi-line';\nimport '../../components/poi-target-button/poi-target-button';\nimport {POIStyle} from '../poi-graphic-line/poi-config';\nimport {pointerArrow} from './arrow';\nimport {PoiTargetButtonValue} from '../../components/poi-target-button/poi-target-button';\n\nexport enum TargetValue {\n enabled = 'enabled',\n checked = 'checked',\n}\n\nfunction valueToPointerStyle(value: TargetValue): POIStyle {\n let style = null;\n switch (value) {\n case TargetValue.enabled:\n style = POIStyle.Normal;\n break;\n case TargetValue.checked:\n style = POIStyle.Enhanced;\n break;\n default:\n throw new Error(`Value has no style: ${style}`);\n }\n return style;\n}\n\nfunction valueToButtonStyle(value: TargetValue): PoiTargetButtonValue {\n switch (value) {\n case TargetValue.enabled:\n return PoiTargetButtonValue.unchecked;\n case 'checked':\n return PoiTargetButtonValue.checked;\n default:\n throw new Error(`Value has no style: ${value}`);\n }\n}\n\nexport enum Pointer {\n Line = 'line',\n ArrowLeft = 'arrow-left',\n ArrowRight = 'arrow-right',\n None = 'null',\n}\n\n@customElement('obc-poi-target')\nexport class ObcPoiTarget extends LitElement {\n @property({type: Number}) height: number = 188;\n @property({type: String}) value: TargetValue = TargetValue.enabled;\n @property({type: String}) pointerType: Pointer = Pointer.Line;\n @property({type: Number}) relativeDirection = 0;\n\n override render() {\n let pointer = null;\n let hasArrowPointer = false;\n switch (this.pointerType) {\n case Pointer.Line:\n pointer = html`<obc-poi-line\n height=${this.height}\n lineStyle=${valueToPointerStyle(this.value)}\n ></obc-poi-line>`;\n break;\n case Pointer.ArrowLeft:\n pointer = pointerArrow(this.pointerType, this.value);\n hasArrowPointer = true;\n break;\n case Pointer.ArrowRight:\n pointer = pointerArrow(this.pointerType, this.value);\n hasArrowPointer = true;\n break;\n case Pointer.None:\n pointer = null;\n break;\n default:\n throw new Error(`Pointer type ${this.pointerType} not supported`);\n }\n\n return html`\n <div\n class=${classMap({\n wrapper: true,\n ['type-' + this.pointerType]: true,\n })}\n >\n <obc-poi-target-button\n .value=${valueToButtonStyle(this.value)}\n .hasPointer=${hasArrowPointer}\n .relativeDirection=${this.relativeDirection}\n ></obc-poi-target-button>\n ${pointer}\n </div>\n `;\n }\n\n static override styles = unsafeCSS(compentStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-poi-target': ObcPoiTarget;\n }\n}\n"],"names":["TargetValue","Pointer"],"mappings":";;;;;;;;;;;;;;;;;;AAUY,IAAA,gCAAAA,iBAAL;AACLA,eAAA,SAAU,IAAA;AACVA,eAAA,SAAU,IAAA;AAFAA,SAAAA;AAAA,GAAA,eAAA,CAAA,CAAA;AAKZ,SAAS,oBAAoB,OAA8B;AACzD,MAAI,QAAQ;AACZ,UAAQ,OAAO;AAAA,IACb,KAAK;AACH,cAAQ,SAAS;AACjB;AAAA,IACF,KAAK;AACH,cAAQ,SAAS;AACjB;AAAA,IACF;AACE,YAAM,IAAI,MAAM,uBAAuB,KAAK,EAAE;AAAA,EAAA;AAE3C,SAAA;AACT;AAEA,SAAS,mBAAmB,OAA0C;AACpE,UAAQ,OAAO;AAAA,IACb,KAAK;AACH,aAAO,qBAAqB;AAAA,IAC9B,KAAK;AACH,aAAO,qBAAqB;AAAA,IAC9B;AACE,YAAM,IAAI,MAAM,uBAAuB,KAAK,EAAE;AAAA,EAAA;AAEpD;AAEY,IAAA,4BAAAC,aAAL;AACLA,WAAA,MAAO,IAAA;AACPA,WAAA,WAAY,IAAA;AACZA,WAAA,YAAa,IAAA;AACbA,WAAA,MAAO,IAAA;AAJGA,SAAAA;AAAA,GAAA,WAAA,CAAA,CAAA;AAQC,IAAA,eAAN,cAA2B,WAAW;AAAA,EAAtC,cAAA;AAAA,UAAA,GAAA,SAAA;AACsC,SAAA,SAAA;AACI,SAAA,QAAA;AACE,SAAA,cAAA;AACH,SAAA,oBAAA;AAAA,EAAA;AAAA,EAErC,SAAS;AAChB,QAAI,UAAU;AACd,QAAI,kBAAkB;AACtB,YAAQ,KAAK,aAAa;AAAA,MACxB,KAAK;AACO,kBAAA;AAAA,mBACC,KAAK,MAAM;AAAA,sBACR,oBAAoB,KAAK,KAAK,CAAC;AAAA;AAE7C;AAAA,MACF,KAAK;AACH,kBAAU,aAAa,KAAK,aAAa,KAAK,KAAK;AACjC,0BAAA;AAClB;AAAA,MACF,KAAK;AACH,kBAAU,aAAa,KAAK,aAAa,KAAK,KAAK;AACjC,0BAAA;AAClB;AAAA,MACF,KAAK;AACO,kBAAA;AACV;AAAA,MACF;AACE,cAAM,IAAI,MAAM,gBAAgB,KAAK,WAAW,gBAAgB;AAAA,IAAA;AAG7D,WAAA;AAAA;AAAA,gBAEK,SAAS;AAAA,MACf,SAAS;AAAA,MACT,CAAC,UAAU,KAAK,WAAW,GAAG;AAAA,IAAA,CAC/B,CAAC;AAAA;AAAA;AAAA,mBAGS,mBAAmB,KAAK,KAAK,CAAC;AAAA,wBACzB,eAAe;AAAA,+BACR,KAAK,iBAAiB;AAAA;AAAA,UAE3C,OAAO;AAAA;AAAA;AAAA,EAAA;AAMjB;AAjDa,aAgDK,SAAS,UAAU,YAAY;AA/CrB,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAO,CAAA;AAAA,GADb,aACe,WAAA,UAAA,CAAA;AACA,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAO,CAAA;AAAA,GAFb,aAEe,WAAA,SAAA,CAAA;AACA,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAO,CAAA;AAAA,GAHb,aAGe,WAAA,eAAA,CAAA;AACA,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAO,CAAA;AAAA,GAJb,aAIe,WAAA,qBAAA,CAAA;AAJf,eAAN,gBAAA;AAAA,EADN,cAAc,gBAAgB;AAAA,GAClB,YAAA;"}
1
+ {"version":3,"file":"poi-target.js","sources":["../../../src/navigation-instruments/poi-target/poi-target.ts"],"sourcesContent":["import {LitElement, html, unsafeCSS} from 'lit';\nimport {customElement, property} from 'lit/decorators.js';\nimport compentStyle from './poi-target.css?inline';\nimport {classMap} from 'lit/directives/class-map.js';\nimport '../poi-line/poi-line';\nimport '../../components/poi-target-button/poi-target-button';\nimport {POIStyle} from '../poi-graphic-line/poi-config';\n\nimport {PoiTargetButtonValue} from '../../components/poi-target-button/poi-target-button';\n\nexport enum TargetValue {\n enabled = 'enabled',\n checked = 'checked',\n}\n\nfunction valueToPointerStyle(value: TargetValue): POIStyle {\n let style = null;\n switch (value) {\n case TargetValue.enabled:\n style = POIStyle.Normal;\n break;\n case TargetValue.checked:\n style = POIStyle.Enhanced;\n break;\n default:\n throw new Error(`Value has no style: ${style}`);\n }\n return style;\n}\n\nfunction valueToButtonStyle(value: TargetValue): PoiTargetButtonValue {\n switch (value) {\n case TargetValue.enabled:\n return PoiTargetButtonValue.unchecked;\n case 'checked':\n return PoiTargetButtonValue.checked;\n default:\n throw new Error(`Value has no style: ${value}`);\n }\n}\n\nexport enum Pointer {\n Line = 'line',\n ArrowLeft = 'arrow-left',\n ArrowRight = 'arrow-right',\n None = 'null',\n}\n\n/**\n *\n * @prop {number} height - y-coordinate of pointer (centre) if pointerType 'line' is selected.\n */\n\n@customElement('obc-poi-target')\nexport class ObcPoiTarget extends LitElement {\n @property({type: Number}) height: number = 192;\n @property({type: String}) value: TargetValue = TargetValue.enabled;\n @property({type: String}) pointerType: Pointer = Pointer.Line;\n @property({type: Number}) relativeDirection = 0;\n\n override render() {\n let pointer = null;\n\n switch (this.pointerType) {\n case Pointer.Line:\n pointer = html`\n <obc-poi-line\n height=${this.height}\n poiStyle=${valueToPointerStyle(this.value)}\n ></obc-poi-line>\n `;\n break;\n case Pointer.ArrowLeft:\n pointer = Pointer.ArrowLeft;\n break;\n case Pointer.ArrowRight:\n pointer = Pointer.ArrowRight;\n break;\n case Pointer.None:\n pointer = null;\n break;\n default:\n throw new Error(`Pointer type ${this.pointerType} not supported`);\n }\n\n return html`\n <div class=\"wrapper\">\n <div\n class=${classMap({\n wrapper: true,\n ['type-' + this.pointerType]: true,\n })}\n >\n <obc-poi-target-button\n .value=${valueToButtonStyle(this.value)}\n .pointer=${this.pointerType}\n .relativeDirection=${this.relativeDirection}\n ></obc-poi-target-button>\n\n ${this.pointerType === Pointer.Line ? pointer : null}\n </div>\n </div>\n `;\n }\n\n static override styles = unsafeCSS(compentStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-poi-target': ObcPoiTarget;\n }\n}\n"],"names":["TargetValue","Pointer"],"mappings":";;;;;;;;;;;;;;;;;AAUY,IAAA,gCAAAA,iBAAL;AACLA,eAAA,SAAU,IAAA;AACVA,eAAA,SAAU,IAAA;AAFAA,SAAAA;AAAA,GAAA,eAAA,CAAA,CAAA;AAKZ,SAAS,oBAAoB,OAA8B;AACzD,MAAI,QAAQ;AACZ,UAAQ,OAAO;AAAA,IACb,KAAK;AACH,cAAQ,SAAS;AACjB;AAAA,IACF,KAAK;AACH,cAAQ,SAAS;AACjB;AAAA,IACF;AACE,YAAM,IAAI,MAAM,uBAAuB,KAAK,EAAE;AAAA,EAAA;AAE3C,SAAA;AACT;AAEA,SAAS,mBAAmB,OAA0C;AACpE,UAAQ,OAAO;AAAA,IACb,KAAK;AACH,aAAO,qBAAqB;AAAA,IAC9B,KAAK;AACH,aAAO,qBAAqB;AAAA,IAC9B;AACE,YAAM,IAAI,MAAM,uBAAuB,KAAK,EAAE;AAAA,EAAA;AAEpD;AAEY,IAAA,4BAAAC,aAAL;AACLA,WAAA,MAAO,IAAA;AACPA,WAAA,WAAY,IAAA;AACZA,WAAA,YAAa,IAAA;AACbA,WAAA,MAAO,IAAA;AAJGA,SAAAA;AAAA,GAAA,WAAA,CAAA,CAAA;AAaC,IAAA,eAAN,cAA2B,WAAW;AAAA,EAAtC,cAAA;AAAA,UAAA,GAAA,SAAA;AACsC,SAAA,SAAA;AACI,SAAA,QAAA;AACE,SAAA,cAAA;AACH,SAAA,oBAAA;AAAA,EAAA;AAAA,EAErC,SAAS;AAChB,QAAI,UAAU;AAEd,YAAQ,KAAK,aAAa;AAAA,MACxB,KAAK;AACO,kBAAA;AAAA;AAAA,qBAEG,KAAK,MAAM;AAAA,uBACT,oBAAoB,KAAK,KAAK,CAAC;AAAA;AAAA;AAG9C;AAAA,MACF,KAAK;AACO,kBAAA;AACV;AAAA,MACF,KAAK;AACO,kBAAA;AACV;AAAA,MACF,KAAK;AACO,kBAAA;AACV;AAAA,MACF;AACE,cAAM,IAAI,MAAM,gBAAgB,KAAK,WAAW,gBAAgB;AAAA,IAAA;AAG7D,WAAA;AAAA;AAAA;AAAA,kBAGO,SAAS;AAAA,MACf,SAAS;AAAA,MACT,CAAC,UAAU,KAAK,WAAW,GAAG;AAAA,IAAA,CAC/B,CAAC;AAAA;AAAA;AAAA,qBAGS,mBAAmB,KAAK,KAAK,CAAC;AAAA,uBAC5B,KAAK,WAAW;AAAA,iCACN,KAAK,iBAAiB;AAAA;AAAA;AAAA,YAG3C,KAAK,gBAAgB,SAAe,UAAU,IAAI;AAAA;AAAA;AAAA;AAAA,EAAA;AAO9D;AApDa,aAmDK,SAAS,UAAU,YAAY;AAlDrB,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAO,CAAA;AAAA,GADb,aACe,WAAA,UAAA,CAAA;AACA,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAO,CAAA;AAAA,GAFb,aAEe,WAAA,SAAA,CAAA;AACA,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAO,CAAA;AAAA,GAHb,aAGe,WAAA,eAAA,CAAA;AACA,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAO,CAAA;AAAA,GAJb,aAIe,WAAA,qBAAA,CAAA;AAJf,eAAN,gBAAA;AAAA,EADN,cAAc,gBAAgB;AAAA,GAClB,YAAA;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oicl/openbridge-webcomponents",
3
- "version": "0.0.15-dev-20241203183951",
3
+ "version": "0.0.15-dev-20241203184948",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,3 +1,7 @@
1
+ * {
2
+ box-sizing: border-box;
3
+ }
4
+
1
5
  .wrapper {
2
6
  padding: 0;
3
7
  background: transparent;
@@ -5,10 +9,22 @@
5
9
  width: 48px;
6
10
  appearance: none;
7
11
  border: none;
12
+ border-radius: 14px;
8
13
  display: flex;
9
14
  align-items: center;
10
15
  justify-content: center;
11
16
 
17
+ @mixin style style=flat;
18
+
19
+ &.pointer-arrow-left {
20
+ width: 56px;
21
+ flex-direction: row-reverse;
22
+ }
23
+
24
+ &.pointer-arrow-right {
25
+ width: 56px;
26
+ }
27
+
12
28
  & .visible-wrapper {
13
29
  height: 32px;
14
30
  width: 32px;
@@ -23,17 +39,13 @@
23
39
  width: 24px;
24
40
  }
25
41
 
26
- &.pointer {
27
- width: 36px;
28
- }
29
-
30
42
  &.value-unchecked {
31
- @mixin style style=normal visibleWrapperClass=.visible-wrapper;
32
-
33
43
  .visible-wrapper {
34
- color: var(--normal-enabled-background-color);
44
+ background-color: var(--normal-enabled-background-color);
35
45
  border-color: var(--normal-enabled-border-color);
36
46
  box-shadow: var(--shadow-flat);
47
+ border-width: 1px;
48
+ border-style: solid;
37
49
  }
38
50
 
39
51
  .icon {
@@ -42,8 +54,6 @@
42
54
  }
43
55
 
44
56
  &.value-checked {
45
- @mixin style style=selected visibleWrapperClass=.visible-wrapper;
46
-
47
57
  .visible-wrapper {
48
58
  background-color: var(--selected-enabled-background-color);
49
59
  border-color: var(--selected-enabled-border-color);
@@ -54,4 +64,4 @@
54
64
  color: var(--on-selected-active-color);
55
65
  }
56
66
  }
57
- }
67
+ }
@@ -2,6 +2,7 @@ import type {Meta, StoryObj} from '@storybook/web-components';
2
2
 
3
3
  import {ObcPoiTargetButton} from './poi-target-button';
4
4
  import './poi-target-button';
5
+ import {Pointer} from '../../navigation-instruments/poi-target/poi-target';
5
6
 
6
7
  const meta: Meta<typeof ObcPoiTargetButton> = {
7
8
  title: 'Button/POI Target Button',
@@ -10,12 +11,17 @@ const meta: Meta<typeof ObcPoiTargetButton> = {
10
11
  args: {
11
12
  value: 'checked',
12
13
  relativeDirection: 0,
14
+ pointer: Pointer.None,
13
15
  },
14
16
  argTypes: {
15
17
  value: {
16
18
  options: ['unchecked', 'checked'],
17
19
  control: {type: 'select'},
18
20
  },
21
+ pointer: {
22
+ options: [Pointer.None, Pointer.ArrowLeft, Pointer.ArrowRight],
23
+ control: {type: 'select'},
24
+ },
19
25
  relativeDirection: {
20
26
  control: {type: 'range', min: 0, max: 360},
21
27
  },
@@ -3,6 +3,8 @@ import {customElement, property} from 'lit/decorators.js';
3
3
  import compentStyle from './poi-target-button.css?inline';
4
4
  import {classMap} from 'lit/directives/class-map.js';
5
5
  import '../../icons/icon-iec-02-ais-target-activated';
6
+ import {pointerArrow} from '../../navigation-instruments/poi-target/arrow';
7
+ import {Pointer} from '../../navigation-instruments/poi-target/poi-target';
6
8
 
7
9
  export enum PoiTargetButtonValue {
8
10
  checked = 'checked',
@@ -13,7 +15,7 @@ export enum PoiTargetButtonValue {
13
15
  export class ObcPoiTargetButton extends LitElement {
14
16
  @property({type: String}) value: PoiTargetButtonValue =
15
17
  PoiTargetButtonValue.checked;
16
- @property({type: Boolean}) hasPointer = false;
18
+ @property({type: String}) pointer = Pointer.None;
17
19
  @property({type: Number}) relativeDirection = 0;
18
20
 
19
21
  override render() {
@@ -22,7 +24,7 @@ export class ObcPoiTargetButton extends LitElement {
22
24
  class=${classMap({
23
25
  wrapper: true,
24
26
  ['value-' + this.value]: true,
25
- pointer: this.hasPointer,
27
+ ['pointer-' + this.pointer]: true,
26
28
  })}
27
29
  >
28
30
  <div class="visible-wrapper">
@@ -33,6 +35,9 @@ export class ObcPoiTargetButton extends LitElement {
33
35
  <obi-iec-02-ais-target-activated></obi-iec-02-ais-target-activated>
34
36
  </div>
35
37
  </div>
38
+ ${this.pointer === Pointer.None || this.pointer === Pointer.Line
39
+ ? ''
40
+ : pointerArrow(this.pointer, this.value)}
36
41
  </button>
37
42
  `;
38
43
  }
@@ -1,45 +1,42 @@
1
1
  export enum POIStyle {
2
2
  Normal = 'normal',
3
- Raised = 'raised',
4
3
  Enhanced = 'enhanced',
5
- Input = 'input',
6
- Light = 'light',
7
- Track = 'track',
8
4
  }
9
5
 
10
- export enum POIState {
11
- solid = 'solid',
12
- dashed = 'dashed',
13
- }
14
-
15
- export interface POIStyleConfig {
6
+ export interface POILineParams {
16
7
  lineColor: string;
17
8
  outlineColor: string;
9
+ width: number;
10
+ lineWidth: number;
11
+ outlineWidth: number;
12
+ shadowAlpha: number;
13
+ dotStart: number;
14
+ lineEnd: number;
15
+ filterDimensions: {x: number; y: number; width: number};
18
16
  }
19
17
 
20
- export const POI_STYLES: Record<POIStyle, POIStyleConfig> = {
18
+ export const POI_LINE_CONFIG: Record<POIStyle, POILineParams> = {
21
19
  [POIStyle.Normal]: {
22
20
  lineColor: 'var(--element-active-inverted-color)',
23
21
  outlineColor: 'var(--element-disabled-color)',
22
+ width: 4,
23
+ lineWidth: 1,
24
+ outlineWidth: 1,
25
+ shadowAlpha: 0.8,
26
+ dotStart: 2,
27
+ lineEnd: 3,
28
+ filterDimensions: {x: 0.5, y: 0.5, width: 3},
24
29
  },
25
- [POIStyle.Raised]: {
26
- lineColor: 'var(--element-active-inverted-color)',
27
- outlineColor: 'var(--border-outline-color)',
28
- },
30
+
29
31
  [POIStyle.Enhanced]: {
30
32
  lineColor: 'var(--instrument-enhanced-secondary-color)',
31
33
  outlineColor: 'var(--element-active-inverted-color)',
32
- },
33
- [POIStyle.Input]: {
34
- lineColor: 'var(--instrument-enhanced-primary-color)',
35
- outlineColor: 'var(--element-active-inverted-color)',
36
- },
37
- [POIStyle.Light]: {
38
- lineColor: 'var(--instrument-port-color)',
39
- outlineColor: 'var(--element-active-color)',
40
- },
41
- [POIStyle.Track]: {
42
- lineColor: 'var(--instrument-enhanced-primary-color)',
43
- outlineColor: 'var(--element-active-inverted-color)',
34
+ width: 8,
35
+ lineWidth: 1,
36
+ outlineWidth: 2,
37
+ shadowAlpha: 0.2,
38
+ dotStart: 0,
39
+ lineEnd: 3,
40
+ filterDimensions: {x: 0, y: 0, width: 4},
44
41
  },
45
42
  };