@oicl/openbridge-webcomponents 0.0.8 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. package/.release-it.json +12 -0
  2. package/.storybook/main.ts +17 -0
  3. package/.storybook/preview.ts +0 -1
  4. package/CHANGELOG.md +118 -41
  5. package/__snapshots__/application-topbar--inactive.png +0 -0
  6. package/__snapshots__/button-button--raised-disabled.png +0 -0
  7. package/__snapshots__/button-rich-button--with-graphic-info.png +0 -0
  8. package/__snapshots__/input-slider--no-icons.png +0 -0
  9. package/__snapshots__/input-slider--no-value.png +0 -0
  10. package/__snapshots__/line-corner-line--primary.png +0 -0
  11. package/__snapshots__/line-example--air.png +0 -0
  12. package/__snapshots__/line-example--connector.png +0 -0
  13. package/__snapshots__/line-example--electric.png +0 -0
  14. package/__snapshots__/line-example--fluid.png +0 -0
  15. package/__snapshots__/line-horizontal-line--primary.png +0 -0
  16. package/__snapshots__/line-vertical-line--complex.png +0 -0
  17. package/__snapshots__/line-vertical-line--primary.png +0 -0
  18. package/custom-elements.json +679 -297
  19. package/dist/automation/corner-line/corner-line.d.ts +22 -0
  20. package/dist/automation/corner-line/corner-line.d.ts.map +1 -0
  21. package/dist/automation/corner-line/corner-line.js +161 -0
  22. package/dist/automation/corner-line/corner-line.js.map +1 -0
  23. package/dist/automation/horizontal-line/horizontal-line.d.ts +15 -0
  24. package/dist/automation/horizontal-line/horizontal-line.d.ts.map +1 -0
  25. package/dist/automation/horizontal-line/horizontal-line.js +110 -0
  26. package/dist/automation/horizontal-line/horizontal-line.js.map +1 -0
  27. package/dist/automation/index.d.ts +20 -0
  28. package/dist/automation/index.d.ts.map +1 -0
  29. package/dist/automation/index.js +42 -0
  30. package/dist/automation/index.js.map +1 -0
  31. package/dist/automation/vertical-line/vertical-line.d.ts +15 -0
  32. package/dist/automation/vertical-line/vertical-line.d.ts.map +1 -0
  33. package/dist/automation/vertical-line/vertical-line.js +111 -0
  34. package/dist/automation/vertical-line/vertical-line.js.map +1 -0
  35. package/dist/components/brilliance-menu/brilliance-menu.d.ts.map +1 -1
  36. package/dist/components/brilliance-menu/brilliance-menu.js +2 -0
  37. package/dist/components/brilliance-menu/brilliance-menu.js.map +1 -1
  38. package/dist/components/button/button.css.js +2 -2
  39. package/dist/components/navigation-item/navigation-item.css.js +2 -1
  40. package/dist/components/navigation-item/navigation-item.css.js.map +1 -1
  41. package/dist/components/notification-button/notification-button.css.js +1 -1
  42. package/dist/components/rich-button/rich-button.css.js +20 -10
  43. package/dist/components/rich-button/rich-button.css.js.map +1 -1
  44. package/dist/components/rich-button/rich-button.d.ts +1 -0
  45. package/dist/components/rich-button/rich-button.d.ts.map +1 -1
  46. package/dist/components/rich-button/rich-button.js +5 -0
  47. package/dist/components/rich-button/rich-button.js.map +1 -1
  48. package/dist/components/slider/slider.css.js +20 -0
  49. package/dist/components/slider/slider.css.js.map +1 -1
  50. package/dist/components/slider/slider.d.ts +8 -0
  51. package/dist/components/slider/slider.d.ts.map +1 -1
  52. package/dist/components/slider/slider.js +44 -18
  53. package/dist/components/slider/slider.js.map +1 -1
  54. package/dist/components/top-bar/top-bar.css.js +5 -1
  55. package/dist/components/top-bar/top-bar.css.js.map +1 -1
  56. package/dist/components/top-bar/top-bar.d.ts.map +1 -1
  57. package/dist/components/top-bar/top-bar.js +8 -8
  58. package/dist/components/top-bar/top-bar.js.map +1 -1
  59. package/fix-generated.cjs +1 -0
  60. package/package.json +20 -26
  61. package/src/automation/corner-line/corner-line.stories.ts +31 -0
  62. package/src/automation/corner-line/corner-line.ts +167 -0
  63. package/src/automation/horizontal-line/horizontal-line.stories.ts +28 -0
  64. package/src/automation/horizontal-line/horizontal-line.ts +100 -0
  65. package/src/automation/index.ts +41 -0
  66. package/src/automation/line.stories.ts +142 -0
  67. package/src/automation/vertical-line/vertical-line.stories.ts +71 -0
  68. package/src/automation/vertical-line/vertical-line.ts +104 -0
  69. package/src/components/brilliance-menu/brilliance-menu.ts +2 -0
  70. package/src/components/rich-button/rich-button.css +15 -2
  71. package/src/components/rich-button/rich-button.stories.ts +36 -0
  72. package/src/components/rich-button/rich-button.ts +2 -0
  73. package/src/components/slider/slider.css +20 -0
  74. package/src/components/slider/slider.stories.ts +20 -1
  75. package/src/components/slider/slider.ts +43 -19
  76. package/src/components/top-bar/top-bar.css +4 -0
  77. package/src/components/top-bar/top-bar.ts +10 -8
  78. package/src/palettes/variables.css +64 -43
  79. package/.yarnrc.yml +0 -1
  80. package/script/svg-instruments/convert-svg.ts +0 -246
  81. package/script/svg-instruments/environment.d.ts +0 -7
  82. package/script/svg-instruments/exports.ts +0 -82
  83. package/script/svg-instruments/figma-types.ts +0 -804
  84. package/script/svg-instruments/figmaImport.ts +0 -79
  85. package/script/svg-instruments/main.ts +0 -109
  86. package/test.svg +0 -3
@@ -65,7 +65,6 @@ const compentStyle = css`.wrapper {
65
65
  font-style: normal;
66
66
  font-weight: 650;
67
67
  line-height: 24px;
68
- /* 150% */
69
68
  }
70
69
  .wrapper.checked {
71
70
  border-color: var(--amplified-enabled-border-color);
@@ -100,6 +99,8 @@ const compentStyle = css`.wrapper {
100
99
  cursor: not-allowed;
101
100
  color: var(--on-amplified-disabled-color);
102
101
  }
102
+
103
+ /* 150% */
103
104
  .wrapper.checked .icon {
104
105
  color: var(--instrument-enhanced-secondary-color);
105
106
  }
