@operato/input 1.11.13 → 1.12.3
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 +17 -0
- package/dist/src/ox-checkbox.d.ts +0 -1
- package/dist/src/ox-checkbox.js +0 -4
- package/dist/src/ox-checkbox.js.map +1 -1
- package/dist/src/ox-form-field.d.ts +1 -0
- package/dist/src/ox-form-field.js +3 -0
- package/dist/src/ox-form-field.js.map +1 -1
- package/dist/src/ox-input-3axis.js +3 -3
- package/dist/src/ox-input-3axis.js.map +1 -1
- package/dist/src/ox-input-3dish.js +12 -12
- package/dist/src/ox-input-3dish.js.map +1 -1
- package/dist/src/ox-input-angle.js +1 -0
- package/dist/src/ox-input-angle.js.map +1 -1
- package/dist/src/ox-input-barcode.js +2 -0
- package/dist/src/ox-input-barcode.js.map +1 -1
- package/dist/src/ox-input-color-gradient.js +9 -3
- package/dist/src/ox-input-color-gradient.js.map +1 -1
- package/dist/src/ox-input-color-stops.js +20 -0
- package/dist/src/ox-input-color-stops.js.map +1 -1
- package/dist/src/ox-input-color.js +4 -0
- package/dist/src/ox-input-color.js.map +1 -1
- package/dist/src/ox-input-container.d.ts +0 -1
- package/dist/src/ox-input-container.js +1 -7
- package/dist/src/ox-input-container.js.map +1 -1
- package/dist/src/ox-input-data.js +5 -1
- package/dist/src/ox-input-data.js.map +1 -1
- package/dist/src/ox-input-duration.js +23 -4
- package/dist/src/ox-input-duration.js.map +1 -1
- package/dist/src/ox-input-file.js +7 -0
- package/dist/src/ox-input-file.js.map +1 -1
- package/dist/src/ox-input-hashtags.js +21 -18
- package/dist/src/ox-input-hashtags.js.map +1 -1
- package/dist/src/ox-input-image.js +1 -0
- package/dist/src/ox-input-image.js.map +1 -1
- package/dist/src/ox-input-key-values.js +41 -16
- package/dist/src/ox-input-key-values.js.map +1 -1
- package/dist/src/ox-input-mass-fraction.js +56 -46
- package/dist/src/ox-input-mass-fraction.js.map +1 -1
- package/dist/src/ox-input-multiple-colors.js +7 -3
- package/dist/src/ox-input-multiple-colors.js.map +1 -1
- package/dist/src/ox-input-options.js +20 -11
- package/dist/src/ox-input-options.js.map +1 -1
- package/dist/src/ox-input-partition-keys.js +41 -16
- package/dist/src/ox-input-partition-keys.js.map +1 -1
- package/dist/src/ox-input-privilege.js +6 -3
- package/dist/src/ox-input-privilege.js.map +1 -1
- package/dist/src/ox-input-quantifier.js +2 -2
- package/dist/src/ox-input-quantifier.js.map +1 -1
- package/dist/src/ox-input-range.js +2 -0
- package/dist/src/ox-input-range.js.map +1 -1
- package/dist/src/ox-input-scene-component-id.js +1 -0
- package/dist/src/ox-input-scene-component-id.js.map +1 -1
- package/dist/src/ox-input-search.js +2 -1
- package/dist/src/ox-input-search.js.map +1 -1
- package/dist/src/ox-input-select-buttons.js +4 -1
- package/dist/src/ox-input-select-buttons.js.map +1 -1
- package/dist/src/ox-input-stack.js +9 -3
- package/dist/src/ox-input-stack.js.map +1 -1
- package/dist/src/ox-input-textarea.js +1 -0
- package/dist/src/ox-input-textarea.js.map +1 -1
- package/dist/src/ox-input-unit-number.js +4 -0
- package/dist/src/ox-input-unit-number.js.map +1 -1
- package/dist/src/ox-input-value-map.js +30 -14
- package/dist/src/ox-input-value-map.js.map +1 -1
- package/dist/src/ox-input-value-ranges.js +37 -19
- package/dist/src/ox-input-value-ranges.js.map +1 -1
- package/dist/src/ox-input-work-shift.js +35 -27
- package/dist/src/ox-input-work-shift.js.map +1 -1
- package/dist/src/ox-select.js +3 -0
- package/dist/src/ox-select.js.map +1 -1
- package/dist/stories/ox-checkbox.stories.d.ts +4 -0
- package/dist/stories/ox-checkbox.stories.js +4 -2
- package/dist/stories/ox-checkbox.stories.js.map +1 -1
- package/dist/stories/ox-input-3axis.stories.d.ts +4 -0
- package/dist/stories/ox-input-3axis.stories.js +4 -2
- package/dist/stories/ox-input-3axis.stories.js.map +1 -1
- package/dist/stories/ox-input-3dish.stories.d.ts +4 -0
- package/dist/stories/ox-input-3dish.stories.js +4 -2
- package/dist/stories/ox-input-3dish.stories.js.map +1 -1
- package/dist/stories/ox-input-angle.stories.d.ts +4 -0
- package/dist/stories/ox-input-angle.stories.js +4 -2
- package/dist/stories/ox-input-angle.stories.js.map +1 -1
- package/dist/stories/ox-input-barcode.stories.d.ts +4 -0
- package/dist/stories/ox-input-barcode.stories.js +4 -2
- package/dist/stories/ox-input-barcode.stories.js.map +1 -1
- package/dist/stories/ox-input-code.stories.d.ts +4 -0
- package/dist/stories/ox-input-code.stories.js +4 -2
- package/dist/stories/ox-input-code.stories.js.map +1 -1
- package/dist/stories/ox-input-crontab.stories.d.ts +4 -0
- package/dist/stories/ox-input-crontab.stories.js +4 -2
- package/dist/stories/ox-input-crontab.stories.js.map +1 -1
- package/dist/stories/ox-input-duration.stories.d.ts +4 -0
- package/dist/stories/ox-input-duration.stories.js +4 -2
- package/dist/stories/ox-input-duration.stories.js.map +1 -1
- package/dist/stories/ox-input-file.stories.d.ts +4 -0
- package/dist/stories/ox-input-file.stories.js +4 -2
- package/dist/stories/ox-input-file.stories.js.map +1 -1
- package/dist/stories/ox-input-hashtags.stories.d.ts +4 -0
- package/dist/stories/ox-input-hashtags.stories.js +4 -2
- package/dist/stories/ox-input-hashtags.stories.js.map +1 -1
- package/dist/stories/ox-input-key-values.stories.d.ts +4 -0
- package/dist/stories/ox-input-key-values.stories.js +4 -2
- package/dist/stories/ox-input-key-values.stories.js.map +1 -1
- package/dist/stories/ox-input-mass-fraction.stories.d.ts +4 -0
- package/dist/stories/ox-input-mass-fraction.stories.js +5 -2
- package/dist/stories/ox-input-mass-fraction.stories.js.map +1 -1
- package/dist/stories/ox-input-multiple-colors.stories.d.ts +4 -0
- package/dist/stories/ox-input-multiple-colors.stories.js +4 -2
- package/dist/stories/ox-input-multiple-colors.stories.js.map +1 -1
- package/dist/stories/ox-input-options.stories.d.ts +4 -0
- package/dist/stories/ox-input-options.stories.js +4 -2
- package/dist/stories/ox-input-options.stories.js.map +1 -1
- package/dist/stories/ox-input-partition-keys.stories.d.ts +4 -0
- package/dist/stories/ox-input-partition-keys.stories.js +4 -2
- package/dist/stories/ox-input-partition-keys.stories.js.map +1 -1
- package/dist/stories/ox-input-privilege.stories.d.ts +4 -0
- package/dist/stories/ox-input-privilege.stories.js +4 -2
- package/dist/stories/ox-input-privilege.stories.js.map +1 -1
- package/dist/stories/ox-input-quantifier.stories.d.ts +4 -0
- package/dist/stories/ox-input-quantifier.stories.js +4 -2
- package/dist/stories/ox-input-quantifier.stories.js.map +1 -1
- package/dist/stories/ox-input-range.stories.d.ts +4 -0
- package/dist/stories/ox-input-range.stories.js +5 -3
- package/dist/stories/ox-input-range.stories.js.map +1 -1
- package/dist/stories/ox-input-search.stories.d.ts +4 -0
- package/dist/stories/ox-input-search.stories.js +4 -2
- package/dist/stories/ox-input-search.stories.js.map +1 -1
- package/dist/stories/ox-input-select-buttons.stories.d.ts +4 -0
- package/dist/stories/ox-input-select-buttons.stories.js +4 -2
- package/dist/stories/ox-input-select-buttons.stories.js.map +1 -1
- package/dist/stories/ox-input-unit.stories.d.ts +4 -0
- package/dist/stories/ox-input-unit.stories.js +4 -2
- package/dist/stories/ox-input-unit.stories.js.map +1 -1
- package/dist/stories/ox-input-value-map.stories.d.ts +4 -0
- package/dist/stories/ox-input-value-map.stories.js +4 -2
- package/dist/stories/ox-input-value-map.stories.js.map +1 -1
- package/dist/stories/ox-input-value-ranges.stories.d.ts +4 -0
- package/dist/stories/ox-input-value-ranges.stories.js +4 -2
- package/dist/stories/ox-input-value-ranges.stories.js.map +1 -1
- package/dist/stories/ox-input-work-shift.stories.d.ts +4 -0
- package/dist/stories/ox-input-work-shift.stories.js +4 -2
- package/dist/stories/ox-input-work-shift.stories.js.map +1 -1
- package/dist/stories/ox-select.stories.d.ts +4 -0
- package/dist/stories/ox-select.stories.js +4 -2
- package/dist/stories/ox-select.stories.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/src/ox-checkbox.ts +0 -1
- package/src/ox-form-field.ts +1 -0
- package/src/ox-input-3axis.ts +3 -3
- package/src/ox-input-3dish.ts +12 -12
- package/src/ox-input-angle.ts +1 -0
- package/src/ox-input-barcode.ts +2 -0
- package/src/ox-input-color-gradient.ts +9 -3
- package/src/ox-input-color-stops.ts +26 -0
- package/src/ox-input-color.ts +5 -0
- package/src/ox-input-container.ts +0 -7
- package/src/ox-input-data.ts +5 -1
- package/src/ox-input-duration.ts +23 -4
- package/src/ox-input-file.ts +8 -0
- package/src/ox-input-hashtags.ts +21 -18
- package/src/ox-input-image.ts +1 -0
- package/src/ox-input-key-values.ts +41 -16
- package/src/ox-input-mass-fraction.ts +57 -47
- package/src/ox-input-multiple-colors.ts +7 -3
- package/src/ox-input-options.ts +20 -11
- package/src/ox-input-partition-keys.ts +41 -16
- package/src/ox-input-privilege.ts +6 -3
- package/src/ox-input-quantifier.ts +2 -2
- package/src/ox-input-range.ts +2 -0
- package/src/ox-input-scene-component-id.ts +1 -0
- package/src/ox-input-search.ts +2 -1
- package/src/ox-input-select-buttons.ts +4 -1
- package/src/ox-input-stack.ts +9 -3
- package/src/ox-input-textarea.ts +1 -0
- package/src/ox-input-unit-number.ts +5 -0
- package/src/ox-input-value-map.ts +34 -18
- package/src/ox-input-value-ranges.ts +41 -23
- package/src/ox-input-work-shift.ts +39 -31
- package/src/ox-select.ts +4 -0
- package/stories/ox-checkbox.stories.ts +6 -2
- package/stories/ox-input-3axis.stories.ts +5 -2
- package/stories/ox-input-3dish.stories.ts +5 -2
- package/stories/ox-input-angle.stories.ts +5 -2
- package/stories/ox-input-barcode.stories.ts +6 -2
- package/stories/ox-input-code.stories.ts +5 -2
- package/stories/ox-input-crontab.stories.ts +5 -2
- package/stories/ox-input-duration.stories.ts +5 -2
- package/stories/ox-input-file.stories.ts +6 -2
- package/stories/ox-input-hashtags.stories.ts +5 -2
- package/stories/ox-input-key-values.stories.ts +5 -2
- package/stories/ox-input-mass-fraction.stories.ts +11 -2
- package/stories/ox-input-multiple-colors.stories.ts +7 -3
- package/stories/ox-input-options.stories.ts +5 -2
- package/stories/ox-input-partition-keys.stories.ts +5 -2
- package/stories/ox-input-privilege.stories.ts +5 -2
- package/stories/ox-input-quantifier.stories.ts +5 -2
- package/stories/ox-input-range.stories.ts +13 -3
- package/stories/ox-input-search.stories.ts +6 -2
- package/stories/ox-input-select-buttons.stories.ts +11 -2
- package/stories/ox-input-unit.stories.ts +6 -2
- package/stories/ox-input-value-map.stories.ts +6 -2
- package/stories/ox-input-value-ranges.stories.ts +6 -2
- package/stories/ox-input-work-shift.stories.ts +5 -2
- package/stories/ox-select.stories.ts +11 -2
- package/yarn-error.log +0 -17084
@@ -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;AAE1C,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;
|
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;AAE1C,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;KACjC;CACF,CAAA;AAiBD,MAAM,QAAQ,GAAoB,CAAC,EACjC,WAAW,GAAG,MAAM,EACpB,IAAI,GAAG,OAAO,EACd,KAAK,GAAG,CAAC,EACT,OAAO,GAAG,IAAI,EACd,QAAQ,EACR,QAAQ,EACC,EAAE,EAAE,CAAC,IAAI,CAAA;;;WAGT,IAAI;kBACG,WAAW;aAChB,KAAK;eACH,OAAO;gBACN,QAAQ;cACV,CAAC,CAAc,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC;gBACvC,QAAQ;;;CAGvB,CAAA;AAED,MAAM,CAAC,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACvC,MAAM,CAAC,IAAI,GAAG;IACZ,WAAW,EAAE,QAAQ;IACrB,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,CAAC;IACR,OAAO,EAAE,IAAI;CACd,CAAA;AAED,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACtC,KAAK,CAAC,IAAI,GAAG;IACX,WAAW,EAAE,OAAO;IACpB,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,CAAC;IACR,OAAO,EAAE,KAAK;CACf,CAAA;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AAC5C,WAAW,CAAC,IAAI,GAAG;IACjB,WAAW,EAAE,aAAa;IAC1B,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE,CAAC;IACR,OAAO,EAAE,GAAG;IACZ,QAAQ,EAAE,IAAI;CACf,CAAA;AAED,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AAC3C,UAAU,CAAC,IAAI,GAAG;IAChB,WAAW,EAAE,YAAY;IACzB,IAAI,EAAE,YAAY;IAClB,KAAK,EAAE,CAAC;IACR,OAAO,EAAE,GAAG;CACb,CAAA","sourcesContent":["import '../src/ox-input-unit-number.js'\n\nimport { html, TemplateResult } from 'lit'\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=\"/themes/app-theme.css\" rel=\"stylesheet\" />\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`\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"]}
|
@@ -18,6 +18,9 @@ declare const _default: {
|
|
18
18
|
control: string;
|
19
19
|
options: string[];
|
20
20
|
};
|
21
|
+
disabled: {
|
22
|
+
control: string;
|
23
|
+
};
|
21
24
|
};
|
22
25
|
};
|
23
26
|
export default _default;
|
@@ -31,5 +34,6 @@ interface ArgTypes {
|
|
31
34
|
value?: object;
|
32
35
|
valuetype?: string;
|
33
36
|
keytype?: string;
|
37
|
+
disabled?: boolean;
|
34
38
|
}
|
35
39
|
export declare const Regular: Story<ArgTypes>;
|
@@ -7,10 +7,11 @@ export default {
|
|
7
7
|
name: { control: 'text' },
|
8
8
|
value: { control: 'object' },
|
9
9
|
keytype: { control: 'select', options: ['string', 'number'] },
|
10
|
-
valuetype: { control: 'select', options: ['string', 'boolean', 'number', 'color', 'date'] }
|
10
|
+
valuetype: { control: 'select', options: ['string', 'boolean', 'number', 'color', 'date'] },
|
11
|
+
disabled: { control: 'boolean' }
|
11
12
|
}
|
12
13
|
};
|
13
|
-
const Template = ({ name = 'values', value = {}, keytype = 'string', valuetype = 'string' }) => html `
|
14
|
+
const Template = ({ name = 'values', value = {}, keytype = 'string', valuetype = 'string', disabled }) => html `
|
14
15
|
<link href="/themes/app-theme.css" rel="stylesheet" />
|
15
16
|
<link href="https://fonts.googleapis.com/css?family=Material+Icons&display=block" rel="stylesheet" />
|
16
17
|
<style>
|
@@ -26,6 +27,7 @@ const Template = ({ name = 'values', value = {}, keytype = 'string', valuetype =
|
|
26
27
|
.value=${value}
|
27
28
|
keytype=${keytype}
|
28
29
|
valuetype=${valuetype}
|
30
|
+
?disabled=${disabled}
|
29
31
|
>
|
30
32
|
</ox-input-value-map>
|
31
33
|
`;
|
@@ -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;AAE1C,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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AAG,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'\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=\"/themes/app-theme.css\" rel=\"stylesheet\" />\n <link href=\"https://fonts.googleapis.com/css?family=Material+Icons&display=block\" rel=\"stylesheet\" />\n <style>\n body {\n }\n </style>\n\n <ox-input-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`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n name: 'values',\n value: {}\n}\n"]}
|
@@ -18,6 +18,9 @@ declare const _default: {
|
|
18
18
|
control: string;
|
19
19
|
options: string[];
|
20
20
|
};
|
21
|
+
disabled: {
|
22
|
+
control: string;
|
23
|
+
};
|
21
24
|
};
|
22
25
|
};
|
23
26
|
export default _default;
|
@@ -31,5 +34,6 @@ interface ArgTypes {
|
|
31
34
|
value?: object;
|
32
35
|
valuetype?: string;
|
33
36
|
keytype?: string;
|
37
|
+
disabled?: boolean;
|
34
38
|
}
|
35
39
|
export declare const Regular: Story<ArgTypes>;
|
@@ -7,10 +7,11 @@ export default {
|
|
7
7
|
name: { control: 'text' },
|
8
8
|
value: { control: 'object' },
|
9
9
|
keytype: { control: 'select', options: ['string', 'number'] },
|
10
|
-
valuetype: { control: 'select', options: ['string', 'boolean', 'number', 'color', 'date'] }
|
10
|
+
valuetype: { control: 'select', options: ['string', 'boolean', 'number', 'color', 'date'] },
|
11
|
+
disabled: { control: 'boolean' }
|
11
12
|
}
|
12
13
|
};
|
13
|
-
const Template = ({ name = 'values', value = {}, keytype = 'string', valuetype = 'string' }) => html `
|
14
|
+
const Template = ({ name = 'values', value = {}, keytype = 'string', valuetype = 'string', disabled }) => html `
|
14
15
|
<link href="/themes/app-theme.css" rel="stylesheet" />
|
15
16
|
<link href="https://fonts.googleapis.com/css?family=Material+Icons&display=block" rel="stylesheet" />
|
16
17
|
<style>
|
@@ -26,6 +27,7 @@ const Template = ({ name = 'values', value = {}, keytype = 'string', valuetype =
|
|
26
27
|
.value=${value}
|
27
28
|
keytype=${keytype}
|
28
29
|
valuetype=${valuetype}
|
30
|
+
?disabled=${disabled}
|
29
31
|
>
|
30
32
|
</ox-input-value-ranges>
|
31
33
|
`;
|
@@ -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;AAE1C,eAAe;IACb,KAAK,EAAE,uBAAuB;IAC9B,SAAS,EAAE,uBAAuB;IAClC,QAAQ,EAAE;QACR,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QACzB,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QAC5B,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAAE;QAC7D,SAAS,E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AC,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'\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=\"/themes/app-theme.css\" rel=\"stylesheet\" />\n <link href=\"https://fonts.googleapis.com/css?family=Material+Icons&display=block\" rel=\"stylesheet\" />\n <style>\n body {\n }\n </style>\n\n <ox-input-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`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n name: 'values',\n value: {}\n}\n"]}
|
@@ -11,6 +11,9 @@ declare const _default: {
|
|
11
11
|
name: {
|
12
12
|
control: string;
|
13
13
|
};
|
14
|
+
disabled: {
|
15
|
+
control: string;
|
16
|
+
};
|
14
17
|
};
|
15
18
|
};
|
16
19
|
export default _default;
|
@@ -22,5 +25,6 @@ interface Story<T> {
|
|
22
25
|
interface ArgTypes {
|
23
26
|
name?: string;
|
24
27
|
value?: object;
|
28
|
+
disabled?: boolean;
|
25
29
|
}
|
26
30
|
export declare const Regular: Story<ArgTypes>;
|
@@ -6,10 +6,11 @@ export default {
|
|
6
6
|
component: 'ox-input-work-shift',
|
7
7
|
argTypes: {
|
8
8
|
value: { control: 'object' },
|
9
|
-
name: { control: 'text' }
|
9
|
+
name: { control: 'text' },
|
10
|
+
disabled: { control: 'boolean' }
|
10
11
|
}
|
11
12
|
};
|
12
|
-
const Template = ({ name = 'work-shift', value = [] }) => html `
|
13
|
+
const Template = ({ name = 'work-shift', value = [], disabled }) => html `
|
13
14
|
<link href="/themes/app-theme.css" rel="stylesheet" />
|
14
15
|
<link href="https://fonts.googleapis.com/css?family=Material+Icons&display=block" rel="stylesheet" />
|
15
16
|
<style>
|
@@ -26,6 +27,7 @@ const Template = ({ name = 'work-shift', value = [] }) => html `
|
|
26
27
|
}}
|
27
28
|
name=${name}
|
28
29
|
.value=${value}
|
30
|
+
?disabled=${disabled}
|
29
31
|
>
|
30
32
|
</ox-input-work-shift>
|
31
33
|
`;
|
@@ -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;AAE1C,eAAe;IACb,KAAK,EAAE,qBAAqB;IAC5B,SAAS,EAAE,qBAAqB;IAChC,QAAQ,EAAE;QACR,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QAC5B,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;
|
1
|
+
{"version":3,"file":"ox-input-work-shift.stories.js","sourceRoot":"","sources":["../../stories/ox-input-work-shift.stories.ts"],"names":[],"mappings":"AAAA,OAAO,+BAA+B,CAAA;AACtC,OAAO,gCAAgC,CAAA;AAEvC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAE1C,eAAe;IACb,KAAK,EAAE,qBAAqB;IAC5B,SAAS,EAAE,qBAAqB;IAChC,QAAQ,EAAE;QACR,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QAC5B,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;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;;;;;;;;;;;;cAYrF,CAAC,CAAQ,EAAE,EAAE;IACrB,OAAO,CAAC,GAAG,CAAE,CAAC,CAAC,MAA2B,CAAC,KAAK,CAAC,CAAA;AACnD,CAAC;WACM,IAAI;aACF,KAAK;gBACF,QAAQ;;;CAGvB,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG;IACb,IAAI,EAAE,YAAY;IAClB,KAAK,EAAE;QACL;YACE,IAAI,EAAE,KAAK;YACX,QAAQ,EAAE,CAAC,CAAC;YACZ,QAAQ,EAAE,OAAO;YACjB,MAAM,EAAE,CAAC;YACT,MAAM,EAAE,OAAO;SAChB;QACD;YACE,IAAI,EAAE,OAAO;YACb,QAAQ,EAAE,CAAC;YACX,QAAQ,EAAE,OAAO;YACjB,MAAM,EAAE,CAAC;YACT,MAAM,EAAE,OAAO;SAChB;QACD;YACE,IAAI,EAAE,OAAO;YACb,QAAQ,EAAE,CAAC;YACX,QAAQ,EAAE,OAAO;YACjB,MAAM,EAAE,CAAC;YACT,MAAM,EAAE,OAAO;SAChB;KACF;CACF,CAAA","sourcesContent":["import '../src/ox-input-work-shift.js'\nimport '../src/locale/locale-picker.js'\n\nimport { html, TemplateResult } from 'lit'\n\nexport default {\n title: 'ox-input-work-shift',\n component: 'ox-input-work-shift',\n argTypes: {\n value: { control: 'object' },\n name: { control: 'text' },\n 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=\"/themes/app-theme.css\" rel=\"stylesheet\" />\n <link href=\"https://fonts.googleapis.com/css?family=Material+Icons&display=block\" rel=\"stylesheet\" />\n <style>\n body {\n }\n </style>\n\n <locale-picker></locale-picker>\n <br /><br />\n\n <ox-input-work-shift\n @change=${(e: Event) => {\n console.log((e.target as HTMLInputElement).value)\n }}\n name=${name}\n .value=${value}\n ?disabled=${disabled}\n >\n </ox-input-work-shift>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n name: 'work-shift',\n value: [\n {\n name: 'DAY',\n fromDate: -1,\n fromTime: '22:00',\n toDate: 0,\n toTime: '06:00'\n },\n {\n name: 'SWING',\n fromDate: 0,\n fromTime: '06:00',\n toDate: 0,\n toTime: '14:00'\n },\n {\n name: 'NIGHT',\n fromDate: 0,\n fromTime: '14:00',\n toDate: 0,\n toTime: '22:00'\n }\n ]\n}\n"]}
|
@@ -11,6 +11,9 @@ declare const _default: {
|
|
11
11
|
name: {
|
12
12
|
control: string;
|
13
13
|
};
|
14
|
+
disabled: {
|
15
|
+
control: string;
|
16
|
+
};
|
14
17
|
};
|
15
18
|
};
|
16
19
|
export default _default;
|
@@ -24,6 +27,7 @@ interface ArgTypes {
|
|
24
27
|
name?: string;
|
25
28
|
value?: object | string;
|
26
29
|
slot?: TemplateResult;
|
30
|
+
disabled?: boolean;
|
27
31
|
}
|
28
32
|
export declare const Regular: Story<ArgTypes>;
|
29
33
|
export declare const MultipleSelect: Story<ArgTypes>;
|
@@ -6,10 +6,11 @@ export default {
|
|
6
6
|
component: 'ox-select',
|
7
7
|
argTypes: {
|
8
8
|
placeholder: { control: 'text' },
|
9
|
-
name: { control: 'text' }
|
9
|
+
name: { control: 'text' },
|
10
|
+
disabled: { control: 'boolean' }
|
10
11
|
}
|
11
12
|
};
|
12
|
-
const Template = ({ placeholder = 'Checkbox', name = 'hello', value = '', slot }) => html `
|
13
|
+
const Template = ({ placeholder = 'Checkbox', name = 'hello', value = '', slot, disabled }) => html `
|
13
14
|
<link href="/themes/app-theme.css" rel="stylesheet" />
|
14
15
|
<link href="https://fonts.googleapis.com/css?family=Material+Icons&display=block" rel="stylesheet" />
|
15
16
|
|
@@ -21,6 +22,7 @@ const Template = ({ placeholder = 'Checkbox', name = 'hello', value = '', slot }
|
|
21
22
|
}}
|
22
23
|
placeholder=${placeholder}
|
23
24
|
.value=${value}
|
25
|
+
?disabled=${disabled}
|
24
26
|
>
|
25
27
|
${slot}
|
26
28
|
</ox-select>
|
@@ -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;AAE1C,eAAe;IACb,KAAK,EAAE,WAAW;IAClB,SAAS,EAAE,WAAW;IACtB,QAAQ,EAAE;QACR,WAAW,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QAChC,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;
|
1
|
+
{"version":3,"file":"ox-select.stories.js","sourceRoot":"","sources":["../../stories/ox-select.stories.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAA;AAC5B,OAAO,uBAAuB,CAAA;AAE9B,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAE1C,eAAe;IACb,KAAK,EAAE,WAAW;IAClB,SAAS,EAAE,WAAW;IACtB,QAAQ,EAAE;QACR,WAAW,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QAChC,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;Q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,EAAE,EAAE;QACrB,MAAM,MAAM,GAAG,CAAC,CAAC,MAA0B,CAAA;QAC3C,MAAM,OAAO,GAAG,MAAM,CAAC,aAAc,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAA;QAClE,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;QACpB,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAE,MAA2B,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,CAAA;IACpF,CAAC;;;;;;;;;;;;GAYN;CACF,CAAA","sourcesContent":["import '../src/ox-select.js'\nimport '../src/ox-checkbox.js'\n\nimport { html, TemplateResult } from 'lit'\n\nexport default {\n title: 'ox-select',\n component: 'ox-select',\n argTypes: {\n placeholder: { control: 'text' },\n name: { control: 'text' },\n 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=\"/themes/app-theme.css\" rel=\"stylesheet\" />\n <link href=\"https://fonts.googleapis.com/css?family=Material+Icons&display=block\" rel=\"stylesheet\" />\n\n <div style=\"height: 300px\">\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 option\n @change=${(e: Event) => {\n const target = e.target as HTMLInputElement\n const options = target.parentElement!.querySelectorAll('[option]')\n console.log(options)\n options.forEach(option => ((option as HTMLInputElement).checked = target.checked))\n }}\n >set all</ox-checkbox\n >\n <ox-checkbox option value=\"A\">LABEL-A</ox-checkbox>\n <ox-checkbox option value=\"B\">LABEL-B</ox-checkbox>\n <ox-checkbox option value=\"C\" checked>LABEL-C</ox-checkbox>\n <ox-checkbox option value=\"D\">LABEL-D</ox-checkbox>\n <ox-checkbox option value=\"E\">LABEL-E</ox-checkbox>\n <ox-checkbox option value=\"F\">LABEL-F</ox-checkbox>\n <ox-checkbox option value=\"G\">LABEL-G</ox-checkbox>\n <ox-checkbox option value=\"TOO LONG VALUE\">TOO LONG VALUE</ox-checkbox>\n </ox-popup-list>\n `\n}\n"]}
|