@operato/input 8.0.0-beta.0 → 8.0.0-beta.2
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 +18 -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/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 -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,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
|
-
}
|
@@ -1,197 +0,0 @@
|
|
1
|
-
import '../src/ox-select-floor.js'
|
2
|
-
|
3
|
-
import { html, TemplateResult } from 'lit'
|
4
|
-
import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'
|
5
|
-
import { IMAGE } from './image-for-select-floor.js'
|
6
|
-
|
7
|
-
export default {
|
8
|
-
title: 'ox-select-floor',
|
9
|
-
component: 'ox-select-floor',
|
10
|
-
argTypes: {
|
11
|
-
disabled: { control: 'boolean' },
|
12
|
-
value: { control: 'text' },
|
13
|
-
bottomLimit: { control: 'number' },
|
14
|
-
perspective: { control: 'number' },
|
15
|
-
rotateX: { control: 'number' },
|
16
|
-
rotateXForActive: { control: 'number' },
|
17
|
-
interval: { control: 'number' }
|
18
|
-
}
|
19
|
-
}
|
20
|
-
|
21
|
-
interface Story<T> {
|
22
|
-
(args: T): TemplateResult
|
23
|
-
args?: Partial<T>
|
24
|
-
argTypes?: Record<string, unknown>
|
25
|
-
}
|
26
|
-
|
27
|
-
interface ArgTypes {
|
28
|
-
value?: string
|
29
|
-
bottomLimit?: number
|
30
|
-
perspective?: number
|
31
|
-
rotateX?: number
|
32
|
-
rotateXForActive?: number
|
33
|
-
disabled?: boolean
|
34
|
-
interval?: number
|
35
|
-
}
|
36
|
-
|
37
|
-
const cards = new Array(10).fill({}).map((_, index) => {
|
38
|
-
return {
|
39
|
-
image: IMAGE,
|
40
|
-
name: index + 1 + '층'
|
41
|
-
}
|
42
|
-
})
|
43
|
-
|
44
|
-
const Template: Story<ArgTypes> = ({
|
45
|
-
value,
|
46
|
-
disabled,
|
47
|
-
bottomLimit = 70,
|
48
|
-
perspective = 1200,
|
49
|
-
rotateX = 60,
|
50
|
-
rotateXForActive = 40,
|
51
|
-
interval = 0
|
52
|
-
}: ArgTypes) => html`
|
53
|
-
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
54
|
-
|
55
|
-
<link href="/themes/light.css" rel="stylesheet" />
|
56
|
-
<link href="/themes/dark.css" rel="stylesheet" />
|
57
|
-
<link href="/themes/spacing.css" rel="stylesheet" />
|
58
|
-
|
59
|
-
<link
|
60
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
61
|
-
rel="stylesheet"
|
62
|
-
/>
|
63
|
-
<link
|
64
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
65
|
-
rel="stylesheet"
|
66
|
-
/>
|
67
|
-
<link
|
68
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
69
|
-
rel="stylesheet"
|
70
|
-
/>
|
71
|
-
|
72
|
-
<style>
|
73
|
-
${MDTypeScaleStyles.cssText}
|
74
|
-
</style>
|
75
|
-
|
76
|
-
<style>
|
77
|
-
html,
|
78
|
-
body {
|
79
|
-
margin: 0;
|
80
|
-
padding: 0;
|
81
|
-
overflow: hidden;
|
82
|
-
|
83
|
-
overscroll-behavior-y: none;
|
84
|
-
|
85
|
-
/* This is a font-stack that tries to use the system-default sans-serifs first */
|
86
|
-
font-family: Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
|
87
|
-
line-height: 1.5;
|
88
|
-
-webkit-font-smoothing: antialiased;
|
89
|
-
|
90
|
-
accent-color: var(--md-sys-color-primary);
|
91
|
-
background-color: var(--md-sys-color-background);
|
92
|
-
}
|
93
|
-
|
94
|
-
.container {
|
95
|
-
height: 1000px;
|
96
|
-
text-align: center;
|
97
|
-
padding: 20px;
|
98
|
-
|
99
|
-
background-color: var(--md-sys-color-primary-container);
|
100
|
-
color: var(--md-sys-color-on-primary-container);
|
101
|
-
}
|
102
|
-
|
103
|
-
div[status] {
|
104
|
-
display: flex;
|
105
|
-
position: absolute;
|
106
|
-
right: 0px;
|
107
|
-
bottom: 0px;
|
108
|
-
align-items: center;
|
109
|
-
right: 3%;
|
110
|
-
}
|
111
|
-
|
112
|
-
div[status] > div[content] {
|
113
|
-
display: flex;
|
114
|
-
background-color: #4e5055;
|
115
|
-
color: #fff;
|
116
|
-
padding: 5px 7px;
|
117
|
-
border-radius: 7px;
|
118
|
-
gap: 10px;
|
119
|
-
font-size: 14px;
|
120
|
-
}
|
121
|
-
|
122
|
-
div[status] span {
|
123
|
-
display: flex;
|
124
|
-
align-items: center;
|
125
|
-
width: 48px;
|
126
|
-
}
|
127
|
-
|
128
|
-
div[status] md-icon {
|
129
|
-
width: 20px;
|
130
|
-
height: 20px;
|
131
|
-
margin-right: 4px;
|
132
|
-
border-radius: 5px;
|
133
|
-
font-size: 21px;
|
134
|
-
font-weight: 700;
|
135
|
-
}
|
136
|
-
div[status] md-icon[request] {
|
137
|
-
background-color: #f7f7f7;
|
138
|
-
color: #4e5055;
|
139
|
-
}
|
140
|
-
div[status] md-icon[pass] {
|
141
|
-
background-color: #4bbb4a;
|
142
|
-
}
|
143
|
-
div[status] md-icon[fail] {
|
144
|
-
background-color: #ff4444;
|
145
|
-
}
|
146
|
-
|
147
|
-
span[name] {
|
148
|
-
width: 40px;
|
149
|
-
color: #4e5055;
|
150
|
-
margin-left: 6px;
|
151
|
-
text-align: center;
|
152
|
-
}
|
153
|
-
|
154
|
-
span[name][active] {
|
155
|
-
color: var(--md-sys-color-on-error);
|
156
|
-
background-color: var(--md-sys-color-error);
|
157
|
-
border-radius: 999px;
|
158
|
-
}
|
159
|
-
|
160
|
-
ox-select-floor {
|
161
|
-
--ox-select-floor-rotate-x: ${rotateX}deg;
|
162
|
-
--ox-select-floor-rotate-x-active: ${rotateXForActive}deg;
|
163
|
-
--ox-select-floor-perspective: ${perspective}px;
|
164
|
-
}
|
165
|
-
</style>
|
166
|
-
|
167
|
-
<div class="container md-typescale-body-large-prominent">
|
168
|
-
<ox-select-floor
|
169
|
-
.cards=${cards}
|
170
|
-
.bottomLimit=${bottomLimit}
|
171
|
-
?disabled=${disabled}
|
172
|
-
.interval=${interval}
|
173
|
-
@change=${(e: Event) => console.log(((e as CustomEvent).target as any)!.value)}
|
174
|
-
>
|
175
|
-
${cards.map(
|
176
|
-
({ image, name }, index) =>
|
177
|
-
html`<div slot="template-${index}" status>
|
178
|
-
<div content>
|
179
|
-
<span><md-icon request slot="icon">exclamation</md-icon>100</span>
|
180
|
-
<span><md-icon pass slot="icon">check</md-icon>50</span>
|
181
|
-
<span><md-icon fail slot="icon">close</md-icon>5</span>
|
182
|
-
</div>
|
183
|
-
<span name>${name}</span>
|
184
|
-
</div>`
|
185
|
-
)}
|
186
|
-
</ox-select-floor>
|
187
|
-
</div>
|
188
|
-
`
|
189
|
-
|
190
|
-
export const Regular = Template.bind({})
|
191
|
-
Regular.args = {
|
192
|
-
bottomLimit: 70,
|
193
|
-
perspective: 1200,
|
194
|
-
rotateX: 60,
|
195
|
-
rotateXForActive: 40,
|
196
|
-
interval: 0
|
197
|
-
}
|