@operato/input 2.0.0-alpha.99 → 2.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 +256 -0
- package/demo/index-barcode.html +4 -4
- package/demo/index-checkbox.html +4 -4
- package/demo/index-code.html +4 -4
- package/demo/index-options.html +2 -2
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +1 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/ox-buttons-radio.d.ts +9 -5
- package/dist/src/ox-buttons-radio.js +43 -11
- package/dist/src/ox-buttons-radio.js.map +1 -1
- package/dist/src/ox-checkbox.js +23 -19
- package/dist/src/ox-checkbox.js.map +1 -1
- package/dist/src/ox-input-3axis.js +12 -1
- package/dist/src/ox-input-3axis.js.map +1 -1
- package/dist/src/ox-input-3dish.js +16 -11
- package/dist/src/ox-input-3dish.js.map +1 -1
- package/dist/src/ox-input-angle.js +8 -1
- package/dist/src/ox-input-angle.js.map +1 -1
- package/dist/src/ox-input-barcode.js +11 -8
- package/dist/src/ox-input-barcode.js.map +1 -1
- package/dist/src/ox-input-code.js +3 -0
- package/dist/src/ox-input-code.js.map +1 -1
- package/dist/src/ox-input-color.js +8 -6
- package/dist/src/ox-input-color.js.map +1 -1
- package/dist/src/ox-input-crontab.js +29 -25
- package/dist/src/ox-input-crontab.js.map +1 -1
- package/dist/src/ox-input-data.js +15 -6
- package/dist/src/ox-input-data.js.map +1 -1
- package/dist/src/ox-input-direction.d.ts +11 -0
- package/dist/src/ox-input-direction.js +60 -0
- package/dist/src/ox-input-direction.js.map +1 -0
- package/dist/src/ox-input-duration.js +15 -34
- package/dist/src/ox-input-duration.js.map +1 -1
- package/dist/src/ox-input-file.js +18 -14
- package/dist/src/ox-input-file.js.map +1 -1
- package/dist/src/ox-input-hashtags.js +13 -14
- package/dist/src/ox-input-hashtags.js.map +1 -1
- package/dist/src/ox-input-i18n-label.js +4 -4
- package/dist/src/ox-input-i18n-label.js.map +1 -1
- package/dist/src/ox-input-image.js +2 -2
- package/dist/src/ox-input-image.js.map +1 -1
- package/dist/src/ox-input-key-values.js +6 -6
- package/dist/src/ox-input-key-values.js.map +1 -1
- package/dist/src/ox-input-mass-fraction.js +6 -5
- package/dist/src/ox-input-mass-fraction.js.map +1 -1
- package/dist/src/ox-input-multiple-colors.js +2 -2
- package/dist/src/ox-input-multiple-colors.js.map +1 -1
- package/dist/src/ox-input-options.js +6 -6
- package/dist/src/ox-input-options.js.map +1 -1
- package/dist/src/ox-input-partition-keys.js +6 -6
- package/dist/src/ox-input-partition-keys.js.map +1 -1
- package/dist/src/ox-input-privilege.js +13 -16
- package/dist/src/ox-input-privilege.js.map +1 -1
- package/dist/src/ox-input-quantifier.js +5 -5
- package/dist/src/ox-input-quantifier.js.map +1 -1
- package/dist/src/ox-input-range.js +8 -8
- package/dist/src/ox-input-range.js.map +1 -1
- package/dist/src/ox-input-search.js +5 -6
- package/dist/src/ox-input-search.js.map +1 -1
- package/dist/src/ox-input-select-buttons.d.ts +2 -0
- package/dist/src/ox-input-select-buttons.js +14 -21
- package/dist/src/ox-input-select-buttons.js.map +1 -1
- package/dist/src/ox-input-table.js +1 -1
- package/dist/src/ox-input-table.js.map +1 -1
- package/dist/src/ox-input-unit-number.js +5 -5
- package/dist/src/ox-input-unit-number.js.map +1 -1
- package/dist/src/ox-input-value-map.js +9 -13
- package/dist/src/ox-input-value-map.js.map +1 -1
- package/dist/src/ox-input-value-ranges.js +7 -7
- package/dist/src/ox-input-value-ranges.js.map +1 -1
- package/dist/src/ox-input-work-shift.js +7 -7
- package/dist/src/ox-input-work-shift.js.map +1 -1
- package/dist/src/ox-select.d.ts +9 -1
- package/dist/src/ox-select.js +51 -17
- package/dist/src/ox-select.js.map +1 -1
- package/dist/src/ox-zoomable-image.d.ts +17 -0
- package/dist/src/ox-zoomable-image.js +80 -0
- package/dist/src/ox-zoomable-image.js.map +1 -0
- package/dist/stories/ox-buttons-radio.stories.d.ts +31 -0
- package/dist/stories/ox-buttons-radio.stories.js +81 -0
- package/dist/stories/ox-buttons-radio.stories.js.map +1 -0
- package/dist/stories/ox-checkbox.stories.d.ts +6 -0
- package/dist/stories/ox-checkbox.stories.js +57 -13
- package/dist/stories/ox-checkbox.stories.js.map +1 -1
- package/dist/stories/ox-input-3axis.stories.d.ts +5 -0
- package/dist/stories/ox-input-3axis.stories.js +32 -10
- package/dist/stories/ox-input-3axis.stories.js.map +1 -1
- package/dist/stories/ox-input-3dish.stories.d.ts +5 -0
- package/dist/stories/ox-input-3dish.stories.js +35 -13
- package/dist/stories/ox-input-3dish.stories.js.map +1 -1
- package/dist/stories/ox-input-angle.stories.d.ts +5 -0
- package/dist/stories/ox-input-angle.stories.js +36 -13
- package/dist/stories/ox-input-angle.stories.js.map +1 -1
- package/dist/stories/ox-input-barcode.stories.d.ts +5 -0
- package/dist/stories/ox-input-barcode.stories.js +35 -18
- package/dist/stories/ox-input-barcode.stories.js.map +1 -1
- package/dist/stories/ox-input-code.stories.d.ts +5 -0
- package/dist/stories/ox-input-code.stories.js +38 -13
- package/dist/stories/ox-input-code.stories.js.map +1 -1
- package/dist/stories/ox-input-crontab.stories.d.ts +5 -0
- package/dist/stories/ox-input-crontab.stories.js +35 -12
- package/dist/stories/ox-input-crontab.stories.js.map +1 -1
- package/dist/stories/ox-input-data.stories.d.ts +5 -0
- package/dist/stories/ox-input-data.stories.js +34 -11
- package/dist/stories/ox-input-data.stories.js.map +1 -1
- package/dist/stories/ox-input-direction.stories.d.ts +34 -0
- package/dist/stories/ox-input-direction.stories.js +70 -0
- package/dist/stories/ox-input-direction.stories.js.map +1 -0
- package/dist/stories/ox-input-duration.stories.d.ts +5 -0
- package/dist/stories/ox-input-duration.stories.js +36 -13
- package/dist/stories/ox-input-duration.stories.js.map +1 -1
- package/dist/stories/ox-input-file.stories.d.ts +5 -0
- package/dist/stories/ox-input-file.stories.js +39 -16
- package/dist/stories/ox-input-file.stories.js.map +1 -1
- package/dist/stories/ox-input-hashtags.stories.d.ts +5 -0
- package/dist/stories/ox-input-hashtags.stories.js +35 -12
- package/dist/stories/ox-input-hashtags.stories.js.map +1 -1
- package/dist/stories/ox-input-i18n-label.stories.d.ts +5 -0
- package/dist/stories/ox-input-i18n-label.stories.js +35 -12
- package/dist/stories/ox-input-i18n-label.stories.js.map +1 -1
- package/dist/stories/ox-input-key-values.stories.d.ts +5 -0
- package/dist/stories/ox-input-key-values.stories.js +35 -12
- package/dist/stories/ox-input-key-values.stories.js.map +1 -1
- package/dist/stories/ox-input-mass-fraction.stories.d.ts +5 -0
- package/dist/stories/ox-input-mass-fraction.stories.js +36 -13
- package/dist/stories/ox-input-mass-fraction.stories.js.map +1 -1
- package/dist/stories/ox-input-multiple-colors.stories.d.ts +5 -0
- package/dist/stories/ox-input-multiple-colors.stories.js +31 -149
- package/dist/stories/ox-input-multiple-colors.stories.js.map +1 -1
- package/dist/stories/ox-input-options.stories.d.ts +5 -0
- package/dist/stories/ox-input-options.stories.js +34 -11
- package/dist/stories/ox-input-options.stories.js.map +1 -1
- package/dist/stories/ox-input-partition-keys.stories.d.ts +5 -0
- package/dist/stories/ox-input-partition-keys.stories.js +34 -11
- package/dist/stories/ox-input-partition-keys.stories.js.map +1 -1
- package/dist/stories/ox-input-privilege.stories.d.ts +5 -0
- package/dist/stories/ox-input-privilege.stories.js +36 -18
- package/dist/stories/ox-input-privilege.stories.js.map +1 -1
- package/dist/stories/ox-input-quantifier.stories.d.ts +5 -0
- package/dist/stories/ox-input-quantifier.stories.js +37 -10
- package/dist/stories/ox-input-quantifier.stories.js.map +1 -1
- package/dist/stories/ox-input-range.stories.d.ts +5 -0
- package/dist/stories/ox-input-range.stories.js +32 -5
- package/dist/stories/ox-input-range.stories.js.map +1 -1
- package/dist/stories/ox-input-search.stories.d.ts +5 -0
- package/dist/stories/ox-input-search.stories.js +35 -12
- package/dist/stories/ox-input-search.stories.js.map +1 -1
- package/dist/stories/ox-input-select-buttons.stories.d.ts +5 -0
- package/dist/stories/ox-input-select-buttons.stories.js +36 -14
- package/dist/stories/ox-input-select-buttons.stories.js.map +1 -1
- package/dist/stories/ox-input-unit.stories.d.ts +5 -0
- package/dist/stories/ox-input-unit.stories.js +40 -13
- package/dist/stories/ox-input-unit.stories.js.map +1 -1
- package/dist/stories/ox-input-value-map.stories.d.ts +5 -0
- package/dist/stories/ox-input-value-map.stories.js +36 -13
- package/dist/stories/ox-input-value-map.stories.js.map +1 -1
- package/dist/stories/ox-input-value-ranges.stories.d.ts +5 -0
- package/dist/stories/ox-input-value-ranges.stories.js +36 -13
- package/dist/stories/ox-input-value-ranges.stories.js.map +1 -1
- package/dist/stories/ox-input-work-shift.stories.d.ts +5 -0
- package/dist/stories/ox-input-work-shift.stories.js +36 -13
- package/dist/stories/ox-input-work-shift.stories.js.map +1 -1
- package/dist/stories/ox-select-set-options.stories.d.ts +53 -0
- package/dist/stories/ox-select-set-options.stories.js +183 -0
- package/dist/stories/ox-select-set-options.stories.js.map +1 -0
- package/dist/stories/ox-select.stories.d.ts +5 -0
- package/dist/stories/ox-select.stories.js +33 -7
- package/dist/stories/ox-select.stories.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +12 -8
- package/src/index.ts +1 -0
- package/src/ox-buttons-radio.ts +37 -5
- package/src/ox-checkbox.ts +23 -19
- package/src/ox-input-3axis.ts +12 -1
- package/src/ox-input-3dish.ts +16 -11
- package/src/ox-input-angle.ts +8 -1
- package/src/ox-input-barcode.ts +11 -8
- package/src/ox-input-code.ts +3 -0
- package/src/ox-input-color.ts +8 -6
- package/src/ox-input-crontab.ts +29 -25
- package/src/ox-input-data.ts +15 -6
- package/src/ox-input-direction.ts +65 -0
- package/src/ox-input-duration.ts +15 -34
- package/src/ox-input-file.ts +18 -14
- package/src/ox-input-hashtags.ts +14 -16
- package/src/ox-input-i18n-label.ts +4 -4
- package/src/ox-input-image.ts +2 -2
- package/src/ox-input-key-values.ts +6 -6
- package/src/ox-input-mass-fraction.ts +6 -5
- package/src/ox-input-multiple-colors.ts +2 -2
- package/src/ox-input-options.ts +6 -6
- package/src/ox-input-partition-keys.ts +6 -6
- package/src/ox-input-privilege.ts +13 -16
- package/src/ox-input-quantifier.ts +5 -5
- package/src/ox-input-range.ts +8 -8
- package/src/ox-input-search.ts +5 -6
- package/src/ox-input-select-buttons.ts +19 -24
- package/src/ox-input-table.ts +1 -1
- package/src/ox-input-unit-number.ts +5 -5
- package/src/ox-input-value-map.ts +9 -13
- package/src/ox-input-value-ranges.ts +7 -7
- package/src/ox-input-work-shift.ts +7 -7
- package/src/ox-select.ts +60 -13
- package/src/ox-zoomable-image.ts +75 -0
- package/stories/ox-buttons-radio.stories.ts +96 -0
- package/stories/ox-checkbox.stories.ts +61 -14
- package/stories/ox-input-3axis.stories.ts +35 -12
- package/stories/ox-input-3dish.stories.ts +38 -15
- package/stories/ox-input-angle.stories.ts +39 -15
- package/stories/ox-input-barcode.stories.ts +37 -18
- package/stories/ox-input-code.stories.ts +42 -15
- package/stories/ox-input-crontab.stories.ts +43 -14
- package/stories/ox-input-data.stories.ts +38 -14
- package/stories/ox-input-direction.stories.ts +86 -0
- package/stories/ox-input-duration.stories.ts +39 -15
- package/stories/ox-input-file.stories.ts +41 -16
- package/stories/ox-input-hashtags.stories.ts +42 -12
- package/stories/ox-input-i18n-label.stories.ts +55 -31
- package/stories/ox-input-key-values.stories.ts +44 -14
- package/stories/ox-input-mass-fraction.stories.ts +40 -15
- package/stories/ox-input-multiple-colors.stories.ts +34 -151
- package/stories/ox-input-options.stories.ts +37 -13
- package/stories/ox-input-partition-keys.stories.ts +42 -13
- package/stories/ox-input-privilege.stories.ts +45 -20
- package/stories/ox-input-quantifier.stories.ts +38 -10
- package/stories/ox-input-range.stories.ts +34 -5
- package/stories/ox-input-search.stories.ts +37 -12
- package/stories/ox-input-select-buttons.stories.ts +40 -16
- package/stories/ox-input-unit.stories.ts +43 -14
- package/stories/ox-input-value-map.stories.ts +40 -15
- package/stories/ox-input-value-ranges.stories.ts +40 -15
- package/stories/ox-input-work-shift.stories.ts +39 -15
- package/stories/ox-select-set-options.stories.ts +215 -0
- package/stories/ox-select.stories.ts +37 -7
- package/themes/dark-hc.css +151 -0
- package/themes/dark-mc.css +151 -0
- package/themes/dark.css +151 -0
- package/themes/grist-theme.css +169 -0
- package/themes/light-hc.css +151 -0
- package/themes/light-mc.css +151 -0
- package/themes/light.css +151 -0
- package/themes/md-typescale-styles.css +100 -0
- package/themes/spacing.css +43 -0
- package/themes/state-color.css +6 -0
- package/themes/app-theme.css +0 -145
- package/themes/input-theme.css +0 -32
@@ -0,0 +1,86 @@
|
|
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
|
+
theme: { control: 'select', options: ['light', 'dark'] }
|
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?: object | string
|
26
|
+
disabled?: boolean
|
27
|
+
theme?: string
|
28
|
+
}
|
29
|
+
|
30
|
+
const Template: Story<ArgTypes> = ({ name = 'options', value, disabled, theme = 'light' }: 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
|
+
<script>
|
66
|
+
document.body.classList.add('${theme}')
|
67
|
+
</script>
|
68
|
+
|
69
|
+
<div class="container">
|
70
|
+
<ox-input-direction
|
71
|
+
@change=${(e: Event) => {
|
72
|
+
console.log((e.target as HTMLInputElement).value)
|
73
|
+
}}
|
74
|
+
name=${name}
|
75
|
+
.value=${value}
|
76
|
+
?disabled=${disabled}
|
77
|
+
>
|
78
|
+
</ox-input-direction>
|
79
|
+
</div>
|
80
|
+
`
|
81
|
+
|
82
|
+
export const Regular = Template.bind({})
|
83
|
+
Regular.args = {
|
84
|
+
name: 'options',
|
85
|
+
value: ''
|
86
|
+
}
|
@@ -2,6 +2,7 @@ import '../src/ox-input-duration.js'
|
|
2
2
|
import '../src/locale/locale-picker.js'
|
3
3
|
|
4
4
|
import { html, TemplateResult } from 'lit'
|
5
|
+
import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'
|
5
6
|
|
6
7
|
export default {
|
7
8
|
title: 'ox-input-duration',
|
@@ -9,7 +10,8 @@ export default {
|
|
9
10
|
argTypes: {
|
10
11
|
value: { control: 'number' },
|
11
12
|
name: { control: 'text' },
|
12
|
-
disabled: { control: 'boolean' }
|
13
|
+
disabled: { control: 'boolean' },
|
14
|
+
theme: { control: 'select', options: ['light', 'dark'] }
|
13
15
|
}
|
14
16
|
}
|
15
17
|
|
@@ -23,10 +25,15 @@ interface ArgTypes {
|
|
23
25
|
name?: string
|
24
26
|
value?: number
|
25
27
|
disabled?: boolean
|
28
|
+
theme?: string
|
26
29
|
}
|
27
30
|
|
28
|
-
const Template: Story<ArgTypes> = ({ name = 'duration', value = 3601, disabled }: ArgTypes) => html`
|
29
|
-
<link href="/
|
31
|
+
const Template: Story<ArgTypes> = ({ name = 'duration', value = 3601, disabled, theme = 'light' }: ArgTypes) => html`
|
32
|
+
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
33
|
+
|
34
|
+
<link href="/themes/light.css" rel="stylesheet" />
|
35
|
+
<link href="/themes/dark.css" rel="stylesheet" />
|
36
|
+
<link href="/themes/spacing.css" rel="stylesheet" />
|
30
37
|
|
31
38
|
<link
|
32
39
|
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
@@ -40,23 +47,40 @@ const Template: Story<ArgTypes> = ({ name = 'duration', value = 3601, disabled }
|
|
40
47
|
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
41
48
|
rel="stylesheet"
|
42
49
|
/>
|
50
|
+
|
43
51
|
<style>
|
44
|
-
|
52
|
+
${MDTypeScaleStyles.cssText}
|
53
|
+
</style>
|
54
|
+
|
55
|
+
<style>
|
56
|
+
.container {
|
57
|
+
height: 500px;
|
58
|
+
text-align: center;
|
59
|
+
padding: 20px;
|
60
|
+
|
61
|
+
background-color: var(--md-sys-color-primary-container);
|
62
|
+
color: var(--md-sys-color-on-primary-container);
|
45
63
|
}
|
46
64
|
</style>
|
47
65
|
|
48
|
-
<
|
49
|
-
|
66
|
+
<script>
|
67
|
+
document.body.classList.add('${theme}')
|
68
|
+
</script>
|
69
|
+
|
70
|
+
<div class="container md-typescale-body-large-prominent">
|
71
|
+
<locale-picker></locale-picker>
|
72
|
+
<br /><br />
|
50
73
|
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
74
|
+
<ox-input-duration
|
75
|
+
@change=${(e: Event) => {
|
76
|
+
console.log((e.target as HTMLInputElement).value)
|
77
|
+
}}
|
78
|
+
name=${name}
|
79
|
+
.value=${value}
|
80
|
+
?disabled=${disabled}
|
81
|
+
>
|
82
|
+
</ox-input-duration>
|
83
|
+
</div>
|
60
84
|
`
|
61
85
|
|
62
86
|
export const Regular = Template.bind({})
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import '../src/ox-input-file.js'
|
2
2
|
|
3
3
|
import { html, TemplateResult } from 'lit'
|
4
|
+
import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'
|
4
5
|
|
5
6
|
export default {
|
6
7
|
title: 'ox-input-file',
|
@@ -14,7 +15,8 @@ export default {
|
|
14
15
|
description: { control: 'text' },
|
15
16
|
hideFileList: { control: 'boolean' },
|
16
17
|
attachFileList: { control: 'boolean' },
|
17
|
-
disabled: { control: 'boolean' }
|
18
|
+
disabled: { control: 'boolean' },
|
19
|
+
theme: { control: 'select', options: ['light', 'dark'] }
|
18
20
|
}
|
19
21
|
}
|
20
22
|
|
@@ -34,6 +36,7 @@ interface ArgTypes {
|
|
34
36
|
hideFileList?: boolean
|
35
37
|
attachFileList?: boolean
|
36
38
|
disabled?: boolean
|
39
|
+
theme?: string
|
37
40
|
}
|
38
41
|
|
39
42
|
const Template: Story<ArgTypes> = ({
|
@@ -45,9 +48,14 @@ const Template: Story<ArgTypes> = ({
|
|
45
48
|
description,
|
46
49
|
hideFileList = false,
|
47
50
|
attachFileList = false,
|
48
|
-
disabled
|
51
|
+
disabled,
|
52
|
+
theme = 'light'
|
49
53
|
}: ArgTypes) => html`
|
50
|
-
<link href="/
|
54
|
+
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
55
|
+
|
56
|
+
<link href="/themes/light.css" rel="stylesheet" />
|
57
|
+
<link href="/themes/dark.css" rel="stylesheet" />
|
58
|
+
<link href="/themes/spacing.css" rel="stylesheet" />
|
51
59
|
|
52
60
|
<link
|
53
61
|
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
@@ -61,23 +69,40 @@ const Template: Story<ArgTypes> = ({
|
|
61
69
|
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
62
70
|
rel="stylesheet"
|
63
71
|
/>
|
72
|
+
|
64
73
|
<style>
|
65
|
-
|
74
|
+
${MDTypeScaleStyles.cssText}
|
75
|
+
</style>
|
76
|
+
|
77
|
+
<style>
|
78
|
+
.container {
|
79
|
+
height: 500px;
|
80
|
+
text-align: center;
|
81
|
+
padding: 20px;
|
82
|
+
|
83
|
+
background-color: var(--md-sys-color-primary-container);
|
84
|
+
color: var(--md-sys-color-on-primary-container);
|
66
85
|
}
|
67
86
|
</style>
|
68
87
|
|
69
|
-
<
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
88
|
+
<script>
|
89
|
+
document.body.classList.add('${theme}')
|
90
|
+
</script>
|
91
|
+
|
92
|
+
<div class="container md-typescale-body-large-prominent">
|
93
|
+
<ox-input-file
|
94
|
+
label=${label}
|
95
|
+
name=${name}
|
96
|
+
?multiple=${multiple}
|
97
|
+
?hide-filelist=${hideFileList}
|
98
|
+
?attach-filelist=${attachFileList}
|
99
|
+
accept=${accept}
|
100
|
+
icon=${icon}
|
101
|
+
description=${description}
|
102
|
+
?disabled=${disabled}
|
103
|
+
>
|
104
|
+
</ox-input-file>
|
105
|
+
</div>
|
81
106
|
`
|
82
107
|
|
83
108
|
export const Regular = Template.bind({})
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import '../src/ox-input-hashtags.js'
|
2
2
|
|
3
3
|
import { html, TemplateResult } from 'lit'
|
4
|
+
import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'
|
4
5
|
|
5
6
|
export default {
|
6
7
|
title: 'ox-input-hashtags',
|
@@ -9,7 +10,8 @@ export default {
|
|
9
10
|
placeholder: { control: 'text' },
|
10
11
|
name: { control: 'text' },
|
11
12
|
value: { control: 'array' },
|
12
|
-
disabled: { control: 'boolean' }
|
13
|
+
disabled: { control: 'boolean' },
|
14
|
+
theme: { control: 'select', options: ['light', 'dark'] }
|
13
15
|
}
|
14
16
|
}
|
15
17
|
|
@@ -24,10 +26,21 @@ interface ArgTypes {
|
|
24
26
|
name?: string
|
25
27
|
value?: string[]
|
26
28
|
disabled?: boolean
|
29
|
+
theme?: string
|
27
30
|
}
|
28
31
|
|
29
|
-
const Template: Story<ArgTypes> = ({
|
30
|
-
|
32
|
+
const Template: Story<ArgTypes> = ({
|
33
|
+
placeholder = 'hashtag',
|
34
|
+
name = 'hello',
|
35
|
+
value = [],
|
36
|
+
disabled,
|
37
|
+
theme = 'light'
|
38
|
+
}: ArgTypes) => html`
|
39
|
+
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
40
|
+
|
41
|
+
<link href="/themes/light.css" rel="stylesheet" />
|
42
|
+
<link href="/themes/dark.css" rel="stylesheet" />
|
43
|
+
<link href="/themes/spacing.css" rel="stylesheet" />
|
31
44
|
|
32
45
|
<link
|
33
46
|
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
@@ -41,19 +54,36 @@ const Template: Story<ArgTypes> = ({ placeholder = 'hashtag', name = 'hello', va
|
|
41
54
|
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
42
55
|
rel="stylesheet"
|
43
56
|
/>
|
57
|
+
|
44
58
|
<style>
|
45
|
-
|
59
|
+
${MDTypeScaleStyles.cssText}
|
60
|
+
</style>
|
61
|
+
|
62
|
+
<style>
|
63
|
+
.container {
|
64
|
+
height: 500px;
|
65
|
+
text-align: center;
|
66
|
+
padding: 20px;
|
67
|
+
|
68
|
+
background-color: var(--md-sys-color-primary-container);
|
69
|
+
color: var(--md-sys-color-on-primary-container);
|
46
70
|
}
|
47
71
|
</style>
|
48
72
|
|
49
|
-
<
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
73
|
+
<script>
|
74
|
+
document.body.classList.add('${theme}')
|
75
|
+
</script>
|
76
|
+
|
77
|
+
<div class="container md-typescale-body-large-prominent">
|
78
|
+
<ox-input-hashtags
|
79
|
+
@change=${(e: Event) => console.log('changed', (e.target as HTMLInputElement).value)}
|
80
|
+
name=${name}
|
81
|
+
placeholder=${placeholder}
|
82
|
+
.value=${value}
|
83
|
+
?disabled=${disabled}
|
84
|
+
>
|
85
|
+
</ox-input-hashtags>
|
86
|
+
</div>
|
57
87
|
`
|
58
88
|
|
59
89
|
export const Regular = Template.bind({})
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import '../src/ox-input-i18n-label.js'
|
2
2
|
|
3
3
|
import { html, TemplateResult } from 'lit'
|
4
|
+
import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'
|
4
5
|
|
5
6
|
export default {
|
6
7
|
title: 'ox-input-i18n-label',
|
@@ -8,7 +9,8 @@ export default {
|
|
8
9
|
argTypes: {
|
9
10
|
name: { control: 'text' },
|
10
11
|
value: { control: 'object' },
|
11
|
-
disabled: { control: 'boolean' }
|
12
|
+
disabled: { control: 'boolean' },
|
13
|
+
theme: { control: 'select', options: ['light', 'dark'] }
|
12
14
|
}
|
13
15
|
}
|
14
16
|
|
@@ -22,10 +24,15 @@ interface ArgTypes {
|
|
22
24
|
name?: string
|
23
25
|
value?: object
|
24
26
|
disabled?: boolean
|
27
|
+
theme?: string
|
25
28
|
}
|
26
29
|
|
27
|
-
const Template: Story<ArgTypes> = ({ name = 'values', value, disabled }: ArgTypes) => html`
|
28
|
-
<link href="/
|
30
|
+
const Template: Story<ArgTypes> = ({ name = 'values', value, disabled, theme = 'light' }: 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" />
|
29
36
|
|
30
37
|
<link
|
31
38
|
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
@@ -39,38 +46,55 @@ const Template: Story<ArgTypes> = ({ name = 'values', value, disabled }: ArgType
|
|
39
46
|
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
40
47
|
rel="stylesheet"
|
41
48
|
/>
|
49
|
+
|
42
50
|
<style>
|
43
|
-
|
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);
|
44
62
|
}
|
45
63
|
</style>
|
46
64
|
|
47
|
-
<
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
}
|
58
|
-
{
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
65
|
+
<script>
|
66
|
+
document.body.classList.add('${theme}')
|
67
|
+
</script>
|
68
|
+
|
69
|
+
<div class="container md-typescale-body-large-prominent">
|
70
|
+
<ox-input-i18n-label
|
71
|
+
@change=${(e: Event) => {
|
72
|
+
console.log((e.target as HTMLInputElement).value)
|
73
|
+
}}
|
74
|
+
name=${name}
|
75
|
+
.value=${value}
|
76
|
+
.languages=${[
|
77
|
+
{
|
78
|
+
code: 'ko',
|
79
|
+
display: '한글'
|
80
|
+
},
|
81
|
+
{
|
82
|
+
code: 'en',
|
83
|
+
display: 'English'
|
84
|
+
},
|
85
|
+
{
|
86
|
+
code: 'zh',
|
87
|
+
display: 'Chinese'
|
88
|
+
},
|
89
|
+
{
|
90
|
+
code: 'ja',
|
91
|
+
display: 'Japanese'
|
92
|
+
}
|
93
|
+
]}
|
94
|
+
?disabled=${disabled}
|
95
|
+
>
|
96
|
+
</ox-input-i18n-label>
|
97
|
+
</div>
|
74
98
|
`
|
75
99
|
|
76
100
|
export const Regular = Template.bind({})
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import '../src/ox-input-key-values.js'
|
2
2
|
|
3
3
|
import { html, TemplateResult } from 'lit'
|
4
|
+
import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'
|
4
5
|
|
5
6
|
export default {
|
6
7
|
title: 'ox-input-key-values',
|
@@ -9,7 +10,8 @@ export default {
|
|
9
10
|
name: { control: 'text' },
|
10
11
|
value: { control: 'object' },
|
11
12
|
options: { control: 'object' },
|
12
|
-
disabled: { control: 'boolean' }
|
13
|
+
disabled: { control: 'boolean' },
|
14
|
+
theme: { control: 'select', options: ['light', 'dark'] }
|
13
15
|
}
|
14
16
|
}
|
15
17
|
|
@@ -24,10 +26,21 @@ interface ArgTypes {
|
|
24
26
|
value?: object
|
25
27
|
options?: object
|
26
28
|
disabled?: boolean
|
29
|
+
theme?: string
|
27
30
|
}
|
28
31
|
|
29
|
-
const Template: Story<ArgTypes> = ({
|
30
|
-
|
32
|
+
const Template: Story<ArgTypes> = ({
|
33
|
+
name = 'key-values',
|
34
|
+
value = {},
|
35
|
+
options = [],
|
36
|
+
disabled,
|
37
|
+
theme = 'light'
|
38
|
+
}: ArgTypes) => html`
|
39
|
+
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
40
|
+
|
41
|
+
<link href="/themes/light.css" rel="stylesheet" />
|
42
|
+
<link href="/themes/dark.css" rel="stylesheet" />
|
43
|
+
<link href="/themes/spacing.css" rel="stylesheet" />
|
31
44
|
|
32
45
|
<link
|
33
46
|
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
@@ -41,21 +54,38 @@ const Template: Story<ArgTypes> = ({ name = 'key-values', value = {}, options =
|
|
41
54
|
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
42
55
|
rel="stylesheet"
|
43
56
|
/>
|
57
|
+
|
44
58
|
<style>
|
45
|
-
|
59
|
+
${MDTypeScaleStyles.cssText}
|
60
|
+
</style>
|
61
|
+
|
62
|
+
<style>
|
63
|
+
.container {
|
64
|
+
height: 500px;
|
65
|
+
text-align: center;
|
66
|
+
padding: 20px;
|
67
|
+
|
68
|
+
background-color: var(--md-sys-color-primary-container);
|
69
|
+
color: var(--md-sys-color-on-primary-container);
|
46
70
|
}
|
47
71
|
</style>
|
48
72
|
|
49
|
-
<
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
73
|
+
<script>
|
74
|
+
document.body.classList.add('${theme}')
|
75
|
+
</script>
|
76
|
+
|
77
|
+
<div class="container md-typescale-body-large-prominent">
|
78
|
+
<ox-input-key-values
|
79
|
+
@change=${(e: Event) => {
|
80
|
+
console.log((e.target as HTMLInputElement).value)
|
81
|
+
}}
|
82
|
+
name=${name}
|
83
|
+
.value=${value}
|
84
|
+
.options=${options}
|
85
|
+
?disabled=${disabled}
|
86
|
+
>
|
87
|
+
</ox-input-key-values>
|
88
|
+
</div>
|
59
89
|
`
|
60
90
|
|
61
91
|
export const Regular = Template.bind({})
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import '../src/ox-input-mass-fraction.js'
|
2
2
|
|
3
3
|
import { html, TemplateResult } from 'lit'
|
4
|
+
import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'
|
4
5
|
|
5
6
|
export default {
|
6
7
|
title: 'ox-input-mass-fraction',
|
@@ -10,7 +11,8 @@ export default {
|
|
10
11
|
value: { control: 'object' },
|
11
12
|
defaultValue: { control: 'object' },
|
12
13
|
composable: { control: 'boolean' },
|
13
|
-
disabled: { control: 'boolean' }
|
14
|
+
disabled: { control: 'boolean' },
|
15
|
+
theme: { control: 'select', options: ['light', 'dark'] }
|
14
16
|
}
|
15
17
|
}
|
16
18
|
|
@@ -26,6 +28,7 @@ interface ArgTypes {
|
|
26
28
|
defaultValue?: object
|
27
29
|
composable?: boolean
|
28
30
|
disabled?: boolean
|
31
|
+
theme?: string
|
29
32
|
}
|
30
33
|
|
31
34
|
const Template: Story<ArgTypes> = ({
|
@@ -33,9 +36,14 @@ const Template: Story<ArgTypes> = ({
|
|
33
36
|
value = {},
|
34
37
|
defaultValue = {},
|
35
38
|
composable = true,
|
36
|
-
disabled
|
39
|
+
disabled,
|
40
|
+
theme = 'light'
|
37
41
|
}: ArgTypes) => html`
|
38
|
-
<link href="/
|
42
|
+
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
43
|
+
|
44
|
+
<link href="/themes/light.css" rel="stylesheet" />
|
45
|
+
<link href="/themes/dark.css" rel="stylesheet" />
|
46
|
+
<link href="/themes/spacing.css" rel="stylesheet" />
|
39
47
|
|
40
48
|
<link
|
41
49
|
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
@@ -49,22 +57,39 @@ const Template: Story<ArgTypes> = ({
|
|
49
57
|
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
50
58
|
rel="stylesheet"
|
51
59
|
/>
|
60
|
+
|
52
61
|
<style>
|
53
|
-
|
62
|
+
${MDTypeScaleStyles.cssText}
|
63
|
+
</style>
|
64
|
+
|
65
|
+
<style>
|
66
|
+
.container {
|
67
|
+
height: 500px;
|
68
|
+
text-align: center;
|
69
|
+
padding: 20px;
|
70
|
+
|
71
|
+
background-color: var(--md-sys-color-primary-container);
|
72
|
+
color: var(--md-sys-color-on-primary-container);
|
54
73
|
}
|
55
74
|
</style>
|
56
75
|
|
57
|
-
<
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
76
|
+
<script>
|
77
|
+
document.body.classList.add('${theme}')
|
78
|
+
</script>
|
79
|
+
|
80
|
+
<div class="container md-typescale-body-large-prominent">
|
81
|
+
<ox-input-mass-fraction
|
82
|
+
@change=${(e: Event) => {
|
83
|
+
console.log((e.target as HTMLInputElement).value)
|
84
|
+
}}
|
85
|
+
name=${name}
|
86
|
+
.value=${value}
|
87
|
+
.defaultValue=${defaultValue}
|
88
|
+
?composable=${composable}
|
89
|
+
?disabled=${disabled}
|
90
|
+
>
|
91
|
+
</ox-input-mass-fraction>
|
92
|
+
</div>
|
68
93
|
`
|
69
94
|
|
70
95
|
export const Regular = Template.bind({})
|