@rededor/cura 0.5.2 → 0.5.4
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/dist/assets/icons/iconset-default-list.ts +1 -1
- package/dist/assets/icons/iconset-default-tmp.svg +4 -0
- package/dist/assets/icons/iconset-default.svg +1 -1
- package/dist/cjs/cura-accordion_8.cjs.entry.js +10 -17
- package/dist/cjs/cura-accordion_8.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-alert.cjs.entry.js +67 -0
- package/dist/cjs/cura-alert.cjs.entry.js.map +1 -0
- package/dist/cjs/cura-button-outline.cjs.entry.js +1 -1
- package/dist/cjs/cura-button-select.cjs.entry.js +97 -0
- package/dist/cjs/cura-button-select.cjs.entry.js.map +1 -0
- package/dist/cjs/cura-button-transparent.cjs.entry.js +1 -1
- package/dist/cjs/cura-checkbox.cjs.entry.js +145 -0
- package/dist/cjs/cura-checkbox.cjs.entry.js.map +1 -0
- package/dist/cjs/cura-display.cjs.entry.js +1 -1
- package/dist/cjs/cura-forms.definitions-11be2ebd.js +20 -0
- package/dist/cjs/cura-forms.definitions-11be2ebd.js.map +1 -0
- package/dist/cjs/cura-icon.definitions-b73b0178.js +21 -0
- package/dist/cjs/cura-icon.definitions-b73b0178.js.map +1 -0
- package/dist/cjs/cura-icons-view.cjs.entry.js +13 -6
- package/dist/cjs/cura-icons-view.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-input-text.cjs.entry.js +3907 -0
- package/dist/cjs/cura-input-text.cjs.entry.js.map +1 -0
- package/dist/cjs/cura-label.cjs.entry.js +1 -1
- package/dist/cjs/cura-radio.cjs.entry.js +115 -0
- package/dist/cjs/cura-radio.cjs.entry.js.map +1 -0
- package/dist/cjs/cura-switch.cjs.entry.js +90 -0
- package/dist/cjs/cura-switch.cjs.entry.js.map +1 -0
- package/dist/cjs/cura.cjs.js +2 -2
- package/dist/cjs/{index-404d93e9.js → index-7616f620.js} +35 -1
- package/dist/cjs/index-7616f620.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/assets/icons/iconset-default-list.js +1 -1
- package/dist/collection/assets/icons/iconset-default-list.js.map +1 -1
- package/dist/collection/assets/icons/iconset-default-tmp.svg +4 -0
- package/dist/collection/assets/icons/iconset-default.svg +1 -1
- package/dist/collection/assets-raw/icons/default/swap.svg +3 -0
- package/dist/collection/collection-manifest.json +6 -0
- package/dist/collection/components/buttons/cura-button/cura-button.css +4 -0
- package/dist/collection/components/buttons/cura-button/cura-button.stories.js +2 -2
- package/dist/collection/components/buttons/cura-button/cura-button.stories.js.map +1 -1
- package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.css +4 -0
- package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.stories.js +2 -2
- package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.stories.js.map +1 -1
- package/dist/collection/components/buttons/cura-button-select/cura-button-select.css +139 -0
- package/dist/collection/components/buttons/cura-button-select/cura-button-select.js +263 -0
- package/dist/collection/components/buttons/cura-button-select/cura-button-select.js.map +1 -0
- package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.css +4 -0
- package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.stories.js +2 -2
- package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.stories.js.map +1 -1
- package/dist/collection/components/cura-alert/cura-alert.css +30 -0
- package/dist/collection/components/cura-alert/cura-alert.js +167 -0
- package/dist/collection/components/cura-alert/cura-alert.js.map +1 -0
- package/dist/collection/components/cura-alert/cura-alert.stories.js +95 -0
- package/dist/collection/components/cura-alert/cura-alert.stories.js.map +1 -0
- package/dist/collection/components/cura-icon/cura-icon.definitions.js +15 -0
- package/dist/collection/components/cura-icon/cura-icon.definitions.js.map +1 -0
- package/dist/collection/components/cura-icon/cura-icon.js +9 -16
- package/dist/collection/components/cura-icon/cura-icon.js.map +1 -1
- package/dist/collection/components/cura-icon/cura-icon.stories.js +7 -6
- package/dist/collection/components/cura-icon/cura-icon.stories.js.map +1 -1
- package/dist/collection/components/cura-icons-view/cura-icons-view.css +16 -17
- package/dist/collection/components/cura-icons-view/cura-icons-view.js +10 -3
- package/dist/collection/components/cura-icons-view/cura-icons-view.js.map +1 -1
- package/dist/collection/components/forms/cura-checkbox/cura-checkbox.css +163 -0
- package/dist/collection/components/forms/cura-checkbox/cura-checkbox.js +432 -0
- package/dist/collection/components/forms/cura-checkbox/cura-checkbox.js.map +1 -0
- package/dist/collection/components/forms/cura-checkbox/cura-checkbox.stories.js +196 -0
- package/dist/collection/components/forms/cura-checkbox/cura-checkbox.stories.js.map +1 -0
- package/dist/collection/components/forms/cura-forms.definitions.js +15 -0
- package/dist/collection/components/forms/cura-forms.definitions.js.map +1 -0
- package/dist/collection/components/forms/cura-input-text/cura-input-text.css +326 -0
- package/dist/collection/components/forms/cura-input-text/cura-input-text.js +655 -0
- package/dist/collection/components/forms/cura-input-text/cura-input-text.js.map +1 -0
- package/dist/collection/components/forms/cura-input-text/cura-input-text.stories.js +224 -0
- package/dist/collection/components/forms/cura-input-text/cura-input-text.stories.js.map +1 -0
- package/dist/collection/components/forms/cura-input-text/mask-presets/input-mask-presets.js +46 -0
- package/dist/collection/components/forms/cura-input-text/mask-presets/input-mask-presets.js.map +1 -0
- package/dist/collection/components/forms/cura-radio/cura-radio.css +146 -0
- package/dist/collection/components/forms/cura-radio/cura-radio.js +366 -0
- package/dist/collection/components/forms/cura-radio/cura-radio.js.map +1 -0
- package/dist/collection/components/forms/cura-radio/cura-radio.stories.js +175 -0
- package/dist/collection/components/forms/cura-radio/cura-radio.stories.js.map +1 -0
- package/dist/collection/components/forms/cura-switch/cura-switch.css +100 -0
- package/dist/collection/components/forms/cura-switch/cura-switch.js +267 -0
- package/dist/collection/components/forms/cura-switch/cura-switch.js.map +1 -0
- package/dist/collection/components/forms/cura-switch/cura-switch.stories.js +137 -0
- package/dist/collection/components/forms/cura-switch/cura-switch.stories.js.map +1 -0
- package/dist/components/cura-alert.d.ts +11 -0
- package/dist/components/cura-alert.js +105 -0
- package/dist/components/cura-alert.js.map +1 -0
- package/dist/components/cura-button-select.d.ts +11 -0
- package/dist/components/cura-button-select.js +127 -0
- package/dist/components/cura-button-select.js.map +1 -0
- package/dist/components/cura-checkbox.d.ts +11 -0
- package/dist/components/cura-checkbox.js +193 -0
- package/dist/components/cura-checkbox.js.map +1 -0
- package/dist/components/cura-forms.definitions.js +18 -0
- package/dist/components/cura-forms.definitions.js.map +1 -0
- package/dist/components/cura-heading.js +1 -100
- package/dist/components/cura-heading.js.map +1 -1
- package/dist/components/cura-heading2.js +104 -0
- package/dist/components/cura-heading2.js.map +1 -0
- package/dist/components/cura-icon2.js +24 -17
- package/dist/components/cura-icon2.js.map +1 -1
- package/dist/components/cura-icons-view.js +31 -7
- package/dist/components/cura-icons-view.js.map +1 -1
- package/dist/components/cura-input-text.d.ts +11 -0
- package/dist/components/cura-input-text.js +3961 -0
- package/dist/components/cura-input-text.js.map +1 -0
- package/dist/components/cura-label.js +1 -84
- package/dist/components/cura-label.js.map +1 -1
- package/dist/components/cura-label2.js +88 -0
- package/dist/components/cura-label2.js.map +1 -0
- package/dist/components/cura-paragraph.js +1 -82
- package/dist/components/cura-paragraph.js.map +1 -1
- package/dist/components/cura-paragraph2.js +86 -0
- package/dist/components/cura-paragraph2.js.map +1 -0
- package/dist/components/cura-radio.d.ts +11 -0
- package/dist/components/cura-radio.js +155 -0
- package/dist/components/cura-radio.js.map +1 -0
- package/dist/components/cura-switch.d.ts +11 -0
- package/dist/components/cura-switch.js +120 -0
- package/dist/components/cura-switch.js.map +1 -0
- package/dist/components/index.js +12 -0
- package/dist/components/index.js.map +1 -1
- package/dist/cura/cura.esm.js +1 -1
- package/dist/cura/cura.esm.js.map +1 -1
- package/dist/cura/cura.js +1 -1
- package/dist/cura/p-1228e771.entry.js +2 -0
- package/dist/cura/p-1228e771.entry.js.map +1 -0
- package/dist/cura/p-2d42ccf4.entry.js +2 -0
- package/dist/cura/p-2d42ccf4.entry.js.map +1 -0
- package/dist/cura/p-3688570d.js +2 -0
- package/dist/cura/p-3688570d.js.map +1 -0
- package/dist/cura/p-36a83bc7.system.js +3 -0
- package/dist/cura/p-36a83bc7.system.js.map +1 -0
- package/dist/cura/p-3f3355f3.system.entry.js +2 -0
- package/dist/cura/p-3f3355f3.system.entry.js.map +1 -0
- package/dist/cura/p-3f5de5e2.entry.js +2 -0
- package/dist/cura/p-3f5de5e2.entry.js.map +1 -0
- package/dist/cura/p-4db87e8d.system.entry.js +2 -0
- package/dist/cura/p-4db87e8d.system.entry.js.map +1 -0
- package/dist/cura/p-51e00a16.entry.js +2 -0
- package/dist/cura/p-51e00a16.entry.js.map +1 -0
- package/dist/cura/{p-0c79c54e.entry.js → p-72a9ed55.entry.js} +2 -2
- package/dist/cura/{p-7c8f3c77.system.entry.js → p-75b2e4d1.system.entry.js} +2 -2
- package/dist/cura/{p-03047b3e.entry.js → p-880917c1.entry.js} +2 -2
- package/dist/cura/p-8d959fb2.entry.js +2 -0
- package/dist/cura/p-8d959fb2.entry.js.map +1 -0
- package/dist/cura/{p-d47b9cfe.system.entry.js → p-9471c93e.system.entry.js} +2 -2
- package/dist/cura/p-98014544.entry.js +2 -0
- package/dist/cura/p-98014544.entry.js.map +1 -0
- package/dist/cura/{p-223924fb.system.entry.js → p-98352c92.system.entry.js} +2 -2
- package/dist/cura/p-a32889a4.system.js +2 -0
- package/dist/cura/p-a32889a4.system.js.map +1 -0
- package/dist/cura/p-ab8c9a8f.system.entry.js +2 -0
- package/dist/cura/p-ab8c9a8f.system.entry.js.map +1 -0
- package/dist/cura/{p-91b0f78e.entry.js → p-ad194144.entry.js} +2 -2
- package/dist/cura/p-b0e13882.system.entry.js +2 -0
- package/dist/cura/p-b0e13882.system.entry.js.map +1 -0
- package/dist/cura/p-ba66d7be.js +3 -0
- package/dist/cura/{p-c0c00396.system.js.map → p-ba66d7be.js.map} +1 -1
- package/dist/cura/p-bb3f9d05.entry.js +2 -0
- package/dist/cura/p-bb3f9d05.entry.js.map +1 -0
- package/dist/cura/p-c791725b.js +2 -0
- package/dist/cura/p-c791725b.js.map +1 -0
- package/dist/cura/p-cb4e2a0c.system.entry.js +2 -0
- package/dist/cura/p-cb4e2a0c.system.entry.js.map +1 -0
- package/dist/cura/p-d3f9c888.system.js +2 -0
- package/dist/cura/p-d3f9c888.system.js.map +1 -0
- package/dist/cura/{p-ca054b07.system.entry.js → p-e5e259fd.system.entry.js} +2 -2
- package/dist/cura/{p-49813052.entry.js → p-edeffbfc.entry.js} +2 -2
- package/dist/cura/p-f51705c2.system.entry.js +2 -0
- package/dist/cura/p-f51705c2.system.entry.js.map +1 -0
- package/dist/cura/p-f89f2ecc.system.entry.js +2 -0
- package/dist/cura/p-f89f2ecc.system.entry.js.map +1 -0
- package/dist/cura/p-fc4ba4ce.system.js +2 -0
- package/dist/cura/p-fc4ba4ce.system.js.map +1 -0
- package/dist/cura/p-fef52079.entry.js +2 -0
- package/dist/cura/p-fef52079.entry.js.map +1 -0
- package/dist/cura/p-ffd41520.system.entry.js +2 -0
- package/dist/cura/p-ffd41520.system.entry.js.map +1 -0
- package/dist/esm/cura-accordion_8.entry.js +10 -17
- package/dist/esm/cura-accordion_8.entry.js.map +1 -1
- package/dist/esm/cura-alert.entry.js +63 -0
- package/dist/esm/cura-alert.entry.js.map +1 -0
- package/dist/esm/cura-button-outline.entry.js +1 -1
- package/dist/esm/cura-button-select.entry.js +93 -0
- package/dist/esm/cura-button-select.entry.js.map +1 -0
- package/dist/esm/cura-button-transparent.entry.js +1 -1
- package/dist/esm/cura-checkbox.entry.js +141 -0
- package/dist/esm/cura-checkbox.entry.js.map +1 -0
- package/dist/esm/cura-display.entry.js +1 -1
- package/dist/esm/cura-forms.definitions-0f774253.js +18 -0
- package/dist/esm/cura-forms.definitions-0f774253.js.map +1 -0
- package/dist/esm/cura-icon.definitions-a63d1862.js +18 -0
- package/dist/esm/cura-icon.definitions-a63d1862.js.map +1 -0
- package/dist/esm/cura-icons-view.entry.js +13 -6
- package/dist/esm/cura-icons-view.entry.js.map +1 -1
- package/dist/esm/cura-input-text.entry.js +3903 -0
- package/dist/esm/cura-input-text.entry.js.map +1 -0
- package/dist/esm/cura-label.entry.js +1 -1
- package/dist/esm/cura-radio.entry.js +111 -0
- package/dist/esm/cura-radio.entry.js.map +1 -0
- package/dist/esm/cura-switch.entry.js +86 -0
- package/dist/esm/cura-switch.entry.js.map +1 -0
- package/dist/esm/cura.js +3 -3
- package/dist/esm/{index-d99da69e.js → index-81f1a268.js} +35 -2
- package/dist/{esm-es5/index-d99da69e.js.map → esm/index-81f1a268.js.map} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm-es5/cura-accordion_8.entry.js +1 -1
- package/dist/esm-es5/cura-accordion_8.entry.js.map +1 -1
- package/dist/esm-es5/cura-alert.entry.js +2 -0
- package/dist/esm-es5/cura-alert.entry.js.map +1 -0
- package/dist/esm-es5/cura-button-outline.entry.js +1 -1
- package/dist/esm-es5/cura-button-select.entry.js +2 -0
- package/dist/esm-es5/cura-button-select.entry.js.map +1 -0
- package/dist/esm-es5/cura-button-transparent.entry.js +1 -1
- package/dist/esm-es5/cura-checkbox.entry.js +2 -0
- package/dist/esm-es5/cura-checkbox.entry.js.map +1 -0
- package/dist/esm-es5/cura-display.entry.js +1 -1
- package/dist/esm-es5/cura-forms.definitions-0f774253.js +2 -0
- package/dist/esm-es5/cura-forms.definitions-0f774253.js.map +1 -0
- package/dist/esm-es5/cura-icon.definitions-a63d1862.js +2 -0
- package/dist/esm-es5/cura-icon.definitions-a63d1862.js.map +1 -0
- package/dist/esm-es5/cura-icons-view.entry.js +1 -1
- package/dist/esm-es5/cura-icons-view.entry.js.map +1 -1
- package/dist/esm-es5/cura-input-text.entry.js +2 -0
- package/dist/esm-es5/cura-input-text.entry.js.map +1 -0
- package/dist/esm-es5/cura-label.entry.js +1 -1
- package/dist/esm-es5/cura-radio.entry.js +2 -0
- package/dist/esm-es5/cura-radio.entry.js.map +1 -0
- package/dist/esm-es5/cura-switch.entry.js +2 -0
- package/dist/esm-es5/cura-switch.entry.js.map +1 -0
- package/dist/esm-es5/cura.js +1 -1
- package/dist/esm-es5/cura.js.map +1 -1
- package/dist/esm-es5/index-81f1a268.js +3 -0
- package/dist/esm-es5/index-81f1a268.js.map +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/loader.js.map +1 -1
- package/dist/types/components/buttons/cura-button/cura-button.d.ts +1 -1
- package/dist/types/components/buttons/cura-button-select/cura-button-select.d.ts +51 -0
- package/dist/types/components/cura-alert/cura-alert.d.ts +16 -0
- package/dist/types/components/cura-alert/cura-alert.stories.d.ts +79 -0
- package/dist/types/components/cura-icon/cura-icon.d.ts +0 -42
- package/dist/types/components/cura-icon/cura-icon.definitions.d.ts +47 -0
- package/dist/types/components/cura-icons-view/cura-icons-view.d.ts +2 -1
- package/dist/types/components/forms/cura-checkbox/cura-checkbox.d.ts +100 -0
- package/dist/types/components/forms/cura-checkbox/cura-checkbox.stories.d.ts +199 -0
- package/dist/types/components/forms/cura-forms.definitions.d.ts +14 -0
- package/dist/types/components/forms/cura-input-text/cura-input-text.d.ts +138 -0
- package/dist/types/components/forms/cura-input-text/cura-input-text.stories.d.ts +224 -0
- package/dist/types/components/forms/cura-input-text/mask-presets/input-mask-presets.d.ts +5 -0
- package/dist/types/components/forms/cura-radio/cura-radio.d.ts +81 -0
- package/dist/types/components/forms/cura-radio/cura-radio.stories.d.ts +180 -0
- package/dist/types/components/forms/cura-switch/cura-switch.d.ts +62 -0
- package/dist/types/components/forms/cura-switch/cura-switch.stories.d.ts +135 -0
- package/dist/types/components.d.ts +602 -0
- package/package.json +5 -4
- package/dist/cjs/index-404d93e9.js.map +0 -1
- package/dist/cura/p-46d20db3.js +0 -3
- package/dist/cura/p-46d20db3.js.map +0 -1
- package/dist/cura/p-4bdbcdf0.system.entry.js +0 -2
- package/dist/cura/p-4bdbcdf0.system.entry.js.map +0 -1
- package/dist/cura/p-8b18b5f7.system.js +0 -2
- package/dist/cura/p-8b18b5f7.system.js.map +0 -1
- package/dist/cura/p-a0395f90.entry.js +0 -2
- package/dist/cura/p-a0395f90.entry.js.map +0 -1
- package/dist/cura/p-a7ef255f.entry.js +0 -2
- package/dist/cura/p-a7ef255f.entry.js.map +0 -1
- package/dist/cura/p-c0c00396.system.js +0 -3
- package/dist/cura/p-fc77814b.system.entry.js +0 -2
- package/dist/cura/p-fc77814b.system.entry.js.map +0 -1
- package/dist/esm/index-d99da69e.js.map +0 -1
- package/dist/esm-es5/index-d99da69e.js +0 -3
- /package/dist/cura/{p-0c79c54e.entry.js.map → p-72a9ed55.entry.js.map} +0 -0
- /package/dist/cura/{p-7c8f3c77.system.entry.js.map → p-75b2e4d1.system.entry.js.map} +0 -0
- /package/dist/cura/{p-03047b3e.entry.js.map → p-880917c1.entry.js.map} +0 -0
- /package/dist/cura/{p-d47b9cfe.system.entry.js.map → p-9471c93e.system.entry.js.map} +0 -0
- /package/dist/cura/{p-223924fb.system.entry.js.map → p-98352c92.system.entry.js.map} +0 -0
- /package/dist/cura/{p-91b0f78e.entry.js.map → p-ad194144.entry.js.map} +0 -0
- /package/dist/cura/{p-ca054b07.system.entry.js.map → p-e5e259fd.system.entry.js.map} +0 -0
- /package/dist/cura/{p-49813052.entry.js.map → p-edeffbfc.entry.js.map} +0 -0
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-7616f620.js');
|
|
6
|
+
const curaForms_definitions = require('./cura-forms.definitions-11be2ebd.js');
|
|
7
|
+
|
|
8
|
+
const curaCheckboxCss = "@charset \"UTF-8\";:host{display:block;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;-webkit-box-sizing:border-box;box-sizing:border-box}.container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row-reverse;flex-direction:row-reverse;gap:var(--gap)}.position.container{-ms-flex-direction:row;flex-direction:row}.position .label-wrapper{-ms-flex-pack:end;justify-content:end}.position .message{text-align:right}.position .label{-ms-flex-order:1;order:1}.info{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.label-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:start;justify-content:start;-ms-flex-align:center;align-items:center;gap:5px}.control{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;cursor:pointer;position:relative}.checkbox{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:2px solid var(--primary-base-neutral-medium);border-radius:4px;background:var(--neutral-lighter-neutral-purewhite);-ms-flex:1 0;flex:1 0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;position:relative;cursor:pointer;-webkit-box-sizing:border-box;box-sizing:border-box;width:var(--size);height:var(--size);-ms-flex:0 0 var(--size);flex:0 0 var(--size)}.icon{position:absolute;display:-ms-flexbox;display:flex;opacity:0;-webkit-transition:opacity 0.3s;transition:opacity 0.3s}.checkbox:focus{border-color:var(--info-base) !important}.disabled .checkbox{background:var(--primary-darker-neutral-white);border-color:var(--primary-base-neutral-base);cursor:not-allowed}.disabled .checkbox:hover{border-color:var(--primary-base-neutral-base) !important}.disabled.checked .checkbox,.disabled.indeterminate .checkbox{background:var(--primary-base-neutral-white);border-color:var(--primary-base-neutral-base)}.disabled.checked .checkbox:hover,.disabled.indeterminate .checkbox:hover{border-color:var(--primary-base-neutral-base) !important;background:var(--primary-base-neutral-white)}.disabled .checkbox:focus{border-color:var(--primary-base-neutral-base)}.checked .checkbox,.indeterminate .checkbox{border-color:var(--color-dark);background:var(--color-base)}.checked .checkbox:hover,.indeterminate .checkbox:hover{border-color:var(--color-light) !important;background:var(--color-lighter)}.checked .icon,.indeterminate .icon{opacity:1}:not(.disabled):not(.checked):not(.indeterminate) .checkbox:hover{border-color:var(--primary-base-neutral-dark)}.success .checkbox{border-color:var(--success-base);background:var(--success-lighter)}.success .checkbox:hover{border-color:var(--success-base) !important}.success.checked .checkbox{border-color:var(--success-dark-base);background:var(--success-base-lighter)}.success.checked .checkbox:hover{border-color:var(--success-dark-base)}.error .checkbox{border-color:var(--error-base);background:var(--error-lighter)}.error .checkbox:hover{border-color:var(--error-base) !important}.error.checked .checkbox{border-color:var(--error-dark-base);background:var(--error-base-lighter)}.error.checked .checkbox:hover{border-color:var(--error-dark-base)}input{appearance:none;-webkit-appearance:none;-moz-appearance:none}";
|
|
9
|
+
|
|
10
|
+
const CuraCheckbox = class {
|
|
11
|
+
constructor(hostRef) {
|
|
12
|
+
index.registerInstance(this, hostRef);
|
|
13
|
+
this.onchange = index.createEvent(this, "onchange", 7);
|
|
14
|
+
this.isDarkbackground = () => this.background === 'dark';
|
|
15
|
+
this.isDarkIconColor = () => this.iconColor === 'dark';
|
|
16
|
+
/**
|
|
17
|
+
* Handles click event on the checkbox.
|
|
18
|
+
* Emits onchange event with value, checked, and indeterminate states.
|
|
19
|
+
*/
|
|
20
|
+
this.handleClick = () => {
|
|
21
|
+
if (this.disabled)
|
|
22
|
+
return;
|
|
23
|
+
this.indeterminate = false;
|
|
24
|
+
this.checked = !this.checked;
|
|
25
|
+
this.onchange.emit({ value: this.value, checked: this.checked, indeterminate: this.indeterminate });
|
|
26
|
+
};
|
|
27
|
+
this.checked = false;
|
|
28
|
+
this.indeterminate = false;
|
|
29
|
+
this.status = 'default';
|
|
30
|
+
this.disabled = false;
|
|
31
|
+
this.required = false;
|
|
32
|
+
this.label = undefined;
|
|
33
|
+
this.ontabindex = 0;
|
|
34
|
+
this.position = 'left';
|
|
35
|
+
this.value = undefined;
|
|
36
|
+
this.name = undefined;
|
|
37
|
+
this.size = 'medium';
|
|
38
|
+
this.background = 'light';
|
|
39
|
+
this.iconColor = 'dark';
|
|
40
|
+
this.color = 'accent';
|
|
41
|
+
this.styles = {};
|
|
42
|
+
}
|
|
43
|
+
sizeHandler() {
|
|
44
|
+
this.styles = Object.assign(Object.assign({}, this.styles), { '--size': `${curaForms_definitions.formsSizes[this.size].size}px`, '--gap': `${curaForms_definitions.formsSizes[this.size].gap}px` });
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Watches changes in color and background properties to update styles.
|
|
48
|
+
*/
|
|
49
|
+
setColors() {
|
|
50
|
+
const colors = [
|
|
51
|
+
{ name: '--color-base', background: `${this.color}-base` },
|
|
52
|
+
{ name: '--color-lighter', background: `${this.color}-lighter` },
|
|
53
|
+
{ name: '--color-light', background: `${this.color}-light` },
|
|
54
|
+
{ name: '--color-dark', background: `${this.color}-dark` },
|
|
55
|
+
{ name: '--info-base', background: 'info-base' },
|
|
56
|
+
{ name: '--error-base', background: 'error-base' },
|
|
57
|
+
{ name: '--success-lighter', background: 'success-lighter' },
|
|
58
|
+
{ name: '--success-base', background: 'success-base' },
|
|
59
|
+
{ name: '--success-dark', background: 'success-dark' },
|
|
60
|
+
{ name: '--error-lighter', background: 'error-lighter' },
|
|
61
|
+
{ name: '--primary-base-neutral-white', background: this.isDarkbackground() ? 'primary-base' : 'neutral-white' },
|
|
62
|
+
{ name: '--primary-base-neutral-medium', background: this.isDarkbackground() ? 'primary-base' : 'neutral-medium' },
|
|
63
|
+
{ name: '--neutral-lighter-neutral-purewhite', background: this.isDarkbackground() ? 'neutral-lighter' : 'neutral-purewhite' },
|
|
64
|
+
{ name: '--primary-darker-neutral-white', background: this.isDarkbackground() ? 'primary-darker' : 'neutral-white' },
|
|
65
|
+
{ name: '--primary-base-neutral-base', background: this.isDarkbackground() ? 'primary-base' : 'neutral-base' },
|
|
66
|
+
{ name: '--primary-base-neutral-dark', background: this.isDarkbackground() ? 'primary-base' : 'neutral-dark' },
|
|
67
|
+
{ name: '--primary-base-neutral-medium', background: this.isDarkbackground() ? 'primary-base' : 'neutral-medium' },
|
|
68
|
+
{ name: '--success-base-lighter', background: this.isDarkbackground() ? 'success-base' : 'success-lighter' },
|
|
69
|
+
{ name: '--success-dark-base', background: this.isDarkbackground() ? 'success-dark' : 'success-base' },
|
|
70
|
+
{ name: '--error-base-lighter', background: this.isDarkbackground() ? 'error-base' : 'error-lighter' },
|
|
71
|
+
{ name: '--error-dark-base', background: this.isDarkbackground() ? 'error-dark' : 'error-base' },
|
|
72
|
+
];
|
|
73
|
+
colors.forEach(color => {
|
|
74
|
+
this.styles[color.name] = window.CuraAPI.theme.colors.getColor(color.background);
|
|
75
|
+
});
|
|
76
|
+
this.styles = Object.assign({}, this.styles);
|
|
77
|
+
}
|
|
78
|
+
connectedCallback() {
|
|
79
|
+
this.sizeHandler();
|
|
80
|
+
this.setColors();
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Retrieves classes based on component state for conditional styling.
|
|
84
|
+
*/
|
|
85
|
+
getClasses() {
|
|
86
|
+
const classes = {};
|
|
87
|
+
classes['container'] = true;
|
|
88
|
+
classes['checked'] = this.checked;
|
|
89
|
+
classes['disabled'] = this.disabled;
|
|
90
|
+
classes['indeterminate'] = this.indeterminate;
|
|
91
|
+
classes['position'] = this.position === 'right';
|
|
92
|
+
classes[this.status] = true;
|
|
93
|
+
return classes;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Assigns color based on status and background theme.
|
|
97
|
+
* @param defaultColor Default color.
|
|
98
|
+
*/
|
|
99
|
+
assignColor(type) {
|
|
100
|
+
if (this.disabled)
|
|
101
|
+
return this.isDarkbackground() ? 'primary-darker' : 'neutral-medium';
|
|
102
|
+
const statusColors = {
|
|
103
|
+
success: {
|
|
104
|
+
icon: 'success-dark',
|
|
105
|
+
label: this.isDarkbackground() ? 'success-lighter' : 'success-darker',
|
|
106
|
+
message: this.isDarkbackground() ? 'success-base' : 'success-dark'
|
|
107
|
+
},
|
|
108
|
+
error: {
|
|
109
|
+
icon: 'error-dark',
|
|
110
|
+
label: this.isDarkbackground() ? 'error-lighter' : 'neutral-darker',
|
|
111
|
+
message: this.isDarkbackground() ? 'error-base' : 'error-dark'
|
|
112
|
+
},
|
|
113
|
+
default: {
|
|
114
|
+
icon: this.isDarkIconColor() ? 'neutral-black' : 'neutral-purewhite',
|
|
115
|
+
label: this.isDarkbackground() ? 'neutral-white' : 'neutral-black',
|
|
116
|
+
message: this.isDarkbackground() ? 'primary-lighter' : 'neutral-dark'
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
return statusColors[this.status][type];
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Retrieves icon element based on checkbox state.
|
|
123
|
+
*/
|
|
124
|
+
getIcon() {
|
|
125
|
+
const iconName = this.indeterminate ? 'minus' : "check";
|
|
126
|
+
const iconColor = this.assignColor('icon');
|
|
127
|
+
const iconSize = this.size === 'large' ? 20 : "micro";
|
|
128
|
+
return index.h("cura-icon", { class: "icon", name: iconName, size: iconSize, color: iconColor });
|
|
129
|
+
}
|
|
130
|
+
render() {
|
|
131
|
+
return (index.h(index.Host, null, index.h("div", { class: this.getClasses(), style: this.styles }, index.h("div", { class: "info" }, index.h("div", { class: "label-wrapper" }, index.h("cura-label", { class: "label", size: this.size === 'large' ? 'medium' : 'xsmall', color: this.assignColor('label') }, this.label), this.required && index.h("cura-paragraph", { lineHeight: '0%', marginBlock: '0', color: "error-base" }, "* ")), index.h("cura-label", { color: this.assignColor('message'), size: "xsmall", class: "message" }, index.h("slot", null))), index.h("div", { class: "checkbox", onClick: this.handleClick, tabIndex: this.ontabindex }, index.h("input", { type: "checkbox", name: this.name, value: this.value, disabled: this.disabled, required: this.required, checked: this.checked, indeterminate: this.indeterminate }), this.getIcon()))));
|
|
132
|
+
}
|
|
133
|
+
get host() { return index.getElement(this); }
|
|
134
|
+
static get watchers() { return {
|
|
135
|
+
"size": ["sizeHandler"],
|
|
136
|
+
"color": ["setColors"],
|
|
137
|
+
"background": ["setColors", "assignColor"],
|
|
138
|
+
"iconColor": ["assignColor"]
|
|
139
|
+
}; }
|
|
140
|
+
};
|
|
141
|
+
CuraCheckbox.style = curaCheckboxCss;
|
|
142
|
+
|
|
143
|
+
exports.cura_checkbox = CuraCheckbox;
|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host"],"sources":["./src/components/forms/cura-checkbox/cura-checkbox.scss?tag=cura-checkbox&encapsulation=shadow","./src/components/forms/cura-checkbox/cura-checkbox.tsx"],"sourcesContent":[":host {\n display: block;\n width: fit-content;\n box-sizing: border-box;\n}\n\n/* Container e Layout */\n.container {\n display: flex;\n align-items: center;\n flex-direction: row-reverse;\n gap: var(--gap);\n\n}\n\n.position {\n\n &.container {\n flex-direction: row;\n }\n\n .label-wrapper {\n justify-content: end;\n }\n\n .message {\n text-align: right;\n }\n\n .label {\n order:1\n }\n\n}\n\n.info {\n display: flex;\n flex-direction: column;\n}\n\n.label-wrapper {\n display: flex;\n justify-content: start;\n align-items: center;\n gap: 5px;\n}\n\n/* Control e Checkbox */\n.control {\n width: fit-content;\n cursor: pointer;\n position: relative;\n}\n\n.checkbox {\n appearance: none;\n border: 2px solid var(--primary-base-neutral-medium);\n border-radius: 4px;\n background: var(--neutral-lighter-neutral-purewhite);\n flex: 1 0;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n cursor: pointer;\n box-sizing: border-box;\n width: var(--size);\n height: var(--size);\n flex: 0 0 var(--size);\n}\n\n.icon {\n position: absolute;\n display: flex;\n opacity: 0;\n transition: opacity 0.3s;\n}\n\n/* Estados de Foco */\n.checkbox:focus {\n border-color: var(--info-base) !important;\n}\n\n/* Estado Disabled */\n.disabled .checkbox {\n background: var(--primary-darker-neutral-white);\n border-color: var(--primary-base-neutral-base);\n cursor: not-allowed;\n\n &:hover {\n border-color: var(--primary-base-neutral-base) !important;\n }\n}\n\n.disabled.checked .checkbox,\n.disabled.indeterminate .checkbox {\n background: var(--primary-base-neutral-white);\n border-color: var(--primary-base-neutral-base);\n\n &:hover {\n border-color: var(--primary-base-neutral-base) !important;\n background: var(--primary-base-neutral-white);\n\n }\n}\n\n.disabled .checkbox:focus {\n border-color: var(--primary-base-neutral-base);\n}\n\n/* Estado Checked */\n.checked .checkbox,\n.indeterminate .checkbox {\n border-color: var(--color-dark);\n background: var(--color-base);\n\n &:hover {\n border-color: var(--color-light) !important;\n background: var(--color-lighter);\n }\n}\n\n.checked .icon,\n.indeterminate .icon {\n opacity: 1;\n}\n\n/* Hover para não disabled, checked, indeterminate */\n:not(.disabled):not(.checked):not(.indeterminate) .checkbox:hover {\n border-color: var(--primary-base-neutral-dark);\n}\n\n/* Estado Success */\n.success .checkbox {\n border-color: var(--success-base) ;\n background: var(--success-lighter);\n\n &:hover{\n border-color: var(--success-base) !important;\n }\n}\n\n.success.checked .checkbox {\n border-color: var(--success-dark-base);\n background: var(--success-base-lighter);\n\n &:hover {\n border-color: var(--success-dark-base);\n }\n}\n\n/* Estado Error */\n.error .checkbox {\n border-color: var(--error-base);\n background: var(--error-lighter);\n\n &:hover {\n border-color: var(--error-base) !important;\n }\n}\n\n.error.checked .checkbox {\n border-color: var(--error-dark-base);\n background: var(--error-base-lighter);\n\n &:hover {\n border-color: var(--error-dark-base);\n }\n}\n\n/* Input */\ninput {\n appearance: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n}\n","import { Component, Prop, Event, Element, h, Host, Watch, EventEmitter, State } from '@stencil/core';\nimport { formsSizes } from '../cura-forms.definitions';\n\n@Component({\n tag: 'cura-checkbox',\n styleUrl: 'cura-checkbox.scss',\n shadow: true,\n})\n\nexport class CuraCheckbox {\n /**\n * Reflects the checked state of the checkbox.\n * Mutable property allowing state change.\n */\n @Prop({ reflect: true, mutable: true }) checked: boolean = false;\n /**\n * Reflects the indeterminate state of the checkbox.\n * Mutable property allowing state change.\n */\n @Prop({ reflect: true, mutable: true }) indeterminate: boolean = false;\n /**\n * Status of the checkbox.\n * Can be 'error', 'success', or 'default'.\n */\n @Prop({ reflect: true, mutable: true }) status: 'error' | 'success' | 'default' = 'default';\n /**\n * Reflects the disabled state of the checkbox.\n */\n @Prop({ reflect: true }) disabled: boolean = false;\n /**\n * Reflects the required state of the checkbox.\n */\n @Prop({ reflect: true }) required: boolean = false;\n /**\n * Text label associated with the checkbox.\n */\n @Prop({ reflect: true }) label: string;\n /**\n * Specifies the tabindex of the checkbox.\n */\n @Prop({ reflect: true }) ontabindex: number = 0;\n /**\n * Position of the label relative to the checkbox.\n * Can be 'left' or 'right'.\n */\n @Prop({ reflect: true }) position: 'left' | 'right' = 'left';\n /**\n * Value associated with the checkbox.\n */\n @Prop({ reflect: true }) value: string;\n /**\n * Name attribute of the checkbox.\n */\n @Prop({ reflect: true }) name: string;\n /**\n * Size of the checkbox.\n * Can be 'small', 'medium', or 'large'.\n */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n /**\n * Background theme of the checkbox.\n * Can be 'dark' or 'light'.\n */\n @Prop() background: 'dark' | 'light' = 'light';\n /**\n * iconColor theme of the checkbox.\n * Can be 'dark' or 'light'.\n */\n @Prop() iconColor: 'dark' | 'light' = 'dark';\n /**\n * Color theme of the checkbox.\n */\n @Prop() color = 'accent';\n\n @State() styles = {};\n\n @Element() host: HTMLElement;\n\n @Event() onchange: EventEmitter<{ value: string, checked: boolean, indeterminate: boolean }>;\n\n isDarkbackground = () => this.background === 'dark';\n\n isDarkIconColor = () => this.iconColor === 'dark';\n\n\n @Watch('size')\n sizeHandler() {\n this.styles = {\n ...this.styles,\n '--size': `${formsSizes[this.size].size}px`,\n '--gap': `${formsSizes[this.size].gap}px`\n };\n }\n\n\n /**\n * Watches changes in color and background properties to update styles.\n */\n @Watch('color')\n @Watch('background')\n setColors() {\n const colors = [\n { name: '--color-base', background: `${this.color}-base` },\n { name: '--color-lighter', background: `${this.color}-lighter` },\n { name: '--color-light', background: `${this.color}-light` },\n { name: '--color-dark', background: `${this.color}-dark` },\n { name: '--info-base', background: 'info-base' },\n { name: '--error-base', background: 'error-base' },\n { name: '--success-lighter', background: 'success-lighter' },\n { name: '--success-base', background: 'success-base' },\n { name: '--success-dark', background: 'success-dark' },\n { name: '--error-lighter', background: 'error-lighter' },\n { name: '--primary-base-neutral-white', background: this.isDarkbackground() ? 'primary-base' : 'neutral-white' },\n { name: '--primary-base-neutral-medium', background: this.isDarkbackground() ? 'primary-base' : 'neutral-medium' },\n { name: '--neutral-lighter-neutral-purewhite', background: this.isDarkbackground() ? 'neutral-lighter' : 'neutral-purewhite' },\n { name: '--primary-darker-neutral-white', background: this.isDarkbackground() ? 'primary-darker' : 'neutral-white' },\n { name: '--primary-base-neutral-base', background: this.isDarkbackground() ? 'primary-base' : 'neutral-base' },\n { name: '--primary-base-neutral-dark', background: this.isDarkbackground() ? 'primary-base' : 'neutral-dark' },\n { name: '--primary-base-neutral-medium', background: this.isDarkbackground() ? 'primary-base' : 'neutral-medium' },\n { name: '--success-base-lighter', background: this.isDarkbackground() ? 'success-base' : 'success-lighter' },\n { name: '--success-dark-base', background: this.isDarkbackground() ? 'success-dark' : 'success-base' },\n { name: '--error-base-lighter', background: this.isDarkbackground() ? 'error-base' : 'error-lighter' },\n { name: '--error-dark-base', background: this.isDarkbackground() ? 'error-dark' : 'error-base' },\n ];\n\n colors.forEach(color => {\n this.styles[color.name] = window.CuraAPI.theme.colors.getColor(color.background);\n });\n this.styles = { ...this.styles };\n\n }\n\n connectedCallback() {\n this.sizeHandler()\n this.setColors();\n }\n\n /**\n * Handles click event on the checkbox.\n * Emits onchange event with value, checked, and indeterminate states.\n */\n handleClick = () => {\n if (this.disabled) return;\n\n this.indeterminate = false;\n this.checked = !this.checked;\n this.onchange.emit({ value: this.value, checked: this.checked, indeterminate: this.indeterminate });\n };\n\n /**\n * Retrieves classes based on component state for conditional styling.\n */\n getClasses() {\n const classes = {};\n classes['container'] = true;\n classes['checked'] = this.checked;\n classes['disabled'] = this.disabled;\n classes['indeterminate'] = this.indeterminate;\n classes['position'] = this.position === 'right';\n classes[this.status] = true;\n\n return classes;\n }\n\n /**\n * Assigns color based on status and background theme.\n * @param defaultColor Default color.\n */\n\n @Watch('background')\n @Watch('iconColor')\n assignColor(type: 'icon' | 'label' | 'message',) {\n if (this.disabled) return this.isDarkbackground() ? 'primary-darker' : 'neutral-medium';\n\n const statusColors = {\n success: {\n icon: 'success-dark',\n label: this.isDarkbackground() ? 'success-lighter' : 'success-darker',\n message: this.isDarkbackground() ? 'success-base' : 'success-dark'\n },\n error: {\n icon: 'error-dark',\n label: this.isDarkbackground() ? 'error-lighter' : 'neutral-darker',\n message: this.isDarkbackground() ? 'error-base' : 'error-dark'\n },\n default: {\n icon: this.isDarkIconColor() ? 'neutral-black' : 'neutral-purewhite',\n label: this.isDarkbackground() ? 'neutral-white' : 'neutral-black',\n message: this.isDarkbackground() ? 'primary-lighter' : 'neutral-dark'\n }\n };\n\n return statusColors[this.status][type];\n }\n\n /**\n * Retrieves icon element based on checkbox state.\n */\n getIcon() {\n const iconName = this.indeterminate ? 'minus' : \"check\"\n const iconColor = this.assignColor('icon');\n const iconSize = this.size === 'large' ? 20 : \"micro\"\n\n return <cura-icon class=\"icon\" name={iconName} size={iconSize} color={iconColor}></cura-icon>\n }\n\n\n render() {\n return (\n <Host>\n <div class={this.getClasses()} style={this.styles}>\n <div class=\"info\">\n <div class=\"label-wrapper\">\n <cura-label\n class=\"label\"\n size={this.size === 'large' ? 'medium' : 'xsmall'}\n color={this.assignColor('label')}>\n {this.label}\n </cura-label>\n {this.required && <cura-paragraph lineHeight='0%' marginBlock='0' color=\"error-base\" >* </cura-paragraph>}\n </div>\n <cura-label\n color={this.assignColor('message')}\n size=\"xsmall\"\n class=\"message\">\n <slot></slot>\n </cura-label>\n </div>\n <div class={\"checkbox\"} onClick={this.handleClick} tabIndex={this.ontabindex}>\n <input\n type=\"checkbox\"\n name={this.name}\n value={this.value}\n disabled={this.disabled}\n required={this.required}\n checked={this.checked}\n indeterminate={this.indeterminate}\n />\n {this.getIcon()}\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-7616f620.js');
|
|
6
6
|
|
|
7
7
|
const curaDisplayCss = ":host{display:block;font-size:var(--font-size-base)}:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-family:var(--font-family);font-size:3em;font-weight:var(--font-weight-bold);color:var(--color-body);line-height:var(--line-height);margin-block:var(--margin-block);letter-spacing:0px}@media (min-width: 769px) and (max-width: 1920px){:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-size:3.429em}}@media (min-width: 1921px){:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-size:4.286em;line-height:calc(var(--line-height) + 5%)}}:host ::slotted(b),:host ::slotted(strong){font-weight:var(--font-weight-bold)}:host ::slotted(a){font-weight:var(--font-weight-bold);color:var(--color-link);text-underline-offset:10%;cursor:pointer}:host ::slotted(u){text-underline-offset:10%}:host ::slotted(abbr){color:var(--color-link);-webkit-text-decoration:underline dashed 1px var(--color-link);text-decoration:underline dashed 1px var(--color-link);text-underline-offset:10%;cursor:default}";
|
|
8
8
|
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const formsSizes = {
|
|
4
|
+
"large": {
|
|
5
|
+
size: 32,
|
|
6
|
+
gap: 16,
|
|
7
|
+
},
|
|
8
|
+
"medium": {
|
|
9
|
+
size: 24,
|
|
10
|
+
gap: 12,
|
|
11
|
+
},
|
|
12
|
+
"small": {
|
|
13
|
+
size: 20,
|
|
14
|
+
gap: 8,
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
exports.formsSizes = formsSizes;
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=cura-forms.definitions-11be2ebd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"cura-forms.definitions-11be2ebd.js","mappings":";;MAAa,UAAU,GAAG;EACxB,OAAO,EAAE;IACP,IAAI,EAAE,EAAE;IACR,GAAG,EAAE,EAAE;GACR;EACD,QAAQ,EAAE;IACR,IAAI,EAAE,EAAE;IACR,GAAG,EAAE,EAAE;GACR;EACD,OAAO,EAAE;IACP,IAAI,EAAE,EAAE;IACR,GAAG,EAAE,CAAC;GACP;;;;;","names":[],"sources":["./src/components/forms/cura-forms.definitions.tsx"],"sourcesContent":["export const formsSizes = {\n \"large\": {\n size: 32,\n gap: 16,\n },\n \"medium\": {\n size: 24,\n gap: 12,\n },\n \"small\": {\n size: 20,\n gap: 8,\n },\n};\n"],"version":3}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const microIcons = ['arrowDown', 'arrowLeft', 'arrowRight', 'arrowUp', 'check', 'checkDouble', 'close', 'closeCircle', 'collapse', 'down', 'expand', 'linkExternal', 'link', 'left', 'minus', 'minusCircle', 'minusSquare', 'order', 'subItem', 'right', 'plus', 'plusCircle', 'plusSquare', 'up', 'filter', 'swap'];
|
|
4
|
+
const iconSizes = {
|
|
5
|
+
"128": { size: 128, stroke: 5.25 },
|
|
6
|
+
"72": { size: 72, stroke: 3.5 },
|
|
7
|
+
"64": { size: 64, stroke: 3.25 },
|
|
8
|
+
"48": { size: 48, stroke: 2.75 },
|
|
9
|
+
"40": { size: 40, stroke: 2.5 },
|
|
10
|
+
"32": { size: 32, stroke: 2.25 },
|
|
11
|
+
"24": { size: 24, stroke: 2 },
|
|
12
|
+
"20": { size: 20, stroke: 1.75 },
|
|
13
|
+
"16": { size: 16, stroke: 1.5 },
|
|
14
|
+
"micro": { size: 12, stroke: 1.5 },
|
|
15
|
+
"default": { size: 24, stroke: 2 }
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
exports.iconSizes = iconSizes;
|
|
19
|
+
exports.microIcons = microIcons;
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=cura-icon.definitions-b73b0178.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"cura-icon.definitions-b73b0178.js","mappings":";;MAAa,UAAU,GAAG,CAAC,WAAW,EAAC,WAAW,EAAC,YAAY,EAAC,SAAS,EAAC,OAAO,EAAC,aAAa,EAAC,OAAO,EAAC,aAAa,EAAC,UAAU,EAAC,MAAM,EAAC,QAAQ,EAAC,cAAc,EAAC,MAAM,EAAC,MAAM,EAAC,OAAO,EAAC,aAAa,EAAC,aAAa,EAAC,OAAO,EAAC,SAAS,EAAC,OAAO,EAAC,MAAM,EAAC,YAAY,EAAC,YAAY,EAAC,IAAI,EAAC,QAAQ,EAAC,MAAM,EAAE;MAEtR,SAAS,GAAG;EACvB,KAAK,EAAE,EAAC,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAC;EAChC,IAAI,EAAE,EAAC,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAC;EAC7B,IAAI,EAAE,EAAC,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAC;EAC9B,IAAI,EAAE,EAAC,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAC;EAC9B,IAAI,EAAE,EAAC,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAC;EAC7B,IAAI,EAAE,EAAC,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAC;EAC9B,IAAI,EAAE,EAAC,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,EAAC;EAC3B,IAAI,EAAE,EAAC,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAC;EAC9B,IAAI,EAAE,EAAC,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAC;EAC7B,OAAO,EAAE,EAAC,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE;EACjC,SAAS,EAAE,EAAC,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,EAAC;;;;;;","names":[],"sources":["./src/components/cura-icon/cura-icon.definitions.tsx"],"sourcesContent":["export const microIcons = ['arrowDown','arrowLeft','arrowRight','arrowUp','check','checkDouble','close','closeCircle','collapse','down','expand','linkExternal','link','left','minus','minusCircle','minusSquare','order','subItem','right','plus','plusCircle','plusSquare','up','filter','swap'];\n\nexport const iconSizes = {\n \"128\": {size: 128, stroke: 5.25},\n \"72\": {size: 72, stroke: 3.5},\n \"64\": {size: 64, stroke: 3.25},\n \"48\": {size: 48, stroke: 2.75},\n \"40\": {size: 40, stroke: 2.5},\n \"32\": {size: 32, stroke: 2.25},\n \"24\": {size: 24, stroke: 2},\n \"20\": {size: 20, stroke: 1.75},\n \"16\": {size: 16, stroke: 1.5},\n \"micro\": {size: 12, stroke: 1.5 },\n \"default\": {size: 24, stroke: 2}\n};\n"],"version":3}
|
|
@@ -2,24 +2,31 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-7616f620.js');
|
|
6
|
+
const curaIcon_definitions = require('./cura-icon.definitions-b73b0178.js');
|
|
6
7
|
|
|
7
|
-
const iconsetdefaulticons = ["360", "accessibility", "addUser", "airdrop", "alertCircle", "alertTriangle", "arrowDown", "arrowDownCircle", "arrowLeft", "arrowLeftCircle", "arrowRight", "arrowRightCircle", "arrowUp", "arrowUpCircle", "attach", "avatarF", "avatarM", "biometry", "bloodGroup", "calendar", "cam", "camOff", "central", "chatCircle", "check", "checkBadge", "checkCircle", "checkDouble", "clock", "close", "closeCircle", "collapse", "config", "currency", "delete", "desktop", "doc", "down", "download", "duplicate", "edit", "exam", "examDoc", "expand", "facebook", "fileBmp", "fileJpg", "filePdf", "filePng", "fileUpload", "fileXls", "filter", "fullscreen", "gallery", "geotag", "geotagUnity", "geotagUnityGroup", "google", "graph", "healthPlan", "heart", "height", "height2", "home", "horizontalList", "imageUp", "infoCircle", "instagram", "key", "lamp", "language", "language2", "languageEN", "languagePT", "lattes", "left", "like", "link", "linkExternal", "linkedin", "list", "login", "logout", "mail", "maintenance", "medDoc", "medEspec", "medImg", "medUser", "medical", "menuHamburguer", "menuKebab", "menuMeatballs", "mic", "micOff", "minus", "minusCircle", "minusSquare", "mobile", "news", "notification", "npsDeslike", "npsHate", "npsLike", "npsLove", "npsNeutral", "order", "partner", "phone", "play", "plus", "plusCircle", "plusSquare", "print", "profile", "profileCircle", "questionCircle", "questionSquare", "range", "reload", "ribbon", "right", "schedule", "scheduleCheck", "scheduleHistorico", "search", "secure", "share", "siren", "sound", "soundOff", "subItem", "target", "team", "telegram", "twitter", "unLink", "unSecure", "unity", "unlike", "up", "upload", "verticalList", "viewFalse", "viewTrue", "weight", "whatsapp", "wifi", "wifiOff", "youtube", "zoomIn", "zoomOut"];
|
|
8
|
+
const iconsetdefaulticons = ["360", "accessibility", "addUser", "airdrop", "alertCircle", "alertTriangle", "arrowDown", "arrowDownCircle", "arrowLeft", "arrowLeftCircle", "arrowRight", "arrowRightCircle", "arrowUp", "arrowUpCircle", "attach", "avatarF", "avatarM", "biometry", "bloodGroup", "calendar", "cam", "camOff", "central", "chatCircle", "check", "checkBadge", "checkCircle", "checkDouble", "clock", "close", "closeCircle", "collapse", "config", "currency", "delete", "desktop", "doc", "down", "download", "duplicate", "edit", "exam", "examDoc", "expand", "facebook", "fileBmp", "fileJpg", "filePdf", "filePng", "fileUpload", "fileXls", "filter", "fullscreen", "gallery", "geotag", "geotagUnity", "geotagUnityGroup", "google", "graph", "healthPlan", "heart", "height", "height2", "home", "horizontalList", "imageUp", "infoCircle", "instagram", "key", "lamp", "language", "language2", "languageEN", "languagePT", "lattes", "left", "like", "link", "linkExternal", "linkedin", "list", "login", "logout", "mail", "maintenance", "medDoc", "medEspec", "medImg", "medUser", "medical", "menuHamburguer", "menuKebab", "menuMeatballs", "mic", "micOff", "minus", "minusCircle", "minusSquare", "mobile", "news", "notification", "npsDeslike", "npsHate", "npsLike", "npsLove", "npsNeutral", "order", "partner", "phone", "play", "plus", "plusCircle", "plusSquare", "print", "profile", "profileCircle", "questionCircle", "questionSquare", "range", "reload", "ribbon", "right", "schedule", "scheduleCheck", "scheduleHistorico", "search", "secure", "share", "siren", "sound", "soundOff", "subItem", "swap", "target", "team", "telegram", "twitter", "unLink", "unSecure", "unity", "unlike", "up", "upload", "verticalList", "viewFalse", "viewTrue", "weight", "whatsapp", "wifi", "wifiOff", "youtube", "zoomIn", "zoomOut"];
|
|
8
9
|
|
|
9
|
-
const curaIconsViewCss = ":host{display:block;padding:24px;font-family:\"Roboto\", Arial, Helvetica, sans-serif}.iconDetail{display:block}.iconSizes{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.iconSizes .size{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;text-align:center;margin-right:9px;padding:8px}.iconSizes .size:last-child{margin-right:0}.iconSizes .size span{font-size:10px}.iconSizes.invert{margin-top:12px}.iconSizes.invert .size{background-color:#
|
|
10
|
+
const curaIconsViewCss = ":host{display:block;padding:24px;font-family:\"Roboto\", Arial, Helvetica, sans-serif}.iconDetail{display:block}.iconSizes{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.iconSizes .size{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;text-align:center;-ms-flex-align:center;align-items:center;margin-right:9px;padding:8px}.iconSizes .size:last-child{margin-right:0}.iconSizes .size span{font-size:10px;margin:8px 0}.iconSizes.invert{margin-top:12px}.iconSizes.invert .size{background-color:#2d2d2d;color:#F6F6F6;border-radius:3px}.icons{margin-top:28px;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;position:relative}.icons .icon{position:relative;padding:4px;cursor:pointer;opacity:0.6;-webkit-transition:opacity 0.2s linear;transition:opacity 0.2s linear;width:105px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;text-align:center;-ms-flex-align:center;align-items:center;margin-bottom:16px;-webkit-box-sizing:border-box;box-sizing:border-box;}.icons .icon cura-label{margin-top:8px}.icons .icon cura-paragraph{margin-top:4px}";
|
|
10
11
|
|
|
11
12
|
const CuraIconsView = class {
|
|
12
13
|
constructor(hostRef) {
|
|
13
14
|
index.registerInstance(this, hostRef);
|
|
14
|
-
this.sizes =
|
|
15
|
+
this.sizes = Object.keys(curaIcon_definitions.iconSizes).filter(key => key !== 'default');
|
|
15
16
|
this.colors = ['primary', 'secondary', 'accent', 'info', 'warning', 'error', 'success', 'neutral'];
|
|
16
17
|
this.setSelected = (icon) => {
|
|
17
18
|
this.selected = icon;
|
|
18
19
|
};
|
|
19
|
-
this.selected =
|
|
20
|
+
this.selected = iconsetdefaulticons[0];
|
|
21
|
+
}
|
|
22
|
+
connectedCallback() {
|
|
23
|
+
this.sizes.unshift(this.sizes.pop());
|
|
20
24
|
}
|
|
21
25
|
render() {
|
|
22
|
-
return (index.h(index.Host, null, index.h("div", { class: "iconDetail" }, index.h("
|
|
26
|
+
return (index.h(index.Host, null, index.h("div", { class: "iconDetail" }, index.h("cura-heading", { size: "small", "margin-block": "0 24px" }, "Icon: ", index.h("b", null, this.selected)), index.h("div", { class: "iconSizes" }, this.sizes.map(size => size === 'micro' && !curaIcon_definitions.microIcons.includes(this.selected) ? '' :
|
|
27
|
+
index.h("div", { class: "size" }, index.h("cura-icon", { name: this.selected, size: size }), index.h("span", null, size)))), index.h("div", { class: "iconSizes invert" }, this.sizes.map(size => size === 'micro' && !curaIcon_definitions.microIcons.includes(this.selected) ? '' :
|
|
28
|
+
index.h("div", { class: "size" }, index.h("cura-icon", { name: this.selected, size: size, color: "neutral-white" }), index.h("span", null, size))))), index.h("div", { class: "icons" }, iconsetdefaulticons.map(icon => index.h("div", { class: { icon: true, selected: icon === this.selected }, onClick: () => this.setSelected(icon) }, index.h("cura-icon", { name: icon, size: "32", color: icon === this.selected ? 'accent-dark' : 'neutral-dark' }), index.h("cura-label", { size: "xsmall", weight: icon === this.selected ? 'bold' : 'regular', color: icon === this.selected ? 'accent-dark' : 'neutral-dark' }, icon), !curaIcon_definitions.microIcons.includes(icon) ? '' :
|
|
29
|
+
index.h("cura-paragraph", { color: 'success-dark', size: "xsmall", "margin-block": "0px", "line-height": '100%' }, "MICRO"))))));
|
|
23
30
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W,CAAC,IAAI,CAAC,IAChGA,uBACE,IAAI,EAAE,IAAI,EACV,IAAI,EAAC,IAAI,EACT,KAAK,EAAE,IAAI,KAAK,IAAI,CAAC,QAAQ,GAAG,aAAa,GAAG,cAAc,GAAc,EAC9EA,wBACE,IAAI,EAAC,QAAQ,EACb,MAAM,EAAE,IAAI,KAAK,IAAI,CAAC,QAAQ,GAAG,MAAM,GAAG,SAAS,EACnD,KAAK,EAAE,IAAI,KAAK,IAAI,CAAC,QAAQ,GAAG,aAAa,GAAG,cAAc,IAAG,IAAI,CAAc,EACnF,CAACE,+BAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,EAAE;MAC/BF,4BACE,KAAK,EAAC,cAAc,EACpB,IAAI,EAAC,QAAQ,kBACA,KAAK,iBACN,MAAM,YAAuB,CAEzC,CACP,CACG,CACD,EACP;GACH;;;;;;","names":["iconSizes","h","Host","microIcons"],"sources":["./src/assets/icons/iconset-default-list.ts","./src/components/cura-icons-view/cura-icons-view.scss?tag=cura-icons-view&encapsulation=shadow","./src/components/cura-icons-view/cura-icons-view.tsx"],"sourcesContent":["export default [\"360\",\"accessibility\",\"addUser\",\"airdrop\",\"alertCircle\",\"alertTriangle\",\"arrowDown\",\"arrowDownCircle\",\"arrowLeft\",\"arrowLeftCircle\",\"arrowRight\",\"arrowRightCircle\",\"arrowUp\",\"arrowUpCircle\",\"attach\",\"avatarF\",\"avatarM\",\"biometry\",\"bloodGroup\",\"calendar\",\"cam\",\"camOff\",\"central\",\"chatCircle\",\"check\",\"checkBadge\",\"checkCircle\",\"checkDouble\",\"clock\",\"close\",\"closeCircle\",\"collapse\",\"config\",\"currency\",\"delete\",\"desktop\",\"doc\",\"down\",\"download\",\"duplicate\",\"edit\",\"exam\",\"examDoc\",\"expand\",\"facebook\",\"fileBmp\",\"fileJpg\",\"filePdf\",\"filePng\",\"fileUpload\",\"fileXls\",\"filter\",\"fullscreen\",\"gallery\",\"geotag\",\"geotagUnity\",\"geotagUnityGroup\",\"google\",\"graph\",\"healthPlan\",\"heart\",\"height\",\"height2\",\"home\",\"horizontalList\",\"imageUp\",\"infoCircle\",\"instagram\",\"key\",\"lamp\",\"language\",\"language2\",\"languageEN\",\"languagePT\",\"lattes\",\"left\",\"like\",\"link\",\"linkExternal\",\"linkedin\",\"list\",\"login\",\"logout\",\"mail\",\"maintenance\",\"medDoc\",\"medEspec\",\"medImg\",\"medUser\",\"medical\",\"menuHamburguer\",\"menuKebab\",\"menuMeatballs\",\"mic\",\"micOff\",\"minus\",\"minusCircle\",\"minusSquare\",\"mobile\",\"news\",\"notification\",\"npsDeslike\",\"npsHate\",\"npsLike\",\"npsLove\",\"npsNeutral\",\"order\",\"partner\",\"phone\",\"play\",\"plus\",\"plusCircle\",\"plusSquare\",\"print\",\"profile\",\"profileCircle\",\"questionCircle\",\"questionSquare\",\"range\",\"reload\",\"ribbon\",\"right\",\"schedule\",\"scheduleCheck\",\"scheduleHistorico\",\"search\",\"secure\",\"share\",\"siren\",\"sound\",\"soundOff\",\"subItem\",\"swap\",\"target\",\"team\",\"telegram\",\"twitter\",\"unLink\",\"unSecure\",\"unity\",\"unlike\",\"up\",\"upload\",\"verticalList\",\"viewFalse\",\"viewTrue\",\"weight\",\"whatsapp\",\"wifi\",\"wifiOff\",\"youtube\",\"zoomIn\",\"zoomOut\"];",":host {\n display: block;\n padding: 24px;\n font-family: 'Roboto', Arial, Helvetica, sans-serif;\n}\n\n.iconDetail {\n display: block;\n}\n\n.iconSizes {\n display: flex;\n align-items: center;\n\n\n .size {\n display: flex;\n flex-direction: column;\n text-align: center;\n align-items: center;\n margin-right: 9px;\n padding: 8px;\n\n &:last-child { margin-right: 0; }\n span {\n font-size: 10px;\n margin: 8px 0;\n }\n }\n\n &.invert {\n margin-top: 12px;\n\n .size {\n background-color: #2d2d2d;\n color: #F6F6F6;\n border-radius: 3px;\n }\n }\n}\n\n.icons {\n margin-top: 28px;\n display: flex;\n flex-wrap: wrap;\n position: relative;\n\n .icon {\n position: relative;\n padding: 4px;\n cursor: pointer;\n opacity: .6;\n transition: opacity .2s linear;\n width: 105px;\n display: flex;\n flex-direction: column;\n text-align: center;\n align-items: center;\n margin-bottom: 16px;\n box-sizing: border-box;\n cura-label {\n margin-top: 8px;\n }\n cura-paragraph {\n margin-top: 4px;\n }\n /* &.selected {\n transform: scale(1.2);\n } */\n }\n}\n\n","import { Component, Host, h, State } from '@stencil/core';\nimport iconsetdefaulticons from '../../assets/icons/iconset-default-list';\nimport { microIcons, iconSizes } from '../cura-icon/cura-icon.definitions';\n\n@Component({\n tag: 'cura-icons-view',\n styleUrl: 'cura-icons-view.scss',\n shadow: true,\n})\nexport class CuraIconsView {\n\n sizes = Object.keys(iconSizes).filter(key => key !== 'default');\n colors = ['primary', 'secondary', 'accent', 'info', 'warning', 'error', 'success', 'neutral'];\n @State() selected = iconsetdefaulticons[0];\n\n connectedCallback() {\n this.sizes.unshift(this.sizes.pop());\n }\n\n setSelected = (icon) => {\n this.selected = icon;\n }\n\n render() {\n return (\n <Host>\n <div class=\"iconDetail\">\n <cura-heading size=\"small\" margin-block=\"0 24px\">Icon: <b>{ this.selected }</b></cura-heading>\n <div class=\"iconSizes\">\n { this.sizes.map( size =>\n size === 'micro' && !microIcons.includes(this.selected) ? '' :\n <div class=\"size\">\n <cura-icon name={this.selected} size={size}></cura-icon>\n <span>{ size }</span>\n </div>\n )}\n </div>\n <div class=\"iconSizes invert\">\n { this.sizes.map( size =>\n size === 'micro' && !microIcons.includes(this.selected) ? '' :\n <div class=\"size\">\n <cura-icon name={this.selected} size={size} color=\"neutral-white\"></cura-icon>\n <span>{ size }</span>\n </div>\n )}\n </div>\n </div>\n <div class=\"icons\">\n { iconsetdefaulticons.map(icon =>\n <div class={{icon: true, selected: icon === this.selected }} onClick={() => this.setSelected(icon)}>\n <cura-icon\n name={icon}\n size=\"32\"\n color={icon === this.selected ? 'accent-dark' : 'neutral-dark'}></cura-icon>\n <cura-label\n size=\"xsmall\"\n weight={icon === this.selected ? 'bold' : 'regular'}\n color={icon === this.selected ? 'accent-dark' : 'neutral-dark'}>{icon}</cura-label>\n { !microIcons.includes(icon) ? '' :\n <cura-paragraph\n color='success-dark'\n size=\"xsmall\"\n margin-block=\"0px\"\n line-height='100%'>MICRO</cura-paragraph>\n }\n </div>\n )}\n </div>\n </Host>\n );\n }\n\n}\n"],"version":3}
|