@operato/help 2.0.0-alpha.9 → 2.0.0-alpha.92

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.
@@ -1,4 +1,4 @@
1
- import '@material/mwc-icon'
1
+ import '@material/web/icon/icon.js'
2
2
 
3
3
  import { css, html, LitElement } from 'lit'
4
4
  import { customElement, property } from 'lit/decorators.js'
@@ -10,18 +10,20 @@ import { openHelp } from '../controller/help.js'
10
10
  @customElement('ox-title-with-help')
11
11
  export class TitleWithHelp extends localize(i18next)(LitElement) {
12
12
  static styles = css`
13
- mwc-icon {
13
+ md-icon {
14
14
  position: relative;
15
15
  top: 4px;
16
16
  cursor: help;
17
17
  opacity: var(--help-icon-opacity);
18
18
  color: var(--help-icon-color);
19
- font-size: var(--help-icon-size);
20
19
  line-height: 0;
21
- }
22
- mwc-icon:hover {
23
- opacity: var(--help-icon-hover-opacity);
24
- color: var(--help-icon-hover-color);
20
+
21
+ --md-icon-size: var(--help-icon-size);
22
+
23
+ &:hover {
24
+ opacity: var(--help-icon-hover-opacity);
25
+ color: var(--help-icon-hover-color);
26
+ }
25
27
  }
26
28
  `
27
29
 
@@ -32,6 +34,6 @@ export class TitleWithHelp extends localize(i18next)(LitElement) {
32
34
  const title = i18next.t(this.msgid)
33
35
  const topic = this.topic
34
36
 
35
- return html` ${title} ${topic ? html`<mwc-icon @click=${() => openHelp(topic)}>help</mwc-icon>` : html``} `
37
+ return html` ${title} ${topic ? html`<md-icon @click=${() => openHelp(topic)}>help</md-icon>` : html``} `
36
38
  }
37
39
  }
package/src/help-style.ts CHANGED
@@ -22,7 +22,7 @@ export const HelpStyle = css`
22
22
  font-size: var(--help-panel-h3-title-font-size);
23
23
  color: var(--help-panel-h3-title-color);
24
24
  }
25
- mwc-icon {
25
+ md-icon {
26
26
  vertical-align: middle;
27
27
  }
28
28
 
@@ -92,9 +92,10 @@ export const HelpStyle = css`
92
92
  font-size: var(--fontsize-default);
93
93
  text-decoration: underline;
94
94
  }
