@operato/input 9.0.0-beta.55 → 9.0.0-beta.61
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 +9 -0
- package/dist/src/ox-input-options.js +0 -1
- package/dist/src/ox-input-options.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- 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-buttons-radio.stories.d.ts +0 -26
- package/dist/stories/ox-buttons-radio.stories.js +0 -75
- package/dist/stories/ox-buttons-radio.stories.js.map +0 -1
- package/dist/stories/ox-checkbox.stories.d.ts +0 -44
- package/dist/stories/ox-checkbox.stories.js +0 -84
- package/dist/stories/ox-checkbox.stories.js.map +0 -1
- package/dist/stories/ox-input-3axis.stories.d.ts +0 -26
- package/dist/stories/ox-input-3axis.stories.js +0 -63
- package/dist/stories/ox-input-3axis.stories.js.map +0 -1
- package/dist/stories/ox-input-3dish.stories.d.ts +0 -30
- package/dist/stories/ox-input-3dish.stories.js +0 -91
- package/dist/stories/ox-input-3dish.stories.js.map +0 -1
- package/dist/stories/ox-input-angle.stories.d.ts +0 -30
- package/dist/stories/ox-input-angle.stories.js +0 -69
- package/dist/stories/ox-input-angle.stories.js.map +0 -1
- package/dist/stories/ox-input-barcode.stories.d.ts +0 -47
- package/dist/stories/ox-input-barcode.stories.js +0 -89
- package/dist/stories/ox-input-barcode.stories.js.map +0 -1
- package/dist/stories/ox-input-code.stories.d.ts +0 -38
- package/dist/stories/ox-input-code.stories.js +0 -76
- package/dist/stories/ox-input-code.stories.js.map +0 -1
- package/dist/stories/ox-input-crontab.stories.d.ts +0 -29
- package/dist/stories/ox-input-crontab.stories.js +0 -67
- package/dist/stories/ox-input-crontab.stories.js.map +0 -1
- package/dist/stories/ox-input-data.stories.d.ts +0 -29
- package/dist/stories/ox-input-data.stories.js +0 -67
- package/dist/stories/ox-input-data.stories.js.map +0 -1
- package/dist/stories/ox-input-direction.stories.d.ts +0 -29
- package/dist/stories/ox-input-direction.stories.js +0 -76
- package/dist/stories/ox-input-direction.stories.js.map +0 -1
- package/dist/stories/ox-input-duration.stories.d.ts +0 -30
- package/dist/stories/ox-input-duration.stories.js +0 -69
- package/dist/stories/ox-input-duration.stories.js.map +0 -1
- package/dist/stories/ox-input-file.stories.d.ts +0 -53
- package/dist/stories/ox-input-file.stories.js +0 -80
- package/dist/stories/ox-input-file.stories.js.map +0 -1
- package/dist/stories/ox-input-hashtags.stories.d.ts +0 -33
- package/dist/stories/ox-input-hashtags.stories.js +0 -66
- package/dist/stories/ox-input-hashtags.stories.js.map +0 -1
- package/dist/stories/ox-input-i18n-label.stories.d.ts +0 -29
- package/dist/stories/ox-input-i18n-label.stories.js +0 -88
- package/dist/stories/ox-input-i18n-label.stories.js.map +0 -1
- package/dist/stories/ox-input-key-values.stories.d.ts +0 -33
- package/dist/stories/ox-input-key-values.stories.js +0 -81
- package/dist/stories/ox-input-key-values.stories.js.map +0 -1
- package/dist/stories/ox-input-mass-fraction.stories.d.ts +0 -37
- package/dist/stories/ox-input-mass-fraction.stories.js +0 -79
- package/dist/stories/ox-input-mass-fraction.stories.js.map +0 -1
- package/dist/stories/ox-input-multiple-colors.stories.d.ts +0 -24
- package/dist/stories/ox-input-multiple-colors.stories.js +0 -59
- package/dist/stories/ox-input-multiple-colors.stories.js.map +0 -1
- package/dist/stories/ox-input-options.stories.d.ts +0 -29
- package/dist/stories/ox-input-options.stories.js +0 -65
- package/dist/stories/ox-input-options.stories.js.map +0 -1
- package/dist/stories/ox-input-partition-keys.stories.d.ts +0 -29
- package/dist/stories/ox-input-partition-keys.stories.js +0 -69
- package/dist/stories/ox-input-partition-keys.stories.js.map +0 -1
- package/dist/stories/ox-input-privilege.stories.d.ts +0 -40
- package/dist/stories/ox-input-privilege.stories.js +0 -87
- package/dist/stories/ox-input-privilege.stories.js.map +0 -1
- package/dist/stories/ox-input-quantifier.stories.d.ts +0 -29
- package/dist/stories/ox-input-quantifier.stories.js +0 -63
- package/dist/stories/ox-input-quantifier.stories.js.map +0 -1
- package/dist/stories/ox-input-range.stories.d.ts +0 -41
- package/dist/stories/ox-input-range.stories.js +0 -64
- package/dist/stories/ox-input-range.stories.js.map +0 -1
- package/dist/stories/ox-input-search.stories.d.ts +0 -36
- package/dist/stories/ox-input-search.stories.js +0 -68
- package/dist/stories/ox-input-search.stories.js.map +0 -1
- package/dist/stories/ox-input-select-buttons.stories.d.ts +0 -38
- package/dist/stories/ox-input-select-buttons.stories.js +0 -94
- package/dist/stories/ox-input-select-buttons.stories.js.map +0 -1
- package/dist/stories/ox-input-signature.stories.d.ts +0 -25
- package/dist/stories/ox-input-signature.stories.js +0 -60
- package/dist/stories/ox-input-signature.stories.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-input-table-column-config.stories.d.ts +0 -29
- package/dist/stories/ox-input-table-column-config.stories.js +0 -94
- package/dist/stories/ox-input-table-column-config.stories.js.map +0 -1
- package/dist/stories/ox-input-table.stories.d.ts +0 -21
- package/dist/stories/ox-input-table.stories.js +0 -84
- package/dist/stories/ox-input-table.stories.js.map +0 -1
- package/dist/stories/ox-input-unit.stories.d.ts +0 -42
- package/dist/stories/ox-input-unit.stories.js +0 -123
- package/dist/stories/ox-input-unit.stories.js.map +0 -1
- package/dist/stories/ox-input-value-map.stories.d.ts +0 -39
- package/dist/stories/ox-input-value-map.stories.js +0 -69
- package/dist/stories/ox-input-value-map.stories.js.map +0 -1
- package/dist/stories/ox-input-value-ranges.stories.d.ts +0 -39
- package/dist/stories/ox-input-value-ranges.stories.js +0 -69
- package/dist/stories/ox-input-value-ranges.stories.js.map +0 -1
- package/dist/stories/ox-input-work-shift.stories.d.ts +0 -30
- package/dist/stories/ox-input-work-shift.stories.js +0 -91
- package/dist/stories/ox-input-work-shift.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
- package/dist/stories/ox-select-images.stories.d.ts +0 -32
- package/dist/stories/ox-select-images.stories.js +0 -120
- package/dist/stories/ox-select-images.stories.js.map +0 -1
- package/dist/stories/ox-select-set-options.stories.d.ts +0 -48
- package/dist/stories/ox-select-set-options.stories.js +0 -178
- package/dist/stories/ox-select-set-options.stories.js.map +0 -1
- package/dist/stories/ox-select.stories.d.ts +0 -34
- package/dist/stories/ox-select.stories.js +0 -151
- package/dist/stories/ox-select.stories.js.map +0 -1
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"ox-input-work-shift.stories.js","sourceRoot":"","sources":["../../stories/ox-input-work-shift.stories.ts"],"names":[],"mappings":"AAAA,OAAO,+BAA+B,CAAA;AACtC,OAAO,gCAAgC,CAAA;AAEvC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,MAAM,IAAI,iBAAiB,EAAE,MAAM,iDAAiD,CAAA;AAE7F,eAAe;IACb,KAAK,EAAE,qBAAqB;IAC5B,SAAS,EAAE,qBAAqB;IAChC,QAAQ,EAAE;QACR,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QAC5B,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QACzB,QAAQ,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;KACjC;CACF,CAAA;AAcD,MAAM,QAAQ,GAAoB,CAAC,EAAE,IAAI,GAAG,YAAY,EAAE,KAAK,GAAG,EAAE,EAAE,QAAQ,EAAY,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;MAqB7F,iBAAiB,CAAC,OAAO;;;;;;;;;;;;;;;;;;;gBAmBf,CAAC,CAAQ,EAAE,EAAE;IACrB,OAAO,CAAC,GAAG,CAAE,CAAC,CAAC,MAA2B,CAAC,KAAK,CAAC,CAAA;AACnD,CAAC;aACM,IAAI;eACF,KAAK;kBACF,QAAQ;;;;CAIzB,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG;IACb,IAAI,EAAE,YAAY;IAClB,KAAK,EAAE;QACL;YACE,IAAI,EAAE,KAAK;YACX,QAAQ,EAAE,CAAC,CAAC;YACZ,QAAQ,EAAE,OAAO;YACjB,MAAM,EAAE,CAAC;YACT,MAAM,EAAE,OAAO;SAChB;QACD;YACE,IAAI,EAAE,OAAO;YACb,QAAQ,EAAE,CAAC;YACX,QAAQ,EAAE,OAAO;YACjB,MAAM,EAAE,CAAC;YACT,MAAM,EAAE,OAAO;SAChB;QACD;YACE,IAAI,EAAE,OAAO;YACb,QAAQ,EAAE,CAAC;YACX,QAAQ,EAAE,OAAO;YACjB,MAAM,EAAE,CAAC;YACT,MAAM,EAAE,OAAO;SAChB;KACF;CACF,CAAA","sourcesContent":["import '../src/ox-input-work-shift.js'\nimport '../src/locale/locale-picker.js'\n\nimport { html, TemplateResult } from 'lit'\nimport { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles.js'\n\nexport default {\n title: 'ox-input-work-shift',\n component: 'ox-input-work-shift',\n argTypes: {\n value: { control: 'object' },\n name: { control: 'text' },\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 name?: string\n value?: object\n disabled?: boolean\n}\n\nconst Template: Story<ArgTypes> = ({ name = 'work-shift', value = [], disabled }: 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\n background-color: var(--md-sys-color-primary-container);\n color: var(--md-sys-color-on-primary-container);\n }\n </style>\n\n <div class=\"container md-typescale-body-large-prominent\">\n <locale-picker></locale-picker>\n <br /><br />\n\n <ox-input-work-shift\n @change=${(e: Event) => {\n console.log((e.target as HTMLInputElement).value)\n }}\n name=${name}\n .value=${value}\n ?disabled=${disabled}\n >\n </ox-input-work-shift>\n </div>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n name: 'work-shift',\n value: [\n {\n name: 'DAY',\n fromDate: -1,\n fromTime: '22:00',\n toDate: 0,\n toTime: '06:00'\n },\n {\n name: 'SWING',\n fromDate: 0,\n fromTime: '06:00',\n toDate: 0,\n toTime: '14:00'\n },\n {\n name: 'NIGHT',\n fromDate: 0,\n fromTime: '14:00',\n toDate: 0,\n toTime: '22:00'\n }\n ]\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.js';
|
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,iDAAiD,CAAA;AAC7F,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,EA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;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.js'\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"]}
|
@@ -1,32 +0,0 @@
|
|
1
|
-
import '../src/ox-select.js';
|
2
|
-
import '../src/ox-checkbox.js';
|
3
|
-
import { TemplateResult } from 'lit';
|
4
|
-
declare const _default: {
|
5
|
-
title: string;
|
6
|
-
component: string;
|
7
|
-
argTypes: {
|
8
|
-
placeholder: {
|
9
|
-
control: string;
|
10
|
-
};
|
11
|
-
name: {
|
12
|
-
control: string;
|
13
|
-
};
|
14
|
-
disabled: {
|
15
|
-
control: string;
|
16
|
-
};
|
17
|
-
};
|
18
|
-
};
|
19
|
-
export default _default;
|
20
|
-
interface Story<T> {
|
21
|
-
(args: T): TemplateResult;
|
22
|
-
args?: Partial<T>;
|
23
|
-
argTypes?: Record<string, unknown>;
|
24
|
-
}
|
25
|
-
interface ArgTypes {
|
26
|
-
placeholder?: string;
|
27
|
-
name?: string;
|
28
|
-
value?: object | string;
|
29
|
-
slot?: TemplateResult;
|
30
|
-
disabled?: boolean;
|
31
|
-
}
|
32
|
-
export declare const Regular: Story<ArgTypes>;
|
@@ -1,120 +0,0 @@
|
|
1
|
-
import '../src/ox-select.js';
|
2
|
-
import '../src/ox-checkbox.js';
|
3
|
-
import { html } from 'lit';
|
4
|
-
import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles.js';
|
5
|
-
export default {
|
6
|
-
title: 'ox-select-images',
|
7
|
-
component: 'ox-select',
|
8
|
-
argTypes: {
|
9
|
-
placeholder: { control: 'text' },
|
10
|
-
name: { control: 'text' },
|
11
|
-
disabled: { control: 'boolean' }
|
12
|
-
}
|
13
|
-
};
|
14
|
-
const Template = ({ placeholder = 'Checkbox', name = 'hello', value = '', slot, disabled }) => html `
|
15
|
-
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
16
|
-
|
17
|
-
<link href="/themes/light.css" rel="stylesheet" />
|
18
|
-
<link href="/themes/dark.css" rel="stylesheet" />
|
19
|
-
<link href="/themes/spacing.css" rel="stylesheet" />
|
20
|
-
|
21
|
-
<link
|
22
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
23
|
-
rel="stylesheet"
|
24
|
-
/>
|
25
|
-
<link
|
26
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
27
|
-
rel="stylesheet"
|
28
|
-
/>
|
29
|
-
<link
|
30
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
31
|
-
rel="stylesheet"
|
32
|
-
/>
|
33
|
-
|
34
|
-
<style>
|
35
|
-
${MDTypeScaleStyles.cssText}
|
36
|
-
</style>
|
37
|
-
|
38
|
-
<style>
|
39
|
-
.container {
|
40
|
-
height: 250px;
|
41
|
-
text-align: center;
|
42
|
-
padding: 20px;
|
43
|
-
|
44
|
-
background-color: var(--md-sys-color-primary-container);
|
45
|
-
color: var(--md-sys-color-on-primary-container);
|
46
|
-
}
|
47
|
-
|
48
|
-
ox-select {
|
49
|
-
width: 160px;
|
50
|
-
}
|
51
|
-
</style>
|
52
|
-
|
53
|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IgQIUIURIgQBREiRIiCCBEiREGECBGiIEKECFEQIUKEKIgQIQoiRIgQBREiRIiCCBEiREGECBGiIEKECFEQIUKEKIgQIQoiRIgQBREiRIiCCBEiREGECBGitnQTYAAk0fJFyzB3ywAAAABJRU5ErkJggg==)
|
56
|
-
50% 0 no-repeat;
|
57
|
-
min-height: 24px;
|
58
|
-
padding: 3px 7px;
|
59
|
-
}
|
60
|
-
|
61
|
-
.line-type.solid {
|
62
|
-
background-position: 50% 14px;
|
63
|
-
}
|
64
|
-
.line-type.round-dot {
|
65
|
-
background-position: 50% -36px;
|
66
|
-
}
|
67
|
-
.line-type.square-dot {
|
68
|
-
background-position: 50% -86px;
|
69
|
-
}
|
70
|
-
.line-type.dash {
|
71
|
-
background-position: 50% -136px;
|
72
|
-
}
|
73
|
-
.line-type.dash-dot {
|
74
|
-
background-position: 50% -186px;
|
75
|
-
}
|
76
|
-
.line-type.long-dash {
|
77
|
-
background-position: 50% -236px;
|
78
|
-
}
|
79
|
-
.line-type.long-dash-dot {
|
80
|
-
background-position: 50% -286px;
|
81
|
-
}
|
82
|
-
.line-type.long-dash-dot-dot {
|
83
|
-
background-position: 50% -336px;
|
84
|
-
}
|
85
|
-
</style>
|
86
|
-
|
87
|
-
<div class="container md-typescale-body-large-prominent">
|
88
|
-
<ox-select
|
89
|
-
name=${name}
|
90
|
-
@change=${(e) => {
|
91
|
-
console.log(e.target.value);
|
92
|
-
}}
|
93
|
-
placeholder=${placeholder}
|
94
|
-
.value=${value}
|
95
|
-
?disabled=${disabled}
|
96
|
-
>
|
97
|
-
${slot}
|
98
|
-
</ox-select>
|
99
|
-
</div>
|
100
|
-
`;
|
101
|
-
export const Regular = Template.bind({});
|
102
|
-
Regular.args = {
|
103
|
-
placeholder: 'single select',
|
104
|
-
name: 'label',
|
105
|
-
value: '',
|
106
|
-
slot: html `
|
107
|
-
<div class="line-type dash" slot="label"></div>
|
108
|
-
<ox-popup-list align-left nowrap>
|
109
|
-
<div class="line-type solid" value="solid" option></div>
|
110
|
-
<div class="line-type round-dot" value="round-dot" option></div>
|
111
|
-
<div class="line-type square-dot" value="square-dot" option></div>
|
112
|
-
<div class="line-type dash" value="dash" option></div>
|
113
|
-
<div class="line-type dash-dot" value="dash-dot" option></div>
|
114
|
-
<div class="line-type long-dash" value="long-dash" option></div>
|
115
|
-
<div class="line-type long-dash-dot" value="long-dash-dot" option></div>
|
116
|
-
<div class="line-type long-dash-dot-dot" value="long-dash-dot-dot" option></div>
|
117
|
-
</ox-popup-list>
|
118
|
-
`
|
119
|
-
};
|
120
|
-
//# sourceMappingURL=ox-select-images.stories.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"ox-select-images.stories.js","sourceRoot":"","sources":["../../stories/ox-select-images.stories.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAA;AAC5B,OAAO,uBAAuB,CAAA;AAE9B,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,MAAM,IAAI,iBAAiB,EAAE,MAAM,iDAAiD,CAAA;AAE7F,eAAe;IACb,KAAK,EAAE,kBAAkB;IACzB,SAAS,EAAE,WAAW;IACtB,QAAQ,EAAE;QACR,WAAW,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QAChC,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QACzB,QAAQ,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;KACjC;CACF,CAAA;AAgBD,MAAM,QAAQ,GAAoB,CAAC,EACjC,WAAW,GAAG,UAAU,EACxB,IAAI,GAAG,OAAO,EACd,KAAK,GAAG,EAAE,EACV,IAAI,EACJ,QAAQ,EACC,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;MAqBd,iBAAiB,CAAC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAsDlB,IAAI;gBACD,CAAC,CAAQ,EAAE,EAAE;IACrB,OAAO,CAAC,GAAG,CAAE,CAAC,CAAC,MAA2B,CAAC,KAAK,CAAC,CAAA;AACnD,CAAC;oBACa,WAAW;eAChB,KAAK;kBACF,QAAQ;;QAElB,IAAI;;;CAGX,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG;IACb,WAAW,EAAE,eAAe;IAC5B,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,EAAE;IACT,IAAI,EAAE,IAAI,CAAA;;;;;;;;;;;;GAYT;CACF,CAAA","sourcesContent":["import '../src/ox-select.js'\nimport '../src/ox-checkbox.js'\n\nimport { html, TemplateResult } from 'lit'\nimport { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles.js'\n\nexport default {\n title: 'ox-select-images',\n component: 'ox-select',\n argTypes: {\n placeholder: { control: 'text' },\n name: { control: 'text' },\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 placeholder?: string\n name?: string\n value?: object | string\n slot?: TemplateResult\n disabled?: boolean\n}\n\nconst Template: Story<ArgTypes> = ({\n placeholder = 'Checkbox',\n name = 'hello',\n value = '',\n slot,\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: 250px;\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 ox-select {\n width: 160px;\n }\n </style>\n\n <style>\n .line-type {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFEAAAH0CAYAAABFKcHfAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpFNzY1MUM3RkUyRkMx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/uIl/pbP28SrXOQdXZ5bxIhQhREiBAhCiJEiBAFESJEiIIIESJEQYQIEaIgQoQoiBAhQhREiBAhCiJEiBAFESJEiIIIESJEtfRzl/cRL/VNonUOss4u700iRIiCCBEiREGECBGiIEKECFEQIUKEKIgQIUIURIgQBREiRIiCCBEiREGECBGiIEKECFEQIUKEKIgQIUIURIgQBREiRIiCCBEiREGECBGiIEKECFEQIUKEKIgQIUIURIgQBREiRIiCCBEiREGECBGiIEKECFEQIUKEKIgQIQoiRIgQBREiRIiCCBEiREGECBGiIEKECFEQIUKEKIgQIQoiRIgQBREiRIiCCBEiREGECBGitnQTYAAk0fJFyzB3ywAAAABJRU5ErkJggg==)\n 50% 0 no-repeat;\n min-height: 24px;\n padding: 3px 7px;\n }\n\n .line-type.solid {\n background-position: 50% 14px;\n }\n .line-type.round-dot {\n background-position: 50% -36px;\n }\n .line-type.square-dot {\n background-position: 50% -86px;\n }\n .line-type.dash {\n background-position: 50% -136px;\n }\n .line-type.dash-dot {\n background-position: 50% -186px;\n }\n .line-type.long-dash {\n background-position: 50% -236px;\n }\n .line-type.long-dash-dot {\n background-position: 50% -286px;\n }\n .line-type.long-dash-dot-dot {\n background-position: 50% -336px;\n }\n </style>\n\n <div class=\"container md-typescale-body-large-prominent\">\n <ox-select\n name=${name}\n @change=${(e: Event) => {\n console.log((e.target as HTMLInputElement).value)\n }}\n placeholder=${placeholder}\n .value=${value}\n ?disabled=${disabled}\n >\n ${slot}\n </ox-select>\n </div>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n placeholder: 'single select',\n name: 'label',\n value: '',\n slot: html`\n <div class=\"line-type dash\" slot=\"label\"></div>\n <ox-popup-list align-left nowrap>\n <div class=\"line-type solid\" value=\"solid\" option></div>\n <div class=\"line-type round-dot\" value=\"round-dot\" option></div>\n <div class=\"line-type square-dot\" value=\"square-dot\" option></div>\n <div class=\"line-type dash\" value=\"dash\" option></div>\n <div class=\"line-type dash-dot\" value=\"dash-dot\" option></div>\n <div class=\"line-type long-dash\" value=\"long-dash\" option></div>\n <div class=\"line-type long-dash-dot\" value=\"long-dash-dot\" option></div>\n <div class=\"line-type long-dash-dot-dot\" value=\"long-dash-dot-dot\" option></div>\n </ox-popup-list>\n `\n}\n"]}
|
@@ -1,48 +0,0 @@
|
|
1
|
-
import '../src/ox-select.js';
|
2
|
-
import '../src/ox-checkbox.js';
|
3
|
-
import { TemplateResult } from 'lit';
|
4
|
-
declare const _default: {
|
5
|
-
title: string;
|
6
|
-
component: string;
|
7
|
-
argTypes: {
|
8
|
-
placeholder: {
|
9
|
-
control: string;
|
10
|
-
};
|
11
|
-
name: {
|
12
|
-
control: string;
|
13
|
-
};
|
14
|
-
options: {
|
15
|
-
control: string;
|
16
|
-
};
|
17
|
-
multiple: {
|
18
|
-
control: string;
|
19
|
-
};
|
20
|
-
withSearch: {
|
21
|
-
control: string;
|
22
|
-
};
|
23
|
-
disabled: {
|
24
|
-
control: string;
|
25
|
-
};
|
26
|
-
};
|
27
|
-
};
|
28
|
-
export default _default;
|
29
|
-
interface Story<T> {
|
30
|
-
(args: T): TemplateResult;
|
31
|
-
args?: Partial<T>;
|
32
|
-
argTypes?: Record<string, unknown>;
|
33
|
-
}
|
34
|
-
interface ArgTypes {
|
35
|
-
placeholder?: string;
|
36
|
-
name?: string;
|
37
|
-
value?: object | string;
|
38
|
-
options?: string[] | {
|
39
|
-
display: string;
|
40
|
-
value: string;
|
41
|
-
}[];
|
42
|
-
multiple?: boolean;
|
43
|
-
withSearch?: boolean;
|
44
|
-
disabled?: boolean;
|
45
|
-
}
|
46
|
-
export declare const Regular: Story<ArgTypes>;
|
47
|
-
export declare const MultipleSelect: Story<ArgTypes>;
|
48
|
-
export declare const MultipleWithCheckbox: Story<ArgTypes>;
|
@@ -1,178 +0,0 @@
|
|
1
|
-
import '../src/ox-select.js';
|
2
|
-
import '../src/ox-checkbox.js';
|
3
|
-
import { html } from 'lit';
|
4
|
-
import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles.js';
|
5
|
-
export default {
|
6
|
-
title: 'ox-select-set-options',
|
7
|
-
component: 'ox-select',
|
8
|
-
argTypes: {
|
9
|
-
placeholder: { control: 'text' },
|
10
|
-
name: { control: 'text' },
|
11
|
-
options: { control: 'object' },
|
12
|
-
multiple: { control: 'boolean' },
|
13
|
-
withSearch: { control: 'boolean' },
|
14
|
-
disabled: { control: 'boolean' }
|
15
|
-
}
|
16
|
-
};
|
17
|
-
const Template = ({ placeholder = 'Checkbox', name = 'hello', value = '', options = [], multiple, withSearch, disabled }) => html `
|
18
|
-
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
19
|
-
|
20
|
-
<link href="/themes/light.css" rel="stylesheet" />
|
21
|
-
<link href="/themes/dark.css" rel="stylesheet" />
|
22
|
-
<link href="/themes/spacing.css" rel="stylesheet" />
|
23
|
-
|
24
|
-
<link
|
25
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
26
|
-
rel="stylesheet"
|
27
|
-
/>
|
28
|
-
<link
|
29
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
30
|
-
rel="stylesheet"
|
31
|
-
/>
|
32
|
-
<link
|
33
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
34
|
-
rel="stylesheet"
|
35
|
-
/>
|
36
|
-
|
37
|
-
<style>
|
38
|
-
${MDTypeScaleStyles.cssText}
|
39
|
-
</style>
|
40
|
-
|
41
|
-
<style>
|
42
|
-
.container {
|
43
|
-
height: 500px;
|
44
|
-
text-align: center;
|
45
|
-
padding: 20px;
|
46
|
-
|
47
|
-
background-color: var(--md-sys-color-primary-container);
|
48
|
-
color: var(--md-sys-color-on-primary-container);
|
49
|
-
}
|
50
|
-
</style>
|
51
|
-
|
52
|
-
<div class="container md-typescale-body-large-prominent">
|
53
|
-
<ox-select
|
54
|
-
name=${name}
|
55
|
-
@change=${(e) => {
|
56
|
-
console.log(e.target.value);
|
57
|
-
}}
|
58
|
-
placeholder=${placeholder}
|
59
|
-
.value=${value}
|
60
|
-
?disabled=${disabled}
|
61
|
-
>
|
62
|
-
</ox-select>
|
63
|
-
|
64
|
-
<input
|
65
|
-
type="button"
|
66
|
-
value="set options"
|
67
|
-
@click=${() => {
|
68
|
-
const select = document.querySelector('ox-select');
|
69
|
-
select.setOptions(options, { multiple, withSearch });
|
70
|
-
select.value = JSON.parse(JSON.stringify(value));
|
71
|
-
}}
|
72
|
-
/>
|
73
|
-
</div>
|
74
|
-
`;
|
75
|
-
export const Regular = Template.bind({});
|
76
|
-
Regular.args = {
|
77
|
-
placeholder: 'single select',
|
78
|
-
name: 'label',
|
79
|
-
value: '',
|
80
|
-
multiple: false,
|
81
|
-
options: [
|
82
|
-
{
|
83
|
-
value: 'A',
|
84
|
-
display: 'LABEL-A'
|
85
|
-
},
|
86
|
-
{
|
87
|
-
value: 'B',
|
88
|
-
display: 'LABEL-B'
|
89
|
-
},
|
90
|
-
{
|
91
|
-
value: 'C',
|
92
|
-
display: 'LABEL-C'
|
93
|
-
},
|
94
|
-
{
|
95
|
-
value: 'TOO LONG VALUE',
|
96
|
-
display: 'LABEL-TOO LONG VALUE'
|
97
|
-
}
|
98
|
-
]
|
99
|
-
};
|
100
|
-
export const MultipleSelect = Template.bind({});
|
101
|
-
MultipleSelect.args = {
|
102
|
-
placeholder: 'multiple select',
|
103
|
-
name: 'multiple',
|
104
|
-
multiple: true,
|
105
|
-
withSearch: true,
|
106
|
-
value: ['B', 'TOO LONG VALUE'],
|
107
|
-
options: [
|
108
|
-
'A',
|
109
|
-
'B',
|
110
|
-
'C',
|
111
|
-
'D',
|
112
|
-
'E',
|
113
|
-
'F',
|
114
|
-
'G',
|
115
|
-
'H',
|
116
|
-
'I',
|
117
|
-
'J',
|
118
|
-
'K',
|
119
|
-
'L',
|
120
|
-
'M',
|
121
|
-
'O',
|
122
|
-
'P',
|
123
|
-
'Q',
|
124
|
-
'R',
|
125
|
-
'S',
|
126
|
-
'T',
|
127
|
-
'U',
|
128
|
-
'V',
|
129
|
-
'W',
|
130
|
-
'X',
|
131
|
-
'Y',
|
132
|
-
'Z',
|
133
|
-
'TOO LONG VALUE'
|
134
|
-
]
|
135
|
-
};
|
136
|
-
export const MultipleWithCheckbox = Template.bind({});
|
137
|
-
MultipleWithCheckbox.args = {
|
138
|
-
placeholder: 'multiple with checkbox',
|
139
|
-
name: 'multiple',
|
140
|
-
multiple: true,
|
141
|
-
withSearch: true,
|
142
|
-
value: ['B', 'C', 'F'],
|
143
|
-
options: [
|
144
|
-
{
|
145
|
-
value: 'A',
|
146
|
-
display: 'A'
|
147
|
-
},
|
148
|
-
{
|
149
|
-
value: 'B',
|
150
|
-
display: 'B'
|
151
|
-
},
|
152
|
-
{
|
153
|
-
value: 'C',
|
154
|
-
display: 'C'
|
155
|
-
},
|
156
|
-
{
|
157
|
-
value: 'D',
|
158
|
-
display: 'D'
|
159
|
-
},
|
160
|
-
{
|
161
|
-
value: 'E',
|
162
|
-
display: 'E'
|
163
|
-
},
|
164
|
-
{
|
165
|
-
value: 'F',
|
166
|
-
display: 'F'
|
167
|
-
},
|
168
|
-
{
|
169
|
-
value: 'G',
|
170
|
-
display: 'G'
|
171
|
-
},
|
172
|
-
{
|
173
|
-
value: 'TOO LONG VALUE',
|
174
|
-
display: 'TOO LONG VALUE'
|
175
|
-
}
|
176
|
-
]
|
177
|
-
};
|
178
|
-
//# sourceMappingURL=ox-select-set-options.stories.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"ox-select-set-options.stories.js","sourceRoot":"","sources":["../../stories/ox-select-set-options.stories.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAA;AAC5B,OAAO,uBAAuB,CAAA;AAG9B,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,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AAK,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;IACtB,OAAO,EAAE;QACP;YACE,KAAK,EAAE,GAAG;YACV,OAAO,EAAE,GAAG;SACb;QACD;YACE,KAAK,EAAE,GAAG;YACV,OAAO,EAAE,GAAG;SACb;QACD;YACE,KAAK,EAAE,GAAG;YACV,OAAO,EAAE,GAAG;SACb;QACD;YACE,KAAK,EAAE,GAAG;YACV,OAAO,EAAE,GAAG;SACb;QACD;YACE,KAAK,EAAE,GAAG;YACV,OAAO,EAAE,GAAG;SACb;QACD;YACE,KAAK,EAAE,GAAG;YACV,OAAO,EAAE,GAAG;SACb;QACD;YACE,KAAK,EAAE,GAAG;YACV,OAAO,EAAE,GAAG;SACb;QACD;YACE,KAAK,EAAE,gBAAgB;YACvB,OAAO,EAAE,gBAAgB;SAC1B;KACF;CACF,CAAA","sourcesContent":["import '../src/ox-select.js'\nimport '../src/ox-checkbox.js'\n\nimport { OxSelect } from '../src/ox-select.js'\nimport { html, TemplateResult } from 'lit'\nimport { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles.js'\n\nexport default {\n title: 'ox-select-set-options',\n component: 'ox-select',\n argTypes: {\n placeholder: { control: 'text' },\n name: { control: 'text' },\n options: { control: 'object' },\n multiple: { control: 'boolean' },\n withSearch: { 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 placeholder?: string\n name?: string\n value?: object | string\n options?: string[] | { display: string; value: string }[]\n multiple?: boolean\n withSearch?: boolean\n disabled?: boolean\n}\n\nconst Template: Story<ArgTypes> = ({\n placeholder = 'Checkbox',\n name = 'hello',\n value = '',\n options = [],\n multiple,\n withSearch,\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\n background-color: var(--md-sys-color-primary-container);\n color: var(--md-sys-color-on-primary-container);\n }\n </style>\n\n <div class=\"container md-typescale-body-large-prominent\">\n <ox-select\n name=${name}\n @change=${(e: Event) => {\n console.log((e.target as HTMLInputElement).value)\n }}\n placeholder=${placeholder}\n .value=${value}\n ?disabled=${disabled}\n >\n </ox-select>\n\n <input\n type=\"button\"\n value=\"set options\"\n @click=${() => {\n const select = document.querySelector('ox-select') as OxSelect\n select.setOptions(options, { multiple, withSearch })\n select.value = JSON.parse(JSON.stringify(value))\n }}\n />\n </div>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n placeholder: 'single select',\n name: 'label',\n value: '',\n multiple: false,\n options: [\n {\n value: 'A',\n display: 'LABEL-A'\n },\n {\n value: 'B',\n display: 'LABEL-B'\n },\n {\n value: 'C',\n display: 'LABEL-C'\n },\n {\n value: 'TOO LONG VALUE',\n display: 'LABEL-TOO LONG VALUE'\n }\n ]\n}\n\nexport const MultipleSelect = Template.bind({})\nMultipleSelect.args = {\n placeholder: 'multiple select',\n name: 'multiple',\n multiple: true,\n withSearch: true,\n value: ['B', 'TOO LONG VALUE'],\n options: [\n 'A',\n 'B',\n 'C',\n 'D',\n 'E',\n 'F',\n 'G',\n 'H',\n 'I',\n 'J',\n 'K',\n 'L',\n 'M',\n 'O',\n 'P',\n 'Q',\n 'R',\n 'S',\n 'T',\n 'U',\n 'V',\n 'W',\n 'X',\n 'Y',\n 'Z',\n 'TOO LONG VALUE'\n ]\n}\n\nexport const MultipleWithCheckbox = Template.bind({})\nMultipleWithCheckbox.args = {\n placeholder: 'multiple with checkbox',\n name: 'multiple',\n multiple: true,\n withSearch: true,\n value: ['B', 'C', 'F'],\n options: [\n {\n value: 'A',\n display: 'A'\n },\n {\n value: 'B',\n display: 'B'\n },\n {\n value: 'C',\n display: 'C'\n },\n {\n value: 'D',\n display: 'D'\n },\n {\n value: 'E',\n display: 'E'\n },\n {\n value: 'F',\n display: 'F'\n },\n {\n value: 'G',\n display: 'G'\n },\n {\n value: 'TOO LONG VALUE',\n display: 'TOO LONG VALUE'\n }\n ]\n}\n"]}
|