@operato/input 7.1.30 → 7.1.32
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 +10 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- 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/demo/index-3dish.html +0 -38
- package/demo/index-angle.html +0 -36
- package/demo/index-barcode.html +0 -68
- package/demo/index-button-radio.html +0 -42
- package/demo/index-checkbox.html +0 -69
- package/demo/index-code.html +0 -61
- package/demo/index-color-gradient.html +0 -35
- package/demo/index-color-stops.html +0 -62
- package/demo/index-color.html +0 -35
- package/demo/index-crontab.html +0 -37
- package/demo/index-file.html +0 -41
- package/demo/index-image.html +0 -40
- package/demo/index-multiple-colors.html +0 -52
- package/demo/index-options.html +0 -43
- package/demo/index-partition-keys.html +0 -79
- package/demo/index-range.html +0 -40
- package/demo/index-select.html +0 -136
- package/demo/index-stack.html +0 -33
- package/demo/index-table.html +0 -50
- package/demo/index-value-map.html +0 -80
- package/demo/index-value-ranges.html +0 -80
- package/demo/index-work-shift.html +0 -59
- package/demo/index.html +0 -54
- package/src/index.ts +0 -34
- 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 -65
- 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 -180
- package/src/ox-input-stack.ts +0 -136
- 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.ts +0 -219
- package/src/ox-zoomable-image.ts +0 -75
- 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 -80
- 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-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-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
- package/yarn-error.log +0 -17084
@@ -1,109 +0,0 @@
|
|
1
|
-
import '../src/ox-input-table-column-config.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-table-column-config',
|
8
|
-
component: 'ox-input-table-column-config',
|
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 = 'table-column-config', 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-table-column-config
|
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-table-column-config>
|
73
|
-
</div>
|
74
|
-
`
|
75
|
-
|
76
|
-
export const Regular = Template.bind({})
|
77
|
-
Regular.args = {
|
78
|
-
name: 'table-column-config',
|
79
|
-
value: [
|
80
|
-
{
|
81
|
-
name: 'section',
|
82
|
-
label: 'Section',
|
83
|
-
visible: true,
|
84
|
-
width: 100,
|
85
|
-
order: 1
|
86
|
-
},
|
87
|
-
{
|
88
|
-
name: 'title',
|
89
|
-
label: 'Title',
|
90
|
-
visible: true,
|
91
|
-
width: 110,
|
92
|
-
order: 2
|
93
|
-
},
|
94
|
-
{
|
95
|
-
name: 'startDate',
|
96
|
-
label: 'Start Date',
|
97
|
-
visible: true,
|
98
|
-
width: 150,
|
99
|
-
order: 3
|
100
|
-
},
|
101
|
-
{
|
102
|
-
name: 'endDate',
|
103
|
-
label: 'End Date',
|
104
|
-
visible: true,
|
105
|
-
width: 200,
|
106
|
-
order: 4
|
107
|
-
}
|
108
|
-
]
|
109
|
-
}
|
@@ -1,151 +0,0 @@
|
|
1
|
-
import '../src/ox-input-unit-number.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-unit-number',
|
8
|
-
component: 'ox-input-unit-number',
|
9
|
-
argTypes: {
|
10
|
-
placeholder: { control: 'text' },
|
11
|
-
name: { control: 'text' },
|
12
|
-
value: { control: 'number' },
|
13
|
-
stdUnit: {
|
14
|
-
control: 'select',
|
15
|
-
options: [
|
16
|
-
'kg',
|
17
|
-
'rad',
|
18
|
-
'm',
|
19
|
-
'g/mol',
|
20
|
-
'm2',
|
21
|
-
'm3',
|
22
|
-
'kg/m3',
|
23
|
-
'm/sec',
|
24
|
-
'N',
|
25
|
-
'Pa',
|
26
|
-
'kg/sec',
|
27
|
-
'kg/m2/sec',
|
28
|
-
'mol/sec',
|
29
|
-
'mol/m2/sec',
|
30
|
-
'Sm3/sec',
|
31
|
-
'Nm3/sec',
|
32
|
-
'J',
|
33
|
-
'W',
|
34
|
-
'W/m2',
|
35
|
-
'J/kg',
|
36
|
-
'J/kg/K',
|
37
|
-
'W/m/K',
|
38
|
-
'W/m2/K',
|
39
|
-
'N sec/m2',
|
40
|
-
'm2 oC/W',
|
41
|
-
'%',
|
42
|
-
'K'
|
43
|
-
]
|
44
|
-
},
|
45
|
-
disabled: { control: 'boolean' }
|
46
|
-
}
|
47
|
-
}
|
48
|
-
|
49
|
-
interface Story<T> {
|
50
|
-
(args: T): TemplateResult
|
51
|
-
args?: Partial<T>
|
52
|
-
argTypes?: Record<string, unknown>
|
53
|
-
}
|
54
|
-
|
55
|
-
interface ArgTypes {
|
56
|
-
placeholder?: string
|
57
|
-
name?: string
|
58
|
-
value?: number
|
59
|
-
stdUnit: string
|
60
|
-
userUnit: string
|
61
|
-
disabled?: boolean
|
62
|
-
}
|
63
|
-
|
64
|
-
const Template: Story<ArgTypes> = ({
|
65
|
-
placeholder = 'unit',
|
66
|
-
name = 'hello',
|
67
|
-
value = 0,
|
68
|
-
stdUnit = 'kg',
|
69
|
-
userUnit,
|
70
|
-
disabled
|
71
|
-
}: ArgTypes) => html`
|
72
|
-
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
73
|
-
|
74
|
-
<link href="/themes/light.css" rel="stylesheet" />
|
75
|
-
<link href="/themes/dark.css" rel="stylesheet" />
|
76
|
-
<link href="/themes/spacing.css" rel="stylesheet" />
|
77
|
-
|
78
|
-
<link
|
79
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
80
|
-
rel="stylesheet"
|
81
|
-
/>
|
82
|
-
<link
|
83
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
84
|
-
rel="stylesheet"
|
85
|
-
/>
|
86
|
-
<link
|
87
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
88
|
-
rel="stylesheet"
|
89
|
-
/>
|
90
|
-
|
91
|
-
<style>
|
92
|
-
${MDTypeScaleStyles.cssText}
|
93
|
-
</style>
|
94
|
-
|
95
|
-
<style>
|
96
|
-
.container {
|
97
|
-
height: 500px;
|
98
|
-
text-align: center;
|
99
|
-
padding: 20px;
|
100
|
-
|
101
|
-
background-color: var(--md-sys-color-primary-container);
|
102
|
-
color: var(--md-sys-color-on-primary-container);
|
103
|
-
}
|
104
|
-
</style>
|
105
|
-
|
106
|
-
<div class="container md-typescale-body-large-prominent">
|
107
|
-
<ox-input-unit-number
|
108
|
-
name=${name}
|
109
|
-
placeholder=${placeholder}
|
110
|
-
.value=${value}
|
111
|
-
std-unit=${stdUnit}
|
112
|
-
user-unit=${userUnit}
|
113
|
-
@change=${(e: CustomEvent) => console.log(e.detail)}
|
114
|
-
?disabled=${disabled}
|
115
|
-
>
|
116
|
-
</ox-input-unit-number>
|
117
|
-
</div>
|
118
|
-
`
|
119
|
-
|
120
|
-
export const Weight = Template.bind({})
|
121
|
-
Weight.args = {
|
122
|
-
placeholder: 'weight',
|
123
|
-
name: 'weight',
|
124
|
-
value: 0,
|
125
|
-
stdUnit: 'kg'
|
126
|
-
}
|
127
|
-
|
128
|
-
export const Angle = Template.bind({})
|
129
|
-
Angle.args = {
|
130
|
-
placeholder: 'angle',
|
131
|
-
name: 'angle',
|
132
|
-
value: 0,
|
133
|
-
stdUnit: 'rad'
|
134
|
-
}
|
135
|
-
|
136
|
-
export const Temperature = Template.bind({})
|
137
|
-
Temperature.args = {
|
138
|
-
placeholder: 'temperature',
|
139
|
-
name: 'temperature',
|
140
|
-
value: 0,
|
141
|
-
stdUnit: 'K',
|
142
|
-
userUnit: '°C'
|
143
|
-
}
|
144
|
-
|
145
|
-
export const Percentage = Template.bind({})
|
146
|
-
Percentage.args = {
|
147
|
-
placeholder: 'percentage',
|
148
|
-
name: 'percentage',
|
149
|
-
value: 0,
|
150
|
-
stdUnit: '%'
|
151
|
-
}
|
@@ -1,92 +0,0 @@
|
|
1
|
-
import '../src/ox-input-value-map.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-value-map',
|
8
|
-
component: 'ox-input-value-map',
|
9
|
-
argTypes: {
|
10
|
-
name: { control: 'text' },
|
11
|
-
value: { control: 'object' },
|
12
|
-
keytype: { control: 'select', options: ['string', 'number'] },
|
13
|
-
valuetype: { control: 'select', options: ['string', 'boolean', 'number', 'color', 'date'] },
|
14
|
-
disabled: { control: 'boolean' }
|
15
|
-
}
|
16
|
-
}
|
17
|
-
|
18
|
-
interface Story<T> {
|
19
|
-
(args: T): TemplateResult
|
20
|
-
args?: Partial<T>
|
21
|
-
argTypes?: Record<string, unknown>
|
22
|
-
}
|
23
|
-
|
24
|
-
interface ArgTypes {
|
25
|
-
name?: string
|
26
|
-
value?: object
|
27
|
-
valuetype?: string
|
28
|
-
keytype?: string
|
29
|
-
disabled?: boolean
|
30
|
-
}
|
31
|
-
|
32
|
-
const Template: Story<ArgTypes> = ({
|
33
|
-
name = 'values',
|
34
|
-
value = {},
|
35
|
-
keytype = 'string',
|
36
|
-
valuetype = 'string',
|
37
|
-
disabled
|
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" />
|
44
|
-
|
45
|
-
<link
|
46
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
47
|
-
rel="stylesheet"
|
48
|
-
/>
|
49
|
-
<link
|
50
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
51
|
-
rel="stylesheet"
|
52
|
-
/>
|
53
|
-
<link
|
54
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
55
|
-
rel="stylesheet"
|
56
|
-
/>
|
57
|
-
|
58
|
-
<style>
|
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);
|
70
|
-
}
|
71
|
-
</style>
|
72
|
-
|
73
|
-
<div class="container md-typescale-body-large-prominent">
|
74
|
-
<ox-input-value-map
|
75
|
-
@change=${(e: Event) => {
|
76
|
-
console.log((e.target as HTMLInputElement).value)
|
77
|
-
}}
|
78
|
-
name=${name}
|
79
|
-
.value=${value}
|
80
|
-
keytype=${keytype}
|
81
|
-
valuetype=${valuetype}
|
82
|
-
?disabled=${disabled}
|
83
|
-
>
|
84
|
-
</ox-input-value-map>
|
85
|
-
</div>
|
86
|
-
`
|
87
|
-
|
88
|
-
export const Regular = Template.bind({})
|
89
|
-
Regular.args = {
|
90
|
-
name: 'values',
|
91
|
-
value: {}
|
92
|
-
}
|
@@ -1,92 +0,0 @@
|
|
1
|
-
import '../src/ox-input-value-ranges.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-value-ranges',
|
8
|
-
component: 'ox-input-value-ranges',
|
9
|
-
argTypes: {
|
10
|
-
name: { control: 'text' },
|
11
|
-
value: { control: 'object' },
|
12
|
-
keytype: { control: 'select', options: ['string', 'number'] },
|
13
|
-
valuetype: { control: 'select', options: ['string', 'boolean', 'number', 'color', 'date'] },
|
14
|
-
disabled: { control: 'boolean' }
|
15
|
-
}
|
16
|
-
}
|
17
|
-
|
18
|
-
interface Story<T> {
|
19
|
-
(args: T): TemplateResult
|
20
|
-
args?: Partial<T>
|
21
|
-
argTypes?: Record<string, unknown>
|
22
|
-
}
|
23
|
-
|
24
|
-
interface ArgTypes {
|
25
|
-
name?: string
|
26
|
-
value?: object
|
27
|
-
valuetype?: string
|
28
|
-
keytype?: string
|
29
|
-
disabled?: boolean
|
30
|
-
}
|
31
|
-
|
32
|
-
const Template: Story<ArgTypes> = ({
|
33
|
-
name = 'values',
|
34
|
-
value = {},
|
35
|
-
keytype = 'string',
|
36
|
-
valuetype = 'string',
|
37
|
-
disabled
|
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" />
|
44
|
-
|
45
|
-
<link
|
46
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
47
|
-
rel="stylesheet"
|
48
|
-
/>
|
49
|
-
<link
|
50
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
51
|
-
rel="stylesheet"
|
52
|
-
/>
|
53
|
-
<link
|
54
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
55
|
-
rel="stylesheet"
|
56
|
-
/>
|
57
|
-
|
58
|
-
<style>
|
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);
|
70
|
-
}
|
71
|
-
</style>
|
72
|
-
|
73
|
-
<div class="container md-typescale-body-large-prominent">
|
74
|
-
<ox-input-value-ranges
|
75
|
-
@change=${(e: Event) => {
|
76
|
-
console.log((e.target as HTMLInputElement).value)
|
77
|
-
}}
|
78
|
-
name=${name}
|
79
|
-
.value=${value}
|
80
|
-
keytype=${keytype}
|
81
|
-
valuetype=${valuetype}
|
82
|
-
?disabled=${disabled}
|
83
|
-
>
|
84
|
-
</ox-input-value-ranges>
|
85
|
-
</div>
|
86
|
-
`
|
87
|
-
|
88
|
-
export const Regular = Template.bind({})
|
89
|
-
Regular.args = {
|
90
|
-
name: 'values',
|
91
|
-
value: {}
|
92
|
-
}
|
@@ -1,106 +0,0 @@
|
|
1
|
-
import '../src/ox-input-work-shift.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-work-shift',
|
9
|
-
component: 'ox-input-work-shift',
|
10
|
-
argTypes: {
|
11
|
-
value: { control: 'object' },
|
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?: object
|
26
|
-
disabled?: boolean
|
27
|
-
}
|
28
|
-
|
29
|
-
const Template: Story<ArgTypes> = ({ name = 'work-shift', value = [], 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-work-shift
|
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-work-shift>
|
77
|
-
</div>
|
78
|
-
`
|
79
|
-
|
80
|
-
export const Regular = Template.bind({})
|
81
|
-
Regular.args = {
|
82
|
-
name: 'work-shift',
|
83
|
-
value: [
|
84
|
-
{
|
85
|
-
name: 'DAY',
|
86
|
-
fromDate: -1,
|
87
|
-
fromTime: '22:00',
|
88
|
-
toDate: 0,
|
89
|
-
toTime: '06:00'
|
90
|
-
},
|
91
|
-
{
|
92
|
-
name: 'SWING',
|
93
|
-
fromDate: 0,
|
94
|
-
fromTime: '06:00',
|
95
|
-
toDate: 0,
|
96
|
-
toTime: '14:00'
|
97
|
-
},
|
98
|
-
{
|
99
|
-
name: 'NIGHT',
|
100
|
-
fromDate: 0,
|
101
|
-
fromTime: '14:00',
|
102
|
-
toDate: 0,
|
103
|
-
toTime: '22:00'
|
104
|
-
}
|
105
|
-
]
|
106
|
-
}
|