95
- a mwc-icon {
96
- font-size: var(--help-panel-a-icon-size);
95
+ a md-icon {
97
96
  margin: 0;
97
+
98
+ --md-icon-size: var(--help-panel-a-icon-size);
98
99
  }
99
100
  a:hover {
100
101
  background-color: var(--opacity-light-dark-color);
@@ -1,4 +1,4 @@
1
- import '@material/mwc-icon-button'
1
+ import '@material/web/icon/icon.js'
2
2
 
3
3
  import { css, html } from 'lit'
4
4
  import { customElement, property, query } from 'lit/decorators.js'
@@ -20,6 +20,8 @@ class HelpHome extends connect(store)(localize(i18next)(PageView)) {
20
20
  flex-direction: column;
21
21
  overflow: hidden;
22
22
  position: relative;
23
+
24
+ --md-icon-size: 24px;
23
25
  }
24
26
 
25
27
  #navigation {
@@ -31,8 +33,8 @@ class HelpHome extends connect(store)(localize(i18next)(PageView)) {
31
33
  background-color: white;
32
34
  }
33
35
 
34
- #navigation mwc-icon-button {
35
- padding: var(--help-navigation-icon-padding);
36
+ #navigation md-icon {
37
+ padding: var(--help-navigation-icon-padding, var(--padding-default));
36
38
  border-right: var(--help-navigation-icon-border);
37
39
  cursor: pointer;
38
40
  color: var(--help-icon-color);
@@ -47,7 +49,7 @@ class HelpHome extends connect(store)(localize(i18next)(PageView)) {
47
49
  }
48
50
 
49
51
  #upward {
50
- --mdc-icon-size: 26px;
52
+ --md-icon-size: 26px;
51
53
  position: absolute;
52
54
  bottom: var(--data-list-fab-position-vertical);
53
55
  right: var(--data-list-fab-position-horizontal);
@@ -81,19 +83,14 @@ class HelpHome extends connect(store)(localize(i18next)(PageView)) {
81
83
  <ox-markdown id="content" .src=${src} toc></ox-markdown>
82
84
 
83
85
  <div id="navigation">
84
- <mwc-icon-button icon="home" @click=${() => navigate('help')} ?disabled=${
85
- this.topic == 'index'
86
- }></mwc-icon-button>
87
- <mwc-icon-button icon="keyboard_arrow_left" @click=${() => window.history.back()}></mwc-icon-button icon="">
88
- <mwc-icon-button icon="keyboard_arrow_right" @click=${() =>
89
- window.history.forward()}></mwc-icon-button icon="">
90
- </div>
91
-
92
- ${
93
- this.showGotoTop
94
- ? html` <mwc-icon id="upward" @click=${(e: Event) => this.gotoTop(e)}>arrow_upward</mwc-icon> `
95
- : html``
96
- }
86
+ <md-icon @click=${() => navigate('help')} ?disabled=${this.topic == 'index'}>home</md-icon>
87
+ <md-icon @click=${() => window.history.back()}>keyboard_arrow_left</md-icon>
88
+ <md-icon @click=${() => window.history.forward()}>keyboard_arrow_right</md-icon>
89
+ </div>
90
+
91
+ ${this.showGotoTop
92
+ ? html` <md-icon id="upward" @click=${(e: Event) => this.gotoTop(e)}>arrow_upward</md-icon> `
93
+ : html``}
97
94
  `
98
95
  }
99
96
 
@@ -1,4 +1,4 @@
1
- import '@material/mwc-icon-button'
1
+ import '@material/web/icon/icon.js'
2
2
  import '@operato/markdown/ox-markdown.js'
3
3
 
4
4
  import { css, html, LitElement, PropertyValues } from 'lit'
@@ -31,6 +31,9 @@ class HelpPanel extends connect(store)(LitElement) {
31
31
  margin: 4px;
32
32
 
33
33
  overflow: hidden;
34
+
35
+ --md-icon-size: 24px;
36
+ font-variation-settings: 'FILL' 1;
34
37
  }
35
38
 
36
39
  :host(:focus) {
@@ -45,7 +48,9 @@ class HelpPanel extends connect(store)(LitElement) {
45
48
  border-bottom: var(--help-navigation-bottom);
46
49
  background-color: white;
47
50
  }
48
- #navigation mwc-icon-button {
51
+
52
+ #navigation md-icon {
53
+ padding: var(--help-navigation-icon-padding, var(--padding-default));
49
54
  border-right: var(--help-navigation-icon-border);
50
55
  cursor: pointer;
51
56
  color: var(--help-icon-color);
@@ -64,7 +69,7 @@ class HelpPanel extends connect(store)(LitElement) {
64
69
  }
65
70
 
66
71
  #upward {
67
- --mdc-icon-size: 26px;
72
+ --md-icon-size: 26px;
68
73
  position: absolute;
69
74
  bottom: var(--data-list-fab-position-vertical);
70
75
  right: var(--data-list-fab-position-horizontal);
@@ -99,28 +104,20 @@ class HelpPanel extends connect(store)(LitElement) {
99
104
 
100
105
  return html`
101
106
  <div id="navigation">
102
- <mwc-icon-button
103
- icon="home"
104
- @click=${() => this.goHome()}
105
- ?disabled=${this.history[0] === this.history[this.historyIndex]}
106
- ></mwc-icon-button>
107
- <mwc-icon-button
108
- icon="keyboard_arrow_left"
109
- @click=${() => this.historyBack()}
110
- ?disabled=${this.historyIndex < 1}
111
- ></mwc-icon-button>
112
- <mwc-icon-button
113
- icon="keyboard_arrow_right"
114
- @click=${() => this.historyForward()}
115
- ?disabled=${this.historyIndex >= this.history.length - 1}
116
- ></mwc-icon-button>
117
- <mwc-icon-button icon="open_in_new" @click=${() => navigate(`help?topic=${this.topic}`)}></mwc-icon-button>
118
- <mwc-icon-button icon="close" id="close" @click=${() => closeOverlay('help')}></mwc-icon-button>
107
+ <md-icon @click=${() => this.goHome()} ?disabled=${this.history[0] === this.history[this.historyIndex]}>
108
+ home
109
+ </md-icon>
110
+ <md-icon @click=${() => this.historyBack()} ?disabled=${this.historyIndex < 1}> keyboard_arrow_left </md-icon>
111
+ <md-icon @click=${() => this.historyForward()} ?disabled=${this.historyIndex >= this.history.length - 1}>
112
+ keyboard_arrow_right
113
+ </md-icon>
114
+ <md-icon @click=${() => navigate(`help?topic=${this.topic}`)}> open_in_new </md-icon>
115
+ <md-icon id="close" @click=${() => closeOverlay('help')}> close </md-icon>
119
116
  </div>
120
117
 
121
118
  ${!this.showGotoTop
122
119
  ? html``
123
- : html` <mwc-icon id="upward" @click=${(e: Event) => this.gotoTop(e)}>arrow_upward</mwc-icon> `}
120
+ : html` <md-icon id="upward" @click=${(e: Event) => this.gotoTop(e)}>arrow_upward</md-icon> `}
124
121
  <ox-markdown id="content" .src=${src}></ox-markdown>
125
122
  `
126
123
  }