@operato/input 1.0.0-beta.2 → 1.0.0-beta.20
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/.storybook/main.js +2 -2
- package/.storybook/server.mjs +4 -4
- package/CHANGELOG.md +398 -0
- package/demo/index-multiple-colors.html +4 -1
- package/demo/index-partition-keys.html +2 -5
- package/demo/index-select.html +1 -1
- package/demo/index.html +4 -0
- package/dist/src/locales/en.d.ts +8 -0
- package/dist/src/locales/en.js +8 -0
- package/dist/src/locales/en.js.map +1 -1
- package/dist/src/locales/ko.d.ts +8 -0
- package/dist/src/locales/ko.js +8 -0
- package/dist/src/locales/ko.js.map +1 -1
- package/dist/src/locales/ms.d.ts +8 -0
- package/dist/src/locales/ms.js +8 -0
- package/dist/src/locales/ms.js.map +1 -1
- package/dist/src/locales/zh.d.ts +8 -0
- package/dist/src/locales/zh.js +8 -0
- package/dist/src/locales/zh.js.map +1 -1
- package/dist/src/ox-input-3dish.js +24 -8
- package/dist/src/ox-input-3dish.js.map +1 -1
- package/dist/src/ox-input-color.js +16 -11
- package/dist/src/ox-input-color.js.map +1 -1
- package/dist/src/ox-input-crontab.js +13 -10
- package/dist/src/ox-input-crontab.js.map +1 -1
- package/dist/src/ox-input-file.js +5 -3
- package/dist/src/ox-input-file.js.map +1 -1
- package/dist/src/ox-input-multiple-colors.d.ts +1 -0
- package/dist/src/ox-input-multiple-colors.js +29 -21
- package/dist/src/ox-input-multiple-colors.js.map +1 -1
- package/dist/src/ox-input-options.d.ts +1 -0
- package/dist/src/ox-input-options.js +54 -14
- package/dist/src/ox-input-options.js.map +1 -1
- package/dist/src/ox-input-partition-keys.d.ts +1 -0
- package/dist/src/ox-input-partition-keys.js +51 -23
- package/dist/src/ox-input-partition-keys.js.map +1 -1
- package/dist/src/ox-input-range.js +35 -38
- package/dist/src/ox-input-range.js.map +1 -1
- package/dist/src/ox-input-search.d.ts +0 -1
- package/dist/src/ox-input-search.js +14 -7
- package/dist/src/ox-input-search.js.map +1 -1
- package/dist/src/ox-input-unit.d.ts +17 -0
- package/dist/src/ox-input-unit.js +122 -0
- package/dist/src/ox-input-unit.js.map +1 -0
- package/dist/src/ox-input-work-shift.js +77 -43
- package/dist/src/ox-input-work-shift.js.map +1 -1
- package/dist/src/ox-select.js +12 -1
- package/dist/src/ox-select.js.map +1 -1
- package/dist/stories/ox-checkbox.stories.d.ts +39 -0
- package/dist/stories/ox-checkbox.stories.js +44 -0
- package/dist/stories/ox-checkbox.stories.js.map +1 -0
- package/dist/stories/ox-input-3dish.stories.d.ts +26 -0
- package/dist/stories/ox-input-3dish.stories.js +59 -0
- package/dist/stories/ox-input-3dish.stories.js.map +1 -0
- package/dist/stories/{index.stories.d.ts → ox-input-barcode.stories.d.ts} +11 -11
- package/dist/stories/ox-input-barcode.stories.js +22 -0
- package/dist/stories/ox-input-barcode.stories.js.map +1 -0
- package/dist/stories/ox-input-conntab.stories.d.ts +26 -0
- package/dist/stories/ox-input-conntab.stories.js +37 -0
- package/dist/stories/ox-input-conntab.stories.js.map +1 -0
- package/dist/stories/ox-input-crontab.stories.d.ts +26 -0
- package/dist/stories/ox-input-crontab.stories.js +37 -0
- package/dist/stories/ox-input-crontab.stories.js.map +1 -0
- package/dist/stories/ox-input-file.stories.d.ts +49 -0
- package/dist/stories/ox-input-file.stories.js +48 -0
- package/dist/stories/ox-input-file.stories.js.map +1 -0
- package/dist/stories/ox-input-multiple-colors.stories.d.ts +20 -0
- package/dist/stories/ox-input-multiple-colors.stories.js +167 -0
- package/dist/stories/ox-input-multiple-colors.stories.js.map +1 -0
- package/dist/stories/ox-input-options.stories.d.ts +25 -0
- package/dist/stories/ox-input-options.stories.js +33 -0
- package/dist/stories/ox-input-options.stories.js.map +1 -0
- package/dist/stories/ox-input-partition-keys.stories.d.ts +27 -0
- package/dist/stories/ox-input-partition-keys.stories.js +55 -0
- package/dist/stories/ox-input-partition-keys.stories.js.map +1 -0
- package/dist/stories/ox-input-range.stories.d.ts +37 -0
- package/dist/stories/ox-input-range.stories.js +28 -0
- package/dist/stories/ox-input-range.stories.js.map +1 -0
- package/dist/stories/ox-input-search.stories.d.ts +29 -0
- package/dist/stories/ox-input-search.stories.js +32 -0
- package/dist/stories/ox-input-search.stories.js.map +1 -0
- package/dist/stories/ox-input-unit.stories.d.ts +40 -0
- package/dist/stories/ox-input-unit.stories.js +42 -0
- package/dist/stories/ox-input-unit.stories.js.map +1 -0
- package/dist/stories/ox-input-work-shift.stories.d.ts +26 -0
- package/dist/stories/ox-input-work-shift.stories.js +59 -0
- package/dist/stories/ox-input-work-shift.stories.js.map +1 -0
- package/dist/stories/ox-select.stories.d.ts +30 -0
- package/dist/stories/ox-select.stories.js +83 -0
- package/dist/stories/ox-select.stories.js.map +1 -0
- package/dist/themes/common-grist-styles.d.ts +1 -0
- package/dist/themes/common-grist-styles.js +110 -0
- package/dist/themes/common-grist-styles.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +11 -11
- package/src/locales/en.ts +8 -0
- package/src/locales/ko.ts +8 -0
- package/src/locales/ms.ts +8 -0
- package/src/locales/zh.ts +8 -0
- package/src/ox-input-3dish.ts +24 -8
- package/src/ox-input-color.ts +17 -11
- package/src/ox-input-crontab.ts +13 -10
- package/src/ox-input-file.ts +7 -6
- package/src/ox-input-multiple-colors.ts +29 -21
- package/src/ox-input-options.ts +53 -13
- package/src/ox-input-partition-keys.ts +51 -22
- package/src/ox-input-range.ts +35 -38
- package/src/ox-input-search.ts +14 -8
- package/src/ox-input-unit.ts +123 -0
- package/src/ox-input-work-shift.ts +78 -43
- package/src/ox-select.ts +15 -3
- package/stories/ox-checkbox.stories.ts +69 -0
- package/stories/ox-input-3dish.stories.ts +73 -0
- package/stories/ox-input-barcode.stories.ts +38 -0
- package/stories/ox-input-code.stories.ts_ +71 -0
- package/stories/ox-input-crontab.stories.ts +51 -0
- package/stories/ox-input-file.stories.ts +77 -0
- package/stories/ox-input-multiple-colors.stories.ts +178 -0
- package/stories/ox-input-options.stories.ts +47 -0
- package/stories/ox-input-partition-keys.stories.ts +71 -0
- package/stories/ox-input-range.stories.ts +45 -0
- package/stories/ox-input-search.stories.ts +47 -0
- package/stories/ox-input-unit.stories.ts +66 -0
- package/stories/ox-input-work-shift.stories.ts +73 -0
- package/stories/ox-select.stories.ts +101 -0
- package/themes/app-theme.css +142 -0
- package/themes/common-grist-styles.ts +110 -0
- package/themes/input-theme.css +19 -0
- package/xliff/en.xlf +24 -0
- package/xliff/ko.xlf +32 -0
- package/xliff/ms.xlf +24 -0
- package/xliff/zh.xlf +24 -0
- package/dist/stories/index.stories.js +0 -33
- package/dist/stories/index.stories.js.map +0 -1
- package/stories/index.stories.ts +0 -52
@@ -0,0 +1,55 @@
|
|
1
|
+
import '../src/ox-input-partition-keys.js';
|
2
|
+
import { html } from 'lit';
|
3
|
+
export default {
|
4
|
+
title: 'ox-input-partition-keys',
|
5
|
+
component: 'ox-input-partition-keys',
|
6
|
+
argTypes: {
|
7
|
+
value: { control: 'object' },
|
8
|
+
name: { control: 'text' }
|
9
|
+
}
|
10
|
+
};
|
11
|
+
const Template = ({ name = 'partition-keys', value = {} }) => html `
|
12
|
+
<link href="/themes/app-theme.css" rel="stylesheet" />
|
13
|
+
<link href="https://fonts.googleapis.com/css?family=Material+Icons&display=block" rel="stylesheet" />
|
14
|
+
<style>
|
15
|
+
body {
|
16
|
+
}
|
17
|
+
</style>
|
18
|
+
|
19
|
+
<ox-input-partition-keys
|
20
|
+
@change=${(e) => {
|
21
|
+
console.log(e.target.value);
|
22
|
+
}}
|
23
|
+
name=${name}
|
24
|
+
.value=${value}
|
25
|
+
>
|
26
|
+
</ox-input-partition-keys>
|
27
|
+
`;
|
28
|
+
export const Regular = Template.bind({});
|
29
|
+
Regular.args = {
|
30
|
+
name: 'partition-keys',
|
31
|
+
value: {
|
32
|
+
A: 'A',
|
33
|
+
B: 'B',
|
34
|
+
C: 'C'
|
35
|
+
}
|
36
|
+
};
|
37
|
+
export const BooleanValues = Template.bind({});
|
38
|
+
BooleanValues.args = {
|
39
|
+
name: 'partition-keys',
|
40
|
+
value: {
|
41
|
+
A: true,
|
42
|
+
B: false,
|
43
|
+
C: true
|
44
|
+
}
|
45
|
+
};
|
46
|
+
export const ColorValues = Template.bind({});
|
47
|
+
ColorValues.args = {
|
48
|
+
name: 'partition-keys',
|
49
|
+
value: {
|
50
|
+
A: 'red',
|
51
|
+
B: 'yellow',
|
52
|
+
C: 'blue'
|
53
|
+
}
|
54
|
+
};
|
55
|
+
//# sourceMappingURL=ox-input-partition-keys.stories.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ox-input-partition-keys.stories.js","sourceRoot":"","sources":["../../stories/ox-input-partition-keys.stories.ts"],"names":[],"mappings":"AAAA,OAAO,mCAAmC,CAAA;AAE1C,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAE1C,eAAe;IACb,KAAK,EAAE,yBAAyB;IAChC,SAAS,EAAE,yBAAyB;IACpC,QAAQ,EAAE;QACR,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QAC5B,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;KAC1B;CACF,CAAA;AAaD,MAAM,QAAQ,GAAoB,CAAC,EAAE,IAAI,GAAG,gBAAgB,EAAE,KAAK,GAAG,EAAE,EAAY,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;cAS/E,CAAC,CAAQ,EAAE,EAAE;IACrB,OAAO,CAAC,GAAG,CAAE,CAAC,CAAC,MAA2B,CAAC,KAAK,CAAC,CAAA;AACnD,CAAC;WACM,IAAI;aACF,KAAK;;;CAGjB,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG;IACb,IAAI,EAAE,gBAAgB;IACtB,KAAK,EAAE;QACL,CAAC,EAAE,GAAG;QACN,CAAC,EAAE,GAAG;QACN,CAAC,EAAE,GAAG;KACP;CACF,CAAA;AAED,MAAM,CAAC,MAAM,aAAa,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AAC9C,aAAa,CAAC,IAAI,GAAG;IACnB,IAAI,EAAE,gBAAgB;IACtB,KAAK,EAAE;QACL,CAAC,EAAE,IAAI;QACP,CAAC,EAAE,KAAK;QACR,CAAC,EAAE,IAAI;KACR;CACF,CAAA;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AAC5C,WAAW,CAAC,IAAI,GAAG;IACjB,IAAI,EAAE,gBAAgB;IACtB,KAAK,EAAE;QACL,CAAC,EAAE,KAAK;QACR,CAAC,EAAE,QAAQ;QACX,CAAC,EAAE,MAAM;KACV;CACF,CAAA","sourcesContent":["import '../src/ox-input-partition-keys.js'\n\nimport { html, TemplateResult } from 'lit'\n\nexport default {\n title: 'ox-input-partition-keys',\n component: 'ox-input-partition-keys',\n argTypes: {\n value: { control: 'object' },\n name: { control: 'text' }\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}\n\nconst Template: Story<ArgTypes> = ({ name = 'partition-keys', value = {} }: ArgTypes) => html`\n <link href=\"/themes/app-theme.css\" rel=\"stylesheet\" />\n <link href=\"https://fonts.googleapis.com/css?family=Material+Icons&display=block\" rel=\"stylesheet\" />\n <style>\n body {\n }\n </style>\n\n <ox-input-partition-keys\n @change=${(e: Event) => {\n console.log((e.target as HTMLInputElement).value)\n }}\n name=${name}\n .value=${value}\n >\n </ox-input-partition-keys>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n name: 'partition-keys',\n value: {\n A: 'A',\n B: 'B',\n C: 'C'\n }\n}\n\nexport const BooleanValues = Template.bind({})\nBooleanValues.args = {\n name: 'partition-keys',\n value: {\n A: true,\n B: false,\n C: true\n }\n}\n\nexport const ColorValues = Template.bind({})\nColorValues.args = {\n name: 'partition-keys',\n value: {\n A: 'red',\n B: 'yellow',\n C: 'blue'\n }\n}\n"]}
|
@@ -0,0 +1,37 @@
|
|
1
|
+
import '../src/ox-input-range.js';
|
2
|
+
import { TemplateResult } from 'lit';
|
3
|
+
declare const _default: {
|
4
|
+
title: string;
|
5
|
+
component: string;
|
6
|
+
argTypes: {
|
7
|
+
name: {
|
8
|
+
control: string;
|
9
|
+
};
|
10
|
+
value: {
|
11
|
+
control: string;
|
12
|
+
};
|
13
|
+
step: {
|
14
|
+
control: string;
|
15
|
+
};
|
16
|
+
min: {
|
17
|
+
control: string;
|
18
|
+
};
|
19
|
+
max: {
|
20
|
+
control: string;
|
21
|
+
};
|
22
|
+
};
|
23
|
+
};
|
24
|
+
export default _default;
|
25
|
+
interface Story<T> {
|
26
|
+
(args: T): TemplateResult;
|
27
|
+
args?: Partial<T>;
|
28
|
+
argTypes?: Record<string, unknown>;
|
29
|
+
}
|
30
|
+
interface ArgTypes {
|
31
|
+
name?: string;
|
32
|
+
value?: number;
|
33
|
+
step?: number;
|
34
|
+
min?: number;
|
35
|
+
max?: number;
|
36
|
+
}
|
37
|
+
export declare const Regular: Story<ArgTypes>;
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import '../src/ox-input-range.js';
|
2
|
+
import { html } from 'lit';
|
3
|
+
export default {
|
4
|
+
title: 'ox-input-range',
|
5
|
+
component: 'ox-input-range',
|
6
|
+
argTypes: {
|
7
|
+
name: { control: 'text' },
|
8
|
+
value: { control: 'number' },
|
9
|
+
step: { control: 'number' },
|
10
|
+
min: { control: 'number' },
|
11
|
+
max: { control: 'number' }
|
12
|
+
}
|
13
|
+
};
|
14
|
+
const Template = ({ name = 'range', value = 0, step = 1, min = 0, max = 100 }) => html `
|
15
|
+
<link href="/themes/app-theme.css" rel="stylesheet" />
|
16
|
+
<link href="https://fonts.googleapis.com/css?family=Material+Icons&display=block" rel="stylesheet" />
|
17
|
+
|
18
|
+
<ox-input-range name=${name} value=${value} step=${step} min=${min} max=${max}> </ox-input-range>
|
19
|
+
`;
|
20
|
+
export const Regular = Template.bind({});
|
21
|
+
Regular.args = {
|
22
|
+
name: 'range',
|
23
|
+
value: 0,
|
24
|
+
step: 1,
|
25
|
+
min: 0,
|
26
|
+
max: 100
|
27
|
+
};
|
28
|
+
//# sourceMappingURL=ox-input-range.stories.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ox-input-range.stories.js","sourceRoot":"","sources":["../../stories/ox-input-range.stories.ts"],"names":[],"mappings":"AAAA,OAAO,0BAA0B,CAAA;AAEjC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAE1C,eAAe;IACb,KAAK,EAAE,gBAAgB;IACvB,SAAS,EAAE,gBAAgB;IAC3B,QAAQ,EAAE;QACR,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QACzB,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QAC5B,IAAI,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QAC3B,GAAG,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QAC1B,GAAG,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;KAC3B;CACF,CAAA;AAgBD,MAAM,QAAQ,GAAoB,CAAC,EAAE,IAAI,GAAG,OAAO,EAAE,KAAK,GAAG,CAAC,EAAE,IAAI,GAAG,CAAC,EAAE,GAAG,GAAG,CAAC,EAAE,GAAG,GAAG,GAAG,EAAY,EAAE,EAAE,CAAC,IAAI,CAAA;;;;yBAIxF,IAAI,UAAU,KAAK,SAAS,IAAI,QAAQ,GAAG,QAAQ,GAAG;CAC9E,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG;IACb,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,CAAC;IACR,IAAI,EAAE,CAAC;IACP,GAAG,EAAE,CAAC;IACN,GAAG,EAAE,GAAG;CACT,CAAA","sourcesContent":["import '../src/ox-input-range.js'\n\nimport { html, TemplateResult } from 'lit'\n\nexport default {\n title: 'ox-input-range',\n component: 'ox-input-range',\n argTypes: {\n name: { control: 'text' },\n value: { control: 'number' },\n step: { control: 'number' },\n min: { control: 'number' },\n max: { 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 name?: string\n value?: number\n step?: number\n min?: number\n max?: number\n}\n\nconst Template: Story<ArgTypes> = ({ name = 'range', value = 0, step = 1, min = 0, max = 100 }: ArgTypes) => html`\n <link href=\"/themes/app-theme.css\" rel=\"stylesheet\" />\n <link href=\"https://fonts.googleapis.com/css?family=Material+Icons&display=block\" rel=\"stylesheet\" />\n\n <ox-input-range name=${name} value=${value} step=${step} min=${min} max=${max}> </ox-input-range>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n name: 'range',\n value: 0,\n step: 1,\n min: 0,\n max: 100\n}\n"]}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import '../src/ox-input-search.js';
|
2
|
+
import { TemplateResult } from 'lit';
|
3
|
+
declare const _default: {
|
4
|
+
title: string;
|
5
|
+
component: string;
|
6
|
+
argTypes: {
|
7
|
+
placeholder: {
|
8
|
+
control: string;
|
9
|
+
};
|
10
|
+
name: {
|
11
|
+
control: string;
|
12
|
+
};
|
13
|
+
value: {
|
14
|
+
control: string;
|
15
|
+
};
|
16
|
+
};
|
17
|
+
};
|
18
|
+
export default _default;
|
19
|
+
interface Story<T> {
|
20
|
+
(args: T): TemplateResult;
|
21
|
+
args?: Partial<T>;
|
22
|
+
argTypes?: Record<string, unknown>;
|
23
|
+
}
|
24
|
+
interface ArgTypes {
|
25
|
+
placeholder?: string;
|
26
|
+
name?: string;
|
27
|
+
value?: string;
|
28
|
+
}
|
29
|
+
export declare const Regular: Story<ArgTypes>;
|
@@ -0,0 +1,32 @@
|
|
1
|
+
import '../src/ox-input-search.js';
|
2
|
+
import { html } from 'lit';
|
3
|
+
export default {
|
4
|
+
title: 'ox-input-search',
|
5
|
+
component: 'ox-input-search',
|
6
|
+
argTypes: {
|
7
|
+
placeholder: { control: 'text' },
|
8
|
+
name: { control: 'text' },
|
9
|
+
value: { control: 'text' }
|
10
|
+
}
|
11
|
+
};
|
12
|
+
const Template = ({ placeholder = 'Search', name = 'hello', value = '' }) => html `
|
13
|
+
<link href="/themes/app-theme.css" rel="stylesheet" />
|
14
|
+
<link href="https://fonts.googleapis.com/css?family=Material+Icons&display=block" rel="stylesheet" />
|
15
|
+
<style>
|
16
|
+
body {
|
17
|
+
}
|
18
|
+
</style>
|
19
|
+
|
20
|
+
<ox-input-search
|
21
|
+
@change=${(e) => console.log('changed', e.target.value)}
|
22
|
+
name=${name}
|
23
|
+
.checked=${value}
|
24
|
+
>
|
25
|
+
</ox-input-search>
|
26
|
+
`;
|
27
|
+
export const Regular = Template.bind({});
|
28
|
+
Regular.args = {
|
29
|
+
placeholder: 'label',
|
30
|
+
name: 'label'
|
31
|
+
};
|
32
|
+
//# sourceMappingURL=ox-input-search.stories.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ox-input-search.stories.js","sourceRoot":"","sources":["../../stories/ox-input-search.stories.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAA;AAElC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAE1C,eAAe;IACb,KAAK,EAAE,iBAAiB;IACxB,SAAS,EAAE,iBAAiB;IAC5B,QAAQ,EAAE;QACR,WAAW,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QAChC,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QACzB,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;KAC3B;CACF,CAAA;AAcD,MAAM,QAAQ,GAAoB,CAAC,EAAE,WAAW,GAAG,QAAQ,EAAE,IAAI,GAAG,OAAO,EAAE,KAAK,GAAG,EAAE,EAAY,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;cAS9F,CAAC,CAAQ,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,EAAG,CAAC,CAAC,MAA2B,CAAC,KAAK,CAAC;WAC7E,IAAI;eACA,KAAK;;;CAGnB,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG;IACb,WAAW,EAAE,OAAO;IACpB,IAAI,EAAE,OAAO;CACd,CAAA","sourcesContent":["import '../src/ox-input-search.js'\n\nimport { html, TemplateResult } from 'lit'\n\nexport default {\n title: 'ox-input-search',\n component: 'ox-input-search',\n argTypes: {\n placeholder: { control: 'text' },\n name: { control: 'text' },\n value: { control: 'text' }\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?: string\n}\n\nconst Template: Story<ArgTypes> = ({ placeholder = 'Search', name = 'hello', value = '' }: ArgTypes) => html`\n <link href=\"/themes/app-theme.css\" rel=\"stylesheet\" />\n <link href=\"https://fonts.googleapis.com/css?family=Material+Icons&display=block\" rel=\"stylesheet\" />\n <style>\n body {\n }\n </style>\n\n <ox-input-search\n @change=${(e: Event) => console.log('changed', (e.target as HTMLInputElement).value)}\n name=${name}\n .checked=${value}\n >\n </ox-input-search>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n placeholder: 'label',\n name: 'label'\n}\n"]}
|
@@ -0,0 +1,40 @@
|
|
1
|
+
import '../src/ox-input-unit.js';
|
2
|
+
import { TemplateResult } from 'lit';
|
3
|
+
declare const _default: {
|
4
|
+
title: string;
|
5
|
+
component: string;
|
6
|
+
argTypes: {
|
7
|
+
placeholder: {
|
8
|
+
control: string;
|
9
|
+
};
|
10
|
+
name: {
|
11
|
+
control: string;
|
12
|
+
};
|
13
|
+
value: {
|
14
|
+
control: string;
|
15
|
+
};
|
16
|
+
stdUnit: {
|
17
|
+
control: string;
|
18
|
+
options: string[];
|
19
|
+
};
|
20
|
+
userUnit: {
|
21
|
+
control: string;
|
22
|
+
options: string[];
|
23
|
+
};
|
24
|
+
};
|
25
|
+
};
|
26
|
+
export default _default;
|
27
|
+
interface Story<T> {
|
28
|
+
(args: T): TemplateResult;
|
29
|
+
args?: Partial<T>;
|
30
|
+
argTypes?: Record<string, unknown>;
|
31
|
+
}
|
32
|
+
interface ArgTypes {
|
33
|
+
placeholder?: string;
|
34
|
+
name?: string;
|
35
|
+
value?: number;
|
36
|
+
stdUnit: string;
|
37
|
+
userUnit?: string;
|
38
|
+
}
|
39
|
+
export declare const Weight: Story<ArgTypes>;
|
40
|
+
export declare const Angle: Story<ArgTypes>;
|
@@ -0,0 +1,42 @@
|
|
1
|
+
import '../src/ox-input-unit.js';
|
2
|
+
import { html } from 'lit';
|
3
|
+
export default {
|
4
|
+
title: 'ox-input-unit',
|
5
|
+
component: 'ox-input-unit',
|
6
|
+
argTypes: {
|
7
|
+
placeholder: { control: 'text' },
|
8
|
+
name: { control: 'text' },
|
9
|
+
value: { control: 'number' },
|
10
|
+
stdUnit: { control: 'select', options: ['kg', 'rad'] },
|
11
|
+
userUnit: { control: 'select', options: ['mg', 'g', 'ton', 'degree'] }
|
12
|
+
}
|
13
|
+
};
|
14
|
+
const Template = ({ placeholder = 'unit', name = 'hello', value = 0, stdUnit = 'kg', userUnit }) => html `
|
15
|
+
<link href="/themes/app-theme.css" rel="stylesheet" />
|
16
|
+
<ox-input-unit
|
17
|
+
name=${name}
|
18
|
+
placeholder=${placeholder}
|
19
|
+
.value=${value}
|
20
|
+
std-unit=${stdUnit}
|
21
|
+
user-unit=${userUnit}
|
22
|
+
@change=${(e) => console.log(e.detail)}
|
23
|
+
>
|
24
|
+
</ox-input-unit>
|
25
|
+
`;
|
26
|
+
export const Weight = Template.bind({});
|
27
|
+
Weight.args = {
|
28
|
+
placeholder: 'weight',
|
29
|
+
name: 'weight',
|
30
|
+
value: 0,
|
31
|
+
stdUnit: 'kg',
|
32
|
+
userUnit: 'g'
|
33
|
+
};
|
34
|
+
export const Angle = Template.bind({});
|
35
|
+
Angle.args = {
|
36
|
+
placeholder: 'angle',
|
37
|
+
name: 'angle',
|
38
|
+
value: 0,
|
39
|
+
stdUnit: 'rad',
|
40
|
+
userUnit: 'degree'
|
41
|
+
};
|
42
|
+
//# sourceMappingURL=ox-input-unit.stories.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ox-input-unit.stories.js","sourceRoot":"","sources":["../../stories/ox-input-unit.stories.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAA;AAEhC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAE1C,eAAe;IACb,KAAK,EAAE,eAAe;IACtB,SAAS,EAAE,eAAe;IAC1B,QAAQ,EAAE;QACR,WAAW,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QAChC,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QACzB,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QAC5B,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE;QACtD,QAAQ,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,QAAQ,CAAC,EAAE;KACvE;CACF,CAAA;AAgBD,MAAM,QAAQ,GAAoB,CAAC,EACjC,WAAW,GAAG,MAAM,EACpB,IAAI,GAAG,OAAO,EACd,KAAK,GAAG,CAAC,EACT,OAAO,GAAG,IAAI,EACd,QAAQ,EACC,EAAE,EAAE,CAAC,IAAI,CAAA;;;WAGT,IAAI;kBACG,WAAW;aAChB,KAAK;eACH,OAAO;gBACN,QAAQ;cACV,CAAC,CAAc,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC;;;CAGtD,CAAA;AAED,MAAM,CAAC,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACvC,MAAM,CAAC,IAAI,GAAG;IACZ,WAAW,EAAE,QAAQ;IACrB,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,CAAC;IACR,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,GAAG;CACd,CAAA;AAED,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACtC,KAAK,CAAC,IAAI,GAAG;IACX,WAAW,EAAE,OAAO;IACpB,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,CAAC;IACR,OAAO,EAAE,KAAK;IACd,QAAQ,EAAE,QAAQ;CACnB,CAAA","sourcesContent":["import '../src/ox-input-unit.js'\n\nimport { html, TemplateResult } from 'lit'\n\nexport default {\n title: 'ox-input-unit',\n component: 'ox-input-unit',\n argTypes: {\n placeholder: { control: 'text' },\n name: { control: 'text' },\n value: { control: 'number' },\n stdUnit: { control: 'select', options: ['kg', 'rad'] },\n userUnit: { control: 'select', options: ['mg', 'g', 'ton', 'degree'] }\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?: number\n stdUnit: string\n userUnit?: string\n}\n\nconst Template: Story<ArgTypes> = ({\n placeholder = 'unit',\n name = 'hello',\n value = 0,\n stdUnit = 'kg',\n userUnit\n}: ArgTypes) => html`\n <link href=\"/themes/app-theme.css\" rel=\"stylesheet\" />\n <ox-input-unit\n name=${name}\n placeholder=${placeholder}\n .value=${value}\n std-unit=${stdUnit}\n user-unit=${userUnit}\n @change=${(e: CustomEvent) => console.log(e.detail)}\n >\n </ox-input-unit>\n`\n\nexport const Weight = Template.bind({})\nWeight.args = {\n placeholder: 'weight',\n name: 'weight',\n value: 0,\n stdUnit: 'kg',\n userUnit: 'g'\n}\n\nexport const Angle = Template.bind({})\nAngle.args = {\n placeholder: 'angle',\n name: 'angle',\n value: 0,\n stdUnit: 'rad',\n userUnit: 'degree'\n}\n"]}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import '../src/ox-input-work-shift.js';
|
2
|
+
import '../src/locale/locale-picker.js';
|
3
|
+
import { TemplateResult } from 'lit';
|
4
|
+
declare const _default: {
|
5
|
+
title: string;
|
6
|
+
component: string;
|
7
|
+
argTypes: {
|
8
|
+
value: {
|
9
|
+
control: string;
|
10
|
+
};
|
11
|
+
name: {
|
12
|
+
control: string;
|
13
|
+
};
|
14
|
+
};
|
15
|
+
};
|
16
|
+
export default _default;
|
17
|
+
interface Story<T> {
|
18
|
+
(args: T): TemplateResult;
|
19
|
+
args?: Partial<T>;
|
20
|
+
argTypes?: Record<string, unknown>;
|
21
|
+
}
|
22
|
+
interface ArgTypes {
|
23
|
+
name?: string;
|
24
|
+
value?: object;
|
25
|
+
}
|
26
|
+
export declare const Regular: Story<ArgTypes>;
|
@@ -0,0 +1,59 @@
|
|
1
|
+
import '../src/ox-input-work-shift.js';
|
2
|
+
import '../src/locale/locale-picker.js';
|
3
|
+
import { html } from 'lit';
|
4
|
+
export default {
|
5
|
+
title: 'ox-input-work-shift',
|
6
|
+
component: 'ox-input-work-shift',
|
7
|
+
argTypes: {
|
8
|
+
value: { control: 'object' },
|
9
|
+
name: { control: 'text' }
|
10
|
+
}
|
11
|
+
};
|
12
|
+
const Template = ({ name = 'work-shift', value = [] }) => html `
|
13
|
+
<link href="/themes/app-theme.css" rel="stylesheet" />
|
14
|
+
<link href="https://fonts.googleapis.com/css?family=Material+Icons&display=block" rel="stylesheet" />
|
15
|
+
<style>
|
16
|
+
body {
|
17
|
+
}
|
18
|
+
</style>
|
19
|
+
|
20
|
+
<locale-picker></locale-picker>
|
21
|
+
<br /><br />
|
22
|
+
|
23
|
+
<ox-input-work-shift
|
24
|
+
@change=${(e) => {
|
25
|
+
console.log(e.target.value);
|
26
|
+
}}
|
27
|
+
name=${name}
|
28
|
+
.value=${value}
|
29
|
+
>
|
30
|
+
</ox-input-work-shift>
|
31
|
+
`;
|
32
|
+
export const Regular = Template.bind({});
|
33
|
+
Regular.args = {
|
34
|
+
name: 'work-shift',
|
35
|
+
value: [
|
36
|
+
{
|
37
|
+
name: 'DAY',
|
38
|
+
fromDate: -1,
|
39
|
+
fromTime: '22:00',
|
40
|
+
toDate: 0,
|
41
|
+
toTime: '06:00'
|
42
|
+
},
|
43
|
+
{
|
44
|
+
name: 'SWING',
|
45
|
+
fromDate: 0,
|
46
|
+
fromTime: '06:00',
|
47
|
+
toDate: 0,
|
48
|
+
toTime: '14:00'
|
49
|
+
},
|
50
|
+
{
|
51
|
+
name: 'NIGHT',
|
52
|
+
fromDate: 0,
|
53
|
+
fromTime: '14:00',
|
54
|
+
toDate: 0,
|
55
|
+
toTime: '22:00'
|
56
|
+
}
|
57
|
+
]
|
58
|
+
};
|
59
|
+
//# sourceMappingURL=ox-input-work-shift.stories.js.map
|
@@ -0,0 +1 @@
|
|
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;AAE1C,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;KAC1B;CACF,CAAA;AAaD,MAAM,QAAQ,GAAoB,CAAC,EAAE,IAAI,GAAG,YAAY,EAAE,KAAK,GAAG,EAAE,EAAY,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;cAY3E,CAAC,CAAQ,EAAE,EAAE;IACrB,OAAO,CAAC,GAAG,CAAE,CAAC,CAAC,MAA2B,CAAC,KAAK,CAAC,CAAA;AACnD,CAAC;WACM,IAAI;aACF,KAAK;;;CAGjB,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'\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 }\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}\n\nconst Template: Story<ArgTypes> = ({ name = 'work-shift', value = [] }: ArgTypes) => html`\n <link href=\"/themes/app-theme.css\" rel=\"stylesheet\" />\n <link href=\"https://fonts.googleapis.com/css?family=Material+Icons&display=block\" rel=\"stylesheet\" />\n <style>\n body {\n }\n </style>\n\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 >\n </ox-input-work-shift>\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"]}
|
@@ -0,0 +1,30 @@
|
|
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
|
+
};
|
15
|
+
};
|
16
|
+
export default _default;
|
17
|
+
interface Story<T> {
|
18
|
+
(args: T): TemplateResult;
|
19
|
+
args?: Partial<T>;
|
20
|
+
argTypes?: Record<string, unknown>;
|
21
|
+
}
|
22
|
+
interface ArgTypes {
|
23
|
+
placeholder?: string;
|
24
|
+
name?: string;
|
25
|
+
value?: object | string;
|
26
|
+
slot?: TemplateResult;
|
27
|
+
}
|
28
|
+
export declare const Regular: Story<ArgTypes>;
|
29
|
+
export declare const MultipleSelect: Story<ArgTypes>;
|
30
|
+
export declare const MultipleWithCheckbox: Story<ArgTypes>;
|
@@ -0,0 +1,83 @@
|
|
1
|
+
import '../src/ox-select.js';
|
2
|
+
import '../src/ox-checkbox.js';
|
3
|
+
import { html } from 'lit';
|
4
|
+
export default {
|
5
|
+
title: 'ox-select',
|
6
|
+
component: 'ox-select',
|
7
|
+
argTypes: {
|
8
|
+
placeholder: { control: 'text' },
|
9
|
+
name: { control: 'text' }
|
10
|
+
}
|
11
|
+
};
|
12
|
+
const Template = ({ placeholder = 'Checkbox', name = 'hello', value = '', slot }) => html `
|
13
|
+
<link href="/themes/app-theme.css" rel="stylesheet" />
|
14
|
+
<link href="https://fonts.googleapis.com/css?family=Material+Icons&display=block" rel="stylesheet" />
|
15
|
+
|
16
|
+
<ox-select
|
17
|
+
name=${name}
|
18
|
+
@change=${(e) => {
|
19
|
+
console.log(e.target.value);
|
20
|
+
}}
|
21
|
+
placeholder=${placeholder}
|
22
|
+
.value=${value}
|
23
|
+
>
|
24
|
+
${slot}
|
25
|
+
</ox-select>
|
26
|
+
`;
|
27
|
+
export const Regular = Template.bind({});
|
28
|
+
Regular.args = {
|
29
|
+
placeholder: 'single select',
|
30
|
+
name: 'label',
|
31
|
+
value: '',
|
32
|
+
slot: html `
|
33
|
+
<ox-popup-list align-left nowrap>
|
34
|
+
<div option value="A">LABEL-A</div>
|
35
|
+
<div option value="B">LABEL-B</div>
|
36
|
+
<div option value="C">LABEL-C</div>
|
37
|
+
<div option value="TOO LONG VALUE">LABEL-TOO LONG VALUE</div>
|
38
|
+
</ox-popup-list>
|
39
|
+
`
|
40
|
+
};
|
41
|
+
export const MultipleSelect = Template.bind({});
|
42
|
+
MultipleSelect.args = {
|
43
|
+
placeholder: 'multiple select',
|
44
|
+
name: 'multiple',
|
45
|
+
value: ['B', 'TOO LONG VALUE'],
|
46
|
+
slot: html `
|
47
|
+
<ox-popup-list multiple with-search>
|
48
|
+
<div option value="A">A</div>
|
49
|
+
<div option value="B">B</div>
|
50
|
+
<div option value="C">C</div>
|
51
|
+
<div option value="TOO LONG VALUE" />TOO LONG VALUE</div>
|
52
|
+
</ox-popup-list>
|
53
|
+
`
|
54
|
+
};
|
55
|
+
export const MultipleWithCheckbox = Template.bind({});
|
56
|
+
MultipleWithCheckbox.args = {
|
57
|
+
placeholder: 'multiple with checkbox',
|
58
|
+
name: 'multiple',
|
59
|
+
value: ['B', 'C', 'F'],
|
60
|
+
slot: html `
|
61
|
+
<ox-popup-list attr-selected="checked" multiple with-search>
|
62
|
+
<ox-checkbox
|
63
|
+
option
|
64
|
+
@change=${(e) => {
|
65
|
+
const target = e.target;
|
66
|
+
const options = target.parentElement.querySelectorAll('[option]');
|
67
|
+
console.log(options);
|
68
|
+
options.forEach(option => (option.checked = target.checked));
|
69
|
+
}}
|
70
|
+
>set all</ox-checkbox
|
71
|
+
>
|
72
|
+
<ox-checkbox option value="A">LABEL-A</ox-checkbox>
|
73
|
+
<ox-checkbox option value="B">LABEL-B</ox-checkbox>
|
74
|
+
<ox-checkbox option value="C" checked>LABEL-C</ox-checkbox>
|
75
|
+
<ox-checkbox option value="D">LABEL-D</ox-checkbox>
|
76
|
+
<ox-checkbox option value="E">LABEL-E</ox-checkbox>
|
77
|
+
<ox-checkbox option value="F">LABEL-F</ox-checkbox>
|
78
|
+
<ox-checkbox option value="G">LABEL-G</ox-checkbox>
|
79
|
+
<ox-checkbox option value="TOO LONG VALUE">TOO LONG VALUE</ox-checkbox>
|
80
|
+
</ox-popup-list>
|
81
|
+
`
|
82
|
+
};
|
83
|
+
//# sourceMappingURL=ox-select.stories.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ox-select.stories.js","sourceRoot":"","sources":["../../stories/ox-select.stories.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAA;AAC5B,OAAO,uBAAuB,CAAA;AAE9B,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAE1C,eAAe;IACb,KAAK,EAAE,WAAW;IAClB,SAAS,EAAE,WAAW;IACtB,QAAQ,EAAE;QACR,WAAW,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QAChC,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;KAC1B;CACF,CAAA;AAeD,MAAM,QAAQ,GAAoB,CAAC,EAAE,WAAW,GAAG,UAAU,EAAE,IAAI,GAAG,OAAO,EAAE,KAAK,GAAG,EAAE,EAAE,IAAI,EAAY,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;WAKzG,IAAI;cACD,CAAC,CAAQ,EAAE,EAAE;IACrB,OAAO,CAAC,GAAG,CAAE,CAAC,CAAC,MAA2B,CAAC,KAAK,CAAC,CAAA;AACnD,CAAC;kBACa,WAAW;aAChB,KAAK;;MAEZ,IAAI;;CAET,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;;;;;;;GAOT;CACF,CAAA;AAED,MAAM,CAAC,MAAM,cAAc,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AAC/C,cAAc,CAAC,IAAI,GAAG;IACpB,WAAW,EAAE,iBAAiB;IAC9B,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,CAAC,GAAG,EAAE,gBAAgB,CAAC;IAC9B,IAAI,EAAE,IAAI,CAAA;;;;;;;GAOT;CACF,CAAA;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACrD,oBAAoB,CAAC,IAAI,GAAG;IAC1B,WAAW,EAAE,wBAAwB;IACrC,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;IACtB,IAAI,EAAE,IAAI,CAAA;;;;kBAIM,CAAC,CAAQ,EAAE,EAAE;QACrB,MAAM,MAAM,GAAG,CAAC,CAAC,MAA0B,CAAA;QAC3C,MAAM,OAAO,GAAG,MAAM,CAAC,aAAc,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAA;QAClE,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;QACpB,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAE,MAA2B,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,CAAA;IACpF,CAAC;;;;;;;;;;;;GAYN;CACF,CAAA","sourcesContent":["import '../src/ox-select.js'\nimport '../src/ox-checkbox.js'\n\nimport { html, TemplateResult } from 'lit'\n\nexport default {\n title: 'ox-select',\n component: 'ox-select',\n argTypes: {\n placeholder: { control: 'text' },\n name: { control: 'text' }\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}\n\nconst Template: Story<ArgTypes> = ({ placeholder = 'Checkbox', name = 'hello', value = '', slot }: ArgTypes) => html`\n <link href=\"/themes/app-theme.css\" rel=\"stylesheet\" />\n <link href=\"https://fonts.googleapis.com/css?family=Material+Icons&display=block\" rel=\"stylesheet\" />\n\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 >\n ${slot}\n </ox-select>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n placeholder: 'single select',\n name: 'label',\n value: '',\n slot: html`\n <ox-popup-list align-left nowrap>\n <div option value=\"A\">LABEL-A</div>\n <div option value=\"B\">LABEL-B</div>\n <div option value=\"C\">LABEL-C</div>\n <div option value=\"TOO LONG VALUE\">LABEL-TOO LONG VALUE</div>\n </ox-popup-list>\n `\n}\n\nexport const MultipleSelect = Template.bind({})\nMultipleSelect.args = {\n placeholder: 'multiple select',\n name: 'multiple',\n value: ['B', 'TOO LONG VALUE'],\n slot: html`\n <ox-popup-list multiple with-search>\n <div option value=\"A\">A</div>\n <div option value=\"B\">B</div>\n <div option value=\"C\">C</div>\n <div option value=\"TOO LONG VALUE\" />TOO LONG VALUE</div>\n </ox-popup-list>\n `\n}\n\nexport const MultipleWithCheckbox = Template.bind({})\nMultipleWithCheckbox.args = {\n placeholder: 'multiple with checkbox',\n name: 'multiple',\n value: ['B', 'C', 'F'],\n slot: html`\n <ox-popup-list attr-selected=\"checked\" multiple with-search>\n <ox-checkbox\n option\n @change=${(e: Event) => {\n const target = e.target as HTMLInputElement\n const options = target.parentElement!.querySelectorAll('[option]')\n console.log(options)\n options.forEach(option => ((option as HTMLInputElement).checked = target.checked))\n }}\n >set all</ox-checkbox\n >\n <ox-checkbox option value=\"A\">LABEL-A</ox-checkbox>\n <ox-checkbox option value=\"B\">LABEL-B</ox-checkbox>\n <ox-checkbox option value=\"C\" checked>LABEL-C</ox-checkbox>\n <ox-checkbox option value=\"D\">LABEL-D</ox-checkbox>\n <ox-checkbox option value=\"E\">LABEL-E</ox-checkbox>\n <ox-checkbox option value=\"F\">LABEL-F</ox-checkbox>\n <ox-checkbox option value=\"G\">LABEL-G</ox-checkbox>\n <ox-checkbox option value=\"TOO LONG VALUE\">TOO LONG VALUE</ox-checkbox>\n </ox-popup-list>\n `\n}\n"]}
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const CommonGristStyles: import("lit").CSSResult;
|
@@ -0,0 +1,110 @@
|
|
1
|
+
import { css } from 'lit';
|
2
|
+
export const CommonGristStyles = css `
|
3
|
+
:host {
|
4
|
+
display: flex;
|
5
|
+
|
6
|
+
width: 100%;
|
7
|
+
}
|
8
|
+
|
9
|
+
ox-grist {
|
10
|
+
flex: 1;
|
11
|
+
overflow-y: auto;
|
12
|
+
}
|
13
|
+
|
14
|
+
[slot='headroom'] {
|
15
|
+
display: flex;
|
16
|
+
flex-direction: row;
|
17
|
+
align-items: center;
|
18
|
+
padding: var(--padding-default) var(--padding-wide);
|
19
|
+
border-top: 2px solid rgba(0, 0, 0, 0.2);
|
20
|
+
background-color: var(--theme-white-color);
|
21
|
+
box-shadow: var(--box-shadow);
|
22
|
+
|
23
|
+
--mdc-icon-size: 24px;
|
24
|
+
}
|
25
|
+
#sorters mwc-icon,
|
26
|
+
#modes mwc-icon {
|
27
|
+
--mdc-icon-size: 18px;
|
28
|
+
}
|
29
|
+
#sorters {
|
30
|
+
margin-left: auto;
|
31
|
+
margin-right: var(--margin-default);
|
32
|
+
padding-left: var(--padding-narrow);
|
33
|
+
border-bottom: var(--border-dark-color);
|
34
|
+
position: relative;
|
35
|
+
color: var(--secondary-color);
|
36
|
+
font-size: var(--fontsize-default);
|
37
|
+
user-select: none;
|
38
|
+
}
|
39
|
+
|
40
|
+
#sorters > * {
|
41
|
+
padding: var(--padding-narrow);
|
42
|
+
vertical-align: middle;
|
43
|
+
}
|
44
|
+
|
45
|
+
#modes > * {
|
46
|
+
padding: var(--padding-narrow);
|
47
|
+
opacity: 0.5;
|
48
|
+
color: var(--primary-text-color);
|
49
|
+
cursor: pointer;
|
50
|
+
}
|
51
|
+
|
52
|
+
#modes > mwc-icon[active] {
|
53
|
+
border-radius: 9px;
|
54
|
+
background-color: rgba(var(--primary-color-rgb), 0.05);
|
55
|
+
opacity: 1;
|
56
|
+
color: var(--secondary-text-color);
|
57
|
+
cursor: default;
|
58
|
+
}
|
59
|
+
|
60
|
+
#modes > mwc-icon:hover {
|
61
|
+
opacity: 1;
|
62
|
+
color: var(--secondary-text-color);
|
63
|
+
}
|
64
|
+
|
65
|
+
#add {
|
66
|
+
width: 50px;
|
67
|
+
text-align: right;
|
68
|
+
}
|
69
|
+
|
70
|
+
#add button {
|
71
|
+
background-color: var(--status-success-color);
|
72
|
+
border: 0;
|
73
|
+
border-radius: 50%;
|
74
|
+
padding: 5px;
|
75
|
+
width: 36px;
|
76
|
+
height: 36px;
|
77
|
+
cursor: pointer;
|
78
|
+
}
|
79
|
+
|
80
|
+
#add button:hover {
|
81
|
+
background-color: var(--focus-background-color);
|
82
|
+
box-shadow: var(--box-shadow);
|
83
|
+
}
|
84
|
+
|
85
|
+
#add button mwc-icon {
|
86
|
+
font-size: 2em;
|
87
|
+
color: var(--theme-white-color);
|
88
|
+
}
|
89
|
+
|
90
|
+
#filters {
|
91
|
+
display: flex;
|
92
|
+
justify-content: center;
|
93
|
+
align-items: center;
|
94
|
+
}
|
95
|
+
|
96
|
+
#filters * {
|
97
|
+
margin-right: var(--margin-default);
|
98
|
+
}
|
99
|
+
|
100
|
+
@media only screen and (max-width: 460px) {
|
101
|
+
#filters {
|
102
|
+
flex-direction: column;
|
103
|
+
}
|
104
|
+
|
105
|
+
#modes {
|
106
|
+
display: none;
|
107
|
+
}
|
108
|
+
}
|
109
|
+
`;
|
110
|
+
//# sourceMappingURL=common-grist-styles.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"common-grist-styles.js","sourceRoot":"","sources":["../../themes/common-grist-styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAEzB,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2GnC,CAAA","sourcesContent":["import { css } from 'lit'\n\nexport const CommonGristStyles = css`\n :host {\n display: flex;\n\n width: 100%;\n }\n\n ox-grist {\n flex: 1;\n overflow-y: auto;\n }\n\n [slot='headroom'] {\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: var(--padding-default) var(--padding-wide);\n border-top: 2px solid rgba(0, 0, 0, 0.2);\n background-color: var(--theme-white-color);\n box-shadow: var(--box-shadow);\n\n --mdc-icon-size: 24px;\n }\n #sorters mwc-icon,\n #modes mwc-icon {\n --mdc-icon-size: 18px;\n }\n #sorters {\n margin-left: auto;\n margin-right: var(--margin-default);\n padding-left: var(--padding-narrow);\n border-bottom: var(--border-dark-color);\n position: relative;\n color: var(--secondary-color);\n font-size: var(--fontsize-default);\n user-select: none;\n }\n\n #sorters > * {\n padding: var(--padding-narrow);\n vertical-align: middle;\n }\n\n #modes > * {\n padding: var(--padding-narrow);\n opacity: 0.5;\n color: var(--primary-text-color);\n cursor: pointer;\n }\n\n #modes > mwc-icon[active] {\n border-radius: 9px;\n background-color: rgba(var(--primary-color-rgb), 0.05);\n opacity: 1;\n color: var(--secondary-text-color);\n cursor: default;\n }\n\n #modes > mwc-icon:hover {\n opacity: 1;\n color: var(--secondary-text-color);\n }\n\n #add {\n width: 50px;\n text-align: right;\n }\n\n #add button {\n background-color: var(--status-success-color);\n border: 0;\n border-radius: 50%;\n padding: 5px;\n width: 36px;\n height: 36px;\n cursor: pointer;\n }\n\n #add button:hover {\n background-color: var(--focus-background-color);\n box-shadow: var(--box-shadow);\n }\n\n #add button mwc-icon {\n font-size: 2em;\n color: var(--theme-white-color);\n }\n\n #filters {\n display: flex;\n justify-content: center;\n align-items: center;\n }\n\n #filters * {\n margin-right: var(--margin-default);\n }\n\n @media only screen and (max-width: 460px) {\n #filters {\n flex-direction: column;\n }\n\n #modes {\n display: none;\n }\n }\n`\n"]}
|