@infineon/infineon-design-system-stencil 37.12.1--canary.1988.42a4a34b0a478afeea7ca5b47d1e4a4ed329327b.0 → 37.12.1--canary.1987.b27982aa9c28fcf0181cb6d7ef6b4b7a07d87aeb.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/ifx-alert_2.cjs.entry.js +1 -1
- package/dist/cjs/ifx-card.cjs.entry.js +11 -21
- package/dist/cjs/ifx-card.cjs.entry.js.map +1 -1
- package/dist/cjs/ifx-chip_3.cjs.entry.js +1 -1
- package/dist/cjs/ifx-chip_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ifx-faq.cjs.entry.js +1 -1
- package/dist/cjs/ifx-link.cjs.entry.js +1 -1
- package/dist/cjs/ifx-link.cjs.entry.js.map +1 -1
- package/dist/cjs/ifx-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/ifx-progress-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/ifx-select.cjs.entry.js +43 -27
- package/dist/cjs/ifx-select.cjs.entry.js.map +1 -1
- package/dist/cjs/ifx-sidebar-item.cjs.entry.js +1 -1
- package/dist/cjs/ifx-sidebar-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ifx-slider.cjs.entry.js +3 -3
- package/dist/cjs/ifx-slider.cjs.entry.js.map +1 -1
- package/dist/cjs/ifx-spinner_2.cjs.entry.js +7 -7
- package/dist/cjs/ifx-spinner_2.cjs.entry.js.map +1 -1
- package/dist/cjs/ifx-status.cjs.entry.js +1 -1
- package/dist/cjs/ifx-status.cjs.entry.js.map +1 -1
- package/dist/cjs/ifx-step.cjs.entry.js +1 -1
- package/dist/cjs/ifx-step.cjs.entry.js.map +1 -1
- package/dist/cjs/ifx-stepper.cjs.entry.js +2 -2
- package/dist/cjs/ifx-stepper.cjs.entry.js.map +1 -1
- package/dist/cjs/ifx-switch.cjs.entry.js +1 -1
- package/dist/cjs/ifx-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/ifx-tag.cjs.entry.js +2 -2
- package/dist/cjs/ifx-tag.cjs.entry.js.map +1 -1
- package/dist/cjs/ifx-templates-ui.cjs.entry.js +1 -1
- package/dist/cjs/ifx-textarea.cjs.entry.js +3 -3
- package/dist/cjs/ifx-textarea.cjs.entry.js.map +1 -1
- package/dist/cjs/ifx-tooltip.cjs.entry.js +4 -4
- package/dist/cjs/ifx-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/ifx-tree-view-item.cjs.entry.js +2 -2
- package/dist/cjs/ifx-tree-view.cjs.entry.js +1 -1
- package/dist/cjs/infineon-design-system-stencil.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/card/card.css +2 -2
- package/dist/collection/components/card/card.js +10 -20
- package/dist/collection/components/card/card.js.map +1 -1
- package/dist/collection/components/link/link.js +1 -1
- package/dist/collection/components/link/link.js.map +1 -1
- package/dist/collection/components/navigation/sidebar/sidebar-item.css +6 -2
- package/dist/collection/components/pagination/pagination.js +1 -1
- package/dist/collection/components/pagination/pagination.js.map +1 -1
- package/dist/collection/components/progress-bar/progress-bar.js +1 -1
- package/dist/collection/components/progress-bar/progress-bar.js.map +1 -1
- package/dist/collection/components/select/single-select/select.css +6 -0
- package/dist/collection/components/select/single-select/select.js +42 -26
- package/dist/collection/components/select/single-select/select.js.map +1 -1
- package/dist/collection/components/slider/slider.css +8 -0
- package/dist/collection/components/slider/slider.js +2 -2
- package/dist/collection/components/slider/slider.js.map +1 -1
- package/dist/collection/components/spinner/spinner.js +2 -2
- package/dist/collection/components/spinner/spinner.js.map +1 -1
- package/dist/collection/components/status/status.js +1 -1
- package/dist/collection/components/status/status.js.map +1 -1
- package/dist/collection/components/stepper/step/step.css +4 -0
- package/dist/collection/components/stepper/stepper.js +40 -2
- package/dist/collection/components/stepper/stepper.js.map +1 -1
- package/dist/collection/components/stepper/stepper.stories.js +30 -0
- package/dist/collection/components/stepper/stepper.stories.js.map +1 -1
- package/dist/collection/components/switch/switch.js +1 -1
- package/dist/collection/components/switch/switch.js.map +1 -1
- package/dist/collection/components/tag/tag.css +2 -5
- package/dist/collection/components/tag/tag.js +39 -1
- package/dist/collection/components/tag/tag.js.map +1 -1
- package/dist/collection/components/tag/tag.stories.js +29 -1
- package/dist/collection/components/tag/tag.stories.js.map +1 -1
- package/dist/collection/components/templates/template/template.js +1 -1
- package/dist/collection/components/templates/templates-ui/templates-ui.js +1 -1
- package/dist/collection/components/text-field/text-field.css +11 -2
- package/dist/collection/components/text-field/text-field.js +23 -4
- package/dist/collection/components/text-field/text-field.js.map +1 -1
- package/dist/collection/components/text-field/text-field.stories.js +17 -2
- package/dist/collection/components/text-field/text-field.stories.js.map +1 -1
- package/dist/collection/components/textarea/textarea.css +2 -2
- package/dist/collection/components/textarea/textarea.js +2 -2
- package/dist/collection/components/tooltip/tooltip.js +23 -4
- package/dist/collection/components/tooltip/tooltip.js.map +1 -1
- package/dist/collection/components/tooltip/tooltip.stories.js +16 -1
- package/dist/collection/components/tooltip/tooltip.stories.js.map +1 -1
- package/dist/collection/components/tree-view/tree-view-item.js +2 -2
- package/dist/collection/components/tree-view/tree-view.js +1 -1
- package/dist/collection/stories/setup-and-installation/faq/faq.js +1 -1
- package/dist/components/ifx-card.js +11 -21
- package/dist/components/ifx-card.js.map +1 -1
- package/dist/components/ifx-download.js +1 -1
- package/dist/components/ifx-faq.js +1 -1
- package/dist/components/ifx-file-upload.js +1 -1
- package/dist/components/ifx-icons-preview.js +2 -2
- package/dist/components/ifx-link.js +1 -1
- package/dist/components/ifx-list.js +1 -1
- package/dist/components/ifx-notification.js +1 -1
- package/dist/components/ifx-overview-table.js +1 -1
- package/dist/components/ifx-pagination.js +1 -1
- package/dist/components/ifx-progress-bar.js +1 -1
- package/dist/components/ifx-select.js +1 -1
- package/dist/components/ifx-set-filter.js +2 -2
- package/dist/components/ifx-sidebar-item.js +1 -1
- package/dist/components/ifx-sidebar-item.js.map +1 -1
- package/dist/components/ifx-slider.js +3 -3
- package/dist/components/ifx-slider.js.map +1 -1
- package/dist/components/ifx-spinner.js +1 -1
- package/dist/components/ifx-status.js +1 -1
- package/dist/components/ifx-status.js.map +1 -1
- package/dist/components/ifx-step.js +1 -1
- package/dist/components/ifx-step.js.map +1 -1
- package/dist/components/ifx-stepper.js +4 -2
- package/dist/components/ifx-stepper.js.map +1 -1
- package/dist/components/ifx-switch.js +1 -1
- package/dist/components/ifx-switch.js.map +1 -1
- package/dist/components/ifx-table.js +2 -2
- package/dist/components/ifx-tag.js +5 -3
- package/dist/components/ifx-tag.js.map +1 -1
- package/dist/components/ifx-template.js +1 -1
- package/dist/components/ifx-templates-ui.js +5 -5
- package/dist/components/ifx-text-field.js +1 -1
- package/dist/components/ifx-textarea.js +3 -3
- package/dist/components/ifx-textarea.js.map +1 -1
- package/dist/components/ifx-tooltip.js +5 -4
- package/dist/components/ifx-tooltip.js.map +1 -1
- package/dist/components/ifx-tree-view-item.js +2 -2
- package/dist/components/ifx-tree-view.js +1 -1
- package/dist/components/{p-1bd23a52.js → p-01ec76f0.js} +3 -3
- package/dist/components/p-01ec76f0.js.map +1 -0
- package/dist/components/{p-2d712043.js → p-031c3ed3.js} +2 -2
- package/dist/components/p-031c3ed3.js.map +1 -0
- package/dist/components/{p-5dd50ee8.js → p-4d955838.js} +44 -28
- package/dist/components/p-4d955838.js.map +1 -0
- package/dist/components/{p-4cea50e1.js → p-5f78da32.js} +2 -2
- package/dist/components/{p-4cea50e1.js.map → p-5f78da32.js.map} +1 -1
- package/dist/components/{p-f58ef41c.js → p-63a6c65a.js} +5 -5
- package/dist/components/{p-f58ef41c.js.map → p-63a6c65a.js.map} +1 -1
- package/dist/components/{p-f27f2aad.js → p-67efc4cd.js} +2 -2
- package/dist/components/p-67efc4cd.js.map +1 -0
- package/dist/components/p-ab2957b9.js +125 -0
- package/dist/components/p-ab2957b9.js.map +1 -0
- package/dist/components/{p-b58ed8a4.js → p-d0da3d4f.js} +3 -3
- package/dist/components/p-d0da3d4f.js.map +1 -0
- package/dist/esm/ifx-alert_2.entry.js +1 -1
- package/dist/esm/ifx-card.entry.js +11 -21
- package/dist/esm/ifx-card.entry.js.map +1 -1
- package/dist/esm/ifx-chip_3.entry.js +1 -1
- package/dist/esm/ifx-chip_3.entry.js.map +1 -1
- package/dist/esm/ifx-faq.entry.js +1 -1
- package/dist/esm/ifx-link.entry.js +1 -1
- package/dist/esm/ifx-link.entry.js.map +1 -1
- package/dist/esm/ifx-progress-bar.entry.js +1 -1
- package/dist/esm/ifx-progress-bar.entry.js.map +1 -1
- package/dist/esm/ifx-select.entry.js +43 -27
- package/dist/esm/ifx-select.entry.js.map +1 -1
- package/dist/esm/ifx-sidebar-item.entry.js +1 -1
- package/dist/esm/ifx-sidebar-item.entry.js.map +1 -1
- package/dist/esm/ifx-slider.entry.js +3 -3
- package/dist/esm/ifx-slider.entry.js.map +1 -1
- package/dist/esm/ifx-spinner_2.entry.js +7 -7
- package/dist/esm/ifx-spinner_2.entry.js.map +1 -1
- package/dist/esm/ifx-status.entry.js +1 -1
- package/dist/esm/ifx-status.entry.js.map +1 -1
- package/dist/esm/ifx-step.entry.js +1 -1
- package/dist/esm/ifx-step.entry.js.map +1 -1
- package/dist/esm/ifx-stepper.entry.js +2 -2
- package/dist/esm/ifx-stepper.entry.js.map +1 -1
- package/dist/esm/ifx-switch.entry.js +1 -1
- package/dist/esm/ifx-switch.entry.js.map +1 -1
- package/dist/esm/ifx-tag.entry.js +2 -2
- package/dist/esm/ifx-tag.entry.js.map +1 -1
- package/dist/esm/ifx-templates-ui.entry.js +1 -1
- package/dist/esm/ifx-textarea.entry.js +3 -3
- package/dist/esm/ifx-textarea.entry.js.map +1 -1
- package/dist/esm/ifx-tooltip.entry.js +4 -4
- package/dist/esm/ifx-tooltip.entry.js.map +1 -1
- package/dist/esm/ifx-tree-view-item.entry.js +2 -2
- package/dist/esm/ifx-tree-view.entry.js +1 -1
- package/dist/esm/infineon-design-system-stencil.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/infineon-design-system-stencil/infineon-design-system-stencil.esm.js +1 -1
- package/dist/infineon-design-system-stencil/infineon-design-system-stencil.esm.js.map +1 -1
- package/dist/infineon-design-system-stencil/p-0bddd006.entry.js +2 -0
- package/dist/infineon-design-system-stencil/p-0bddd006.entry.js.map +1 -0
- package/dist/infineon-design-system-stencil/p-171f6c74.entry.js +2 -0
- package/dist/infineon-design-system-stencil/p-171f6c74.entry.js.map +1 -0
- package/dist/infineon-design-system-stencil/p-251fefee.entry.js +2 -0
- package/dist/infineon-design-system-stencil/p-251fefee.entry.js.map +1 -0
- package/dist/infineon-design-system-stencil/{p-daca9ec0.entry.js → p-28e7dc9d.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/p-28e7dc9d.entry.js.map +1 -0
- package/dist/infineon-design-system-stencil/{p-eb8b78e4.entry.js → p-28f2ea42.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-eb8b78e4.entry.js.map → p-28f2ea42.entry.js.map} +1 -1
- package/dist/infineon-design-system-stencil/{p-03690ea5.entry.js → p-2cefc6c3.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/p-2cefc6c3.entry.js.map +1 -0
- package/dist/infineon-design-system-stencil/p-45d59da5.entry.js +2 -0
- package/dist/infineon-design-system-stencil/{p-fbc808e2.entry.js.map → p-45d59da5.entry.js.map} +1 -1
- package/dist/infineon-design-system-stencil/{p-24d7ff6e.entry.js → p-56586b39.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/p-56586b39.entry.js.map +1 -0
- package/dist/infineon-design-system-stencil/{p-e6632fdc.entry.js → p-6b43ea01.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/p-6b43ea01.entry.js.map +1 -0
- package/dist/infineon-design-system-stencil/{p-fdb22b89.entry.js → p-6ec8258a.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/p-71058002.entry.js +2 -0
- package/dist/infineon-design-system-stencil/p-71058002.entry.js.map +1 -0
- package/dist/infineon-design-system-stencil/p-73b3be0e.entry.js +2 -0
- package/dist/infineon-design-system-stencil/p-73b3be0e.entry.js.map +1 -0
- package/dist/infineon-design-system-stencil/{p-0701035c.entry.js → p-7958bc33.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/p-7cd2e63c.entry.js +2 -0
- package/dist/infineon-design-system-stencil/p-7cd2e63c.entry.js.map +1 -0
- package/dist/infineon-design-system-stencil/{p-bcf3f499.entry.js → p-a4541ce1.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-bcf3f499.entry.js.map → p-a4541ce1.entry.js.map} +1 -1
- package/dist/infineon-design-system-stencil/p-b1d233fd.entry.js +2 -0
- package/dist/infineon-design-system-stencil/p-b1d233fd.entry.js.map +1 -0
- package/dist/infineon-design-system-stencil/{p-33b46161.entry.js → p-cce095cb.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-e3f6431c.entry.js → p-ed30fb98.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-7078cbee.entry.js → p-ed76f48a.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-fbaf1c8a.entry.js → p-fc13a4d6.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/p-fc13a4d6.entry.js.map +1 -0
- package/dist/types/components/card/card.d.ts +0 -1
- package/dist/types/components/stepper/stepper.d.ts +2 -0
- package/dist/types/components/stepper/stepper.stories.d.ts +28 -0
- package/dist/types/components/tag/tag.d.ts +2 -0
- package/dist/types/components/tag/tag.stories.d.ts +28 -0
- package/dist/types/components/text-field/text-field.d.ts +1 -0
- package/dist/types/components/text-field/text-field.stories.d.ts +14 -0
- package/dist/types/components/tooltip/tooltip.d.ts +1 -0
- package/dist/types/components/tooltip/tooltip.stories.d.ts +14 -0
- package/dist/types/components.d.ts +12 -0
- package/package.json +1 -1
- package/dist/components/p-1bd23a52.js.map +0 -1
- package/dist/components/p-2d712043.js.map +0 -1
- package/dist/components/p-5dd50ee8.js.map +0 -1
- package/dist/components/p-607359ae.js +0 -124
- package/dist/components/p-607359ae.js.map +0 -1
- package/dist/components/p-b58ed8a4.js.map +0 -1
- package/dist/components/p-f27f2aad.js.map +0 -1
- package/dist/infineon-design-system-stencil/p-03690ea5.entry.js.map +0 -1
- package/dist/infineon-design-system-stencil/p-24d7ff6e.entry.js.map +0 -1
- package/dist/infineon-design-system-stencil/p-3bce1f22.entry.js +0 -2
- package/dist/infineon-design-system-stencil/p-3bce1f22.entry.js.map +0 -1
- package/dist/infineon-design-system-stencil/p-65a5cdd0.entry.js +0 -2
- package/dist/infineon-design-system-stencil/p-65a5cdd0.entry.js.map +0 -1
- package/dist/infineon-design-system-stencil/p-6f43f8cb.entry.js +0 -2
- package/dist/infineon-design-system-stencil/p-6f43f8cb.entry.js.map +0 -1
- package/dist/infineon-design-system-stencil/p-7b2c1280.entry.js +0 -2
- package/dist/infineon-design-system-stencil/p-7b2c1280.entry.js.map +0 -1
- package/dist/infineon-design-system-stencil/p-81b6afb3.entry.js +0 -2
- package/dist/infineon-design-system-stencil/p-81b6afb3.entry.js.map +0 -1
- package/dist/infineon-design-system-stencil/p-b6b68e30.entry.js +0 -2
- package/dist/infineon-design-system-stencil/p-b6b68e30.entry.js.map +0 -1
- package/dist/infineon-design-system-stencil/p-daca9ec0.entry.js.map +0 -1
- package/dist/infineon-design-system-stencil/p-e5e7a3d5.entry.js +0 -2
- package/dist/infineon-design-system-stencil/p-e5e7a3d5.entry.js.map +0 -1
- package/dist/infineon-design-system-stencil/p-e6632fdc.entry.js.map +0 -1
- package/dist/infineon-design-system-stencil/p-fbaf1c8a.entry.js.map +0 -1
- package/dist/infineon-design-system-stencil/p-fbc808e2.entry.js +0 -2
- /package/dist/infineon-design-system-stencil/{p-fdb22b89.entry.js.map → p-6ec8258a.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-0701035c.entry.js.map → p-7958bc33.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-33b46161.entry.js.map → p-cce095cb.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-e3f6431c.entry.js.map → p-ed30fb98.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-7078cbee.entry.js.map → p-ed76f48a.entry.js.map} +0 -0
@@ -13,7 +13,7 @@ const Faq = /*@__PURE__*/ proxyCustomElement(class Faq extends H {
|
|
13
13
|
this.__attachShadow();
|
14
14
|
}
|
15
15
|
render() {
|
16
|
-
return (h("div", { key: '
|
16
|
+
return (h("div", { key: 'd65665af11d77f22eba694be830c0d2cbd1c2aed', class: 'container' }, h("ifx-accordion", { key: '21a6945e8e2989152d4ae3b525d0b03100289a53' }, h("ifx-accordion-item", { key: '6a17004a92a541a569d0a0fcfc99ab3b036e0321', caption: "What is the Infineon DDS?" }, "The Infineon Digital Design System consists of code components, design principles, tools and guidelines as well as a dedicated interdisciplinary team. Its purpose is to support internal and external colleagues create digital user interfaces with a high level of usability as well as a consistent expression of the Infineon brand. The DDS does not focus on the content of a web application but it describes how the design of the application\u2019s structure should be."), h("ifx-accordion-item", { key: '173ea57ea7fb62173945b1c8c804e2472f174f34', caption: "How do I get access to the DDS?" }, "You can use the provided Figma file as a foundation for mockups and prototypes, use Storybook to view what UI components and variants are available and use code components provided via Storybook or Github."), h("ifx-accordion-item", { key: '7344d949d820868fee6ab85b8197fdde1b4574c7', caption: "Can I integrate the Infineon DDS into my project?" }, "Yes, you can. We are happy to discuss with you which point in time and which scope of integration is bestsuited for updating your interface to the Infineon DDS. (To avoid that users get confused by a mixture of UI components, we recommend choosing larger updates or technology changes as opportunity to integrate the Infineon DDS.)"), h("ifx-accordion-item", { key: '6f242e7e3a4116bdf122905becd07fc8f8f4cd22', caption: "Are Infineon DDS components accessable?" }, "We have taken WCAG 2.0 Level AA as baseline level for all design decisions inside the Infineon Digital Design System. To make an online experience truly accessible you have to implement the specific code, content, and visual design according to the accessibility standard. Find an introduction to this topic here."), h("ifx-accordion-item", { key: '1dd2fe2389021540de4d1ded1f66003592644a1d', caption: "How to request a new component?" }, "Please contact us like described in the contribution section! We are planning to expand the number of components continually. If your component is also usable for multiple other projects, there is a good chance we might work together with you."))));
|
17
17
|
}
|
18
18
|
static get style() { return IfxFaqStyle0; }
|
19
19
|
}, [1, "ifx-faq"]);
|
@@ -4,7 +4,7 @@ import { i as isNestedInIfxComponent } from './p-1ecafb97.js';
|
|
4
4
|
import { d as defineCustomElement$5 } from './p-6462dfec.js';
|
5
5
|
import { d as defineCustomElement$4 } from './p-6ca4e3f8.js';
|
6
6
|
import { d as defineCustomElement$3 } from './p-91c41731.js';
|
7
|
-
import { d as defineCustomElement$2 } from './p-
|
7
|
+
import { d as defineCustomElement$2 } from './p-67efc4cd.js';
|
8
8
|
|
9
9
|
const fileUploadCss = ":root{--ifx-font-family:\"Source Sans 3\", \"Arial, sans-serif\"}:host{font-family:var(--ifx-font-family, sans-serif)}.file-upload-wrapper{display:flex;flex-direction:column}.file-upload-wrapper.disabled{pointer-events:none}.file-upload-wrapper.disabled label,.file-upload-wrapper.disabled .file-upload-info{color:#575352}.file-upload-label{font-style:normal;font-weight:400;font-size:1rem;line-height:1.5rem;color:#1D1D1D}.file-upload-label .required{display:inline-block;margin-left:4px}.file-upload-label .required.error{color:#CD002F}.upload-dropzone{border:1px dashed #BFBBBB;padding:40px;text-align:center;cursor:pointer;color:#1D1D1D;transition:border-color 0.3s ease;border-radius:1px;background:#FFFFFF}.upload-dropzone ifx-icon{color:#0A8276}.upload-dropzone:hover{border:1px dashed #8D8786}.upload-dropzone.drag-over{border:1px solid #0A8276;background:#F7F7F7}.upload-dropzone.drag-over.error{border:1px solid #0A8276}.upload-dropzone.error{border-color:#CD002F}.disabled .upload-dropzone{pointer-events:none;border-color:#BFBBBB;color:#BFBBBB}.disabled .upload-dropzone ifx-icon{color:#BFBBBB}.upload-dropzone input{display:none}.file-upload-info{font-style:normal;font-weight:400;font-size:0.75rem;line-height:1rem;letter-spacing:0em;color:#1D1D1D;margin:0;margin-top:4px}.file-upload-status{font-style:normal;font-weight:400;font-size:0.75rem;line-height:1rem;letter-spacing:0.2px;margin-top:8px}.file-upload-status.file-upload-status__error{display:flex;align-items:center;color:#CD002F}.file-upload-status.file-upload-status__error ifx-icon{position:relative;top:-1px;color:#CD002F;margin-right:8px}.upload-heading{font:600 1.125rem/1.625rem \"Source Sans 3\";margin-bottom:8px}.file-list-wrapper{margin-top:16px}.file-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:16px}.file-item{border:1px solid #BFBBBB;padding-top:12px;padding-right:16px;padding-bottom:8px;padding-left:16px;display:flex;gap:8px}.file-info{width:100%;min-width:0}.file-top-row{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:-8px}.file-top-row ifx-icon{flex-shrink:0}.file-name-wrapper{display:flex;min-width:0;max-width:100%;white-space:nowrap;overflow:hidden;font-weight:400;font-size:0.875rem}.file-name-base{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex-shrink:1;min-width:0}.file-name-ext{flex-shrink:0;margin-left:0}.file-middle-row{display:flex;align-items:center;font-size:0.75rem;line-height:1rem;flex-wrap:wrap;color:#575352}.file-middle-row .file-status{margin-left:12px}.file-middle-row .file-status ifx-icon{margin-right:8px}.file-progress-row{margin-top:4px}.file-progress-row ifx-progress-bar{width:100%}.upload-success{border-color:#0A8276}.upload-success .file-status ifx-icon{position:relative;top:1px;color:#4CA460}.upload-failed{border-color:#CD002F}.upload-failed .file-status{color:#CD002F;margin-left:0}";
|
10
10
|
const IfxFileUploadStyle0 = fileUploadCss;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { p as proxyCustomElement, H, h } from './p-f8e6a4ef.js';
|
2
2
|
import { i as icons, d as defineCustomElement$5 } from './p-6ca4e3f8.js';
|
3
|
-
import { d as defineCustomElement$4 } from './p-
|
4
|
-
import { d as defineCustomElement$3 } from './p-
|
3
|
+
import { d as defineCustomElement$4 } from './p-031c3ed3.js';
|
4
|
+
import { d as defineCustomElement$3 } from './p-5f78da32.js';
|
5
5
|
import { d as defineCustomElement$2 } from './p-ac46c988.js';
|
6
6
|
|
7
7
|
const iconsPreviewCss = ".container{display:flex;flex-direction:column;gap:10px}.alert__wrapper{margin-bottom:40px}.snippet__wrapper{display:flex;flex-direction:column;gap:5px;position:sticky;top:0;left:0;z-index:99;background-color:white}.html-wrapper{background:rgb(38, 38, 38);padding:20px;color:white;font-family:monospace}.html-wrapper button{position:absolute;right:0px;bottom:0px;background:rgba(0, 0, 0, 0.85);color:#C9CDCF;border:0 none;padding:4px 10px;font-size:0.75rem;font-family:\"Nunito Sans\";font-weight:700;border-top:1px solid rgba(255, 255, 255, 0.1);border-left:1px solid rgba(255, 255, 255, 0.1);margin-left:-1px;border-radius:4px 0 0 0;cursor:pointer}.html-wrapper .component-name{color:#A8FF60}.html-wrapper .attribute-name{color:rgb(150, 203, 254)}.html-wrapper .attribute-value{color:rgb(180, 116, 221)}.preview__container{box-sizing:border-box;display:flex;align-items:center;padding:2px;flex-wrap:wrap;gap:4px}.preview__container .no-results{width:100%;text-align:center}.preview__container .preview__container-item{display:flex;justify-content:center;align-items:center;border:1px solid #f1f1f1;padding:2px;width:50px;height:50px;position:relative}.preview__container .preview__container-item:active{border-color:#378375}.preview__container .preview__container-item:hover{cursor:pointer}.preview__container .preview__container-item.copied::after{z-index:50;content:\"copied!\";position:absolute;top:0;left:50px;background-color:#000;color:white;padding:3px;border-radius:4px}";
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, h } from './p-f8e6a4ef.js';
|
2
2
|
import { d as defineCustomElement$3 } from './p-6ca4e3f8.js';
|
3
|
-
import { d as defineCustomElement$2 } from './p-
|
3
|
+
import { d as defineCustomElement$2 } from './p-031c3ed3.js';
|
4
4
|
|
5
5
|
const listCss = ".link-wrapper{display:flex;flex-direction:column;align-items:center;gap:8px;margin-top:8px}";
|
6
6
|
const IfxListStyle0 = listCss;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { p as proxyCustomElement, H, h } from './p-f8e6a4ef.js';
|
2
2
|
import { d as defineCustomElement$4 } from './p-6ca4e3f8.js';
|
3
3
|
import { d as defineCustomElement$3 } from './p-612f4440.js';
|
4
|
-
import { d as defineCustomElement$2 } from './p-
|
4
|
+
import { d as defineCustomElement$2 } from './p-031c3ed3.js';
|
5
5
|
|
6
6
|
const overviewTableCss = "*{font-family:\"Source Sans 3\";box-sizing:border-box}body{margin:0;padding:0;overflow-x:hidden}header{margin-bottom:15px;display:flex;justify-content:center}.header__info-wrapper{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:10px}.infoboard__wrapper{display:flex;gap:15px;background-color:#f1f1f1;padding:5px 10px;border-radius:10px}.title{font-size:30px;font-weight:bold}.view{margin:auto}.wrapper{position:relative;width:100%;height:calc(100vh - var(--header-height) - 15px);overflow:auto}table{width:100%;table-layout:fixed;border-spacing:0}thead tr th{border-top:1px solid #dddddd}td,th{padding:10px;background-color:white;border:none;box-shadow:0 0 0 1px #dddddd;box-sizing:border-box}table th:nth-child(1){width:150px}table th:not(:nth-child(1)){width:240px}th{position:sticky;top:0;background-color:white}.sticky-col{position:sticky;z-index:1}th.sticky-col{z-index:2}.second-col{left:0;border-left:1px solid #ddd}.wrapped-content{width:250px;white-space:normal}a{text-decoration:none;color:black}.basic__info{display:flex;gap:5px}ul{padding:0 5px;margin:0 15px;list-style-type:none}tr:nth-child(even) td{background-color:#f1f1f1}ul li{font-size:12px;display:flex;gap:5px;line-height:13px}li.planned__component-wrapper{align-items:center;line-height:16px}.version__wrapper{display:flex;flex-direction:column}ifx-icon{color:rgb(10, 130, 118)}.check__icon{width:10px;height:10px}.planned__icon{width:12px;height:12px;vertical-align:sub}";
|
7
7
|
const IfxOverviewTableStyle0 = overviewTableCss;
|
@@ -4,8 +4,8 @@ import { d as defineCustomElement$7 } from './p-6ca4e3f8.js';
|
|
4
4
|
import { d as defineCustomElement$6 } from './p-c5b03418.js';
|
5
5
|
import { d as defineCustomElement$5 } from './p-6160358b.js';
|
6
6
|
import { d as defineCustomElement$4 } from './p-ac46c988.js';
|
7
|
-
import { d as defineCustomElement$3 } from './p-
|
8
|
-
import { d as defineCustomElement$2 } from './p-
|
7
|
+
import { d as defineCustomElement$3 } from './p-4d955838.js';
|
8
|
+
import { d as defineCustomElement$2 } from './p-ab2957b9.js';
|
9
9
|
|
10
10
|
const setFilterCss = "";
|
11
11
|
const IfxSetFilterStyle0 = setFilterCss;
|
@@ -2,7 +2,7 @@ import { p as proxyCustomElement, H, c as createEvent, h } from './p-f8e6a4ef.js
|
|
2
2
|
import { d as defineCustomElement$3 } from './p-6ca4e3f8.js';
|
3
3
|
import { d as defineCustomElement$2 } from './p-612f4440.js';
|
4
4
|
|
5
|
-
const sidebarItemCss = ":root{--ifx-font-family:\"Source Sans 3\", \"Arial, sans-serif\"}:host{position:relative}.sidebar__nav-item:focus,.sidebar__nav-item.header__section:focus{outline:
|
5
|
+
const sidebarItemCss = ":root{--ifx-font-family:\"Source Sans 3\", \"Arial, sans-serif\"}:host{position:relative}.sidebar__nav-item,.sidebar__nav-item.header__section{box-sizing:border-box}.sidebar__nav-item:focus,.sidebar__nav-item.header__section:focus{outline:2px solid #08665C;border:none}.sidebar__nav-item:focus .sidebar__nav-item-icon-wrapper,.sidebar__nav-item.header__section:focus .sidebar__nav-item-icon-wrapper{color:#08665C}.sidebar__nav-item:focus .sidebar__nav-item-label,.sidebar__nav-item.header__section:focus .sidebar__nav-item-label{outline:none;color:#08665C}.sidebar__nav-item:focus .sidebar__nav-item-indicator .item__arrow-wrapper ifx-icon,.sidebar__nav-item.header__section:focus .sidebar__nav-item-indicator .item__arrow-wrapper ifx-icon{color:#08665C}.sidebar__nav-item:hover,.sidebar__nav-item.header__section:hover{outline:none}.sidebar__nav-item:hover .sidebar__nav-item-icon-wrapper,.sidebar__nav-item.header__section:hover .sidebar__nav-item-icon-wrapper{color:#08665C}.sidebar__nav-item:hover .sidebar__nav-item-label,.sidebar__nav-item.header__section:hover .sidebar__nav-item-label{outline:none;color:#08665C}.sidebar__nav-item:hover .sidebar__nav-item-indicator .item__arrow-wrapper ifx-icon,.sidebar__nav-item.header__section:hover .sidebar__nav-item-indicator .item__arrow-wrapper ifx-icon{color:#08665C}.sidebar__nav-item{display:flex;flex-direction:row;align-items:center;width:100%;padding:8px 0px;gap:4px;flex:none;order:0;flex-grow:0;text-decoration:none;color:#1D1D1D;cursor:pointer;font-family:var(--ifx-font-family)}.sidebar__nav-item.extra-padding__bottom{padding:8px 0px 16px 0px}.sidebar__nav-item.active{color:#0A8276}.sidebar__nav-item.active-section::before{content:\"\";position:absolute;left:-32px;height:40px;width:2px;background:#0A8276}.sidebar__nav-item.open{padding:8px 0px}.sidebar__nav-item.open .sidebar__nav-item-label{font-size:16px;font-style:normal;font-weight:400;line-height:24px}.sidebar__nav-item.open .sidebar__nav-item-indicator .item__arrow-wrapper ifx-icon{transform:rotate(-180deg)}.sidebar__nav-item.header__section{box-sizing:padding-box;border-top:1px solid #EEEDED;padding:16px 0px;display:-webkit-flex;-webkit-line-clamp:1;-webkit-box-orient:horizontal;overflow:hidden;text-overflow:ellipsis}.sidebar__nav-item.header__section.no-top-border{border-top:none}.sidebar__nav-item.header__section.active-section::before{content:\"\";position:absolute;left:-32px;height:40px;width:2px;background:#0A8276}.sidebar__nav-item.header__section.open{padding:16px 0px 8px 0px}.sidebar__nav-item.header__section.open .sidebar__nav-item-indicator .item__arrow-wrapper ifx-icon{transform:rotate(-180deg)}.sidebar__nav-item.header__section .sidebar__nav-item-label{color:#1D1D1D;font-family:Source Sans 3;font-size:16px;font-style:normal;font-weight:600;line-height:24px}.sidebar__nav-item.submenu__item{padding:4px 0px}.sidebar__nav-item.submenu__item.extra-padding__bottom{padding:4px 0px 16px 0px}.sidebar__nav-item .sidebar__nav-item-icon-wrapper{display:flex;width:24px;height:24px;justify-content:center;align-items:center;gap:8px;flex-shrink:0}.sidebar__nav-item .sidebar__nav-item-icon-wrapper.noIcon{display:none}.sidebar__nav-item .sidebar__nav-item-icon-wrapper ifx-icon{width:16px;height:16px}.sidebar__nav-item .sidebar__nav-item-label{font-style:normal;font-weight:400;font-size:1rem;line-height:1.5rem;display:flex;align-items:center;flex:none;order:1;flex-grow:1;cursor:pointer}.sidebar__nav-item .sidebar__nav-item-indicator{display:flex;flex-direction:row;justify-content:center;align-items:center;padding:0px 4px;flex:none;order:2;flex-grow:0}.expandable__submenu{display:none;list-style-type:none;flex-direction:column;padding:0;margin:0;padding-left:40px}.expandable__submenu.open{display:flex}.header__section+.expandable__submenu{padding-left:0}";
|
6
6
|
const IfxSidebarItemStyle0 = sidebarItemCss;
|
7
7
|
|
8
8
|
const SidebarItem = /*@__PURE__*/ proxyCustomElement(class SidebarItem extends H {
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"ifx-sidebar-item.js","mappings":";;;;AAAA,MAAM,cAAc,GAAG,4qHAA4qH,CAAC;AACpsH,6BAAe,cAAc;;MCMhB,WAAW;IALxB;;;;;;;QAOU,SAAI,GAAW,EAAE,CAAA;QAChB,aAAQ,GAAY,IAAI,CAAC;QACzB,oBAAe,GAAY,KAAK,CAAC;QAClC,SAAI,GAAW,EAAE,CAAC;QACjB,iBAAY,GAAW,EAAE,CAAC;QAC3B,WAAM,GAAW,OAAO,CAAC;QACxB,iBAAY,GAAY,KAAK,CAAC;QAC9B,aAAQ,GAAY,IAAI,CAAC;QACzB,kBAAa,GAAY,KAAK,CAAC;QAEhC,WAAM,GAAY,KAAK,CAAC;QACxB,iBAAY,GAAY,KAAK,CAAC;QAE7B,wBAAmB,GAAY,KAAK,CAAC;KA8S/C;IApSC,kBAAkB,CAAC,QAAiB,EAAE,QAAiB;;QAErD,IAAI,IAAI,CAAC,YAAY,EAAE;YACrB,IAAI,CAAC,mBAAmB,GAAG,KAAK,CAAC;YACjC,OAAO;SACR;QACD,IAAI,CAAC,mBAAmB,GAAG,QAAQ,CAAC;QACpC,IAAI,QAAQ,KAAK,QAAQ,EAAE;YACzB,IAAI,YAAY,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,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AAE,IAAI,IAAI,CAAC,aAAa,GAAG,eAAe,GAAG,EAAE,EAAE,IACxR,IAAI,CAAC,IAAI;YACR,4DAAK,KAAK,EAAE,kCAAkC,CAAC,IAAI,CAAC,QAAQ,GAAG,QAAQ,GAAG,EAAE,EAAE,IAC5E,iEAAU,IAAI,EAAE,IAAI,CAAC,IAAI,GAAa,CAClC,EACR,4DAAK,KAAK,EAAC,yBAAyB,IAClC,8DAAQ,CACJ,EAEN,CAAC,IAAI,CAAC,YAAY,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC;YAChD,4DAAK,KAAK,EAAC,6BAA6B,IACrC,IAAI,CAAC,YAAY;gBAChB,6DAAM,KAAK,EAAC,qBAAqB,IAC/B,iEAAU,IAAI,EAAC,iBAAiB,GAAG,CAC9B,EAGR,CAAC,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,IAAI,CAAC,IAAI,CAAC,QAAQ;gBACnE,6DAAM,KAAK,EAAC,wBAAwB,IAClC,sEAAe,OAAO,EAAC,QAAQ,EAAC,MAAM,EAAE,IAAI,CAAC,eAAe,GAAkB,CACzE,CAEL,CAEN,EACH,IAAI,CAAC,YAAY,IAAI,2DAAI,KAAK,EAAC,qBAAqB,GAAM,CAEvD,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/navigation/sidebar/sidebar-item.scss?tag=ifx-sidebar-item&encapsulation=shadow","src/components/navigation/sidebar/sidebar-item.tsx"],"sourcesContent":["@use \"~@infineon/design-system-tokens/dist/tokens\";\n@use \"../../../global/font.scss\";\n\n:host {\n position: relative;\n}\n\n.sidebar__nav-item,\n.sidebar__nav-item.header__section {\n &:focus {\n outline: none;\n box-shadow: 0 0 0 2px tokens.$ifxColorBaseWhite, 0 0 0 4px tokens.$ifxColorOcean500;\n\n & .sidebar__nav-item-icon-wrapper {\n color: tokens.$ifxColorOcean600;\n }\n\n & .sidebar__nav-item-label {\n outline: none;\n color: tokens.$ifxColorOcean600;\n }\n\n & .sidebar__nav-item-indicator {\n & .item__arrow-wrapper {\n & ifx-icon {\n color: tokens.$ifxColorOcean600;\n }\n }\n }\n }\n\n &:hover {\n outline: none;\n\n & .sidebar__nav-item-icon-wrapper {\n color: tokens.$ifxColorOcean600;\n }\n\n & .sidebar__nav-item-label {\n outline: none;\n color: tokens.$ifxColorOcean600;\n }\n\n & .sidebar__nav-item-indicator {\n & .item__arrow-wrapper {\n & ifx-icon {\n color: tokens.$ifxColorOcean600;\n }\n }\n }\n }\n}\n\n.sidebar__nav-item {\n display: flex;\n flex-direction: row;\n align-items: center;\n width: 100%;\n padding: 8px 0px;\n gap: 4px;\n flex: none;\n order: 0;\n flex-grow: 0;\n text-decoration: none;\n color: tokens.$ifxColorBaseBlack;\n cursor: pointer;\n font-family: var(--ifx-font-family); // tokens.$ifxFontFamilyBody;\n\n\n\n &.extra-padding__bottom {\n padding: 8px 0px 16px 0px;\n }\n\n &.active {\n color: tokens.$ifxColorOcean500;\n }\n\n &.active-section {\n &::before {\n content: \"\";\n position: absolute;\n left: -32px;\n height: 40px;\n width: 2px;\n background: tokens.$ifxColorOcean500;\n }\n }\n\n\n &.open {\n padding: 8px 0px;\n\n & .sidebar__nav-item-label {\n font-size: 16px;\n font-style: normal;\n font-weight: 400;\n line-height: 24px;\n }\n\n & .sidebar__nav-item-indicator {\n & .item__arrow-wrapper {\n & ifx-icon {\n transform: rotate(-180deg);\n }\n }\n }\n }\n\n &.header__section {\n box-sizing: padding-box;\n border-top: 1px solid tokens.$ifxColorEngineering200;\n padding: 16px 0px;\n display: -webkit-flex;\n -webkit-line-clamp: 1;\n -webkit-box-orient: horizontal;\n overflow: hidden;\n text-overflow: ellipsis;\n \n &.no-top-border {\n border-top: none;\n }\n\n &.active-section {\n &::before {\n content: \"\";\n position: absolute;\n left: -32px;\n height: 40px;\n width: 2px;\n background: tokens.$ifxColorOcean500;\n }\n }\n\n &.open {\n \n padding: 16px 0px 8px 0px;\n\n & .sidebar__nav-item-indicator {\n & .item__arrow-wrapper {\n & ifx-icon {\n transform: rotate(-180deg);\n }\n }\n }\n }\n\n & .sidebar__nav-item-label {\n color: tokens.$ifxColorBaseBlack;\n font-family: Source Sans 3;\n font-size: 16px;\n font-style: normal;\n font-weight: 600;\n line-height: 24px;\n }\n }\n\n &.submenu__item {\n padding: 4px 0px;\n \n &.extra-padding__bottom {\n padding: 4px 0px 16px 0px;\n }\n }\n\n & .sidebar__nav-item-icon-wrapper {\n display: flex;\n width: tokens.$ifxSize300;\n height: tokens.$ifxSize300;\n justify-content: center;\n align-items: center;\n gap: tokens.$ifxSpace100;\n flex-shrink: 0;\n\n &.noIcon {\n display: none;\n }\n\n & ifx-icon {\n width: tokens.$ifxSize200;\n height: tokens.$ifxSize200;\n }\n }\n\n & .sidebar__nav-item-label {\n font-style: normal;\n font-weight: 400;\n font-size: tokens.$ifxFontSizeM;\n line-height: tokens.$ifxLineHeightM;\n display: flex;\n align-items: center;\n flex: none;\n order: 1;\n flex-grow: 1;\n cursor: pointer;\n }\n\n & .sidebar__nav-item-indicator {\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n padding: 0px 4px;\n flex: none;\n order: 2;\n flex-grow: 0;\n }\n}\n\n.expandable__submenu {\n display: none;\n list-style-type: none;\n flex-direction: column;\n padding: 0;\n margin: 0;\n padding-left: 40px;\n\n &.open {\n display: flex;\n }\n}\n\n.header__section + .expandable__submenu{\n padding-left: 0;\n}\n","import { Component, h, Prop, Element, State, Listen, Watch, Event, EventEmitter, Method } from '@stencil/core';\n\n@Component({\n tag: 'ifx-sidebar-item',\n styleUrl: 'sidebar-item.scss',\n shadow: true\n})\nexport class SidebarItem {\n @Element() el;\n @Prop() icon: string = \"\"\n @State() showIcon: boolean = true;\n @State() showIconWrapper: boolean = false;\n @Prop() href: string = \"\";\n @State() internalHref: string = \"\";\n @Prop() target: string = \"_self\";\n @State() isExpandable: boolean = false;\n @State() isNested: boolean = true;\n @State() isSubMenuItem: boolean = false;\n @Prop() numberIndicator: number;\n @Prop() active: boolean = false; // set to true manually or by clicking on a navigation item\n @Prop() isActionItem: boolean = false; // if an item is an action item, it can not become active\n\n @State() internalActiveState: boolean = false;\n\n @Event({ bubbles: true, composed: true }) ifxSidebarMenu: EventEmitter;\n @Event({ bubbles: true, composed: true }) ifxSidebarNavigationItem: EventEmitter;\n @Event({ bubbles: true, composed: true }) ifxSidebarActionItem: EventEmitter;\n\n @Prop() handleItemClick: (item: HTMLElement) => void;\n\n\n @Watch('active')\n handleActiveChange(newValue: boolean, oldValue: boolean) {\n // If the item is an action item, ignore the active prop\n if (this.isActionItem) {\n this.internalActiveState = false;\n return;\n }\n this.internalActiveState = newValue;\n if (newValue !== oldValue) {\n let labelElement = this.getNavItem(this.el.shadowRoot)\n if (!this.isExpandable && !newValue) {\n this.handleClassList(labelElement, 'remove', 'active');\n }\n if (!this.isExpandable && newValue) {\n this.handleClassList(labelElement, 'add', 'active');\n }\n }\n }\n\n\n\n @Listen('consoleError')\n handleConsoleError(event: CustomEvent<boolean>) {\n if (event.detail) {\n this.showIcon = false;\n } else {\n this.showIcon = true;\n }\n }\n\n handleEventEmission() {\n // Get the active item section\n this.ifxSidebarMenu.emit(this.el)\n }\n\n handleClassList(el, type, className) {\n el.classList[type](className)\n if (type === 'contains') {\n return el.classList.contains(className)\n }\n }\n\n getExpandableMenu() {\n const expandableSubmenu = this.el.shadowRoot.querySelector('.expandable__submenu')\n return expandableSubmenu\n }\n\n getNavItem(el) {\n return el?.querySelector('.sidebar__nav-item')\n }\n\n\n\n getSidebarMenuItems(el = this.el) {\n const sidebarItems = el.querySelectorAll('ifx-sidebar-item');\n if (sidebarItems.length === 0) {\n return el.shadowRoot.querySelectorAll('ifx-sidebar-item');\n }\n return sidebarItems;\n }\n\n getSidebarMenuItem() {\n const sidebarItem = this.el.shadowRoot.querySelector('.sidebar__nav-item')\n return sidebarItem;\n }\n\n\n toggleSubmenu() {\n if (this.isExpandable) {\n const menuItem = this.getSidebarMenuItem();\n const expandableMenu = this.getExpandableMenu();\n this.handleClassList(expandableMenu, 'toggle', 'open');\n this.handleClassList(menuItem, 'toggle', 'open');\n // Emit an event with the current component\n this.handleEventEmission();\n } else {\n // If the sidebar item is not expandable, it's a leaf item without a submenu.\n // Emit an event to the parent `ifx-sidebar` component to notify it that a leaf item has been clicked.\n if (this.isActionItem) { //its an action item that eg opens an overlay etc and should not influence the active state of the item\n this.ifxSidebarActionItem.emit(this.el); // emit new event if isActionItem is true\n return;\n } else { //its a navigation item which becomes active after clicking it\n this.handleActiveChange(true, this.internalActiveState)\n this.ifxSidebarNavigationItem.emit(this.el);\n }\n // If the sidebar item is selectable (not expandable), then call the handler function with the current element.\n if (this.handleItemClick) {\n this.handleItemClick(this.el);\n }\n }\n // // Emit an event with the current component\n // this.handleEventEmission();\n }\n\n\n\n handleExpandableMenu(sidebarItems) {\n const sidebarExpandableMenu = this.getExpandableMenu();\n sidebarItems.forEach((el: HTMLElement) => {\n const li = document.createElement('li')\n li.appendChild(el)\n sidebarExpandableMenu.appendChild(li)\n })\n }\n\n parentElementIsSidebar() {\n const parentElement = this.el.parentElement;\n if (parentElement.tagName.toUpperCase() === 'IFX-SIDEBAR') {\n return true;\n } else return false;\n }\n\n checkIfMenuItemIsNested() {\n const parentIsSidebar = this.parentElementIsSidebar()\n if (parentIsSidebar) {\n this.isNested = false;\n }\n }\n\n checkIfMenuItemIsSubMenu() {\n const parentElement = this.el.parentElement;\n const navItem = this.getNavItem(parentElement.shadowRoot);\n if(parentElement.tagName.toUpperCase() === 'IFX-SIDEBAR-ITEM' && !this.handleClassList(navItem, 'contains', 'header__section')) {\n this.isSubMenuItem = true;\n }else {\n this.isSubMenuItem = false;\n }\n }\n\n isActive(iteratedComponent) {\n const activeAttributeValue = iteratedComponent.getAttribute('active');\n const isActive = activeAttributeValue === 'true';\n return isActive\n }\n\n getParentSection(el: HTMLElement) {\n let parentElement = el.parentElement;\n\n while (parentElement && parentElement.tagName.toUpperCase() !== 'IFX-SIDEBAR') {\n if (parentElement.tagName.toUpperCase() === 'IFX-SIDEBAR-ITEM') {\n return parentElement;\n }\n parentElement = parentElement.parentElement;\n }\n\n return null;\n }\n\n\n\n handleBorderIndicatorDisplacement(menuItem) {\n // Recursive function to handle each item\n const handleItem = (item, menuItem) => {\n const isActive = this.isActive(item);\n if (isActive) {\n const isOpen = this.handleClassList(menuItem, 'contains', 'open');\n const activeMenuItemSection = this.getActiveItemSection();\n if (!isOpen) {\n this.handleClassList(activeMenuItemSection, 'add', 'active-section');\n } else {\n this.handleClassList(activeMenuItemSection, 'remove', 'active-section');\n }\n }\n\n // Process each child item\n const children = this.getSidebarMenuItems(item);\n children.forEach((child) => handleItem(child, menuItem));\n }\n\n // Start with the top-level items\n const topLevelItems = this.getSidebarMenuItems();\n topLevelItems.forEach((item) => handleItem(item, menuItem));\n }\n\n\n setHref() {\n if (this.href.toLowerCase().trim() === \"\") {\n this.internalHref = undefined;\n } else this.internalHref = this.href;\n }\n\n getActiveItemSection() {\n const parentIsSidebar = this.parentElementIsSidebar()\n if (parentIsSidebar) {\n const labelElement = this.getNavItem(this.el.shadowRoot)\n return labelElement;\n } else {\n const labelElement = this.getNavItem(this.el.shadowRoot)\n return labelElement;\n }\n }\n\n @Method()\n async setActiveClasses() {\n const activeMenuItem = this.getNavItem(this.el.shadowRoot)\n this.handleClassList(activeMenuItem, 'add', 'active')\n }\n\n @Method()\n async expandMenu(ac: boolean){\n const menuItem = this.getSidebarMenuItem();\n const expandableMenu = this.getExpandableMenu();\n this.handleClassList(expandableMenu, 'add', 'open');\n this.handleClassList(menuItem, 'add', 'open');\n if(ac){\n this.handleClassList(expandableMenu, 'remove', 'active-section')\n this.handleClassList(menuItem, 'remove', 'active-section')\n }\n }\n \n @Method()\n async isItemExpandable(){\n return this.isExpandable;\n }\n\n handleActiveState() {\n if (this.internalActiveState) {\n this.setActiveClasses()\n }\n }\n\n handleKeyDown(event: KeyboardEvent) {\n if (event.key === 'Enter') {\n this.toggleSubmenu()\n }\n }\n\n componentDidLoad() {\n this.handleActiveState();\n if (this.isExpandable) {\n const sidebarItems = this.getSidebarMenuItems();\n this.handleExpandableMenu(sidebarItems)\n }\n }\n \n componentWillLoad() {\n this.internalActiveState = this.active;\n this.checkIfMenuItemIsNested();\n this.checkIfMenuItemIsSubMenu();\n this.setHref()\n const sidebarItems = this.getSidebarMenuItems();\n if (sidebarItems.length !== 0) {\n this.isExpandable = true;\n } else {\n this.isExpandable = false;\n }\n }\n\n componentWillUpdate() {\n // If the active prop has been set to true and the internalActiveState has not been set to true yet\n if (this.active && !this.internalActiveState) {\n // Set the internal active state to true\n this.internalActiveState = this.active;\n\n // Emit the event to notify the parent Sidebar\n this.ifxSidebarNavigationItem.emit(this.el);\n }\n }\n\n\n render() {\n return (\n <div>\n <a tabIndex={1} onKeyDown={(event) => this.handleKeyDown(event)} href={this.internalHref} onClick={() => this.toggleSubmenu()} target={this.target} class={`sidebar__nav-item ${!this.isNested && this.isExpandable ? 'header__section' : \"\"} ${this.isSubMenuItem ? 'submenu__item' : \"\"}`}>\n {this.icon &&\n <div class={`sidebar__nav-item-icon-wrapper ${!this.showIcon ? 'noIcon' : \"\"}`}>\n <ifx-icon icon={this.icon}></ifx-icon>\n </div>}\n <div class=\"sidebar__nav-item-label\">\n <slot />\n </div>\n {\n (this.isExpandable || !isNaN(this.numberIndicator)) &&\n <div class=\"sidebar__nav-item-indicator\">\n {this.isExpandable &&\n <span class='item__arrow-wrapper'>\n <ifx-icon icon=\"chevron-down-16\" />\n </span>\n }\n\n {!isNaN(this.numberIndicator) && !this.isExpandable && !this.isNested &&\n <span class='item__number-indicator'>\n <ifx-indicator variant='number' number={this.numberIndicator}></ifx-indicator>\n </span>}\n\n </div>\n }\n </a>\n {this.isExpandable && <ul class='expandable__submenu'></ul>}\n\n </div>\n );\n }\n}\n"],"version":3}
|
1
|
+
{"file":"ifx-sidebar-item.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AAC,qBAAqB,IAC/B,iEAAU,IAAI,EAAC,iBAAiB,GAAG,CAC9B,EAGR,CAAC,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,IAAI,CAAC,IAAI,CAAC,QAAQ;gBACnE,6DAAM,KAAK,EAAC,wBAAwB,IAClC,sEAAe,OAAO,EAAC,QAAQ,EAAC,MAAM,EAAE,IAAI,CAAC,eAAe,GAAkB,CACzE,CAEL,CAEN,EACH,IAAI,CAAC,YAAY,IAAI,2DAAI,KAAK,EAAC,qBAAqB,GAAM,CAEvD,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/navigation/sidebar/sidebar-item.scss?tag=ifx-sidebar-item&encapsulation=shadow","src/components/navigation/sidebar/sidebar-item.tsx"],"sourcesContent":["@use \"~@infineon/design-system-tokens/dist/tokens\";\n@use \"../../../global/font.scss\";\n\n:host {\n position: relative;\n}\n\n.sidebar__nav-item,\n.sidebar__nav-item.header__section {\n box-sizing: border-box;\n\n &:focus {\n\n outline: 2px solid tokens.$ifxColorOcean600; // Outline doesn't affect layout\n border: none;\n\n & .sidebar__nav-item-icon-wrapper {\n color: tokens.$ifxColorOcean600;\n }\n\n & .sidebar__nav-item-label {\n outline: none;\n color: tokens.$ifxColorOcean600;\n }\n\n & .sidebar__nav-item-indicator {\n & .item__arrow-wrapper {\n & ifx-icon {\n color: tokens.$ifxColorOcean600;\n }\n }\n }\n }\n\n\n\n &:hover {\n outline: none;\n\n & .sidebar__nav-item-icon-wrapper {\n color: tokens.$ifxColorOcean600;\n }\n\n & .sidebar__nav-item-label {\n outline: none;\n color: tokens.$ifxColorOcean600;\n }\n\n & .sidebar__nav-item-indicator {\n & .item__arrow-wrapper {\n & ifx-icon {\n color: tokens.$ifxColorOcean600;\n }\n }\n }\n }\n}\n\n.sidebar__nav-item {\n display: flex;\n flex-direction: row;\n align-items: center;\n width: 100%;\n padding: 8px 0px;\n gap: 4px;\n flex: none;\n order: 0;\n flex-grow: 0;\n text-decoration: none;\n color: tokens.$ifxColorBaseBlack;\n cursor: pointer;\n font-family: var(--ifx-font-family); // tokens.$ifxFontFamilyBody;\n\n\n\n &.extra-padding__bottom {\n padding: 8px 0px 16px 0px;\n }\n\n &.active {\n color: tokens.$ifxColorOcean500;\n }\n\n &.active-section {\n &::before {\n content: \"\";\n position: absolute;\n left: -32px;\n height: 40px;\n width: 2px;\n background: tokens.$ifxColorOcean500;\n }\n }\n\n\n &.open {\n padding: 8px 0px;\n\n & .sidebar__nav-item-label {\n font-size: 16px;\n font-style: normal;\n font-weight: 400;\n line-height: 24px;\n }\n\n & .sidebar__nav-item-indicator {\n & .item__arrow-wrapper {\n & ifx-icon {\n transform: rotate(-180deg);\n }\n }\n }\n }\n\n &.header__section {\n box-sizing: padding-box;\n border-top: 1px solid tokens.$ifxColorEngineering200;\n padding: 16px 0px;\n display: -webkit-flex;\n -webkit-line-clamp: 1;\n -webkit-box-orient: horizontal;\n overflow: hidden;\n text-overflow: ellipsis;\n\n &.no-top-border {\n border-top: none;\n }\n\n &.active-section {\n &::before {\n content: \"\";\n position: absolute;\n left: -32px;\n height: 40px;\n width: 2px;\n background: tokens.$ifxColorOcean500;\n }\n }\n\n &.open {\n\n padding: 16px 0px 8px 0px;\n\n & .sidebar__nav-item-indicator {\n & .item__arrow-wrapper {\n & ifx-icon {\n transform: rotate(-180deg);\n }\n }\n }\n }\n\n & .sidebar__nav-item-label {\n color: tokens.$ifxColorBaseBlack;\n font-family: Source Sans 3;\n font-size: 16px;\n font-style: normal;\n font-weight: 600;\n line-height: 24px;\n }\n }\n\n &.submenu__item {\n padding: 4px 0px;\n\n &.extra-padding__bottom {\n padding: 4px 0px 16px 0px;\n }\n }\n\n & .sidebar__nav-item-icon-wrapper {\n display: flex;\n width: tokens.$ifxSize300;\n height: tokens.$ifxSize300;\n justify-content: center;\n align-items: center;\n gap: tokens.$ifxSpace100;\n flex-shrink: 0;\n\n &.noIcon {\n display: none;\n }\n\n & ifx-icon {\n width: tokens.$ifxSize200;\n height: tokens.$ifxSize200;\n }\n }\n\n & .sidebar__nav-item-label {\n font-style: normal;\n font-weight: 400;\n font-size: tokens.$ifxFontSizeM;\n line-height: tokens.$ifxLineHeightM;\n display: flex;\n align-items: center;\n flex: none;\n order: 1;\n flex-grow: 1;\n cursor: pointer;\n }\n\n & .sidebar__nav-item-indicator {\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n padding: 0px 4px;\n flex: none;\n order: 2;\n flex-grow: 0;\n }\n}\n\n.expandable__submenu {\n display: none;\n list-style-type: none;\n flex-direction: column;\n padding: 0;\n margin: 0;\n padding-left: 40px;\n\n &.open {\n display: flex;\n }\n}\n\n.header__section+.expandable__submenu {\n padding-left: 0;\n}","import { Component, h, Prop, Element, State, Listen, Watch, Event, EventEmitter, Method } from '@stencil/core';\n\n@Component({\n tag: 'ifx-sidebar-item',\n styleUrl: 'sidebar-item.scss',\n shadow: true\n})\nexport class SidebarItem {\n @Element() el;\n @Prop() icon: string = \"\"\n @State() showIcon: boolean = true;\n @State() showIconWrapper: boolean = false;\n @Prop() href: string = \"\";\n @State() internalHref: string = \"\";\n @Prop() target: string = \"_self\";\n @State() isExpandable: boolean = false;\n @State() isNested: boolean = true;\n @State() isSubMenuItem: boolean = false;\n @Prop() numberIndicator: number;\n @Prop() active: boolean = false; // set to true manually or by clicking on a navigation item\n @Prop() isActionItem: boolean = false; // if an item is an action item, it can not become active\n\n @State() internalActiveState: boolean = false;\n\n @Event({ bubbles: true, composed: true }) ifxSidebarMenu: EventEmitter;\n @Event({ bubbles: true, composed: true }) ifxSidebarNavigationItem: EventEmitter;\n @Event({ bubbles: true, composed: true }) ifxSidebarActionItem: EventEmitter;\n\n @Prop() handleItemClick: (item: HTMLElement) => void;\n\n\n @Watch('active')\n handleActiveChange(newValue: boolean, oldValue: boolean) {\n // If the item is an action item, ignore the active prop\n if (this.isActionItem) {\n this.internalActiveState = false;\n return;\n }\n this.internalActiveState = newValue;\n if (newValue !== oldValue) {\n let labelElement = this.getNavItem(this.el.shadowRoot)\n if (!this.isExpandable && !newValue) {\n this.handleClassList(labelElement, 'remove', 'active');\n }\n if (!this.isExpandable && newValue) {\n this.handleClassList(labelElement, 'add', 'active');\n }\n }\n }\n\n\n\n @Listen('consoleError')\n handleConsoleError(event: CustomEvent<boolean>) {\n if (event.detail) {\n this.showIcon = false;\n } else {\n this.showIcon = true;\n }\n }\n\n handleEventEmission() {\n // Get the active item section\n this.ifxSidebarMenu.emit(this.el)\n }\n\n handleClassList(el, type, className) {\n el.classList[type](className)\n if (type === 'contains') {\n return el.classList.contains(className)\n }\n }\n\n getExpandableMenu() {\n const expandableSubmenu = this.el.shadowRoot.querySelector('.expandable__submenu')\n return expandableSubmenu\n }\n\n getNavItem(el) {\n return el?.querySelector('.sidebar__nav-item')\n }\n\n\n\n getSidebarMenuItems(el = this.el) {\n const sidebarItems = el.querySelectorAll('ifx-sidebar-item');\n if (sidebarItems.length === 0) {\n return el.shadowRoot.querySelectorAll('ifx-sidebar-item');\n }\n return sidebarItems;\n }\n\n getSidebarMenuItem() {\n const sidebarItem = this.el.shadowRoot.querySelector('.sidebar__nav-item')\n return sidebarItem;\n }\n\n\n toggleSubmenu() {\n if (this.isExpandable) {\n const menuItem = this.getSidebarMenuItem();\n const expandableMenu = this.getExpandableMenu();\n this.handleClassList(expandableMenu, 'toggle', 'open');\n this.handleClassList(menuItem, 'toggle', 'open');\n // Emit an event with the current component\n this.handleEventEmission();\n } else {\n // If the sidebar item is not expandable, it's a leaf item without a submenu.\n // Emit an event to the parent `ifx-sidebar` component to notify it that a leaf item has been clicked.\n if (this.isActionItem) { //its an action item that eg opens an overlay etc and should not influence the active state of the item\n this.ifxSidebarActionItem.emit(this.el); // emit new event if isActionItem is true\n return;\n } else { //its a navigation item which becomes active after clicking it\n this.handleActiveChange(true, this.internalActiveState)\n this.ifxSidebarNavigationItem.emit(this.el);\n }\n // If the sidebar item is selectable (not expandable), then call the handler function with the current element.\n if (this.handleItemClick) {\n this.handleItemClick(this.el);\n }\n }\n // // Emit an event with the current component\n // this.handleEventEmission();\n }\n\n\n\n handleExpandableMenu(sidebarItems) {\n const sidebarExpandableMenu = this.getExpandableMenu();\n sidebarItems.forEach((el: HTMLElement) => {\n const li = document.createElement('li')\n li.appendChild(el)\n sidebarExpandableMenu.appendChild(li)\n })\n }\n\n parentElementIsSidebar() {\n const parentElement = this.el.parentElement;\n if (parentElement.tagName.toUpperCase() === 'IFX-SIDEBAR') {\n return true;\n } else return false;\n }\n\n checkIfMenuItemIsNested() {\n const parentIsSidebar = this.parentElementIsSidebar()\n if (parentIsSidebar) {\n this.isNested = false;\n }\n }\n\n checkIfMenuItemIsSubMenu() {\n const parentElement = this.el.parentElement;\n const navItem = this.getNavItem(parentElement.shadowRoot);\n if(parentElement.tagName.toUpperCase() === 'IFX-SIDEBAR-ITEM' && !this.handleClassList(navItem, 'contains', 'header__section')) {\n this.isSubMenuItem = true;\n }else {\n this.isSubMenuItem = false;\n }\n }\n\n isActive(iteratedComponent) {\n const activeAttributeValue = iteratedComponent.getAttribute('active');\n const isActive = activeAttributeValue === 'true';\n return isActive\n }\n\n getParentSection(el: HTMLElement) {\n let parentElement = el.parentElement;\n\n while (parentElement && parentElement.tagName.toUpperCase() !== 'IFX-SIDEBAR') {\n if (parentElement.tagName.toUpperCase() === 'IFX-SIDEBAR-ITEM') {\n return parentElement;\n }\n parentElement = parentElement.parentElement;\n }\n\n return null;\n }\n\n\n\n handleBorderIndicatorDisplacement(menuItem) {\n // Recursive function to handle each item\n const handleItem = (item, menuItem) => {\n const isActive = this.isActive(item);\n if (isActive) {\n const isOpen = this.handleClassList(menuItem, 'contains', 'open');\n const activeMenuItemSection = this.getActiveItemSection();\n if (!isOpen) {\n this.handleClassList(activeMenuItemSection, 'add', 'active-section');\n } else {\n this.handleClassList(activeMenuItemSection, 'remove', 'active-section');\n }\n }\n\n // Process each child item\n const children = this.getSidebarMenuItems(item);\n children.forEach((child) => handleItem(child, menuItem));\n }\n\n // Start with the top-level items\n const topLevelItems = this.getSidebarMenuItems();\n topLevelItems.forEach((item) => handleItem(item, menuItem));\n }\n\n\n setHref() {\n if (this.href.toLowerCase().trim() === \"\") {\n this.internalHref = undefined;\n } else this.internalHref = this.href;\n }\n\n getActiveItemSection() {\n const parentIsSidebar = this.parentElementIsSidebar()\n if (parentIsSidebar) {\n const labelElement = this.getNavItem(this.el.shadowRoot)\n return labelElement;\n } else {\n const labelElement = this.getNavItem(this.el.shadowRoot)\n return labelElement;\n }\n }\n\n @Method()\n async setActiveClasses() {\n const activeMenuItem = this.getNavItem(this.el.shadowRoot)\n this.handleClassList(activeMenuItem, 'add', 'active')\n }\n\n @Method()\n async expandMenu(ac: boolean){\n const menuItem = this.getSidebarMenuItem();\n const expandableMenu = this.getExpandableMenu();\n this.handleClassList(expandableMenu, 'add', 'open');\n this.handleClassList(menuItem, 'add', 'open');\n if(ac){\n this.handleClassList(expandableMenu, 'remove', 'active-section')\n this.handleClassList(menuItem, 'remove', 'active-section')\n }\n }\n \n @Method()\n async isItemExpandable(){\n return this.isExpandable;\n }\n\n handleActiveState() {\n if (this.internalActiveState) {\n this.setActiveClasses()\n }\n }\n\n handleKeyDown(event: KeyboardEvent) {\n if (event.key === 'Enter') {\n this.toggleSubmenu()\n }\n }\n\n componentDidLoad() {\n this.handleActiveState();\n if (this.isExpandable) {\n const sidebarItems = this.getSidebarMenuItems();\n this.handleExpandableMenu(sidebarItems)\n }\n }\n \n componentWillLoad() {\n this.internalActiveState = this.active;\n this.checkIfMenuItemIsNested();\n this.checkIfMenuItemIsSubMenu();\n this.setHref()\n const sidebarItems = this.getSidebarMenuItems();\n if (sidebarItems.length !== 0) {\n this.isExpandable = true;\n } else {\n this.isExpandable = false;\n }\n }\n\n componentWillUpdate() {\n // If the active prop has been set to true and the internalActiveState has not been set to true yet\n if (this.active && !this.internalActiveState) {\n // Set the internal active state to true\n this.internalActiveState = this.active;\n\n // Emit the event to notify the parent Sidebar\n this.ifxSidebarNavigationItem.emit(this.el);\n }\n }\n\n\n render() {\n return (\n <div>\n <a tabIndex={1} onKeyDown={(event) => this.handleKeyDown(event)} href={this.internalHref} onClick={() => this.toggleSubmenu()} target={this.target} class={`sidebar__nav-item ${!this.isNested && this.isExpandable ? 'header__section' : \"\"} ${this.isSubMenuItem ? 'submenu__item' : \"\"}`}>\n {this.icon &&\n <div class={`sidebar__nav-item-icon-wrapper ${!this.showIcon ? 'noIcon' : \"\"}`}>\n <ifx-icon icon={this.icon}></ifx-icon>\n </div>}\n <div class=\"sidebar__nav-item-label\">\n <slot />\n </div>\n {\n (this.isExpandable || !isNaN(this.numberIndicator)) &&\n <div class=\"sidebar__nav-item-indicator\">\n {this.isExpandable &&\n <span class='item__arrow-wrapper'>\n <ifx-icon icon=\"chevron-down-16\" />\n </span>\n }\n\n {!isNaN(this.numberIndicator) && !this.isExpandable && !this.isNested &&\n <span class='item__number-indicator'>\n <ifx-indicator variant='number' number={this.numberIndicator}></ifx-indicator>\n </span>}\n\n </div>\n }\n </a>\n {this.isExpandable && <ul class='expandable__submenu'></ul>}\n\n </div>\n );\n }\n}\n"],"version":3}
|
@@ -3,7 +3,7 @@ import { d as detectFramework, t as trackComponent } from './p-08c92877.js';
|
|
3
3
|
import { i as isNestedInIfxComponent } from './p-1ecafb97.js';
|
4
4
|
import { d as defineCustomElement$2 } from './p-6ca4e3f8.js';
|
5
5
|
|
6
|
-
const sliderCss = ":root{--ifx-font-family:\"Source Sans 3\", \"Arial, sans-serif\"}:host{display:block}.left-icon,.right-icon,.left-text,.right-text,.percentage-display{font-size:0.875rem;color:#575352;margin-left:8px}.left-icon.disabled,.right-icon.disabled,.left-text.disabled,.right-text.disabled,.percentage-display.disabled{color:#BFBBBB}.left-icon,.left-text{margin-right:8px}.right-icon,.right-text,.percentage-display{margin-left:8px}.ifx-slider{display:flex;align-items:center;padding:2px 16px;border-radius:9999px}.ifx-slider input[type=range]{-webkit-appearance:none;width:100%;height:4px;background:linear-gradient(to right, #0A8276 0%, #0A8276 var(--value-percent, 0%), #EEEDED var(--value-percent, 0%), #EEEDED 100%);outline:none;cursor:pointer;transition:0.2s}.ifx-slider input[type=range]::-moz-range-thumb{width:20px;height:20px;border-radius:50%;background:#0A8276;cursor:pointer;box-shadow:0px 1px 2px rgba(0, 0, 0, 0.2)}.ifx-slider input[type=range]:not(:disabled)::-webkit-slider-thumb{-webkit-appearance:none;width:16px;height:16px;background:#0A8276;border-radius:50%;cursor:pointer;transition:box-shadow 0.2s}.ifx-slider input[type=range]:not(:disabled)::-webkit-slider-thumb:hover{background:#08665C}.ifx-slider input[type=range]:not(:disabled)::-webkit-slider-thumb:active{background:#06534B}.ifx-slider input[type=range]:disabled{background:#BFBBBB;cursor:default}.ifx-slider input[type=range]:disabled::-webkit-slider-thumb{-webkit-appearance:none;width:16px;height:16px;background:#BFBBBB;border-radius:50%;cursor:default}.ifx-slider .range-slider__wrapper{position:relative;width:100%;height:4px;display:flex;align-items:center;justify-content:center;margin:0px 2px;background:linear-gradient(to right, #EEEDED 0%, #EEEDED var(--min-value-percent, 100%), #0A8276 var(--min-value-percent, 100%), #0A8276 var(--max-value-percent, 100%), #EEEDED var(--max-value-percent, 100%), #EEEDED 100%)}.ifx-slider .range-slider__wrapper:has(input[type=range]:disabled){background:#BFBBBB}.ifx-slider .range-slider__wrapper input[type=range]{position:absolute;pointer-events:none;background:none}.ifx-slider .range-slider__wrapper input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;border:none;pointer-events:auto;cursor:pointer;box-shadow:0px 1px 2px rgba(0, 0, 0, 0.2)}.ifx-slider .range-slider__wrapper input[type=range]::-moz-range-thumb{-webkit-appearance:none;border:none;pointer-events:auto;cursor:pointer;box-shadow:0px 1px 2px rgba(0, 0, 0, 0.2)}.ifx-slider .range-slider__wrapper input[type=range]::-ms-thumb{-webkit-appearance:none;border:none;pointer-events:auto;cursor:pointer;box-shadow:0px 1px 2px rgba(0, 0, 0, 0.2)}.ifx-slider .range-slider__wrapper input[type=range]::-webkit-slider-runnable-track{-webkit-appearance:none;border:none;background:none;width:100%}.ifx-slider .range-slider__wrapper input[type=range]::-moz-range-track{-webkit-appearance:none;border:none;background:none;width:100%}";
|
6
|
+
const sliderCss = ":root{--ifx-font-family:\"Source Sans 3\", \"Arial, sans-serif\"}:host{display:block}.left-icon,.right-icon,.left-text,.right-text,.percentage-display{font-size:0.875rem;color:#575352;margin-left:8px}.left-icon.disabled,.right-icon.disabled,.left-text.disabled,.right-text.disabled,.percentage-display.disabled{color:#BFBBBB}.left-icon,.left-text{margin-right:8px}.right-icon,.right-text,.percentage-display{margin-left:8px}.ifx-slider{display:flex;align-items:center;padding:2px 16px;border-radius:9999px}.ifx-slider input[type=range]{-webkit-appearance:none;width:100%;height:4px;background:linear-gradient(to right, #0A8276 0%, #0A8276 var(--value-percent, 0%), #EEEDED var(--value-percent, 0%), #EEEDED 100%);outline:none;cursor:pointer;transition:0.2s}.ifx-slider input[type=range]:focus-visible{outline:2px solid #0A8276;outline-offset:4px}.ifx-slider input[type=range]::-moz-range-thumb{width:20px;height:20px;border-radius:50%;background:#0A8276;cursor:pointer;box-shadow:0px 1px 2px rgba(0, 0, 0, 0.2)}.ifx-slider input[type=range]:not(:disabled)::-webkit-slider-thumb{-webkit-appearance:none;width:16px;height:16px;background:#0A8276;border-radius:50%;cursor:pointer;transition:box-shadow 0.2s}.ifx-slider input[type=range]:not(:disabled)::-webkit-slider-thumb:hover{background:#08665C}.ifx-slider input[type=range]:not(:disabled)::-webkit-slider-thumb:active{background:#06534B}.ifx-slider input[type=range]:disabled{background:#BFBBBB;cursor:default}.ifx-slider input[type=range]:disabled::-webkit-slider-thumb{-webkit-appearance:none;width:16px;height:16px;background:#BFBBBB;border-radius:50%;cursor:default}.ifx-slider .range-slider__wrapper{position:relative;width:100%;height:4px;display:flex;align-items:center;justify-content:center;margin:0px 2px;background:linear-gradient(to right, #EEEDED 0%, #EEEDED var(--min-value-percent, 100%), #0A8276 var(--min-value-percent, 100%), #0A8276 var(--max-value-percent, 100%), #EEEDED var(--max-value-percent, 100%), #EEEDED 100%)}.ifx-slider .range-slider__wrapper:has(input[type=range]:disabled){background:#BFBBBB}.ifx-slider .range-slider__wrapper input[type=range]{position:absolute;pointer-events:none;background:none}.ifx-slider .range-slider__wrapper input[type=range]:focus-visible{outline:2px solid #0A8276;outline-offset:4px}.ifx-slider .range-slider__wrapper input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;border:none;pointer-events:auto;cursor:pointer;box-shadow:0px 1px 2px rgba(0, 0, 0, 0.2)}.ifx-slider .range-slider__wrapper input[type=range]::-moz-range-thumb{-webkit-appearance:none;border:none;pointer-events:auto;cursor:pointer;box-shadow:0px 1px 2px rgba(0, 0, 0, 0.2)}.ifx-slider .range-slider__wrapper input[type=range]::-ms-thumb{-webkit-appearance:none;border:none;pointer-events:auto;cursor:pointer;box-shadow:0px 1px 2px rgba(0, 0, 0, 0.2)}.ifx-slider .range-slider__wrapper input[type=range]::-webkit-slider-runnable-track{-webkit-appearance:none;border:none;background:none;width:100%}.ifx-slider .range-slider__wrapper input[type=range]::-moz-range-track{-webkit-appearance:none;border:none;background:none;width:100%}";
|
7
7
|
const IfxSliderStyle0 = sliderCss;
|
8
8
|
|
9
9
|
const IfxSlider$1 = /*@__PURE__*/ proxyCustomElement(class IfxSlider extends H {
|
@@ -152,9 +152,9 @@ const IfxSlider$1 = /*@__PURE__*/ proxyCustomElement(class IfxSlider extends H {
|
|
152
152
|
}
|
153
153
|
render() {
|
154
154
|
return (h("div", { key: 'f50db92ae153374193063f21b595c89e71c16717', class: "ifx-slider" }, this.leftText && (h("span", { key: 'b87e007049aae171a9b21afc0f801c3ecfd3437a', class: `left-text` }, this.leftText)), this.leftIcon && (h("ifx-icon", { key: '3b10b6dbbd2bea5354f53a8b641ef231baed35b8', icon: this.leftIcon, class: `left-icon${this.disabled ? ' disabled' : ''}` })), (this.type !== 'double') ?
|
155
|
-
h("input", { type: "range", min: this.min, max: this.max, step: this.step, value: this.internalValue, disabled: this.disabled, ref: (el) => (this.inputRef = el), onInput: (event) => this.handleInputChange(event), "aria-label":
|
155
|
+
h("input", { type: "range", min: this.min, max: this.max, step: this.step, value: this.internalValue, disabled: this.disabled, ref: (el) => (this.inputRef = el), onInput: (event) => this.handleInputChange(event), "aria-label": "Slider", "aria-valuemin": this.min, "aria-valuemax": this.max, "aria-valuenow": this.internalValue, "aria-disabled": this.disabled ? "true" : "false" })
|
156
156
|
:
|
157
|
-
h("div", { class: 'range-slider__wrapper', "aria-label": '
|
157
|
+
h("div", { class: 'range-slider__wrapper', "aria-label": 'Range slider', "aria-value": this.value, "aria-disabled": this.disabled }, h("input", { id: 'min-slider', type: 'range', min: this.min, max: this.max, step: this.step, value: this.internalMinValue, disabled: this.disabled, role: "group", ref: (el) => (this.minInputRef = el), onInput: (event) => this.handleInputChangeOfRangeSlider(event), onMouseUp: (event) => this.handleOnMouseLeaveOfRangeSlider(event), "aria-label": "Minimum value slider", "aria-valuemin": this.min, "aria-valuemax": this.max, "aria-valuenow": this.internalMinValue, "aria-disabled": this.disabled ? "true" : "false" }), h("input", { id: 'max-slider', type: 'range', min: this.min, max: this.max, step: this.step, value: this.internalMaxValue, disabled: this.disabled, ref: (el) => (this.maxInputRef = el), onInput: (event) => this.handleInputChangeOfRangeSlider(event), onMouseUp: (event) => this.handleOnMouseLeaveOfRangeSlider(event), "aria-label": "Maximum value slider", "aria-valuemin": this.min, "aria-valuemax": this.max, "aria-valuenow": this.internalMaxValue, "aria-disabled": this.disabled ? "true" : "false" })), this.rightIcon && (h("ifx-icon", { key: 'baf80f55d8b86fb03a5bfa5fd8bd2a07b25fb446', icon: this.rightIcon, class: `right-icon${this.disabled ? ' disabled' : ''}` })), this.rightText && (h("span", { key: '99f1dafb075d64ca8b1ccc0892a56c452d55121a', class: `right-text${this.disabled ? ' disabled' : ''}` }, this.rightText)), this.showPercentage && (this.type !== "double") && (h("span", { key: 'f2f2549ee19052913042e130524dc2fe8c81f37e', class: `percentage-display${this.disabled ? ' disabled' : ''}` }, this.percentage, "%"))));
|
158
158
|
}
|
159
159
|
get el() { return this; }
|
160
160
|
static get watchers() { return {
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"ifx-slider.js","mappings":";;;;;AAAA,MAAM,SAAS,GAAG,82FAA82F,CAAC;AACj4F,wBAAe,SAAS;;MCSXA,WAAS;IALtB;;;;;QAMU,QAAG,GAAW,CAAC,CAAC;QAChB,QAAG,GAAW,GAAG,CAAC;QAClB,SAAI,GAAW,CAAC,CAAC;QAIjB,aAAQ,GAAY,KAAK,CAAC;QAC1B,mBAAc,GAAY,KAAK,CAAC;QAKhC,SAAI,GAAwB,QAAQ,CAAC;QACpC,kBAAa,GAAW,CAAC,CAAC;QAC1B,eAAU,GAAW,CAAC,CAAC;QACvB,qBAAgB,GAAW,CAAC,CAAC;QAC7B,qBAAgB,GAAW,GAAG,CAAC;KA8NzC;IApNC,YAAY,CAAC,QAAgB;QAC3B,IAAI,CAAC,aAAa,GAAG,QAAQ,CAAC;QAC9B,IAAI,CAAC,kBAAkB,EAAE,CAAC;KAC3B;IAGD,eAAe,CAAC,QAAgB;QAC9B,IAAI,CAAC,gBAAgB,GAAG,QAAQ,CAAC;QACjC,IAAI,CAAC,kBAAkB,EAAE,CAAC;KAC3B;IAGD,eAAe,CAAC,QAAgB;QAC9B,IAAI,CAAC,gBAAgB,GAAG,QAAQ,CAAC;QACjC,IAAI,CAAC,kBAAkB,EAAE,CAAC;KAC3B;IAED,qBAAqB;QACnB,MAAM,kBAAkB,GAAG,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,wBAAwB,CAAC,CAAC;QACtF,OAAO,kBAAkB,CAAC;KAC3B;IAED,8BAA8B,CAAC,KAAY;QACzC,MAAM,MAAM,GAAG,KAAK,CAAC,MAA0B,CAAC;QAChD,IAAG,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,KAA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EACb,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,KAAK,EAAE,IAAI,CAAC,gBAAgB,EAC5B,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,WAAW,GAAG,EAAsB,CAAC,EACxD,OAAO,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC,8BAA8B,CAAC,KAAK,CAAC,EAC9D,SAAS,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC,+BAA+B,CAAC,KAAK,CAAC,GACjE,CAEE,EAET,IAAI,CAAC,SAAS,KACb,iEAAU,IAAI,EAAE,IAAI,CAAC,SAAS,EAAE,KAAK,EAAE,aAAa,IAAI,CAAC,QAAQ,GAAG,WAAW,GAAG,EAAE,EAAE,GAAI,CAC3F,EACA,IAAI,CAAC,SAAS,KACb,6DAAM,KAAK,EAAE,aAAa,IAAI,CAAC,QAAQ,GAAG,WAAW,GAAG,EAAE,EAAE,IACzD,IAAI,CAAC,SAAS,CACV,CACR,EAEA,IAAI,CAAC,cAAc,KAAK,IAAI,CAAC,IAAI,KAAK,QAAQ,CAAC,KAC9C,6DACE,KAAK,EAAE,qBAAqB,IAAI,CAAC,QAAQ,GAAG,WAAW,GAAG,EAAE,EAAE,IAE7D,IAAI,CAAC,UAAU,MACX,CACR,CACG,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["IfxSlider"],"sources":["src/components/slider/slider.scss?tag=ifx-slider&encapsulation=shadow","src/components/slider/slider.tsx"],"sourcesContent":["@use \"~@infineon/design-system-tokens/dist/tokens\";\n@use \"../../global/font.scss\";\n\n:host {\n display: block;\n}\n\n.left-icon,\n.right-icon,\n.left-text,\n.right-text,\n.percentage-display {\n font-size: tokens.$ifxFontSizeS;\n color: tokens.$ifxColorEngineering500;\n margin-left: tokens.$ifxSpace100;\n\n &.disabled {\n // Add the disabled state for the percentage display\n color: tokens.$ifxColorEngineering300;\n }\n}\n\n.left-icon,\n.left-text {\n margin-right: tokens.$ifxSpace100;\n}\n\n.right-icon,\n.right-text,\n.percentage-display {\n margin-left: tokens.$ifxSpace100;\n}\n\n\n.ifx-slider {\n display: flex;\n align-items: center;\n padding: tokens.$ifxSpace25 tokens.$ifxSpace200;\n border-radius: tokens.$ifxBorderRadiusRound;\n\n input[type='range'] {\n -webkit-appearance: none;\n width: 100%;\n height: 4px;\n background: linear-gradient(to right, tokens.$ifxColorOcean500 0%, tokens.$ifxColorOcean500 var(--value-percent, 0%), tokens.$ifxColorEngineering200 var(--value-percent, 0%), tokens.$ifxColorEngineering200 100%);\n outline: none;\n cursor: pointer;\n transition: 0.2s;\n\n &::-moz-range-thumb {\n width: tokens.$ifxSize250;\n height: tokens.$ifxSize250;\n border-radius: 50%;\n background: tokens.$ifxColorOcean500;\n cursor: pointer;\n box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.2);\n }\n \n\n &:not(:disabled)::-webkit-slider-thumb {\n -webkit-appearance: none;\n width: 16px;\n height: 16px;\n background: tokens.$ifxColorOcean500;\n border-radius: 50%;\n cursor: pointer;\n transition: box-shadow 0.2s;\n\n &:hover {\n background: tokens.$ifxColorOcean600;\n }\n\n &:active {\n background: tokens.$ifxColorOcean700;\n }\n }\n }\n\n input[type='range']:disabled {\n background: tokens.$ifxColorEngineering300;\n cursor: default;\n }\n\n input[type='range']:disabled::-webkit-slider-thumb {\n -webkit-appearance: none;\n width: 16px;\n height: 16px;\n background: tokens.$ifxColorEngineering300;\n border-radius: 50%;\n cursor: default;\n }\n \n & .range-slider__wrapper {\n position: relative;\n width: 100%;\n height: 4px;\n display: flex;\n align-items: center;\n justify-content: center;\n margin: 0px 2px;\n \n background: linear-gradient(to right, tokens.$ifxColorEngineering200 0%, tokens.$ifxColorEngineering200 var(--min-value-percent, 100%), tokens.$ifxColorOcean500 var(--min-value-percent, 100%), tokens.$ifxColorOcean500 var(--max-value-percent, 100%), tokens.$ifxColorEngineering200 var(--max-value-percent, 100%), tokens.$ifxColorEngineering200 100%);\n\n &:has(input[type='range']:disabled) {\n background: tokens.$ifxColorEngineering300;\n }\n\n \n @mixin thumb() {\n -webkit-appearance: none;\n border: none; \n pointer-events: auto;\n cursor: pointer;\n box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.2);\n }\n \n @mixin track() {\n -webkit-appearance: none;\n border: none;\n background: none; \n width: 100%;\n }\n\n input[type='range'] {\n position: absolute;\n pointer-events: none; \n background: none;\n\n &::-webkit-slider-thumb { @include thumb; }\n &::-moz-range-thumb { @include thumb; }\n &::-ms-thumb { @include thumb; }\n\n &::-webkit-slider-runnable-track { @include track; }\n &::-moz-range-track { @include track; }\n }\n }\n \n}\n","import { Component, h, Prop, Event, EventEmitter, State, Watch, Element } from '@stencil/core';\nimport { trackComponent } from '../../global/utils/tracking'; \nimport { isNestedInIfxComponent } from '../../global/utils/dom-utils';\nimport { detectFramework } from '../../global/utils/framework-detection';\n\n@Component({\n tag: 'ifx-slider',\n styleUrl: 'slider.scss',\n shadow: true,\n})\nexport class IfxSlider {\n @Prop() min: number = 0;\n @Prop() max: number = 100;\n @Prop() step: number = 1;\n @Prop() value: number;\n @Prop() minValueHandle: number;\n @Prop() maxValueHandle: number;\n @Prop() disabled: boolean = false;\n @Prop() showPercentage: boolean = false;\n @Prop() leftIcon: string;\n @Prop() rightIcon: string;\n @Prop() leftText: string;\n @Prop() rightText: string;\n @Prop() type: 'single' | 'double' = 'single';\n @State() internalValue: number = 0;\n @State() percentage: number = 0;\n @State() internalMinValue: number = 0;\n @State() internalMaxValue: number = 100;\n @Event() ifxChange: EventEmitter;\n\n @Element() el;\n\n private inputRef: HTMLInputElement;\n private minInputRef: HTMLInputElement;\n private maxInputRef: HTMLInputElement;\n \n @Watch('value')\n valueChanged(newValue: number) {\n this.internalValue = newValue;\n this.updateValuePercent();\n }\n\n @Watch('minValueHandle')\n minValueChanged(newValue: number) {\n this.internalMinValue = newValue;\n this.updateValuePercent();\n }\n \n @Watch('maxValueHandle')\n maxValueChanged(newValue: number) {\n this.internalMaxValue = newValue;\n this.updateValuePercent();\n }\n\n getRangeSliderWrapper() {\n const rangeSliderWrapper = this.el.shadowRoot.querySelector('.range-slider__wrapper');\n return rangeSliderWrapper;\n }\n\n handleInputChangeOfRangeSlider(event: Event) {\n const target = event.target as HTMLInputElement;\n if(parseFloat(this.maxInputRef.value) - parseFloat(this.minInputRef.value) <= 0) {\n if(target.id === 'max-slider') {\n this.maxInputRef.value = this.minInputRef.value;\n }else{\n this.minInputRef.value = this.maxInputRef.value;\n }\n }\n if(target.id === 'max-slider') {\n this.internalMaxValue = parseFloat(this.maxInputRef.value);\n } else {\n this.internalMinValue = parseFloat(this.minInputRef.value);\n }\n this.ifxChange.emit({minVal: this.internalMinValue, maxVal: this.internalMaxValue});\n this.updateValuePercent();\n this.updateZIndexIfRangeSlider(target.id)\n }\n \n handleOnMouseLeaveOfRangeSlider(event: Event) {\n const target = event.target as HTMLInputElement;\n const sliderWrapper = this.getRangeSliderWrapper();\n if(target.id === 'max-slider') {\n sliderWrapper.insertBefore(this.maxInputRef, this.minInputRef);\n } else {\n sliderWrapper.insertBefore(this.minInputRef, this.maxInputRef);\n }\n }\n\n calculatePercentageValue() {\n const num = (this.internalValue - this.min) * 1.0;\n const den = this.max - this.min;\n this.percentage = +parseFloat(String((num/den)*100)).toFixed(2);\n }\n\n handleInputChange(event: Event) {\n const target = event.target as HTMLInputElement;\n this.internalValue = parseFloat(target.value);\n this.ifxChange.emit(this.internalValue);\n this.calculatePercentageValue();\n this.updateValuePercent();\n }\n\n private roundToValidStep(value: number) {\n const relativeValue = value - this.min;\n const remainder = relativeValue % this.step;\n if (remainder >= this.step / 2) {\n return this.min + relativeValue + (this.step - remainder);\n } else {\n return this.min + relativeValue - remainder;\n }\n }\n\n updateValuePercent() {\n const den = this.max - this.min;\n if(this.type === 'double'){\n if (this.minInputRef) {\n const num = (this.roundToValidStep(this.internalMinValue) - this.min) * 1.0;\n const minPercent = (num/den) * 100;\n this.minInputRef.parentElement.style.setProperty('--min-value-percent', `${minPercent}%`);\n }\n\n if (this.maxInputRef) {\n const num = (this.roundToValidStep(this.internalMaxValue) - this.min) * 1.0;\n const maxPercent = (num/den) * 100;\n this.maxInputRef.parentElement.style.setProperty('--max-value-percent', `${maxPercent}%`);\n }\n\n } else {\n\n if (this.inputRef) {\n const num = (this.roundToValidStep(this.internalValue) - this.min) * 1.0;\n const den = this.max - this.min;\n const percentage = (num/den) * 100;\n this.inputRef.style.setProperty('--value-percent', `${percentage}%`);\n }\n\n }\n } \n \n // Ensures that the last used slider thumb stays on top of the other thumb in order to handle correct overlapping \n // if min and max thumbs take the same value.\n updateZIndexIfRangeSlider(targetId: string = '') {\n if (targetId === 'max-slider') {\n this.minInputRef.style.zIndex = '1';\n this.maxInputRef.style.zIndex = '2';\n } else {\n this.minInputRef.style.zIndex = '2';\n this.maxInputRef.style.zIndex = '1';\n }\n }\n\n componentWillLoad() {\n if(this.value === undefined) {\n this.internalValue = (this.max-this.min) / 2;\n } else {\n this.internalValue = Math.max(this.min, Math.min(this.max, this.value));\n }\n\n this.calculatePercentageValue();\n\n if(this.minValueHandle !== undefined) this.internalMinValue = this.minValueHandle;\n else this.internalMinValue = this.min;\n if(this.maxValueHandle !== undefined) this.internalMaxValue = this.maxValueHandle;\n else this.internalMaxValue = this.max;\n }\n\n async componentDidLoad() {\n if(!isNestedInIfxComponent(this.el)) { \n const framework = detectFramework();\n trackComponent('ifx-slider', await framework)\n }\n this.updateValuePercent();\n }\n\n\n render() {\n return (\n <div class=\"ifx-slider\">\n {this.leftText && (\n <span class={`left-text`}>\n {this.leftText}\n </span>\n )}\n {this.leftIcon && (\n <ifx-icon icon={this.leftIcon} class={`left-icon${this.disabled ? ' disabled' : ''}`} />\n )}\n {\n (this.type !== 'double') ?\n <input\n type=\"range\"\n min={this.min}\n max={this.max}\n step={this.step}\n value={this.internalValue}\n disabled={this.disabled}\n ref={(el) => (this.inputRef = el as HTMLInputElement)}\n onInput={(event) => this.handleInputChange(event)}\n aria-label='a slider'\n aria-value={this.value}\n aria-disabled={this.disabled}\n /> \n :\n <div class = 'range-slider__wrapper' aria-label='a range slider' aria-value={this.value} aria-disabled={this.disabled} >\n <input \n id='min-slider'\n type='range'\n min={this.min}\n max={this.max}\n step={this.step}\n value={this.internalMinValue}\n disabled={this.disabled}\n ref={(el) => (this.minInputRef = el as HTMLInputElement)}\n onInput={(event) => this.handleInputChangeOfRangeSlider(event)}\n onMouseUp={(event) => this.handleOnMouseLeaveOfRangeSlider(event)}\n />\n <input \n id='max-slider'\n type='range'\n min={this.min}\n max={this.max}\n step={this.step}\n value={this.internalMaxValue}\n disabled={this.disabled}\n ref={(el) => (this.maxInputRef = el as HTMLInputElement)}\n onInput={(event) => this.handleInputChangeOfRangeSlider(event)}\n onMouseUp={(event) => this.handleOnMouseLeaveOfRangeSlider(event)}\n />\n\n </div>\n }\n {this.rightIcon && (\n <ifx-icon icon={this.rightIcon} class={`right-icon${this.disabled ? ' disabled' : ''}`} />\n )}\n {this.rightText && (\n <span class={`right-text${this.disabled ? ' disabled' : ''}`}>\n {this.rightText}\n </span>\n )}\n\n {this.showPercentage && (this.type !== \"double\") && (\n <span\n class={`percentage-display${this.disabled ? ' disabled' : ''}`}\n >\n {this.percentage}%\n </span>\n )}\n </div>\n );\n }\n}"],"version":3}
|
1
|
+
{"file":"ifx-slider.js","mappings":";;;;;AAAA,MAAM,SAAS,GAAG,ujGAAujG,CAAC;AAC1kG,wBAAe,SAAS;;MCSXA,WAAS;IALtB;;;;;QAMU,QAAG,GAAW,CAAC,CAAC;QAChB,QAAG,GAAW,GAAG,CAAC;QAClB,SAAI,GAAW,CAAC,CAAC;QAIjB,aAAQ,GAAY,KAAK,CAAC;QAC1B,mBAAc,GAAY,KAAK,CAAC;QAKhC,SAAI,GAAwB,QAAQ,CAAC;QACpC,kBAAa,GAAW,CAAC,CAAC;QAC1B,eAAU,G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AAC,KAAK,CAAC,EAC9D,SAAS,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC,+BAA+B,CAAC,KAAK,CAAC,gBACtD,sBAAsB,mBAClB,IAAI,CAAC,GAAG,mBACR,IAAI,CAAC,GAAG,mBACR,IAAI,CAAC,gBAAgB,mBACrB,IAAI,CAAC,QAAQ,GAAG,MAAM,GAAG,OAAO,GAC/C,CACE,EAET,IAAI,CAAC,SAAS,KACb,iEAAU,IAAI,EAAE,IAAI,CAAC,SAAS,EAAE,KAAK,EAAE,aAAa,IAAI,CAAC,QAAQ,GAAG,WAAW,GAAG,EAAE,EAAE,GAAI,CAC3F,EACA,IAAI,CAAC,SAAS,KACb,6DAAM,KAAK,EAAE,aAAa,IAAI,CAAC,QAAQ,GAAG,WAAW,GAAG,EAAE,EAAE,IACzD,IAAI,CAAC,SAAS,CACV,CACR,EAEA,IAAI,CAAC,cAAc,KAAK,IAAI,CAAC,IAAI,KAAK,QAAQ,CAAC,KAC9C,6DACE,KAAK,EAAE,qBAAqB,IAAI,CAAC,QAAQ,GAAG,WAAW,GAAG,EAAE,EAAE,IAE7D,IAAI,CAAC,UAAU,MACX,CACR,CACG,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["IfxSlider"],"sources":["src/components/slider/slider.scss?tag=ifx-slider&encapsulation=shadow","src/components/slider/slider.tsx"],"sourcesContent":["@use \"~@infineon/design-system-tokens/dist/tokens\";\n@use \"../../global/font.scss\";\n\n:host {\n display: block;\n}\n\n.left-icon,\n.right-icon,\n.left-text,\n.right-text,\n.percentage-display {\n font-size: tokens.$ifxFontSizeS;\n color: tokens.$ifxColorEngineering500;\n margin-left: tokens.$ifxSpace100;\n\n &.disabled {\n // Add the disabled state for the percentage display\n color: tokens.$ifxColorEngineering300;\n }\n}\n\n.left-icon,\n.left-text {\n margin-right: tokens.$ifxSpace100;\n}\n\n.right-icon,\n.right-text,\n.percentage-display {\n margin-left: tokens.$ifxSpace100;\n}\n\n\n.ifx-slider {\n display: flex;\n align-items: center;\n padding: tokens.$ifxSpace25 tokens.$ifxSpace200;\n border-radius: tokens.$ifxBorderRadiusRound;\n\n input[type='range'] {\n -webkit-appearance: none;\n width: 100%;\n height: 4px;\n background: linear-gradient(to right, tokens.$ifxColorOcean500 0%, tokens.$ifxColorOcean500 var(--value-percent, 0%), tokens.$ifxColorEngineering200 var(--value-percent, 0%), tokens.$ifxColorEngineering200 100%);\n outline: none;\n cursor: pointer;\n transition: 0.2s;\n\n &:focus-visible {\n outline: 2px solid tokens.$ifxColorOcean500;\n outline-offset: 4px;}\n\n &::-moz-range-thumb {\n width: tokens.$ifxSize250;\n height: tokens.$ifxSize250;\n border-radius: 50%;\n background: tokens.$ifxColorOcean500;\n cursor: pointer;\n box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.2);\n }\n \n\n &:not(:disabled)::-webkit-slider-thumb {\n -webkit-appearance: none;\n width: 16px;\n height: 16px;\n background: tokens.$ifxColorOcean500;\n border-radius: 50%;\n cursor: pointer;\n transition: box-shadow 0.2s;\n\n &:hover {\n background: tokens.$ifxColorOcean600;\n }\n\n &:active {\n background: tokens.$ifxColorOcean700;\n }\n }\n }\n\n input[type='range']:disabled {\n background: tokens.$ifxColorEngineering300;\n cursor: default;\n }\n\n input[type='range']:disabled::-webkit-slider-thumb {\n -webkit-appearance: none;\n width: 16px;\n height: 16px;\n background: tokens.$ifxColorEngineering300;\n border-radius: 50%;\n cursor: default;\n }\n \n & .range-slider__wrapper {\n position: relative;\n width: 100%;\n height: 4px;\n display: flex;\n align-items: center;\n justify-content: center;\n margin: 0px 2px;\n \n background: linear-gradient(to right, tokens.$ifxColorEngineering200 0%, tokens.$ifxColorEngineering200 var(--min-value-percent, 100%), tokens.$ifxColorOcean500 var(--min-value-percent, 100%), tokens.$ifxColorOcean500 var(--max-value-percent, 100%), tokens.$ifxColorEngineering200 var(--max-value-percent, 100%), tokens.$ifxColorEngineering200 100%);\n\n &:has(input[type='range']:disabled) {\n background: tokens.$ifxColorEngineering300;\n }\n\n \n @mixin thumb() {\n -webkit-appearance: none;\n border: none; \n pointer-events: auto;\n cursor: pointer;\n box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.2);\n }\n \n @mixin track() {\n -webkit-appearance: none;\n border: none;\n background: none; \n width: 100%;\n }\n\n input[type='range'] {\n position: absolute;\n pointer-events: none; \n background: none;\n \n &:focus-visible {\n outline: 2px solid tokens.$ifxColorOcean500;\n outline-offset: 4px;}\n\n &::-webkit-slider-thumb { @include thumb; }\n &::-moz-range-thumb { @include thumb; }\n &::-ms-thumb { @include thumb; }\n\n &::-webkit-slider-runnable-track { @include track; }\n &::-moz-range-track { @include track; }\n }\n }\n \n}\n","import { Component, h, Prop, Event, EventEmitter, State, Watch, Element } from '@stencil/core';\nimport { trackComponent } from '../../global/utils/tracking'; \nimport { isNestedInIfxComponent } from '../../global/utils/dom-utils';\nimport { detectFramework } from '../../global/utils/framework-detection';\n\n@Component({\n tag: 'ifx-slider',\n styleUrl: 'slider.scss',\n shadow: true,\n})\nexport class IfxSlider {\n @Prop() min: number = 0;\n @Prop() max: number = 100;\n @Prop() step: number = 1;\n @Prop() value: number;\n @Prop() minValueHandle: number;\n @Prop() maxValueHandle: number;\n @Prop() disabled: boolean = false;\n @Prop() showPercentage: boolean = false;\n @Prop() leftIcon: string;\n @Prop() rightIcon: string;\n @Prop() leftText: string;\n @Prop() rightText: string;\n @Prop() type: 'single' | 'double' = 'single';\n @State() internalValue: number = 0;\n @State() percentage: number = 0;\n @State() internalMinValue: number = 0;\n @State() internalMaxValue: number = 100;\n @Event() ifxChange: EventEmitter;\n\n @Element() el;\n\n private inputRef: HTMLInputElement;\n private minInputRef: HTMLInputElement;\n private maxInputRef: HTMLInputElement;\n \n @Watch('value')\n valueChanged(newValue: number) {\n this.internalValue = newValue;\n this.updateValuePercent();\n }\n\n @Watch('minValueHandle')\n minValueChanged(newValue: number) {\n this.internalMinValue = newValue;\n this.updateValuePercent();\n }\n \n @Watch('maxValueHandle')\n maxValueChanged(newValue: number) {\n this.internalMaxValue = newValue;\n this.updateValuePercent();\n }\n\n getRangeSliderWrapper() {\n const rangeSliderWrapper = this.el.shadowRoot.querySelector('.range-slider__wrapper');\n return rangeSliderWrapper;\n }\n\n handleInputChangeOfRangeSlider(event: Event) {\n const target = event.target as HTMLInputElement;\n if(parseFloat(this.maxInputRef.value) - parseFloat(this.minInputRef.value) <= 0) {\n if(target.id === 'max-slider') {\n this.maxInputRef.value = this.minInputRef.value;\n }else{\n this.minInputRef.value = this.maxInputRef.value;\n }\n }\n if(target.id === 'max-slider') {\n this.internalMaxValue = parseFloat(this.maxInputRef.value);\n } else {\n this.internalMinValue = parseFloat(this.minInputRef.value);\n }\n this.ifxChange.emit({minVal: this.internalMinValue, maxVal: this.internalMaxValue});\n this.updateValuePercent();\n this.updateZIndexIfRangeSlider(target.id)\n }\n \n handleOnMouseLeaveOfRangeSlider(event: Event) {\n const target = event.target as HTMLInputElement;\n const sliderWrapper = this.getRangeSliderWrapper();\n if(target.id === 'max-slider') {\n sliderWrapper.insertBefore(this.maxInputRef, this.minInputRef);\n } else {\n sliderWrapper.insertBefore(this.minInputRef, this.maxInputRef);\n }\n }\n\n calculatePercentageValue() {\n const num = (this.internalValue - this.min) * 1.0;\n const den = this.max - this.min;\n this.percentage = +parseFloat(String((num/den)*100)).toFixed(2);\n }\n\n handleInputChange(event: Event) {\n const target = event.target as HTMLInputElement;\n this.internalValue = parseFloat(target.value);\n this.ifxChange.emit(this.internalValue);\n this.calculatePercentageValue();\n this.updateValuePercent();\n }\n\n private roundToValidStep(value: number) {\n const relativeValue = value - this.min;\n const remainder = relativeValue % this.step;\n if (remainder >= this.step / 2) {\n return this.min + relativeValue + (this.step - remainder);\n } else {\n return this.min + relativeValue - remainder;\n }\n }\n\n updateValuePercent() {\n const den = this.max - this.min;\n if(this.type === 'double'){\n if (this.minInputRef) {\n const num = (this.roundToValidStep(this.internalMinValue) - this.min) * 1.0;\n const minPercent = (num/den) * 100;\n this.minInputRef.parentElement.style.setProperty('--min-value-percent', `${minPercent}%`);\n }\n\n if (this.maxInputRef) {\n const num = (this.roundToValidStep(this.internalMaxValue) - this.min) * 1.0;\n const maxPercent = (num/den) * 100;\n this.maxInputRef.parentElement.style.setProperty('--max-value-percent', `${maxPercent}%`);\n }\n\n } else {\n\n if (this.inputRef) {\n const num = (this.roundToValidStep(this.internalValue) - this.min) * 1.0;\n const den = this.max - this.min;\n const percentage = (num/den) * 100;\n this.inputRef.style.setProperty('--value-percent', `${percentage}%`);\n }\n\n }\n } \n \n // Ensures that the last used slider thumb stays on top of the other thumb in order to handle correct overlapping \n // if min and max thumbs take the same value.\n updateZIndexIfRangeSlider(targetId: string = '') {\n if (targetId === 'max-slider') {\n this.minInputRef.style.zIndex = '1';\n this.maxInputRef.style.zIndex = '2';\n } else {\n this.minInputRef.style.zIndex = '2';\n this.maxInputRef.style.zIndex = '1';\n }\n }\n\n componentWillLoad() {\n if(this.value === undefined) {\n this.internalValue = (this.max-this.min) / 2;\n } else {\n this.internalValue = Math.max(this.min, Math.min(this.max, this.value));\n }\n\n this.calculatePercentageValue();\n\n if(this.minValueHandle !== undefined) this.internalMinValue = this.minValueHandle;\n else this.internalMinValue = this.min;\n if(this.maxValueHandle !== undefined) this.internalMaxValue = this.maxValueHandle;\n else this.internalMaxValue = this.max;\n }\n\n async componentDidLoad() {\n if(!isNestedInIfxComponent(this.el)) { \n const framework = detectFramework();\n trackComponent('ifx-slider', await framework)\n }\n this.updateValuePercent();\n }\n\n\n render() {\n return (\n <div class=\"ifx-slider\">\n {this.leftText && (\n <span class={`left-text`}>\n {this.leftText}\n </span>\n )}\n {this.leftIcon && (\n <ifx-icon icon={this.leftIcon} class={`left-icon${this.disabled ? ' disabled' : ''}`} />\n )}\n {\n (this.type !== 'double') ?\n <input\n type=\"range\"\n min={this.min}\n max={this.max}\n step={this.step}\n value={this.internalValue}\n disabled={this.disabled}\n ref={(el) => (this.inputRef = el as HTMLInputElement)}\n onInput={(event) => this.handleInputChange(event)}\n aria-label=\"Slider\"\n aria-valuemin={this.min}\n aria-valuemax={this.max}\n aria-valuenow={this.internalValue}\n aria-disabled={this.disabled ? \"true\" : \"false\"}\n /> \n :\n <div class = 'range-slider__wrapper' aria-label='Range slider' aria-value={this.value} aria-disabled={this.disabled} >\n <input \n id='min-slider'\n type='range'\n min={this.min}\n max={this.max}\n step={this.step}\n value={this.internalMinValue}\n disabled={this.disabled}\n role=\"group\"\n ref={(el) => (this.minInputRef = el as HTMLInputElement)}\n onInput={(event) => this.handleInputChangeOfRangeSlider(event)}\n onMouseUp={(event) => this.handleOnMouseLeaveOfRangeSlider(event)}\n aria-label=\"Minimum value slider\"\n aria-valuemin={this.min}\n aria-valuemax={this.max}\n aria-valuenow={this.internalMinValue}aria-disabled={this.disabled ? \"true\" : \"false\"}\n />\n <input \n id='max-slider'\n type='range'\n min={this.min}\n max={this.max}\n step={this.step}\n value={this.internalMaxValue}\n disabled={this.disabled}\n ref={(el) => (this.maxInputRef = el as HTMLInputElement)}\n onInput={(event) => this.handleInputChangeOfRangeSlider(event)}\n onMouseUp={(event) => this.handleOnMouseLeaveOfRangeSlider(event)}\n aria-label=\"Maximum value slider\"\n aria-valuemin={this.min}\n aria-valuemax={this.max}\n aria-valuenow={this.internalMaxValue}\n aria-disabled={this.disabled ? \"true\" : \"false\"}\n />\n </div>\n }\n {this.rightIcon && (\n <ifx-icon icon={this.rightIcon} class={`right-icon${this.disabled ? ' disabled' : ''}`} />\n )}\n {this.rightText && (\n <span class={`right-text${this.disabled ? ' disabled' : ''}`}>\n {this.rightText}\n </span>\n )}\n\n {this.showPercentage && (this.type !== \"double\") && (\n <span\n class={`percentage-display${this.disabled ? ' disabled' : ''}`}\n >\n {this.percentage}%\n </span>\n )}\n </div>\n );\n }\n}"],"version":3}
|
@@ -23,7 +23,7 @@ const Status = /*@__PURE__*/ proxyCustomElement(class Status extends H {
|
|
23
23
|
var _a;
|
24
24
|
const effectiveColor = ((_a = this.color) === null || _a === void 0 ? void 0 : _a.trim()) ? this.color : 'orange-500';
|
25
25
|
const containerClass = this.border ? `container border-${effectiveColor}` : 'container no-border';
|
26
|
-
return (h("div", { key: '
|
26
|
+
return (h("div", { key: 'ce8eb16a5afb1670e2002195eaf18eecc00f3d16', role: "status", "aria-live": "polite", "aria-label": "a status indicator", "aria-value": this.label, class: containerClass }, h("span", { key: '6c5abf72fc5391eab8f28a2375e0ff5373baeb3d', class: `dot ${effectiveColor}` }), h("p", { key: '34d2aec6f2c5f670952911cc3d25d41708f00dde', class: "text" }, this.label)));
|
27
27
|
}
|
28
28
|
get el() { return this; }
|
29
29
|
static get style() { return IfxStatusStyle0; }
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"ifx-status.js","mappings":";;;;AAAA,MAAM,SAAS,GAAG,i8FAAi8F,CAAC;AACp9F,wBAAe,SAAS;;MCUX,MAAM;IANnB;;;;QASU,WAAM,GAAY,KAAK,CAAC;QACxB,UAAK,GAAW,YAAY,CAAC;KAoBtC;IAlBC,MAAM,gBAAgB;QACpB,IAAG,CAAC,sBAAsB,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE;YACnC,MAAM,SAAS,GAAG,eAAe,EAAE,CAAC;YACpC,cAAc,CAAC,YAAY,EAAE,MAAM,SAAS,CAAC,CAAA;SAC9C;KACF;IAED,MAAM;;QACJ,MAAM,cAAc,GAAG,CAAA,MAAA,IAAI,CAAC,KAAK,0CAAE,IAAI,EAAE,IAAG,IAAI,CAAC,KAAK,GAAG,YAAY,CAAC;QACtE,MAAM,cAAc,GAAG,IAAI,CAAC,MAAM,GAAG,oBAAoB,cAAc,EAAE,GAAG,qBAAqB,CAAC;QAElG,QACE,
|
1
|
+
{"file":"ifx-status.js","mappings":";;;;AAAA,MAAM,SAAS,GAAG,i8FAAi8F,CAAC;AACp9F,wBAAe,SAAS;;MCUX,MAAM;IANnB;;;;QASU,WAAM,GAAY,KAAK,CAAC;QACxB,UAAK,GAAW,YAAY,CAAC;KAoBtC;IAlBC,MAAM,gBAAgB;QACpB,IAAG,CAAC,sBAAsB,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE;YACnC,MAAM,SAAS,GAAG,eAAe,EAAE,CAAC;YACpC,cAAc,CAAC,YAAY,EAAE,MAAM,SAAS,CAAC,CAAA;SAC9C;KACF;IAED,MAAM;;QACJ,MAAM,cAAc,GAAG,CAAA,MAAA,IAAI,CAAC,KAAK,0CAAE,IAAI,EAAE,IAAG,IAAI,CAAC,KAAK,GAAG,YAAY,CAAC;QACtE,MAAM,cAAc,GAAG,IAAI,CAAC,MAAM,GAAG,oBAAoB,cAAc,EAAE,GAAG,qBAAqB,CAAC;QAElG,QACE,4DAAK,IAAI,EAAC,QAAQ,eAAW,QAAQ,gBAAY,oBAAoB,gBAAa,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,cAAc,IACjH,6DAAM,KAAK,EAAE,OAAO,cAAc,EAAE,GAAS,EAC7C,0DAAG,KAAK,EAAC,MAAM,IAAE,IAAI,CAAC,KAAK,CAAK,CAC5B,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/status/status.scss?tag=ifx-status&encapsulation=shadow","src/components/status/status.tsx"],"sourcesContent":["@use \"~@infineon/design-system-tokens/dist/tokens\";\n@use \"../../global/font.scss\";\n\n:host {\n display: inline-block;\n}\n\n.container {\n display: flex;\n min-height: 1.25em;\n align-items: center;\n padding: 0 tokens.$ifxSpace100;\n border-radius: tokens.$ifxBorderRadiusRound;\n font-family: var(--ifx-font-family); // tokens.$ifxFontFamilyBody;\n\n\n\n &.no-border {\n padding: 0; // Remove padding when border is not present\n }\n\n &.border-engineering-100{\n border: tokens.$ifxBorderWidth12 solid tokens.$ifxColorEngineering100;\n }\n\n &.border-engineering-200{\n border: tokens.$ifxBorderWidth12 solid tokens.$ifxColorEngineering200;\n }\n\n &.border-engineering-300{\n border: tokens.$ifxBorderWidth12 solid tokens.$ifxColorEngineering300;\n }\n\n &.border-engineering-400{\n border: tokens.$ifxBorderWidth12 solid tokens.$ifxColorEngineering400;\n }\n\n &.border-engineering-500{\n border: tokens.$ifxBorderWidth12 solid tokens.$ifxColorEngineering500;\n }\n\n &.border-engineering-600{\n border: tokens.$ifxBorderWidth12 solid tokens.$ifxColorEngineering600;\n }\n\n &.border-ocean-100 {\n border: tokens.$ifxBorderWidth12 solid tokens.$ifxColorOcean100;\n }\n\n &.border-ocean-200 {\n border: tokens.$ifxBorderWidth12 solid tokens.$ifxColorOcean200;\n }\n\n &.border-ocean-300 {\n border: tokens.$ifxBorderWidth12 solid tokens.$ifxColorOcean300;\n }\n\n &.border-ocean-400 {\n border: tokens.$ifxBorderWidth12 solid tokens.$ifxColorOcean400;\n }\n\n &.border-ocean-500 {\n border: tokens.$ifxBorderWidth12 solid tokens.$ifxColorOcean500;\n }\n\n &.border-ocean-600 {\n border: tokens.$ifxBorderWidth12 solid tokens.$ifxColorOcean600;\n }\n\n &.border-ocean-700 {\n border: tokens.$ifxBorderWidth12 solid tokens.$ifxColorOcean700;\n }\n\n &.border-red-500 {\n border: tokens.$ifxBorderWidth12 solid tokens.$ifxColorRed500;\n }\n\n &.border-red-600 {\n border: tokens.$ifxBorderWidth12 solid tokens.$ifxColorRed600;\n }\n\n &.border-red-700 {\n border: tokens.$ifxBorderWidth12 solid tokens.$ifxColorRed700;\n }\n\n &.border-orange-500 {\n border: tokens.$ifxBorderWidth12 solid tokens.$ifxColorOrange500;\n }\n\n &.border-green-500 {\n border: tokens.$ifxBorderWidth12 solid tokens.$ifxColorGreen500;\n }\n\n &.border-lawn-400 {\n border: tokens.$ifxBorderWidth12 solid tokens.$ifxColorLawn400;\n }\n\n &.border-lawn-500 {\n border: tokens.$ifxBorderWidth12 solid tokens.$ifxColorLawn500;\n }\n\n &.border-lawn-700 {\n border: tokens.$ifxBorderWidth12 solid tokens.$ifxColorLawn700;\n }\n\n &.border-berry-400 {\n border: tokens.$ifxBorderWidth12 solid tokens.$ifxColorBerry400;\n }\n\n &.border-berry-500 {\n border: tokens.$ifxBorderWidth12 solid tokens.$ifxColorBerry500;\n }\n\n &.border-sun-400 {\n border: tokens.$ifxBorderWidth12 solid tokens.$ifxColorSun400;\n }\n\n &.border-sun-500 {\n border: tokens.$ifxBorderWidth12 solid tokens.$ifxColorSun500;\n }\n\n &.border-sand-400{\n border: tokens.$ifxBorderWidth12 solid tokens.$ifxColorSand400;\n }\n\n &.border-sand-500{\n border: tokens.$ifxBorderWidth12 solid tokens.$ifxColorSand500;\n }\n\n\n}\n\n.text {\n margin: 0;\n padding-left: tokens.$ifxSpace50;\n font-style: normal;\n font-weight: tokens.$ifxFontWeightSemibold;\n font-size: tokens.$ifxFontSizeM;\n line-height: tokens.$ifxLineHeightS;\n display: inline;\n color: tokens.$ifxColorBaseBlack;\n}\n\n.dot {\n display: inline-block;\n width: tokens.$ifxSize100;\n height: tokens.$ifxSize100;\n border-radius: tokens.$ifxBorderRadiusRound;\n}\n\n\n.dot {\n &.engineering-100 {\n background-color: tokens.$ifxColorEngineering100;\n }\n\n &.engineering-200 {\n background-color: tokens.$ifxColorEngineering200;\n }\n\n &.engineering-300 {\n background-color: tokens.$ifxColorEngineering300;\n }\n\n &.engineering-400 {\n background-color: tokens.$ifxColorEngineering400;\n }\n\n &.engineering-500 {\n background-color: tokens.$ifxColorEngineering500;\n }\n\n &.engineering-600 {\n background-color: tokens.$ifxColorEngineering600;\n }\n\n &.ocean-100 {\n background-color: tokens.$ifxColorOcean100;\n }\n\n &.ocean-200 {\n background-color: tokens.$ifxColorOcean200;\n }\n\n &.ocean-300 {\n background-color: tokens.$ifxColorOcean300;\n }\n\n &.ocean-400 {\n background-color: tokens.$ifxColorOcean400;\n }\n\n &.ocean-500 {\n background-color: tokens.$ifxColorOcean500;\n }\n\n &.ocean-600 {\n background-color: tokens.$ifxColorOcean600;\n }\n\n &.ocean-700 {\n background-color: tokens.$ifxColorOcean700;\n }\n\n &.red-500 {\n background-color: tokens.$ifxColorRed500;\n }\n\n &.red-600 {\n background-color: tokens.$ifxColorRed600;\n }\n\n &.red-700 {\n background-color: tokens.$ifxColorRed700;\n }\n\n &.orange-500 {\n background-color: tokens.$ifxColorOrange500;\n }\n\n &.green-500 {\n background-color: tokens.$ifxColorGreen500;\n }\n\n &.lawn-400{\n background-color: tokens.$ifxColorLawn400;\n }\n\n &.lawn-500{\n background-color: tokens.$ifxColorLawn500;\n }\n\n &.lawn-700 {\n background-color: tokens.$ifxColorLawn700;\n }\n\n &.berry-400 {\n background-color: tokens.$ifxColorBerry400;\n }\n\n &.berry-500 {\n background-color: tokens.$ifxColorBerry500;\n }\n\n &.sun-400 {\n background-color: tokens.$ifxColorSun400;\n }\n\n &.sun-500 {\n background-color: tokens.$ifxColorSun500;\n }\n\n &.sand-400{\n background-color: tokens.$ifxColorSand400;\n }\n\n &.sand-500{\n background-color: tokens.$ifxColorSand500;\n }\n}","import { Component, h, Prop, Element } from '@stencil/core';\nimport { trackComponent } from '../../global/utils/tracking'; \nimport { isNestedInIfxComponent } from '../../global/utils/dom-utils';\nimport { detectFramework } from '../../global/utils/framework-detection';\n\n@Component({\n tag: 'ifx-status',\n styleUrl: 'status.scss',\n shadow: true\n})\n\nexport class Status {\n @Element() el;\n @Prop() label: string;\n @Prop() border: boolean = false;\n @Prop() color: string = 'orange-500';\n\n async componentDidLoad() { \n if(!isNestedInIfxComponent(this.el)) { \n const framework = detectFramework();\n trackComponent('ifx-status', await framework)\n }\n }\n\n render() {\n const effectiveColor = this.color?.trim() ? this.color : 'orange-500';\n const containerClass = this.border ? `container border-${effectiveColor}` : 'container no-border';\n\n return (\n <div role=\"status\" aria-live=\"polite\" aria-label=\"a status indicator\" aria-value={this.label} class={containerClass}>\n <span class={`dot ${effectiveColor}`}></span>\n <p class=\"text\">{this.label}</p>\n </div>\n );\n }\n}"],"version":3}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { p as proxyCustomElement, H, h } from './p-f8e6a4ef.js';
|
2
2
|
import { d as defineCustomElement$2 } from './p-6ca4e3f8.js';
|
3
3
|
|
4
|
-
const stepCss = ":root{--ifx-font-family:\"Source Sans 3\", \"Arial, sans-serif\"}.step-wrapper{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;width:100%;gap:8px;font:400 1rem/1.5rem \"Source Sans 3\"}.step-wrapper.vertical{flex-direction:row;gap:12px;width:unset;height:100%}.step-wrapper.vertical .step-icon-wrapper{flex-direction:column;width:unset;height:100%}.step-wrapper.compact{gap:0;max-width:100%}.step-wrapper.compact .step-label{max-width:100%;cursor:auto;align-self:flex-start}.step-wrapper.compact.indicator-left{align-items:flex-end;text-align:right}.step-wrapper.compact.indicator-right{align-items:flex-start}.step-wrapper .step-label{max-width:90%;color:#8D8786;word-wrap:break-word}.step-wrapper .step-label.curr-label{font:600 1.25rem/1.75rem \"Source Sans 3\"}.step-wrapper .step-label.next-label{font:400 0.75rem/1rem \"Source Sans 3\"}.step-wrapper .step-label :hover{color:#8D8786}.step-wrapper.first-step .step-connector-l{height:0px}.step-wrapper.last-step .step-connector-r{height:0px}.step-wrapper.vertical.first-step .step-connector-l,.step-wrapper.vertical.last-step .step-connector-r{width:0px}.step-wrapper.complete .step-connector-l,.step-wrapper.complete .step-connector-r,.step-wrapper.complete .step-icon{background:#0A8276}.step-wrapper.complete .step-connector-l.active,.step-wrapper.complete .step-connector-l.error,.step-wrapper.complete .step-connector-r.active,.step-wrapper.complete .step-connector-r.error,.step-wrapper.complete .step-icon.active,.step-wrapper.complete .step-icon.error{background:#8D8786}.step-wrapper.complete:not(.disabled) .step-label{cursor:pointer;color:#1D1D1D}.step-wrapper.complete:not(.disabled) .step-label :hover{color:#08665C}.step-wrapper.disabled .step-connector-l,.step-wrapper.disabled .step-connector-r,.step-wrapper.disabled .step-icon{background-color:#8D8786}.step-wrapper.disabled .step-label,.step-wrapper.disabled .step-label :hover{color:#8D8786}.step-wrapper.active .step-connector-l,.step-wrapper.active .step-connector-r,.step-wrapper.active .step-icon{background:#0A8276}.step-wrapper.active .step-connector-l.active,.step-wrapper.active .step-connector-l.error,.step-wrapper.active .step-connector-r.active,.step-wrapper.active .step-connector-r.error,.step-wrapper.active .step-icon.active,.step-wrapper.active .step-icon.error{background:#8D8786}.step-wrapper.active .step-label,.step-wrapper.active .step-label :hover{color:#1D1D1D}.step-wrapper.active.complete .step-label{cursor:auto}.step-wrapper.clickable:not(.active) .step-label{cursor:pointer}.step-wrapper.error:not(.active){color:#CD002F}.step-wrapper.error:not(.active) .step-label{color:#CD002F}.step-wrapper.error:not(.active) .step-label :hover{color:#0A8276}.step-wrapper.disabled .step-label{cursor:auto}.step-wrapper:hover.complete:not(.disabled):not(.active) .step-connector-l,.step-wrapper:hover.complete:not(.disabled):not(.active) .step-connector-r,.step-wrapper:hover.complete:not(.disabled):not(.active) .step-icon{background:#08665C}.step-wrapper:hover.complete:not(.disabled):not(.active) .step-connector-l.active,.step-wrapper:hover.complete:not(.disabled):not(.active) .step-connector-l.error,.step-wrapper:hover.complete:not(.disabled):not(.active) .step-connector-r.active,.step-wrapper:hover.complete:not(.disabled):not(.active) .step-connector-r.error,.step-wrapper:hover.complete:not(.disabled):not(.active) .step-icon.active,.step-wrapper:hover.complete:not(.disabled):not(.active) .step-icon.error{background:#8D8786}.step-wrapper:hover.complete:not(.disabled):not(.active) .step-label{color:#08665C}.active-indic{width:16px;height:16px;border-radius:9999px;background:white}.step-icon-wrapper{display:flex;flex-direction:row;justify-content:center;align-items:center;width:100%}.step-icon{width:24px;height:24px;background-color:#8D8786;border-radius:9999px;display:flex;align-items:center;justify-content:center;color:white}.step-connector-r,.step-connector-l{height:2px;min-width:40px;flex-grow:1;background-color:#8D8786}.vertical .step-connector-r,.vertical .step-connector-l{height:unset;min-width:unset;width:2px;min-height:40px}";
|
4
|
+
const stepCss = ":root{--ifx-font-family:\"Source Sans 3\", \"Arial, sans-serif\"}.step-wrapper{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;width:100%;gap:8px;font:400 1rem/1.5rem \"Source Sans 3\"}.step-wrapper.vertical{flex-direction:row;gap:12px;width:unset;height:100%}.step-wrapper.vertical .step-icon-wrapper{flex-direction:column;width:unset;height:100%}.step-wrapper.compact{gap:0;max-width:100%}.step-wrapper.compact .step-label{max-width:100%;cursor:auto;align-self:flex-start}.step-wrapper.compact.indicator-left{align-items:flex-end;text-align:right}.step-wrapper.compact.indicator-right{align-items:flex-start}.step-wrapper .step-label{max-width:90%;color:#8D8786;word-wrap:break-word}.step-wrapper .step-label.curr-label{font:600 1.25rem/1.75rem \"Source Sans 3\"}.step-wrapper .step-label:focus{outline:2px solid #0A8276;outline-offset:2px}.step-wrapper .step-label.next-label{font:400 0.75rem/1rem \"Source Sans 3\"}.step-wrapper .step-label :hover{color:#8D8786}.step-wrapper.first-step .step-connector-l{height:0px}.step-wrapper.last-step .step-connector-r{height:0px}.step-wrapper.vertical.first-step .step-connector-l,.step-wrapper.vertical.last-step .step-connector-r{width:0px}.step-wrapper.complete .step-connector-l,.step-wrapper.complete .step-connector-r,.step-wrapper.complete .step-icon{background:#0A8276}.step-wrapper.complete .step-connector-l.active,.step-wrapper.complete .step-connector-l.error,.step-wrapper.complete .step-connector-r.active,.step-wrapper.complete .step-connector-r.error,.step-wrapper.complete .step-icon.active,.step-wrapper.complete .step-icon.error{background:#8D8786}.step-wrapper.complete:not(.disabled) .step-label{cursor:pointer;color:#1D1D1D}.step-wrapper.complete:not(.disabled) .step-label :hover{color:#08665C}.step-wrapper.disabled .step-connector-l,.step-wrapper.disabled .step-connector-r,.step-wrapper.disabled .step-icon{background-color:#8D8786}.step-wrapper.disabled .step-label,.step-wrapper.disabled .step-label :hover{color:#8D8786}.step-wrapper.active .step-connector-l,.step-wrapper.active .step-connector-r,.step-wrapper.active .step-icon{background:#0A8276}.step-wrapper.active .step-connector-l.active,.step-wrapper.active .step-connector-l.error,.step-wrapper.active .step-connector-r.active,.step-wrapper.active .step-connector-r.error,.step-wrapper.active .step-icon.active,.step-wrapper.active .step-icon.error{background:#8D8786}.step-wrapper.active .step-label,.step-wrapper.active .step-label :hover{color:#1D1D1D}.step-wrapper.active.complete .step-label{cursor:auto}.step-wrapper.clickable:not(.active) .step-label{cursor:pointer}.step-wrapper.error:not(.active){color:#CD002F}.step-wrapper.error:not(.active) .step-label{color:#CD002F}.step-wrapper.error:not(.active) .step-label :hover{color:#0A8276}.step-wrapper.disabled .step-label{cursor:auto}.step-wrapper:hover.complete:not(.disabled):not(.active) .step-connector-l,.step-wrapper:hover.complete:not(.disabled):not(.active) .step-connector-r,.step-wrapper:hover.complete:not(.disabled):not(.active) .step-icon{background:#08665C}.step-wrapper:hover.complete:not(.disabled):not(.active) .step-connector-l.active,.step-wrapper:hover.complete:not(.disabled):not(.active) .step-connector-l.error,.step-wrapper:hover.complete:not(.disabled):not(.active) .step-connector-r.active,.step-wrapper:hover.complete:not(.disabled):not(.active) .step-connector-r.error,.step-wrapper:hover.complete:not(.disabled):not(.active) .step-icon.active,.step-wrapper:hover.complete:not(.disabled):not(.active) .step-icon.error{background:#8D8786}.step-wrapper:hover.complete:not(.disabled):not(.active) .step-label{color:#08665C}.active-indic{width:16px;height:16px;border-radius:9999px;background:white}.step-icon-wrapper{display:flex;flex-direction:row;justify-content:center;align-items:center;width:100%}.step-icon{width:24px;height:24px;background-color:#8D8786;border-radius:9999px;display:flex;align-items:center;justify-content:center;color:white}.step-connector-r,.step-connector-l{height:2px;min-width:40px;flex-grow:1;background-color:#8D8786}.vertical .step-connector-r,.vertical .step-connector-l{height:unset;min-width:unset;width:2px;min-height:40px}";
|
5
5
|
const IfxStepStyle0 = stepCss;
|
6
6
|
|
7
7
|
const Step = /*@__PURE__*/ proxyCustomElement(class Step extends H {
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"ifx-step.js","mappings":";;;AAAA,MAAM,OAAO,GAAG,oiIAAoiI,CAAC;AACrjI,sBAAe,OAAO;;MCaT,IAAI;IANjB;;;;QAOY,aAAQ,GAAa,KAAK,CAAC;QAC3B,aAAQ,GAAa,KAA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AY,CAAC,OAAO,KAAK,SAAS,IAAK,CAAC,IAAI,CAAC,MAAM,GAAI,QAAQ,GAAG,EAAE,EACzE,IAAI,CAAC,YAAY,CAAC,OAAO,KAAK,SAAS,IAAI,8DAAO,CACjD,CAGR,EACR;KACL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/stepper/step/step.scss?tag=ifx-step&encapsulation=shadow","src/components/stepper/step/step.tsx"],"sourcesContent":["@use \"~@infineon/design-system-tokens/dist/tokens\";\n@use \"../../../global/font.scss\";\n\n.step-wrapper {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: flex-start;\n width: 100%;\n gap: tokens.$ifxSize100;\n font: tokens.$ifxBodyBody03;\n\n &.vertical {\n flex-direction: row;\n gap: tokens.$ifxSize150;\n width: unset;\n height: 100%;\n \n .step-icon-wrapper {\n flex-direction: column;\n width: unset;\n height: 100%;\n }\n }\n \n &.compact {\n gap: 0;\n max-width: 100%;\n .step-label{\n max-width: 100%;\n cursor: auto;\n align-self: flex-start;\n }\n \n &.indicator-left {\n align-items: flex-end;\n text-align: right;\n }\n \n &.indicator-right {\n align-items: flex-start;\n }\n }\n\n .step-label {\n max-width: 90%;\n color: tokens.$ifxColorEngineering400; \n word-wrap: break-word;\n &.curr-label{\n font: tokens.$ifxHeadingHeadingCompact04; \n }\n &.next-label{\n font: tokens.$ifxBodyBody05;\n }\n :hover{\n color: tokens.$ifxColorEngineering400;\n }\n }\n\n \n &.first-step {\n .step-connector-l{\n height: 0px;\n }\n }\n \n &.last-step{\n .step-connector-r{\n height: 0px;\n }\n }\n\n &.vertical {\n &.first-step .step-connector-l,\n &.last-step .step-connector-r {\n width: 0px;\n }\n }\n\n &.complete{\n .step-connector-l, .step-connector-r, .step-icon {\n background: tokens.$ifxColorOcean500;\n &.active, &.error {\n background: tokens.$ifxColorEngineering400;\n }\n }\n &:not(.disabled) {\n .step-label{\n cursor: pointer;\n color: tokens.$ifxColorBaseBlack;\n :hover {\n color: tokens.$ifxColorOcean600;\n }\n }\n }\n } \n \n &.disabled{\n .step-connector-l, \n .step-connector-r, \n .step-icon {\n background-color: tokens.$ifxColorEngineering400;\n }\n .step-label, \n .step-label :hover{\n color: tokens.$ifxColorEngineering400;\n }\n }\n \n &.active{\n .step-connector-l, \n .step-connector-r, \n .step-icon {\n background: tokens.$ifxColorOcean500;\n &.active, \n &.error {\n background: tokens.$ifxColorEngineering400;\n }\n }\n .step-label, \n .step-label :hover{\n color: tokens.$ifxColorBaseBlack;\n }\n &.complete .step-label { \n cursor: auto;\n }\n } \n\n &.clickable:not(.active) .step-label{\n cursor: pointer;\n }\n\n &.error:not(.active){\n color: tokens.$ifxColorRed500;\n .step-label{\n color: tokens.$ifxColorRed500;\n :hover{\n color: tokens.$ifxColorOcean500;\n }\n }\n }\n\n &.disabled{\n .step-label{\n cursor: auto;\n }\n }\n\n &:hover{\n &.complete:not(.disabled):not(.active){\n .step-connector-l, \n .step-connector-r, \n .step-icon {\n background: tokens.$ifxColorOcean600;\n &.active, \n &.error {\n background: tokens.$ifxColorEngineering400;\n }\n } \n .step-label {\n color: tokens.$ifxColorOcean600;\n }\n }\n }\n \n}\n\n.active-indic {\n width: tokens.$ifxSize200;\n height: tokens.$ifxSize200;\n border-radius: tokens.$ifxBorderRadiusRound;\n background: white;\n}\n\n.step-icon-wrapper {\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n width: 100%;\n}\n\n.step-icon {\n width: tokens.$ifxSize300;\n height: tokens.$ifxSize300;\n background-color: tokens.$ifxColorEngineering400;\n border-radius: tokens.$ifxBorderRadiusRound;\n display: flex;\n align-items: center;\n justify-content: center;\n color: white;\n}\n\n.step-connector-r, \n.step-connector-l {\n height: 2px;\n min-width: tokens.$ifxSize500;\n flex-grow: 1;\n background-color: tokens.$ifxColorEngineering400;\n}\n\n.vertical {\n .step-connector-r, \n .step-connector-l {\n height: unset;\n min-width: unset;\n width: 2px;\n min-height: tokens.$ifxSize500;\n }\n}","import { h, \n Component, \n Listen, \n Prop, \n State, \n Watch } from \"@stencil/core\";\nimport { StepperState } from \"../interfaces\";\n\n@Component({\n tag: 'ifx-step',\n styleUrl: 'step.scss',\n shadow: true\n})\n\nexport class Step {\n @Prop() complete?: boolean = false;\n @Prop() disabled?: boolean = false;\n @Prop({ mutable: true }) error?: boolean = false;\n @Prop({ reflect: false }) lastStep: boolean = false;\n @Prop() stepId: number = 1;\n @Prop({ reflect: false }) stepperState: StepperState = { activeStep: 1, \n showStepNumber: false, \n variant: 'default', \n indicatorPosition: 'left' };\n\n @State() active: boolean;\n @State() clickable: boolean = false;\n\n @Listen('ifxChange', { target: 'document' })\n onStepChange(event: CustomEvent) {\n const previousActiveStep = event.detail.previousActiveStep;\n if (previousActiveStep === this.stepId && this.error) {\n this.clickable = true;\n }\n } \n\n @Watch('stepperState')\n updateCurrentStep(newStepperState) {\n this.active = (newStepperState.activeStep === this.stepId)\n }\n\n @Watch('active')\n updateErrorState(){\n if (this.active) {\n this.error = false;\n }\n }\n\n\n handleStepClick() {\n if (!this.disabled && this.stepperState.variant !== 'compact' && (this.clickable || this.complete)) {\n this.stepperState.setActiveStep(this.stepId, true)\n } \n }\n \n handleStepKeyDown(event: KeyboardEvent) {\n if (!this.disabled && this.stepperState.variant !== 'compact' && (this.clickable || this.complete) && event.key === 'Enter') {\n this.stepperState.setActiveStep(this.stepId, true)\n } \n }\n \n stopOnClickPropogation(event: Event) {\n if (this.disabled) {\n event.stopPropagation();\n }\n }\n\n render() {\n return (\n <div aria-current = {this.active ? 'step': false}\n aria-disabled = {this.active || this.complete ? false : true}\n onClick={ (e) => this.stopOnClickPropogation(e) }\n class = {`step-wrapper ${this.stepId === 1 ? 'first-step': ''} \n ${this.error ? 'error': ''}\n ${this.stepperState.variant}\n ${this.complete ? 'complete': ''}\n ${this.lastStep ? 'last-step': ''}\n indicator-${this.stepperState.indicatorPosition}\n ${this.active ? 'active' : ''}\n ${this.clickable ? 'clickable' : ''}\n ${this.disabled ? 'disabled': ''}`}>\n\n <div class = 'step-icon-wrapper'>\n {/* Left connector */}\n {this.stepperState.variant !== 'compact' && <span class = 'step-connector-l'/>}\n\n {\n (this.stepperState.variant !== 'compact' && (!this.error || (this.error && this.active))) && \n <div class = 'step-icon'>\n {(this.stepperState.showStepNumber && !this.complete && !this.active) ? this.stepId : ''}\n {(this.complete && !this.active) && <ifx-icon icon='check16'></ifx-icon>}\n {this.active && <span class = 'active-indic'></span>}\n </div>\n }\n\n {(this.stepperState.variant !=='compact' && this.error && !this.active) && <ifx-icon icon='warningF16'></ifx-icon>}\n \n {/* Right connector */}\n {this.stepperState.variant !== 'compact' && <span class = {`step-connector-r ${this.active ? 'active' : ''}`}/>}\n </div>\n\n {\n /* Step labels */\n (this.stepperState.variant !== 'compact' || (this.stepperState.variant === 'compact' && (this.active || this.stepId === this.stepperState.activeStep+1))) && \n <div tabIndex={!this.disabled && this.complete && !this.active ? 0 : -1} \n class = {`step-label ${this.stepperState.variant === 'compact' ? (this.active ? 'curr-label' : 'next-label') : ''}`} \n onClick={() => { this.handleStepClick() }} \n onKeyDown={(e) => { this.handleStepKeyDown(e) }}>\n\n {(this.stepperState.variant !== 'compact') && <slot/>}\n\n {this.stepperState.variant === 'compact' && !this.active ? 'Next: ' : ''}\n {this.stepperState.variant === 'compact' && <slot/>}\n </div>\n }\n\n </div>\n );\n };\n}\n"],"version":3}
|
1
|
+
{"file":"ifx-step.js","mappings":";;;AAAA,MAAM,OAAO,GAAG,inIAAinI,CAAC;AACloI,sBAAe,OAAO;;MCaT,IAAI;IANjB;;;;QAOY,aAAQ,GAAa,KAAK,CAAC;QAC3B,aAAQ,GAAa,KAAK,CAAC;QACV,UAAK,GAAa,KAAK,CAAC;QACvB,aAAQ,GAAY,KAAK,CAAC;QAC5C,WAAM,GAAW,CAAC,CAAC;QACD,iBAAY,GAAiB,EAAE,UAAU,EAAE,CAAC;YACb,cAAc,EAAE,KAAK;YACrB,OAAO,EAAE,SAAS;YACl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;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/stepper/step/step.scss?tag=ifx-step&encapsulation=shadow","src/components/stepper/step/step.tsx"],"sourcesContent":["@use \"~@infineon/design-system-tokens/dist/tokens\";\n@use \"../../../global/font.scss\";\n\n.step-wrapper {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: flex-start;\n width: 100%;\n gap: tokens.$ifxSize100;\n font: tokens.$ifxBodyBody03;\n\n\n &.vertical {\n flex-direction: row;\n gap: tokens.$ifxSize150;\n width: unset;\n height: 100%;\n \n .step-icon-wrapper {\n flex-direction: column;\n width: unset;\n height: 100%;\n }\n }\n \n &.compact {\n gap: 0;\n max-width: 100%;\n .step-label{\n max-width: 100%;\n cursor: auto;\n align-self: flex-start;\n }\n \n &.indicator-left {\n align-items: flex-end;\n text-align: right;\n }\n \n &.indicator-right {\n align-items: flex-start;\n }\n }\n\n .step-label {\n max-width: 90%;\n color: tokens.$ifxColorEngineering400; \n word-wrap: break-word;\n &.curr-label{\n font: tokens.$ifxHeadingHeadingCompact04; \n }\n &:focus {\n outline: 2px solid tokens.$ifxColorOcean500; \n outline-offset: 2px;\n }\n &.next-label{\n font: tokens.$ifxBodyBody05;\n }\n :hover{\n color: tokens.$ifxColorEngineering400;\n }\n }\n\n \n &.first-step {\n .step-connector-l{\n height: 0px;\n }\n }\n \n &.last-step{\n .step-connector-r{\n height: 0px;\n }\n }\n\n &.vertical {\n &.first-step .step-connector-l,\n &.last-step .step-connector-r {\n width: 0px;\n }\n }\n\n &.complete{\n .step-connector-l, .step-connector-r, .step-icon {\n background: tokens.$ifxColorOcean500;\n &.active, &.error {\n background: tokens.$ifxColorEngineering400;\n }\n }\n &:not(.disabled) {\n .step-label{\n cursor: pointer;\n color: tokens.$ifxColorBaseBlack;\n :hover {\n color: tokens.$ifxColorOcean600;\n }\n }\n }\n } \n \n &.disabled{\n .step-connector-l, \n .step-connector-r, \n .step-icon {\n background-color: tokens.$ifxColorEngineering400;\n }\n .step-label, \n .step-label :hover{\n color: tokens.$ifxColorEngineering400;\n }\n }\n \n &.active{\n .step-connector-l, \n .step-connector-r, \n .step-icon {\n background: tokens.$ifxColorOcean500;\n &.active, \n &.error {\n background: tokens.$ifxColorEngineering400;\n }\n }\n .step-label, \n .step-label :hover{\n color: tokens.$ifxColorBaseBlack;\n }\n &.complete .step-label { \n cursor: auto;\n }\n \n } \n\n &.clickable:not(.active) .step-label{\n cursor: pointer;\n }\n\n &.error:not(.active){\n color: tokens.$ifxColorRed500;\n .step-label{\n color: tokens.$ifxColorRed500;\n :hover{\n color: tokens.$ifxColorOcean500;\n }\n }\n }\n\n &.disabled{\n .step-label{\n cursor: auto;\n }\n }\n\n &:hover{\n &.complete:not(.disabled):not(.active){\n .step-connector-l, \n .step-connector-r, \n .step-icon {\n background: tokens.$ifxColorOcean600;\n &.active, \n &.error {\n background: tokens.$ifxColorEngineering400;\n }\n } \n .step-label {\n color: tokens.$ifxColorOcean600;\n }\n }\n }\n \n}\n\n.active-indic {\n width: tokens.$ifxSize200;\n height: tokens.$ifxSize200;\n border-radius: tokens.$ifxBorderRadiusRound;\n background: white;\n}\n\n.step-icon-wrapper {\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n width: 100%;\n}\n\n.step-icon {\n width: tokens.$ifxSize300;\n height: tokens.$ifxSize300;\n background-color: tokens.$ifxColorEngineering400;\n border-radius: tokens.$ifxBorderRadiusRound;\n display: flex;\n align-items: center;\n justify-content: center;\n color: white;\n}\n\n.step-connector-r, \n.step-connector-l {\n height: 2px;\n min-width: tokens.$ifxSize500;\n flex-grow: 1;\n background-color: tokens.$ifxColorEngineering400;\n}\n\n.vertical {\n .step-connector-r, \n .step-connector-l {\n height: unset;\n min-width: unset;\n width: 2px;\n min-height: tokens.$ifxSize500;\n }\n}","import { h, \n Component, \n Listen, \n Prop, \n State, \n Watch } from \"@stencil/core\";\nimport { StepperState } from \"../interfaces\";\n\n@Component({\n tag: 'ifx-step',\n styleUrl: 'step.scss',\n shadow: true\n})\n\nexport class Step {\n @Prop() complete?: boolean = false;\n @Prop() disabled?: boolean = false;\n @Prop({ mutable: true }) error?: boolean = false;\n @Prop({ reflect: false }) lastStep: boolean = false;\n @Prop() stepId: number = 1;\n @Prop({ reflect: false }) stepperState: StepperState = { activeStep: 1, \n showStepNumber: false, \n variant: 'default', \n indicatorPosition: 'left' };\n\n @State() active: boolean;\n @State() clickable: boolean = false;\n\n @Listen('ifxChange', { target: 'document' })\n onStepChange(event: CustomEvent) {\n const previousActiveStep = event.detail.previousActiveStep;\n if (previousActiveStep === this.stepId && this.error) {\n this.clickable = true;\n }\n } \n\n @Watch('stepperState')\n updateCurrentStep(newStepperState) {\n this.active = (newStepperState.activeStep === this.stepId)\n }\n\n @Watch('active')\n updateErrorState(){\n if (this.active) {\n this.error = false;\n }\n }\n\n\n handleStepClick() {\n if (!this.disabled && this.stepperState.variant !== 'compact' && (this.clickable || this.complete)) {\n this.stepperState.setActiveStep(this.stepId, true)\n } \n }\n \n handleStepKeyDown(event: KeyboardEvent) {\n if (!this.disabled && this.stepperState.variant !== 'compact' && (this.clickable || this.complete) && event.key === 'Enter') {\n this.stepperState.setActiveStep(this.stepId, true)\n } \n }\n \n stopOnClickPropogation(event: Event) {\n if (this.disabled) {\n event.stopPropagation();\n }\n }\n\n render() {\n return (\n <div aria-current = {this.active ? 'step': false}\n aria-disabled = {this.active || this.complete ? false : true}\n onClick={ (e) => this.stopOnClickPropogation(e) }\n class = {`step-wrapper ${this.stepId === 1 ? 'first-step': ''} \n ${this.error ? 'error': ''}\n ${this.stepperState.variant}\n ${this.complete ? 'complete': ''}\n ${this.lastStep ? 'last-step': ''}\n indicator-${this.stepperState.indicatorPosition}\n ${this.active ? 'active' : ''}\n ${this.clickable ? 'clickable' : ''}\n ${this.disabled ? 'disabled': ''}`}>\n\n <div class = 'step-icon-wrapper'>\n {/* Left connector */}\n {this.stepperState.variant !== 'compact' && <span class = 'step-connector-l'/>}\n\n {\n (this.stepperState.variant !== 'compact' && (!this.error || (this.error && this.active))) && \n <div class = 'step-icon'>\n {(this.stepperState.showStepNumber && !this.complete && !this.active) ? this.stepId : ''}\n {(this.complete && !this.active) && <ifx-icon icon='check16'></ifx-icon>}\n {this.active && <span class = 'active-indic'></span>}\n </div>\n }\n\n {(this.stepperState.variant !=='compact' && this.error && !this.active) && <ifx-icon icon='warningF16'></ifx-icon>}\n \n {/* Right connector */}\n {this.stepperState.variant !== 'compact' && <span class = {`step-connector-r ${this.active ? 'active' : ''}`}/>}\n </div>\n\n {\n /* Step labels */\n (this.stepperState.variant !== 'compact' || (this.stepperState.variant === 'compact' && (this.active || this.stepId === this.stepperState.activeStep+1))) && \n <div tabIndex={!this.disabled && this.complete && !this.active ? 0 : -1} \n class = {`step-label ${this.stepperState.variant === 'compact' ? (this.active ? 'curr-label' : 'next-label') : ''}`} \n onClick={() => { this.handleStepClick() }} \n onKeyDown={(e) => { this.handleStepKeyDown(e) }}>\n\n {(this.stepperState.variant !== 'compact') && <slot/>}\n\n {this.stepperState.variant === 'compact' && !this.active ? 'Next: ' : ''}\n {this.stepperState.variant === 'compact' && <slot/>}\n </div>\n }\n\n </div>\n );\n };\n}\n"],"version":3}
|