@@ -1 +1 @@
1
- {"version":3,"file":"navigation-item.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"navigation-item.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -19,13 +19,13 @@ const componentStyle = css`* {
19
19
  display: flex;
20
20
  align-items: center;
21
21
  justify-content: center;
22
- color: var(--on-normal-active-color);
23
22
  font-family: 'Noto Sans';
24
23
  font-size: 1rem;
25
24
  font-style: normal;
26
25
  font-weight: 570;
27
26
  line-height: 1.5rem;
28
27
  /* 150% */
28
+ color: var(--on-normal-active-color);
29
29
  }
30
30
 
31
31
  .wrapper {
@@ -5,17 +5,20 @@ const compentStyle = css`* {
5
5
 
6
6
  .wrapper {
7
7
  position: relative;
8
+ }
9
+
10
+ .wrapper:not(.info) {
8
11
  background-color: var(--container-background-color);
9
12
  box-shadow: var(--shadow-flat);
10
13
  overflow: hidden;
11
14
  }
12
15
 
13
- .wrapper.top, .wrapper.regular {
16
+ .wrapper.top:not(.info), .wrapper.regular:not(.info) {
14
17
  border-top-left-radius: 6px;
15
18
  border-top-right-radius: 6px;
16
19
  }
17
20
 
18
- .wrapper.bottom, .wrapper.regular {
21
+ .wrapper.bottom:not(.info), .wrapper.regular:not(.info) {
19
22
  border-bottom-left-radius: 6px;
20
23
  border-bottom-right-radius: 6px;
21
24
  }
@@ -23,14 +26,15 @@ const compentStyle = css`* {
23
26
  button {
24
27
  width: 100%;
25
28
  appearance: none;
26
- border-width: 0 !important;
27
29
  display: flex;
28
30
  flex-direction: column;
29
31
  text-align: left;
30
32
  padding: 0;
33
+ border-width: 0 !important;
34
+ background-color: transparent;
31
35
  }
32
36
 
33
- button {
37
+ .wrapper:not(.info) button {
34
38
  border-color: var(--flat-enabled-border-color);
35
39
  background-color: var(--flat-enabled-background-color);
36
40
  border-width: 1px;
@@ -38,32 +42,32 @@ button {
38
42
  cursor: pointer;
39
43
  }
40
44
 
41
- button:focus {
45
+ .wrapper:not(.info) button:focus {
42
46
  outline: none;
43
47
  }
44
48
 
45
- button.activated {
49
+ .wrapper:not(.info) button.activated {
46
50
  border-color: var(--flat-activated-border-color);
47
51
  background-color: var(--flat-activated-background-color);
48
52
  }
49
53
 
50
- button:focus-visible {
54
+ .wrapper:not(.info) button:focus-visible {
51
55
  outline-color: hsla(211, 100%, 44%, 0.3);
52
56
  outline-width: 4px;
53
57
  outline-style: solid;
54
58
  }
55
59
 
56
- button:hover {
60
+ .wrapper:not(.info) button:hover {
57
61
  border-color: var(--flat-hover-border-color);
58
62
  background-color: var(--flat-hover-background-color);
59
63
  }
60
64
 
61
- button:active {
65
+ .wrapper:not(.info) button:active {
62
66
  border-color: var(--flat-pressed-border-color);
63
67
  background-color: var(--flat-pressed-background-color);
64
68
  }
65
69
 
66
- button:disabled {
70
+ .wrapper:not(.info) button:disabled {
67
71
  border-color: var(--flat-disabled-border-color);
68
72
  background-color: var(--flat-disabled-background-color);
69
73
  cursor: not-allowed;
@@ -175,6 +179,12 @@ button:disabled {
175
179
  border-bottom: 1px solid var(--border-outline-color);
176
180
  margin-bottom: -1px;
177
181
  }
182
+
183
+ .info .graphic {
184
+ border-radius: 6px;
185
+ box-shadow: var(--shadow-flat);
186
+ overflow: hidden;
187
+ }
178
188
  `;
179
189
  export {
180
190
  compentStyle as default
@@ -1 +1 @@
1
- {"version":3,"file":"rich-button.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"rich-button.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -15,6 +15,7 @@ export type ObcRichButtonSizeType = 'single-line' | 'double-line' | 'multi-line'
15
15
  export declare class ObcRichButton extends LitElement {
16
16
  position: ObcRichButtonPositionType;
17
17
  size: ObcRichButtonSizeType;
18
+ info: boolean;
18
19
  hasLeadingIcon: boolean;
19
20
  hasTrailingIcon: boolean;
20
21
  hasStatus: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"rich-button.d.ts","sourceRoot":"","sources":["../../../src/components/rich-button/rich-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAA2B,MAAM,KAAK,CAAC;AAKzD,oBAAY,qBAAqB;IAC/B,OAAO,YAAY;IACnB,GAAG,QAAQ;IACX,MAAM,WAAW;IACjB,MAAM,WAAW;CAClB;AACD,MAAM,MAAM,yBAAyB,GAAG,SAAS,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEhF,oBAAY,iBAAiB;IAC3B,UAAU,gBAAgB;IAC1B,UAAU,gBAAgB;IAC1B,SAAS,eAAe;CACzB;AACD,MAAM,MAAM,qBAAqB,GAC7B,aAAa,GACb,aAAa,GACb,YAAY,CAAC;AAEjB,qBACa,aAAc,SAAQ,UAAU;IACjB,QAAQ,EAAE,yBAAyB,CAC7B;IACN,IAAI,EAAE,qBAAqB,CACtB;IAC2B,cAAc,UAChE;IACmD,eAAe,UAClE;IAC4C,SAAS,UAAS;IACjB,UAAU,UAAS;IAChB,aAAa,UAAS;IACnD,MAAM,UAAS;IAEjC,MAAM;IAiDf,OAAgB,MAAM,0BAA2B;CAClD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,iBAAiB,EAAE,aAAa,CAAC;KAClC;CACF"}
1
+ {"version":3,"file":"rich-button.d.ts","sourceRoot":"","sources":["../../../src/components/rich-button/rich-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAA2B,MAAM,KAAK,CAAC;AAKzD,oBAAY,qBAAqB;IAC/B,OAAO,YAAY;IACnB,GAAG,QAAQ;IACX,MAAM,WAAW;IACjB,MAAM,WAAW;CAClB;AACD,MAAM,MAAM,yBAAyB,GAAG,SAAS,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEhF,oBAAY,iBAAiB;IAC3B,UAAU,gBAAgB;IAC1B,UAAU,gBAAgB;IAC1B,SAAS,eAAe;CACzB;AACD,MAAM,MAAM,qBAAqB,GAC7B,aAAa,GACb,aAAa,GACb,YAAY,CAAC;AAEjB,qBACa,aAAc,SAAQ,UAAU;IACjB,QAAQ,EAAE,yBAAyB,CAC7B;IACN,IAAI,EAAE,qBAAqB,CACtB;IACJ,IAAI,UAAS;IACkB,cAAc,UAChE;IACmD,eAAe,UAClE;IAC4C,SAAS,UAAS;IACjB,UAAU,UAAS;IAChB,aAAa,UAAS;IACnD,MAAM,UAAS;IAEjC,MAAM;IAkDf,OAAgB,MAAM,0BAA2B;CAClD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,iBAAiB,EAAE,aAAa,CAAC;KAClC;CACF"}
@@ -31,6 +31,7 @@ let ObcRichButton = class extends LitElement {
31
31
  super(...arguments);
32
32
  this.position = "regular";
33
33
  this.size = "single-line";
34
+ this.info = false;
34
35
  this.hasLeadingIcon = false;
35
36
  this.hasTrailingIcon = false;
36
37
  this.hasStatus = false;
@@ -46,6 +47,7 @@ let ObcRichButton = class extends LitElement {
46
47
  [this.position]: true,
47
48
  [this.size]: true,
48
49
  "graphic-border": this.graphicBorder,
50
+ info: this.info,
49
51
  border: this.border
50
52
  })}
51
53
  >
@@ -84,6 +86,9 @@ __decorateClass([
84
86
  __decorateClass([
85
87
  property({ type: String })
86
88
  ], ObcRichButton.prototype, "size", 2);
89
+ __decorateClass([
90
+ property({ type: Boolean })
91
+ ], ObcRichButton.prototype, "info", 2);
87
92
  __decorateClass([
88
93
  property({ type: Boolean, attribute: "has-leading-icon" })
89
94
  ], ObcRichButton.prototype, "hasLeadingIcon", 2);
@@ -1 +1 @@
1
- {"version":3,"file":"rich-button.js","sources":["../../../src/components/rich-button/rich-button.ts"],"sourcesContent":["import {LitElement, html, nothing, unsafeCSS} from 'lit';\nimport {customElement, property} from 'lit/decorators.js';\nimport compentStyle from './rich-button.css?inline';\nimport {classMap} from 'lit/directives/class-map.js';\n\nexport enum ObcRichButtonPosition {\n Regular = 'regular',\n Top = 'top',\n Bottom = 'bottom',\n Center = 'center',\n}\nexport type ObcRichButtonPositionType = 'regular' | 'top' | 'bottom' | 'center';\n\nexport enum ObcRichButtonSize {\n SingleLine = 'single-line',\n DoubleLine = 'double-line',\n MultiLine = 'multi-line',\n}\nexport type ObcRichButtonSizeType =\n | 'single-line'\n | 'double-line'\n | 'multi-line';\n\n@customElement('obc-rich-button')\nexport class ObcRichButton extends LitElement {\n @property({type: String}) position: ObcRichButtonPositionType =\n ObcRichButtonPosition.Regular;\n @property({type: String}) size: ObcRichButtonSizeType =\n ObcRichButtonSize.SingleLine;\n @property({type: Boolean, attribute: 'has-leading-icon'}) hasLeadingIcon =\n false;\n @property({type: Boolean, attribute: 'has-trailing-icon'}) hasTrailingIcon =\n false;\n @property({type: Boolean, attribute: 'has-status'}) hasStatus = false;\n @property({type: Boolean, attribute: 'has-graphic'}) hasGraphic = false;\n @property({type: Boolean, attribute: 'graphic-border'}) graphicBorder = false;\n @property({type: Boolean}) border = false;\n\n override render() {\n return html`\n <div\n class=${classMap({\n wrapper: true,\n [this.position]: true,\n [this.size]: true,\n 'graphic-border': this.graphicBorder,\n border: this.border,\n })}\n >\n <button>\n ${this.hasGraphic\n ? html`<div class=\"graphic\"><slot name=\"graphic\"></slot></div>`\n : nothing}\n <div class=\"container\">\n <div class=\"container-content\">\n ${this.hasLeadingIcon\n ? html`<div class=\"leading-icon\">\n <slot name=\"leading-icon\"></slot>\n </div>`\n : nothing}\n <div class=\"content\">\n <slot name=\"label\"></slot>\n ${this.size === ObcRichButtonSize.SingleLine\n ? nothing\n : html`<slot name=\"description\"></slot>`}\n </div>\n </div>\n ${this.hasStatus\n ? html`\n <div class=\"status\">\n <slot name=\"status\"></slot>\n </div>\n `\n : nothing}\n ${this.hasTrailingIcon\n ? html`\n <div class=\"trailing-icon\">\n <slot name=\"trailing-icon\"></slot>\n </div>\n `\n : nothing}\n </div>\n </button>\n </div>\n `;\n }\n\n static override styles = unsafeCSS(compentStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-rich-button': ObcRichButton;\n }\n}\n"],"names":["ObcRichButtonPosition","ObcRichButtonSize"],"mappings":";;;;;;;;;;;;;;;AAKY,IAAA,0CAAAA,2BAAL;AACLA,yBAAA,SAAU,IAAA;AACVA,yBAAA,KAAM,IAAA;AACNA,yBAAA,QAAS,IAAA;AACTA,yBAAA,QAAS,IAAA;AAJCA,SAAAA;AAAA,GAAA,yBAAA,CAAA,CAAA;AAQA,IAAA,sCAAAC,uBAAL;AACLA,qBAAA,YAAa,IAAA;AACbA,qBAAA,YAAa,IAAA;AACbA,qBAAA,WAAY,IAAA;AAHFA,SAAAA;AAAA,GAAA,qBAAA,CAAA,CAAA;AAWC,IAAA,gBAAN,cAA4B,WAAW;AAAA,EAAvC,cAAA;AAAA,UAAA,GAAA,SAAA;AAEH,SAAA,WAAA;AAEA,SAAA,OAAA;AAEA,SAAA,iBAAA;AAEA,SAAA,kBAAA;AAC8D,SAAA,YAAA;AACE,SAAA,aAAA;AACM,SAAA,gBAAA;AACpC,SAAA,SAAA;AAAA,EAAA;AAAA,EAE3B,SAAS;AACT,WAAA;AAAA;AAAA,gBAEK,SAAS;AAAA,MACf,SAAS;AAAA,MACT,CAAC,KAAK,QAAQ,GAAG;AAAA,MACjB,CAAC,KAAK,IAAI,GAAG;AAAA,MACb,kBAAkB,KAAK;AAAA,MACvB,QAAQ,KAAK;AAAA,IAAA,CACd,CAAC;AAAA;AAAA;AAAA,YAGE,KAAK,aACH,gEACA,OAAO;AAAA;AAAA;AAAA,gBAGL,KAAK,iBACH;AAAA;AAAA,4BAGA,OAAO;AAAA;AAAA;AAAA,kBAGP,KAAK,SAAS,gBACZ,UACA,sCAAsC;AAAA;AAAA;AAAA,cAG5C,KAAK,YACH;AAAA;AAAA;AAAA;AAAA,oBAKA,OAAO;AAAA,cACT,KAAK,kBACH;AAAA;AAAA;AAAA;AAAA,oBAKA,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,EAKrB;AAGF;AAhEa,cA+DK,SAAS,UAAU,YAAY;AA9DrB,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,QAAO;AAAA,GADb,cACe,WAAA,YAAA,CAAA;AAEA,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,QAAO;AAAA,GAHb,cAGe,WAAA,QAAA,CAAA;AAEgC,gBAAA;AAAA,EAAzD,SAAS,EAAC,MAAM,SAAS,WAAW,oBAAmB;AAAA,GAL7C,cAK+C,WAAA,kBAAA,CAAA;AAEC,gBAAA;AAAA,EAA1D,SAAS,EAAC,MAAM,SAAS,WAAW,qBAAoB;AAAA,GAP9C,cAOgD,WAAA,mBAAA,CAAA;AAEP,gBAAA;AAAA,EAAnD,SAAS,EAAC,MAAM,SAAS,WAAW,cAAa;AAAA,GATvC,cASyC,WAAA,aAAA,CAAA;AACC,gBAAA;AAAA,EAApD,SAAS,EAAC,MAAM,SAAS,WAAW,eAAc;AAAA,GAVxC,cAU0C,WAAA,cAAA,CAAA;AACG,gBAAA;AAAA,EAAvD,SAAS,EAAC,MAAM,SAAS,WAAW,kBAAiB;AAAA,GAX3C,cAW6C,WAAA,iBAAA,CAAA;AAC7B,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,SAAQ;AAAA,GAZd,cAYgB,WAAA,UAAA,CAAA;AAZhB,gBAAN,gBAAA;AAAA,EADN,cAAc,iBAAiB;AAAA,GACnB,aAAA;"}
1
+ {"version":3,"file":"rich-button.js","sources":["../../../src/components/rich-button/rich-button.ts"],"sourcesContent":["import {LitElement, html, nothing, unsafeCSS} from 'lit';\nimport {customElement, property} from 'lit/decorators.js';\nimport compentStyle from './rich-button.css?inline';\nimport {classMap} from 'lit/directives/class-map.js';\n\nexport enum ObcRichButtonPosition {\n Regular = 'regular',\n Top = 'top',\n Bottom = 'bottom',\n Center = 'center',\n}\nexport type ObcRichButtonPositionType = 'regular' | 'top' | 'bottom' | 'center';\n\nexport enum ObcRichButtonSize {\n SingleLine = 'single-line',\n DoubleLine = 'double-line',\n MultiLine = 'multi-line',\n}\nexport type ObcRichButtonSizeType =\n | 'single-line'\n | 'double-line'\n | 'multi-line';\n\n@customElement('obc-rich-button')\nexport class ObcRichButton extends LitElement {\n @property({type: String}) position: ObcRichButtonPositionType =\n ObcRichButtonPosition.Regular;\n @property({type: String}) size: ObcRichButtonSizeType =\n ObcRichButtonSize.SingleLine;\n @property({type: Boolean}) info = false;\n @property({type: Boolean, attribute: 'has-leading-icon'}) hasLeadingIcon =\n false;\n @property({type: Boolean, attribute: 'has-trailing-icon'}) hasTrailingIcon =\n false;\n @property({type: Boolean, attribute: 'has-status'}) hasStatus = false;\n @property({type: Boolean, attribute: 'has-graphic'}) hasGraphic = false;\n @property({type: Boolean, attribute: 'graphic-border'}) graphicBorder = false;\n @property({type: Boolean}) border = false;\n\n override render() {\n return html`\n <div\n class=${classMap({\n wrapper: true,\n [this.position]: true,\n [this.size]: true,\n 'graphic-border': this.graphicBorder,\n info: this.info,\n border: this.border,\n })}\n >\n <button>\n ${this.hasGraphic\n ? html`<div class=\"graphic\"><slot name=\"graphic\"></slot></div>`\n : nothing}\n <div class=\"container\">\n <div class=\"container-content\">\n ${this.hasLeadingIcon\n ? html`<div class=\"leading-icon\">\n <slot name=\"leading-icon\"></slot>\n </div>`\n : nothing}\n <div class=\"content\">\n <slot name=\"label\"></slot>\n ${this.size === ObcRichButtonSize.SingleLine\n ? nothing\n : html`<slot name=\"description\"></slot>`}\n </div>\n </div>\n ${this.hasStatus\n ? html`\n <div class=\"status\">\n <slot name=\"status\"></slot>\n </div>\n `\n : nothing}\n ${this.hasTrailingIcon\n ? html`\n <div class=\"trailing-icon\">\n <slot name=\"trailing-icon\"></slot>\n </div>\n `\n : nothing}\n </div>\n </button>\n </div>\n `;\n }\n\n static override styles = unsafeCSS(compentStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-rich-button': ObcRichButton;\n }\n}\n"],"names":["ObcRichButtonPosition","ObcRichButtonSize"],"mappings":";;;;;;;;;;;;;;;AAKY,IAAA,0CAAAA,2BAAL;AACLA,yBAAA,SAAU,IAAA;AACVA,yBAAA,KAAM,IAAA;AACNA,yBAAA,QAAS,IAAA;AACTA,yBAAA,QAAS,IAAA;AAJCA,SAAAA;AAAA,GAAA,yBAAA,CAAA,CAAA;AAQA,IAAA,sCAAAC,uBAAL;AACLA,qBAAA,YAAa,IAAA;AACbA,qBAAA,YAAa,IAAA;AACbA,qBAAA,WAAY,IAAA;AAHFA,SAAAA;AAAA,GAAA,qBAAA,CAAA,CAAA;AAWC,IAAA,gBAAN,cAA4B,WAAW;AAAA,EAAvC,cAAA;AAAA,UAAA,GAAA,SAAA;AAEH,SAAA,WAAA;AAEA,SAAA,OAAA;AACgC,SAAA,OAAA;AAEhC,SAAA,iBAAA;AAEA,SAAA,kBAAA;AAC8D,SAAA,YAAA;AACE,SAAA,aAAA;AACM,SAAA,gBAAA;AACpC,SAAA,SAAA;AAAA,EAAA;AAAA,EAE3B,SAAS;AACT,WAAA;AAAA;AAAA,gBAEK,SAAS;AAAA,MACf,SAAS;AAAA,MACT,CAAC,KAAK,QAAQ,GAAG;AAAA,MACjB,CAAC,KAAK,IAAI,GAAG;AAAA,MACb,kBAAkB,KAAK;AAAA,MACvB,MAAM,KAAK;AAAA,MACX,QAAQ,KAAK;AAAA,IAAA,CACd,CAAC;AAAA;AAAA;AAAA,YAGE,KAAK,aACH,gEACA,OAAO;AAAA;AAAA;AAAA,gBAGL,KAAK,iBACH;AAAA;AAAA,4BAGA,OAAO;AAAA;AAAA;AAAA,kBAGP,KAAK,SA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
26
27
  .slider {
27
28
  position: absolute;
28
29
  -webkit-appearance: none;
@@ -71,6 +72,25 @@ const componentStyle = css`* {
71
72
  background: var(--selected-enabled-background-color);
72
73
  }
73
74
 
75
+ .no-input .interactive-track {
76
+ width: calc(var(--ratio) * 100% + (1 - 2 * var(--ratio)) * 4px);
77
+ }
78
+
79
+
80
+ /* used in non-interactive mode */
81
+ .passive-thumb {
82
+ position: absolute;
83
+ width: 16px;
84
+ height: 16px;
85
+ top: 16px;
86
+ left: calc(var(--ratio) * 100% - 8px + (1 - 2 * var(--ratio)) * 4px);
87
+ border-radius: 100%;
88
+ border-width: 4px;
89
+ border-style: solid;
90
+ border-color: var(--container-background-color);
91
+ background: var(--selected-enabled-background-color);
92
+ }
93
+
74
94
  .wrapper:hover .interactive-track {
75
95
  background: var(--selected-hover-background-color);
76
96
  }
@@ -1 +1 @@
1
- {"version":3,"file":"slider.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"slider.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,5 +1,10 @@
1
1
  import { LitElement } from 'lit';
2
2
  import '../icon-button/icon-button';
3
+ export declare enum ObcSliderVariant {
4
+ NoValue = "no-value",
5
+ NoInput = "no-input"
6
+ }
7
+ export type ObcSliderVariantType = 'no-value' | 'no-input';
3
8
  /**
4
9
  * @element obc-slider
5
10
  *
@@ -21,6 +26,9 @@ export declare class ObcSlider extends LitElement {
21
26
  max: number;
22
27
  step: number | undefined;
23
28
  stepClick: number;
29
+ variant: ObcSliderVariantType;
30
+ hasLeftIcon: boolean;
31
+ hasRightIcon: boolean;
24
32
  onInput(value: number): void;
25
33
  onReduceClick(): void;
26
34
  onIncreaseClick(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"slider.d.ts","sourceRoot":"","sources":["../../../src/components/slider/slider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAkB,MAAM,KAAK,CAAC;AAKhD,OAAO,4BAA4B,CAAC;AAEpC;;;;;;;;;;;;;;GAcG;AACH,qBACa,SAAU,SAAQ,UAAU;IACb,KAAK,SAAM;IACX,GAAG,SAAK;IACR,GAAG,SAAO;IACV,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACA,SAAS,SAAM;IAElE,OAAO,CAAC,KAAK,EAAE,MAAM;IAKrB,aAAa;IAIb,eAAe;IAIN,MAAM;IA+Bf,OAAgB,MAAM,0BAA6B;CACpD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,YAAY,EAAE,SAAS,CAAC;KACzB;CACF"}
1
+ {"version":3,"file":"slider.d.ts","sourceRoot":"","sources":["../../../src/components/slider/slider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAkB,MAAM,KAAK,CAAC;AAKhD,OAAO,4BAA4B,CAAC;AAGpC,oBAAY,gBAAgB;IAC1B,OAAO,aAAa;IACpB,OAAO,aAAa;CACrB;AAED,MAAM,MAAM,oBAAoB,GAAG,UAAU,GAAG,UAAU,CAAC;AAE3D;;;;;;;;;;;;;;GAcG;AACH,qBACa,SAAU,SAAQ,UAAU;IACb,KAAK,SAAM;IACX,GAAG,SAAK;IACR,GAAG,SAAO;IACV,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACA,SAAS,SAAM;IACxC,OAAO,EAAE,oBAAoB,CAAc;IACd,WAAW,UAAS;IACnB,YAAY,UAAS;IAE7E,OAAO,CAAC,KAAK,EAAE,MAAM;IAKrB,aAAa;IAIb,eAAe;IAIN,MAAM;IA4Cf,OAAgB,MAAM,0BAA6B;CACpD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,YAAY,EAAE,SAAS,CAAC;KACzB;CACF"}
@@ -4,6 +4,7 @@ import { styleMap } from "lit/directives/style-map.js";
4
4
  import { ifDefined } from "lit/directives/if-defined.js";
5
5
  import componentStyle from "./slider.css.js";
6
6
  import "../icon-button/icon-button.js";
7
+ import { classMap } from "lit/directives/class-map.js";
7
8
  var __defProp = Object.defineProperty;
8
9
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
9
10
  var __decorateClass = (decorators, target, key, kind) => {
@@ -15,6 +16,11 @@ var __decorateClass = (decorators, target, key, kind) => {
15
16
  __defProp(target, key, result);
16
17
  return result;
17
18
  };
19
+ var ObcSliderVariant = /* @__PURE__ */ ((ObcSliderVariant2) => {
20
+ ObcSliderVariant2["NoValue"] = "no-value";
21
+ ObcSliderVariant2["NoInput"] = "no-input";
22
+ return ObcSliderVariant2;
23
+ })(ObcSliderVariant || {});
18
24
  let ObcSlider = class extends LitElement {
19
25
  constructor() {
20
26
  super(...arguments);
@@ -22,6 +28,9 @@ let ObcSlider = class extends LitElement {
22
28
  this.min = 0;
23
29
  this.max = 100;
24
30
  this.stepClick = 10;
31
+ this.variant = "no-value";
32
+ this.hasLeftIcon = false;
33
+ this.hasRightIcon = false;
25
34
  }
26
35
  onInput(value) {
27
36
  this.value = value;
@@ -36,31 +45,38 @@ let ObcSlider = class extends LitElement {
36
45
  render() {
37
46
  const ratio = (this.value - this.min) / (this.max - this.min);
38
47
  return html`
39
- <obc-icon-button @click=${this.onReduceClick} variant="flat">
40
- <slot name="icon-left"></slot>
41
- </obc-icon-button>
42
- <div class="wrapper">
48
+ ${this.hasLeftIcon ? html` <obc-icon-button @click=${this.onReduceClick} variant="flat">
49
+ <slot name="icon-left"></slot>
50
+ </obc-icon-button>` : null}
51
+ <div class=${classMap({ wrapper: true, [this.variant]: true })}>
43
52
  <div class="track"></div>
44
53
  <div
45
54
  class="interactive-track"
46
55
  style=${styleMap({ "--ratio": ratio })}
47
56
  ></div>
48
- <input
49
- type="range"
50
- min=${this.min}
51
- max=${this.max}
52
- step=${ifDefined(this.step)}
53
- .value=${this.value.toString()}
54
- class="slider"
55
- @input=${(event) => {
57
+ ${this.variant === "no-input" ? html`<div
58
+ class="passive-thumb"
59
+ style=${styleMap({ "--ratio": ratio })}
60
+ ></div>` : html`
61
+ <input
62
+ type="range"
63
+ min=${this.min}
64
+ max=${this.max}
65
+ step=${ifDefined(this.step)}
66
+ .value=${this.value.toString()}
67
+ class="slider"
68
+ @input=${(event) => {
56
69
  this.value = Number(event.target.value);
57
- this.dispatchEvent(new CustomEvent("value", { detail: this.value }));
70
+ this.dispatchEvent(
71
+ new CustomEvent("value", { detail: this.value })
72
+ );
58
73
  }}
59
- />
74
+ />
75
+ `}
60
76
  </div>
61
- <obc-icon-button @click=${this.onIncreaseClick} variant="flat">
62
- <slot name="icon-right"></slot>
63
- </obc-icon-button>
77
+ ${this.hasRightIcon ? html`<obc-icon-button @click=${this.onIncreaseClick} variant="flat">
78
+ <slot name="icon-right"></slot>
79
+ </obc-icon-button>` : null}
64
80
  `;
65
81
  }
66
82
  };
@@ -80,10 +96,20 @@ __decorateClass([
80
96
  __decorateClass([
81
97
  property({ type: Number, attribute: "step-click" })
82
98
  ], ObcSlider.prototype, "stepClick", 2);
99
+ __decorateClass([
100
+ property({ type: String })
101
+ ], ObcSlider.prototype, "variant", 2);
102
+ __decorateClass([
103
+ property({ type: Boolean, attribute: "has-left-icon" })
104
+ ], ObcSlider.prototype, "hasLeftIcon", 2);
105
+ __decorateClass([
106
+ property({ type: Boolean, attribute: "has-right-icon" })
107
+ ], ObcSlider.prototype, "hasRightIcon", 2);
83
108
  ObcSlider = __decorateClass([
84
109
  customElement("obc-slider")
85
110
  ], ObcSlider);
86
111
  export {
87
- ObcSlider
112
+ ObcSlider,
113
+ ObcSliderVariant
88
114
  };
89
115
  //# sourceMappingURL=slider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"slider.js","sources":["../../../src/components/slider/slider.ts"],"sourcesContent":["import {LitElement, html, unsafeCSS} from 'lit';\nimport {customElement, property} from 'lit/decorators.js';\nimport {styleMap} from 'lit/directives/style-map.js';\nimport {ifDefined} from 'lit/directives/if-defined.js';\nimport componentStyle from './slider.css?inline';\nimport '../icon-button/icon-button';\n\n/**\n * @element obc-slider\n *\n * @prop {number} value - The value of the slider\n * @prop {number} min - The minimum value of the slider\n * @prop {number} max - The maximum value of the slider\n * @prop {number} step - The step value of the slider\n * @prop {number} stepClick - The step value when clicking the increase or decrease buttons\n * @attr hug-container - If set, the slider will not have any spacing between the slider icons and the container\n *\n * @slot icon-left - Slot for the left icon\n * @slot icon-right - Slot for the right icon\n *\n * @fires value - Fires when the value is changed\n */\n@customElement('obc-slider')\nexport class ObcSlider extends LitElement {\n @property({type: Number}) value = 50;\n @property({type: Number}) min = 0;\n @property({type: Number}) max = 100;\n @property({type: Number}) step: number | undefined;\n @property({type: Number, attribute: 'step-click'}) stepClick = 10;\n\n onInput(value: number) {\n this.value = value;\n this.dispatchEvent(new CustomEvent('value', {detail: this.value}));\n }\n\n onReduceClick() {\n this.onInput(Math.max(this.value - this.stepClick, this.min));\n }\n\n onIncreaseClick() {\n this.onInput(Math.min(this.value + this.stepClick, this.max));\n }\n\n override render() {\n const ratio = (this.value - this.min) / (this.max - this.min);\n return html`\n <obc-icon-button @click=${this.onReduceClick} variant=\"flat\">\n <slot name=\"icon-left\"></slot>\n </obc-icon-button>\n <div class=\"wrapper\">\n <div class=\"track\"></div>\n <div\n class=\"interactive-track\"\n style=${styleMap({'--ratio': ratio})}\n ></div>\n <input\n type=\"range\"\n min=${this.min}\n max=${this.max}\n step=${ifDefined(this.step)}\n .value=${this.value.toString()}\n class=\"slider\"\n @input=${(event: Event) => {\n this.value = Number((event.target as HTMLInputElement).value);\n this.dispatchEvent(new CustomEvent('value', {detail: this.value}));\n }}\n />\n </div>\n <obc-icon-button @click=${this.onIncreaseClick} variant=\"flat\">\n <slot name=\"icon-right\"></slot>\n </obc-icon-button>\n `;\n }\n\n static override styles = unsafeCSS(componentStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-slider': ObcSlider;\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAuBa,IAAA,YAAN,cAAwB,WAAW;AAAA,EAAnC,cAAA;AAAA,UAAA,GAAA,SAAA;AAC6B,SAAA,QAAA;AACF,SAAA,MAAA;AACA,SAAA,MAAA;AAE+B,SAAA,YAAA;AAAA,EAAA;AAAA,EAE/D,QAAQ,OAAe;AACrB,SAAK,QAAQ;AACR,SAAA,cAAc,IAAI,YAAY,SAAS,EAAC,QAAQ,KAAK,MAAM,CAAA,CAAC;AAAA,EACnE;AAAA,EAEA,gBAAgB;AACT,SAAA,QAAQ,KAAK,IAAI,KAAK,QAAQ,KAAK,WAAW,KAAK,GAAG,CAAC;AAAA,EAC9D;AAAA,EAEA,kBAAkB;AACX,SAAA,QAAQ,KAAK,IAAI,KAAK,QAAQ,KAAK,WAAW,KAAK,GAAG,CAAC;AAAA,EAC9D;AAAA,EAES,SAAS;AAChB,UAAM,SAAS,KAAK,QAAQ,KAAK,QAAQ,KAAK,MAAM,KAAK;AAClD,WAAA;AAAA,gCACqB,KAAK,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAOhC,SAAS,EAAC,WAAW,MAAM,CAAA,CAAC;AAAA;AAAA;AAAA;AAAA,gBAI9B,KAAK,GAAG;AAAA,gBACR,KAAK,GAAG;AAAA,iBACP,UAAU,KAAK,IAAI,CAAC;AAAA,mBAClB,KAAK,MAAM,UAAU;AAAA;AAAA,mBAErB,CAAC,UAAiB;AACzB,WAAK,QAAQ,OAAQ,MAAM,OAA4B,KAAK;AACvD,WAAA,cAAc,IAAI,YAAY,SAAS,EAAC,QAAQ,KAAK,MAAM,CAAA,CAAC;AAAA,IAAA,CAClE;AAAA;AAAA;AAAA,gCAGqB,KAAK,eAAe;AAAA;AAAA;AAAA;AAAA,EAIlD;AAGF;AApDa,UAmDK,SAAS,UAAU,cAAc;AAlDvB,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,QAAO;AAAA,GADb,UACe,WAAA,SAAA,CAAA;AACA,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,QAAO;AAAA,GAFb,UAEe,WAAA,OAAA,CAAA;AACA,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,QAAO;AAAA,GAHb,UAGe,WAAA,OAAA,CAAA;AACA,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,QAAO;AAAA,GAJb,UAIe,WAAA,QAAA,CAAA;AACyB,gBAAA;AAAA,EAAlD,SAAS,EAAC,MAAM,QAAQ,WAAW,cAAa;AAAA,GALtC,UAKwC,WAAA,aAAA,CAAA;AALxC,YAAN,gBAAA;AAAA,EADN,cAAc,YAAY;AAAA,GACd,SAAA;"}
1
+ {"version":3,"file":"slider.js","sources":["../../../src/components/slider/slider.ts"],"sourcesContent":["import {LitElement, html, unsafeCSS} from 'lit';\nimport {customElement, property} from 'lit/decorators.js';\nimport {styleMap} from 'lit/directives/style-map.js';\nimport {ifDefined} from 'lit/directives/if-defined.js';\nimport componentStyle from './slider.css?inline';\nimport '../icon-button/icon-button';\nimport {classMap} from 'lit/directives/class-map.js';\n\nexport enum ObcSliderVariant {\n NoValue = 'no-value',\n NoInput = 'no-input',\n}\n\nexport type ObcSliderVariantType = 'no-value' | 'no-input';\n\n/**\n * @element obc-slider\n *\n * @prop {number} value - The value of the slider\n * @prop {number} min - The minimum value of the slider\n * @prop {number} max - The maximum value of the slider\n * @prop {number} step - The step value of the slider\n * @prop {number} stepClick - The step value when clicking the increase or decrease buttons\n * @attr hug-container - If set, the slider will not have any spacing between the slider icons and the container\n *\n * @slot icon-left - Slot for the left icon\n * @slot icon-right - Slot for the right icon\n *\n * @fires value - Fires when the value is changed\n */\n@customElement('obc-slider')\nexport class ObcSlider extends LitElement {\n @property({type: Number}) value = 50;\n @property({type: Number}) min = 0;\n @property({type: Number}) max = 100;\n @property({type: Number}) step: number | undefined;\n @property({type: Number, attribute: 'step-click'}) stepClick = 10;\n @property({type: String}) variant: ObcSliderVariantType = 'no-value';\n @property({type: Boolean, attribute: 'has-left-icon'}) hasLeftIcon = false;\n @property({type: Boolean, attribute: 'has-right-icon'}) hasRightIcon = false;\n\n onInput(value: number) {\n this.value = value;\n this.dispatchEvent(new CustomEvent('value', {detail: this.value}));\n }\n\n onReduceClick() {\n this.onInput(Math.max(this.value - this.stepClick, this.min));\n }\n\n onIncreaseClick() {\n this.onInput(Math.min(this.value + this.stepClick, this.max));\n }\n\n override render() {\n const ratio = (this.value - this.min) / (this.max - this.min);\n return html`\n ${this.hasLeftIcon\n ? html` <obc-icon-button @click=${this.onReduceClick} variant=\"flat\">\n <slot name=\"icon-left\"></slot>\n </obc-icon-button>`\n : null}\n <div class=${classMap({wrapper: true, [this.variant]: true})}>\n <div class=\"track\"></div>\n <div\n class=\"interactive-track\"\n style=${styleMap({'--ratio': ratio})}\n ></div>\n ${this.variant === ObcSliderVariant.NoInput\n ? html`<div\n class=\"passive-thumb\"\n style=${styleMap({'--ratio': ratio})}\n ></div>`\n : html`\n <input\n type=\"range\"\n min=${this.min}\n max=${this.max}\n step=${ifDefined(this.step)}\n .value=${this.value.toString()}\n class=\"slider\"\n @input=${(event: Event) => {\n this.value = Number((event.target as HTMLInputElement).value);\n this.dispatchEvent(\n new CustomEvent('value', {detail: this.value})\n );\n }}\n />\n `}\n </div>\n ${this.hasRightIcon\n ? html`<obc-icon-button @click=${this.onIncreaseClick} variant=\"flat\">\n <slot name=\"icon-right\"></slot>\n </obc-icon-button>`\n : null}\n `;\n }\n\n static override styles = unsafeCSS(componentStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-slider': ObcSlider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per {
2
+ const compentStyle = css`* {
3
+ box-sizing: border-box;
4
+ }
5
+
6
+ .wrapper {
3
7
  height: 48px;
4
8
  width: 100%;
5
9
  display: flex;
@@ -1 +1 @@
1
- {"version":3,"file":"top-bar.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"top-bar.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"top-bar.d.ts","sourceRoot":"","sources":["../../../src/components/top-bar/top-bar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAkB,MAAM,KAAK,CAAC;AAIhD,OAAO,4BAA4B,CAAC;AACpC,OAAO,gBAAgB,CAAC;AACxB,OAAO,oBAAoB,CAAC;AAC5B,OAAO,0BAA0B,CAAC;AAClC,OAAO,0BAA0B,CAAC;AAClC,OAAO,2BAA2B,CAAC;AACnC,OAAO,gCAAgC,CAAC;AACxC,OAAO,mCAAmC,CAAC;AAC3C,OAAO,6BAA6B,CAAC;AACrC,OAAO,0BAA0B,CAAC;AAClC,OAAO,mCAAmC,CAAC;AAC3C,OAAO,EAAC,cAAc,EAAC,MAAM,0BAA0B,CAAC;AAExD;;;;;;;GAOG;AACH,qBACa,SAAU,SAAQ,UAAU;IACb,QAAQ,SAAS;IACjB,QAAQ,SAAU;IAClB,IAAI,SAA8B;IAE5D,mBAAmB,UAAS;IAE5B,sBAAsB,UAAS;IAE/B,mBAAmB,UAAS;IAE5B,uBAAuB,UAAS;IAE0B,cAAc,UAChE;IACkD,cAAc,UAChE;IAER,iBAAiB,UAAS;I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AS;IAE5C,qBAAqB,SAAO;IAE5B,yBAAyB,SAAO;IAEhC,oBAAoB,SAAO;IAE3B,yBAAyB,SAAO;IACL,QAAQ,UAAS;IAE5C,eAAe,EAAE,cAAc,EAAE,CAAM;IAEvC,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,oBAAoB;IAI5B,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,qBAAqB;IAIpB,MAAM;IA+If,OAAgB,MAAM,0BAA2B;CAClD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,aAAa,EAAE,SAAS,CAAC;KAC1B;CACF"}
@@ -179,14 +179,14 @@ let ObcTopBar = class extends LitElement {
179
179
  >
180
180
  <obi-01-apps></obi-01-apps>
181
181
  </obc-icon-button>` : null}
182
- <obc-icon-button
183
- class="left-more-button"
184
- variant="flat"
185
- @click=${this.leftMoreButtonClicked}
186
- ?activated=${this.leftMoreButtonActivated}
187
- >
188
- <obi-01-more-vertical></obi-01-more-vertical>
189
- </obc-icon-button>
182
+ ${!this.inactive ? html`<obc-icon-button
183
+ class="left-more-button"
184
+ variant="flat"
185
+ @click=${this.leftMoreButtonClicked}
186
+ ?activated=${this.leftMoreButtonActivated}
187
+ >
188
+ <obi-01-more-vertical></obi-01-more-vertical>
189
+ </obc-icon-button>` : null}
190
190
  </div>
191
191
  </nav>
192
192
  `;
@@ -1 +1 @@
1
- {"version":3,"file":"top-bar.js","sources":["../../../src/components/top-bar/top-bar.ts"],"sourcesContent":["import {LitElement, html, unsafeCSS} from 'lit';\nimport {customElement, property} from 'lit/decorators.js';\nimport {classMap} from 'lit/directives/class-map.js';\nimport compentStyle from './top-bar.css?inline';\nimport '../icon-button/icon-button';\nimport '../clock/clock';\nimport '../divider/divider';\nimport '../breadcrumb/breadcrumb';\nimport '../../icons/icon-01-menu';\nimport '../../icons/icon-01-close';\nimport '../../icons/icon-02-arrow-back';\nimport '../../icons/icon-02-arrow-forward';\nimport '../../icons/icon-04-dimming';\nimport '../../icons/icon-01-apps';\nimport '../../icons/icon-01-more-vertical';\nimport {BreadcrumbItem} from '../breadcrumb/breadcrumb';\n\n/**\n * Top bar component\n *\n * @fires menu-button-clicked - Menu button clicked\n * @fires dimming-button-clicked - Dimming button clicked\n * @fires apps-button-clicked - Apps button clicked\n * @fires left-more-button-clicked - Left more button clicked\n */\n@customElement('obc-top-bar')\nexport class ObcTopBar extends LitElement {\n @property({type: String}) appTitle = 'App';\n @property({type: String}) pageName = 'Page';\n @property({type: String}) date = '2021-01-01T11:11:11.111Z';\n @property({type: Boolean, attribute: 'menu-button-activated'})\n menuButtonActivated = false;\n @property({type: Boolean, attribute: 'dimming-button-activated'})\n dimmingButtonActivated = false;\n @property({type: Boolean, attribute: 'apps-button-activated'})\n appsButtonActivated = false;\n @property({type: Boolean, attribute: 'left-more-button-activated'})\n leftMoreButtonActivated = false;\n\n @property({type: Boolean, attribute: 'wide-menu-button'}) wideMenuButton =\n false;\n @property({type: Boolean, attribute: 'show-apps-button'}) showAppsButton =\n false;\n @property({type: Boolean, attribute: 'show-dimming-button'})\n showDimmingButton = false;\n @property({type: Boolean, attribute: 'show-clock'}) showClock = false;\n @property({type: Boolean, attribute: 'show-date'}) showDate = false;\n @property({type: Boolean}) inactive = false;\n @property({type: Number, attribute: 'apps-button-breakpoint-px'})\n appButtonBreakpointPx = 500;\n @property({type: Number, attribute: 'dimming-button-breakpoint-px'})\n dimmingButtonBreakpointPx = 500;\n @property({type: Number, attribute: 'app-title-breakpoint-px'})\n appTitleBreakpointPx = 500;\n @property({type: Number, attribute: 'clock-minimize-breakpoint-px'})\n clockMinimizeBreakpointPx = 300;\n @property({type: Boolean}) settings = false;\n @property({type: Array, attribute: 'breadcrumb-items'})\n breadcrumbItems: BreadcrumbItem[] = [];\n\n private menuButtonClicked() {\n this.dispatchEvent(new CustomEvent('menu-button-clicked'));\n }\n\n private dimmingButtonClicked() {\n this.dispatchEvent(new CustomEvent('dimming-button-clicked'));\n }\n\n private appsButtonClicked() {\n this.dispatchEvent(new CustomEvent('apps-button-clicked'));\n }\n\n private leftMoreButtonClicked() {\n this.dispatchEvent(new CustomEvent('left-more-button-clicked'));\n }\n\n override render() {\n const leftGroup = [];\n if (this.settings) {\n leftGroup.push(\n html`<div class=\"menu-button\">\n <obc-icon-button\n variant=\"flat\"\n @click=${() => this.dispatchEvent(new CustomEvent('close'))}\n >\n <obi-01-close></obi-01-close>\n </obc-icon-button>\n </div>`\n );\n leftGroup.push(html`<obc-divider></obc-divider>`);\n leftGroup.push(\n html`<obc-icon-button\n variant=\"flat\"\n corner-left\n @click=${() => this.dispatchEvent(new CustomEvent('back'))}\n >\n <obi-02-arrow-back></obi-02-arrow-back>\n </obc-icon-button>`\n );\n leftGroup.push(\n html`<obc-icon-button\n variant=\"flat\"\n corner-right\n @click=${() => this.dispatchEvent(new CustomEvent('forward'))}\n >\n <obi-02-arrow-forward></obi-02-arrow-forward>\n </obc-icon-button>`\n );\n leftGroup.push(html`<obc-divider></obc-divider>`);\n leftGroup.push(html`<div class=\"title\">${this.appTitle}</div>`);\n leftGroup.push(\n html`<obc-breadcrumb .items=${this.breadcrumbItems}></obc-breadcrumb>`\n );\n } else {\n if (!this.inactive) {\n leftGroup.push(\n html`<div class=\"menu-button ${this.wideMenuButton ? 'wide' : null}\">\n <obc-icon-button\n variant=\"flat\"\n @click=${this.menuButtonClicked}\n ?activated=${this.menuButtonActivated}\n >\n <obi-01-menu></obi-01-menu>\n </obc-icon-button>\n </div>`\n );\n }\n leftGroup.push(html`<div class=\"title\">${this.appTitle}</div>`);\n leftGroup.push(html`<div class=\"page-name\">${this.pageName}</div>`);\n }\n\n const breakpointMoreButton = Math.max(\n this.appButtonBreakpointPx,\n this.dimmingButtonBreakpointPx\n );\n\n return html`\n <style>\n @media (max-width: ${breakpointMoreButton}px) {\n .left-more-button {\n display: revert !important;\n }\n\n .group.left > * {\n margin-right: 4px;\n margin-left: 4px;\n }\n }\n\n @media (max-width: ${this.appButtonBreakpointPx}px) {\n .apps-button {\n display: none;\n }\n }\n\n @media (max-width: ${this.dimmingButtonBreakpointPx}px) {\n .dimming-button {\n display: none;\n }\n }\n\n @media (max-width: ${this.appTitleBreakpointPx}px) {\n .title {\n display: none;\n }\n }\n </style>\n <nav\n class=${classMap({\n wrapper: true,\n inactive: this.inactive,\n settings: this.settings,\n })}\n >\n <div class=\"left group\">${leftGroup}</div>\n <div class=\"right group\">\n ${this.showClock\n ? html`<obc-clock\n date=${this.date}\n blink-only-breakpoint-px=${this.clockMinimizeBreakpointPx}\n ?show-date=${this.showDate}\n ></obc-clock>`\n : null}\n <slot name=\"alerts\"></slot>\n ${this.showDimmingButton && !this.inactive\n ? html`<obc-icon-button\n class=\"dimming-button\"\n variant=\"flat\"\n @click=${this.dimmingButtonClicked}\n ?activated=${this.dimmingButtonActivated}\n >\n <obi-04-dimming></obi-04-dimming>\n </obc-icon-button>`\n : null}\n ${this.showAppsButton && !this.inactive\n ? html`<obc-icon-button\n class=\"apps-button\"\n variant=\"flat\"\n @click=${this.appsButtonClicked}\n ?activated=${this.appsButtonActivated}\n >\n <obi-01-apps></obi-01-apps>\n </obc-icon-button>`\n : null}\n <obc-icon-button\n class=\"left-more-button\"\n variant=\"flat\"\n @click=${this.leftMoreButtonClicked}\n ?activated=${this.leftMoreButtonActivated}\n >\n <obi-01-more-vertical></obi-01-more-vertical>\n </obc-icon-button>\n </div>\n </nav>\n `;\n }\n\n static override styles = unsafeCSS(compentStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-top-bar': ObcTopBar;\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA0Ba,IAAA,YAAN,cAAwB,WAAW;AAAA,EAAnC,cAAA;AAAA,UAAA,GAAA,SAAA;AACgC,SAAA,WAAA;AACA,SAAA,WAAA;AACJ,SAAA,OAAA;AAEX,SAAA,sBAAA;AAEG,SAAA,yBAAA;AAEH,SAAA,sBAAA;AAEI,SAAA,0BAAA;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AM,SAAS,WAAW,aAAY;AAAA,GApBtC,UAoBwC,WAAA,YAAA,CAAA;AACxB,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,SAAQ;AAAA,GArBd,UAqBgB,WAAA,YAAA,CAAA;AAE3B,gBAAA;AAAA,EADC,SAAS,EAAC,MAAM,QAAQ,WAAW,6BAA4B;AAAA,GAtBrD,UAuBX,WAAA,yBAAA,CAAA;AAEA,gBAAA;AAAA,EADC,SAAS,EAAC,MAAM,QAAQ,WAAW,gCAA+B;AAAA,GAxBxD,UAyBX,WAAA,6BAAA,CAAA;AAEA,gBAAA;AAAA,EADC,SAAS,EAAC,MAAM,QAAQ,WAAW,2BAA0B;AAAA,GA1BnD,UA2BX,WAAA,wBAAA,CAAA;AAEA,gBAAA;AAAA,EADC,SAAS,EAAC,MAAM,QAAQ,WAAW,gCAA+B;AAAA,GA5BxD,UA6BX,WAAA,6BAAA,CAAA;AAC2B,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,SAAQ;AAAA,GA9Bd,UA8BgB,WAAA,YAAA,CAAA;AAE3B,gBAAA;AAAA,EADC,SAAS,EAAC,MAAM,OAAO,WAAW,oBAAmB;AAAA,GA/B3C,UAgCX,WAAA,mBAAA,CAAA;AAhCW,YAAN,gBAAA;AAAA,EADN,cAAc,aAAa;AAAA,GACf,SAAA;"}
1
+ {"version":3,"file":"top-bar.js","sources":["../../../src/components/top-bar/top-bar.ts"],"sourcesContent":["import {LitElement, html, unsafeCSS} from 'lit';\nimport {customElement, property} from 'lit/decorators.js';\nimport {classMap} from 'lit/directives/class-map.js';\nimport compentStyle from './top-bar.css?inline';\nimport '../icon-button/icon-button';\nimport '../clock/clock';\nimport '../divider/divider';\nimport '../breadcrumb/breadcrumb';\nimport '../../icons/icon-01-menu';\nimport '../../icons/icon-01-close';\nimport '../../icons/icon-02-arrow-back';\nimport '../../icons/icon-02-arrow-forward';\nimport '../../icons/icon-04-dimming';\nimport '../../icons/icon-01-apps';\nimport '../../icons/icon-01-more-vertical';\nimport {BreadcrumbItem} from '../breadcrumb/breadcrumb';\n\n/**\n * Top bar component\n *\n * @fires menu-button-clicked - Menu button clicked\n * @fires dimming-button-clicked - Dimming button clicked\n * @fires apps-button-clicked - Apps button clicked\n * @fires left-more-button-clicked - Left more button clicked\n */\n@customElement('obc-top-bar')\nexport class ObcTopBar extends LitElement {\n @property({type: String}) appTitle = 'App';\n @property({type: String}) pageName = 'Page';\n @property({type: String}) date = '2021-01-01T11:11:11.111Z';\n @property({type: Boolean, attribute: 'menu-button-activated'})\n menuButtonActivated = false;\n @property({type: Boolean, attribute: 'dimming-button-activated'})\n dimmingButtonActivated = false;\n @property({type: Boolean, attribute: 'apps-button-activated'})\n appsButtonActivated = false;\n @property({type: Boolean, attribute: 'left-more-button-activated'})\n leftMoreButtonActivated = false;\n\n @property({type: Boolean, attribute: 'wide-menu-button'}) wideMenuButton =\n false;\n @property({type: Boolean, attribute: 'show-apps-button'}) showAppsButton =\n false;\n @property({type: Boolean, attribute: 'show-dimming-button'})\n showDimmingButton = false;\n @property({type: Boolean, attribute: 'show-clock'}) showClock = false;\n @property({type: Boolean, attribute: 'show-date'}) showDate = false;\n @property({type: Boolean}) inactive = false;\n @property({type: Number, attribute: 'apps-button-breakpoint-px'})\n appButtonBreakpointPx = 500;\n @property({type: Number, attribute: 'dimming-button-breakpoint-px'})\n dimmingButtonBreakpointPx = 500;\n @property({type: Number, attribute: 'app-title-breakpoint-px'})\n appTitleBreakpointPx = 500;\n @property({type: Number, attribute: 'clock-minimize-breakpoint-px'})\n clockMinimizeBreakpointPx = 300;\n @property({type: Boolean}) settings = false;\n @property({type: Array, attribute: 'breadcrumb-items'})\n breadcrumbItems: BreadcrumbItem[] = [];\n\n private menuButtonClicked() {\n this.dispatchEvent(new CustomEvent('menu-button-clicked'));\n }\n\n private dimmingButtonClicked() {\n this.dispatchEvent(new CustomEvent('dimming-button-clicked'));\n }\n\n private appsButtonClicked() {\n this.dispatchEvent(new CustomEvent('apps-button-clicked'));\n }\n\n private leftMoreButtonClicked() {\n this.dispatchEvent(new CustomEvent('left-more-button-clicked'));\n }\n\n override render() {\n const leftGroup = [];\n if (this.settings) {\n leftGroup.push(\n html`<div class=\"menu-button\">\n <obc-icon-button\n variant=\"flat\"\n @click=${() => this.dispatchEvent(new CustomEvent('close'))}\n >\n <obi-01-close></obi-01-close>\n </obc-icon-button>\n </div>`\n );\n leftGroup.push(html`<obc-divider></obc-divider>`);\n leftGroup.push(\n html`<obc-icon-button\n variant=\"flat\"\n corner-left\n @click=${() => this.dispatchEvent(new CustomEvent('back'))}\n >\n <obi-02-arrow-back></obi-02-arrow-back>\n </obc-icon-button>`\n );\n leftGroup.push(\n html`<obc-icon-button\n variant=\"flat\"\n corner-right\n @click=${() => this.dispatchEvent(new CustomEvent('forward'))}\n >\n <obi-02-arrow-forward></obi-02-arrow-forward>\n </obc-icon-button>`\n );\n leftGroup.push(html`<obc-divider></obc-divider>`);\n leftGroup.push(html`<div class=\"title\">${this.appTitle}</div>`);\n leftGroup.push(\n html`<obc-breadcrumb .items=${this.breadcrumbItems}></obc-breadcrumb>`\n );\n } else {\n if (!this.inactive) {\n leftGroup.push(\n html`<div class=\"menu-button ${this.wideMenuButton ? 'wide' : null}\">\n <obc-icon-button\n variant=\"flat\"\n @click=${this.menuButtonClicked}\n ?activated=${this.menuButtonActivated}\n >\n <obi-01-menu></obi-01-menu>\n </obc-icon-button>\n </div>`\n );\n }\n leftGroup.push(html`<div class=\"title\">${this.appTitle}</div>`);\n leftGroup.push(html`<div class=\"page-name\">${this.pageName}</div>`);\n }\n\n const breakpointMoreButton = Math.max(\n this.appButtonBreakpointPx,\n this.dimmingButtonBreakpointPx\n );\n\n return html`\n <style>\n @media (max-width: ${breakpointMoreButton}px) {\n .left-more-button {\n display: revert !important;\n }\n\n .group.left > * {\n margin-right: 4px;\n margin-left: 4px;\n }\n }\n\n @media (max-width: ${this.appButtonBreakpointPx}px) {\n .apps-button {\n display: none;\n }\n }\n\n @media (max-width: ${this.dimmingButtonBreakpointPx}px) {\n .dimming-button {\n display: none;\n }\n }\n\n @media (max-width: ${this.appTitleBreakpointPx}px) {\n .title {\n display: none;\n }\n }\n </style>\n <nav\n class=${classMap({\n wrapper: true,\n inactive: this.inactive,\n settings: this.settings,\n })}\n >\n <div class=\"left group\">${leftGroup}</div>\n <div class=\"right group\">\n ${this.showClock\n ? html`<obc-clock\n date=${this.date}\n blink-only-breakpoint-px=${this.clockMinimizeBreakpointPx}\n ?show-date=${this.showDate}\n ></obc-clock>`\n : null}\n <slot name=\"alerts\"></slot>\n ${this.showDimmingButton && !this.inactive\n ? html`<obc-icon-button\n class=\"dimming-button\"\n variant=\"flat\"\n @click=${this.dimmingButtonClicked}\n ?activated=${this.dimmingButtonActivated}\n >\n <obi-04-dimming></obi-04-dimming>\n </obc-icon-button>`\n : null}\n ${this.showAppsButton && !this.inactive\n ? html`<obc-icon-button\n class=\"apps-button\"\n variant=\"flat\"\n @click=${this.appsButtonClicked}\n ?activated=${this.appsButtonActivated}\n >\n <obi-01-apps></obi-01-apps>\n </obc-icon-button>`\n : null}\n ${!this.inactive\n ? html`<obc-icon-button\n class=\"left-more-button\"\n variant=\"flat\"\n @click=${this.leftMoreButtonClicked}\n ?activated=${this.leftMoreButtonActivated}\n >\n <obi-01-more-vertical></obi-01-more-vertical>\n </obc-icon-button>`\n : null}\n </div>\n </nav>\n `;\n }\n\n static override styles = unsafeCSS(compentStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-top-bar': ObcTopBar;\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA0Ba,IAAA,YAAN,cAAwB,WAAW;AAAA,EAAnC,cAAA;AAAA,UAAA,GAAA,SAAA;AACgC,SAAA,WAAA;AACA,SAAA,WAAA;AACJ,SAAA,OAAA;AAEX,SAAA,sBAAA;AAEG,SAAA,yBAAA;AAEH,SAAA,sBAAA;AAEI,SAAA,0BAAA;AAGxB,SAAA,i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,EAAlD,SAAS,EAAC,MAAM,SAAS,WAAW,aAAY;AAAA,GApBtC,UAoBwC,WAAA,YAAA,CAAA;AACxB,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,SAAQ;AAAA,GArBd,UAqBgB,WAAA,YAAA,CAAA;AAE3B,gBAAA;AAAA,EADC,SAAS,EAAC,MAAM,QAAQ,WAAW,6BAA4B;AAAA,GAtBrD,UAuBX,WAAA,yBAAA,CAAA;AAEA,gBAAA;AAAA,EADC,SAAS,EAAC,MAAM,QAAQ,WAAW,gCAA+B;AAAA,GAxBxD,UAyBX,WAAA,6BAAA,CAAA;AAEA,gBAAA;AAAA,EADC,SAAS,EAAC,MAAM,QAAQ,WAAW,2BAA0B;AAAA,GA1BnD,UA2BX,WAAA,wBAAA,CAAA;AAEA,gBAAA;AAAA,EADC,SAAS,EAAC,MAAM,QAAQ,WAAW,gCAA+B;AAAA,GA5BxD,UA6BX,WAAA,6BAAA,CAAA;AAC2B,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,SAAQ;AAAA,GA9Bd,UA8BgB,WAAA,YAAA,CAAA;AAE3B,gBAAA;AAAA,EADC,SAAS,EAAC,MAAM,OAAO,WAAW,oBAAmB;AAAA,GA/B3C,UAgCX,WAAA,mBAAA,CAAA;AAhCW,YAAN,gBAAA;AAAA,EADN,cAAc,aAAa;AAAA,GACf,SAAA;"}
package/fix-generated.cjs CHANGED
@@ -20,6 +20,7 @@ function addRepositoryToPackageJsonVue() {
20
20
  url: 'git+https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents.git',
21
21
  directory: 'packages/openbridge-webcomponents-vue',
22
22
  };
23
+
23
24
  // add license
24
25
  packageJson.license = 'Apache-2.0';
25
26
  fs.writeFileSync(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oicl/openbridge-webcomponents",
3
- "version": "0.0.8",
3
+ "version": "0.0.10",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -18,7 +18,6 @@
18
18
  "storybook": "storybook dev -p 6006",
19
19
  "build-storybook": "storybook build",
20
20
  "download:icons": "tsx ./script/download-icons.ts",
21
- "download:instruments": "tsx ./script/svg-instruments/main.ts",
22
21
  "new:component": "tsx ./new-component.ts",
23
22
  "test-storybook": "test-storybook",
24
23
  "prepack": "yarn build",
@@ -39,44 +38,39 @@
39
38
  "@lit-labs/cli": "^0.6.2",
40
39
  "@lit-labs/gen-wrapper-react": "^0.3.1",
41
40
  "@lit-labs/gen-wrapper-vue": "^0.3.2",
42
- "@open-wc/lit-helpers": "^0.6.0",
43
- "@storybook/addon-essentials": "^7.6.7",
44
- "@storybook/addon-interactions": "^7.6.17",
45
- "@storybook/addon-links": "^7.6.7",
46
- "@storybook/addon-storysource": "^7.6.17",
47
- "@storybook/addon-themes": "^7.6.7",
48
- "@storybook/blocks": "^7.6.7",
49
- "@storybook/test-runner": "^0.16.0",
50
- "@storybook/testing-library": "^0.2.2",
51
- "@storybook/web-components": "^7.6.7",
52
- "@storybook/web-components-vite": "^7.6.7",
41
+ "@open-wc/lit-helpers": "^0.7.0",
42
+ "@storybook/addon-essentials": "^8.0.5",
43
+ "@storybook/addon-interactions": "^8.0.5",
44
+ "@storybook/addon-links": "^8.0.5",
45
+ "@storybook/addon-storysource": "^8.0.5",
46
+ "@storybook/addon-themes": "^8.0.5",
47
+ "@storybook/blocks": "^8.0.5",
48
+ "@storybook/test": "^8.0.5",
49
+ "@storybook/test-runner": "^0.17.0",
50
+ "@storybook/web-components": "^8.0.5",
51
+ "@storybook/web-components-vite": "^8.0.5",
53
52
  "@topcli/prompts": "^1.8.0",
54
53
  "@types/jest-image-snapshot": "^6",
55
- "@types/xmldom": "^0.1.34",
56
- "chromatic": "^7.6.0",
57
54
  "concurrently": "^8.2.2",
58
55
  "dotenv": "^16.3.1",
59
56
  "eslint": "^8.56.0",
60
- "eslint-plugin-storybook": "^0.6.15",
57
+ "eslint-plugin-storybook": "^0.8.0",
61
58
  "figma-api": "^1.11.0",
62
59
  "jest-image-snapshot": "^6.2.0",
63
60
  "lit-analyzer": "^2.0.2",
64
61
  "nodemon": "^3.0.2",
65
62
  "playwright": "^1.40.0",
66
- "postcss": "^8.4.32",
67
- "postcss-mixins": "^9.0.4",
63
+ "postcss": "^8.4.36",
64
+ "postcss-mixins": "^10.0.0",
68
65
  "postcss-nesting": "^12.0.1",
69
- "postcss-plugin": "^1.0.0",
70
66
  "prettier": "^3.1.1",
71
- "react": "^18.2.0",
72
- "react-dom": "^18.2.0",
67
+ "release-it": "^17.1.1",
73
68
  "rollup-plugin-postcss-lit": "^2.1.0",
74
- "storybook": "^7.6.7",
75
- "tsx": "^3.14.0",
69
+ "storybook": "^8.0.5",
70
+ "tsx": "^4.7.1",
76
71
  "typescript": "^5.3.3",
77
- "vite": "^4.4.5",
78
- "vite-plugin-dts": "^3.6.3",
79
- "xmldom": "^0.6.0"
72
+ "vite": "^5.2.7",
73
+ "vite-plugin-dts": "^3.6.3"
80
74
  },
81
75
  "types": "./dist/index.d.ts",
82
76
  "customElements": "custom-elements.json"