@operato/input 2.0.0-alpha.99 → 2.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +246 -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/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-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 +5 -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-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 +7 -7
- 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-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 +5 -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-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,17 +1,23 @@
|
|
1
1
|
import '../src/ox-input-privilege.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-privilege',
|
6
7
|
component: 'ox-input-privilege',
|
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 = 'privilege', value = null, privileges, disabled }) => html `
|
14
|
-
<link href="/
|
15
|
+
const Template = ({ name = 'privilege', value = null, privileges, 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,29 +31,41 @@ const Template = ({ name = 'privilege', value = null, privileges, disabled }) =>
|
|
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
|
-
|
30
|
-
|
36
|
+
${MDTypeScaleStyles.cssText}
|
37
|
+
</style>
|
31
38
|
|
32
|
-
|
33
|
-
|
34
|
-
|
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);
|
35
47
|
}
|
36
48
|
</style>
|
37
49
|
|
38
|
-
<
|
39
|
-
|
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 />
|
40
57
|
|
41
|
-
|
42
|
-
|
58
|
+
<ox-input-privilege
|
59
|
+
@change=${(e) => {
|
43
60
|
console.log(e.target.value);
|
44
61
|
}}
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
62
|
+
name=${name}
|
63
|
+
.value=${value}
|
64
|
+
.privileges=${privileges}
|
65
|
+
?disabled=${disabled}
|
66
|
+
>
|
67
|
+
</ox-input-privilege>
|
68
|
+
</div>
|
51
69
|
`;
|
52
70
|
export const Regular = Template.bind({});
|
53
71
|
Regular.args = {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ox-input-privilege.stories.js","sourceRoot":"","sources":["../../stories/ox-input-privilege.stories.ts"],"names":[],"mappings":"AAAA,OAAO,8BAA8B,CAAA;AACrC,OAAO,gCAAgC,CAAA;AAEvC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;
|
1
|
+
{"version":3,"file":"ox-input-privilege.stories.js","sourceRoot":"","sources":["../../stories/ox-input-privilege.stories.ts"],"names":[],"mappings":"AAAA,OAAO,8BAA8B,CAAA;AACrC,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,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;AAqBD,MAAM,QAAQ,GAAoB,CAAC,EACjC,IAAI,GAAG,WAAW,EAClB,KAAK,GAAG,IAAI,EACZ,UAAU,EACV,QAAQ,EACR,KAAK,GAAG,OAAO,EACN,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;MAqBd,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;oBACA,UAAU;kBACZ,QAAQ;;;;CAIzB,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG;IACb,IAAI,EAAE,WAAW;IACjB,UAAU,EAAE;QACV;YACE,IAAI,EAAE,OAAO;YACb,QAAQ,EAAE,KAAK;YACf,WAAW,EAAE,cAAc;SAC5B;QACD;YACE,IAAI,EAAE,UAAU;YAChB,QAAQ,EAAE,KAAK;YACf,WAAW,EAAE,cAAc;SAC5B;KACF;IACD,KAAK,EAAE;QACL,SAAS,EAAE,UAAU;QACrB,QAAQ,EAAE,KAAK;QACf,KAAK,EAAE,IAAI;QACX,KAAK,EAAE,IAAI;KACZ;CACF,CAAA","sourcesContent":["import '../src/ox-input-privilege.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-privilege',\n component: 'ox-input-privilege',\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 privileges: { name: string; category: string; description: string }[]\n value?: {\n privilege: string\n category: string\n owner: boolean\n super: boolean\n } | null\n disabled?: boolean\n theme?: string\n}\n\nconst Template: Story<ArgTypes> = ({\n name = 'privilege',\n value = null,\n privileges,\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 <locale-picker></locale-picker>\n <br /><br />\n\n <ox-input-privilege\n @change=${(e: Event) => {\n console.log((e.target as HTMLInputElement).value)\n }}\n name=${name}\n .value=${value}\n .privileges=${privileges}\n ?disabled=${disabled}\n >\n </ox-input-privilege>\n </div>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n name: 'privilege',\n privileges: [\n {\n name: 'query',\n category: 'aaa',\n description: 'readable aaa'\n },\n {\n name: 'mutation',\n category: 'aaa',\n description: 'writable aaa'\n }\n ],\n value: {\n privilege: 'mutation',\n category: 'aaa',\n owner: true,\n super: true\n }\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?: number[];
|
27
31
|
disabled?: boolean;
|
32
|
+
theme?: string;
|
28
33
|
}
|
29
34
|
export declare const Regular: Story<ArgTypes>;
|
@@ -1,16 +1,22 @@
|
|
1
1
|
import '../src/ox-input-quantifier.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-quantifier',
|
5
6
|
component: 'ox-input-quantifier',
|
6
7
|
argTypes: {
|
7
8
|
name: { control: 'text' },
|
8
9
|
value: { control: 'array' },
|
9
|
-
disabled: { control: 'boolean' }
|
10
|
+
disabled: { control: 'boolean' },
|
11
|
+
theme: { control: 'select', options: ['light', 'dark'] }
|
10
12
|
}
|
11
13
|
};
|
12
|
-
const Template = ({ name = 'quantifier', value, disabled }) => html `
|
13
|
-
<link href="/
|
14
|
+
const Template = ({ name = 'quantifier', 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"
|
@@ -25,13 +31,34 @@ const Template = ({ name = 'quantifier', value, disabled }) => html `
|
|
25
31
|
rel="stylesheet"
|
26
32
|
/>
|
27
33
|
|
28
|
-
<
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
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 md-typescale-body-large-prominent">
|
54
|
+
<ox-input-quantifier
|
55
|
+
name=${name}
|
56
|
+
.value=${value}
|
57
|
+
@change=${(e) => console.log(e.target.value)}
|
58
|
+
?disabled=${disabled}
|
59
|
+
>
|
60
|
+
</ox-input-quantifier>
|
61
|
+
</div>
|
35
62
|
`;
|
36
63
|
export const Regular = Template.bind({});
|
37
64
|
Regular.args = {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ox-input-quantifier.stories.js","sourceRoot":"","sources":["../../stories/ox-input-quantifier.stories.ts"],"names":[],"mappings":"AAAA,OAAO,+BAA+B,CAAA;AAEtC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;
|
1
|
+
{"version":3,"file":"ox-input-quantifier.stories.js","sourceRoot":"","sources":["../../stories/ox-input-quantifier.stories.ts"],"names":[],"mappings":"AAAA,OAAO,+BAA+B,CAAA;AAEtC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,MAAM,IAAI,iBAAiB,EAAE,MAAM,8CAA8C,CAAA;AAI1F,eAAe;IACb,KAAK,EAAE,qBAAqB;IAC5B,SAAS,EAAE,qBAAqB;IAChC,QAAQ,EAAE;QACR,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;AAeD,MAAM,QAAQ,GAAoB,CAAC,EAAE,IAAI,GAAG,YAAY,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,GAAG,OAAO,EAAY,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;MAqBzG,iBAAiB,CAAC,OAAO;;;;;;;;;;;;;;;mCAeI,KAAK;;;;;aAK3B,IAAI;eACF,KAAK;gBACJ,CAAC,CAAQ,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAE,CAAC,CAAC,MAA4B,CAAC,KAAK,CAAC;kBAC9D,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,CAAC,EAAE,EAAE,GAAG,CAAC;CACjB,CAAA","sourcesContent":["import '../src/ox-input-quantifier.js'\n\nimport { html, TemplateResult } from 'lit'\nimport { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'\n\nimport { OxInputQuantifier } from '../src/ox-input-quantifier.js'\n\nexport default {\n title: 'ox-input-quantifier',\n component: 'ox-input-quantifier',\n argTypes: {\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 name?: string\n value?: number[]\n disabled?: boolean\n theme?: string\n}\n\nconst Template: Story<ArgTypes> = ({ name = 'quantifier', 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 <ox-input-quantifier\n name=${name}\n .value=${value}\n @change=${(e: Event) => console.log((e.target as OxInputQuantifier).value)}\n ?disabled=${disabled}\n >\n </ox-input-quantifier>\n </div>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n name: 'quantifier',\n value: [10, 100]\n}\n"]}
|
@@ -22,6 +22,10 @@ declare const _default: {
|
|
22
22
|
disabled: {
|
23
23
|
control: string;
|
24
24
|
};
|
25
|
+
theme: {
|
26
|
+
control: string;
|
27
|
+
options: string[];
|
28
|
+
};
|
25
29
|
};
|
26
30
|
};
|
27
31
|
export default _default;
|
@@ -37,5 +41,6 @@ interface ArgTypes {
|
|
37
41
|
min?: number;
|
38
42
|
max?: number;
|
39
43
|
disabled?: boolean;
|
44
|
+
theme?: string;
|
40
45
|
}
|
41
46
|
export declare const Regular: Story<ArgTypes>;
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import '../src/ox-input-range.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-range',
|
5
6
|
component: 'ox-input-range',
|
@@ -9,11 +10,16 @@ export default {
|
|
9
10
|
step: { control: 'number' },
|
10
11
|
min: { control: 'number' },
|
11
12
|
max: { control: 'number' },
|
12
|
-
disabled: { control: 'boolean' }
|
13
|
+
disabled: { control: 'boolean' },
|
14
|
+
theme: { control: 'select', options: ['light', 'dark'] }
|
13
15
|
}
|
14
16
|
};
|
15
|
-
const Template = ({ name = 'range', value = 0, step = 1, min = 0, max = 100, disabled }) => html `
|
16
|
-
<link href="/
|
17
|
+
const Template = ({ name = 'range', value = 0, step = 1, min = 0, max = 100, disabled, theme = 'light' }) => html `
|
18
|
+
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
19
|
+
|
20
|
+
<link href="/themes/light.css" rel="stylesheet" />
|
21
|
+
<link href="/themes/dark.css" rel="stylesheet" />
|
22
|
+
<link href="/themes/spacing.css" rel="stylesheet" />
|
17
23
|
|
18
24
|
<link
|
19
25
|
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
@@ -28,8 +34,29 @@ const Template = ({ name = 'range', value = 0, step = 1, min = 0, max = 100, dis
|
|
28
34
|
rel="stylesheet"
|
29
35
|
/>
|
30
36
|
|
31
|
-
<
|
32
|
-
|
37
|
+
<style>
|
38
|
+
${MDTypeScaleStyles.cssText}
|
39
|
+
</style>
|
40
|
+
|
41
|
+
<style>
|
42
|
+
.container {
|
43
|
+
height: 500px;
|
44
|
+
text-align: center;
|
45
|
+
padding: 20px;
|
46
|
+
|
47
|
+
background-color: var(--md-sys-color-primary-container);
|
48
|
+
color: var(--md-sys-color-on-primary-container);
|
49
|
+
}
|
50
|
+
</style>
|
51
|
+
|
52
|
+
<script>
|
53
|
+
document.body.classList.add('${theme}')
|
54
|
+
</script>
|
55
|
+
|
56
|
+
<div class="container md-typescale-body-large-prominent">
|
57
|
+
<ox-input-range name=${name} value=${value} step=${step} min=${min} max=${max} ?disabled=${disabled}>
|
58
|
+
</ox-input-range>
|
59
|
+
</div>
|
33
60
|
`;
|
34
61
|
export const Regular = Template.bind({});
|
35
62
|
Regular.args = {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ox-input-range.stories.js","sourceRoot":"","sources":["../../stories/ox-input-range.stories.ts"],"names":[],"mappings":"AAAA,OAAO,0BAA0B,CAAA;AAEjC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;
|
1
|
+
{"version":3,"file":"ox-input-range.stories.js","sourceRoot":"","sources":["../../stories/ox-input-range.stories.ts"],"names":[],"mappings":"AAAA,OAAO,0BAA0B,CAAA;AAEjC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,MAAM,IAAI,iBAAiB,EAAE,MAAM,8CAA8C,CAAA;AAE1F,eAAe;IACb,KAAK,EAAE,gBAAgB;IACvB,SAAS,EAAE,gBAAgB;IAC3B,QAAQ,EAAE;QACR,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QACzB,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QAC5B,IAAI,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QAC3B,GAAG,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QAC1B,GAAG,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QAC1B,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,IAAI,GAAG,OAAO,EACd,KAAK,GAAG,CAAC,EACT,IAAI,GAAG,CAAC,EACR,GAAG,GAAG,CAAC,EACP,GAAG,GAAG,GAAG,EACT,QAAQ,EACR,KAAK,GAAG,OAAO,EACN,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;MAqBd,iBAAiB,CAAC,OAAO;;;;;;;;;;;;;;;mCAeI,KAAK;;;;2BAIb,IAAI,UAAU,KAAK,SAAS,IAAI,QAAQ,GAAG,QAAQ,GAAG,cAAc,QAAQ;;;CAGtG,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG;IACb,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,CAAC;IACR,IAAI,EAAE,CAAC;IACP,GAAG,EAAE,CAAC;IACN,GAAG,EAAE,GAAG;CACT,CAAA","sourcesContent":["import '../src/ox-input-range.js'\n\nimport { html, TemplateResult } from 'lit'\nimport { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'\n\nexport default {\n title: 'ox-input-range',\n component: 'ox-input-range',\n argTypes: {\n name: { control: 'text' },\n value: { control: 'number' },\n step: { control: 'number' },\n min: { control: 'number' },\n max: { control: 'number' },\n 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 step?: number\n min?: number\n max?: number\n disabled?: boolean\n theme?: string\n}\n\nconst Template: Story<ArgTypes> = ({\n name = 'range',\n value = 0,\n step = 1,\n min = 0,\n max = 100,\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-range name=${name} value=${value} step=${step} min=${min} max=${max} ?disabled=${disabled}>\n </ox-input-range>\n </div>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n name: 'range',\n value: 0,\n step: 1,\n min: 0,\n max: 100\n}\n"]}
|
@@ -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,5 +37,6 @@ interface ArgTypes {
|
|
33
37
|
value?: string;
|
34
38
|
selectAfterChange?: boolean;
|
35
39
|
disabled?: boolean;
|
40
|
+
theme?: string;
|
36
41
|
}
|
37
42
|
export declare const Regular: Story<ArgTypes>;
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import '../src/ox-input-search.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-search',
|
5
6
|
component: 'ox-input-search',
|
@@ -8,11 +9,16 @@ export default {
|
|
8
9
|
name: { control: 'text' },
|
9
10
|
value: { control: 'text' },
|
10
11
|
selectAfterChange: { control: 'boolean' },
|
11
|
-
disabled: { control: 'boolean' }
|
12
|
+
disabled: { control: 'boolean' },
|
13
|
+
theme: { control: 'select', options: ['light', 'dark'] }
|
12
14
|
}
|
13
15
|
};
|
14
|
-
const Template = ({ placeholder = 'Search', name = 'hello', value = '', selectAfterChange, disabled }) => html `
|
15
|
-
<link href="/
|
16
|
+
const Template = ({ placeholder = 'Search', name = 'hello', value = '', selectAfterChange, 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,19 +32,36 @@ const Template = ({ placeholder = 'Search', name = 'hello', value = '', selectAf
|
|
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
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
51
|
+
<script>
|
52
|
+
document.body.classList.add('${theme}')
|
53
|
+
</script>
|
54
|
+
|
55
|
+
<div class="container md-typescale-body-large-prominent">
|
56
|
+
<ox-input-search
|
57
|
+
@change=${(e) => console.log('changed', e.target.value)}
|
58
|
+
?select-after-change=${selectAfterChange}
|
59
|
+
name=${name}
|
60
|
+
.checked=${value}
|
61
|
+
?disabled=${disabled}
|
62
|
+
>
|
63
|
+
</ox-input-search>
|
64
|
+
</div>
|
42
65
|
`;
|
43
66
|
export const Regular = Template.bind({});
|
44
67
|
Regular.args = {
|
@@ -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":"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","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>;
|