@operato/input 8.0.0-beta.5 → 8.0.0
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 +24 -148
- package/assets/images/icon-editor-gradient-direction.png +0 -0
- package/assets/images/icon-properties-label.png +0 -0
- package/assets/images/icon-properties-line-type.png +0 -0
- package/assets/images/icon-properties-table.png +0 -0
- package/dist/src/index.d.ts +0 -1
- package/dist/src/index.js +0 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/ox-input-color-stops.d.ts +1 -1
- package/dist/src/ox-input-color-stops.js +2 -2
- package/dist/src/ox-input-color-stops.js.map +1 -1
- package/dist/src/ox-input-direction.d.ts +0 -1
- package/dist/src/ox-input-direction.js +4 -37
- package/dist/src/ox-input-direction.js.map +1 -1
- package/dist/src/ox-input-signature.d.ts +2 -4
- package/dist/src/ox-input-signature.js +14 -34
- package/dist/src/ox-input-signature.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-input-direction.stories.js +0 -11
- package/dist/stories/ox-input-direction.stories.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +15 -23
- package/dist/src/ox-input-switch.d.ts +0 -10
- package/dist/src/ox-input-switch.js +0 -125
- package/dist/src/ox-input-switch.js.map +0 -1
- package/dist/src/ox-select-floor.d.ts +0 -35
- package/dist/src/ox-select-floor.js +0 -238
- package/dist/src/ox-select-floor.js.map +0 -1
- package/dist/stories/image-for-select-floor.d.ts +0 -1
- package/dist/stories/image-for-select-floor.js +0 -2
- package/dist/stories/image-for-select-floor.js.map +0 -1
- package/dist/stories/ox-input-switch.stories.d.ts +0 -38
- package/dist/stories/ox-input-switch.stories.js +0 -68
- package/dist/stories/ox-input-switch.stories.js.map +0 -1
- package/dist/stories/ox-select-floor.stories.d.ts +0 -45
- package/dist/stories/ox-select-floor.stories.js +0 -166
- package/dist/stories/ox-select-floor.stories.js.map +0 -1
@@ -1,38 +0,0 @@
|
|
1
|
-
import '@material/web/all.js';
|
2
|
-
import '../src/ox-input-switch.js';
|
3
|
-
import { TemplateResult } from 'lit';
|
4
|
-
declare const _default: {
|
5
|
-
title: string;
|
6
|
-
component: string;
|
7
|
-
argTypes: {
|
8
|
-
label: {
|
9
|
-
control: string;
|
10
|
-
};
|
11
|
-
name: {
|
12
|
-
control: string;
|
13
|
-
};
|
14
|
-
round: {
|
15
|
-
control: string;
|
16
|
-
};
|
17
|
-
value: {
|
18
|
-
control: string;
|
19
|
-
};
|
20
|
-
disabled: {
|
21
|
-
control: string;
|
22
|
-
};
|
23
|
-
};
|
24
|
-
};
|
25
|
-
export default _default;
|
26
|
-
interface Story<T> {
|
27
|
-
(args: T): TemplateResult;
|
28
|
-
args?: Partial<T>;
|
29
|
-
argTypes?: Record<string, unknown>;
|
30
|
-
}
|
31
|
-
interface ArgTypes {
|
32
|
-
label?: string;
|
33
|
-
name?: string;
|
34
|
-
round?: boolean;
|
35
|
-
value?: boolean;
|
36
|
-
disabled?: boolean;
|
37
|
-
}
|
38
|
-
export declare const Regular: Story<ArgTypes>;
|
@@ -1,68 +0,0 @@
|
|
1
|
-
import '@material/web/all.js';
|
2
|
-
import '../src/ox-input-switch.js';
|
3
|
-
import { html } from 'lit';
|
4
|
-
import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles';
|
5
|
-
export default {
|
6
|
-
title: 'ox-input-switch',
|
7
|
-
component: 'ox-input-switch',
|
8
|
-
argTypes: {
|
9
|
-
label: { control: 'text' },
|
10
|
-
name: { control: 'text' },
|
11
|
-
round: { control: 'boolean' },
|
12
|
-
value: { control: 'boolean' },
|
13
|
-
disabled: { control: 'boolean' }
|
14
|
-
}
|
15
|
-
};
|
16
|
-
const Template = ({ label = 'Checkbox', name = 'hello', round = false, value = false, disabled }) => html `
|
17
|
-
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
18
|
-
|
19
|
-
<link href="/themes/light.css" rel="stylesheet" />
|
20
|
-
<link href="/themes/dark.css" rel="stylesheet" />
|
21
|
-
<link href="/themes/spacing.css" rel="stylesheet" />
|
22
|
-
|
23
|
-
<link
|
24
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
25
|
-
rel="stylesheet"
|
26
|
-
/>
|
27
|
-
<link
|
28
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
29
|
-
rel="stylesheet"
|
30
|
-
/>
|
31
|
-
<link
|
32
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
33
|
-
rel="stylesheet"
|
34
|
-
/>
|
35
|
-
|
36
|
-
<style>
|
37
|
-
${MDTypeScaleStyles.cssText}
|
38
|
-
</style>
|
39
|
-
|
40
|
-
<style>
|
41
|
-
.container {
|
42
|
-
height: 500px;
|
43
|
-
text-align: center;
|
44
|
-
padding: 20px;
|
45
|
-
background-color: var(--md-sys-color-primary-container);
|
46
|
-
color: var(--md-sys-color-on-primary-container);
|
47
|
-
padding: 20px;
|
48
|
-
}
|
49
|
-
|
50
|
-
ox-input-switch {
|
51
|
-
--ox-simple-switch-fullwidth: 120px;
|
52
|
-
--ox-simple-switch-fullheight: 40px;
|
53
|
-
--ox-simple-switch-thumbnail-size: 60px;
|
54
|
-
}
|
55
|
-
</style>
|
56
|
-
|
57
|
-
<div class="container md-typescale-body-large-prominent">
|
58
|
-
<ox-input-switch name=${name} .value=${value} .round=${round} ?disabled=${disabled}> </ox-input-switch>
|
59
|
-
</div>
|
60
|
-
`;
|
61
|
-
export const Regular = Template.bind({});
|
62
|
-
Regular.args = {
|
63
|
-
label: 'label',
|
64
|
-
name: 'label',
|
65
|
-
round: false,
|
66
|
-
value: false
|
67
|
-
};
|
68
|
-
//# sourceMappingURL=ox-input-switch.stories.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"ox-input-switch.stories.js","sourceRoot":"","sources":["../../stories/ox-input-switch.stories.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAA;AAC7B,OAAO,2BAA2B,CAAA;AAElC,OAAO,EAAkB,IAAI,EAAE,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,MAAM,IAAI,iBAAiB,EAAE,MAAM,8CAA8C,CAAA;AAE1F,eAAe;IACb,KAAK,EAAE,iBAAiB;IACxB,SAAS,EAAE,iBAAiB;IAC5B,QAAQ,EAAE;QACR,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QAC1B,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QACzB,KAAK,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;QAC7B,KAAK,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;QAC7B,QAAQ,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;KACjC;CACF,CAAA;AAgBD,MAAM,QAAQ,GAAoB,CAAC,EACjC,KAAK,GAAG,UAAU,EAClB,IAAI,GAAG,OAAO,EACd,KAAK,GAAG,KAAK,EACb,KAAK,GAAG,KAAK,EACb,QAAQ,EACC,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;MAqBd,iBAAiB,CAAC,OAAO;;;;;;;;;;;;;;;;;;;;;4BAqBH,IAAI,WAAW,KAAK,WAAW,KAAK,cAAc,QAAQ;;CAErF,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG;IACb,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,KAAK;IACZ,KAAK,EAAE,KAAK;CACb,CAAA","sourcesContent":["import '@material/web/all.js'\nimport '../src/ox-input-switch.js'\n\nimport { TemplateResult, html } from 'lit'\nimport { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'\n\nexport default {\n title: 'ox-input-switch',\n component: 'ox-input-switch',\n argTypes: {\n label: { control: 'text' },\n name: { control: 'text' },\n round: { control: 'boolean' },\n value: { control: 'boolean' },\n disabled: { control: 'boolean' }\n }\n}\n\ninterface Story<T> {\n (args: T): TemplateResult\n args?: Partial<T>\n argTypes?: Record<string, unknown>\n}\n\ninterface ArgTypes {\n label?: string\n name?: string\n round?: boolean\n value?: boolean\n disabled?: boolean\n}\n\nconst Template: Story<ArgTypes> = ({\n label = 'Checkbox',\n name = 'hello',\n round = false,\n value = false,\n disabled\n}: ArgTypes) => html`\n <link href=\"https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap\" rel=\"stylesheet\" />\n\n <link href=\"/themes/light.css\" rel=\"stylesheet\" />\n <link href=\"/themes/dark.css\" rel=\"stylesheet\" />\n <link href=\"/themes/spacing.css\" rel=\"stylesheet\" />\n\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n\n <style>\n ${MDTypeScaleStyles.cssText}\n </style>\n\n <style>\n .container {\n height: 500px;\n text-align: center;\n padding: 20px;\n background-color: var(--md-sys-color-primary-container);\n color: var(--md-sys-color-on-primary-container);\n padding: 20px;\n }\n\n ox-input-switch {\n --ox-simple-switch-fullwidth: 120px;\n --ox-simple-switch-fullheight: 40px;\n --ox-simple-switch-thumbnail-size: 60px;\n }\n </style>\n\n <div class=\"container md-typescale-body-large-prominent\">\n <ox-input-switch name=${name} .value=${value} .round=${round} ?disabled=${disabled}> </ox-input-switch>\n </div>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n label: 'label',\n name: 'label',\n round: false,\n value: false\n}\n"]}
|
@@ -1,45 +0,0 @@
|
|
1
|
-
import '../src/ox-select-floor.js';
|
2
|
-
import { TemplateResult } from 'lit';
|
3
|
-
declare const _default: {
|
4
|
-
title: string;
|
5
|
-
component: string;
|
6
|
-
argTypes: {
|
7
|
-
disabled: {
|
8
|
-
control: string;
|
9
|
-
};
|
10
|
-
value: {
|
11
|
-
control: string;
|
12
|
-
};
|
13
|
-
bottomLimit: {
|
14
|
-
control: string;
|
15
|
-
};
|
16
|
-
perspective: {
|
17
|
-
control: string;
|
18
|
-
};
|
19
|
-
rotateX: {
|
20
|
-
control: string;
|
21
|
-
};
|
22
|
-
rotateXForActive: {
|
23
|
-
control: string;
|
24
|
-
};
|
25
|
-
interval: {
|
26
|
-
control: string;
|
27
|
-
};
|
28
|
-
};
|
29
|
-
};
|
30
|
-
export default _default;
|
31
|
-
interface Story<T> {
|
32
|
-
(args: T): TemplateResult;
|
33
|
-
args?: Partial<T>;
|
34
|
-
argTypes?: Record<string, unknown>;
|
35
|
-
}
|
36
|
-
interface ArgTypes {
|
37
|
-
value?: string;
|
38
|
-
bottomLimit?: number;
|
39
|
-
perspective?: number;
|
40
|
-
rotateX?: number;
|
41
|
-
rotateXForActive?: number;
|
42
|
-
disabled?: boolean;
|
43
|
-
interval?: number;
|
44
|
-
}
|
45
|
-
export declare const Regular: Story<ArgTypes>;
|
@@ -1,166 +0,0 @@
|
|
1
|
-
import '../src/ox-select-floor.js';
|
2
|
-
import { html } from 'lit';
|
3
|
-
import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles';
|
4
|
-
import { IMAGE } from './image-for-select-floor.js';
|
5
|
-
export default {
|
6
|
-
title: 'ox-select-floor',
|
7
|
-
component: 'ox-select-floor',
|
8
|
-
argTypes: {
|
9
|
-
disabled: { control: 'boolean' },
|
10
|
-
value: { control: 'text' },
|
11
|
-
bottomLimit: { control: 'number' },
|
12
|
-
perspective: { control: 'number' },
|
13
|
-
rotateX: { control: 'number' },
|
14
|
-
rotateXForActive: { control: 'number' },
|
15
|
-
interval: { control: 'number' }
|
16
|
-
}
|
17
|
-
};
|
18
|
-
const cards = new Array(10).fill({}).map((_, index) => {
|
19
|
-
return {
|
20
|
-
image: IMAGE,
|
21
|
-
name: index + 1 + '층'
|
22
|
-
};
|
23
|
-
});
|
24
|
-
const Template = ({ value, disabled, bottomLimit = 70, perspective = 1200, rotateX = 60, rotateXForActive = 40, interval = 0 }) => html `
|
25
|
-
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
26
|
-
|
27
|
-
<link href="/themes/light.css" rel="stylesheet" />
|
28
|
-
<link href="/themes/dark.css" rel="stylesheet" />
|
29
|
-
<link href="/themes/spacing.css" rel="stylesheet" />
|
30
|
-
|
31
|
-
<link
|
32
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
33
|
-
rel="stylesheet"
|
34
|
-
/>
|
35
|
-
<link
|
36
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded: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+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
41
|
-
rel="stylesheet"
|
42
|
-
/>
|
43
|
-
|
44
|
-
<style>
|
45
|
-
${MDTypeScaleStyles.cssText}
|
46
|
-
</style>
|
47
|
-
|
48
|
-
<style>
|
49
|
-
html,
|
50
|
-
body {
|
51
|
-
margin: 0;
|
52
|
-
padding: 0;
|
53
|
-
overflow: hidden;
|
54
|
-
|
55
|
-
overscroll-behavior-y: none;
|
56
|
-
|
57
|
-
/* This is a font-stack that tries to use the system-default sans-serifs first */
|
58
|
-
font-family: Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
|
59
|
-
line-height: 1.5;
|
60
|
-
-webkit-font-smoothing: antialiased;
|
61
|
-
|
62
|
-
accent-color: var(--md-sys-color-primary);
|
63
|
-
background-color: var(--md-sys-color-background);
|
64
|
-
}
|
65
|
-
|
66
|
-
.container {
|
67
|
-
height: 1000px;
|
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);
|
73
|
-
}
|
74
|
-
|
75
|
-
div[status] {
|
76
|
-
display: flex;
|
77
|
-
position: absolute;
|
78
|
-
right: 0px;
|
79
|
-
bottom: 0px;
|
80
|
-
align-items: center;
|
81
|
-
right: 3%;
|
82
|
-
}
|
83
|
-
|
84
|
-
div[status] > div[content] {
|
85
|
-
display: flex;
|
86
|
-
background-color: #4e5055;
|
87
|
-
color: #fff;
|
88
|
-
padding: 5px 7px;
|
89
|
-
border-radius: 7px;
|
90
|
-
gap: 10px;
|
91
|
-
font-size: 14px;
|
92
|
-
}
|
93
|
-
|
94
|
-
div[status] span {
|
95
|
-
display: flex;
|
96
|
-
align-items: center;
|
97
|
-
width: 48px;
|
98
|
-
}
|
99
|
-
|
100
|
-
div[status] md-icon {
|
101
|
-
width: 20px;
|
102
|
-
height: 20px;
|
103
|
-
margin-right: 4px;
|
104
|
-
border-radius: 5px;
|
105
|
-
font-size: 21px;
|
106
|
-
font-weight: 700;
|
107
|
-
}
|
108
|
-
div[status] md-icon[request] {
|
109
|
-
background-color: #f7f7f7;
|
110
|
-
color: #4e5055;
|
111
|
-
}
|
112
|
-
div[status] md-icon[pass] {
|
113
|
-
background-color: #4bbb4a;
|
114
|
-
}
|
115
|
-
div[status] md-icon[fail] {
|
116
|
-
background-color: #ff4444;
|
117
|
-
}
|
118
|
-
|
119
|
-
span[name] {
|
120
|
-
width: 40px;
|
121
|
-
color: #4e5055;
|
122
|
-
margin-left: 6px;
|
123
|
-
text-align: center;
|
124
|
-
}
|
125
|
-
|
126
|
-
span[name][active] {
|
127
|
-
color: var(--md-sys-color-on-error);
|
128
|
-
background-color: var(--md-sys-color-error);
|
129
|
-
border-radius: 999px;
|
130
|
-
}
|
131
|
-
|
132
|
-
ox-select-floor {
|
133
|
-
--ox-select-floor-rotate-x: ${rotateX}deg;
|
134
|
-
--ox-select-floor-rotate-x-active: ${rotateXForActive}deg;
|
135
|
-
--ox-select-floor-perspective: ${perspective}px;
|
136
|
-
}
|
137
|
-
</style>
|
138
|
-
|
139
|
-
<div class="container md-typescale-body-large-prominent">
|
140
|
-
<ox-select-floor
|
141
|
-
.cards=${cards}
|
142
|
-
.bottomLimit=${bottomLimit}
|
143
|
-
?disabled=${disabled}
|
144
|
-
.interval=${interval}
|
145
|
-
@change=${(e) => console.log(e.target.value)}
|
146
|
-
>
|
147
|
-
${cards.map(({ image, name }, index) => html `<div slot="template-${index}" status>
|
148
|
-
<div content>
|
149
|
-
<span><md-icon request slot="icon">exclamation</md-icon>100</span>
|
150
|
-
<span><md-icon pass slot="icon">check</md-icon>50</span>
|
151
|
-
<span><md-icon fail slot="icon">close</md-icon>5</span>
|
152
|
-
</div>
|
153
|
-
<span name>${name}</span>
|
154
|
-
</div>`)}
|
155
|
-
</ox-select-floor>
|
156
|
-
</div>
|
157
|
-
`;
|
158
|
-
export const Regular = Template.bind({});
|
159
|
-
Regular.args = {
|
160
|
-
bottomLimit: 70,
|
161
|
-
perspective: 1200,
|
162
|
-
rotateX: 60,
|
163
|
-
rotateXForActive: 40,
|
164
|
-
interval: 0
|
165
|
-
};
|
166
|
-
//# sourceMappingURL=ox-select-floor.stories.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"ox-select-floor.stories.js","sourceRoot":"","sources":["../../stories/ox-select-floor.stories.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAA;AAElC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,MAAM,IAAI,iBAAiB,EAAE,MAAM,8CAA8C,CAAA;AAC1F,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAA;AAEnD,eAAe;IACb,KAAK,EAAE,iBAAiB;IACxB,SAAS,EAAE,iBAAiB;IAC5B,QAAQ,EAAE;QACR,QAAQ,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;QAChC,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QAC1B,WAAW,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QAClC,WAAW,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QAClC,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QAC9B,gBAAgB,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QACvC,QAAQ,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;KAChC;CACF,CAAA;AAkBD,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE;IACpD,OAAO;QACL,KAAK,EAAE,KAAK;QACZ,IAAI,EAAE,KAAK,GAAG,CAAC,GAAG,GAAG;KACtB,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,MAAM,QAAQ,GAAoB,CAAC,EACjC,KAAK,EACL,QAAQ,EACR,WAAW,GAAG,EAAE,EAChB,WAAW,GAAG,IAAI,EAClB,OAAO,GAAG,EAAE,EACZ,gBAAgB,GAAG,EAAE,EACrB,QAAQ,GAAG,CAAC,EACH,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;MAqBd,iBAAiB,CAAC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAwFK,OAAO;2CACA,gBAAgB;uCACpB,WAAW;;;;;;eAMnC,KAAK;qBACC,WAAW;kBACd,QAAQ;kBACR,QAAQ;gBACV,CAAC,CAAQ,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAG,CAAiB,CAAC,MAAe,CAAC,KAAK,CAAC;;QAE5E,KAAK,CAAC,GAAG,CACT,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,EAAE,CACzB,IAAI,CAAA,uBAAuB,KAAK;;;;;;yBAMjB,IAAI;iBACZ,CACV;;;CAGN,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG;IACb,WAAW,EAAE,EAAE;IACf,WAAW,EAAE,IAAI;IACjB,OAAO,EAAE,EAAE;IACX,gBAAgB,EAAE,EAAE;IACpB,QAAQ,EAAE,CAAC;CACZ,CAAA","sourcesContent":["import '../src/ox-select-floor.js'\n\nimport { html, TemplateResult } from 'lit'\nimport { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'\nimport { IMAGE } from './image-for-select-floor.js'\n\nexport default {\n title: 'ox-select-floor',\n component: 'ox-select-floor',\n argTypes: {\n disabled: { control: 'boolean' },\n value: { control: 'text' },\n bottomLimit: { control: 'number' },\n perspective: { control: 'number' },\n rotateX: { control: 'number' },\n rotateXForActive: { control: 'number' },\n interval: { control: 'number' }\n }\n}\n\ninterface Story<T> {\n (args: T): TemplateResult\n args?: Partial<T>\n argTypes?: Record<string, unknown>\n}\n\ninterface ArgTypes {\n value?: string\n bottomLimit?: number\n perspective?: number\n rotateX?: number\n rotateXForActive?: number\n disabled?: boolean\n interval?: number\n}\n\nconst cards = new Array(10).fill({}).map((_, index) => {\n return {\n image: IMAGE,\n name: index + 1 + '층'\n }\n})\n\nconst Template: Story<ArgTypes> = ({\n value,\n disabled,\n bottomLimit = 70,\n perspective = 1200,\n rotateX = 60,\n rotateXForActive = 40,\n interval = 0\n}: ArgTypes) => html`\n <link href=\"https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap\" rel=\"stylesheet\" />\n\n <link href=\"/themes/light.css\" rel=\"stylesheet\" />\n <link href=\"/themes/dark.css\" rel=\"stylesheet\" />\n <link href=\"/themes/spacing.css\" rel=\"stylesheet\" />\n\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n\n <style>\n ${MDTypeScaleStyles.cssText}\n </style>\n\n <style>\n html,\n body {\n margin: 0;\n padding: 0;\n overflow: hidden;\n\n overscroll-behavior-y: none;\n\n /* This is a font-stack that tries to use the system-default sans-serifs first */\n font-family: Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';\n line-height: 1.5;\n -webkit-font-smoothing: antialiased;\n\n accent-color: var(--md-sys-color-primary);\n background-color: var(--md-sys-color-background);\n }\n\n .container {\n height: 1000px;\n text-align: center;\n padding: 20px;\n\n background-color: var(--md-sys-color-primary-container);\n color: var(--md-sys-color-on-primary-container);\n }\n\n div[status] {\n display: flex;\n position: absolute;\n right: 0px;\n bottom: 0px;\n align-items: center;\n right: 3%;\n }\n\n div[status] > div[content] {\n display: flex;\n background-color: #4e5055;\n color: #fff;\n padding: 5px 7px;\n border-radius: 7px;\n gap: 10px;\n font-size: 14px;\n }\n\n div[status] span {\n display: flex;\n align-items: center;\n width: 48px;\n }\n\n div[status] md-icon {\n width: 20px;\n height: 20px;\n margin-right: 4px;\n border-radius: 5px;\n font-size: 21px;\n font-weight: 700;\n }\n div[status] md-icon[request] {\n background-color: #f7f7f7;\n color: #4e5055;\n }\n div[status] md-icon[pass] {\n background-color: #4bbb4a;\n }\n div[status] md-icon[fail] {\n background-color: #ff4444;\n }\n\n span[name] {\n width: 40px;\n color: #4e5055;\n margin-left: 6px;\n text-align: center;\n }\n\n span[name][active] {\n color: var(--md-sys-color-on-error);\n background-color: var(--md-sys-color-error);\n border-radius: 999px;\n }\n\n ox-select-floor {\n --ox-select-floor-rotate-x: ${rotateX}deg;\n --ox-select-floor-rotate-x-active: ${rotateXForActive}deg;\n --ox-select-floor-perspective: ${perspective}px;\n }\n </style>\n\n <div class=\"container md-typescale-body-large-prominent\">\n <ox-select-floor\n .cards=${cards}\n .bottomLimit=${bottomLimit}\n ?disabled=${disabled}\n .interval=${interval}\n @change=${(e: Event) => console.log(((e as CustomEvent).target as any)!.value)}\n >\n ${cards.map(\n ({ image, name }, index) =>\n html`<div slot=\"template-${index}\" status>\n <div content>\n <span><md-icon request slot=\"icon\">exclamation</md-icon>100</span>\n <span><md-icon pass slot=\"icon\">check</md-icon>50</span>\n <span><md-icon fail slot=\"icon\">close</md-icon>5</span>\n </div>\n <span name>${name}</span>\n </div>`\n )}\n </ox-select-floor>\n </div>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n bottomLimit: 70,\n perspective: 1200,\n rotateX: 60,\n rotateXForActive: 40,\n interval: 0\n}\n"]}
|