@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
@@ -1,6 +1,7 @@
|
|
1
1
|
import '../src/ox-input-search.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-search',
|
@@ -10,7 +11,8 @@ export default {
|
|
10
11
|
name: { control: 'text' },
|
11
12
|
value: { control: 'text' },
|
12
13
|
selectAfterChange: { 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
|
value?: string
|
27
29
|
selectAfterChange?: 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
|
name = 'hello',
|
34
37
|
value = '',
|
35
38
|
selectAfterChange,
|
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,19 +57,36 @@ 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
|
-
|
76
|
+
<script>
|
77
|
+
document.body.classList.add('${theme}')
|
78
|
+
</script>
|
79
|
+
|
80
|
+
<div class="container md-typescale-body-large-prominent">
|
81
|
+
<ox-input-search
|
82
|
+
@change=${(e: Event) => console.log('changed', (e.target as HTMLInputElement).value)}
|
83
|
+
?select-after-change=${selectAfterChange}
|
84
|
+
name=${name}
|
85
|
+
.checked=${value}
|
86
|
+
?disabled=${disabled}
|
87
|
+
>
|
88
|
+
</ox-input-search>
|
89
|
+
</div>
|
65
90
|
`
|
66
91
|
|
67
92
|
export const Regular = Template.bind({})
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import '../src/ox-input-select-buttons.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-select-buttons',
|
@@ -10,7 +11,8 @@ export default {
|
|
10
11
|
options: { control: 'object' },
|
11
12
|
multiple: { control: 'boolean' },
|
12
13
|
name: { control: 'text' },
|
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
|
options: object
|
27
29
|
multiple?: 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
|
multiple = false,
|
35
38
|
options = [],
|
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,23 +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
|
-
|
54
|
-
|
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);
|
55
73
|
}
|
56
74
|
</style>
|
57
75
|
|
58
|
-
<
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
76
|
+
<script>
|
77
|
+
document.body.classList.add('${theme}')
|
78
|
+
</script>
|
79
|
+
|
80
|
+
<div class="container">
|
81
|
+
<ox-input-select-buttons
|
82
|
+
@change=${(e: Event) => {
|
83
|
+
console.log((e.target as HTMLInputElement).value)
|
84
|
+
}}
|
85
|
+
name=${name}
|
86
|
+
.value=${value}
|
87
|
+
.options=${options}
|
88
|
+
?multiple=${multiple}
|
89
|
+
?disabled=${disabled}
|
90
|
+
>
|
91
|
+
</ox-input-select-buttons>
|
92
|
+
</div>
|
69
93
|
`
|
70
94
|
|
71
95
|
export const Regular = Template.bind({})
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import '../src/ox-input-unit-number.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-unit-number',
|
@@ -41,7 +42,8 @@ export default {
|
|
41
42
|
'K'
|
42
43
|
]
|
43
44
|
},
|
44
|
-
disabled: { control: 'boolean' }
|
45
|
+
disabled: { control: 'boolean' },
|
46
|
+
theme: { control: 'select', options: ['light', 'dark'] }
|
45
47
|
}
|
46
48
|
}
|
47
49
|
|
@@ -58,6 +60,7 @@ interface ArgTypes {
|
|
58
60
|
stdUnit: string
|
59
61
|
userUnit: string
|
60
62
|
disabled?: boolean
|
63
|
+
theme?: string
|
61
64
|
}
|
62
65
|
|
63
66
|
const Template: Story<ArgTypes> = ({
|
@@ -66,8 +69,15 @@ const Template: Story<ArgTypes> = ({
|
|
66
69
|
value = 0,
|
67
70
|
stdUnit = 'kg',
|
68
71
|
userUnit,
|
69
|
-
disabled
|
72
|
+
disabled,
|
73
|
+
theme = 'light'
|
70
74
|
}: ArgTypes) => html`
|
75
|
+
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
76
|
+
|
77
|
+
<link href="/themes/light.css" rel="stylesheet" />
|
78
|
+
<link href="/themes/dark.css" rel="stylesheet" />
|
79
|
+
<link href="/themes/spacing.css" rel="stylesheet" />
|
80
|
+
|
71
81
|
<link
|
72
82
|
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
73
83
|
rel="stylesheet"
|
@@ -81,18 +91,37 @@ const Template: Story<ArgTypes> = ({
|
|
81
91
|
rel="stylesheet"
|
82
92
|
/>
|
83
93
|
|
84
|
-
<
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
.
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
94
|
+
<style>
|
95
|
+
${MDTypeScaleStyles.cssText}
|
96
|
+
</style>
|
97
|
+
|
98
|
+
<style>
|
99
|
+
.container {
|
100
|
+
height: 500px;
|
101
|
+
text-align: center;
|
102
|
+
padding: 20px;
|
103
|
+
|
104
|
+
background-color: var(--md-sys-color-primary-container);
|
105
|
+
color: var(--md-sys-color-on-primary-container);
|
106
|
+
}
|
107
|
+
</style>
|
108
|
+
|
109
|
+
<script>
|
110
|
+
document.body.classList.add('${theme}')
|
111
|
+
</script>
|
112
|
+
|
113
|
+
<div class="container md-typescale-body-large-prominent">
|
114
|
+
<ox-input-unit-number
|
115
|
+
name=${name}
|
116
|
+
placeholder=${placeholder}
|
117
|
+
.value=${value}
|
118
|
+
std-unit=${stdUnit}
|
119
|
+
user-unit=${userUnit}
|
120
|
+
@change=${(e: CustomEvent) => console.log(e.detail)}
|
121
|
+
?disabled=${disabled}
|
122
|
+
>
|
123
|
+
</ox-input-unit-number>
|
124
|
+
</div>
|
96
125
|
`
|
97
126
|
|
98
127
|
export const Weight = Template.bind({})
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import '../src/ox-input-value-map.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-value-map',
|
@@ -10,7 +11,8 @@ export default {
|
|
10
11
|
value: { control: 'object' },
|
11
12
|
keytype: { control: 'select', options: ['string', 'number'] },
|
12
13
|
valuetype: { control: 'select', options: ['string', 'boolean', 'number', 'color', 'date'] },
|
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
|
valuetype?: string
|
27
29
|
keytype?: string
|
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
|
keytype = 'string',
|
35
38
|
valuetype = 'string',
|
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-value-map
|
82
|
+
@change=${(e: Event) => {
|
83
|
+
console.log((e.target as HTMLInputElement).value)
|
84
|
+
}}
|
85
|
+
name=${name}
|
86
|
+
.value=${value}
|
87
|
+
keytype=${keytype}
|
88
|
+
valuetype=${valuetype}
|
89
|
+
?disabled=${disabled}
|
90
|
+
>
|
91
|
+
</ox-input-value-map>
|
92
|
+
</div>
|
68
93
|
`
|
69
94
|
|
70
95
|
export const Regular = Template.bind({})
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import '../src/ox-input-value-ranges.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-value-ranges',
|
@@ -10,7 +11,8 @@ export default {
|
|
10
11
|
value: { control: 'object' },
|
11
12
|
keytype: { control: 'select', options: ['string', 'number'] },
|
12
13
|
valuetype: { control: 'select', options: ['string', 'boolean', 'number', 'color', 'date'] },
|
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
|
valuetype?: string
|
27
29
|
keytype?: string
|
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
|
keytype = 'string',
|
35
38
|
valuetype = 'string',
|
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-value-ranges
|
82
|
+
@change=${(e: Event) => {
|
83
|
+
console.log((e.target as HTMLInputElement).value)
|
84
|
+
}}
|
85
|
+
name=${name}
|
86
|
+
.value=${value}
|
87
|
+
keytype=${keytype}
|
88
|
+
valuetype=${valuetype}
|
89
|
+
?disabled=${disabled}
|
90
|
+
>
|
91
|
+
</ox-input-value-ranges>
|
92
|
+
</div>
|
68
93
|
`
|
69
94
|
|
70
95
|
export const Regular = Template.bind({})
|
@@ -2,6 +2,7 @@ import '../src/ox-input-work-shift.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-work-shift',
|
@@ -9,7 +10,8 @@ export default {
|
|
9
10
|
argTypes: {
|
10
11
|
value: { control: 'object' },
|
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?: object
|
25
27
|
disabled?: boolean
|
28
|
+
theme?: string
|
26
29
|
}
|
27
30
|
|
28
|
-
const Template: Story<ArgTypes> = ({ name = 'work-shift', value = [], disabled }: ArgTypes) => html`
|
29
|
-
<link href="/
|
31
|
+
const Template: Story<ArgTypes> = ({ name = 'work-shift', value = [], 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 = 'work-shift', value = [], 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-work-shift
|
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-work-shift>
|
83
|
+
</div>
|
60
84
|
`
|
61
85
|
|
62
86
|
export const Regular = Template.bind({})
|