@operato/input 2.0.0-alpha.99 → 2.0.0-beta.1
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 +256 -0
- package/demo/index-barcode.html +4 -4
- package/demo/index-checkbox.html +4 -4
- package/demo/index-code.html +4 -4
- package/demo/index-options.html +2 -2
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +1 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/ox-buttons-radio.d.ts +9 -5
- package/dist/src/ox-buttons-radio.js +43 -11
- package/dist/src/ox-buttons-radio.js.map +1 -1
- package/dist/src/ox-checkbox.js +23 -19
- package/dist/src/ox-checkbox.js.map +1 -1
- package/dist/src/ox-input-3axis.js +12 -1
- package/dist/src/ox-input-3axis.js.map +1 -1
- package/dist/src/ox-input-3dish.js +16 -11
- package/dist/src/ox-input-3dish.js.map +1 -1
- package/dist/src/ox-input-angle.js +8 -1
- package/dist/src/ox-input-angle.js.map +1 -1
- package/dist/src/ox-input-barcode.js +11 -8
- package/dist/src/ox-input-barcode.js.map +1 -1
- package/dist/src/ox-input-code.js +3 -0
- package/dist/src/ox-input-code.js.map +1 -1
- package/dist/src/ox-input-color.js +8 -6
- package/dist/src/ox-input-color.js.map +1 -1
- package/dist/src/ox-input-crontab.js +29 -25
- package/dist/src/ox-input-crontab.js.map +1 -1
- package/dist/src/ox-input-data.js +15 -6
- package/dist/src/ox-input-data.js.map +1 -1
- package/dist/src/ox-input-direction.d.ts +11 -0
- package/dist/src/ox-input-direction.js +60 -0
- package/dist/src/ox-input-direction.js.map +1 -0
- package/dist/src/ox-input-duration.js +15 -34
- package/dist/src/ox-input-duration.js.map +1 -1
- package/dist/src/ox-input-file.js +18 -14
- package/dist/src/ox-input-file.js.map +1 -1
- package/dist/src/ox-input-hashtags.js +13 -14
- package/dist/src/ox-input-hashtags.js.map +1 -1
- package/dist/src/ox-input-i18n-label.js +4 -4
- package/dist/src/ox-input-i18n-label.js.map +1 -1
- package/dist/src/ox-input-image.js +2 -2
- package/dist/src/ox-input-image.js.map +1 -1
- package/dist/src/ox-input-key-values.js +6 -6
- package/dist/src/ox-input-key-values.js.map +1 -1
- package/dist/src/ox-input-mass-fraction.js +6 -5
- package/dist/src/ox-input-mass-fraction.js.map +1 -1
- package/dist/src/ox-input-multiple-colors.js +2 -2
- package/dist/src/ox-input-multiple-colors.js.map +1 -1
- package/dist/src/ox-input-options.js +6 -6
- package/dist/src/ox-input-options.js.map +1 -1
- package/dist/src/ox-input-partition-keys.js +6 -6
- package/dist/src/ox-input-partition-keys.js.map +1 -1
- package/dist/src/ox-input-privilege.js +13 -16
- package/dist/src/ox-input-privilege.js.map +1 -1
- package/dist/src/ox-input-quantifier.js +5 -5
- package/dist/src/ox-input-quantifier.js.map +1 -1
- package/dist/src/ox-input-range.js +8 -8
- package/dist/src/ox-input-range.js.map +1 -1
- package/dist/src/ox-input-search.js +5 -6
- package/dist/src/ox-input-search.js.map +1 -1
- package/dist/src/ox-input-select-buttons.d.ts +2 -0
- package/dist/src/ox-input-select-buttons.js +14 -21
- package/dist/src/ox-input-select-buttons.js.map +1 -1
- package/dist/src/ox-input-table.js +1 -1
- package/dist/src/ox-input-table.js.map +1 -1
- package/dist/src/ox-input-unit-number.js +5 -5
- package/dist/src/ox-input-unit-number.js.map +1 -1
- package/dist/src/ox-input-value-map.js +9 -13
- package/dist/src/ox-input-value-map.js.map +1 -1
- package/dist/src/ox-input-value-ranges.js +7 -7
- package/dist/src/ox-input-value-ranges.js.map +1 -1
- package/dist/src/ox-input-work-shift.js +7 -7
- package/dist/src/ox-input-work-shift.js.map +1 -1
- package/dist/src/ox-select.d.ts +9 -1
- package/dist/src/ox-select.js +51 -17
- package/dist/src/ox-select.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-buttons-radio.stories.d.ts +31 -0
- package/dist/stories/ox-buttons-radio.stories.js +81 -0
- package/dist/stories/ox-buttons-radio.stories.js.map +1 -0
- package/dist/stories/ox-checkbox.stories.d.ts +6 -0
- package/dist/stories/ox-checkbox.stories.js +57 -13
- package/dist/stories/ox-checkbox.stories.js.map +1 -1
- package/dist/stories/ox-input-3axis.stories.d.ts +5 -0
- package/dist/stories/ox-input-3axis.stories.js +32 -10
- package/dist/stories/ox-input-3axis.stories.js.map +1 -1
- package/dist/stories/ox-input-3dish.stories.d.ts +5 -0
- package/dist/stories/ox-input-3dish.stories.js +35 -13
- package/dist/stories/ox-input-3dish.stories.js.map +1 -1
- package/dist/stories/ox-input-angle.stories.d.ts +5 -0
- package/dist/stories/ox-input-angle.stories.js +36 -13
- package/dist/stories/ox-input-angle.stories.js.map +1 -1
- package/dist/stories/ox-input-barcode.stories.d.ts +5 -0
- package/dist/stories/ox-input-barcode.stories.js +35 -18
- package/dist/stories/ox-input-barcode.stories.js.map +1 -1
- package/dist/stories/ox-input-code.stories.d.ts +5 -0
- package/dist/stories/ox-input-code.stories.js +38 -13
- package/dist/stories/ox-input-code.stories.js.map +1 -1
- package/dist/stories/ox-input-crontab.stories.d.ts +5 -0
- package/dist/stories/ox-input-crontab.stories.js +35 -12
- package/dist/stories/ox-input-crontab.stories.js.map +1 -1
- package/dist/stories/ox-input-data.stories.d.ts +5 -0
- package/dist/stories/ox-input-data.stories.js +34 -11
- package/dist/stories/ox-input-data.stories.js.map +1 -1
- package/dist/stories/ox-input-direction.stories.d.ts +34 -0
- package/dist/stories/ox-input-direction.stories.js +70 -0
- package/dist/stories/ox-input-direction.stories.js.map +1 -0
- package/dist/stories/ox-input-duration.stories.d.ts +5 -0
- package/dist/stories/ox-input-duration.stories.js +36 -13
- package/dist/stories/ox-input-duration.stories.js.map +1 -1
- package/dist/stories/ox-input-file.stories.d.ts +5 -0
- package/dist/stories/ox-input-file.stories.js +39 -16
- package/dist/stories/ox-input-file.stories.js.map +1 -1
- package/dist/stories/ox-input-hashtags.stories.d.ts +5 -0
- package/dist/stories/ox-input-hashtags.stories.js +35 -12
- package/dist/stories/ox-input-hashtags.stories.js.map +1 -1
- package/dist/stories/ox-input-i18n-label.stories.d.ts +5 -0
- package/dist/stories/ox-input-i18n-label.stories.js +35 -12
- package/dist/stories/ox-input-i18n-label.stories.js.map +1 -1
- package/dist/stories/ox-input-key-values.stories.d.ts +5 -0
- package/dist/stories/ox-input-key-values.stories.js +35 -12
- package/dist/stories/ox-input-key-values.stories.js.map +1 -1
- package/dist/stories/ox-input-mass-fraction.stories.d.ts +5 -0
- package/dist/stories/ox-input-mass-fraction.stories.js +36 -13
- package/dist/stories/ox-input-mass-fraction.stories.js.map +1 -1
- package/dist/stories/ox-input-multiple-colors.stories.d.ts +5 -0
- package/dist/stories/ox-input-multiple-colors.stories.js +31 -149
- package/dist/stories/ox-input-multiple-colors.stories.js.map +1 -1
- package/dist/stories/ox-input-options.stories.d.ts +5 -0
- package/dist/stories/ox-input-options.stories.js +34 -11
- package/dist/stories/ox-input-options.stories.js.map +1 -1
- package/dist/stories/ox-input-partition-keys.stories.d.ts +5 -0
- package/dist/stories/ox-input-partition-keys.stories.js +34 -11
- package/dist/stories/ox-input-partition-keys.stories.js.map +1 -1
- package/dist/stories/ox-input-privilege.stories.d.ts +5 -0
- package/dist/stories/ox-input-privilege.stories.js +36 -18
- package/dist/stories/ox-input-privilege.stories.js.map +1 -1
- package/dist/stories/ox-input-quantifier.stories.d.ts +5 -0
- package/dist/stories/ox-input-quantifier.stories.js +37 -10
- package/dist/stories/ox-input-quantifier.stories.js.map +1 -1
- package/dist/stories/ox-input-range.stories.d.ts +5 -0
- package/dist/stories/ox-input-range.stories.js +32 -5
- package/dist/stories/ox-input-range.stories.js.map +1 -1
- package/dist/stories/ox-input-search.stories.d.ts +5 -0
- package/dist/stories/ox-input-search.stories.js +35 -12
- package/dist/stories/ox-input-search.stories.js.map +1 -1
- package/dist/stories/ox-input-select-buttons.stories.d.ts +5 -0
- package/dist/stories/ox-input-select-buttons.stories.js +36 -14
- package/dist/stories/ox-input-select-buttons.stories.js.map +1 -1
- package/dist/stories/ox-input-unit.stories.d.ts +5 -0
- package/dist/stories/ox-input-unit.stories.js +40 -13
- package/dist/stories/ox-input-unit.stories.js.map +1 -1
- package/dist/stories/ox-input-value-map.stories.d.ts +5 -0
- package/dist/stories/ox-input-value-map.stories.js +36 -13
- package/dist/stories/ox-input-value-map.stories.js.map +1 -1
- package/dist/stories/ox-input-value-ranges.stories.d.ts +5 -0
- package/dist/stories/ox-input-value-ranges.stories.js +36 -13
- package/dist/stories/ox-input-value-ranges.stories.js.map +1 -1
- package/dist/stories/ox-input-work-shift.stories.d.ts +5 -0
- package/dist/stories/ox-input-work-shift.stories.js +36 -13
- package/dist/stories/ox-input-work-shift.stories.js.map +1 -1
- package/dist/stories/ox-select-set-options.stories.d.ts +53 -0
- package/dist/stories/ox-select-set-options.stories.js +183 -0
- package/dist/stories/ox-select-set-options.stories.js.map +1 -0
- package/dist/stories/ox-select.stories.d.ts +5 -0
- package/dist/stories/ox-select.stories.js +33 -7
- package/dist/stories/ox-select.stories.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +12 -8
- package/src/index.ts +1 -0
- package/src/ox-buttons-radio.ts +37 -5
- package/src/ox-checkbox.ts +23 -19
- package/src/ox-input-3axis.ts +12 -1
- package/src/ox-input-3dish.ts +16 -11
- package/src/ox-input-angle.ts +8 -1
- package/src/ox-input-barcode.ts +11 -8
- package/src/ox-input-code.ts +3 -0
- package/src/ox-input-color.ts +8 -6
- package/src/ox-input-crontab.ts +29 -25
- package/src/ox-input-data.ts +15 -6
- package/src/ox-input-direction.ts +65 -0
- package/src/ox-input-duration.ts +15 -34
- package/src/ox-input-file.ts +18 -14
- package/src/ox-input-hashtags.ts +14 -16
- package/src/ox-input-i18n-label.ts +4 -4
- package/src/ox-input-image.ts +2 -2
- package/src/ox-input-key-values.ts +6 -6
- package/src/ox-input-mass-fraction.ts +6 -5
- package/src/ox-input-multiple-colors.ts +2 -2
- package/src/ox-input-options.ts +6 -6
- package/src/ox-input-partition-keys.ts +6 -6
- package/src/ox-input-privilege.ts +13 -16
- package/src/ox-input-quantifier.ts +5 -5
- package/src/ox-input-range.ts +8 -8
- package/src/ox-input-search.ts +5 -6
- package/src/ox-input-select-buttons.ts +19 -24
- package/src/ox-input-table.ts +1 -1
- package/src/ox-input-unit-number.ts +5 -5
- package/src/ox-input-value-map.ts +9 -13
- package/src/ox-input-value-ranges.ts +7 -7
- package/src/ox-input-work-shift.ts +7 -7
- package/src/ox-select.ts +60 -13
- package/src/ox-zoomable-image.ts +75 -0
- package/stories/ox-buttons-radio.stories.ts +96 -0
- package/stories/ox-checkbox.stories.ts +61 -14
- package/stories/ox-input-3axis.stories.ts +35 -12
- package/stories/ox-input-3dish.stories.ts +38 -15
- package/stories/ox-input-angle.stories.ts +39 -15
- package/stories/ox-input-barcode.stories.ts +37 -18
- package/stories/ox-input-code.stories.ts +42 -15
- package/stories/ox-input-crontab.stories.ts +43 -14
- package/stories/ox-input-data.stories.ts +38 -14
- package/stories/ox-input-direction.stories.ts +86 -0
- package/stories/ox-input-duration.stories.ts +39 -15
- package/stories/ox-input-file.stories.ts +41 -16
- package/stories/ox-input-hashtags.stories.ts +42 -12
- package/stories/ox-input-i18n-label.stories.ts +55 -31
- package/stories/ox-input-key-values.stories.ts +44 -14
- package/stories/ox-input-mass-fraction.stories.ts +40 -15
- package/stories/ox-input-multiple-colors.stories.ts +34 -151
- package/stories/ox-input-options.stories.ts +37 -13
- package/stories/ox-input-partition-keys.stories.ts +42 -13
- package/stories/ox-input-privilege.stories.ts +45 -20
- package/stories/ox-input-quantifier.stories.ts +38 -10
- package/stories/ox-input-range.stories.ts +34 -5
- package/stories/ox-input-search.stories.ts +37 -12
- package/stories/ox-input-select-buttons.stories.ts +40 -16
- package/stories/ox-input-unit.stories.ts +43 -14
- package/stories/ox-input-value-map.stories.ts +40 -15
- package/stories/ox-input-value-ranges.stories.ts +40 -15
- package/stories/ox-input-work-shift.stories.ts +39 -15
- package/stories/ox-select-set-options.stories.ts +215 -0
- package/stories/ox-select.stories.ts +37 -7
- package/themes/dark-hc.css +151 -0
- package/themes/dark-mc.css +151 -0
- package/themes/dark.css +151 -0
- package/themes/grist-theme.css +169 -0
- package/themes/light-hc.css +151 -0
- package/themes/light-mc.css +151 -0
- package/themes/light.css +151 -0
- package/themes/md-typescale-styles.css +100 -0
- package/themes/spacing.css +43 -0
- package/themes/state-color.css +6 -0
- package/themes/app-theme.css +0 -145
- package/themes/input-theme.css +0 -32
@@ -1 +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;
|
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;AAC1C,OAAO,EAAE,MAAM,IAAI,iBAAiB,EAAE,MAAM,8CAA8C,CAAA;AAE1F,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;QAC1B,iBAAiB,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;QACzC,QAAQ,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;QAChC,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE;KACzD;CACF,CAAA;AAiBD,MAAM,QAAQ,GAAoB,CAAC,EACjC,WAAW,GAAG,QAAQ,EACtB,IAAI,GAAG,OAAO,EACd,KAAK,GAAG,EAAE,EACV,iBAAiB,EACjB,QAAQ,EACR,KAAK,GAAG,OAAO,EACN,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;MAqBd,iBAAiB,CAAC,OAAO;;;;;;;;;;;;;;;mCAeI,KAAK;;;;;gBAKxB,CAAC,CAAQ,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,EAAG,CAAC,CAAC,MAA2B,CAAC,KAAK,CAAC;6BAC7D,iBAAiB;aACjC,IAAI;iBACA,KAAK;kBACJ,QAAQ;;;;CAIzB,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;IACb,iBAAiB,EAAE,KAAK;CACzB,CAAA","sourcesContent":["import '../src/ox-input-search.js'\n\nimport { html, TemplateResult } from 'lit'\nimport { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'\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 selectAfterChange: { control: 'boolean' },\n disabled: { control: 'boolean' },\n theme: { control: 'select', options: ['light', 'dark'] }\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 selectAfterChange?: boolean\n disabled?: boolean\n theme?: string\n}\n\nconst Template: Story<ArgTypes> = ({\n placeholder = 'Search',\n name = 'hello',\n value = '',\n selectAfterChange,\n disabled,\n theme = 'light'\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 <script>\n document.body.classList.add('${theme}')\n </script>\n\n <div class=\"container md-typescale-body-large-prominent\">\n <ox-input-search\n @change=${(e: Event) => console.log('changed', (e.target as HTMLInputElement).value)}\n ?select-after-change=${selectAfterChange}\n name=${name}\n .checked=${value}\n ?disabled=${disabled}\n >\n </ox-input-search>\n </div>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n placeholder: 'label',\n name: 'label',\n selectAfterChange: false\n}\n"]}
|
@@ -19,6 +19,10 @@ declare const _default: {
|
|
19
19
|
disabled: {
|
20
20
|
control: string;
|
21
21
|
};
|
22
|
+
theme: {
|
23
|
+
control: string;
|
24
|
+
options: string[];
|
25
|
+
};
|
22
26
|
};
|
23
27
|
};
|
24
28
|
export default _default;
|
@@ -33,6 +37,7 @@ interface ArgTypes {
|
|
33
37
|
options: object;
|
34
38
|
multiple?: boolean;
|
35
39
|
disabled?: boolean;
|
40
|
+
theme?: string;
|
36
41
|
}
|
37
42
|
export declare const Regular: Story<ArgTypes>;
|
38
43
|
export declare const Multiple: Story<ArgTypes>;
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import '../src/ox-input-select-buttons.js';
|
2
2
|
import { html } from 'lit';
|
3
|
+
import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles';
|
3
4
|
export default {
|
4
5
|
title: 'ox-input-select-buttons',
|
5
6
|
component: 'ox-input-select-buttons',
|
@@ -8,11 +9,16 @@ export default {
|
|
8
9
|
options: { control: 'object' },
|
9
10
|
multiple: { control: 'boolean' },
|
10
11
|
name: { control: 'text' },
|
11
|
-
disabled: { control: 'boolean' }
|
12
|
+
disabled: { control: 'boolean' },
|
13
|
+
theme: { control: 'select', options: ['light', 'dark'] }
|
12
14
|
}
|
13
15
|
};
|
14
|
-
const Template = ({ name = 'options', value, multiple = false, options = [], disabled }) => html `
|
15
|
-
<link href="/
|
16
|
+
const Template = ({ name = 'options', value, multiple = false, options = [], disabled, theme = 'light' }) => 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" />
|
16
22
|
|
17
23
|
<link
|
18
24
|
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
@@ -26,23 +32,39 @@ const Template = ({ name = 'options', value, multiple = false, options = [], dis
|
|
26
32
|
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
27
33
|
rel="stylesheet"
|
28
34
|
/>
|
35
|
+
|
29
36
|
<style>
|
30
|
-
|
31
|
-
|
37
|
+
${MDTypeScaleStyles.cssText}
|
38
|
+
</style>
|
39
|
+
|
40
|
+
<style>
|
41
|
+
.container {
|
42
|
+
height: 500px;
|
43
|
+
text-align: center;
|
44
|
+
padding: 20px;
|
45
|
+
|
46
|
+
background-color: var(--md-sys-color-primary-container);
|
47
|
+
color: var(--md-sys-color-on-primary-container);
|
32
48
|
}
|
33
49
|
</style>
|
34
50
|
|
35
|
-
<
|
36
|
-
|
51
|
+
<script>
|
52
|
+
document.body.classList.add('${theme}')
|
53
|
+
</script>
|
54
|
+
|
55
|
+
<div class="container">
|
56
|
+
<ox-input-select-buttons
|
57
|
+
@change=${(e) => {
|
37
58
|
console.log(e.target.value);
|
38
59
|
}}
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
60
|
+
name=${name}
|
61
|
+
.value=${value}
|
62
|
+
.options=${options}
|
63
|
+
?multiple=${multiple}
|
64
|
+
?disabled=${disabled}
|
65
|
+
>
|
66
|
+
</ox-input-select-buttons>
|
67
|
+
</div>
|
46
68
|
`;
|
47
69
|
export const Regular = Template.bind({});
|
48
70
|
Regular.args = {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ox-input-select-buttons.stories.js","sourceRoot":"","sources":["../../stories/ox-input-select-buttons.stories.ts"],"names":[],"mappings":"AAAA,OAAO,mCAAmC,CAAA;AAE1C,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;
|
1
|
+
{"version":3,"file":"ox-input-select-buttons.stories.js","sourceRoot":"","sources":["../../stories/ox-input-select-buttons.stories.ts"],"names":[],"mappings":"AAAA,OAAO,mCAAmC,CAAA;AAE1C,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,MAAM,IAAI,iBAAiB,EAAE,MAAM,8CAA8C,CAAA;AAE1F,eAAe;IACb,KAAK,EAAE,yBAAyB;IAChC,SAAS,EAAE,yBAAyB;IACpC,QAAQ,EAAE;QACR,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QAC5B,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QAC9B,QAAQ,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;QAChC,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QACzB,QAAQ,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;QAChC,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE;KACzD;CACF,CAAA;AAiBD,MAAM,QAAQ,GAAoB,CAAC,EACjC,IAAI,GAAG,SAAS,EAChB,KAAK,EACL,QAAQ,GAAG,KAAK,EAChB,OAAO,GAAG,EAAE,EACZ,QAAQ,EACR,KAAK,GAAG,OAAO,EACN,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;MAqBd,iBAAiB,CAAC,OAAO;;;;;;;;;;;;;;;mCAeI,KAAK;;;;;gBAKxB,CAAC,CAAQ,EAAE,EAAE;IACrB,OAAO,CAAC,GAAG,CAAE,CAAC,CAAC,MAA2B,CAAC,KAAK,CAAC,CAAA;AACnD,CAAC;aACM,IAAI;eACF,KAAK;iBACH,OAAO;kBACN,QAAQ;kBACR,QAAQ;;;;CAIzB,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG;IACb,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,SAAS;IAChB,OAAO,EAAE;QACP,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;QACtC,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;QACxC,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;KACvC;CACF,CAAA;AAED,MAAM,CAAC,MAAM,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACzC,QAAQ,CAAC,IAAI,GAAG;IACd,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,CAAC,SAAS,CAAC;IAClB,QAAQ,EAAE,IAAI;IACd,OAAO,EAAE;QACP,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;QACxC,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE;QAC1C,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;QACxC,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;QACxC,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE;QAC1C,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;QACxC,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;QACxC,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE;QAC1C,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;QACxC,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;QACxC,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE;QAC1C,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;KACzC;CACF,CAAA","sourcesContent":["import '../src/ox-input-select-buttons.js'\n\nimport { html, TemplateResult } from 'lit'\nimport { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'\n\nexport default {\n title: 'ox-input-select-buttons',\n component: 'ox-input-select-buttons',\n argTypes: {\n value: { control: 'object' },\n options: { control: 'object' },\n multiple: { control: 'boolean' },\n name: { control: 'text' },\n disabled: { control: 'boolean' },\n theme: { control: 'select', options: ['light', 'dark'] }\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 | string\n options: object\n multiple?: boolean\n disabled?: boolean\n theme?: string\n}\n\nconst Template: Story<ArgTypes> = ({\n name = 'options',\n value,\n multiple = false,\n options = [],\n disabled,\n theme = 'light'\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 <script>\n document.body.classList.add('${theme}')\n </script>\n\n <div class=\"container\">\n <ox-input-select-buttons\n @change=${(e: Event) => {\n console.log((e.target as HTMLInputElement).value)\n }}\n name=${name}\n .value=${value}\n .options=${options}\n ?multiple=${multiple}\n ?disabled=${disabled}\n >\n </ox-input-select-buttons>\n </div>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n name: 'options',\n value: 'Clothes',\n options: [\n { display: 'SHOOSE', value: 'Shoose' },\n { display: 'CHOTHES', value: 'Clothes' },\n { display: 'GLOVES', value: 'Gloves' }\n ]\n}\n\nexport const Multiple = Template.bind({})\nMultiple.args = {\n name: 'options',\n value: ['Clothes'],\n multiple: true,\n options: [\n { display: 'SHOOSE1', value: 'Shoose1' },\n { display: 'CHOTHES1', value: 'Clothes1' },\n { display: 'GLOVES1', value: 'Gloves1' },\n { display: 'SHOOSE2', value: 'Shoose2' },\n { display: 'CHOTHES2', value: 'Clothes2' },\n { display: 'GLOVES2', value: 'Gloves2' },\n { display: 'SHOOSE3', value: 'Shoose3' },\n { display: 'CHOTHES3', value: 'Clothes3' },\n { display: 'GLOVES3', value: 'Gloves3' },\n { display: 'SHOOSE4', value: 'Shoose4' },\n { display: 'CHOTHES4', value: 'Clothes4' },\n { display: 'GLOVES4', value: 'Gloves4' }\n ]\n}\n"]}
|
@@ -20,6 +20,10 @@ declare const _default: {
|
|
20
20
|
disabled: {
|
21
21
|
control: string;
|
22
22
|
};
|
23
|
+
theme: {
|
24
|
+
control: string;
|
25
|
+
options: string[];
|
26
|
+
};
|
23
27
|
};
|
24
28
|
};
|
25
29
|
export default _default;
|
@@ -35,6 +39,7 @@ interface ArgTypes {
|
|
35
39
|
stdUnit: string;
|
36
40
|
userUnit: string;
|
37
41
|
disabled?: boolean;
|
42
|
+
theme?: string;
|
38
43
|
}
|
39
44
|
export declare const Weight: Story<ArgTypes>;
|
40
45
|
export declare const Angle: Story<ArgTypes>;
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import '../src/ox-input-unit-number.js';
|
2
2
|
import { html } from 'lit';
|
3
|
+
import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles';
|
3
4
|
export default {
|
4
5
|
title: 'ox-input-unit-number',
|
5
6
|
component: 'ox-input-unit-number',
|
@@ -39,10 +40,17 @@ export default {
|
|
39
40
|
'K'
|
40
41
|
]
|
41
42
|
},
|
42
|
-
disabled: { control: 'boolean' }
|
43
|
+
disabled: { control: 'boolean' },
|
44
|
+
theme: { control: 'select', options: ['light', 'dark'] }
|
43
45
|
}
|
44
46
|
};
|
45
|
-
const Template = ({ placeholder = 'unit', name = 'hello', value = 0, stdUnit = 'kg', userUnit, disabled }) => html `
|
47
|
+
const Template = ({ placeholder = 'unit', name = 'hello', value = 0, stdUnit = 'kg', userUnit, disabled, theme = 'light' }) => html `
|
48
|
+
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
49
|
+
|
50
|
+
<link href="/themes/light.css" rel="stylesheet" />
|
51
|
+
<link href="/themes/dark.css" rel="stylesheet" />
|
52
|
+
<link href="/themes/spacing.css" rel="stylesheet" />
|
53
|
+
|
46
54
|
<link
|
47
55
|
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
48
56
|
rel="stylesheet"
|
@@ -56,18 +64,37 @@ const Template = ({ placeholder = 'unit', name = 'hello', value = 0, stdUnit = '
|
|
56
64
|
rel="stylesheet"
|
57
65
|
/>
|
58
66
|
|
59
|
-
<
|
67
|
+
<style>
|
68
|
+
${MDTypeScaleStyles.cssText}
|
69
|
+
</style>
|
70
|
+
|
71
|
+
<style>
|
72
|
+
.container {
|
73
|
+
height: 500px;
|
74
|
+
text-align: center;
|
75
|
+
padding: 20px;
|
76
|
+
|
77
|
+
background-color: var(--md-sys-color-primary-container);
|
78
|
+
color: var(--md-sys-color-on-primary-container);
|
79
|
+
}
|
80
|
+
</style>
|
81
|
+
|
82
|
+
<script>
|
83
|
+
document.body.classList.add('${theme}')
|
84
|
+
</script>
|
60
85
|
|
61
|
-
<
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
86
|
+
<div class="container md-typescale-body-large-prominent">
|
87
|
+
<ox-input-unit-number
|
88
|
+
name=${name}
|
89
|
+
placeholder=${placeholder}
|
90
|
+
.value=${value}
|
91
|
+
std-unit=${stdUnit}
|
92
|
+
user-unit=${userUnit}
|
93
|
+
@change=${(e) => console.log(e.detail)}
|
94
|
+
?disabled=${disabled}
|
95
|
+
>
|
96
|
+
</ox-input-unit-number>
|
97
|
+
</div>
|
71
98
|
`;
|
72
99
|
export const Weight = Template.bind({});
|
73
100
|
Weight.args = {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ox-input-unit.stories.js","sourceRoot":"","sources":["../../stories/ox-input-unit.stories.ts"],"names":[],"mappings":"AAAA,OAAO,gCAAgC,CAAA;AAEvC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;
|
1
|
+
{"version":3,"file":"ox-input-unit.stories.js","sourceRoot":"","sources":["../../stories/ox-input-unit.stories.ts"],"names":[],"mappings":"AAAA,OAAO,gCAAgC,CAAA;AAEvC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,MAAM,IAAI,iBAAiB,EAAE,MAAM,8CAA8C,CAAA;AAE1F,eAAe;IACb,KAAK,EAAE,sBAAsB;IAC7B,SAAS,EAAE,sBAAsB;IACjC,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;YACP,OAAO,EAAE,QAAQ;YACjB,OAAO,EAAE;gBACP,IAAI;gBACJ,KAAK;gBACL,GAAG;gBACH,OAAO;gBACP,IAAI;gBACJ,IAAI;gBACJ,OAAO;gBACP,OAAO;gBACP,GAAG;gBACH,IAAI;gBACJ,QAAQ;gBACR,WAAW;gBACX,SAAS;gBACT,YAAY;gBACZ,SAAS;gBACT,SAAS;gBACT,GAAG;gBACH,GAAG;gBACH,MAAM;gBACN,MAAM;gBACN,QAAQ;gBACR,OAAO;gBACP,QAAQ;gBACR,UAAU;gBACV,SAAS;gBACT,GAAG;gBACH,GAAG;aACJ;SACF;QACD,QAAQ,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;QAChC,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE;KACzD;CACF,CAAA;AAkBD,MAAM,QAAQ,GAAoB,CAAC,EACjC,WAAW,GAAG,MAAM,EACpB,IAAI,GAAG,OAAO,EACd,KAAK,GAAG,CAAC,EACT,OAAO,GAAG,IAAI,EACd,QAAQ,EACR,QAAQ,EACR,KAAK,GAAG,OAAO,EACN,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;MAqBd,iBAAiB,CAAC,OAAO;;;;;;;;;;;;;;;mCAeI,KAAK;;;;;aAK3B,IAAI;oBACG,WAAW;eAChB,KAAK;iBACH,OAAO;kBACN,QAAQ;gBACV,CAAC,CAAc,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC;kBACvC,QAAQ;;;;CAIzB,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;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;CACf,CAAA;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AAC5C,WAAW,CAAC,IAAI,GAAG;IACjB,WAAW,EAAE,aAAa;IAC1B,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE,CAAC;IACR,OAAO,EAAE,GAAG;IACZ,QAAQ,EAAE,IAAI;CACf,CAAA;AAED,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AAC3C,UAAU,CAAC,IAAI,GAAG;IAChB,WAAW,EAAE,YAAY;IACzB,IAAI,EAAE,YAAY;IAClB,KAAK,EAAE,CAAC;IACR,OAAO,EAAE,GAAG;CACb,CAAA","sourcesContent":["import '../src/ox-input-unit-number.js'\n\nimport { html, TemplateResult } from 'lit'\nimport { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'\n\nexport default {\n title: 'ox-input-unit-number',\n component: 'ox-input-unit-number',\n argTypes: {\n placeholder: { control: 'text' },\n name: { control: 'text' },\n value: { control: 'number' },\n stdUnit: {\n control: 'select',\n options: [\n 'kg',\n 'rad',\n 'm',\n 'g/mol',\n 'm2',\n 'm3',\n 'kg/m3',\n 'm/sec',\n 'N',\n 'Pa',\n 'kg/sec',\n 'kg/m2/sec',\n 'mol/sec',\n 'mol/m2/sec',\n 'Sm3/sec',\n 'Nm3/sec',\n 'J',\n 'W',\n 'W/m2',\n 'J/kg',\n 'J/kg/K',\n 'W/m/K',\n 'W/m2/K',\n 'N sec/m2',\n 'm2 oC/W',\n '%',\n 'K'\n ]\n },\n disabled: { control: 'boolean' },\n theme: { control: 'select', options: ['light', 'dark'] }\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 disabled?: boolean\n theme?: string\n}\n\nconst Template: Story<ArgTypes> = ({\n placeholder = 'unit',\n name = 'hello',\n value = 0,\n stdUnit = 'kg',\n userUnit,\n disabled,\n theme = 'light'\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 <script>\n document.body.classList.add('${theme}')\n </script>\n\n <div class=\"container md-typescale-body-large-prominent\">\n <ox-input-unit-number\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 ?disabled=${disabled}\n >\n </ox-input-unit-number>\n </div>\n`\n\nexport const Weight = Template.bind({})\nWeight.args = {\n placeholder: 'weight',\n name: 'weight',\n value: 0,\n stdUnit: 'kg'\n}\n\nexport const Angle = Template.bind({})\nAngle.args = {\n placeholder: 'angle',\n name: 'angle',\n value: 0,\n stdUnit: 'rad'\n}\n\nexport const Temperature = Template.bind({})\nTemperature.args = {\n placeholder: 'temperature',\n name: 'temperature',\n value: 0,\n stdUnit: 'K',\n userUnit: '°C'\n}\n\nexport const Percentage = Template.bind({})\nPercentage.args = {\n placeholder: 'percentage',\n name: 'percentage',\n value: 0,\n stdUnit: '%'\n}\n"]}
|
@@ -21,6 +21,10 @@ declare const _default: {
|
|
21
21
|
disabled: {
|
22
22
|
control: string;
|
23
23
|
};
|
24
|
+
theme: {
|
25
|
+
control: string;
|
26
|
+
options: string[];
|
27
|
+
};
|
24
28
|
};
|
25
29
|
};
|
26
30
|
export default _default;
|
@@ -35,5 +39,6 @@ interface ArgTypes {
|
|
35
39
|
valuetype?: string;
|
36
40
|
keytype?: string;
|
37
41
|
disabled?: boolean;
|
42
|
+
theme?: string;
|
38
43
|
}
|
39
44
|
export declare const Regular: Story<ArgTypes>;
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import '../src/ox-input-value-map.js';
|
2
2
|
import { html } from 'lit';
|
3
|
+
import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles';
|
3
4
|
export default {
|
4
5
|
title: 'ox-input-value-map',
|
5
6
|
component: 'ox-input-value-map',
|
@@ -8,11 +9,16 @@ export default {
|
|
8
9
|
value: { control: 'object' },
|
9
10
|
keytype: { control: 'select', options: ['string', 'number'] },
|
10
11
|
valuetype: { control: 'select', options: ['string', 'boolean', 'number', 'color', 'date'] },
|
11
|
-
disabled: { control: 'boolean' }
|
12
|
+
disabled: { control: 'boolean' },
|
13
|
+
theme: { control: 'select', options: ['light', 'dark'] }
|
12
14
|
}
|
13
15
|
};
|
14
|
-
const Template = ({ name = 'values', value = {}, keytype = 'string', valuetype = 'string', disabled }) => html `
|
15
|
-
<link href="/
|
16
|
+
const Template = ({ name = 'values', value = {}, keytype = 'string', valuetype = 'string', disabled, theme = 'light' }) => 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" />
|
16
22
|
|
17
23
|
<link
|
18
24
|
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
@@ -26,22 +32,39 @@ const Template = ({ name = 'values', value = {}, keytype = 'string', valuetype =
|
|
26
32
|
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
27
33
|
rel="stylesheet"
|
28
34
|
/>
|
35
|
+
|
29
36
|
<style>
|
30
|
-
|
37
|
+
${MDTypeScaleStyles.cssText}
|
38
|
+
</style>
|
39
|
+
|
40
|
+
<style>
|
41
|
+
.container {
|
42
|
+
height: 500px;
|
43
|
+
text-align: center;
|
44
|
+
padding: 20px;
|
45
|
+
|
46
|
+
background-color: var(--md-sys-color-primary-container);
|
47
|
+
color: var(--md-sys-color-on-primary-container);
|
31
48
|
}
|
32
49
|
</style>
|
33
50
|
|
34
|
-
<
|
35
|
-
|
51
|
+
<script>
|
52
|
+
document.body.classList.add('${theme}')
|
53
|
+
</script>
|
54
|
+
|
55
|
+
<div class="container md-typescale-body-large-prominent">
|
56
|
+
<ox-input-value-map
|
57
|
+
@change=${(e) => {
|
36
58
|
console.log(e.target.value);
|
37
59
|
}}
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
60
|
+
name=${name}
|
61
|
+
.value=${value}
|
62
|
+
keytype=${keytype}
|
63
|
+
valuetype=${valuetype}
|
64
|
+
?disabled=${disabled}
|
65
|
+
>
|
66
|
+
</ox-input-value-map>
|
67
|
+
</div>
|
45
68
|
`;
|
46
69
|
export const Regular = Template.bind({});
|
47
70
|
Regular.args = {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ox-input-value-map.stories.js","sourceRoot":"","sources":["../../stories/ox-input-value-map.stories.ts"],"names":[],"mappings":"AAAA,OAAO,8BAA8B,CAAA;AAErC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;
|
1
|
+
{"version":3,"file":"ox-input-value-map.stories.js","sourceRoot":"","sources":["../../stories/ox-input-value-map.stories.ts"],"names":[],"mappings":"AAAA,OAAO,8BAA8B,CAAA;AAErC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,MAAM,IAAI,iBAAiB,EAAE,MAAM,8CAA8C,CAAA;AAE1F,eAAe;IACb,KAAK,EAAE,oBAAoB;IAC3B,SAAS,EAAE,oBAAoB;IAC/B,QAAQ,EAAE;QACR,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,QAAQ,EAAE,QAAQ,CAAC,EAAE;QAC7D,SAAS,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE;QAC3F,QAAQ,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;QAChC,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE;KACzD;CACF,CAAA;AAiBD,MAAM,QAAQ,GAAoB,CAAC,EACjC,IAAI,GAAG,QAAQ,EACf,KAAK,GAAG,EAAE,EACV,OAAO,GAAG,QAAQ,EAClB,SAAS,GAAG,QAAQ,EACpB,QAAQ,EACR,KAAK,GAAG,OAAO,EACN,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;MAqBd,iBAAiB,CAAC,OAAO;;;;;;;;;;;;;;;mCAeI,KAAK;;;;;gBAKxB,CAAC,CAAQ,EAAE,EAAE;IACrB,OAAO,CAAC,GAAG,CAAE,CAAC,CAAC,MAA2B,CAAC,KAAK,CAAC,CAAA;AACnD,CAAC;aACM,IAAI;eACF,KAAK;gBACJ,OAAO;kBACL,SAAS;kBACT,QAAQ;;;;CAIzB,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG;IACb,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,EAAE;CACV,CAAA","sourcesContent":["import '../src/ox-input-value-map.js'\n\nimport { html, TemplateResult } from 'lit'\nimport { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'\n\nexport default {\n title: 'ox-input-value-map',\n component: 'ox-input-value-map',\n argTypes: {\n name: { control: 'text' },\n value: { control: 'object' },\n keytype: { control: 'select', options: ['string', 'number'] },\n valuetype: { control: 'select', options: ['string', 'boolean', 'number', 'color', 'date'] },\n disabled: { control: 'boolean' },\n theme: { control: 'select', options: ['light', 'dark'] }\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 valuetype?: string\n keytype?: string\n disabled?: boolean\n theme?: string\n}\n\nconst Template: Story<ArgTypes> = ({\n name = 'values',\n value = {},\n keytype = 'string',\n valuetype = 'string',\n disabled,\n theme = 'light'\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 <script>\n document.body.classList.add('${theme}')\n </script>\n\n <div class=\"container md-typescale-body-large-prominent\">\n <ox-input-value-map\n @change=${(e: Event) => {\n console.log((e.target as HTMLInputElement).value)\n }}\n name=${name}\n .value=${value}\n keytype=${keytype}\n valuetype=${valuetype}\n ?disabled=${disabled}\n >\n </ox-input-value-map>\n </div>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n name: 'values',\n value: {}\n}\n"]}
|
@@ -21,6 +21,10 @@ declare const _default: {
|
|
21
21
|
disabled: {
|
22
22
|
control: string;
|
23
23
|
};
|
24
|
+
theme: {
|
25
|
+
control: string;
|
26
|
+
options: string[];
|
27
|
+
};
|
24
28
|
};
|
25
29
|
};
|
26
30
|
export default _default;
|
@@ -35,5 +39,6 @@ interface ArgTypes {
|
|
35
39
|
valuetype?: string;
|
36
40
|
keytype?: string;
|
37
41
|
disabled?: boolean;
|
42
|
+
theme?: string;
|
38
43
|
}
|
39
44
|
export declare const Regular: Story<ArgTypes>;
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import '../src/ox-input-value-ranges.js';
|
2
2
|
import { html } from 'lit';
|
3
|
+
import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles';
|
3
4
|
export default {
|
4
5
|
title: 'ox-input-value-ranges',
|
5
6
|
component: 'ox-input-value-ranges',
|
@@ -8,11 +9,16 @@ export default {
|
|
8
9
|
value: { control: 'object' },
|
9
10
|
keytype: { control: 'select', options: ['string', 'number'] },
|
10
11
|
valuetype: { control: 'select', options: ['string', 'boolean', 'number', 'color', 'date'] },
|
11
|
-
disabled: { control: 'boolean' }
|
12
|
+
disabled: { control: 'boolean' },
|
13
|
+
theme: { control: 'select', options: ['light', 'dark'] }
|
12
14
|
}
|
13
15
|
};
|
14
|
-
const Template = ({ name = 'values', value = {}, keytype = 'string', valuetype = 'string', disabled }) => html `
|
15
|
-
<link href="/
|
16
|
+
const Template = ({ name = 'values', value = {}, keytype = 'string', valuetype = 'string', disabled, theme = 'light' }) => 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" />
|
16
22
|
|
17
23
|
<link
|
18
24
|
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
@@ -26,22 +32,39 @@ const Template = ({ name = 'values', value = {}, keytype = 'string', valuetype =
|
|
26
32
|
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
27
33
|
rel="stylesheet"
|
28
34
|
/>
|
35
|
+
|
29
36
|
<style>
|
30
|
-
|
37
|
+
${MDTypeScaleStyles.cssText}
|
38
|
+
</style>
|
39
|
+
|
40
|
+
<style>
|
41
|
+
.container {
|
42
|
+
height: 500px;
|
43
|
+
text-align: center;
|
44
|
+
padding: 20px;
|
45
|
+
|
46
|
+
background-color: var(--md-sys-color-primary-container);
|
47
|
+
color: var(--md-sys-color-on-primary-container);
|
31
48
|
}
|
32
49
|
</style>
|
33
50
|
|
34
|
-
<
|
35
|
-
|
51
|
+
<script>
|
52
|
+
document.body.classList.add('${theme}')
|
53
|
+
</script>
|
54
|
+
|
55
|
+
<div class="container md-typescale-body-large-prominent">
|
56
|
+
<ox-input-value-ranges
|
57
|
+
@change=${(e) => {
|
36
58
|
console.log(e.target.value);
|
37
59
|
}}
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
60
|
+
name=${name}
|
61
|
+
.value=${value}
|
62
|
+
keytype=${keytype}
|
63
|
+
valuetype=${valuetype}
|
64
|
+
?disabled=${disabled}
|
65
|
+
>
|
66
|
+
</ox-input-value-ranges>
|
67
|
+
</div>
|
45
68
|
`;
|
46
69
|
export const Regular = Template.bind({});
|
47
70
|
Regular.args = {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ox-input-value-ranges.stories.js","sourceRoot":"","sources":["../../stories/ox-input-value-ranges.stories.ts"],"names":[],"mappings":"AAAA,OAAO,iCAAiC,CAAA;AAExC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;
|
1
|
+
{"version":3,"file":"ox-input-value-ranges.stories.js","sourceRoot":"","sources":["../../stories/ox-input-value-ranges.stories.ts"],"names":[],"mappings":"AAAA,OAAO,iCAAiC,CAAA;AAExC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,MAAM,IAAI,iBAAiB,EAAE,MAAM,8CAA8C,CAAA;AAE1F,eAAe;IACb,KAAK,EAAE,uBAAuB;IAC9B,SAAS,EAAE,uBAAuB;IAClC,QAAQ,EAAE;QACR,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,QAAQ,EAAE,QAAQ,CAAC,EAAE;QAC7D,SAAS,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE;QAC3F,QAAQ,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;QAChC,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE;KACzD;CACF,CAAA;AAiBD,MAAM,QAAQ,GAAoB,CAAC,EACjC,IAAI,GAAG,QAAQ,EACf,KAAK,GAAG,EAAE,EACV,OAAO,GAAG,QAAQ,EAClB,SAAS,GAAG,QAAQ,EACpB,QAAQ,EACR,KAAK,GAAG,OAAO,EACN,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;MAqBd,iBAAiB,CAAC,OAAO;;;;;;;;;;;;;;;mCAeI,KAAK;;;;;gBAKxB,CAAC,CAAQ,EAAE,EAAE;IACrB,OAAO,CAAC,GAAG,CAAE,CAAC,CAAC,MAA2B,CAAC,KAAK,CAAC,CAAA;AACnD,CAAC;aACM,IAAI;eACF,KAAK;gBACJ,OAAO;kBACL,SAAS;kBACT,QAAQ;;;;CAIzB,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG;IACb,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,EAAE;CACV,CAAA","sourcesContent":["import '../src/ox-input-value-ranges.js'\n\nimport { html, TemplateResult } from 'lit'\nimport { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'\n\nexport default {\n title: 'ox-input-value-ranges',\n component: 'ox-input-value-ranges',\n argTypes: {\n name: { control: 'text' },\n value: { control: 'object' },\n keytype: { control: 'select', options: ['string', 'number'] },\n valuetype: { control: 'select', options: ['string', 'boolean', 'number', 'color', 'date'] },\n disabled: { control: 'boolean' },\n theme: { control: 'select', options: ['light', 'dark'] }\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 valuetype?: string\n keytype?: string\n disabled?: boolean\n theme?: string\n}\n\nconst Template: Story<ArgTypes> = ({\n name = 'values',\n value = {},\n keytype = 'string',\n valuetype = 'string',\n disabled,\n theme = 'light'\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 <script>\n document.body.classList.add('${theme}')\n </script>\n\n <div class=\"container md-typescale-body-large-prominent\">\n <ox-input-value-ranges\n @change=${(e: Event) => {\n console.log((e.target as HTMLInputElement).value)\n }}\n name=${name}\n .value=${value}\n keytype=${keytype}\n valuetype=${valuetype}\n ?disabled=${disabled}\n >\n </ox-input-value-ranges>\n </div>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n name: 'values',\n value: {}\n}\n"]}
|
@@ -14,6 +14,10 @@ declare const _default: {
|
|
14
14
|
disabled: {
|
15
15
|
control: string;
|
16
16
|
};
|
17
|
+
theme: {
|
18
|
+
control: string;
|
19
|
+
options: string[];
|
20
|
+
};
|
17
21
|
};
|
18
22
|
};
|
19
23
|
export default _default;
|
@@ -26,5 +30,6 @@ interface ArgTypes {
|
|
26
30
|
name?: string;
|
27
31
|
value?: object;
|
28
32
|
disabled?: boolean;
|
33
|
+
theme?: string;
|
29
34
|
}
|
30
35
|
export declare const Regular: Story<ArgTypes>;
|
@@ -1,17 +1,23 @@
|
|
1
1
|
import '../src/ox-input-work-shift.js';
|
2
2
|
import '../src/locale/locale-picker.js';
|
3
3
|
import { html } from 'lit';
|
4
|
+
import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles';
|
4
5
|
export default {
|
5
6
|
title: 'ox-input-work-shift',
|
6
7
|
component: 'ox-input-work-shift',
|
7
8
|
argTypes: {
|
8
9
|
value: { control: 'object' },
|
9
10
|
name: { control: 'text' },
|
10
|
-
disabled: { control: 'boolean' }
|
11
|
+
disabled: { control: 'boolean' },
|
12
|
+
theme: { control: 'select', options: ['light', 'dark'] }
|
11
13
|
}
|
12
14
|
};
|
13
|
-
const Template = ({ name = 'work-shift', value = [], disabled }) => html `
|
14
|
-
<link href="/
|
15
|
+
const Template = ({ name = 'work-shift', value = [], disabled, theme = 'light' }) => html `
|
16
|
+
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
17
|
+
|
18
|
+
<link href="/themes/light.css" rel="stylesheet" />
|
19
|
+
<link href="/themes/dark.css" rel="stylesheet" />
|
20
|
+
<link href="/themes/spacing.css" rel="stylesheet" />
|
15
21
|
|
16
22
|
<link
|
17
23
|
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
@@ -25,23 +31,40 @@ const Template = ({ name = 'work-shift', value = [], disabled }) => html `
|
|
25
31
|
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
26
32
|
rel="stylesheet"
|
27
33
|
/>
|
34
|
+
|
28
35
|
<style>
|
29
|
-
|
36
|
+
${MDTypeScaleStyles.cssText}
|
37
|
+
</style>
|
38
|
+
|
39
|
+
<style>
|
40
|
+
.container {
|
41
|
+
height: 500px;
|
42
|
+
text-align: center;
|
43
|
+
padding: 20px;
|
44
|
+
|
45
|
+
background-color: var(--md-sys-color-primary-container);
|
46
|
+
color: var(--md-sys-color-on-primary-container);
|
30
47
|
}
|
31
48
|
</style>
|
32
49
|
|
33
|
-
<
|
34
|
-
|
50
|
+
<script>
|
51
|
+
document.body.classList.add('${theme}')
|
52
|
+
</script>
|
53
|
+
|
54
|
+
<div class="container md-typescale-body-large-prominent">
|
55
|
+
<locale-picker></locale-picker>
|
56
|
+
<br /><br />
|
35
57
|
|
36
|
-
|
37
|
-
|
58
|
+
<ox-input-work-shift
|
59
|
+
@change=${(e) => {
|
38
60
|
console.log(e.target.value);
|
39
61
|
}}
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
62
|
+
name=${name}
|
63
|
+
.value=${value}
|
64
|
+
?disabled=${disabled}
|
65
|
+
>
|
66
|
+
</ox-input-work-shift>
|
67
|
+
</div>
|
45
68
|
`;
|
46
69
|
export const Regular = Template.bind({});
|
47
70
|
Regular.args = {
|
@@ -1 +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;
|
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,8CAA8C,CAAA;AAE1F,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;QAChC,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE;KACzD;CACF,CAAA;AAeD,MAAM,QAAQ,GAAoB,CAAC,EAAE,IAAI,GAAG,YAAY,EAAE,KAAK,GAAG,EAAE,EAAE,QAAQ,EAAE,KAAK,GAAG,OAAO,EAAY,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;MAqB9G,iBAAiB,CAAC,OAAO;;;;;;;;;;;;;;;mCAeI,KAAK;;;;;;;;gBAQxB,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'\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 theme: { control: 'select', options: ['light', 'dark'] }\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 theme?: string\n}\n\nconst Template: Story<ArgTypes> = ({ name = 'work-shift', value = [], disabled, theme = 'light' }: 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 <script>\n document.body.classList.add('${theme}')\n </script>\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"]}
|