@operato/font 2.0.0-alpha.0 → 2.0.0-alpha.100

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,3 +1,6 @@
1
+ import '@material/web/icon/icon.js'
2
+ import '@operato/input/ox-select.js'
3
+ import '@operato/popup/ox-popup-list.js'
1
4
  import './font-creation-card'
2
5
 
3
6
  import { css, html, LitElement, PropertyValues } from 'lit'
@@ -30,12 +33,12 @@ export class FontSelector extends localize(i18next)(connect(store)(LitElement))
30
33
 
31
34
  #main {
32
35
  overflow: auto;
33
- padding: var(--popup-content-padding);
34
36
  display: grid;
35
37
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
36
38
  grid-auto-rows: var(--card-list-rows-height);
37
39
  grid-gap: 20px;
38
40
  box-sizing: border-box;
41
+ padding: var(--popup-content-padding);
39
42
  }
40
43
 
41
44
  #main .card {
@@ -60,7 +63,7 @@ export class FontSelector extends localize(i18next)(connect(store)(LitElement))
60
63
  flex-wrap: wrap;
61
64
  }
62
65
 
63
- .card .button-container > mwc-icon {
66
+ .card .button-container > md-icon {
64
67
  background-color: var(--font-selector-icon-background-color);
65
68
  text-align: center;
66
69
  width: var(--font-selector-icon-size);
@@ -69,12 +72,12 @@ export class FontSelector extends localize(i18next)(connect(store)(LitElement))
69
72
  color: var(--font-selector-icon-color);
70
73
  }
71
74
 
72
- .card .button-container > mwc-icon:last-child {
75
+ .card .button-container > md-icon:last-child {
73
76
  border-bottom-left-radius: 12px;
74
77
  }
75
78
 
76
- .card .button-container > mwc-icon:hover,
77
- .card .button-container > mwc-icon:active {
79
+ .card .button-container > md-icon:hover,
80
+ .card .button-container > md-icon:active {
78
81
  background-color: var(--primary-color);
79
82
  color: #fff;
80
83
  }
@@ -113,7 +116,6 @@ export class FontSelector extends localize(i18next)(connect(store)(LitElement))
113
116
  }
114
117
 
115
118
  #filter {
116
- padding: var(--popup-content-padding);
117
119
  background-color: var(--font-tools-background-color);
118
120
  box-shadow: var(--box-shadow);
119
121
 
@@ -127,7 +129,7 @@ export class FontSelector extends localize(i18next)(connect(store)(LitElement))
127
129
  font-size: 15px;
128
130
  }
129
131
 
130
- select {
132
+ ox-select {
131
133
  text-transform: capitalize;
132
134
  float: right;
133
135
  }
@@ -149,14 +151,17 @@ export class FontSelector extends localize(i18next)(connect(store)(LitElement))
149
151
 
150
152
  return html`
151
153
  <div id="filter">
152
- <select
154
+ <ox-select
155
+ .placeholder=${i18next.t('text.please choose a provider')}
156
+ .value=${this.provider}
153
157
  @change=${(e: Event) => {
154
158
  this.provider = (e.currentTarget as HTMLInputElement).value
155
159
  }}
156
160
  >
157
- <option value="">--${i18next.t('text.please choose a provider')}--</option>
158
- ${['google', 'custom'].map(provider => html` <option value=${provider}>${provider}</option> `)}
159
- </select>
161
+ <ox-popup-list>
162
+ ${['', 'google', 'custom'].map(provider => html` <div option value=${provider}>${provider}&nbsp;</div> `)}
163
+ </ox-popup-list>
164
+ </ox-select>
160
165
  </div>
161
166
 
162
167
  <div id="main">
@@ -180,19 +185,19 @@ export class FontSelector extends localize(i18next)(connect(store)(LitElement))
180
185
  <div name>${font.name}</div>
181
186
  <div provider>${font.provider}</div>
182
187
  <div class="button-container">
183
- <mwc-icon
188
+ <md-icon
184
189
  @click=${(e: Event) => {
185
190
  e.stopPropagation()
186
191
  this.toggleActive(font)
187
192
  }}
188
- >${font.active ? 'check_box' : 'check_box_outline_blank'}</mwc-icon
193
+ >${font.active ? 'check_box' : 'check_box_outline_blank'}</md-icon
189
194
  >
190
- <mwc-icon
195
+ <md-icon
191
196
  @click=${(e: Event) => {
192
197
  e.stopPropagation()
193
198
  this.deleteFont(font)
194
199
  }}
195
- >delete</mwc-icon
200
+ >delete</md-icon
196
201
  >
197
202
  </div>
198
203
  </div>
@@ -1,5 +1,4 @@
1
- import '@material/mwc-icon'
2
- import '@material/mwc-icon-button'
1
+ import '@material/web/icon/icon.js'
3
2
 
4
3
  import { LitElement, css, html } from 'lit'
5
4
  import { customElement, property } from 'lit/decorators.js'
@@ -2,7 +2,7 @@
2
2
  * @license Copyright © HatioLab Inc. All rights reserved.
3
3
  */
4
4
 
5
- import '@material/mwc-icon'
5
+ import '@material/web/icon/icon.js'
6
6
  import './font-selector'
7
7
 
8
8
  import { css, html, LitElement } from 'lit'
@@ -27,7 +27,7 @@ export default class OxFontSelector extends LitElement {
27
27
  border: 1px solid rgba(0, 0, 0, 0.2);
28
28
  }
29
29
 
30
- mwc-icon {
30
+ md-icon {
31
31
  position: absolute;
32
32
  top: 0;
33
33
  right: 0;
@@ -50,7 +50,7 @@ export default class OxFontSelector extends LitElement {
50
50
  .placeholder=${this.getAttribute('placeholder') || ''}
51
51
  />
52
52
 
53
- <mwc-icon @click=${() => this.openSelector()}>font_download</mwc-icon>
53
+ <md-icon @click=${() => this.openSelector()}>font_download</md-icon>
54
54
  `
55
55
  }
56
56