@baloise/ds-core 16.5.0-snapshot.1471-e419cbebb → 16.5.1
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/all.d.ts +0 -2
- package/components/all.js +0 -3
- package/components/bal-app.js +85 -1
- package/components/bal-field.js +3 -0
- package/components/bal-segment-item.js +64 -47
- package/components/bal-segment.js +61 -17
- package/components/index.js +289 -5
- package/components/tokens.esm.js +1 -1
- package/dist/baloise-design-system/baloise-design-system.esm.js +1 -1
- package/dist/baloise-design-system/baloise-design-system.js +1 -1
- package/dist/baloise-design-system/index.esm.js +1 -1
- package/dist/baloise-design-system/{p-f959646a.system.js → p-013b4c72.system.js} +1 -1
- package/dist/baloise-design-system/p-08b0e345a2.entry.js +1 -0
- package/dist/baloise-design-system/p-0db6b19e.js +1 -0
- package/dist/baloise-design-system/p-1509eaa7.system.js +1 -1
- package/dist/baloise-design-system/{p-9ab0f719.js → p-15a85377.js} +1 -1
- package/dist/baloise-design-system/{p-cd81adc228.entry.js → p-27bc71c322.entry.js} +1 -1
- package/dist/baloise-design-system/{p-b9203254fb.entry.js → p-3180888825.entry.js} +1 -1
- package/dist/baloise-design-system/{p-3e1fdd01f5.entry.js → p-342b27632b.entry.js} +1 -1
- package/dist/baloise-design-system/{p-ad679bd040.entry.js → p-34671b9410.entry.js} +1 -1
- package/dist/baloise-design-system/p-449ffc7a7e.entry.js +1 -0
- package/dist/baloise-design-system/{p-045b79ee4d.system.entry.js → p-52a4a89073.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-54f81c32.js +1 -1
- package/dist/baloise-design-system/{p-d960c286.system.js → p-590da25b.system.js} +1 -1
- package/dist/baloise-design-system/{p-40878304.system.js → p-5de0bd8a.system.js} +1 -1
- package/dist/baloise-design-system/{p-04585f2f.system.js → p-60a6af04.system.js} +1 -1
- package/dist/baloise-design-system/{p-a547251249.entry.js → p-784c10d48f.entry.js} +1 -1
- package/dist/baloise-design-system/{p-767c357ddc.entry.js → p-80e59744a7.entry.js} +1 -1
- package/dist/baloise-design-system/{p-95bf6d0a8b.system.entry.js → p-8613444e15.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-2cb51419.system.js → p-910b2f3d.system.js} +1 -1
- package/dist/baloise-design-system/{p-e7d9295cf8.system.entry.js → p-a7de2305e0.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-78d1d35d85.system.entry.js → p-aed4d3ac0f.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-676e163338.system.entry.js → p-b4941441f4.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-b60576a064.entry.js +1 -0
- package/dist/baloise-design-system/p-bcca1ed3.system.js +1 -0
- package/dist/baloise-design-system/{p-8b72df5ab4.entry.js → p-c716d30de1.entry.js} +1 -1
- package/dist/baloise-design-system/{p-e5a5fc1b.js → p-cfa901cb.js} +1 -1
- package/dist/baloise-design-system/{p-c8c9bab6e3.system.entry.js → p-d8a71bc5b4.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-a3eb350b5a.system.entry.js → p-d94b2cb869.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-5ef104a5a4.entry.js → p-d9f2d48be1.entry.js} +1 -1
- package/dist/baloise-design-system/{p-6590ce827f.system.entry.js → p-dd162dc12e.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-cb1e44b674.system.entry.js → p-e227dcfaa1.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-a6e88e6ab0.system.entry.js → p-e2316d2aea.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-e45eb6121d.system.entry.js +1 -0
- package/dist/baloise-design-system/p-e78a6409.js +1 -0
- package/dist/baloise-design-system/{p-8a615db59f.entry.js → p-e829652c7a.entry.js} +1 -1
- package/dist/baloise-design-system/{p-8a16c8f794.entry.js → p-e8cab53413.entry.js} +1 -1
- package/dist/baloise-design-system/p-ec044ce124.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-4e016ed599.system.entry.js → p-efe5a8806d.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-71b2968d8e.system.entry.js → p-f3bb565972.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-a5c78d4bf8.entry.js → p-fcfee1c692.entry.js} +1 -1
- package/dist/cjs/{global-2562a984.js → app-globals-ae3a8623.js} +4 -2
- 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-field_5.cjs.entry.js +3 -0
- 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 +115 -63
- 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 +2 -3
- package/dist/cjs/{breakpoints.decorator-b125d386.js → breakpoints.decorator-f4da1834.js} +1 -1
- package/dist/cjs/{breakpoints.subject-488871c0.js → breakpoints.subject-6fc372a8.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 +2 -3
- package/dist/cjs/{tokens.esm-abb7c10c.js → tokens.esm-cd3fab6c.js} +1 -1
- package/dist/cjs/{window-resize.decorator-3e886802.js → window-resize.decorator-67e1f4de.js} +1 -1
- package/dist/collection/collection-manifest.json +1 -2
- package/dist/collection/components/bal-field/bal-field.js +3 -0
- package/dist/collection/components/bal-segment/bal-segment-item/bal-segment-item.js +92 -69
- package/dist/collection/components/bal-segment/bal-segment.js +115 -19
- package/dist/collection/utils/constants/version.constant.js +1 -1
- package/dist/esm/{global-63f4bcec.js → app-globals-b0dd0fc4.js} +4 -2
- package/dist/esm/bal-carousel_2.entry.js +3 -3
- package/dist/esm/bal-datepicker.entry.js +3 -3
- package/dist/esm/bal-field_5.entry.js +3 -0
- 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 +115 -63
- 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 +2 -3
- package/dist/esm/{breakpoints.decorator-d3119ed5.js → breakpoints.decorator-8a50482f.js} +1 -1
- package/dist/esm/{breakpoints.subject-ed7a3540.js → breakpoints.subject-e3538fe7.js} +1 -1
- package/dist/esm/index.js +3 -3
- package/dist/esm/initialize-e216cfe4.js +1 -1
- package/dist/esm/loader.js +2 -3
- package/dist/esm/{tokens.esm-d31851f8.js → tokens.esm-7cf87670.js} +1 -1
- package/dist/esm/{window-resize.decorator-db8fd6f3.js → window-resize.decorator-9c08027e.js} +1 -1
- package/dist/esm-es5/app-globals-b0dd0fc4.js +1 -0
- 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-field_5.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-d3119ed5.js → breakpoints.decorator-8a50482f.js} +1 -1
- package/dist/esm-es5/{breakpoints.subject-ed7a3540.js → breakpoints.subject-e3538fe7.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-db8fd6f3.js → window-resize.decorator-9c08027e.js} +1 -1
- package/dist/types/components/bal-segment/bal-segment-item/bal-segment-item.d.ts +17 -13
- package/dist/types/components/bal-segment/bal-segment.d.ts +22 -3
- package/dist/types/components/bal-segment/bal-segment.interfaces.d.ts +2 -0
- package/dist/types/components.d.ts +7 -56
- package/package.json +7 -7
- package/components/bal-app2.js +0 -87
- package/components/bal-doc-app.d.ts +0 -11
- package/components/bal-doc-app.js +0 -260
- package/components/initialize.js +0 -288
- package/dist/baloise-design-system/p-1b8739df31.system.entry.js +0 -1
- package/dist/baloise-design-system/p-2d373ec3.js +0 -1
- package/dist/baloise-design-system/p-360068a4.system.js +0 -1
- package/dist/baloise-design-system/p-4ff656dd48.entry.js +0 -1
- package/dist/baloise-design-system/p-6d1b6215.js +0 -1
- package/dist/baloise-design-system/p-7291766c.system.js +0 -1
- package/dist/baloise-design-system/p-7cc52e4a3b.system.entry.js +0 -1
- package/dist/baloise-design-system/p-99177a28c0.entry.js +0 -1
- package/dist/baloise-design-system/p-b8f085f7b5.system.entry.js +0 -1
- package/dist/baloise-design-system/p-d9d229a026.entry.js +0 -1
- package/dist/baloise-design-system/p-e8ffddeb.js +0 -1
- package/dist/baloise-design-system/p-ef493de9d5.entry.js +0 -1
- package/dist/cjs/app-globals-5fd73c0c.js +0 -7
- package/dist/cjs/bal-doc-app.cjs.entry.js +0 -231
- package/dist/collection/components/docs/bal-doc-app/bal-doc-app.css +0 -1
- package/dist/collection/components/docs/bal-doc-app/bal-doc-app.js +0 -229
- package/dist/esm/app-globals-970bab17.js +0 -5
- package/dist/esm/bal-doc-app.entry.js +0 -227
- package/dist/esm-es5/app-globals-970bab17.js +0 -1
- package/dist/esm-es5/bal-doc-app.entry.js +0 -1
- package/dist/esm-es5/global-63f4bcec.js +0 -1
- package/dist/types/components/docs/bal-doc-app/bal-doc-app.d.ts +0 -21
- package/dist/types/home/runner/work/design-system/design-system/packages/core/.stencil/packages/icons/src/index.d.ts +0 -81
- /package/dist/baloise-design-system/{p-445ba24a.js → p-46bed129.js} +0 -0
- /package/dist/baloise-design-system/{p-072d2e2e.system.js → p-9ffefe27.system.js} +0 -0
- /package/dist/esm-es5/{tokens.esm-d31851f8.js → tokens.esm-7cf87670.js} +0 -0
|
@@ -3,15 +3,15 @@ import { _ as __decorate, a as __metadata } from './tslib.es6-654e2c24.js';
|
|
|
3
3
|
import { B as BEM } from './bem-8c7d2eb0.js';
|
|
4
4
|
import { L as Logger } from './log-dfd1c19f.js';
|
|
5
5
|
import { k as rIC } from './helpers-c201154e.js';
|
|
6
|
-
import { L as ListenToBreakpoints } from './breakpoints.decorator-
|
|
7
|
-
import { b as balBreakpoints } from './breakpoints.subject-
|
|
6
|
+
import { L as ListenToBreakpoints } from './breakpoints.decorator-8a50482f.js';
|
|
7
|
+
import { b as balBreakpoints } from './breakpoints.subject-e3538fe7.js';
|
|
8
8
|
import { L as ListenToConfig } from './config.decorator-d18abfe1.js';
|
|
9
9
|
import './browser-a8073d92.js';
|
|
10
10
|
import './icons.constant-a7885631.js';
|
|
11
11
|
import './config.utils-6ac6c9bd.js';
|
|
12
12
|
import './device-8c6d2881.js';
|
|
13
13
|
import './listener-04842ae9.js';
|
|
14
|
-
import './tokens.esm-
|
|
14
|
+
import './tokens.esm-7cf87670.js';
|
|
15
15
|
|
|
16
16
|
const balLogoCss = ".bal-logo{position:static;display:block;height:22px}.bal-logo svg{-webkit-transform:unset !important;transform:unset !important}.bal-logo svg svg,.bal-logo svg g,.bal-logo svg path,.bal-logo svg circle{fill:#000d6e}.bal-logo>div{height:22px}@media screen and (min-width: 1024px){.bal-logo--animated{margin-left:-7px}}.bal-logo--white svg svg,.bal-logo--white svg g,.bal-logo--white svg path,.bal-logo--white svg circle{fill:#fff}@media screen and (min-width: 1024px){.bal-logo{height:32px}.bal-logo>div{height:32px}}.bal-logo--size-small{height:22px}.bal-logo--size-small>div{height:22px}";
|
|
17
17
|
const BalLogoStyle0 = balLogoCss;
|
|
@@ -5,17 +5,17 @@ import { L as Logger } from './log-dfd1c19f.js';
|
|
|
5
5
|
import { b as balBrowser } from './browser-a8073d92.js';
|
|
6
6
|
import { B as BalScrollHandler } from './scroll-f4b20848.js';
|
|
7
7
|
import { w as waitForComponent, d as waitAfterIdleCallback } from './helpers-c201154e.js';
|
|
8
|
-
import { b as balBreakpoints } from './breakpoints.subject-
|
|
8
|
+
import { b as balBreakpoints } from './breakpoints.subject-e3538fe7.js';
|
|
9
9
|
import { d as defaultConfig } from './config.default-7efdc82d.js';
|
|
10
10
|
import { L as ListenToMutation } from './mutation.decorator-c7b24839.js';
|
|
11
|
-
import { L as ListenToBreakpoints } from './breakpoints.decorator-
|
|
11
|
+
import { L as ListenToBreakpoints } from './breakpoints.decorator-8a50482f.js';
|
|
12
12
|
import { L as ListenToConfig } from './config.decorator-d18abfe1.js';
|
|
13
13
|
import { L as ListenToResize } from './resize.decorator-f70563b5.js';
|
|
14
14
|
import './icons.constant-a7885631.js';
|
|
15
15
|
import './config.utils-6ac6c9bd.js';
|
|
16
16
|
import './device-8c6d2881.js';
|
|
17
17
|
import './listener-04842ae9.js';
|
|
18
|
-
import './tokens.esm-
|
|
18
|
+
import './tokens.esm-7cf87670.js';
|
|
19
19
|
|
|
20
20
|
class NavLinkItem {
|
|
21
21
|
constructor(item, observer) {
|
|
@@ -4,13 +4,13 @@ import { B as BalScrollHandler } from './scroll-f4b20848.js';
|
|
|
4
4
|
import { b as balBrowser } from './browser-a8073d92.js';
|
|
5
5
|
import { _ as __decorate, a as __metadata } from './tslib.es6-654e2c24.js';
|
|
6
6
|
import { e as deepReady } from './helpers-c201154e.js';
|
|
7
|
-
import { b as balBreakpoints } from './breakpoints.subject-
|
|
8
|
-
import { L as ListenToBreakpoints } from './breakpoints.decorator-
|
|
7
|
+
import { b as balBreakpoints } from './breakpoints.subject-e3538fe7.js';
|
|
8
|
+
import { L as ListenToBreakpoints } from './breakpoints.decorator-8a50482f.js';
|
|
9
9
|
import './icons.constant-a7885631.js';
|
|
10
10
|
import './config.utils-6ac6c9bd.js';
|
|
11
11
|
import './device-8c6d2881.js';
|
|
12
12
|
import './listener-04842ae9.js';
|
|
13
|
-
import './tokens.esm-
|
|
13
|
+
import './tokens.esm-7cf87670.js';
|
|
14
14
|
|
|
15
15
|
const balNavbarCss = ":root{--bal-navbar-background:var(--bal-color-primary);--bal-navbar-light-background:var(--bal-color-white);--bal-navbar-active-menu-background:var(--bal-color-white);--bal-navbar-height:4rem;--bal-navbar-height-desktop:5rem;--bal-navbar-brand-title-text-color:var(--bal-color-text-white);--bal-navbar-brand-title-font-size:var(--bal-text-size-medium);--bal-navbar-brand-title-light-text-color:var(--bal-color-text-primary);--bal-navbar-brand-text-color:var(--bal-color-text-white);--bal-navbar-brand-logo-link-color:var(--bal-color-text-white)}.bal-navbar{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;display:block}.bal-navbar--context-app:not(.bal-navbar--is-light),.bal-navbar--context-simple:not(.bal-navbar--is-light){background:var(--bal-navbar-background)}.bal-navbar--context-app,.bal-navbar--context-simple{height:var(--bal-navbar-height);max-height:var(--bal-navbar-height)}@media screen and (min-width: 1024px){.bal-navbar--context-app,.bal-navbar--context-simple{height:var(--bal-navbar-height-desktop);max-height:var(--bal-navbar-height-desktop)}}.bal-navbar__nav{display:-ms-flexbox;display:flex;height:100%;gap:1rem}.bal-navbar__brand{-ms-flex:1;flex:1;gap:2rem;display:-ms-flexbox;display:flex;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-align:center;align-items:center}@media screen and (min-width: 1024px){.bal-navbar__brand{-ms-flex:initial;flex:initial}}.bal-navbar__brand>a{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:100%}.bal-navbar__brand__logo{height:calc(100% - 1rem);-o-object-fit:contain;object-fit:contain}@media screen and (min-width: 1024px){.bal-navbar__brand__logo{height:calc(100% - 2rem)}}.bal-navbar__brand__title{display:none;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto}.bal-navbar__brand__title>bal-logo{display:none}@media screen and (min-width: 769px),print{.bal-navbar__brand__title{display:inline-block;font-size:var(--bal-navbar-brand-title-font-size);font-family:var(--bal-font-family-title);font-weight:var(--bal-font-weight-bold);color:var(--bal-navbar-brand-title-text-color)}}@media screen and (min-width: 1024px){.bal-navbar__brand__title{font-size:var(--bal-navbar-brand-title-font-size)}}.bal-navbar__brand--context-app,.bal-navbar__brand--context-simple{color:var(--bal-navbar-brand-text-color)}.bal-navbar__brand--context-app>a,.bal-navbar__brand--context-simple>a{color:var(--bal-navbar-brand-logo-link-color)}.bal-navbar__menu{position:static;display:none;z-index:var(--bal-z-index-navigation)}@media screen and (max-width: 1023px){.bal-navbar__menu--active{position:fixed !important;display:block;background:var(--bal-navbar-active-menu-background)}}@media screen and (max-width: 1023px){.bal-navbar__menu--context-app{padding-top:1rem;padding-bottom:1rem;overflow-y:auto;-ms-flex-direction:column-reverse;flex-direction:column-reverse;top:4rem;left:0;bottom:0;right:0}}@media screen and (min-width: 1024px){.bal-navbar__menu{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;gap:1rem;padding-right:0 !important}}.bal-navbar__menu--context-simple{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end;-ms-flex:1;flex:1;gap:1rem}.bal-navbar__menu__start{display:block;margin-bottom:1rem}@media screen and (min-width: 1024px){.bal-navbar__menu__start{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;gap:.5rem;margin-bottom:0}}.bal-navbar__menu__start--context-simple{display:none}.bal-navbar__menu__start--context-meta{-ms-flex-pack:start;justify-content:flex-start}.bal-navbar__menu__end{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end;-ms-flex-align:center;align-items:center;gap:.5rem}.bal-navbar__menu__end .button-label{word-break:keep-all !important}.bal-navbar__menu__end .bal-button-group{width:100%}@media screen and (max-width: 1023px){.bal-navbar__menu__end .bal-button-group{margin-top:2rem}}.bal-navbar__menu__end--context-simple>.field{-ms-flex-negative:0;flex-shrink:0;-ms-flex-pack:end;justify-content:flex-end;-ms-flex-align:center;align-items:center}.bal-navbar__menu__end>.field{-ms-flex:1;flex:1}@media screen and (min-width: 1024px){.bal-navbar__menu__end>.field{-ms-flex-negative:0;flex-shrink:0;-ms-flex-pack:end;justify-content:flex-end;-ms-flex-align:center;align-items:center}}.bal-navbar--is-light{background-color:var(--bal-navbar-light-background);-webkit-box-shadow:var(--bal-shadow-normal);box-shadow:var(--bal-shadow-normal)}.bal-navbar--is-light .bal-navbar__brand__title{color:var(--bal-navbar-brand-title-light-text-color)}.bal-navbar--is-light bal-logo svg svg,.bal-navbar--is-light bal-logo svg g,.bal-navbar--is-light bal-logo svg path,.bal-navbar--is-light bal-logo svg circle{fill:var(--bal-color-primary)}.bal-navbar__brand__burger.bal-button{margin-left:auto}@media screen and (min-width: 1024px){.bal-navbar__brand__burger.bal-button{display:none}}.bal-navbar__brand__burger--hidden.bal-button{display:none !important}";
|
|
16
16
|
const BalNavbarStyle0 = balNavbarCss;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-b6003bc7.js';
|
|
2
2
|
import { _ as __decorate, a as __metadata } from './tslib.es6-654e2c24.js';
|
|
3
3
|
import { B as BEM } from './bem-8c7d2eb0.js';
|
|
4
|
-
import { b as balBreakpoints } from './breakpoints.subject-
|
|
4
|
+
import { b as balBreakpoints } from './breakpoints.subject-e3538fe7.js';
|
|
5
5
|
import { d as defaultConfig } from './config.default-7efdc82d.js';
|
|
6
|
-
import { L as ListenToBreakpoints } from './breakpoints.decorator-
|
|
6
|
+
import { L as ListenToBreakpoints } from './breakpoints.decorator-8a50482f.js';
|
|
7
7
|
import { L as ListenToConfig } from './config.decorator-d18abfe1.js';
|
|
8
8
|
import './helpers-c201154e.js';
|
|
9
9
|
import './browser-a8073d92.js';
|
|
@@ -11,7 +11,7 @@ import './icons.constant-a7885631.js';
|
|
|
11
11
|
import './config.utils-6ac6c9bd.js';
|
|
12
12
|
import './device-8c6d2881.js';
|
|
13
13
|
import './listener-04842ae9.js';
|
|
14
|
-
import './tokens.esm-
|
|
14
|
+
import './tokens.esm-7cf87670.js';
|
|
15
15
|
import './log-dfd1c19f.js';
|
|
16
16
|
|
|
17
17
|
function generatePaginationControl(value, totalPages, pageRange) {
|
|
@@ -2,15 +2,15 @@ import { r as registerInstance, h, H as Host, g as getElement } from './index-b6
|
|
|
2
2
|
import { _ as __decorate, a as __metadata } from './tslib.es6-654e2c24.js';
|
|
3
3
|
import { B as BEM } from './bem-8c7d2eb0.js';
|
|
4
4
|
import { l as raf } from './helpers-c201154e.js';
|
|
5
|
-
import { b as balBreakpoints } from './breakpoints.subject-
|
|
6
|
-
import { L as ListenToBreakpoints } from './breakpoints.decorator-
|
|
7
|
-
import { L as ListenToWindowResize } from './window-resize.decorator-
|
|
5
|
+
import { b as balBreakpoints } from './breakpoints.subject-e3538fe7.js';
|
|
6
|
+
import { L as ListenToBreakpoints } from './breakpoints.decorator-8a50482f.js';
|
|
7
|
+
import { L as ListenToWindowResize } from './window-resize.decorator-9c08027e.js';
|
|
8
8
|
import './browser-a8073d92.js';
|
|
9
9
|
import './icons.constant-a7885631.js';
|
|
10
10
|
import './config.utils-6ac6c9bd.js';
|
|
11
11
|
import './device-8c6d2881.js';
|
|
12
12
|
import './listener-04842ae9.js';
|
|
13
|
-
import './tokens.esm-
|
|
13
|
+
import './tokens.esm-7cf87670.js';
|
|
14
14
|
|
|
15
15
|
const balProgressBarCss = ":root{--bal-progress-bar-background-white:var(--bal-color-white);--bal-progress-bar-background-grey:var(--bal-color-grey-3);--bal-progress-bar-background-purple:var(--bal-color-purple-2);--bal-progress-bar-background-yellow:var(--bal-color-yellow-2);--bal-progress-bar-background-red:var(--bal-color-red-2);--bal-progress-bar-background-green:var(--bal-color-green-2);--bal-progress-bar-line-color-primary:var(--bal-color-primary);--bal-progress-bar-line-color-purple:var(--bal-color-purple-6);--bal-progress-bar-line-color-yellow:var(--bal-color-yellow-6);--bal-progress-bar-line-color-red:var(--bal-color-red-6);--bal-progress-bar-line-color-green:var(--bal-color-green-6);--bal-progress-bar-line-radius:var(--bal-radius-rounded)}.bal-progress-bar{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:block;width:100%;min-width:0;height:.25rem}.bal-progress-bar--background-white-of-primary,.bal-progress-bar--background-white-of-purple,.bal-progress-bar--background-white-of-red,.bal-progress-bar--background-white-of-green,.bal-progress-bar--background-white-of-yellow{background:var(--bal-progress-bar-background-white)}.bal-progress-bar--background-grey-of-primary{background:var(--bal-progress-bar-background-grey)}.bal-progress-bar--background-grey-of-purple{background:var(--bal-progress-bar-background-purple)}.bal-progress-bar--background-grey-of-red{background:var(--bal-progress-bar-background-red)}.bal-progress-bar--background-grey-of-green{background:var(--bal-progress-bar-background-green)}.bal-progress-bar--background-grey-of-yellow{background:var(--bal-progress-bar-background-yellow)}.bal-progress-bar__line{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:block;height:.25rem;width:0;background:var(--bal-progress-bar-line-color-primary);border-top-right-radius:var(--bal-progress-bar-line-radius);border-bottom-right-radius:var(--bal-progress-bar-line-radius)}.bal-progress-bar__line--animated{will-change:width;-webkit-transition:all var(--bal-animation-transition-duration) var(--bal-animation-transition-easing);transition:all var(--bal-animation-transition-duration) var(--bal-animation-transition-easing)}.bal-progress-bar__line--full{border-top-right-radius:0;border-bottom-right-radius:0}.bal-progress-bar__line--color-purple{background:var(--bal-progress-bar-line-color-purple)}.bal-progress-bar__line--color-yellow{background:var(--bal-progress-bar-line-color-yellow)}.bal-progress-bar__line--color-red{background:var(--bal-progress-bar-line-color-red)}.bal-progress-bar__line--color-green{background:var(--bal-progress-bar-line-color-green)}";
|
|
16
16
|
const BalProgressBarStyle0 = balProgressBarCss;
|
|
@@ -6,18 +6,20 @@ import { e as isSpaceKey, s as isArrowUpKey, y as isArrowLeftKey, q as isArrowDo
|
|
|
6
6
|
import { s as stopEventBubbling } from './form-input-a8fdaaef.js';
|
|
7
7
|
import { F as FOCUS_KEYS } from './focus-visible-f0cdd043.js';
|
|
8
8
|
import { l as raf, j as addEventListener, r as removeEventListener } from './helpers-c201154e.js';
|
|
9
|
-
import {
|
|
10
|
-
import { L as
|
|
9
|
+
import { d as defaultBalAriaForm } from './form-fb8dd9f5.js';
|
|
10
|
+
import { L as ListenToFocus } from './focus.decorator-8acd79c3.js';
|
|
11
|
+
import { L as ListenToWindowResize } from './window-resize.decorator-9c08027e.js';
|
|
12
|
+
import { L as ListenToBreakpoints } from './breakpoints.decorator-8a50482f.js';
|
|
11
13
|
import { i as inheritAttributes } from './attributes-4fa7040f.js';
|
|
12
14
|
import './browser-a8073d92.js';
|
|
13
15
|
import './index-82aff103.js';
|
|
14
16
|
import './_commonjsHelpers-1c8beb5f.js';
|
|
15
17
|
import './icons.constant-a7885631.js';
|
|
16
18
|
import './config.utils-6ac6c9bd.js';
|
|
17
|
-
import './breakpoints.subject-ed7a3540.js';
|
|
18
|
-
import './device-8c6d2881.js';
|
|
19
19
|
import './listener-04842ae9.js';
|
|
20
|
-
import './
|
|
20
|
+
import './breakpoints.subject-e3538fe7.js';
|
|
21
|
+
import './device-8c6d2881.js';
|
|
22
|
+
import './tokens.esm-7cf87670.js';
|
|
21
23
|
|
|
22
24
|
const balSegmentCss = ":root{--bal-segment-background:var(--bal-color-grey-2);--bal-segment-background-invalid:var(--bal-color-danger-1);--bal-segment-item-focus-border:var(--bal-color-border-primary);--bal-segment-item-text-color:var(--bal-color-text-primary);--bal-segment-item-text-color-checked:var(--bal-color-text-primary);--bal-segment-item-text-color-checked-hovered:var(--bal-color-text-primary-hovered);--bal-segment-item-text-color-checked-pressed:var(--bal-color-text-primary-pressed);--bal-segment-item-text-color-invalid:var(--bal-color-text-danger);--bal-segment-item-text-color-invalid-hovered:var(--bal-color-text-danger-hovered);--bal-segment-item-text-color-invalid-pressed:var(--bal-color-text-danger-pressed);--bal-segment-item-text-color-disabled:var(--bal-color-text-grey);--bal-segment-item-text-color-disabled-checked:var(--bal-color-text-grey-dark);--bal-segment-item-divider-background:var(--bal-color-grey);--bal-segment-item-divider-background-invalid:var(--bal-color-danger-2);--bal-segment-item-indicator-background:var(--bal-color-purple-2);--bal-segment-item-indicator-background-invalid:var(--bal-color-danger-4);--bal-segment-item-indicator-background-disabled:var(--bal-color-grey-3)}.bal-segment{display:-ms-flexbox;display:flex;background:var(--bal-segment-background);border-radius:var(--bal-radius-normal);gap:.125rem;gap:.125rem;padding:.25rem;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.bal-segment--invalid{background:var(--bal-segment-background-invalid)}.bal-segment--vertical{-ms-flex-direction:column;flex-direction:column;width:100%}.bal-segment--vertical .bal-segment-item__button{width:100%;-ms-flex:1;flex:1}.bal-segment--vertical.bal-segment--scrollable{overflow:auto;max-height:240px}.bal-segment--expanded{width:100%;min-width:100%;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-align:center;align-items:center}.bal-segment--expanded .bal-segment-item,.bal-segment--expanded .bal-segment-item>button{-ms-flex:1;flex:1;width:100%}.bal-segment--expanded .bal-segment-item .bal-content,.bal-segment--expanded .bal-segment-item>button .bal-content{-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}";
|
|
23
25
|
const BalSegmentStyle0 = balSegmentCss;
|
|
@@ -25,13 +27,19 @@ const BalSegmentStyle0 = balSegmentCss;
|
|
|
25
27
|
const Segment = class {
|
|
26
28
|
constructor(hostRef) {
|
|
27
29
|
registerInstance(this, hostRef);
|
|
30
|
+
this.balFocus = createEvent(this, "balFocus", 7);
|
|
28
31
|
this.balBlur = createEvent(this, "balBlur", 7);
|
|
29
32
|
this.balChange = createEvent(this, "balChange", 7);
|
|
30
33
|
this.balSelect = createEvent(this, "balSelect", 7);
|
|
31
34
|
this.balVertical = createEvent(this, "balVertical", 7);
|
|
35
|
+
/**
|
|
36
|
+
* LISTENERS
|
|
37
|
+
* ------------------------------------------------------
|
|
38
|
+
*/
|
|
39
|
+
this.hasFocus = false;
|
|
32
40
|
this.getSegmentItem = (selector) => {
|
|
33
41
|
var _a, _b;
|
|
34
|
-
const items = this.
|
|
42
|
+
const items = this.allItems.filter(item => !item.disabled);
|
|
35
43
|
const currIndex = items.findIndex(item => item === document.activeElement.closest('bal-segment-item'));
|
|
36
44
|
switch (selector) {
|
|
37
45
|
case 'current':
|
|
@@ -96,6 +104,7 @@ const Segment = class {
|
|
|
96
104
|
this.isVertical = false;
|
|
97
105
|
this.isMobile = false;
|
|
98
106
|
this.maxWidth = 0;
|
|
107
|
+
this.ariaForm = defaultBalAriaForm;
|
|
99
108
|
this.invalid = false;
|
|
100
109
|
this.disabled = false;
|
|
101
110
|
this.vertical = false;
|
|
@@ -106,6 +115,9 @@ const Segment = class {
|
|
|
106
115
|
createLogger(log) {
|
|
107
116
|
this.log = log;
|
|
108
117
|
}
|
|
118
|
+
disabledChanged() {
|
|
119
|
+
this.allItems.map(item => (item.disabled = this.disabled));
|
|
120
|
+
}
|
|
109
121
|
valueChanged(value) {
|
|
110
122
|
/**
|
|
111
123
|
* `balSelect` is emitted every time the value changes (internal or external changes).
|
|
@@ -120,6 +132,7 @@ const Segment = class {
|
|
|
120
132
|
connectedCallback() {
|
|
121
133
|
this.el.addEventListener('touchstart', this.onPointerDown);
|
|
122
134
|
this.el.addEventListener('mousedown', this.onPointerDown);
|
|
135
|
+
this.disabledChanged();
|
|
123
136
|
}
|
|
124
137
|
disconnectedCallback() {
|
|
125
138
|
this.el.removeEventListener('touchstart', this.onPointerDown);
|
|
@@ -129,10 +142,12 @@ const Segment = class {
|
|
|
129
142
|
this.setCheckedClasses();
|
|
130
143
|
this.defineWidth();
|
|
131
144
|
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
145
|
+
focusInListener(ev) {
|
|
146
|
+
this.balFocus.emit(ev);
|
|
147
|
+
}
|
|
148
|
+
focusOutListener(ev) {
|
|
149
|
+
this.balBlur.emit(ev);
|
|
150
|
+
}
|
|
136
151
|
breakpointListener(breakpoints) {
|
|
137
152
|
this.isMobile = breakpoints.mobile;
|
|
138
153
|
}
|
|
@@ -154,9 +169,8 @@ const Segment = class {
|
|
|
154
169
|
this.emitVerticalChange(true);
|
|
155
170
|
}
|
|
156
171
|
}
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
this.balBlur.emit(ev.detail);
|
|
172
|
+
listenOnKeyDownOutside() {
|
|
173
|
+
this.keyboardMode = true;
|
|
160
174
|
}
|
|
161
175
|
listenOnKeyDown(ev) {
|
|
162
176
|
this.keyboardMode = FOCUS_KEYS.includes(ev.key);
|
|
@@ -164,6 +178,7 @@ const Segment = class {
|
|
|
164
178
|
if (isSpaceKey(ev)) {
|
|
165
179
|
stopEventBubbling(ev);
|
|
166
180
|
current = this.getSegmentItem('current');
|
|
181
|
+
this.value = current.value;
|
|
167
182
|
}
|
|
168
183
|
else if (isArrowUpKey(ev) || isArrowLeftKey(ev)) {
|
|
169
184
|
stopEventBubbling(ev);
|
|
@@ -193,15 +208,25 @@ const Segment = class {
|
|
|
193
208
|
current.setFocus();
|
|
194
209
|
}
|
|
195
210
|
}
|
|
211
|
+
/**
|
|
212
|
+
* PUBLIC METHODS
|
|
213
|
+
* ------------------------------------------------------
|
|
214
|
+
*/
|
|
215
|
+
/**
|
|
216
|
+
* @internal
|
|
217
|
+
*/
|
|
218
|
+
async setAriaForm(ariaForm) {
|
|
219
|
+
this.ariaForm = Object.assign({}, ariaForm);
|
|
220
|
+
}
|
|
196
221
|
/**
|
|
197
222
|
* GETTERS
|
|
198
223
|
* ------------------------------------------------------
|
|
199
224
|
*/
|
|
200
|
-
get
|
|
225
|
+
get allItems() {
|
|
201
226
|
return Array.from(this.el.querySelectorAll('bal-segment-item'));
|
|
202
227
|
}
|
|
203
228
|
get checked() {
|
|
204
|
-
return this.
|
|
229
|
+
return this.allItems.find(item => item.value === this.value);
|
|
205
230
|
}
|
|
206
231
|
/**
|
|
207
232
|
* PRIVATE METHODS
|
|
@@ -226,8 +251,11 @@ const Segment = class {
|
|
|
226
251
|
});
|
|
227
252
|
}
|
|
228
253
|
getIndicator(item) {
|
|
229
|
-
|
|
230
|
-
|
|
254
|
+
if (item) {
|
|
255
|
+
const root = item.shadowRoot || item;
|
|
256
|
+
return root.querySelector('.bal-segment-item__indicator');
|
|
257
|
+
}
|
|
258
|
+
return null;
|
|
231
259
|
}
|
|
232
260
|
checkButton(previous, current) {
|
|
233
261
|
const previousIndicator = this.getIndicator(previous);
|
|
@@ -264,7 +292,7 @@ const Segment = class {
|
|
|
264
292
|
this.setCheckedClasses();
|
|
265
293
|
}
|
|
266
294
|
setCheckedClasses() {
|
|
267
|
-
const items = this.
|
|
295
|
+
const items = this.allItems;
|
|
268
296
|
const index = items.findIndex(item => item.value === this.value);
|
|
269
297
|
const next = index + 1;
|
|
270
298
|
const previous = index - 1;
|
|
@@ -284,12 +312,13 @@ const Segment = class {
|
|
|
284
312
|
* ------------------------------------------------------
|
|
285
313
|
*/
|
|
286
314
|
render() {
|
|
287
|
-
const { invalid, isVertical, scrollable, keyboardMode, expanded, isMobile } = this;
|
|
315
|
+
const { invalid, isVertical, scrollable, keyboardMode, expanded, isMobile, disabled } = this;
|
|
288
316
|
const block = BEM.block('segment');
|
|
289
|
-
return (h(Host, { role: "radiogroup", class: 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('expanded').class((expanded || isMobile) && !isVertical)), onClick: this.onClick }, h("slot", { onSlotchange: this.onSlottedItemsChange })));
|
|
317
|
+
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 })));
|
|
290
318
|
}
|
|
291
319
|
get el() { return getElement(this); }
|
|
292
320
|
static get watchers() { return {
|
|
321
|
+
"disabled": ["disabledChanged"],
|
|
293
322
|
"value": ["valueChanged"]
|
|
294
323
|
}; }
|
|
295
324
|
};
|
|
@@ -299,6 +328,18 @@ __decorate([
|
|
|
299
328
|
__metadata("design:paramtypes", [Function]),
|
|
300
329
|
__metadata("design:returntype", void 0)
|
|
301
330
|
], Segment.prototype, "createLogger", null);
|
|
331
|
+
__decorate([
|
|
332
|
+
ListenToFocus(),
|
|
333
|
+
__metadata("design:type", Function),
|
|
334
|
+
__metadata("design:paramtypes", [FocusEvent]),
|
|
335
|
+
__metadata("design:returntype", void 0)
|
|
336
|
+
], Segment.prototype, "focusInListener", null);
|
|
337
|
+
__decorate([
|
|
338
|
+
ListenToFocus(),
|
|
339
|
+
__metadata("design:type", Function),
|
|
340
|
+
__metadata("design:paramtypes", [FocusEvent]),
|
|
341
|
+
__metadata("design:returntype", void 0)
|
|
342
|
+
], Segment.prototype, "focusOutListener", null);
|
|
302
343
|
__decorate([
|
|
303
344
|
ListenToBreakpoints(),
|
|
304
345
|
__metadata("design:type", Function),
|
|
@@ -316,14 +357,14 @@ Segment.style = BalSegmentStyle0;
|
|
|
316
357
|
const balSegmentItemCss = ":root{--bal-segment-background:var(--bal-color-grey-2);--bal-segment-background-invalid:var(--bal-color-danger-1);--bal-segment-item-focus-border:var(--bal-color-border-primary);--bal-segment-item-text-color:var(--bal-color-text-primary);--bal-segment-item-text-color-checked:var(--bal-color-text-primary);--bal-segment-item-text-color-checked-hovered:var(--bal-color-text-primary-hovered);--bal-segment-item-text-color-checked-pressed:var(--bal-color-text-primary-pressed);--bal-segment-item-text-color-invalid:var(--bal-color-text-danger);--bal-segment-item-text-color-invalid-hovered:var(--bal-color-text-danger-hovered);--bal-segment-item-text-color-invalid-pressed:var(--bal-color-text-danger-pressed);--bal-segment-item-text-color-disabled:var(--bal-color-text-grey);--bal-segment-item-text-color-disabled-checked:var(--bal-color-text-grey-dark);--bal-segment-item-divider-background:var(--bal-color-grey);--bal-segment-item-divider-background-invalid:var(--bal-color-danger-2);--bal-segment-item-indicator-background:var(--bal-color-purple-2);--bal-segment-item-indicator-background-invalid:var(--bal-color-danger-4);--bal-segment-item-indicator-background-disabled:var(--bal-color-grey-3)}.bal-segment-item{display:block;position:relative;height:auto;text-decoration:none;text-overflow:ellipsis;text-decoration:none;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;grid-row:1;-webkit-font-kerning:none;font-kerning:none}.bal-segment-item--disabled{cursor:default !important;pointer-events:none !important}.bal-segment-item__button{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;min-height:2.5rem;min-width:3rem;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-ms-flex-positive:1;flex-grow:1;padding-top:.375rem;padding-bottom:.375rem;padding-left:20px;padding-right:20px;outline:none;border-color:rgba(0,0,0,0);border-width:var(--bal-border-width-normal);border-style:solid;border-radius:var(--bal-radius-normal);background:rgba(0,0,0,0);font-size:var(--bal-text-size-normal);font-weight:var(--bal-font-weight-bold);color:var(--bal-segment-item-text-color);overflow:hidden;position:relative;contain:content;pointer-events:none;cursor:pointer;z-index:2}.bal-segment-item__button--vertical{padding-left:.75rem;padding-right:.75rem}.bal-segment-item__button span{font-size:var(--bal-text-size-small);font-weight:var(--bal-font-weight-regular)}.bal-segment-item__button{will-change:color,padding;-webkit-transition:color 160ms cubic-bezier(0.4, 0, 0.2, 1);transition:color 160ms cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition:padding 160ms cubic-bezier(0.4, 0, 0.2, 1);transition:padding 160ms cubic-bezier(0.4, 0, 0.2, 1)}.bal-segment-item:not(.bal-segment-item--checked):not(.bal-segment-item--last):not(.bal-segment-item--before-checked)::after{content:\"\";position:absolute;background:var(--bal-segment-item-divider-background);border-radius:var(--bal-radius-normal)}.bal-segment-item:not(.bal-segment-item--vertical):not(.bal-segment-item--checked):not(.bal-segment-item--last):not(.bal-segment-item--before-checked)::after{top:2px;bottom:2px;right:-1px;width:2px}.bal-segment-item.bal-segment-item--vertical:not(.bal-segment-item--checked):not(.bal-segment-item--last):not(.bal-segment-item--before-checked)::after{left:2px;right:2px;bottom:-1px;height:2px}.bal-segment-item--invalid:not(.bal-segment-item--checked):not(.bal-segment-item--last):not(.bal-segment-item--before-checked)::after{background:var(--bal-segment-item-divider-background-invalid)}.bal-segment-item__indicator{-webkit-transform-origin:left;transform-origin:left;position:absolute;opacity:0;-webkit-box-sizing:border-box;box-sizing:border-box;pointer-events:none;border-radius:var(--bal-radius-normal);background:var(--bal-segment-item-indicator-background);top:0;left:0}.bal-segment-item__indicator--vertical{-webkit-transform-origin:top;transform-origin:top}.bal-segment-item__indicator--invalid{background:var(--bal-segment-item-indicator-background-invalid)}.bal-segment-item__indicator--background{min-width:100%;min-height:100%;-webkit-transform:none;transform:none;pointer-events:none}.bal-segment-item__indicator--animated{will-change:transform,opacity,top,bottom,left,right,min-width,min-heigth;-webkit-transition:min-width 100ms ease,min-height 100ms ease,top 100ms ease,left 100ms ease,bottom 100ms ease,right 100ms ease,-webkit-transform 260ms cubic-bezier(0.4, 0, 0.2, 1);transition:min-width 100ms ease,min-height 100ms ease,top 100ms ease,left 100ms ease,bottom 100ms ease,right 100ms ease,-webkit-transform 260ms cubic-bezier(0.4, 0, 0.2, 1);transition:transform 260ms cubic-bezier(0.4, 0, 0.2, 1),min-width 100ms ease,min-height 100ms ease,top 100ms ease,left 100ms ease,bottom 100ms ease,right 100ms ease;transition:transform 260ms cubic-bezier(0.4, 0, 0.2, 1),min-width 100ms ease,min-height 100ms ease,top 100ms ease,left 100ms ease,bottom 100ms ease,right 100ms ease,-webkit-transform 260ms cubic-bezier(0.4, 0, 0.2, 1)}.bal-segment-item__indicator--checked{opacity:1}.bal-segment-item:active .bal-segment-item__indicator{min-width:calc(100% - 4px);min-height:calc(100% - 4px);top:2px !important;bottom:2px !important;left:2px !important;right:2px !important}.bal-segment-item__button__icon{position:absolute !important;opacity:0;width:0 !important;-webkit-transform:translateX(0.1rem);transform:translateX(0.1rem);pointer-events:none !important;cursor:inherit;will-change:transform,opacity}.bal-segment-item__button__icon:not(.bal-segment-item__button__icon--vertical){left:10px}.bal-segment-item__button__icon--vertical{right:10px}.bal-segment-item__button__icon--animated{opacity:1;width:.875rem !important;-webkit-transform:translateX(-4px);transform:translateX(-4px);-webkit-transition:opacity 260ms cubic-bezier(0.4, 0, 0.2, 1),-webkit-transform 260ms cubic-bezier(0.4, 0, 0.2, 1);transition:opacity 260ms cubic-bezier(0.4, 0, 0.2, 1),-webkit-transform 260ms cubic-bezier(0.4, 0, 0.2, 1);transition:opacity 260ms cubic-bezier(0.4, 0, 0.2, 1),transform 260ms cubic-bezier(0.4, 0, 0.2, 1);transition:opacity 260ms cubic-bezier(0.4, 0, 0.2, 1),transform 260ms cubic-bezier(0.4, 0, 0.2, 1),-webkit-transform 260ms cubic-bezier(0.4, 0, 0.2, 1)}.bal-segment-item__button--checked{color:var(--bal-segment-item-text-color-checked);padding-right:40px}.bal-segment-item__button--checked:not(.bal-segment-item__button--vertical){padding-left:26px;padding-right:12px}@media (hover: hover)and (pointer: fine){.bal-segment-item:not(.bal-segment-item--disabled):hover .bal-segment-item__button:not(.bal-segment-item__button--checked){color:var(--bal-segment-item-text-color-checked-hovered)}}.bal-segment-item:not(.bal-segment-item--disabled):active .bal-segment-item__button:not(.bal-segment-item__button--checked){color:var(--bal-segment-item-text-color-checked-pressed)}.bal-segment--keyboard .bal-segment-item__button:not(.bal-segment-item__button--disabled):focus-visible,.bal-segment--keyboard .bal-segment-item__button--focused:not(.bal-segment-item__button--disabled){border-color:var(--bal-segment-item-focus-border);border-width:var(--bal-border-width-normal);border-style:solid;-webkit-transition:border 300ms ease-in-out;transition:border 300ms ease-in-out}.bal-segment-item.bal-segment-item--invalid:not(.bal-segment-item--disabled) .bal-segment-item__button:not(.bal-segment-item__button--checked){color:var(--bal-segment-item-text-color-invalid)}@media (hover: hover)and (pointer: fine){.bal-segment-item.bal-segment-item--invalid:not(.bal-segment-item--disabled):hover .bal-segment-item__button:not(.bal-segment-item__button--checked){color:var(--bal-segment-item-text-color-invalid-hovered)}}.bal-segment-item.bal-segment-item--invalid:not(.bal-segment-item--disabled):active .bal-segment-item__button:not(.bal-segment-item__button--checked){color:var(--bal-segment-item-text-color-invalid-pressed)}.bal-segment-item__button--invalid.bal-segment-item__button--checked{color:var(--bal-color-text-white)}.bal-segment-item__button--disabled{background:rgba(0,0,0,0);color:var(--bal-segment-item-text-color-disabled)}.bal-segment-item__button--disabled.bal-segment-item__button--checked{background:var(--bal-segment-item-indicator-background-disabled);color:var(--bal-segment-item-text-color-disabled-checked)}.bal-segment-item__button__slot--hidden{display:none !important}";
|
|
317
358
|
const BalSegmentItemStyle0 = balSegmentItemCss;
|
|
318
359
|
|
|
319
|
-
let
|
|
360
|
+
let SegmentItemIds = 0;
|
|
320
361
|
const SegmentItem = class {
|
|
321
362
|
constructor(hostRef) {
|
|
322
363
|
registerInstance(this, hostRef);
|
|
323
|
-
this.balBlur = createEvent(this, "balBlur", 7);
|
|
324
364
|
this.segmentEl = null;
|
|
325
365
|
this.inheritedAttributes = {};
|
|
326
|
-
this.
|
|
366
|
+
this.internalId = SegmentItemIds++;
|
|
367
|
+
this.inputId = `bal-si-${this.internalId}`;
|
|
327
368
|
this.updateVertical = (ev) => {
|
|
328
369
|
this.isVertical = ev.detail;
|
|
329
370
|
};
|
|
@@ -331,7 +372,7 @@ const SegmentItem = class {
|
|
|
331
372
|
const { segmentEl } = this;
|
|
332
373
|
if (segmentEl) {
|
|
333
374
|
if (segmentEl.value === '' || segmentEl.value === undefined || segmentEl.value === null) {
|
|
334
|
-
const items = this.
|
|
375
|
+
const items = this.allAvailableOptions;
|
|
335
376
|
if (items.length > 0) {
|
|
336
377
|
const first = items[0];
|
|
337
378
|
this.isFocusable = first === this.el;
|
|
@@ -344,6 +385,9 @@ const SegmentItem = class {
|
|
|
344
385
|
if (segmentEl.disabled) {
|
|
345
386
|
this.disabled = true;
|
|
346
387
|
}
|
|
388
|
+
this.isLast = segmentEl.lastElementChild === this.el;
|
|
389
|
+
this.isFirst = segmentEl.firstElementChild === this.el;
|
|
390
|
+
this.calculateEmptyValue();
|
|
347
391
|
}
|
|
348
392
|
};
|
|
349
393
|
this.onSlottedItemsChange = () => {
|
|
@@ -357,23 +401,35 @@ const SegmentItem = class {
|
|
|
357
401
|
this.hasSlotContent = false;
|
|
358
402
|
this.isFocusable = false;
|
|
359
403
|
this.isVertical = false;
|
|
404
|
+
this.isLast = false;
|
|
405
|
+
this.isFirst = false;
|
|
406
|
+
this.hasEmptyValue = true;
|
|
407
|
+
this.ariaForm = defaultBalAriaForm;
|
|
360
408
|
this.disabled = false;
|
|
361
409
|
this.invalid = false;
|
|
362
410
|
this.focused = false;
|
|
363
411
|
this.checked = false;
|
|
364
412
|
this.label = '';
|
|
365
|
-
this.value = 'bal-si-' + this.
|
|
413
|
+
this.value = 'bal-si-' + this.internalId;
|
|
366
414
|
}
|
|
367
|
-
valueChanged() {
|
|
368
|
-
|
|
415
|
+
valueChanged(newValue, oldValue) {
|
|
416
|
+
if (newValue !== oldValue) {
|
|
417
|
+
this.updateState();
|
|
418
|
+
}
|
|
369
419
|
}
|
|
370
|
-
|
|
420
|
+
componentWillLoad() {
|
|
421
|
+
this.inheritedAttributes = Object.assign({}, inheritAttributes(this.el, ['aria-label']));
|
|
422
|
+
}
|
|
423
|
+
componentDidLoad() {
|
|
371
424
|
const segmentEl = (this.segmentEl = this.el.closest('bal-segment'));
|
|
372
425
|
if (segmentEl) {
|
|
373
|
-
this.updateState();
|
|
374
426
|
addEventListener(segmentEl, 'balSelect', this.updateState);
|
|
375
427
|
addEventListener(segmentEl, 'balVertical', this.updateVertical);
|
|
376
428
|
}
|
|
429
|
+
raf(() => {
|
|
430
|
+
this.checkSlotContent();
|
|
431
|
+
this.updateState();
|
|
432
|
+
});
|
|
377
433
|
}
|
|
378
434
|
disconnectedCallback() {
|
|
379
435
|
const segmentEl = this.segmentEl;
|
|
@@ -383,11 +439,14 @@ const SegmentItem = class {
|
|
|
383
439
|
this.segmentEl = null;
|
|
384
440
|
}
|
|
385
441
|
}
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
442
|
+
calculateEmptyValue() {
|
|
443
|
+
if (this.segmentEl) {
|
|
444
|
+
const segments = Array.from(this.segmentEl.querySelectorAll('bal-segment-item'));
|
|
445
|
+
this.hasEmptyValue = !segments.some(item => item.value === this.segmentEl.value);
|
|
446
|
+
}
|
|
447
|
+
else {
|
|
448
|
+
this.hasEmptyValue = false;
|
|
449
|
+
}
|
|
391
450
|
}
|
|
392
451
|
/**
|
|
393
452
|
* @internal
|
|
@@ -400,54 +459,47 @@ const SegmentItem = class {
|
|
|
400
459
|
nativeEl.focus();
|
|
401
460
|
}
|
|
402
461
|
}
|
|
403
|
-
|
|
404
|
-
|
|
462
|
+
/**
|
|
463
|
+
* @internal
|
|
464
|
+
*/
|
|
465
|
+
async setAriaForm(ariaForm) {
|
|
466
|
+
this.ariaForm = Object.assign({}, ariaForm);
|
|
467
|
+
}
|
|
468
|
+
get allAvailableOptions() {
|
|
469
|
+
return this.allOptions.filter(item => !item.disabled);
|
|
405
470
|
}
|
|
406
|
-
get
|
|
471
|
+
get allOptions() {
|
|
407
472
|
const { segmentEl } = this;
|
|
408
473
|
if (segmentEl) {
|
|
409
474
|
return Array.from(segmentEl.querySelectorAll('bal-segment-item'));
|
|
410
475
|
}
|
|
411
476
|
return [];
|
|
412
477
|
}
|
|
413
|
-
isFirst() {
|
|
414
|
-
const { segmentEl } = this;
|
|
415
|
-
let items = this.items;
|
|
416
|
-
if (segmentEl && segmentEl.disabled) {
|
|
417
|
-
items = this.allItems;
|
|
418
|
-
}
|
|
419
|
-
if (items.length > 0) {
|
|
420
|
-
const first = items[0];
|
|
421
|
-
return first === this.el;
|
|
422
|
-
}
|
|
423
|
-
return false;
|
|
424
|
-
}
|
|
425
|
-
isLast() {
|
|
426
|
-
const { segmentEl } = this;
|
|
427
|
-
let items = this.items;
|
|
428
|
-
if (segmentEl && segmentEl.disabled) {
|
|
429
|
-
items = this.allItems;
|
|
430
|
-
}
|
|
431
|
-
if (items.length > 0) {
|
|
432
|
-
const last = items[items.length - 1];
|
|
433
|
-
return last === this.el;
|
|
434
|
-
}
|
|
435
|
-
return false;
|
|
436
|
-
}
|
|
437
478
|
checkSlotContent() {
|
|
438
479
|
const slot = this.el.querySelector('[part="slot"]');
|
|
439
480
|
const children = slot ? slot.innerHTML.trim() : '';
|
|
440
481
|
this.hasSlotContent = children.length > 0;
|
|
441
482
|
}
|
|
442
483
|
render() {
|
|
443
|
-
const { checked, focused, segmentEl, label, isFocusable } = this;
|
|
484
|
+
const { checked, focused, segmentEl, label, isFocusable, isFirst, hasEmptyValue } = this;
|
|
444
485
|
const block = BEM.block('segment-item');
|
|
445
486
|
const buttonBem = block.element('button');
|
|
446
487
|
const indicatorBem = block.element('indicator');
|
|
447
488
|
const invalid = this.invalid || (segmentEl && segmentEl.invalid);
|
|
448
489
|
const disabled = this.disabled || (segmentEl && segmentEl.disabled);
|
|
449
490
|
const vertical = this.isVertical;
|
|
450
|
-
|
|
491
|
+
const hasTabindex = (hasEmptyValue && isFirst) || (isFocusable && !disabled);
|
|
492
|
+
const id = (hasTabindex && this.ariaForm.controlId) || this.inputId;
|
|
493
|
+
let buttonAttributes = {};
|
|
494
|
+
if (hasTabindex) {
|
|
495
|
+
let labelId = this.ariaForm.labelId || null;
|
|
496
|
+
labelId = `${labelId || ''} ${id}-lbl`.trim();
|
|
497
|
+
buttonAttributes = {
|
|
498
|
+
'aria-labelledby': labelId,
|
|
499
|
+
'aria-describedby': this.ariaForm.messageId,
|
|
500
|
+
};
|
|
501
|
+
}
|
|
502
|
+
return (h(Host, { class: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, block.class()), block.modifier('vertical').class(vertical)), block.modifier('disabled').class(disabled)), block.modifier('checked').class(checked)), block.modifier('invalid').class(invalid)), block.modifier('last').class(this.isLast && !checked)) }, h("button", Object.assign({ id: id, role: "radio", "aria-checked": checked ? 'true' : 'false' }, buttonAttributes, { class: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, buttonBem.class()), buttonBem.modifier('checked').class(checked)), buttonBem.modifier('invalid').class(invalid)), buttonBem.modifier('disabled').class(disabled)), buttonBem.modifier('focused').class(focused)), buttonBem.modifier('vertical').class(vertical)), type: 'button', tabIndex: hasTabindex ? 0 : -1, part: "native", disabled: disabled, ref: el => (this.nativeEl = el) }, this.inheritedAttributes), h("bal-icon", { name: "check", size: "small", class: Object.assign(Object.assign(Object.assign({}, buttonBem.element('icon').class()), buttonBem.element('icon').modifier('animated').class(checked)), buttonBem.element('icon').modifier('vertical').class(vertical)), color: disabled ? 'grey-dark' : invalid ? 'white' : 'primary' }), h("bal-stack", { space: "x-small", layout: 'horizontal' }, h("bal-content", { space: "none" }, h("bal-label", { htmlId: `bal-si-${this.internalId}-label` }, label), h("span", { part: "slot", class: Object.assign({}, buttonBem.element('slot').modifier('hidden').class(!this.hasSlotContent)) }, ' ', h("slot", { onSlotchange: this.onSlottedItemsChange }))))), h("div", { class: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, indicatorBem.class()), indicatorBem.modifier('animated').class()), indicatorBem.modifier('background').class()), indicatorBem.modifier('disabled').class(disabled)), indicatorBem.modifier('invalid').class(invalid)), indicatorBem.modifier('checked').class(checked)), indicatorBem.modifier('vertical').class(vertical)) })));
|
|
451
503
|
}
|
|
452
504
|
get el() { return getElement(this); }
|
|
453
505
|
static get watchers() { return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, g as getElement } from './index-b6003bc7.js';
|
|
2
2
|
import { B as BEM } from './bem-8c7d2eb0.js';
|
|
3
|
-
import { f as balColorGrey4, g as balColorYellow3, h as balColorYellow5, i as balColorPurple3, j as balColorPurple6, k as balColorRed3, l as balColorRed5, m as balColorGreen3, n as balColorGreen6 } from './tokens.esm-
|
|
3
|
+
import { f as balColorGrey4, g as balColorYellow3, h as balColorYellow5, i as balColorPurple3, j as balColorPurple6, k as balColorRed3, l as balColorRed5, m as balColorGreen3, n as balColorGreen6 } from './tokens.esm-7cf87670.js';
|
|
4
4
|
|
|
5
5
|
const balShapeCss = ".bal-shape{display:block;overflow:hidden;border-radius:var(--bal-radius-normal);width:66px;height:66px}@media screen and (min-width: 769px),print{.bal-shape{width:120px;height:120px}}@media screen and (min-width: 1024px){.bal-shape{width:198px;height:198px;border-radius:unset}}.bal-shape--is-rotation-0{-webkit-transform:rotate(0deg);transform:rotate(0deg)}.bal-shape--is-rotation-90{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.bal-shape--is-rotation-180{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.bal-shape--is-rotation-270{-webkit-transform:rotate(270deg);transform:rotate(270deg)}";
|
|
6
6
|
const BalShapeStyle0 = balShapeCss;
|
|
@@ -6,9 +6,9 @@ import { L as Logger } from './log-dfd1c19f.js';
|
|
|
6
6
|
import { o as areArraysEqual } from './index.esm-cc299511.js';
|
|
7
7
|
import { s as stopEventBubbling } from './form-input-a8fdaaef.js';
|
|
8
8
|
import { n as newBalStepOption } from './bal-step.util-3905ad56.js';
|
|
9
|
-
import { b as balBreakpoints } from './breakpoints.subject-
|
|
9
|
+
import { b as balBreakpoints } from './breakpoints.subject-e3538fe7.js';
|
|
10
10
|
import { L as ListenToMutation } from './mutation.decorator-c7b24839.js';
|
|
11
|
-
import { L as ListenToBreakpoints } from './breakpoints.decorator-
|
|
11
|
+
import { L as ListenToBreakpoints } from './breakpoints.decorator-8a50482f.js';
|
|
12
12
|
import './browser-a8073d92.js';
|
|
13
13
|
import './icons.constant-a7885631.js';
|
|
14
14
|
import './config.utils-6ac6c9bd.js';
|
|
@@ -16,7 +16,7 @@ import './index-82aff103.js';
|
|
|
16
16
|
import './_commonjsHelpers-1c8beb5f.js';
|
|
17
17
|
import './device-8c6d2881.js';
|
|
18
18
|
import './listener-04842ae9.js';
|
|
19
|
-
import './tokens.esm-
|
|
19
|
+
import './tokens.esm-7cf87670.js';
|
|
20
20
|
|
|
21
21
|
const StepIcon = ({ item, isMobile }) => {
|
|
22
22
|
const bemEl = BEM.block('steps').element('nav').element('item').element('icon');
|
|
@@ -9,9 +9,9 @@ import { n as newBalTabOption } from './bal-tab.util-933315fe.js';
|
|
|
9
9
|
import { s as stopEventBubbling } from './form-input-a8fdaaef.js';
|
|
10
10
|
import { b as balBrowser } from './browser-a8073d92.js';
|
|
11
11
|
import { a as getComputedPadding } from './style-ca1bd202.js';
|
|
12
|
-
import { b as balBreakpoints } from './breakpoints.subject-
|
|
12
|
+
import { b as balBreakpoints } from './breakpoints.subject-e3538fe7.js';
|
|
13
13
|
import { L as ListenToMutation } from './mutation.decorator-c7b24839.js';
|
|
14
|
-
import { L as ListenToBreakpoints } from './breakpoints.decorator-
|
|
14
|
+
import { L as ListenToBreakpoints } from './breakpoints.decorator-8a50482f.js';
|
|
15
15
|
import { L as ListenToResize } from './resize.decorator-f70563b5.js';
|
|
16
16
|
import { L as ListenToConfig } from './config.decorator-d18abfe1.js';
|
|
17
17
|
import './index-82aff103.js';
|
|
@@ -20,7 +20,7 @@ import './icons.constant-a7885631.js';
|
|
|
20
20
|
import './config.utils-6ac6c9bd.js';
|
|
21
21
|
import './device-8c6d2881.js';
|
|
22
22
|
import './listener-04842ae9.js';
|
|
23
|
-
import './tokens.esm-
|
|
23
|
+
import './tokens.esm-7cf87670.js';
|
|
24
24
|
|
|
25
25
|
const TabItem = class {
|
|
26
26
|
constructor(hostRef) {
|