@operato/input 1.1.84 → 1.2.3

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/src/locales/ko.ts CHANGED
@@ -1,25 +1,30 @@
1
- // Do not modify this file by hand!
2
- // Re-generate this file by running lit-localize
3
1
 
4
- /* eslint-disable no-irregular-whitespace */
5
- /* eslint-disable @typescript-eslint/no-explicit-any */
2
+ // Do not modify this file by hand!
3
+ // Re-generate this file by running lit-localize
6
4
 
7
- export const templates = {
8
- s075cb2f53173bd8a: `회전`,
9
- s29ec9210c8a8222e: `당일`,
10
- s31be7a0b4a5853dd: `z 축`,
11
- s42670fc325584e15: `전날`,
12
- s63c6e58ec805a9eb: `시작일`,
13
- s685db98545dc9448: `완료일`,
14
- s6aacb9fbb71a1d91: `스케일`,
15
- s77c8560cf63a372d: `완료시간`,
16
- s9f41d726ecec72c2: `y 축`,
17
- sc4bcadba8e631b86: `이름`,
18
- scff69aa7239287b0: `다음날`,
19
- sd793f87f18747a63: `체적`,
20
- sf95fdd7da4fc2295: `변환`,
21
- sf9b52aece5aed0f7: `x 축`,
22
- sfcc01216c601ec9e: `시작시간`,
23
- sb9874d345b5e590a: `태그가 중복되었습니다.`,
24
- s5191b91c637d7da1: `특수문자는 사용할 수 없습니다.`
25
- }
5
+
6
+
7
+
8
+ /* eslint-disable no-irregular-whitespace */
9
+ /* eslint-disable @typescript-eslint/no-explicit-any */
10
+
11
+ export const templates = {
12
+ 's075cb2f53173bd8a': `회전`,
13
+ 's29ec9210c8a8222e': `당일`,
14
+ 's31be7a0b4a5853dd': `z 축`,
15
+ 's42670fc325584e15': `전날`,
16
+ 's4cbf3a26fca1d74a': `위치`,
17
+ 's5191b91c637d7da1': `특수문자는 허용되지 않습니다`,
18
+ 's63c6e58ec805a9eb': `시작일`,
19
+ 's685db98545dc9448': `완료일`,
20
+ 's6aacb9fbb71a1d91': `스케일`,
21
+ 's77c8560cf63a372d': `완료시간`,
22
+ 's9f41d726ecec72c2': `y 축`,
23
+ 'sb9874d345b5e590a': `태그가 중복되었습니다`,
24
+ 'sc4bcadba8e631b86': `이름`,
25
+ 'scff69aa7239287b0': `다음날`,
26
+ 'sd793f87f18747a63': `체적`,
27
+ 'sf9b52aece5aed0f7': `x 축`,
28
+ 'sfcc01216c601ec9e': `시작시간`,
29
+ };
30
+
package/src/locales/ms.ts CHANGED
@@ -13,7 +13,7 @@
13
13
  's9f41d726ecec72c2': `y-axes`,
14
14
  's31be7a0b4a5853dd': `z-axes`,
15
15
  'sd793f87f18747a63': `dimension`,
16
- 'sf95fdd7da4fc2295': `translate`,
16
+ 's4cbf3a26fca1d74a': `position`,
17
17
  's6aacb9fbb71a1d91': `scale`,
18
18
  's075cb2f53173bd8a': `rotate`,
19
19
  'sb9874d345b5e590a': `tag duplicated`,
package/src/locales/zh.ts CHANGED
@@ -13,7 +13,7 @@
13
13
  's9f41d726ecec72c2': `y-axes`,
14
14
  's31be7a0b4a5853dd': `z-axes`,
15
15
  'sd793f87f18747a63': `dimension`,
16
- 'sf95fdd7da4fc2295': `translate`,
16
+ 's4cbf3a26fca1d74a': `position`,
17
17
  's6aacb9fbb71a1d91': `scale`,
18
18
  's075cb2f53173bd8a': `rotate`,
19
19
  'sb9874d345b5e590a': `tag duplicated`,
@@ -2,6 +2,8 @@
2
2
  * @license Copyright © HatioLab Inc. All rights reserved.
