@operato/font 2.0.0-alpha.8 → 2.0.0-alpha.81

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.
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@operato/font",
3
3
  "description": "User interface to select font and create font.",
4
4
  "author": "heartyoh",
5
- "version": "2.0.0-alpha.8",
5
+ "version": "2.0.0-alpha.81",
6
6
  "main": "dist/src/index.js",
7
7
  "module": "dist/src/index.js",
8
8
  "exports": {
@@ -47,35 +47,36 @@
47
47
  "storybook:build": "tsc && npm run analyze -- --exclude dist && build-storybook"
48
48
  },
49
49
  "dependencies": {
50
- "@material/mwc-icon": "^0.27.0",
51
- "@operato/attachment": "^2.0.0-alpha.8",
52
- "@operato/headroom": "^2.0.0-alpha.0",
53
- "@operato/i18n": "^2.0.0-alpha.0",
54
- "@operato/layout": "^2.0.0-alpha.8",
55
- "@operato/property-editor": "^2.0.0-alpha.8",
56
- "@operato/pull-to-refresh": "^2.0.0-alpha.0",
57
- "@operato/shell": "^2.0.0-alpha.8",
58
- "@operato/utils": "^2.0.0-alpha.8",
50
+ "@material/web": "^1.4.0",
51
+ "@operato/attachment": "^2.0.0-alpha.81",
52
+ "@operato/headroom": "^2.0.0-alpha.57",
53
+ "@operato/i18n": "^2.0.0-alpha.59",
54
+ "@operato/input": "^2.0.0-alpha.81",
55
+ "@operato/layout": "^2.0.0-alpha.81",
56
+ "@operato/property-editor": "^2.0.0-alpha.81",
57
+ "@operato/pull-to-refresh": "^2.0.0-alpha.57",
58
+ "@operato/shell": "^2.0.0-alpha.81",
59
+ "@operato/utils": "^2.0.0-alpha.68",
59
60
  "webfontloader": "^1.6.28"
60
61
  },
61
62
  "devDependencies": {
62
- "@custom-elements-manifest/analyzer": "^0.8.1",
63
+ "@custom-elements-manifest/analyzer": "^0.9.2",
63
64
  "@hatiolab/prettier-config": "^1.0.0",
64
- "@open-wc/eslint-config": "^10.0.0",
65
+ "@open-wc/eslint-config": "^12.0.3",
65
66
  "@open-wc/testing": "^3.1.6",
66
67
  "@types/webfontloader": "^1.6.34",
67
- "@typescript-eslint/eslint-plugin": "^5.59.1",
68
- "@typescript-eslint/parser": "^5.59.1",
68
+ "@typescript-eslint/eslint-plugin": "^7.0.1",
69
+ "@typescript-eslint/parser": "^7.0.1",
69
70
  "@web/dev-server": "^0.3.0",
70
- "@web/dev-server-storybook": "^0.7.4",
71
- "@web/test-runner": "^0.17.0",
71
+ "@web/dev-server-storybook": "^2.0.1",
72
+ "@web/test-runner": "^0.18.0",
72
73
  "concurrently": "^8.0.1",
73
74
  "eslint": "^8.39.0",
74
- "eslint-config-prettier": "^8.3.0",
75
- "husky": "^8.0.1",
75
+ "eslint-config-prettier": "^9.1.0",
76
+ "husky": "^9.0.11",
76
77
  "json5": "^2.2.0",
77
- "lint-staged": "^13.2.2",
78
- "prettier": "^2.4.1",
78
+ "lint-staged": "^15.2.2",
79
+ "prettier": "^3.2.5",
79
80
  "tslib": "^2.3.1",
80
81
  "typescript": "^5.0.4"
81
82
  },
@@ -92,5 +93,5 @@
92
93
  "prettier --write"
93
94
  ]
94
95
  },
95
- "gitHead": "9b76564615d73b9da50d13d30d43cdaa0d4a6fa6"
96
+ "gitHead": "df2dbdf533ea883e0c4d924a66ef9c0fcab833c3"
96
97
  }
@@ -56,7 +56,8 @@ export class FontCreationCard extends localize(i18next)(LitElement) {
56
56
  text-transform: capitalize;
57
57
  }
58
58
 
