@operato/input 8.0.0-beta.0 → 8.0.0-beta.1
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 +9 -0
- package/package.json +7 -7
- package/.editorconfig +0 -29
- package/.storybook/main.js +0 -3
- package/.storybook/preview.js +0 -52
- package/.storybook/server.mjs +0 -8
- package/src/index.ts +0 -35
- package/src/locale/locale-codes.ts +0 -18
- package/src/locale/locale-picker.ts +0 -43
- package/src/locale/localization.ts +0 -15
- package/src/locales/en.ts +0 -30
- package/src/locales/ko.ts +0 -30
- package/src/locales/ms.ts +0 -30
- package/src/locales/zh.ts +0 -30
- package/src/ox-buttons-radio.ts +0 -140
- package/src/ox-checkbox.ts +0 -181
- package/src/ox-form-field.ts +0 -53
- package/src/ox-input-3axis.ts +0 -77
- package/src/ox-input-3dish.ts +0 -211
- package/src/ox-input-angle.ts +0 -73
- package/src/ox-input-barcode.ts +0 -318
- package/src/ox-input-code.ts +0 -139
- package/src/ox-input-color-gradient.ts +0 -349
- package/src/ox-input-color-stops.ts +0 -525
- package/src/ox-input-color.ts +0 -338
- package/src/ox-input-container.ts +0 -32
- package/src/ox-input-crontab.ts +0 -595
- package/src/ox-input-data.ts +0 -219
- package/src/ox-input-direction.ts +0 -92
- package/src/ox-input-duration.ts +0 -175
- package/src/ox-input-file.ts +0 -209
- package/src/ox-input-hashtags.ts +0 -185
- package/src/ox-input-i18n-label.ts +0 -140
- package/src/ox-input-image.ts +0 -168
- package/src/ox-input-key-values.ts +0 -301
- package/src/ox-input-layout/ox-input-card-layout.ts +0 -58
- package/src/ox-input-layout/ox-input-grid-layout.ts +0 -64
- package/src/ox-input-layout/ox-input-layout.ts +0 -77
- package/src/ox-input-mass-fraction.ts +0 -437
- package/src/ox-input-multiple-colors.ts +0 -135
- package/src/ox-input-options.ts +0 -216
- package/src/ox-input-partition-keys.ts +0 -303
- package/src/ox-input-privilege.ts +0 -163
- package/src/ox-input-quantifier.ts +0 -62
- package/src/ox-input-range.ts +0 -146
- package/src/ox-input-scene-component-id.ts +0 -73
- package/src/ox-input-search.ts +0 -126
- package/src/ox-input-select-buttons.ts +0 -75
- package/src/ox-input-signature.ts +0 -208
- package/src/ox-input-stack.ts +0 -136
- package/src/ox-input-switch.ts +0 -117
- package/src/ox-input-table-column-config.ts +0 -211
- package/src/ox-input-table.ts +0 -404
- package/src/ox-input-textarea.ts +0 -86
- package/src/ox-input-unit-number.ts +0 -354
- package/src/ox-input-value-map.ts +0 -342
- package/src/ox-input-value-ranges.ts +0 -363
- package/src/ox-input-work-shift.ts +0 -290
- package/src/ox-select-floor.ts +0 -246
- package/src/ox-select.ts +0 -219
- package/stories/image-for-select-floor.ts +0 -2
- package/stories/ox-buttons-radio.stories.ts +0 -89
- package/stories/ox-checkbox.stories.ts +0 -111
- package/stories/ox-input-3axis.stories.ts +0 -77
- package/stories/ox-input-3dish.stories.ts +0 -106
- package/stories/ox-input-angle.stories.ts +0 -84
- package/stories/ox-input-barcode.stories.ts +0 -117
- package/stories/ox-input-code.stories.ts +0 -99
- package/stories/ox-input-crontab.stories.ts +0 -82
- package/stories/ox-input-data.stories.ts +0 -82
- package/stories/ox-input-direction.stories.ts +0 -91
- package/stories/ox-input-duration.stories.ts +0 -84
- package/stories/ox-input-file.stories.ts +0 -111
- package/stories/ox-input-hashtags.stories.ts +0 -82
- package/stories/ox-input-i18n-label.stories.ts +0 -103
- package/stories/ox-input-key-values.stories.ts +0 -97
- package/stories/ox-input-mass-fraction.stories.ts +0 -102
- package/stories/ox-input-multiple-colors.stories.ts +0 -72
- package/stories/ox-input-options.stories.ts +0 -80
- package/stories/ox-input-partition-keys.stories.ts +0 -84
- package/stories/ox-input-privilege.stories.ts +0 -108
- package/stories/ox-input-quantifier.stories.ts +0 -80
- package/stories/ox-input-range.stories.ts +0 -89
- package/stories/ox-input-search.stories.ts +0 -91
- package/stories/ox-input-select-buttons.stories.ts +0 -118
- package/stories/ox-input-signature.stories.ts +0 -75
- package/stories/ox-input-switch.stories.ts +0 -91
- package/stories/ox-input-table-column-config.stories.ts +0 -109
- package/stories/ox-input-unit.stories.ts +0 -151
- package/stories/ox-input-value-map.stories.ts +0 -92
- package/stories/ox-input-value-ranges.stories.ts +0 -92
- package/stories/ox-input-work-shift.stories.ts +0 -106
- package/stories/ox-select-floor.stories.ts +0 -197
- package/stories/ox-select-set-options.stories.ts +0 -208
- package/stories/ox-select.stories.ts +0 -181
- package/tsconfig.json +0 -25
- package/web-dev-server.config.mjs +0 -27
- package/web-test-runner.config.mjs +0 -41
@@ -1,82 +0,0 @@
|
|
1
|
-
import '../src/ox-input-crontab.js'
|
2
|
-
|
3
|
-
import { html, TemplateResult } from 'lit'
|
4
|
-
import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'
|
5
|
-
|
6
|
-
export default {
|
7
|
-
title: 'ox-input-crontab',
|
8
|
-
component: 'ox-input-crontab',
|
9
|
-
argTypes: {
|
10
|
-
value: { control: 'text' },
|
11
|
-
name: { control: 'text' },
|
12
|
-
disabled: { control: 'boolean' }
|
13
|
-
}
|
14
|
-
}
|
15
|
-
|
16
|
-
interface Story<T> {
|
17
|
-
(args: T): TemplateResult
|
18
|
-
args?: Partial<T>
|
19
|
-
argTypes?: Record<string, unknown>
|
20
|
-
}
|
21
|
-
|
22
|
-
interface ArgTypes {
|
23
|
-
name?: string
|
24
|
-
value?: string
|
25
|
-
disabled?: boolean
|
26
|
-
}
|
27
|
-
|
28
|
-
const Template: Story<ArgTypes> = ({ name = 'crontab', value = '* * * * * *', disabled }: ArgTypes) => html`
|
29
|
-
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
30
|
-
|
31
|
-
<link href="/themes/light.css" rel="stylesheet" />
|
32
|
-
<link href="/themes/dark.css" rel="stylesheet" />
|
33
|
-
<link href="/themes/spacing.css" rel="stylesheet" />
|
34
|
-
|
35
|
-
<link
|
36
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
37
|
-
rel="stylesheet"
|
38
|
-
/>
|
39
|
-
<link
|
40
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
41
|
-
rel="stylesheet"
|
42
|
-
/>
|
43
|
-
<link
|
44
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
45
|
-
rel="stylesheet"
|
46
|
-
/>
|
47
|
-
|
48
|
-
<style>
|
49
|
-
${MDTypeScaleStyles.cssText}
|
50
|
-
</style>
|
51
|
-
|
52
|
-
<style>
|
53
|
-
.container {
|
54
|
-
height: 500px;
|
55
|
-
text-align: center;
|
56
|
-
padding: 20px;
|
57
|
-
|
58
|
-
background-color: var(--md-sys-color-primary-container);
|
59
|
-
color: var(--md-sys-color-on-primary-container);
|
60
|
-
}
|
61
|
-
</style>
|
62
|
-
|
63
|
-
<div class="container md-typescale-body-large-prominent">
|
64
|
-
<br /><br />
|
65
|
-
|
66
|
-
<ox-input-crontab
|
67
|
-
@change=${(e: Event) => {
|
68
|
-
console.log((e.target as HTMLInputElement).value)
|
69
|
-
}}
|
70
|
-
name=${name}
|
71
|
-
.value=${value}
|
72
|
-
?disabled=${disabled}
|
73
|
-
>
|
74
|
-
</ox-input-crontab>
|
75
|
-
</div>
|
76
|
-
`
|
77
|
-
|
78
|
-
export const Regular = Template.bind({})
|
79
|
-
Regular.args = {
|
80
|
-
name: 'crontab',
|
81
|
-
value: '* * * * * *'
|
82
|
-
}
|
@@ -1,82 +0,0 @@
|
|
1
|
-
import '../src/ox-input-data.js'
|
2
|
-
|
3
|
-
import { html, TemplateResult } from 'lit'
|
4
|
-
import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'
|
5
|
-
|
6
|
-
export default {
|
7
|
-
title: 'ox-input-data',
|
8
|
-
component: 'ox-input-data',
|
9
|
-
argTypes: {
|
10
|
-
value: { control: 'text' },
|
11
|
-
name: { control: 'text' },
|
12
|
-
disabled: { control: 'boolean' }
|
13
|
-
}
|
14
|
-
}
|
15
|
-
|
16
|
-
interface Story<T> {
|
17
|
-
(args: T): TemplateResult
|
18
|
-
args?: Partial<T>
|
19
|
-
argTypes?: Record<string, unknown>
|
20
|
-
}
|
21
|
-
|
22
|
-
interface ArgTypes {
|
23
|
-
name?: string
|
24
|
-
value?: string | number | object
|
25
|
-
disabled?: boolean
|
26
|
-
}
|
27
|
-
|
28
|
-
const Template: Story<ArgTypes> = ({ name = 'code', value = '', disabled }: ArgTypes) => html`
|
29
|
-
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
30
|
-
|
31
|
-
<link href="/themes/light.css" rel="stylesheet" />
|
32
|
-
<link href="/themes/dark.css" rel="stylesheet" />
|
33
|
-
<link href="/themes/spacing.css" rel="stylesheet" />
|
34
|
-
|
35
|
-
<link
|
36
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
37
|
-
rel="stylesheet"
|
38
|
-
/>
|
39
|
-
<link
|
40
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
41
|
-
rel="stylesheet"
|
42
|
-
/>
|
43
|
-
<link
|
44
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
45
|
-
rel="stylesheet"
|
46
|
-
/>
|
47
|
-
|
48
|
-
<style>
|
49
|
-
${MDTypeScaleStyles.cssText}
|
50
|
-
</style>
|
51
|
-
|
52
|
-
<style>
|
53
|
-
.container {
|
54
|
-
height: 500px;
|
55
|
-
text-align: center;
|
56
|
-
padding: 20px;
|
57
|
-
}
|
58
|
-
|
59
|
-
ox-input-data {
|
60
|
-
height: 300px;
|
61
|
-
text-align: start;
|
62
|
-
}
|
63
|
-
</style>
|
64
|
-
|
65
|
-
<div class="container md-typescale-body-large-prominent">
|
66
|
-
<ox-input-data
|
67
|
-
@change=${(e: Event) => {
|
68
|
-
const value = (e.target as HTMLInputElement).value
|
69
|
-
console.log('value : ', value, typeof value)
|
70
|
-
}}
|
71
|
-
name=${name}
|
72
|
-
.value=${value}
|
73
|
-
?disabled=${disabled}
|
74
|
-
>
|
75
|
-
</ox-input-data>
|
76
|
-
</div>
|
77
|
-
`
|
78
|
-
|
79
|
-
export const Regular = Template.bind({})
|
80
|
-
Regular.args = {
|
81
|
-
name: 'data'
|
82
|
-
}
|
@@ -1,91 +0,0 @@
|
|
1
|
-
import '../src/ox-input-direction.js'
|
2
|
-
|
3
|
-
import { html, TemplateResult } from 'lit'
|
4
|
-
import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'
|
5
|
-
|
6
|
-
export default {
|
7
|
-
title: 'ox-input-direction',
|
8
|
-
component: 'ox-input-direction',
|
9
|
-
argTypes: {
|
10
|
-
value: { control: 'object' },
|
11
|
-
name: { control: 'text' },
|
12
|
-
disabled: { control: 'boolean' }
|
13
|
-
}
|
14
|
-
}
|
15
|
-
|
16
|
-
interface Story<T> {
|
17
|
-
(args: T): TemplateResult
|
18
|
-
args?: Partial<T>
|
19
|
-
argTypes?: Record<string, unknown>
|
20
|
-
}
|
21
|
-
|
22
|
-
interface ArgTypes {
|
23
|
-
name?: string
|
24
|
-
value?: object | string
|
25
|
-
disabled?: boolean
|
26
|
-
}
|
27
|
-
|
28
|
-
const Template: Story<ArgTypes> = ({ name = 'options', value, disabled }: ArgTypes) => html`
|
29
|
-
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
30
|
-
|
31
|
-
<link href="/themes/light.css" rel="stylesheet" />
|
32
|
-
<link href="/themes/dark.css" rel="stylesheet" />
|
33
|
-
<link href="/themes/spacing.css" rel="stylesheet" />
|
34
|
-
|
35
|
-
<link
|
36
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
37
|
-
rel="stylesheet"
|
38
|
-
/>
|
39
|
-
<link
|
40
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
41
|
-
rel="stylesheet"
|
42
|
-
/>
|
43
|
-
<link
|
44
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
45
|
-
rel="stylesheet"
|
46
|
-
/>
|
47
|
-
|
48
|
-
<style>
|
49
|
-
${MDTypeScaleStyles.cssText}
|
50
|
-
</style>
|
51
|
-
|
52
|
-
<style>
|
53
|
-
.container {
|
54
|
-
height: 500px;
|
55
|
-
text-align: center;
|
56
|
-
padding: 20px;
|
57
|
-
|
58
|
-
background-color: var(--md-sys-color-primary-container);
|
59
|
-
color: var(--md-sys-color-on-primary-container);
|
60
|
-
}
|
61
|
-
</style>
|
62
|
-
|
63
|
-
<div class="container">
|
64
|
-
<ox-input-direction
|
65
|
-
@change=${(e: Event) => {
|
66
|
-
console.log((e.target as HTMLInputElement).value)
|
67
|
-
}}
|
68
|
-
name=${name}
|
69
|
-
.value=${value}
|
70
|
-
?disabled=${disabled}
|
71
|
-
>
|
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>
|
84
|
-
</div>
|
85
|
-
`
|
86
|
-
|
87
|
-
export const Regular = Template.bind({})
|
88
|
-
Regular.args = {
|
89
|
-
name: 'options',
|
90
|
-
value: ''
|
91
|
-
}
|
@@ -1,84 +0,0 @@
|
|
1
|
-
import '../src/ox-input-duration.js'
|
2
|
-
import '../src/locale/locale-picker.js'
|
3
|
-
|
4
|
-
import { html, TemplateResult } from 'lit'
|
5
|
-
import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'
|
6
|
-
|
7
|
-
export default {
|
8
|
-
title: 'ox-input-duration',
|
9
|
-
component: 'ox-input-duration',
|
10
|
-
argTypes: {
|
11
|
-
value: { control: 'number' },
|
12
|
-
name: { control: 'text' },
|
13
|
-
disabled: { control: 'boolean' }
|
14
|
-
}
|
15
|
-
}
|
16
|
-
|
17
|
-
interface Story<T> {
|
18
|
-
(args: T): TemplateResult
|
19
|
-
args?: Partial<T>
|
20
|
-
argTypes?: Record<string, unknown>
|
21
|
-
}
|
22
|
-
|
23
|
-
interface ArgTypes {
|
24
|
-
name?: string
|
25
|
-
value?: number
|
26
|
-
disabled?: boolean
|
27
|
-
}
|
28
|
-
|
29
|
-
const Template: Story<ArgTypes> = ({ name = 'duration', value = 3601, disabled }: ArgTypes) => html`
|
30
|
-
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
31
|
-
|
32
|
-
<link href="/themes/light.css" rel="stylesheet" />
|
33
|
-
<link href="/themes/dark.css" rel="stylesheet" />
|
34
|
-
<link href="/themes/spacing.css" rel="stylesheet" />
|
35
|
-
|
36
|
-
<link
|
37
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
38
|
-
rel="stylesheet"
|
39
|
-
/>
|
40
|
-
<link
|
41
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
42
|
-
rel="stylesheet"
|
43
|
-
/>
|
44
|
-
<link
|
45
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
46
|
-
rel="stylesheet"
|
47
|
-
/>
|
48
|
-
|
49
|
-
<style>
|
50
|
-
${MDTypeScaleStyles.cssText}
|
51
|
-
</style>
|
52
|
-
|
53
|
-
<style>
|
54
|
-
.container {
|
55
|
-
height: 500px;
|
56
|
-
text-align: center;
|
57
|
-
padding: 20px;
|
58
|
-
|
59
|
-
background-color: var(--md-sys-color-primary-container);
|
60
|
-
color: var(--md-sys-color-on-primary-container);
|
61
|
-
}
|
62
|
-
</style>
|
63
|
-
|
64
|
-
<div class="container md-typescale-body-large-prominent">
|
65
|
-
<locale-picker></locale-picker>
|
66
|
-
<br /><br />
|
67
|
-
|
68
|
-
<ox-input-duration
|
69
|
-
@change=${(e: Event) => {
|
70
|
-
console.log((e.target as HTMLInputElement).value)
|
71
|
-
}}
|
72
|
-
name=${name}
|
73
|
-
.value=${value}
|
74
|
-
?disabled=${disabled}
|
75
|
-
>
|
76
|
-
</ox-input-duration>
|
77
|
-
</div>
|
78
|
-
`
|
79
|
-
|
80
|
-
export const Regular = Template.bind({})
|
81
|
-
Regular.args = {
|
82
|
-
name: 'duration',
|
83
|
-
value: 3601
|
84
|
-
}
|
@@ -1,111 +0,0 @@
|
|
1
|
-
import '../src/ox-input-file.js'
|
2
|
-
|
3
|
-
import { html, TemplateResult } from 'lit'
|
4
|
-
import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'
|
5
|
-
|
6
|
-
export default {
|
7
|
-
title: 'ox-input-file',
|
8
|
-
component: 'ox-input-file',
|
9
|
-
argTypes: {
|
10
|
-
name: { control: 'text' },
|
11
|
-
multiple: { control: 'boolean' },
|
12
|
-
accept: { control: 'text' },
|
13
|
-
icon: { control: 'text' },
|
14
|
-
label: { control: 'text' },
|
15
|
-
description: { control: 'text' },
|
16
|
-
hideFileList: { control: 'boolean' },
|
17
|
-
attachFileList: { control: 'boolean' },
|
18
|
-
disabled: { control: 'boolean' }
|
19
|
-
}
|
20
|
-
}
|
21
|
-
|
22
|
-
interface Story<T> {
|
23
|
-
(args: T): TemplateResult
|
24
|
-
args?: Partial<T>
|
25
|
-
argTypes?: Record<string, unknown>
|
26
|
-
}
|
27
|
-
|
28
|
-
interface ArgTypes {
|
29
|
-
label?: string
|
30
|
-
name?: string
|
31
|
-
multiple?: boolean
|
32
|
-
accept?: string
|
33
|
-
icon?: string
|
34
|
-
description?: string
|
35
|
-
hideFileList?: boolean
|
36
|
-
attachFileList?: boolean
|
37
|
-
disabled?: boolean
|
38
|
-
}
|
39
|
-
|
40
|
-
const Template: Story<ArgTypes> = ({
|
41
|
-
label = 'select files',
|
42
|
-
name = 'file',
|
43
|
-
multiple = true,
|
44
|
-
accept,
|
45
|
-
icon,
|
46
|
-
description,
|
47
|
-
hideFileList = false,
|
48
|
-
attachFileList = false,
|
49
|
-
disabled
|
50
|
-
}: ArgTypes) => html`
|
51
|
-
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
52
|
-
|
53
|
-
<link href="/themes/light.css" rel="stylesheet" />
|
54
|
-
<link href="/themes/dark.css" rel="stylesheet" />
|
55
|
-
<link href="/themes/spacing.css" rel="stylesheet" />
|
56
|
-
|
57
|
-
<link
|
58
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
59
|
-
rel="stylesheet"
|
60
|
-
/>
|
61
|
-
<link
|
62
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
63
|
-
rel="stylesheet"
|
64
|
-
/>
|
65
|
-
<link
|
66
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
67
|
-
rel="stylesheet"
|
68
|
-
/>
|
69
|
-
|
70
|
-
<style>
|
71
|
-
${MDTypeScaleStyles.cssText}
|
72
|
-
</style>
|
73
|
-
|
74
|
-
<style>
|
75
|
-
.container {
|
76
|
-
height: 500px;
|
77
|
-
text-align: center;
|
78
|
-
padding: 20px;
|
79
|
-
|
80
|
-
background-color: var(--md-sys-color-primary-container);
|
81
|
-
color: var(--md-sys-color-on-primary-container);
|
82
|
-
}
|
83
|
-
</style>
|
84
|
-
|
85
|
-
<div class="container md-typescale-body-large-prominent">
|
86
|
-
<ox-input-file
|
87
|
-
label=${label}
|
88
|
-
name=${name}
|
89
|
-
?multiple=${multiple}
|
90
|
-
?hide-filelist=${hideFileList}
|
91
|
-
?attach-filelist=${attachFileList}
|
92
|
-
accept=${accept}
|
93
|
-
icon=${icon}
|
94
|
-
description=${description}
|
95
|
-
?disabled=${disabled}
|
96
|
-
>
|
97
|
-
</ox-input-file>
|
98
|
-
</div>
|
99
|
-
`
|
100
|
-
|
101
|
-
export const Regular = Template.bind({})
|
102
|
-
Regular.args = {
|
103
|
-
label: 'select files',
|
104
|
-
name: 'files',
|
105
|
-
multiple: true,
|
106
|
-
hideFileList: false,
|
107
|
-
attachFileList: false,
|
108
|
-
accept: '*.*',
|
109
|
-
icon: 'upload',
|
110
|
-
description: 'drop files here!'
|
111
|
-
}
|
@@ -1,82 +0,0 @@
|
|
1
|
-
import '../src/ox-input-hashtags.js'
|
2
|
-
|
3
|
-
import { html, TemplateResult } from 'lit'
|
4
|
-
import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'
|
5
|
-
|
6
|
-
export default {
|
7
|
-
title: 'ox-input-hashtags',
|
8
|
-
component: 'ox-input-hashtags',
|
9
|
-
argTypes: {
|
10
|
-
placeholder: { control: 'text' },
|
11
|
-
name: { control: 'text' },
|
12
|
-
value: { control: 'array' },
|
13
|
-
disabled: { control: 'boolean' }
|
14
|
-
}
|
15
|
-
}
|
16
|
-
|
17
|
-
interface Story<T> {
|
18
|
-
(args: T): TemplateResult
|
19
|
-
args?: Partial<T>
|
20
|
-
argTypes?: Record<string, unknown>
|
21
|
-
}
|
22
|
-
|
23
|
-
interface ArgTypes {
|
24
|
-
placeholder?: string
|
25
|
-
name?: string
|
26
|
-
value?: string[]
|
27
|
-
disabled?: boolean
|
28
|
-
}
|
29
|
-
|
30
|
-
const Template: Story<ArgTypes> = ({ placeholder = 'hashtag', name = 'hello', value = [], disabled }: ArgTypes) => html`
|
31
|
-
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
32
|
-
|
33
|
-
<link href="/themes/light.css" rel="stylesheet" />
|
34
|
-
<link href="/themes/dark.css" rel="stylesheet" />
|
35
|
-
<link href="/themes/spacing.css" rel="stylesheet" />
|
36
|
-
|
37
|
-
<link
|
38
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
39
|
-
rel="stylesheet"
|
40
|
-
/>
|
41
|
-
<link
|
42
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
43
|
-
rel="stylesheet"
|
44
|
-
/>
|
45
|
-
<link
|
46
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
47
|
-
rel="stylesheet"
|
48
|
-
/>
|
49
|
-
|
50
|
-
<style>
|
51
|
-
${MDTypeScaleStyles.cssText}
|
52
|
-
</style>
|
53
|
-
|
54
|
-
<style>
|
55
|
-
.container {
|
56
|
-
height: 500px;
|
57
|
-
text-align: center;
|
58
|
-
padding: 20px;
|
59
|
-
|
60
|
-
background-color: var(--md-sys-color-primary-container);
|
61
|
-
color: var(--md-sys-color-on-primary-container);
|
62
|
-
}
|
63
|
-
</style>
|
64
|
-
|
65
|
-
<div class="container md-typescale-body-large-prominent">
|
66
|
-
<ox-input-hashtags
|
67
|
-
@change=${(e: Event) => console.log('changed', (e.target as HTMLInputElement).value)}
|
68
|
-
name=${name}
|
69
|
-
placeholder=${placeholder}
|
70
|
-
.value=${value}
|
71
|
-
?disabled=${disabled}
|
72
|
-
>
|
73
|
-
</ox-input-hashtags>
|
74
|
-
</div>
|
75
|
-
`
|
76
|
-
|
77
|
-
export const Regular = Template.bind({})
|
78
|
-
Regular.args = {
|
79
|
-
placeholder: 'hashtag',
|
80
|
-
name: 'hashtag',
|
81
|
-
value: ['abc', 'def']
|
82
|
-
}
|
@@ -1,103 +0,0 @@
|
|
1
|
-
import '../src/ox-input-i18n-label.js'
|
2
|
-
|
3
|
-
import { html, TemplateResult } from 'lit'
|
4
|
-
import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'
|
5
|
-
|
6
|
-
export default {
|
7
|
-
title: 'ox-input-i18n-label',
|
8
|
-
component: 'ox-input-i18n-label',
|
9
|
-
argTypes: {
|
10
|
-
name: { control: 'text' },
|
11
|
-
value: { control: 'object' },
|
12
|
-
disabled: { control: 'boolean' }
|
13
|
-
}
|
14
|
-
}
|
15
|
-
|
16
|
-
interface Story<T> {
|
17
|
-
(args: T): TemplateResult
|
18
|
-
args?: Partial<T>
|
19
|
-
argTypes?: Record<string, unknown>
|
20
|
-
}
|
21
|
-
|
22
|
-
interface ArgTypes {
|
23
|
-
name?: string
|
24
|
-
value?: object
|
25
|
-
disabled?: boolean
|
26
|
-
}
|
27
|
-
|
28
|
-
const Template: Story<ArgTypes> = ({ name = 'values', value, disabled }: ArgTypes) => html`
|
29
|
-
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
30
|
-
|
31
|
-
<link href="/themes/light.css" rel="stylesheet" />
|
32
|
-
<link href="/themes/dark.css" rel="stylesheet" />
|
33
|
-
<link href="/themes/spacing.css" rel="stylesheet" />
|
34
|
-
|
35
|
-
<link
|
36
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
37
|
-
rel="stylesheet"
|
38
|
-
/>
|
39
|
-
<link
|
40
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
41
|
-
rel="stylesheet"
|
42
|
-
/>
|
43
|
-
<link
|
44
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
45
|
-
rel="stylesheet"
|
46
|
-
/>
|
47
|
-
|
48
|
-
<style>
|
49
|
-
${MDTypeScaleStyles.cssText}
|
50
|
-
</style>
|
51
|
-
|
52
|
-
<style>
|
53
|
-
.container {
|
54
|
-
height: 500px;
|
55
|
-
text-align: center;
|
56
|
-
padding: 20px;
|
57
|
-
|
58
|
-
background-color: var(--md-sys-color-primary-container);
|
59
|
-
color: var(--md-sys-color-on-primary-container);
|
60
|
-
}
|
61
|
-
</style>
|
62
|
-
|
63
|
-
<div class="container md-typescale-body-large-prominent">
|
64
|
-
<ox-input-i18n-label
|
65
|
-
@change=${(e: Event) => {
|
66
|
-
console.log((e.target as HTMLInputElement).value)
|
67
|
-
}}
|
68
|
-
name=${name}
|
69
|
-
.value=${value}
|
70
|
-
.languages=${[
|
71
|
-
{
|
72
|
-
code: 'ko',
|
73
|
-
display: '한글'
|
74
|
-
},
|
75
|
-
{
|
76
|
-
code: 'en',
|
77
|
-
display: 'English'
|
78
|
-
},
|
79
|
-
{
|
80
|
-
code: 'zh',
|
81
|
-
display: 'Chinese'
|
82
|
-
},
|
83
|
-
{
|
84
|
-
code: 'ja',
|
85
|
-
display: 'Japanese'
|
86
|
-
}
|
87
|
-
]}
|
88
|
-
?disabled=${disabled}
|
89
|
-
>
|
90
|
-
</ox-input-i18n-label>
|
91
|
-
</div>
|
92
|
-
`
|
93
|
-
|
94
|
-
export const Regular = Template.bind({})
|
95
|
-
Regular.args = {
|
96
|
-
name: 'i18n labels',
|
97
|
-
value: {
|
98
|
-
ko: '한글 코드',
|
99
|
-
en: 'English code',
|
100
|
-
zh: 'Chinese code',
|
101
|
-
ja: 'Japan code'
|
102
|
-
}
|
103
|
-
}
|