@operato/input 8.0.0-alpha.37 → 8.0.0-alpha.41

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/input",
3
3
  "description": "Webcomponents for input following open-wc recommendations",
4
4
  "author": "heartyoh@hatiolab.com",
5
- "version": "8.0.0-alpha.37",
5
+ "version": "8.0.0-alpha.41",
6
6
  "main": "dist/src/index.js",
7
7
  "module": "dist/src/index.js",
8
8
  "license": "MIT",
@@ -216,7 +216,7 @@
216
216
  "@material/web": "^2.0.0",
217
217
  "@operato/color-picker": "^8.0.0-alpha.33",
218
218
  "@operato/i18n": "^8.0.0-alpha.37",
219
- "@operato/popup": "^8.0.0-alpha.37",
219
+ "@operato/popup": "^8.0.0-alpha.41",
220
220
  "@operato/styles": "^8.0.0-alpha.37",
221
221
  "@operato/utils": "^8.0.0-alpha.37",
222
222
  "@polymer/paper-dropdown-menu": "^3.2.0",
@@ -262,5 +262,5 @@
262
262
  "prettier --write"
263
263
  ]
264
264
  },
265
- "gitHead": "508ea9c2cd0ed626825045dae9a068b0fa8932be"
265
+ "gitHead": "0c2adcc994cd105055c9355810fa9c7c8196ca41"
266
266
  }
@@ -31,19 +31,46 @@ export class OxInputDirection extends OxFormField {
31
31
  color: var(--md-sys-color-on-primary);
32
32
  background-color: var(--md-sys-color-primary);
33
33
  }
34
+
35
+ /* 아이콘 회전 */
36
+ md-icon[data-value='W'] {
37
+ transform: rotate(-90deg);
38
+ }
39
+
40
+ md-icon[data-value='N'] {
41
+ transform: rotate(0deg);
42
+ }
43
+
44
+ md-icon[data-value='S'] {
45
+ transform: rotate(180deg);
46
+ }
47
+
48
+ md-icon[data-value='E'] {
49
+ transform: rotate(90deg);
50
+ }
34
51
  `
35
52
 
36
53
  @property({ type: String }) value?: string
54
+ @property({ type: Boolean }) inbound?: boolean = false
37
55
 
38
56
  render() {
39
57
  const value = this.value
40
58
 
41
59
  return html`
42
60
  <div @click=${this.onClick.bind(this)}>
43
- <md-icon ?selected=${value == 'W'} data-value="W">arrow_back</md-icon>
44
- <md-icon ?selected=${value == 'N'} data-value="N">arrow_upward</md-icon>
45
- <md-icon ?selected=${value == 'S'} data-value="S">arrow_downward</md-icon>
46
- <md-icon ?selected=${value == 'E'} data-value="E">arrow_forward</md-icon>
61
+ ${this.inbound
62
+ ? html`
63
+ <md-icon ?selected=${value == 'W'} data-value="W">step_into</md-icon>
64
+ <md-icon ?selected=${value == 'N'} data-value="N">step_into</md-icon>
65
+ <md-icon ?selected=${value == 'S'} data-value="S">step_into</md-icon>
66
+ <md-icon ?selected=${value == 'E'} data-value="E">step_into</md-icon>
67
+ `
68
+ : html`
69
+ <md-icon ?selected=${value == 'W'} data-value="W">step_out</md-icon>
70
+ <md-icon ?selected=${value == 'N'} data-value="N">step_out</md-icon>
71
+ <md-icon ?selected=${value == 'S'} data-value="S">step_out</md-icon>
72
+ <md-icon ?selected=${value == 'E'} data-value="E">step_out</md-icon>
73
+ `}
47
74
  </div>
48
75
  `
49
76
  }
@@ -70,6 +70,17 @@ const Template: Story<ArgTypes> = ({ name = 'options', value, disabled }: ArgTyp
70
70
  ?disabled=${disabled}
71
71
  >
72
72
  </ox-input-direction>
73
+ <br />
74
+ <ox-input-direction
75
+ @change=${(e: Event) => {
76
+ console.log((e.target as HTMLInputElement).value)
77
+ }}
78
+ name=${name}
79
+ .value=${value}
80
+ ?disabled=${disabled}
81
+ inbound
82
+ >
83
+ </ox-input-direction>
73
84
  </div>
74
85
  `
75
86