59
- [front] mwc-icon {
59
+ [front] md-icon {
60
+ --md-icon-size: 42px;
60
61
  font-size: 3.5em;
61
62
  color: var(--card-list-create-icon-color);
62
63
  }
@@ -148,7 +149,7 @@ export class FontCreationCard extends localize(i18next)(LitElement) {
148
149
  let isFileAttached = this.files && this.files.length > 0 ? true : false
149
150
 
150
151
  return html`
151
- <div @click=${(e: Event) => this.onClickFlip(e)} front><mwc-icon>add_circle_outline</mwc-icon>create font</div>
152
+ <div @click=${(e: Event) => this.onClickFlip(e)} front><md-icon>add_circle_outline</md-icon>create font</div>
152
153
 
153
154
  <div @click=${(e: Event) => this.onClickFlip(e)} back>
154
155
  <form @submit=${(e: Event) => this.onClickSubmit(e)}>
@@ -1,3 +1,5 @@
1
+ import '@operato/input/ox-select.js'
2
+ import '@operato/popup/ox-popup-list.js'
1
3
  import './font-creation-card'
2
4
 
3
5
  import { css, html, LitElement, PropertyValues } from 'lit'
@@ -30,12 +32,12 @@ export class FontSelector extends localize(i18next)(connect(store)(LitElement))
30
32
 
31
33
  #main {
32
34
  overflow: auto;
33
- padding: var(--popup-content-padding);
34
35
  display: grid;
35
36
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
36
37
  grid-auto-rows: var(--card-list-rows-height);
37
38
  grid-gap: 20px;
38
39
  box-sizing: border-box;
40
+ padding: var(--popup-content-padding);
39
41
  }
40
42
 
41
43
  #main .card {
@@ -60,7 +62,7 @@ export class FontSelector extends localize(i18next)(connect(store)(LitElement))
60
62
  flex-wrap: wrap;
61
63
  }
62
64
 
63
- .card .button-container > mwc-icon {
65
+ .card .button-container > md-icon {
64
66
  background-color: var(--font-selector-icon-background-color);
65
67
  text-align: center;
66
68
  width: var(--font-selector-icon-size);
@@ -69,12 +71,12 @@ export class FontSelector extends localize(i18next)(connect(store)(LitElement))
69
71
  color: var(--font-selector-icon-color);
70
72
  }
71
73
 
72
- .card .button-container > mwc-icon:last-child {
74
+ .card .button-container > md-icon:last-child {
73
75
  border-bottom-left-radius: 12px;
74
76
  }
75
77
 
76
- .card .button-container > mwc-icon:hover,
77
- .card .button-container > mwc-icon:active {
78
+ .card .button-container > md-icon:hover,
79
+ .card .button-container > md-icon:active {
78
80
  background-color: var(--primary-color);
79
81
  color: #fff;
80
82
  }
@@ -113,7 +115,6 @@ export class FontSelector extends localize(i18next)(connect(store)(LitElement))
113
115
  }
114
116
 
115
117
  #filter {
116
- padding: var(--popup-content-padding);
117
118
  background-color: var(--font-tools-background-color);
118
119
  box-shadow: var(--box-shadow);
119
120
 
@@ -127,7 +128,7 @@ export class FontSelector extends localize(i18next)(connect(store)(LitElement))
127
128
  font-size: 15px;
128
129
  }
129
130
 
130
- select {
131
+ ox-select {
131
132
  text-transform: capitalize;
132
133
  float: right;
133
134
  }
@@ -149,14 +150,17 @@ export class FontSelector extends localize(i18next)(connect(store)(LitElement))
149
150
 
150
151
  return html`
151
152
  <div id="filter">
152
- <select
153
+ <ox-select
154
+ .placeholder=${i18next.t('text.please choose a provider')}
155
+ .value=${this.provider}
153
156
  @change=${(e: Event) => {
154
157
  this.provider = (e.currentTarget as HTMLInputElement).value
155
158
  }}
156
159
  >
157
- <option value="">--${i18next.t('text.please choose a provider')}--</option>
158
- ${['google', 'custom'].map(provider => html` <option value=${provider}>${provider}</option> `)}
159
- </select>
160
+ <ox-popup-list>
161
+ ${['', 'google', 'custom'].map(provider => html` <div option value=${provider}>${provider}&nbsp;</div> `)}
162
+ </ox-popup-list>
163
+ </ox-select>
160
164
  </div>
161
165
 
162
166
  <div id="main">
@@ -180,19 +184,19 @@ export class FontSelector extends localize(i18next)(connect(store)(LitElement))
180
184
  <div name>${font.name}</div>
181
185
  <div provider>${font.provider}</div>
182
186
  <div class="button-container">
183
- <mwc-icon
187
+ <md-icon
184
188
  @click=${(e: Event) => {
185
189
  e.stopPropagation()
186
190
  this.toggleActive(font)
187
191
  }}
188
- >${font.active ? 'check_box' : 'check_box_outline_blank'}</mwc-icon
192
+ >${font.active ? 'check_box' : 'check_box_outline_blank'}</md-icon
189
193
  >
190
- <mwc-icon
194
+ <md-icon
191
195
  @click=${(e: Event) => {
192
196
  e.stopPropagation()
193
197
  this.deleteFont(font)
194
198
  }}
195
- >delete</mwc-icon
199
+ >delete</md-icon
196
200
  >
197
201
  </div>
198
202
  </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