@operato/input 7.0.0-rc.11 → 7.0.0-rc.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.storybook/preview.js +52 -0
- package/CHANGELOG.md +11 -0
- package/dist/stories/ox-buttons-radio.stories.d.ts +0 -5
- package/dist/stories/ox-buttons-radio.stories.js +3 -9
- package/dist/stories/ox-buttons-radio.stories.js.map +1 -1
- package/dist/stories/ox-checkbox.stories.d.ts +0 -5
- package/dist/stories/ox-checkbox.stories.js +3 -9
- package/dist/stories/ox-checkbox.stories.js.map +1 -1
- package/dist/stories/ox-input-3axis.stories.d.ts +0 -5
- package/dist/stories/ox-input-3axis.stories.js +2 -7
- package/dist/stories/ox-input-3axis.stories.js.map +1 -1
- package/dist/stories/ox-input-3dish.stories.d.ts +0 -5
- package/dist/stories/ox-input-3dish.stories.js +2 -7
- package/dist/stories/ox-input-3dish.stories.js.map +1 -1
- package/dist/stories/ox-input-angle.stories.d.ts +0 -5
- package/dist/stories/ox-input-angle.stories.js +2 -7
- package/dist/stories/ox-input-angle.stories.js.map +1 -1
- package/dist/stories/ox-input-barcode.stories.d.ts +0 -5
- package/dist/stories/ox-input-barcode.stories.js +2 -7
- package/dist/stories/ox-input-barcode.stories.js.map +1 -1
- package/dist/stories/ox-input-code.stories.d.ts +0 -5
- package/dist/stories/ox-input-code.stories.js +2 -7
- package/dist/stories/ox-input-code.stories.js.map +1 -1
- package/dist/stories/ox-input-crontab.stories.d.ts +0 -5
- package/dist/stories/ox-input-crontab.stories.js +2 -7
- package/dist/stories/ox-input-crontab.stories.js.map +1 -1
- package/dist/stories/ox-input-data.stories.d.ts +0 -5
- package/dist/stories/ox-input-data.stories.js +2 -8
- package/dist/stories/ox-input-data.stories.js.map +1 -1
- package/dist/stories/ox-input-direction.stories.d.ts +0 -5
- package/dist/stories/ox-input-direction.stories.js +2 -7
- package/dist/stories/ox-input-direction.stories.js.map +1 -1
- package/dist/stories/ox-input-duration.stories.d.ts +0 -5
- package/dist/stories/ox-input-duration.stories.js +2 -7
- package/dist/stories/ox-input-duration.stories.js.map +1 -1
- package/dist/stories/ox-input-file.stories.d.ts +0 -5
- package/dist/stories/ox-input-file.stories.js +2 -7
- package/dist/stories/ox-input-file.stories.js.map +1 -1
- package/dist/stories/ox-input-hashtags.stories.d.ts +0 -5
- package/dist/stories/ox-input-hashtags.stories.js +2 -7
- package/dist/stories/ox-input-hashtags.stories.js.map +1 -1
- package/dist/stories/ox-input-i18n-label.stories.d.ts +0 -5
- package/dist/stories/ox-input-i18n-label.stories.js +2 -7
- package/dist/stories/ox-input-i18n-label.stories.js.map +1 -1
- package/dist/stories/ox-input-key-values.stories.d.ts +0 -5
- package/dist/stories/ox-input-key-values.stories.js +2 -7
- package/dist/stories/ox-input-key-values.stories.js.map +1 -1
- package/dist/stories/ox-input-mass-fraction.stories.d.ts +0 -5
- package/dist/stories/ox-input-mass-fraction.stories.js +2 -7
- package/dist/stories/ox-input-mass-fraction.stories.js.map +1 -1
- package/dist/stories/ox-input-multiple-colors.stories.d.ts +0 -5
- package/dist/stories/ox-input-multiple-colors.stories.js +2 -7
- package/dist/stories/ox-input-multiple-colors.stories.js.map +1 -1
- package/dist/stories/ox-input-options.stories.d.ts +0 -5
- package/dist/stories/ox-input-options.stories.js +2 -7
- package/dist/stories/ox-input-options.stories.js.map +1 -1
- package/dist/stories/ox-input-partition-keys.stories.d.ts +0 -5
- package/dist/stories/ox-input-partition-keys.stories.js +2 -7
- package/dist/stories/ox-input-partition-keys.stories.js.map +1 -1
- package/dist/stories/ox-input-privilege.stories.d.ts +0 -5
- package/dist/stories/ox-input-privilege.stories.js +2 -7
- package/dist/stories/ox-input-privilege.stories.js.map +1 -1
- package/dist/stories/ox-input-quantifier.stories.d.ts +0 -5
- package/dist/stories/ox-input-quantifier.stories.js +2 -7
- package/dist/stories/ox-input-quantifier.stories.js.map +1 -1
- package/dist/stories/ox-input-range.stories.d.ts +0 -5
- package/dist/stories/ox-input-range.stories.js +2 -7
- package/dist/stories/ox-input-range.stories.js.map +1 -1
- package/dist/stories/ox-input-search.stories.d.ts +0 -5
- package/dist/stories/ox-input-search.stories.js +2 -7
- package/dist/stories/ox-input-search.stories.js.map +1 -1
- package/dist/stories/ox-input-select-buttons.stories.d.ts +0 -5
- package/dist/stories/ox-input-select-buttons.stories.js +2 -7
- package/dist/stories/ox-input-select-buttons.stories.js.map +1 -1
- package/dist/stories/ox-input-table-column-config.stories.d.ts +0 -5
- package/dist/stories/ox-input-table-column-config.stories.js +2 -7
- package/dist/stories/ox-input-table-column-config.stories.js.map +1 -1
- package/dist/stories/ox-input-unit.stories.d.ts +0 -5
- package/dist/stories/ox-input-unit.stories.js +2 -7
- package/dist/stories/ox-input-unit.stories.js.map +1 -1
- package/dist/stories/ox-input-value-map.stories.d.ts +0 -5
- package/dist/stories/ox-input-value-map.stories.js +2 -7
- package/dist/stories/ox-input-value-map.stories.js.map +1 -1
- package/dist/stories/ox-input-value-ranges.stories.d.ts +0 -5
- package/dist/stories/ox-input-value-ranges.stories.js +2 -7
- package/dist/stories/ox-input-value-ranges.stories.js.map +1 -1
- package/dist/stories/ox-input-work-shift.stories.d.ts +0 -5
- package/dist/stories/ox-input-work-shift.stories.js +2 -7
- package/dist/stories/ox-input-work-shift.stories.js.map +1 -1
- package/dist/stories/ox-select-set-options.stories.d.ts +0 -5
- package/dist/stories/ox-select-set-options.stories.js +2 -7
- package/dist/stories/ox-select-set-options.stories.js.map +1 -1
- package/dist/stories/ox-select.stories.d.ts +0 -5
- package/dist/stories/ox-select.stories.js +2 -7
- package/dist/stories/ox-select.stories.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -6
- package/stories/ox-buttons-radio.stories.ts +3 -10
- package/stories/ox-checkbox.stories.ts +3 -12
- package/stories/ox-input-3axis.stories.ts +2 -8
- package/stories/ox-input-3dish.stories.ts +2 -8
- package/stories/ox-input-angle.stories.ts +2 -8
- package/stories/ox-input-barcode.stories.ts +2 -9
- package/stories/ox-input-code.stories.ts +2 -9
- package/stories/ox-input-crontab.stories.ts +2 -13
- package/stories/ox-input-data.stories.ts +2 -9
- package/stories/ox-input-direction.stories.ts +2 -8
- package/stories/ox-input-duration.stories.ts +2 -8
- package/stories/ox-input-file.stories.ts +2 -9
- package/stories/ox-input-hashtags.stories.ts +2 -14
- package/stories/ox-input-i18n-label.stories.ts +2 -8
- package/stories/ox-input-key-values.stories.ts +2 -14
- package/stories/ox-input-mass-fraction.stories.ts +2 -9
- package/stories/ox-input-multiple-colors.stories.ts +2 -8
- package/stories/ox-input-options.stories.ts +2 -8
- package/stories/ox-input-partition-keys.stories.ts +2 -13
- package/stories/ox-input-privilege.stories.ts +2 -14
- package/stories/ox-input-quantifier.stories.ts +2 -8
- package/stories/ox-input-range.stories.ts +2 -9
- package/stories/ox-input-search.stories.ts +2 -9
- package/stories/ox-input-select-buttons.stories.ts +2 -9
- package/stories/ox-input-table-column-config.stories.ts +2 -13
- package/stories/ox-input-unit.stories.ts +2 -9
- package/stories/ox-input-value-map.stories.ts +2 -9
- package/stories/ox-input-value-ranges.stories.ts +2 -9
- package/stories/ox-input-work-shift.stories.ts +2 -8
- package/stories/ox-select-set-options.stories.ts +2 -9
- package/stories/ox-select.stories.ts +2 -9
- package/themes/app-theme.css +138 -0
- package/themes/calendar-theme.css +59 -0
- package/themes/dark.css +0 -100
- package/themes/grist-theme.css +44 -40
- package/themes/layout-theme.css +94 -0
- package/themes/light.css +3 -103
- package/themes/material-theme.css +23 -0
- package/themes/oops-theme.css +22 -0
- package/themes/report-theme.css +47 -0
- package/themes/spacing.css +7 -27
- package/themes/state-color.css +1 -1
- package/themes/tooltip-theme.css +11 -0
- package/themes/dark-hc.css +0 -151
- package/themes/dark-mc.css +0 -151
- package/themes/light-hc.css +0 -151
- package/themes/light-mc.css +0 -151
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ox-input-unit.stories.js","sourceRoot":"","sources":["../../stories/ox-input-unit.stories.ts"],"names":[],"mappings":"AAAA,OAAO,gCAAgC,CAAA;AAEvC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,MAAM,IAAI,iBAAiB,EAAE,MAAM,8CAA8C,CAAA;AAE1F,eAAe;IACb,KAAK,EAAE,sBAAsB;IAC7B,SAAS,EAAE,sBAAsB;IACjC,QAAQ,EAAE;QACR,WAAW,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QAChC,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QACzB,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QAC5B,OAAO,EAAE;YACP,OAAO,EAAE,QAAQ;YACjB,OAAO,EAAE;gBACP,IAAI;gBACJ,KAAK;gBACL,GAAG;gBACH,OAAO;gBACP,IAAI;gBACJ,IAAI;gBACJ,OAAO;gBACP,OAAO;gBACP,GAAG;gBACH,IAAI;gBACJ,QAAQ;gBACR,WAAW;gBACX,SAAS;gBACT,YAAY;gBACZ,SAAS;gBACT,SAAS;gBACT,GAAG;gBACH,GAAG;gBACH,MAAM;gBACN,MAAM;gBACN,QAAQ;gBACR,OAAO;gBACP,QAAQ;gBACR,UAAU;gBACV,SAAS;gBACT,GAAG;gBACH,GAAG;aACJ;SACF;QACD,QAAQ,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;
|
1
|
+
{"version":3,"file":"ox-input-unit.stories.js","sourceRoot":"","sources":["../../stories/ox-input-unit.stories.ts"],"names":[],"mappings":"AAAA,OAAO,gCAAgC,CAAA;AAEvC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,MAAM,IAAI,iBAAiB,EAAE,MAAM,8CAA8C,CAAA;AAE1F,eAAe;IACb,KAAK,EAAE,sBAAsB;IAC7B,SAAS,EAAE,sBAAsB;IACjC,QAAQ,EAAE;QACR,WAAW,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QAChC,IAAI,EAA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,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACtC,KAAK,CAAC,IAAI,GAAG;IACX,WAAW,EAAE,OAAO;IACpB,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,CAAC;IACR,OAAO,EAAE,KAAK;CACf,CAAA;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AAC5C,WAAW,CAAC,IAAI,GAAG;IACjB,WAAW,EAAE,aAAa;IAC1B,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE,CAAC;IACR,OAAO,EAAE,GAAG;IACZ,QAAQ,EAAE,IAAI;CACf,CAAA;AAED,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AAC3C,UAAU,CAAC,IAAI,GAAG;IAChB,WAAW,EAAE,YAAY;IACzB,IAAI,EAAE,YAAY;IAClB,KAAK,EAAE,CAAC;IACR,OAAO,EAAE,GAAG;CACb,CAAA","sourcesContent":["import '../src/ox-input-unit-number.js'\n\nimport { html, TemplateResult } from 'lit'\nimport { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'\n\nexport default {\n title: 'ox-input-unit-number',\n component: 'ox-input-unit-number',\n argTypes: {\n placeholder: { control: 'text' },\n name: { control: 'text' },\n value: { control: 'number' },\n stdUnit: {\n control: 'select',\n options: [\n 'kg',\n 'rad',\n 'm',\n 'g/mol',\n 'm2',\n 'm3',\n 'kg/m3',\n 'm/sec',\n 'N',\n 'Pa',\n 'kg/sec',\n 'kg/m2/sec',\n 'mol/sec',\n 'mol/m2/sec',\n 'Sm3/sec',\n 'Nm3/sec',\n 'J',\n 'W',\n 'W/m2',\n 'J/kg',\n 'J/kg/K',\n 'W/m/K',\n 'W/m2/K',\n 'N sec/m2',\n 'm2 oC/W',\n '%',\n 'K'\n ]\n },\n disabled: { control: 'boolean' }\n }\n}\n\ninterface Story<T> {\n (args: T): TemplateResult\n args?: Partial<T>\n argTypes?: Record<string, unknown>\n}\n\ninterface ArgTypes {\n placeholder?: string\n name?: string\n value?: number\n stdUnit: string\n userUnit: string\n disabled?: boolean\n}\n\nconst Template: Story<ArgTypes> = ({\n placeholder = 'unit',\n name = 'hello',\n value = 0,\n stdUnit = 'kg',\n userUnit,\n disabled\n}: ArgTypes) => html`\n <link href=\"https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap\" rel=\"stylesheet\" />\n\n <link href=\"/themes/light.css\" rel=\"stylesheet\" />\n <link href=\"/themes/dark.css\" rel=\"stylesheet\" />\n <link href=\"/themes/spacing.css\" rel=\"stylesheet\" />\n\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n\n <style>\n ${MDTypeScaleStyles.cssText}\n </style>\n\n <style>\n .container {\n height: 500px;\n text-align: center;\n padding: 20px;\n\n background-color: var(--md-sys-color-primary-container);\n color: var(--md-sys-color-on-primary-container);\n }\n </style>\n\n <div class=\"container md-typescale-body-large-prominent\">\n <ox-input-unit-number\n name=${name}\n placeholder=${placeholder}\n .value=${value}\n std-unit=${stdUnit}\n user-unit=${userUnit}\n @change=${(e: CustomEvent) => console.log(e.detail)}\n ?disabled=${disabled}\n >\n </ox-input-unit-number>\n </div>\n`\n\nexport const Weight = Template.bind({})\nWeight.args = {\n placeholder: 'weight',\n name: 'weight',\n value: 0,\n stdUnit: 'kg'\n}\n\nexport const Angle = Template.bind({})\nAngle.args = {\n placeholder: 'angle',\n name: 'angle',\n value: 0,\n stdUnit: 'rad'\n}\n\nexport const Temperature = Template.bind({})\nTemperature.args = {\n placeholder: 'temperature',\n name: 'temperature',\n value: 0,\n stdUnit: 'K',\n userUnit: '°C'\n}\n\nexport const Percentage = Template.bind({})\nPercentage.args = {\n placeholder: 'percentage',\n name: 'percentage',\n value: 0,\n stdUnit: '%'\n}\n"]}
|
@@ -21,10 +21,6 @@ declare const _default: {
|
|
21
21
|
disabled: {
|
22
22
|
control: string;
|
23
23
|
};
|
24
|
-
theme: {
|
25
|
-
control: string;
|
26
|
-
options: string[];
|
27
|
-
};
|
28
24
|
};
|
29
25
|
};
|
30
26
|
export default _default;
|
@@ -39,6 +35,5 @@ interface ArgTypes {
|
|
39
35
|
valuetype?: string;
|
40
36
|
keytype?: string;
|
41
37
|
disabled?: boolean;
|
42
|
-
theme?: string;
|
43
38
|
}
|
44
39
|
export declare const Regular: Story<ArgTypes>;
|
@@ -9,11 +9,10 @@ export default {
|
|
9
9
|
value: { control: 'object' },
|
10
10
|
keytype: { control: 'select', options: ['string', 'number'] },
|
11
11
|
valuetype: { control: 'select', options: ['string', 'boolean', 'number', 'color', 'date'] },
|
12
|
-
disabled: { control: 'boolean' }
|
13
|
-
theme: { control: 'select', options: ['light', 'dark'] }
|
12
|
+
disabled: { control: 'boolean' }
|
14
13
|
}
|
15
14
|
};
|
16
|
-
const Template = ({ name = 'values', value = {}, keytype = 'string', valuetype = 'string', disabled
|
15
|
+
const Template = ({ name = 'values', value = {}, keytype = 'string', valuetype = 'string', disabled }) => html `
|
17
16
|
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
18
17
|
|
19
18
|
<link href="/themes/light.css" rel="stylesheet" />
|
@@ -48,10 +47,6 @@ const Template = ({ name = 'values', value = {}, keytype = 'string', valuetype =
|
|
48
47
|
}
|
49
48
|
</style>
|
50
49
|
|
51
|
-
<script>
|
52
|
-
document.body.classList.add('${theme}')
|
53
|
-
</script>
|
54
|
-
|
55
50
|
<div class="container md-typescale-body-large-prominent">
|
56
51
|
<ox-input-value-map
|
57
52
|
@change=${(e) => {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ox-input-value-map.stories.js","sourceRoot":"","sources":["../../stories/ox-input-value-map.stories.ts"],"names":[],"mappings":"AAAA,OAAO,8BAA8B,CAAA;AAErC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,MAAM,IAAI,iBAAiB,EAAE,MAAM,8CAA8C,CAAA;AAE1F,eAAe;IACb,KAAK,EAAE,oBAAoB;IAC3B,SAAS,EAAE,oBAAoB;IAC/B,QAAQ,EAAE;QACR,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QACzB,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QAC5B,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAAE;QAC7D,SAAS,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE;QAC3F,QAAQ,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;
|
1
|
+
{"version":3,"file":"ox-input-value-map.stories.js","sourceRoot":"","sources":["../../stories/ox-input-value-map.stories.ts"],"names":[],"mappings":"AAAA,OAAO,8BAA8B,CAAA;AAErC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,MAAM,IAAI,iBAAiB,EAAE,MAAM,8CAA8C,CAAA;AAE1F,eAAe;IACb,KAAK,EAAE,oBAAoB;IAC3B,SAAS,EAAE,oBAAoB;IAC/B,QAAQ,EAAE;QACR,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QACzB,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QAC5B,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAAE;QAC7D,SAAS,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE;QAC3F,QAAQ,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;KACjC;CACF,CAAA;AAgBD,MAAM,QAAQ,GAAoB,CAAC,EACjC,IAAI,GAAG,QAAQ,EACf,KAAK,GAAG,EAAE,EACV,OAAO,GAAG,QAAQ,EAClB,SAAS,GAAG,QAAQ,EACpB,QAAQ,EACC,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;MAqBd,iBAAiB,CAAC,OAAO;;;;;;;;;;;;;;;;gBAgBf,CAAC,CAAQ,EAAE,EAAE;IACrB,OAAO,CAAC,GAAG,CAAE,CAAC,CAAC,MAA2B,CAAC,KAAK,CAAC,CAAA;AACnD,CAAC;aACM,IAAI;eACF,KAAK;gBACJ,OAAO;kBACL,SAAS;kBACT,QAAQ;;;;CAIzB,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG;IACb,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,EAAE;CACV,CAAA","sourcesContent":["import '../src/ox-input-value-map.js'\n\nimport { html, TemplateResult } from 'lit'\nimport { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'\n\nexport default {\n title: 'ox-input-value-map',\n component: 'ox-input-value-map',\n argTypes: {\n name: { control: 'text' },\n value: { control: 'object' },\n keytype: { control: 'select', options: ['string', 'number'] },\n valuetype: { control: 'select', options: ['string', 'boolean', 'number', 'color', 'date'] },\n disabled: { control: 'boolean' }\n }\n}\n\ninterface Story<T> {\n (args: T): TemplateResult\n args?: Partial<T>\n argTypes?: Record<string, unknown>\n}\n\ninterface ArgTypes {\n name?: string\n value?: object\n valuetype?: string\n keytype?: string\n disabled?: boolean\n}\n\nconst Template: Story<ArgTypes> = ({\n name = 'values',\n value = {},\n keytype = 'string',\n valuetype = 'string',\n disabled\n}: ArgTypes) => html`\n <link href=\"https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap\" rel=\"stylesheet\" />\n\n <link href=\"/themes/light.css\" rel=\"stylesheet\" />\n <link href=\"/themes/dark.css\" rel=\"stylesheet\" />\n <link href=\"/themes/spacing.css\" rel=\"stylesheet\" />\n\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n\n <style>\n ${MDTypeScaleStyles.cssText}\n </style>\n\n <style>\n .container {\n height: 500px;\n text-align: center;\n padding: 20px;\n\n background-color: var(--md-sys-color-primary-container);\n color: var(--md-sys-color-on-primary-container);\n }\n </style>\n\n <div class=\"container md-typescale-body-large-prominent\">\n <ox-input-value-map\n @change=${(e: Event) => {\n console.log((e.target as HTMLInputElement).value)\n }}\n name=${name}\n .value=${value}\n keytype=${keytype}\n valuetype=${valuetype}\n ?disabled=${disabled}\n >\n </ox-input-value-map>\n </div>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n name: 'values',\n value: {}\n}\n"]}
|
@@ -21,10 +21,6 @@ declare const _default: {
|
|
21
21
|
disabled: {
|
22
22
|
control: string;
|
23
23
|
};
|
24
|
-
theme: {
|
25
|
-
control: string;
|
26
|
-
options: string[];
|
27
|
-
};
|
28
24
|
};
|
29
25
|
};
|
30
26
|
export default _default;
|
@@ -39,6 +35,5 @@ interface ArgTypes {
|
|
39
35
|
valuetype?: string;
|
40
36
|
keytype?: string;
|
41
37
|
disabled?: boolean;
|
42
|
-
theme?: string;
|
43
38
|
}
|
44
39
|
export declare const Regular: Story<ArgTypes>;
|
@@ -9,11 +9,10 @@ export default {
|
|
9
9
|
value: { control: 'object' },
|
10
10
|
keytype: { control: 'select', options: ['string', 'number'] },
|
11
11
|
valuetype: { control: 'select', options: ['string', 'boolean', 'number', 'color', 'date'] },
|
12
|
-
disabled: { control: 'boolean' }
|
13
|
-
theme: { control: 'select', options: ['light', 'dark'] }
|
12
|
+
disabled: { control: 'boolean' }
|
14
13
|
}
|
15
14
|
};
|
16
|
-
const Template = ({ name = 'values', value = {}, keytype = 'string', valuetype = 'string', disabled
|
15
|
+
const Template = ({ name = 'values', value = {}, keytype = 'string', valuetype = 'string', disabled }) => html `
|
17
16
|
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
18
17
|
|
19
18
|
<link href="/themes/light.css" rel="stylesheet" />
|
@@ -48,10 +47,6 @@ const Template = ({ name = 'values', value = {}, keytype = 'string', valuetype =
|
|
48
47
|
}
|
49
48
|
</style>
|
50
49
|
|
51
|
-
<script>
|
52
|
-
document.body.classList.add('${theme}')
|
53
|
-
</script>
|
54
|
-
|
55
50
|
<div class="container md-typescale-body-large-prominent">
|
56
51
|
<ox-input-value-ranges
|
57
52
|
@change=${(e) => {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ox-input-value-ranges.stories.js","sourceRoot":"","sources":["../../stories/ox-input-value-ranges.stories.ts"],"names":[],"mappings":"AAAA,OAAO,iCAAiC,CAAA;AAExC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,MAAM,IAAI,iBAAiB,EAAE,MAAM,8CAA8C,CAAA;AAE1F,eAAe;IACb,KAAK,EAAE,uBAAuB;IAC9B,SAAS,EAAE,uBAAuB;IAClC,QAAQ,EAAE;QACR,IAAI,EAA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pB,QAAQ,EACC,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;MAqBd,iBAAiB,CAAC,OAAO;;;;;;;;;;;;;;;;gBAgBf,CAAC,CAAQ,EAAE,EAAE;IACrB,OAAO,CAAC,GAAG,CAAE,CAAC,CAAC,MAA2B,CAAC,KAAK,CAAC,CAAA;AACnD,CAAC;aACM,IAAI;eACF,KAAK;gBACJ,OAAO;kBACL,SAAS;kBACT,QAAQ;;;;CAIzB,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG;IACb,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,EAAE;CACV,CAAA","sourcesContent":["import '../src/ox-input-value-ranges.js'\n\nimport { html, TemplateResult } from 'lit'\nimport { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'\n\nexport default {\n title: 'ox-input-value-ranges',\n component: 'ox-input-value-ranges',\n argTypes: {\n name: { control: 'text' },\n value: { control: 'object' },\n keytype: { control: 'select', options: ['string', 'number'] },\n valuetype: { control: 'select', options: ['string', 'boolean', 'number', 'color', 'date'] },\n disabled: { control: 'boolean' }\n }\n}\n\ninterface Story<T> {\n (args: T): TemplateResult\n args?: Partial<T>\n argTypes?: Record<string, unknown>\n}\n\ninterface ArgTypes {\n name?: string\n value?: object\n valuetype?: string\n keytype?: string\n disabled?: boolean\n}\n\nconst Template: Story<ArgTypes> = ({\n name = 'values',\n value = {},\n keytype = 'string',\n valuetype = 'string',\n disabled\n}: ArgTypes) => html`\n <link href=\"https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap\" rel=\"stylesheet\" />\n\n <link href=\"/themes/light.css\" rel=\"stylesheet\" />\n <link href=\"/themes/dark.css\" rel=\"stylesheet\" />\n <link href=\"/themes/spacing.css\" rel=\"stylesheet\" />\n\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n\n <style>\n ${MDTypeScaleStyles.cssText}\n </style>\n\n <style>\n .container {\n height: 500px;\n text-align: center;\n padding: 20px;\n\n background-color: var(--md-sys-color-primary-container);\n color: var(--md-sys-color-on-primary-container);\n }\n </style>\n\n <div class=\"container md-typescale-body-large-prominent\">\n <ox-input-value-ranges\n @change=${(e: Event) => {\n console.log((e.target as HTMLInputElement).value)\n }}\n name=${name}\n .value=${value}\n keytype=${keytype}\n valuetype=${valuetype}\n ?disabled=${disabled}\n >\n </ox-input-value-ranges>\n </div>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n name: 'values',\n value: {}\n}\n"]}
|
@@ -14,10 +14,6 @@ declare const _default: {
|
|
14
14
|
disabled: {
|
15
15
|
control: string;
|
16
16
|
};
|
17
|
-
theme: {
|
18
|
-
control: string;
|
19
|
-
options: string[];
|
20
|
-
};
|
21
17
|
};
|
22
18
|
};
|
23
19
|
export default _default;
|
@@ -30,6 +26,5 @@ interface ArgTypes {
|
|
30
26
|
name?: string;
|
31
27
|
value?: object;
|
32
28
|
disabled?: boolean;
|
33
|
-
theme?: string;
|
34
29
|
}
|
35
30
|
export declare const Regular: Story<ArgTypes>;
|
@@ -8,11 +8,10 @@ export default {
|
|
8
8
|
argTypes: {
|
9
9
|
value: { control: 'object' },
|
10
10
|
name: { control: 'text' },
|
11
|
-
disabled: { control: 'boolean' }
|
12
|
-
theme: { control: 'select', options: ['light', 'dark'] }
|
11
|
+
disabled: { control: 'boolean' }
|
13
12
|
}
|
14
13
|
};
|
15
|
-
const Template = ({ name = 'work-shift', value = [], disabled
|
14
|
+
const Template = ({ name = 'work-shift', value = [], disabled }) => html `
|
16
15
|
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
17
16
|
|
18
17
|
<link href="/themes/light.css" rel="stylesheet" />
|
@@ -47,10 +46,6 @@ const Template = ({ name = 'work-shift', value = [], disabled, theme = 'light' }
|
|
47
46
|
}
|
48
47
|
</style>
|
49
48
|
|
50
|
-
<script>
|
51
|
-
document.body.classList.add('${theme}')
|
52
|
-
</script>
|
53
|
-
|
54
49
|
<div class="container md-typescale-body-large-prominent">
|
55
50
|
<locale-picker></locale-picker>
|
56
51
|
<br /><br />
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ox-input-work-shift.stories.js","sourceRoot":"","sources":["../../stories/ox-input-work-shift.stories.ts"],"names":[],"mappings":"AAAA,OAAO,+BAA+B,CAAA;AACtC,OAAO,gCAAgC,CAAA;AAEvC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,MAAM,IAAI,iBAAiB,EAAE,MAAM,8CAA8C,CAAA;AAE1F,eAAe;IACb,KAAK,EAAE,qBAAqB;IAC5B,SAAS,EAAE,qBAAqB;IAChC,QAAQ,EAAE;QACR,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QAC5B,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QACzB,QAAQ,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;
|
1
|
+
{"version":3,"file":"ox-input-work-shift.stories.js","sourceRoot":"","sources":["../../stories/ox-input-work-shift.stories.ts"],"names":[],"mappings":"AAAA,OAAO,+BAA+B,CAAA;AACtC,OAAO,gCAAgC,CAAA;AAEvC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,MAAM,IAAI,iBAAiB,EAAE,MAAM,8CAA8C,CAAA;AAE1F,eAAe;IACb,KAAK,EAAE,qBAAqB;IAC5B,SAAS,EAAE,qBAAqB;IAChC,QAAQ,EAAE;QACR,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QAC5B,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QACzB,QAAQ,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;KACjC;CACF,CAAA;AAcD,MAAM,QAAQ,GAAoB,CAAC,EAAE,IAAI,GAAG,YAAY,EAAE,KAAK,GAAG,EAAE,EAAE,QAAQ,EAAY,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;MAqB7F,iBAAiB,CAAC,OAAO;;;;;;;;;;;;;;;;;;;gBAmBf,CAAC,CAAQ,EAAE,EAAE;IACrB,OAAO,CAAC,GAAG,CAAE,CAAC,CAAC,MAA2B,CAAC,KAAK,CAAC,CAAA;AACnD,CAAC;aACM,IAAI;eACF,KAAK;kBACF,QAAQ;;;;CAIzB,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG;IACb,IAAI,EAAE,YAAY;IAClB,KAAK,EAAE;QACL;YACE,IAAI,EAAE,KAAK;YACX,QAAQ,EAAE,CAAC,CAAC;YACZ,QAAQ,EAAE,OAAO;YACjB,MAAM,EAAE,CAAC;YACT,MAAM,EAAE,OAAO;SAChB;QACD;YACE,IAAI,EAAE,OAAO;YACb,QAAQ,EAAE,CAAC;YACX,QAAQ,EAAE,OAAO;YACjB,MAAM,EAAE,CAAC;YACT,MAAM,EAAE,OAAO;SAChB;QACD;YACE,IAAI,EAAE,OAAO;YACb,QAAQ,EAAE,CAAC;YACX,QAAQ,EAAE,OAAO;YACjB,MAAM,EAAE,CAAC;YACT,MAAM,EAAE,OAAO;SAChB;KACF;CACF,CAAA","sourcesContent":["import '../src/ox-input-work-shift.js'\nimport '../src/locale/locale-picker.js'\n\nimport { html, TemplateResult } from 'lit'\nimport { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'\n\nexport default {\n title: 'ox-input-work-shift',\n component: 'ox-input-work-shift',\n argTypes: {\n value: { control: 'object' },\n name: { control: 'text' },\n disabled: { control: 'boolean' }\n }\n}\n\ninterface Story<T> {\n (args: T): TemplateResult\n args?: Partial<T>\n argTypes?: Record<string, unknown>\n}\n\ninterface ArgTypes {\n name?: string\n value?: object\n disabled?: boolean\n}\n\nconst Template: Story<ArgTypes> = ({ name = 'work-shift', value = [], disabled }: ArgTypes) => html`\n <link href=\"https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap\" rel=\"stylesheet\" />\n\n <link href=\"/themes/light.css\" rel=\"stylesheet\" />\n <link href=\"/themes/dark.css\" rel=\"stylesheet\" />\n <link href=\"/themes/spacing.css\" rel=\"stylesheet\" />\n\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n\n <style>\n ${MDTypeScaleStyles.cssText}\n </style>\n\n <style>\n .container {\n height: 500px;\n text-align: center;\n padding: 20px;\n\n background-color: var(--md-sys-color-primary-container);\n color: var(--md-sys-color-on-primary-container);\n }\n </style>\n\n <div class=\"container md-typescale-body-large-prominent\">\n <locale-picker></locale-picker>\n <br /><br />\n\n <ox-input-work-shift\n @change=${(e: Event) => {\n console.log((e.target as HTMLInputElement).value)\n }}\n name=${name}\n .value=${value}\n ?disabled=${disabled}\n >\n </ox-input-work-shift>\n </div>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n name: 'work-shift',\n value: [\n {\n name: 'DAY',\n fromDate: -1,\n fromTime: '22:00',\n toDate: 0,\n toTime: '06:00'\n },\n {\n name: 'SWING',\n fromDate: 0,\n fromTime: '06:00',\n toDate: 0,\n toTime: '14:00'\n },\n {\n name: 'NIGHT',\n fromDate: 0,\n fromTime: '14:00',\n toDate: 0,\n toTime: '22:00'\n }\n ]\n}\n"]}
|
@@ -23,10 +23,6 @@ declare const _default: {
|
|
23
23
|
disabled: {
|
24
24
|
control: string;
|
25
25
|
};
|
26
|
-
theme: {
|
27
|
-
control: string;
|
28
|
-
options: string[];
|
29
|
-
};
|
30
26
|
};
|
31
27
|
};
|
32
28
|
export default _default;
|
@@ -46,7 +42,6 @@ interface ArgTypes {
|
|
46
42
|
multiple?: boolean;
|
47
43
|
withSearch?: boolean;
|
48
44
|
disabled?: boolean;
|
49
|
-
theme?: string;
|
50
45
|
}
|
51
46
|
export declare const Regular: Story<ArgTypes>;
|
52
47
|
export declare const MultipleSelect: Story<ArgTypes>;
|
@@ -11,11 +11,10 @@ export default {
|
|
11
11
|
options: { control: 'object' },
|
12
12
|
multiple: { control: 'boolean' },
|
13
13
|
withSearch: { control: 'boolean' },
|
14
|
-
disabled: { control: 'boolean' }
|
15
|
-
theme: { control: 'select', options: ['light', 'dark'] }
|
14
|
+
disabled: { control: 'boolean' }
|
16
15
|
}
|
17
16
|
};
|
18
|
-
const Template = ({ placeholder = 'Checkbox', name = 'hello', value = '', options = [], multiple, withSearch, disabled
|
17
|
+
const Template = ({ placeholder = 'Checkbox', name = 'hello', value = '', options = [], multiple, withSearch, disabled }) => html `
|
19
18
|
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
20
19
|
|
21
20
|
<link href="/themes/light.css" rel="stylesheet" />
|
@@ -50,10 +49,6 @@ const Template = ({ placeholder = 'Checkbox', name = 'hello', value = '', option
|
|
50
49
|
}
|
51
50
|
</style>
|
52
51
|
|
53
|
-
<script>
|
54
|
-
document.body.classList.add('${theme}')
|
55
|
-
</script>
|
56
|
-
|
57
52
|
<div class="container md-typescale-body-large-prominent">
|
58
53
|
<ox-select
|
59
54
|
name=${name}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ox-select-set-options.stories.js","sourceRoot":"","sources":["../../stories/ox-select-set-options.stories.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAA;AAC5B,OAAO,uBAAuB,CAAA;AAG9B,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,MAAM,IAAI,iBAAiB,EAAE,MAAM,8CAA8C,CAAA;AAE1F,eAAe;IACb,KAAK,EAAE,uBAAuB;IAC9B,SAAS,EAAE,WAAW;IACtB,QAAQ,EAAE;QACR,WAAW,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QAChC,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QACzB,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QAC9B,QAAQ,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;QAChC,UAAU,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;QAClC,QAAQ,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;
|
1
|
+
{"version":3,"file":"ox-select-set-options.stories.js","sourceRoot":"","sources":["../../stories/ox-select-set-options.stories.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAA;AAC5B,OAAO,uBAAuB,CAAA;AAG9B,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,MAAM,IAAI,iBAAiB,EAAE,MAAM,8CAA8C,CAAA;AAE1F,eAAe;IACb,KAAK,EAAE,uBAAuB;IAC9B,SAAS,EAAE,WAAW;IACtB,QAAQ,EAAE;QACR,WAAW,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QAChC,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QACzB,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QAC9B,QAAQ,EAAE,EAAE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E,GAAG;YACV,OAAO,EAAE,GAAG;SACb;QACD;YACE,KAAK,EAAE,GAAG;YACV,OAAO,EAAE,GAAG;SACb;QACD;YACE,KAAK,EAAE,GAAG;YACV,OAAO,EAAE,GAAG;SACb;QACD;YACE,KAAK,EAAE,gBAAgB;YACvB,OAAO,EAAE,gBAAgB;SAC1B;KACF;CACF,CAAA","sourcesContent":["import '../src/ox-select.js'\nimport '../src/ox-checkbox.js'\n\nimport { OxSelect } from '../src/ox-select.js'\nimport { html, TemplateResult } from 'lit'\nimport { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'\n\nexport default {\n title: 'ox-select-set-options',\n component: 'ox-select',\n argTypes: {\n placeholder: { control: 'text' },\n name: { control: 'text' },\n options: { control: 'object' },\n multiple: { control: 'boolean' },\n withSearch: { control: 'boolean' },\n disabled: { control: 'boolean' }\n }\n}\n\ninterface Story<T> {\n (args: T): TemplateResult\n args?: Partial<T>\n argTypes?: Record<string, unknown>\n}\n\ninterface ArgTypes {\n placeholder?: string\n name?: string\n value?: object | string\n options?: string[] | { display: string; value: string }[]\n multiple?: boolean\n withSearch?: boolean\n disabled?: boolean\n}\n\nconst Template: Story<ArgTypes> = ({\n placeholder = 'Checkbox',\n name = 'hello',\n value = '',\n options = [],\n multiple,\n withSearch,\n disabled\n}: ArgTypes) => html`\n <link href=\"https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap\" rel=\"stylesheet\" />\n\n <link href=\"/themes/light.css\" rel=\"stylesheet\" />\n <link href=\"/themes/dark.css\" rel=\"stylesheet\" />\n <link href=\"/themes/spacing.css\" rel=\"stylesheet\" />\n\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n\n <style>\n ${MDTypeScaleStyles.cssText}\n </style>\n\n <style>\n .container {\n height: 500px;\n text-align: center;\n padding: 20px;\n\n background-color: var(--md-sys-color-primary-container);\n color: var(--md-sys-color-on-primary-container);\n }\n </style>\n\n <div class=\"container md-typescale-body-large-prominent\">\n <ox-select\n name=${name}\n @change=${(e: Event) => {\n console.log((e.target as HTMLInputElement).value)\n }}\n placeholder=${placeholder}\n .value=${value}\n ?disabled=${disabled}\n >\n </ox-select>\n\n <input\n type=\"button\"\n value=\"set options\"\n @click=${() => {\n const select = document.querySelector('ox-select') as OxSelect\n select.setOptions(options, { multiple, withSearch })\n select.value = JSON.parse(JSON.stringify(value))\n }}\n />\n </div>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n placeholder: 'single select',\n name: 'label',\n value: '',\n multiple: false,\n options: [\n {\n value: 'A',\n display: 'LABEL-A'\n },\n {\n value: 'B',\n display: 'LABEL-B'\n },\n {\n value: 'C',\n display: 'LABEL-C'\n },\n {\n value: 'TOO LONG VALUE',\n display: 'LABEL-TOO LONG VALUE'\n }\n ]\n}\n\nexport const MultipleSelect = Template.bind({})\nMultipleSelect.args = {\n placeholder: 'multiple select',\n name: 'multiple',\n multiple: true,\n withSearch: true,\n value: ['B', 'TOO LONG VALUE'],\n options: [\n 'A',\n 'B',\n 'C',\n 'D',\n 'E',\n 'F',\n 'G',\n 'H',\n 'I',\n 'J',\n 'K',\n 'L',\n 'M',\n 'O',\n 'P',\n 'Q',\n 'R',\n 'S',\n 'T',\n 'U',\n 'V',\n 'W',\n 'X',\n 'Y',\n 'Z',\n 'TOO LONG VALUE'\n ]\n}\n\nexport const MultipleWithCheckbox = Template.bind({})\nMultipleWithCheckbox.args = {\n placeholder: 'multiple with checkbox',\n name: 'multiple',\n multiple: true,\n withSearch: true,\n value: ['B', 'C', 'F'],\n options: [\n {\n value: 'A',\n display: 'A'\n },\n {\n value: 'B',\n display: 'B'\n },\n {\n value: 'C',\n display: 'C'\n },\n {\n value: 'D',\n display: 'D'\n },\n {\n value: 'E',\n display: 'E'\n },\n {\n value: 'F',\n display: 'F'\n },\n {\n value: 'G',\n display: 'G'\n },\n {\n value: 'TOO LONG VALUE',\n display: 'TOO LONG VALUE'\n }\n ]\n}\n"]}
|
@@ -14,10 +14,6 @@ declare const _default: {
|
|
14
14
|
disabled: {
|
15
15
|
control: string;
|
16
16
|
};
|
17
|
-
theme: {
|
18
|
-
control: string;
|
19
|
-
options: string[];
|
20
|
-
};
|
21
17
|
};
|
22
18
|
};
|
23
19
|
export default _default;
|
@@ -32,7 +28,6 @@ interface ArgTypes {
|
|
32
28
|
value?: object | string;
|
33
29
|
slot?: TemplateResult;
|
34
30
|
disabled?: boolean;
|
35
|
-
theme?: string;
|
36
31
|
}
|
37
32
|
export declare const Regular: Story<ArgTypes>;
|
38
33
|
export declare const MultipleSelect: Story<ArgTypes>;
|
@@ -8,11 +8,10 @@ export default {
|
|
8
8
|
argTypes: {
|
9
9
|
placeholder: { control: 'text' },
|
10
10
|
name: { control: 'text' },
|
11
|
-
disabled: { control: 'boolean' }
|
12
|
-
theme: { control: 'select', options: ['light', 'dark'] }
|
11
|
+
disabled: { control: 'boolean' }
|
13
12
|
}
|
14
13
|
};
|
15
|
-
const Template = ({ placeholder = 'Checkbox', name = 'hello', value = '', slot, disabled
|
14
|
+
const Template = ({ placeholder = 'Checkbox', name = 'hello', value = '', slot, disabled }) => html `
|
16
15
|
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
17
16
|
|
18
17
|
<link href="/themes/light.css" rel="stylesheet" />
|
@@ -47,10 +46,6 @@ const Template = ({ placeholder = 'Checkbox', name = 'hello', value = '', slot,
|
|
47
46
|
}
|
48
47
|
</style>
|
49
48
|
|
50
|
-
<script>
|
51
|
-
document.body.classList.add('${theme}')
|
52
|
-
</script>
|
53
|
-
|
54
49
|
<div class="container md-typescale-body-large-prominent">
|
55
50
|
<ox-select
|
56
51
|
name=${name}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ox-select.stories.js","sourceRoot":"","sources":["../../stories/ox-select.stories.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAA;AAC5B,OAAO,uBAAuB,CAAA;AAE9B,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,MAAM,IAAI,iBAAiB,EAAE,MAAM,8CAA8C,CAAA;AAE1F,eAAe;IACb,KAAK,EAAE,WAAW;IAClB,SAAS,EAAE,WAAW;IACtB,QAAQ,EAAE;QACR,WAAW,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QAChC,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QACzB,QAAQ,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;
|
1
|
+
{"version":3,"file":"ox-select.stories.js","sourceRoot":"","sources":["../../stories/ox-select.stories.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAA;AAC5B,OAAO,uBAAuB,CAAA;AAE9B,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,MAAM,IAAI,iBAAiB,EAAE,MAAM,8CAA8C,CAAA;AAE1F,eAAe;IACb,KAAK,EAAE,WAAW;IAClB,SAAS,EAAE,WAAW;IACtB,QAAQ,EAAE;QACR,WAAW,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QAChC,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QACzB,QAAQ,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;KACjC;CACF,CAAA;AAgBD,MAAM,QAAQ,GAAoB,CAAC,EACjC,WAAW,GAAG,UAAU,EACxB,IAAI,GAAG,OAAO,EACd,KAAK,GAAG,EAAE,EACV,IAAI,EACJ,QAAQ,EACC,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;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AAC,MAAM,CACnF,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC,CACzC,CAAA;QACD,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAE,MAA2B,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,CACjF;QAAC,MAAM,CAAC,OAAO,CAAC,WAAW,CAAU,CAAC,KAAK,GAAG,OAAO;aACnD,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAE,MAA2B,CAAC,OAAO,CAAC,CAAC,CAAE,MAA2B,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;aACtG,MAAM,CAAC,OAAO,CAAC,CAAA;IACpB,CAAC;;;;;;;;;;;;GAYN;CACF,CAAA","sourcesContent":["import '../src/ox-select.js'\nimport '../src/ox-checkbox.js'\n\nimport { html, TemplateResult } from 'lit'\nimport { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'\n\nexport default {\n title: 'ox-select',\n component: 'ox-select',\n argTypes: {\n placeholder: { control: 'text' },\n name: { control: 'text' },\n disabled: { control: 'boolean' }\n }\n}\n\ninterface Story<T> {\n (args: T): TemplateResult\n args?: Partial<T>\n argTypes?: Record<string, unknown>\n}\n\ninterface ArgTypes {\n placeholder?: string\n name?: string\n value?: object | string\n slot?: TemplateResult\n disabled?: boolean\n}\n\nconst Template: Story<ArgTypes> = ({\n placeholder = 'Checkbox',\n name = 'hello',\n value = '',\n slot,\n disabled\n}: ArgTypes) => html`\n <link href=\"https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap\" rel=\"stylesheet\" />\n\n <link href=\"/themes/light.css\" rel=\"stylesheet\" />\n <link href=\"/themes/dark.css\" rel=\"stylesheet\" />\n <link href=\"/themes/spacing.css\" rel=\"stylesheet\" />\n\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n\n <style>\n ${MDTypeScaleStyles.cssText}\n </style>\n\n <style>\n .container {\n height: 500px;\n text-align: center;\n padding: 20px;\n\n background-color: var(--md-sys-color-primary-container);\n color: var(--md-sys-color-on-primary-container);\n }\n </style>\n\n <div class=\"container md-typescale-body-large-prominent\">\n <ox-select\n name=${name}\n @change=${(e: Event) => {\n console.log((e.target as HTMLInputElement).value)\n }}\n placeholder=${placeholder}\n .value=${value}\n ?disabled=${disabled}\n >\n ${slot}\n </ox-select>\n </div>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n placeholder: 'single select',\n name: 'label',\n value: '',\n slot: html`\n <ox-popup-list align-left nowrap>\n <div option value=\"A\">LABEL-A</div>\n <div option value=\"B\">LABEL-B</div>\n <div option value=\"C\">LABEL-C</div>\n <div option value=\"TOO LONG VALUE\">LABEL-TOO LONG VALUE</div>\n </ox-popup-list>\n `\n}\n\nexport const MultipleSelect = Template.bind({})\nMultipleSelect.args = {\n placeholder: 'multiple select',\n name: 'multiple',\n value: ['B', 'TOO LONG VALUE'],\n slot: html`\n <ox-popup-list multiple with-search>\n <div option value=\"A\">A</div>\n <div option value=\"B\">B</div>\n <div option value=\"C\">C</div>\n <div option value=\"D\">D</div>\n <div option value=\"E\">E</div>\n <div option value=\"F\">F</div>\n <div option value=\"G\">G</div>\n <div option value=\"H\">H</div>\n <div option value=\"I\">I</div>\n <div option value=\"J\">J</div>\n <div option value=\"K\">K</div>\n <div option value=\"L\">L</div>\n <div option value=\"M\">M</div>\n <div option value=\"O\">O</div>\n <div option value=\"P\">P</div>\n <div option value=\"Q\">Q</div>\n <div option value=\"R\">R</div>\n <div option value=\"S\">S</div>\n <div option value=\"T\">T</div>\n <div option value=\"U\">U</div>\n <div option value=\"V\">V</div>\n <div option value=\"W\">W</div>\n <div option value=\"X\">X</div>\n <div option value=\"Y\">Y</div>\n <div option value=\"Z\">Z</div>\n <div option value=\"TOO LONG VALUE\" />TOO LONG VALUE</div>\n </ox-popup-list>\n `\n}\n\nexport const MultipleWithCheckbox = Template.bind({})\nMultipleWithCheckbox.args = {\n placeholder: 'multiple with checkbox',\n name: 'multiple',\n value: ['B', 'C', 'F'],\n slot: html`\n <ox-popup-list attr-selected=\"checked\" multiple with-search>\n <ox-checkbox\n @change=${(e: Event) => {\n const target = e.target as HTMLInputElement\n const options = Array.from(target.parentElement!.querySelectorAll('[option]')).filter(\n option => !option.hasAttribute('hidden')\n )\n options.forEach(option => ((option as HTMLInputElement).checked = target.checked))\n ;(target.closest('ox-select') as any)!.value = options\n .map(option => ((option as HTMLInputElement).checked ? (option as HTMLInputElement).value : undefined))\n .filter(Boolean)\n }}\n >set all</ox-checkbox\n >\n <ox-checkbox option value=\"A\">LABEL-A</ox-checkbox>\n <ox-checkbox option value=\"B\">LABEL-B</ox-checkbox>\n <ox-checkbox option value=\"C\" checked>LABEL-C</ox-checkbox>\n <ox-checkbox option value=\"D\">LABEL-D</ox-checkbox>\n <ox-checkbox option value=\"E\">LABEL-E</ox-checkbox>\n <ox-checkbox option value=\"F\">LABEL-F</ox-checkbox>\n <ox-checkbox option value=\"G\">LABEL-G</ox-checkbox>\n <ox-checkbox option value=\"TOO LONG VALUE\">TOO LONG VALUE</ox-checkbox>\n </ox-popup-list>\n `\n}\n"]}
|