@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,16 +1,22 @@
|
|
1
1
|
import '../src/ox-input-data.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-data',
|
5
6
|
component: 'ox-input-data',
|
6
7
|
argTypes: {
|
7
8
|
value: { control: 'text' },
|
8
9
|
name: { control: 'text' },
|
9
|
-
disabled: { control: 'boolean' }
|
10
|
+
disabled: { control: 'boolean' },
|
11
|
+
theme: { control: 'select', options: ['light', 'dark'] }
|
10
12
|
}
|
11
13
|
};
|
12
|
-
const Template = ({ name = 'code', value = '', disabled }) => html `
|
13
|
-
<link href="/
|
14
|
+
const Template = ({ name = 'code', value = '', disabled, theme = 'light' }) => html `
|
15
|
+
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
16
|
+
|
17
|
+
<link href="/themes/light.css" rel="stylesheet" />
|
18
|
+
<link href="/themes/dark.css" rel="stylesheet" />
|
19
|
+
<link href="/themes/spacing.css" rel="stylesheet" />
|
14
20
|
|
15
21
|
<link
|
16
22
|
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
@@ -24,24 +30,41 @@ const Template = ({ name = 'code', value = '', disabled }) => html `
|
|
24
30
|
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
25
31
|
rel="stylesheet"
|
26
32
|
/>
|
33
|
+
|
34
|
+
<style>
|
35
|
+
${MDTypeScaleStyles.cssText}
|
36
|
+
</style>
|
37
|
+
|
27
38
|
<style>
|
28
|
-
|
39
|
+
.container {
|
40
|
+
height: 500px;
|
41
|
+
text-align: center;
|
42
|
+
padding: 20px;
|
43
|
+
|
29
44
|
}
|
45
|
+
|
30
46
|
ox-input-data {
|
31
47
|
height: 300px;
|
48
|
+
text-align: start;
|
32
49
|
}
|
33
50
|
</style>
|
34
51
|
|
35
|
-
<
|
36
|
-
|
52
|
+
<script>
|
53
|
+
document.body.classList.add('${theme}')
|
54
|
+
</script>
|
55
|
+
|
56
|
+
<div class="container md-typescale-body-large-prominent">
|
57
|
+
<ox-input-data
|
58
|
+
@change=${(e) => {
|
37
59
|
const value = e.target.value;
|
38
60
|
console.log('value : ', value, typeof value);
|
39
61
|
}}
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
62
|
+
name=${name}
|
63
|
+
.value=${value}
|
64
|
+
?disabled=${disabled}
|
65
|
+
>
|
66
|
+
</ox-input-data>
|
67
|
+
</div>
|
45
68
|
`;
|
46
69
|
export const Regular = Template.bind({});
|
47
70
|
Regular.args = {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ox-input-data.stories.js","sourceRoot":"","sources":["../../stories/ox-input-data.stories.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAA;AAEhC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;
|
1
|
+
{"version":3,"file":"ox-input-data.stories.js","sourceRoot":"","sources":["../../stories/ox-input-data.stories.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAA;AAEhC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,MAAM,IAAI,iBAAiB,EAAE,MAAM,8CAA8C,CAAA;AAE1F,eAAe;IACb,KAAK,EAAE,eAAe;IACtB,SAAS,EAAE,eAAe;IAC1B,QAAQ,EAAE;QACR,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QAC1B,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,MAAM,EAAE,KAAK,GAAG,EAAE,EAAE,QAAQ,EAAE,KAAK,GAAG,OAAO,EAAY,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;MAqBxG,iBAAiB,CAAC,OAAO;;;;;;;;;;;;;;;;;;mCAkBI,KAAK;;;;;gBAKxB,CAAC,CAAQ,EAAE,EAAE;IACrB,MAAM,KAAK,GAAI,CAAC,CAAC,MAA2B,CAAC,KAAK,CAAA;IAClD,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,KAAK,EAAE,OAAO,KAAK,CAAC,CAAA;AAC9C,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,MAAM;CACb,CAAA","sourcesContent":["import '../src/ox-input-data.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-data',\n component: 'ox-input-data',\n argTypes: {\n value: { control: 'text' },\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?: string | number | object\n disabled?: boolean\n theme?: string\n}\n\nconst Template: Story<ArgTypes> = ({ name = 'code', 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 }\n\n ox-input-data {\n height: 300px;\n text-align: start;\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-data\n @change=${(e: Event) => {\n const value = (e.target as HTMLInputElement).value\n console.log('value : ', value, typeof value)\n }}\n name=${name}\n .value=${value}\n ?disabled=${disabled}\n >\n </ox-input-data>\n </div>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n name: 'data'\n}\n"]}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
import '../src/ox-input-direction.js';
|
2
|
+
import { TemplateResult } from 'lit';
|
3
|
+
declare const _default: {
|
4
|
+
title: string;
|
5
|
+
component: string;
|
6
|
+
argTypes: {
|
7
|
+
value: {
|
8
|
+
control: string;
|
9
|
+
};
|
10
|
+
name: {
|
11
|
+
control: string;
|
12
|
+
};
|
13
|
+
disabled: {
|
14
|
+
control: string;
|
15
|
+
};
|
16
|
+
theme: {
|
17
|
+
control: string;
|
18
|
+
options: string[];
|
19
|
+
};
|
20
|
+
};
|
21
|
+
};
|
22
|
+
export default _default;
|
23
|
+
interface Story<T> {
|
24
|
+
(args: T): TemplateResult;
|
25
|
+
args?: Partial<T>;
|
26
|
+
argTypes?: Record<string, unknown>;
|
27
|
+
}
|
28
|
+
interface ArgTypes {
|
29
|
+
name?: string;
|
30
|
+
value?: object | string;
|
31
|
+
disabled?: boolean;
|
32
|
+
theme?: string;
|
33
|
+
}
|
34
|
+
export declare const Regular: Story<ArgTypes>;
|
@@ -0,0 +1,70 @@
|
|
1
|
+
import '../src/ox-input-direction.js';
|
2
|
+
import { html } from 'lit';
|
3
|
+
import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles';
|
4
|
+
export default {
|
5
|
+
title: 'ox-input-direction',
|
6
|
+
component: 'ox-input-direction',
|
7
|
+
argTypes: {
|
8
|
+
value: { control: 'object' },
|
9
|
+
name: { control: 'text' },
|
10
|
+
disabled: { control: 'boolean' },
|
11
|
+
theme: { control: 'select', options: ['light', 'dark'] }
|
12
|
+
}
|
13
|
+
};
|
14
|
+
const Template = ({ name = 'options', value, disabled, theme = 'light' }) => html `
|
15
|
+
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
16
|
+
|
17
|
+
<link href="/themes/light.css" rel="stylesheet" />
|
18
|
+
<link href="/themes/dark.css" rel="stylesheet" />
|
19
|
+
<link href="/themes/spacing.css" rel="stylesheet" />
|
20
|
+
|
21
|
+
<link
|
22
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
23
|
+
rel="stylesheet"
|
24
|
+
/>
|
25
|
+
<link
|
26
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
27
|
+
rel="stylesheet"
|
28
|
+
/>
|
29
|
+
<link
|
30
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
31
|
+
rel="stylesheet"
|
32
|
+
/>
|
33
|
+
|
34
|
+
<style>
|
35
|
+
${MDTypeScaleStyles.cssText}
|
36
|
+
</style>
|
37
|
+
|
38
|
+
<style>
|
39
|
+
.container {
|
40
|
+
height: 500px;
|
41
|
+
text-align: center;
|
42
|
+
padding: 20px;
|
43
|
+
|
44
|
+
background-color: var(--md-sys-color-primary-container);
|
45
|
+
color: var(--md-sys-color-on-primary-container);
|
46
|
+
}
|
47
|
+
</style>
|
48
|
+
|
49
|
+
<script>
|
50
|
+
document.body.classList.add('${theme}')
|
51
|
+
</script>
|
52
|
+
|
53
|
+
<div class="container">
|
54
|
+
<ox-input-direction
|
55
|
+
@change=${(e) => {
|
56
|
+
console.log(e.target.value);
|
57
|
+
}}
|
58
|
+
name=${name}
|
59
|
+
.value=${value}
|
60
|
+
?disabled=${disabled}
|
61
|
+
>
|
62
|
+
</ox-input-direction>
|
63
|
+
</div>
|
64
|
+
`;
|
65
|
+
export const Regular = Template.bind({});
|
66
|
+
Regular.args = {
|
67
|
+
name: 'options',
|
68
|
+
value: ''
|
69
|
+
};
|
70
|
+
//# sourceMappingURL=ox-input-direction.stories.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ox-input-direction.stories.js","sourceRoot":"","sources":["../../stories/ox-input-direction.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,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,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,GAAG,OAAO,EAAY,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;MAqBtG,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;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,SAAS;IACf,KAAK,EAAE,EAAE;CACV,CAAA","sourcesContent":["import '../src/ox-input-direction.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-direction',\n component: 'ox-input-direction',\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 | string\n disabled?: boolean\n theme?: string\n}\n\nconst Template: Story<ArgTypes> = ({ name = 'options', 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\">\n <ox-input-direction\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-direction>\n </div>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n name: 'options',\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?: number;
|
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-duration.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-duration',
|
6
7
|
component: 'ox-input-duration',
|
7
8
|
argTypes: {
|
8
9
|
value: { control: 'number' },
|
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 = 'duration', value = 3601, disabled }) => html `
|
14
|
-
<link href="/
|
15
|
+
const Template = ({ name = 'duration', value = 3601, 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 = 'duration', value = 3601, 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-duration
|
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-duration>
|
67
|
+
</div>
|
45
68
|
`;
|
46
69
|
export const Regular = Template.bind({});
|
47
70
|
Regular.args = {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ox-input-duration.stories.js","sourceRoot":"","sources":["../../stories/ox-input-duration.stories.ts"],"names":[],"mappings":"AAAA,OAAO,6BAA6B,CAAA;AACpC,OAAO,gCAAgC,CAAA;AAEvC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;
|
1
|
+
{"version":3,"file":"ox-input-duration.stories.js","sourceRoot":"","sources":["../../stories/ox-input-duration.stories.ts"],"names":[],"mappings":"AAAA,OAAO,6BAA6B,CAAA;AACpC,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,mBAAmB;IAC1B,SAAS,EAAE,mBAAmB;IAC9B,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,UAAU,EAAE,KAAK,GAAG,IAAI,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,UAAU;IAChB,KAAK,EAAE,IAAI;CACZ,CAAA","sourcesContent":["import '../src/ox-input-duration.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-duration',\n component: 'ox-input-duration',\n argTypes: {\n value: { control: 'number' },\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?: number\n disabled?: boolean\n theme?: string\n}\n\nconst Template: Story<ArgTypes> = ({ name = 'duration', value = 3601, 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-duration\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-duration>\n </div>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n name: 'duration',\n value: 3601\n}\n"]}
|
@@ -31,6 +31,10 @@ declare const _default: {
|
|
31
31
|
disabled: {
|
32
32
|
control: string;
|
33
33
|
};
|
34
|
+
theme: {
|
35
|
+
control: string;
|
36
|
+
options: string[];
|
37
|
+
};
|
34
38
|
};
|
35
39
|
};
|
36
40
|
export default _default;
|
@@ -49,5 +53,6 @@ interface ArgTypes {
|
|
49
53
|
hideFileList?: boolean;
|
50
54
|
attachFileList?: boolean;
|
51
55
|
disabled?: boolean;
|
56
|
+
theme?: string;
|
52
57
|
}
|
53
58
|
export declare const Regular: Story<ArgTypes>;
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import '../src/ox-input-file.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-file',
|
5
6
|
component: 'ox-input-file',
|
@@ -12,11 +13,16 @@ export default {
|
|
12
13
|
description: { control: 'text' },
|
13
14
|
hideFileList: { control: 'boolean' },
|
14
15
|
attachFileList: { control: 'boolean' },
|
15
|
-
disabled: { control: 'boolean' }
|
16
|
+
disabled: { control: 'boolean' },
|
17
|
+
theme: { control: 'select', options: ['light', 'dark'] }
|
16
18
|
}
|
17
19
|
};
|
18
|
-
const Template = ({ label = 'select files', name = 'file', multiple = true, accept, icon, description, hideFileList = false, attachFileList = false, disabled }) => html `
|
19
|
-
<link href="/
|
20
|
+
const Template = ({ label = 'select files', name = 'file', multiple = true, accept, icon, description, hideFileList = false, attachFileList = false, disabled, theme = 'light' }) => html `
|
21
|
+
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
22
|
+
|
23
|
+
<link href="/themes/light.css" rel="stylesheet" />
|
24
|
+
<link href="/themes/dark.css" rel="stylesheet" />
|
25
|
+
<link href="/themes/spacing.css" rel="stylesheet" />
|
20
26
|
|
21
27
|
<link
|
22
28
|
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
@@ -30,23 +36,40 @@ const Template = ({ label = 'select files', name = 'file', multiple = true, acce
|
|
30
36
|
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
31
37
|
rel="stylesheet"
|
32
38
|
/>
|
39
|
+
|
33
40
|
<style>
|
34
|
-
|
41
|
+
${MDTypeScaleStyles.cssText}
|
42
|
+
</style>
|
43
|
+
|
44
|
+
<style>
|
45
|
+
.container {
|
46
|
+
height: 500px;
|
47
|
+
text-align: center;
|
48
|
+
padding: 20px;
|
49
|
+
|
50
|
+
background-color: var(--md-sys-color-primary-container);
|
51
|
+
color: var(--md-sys-color-on-primary-container);
|
35
52
|
}
|
36
53
|
</style>
|
37
54
|
|
38
|
-
<
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
55
|
+
<script>
|
56
|
+
document.body.classList.add('${theme}')
|
57
|
+
</script>
|
58
|
+
|
59
|
+
<div class="container md-typescale-body-large-prominent">
|
60
|
+
<ox-input-file
|
61
|
+
label=${label}
|
62
|
+
name=${name}
|
63
|
+
?multiple=${multiple}
|
64
|
+
?hide-filelist=${hideFileList}
|
65
|
+
?attach-filelist=${attachFileList}
|
66
|
+
accept=${accept}
|
67
|
+
icon=${icon}
|
68
|
+
description=${description}
|
69
|
+
?disabled=${disabled}
|
70
|
+
>
|
71
|
+
</ox-input-file>
|
72
|
+
</div>
|
50
73
|
`;
|
51
74
|
export const Regular = Template.bind({});
|
52
75
|
Regular.args = {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ox-input-file.stories.js","sourceRoot":"","sources":["../../stories/ox-input-file.stories.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAA;AAEhC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;
|
1
|
+
{"version":3,"file":"ox-input-file.stories.js","sourceRoot":"","sources":["../../stories/ox-input-file.stories.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAA;AAEhC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,MAAM,IAAI,iBAAiB,EAAE,MAAM,8CAA8C,CAAA;AAE1F,eAAe;IACb,KAAK,EAAE,eAAe;IACtB,SAAS,EAAE,eAAe;IAC1B,QAAQ,EAAE;QACR,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QACzB,QAAQ,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;QAChC,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QAC3B,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QACzB,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QAC1B,WAAW,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QAChC,YAAY,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;QACpC,cAAc,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;QACtC,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;AAqBD,MAAM,QAAQ,GAAoB,CAAC,EACjC,KAAK,GAAG,cAAc,EACtB,IAAI,GAAG,MAAM,EACb,QAAQ,GAAG,IAAI,EACf,MAAM,EACN,IAAI,EACJ,WAAW,EACX,YAAY,GAAG,KAAK,EACpB,cAAc,GAAG,KAAK,EACtB,QAAQ,EACR,KAAK,GAAG,OAAO,EACN,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;MAqBd,iBAAiB,CAAC,OAAO;;;;;;;;;;;;;;;mCAeI,KAAK;;;;;cAK1B,KAAK;aACN,IAAI;kBACC,QAAQ;uBACH,YAAY;yBACV,cAAc;eACxB,MAAM;aACR,IAAI;oBACG,WAAW;kBACb,QAAQ;;;;CAIzB,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG;IACb,KAAK,EAAE,cAAc;IACrB,IAAI,EAAE,OAAO;IACb,QAAQ,EAAE,IAAI;IACd,YAAY,EAAE,KAAK;IACnB,cAAc,EAAE,KAAK;IACrB,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,kBAAkB;CAChC,CAAA","sourcesContent":["import '../src/ox-input-file.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-file',\n component: 'ox-input-file',\n argTypes: {\n name: { control: 'text' },\n multiple: { control: 'boolean' },\n accept: { control: 'text' },\n icon: { control: 'text' },\n label: { control: 'text' },\n description: { control: 'text' },\n hideFileList: { control: 'boolean' },\n attachFileList: { 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 label?: string\n name?: string\n multiple?: boolean\n accept?: string\n icon?: string\n description?: string\n hideFileList?: boolean\n attachFileList?: boolean\n disabled?: boolean\n theme?: string\n}\n\nconst Template: Story<ArgTypes> = ({\n label = 'select files',\n name = 'file',\n multiple = true,\n accept,\n icon,\n description,\n hideFileList = false,\n attachFileList = false,\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-file\n label=${label}\n name=${name}\n ?multiple=${multiple}\n ?hide-filelist=${hideFileList}\n ?attach-filelist=${attachFileList}\n accept=${accept}\n icon=${icon}\n description=${description}\n ?disabled=${disabled}\n >\n </ox-input-file>\n </div>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n label: 'select files',\n name: 'files',\n multiple: true,\n hideFileList: false,\n attachFileList: false,\n accept: '*.*',\n icon: 'upload',\n description: 'drop files here!'\n}\n"]}
|
@@ -16,6 +16,10 @@ declare const _default: {
|
|
16
16
|
disabled: {
|
17
17
|
control: string;
|
18
18
|
};
|
19
|
+
theme: {
|
20
|
+
control: string;
|
21
|
+
options: string[];
|
22
|
+
};
|
19
23
|
};
|
20
24
|
};
|
21
25
|
export default _default;
|
@@ -29,5 +33,6 @@ interface ArgTypes {
|
|
29
33
|
name?: string;
|
30
34
|
value?: string[];
|
31
35
|
disabled?: boolean;
|
36
|
+
theme?: string;
|
32
37
|
}
|
33
38
|
export declare const Regular: Story<ArgTypes>;
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import '../src/ox-input-hashtags.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-hashtags',
|
5
6
|
component: 'ox-input-hashtags',
|
@@ -7,11 +8,16 @@ export default {
|
|
7
8
|
placeholder: { control: 'text' },
|
8
9
|
name: { control: 'text' },
|
9
10
|
value: { control: 'array' },
|
10
|
-
disabled: { control: 'boolean' }
|
11
|
+
disabled: { control: 'boolean' },
|
12
|
+
theme: { control: 'select', options: ['light', 'dark'] }
|
11
13
|
}
|
12
14
|
};
|
13
|
-
const Template = ({ placeholder = 'hashtag', name = 'hello', value = [], disabled }) => html `
|
14
|
-
<link href="/
|
15
|
+
const Template = ({ placeholder = 'hashtag', name = 'hello', 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,19 +31,36 @@ const Template = ({ placeholder = 'hashtag', name = 'hello', value = [], disable
|
|
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
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
50
|
+
<script>
|
51
|
+
document.body.classList.add('${theme}')
|
52
|
+
</script>
|
53
|
+
|
54
|
+
<div class="container md-typescale-body-large-prominent">
|
55
|
+
<ox-input-hashtags
|
56
|
+
@change=${(e) => console.log('changed', e.target.value)}
|
57
|
+
name=${name}
|
58
|
+
placeholder=${placeholder}
|
59
|
+
.value=${value}
|
60
|
+
?disabled=${disabled}
|
61
|
+
>
|
62
|
+
</ox-input-hashtags>
|
63
|
+
</div>
|
41
64
|
`;
|
42
65
|
export const Regular = Template.bind({});
|
43
66
|
Regular.args = {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ox-input-hashtags.stories.js","sourceRoot":"","sources":["../../stories/ox-input-hashtags.stories.ts"],"names":[],"mappings":"AAAA,OAAO,6BAA6B,CAAA;AAEpC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;
|
1
|
+
{"version":3,"file":"ox-input-hashtags.stories.js","sourceRoot":"","sources":["../../stories/ox-input-hashtags.stories.ts"],"names":[],"mappings":"AAAA,OAAO,6BAA6B,CAAA;AAEpC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,MAAM,IAAI,iBAAiB,EAAE,MAAM,8CAA8C,CAAA;AAE1F,eAAe;IACb,KAAK,EAAE,mBAAmB;IAC1B,SAAS,EAAE,mBAAmB;IAC9B,QAAQ,EAAE;QACR,WAAW,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QAChC,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QACzB,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE;QAC3B,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;AAgBD,MAAM,QAAQ,GAAoB,CAAC,EACjC,WAAW,GAAG,SAAS,EACvB,IAAI,GAAG,OAAO,EACd,KAAK,GAAG,EAAE,EACV,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;aAC7E,IAAI;oBACG,WAAW;eAChB,KAAK;kBACF,QAAQ;;;;CAIzB,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG;IACb,WAAW,EAAE,SAAS;IACtB,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC;CACtB,CAAA","sourcesContent":["import '../src/ox-input-hashtags.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-hashtags',\n component: 'ox-input-hashtags',\n argTypes: {\n placeholder: { control: 'text' },\n name: { control: 'text' },\n value: { control: 'array' },\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 disabled?: boolean\n theme?: string\n}\n\nconst Template: Story<ArgTypes> = ({\n placeholder = 'hashtag',\n name = 'hello',\n value = [],\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-hashtags\n @change=${(e: Event) => console.log('changed', (e.target as HTMLInputElement).value)}\n name=${name}\n placeholder=${placeholder}\n .value=${value}\n ?disabled=${disabled}\n >\n </ox-input-hashtags>\n </div>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n placeholder: 'hashtag',\n name: 'hashtag',\n value: ['abc', 'def']\n}\n"]}
|
@@ -13,6 +13,10 @@ declare const _default: {
|
|
13
13
|
disabled: {
|
14
14
|
control: string;
|
15
15
|
};
|
16
|
+
theme: {
|
17
|
+
control: string;
|
18
|
+
options: string[];
|
19
|
+
};
|
16
20
|
};
|
17
21
|
};
|
18
22
|
export default _default;
|
@@ -25,5 +29,6 @@ interface ArgTypes {
|
|
25
29
|
name?: string;
|
26
30
|
value?: object;
|
27
31
|
disabled?: boolean;
|
32
|
+
theme?: string;
|
28
33
|
}
|
29
34
|
export declare const Regular: Story<ArgTypes>;
|