3
3
  */
4
4
 
5
+ import './ox-input-angle'
6
+
5
7
  import { css, html } from 'lit'
6
8
  import { customElement, property } from 'lit/decorators.js'
7
9
 
@@ -37,7 +39,8 @@ export class OxInput3Dish extends OxFormField {
37
39
  color: var(--legend-color);
38
40
  }
39
41
 
40
- input {
42
+ input,
43
+ ox-input-angle {
41
44
  grid-column: span 2;
42
45
  border: 0;
43
46
  border-bottom: var(--border-dark-color);
@@ -45,6 +48,11 @@ export class OxInput3Dish extends OxFormField {
45
48
  font: var(--input-font);
46
49
  color: var(--primary-text-color);
47
50
  }
51
+
52
+ ox-input-angle {
53
+ --input-border: 0;
54
+ }
55
+
48
56
  input:focus {
49
57
  outline: none;
50
58
  border-bottom: 1px solid var(--primary-color);
@@ -53,8 +61,7 @@ export class OxInput3Dish extends OxFormField {
53
61
  ]
54
62
 
55
63
  @property({ type: Object }) dimension?: { width?: number; height?: number; depth?: number }
56
- // translate는 고유한 html element의 attribute이므로, property는 translatex로 한다.
57
- @property({ type: Object }) translatex?: { x?: number; y?: number; z?: number }
64
+ @property({ type: Object }) position?: { x?: number; y?: number; z?: number }
58
65
  @property({ type: Object }) rotate?: { x?: number; y?: number; z?: number }
59
66
  @property({ type: Object }) scale?: { x?: number; y?: number; z?: number }
60
67
 
@@ -81,17 +88,17 @@ export class OxInput3Dish extends OxFormField {
81
88
  case 'tx':
82
89
  case 'ty':
83
90
  case 'tz':
84
- this.translatex = {
85
- ...this.translatex,
91
+ this.position = {
92
+ ...this.position,
86
93
  [prop]: value
87
94
  }
88
95
 
89
96
  this.dispatchEvent(
90
- new CustomEvent('translate-changed', {
97
+ new CustomEvent('position-changed', {
91
98
  bubbles: true,
92
99
  composed: true,
93
100
  detail: {
94
- value: this.translatex
101
+ value: this.position
95
102
  }
96
103
  })
97
104
  )
@@ -154,7 +161,7 @@ export class OxInput3Dish extends OxFormField {
154
161
  }
155
162
 
156
163
  this.value = {
157
- translate: this.translatex,
164
+ position: this.position,
158
165
  rotate: this.rotate,
159
166
  scale: this.scale,
160
167
  dimension: this.dimension
@@ -176,24 +183,24 @@ export class OxInput3Dish extends OxFormField {
176
183
  <span>${msg('z-axes')}</span>
177
184
 
178
185
  <label>${msg('dimension')}</label>
179
- <input type="number" id="dwidth" .value=${this.dimension?.width} />
180
- <input type="number" id="dheight" .value=${this.dimension?.height} />
181
- <input type="number" id="ddepth" .value=${this.dimension?.depth} />
186
+ <input type="number" id="dwidth" .value=${String(this.dimension?.width)} />
187
+ <input type="number" id="dheight" .value=${String(this.dimension?.height)} />
188
+ <input type="number" id="ddepth" .value=${String(this.dimension?.depth)} />
182
189
 
183
- <label>${msg('translate')}</label>
184
- <input type="number" id="tx" .value=${this.translatex?.x} />
185
- <input type="number" id="ty" .value=${this.translatex?.y} />
186
- <input type="number" id="tz" .value=${this.translatex?.z} />
190
+ <label>${msg('position')}</label>
191
+ <input type="number" id="tx" .value=${String(this.position?.x)} />
192
+ <input type="number" id="ty" .value=${String(this.position?.y)} />
193
+ <input type="number" id="tz" .value=${String(this.position?.z)} />
187
194
 
188
195
  <label>${msg('scale')}</label>
189
- <input type="number" id="sx" .value=${this.scale?.x} />
190
- <input type="number" id="sy" .value=${this.scale?.y} />
191
- <input type="number" id="sz" .value=${this.scale?.z} />
196
+ <input type="number" id="sx" .value=${String(this.scale?.x)} />
197
+ <input type="number" id="sy" .value=${String(this.scale?.y)} />
198
+ <input type="number" id="sz" .value=${String(this.scale?.z)} />
192
199
 
193
200
  <label>${msg('rotate')}</label>
194
- <ox-input-angle id="rx" .value=${this.rotate?.x}></ox-input-angle>
195
- <ox-input-angle id="ry" .value=${this.rotate?.y}></ox-input-angle>
196
- <ox-input-angle id="rz" .value=${this.rotate?.z}></ox-input-angle>
201
+ <ox-input-angle id="rx" .value=${String(this.rotate?.x)}></ox-input-angle>
202
+ <ox-input-angle id="ry" .value=${String(this.rotate?.y)}></ox-input-angle>
203
+ <ox-input-angle id="rz" .value=${String(this.rotate?.z)}></ox-input-angle>
197
204
  `
198
205
  }
199
206
  }
@@ -19,7 +19,11 @@ export class OxInputAngle extends OxFormField {
19
19
  width: 100%;
20
20
  height: 100%;
21
21
  box-sizing: border-box;
22
- border: 1px solid rgba(0, 0, 0, 0.2);
22
+ border: var(--input-border, 1px solid rgba(0, 0, 0, 0.2));
23
+ }
24
+
25
+ input:focus {
26
+ outline: var(--input-focus-outline, inherit);
23
27
  }
24
28
  `
25
29
  ]
@@ -32,7 +36,7 @@ export class OxInputAngle extends OxFormField {
32
36
  return html`
33
37
  <input
34
38
  type="number"
35
- .value=${this._toDegree(this.value)}
39
+ .value=${String(this._toDegree(this.value))}
36
40
  .placeholder=${this.placeholder || '0°'}
37
41
  @change=${(e: Event) => this._onChangeValue(e)}
38
42
  />
@@ -0,0 +1,51 @@
1
+ import '../src/ox-input-angle.js'
2
+ import '../src/locale/locale-picker.js'
3
+
4
+ import { html, TemplateResult } from 'lit'
5
+
6
+ export default {
7
+ title: 'ox-input-angle',
8
+ component: 'ox-input-angle',
9
+ argTypes: {
10
+ value: { control: 'number' },
11
+ name: { control: 'text' }
12
+ }
13
+ }
14
+
15
+ interface Story<T> {
16
+ (args: T): TemplateResult
17
+ args?: Partial<T>
18
+ argTypes?: Record<string, unknown>
19
+ }
20
+
21
+ interface ArgTypes {
22
+ name?: string
23
+ value?: number
24
+ }
25
+
26
+ const Template: Story<ArgTypes> = ({ name = '3dish', value = 0 }: ArgTypes) => html`
27
+ <link href="/themes/app-theme.css" rel="stylesheet" />
28
+ <link href="https://fonts.googleapis.com/css?family=Material+Icons&display=block" rel="stylesheet" />
29
+ <style>
30
+ body {
31
+ }
32
+ </style>
33
+
34
+ <locale-picker></locale-picker>
35
+ <br /><br />
36
+
37
+ <ox-input-angle
38
+ @change=${(e: Event) => {
39
+ console.log((e.target as HTMLInputElement).value)
40
+ }}
41
+ name=${name}
42
+ .value=${value}
43
+ >
44
+ </ox-input-angle>
45
+ `
46
+
47
+ export const Regular = Template.bind({})
48
+ Regular.args = {
49
+ name: 'angle',
50
+ value: 0
51
+ }
package/xliff/en.xlf CHANGED
@@ -14,9 +14,6 @@
14
14
  <trans-unit id="sd793f87f18747a63">
15
15
  <source>dimension</source>
16
16
  </trans-unit>
17
- <trans-unit id="sf95fdd7da4fc2295">
18
- <source>translate</source>
19
- </trans-unit>
20
17
  <trans-unit id="s6aacb9fbb71a1d91">
21
18
  <source>scale</source>
22
19
  </trans-unit>
@@ -47,6 +44,15 @@
47
44
  <trans-unit id="scff69aa7239287b0">
48
45
  <source>The day after</source>
49
46
  </trans-unit>
47
+ <trans-unit id="s4cbf3a26fca1d74a">
48
+ <source>position</source>
49
+ </trans-unit>
50
+ <trans-unit id="sb9874d345b5e590a">
51
+ <source>tag duplicated</source>
52
+ </trans-unit>
53
+ <trans-unit id="s5191b91c637d7da1">
54
+ <source>special characters not allowed</source>
55
+ </trans-unit>
50
56
  </body>
51
57
  </file>
52
58
  </xliff>
package/xliff/ko.xlf CHANGED
@@ -18,10 +18,6 @@
18
18
  <source>dimension</source>
19
19
  <target>체적</target>
20
20
  </trans-unit>
21
- <trans-unit id="sf95fdd7da4fc2295">
22
- <source>translate</source>
23
- <target>변환</target>
24
- </trans-unit>
25
21
  <trans-unit id="s6aacb9fbb71a1d91">
26
22
  <source>scale</source>
27
23
  <target>스케일</target>
@@ -62,6 +58,18 @@
62
58
  <source>The day after</source>
63
59
  <target>다음날</target>
64
60
  </trans-unit>
61
+ <trans-unit id="s4cbf3a26fca1d74a">
62
+ <source>position</source>
63
+ <target>위치</target>
64
+ </trans-unit>
65
+ <trans-unit id="sb9874d345b5e590a">
66
+ <source>tag duplicated</source>
67
+ <target>태그가 중복되었습니다</target>
68
+ </trans-unit>
69
+ <trans-unit id="s5191b91c637d7da1">
70
+ <source>special characters not allowed</source>
71
+ <target>특수문자는 허용되지 않습니다</target>
72
+ </trans-unit>
65
73
  </body>
66
74
  </file>
67
75
  </xliff>
package/xliff/ms.xlf CHANGED
@@ -14,9 +14,6 @@
14
14
  <trans-unit id="sd793f87f18747a63">
15
15
  <source>dimension</source>
16
16
  </trans-unit>
17
- <trans-unit id="sf95fdd7da4fc2295">
18
- <source>translate</source>
19
- </trans-unit>
20
17
  <trans-unit id="s6aacb9fbb71a1d91">
21
18
  <source>scale</source>
22
19
  </trans-unit>
@@ -47,6 +44,15 @@
47
44
  <trans-unit id="scff69aa7239287b0">
48
45
  <source>The day after</source>
49
46
  </trans-unit>
47
+ <trans-unit id="s4cbf3a26fca1d74a">
48
+ <source>position</source>
49
+ </trans-unit>
50
+ <trans-unit id="sb9874d345b5e590a">
51
+ <source>tag duplicated</source>
52
+ </trans-unit>
53
+ <trans-unit id="s5191b91c637d7da1">
54
+ <source>special characters not allowed</source>
55
+ </trans-unit>
50
56
  </body>
51
57
  </file>
52
58
  </xliff>
package/xliff/zh.xlf CHANGED
@@ -14,9 +14,6 @@
14
14
  <trans-unit id="sd793f87f18747a63">
15
15
  <source>dimension</source>
16
16
  </trans-unit>
17
- <trans-unit id="sf95fdd7da4fc2295">
18
- <source>translate</source>
19
- </trans-unit>
20
17
  <trans-unit id="s6aacb9fbb71a1d91">
21
18
  <source>scale</source>
22
19
  </trans-unit>
@@ -47,6 +44,15 @@
47
44
  <trans-unit id="scff69aa7239287b0">
48
45
  <source>The day after</source>
49
46
  </trans-unit>
47
+ <trans-unit id="s4cbf3a26fca1d74a">
48
+ <source>position</source>
49
+ </trans-unit>
50
+ <trans-unit id="sb9874d345b5e590a">
51
+ <source>tag duplicated</source>
52
+ </trans-unit>
53
+ <trans-unit id="s5191b91c637d7da1">
54
+ <source>special characters not allowed</source>
55
+ </trans-unit>
50
56
  </body>
51
57
  </file>
52
58
  </xliff>