@baloise/ds-core 16.5.1 → 16.5.2
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/components/bal-dropdown.js +1 -709
- package/components/bal-dropdown2.js +711 -0
- package/components/bal-field.js +1 -1
- package/components/bal-footer.js +19 -36
- package/components/bal-input-stepper.js +1 -1
- package/components/bal-number-input.js +1 -1
- package/components/bal-option.js +1 -166
- package/components/bal-option2.js +168 -0
- package/components/bal-segment-item.js +1 -3
- package/components/bal-segment.js +1 -1
- package/components/bal-select2.js +1 -1
- package/components/index.esm.js +1 -1
- package/components/index.js +1 -1
- package/components/tokens.esm.js +1 -1
- package/dist/baloise-design-system/baloise-design-system.esm.js +1 -1
- package/dist/baloise-design-system/index.esm.js +1 -1
- package/dist/baloise-design-system/{p-60a6af04.system.js → p-0159015a.system.js} +1 -1
- package/dist/baloise-design-system/{p-e829652c7a.entry.js → p-091501deda.entry.js} +1 -1
- package/dist/baloise-design-system/{p-d94b2cb869.system.entry.js → p-09356ff71d.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-0f611b4158.system.entry.js +1 -0
- package/dist/baloise-design-system/p-1509eaa7.system.js +1 -1
- package/dist/baloise-design-system/{p-e2316d2aea.system.entry.js → p-17d7090151.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-0db6b19e.js → p-18fd198d.js} +1 -1
- package/dist/baloise-design-system/{p-c716d30de1.entry.js → p-1c482e78f9.entry.js} +1 -1
- package/dist/baloise-design-system/{p-e227dcfaa1.system.entry.js → p-29fd381412.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-27bc71c322.entry.js → p-2d27ba7364.entry.js} +1 -1
- package/dist/baloise-design-system/{p-d9f2d48be1.entry.js → p-4521c9fe51.entry.js} +1 -1
- package/dist/baloise-design-system/{p-f3bb565972.system.entry.js → p-4c5ff3ff4d.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-4d6b2b921e.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-cfa901cb.js → p-4f93ac4c.js} +1 -1
- package/dist/baloise-design-system/{p-449ffc7a7e.entry.js → p-50b18f1f90.entry.js} +1 -1
- package/dist/baloise-design-system/{p-910b2f3d.system.js → p-54e7b850.system.js} +1 -1
- package/dist/baloise-design-system/p-54f81c32.js +1 -1
- package/dist/baloise-design-system/{p-590da25b.system.js → p-565102df.system.js} +1 -1
- package/dist/baloise-design-system/{p-784c10d48f.entry.js → p-63e42239c4.entry.js} +1 -1
- package/dist/baloise-design-system/{p-b4941441f4.system.entry.js → p-6af7f275bd.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-7873fe20d4.entry.js +1 -0
- package/dist/baloise-design-system/{p-a7de2305e0.system.entry.js → p-7d9523a50b.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-16b50b08e4.entry.js → p-8152631cd8.entry.js} +1 -1
- package/dist/baloise-design-system/{p-3180888825.entry.js → p-85007714f1.entry.js} +1 -1
- package/dist/baloise-design-system/{p-52a4a89073.system.entry.js → p-8b3d1b6c65.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-e8cab53413.entry.js → p-8b7837e749.entry.js} +1 -1
- package/dist/baloise-design-system/{p-342b27632b.entry.js → p-8c982fbdba.entry.js} +1 -1
- package/dist/baloise-design-system/p-8da6d9dae1.entry.js +1 -0
- package/dist/baloise-design-system/{p-aed4d3ac0f.system.entry.js → p-8f85de0594.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-15a85377.js → p-92084992.js} +1 -1
- package/dist/baloise-design-system/{p-2e8508812d.system.entry.js → p-950dd794aa.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-08b0e345a2.entry.js → p-98bb021545.entry.js} +1 -1
- package/dist/baloise-design-system/{p-5de0bd8a.system.js → p-9b9660ff.system.js} +1 -1
- package/dist/baloise-design-system/{p-fcfee1c692.entry.js → p-a79d0901e9.entry.js} +1 -1
- package/dist/baloise-design-system/{p-8613444e15.system.entry.js → p-ae48180076.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-80e59744a7.entry.js → p-b53b401a5a.entry.js} +1 -1
- package/dist/baloise-design-system/{p-efe5a8806d.system.entry.js → p-bb7de7bbee.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-bcca1ed3.system.js +1 -1
- package/dist/baloise-design-system/{p-e45eb6121d.system.entry.js → p-e088800e47.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-34671b9410.entry.js → p-f81abc1e5e.entry.js} +1 -1
- package/dist/baloise-design-system/{p-dd162dc12e.system.entry.js → p-fbc7eb7481.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-d8a71bc5b4.system.entry.js → p-ff40f6ac1e.system.entry.js} +1 -1
- package/dist/cjs/bal-carousel_2.cjs.entry.js +3 -3
- package/dist/cjs/bal-datepicker.cjs.entry.js +3 -3
- package/dist/cjs/bal-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/bal-field_5.cjs.entry.js +1 -1
- package/dist/cjs/bal-footer.cjs.entry.js +5 -4
- package/dist/cjs/bal-hint_5.cjs.entry.js +3 -3
- package/dist/cjs/bal-list_8.cjs.entry.js +3 -3
- package/dist/cjs/bal-logo.cjs.entry.js +3 -3
- package/dist/cjs/bal-nav_8.cjs.entry.js +3 -3
- package/dist/cjs/bal-navbar_5.cjs.entry.js +3 -3
- package/dist/cjs/bal-pagination.cjs.entry.js +3 -3
- package/dist/cjs/bal-progress-bar.cjs.entry.js +4 -4
- package/dist/cjs/bal-segment_2.cjs.entry.js +6 -8
- package/dist/cjs/bal-shape.cjs.entry.js +1 -1
- package/dist/cjs/bal-steps.cjs.entry.js +3 -3
- package/dist/cjs/bal-tab-item_2.cjs.entry.js +3 -3
- package/dist/cjs/baloise-design-system.cjs.js +1 -1
- package/dist/cjs/{breakpoints.decorator-f4da1834.js → breakpoints.decorator-9356577d.js} +1 -1
- package/dist/cjs/{breakpoints.subject-6fc372a8.js → breakpoints.subject-c2e9ac3e.js} +1 -1
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/initialize-2a19d091.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{tokens.esm-cd3fab6c.js → tokens.esm-615d9347.js} +1 -1
- package/dist/cjs/{window-resize.decorator-67e1f4de.js → window-resize.decorator-c6dcf1a0.js} +1 -1
- package/dist/collection/components/bal-dropdown/bal-dropdown.css +1 -1
- package/dist/collection/components/bal-field/bal-field.js +1 -1
- package/dist/collection/components/bal-footer/bal-footer.css +1 -1
- package/dist/collection/components/bal-footer/bal-footer.js +3 -2
- package/dist/collection/components/bal-segment/bal-segment-item/bal-segment-item.js +1 -3
- package/dist/collection/components/bal-segment/bal-segment.js +4 -4
- package/dist/collection/utils/constants/version.constant.js +1 -1
- package/dist/esm/bal-carousel_2.entry.js +3 -3
- package/dist/esm/bal-datepicker.entry.js +3 -3
- package/dist/esm/bal-dropdown.entry.js +1 -1
- package/dist/esm/bal-field_5.entry.js +1 -1
- package/dist/esm/bal-footer.entry.js +5 -4
- package/dist/esm/bal-hint_5.entry.js +3 -3
- package/dist/esm/bal-list_8.entry.js +3 -3
- package/dist/esm/bal-logo.entry.js +3 -3
- package/dist/esm/bal-nav_8.entry.js +3 -3
- package/dist/esm/bal-navbar_5.entry.js +3 -3
- package/dist/esm/bal-pagination.entry.js +3 -3
- package/dist/esm/bal-progress-bar.entry.js +4 -4
- package/dist/esm/bal-segment_2.entry.js +6 -8
- package/dist/esm/bal-shape.entry.js +1 -1
- package/dist/esm/bal-steps.entry.js +3 -3
- package/dist/esm/bal-tab-item_2.entry.js +3 -3
- package/dist/esm/baloise-design-system.js +1 -1
- package/dist/esm/{breakpoints.decorator-8a50482f.js → breakpoints.decorator-c78a656a.js} +1 -1
- package/dist/esm/{breakpoints.subject-e3538fe7.js → breakpoints.subject-aee81353.js} +1 -1
- package/dist/esm/index.js +3 -3
- package/dist/esm/initialize-e216cfe4.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{tokens.esm-7cf87670.js → tokens.esm-6e01fd26.js} +1 -1
- package/dist/esm/{window-resize.decorator-9c08027e.js → window-resize.decorator-bcb73df5.js} +1 -1
- package/dist/esm-es5/bal-carousel_2.entry.js +1 -1
- package/dist/esm-es5/bal-datepicker.entry.js +1 -1
- package/dist/esm-es5/bal-dropdown.entry.js +1 -1
- package/dist/esm-es5/bal-field_5.entry.js +1 -1
- package/dist/esm-es5/bal-footer.entry.js +1 -1
- package/dist/esm-es5/bal-hint_5.entry.js +1 -1
- package/dist/esm-es5/bal-list_8.entry.js +1 -1
- package/dist/esm-es5/bal-logo.entry.js +1 -1
- package/dist/esm-es5/bal-nav_8.entry.js +1 -1
- package/dist/esm-es5/bal-navbar_5.entry.js +1 -1
- package/dist/esm-es5/bal-pagination.entry.js +1 -1
- package/dist/esm-es5/bal-progress-bar.entry.js +1 -1
- package/dist/esm-es5/bal-segment_2.entry.js +1 -1
- package/dist/esm-es5/bal-shape.entry.js +1 -1
- package/dist/esm-es5/bal-steps.entry.js +1 -1
- package/dist/esm-es5/bal-tab-item_2.entry.js +1 -1
- package/dist/esm-es5/baloise-design-system.js +1 -1
- package/dist/esm-es5/{breakpoints.decorator-8a50482f.js → breakpoints.decorator-c78a656a.js} +1 -1
- package/dist/esm-es5/{breakpoints.subject-e3538fe7.js → breakpoints.subject-aee81353.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/initialize-e216cfe4.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{window-resize.decorator-9c08027e.js → window-resize.decorator-bcb73df5.js} +1 -1
- package/dist/types/components/bal-segment/bal-segment.interfaces.d.ts +1 -1
- package/package.json +7 -7
- package/dist/baloise-design-system/p-2e498736fc.system.entry.js +0 -1
- package/dist/baloise-design-system/p-b60576a064.entry.js +0 -1
- package/dist/baloise-design-system/p-c00e0f64c8.entry.js +0 -1
- package/dist/baloise-design-system/p-ec044ce124.system.entry.js +0 -1
- /package/dist/baloise-design-system/{p-9ffefe27.system.js → p-29937768.system.js} +0 -0
- /package/dist/baloise-design-system/{p-46bed129.js → p-941f70cf.js} +0 -0
- /package/dist/esm-es5/{tokens.esm-7cf87670.js → tokens.esm-6e01fd26.js} +0 -0
package/components/bal-field.js
CHANGED
|
@@ -119,8 +119,8 @@ const Field = /*@__PURE__*/ proxyCustomElement(class Field extends HTMLElement {
|
|
|
119
119
|
'bal-field-control bal-dropdown',
|
|
120
120
|
'bal-field-control bal-checkbox',
|
|
121
121
|
'bal-field-control bal-radio',
|
|
122
|
-
'bal-field-control bal-segment-item',
|
|
123
122
|
'bal-field-control bal-segment',
|
|
123
|
+
'bal-field-control bal-segment-item',
|
|
124
124
|
'bal-field-control bal-checkbox-group',
|
|
125
125
|
'bal-field-control bal-radio-group',
|
|
126
126
|
'bal-field-control bal-number-input',
|
package/components/bal-footer.js
CHANGED
|
@@ -5,21 +5,18 @@ import { B as BEM } from './bem.js';
|
|
|
5
5
|
import { L as Logger } from './log.js';
|
|
6
6
|
import { k as rIC } from './helpers.js';
|
|
7
7
|
import { s as stopEventBubbling } from './form-input.js';
|
|
8
|
-
import { d as defineCustomElement$
|
|
9
|
-
import { d as defineCustomElement$
|
|
10
|
-
import { d as defineCustomElement$
|
|
11
|
-
import { d as defineCustomElement$
|
|
12
|
-
import { d as defineCustomElement$
|
|
13
|
-
import { d as defineCustomElement$
|
|
14
|
-
import { d as defineCustomElement$
|
|
15
|
-
import { d as defineCustomElement$4 } from './bal-select2.js';
|
|
16
|
-
import { d as defineCustomElement$3 } from './bal-select-option2.js';
|
|
17
|
-
import { d as defineCustomElement$2 } from './bal-tag2.js';
|
|
8
|
+
import { d as defineCustomElement$8 } from './bal-checkbox2.js';
|
|
9
|
+
import { d as defineCustomElement$7 } from './bal-dropdown2.js';
|
|
10
|
+
import { d as defineCustomElement$6 } from './bal-icon2.js';
|
|
11
|
+
import { d as defineCustomElement$5 } from './bal-input-group2.js';
|
|
12
|
+
import { d as defineCustomElement$4 } from './bal-logo2.js';
|
|
13
|
+
import { d as defineCustomElement$3 } from './bal-option2.js';
|
|
14
|
+
import { d as defineCustomElement$2 } from './bal-stack2.js';
|
|
18
15
|
import { e as updateBalLanguage } from './config.utils.js';
|
|
19
16
|
import { d as defaultConfig } from './config.default.js';
|
|
20
17
|
import { L as ListenToConfig } from './config.decorator.js';
|
|
21
18
|
|
|
22
|
-
const balFooterCss = ":root{--bal-footer-font-family:var(--bal-font-family-text);--bal-footer-background:var(--bal-color-primary);--bal-footer-color:var(--bal-color-text-white);--bal-footer-language-color-hover:var(--bal-color-light-blue-2);--bal-footer-language-background-hover:var(--bal-color-light-blue-2);--bal-footer-language-color-active:var(--bal-color-light-blue-3);--bal-footer-language-background-active:var(--bal-color-light-blue-3)}.bal-footer{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:block;position:static;-webkit-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto}.bal-footer__inner{position:relative;font-family:var(--bal-footer-font-family);background-color:var(--bal-footer-background);
|
|
19
|
+
const balFooterCss = ":root{--bal-footer-font-family:var(--bal-font-family-text);--bal-footer-background:var(--bal-color-primary);--bal-footer-color:var(--bal-color-text-white);--bal-footer-language-color-hover:var(--bal-color-light-blue-2);--bal-footer-language-background-hover:var(--bal-color-light-blue-2);--bal-footer-language-color-active:var(--bal-color-light-blue-3);--bal-footer-language-background-active:var(--bal-color-light-blue-3)}bal-footer{--bal-dropdown-control-background:transparent;--bal-dropdown-control-input-background:transparent;--bal-dropdown-control-border-color:transparent;--bal-dropdown-popover-empty-text-color:var(--bal-color-white);--bal-dropdown-control-text-color:var(--bal-color-white);--bal-dropdown-control-text-color-focused:var(---bal-color-white)}.bal-footer{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:block;position:static;-webkit-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto}.bal-footer__slot{color:var(--bal-footer-color)}.bal-footer__inner{position:relative;font-family:var(--bal-footer-font-family);background-color:var(--bal-footer-background);padding-top:var(--bal-space-x-small);padding-bottom:var(--bal-space-large)}@media screen and (min-width: 769px),print{.bal-footer__inner{padding-top:var(--bal-space-large);padding-bottom:var(--bal-space-large)}}@media screen and (min-width: 1024px){.bal-footer__inner{padding-top:var(--bal-space-large);padding-bottom:var(--bal-space-large)}}.bal-footer__inner__wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--bal-space-large)}@media screen and (min-width: 769px)and (max-width: 1023px){.bal-footer__inner__wrapper{gap:var(--bal-space-medium-tablet)}}@media screen and (max-width: 768px){.bal-footer__inner__wrapper{gap:var(--bal-space-medium-tablet)}}.bal-footer__inner__wrapper__header-container{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-ms-flex-direction:row;flex-direction:row}.bal-footer__inner__wrapper__header-container__language{display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-ms-flex-align:center;align-items:center}.bal-footer__inner__wrapper__header-container__language .bal-dropdown__list{min-width:105%;right:0 !important;left:auto !important}.bal-footer__inner__wrapper__header-container__language bal-icon,.bal-footer__inner__wrapper__header-container__language .input{cursor:pointer;min-width:auto !important}.bal-footer__inner__wrapper__header-container__language .bal-dropdown__rear svg,.bal-footer__inner__wrapper__header-container__language .bal-dropdown__rear g,.bal-footer__inner__wrapper__header-container__language .bal-dropdown__rear path,.bal-footer__inner__wrapper__header-container__language .bal-dropdown__rear circle{fill:var(--bal-color-white)}.bal-footer__inner__wrapper__header-container__language:hover .bal-dropdown__rear svg,.bal-footer__inner__wrapper__header-container__language:hover .bal-dropdown__rear g,.bal-footer__inner__wrapper__header-container__language:hover .bal-dropdown__rear path,.bal-footer__inner__wrapper__header-container__language:hover .bal-dropdown__rear circle{fill:var(--bal-footer-language-background-hover)}.bal-footer__inner__wrapper__header-container__language:hover .input,.bal-footer__inner__wrapper__header-container__language:hover .bal-dropdown__root__content{color:var(--bal-footer-language-color-hover)}.bal-footer__inner__wrapper__header-container__language:active .bal-dropdown__rear svg,.bal-footer__inner__wrapper__header-container__language:active .bal-dropdown__rear g,.bal-footer__inner__wrapper__header-container__language:active .bal-dropdown__rear path,.bal-footer__inner__wrapper__header-container__language:active .bal-dropdown__rear circle{fill:var(--bal-footer-language-background-active)}.bal-footer__inner__wrapper__header-container__language:active .input,.bal-footer__inner__wrapper__header-container__language:active .bal-dropdown__root__content{color:var(--bal-footer-language-color-active)}.bal-footer__inner__wrapper__header-container__language__wrapper .bal-input-group{background:rgba(0,0,0,0);border:none;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.bal-footer__inner__wrapper__header-container__language__wrapper .bal-input-group:hover{background:rgba(0,0,0,0) !important}.bal-footer__inner__wrapper__header-container__language__wrapper .bal-input-group bal-dropdown{min-width:5rem}.bal-footer__inner__wrapper__header-container__logo{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.bal-footer__inner__wrapper__links-container{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-wrap:wrap;flex-wrap:wrap}@media screen and (min-width: 769px),print{.bal-footer__inner__wrapper__links-container{-ms-flex-direction:column;flex-direction:column}}@media screen and (min-width: 1024px){.bal-footer__inner__wrapper__links-container{-ms-flex-direction:row;flex-direction:row}}.bal-footer__inner__wrapper__links-container__legal-links{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:center;align-items:center;gap:var(--bal-space-large-desktop)}.bal-footer__inner__wrapper__links-container__legal-links a{font-size:var(--bal-text-size-small) !important}@media screen and (max-width: 768px){.bal-footer__inner__wrapper__links-container__legal-links{-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;width:100%;gap:var(--bal-space-normal)}}.bal-footer__inner__wrapper__links-container__social-media-links{-ms-flex-align:center;align-items:center;gap:var(--bal-space-large-desktop);padding:var(--bal-space-normal) var(--bal-space-normal) var(--bal-space-normal) 0}@media screen and (min-width: 769px)and (max-width: 1023px){.bal-footer__inner__wrapper__links-container__social-media-links{padding-bottom:var(--bal-space-large)}}@media screen and (max-width: 768px){.bal-footer__inner__wrapper__links-container__social-media-links{padding-bottom:var(--bal-space-large);-ms-flex-pack:center;justify-content:center;width:100%;padding:var(--bal-space-normal) 0 var(--bal-space-normal) 0}}";
|
|
23
20
|
const BalFooterStyle0 = balFooterCss;
|
|
24
21
|
|
|
25
22
|
const Footer = /*@__PURE__*/ proxyCustomElement(class Footer extends HTMLElement {
|
|
@@ -93,6 +90,7 @@ const Footer = /*@__PURE__*/ proxyCustomElement(class Footer extends HTMLElement
|
|
|
93
90
|
*/
|
|
94
91
|
render() {
|
|
95
92
|
const block = BEM.block('footer');
|
|
93
|
+
const elSlot = block.element('slot');
|
|
96
94
|
const elInner = block.element('inner');
|
|
97
95
|
const elInnerWrapper = elInner.element('wrapper');
|
|
98
96
|
const elContainer = elInnerWrapper.element('container');
|
|
@@ -101,16 +99,16 @@ const Footer = /*@__PURE__*/ proxyCustomElement(class Footer extends HTMLElement
|
|
|
101
99
|
const elLogo = elHeaderContainer.element('logo');
|
|
102
100
|
const elLanguage = elHeaderContainer.element('language');
|
|
103
101
|
const elWrapper = elLanguage.element('wrapper');
|
|
104
|
-
|
|
102
|
+
elLanguage.element('icon');
|
|
105
103
|
const elLegalLinks = elLinksContainer.element('legal-links');
|
|
106
104
|
const elSocialMediaLinks = elLinksContainer.element('social-media-links');
|
|
107
105
|
return (h(Host, { class: Object.assign({}, block.class()) }, h("footer", { class: Object.assign({}, elInner.class()) }, h("div", { class: Object.assign({}, elInnerWrapper.class()) }, h("div", { class: Object.assign(Object.assign({ container: true }, elContainer.class()), elHeaderContainer.class()) }, h("div", { class: Object.assign({}, elLogo.class()) }, h("bal-logo", { color: "white" })), h("div", { class: Object.assign({}, elLanguage.class()), style: {
|
|
108
106
|
display: this.hideLanguageSelection || this.allowedLanguages.length <= 1 ? 'none' : 'flex',
|
|
109
|
-
} }, h("div", { class: Object.assign({}, elWrapper.class()) }, h("bal-input-group", null, h("bal-icon", { class:
|
|
107
|
+
} }, h("div", { class: Object.assign({}, elWrapper.class()) }, h("bal-input-group", null, h("bal-icon", { class: 'bal-dropdown__rear', name: "web", color: "white", onClick: el => {
|
|
110
108
|
var _a;
|
|
111
109
|
stopEventBubbling(el);
|
|
112
110
|
(_a = this.selectEl) === null || _a === void 0 ? void 0 : _a.open();
|
|
113
|
-
} }), h("bal-
|
|
111
|
+
} }), h("bal-dropdown", { ref: el => (this.selectEl = el), value: this.language, onBalChange: event => this.changeLanguage(event.detail), "data-testid": "bal-footer-language" }, this.allowedLanguages.map(language => (h("bal-option", { key: language, label: language.toLocaleUpperCase(), value: language }, language.toLocaleUpperCase())))))))), h("div", { class: Object.assign({}, elSlot.class()) }, h("slot", null)), h("div", { class: Object.assign(Object.assign({ container: true }, elContainer.class()), elLinksContainer.class()) }, h("div", { class: Object.assign({}, elSocialMediaLinks.class()), style: {
|
|
114
112
|
display: !this.showSocialMedia ? 'none' : 'flex',
|
|
115
113
|
} }, this.socialMediaLinks.map(link => (h("a", { key: link.link, href: link.link, target: "_blank", class: {
|
|
116
114
|
'link': true,
|
|
@@ -148,7 +146,7 @@ function defineCustomElement$1() {
|
|
|
148
146
|
if (typeof customElements === "undefined") {
|
|
149
147
|
return;
|
|
150
148
|
}
|
|
151
|
-
const components = ["bal-footer", "bal-checkbox", "bal-
|
|
149
|
+
const components = ["bal-footer", "bal-checkbox", "bal-dropdown", "bal-icon", "bal-input-group", "bal-logo", "bal-option", "bal-stack"];
|
|
152
150
|
components.forEach(tagName => { switch (tagName) {
|
|
153
151
|
case "bal-footer":
|
|
154
152
|
if (!customElements.get(tagName)) {
|
|
@@ -156,51 +154,36 @@ function defineCustomElement$1() {
|
|
|
156
154
|
}
|
|
157
155
|
break;
|
|
158
156
|
case "bal-checkbox":
|
|
159
|
-
if (!customElements.get(tagName)) {
|
|
160
|
-
defineCustomElement$b();
|
|
161
|
-
}
|
|
162
|
-
break;
|
|
163
|
-
case "bal-close":
|
|
164
|
-
if (!customElements.get(tagName)) {
|
|
165
|
-
defineCustomElement$a();
|
|
166
|
-
}
|
|
167
|
-
break;
|
|
168
|
-
case "bal-icon":
|
|
169
|
-
if (!customElements.get(tagName)) {
|
|
170
|
-
defineCustomElement$9();
|
|
171
|
-
}
|
|
172
|
-
break;
|
|
173
|
-
case "bal-input-group":
|
|
174
157
|
if (!customElements.get(tagName)) {
|
|
175
158
|
defineCustomElement$8();
|
|
176
159
|
}
|
|
177
160
|
break;
|
|
178
|
-
case "bal-
|
|
161
|
+
case "bal-dropdown":
|
|
179
162
|
if (!customElements.get(tagName)) {
|
|
180
163
|
defineCustomElement$7();
|
|
181
164
|
}
|
|
182
165
|
break;
|
|
183
|
-
case "bal-
|
|
166
|
+
case "bal-icon":
|
|
184
167
|
if (!customElements.get(tagName)) {
|
|
185
168
|
defineCustomElement$6();
|
|
186
169
|
}
|
|
187
170
|
break;
|
|
188
|
-
case "bal-
|
|
171
|
+
case "bal-input-group":
|
|
189
172
|
if (!customElements.get(tagName)) {
|
|
190
173
|
defineCustomElement$5();
|
|
191
174
|
}
|
|
192
175
|
break;
|
|
193
|
-
case "bal-
|
|
176
|
+
case "bal-logo":
|
|
194
177
|
if (!customElements.get(tagName)) {
|
|
195
178
|
defineCustomElement$4();
|
|
196
179
|
}
|
|
197
180
|
break;
|
|
198
|
-
case "bal-
|
|
181
|
+
case "bal-option":
|
|
199
182
|
if (!customElements.get(tagName)) {
|
|
200
183
|
defineCustomElement$3();
|
|
201
184
|
}
|
|
202
185
|
break;
|
|
203
|
-
case "bal-
|
|
186
|
+
case "bal-stack":
|
|
204
187
|
if (!customElements.get(tagName)) {
|
|
205
188
|
defineCustomElement$2();
|
|
206
189
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { _ as __decorate, a as __metadata } from './tslib.es6.js';
|
|
3
3
|
import { c as commonjsGlobal } from './_commonjsHelpers.js';
|
|
4
|
-
import {
|
|
4
|
+
import { w as formatLocaleNumber } from './index.esm.js';
|
|
5
5
|
import { k as rIC, m as debounceEvent } from './helpers.js';
|
|
6
6
|
import { i as inheritAttributes } from './attributes.js';
|
|
7
7
|
import { s as stopEventBubbling, d as inputListenOnClick } from './form-input.js';
|
|
@@ -3,7 +3,7 @@ import { _ as __decorate, a as __metadata } from './tslib.es6.js';
|
|
|
3
3
|
import { j as inputHandleClick, c as inputHandleHostClick, b as inputHandleFocus, e as inputHandleBlur, f as inputHandleChange, l as getNativeInputValue, m as getUpcomingValue, s as stopEventBubbling, d as inputListenOnClick, k as inputHandleReset, i as inputSetFocus, a as inputSetBlur } from './form-input.js';
|
|
4
4
|
import { m as debounceEvent } from './helpers.js';
|
|
5
5
|
import { i as inheritAttributes } from './attributes.js';
|
|
6
|
-
import { y as getDecimalSeparator$1, z as getThousandSeparator$1,
|
|
6
|
+
import { y as getDecimalSeparator$1, z as getThousandSeparator$1, w as formatLocaleNumber$1 } from './index.esm.js';
|
|
7
7
|
import { a as defaultLocale, d as defaultConfig } from './config.default.js';
|
|
8
8
|
import { g as useBalConfig } from './config.utils.js';
|
|
9
9
|
import { B as BEM } from './bem.js';
|
package/components/bal-option.js
CHANGED
|
@@ -1,169 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { _ as __decorate, a as __metadata } from './tslib.es6.js';
|
|
3
|
-
import { B as BEM } from './bem.js';
|
|
4
|
-
import { L as Logger } from './log.js';
|
|
5
|
-
import { a as ariaBooleanToString } from './aria.js';
|
|
6
|
-
import { s as stopEventBubbling } from './form-input.js';
|
|
7
|
-
import { B as BalElementStateListener, L as ListenToElementStates } from './element-states.decorator.js';
|
|
8
|
-
import { d as defineCustomElement$4 } from './bal-checkbox2.js';
|
|
9
|
-
import { d as defineCustomElement$3 } from './bal-icon2.js';
|
|
10
|
-
import { d as defineCustomElement$2 } from './bal-stack2.js';
|
|
11
|
-
|
|
12
|
-
const balOptionCss = ":root{--bal-option-padding-x:var(--bal-space-small);--bal-option-min-height:1.5rem;--bal-option-background:var(--bal-color-white);--bal-option-background-hovered:var(--bal-color-grey-2);--bal-option-background-selected:var(--bal-color-primary-1);--bal-option-background-selected-hovered:#dddfeb;--bal-option-background-invalid:var(--bal-color-danger-1);--bal-option-background-invalid-hovered:#fbe0de;--bal-option-border-width:var(--bal-border-width-normal);--bal-option-border-color:var(--bal-color-grey-2);--bal-option-font-family:var(--bal-font-family-text);--bal-option-font-weight:var(--bal-font-weight-regular);--bal-option-line-height:1.125rem;--bal-option-text-hovered:var(--bal-color-text-primary-hovered);--bal-option-text-pressed:var(--bal-color-text-primary-pressed);--bal-option-text-disabled:var(--bal-color-text-grey-light)}.bal-option{font-size:16px;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;display:block;list-style:none;cursor:pointer;border-bottom-width:var(--bal-option-border-width);border-bottom-color:var(--bal-option-border-color);border-bottom-style:solid;background:var(--bal-option-background);padding-left:var(--bal-option-padding-x);padding-right:var(--bal-option-padding-x);min-height:var(--bal-option-min-height)}.bal-option>bal-stack{min-height:var(--bal-option-min-height)}.bal-option:last-child{border-bottom:none}.bal-option::-moz-focus-inner{border:none}.bal-option--hidden{display:none;visibility:hidden}.bal-option__inner{font-family:var(--bal-option-font-family);font-weight:var(--bal-option-font-weight);line-height:var(--bal-option-line-height);word-break:break-word;white-space:normal;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-ms-flex:1;flex:1}.bal-option__inner--multiline{white-space:normal}.bal-option--focused{background:var(--bal-option-background-hovered)}@media (hover: hover)and (pointer: fine){.bal-option:hover{background:var(--bal-option-background-hovered);color:var(--bal-option-text-hovered)}}.bal-option:active{background:var(--bal-option-background-hovered);color:var(--bal-option-text-pressed)}.bal-option--selected{background:var(--bal-option-background-selected)}@media (hover: hover)and (pointer: fine){.bal-option--selected:hover{background:var(--bal-option-background-selected-hovered)}}.bal-option--selected:active{background:var(--bal-option-background-selected-hovered)}.bal-option--selected .bal-option__inner{font-weight:var(--bal-font-weight-bold)}.bal-option--selected.bal-option--focused{background:var(--bal-option-background-selected-hovered)}.bal-option--selected.bal-option--focused .bal-option__inner{font-weight:var(--bal-font-weight-bold)}.bal-option--invalid{background:var(--bal-option-background-invalid)}@media (hover: hover)and (pointer: fine){.bal-option--invalid:hover{background:var(--bal-option-background-invalid-hovered)}}.bal-option--invalid:active{background:var(--bal-option-background-invalid-hovered)}.bal-option--invalid.bal-option--focused{background:var(--bal-option-background-invalid-hovered)}.bal-option--invalid .bal-option__inner{color:var(--bal-color-text-danger-hovered)}@media (hover: hover)and (pointer: fine){.bal-option--invalid:hover .bal-option__inner{color:var(--bal-color-text-danger-hovered)}}.bal-option--invalid:active .bal-option__inner{color:var(--bal-color-text-danger-pressed)}.bal-option--disabled,.bal-option--disabled.bal-option--focused{background:var(--bal-option-background) !important;color:var(--bal-option-text-disabled) !important;cursor:default !important}.bal-option--disabled:hover,.bal-option--disabled.bal-option--focused:hover{background:var(--bal-option-background) !important}.bal-option{--bal-radio-checkbox-symbol-size:1.125rem;--bal-radio-checkbox-symbol-width:calc(0.375rem - 1px);--bal-radio-checkbox-symbol-height:calc(0.656rem - 1px);--bal-radio-checkbox-symbol-left:calc(0.375rem + 1px);--bal-radio-checkbox-symbol-margin-top:0.188rem;--bal-radio-checkbox-label-min-height:1.125rem}";
|
|
13
|
-
const BalOptionStyle0 = balOptionCss;
|
|
14
|
-
|
|
15
|
-
const Option = /*@__PURE__*/ proxyCustomElement(class Option extends HTMLElement {
|
|
16
|
-
constructor() {
|
|
17
|
-
super();
|
|
18
|
-
this.__registerHost();
|
|
19
|
-
this.balOptionChange = createEvent(this, "balOptionChange", 7);
|
|
20
|
-
this.balOptionFocus = createEvent(this, "balOptionFocus", 7);
|
|
21
|
-
this.inputId = `bal-option-${balOptionIds++}`;
|
|
22
|
-
/**
|
|
23
|
-
* EVENT BINDING
|
|
24
|
-
* ------------------------------------------------------
|
|
25
|
-
*/
|
|
26
|
-
this.onClick = (ev) => {
|
|
27
|
-
const listEl = this.el.closest('bal-option-list');
|
|
28
|
-
if (this.disabled || (listEl && listEl.disabled)) {
|
|
29
|
-
stopEventBubbling(ev);
|
|
30
|
-
}
|
|
31
|
-
else {
|
|
32
|
-
if (listEl && listEl.required && !listEl.multiple) {
|
|
33
|
-
if (!this.selected) {
|
|
34
|
-
this.select(true);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
this.select(!this.selected);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
this.checkbox = false;
|
|
43
|
-
this.interactionState = BalElementStateListener.DefaultState;
|
|
44
|
-
this.label = '';
|
|
45
|
-
this.value = '';
|
|
46
|
-
this.disabled = false;
|
|
47
|
-
this.multiline = false;
|
|
48
|
-
this.invalid = false;
|
|
49
|
-
this.selected = false;
|
|
50
|
-
this.focused = false;
|
|
51
|
-
this.hidden = false;
|
|
52
|
-
}
|
|
53
|
-
createLogger(log) {
|
|
54
|
-
this.log = log;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* LIFECYCLE
|
|
58
|
-
* ------------------------------------------------------
|
|
59
|
-
*/
|
|
60
|
-
componentWillRender() {
|
|
61
|
-
if (this.el) {
|
|
62
|
-
const optionListEl = this.el.closest('bal-option-list');
|
|
63
|
-
if (optionListEl) {
|
|
64
|
-
this.checkbox = !!optionListEl.multiple;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* LISTENERS
|
|
70
|
-
* ------------------------------------------------------
|
|
71
|
-
*/
|
|
72
|
-
listenToMouseEnter() {
|
|
73
|
-
const { label, value, selected, disabled, hidden } = this;
|
|
74
|
-
if (!hidden && !disabled) {
|
|
75
|
-
this.balOptionFocus.emit({ label, value, selected });
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
elementStateListener(info) {
|
|
79
|
-
this.interactionChildElements.forEach(element => {
|
|
80
|
-
element.hovered = info.hovered;
|
|
81
|
-
element.pressed = info.pressed;
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* PUBLIC METHODS
|
|
86
|
-
* ------------------------------------------------------
|
|
87
|
-
*/
|
|
88
|
-
/**
|
|
89
|
-
* Selects or deselects the option and informs other components
|
|
90
|
-
*/
|
|
91
|
-
async select(selected = true) {
|
|
92
|
-
this.selected = selected;
|
|
93
|
-
const { label, value } = this;
|
|
94
|
-
this.balOptionChange.emit({ label, value, selected });
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* PRIVATE METHODS
|
|
98
|
-
* ------------------------------------------------------
|
|
99
|
-
*/
|
|
100
|
-
get interactionChildElements() {
|
|
101
|
-
return Array.from(this.el.querySelectorAll('bal-checkbox'));
|
|
102
|
-
}
|
|
103
|
-
/**
|
|
104
|
-
* RENDER
|
|
105
|
-
* ------------------------------------------------------
|
|
106
|
-
*/
|
|
107
|
-
render() {
|
|
108
|
-
const block = BEM.block('option');
|
|
109
|
-
return (h(Host, { class: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, block.class()), block.modifier('checkbox').class(this.checkbox)), block.modifier('focused').class(this.focused)), block.modifier('invalid').class(this.invalid)), block.modifier('selected').class(this.selected)), block.modifier('disabled').class(this.disabled)), block.modifier('hidden').class(this.hidden)), role: "option", id: this.inputId, "data-value": this.value, "data-label": this.label, "aria-label": this.label, "aria-hidden": ariaBooleanToString(this.hidden), "aria-selected": ariaBooleanToString(this.selected), "aria-checked": ariaBooleanToString(this.selected), "aria-disabled": ariaBooleanToString(this.disabled), "aria-invalid": ariaBooleanToString(this.invalid), tabIndex: -1, onClick: this.onClick }, h("bal-stack", { py: "small", space: "x-small" }, this.checkbox ? (h("bal-checkbox", { flat: true, nonSubmit: true, "label-hidden": true, checked: this.selected, disabled: this.disabled, invalid: this.invalid, tabindex: -1 })) : (''), h("div", { class: Object.assign(Object.assign({}, block.element('inner').class()), block.element('inner').modifier('multiline').class(this.multiline)) }, h("slot", null)), this.selected && !this.checkbox ? (h("bal-icon", { name: "check", size: "small", color: this.disabled ? 'grey' : this.invalid ? 'danger' : 'primary' })) : (''))));
|
|
110
|
-
}
|
|
111
|
-
get el() { return this; }
|
|
112
|
-
static get style() { return BalOptionStyle0; }
|
|
113
|
-
}, [4, "bal-option", {
|
|
114
|
-
"label": [1],
|
|
115
|
-
"value": [1],
|
|
116
|
-
"disabled": [4],
|
|
117
|
-
"multiline": [4],
|
|
118
|
-
"invalid": [4],
|
|
119
|
-
"selected": [1028],
|
|
120
|
-
"focused": [1028],
|
|
121
|
-
"hidden": [4],
|
|
122
|
-
"checkbox": [32],
|
|
123
|
-
"interactionState": [32],
|
|
124
|
-
"select": [64]
|
|
125
|
-
}, [[1, "mouseenter", "listenToMouseEnter"]]]);
|
|
126
|
-
__decorate([
|
|
127
|
-
Logger('bal-option'),
|
|
128
|
-
__metadata("design:type", Function),
|
|
129
|
-
__metadata("design:paramtypes", [Function]),
|
|
130
|
-
__metadata("design:returntype", void 0)
|
|
131
|
-
], Option.prototype, "createLogger", null);
|
|
132
|
-
__decorate([
|
|
133
|
-
ListenToElementStates(),
|
|
134
|
-
__metadata("design:type", Function),
|
|
135
|
-
__metadata("design:paramtypes", [Object]),
|
|
136
|
-
__metadata("design:returntype", void 0)
|
|
137
|
-
], Option.prototype, "elementStateListener", null);
|
|
138
|
-
let balOptionIds = 0;
|
|
139
|
-
function defineCustomElement$1() {
|
|
140
|
-
if (typeof customElements === "undefined") {
|
|
141
|
-
return;
|
|
142
|
-
}
|
|
143
|
-
const components = ["bal-option", "bal-checkbox", "bal-icon", "bal-stack"];
|
|
144
|
-
components.forEach(tagName => { switch (tagName) {
|
|
145
|
-
case "bal-option":
|
|
146
|
-
if (!customElements.get(tagName)) {
|
|
147
|
-
customElements.define(tagName, Option);
|
|
148
|
-
}
|
|
149
|
-
break;
|
|
150
|
-
case "bal-checkbox":
|
|
151
|
-
if (!customElements.get(tagName)) {
|
|
152
|
-
defineCustomElement$4();
|
|
153
|
-
}
|
|
154
|
-
break;
|
|
155
|
-
case "bal-icon":
|
|
156
|
-
if (!customElements.get(tagName)) {
|
|
157
|
-
defineCustomElement$3();
|
|
158
|
-
}
|
|
159
|
-
break;
|
|
160
|
-
case "bal-stack":
|
|
161
|
-
if (!customElements.get(tagName)) {
|
|
162
|
-
defineCustomElement$2();
|
|
163
|
-
}
|
|
164
|
-
break;
|
|
165
|
-
} });
|
|
166
|
-
}
|
|
1
|
+
import { O as Option, d as defineCustomElement$1 } from './bal-option2.js';
|
|
167
2
|
|
|
168
3
|
const BalOption = Option;
|
|
169
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { _ as __decorate, a as __metadata } from './tslib.es6.js';
|
|
3
|
+
import { B as BEM } from './bem.js';
|
|
4
|
+
import { L as Logger } from './log.js';
|
|
5
|
+
import { a as ariaBooleanToString } from './aria.js';
|
|
6
|
+
import { s as stopEventBubbling } from './form-input.js';
|
|
7
|
+
import { B as BalElementStateListener, L as ListenToElementStates } from './element-states.decorator.js';
|
|
8
|
+
import { d as defineCustomElement$3 } from './bal-checkbox2.js';
|
|
9
|
+
import { d as defineCustomElement$2 } from './bal-icon2.js';
|
|
10
|
+
import { d as defineCustomElement$1 } from './bal-stack2.js';
|
|
11
|
+
|
|
12
|
+
const balOptionCss = ":root{--bal-option-padding-x:var(--bal-space-small);--bal-option-min-height:1.5rem;--bal-option-background:var(--bal-color-white);--bal-option-background-hovered:var(--bal-color-grey-2);--bal-option-background-selected:var(--bal-color-primary-1);--bal-option-background-selected-hovered:#dddfeb;--bal-option-background-invalid:var(--bal-color-danger-1);--bal-option-background-invalid-hovered:#fbe0de;--bal-option-border-width:var(--bal-border-width-normal);--bal-option-border-color:var(--bal-color-grey-2);--bal-option-font-family:var(--bal-font-family-text);--bal-option-font-weight:var(--bal-font-weight-regular);--bal-option-line-height:1.125rem;--bal-option-text-hovered:var(--bal-color-text-primary-hovered);--bal-option-text-pressed:var(--bal-color-text-primary-pressed);--bal-option-text-disabled:var(--bal-color-text-grey-light)}.bal-option{font-size:16px;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;display:block;list-style:none;cursor:pointer;border-bottom-width:var(--bal-option-border-width);border-bottom-color:var(--bal-option-border-color);border-bottom-style:solid;background:var(--bal-option-background);padding-left:var(--bal-option-padding-x);padding-right:var(--bal-option-padding-x);min-height:var(--bal-option-min-height)}.bal-option>bal-stack{min-height:var(--bal-option-min-height)}.bal-option:last-child{border-bottom:none}.bal-option::-moz-focus-inner{border:none}.bal-option--hidden{display:none;visibility:hidden}.bal-option__inner{font-family:var(--bal-option-font-family);font-weight:var(--bal-option-font-weight);line-height:var(--bal-option-line-height);word-break:break-word;white-space:normal;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-ms-flex:1;flex:1}.bal-option__inner--multiline{white-space:normal}.bal-option--focused{background:var(--bal-option-background-hovered)}@media (hover: hover)and (pointer: fine){.bal-option:hover{background:var(--bal-option-background-hovered);color:var(--bal-option-text-hovered)}}.bal-option:active{background:var(--bal-option-background-hovered);color:var(--bal-option-text-pressed)}.bal-option--selected{background:var(--bal-option-background-selected)}@media (hover: hover)and (pointer: fine){.bal-option--selected:hover{background:var(--bal-option-background-selected-hovered)}}.bal-option--selected:active{background:var(--bal-option-background-selected-hovered)}.bal-option--selected .bal-option__inner{font-weight:var(--bal-font-weight-bold)}.bal-option--selected.bal-option--focused{background:var(--bal-option-background-selected-hovered)}.bal-option--selected.bal-option--focused .bal-option__inner{font-weight:var(--bal-font-weight-bold)}.bal-option--invalid{background:var(--bal-option-background-invalid)}@media (hover: hover)and (pointer: fine){.bal-option--invalid:hover{background:var(--bal-option-background-invalid-hovered)}}.bal-option--invalid:active{background:var(--bal-option-background-invalid-hovered)}.bal-option--invalid.bal-option--focused{background:var(--bal-option-background-invalid-hovered)}.bal-option--invalid .bal-option__inner{color:var(--bal-color-text-danger-hovered)}@media (hover: hover)and (pointer: fine){.bal-option--invalid:hover .bal-option__inner{color:var(--bal-color-text-danger-hovered)}}.bal-option--invalid:active .bal-option__inner{color:var(--bal-color-text-danger-pressed)}.bal-option--disabled,.bal-option--disabled.bal-option--focused{background:var(--bal-option-background) !important;color:var(--bal-option-text-disabled) !important;cursor:default !important}.bal-option--disabled:hover,.bal-option--disabled.bal-option--focused:hover{background:var(--bal-option-background) !important}.bal-option{--bal-radio-checkbox-symbol-size:1.125rem;--bal-radio-checkbox-symbol-width:calc(0.375rem - 1px);--bal-radio-checkbox-symbol-height:calc(0.656rem - 1px);--bal-radio-checkbox-symbol-left:calc(0.375rem + 1px);--bal-radio-checkbox-symbol-margin-top:0.188rem;--bal-radio-checkbox-label-min-height:1.125rem}";
|
|
13
|
+
const BalOptionStyle0 = balOptionCss;
|
|
14
|
+
|
|
15
|
+
const Option = /*@__PURE__*/ proxyCustomElement(class Option extends HTMLElement {
|
|
16
|
+
constructor() {
|
|
17
|
+
super();
|
|
18
|
+
this.__registerHost();
|
|
19
|
+
this.balOptionChange = createEvent(this, "balOptionChange", 7);
|
|
20
|
+
this.balOptionFocus = createEvent(this, "balOptionFocus", 7);
|
|
21
|
+
this.inputId = `bal-option-${balOptionIds++}`;
|
|
22
|
+
/**
|
|
23
|
+
* EVENT BINDING
|
|
24
|
+
* ------------------------------------------------------
|
|
25
|
+
*/
|
|
26
|
+
this.onClick = (ev) => {
|
|
27
|
+
const listEl = this.el.closest('bal-option-list');
|
|
28
|
+
if (this.disabled || (listEl && listEl.disabled)) {
|
|
29
|
+
stopEventBubbling(ev);
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
if (listEl && listEl.required && !listEl.multiple) {
|
|
33
|
+
if (!this.selected) {
|
|
34
|
+
this.select(true);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
this.select(!this.selected);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
this.checkbox = false;
|
|
43
|
+
this.interactionState = BalElementStateListener.DefaultState;
|
|
44
|
+
this.label = '';
|
|
45
|
+
this.value = '';
|
|
46
|
+
this.disabled = false;
|
|
47
|
+
this.multiline = false;
|
|
48
|
+
this.invalid = false;
|
|
49
|
+
this.selected = false;
|
|
50
|
+
this.focused = false;
|
|
51
|
+
this.hidden = false;
|
|
52
|
+
}
|
|
53
|
+
createLogger(log) {
|
|
54
|
+
this.log = log;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* LIFECYCLE
|
|
58
|
+
* ------------------------------------------------------
|
|
59
|
+
*/
|
|
60
|
+
componentWillRender() {
|
|
61
|
+
if (this.el) {
|
|
62
|
+
const optionListEl = this.el.closest('bal-option-list');
|
|
63
|
+
if (optionListEl) {
|
|
64
|
+
this.checkbox = !!optionListEl.multiple;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* LISTENERS
|
|
70
|
+
* ------------------------------------------------------
|
|
71
|
+
*/
|
|
72
|
+
listenToMouseEnter() {
|
|
73
|
+
const { label, value, selected, disabled, hidden } = this;
|
|
74
|
+
if (!hidden && !disabled) {
|
|
75
|
+
this.balOptionFocus.emit({ label, value, selected });
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
elementStateListener(info) {
|
|
79
|
+
this.interactionChildElements.forEach(element => {
|
|
80
|
+
element.hovered = info.hovered;
|
|
81
|
+
element.pressed = info.pressed;
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* PUBLIC METHODS
|
|
86
|
+
* ------------------------------------------------------
|
|
87
|
+
*/
|
|
88
|
+
/**
|
|
89
|
+
* Selects or deselects the option and informs other components
|
|
90
|
+
*/
|
|
91
|
+
async select(selected = true) {
|
|
92
|
+
this.selected = selected;
|
|
93
|
+
const { label, value } = this;
|
|
94
|
+
this.balOptionChange.emit({ label, value, selected });
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* PRIVATE METHODS
|
|
98
|
+
* ------------------------------------------------------
|
|
99
|
+
*/
|
|
100
|
+
get interactionChildElements() {
|
|
101
|
+
return Array.from(this.el.querySelectorAll('bal-checkbox'));
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* RENDER
|
|
105
|
+
* ------------------------------------------------------
|
|
106
|
+
*/
|
|
107
|
+
render() {
|
|
108
|
+
const block = BEM.block('option');
|
|
109
|
+
return (h(Host, { class: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, block.class()), block.modifier('checkbox').class(this.checkbox)), block.modifier('focused').class(this.focused)), block.modifier('invalid').class(this.invalid)), block.modifier('selected').class(this.selected)), block.modifier('disabled').class(this.disabled)), block.modifier('hidden').class(this.hidden)), role: "option", id: this.inputId, "data-value": this.value, "data-label": this.label, "aria-label": this.label, "aria-hidden": ariaBooleanToString(this.hidden), "aria-selected": ariaBooleanToString(this.selected), "aria-checked": ariaBooleanToString(this.selected), "aria-disabled": ariaBooleanToString(this.disabled), "aria-invalid": ariaBooleanToString(this.invalid), tabIndex: -1, onClick: this.onClick }, h("bal-stack", { py: "small", space: "x-small" }, this.checkbox ? (h("bal-checkbox", { flat: true, nonSubmit: true, "label-hidden": true, checked: this.selected, disabled: this.disabled, invalid: this.invalid, tabindex: -1 })) : (''), h("div", { class: Object.assign(Object.assign({}, block.element('inner').class()), block.element('inner').modifier('multiline').class(this.multiline)) }, h("slot", null)), this.selected && !this.checkbox ? (h("bal-icon", { name: "check", size: "small", color: this.disabled ? 'grey' : this.invalid ? 'danger' : 'primary' })) : (''))));
|
|
110
|
+
}
|
|
111
|
+
get el() { return this; }
|
|
112
|
+
static get style() { return BalOptionStyle0; }
|
|
113
|
+
}, [4, "bal-option", {
|
|
114
|
+
"label": [1],
|
|
115
|
+
"value": [1],
|
|
116
|
+
"disabled": [4],
|
|
117
|
+
"multiline": [4],
|
|
118
|
+
"invalid": [4],
|
|
119
|
+
"selected": [1028],
|
|
120
|
+
"focused": [1028],
|
|
121
|
+
"hidden": [4],
|
|
122
|
+
"checkbox": [32],
|
|
123
|
+
"interactionState": [32],
|
|
124
|
+
"select": [64]
|
|
125
|
+
}, [[1, "mouseenter", "listenToMouseEnter"]]]);
|
|
126
|
+
__decorate([
|
|
127
|
+
Logger('bal-option'),
|
|
128
|
+
__metadata("design:type", Function),
|
|
129
|
+
__metadata("design:paramtypes", [Function]),
|
|
130
|
+
__metadata("design:returntype", void 0)
|
|
131
|
+
], Option.prototype, "createLogger", null);
|
|
132
|
+
__decorate([
|
|
133
|
+
ListenToElementStates(),
|
|
134
|
+
__metadata("design:type", Function),
|
|
135
|
+
__metadata("design:paramtypes", [Object]),
|
|
136
|
+
__metadata("design:returntype", void 0)
|
|
137
|
+
], Option.prototype, "elementStateListener", null);
|
|
138
|
+
let balOptionIds = 0;
|
|
139
|
+
function defineCustomElement() {
|
|
140
|
+
if (typeof customElements === "undefined") {
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
const components = ["bal-option", "bal-checkbox", "bal-icon", "bal-stack"];
|
|
144
|
+
components.forEach(tagName => { switch (tagName) {
|
|
145
|
+
case "bal-option":
|
|
146
|
+
if (!customElements.get(tagName)) {
|
|
147
|
+
customElements.define(tagName, Option);
|
|
148
|
+
}
|
|
149
|
+
break;
|
|
150
|
+
case "bal-checkbox":
|
|
151
|
+
if (!customElements.get(tagName)) {
|
|
152
|
+
defineCustomElement$3();
|
|
153
|
+
}
|
|
154
|
+
break;
|
|
155
|
+
case "bal-icon":
|
|
156
|
+
if (!customElements.get(tagName)) {
|
|
157
|
+
defineCustomElement$2();
|
|
158
|
+
}
|
|
159
|
+
break;
|
|
160
|
+
case "bal-stack":
|
|
161
|
+
if (!customElements.get(tagName)) {
|
|
162
|
+
defineCustomElement$1();
|
|
163
|
+
}
|
|
164
|
+
break;
|
|
165
|
+
} });
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export { Option as O, defineCustomElement as d };
|
|
@@ -147,10 +147,8 @@ const SegmentItem = /*@__PURE__*/ proxyCustomElement(class SegmentItem extends H
|
|
|
147
147
|
const id = (hasTabindex && this.ariaForm.controlId) || this.inputId;
|
|
148
148
|
let buttonAttributes = {};
|
|
149
149
|
if (hasTabindex) {
|
|
150
|
-
let labelId = this.ariaForm.labelId || null;
|
|
151
|
-
labelId = `${labelId || ''} ${id}-lbl`.trim();
|
|
152
150
|
buttonAttributes = {
|
|
153
|
-
'aria-labelledby': labelId,
|
|
151
|
+
'aria-labelledby': this.ariaForm.labelId,
|
|
154
152
|
'aria-describedby': this.ariaForm.messageId,
|
|
155
153
|
};
|
|
156
154
|
}
|
|
@@ -305,7 +305,7 @@ const Segment = /*@__PURE__*/ proxyCustomElement(class Segment extends HTMLEleme
|
|
|
305
305
|
render() {
|
|
306
306
|
const { invalid, isVertical, scrollable, keyboardMode, expanded, isMobile, disabled } = this;
|
|
307
307
|
const block = BEM.block('segment');
|
|
308
|
-
return (h(Host, { role: "radiogroup", "aria-labelledby": this.ariaForm.labelId, "aria-describedby": this.ariaForm.messageId, class: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, block.class()), block.modifier('invalid').class(invalid)), block.modifier('vertical').class(isVertical)), block.modifier('scrollable').class(scrollable)), block.modifier('keyboard').class(keyboardMode)), block.modifier('disabled').class(disabled)), block.modifier('expanded').class((expanded || isMobile) && !isVertical)), onClick: this.onClick }, h("slot", { onSlotchange: this.onSlottedItemsChange })));
|
|
308
|
+
return (h(Host, { role: "radiogroup", id: this.ariaForm.controlId, "aria-labelledby": this.ariaForm.labelId, "aria-describedby": this.ariaForm.messageId, class: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, block.class()), block.modifier('invalid').class(invalid)), block.modifier('vertical').class(isVertical)), block.modifier('scrollable').class(scrollable)), block.modifier('keyboard').class(keyboardMode)), block.modifier('disabled').class(disabled)), block.modifier('expanded').class((expanded || isMobile) && !isVertical)), onClick: this.onClick }, h("slot", { onSlotchange: this.onSlottedItemsChange })));
|
|
309
309
|
}
|
|
310
310
|
get el() { return this; }
|
|
311
311
|
static get watchers() { return {
|
|
@@ -2,7 +2,7 @@ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/
|
|
|
2
2
|
import { _ as __decorate, a as __metadata } from './tslib.es6.js';
|
|
3
3
|
import { l as lodash_isnil } from './index2.js';
|
|
4
4
|
import { k as rIC, d as waitAfterIdleCallback, e as deepReady, i as isDescendant, h as debounce } from './helpers.js';
|
|
5
|
-
import { a as isSpaceKey, b as areArraysEqual, o as isArrowDownKey, q as isArrowUpKey, i as isEnterKey, s as isEscapeKey,
|
|
5
|
+
import { a as isSpaceKey, b as areArraysEqual, o as isArrowDownKey, q as isArrowUpKey, i as isEnterKey, s as isEscapeKey, x as isBackspaceKey } from './index.esm.js';
|
|
6
6
|
import { r as removeValue, p as preventDefault, l as length, g as getValues, i as includes, s as startsWith, a as addValue, f as findLabelByValue, b as findOptionByLabel, v as validateAfterBlur } from './utils.js';
|
|
7
7
|
import { s as stopEventBubbling } from './form-input.js';
|
|
8
8
|
import { B as BEM } from './bem.js';
|
package/components/index.esm.js
CHANGED
|
@@ -7394,4 +7394,4 @@ const loadSocialMediaLinks = (lang, region = 'CH') => {
|
|
|
7394
7394
|
.then(res => res);
|
|
7395
7395
|
};
|
|
7396
7396
|
|
|
7397
|
-
export { isArrowLeftKey as A, isArrowRightKey as B, isHomeKey as C, isEndKey as D, Language as L, isSpaceKey as a, areArraysEqual as b, toInteger$1 as c, dateSeparator as d, isValidIsoString as e, formatDateString as f, getDefaultOptions as g, format as h, isEnterKey as i, getYear as j, getMonth as k, lodash_padstart as l, getDate as m, now as n, isArrowDownKey as o, parse as p, isArrowUpKey as q, requiredArgs as r, isEscapeKey as s, toDate as t, loadFooterLinks as u, loadSocialMediaLinks as v,
|
|
7397
|
+
export { isArrowLeftKey as A, isArrowRightKey as B, isHomeKey as C, isEndKey as D, Language as L, isSpaceKey as a, areArraysEqual as b, toInteger$1 as c, dateSeparator as d, isValidIsoString as e, formatDateString as f, getDefaultOptions as g, format as h, isEnterKey as i, getYear as j, getMonth as k, lodash_padstart as l, getDate as m, now as n, isArrowDownKey as o, parse as p, isArrowUpKey as q, requiredArgs as r, isEscapeKey as s, toDate as t, loadFooterLinks as u, loadSocialMediaLinks as v, formatLocaleNumber as w, isBackspaceKey as x, getDecimalSeparator as y, getThousandSeparator as z };
|
package/components/index.js
CHANGED
|
@@ -328,7 +328,7 @@ class BalSnackbarController extends BalNoticeController {
|
|
|
328
328
|
const balSnackbarController = new BalSnackbarController();
|
|
329
329
|
|
|
330
330
|
// generated by .build/version.js
|
|
331
|
-
const VERSION = '16.5.
|
|
331
|
+
const VERSION = '16.5.2';
|
|
332
332
|
|
|
333
333
|
const initializeBaloiseDesignSystem = (userConfig = {}, platformConfig = undefined, win = {}) => {
|
|
334
334
|
if (Object.keys(win).length === 0 && balBrowser.hasWindow) {
|