@operato/input 1.0.0-beta.25 → 1.0.0-beta.28
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/CHANGELOG.md +27 -0
- package/dist/src/ox-input-value-map.js +50 -14
- package/dist/src/ox-input-value-map.js.map +1 -1
- package/dist/src/ox-input-value-ranges.js +50 -23
- package/dist/src/ox-input-value-ranges.js.map +1 -1
- package/dist/src/ox-select.js +2 -5
- package/dist/src/ox-select.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -7
- package/src/ox-input-value-map.ts +50 -14
- package/src/ox-input-value-ranges.ts +50 -23
- package/src/ox-select.ts +2 -5
- package/themes/input-theme.css +1 -1
- package/dist/stories/ox-input-conntab.stories.d.ts +0 -26
- package/dist/stories/ox-input-conntab.stories.js +0 -37
- package/dist/stories/ox-input-conntab.stories.js.map +0 -1
@@ -29,23 +29,18 @@ export class OxInputValueRange extends OxFormField {
|
|
29
29
|
:host {
|
30
30
|
display: flex;
|
31
31
|
flex-direction: column;
|
32
|
-
|
33
|
-
|
34
|
-
width: 100%;
|
35
|
-
overflow: hidden;
|
36
|
-
border: 1px solid #ccc;
|
32
|
+
border: var(--border-dark-color);
|
33
|
+
padding: var(--padding-narrow) var(--padding-narrow) 0 var(--padding-narrow);
|
37
34
|
}
|
38
35
|
|
39
36
|
div {
|
40
37
|
display: flex;
|
41
38
|
flex-flow: row nowrap;
|
42
|
-
|
43
|
-
|
44
|
-
border-bottom: 1px solid #c0c0c0;
|
39
|
+
gap: var(--padding-default);
|
45
40
|
}
|
46
41
|
|
47
42
|
div:last-child {
|
48
|
-
|
43
|
+
margin-bottom: var(--margin-narrow);
|
49
44
|
}
|
50
45
|
|
51
46
|
div > * {
|
@@ -55,14 +50,47 @@ export class OxInputValueRange extends OxFormField {
|
|
55
50
|
}
|
56
51
|
|
57
52
|
button {
|
58
|
-
|
59
|
-
|
53
|
+
border: var(--button-border);
|
54
|
+
border-radius: var(--border-radius);
|
55
|
+
background-color: var(--button-background-color);
|
56
|
+
padding: var(--padding-narrow) var(--padding-default);
|
57
|
+
line-height: 0.8;
|
58
|
+
color: var(--button-color);
|
59
|
+
cursor: pointer;
|
60
|
+
}
|
61
|
+
button + button {
|
62
|
+
margin-left: -5px;
|
63
|
+
}
|
64
|
+
button mwc-icon {
|
65
|
+
font-size: var(--fontsize-default);
|
66
|
+
}
|
67
|
+
button:focus,
|
68
|
+
button:hover,
|
69
|
+
button:active {
|
70
|
+
border: var(--button-activ-border);
|
71
|
+
background-color: var(--button-background-focus-color);
|
72
|
+
color: var(--theme-white-color);
|
60
73
|
}
|
61
74
|
|
62
75
|
input,
|
63
76
|
ox-input-color {
|
64
77
|
flex: 1;
|
65
78
|
}
|
79
|
+
input {
|
80
|
+
border: 0;
|
81
|
+
border-bottom: var(--border-dark-color);
|
82
|
+
padding: var(--input-padding);
|
83
|
+
font: var(--input-font);
|
84
|
+
color: var(--primary-text-color);
|
85
|
+
}
|
86
|
+
input:focus {
|
87
|
+
outline: none;
|
88
|
+
border-bottom: 1px solid var(--primary-color);
|
89
|
+
}
|
90
|
+
button.hidden {
|
91
|
+
opacity: 0;
|
92
|
+
cursor: default;
|
93
|
+
}
|
66
94
|
|
67
95
|
ox-input-color {
|
68
96
|
--things-editor-color-input-color: {
|
@@ -74,18 +102,11 @@ export class OxInputValueRange extends OxFormField {
|
|
74
102
|
}
|
75
103
|
}
|
76
104
|
|
77
|
-
[placeholder='value']
|
105
|
+
[placeholder='value'],
|
106
|
+
[value='default'] {
|
78
107
|
flex: 2;
|
79
108
|
}
|
80
109
|
|
81
|
-
div {
|
82
|
-
border-bottom: 1px solid #c0c0c0;
|
83
|
-
}
|
84
|
-
|
85
|
-
div:last-child {
|
86
|
-
border-bottom: none;
|
87
|
-
}
|
88
|
-
|
89
110
|
input[type='checkbox'] {
|
90
111
|
width: initial;
|
91
112
|
}
|
@@ -121,7 +142,10 @@ export class OxInputValueRange extends OxFormField {
|
|
121
142
|
.value=${item.value}
|
122
143
|
data-value-type=${this.valuetype}
|
123
144
|
/>
|
124
|
-
`}
|
145
|
+
`}
|
146
|
+
<button class="record-action" @click=${(e: Event) => this._delete(e)} tabindex="-1">
|
147
|
+
<mwc-icon>remove</mwc-icon>
|
148
|
+
</button>
|
125
149
|
</div>
|
126
150
|
`
|
127
151
|
)}
|
@@ -135,7 +159,9 @@ export class OxInputValueRange extends OxFormField {
|
|
135
159
|
: this.valuetype == 'color'
|
136
160
|
? html` <ox-input-color data-value value="" placeholder="value"> </ox-input-color> `
|
137
161
|
: html` <input type="text" data-value placeholder="value" value="" data-value-type=${this.valuetype} /> `}
|
138
|
-
<button class="record-action" @click=${(e: Event) => this._add()} tabindex="-1"
|
162
|
+
<button class="record-action" @click=${(e: Event) => this._add()} tabindex="-1">
|
163
|
+
<mwc-icon>add</mwc-icon>
|
164
|
+
</button>
|
139
165
|
</div>
|
140
166
|
|
141
167
|
<div data-record>
|
@@ -165,7 +191,8 @@ export class OxInputValueRange extends OxFormField {
|
|
165
191
|
class="default-value"
|
166
192
|
data-value-type=${this.valuetype}
|
167
193
|
/>
|
168
|
-
`}
|
194
|
+
`}
|
195
|
+
<button class="record-action" @click=${(e: Event) => this._sort()}><mwc-icon>chevron_right</mwc-icon></button>
|
169
196
|
</div>
|
170
197
|
`
|
171
198
|
}
|
package/src/ox-select.ts
CHANGED
@@ -34,6 +34,7 @@ export class Select extends OxFormField {
|
|
34
34
|
:host {
|
35
35
|
display: block;
|
36
36
|
position: relative;
|
37
|
+
border-bottom: var(--border-dark-color);
|
37
38
|
}
|
38
39
|
|
39
40
|
div {
|
@@ -42,11 +43,10 @@ export class Select extends OxFormField {
|
|
42
43
|
align-items: center;
|
43
44
|
justify-content: center;
|
44
45
|
cursor: pointer;
|
45
|
-
|
46
|
-
border-bottom: var(--border-dark-color);
|
47
46
|
padding: var(--input-padding);
|
48
47
|
font: var(--input-font);
|
49
48
|
color: var(--primary-text-color);
|
49
|
+
max-height: 17px;
|
50
50
|
}
|
51
51
|
|
52
52
|
span {
|
@@ -55,9 +55,6 @@ export class Select extends OxFormField {
|
|
55
55
|
text-overflow: ellipsis;
|
56
56
|
white-space: nowrap;
|
57
57
|
}
|
58
|
-
div:hover {
|
59
|
-
border-bottom: 1px solid var(--primary-color);
|
60
|
-
}
|
61
58
|
|
62
59
|
mwc-icon {
|
63
60
|
display: block;
|
package/themes/input-theme.css
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
body {
|
2
2
|
--ox-input-border: 1px solid rgba(0, 0, 0, 0.1);
|
3
3
|
--ox-input-border-radius: var(--border-radius);
|
4
|
-
--ox-input-padding:
|
4
|
+
--ox-input-padding: var(--input-padding);
|
5
5
|
--ox-input-font: normal 15px var(--theme-font);
|
6
6
|
--ox-input-color: var(--secondary-color);
|
7
7
|
}
|
@@ -1,26 +0,0 @@
|
|
1
|
-
import '../src/ox-input-crontab.js';
|
2
|
-
import '../src/locale/locale-picker.js';
|
3
|
-
import { TemplateResult } from 'lit';
|
4
|
-
declare const _default: {
|
5
|
-
title: string;
|
6
|
-
component: string;
|
7
|
-
argTypes: {
|
8
|
-
value: {
|
9
|
-
control: string;
|
10
|
-
};
|
11
|
-
name: {
|
12
|
-
control: string;
|
13
|
-
};
|
14
|
-
};
|
15
|
-
};
|
16
|
-
export default _default;
|
17
|
-
interface Story<T> {
|
18
|
-
(args: T): TemplateResult;
|
19
|
-
args?: Partial<T>;
|
20
|
-
argTypes?: Record<string, unknown>;
|
21
|
-
}
|
22
|
-
interface ArgTypes {
|
23
|
-
name?: string;
|
24
|
-
value?: string;
|
25
|
-
}
|
26
|
-
export declare const Regular: Story<ArgTypes>;
|
@@ -1,37 +0,0 @@
|
|
1
|
-
import '../src/ox-input-crontab.js';
|
2
|
-
import '../src/locale/locale-picker.js';
|
3
|
-
import { html } from 'lit';
|
4
|
-
export default {
|
5
|
-
title: 'ox-input-crontab',
|
6
|
-
component: 'ox-input-crontab',
|
7
|
-
argTypes: {
|
8
|
-
value: { control: 'text' },
|
9
|
-
name: { control: 'text' }
|
10
|
-
}
|
11
|
-
};
|
12
|
-
const Template = ({ name = 'crontab', value = '* * * * * *' }) => html `
|
13
|
-
<link href="/themes/app-theme.css" rel="stylesheet" />
|
14
|
-
<link href="https://fonts.googleapis.com/css?family=Material+Icons&display=block" rel="stylesheet" />
|
15
|
-
<style>
|
16
|
-
body {
|
17
|
-
}
|
18
|
-
</style>
|
19
|
-
|
20
|
-
<locale-picker></locale-picker>
|
21
|
-
<br /><br />
|
22
|
-
|
23
|
-
<ox-input-crontab
|
24
|
-
@change=${(e) => {
|
25
|
-
console.log(e.target.value);
|
26
|
-
}}
|
27
|
-
name=${name}
|
28
|
-
.value=${value}
|
29
|
-
>
|
30
|
-
</ox-input-crontab>
|
31
|
-
`;
|
32
|
-
export const Regular = Template.bind({});
|
33
|
-
Regular.args = {
|
34
|
-
name: 'crontab',
|
35
|
-
value: '* * * * * *'
|
36
|
-
};
|
37
|
-
//# sourceMappingURL=ox-input-conntab.stories.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"ox-input-conntab.stories.js","sourceRoot":"","sources":["../../stories/ox-input-conntab.stories.ts"],"names":[],"mappings":"AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,gCAAgC,CAAA;AAEvC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAE1C,eAAe;IACb,KAAK,EAAE,kBAAkB;IACzB,SAAS,EAAE,kBAAkB;IAC7B,QAAQ,EAAE;QACR,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QAC1B,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;KAC1B;CACF,CAAA;AAaD,MAAM,QAAQ,GAAoB,CAAC,EAAE,IAAI,GAAG,SAAS,EAAE,KAAK,GAAG,aAAa,EAAY,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;cAYnF,CAAC,CAAQ,EAAE,EAAE;IACrB,OAAO,CAAC,GAAG,CAAE,CAAC,CAAC,MAA2B,CAAC,KAAK,CAAC,CAAA;AACnD,CAAC;WACM,IAAI;aACF,KAAK;;;CAGjB,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG;IACb,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,aAAa;CACrB,CAAA","sourcesContent":["import '../src/ox-input-crontab.js'\nimport '../src/locale/locale-picker.js'\n\nimport { html, TemplateResult } from 'lit'\n\nexport default {\n title: 'ox-input-crontab',\n component: 'ox-input-crontab',\n argTypes: {\n value: { control: 'text' },\n name: { control: 'text' }\n }\n}\n\ninterface Story<T> {\n (args: T): TemplateResult\n args?: Partial<T>\n argTypes?: Record<string, unknown>\n}\n\ninterface ArgTypes {\n name?: string\n value?: string\n}\n\nconst Template: Story<ArgTypes> = ({ name = 'crontab', value = '* * * * * *' }: ArgTypes) => html`\n <link href=\"/themes/app-theme.css\" rel=\"stylesheet\" />\n <link href=\"https://fonts.googleapis.com/css?family=Material+Icons&display=block\" rel=\"stylesheet\" />\n <style>\n body {\n }\n </style>\n\n <locale-picker></locale-picker>\n <br /><br />\n\n <ox-input-crontab\n @change=${(e: Event) => {\n console.log((e.target as HTMLInputElement).value)\n }}\n name=${name}\n .value=${value}\n >\n </ox-input-crontab>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n name: 'crontab',\n value: '* * * * * *'\n}\n"]}
|