@baloise/ds-core 17.4.0-snapshot.1609-d2bcc38d3 → 17.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/all.d.ts +0 -2
- package/components/all.js +0 -3
- package/components/bal-app.js +93 -1
- package/components/bal-checkbox2.js +1 -1
- package/components/bal-close2.js +1 -1
- package/components/bal-date-calendar2.js +1 -1
- package/components/bal-modal.js +1 -1
- package/components/bal-radio2.js +1 -1
- package/components/bal-steps.js +1 -1
- package/components/bal-tabs2.js +1 -1
- package/components/bal-time-input.js +1 -1
- package/components/floating-ui.dom.esm.js +77 -205
- package/components/index.js +314 -7
- 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-00b2c8e27d.entry.js +1 -0
- package/dist/baloise-design-system/{p-9e489928.system.js → p-03470b7c.system.js} +1 -1
- package/dist/baloise-design-system/{p-0b6380a77a.entry.js → p-04e32e17e9.entry.js} +1 -1
- package/dist/baloise-design-system/{p-0a00140ece.system.entry.js → p-0831f02fb0.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-12af198b96.system.entry.js → p-1277f286b7.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-fa246bef.system.js → p-195ee683.system.js} +1 -1
- package/dist/baloise-design-system/{p-4dc30ed346.system.entry.js → p-1cbe7106ba.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-e4ff14c5bf.system.entry.js → p-242ac835e0.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-273fb2c2.system.js +1 -1
- package/dist/baloise-design-system/p-31876153a5.entry.js +1 -0
- package/dist/baloise-design-system/p-348f54acd8.entry.js +1 -0
- package/dist/baloise-design-system/{p-13d7688b.js → p-35baa468.js} +1 -1
- package/dist/baloise-design-system/p-36218e79.js +1 -0
- package/dist/baloise-design-system/{p-4affef9b9b.entry.js → p-396641837c.entry.js} +1 -1
- package/dist/baloise-design-system/p-3bc55789.js +1 -0
- package/dist/baloise-design-system/{p-3d5fac87cb.entry.js → p-3c1ea7b3e0.entry.js} +1 -1
- package/dist/baloise-design-system/p-3e039b9b6b.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-f669df60fb.entry.js → p-464f369ad6.entry.js} +1 -1
- package/dist/baloise-design-system/p-51e22c0c.js +1 -0
- package/dist/baloise-design-system/{p-8f2ebeb2.js → p-5940d4c2.js} +1 -1
- package/dist/baloise-design-system/{p-cf570c9464.entry.js → p-6267186e70.entry.js} +1 -1
- package/dist/baloise-design-system/{p-540bfa19.system.js → p-649e542e.system.js} +1 -1
- package/dist/baloise-design-system/{p-b721864305.entry.js → p-6be974c740.entry.js} +1 -1
- package/dist/baloise-design-system/{p-e0c8d647b3.system.entry.js → p-72a32388f4.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-44539ccf68.entry.js → p-75fedb78c3.entry.js} +1 -1
- package/dist/baloise-design-system/{p-deaa160f21.system.entry.js → p-7615b673a0.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-db9f48c0d5.system.entry.js → p-762c8fa651.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-6b14f26a4d.system.entry.js → p-78dada2c23.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-2d98519440.system.entry.js → p-7dbfc01060.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-7bd7839936.entry.js → p-80bf87ba56.entry.js} +1 -1
- package/dist/baloise-design-system/{p-6e4a8fa7.system.js → p-823eeecd.system.js} +1 -1
- package/dist/baloise-design-system/{p-341c9b6c63.entry.js → p-824353e256.entry.js} +1 -1
- package/dist/baloise-design-system/p-96cdf92a85.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-570a1d673a.entry.js → p-9aa95fbc37.entry.js} +1 -1
- package/dist/baloise-design-system/{p-71162da762.entry.js → p-9b73822c14.entry.js} +1 -1
- package/dist/baloise-design-system/p-9d2037e834.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-8869d8fe38.system.entry.js → p-9eeaac7842.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-c08cbae3ec.system.entry.js → p-a3141b6fbf.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-bb308299af.entry.js → p-a857e31d7e.entry.js} +1 -1
- package/dist/baloise-design-system/{p-4440f31c6b.system.entry.js → p-afa8aa0eec.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-525a4b8a95.entry.js → p-ba68f2ce70.entry.js} +1 -1
- package/dist/baloise-design-system/{p-34a93475db.system.entry.js → p-c2f12a9f5c.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-c6f5e9453a.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-3cb3bf6ca0.system.entry.js → p-c70043bd61.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-94b7fba934.entry.js → p-c8fae04995.entry.js} +1 -1
- package/dist/baloise-design-system/p-c991d944.js +1 -1
- package/dist/baloise-design-system/{p-363254ce.system.js → p-ca5cbdaf.system.js} +1 -1
- package/dist/baloise-design-system/{p-d5cb701b.system.js → p-cbef3146.system.js} +1 -1
- package/dist/baloise-design-system/{p-2697b88cca.entry.js → p-ccb73909c6.entry.js} +1 -1
- package/dist/baloise-design-system/p-d404537f.system.js +1 -0
- package/dist/baloise-design-system/{p-b2e3f97a3f.entry.js → p-d860cbbe40.entry.js} +1 -1
- package/dist/baloise-design-system/{p-070b692d.js → p-da6e6695.js} +1 -1
- package/dist/baloise-design-system/p-e2a70f10.system.js +1 -0
- package/dist/baloise-design-system/{p-be02300bdd.entry.js → p-e6b2f1a846.entry.js} +1 -1
- package/dist/baloise-design-system/{p-e562e98c7e.system.entry.js → p-ec4e5d4ecc.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-73fdcff369.entry.js → p-f5a0884f92.entry.js} +1 -1
- package/dist/baloise-design-system/{p-a8eef09399.system.entry.js → p-f7554b087f.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-f8c7a05b49.entry.js +1 -0
- package/dist/baloise-design-system/{p-5514228033.system.entry.js → p-f908b02917.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-e63b388285.system.entry.js → p-f9950a0b55.system.entry.js} +1 -1
- package/dist/cjs/{global-872cca8d.js → app-globals-fa3c14cc.js} +4 -2
- package/dist/cjs/bal-carousel_2.cjs.entry.js +3 -3
- package/dist/cjs/bal-checkbox_2.cjs.entry.js +1 -1
- package/dist/cjs/bal-close.cjs.entry.js +1 -1
- package/dist/cjs/bal-date-calendar_2.cjs.entry.js +1 -1
- package/dist/cjs/bal-date.cjs.entry.js +1 -1
- package/dist/cjs/bal-dropdown.cjs.entry.js +1 -1
- 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-modal_3.cjs.entry.js +1 -1
- 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-popup.cjs.entry.js +1 -1
- package/dist/cjs/bal-progress-bar.cjs.entry.js +4 -4
- package/dist/cjs/bal-radio_2.cjs.entry.js +1 -1
- package/dist/cjs/bal-segment_2.cjs.entry.js +4 -4
- package/dist/cjs/bal-shape.cjs.entry.js +1 -1
- package/dist/cjs/bal-steps.cjs.entry.js +4 -4
- package/dist/cjs/bal-tab-item_2.cjs.entry.js +4 -4
- package/dist/cjs/bal-time-input.cjs.entry.js +1 -1
- package/dist/cjs/bal-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/baloise-design-system.cjs.js +2 -3
- package/dist/cjs/{breakpoints.decorator-f4800188.js → breakpoints.decorator-a8a8d834.js} +1 -1
- package/dist/cjs/{breakpoints.subject-3244205b.js → breakpoints.subject-6e379a10.js} +1 -1
- package/dist/cjs/{floating-ui-838f057c.js → floating-ui-3147d2ff.js} +1 -1
- package/dist/cjs/{floating-ui.dom.esm-13e3f667.js → floating-ui.dom.esm-2ece9686.js} +77 -205
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/initialize-3059001f.js +1 -1
- package/dist/cjs/loader.cjs.js +2 -3
- package/dist/cjs/{tokens.esm-b1eb9ac4.js → tokens.esm-793904fc.js} +1 -1
- package/dist/cjs/{window-resize.decorator-6133d79a.js → window-resize.decorator-8ca25081.js} +1 -1
- package/dist/collection/collection-manifest.json +1 -2
- package/dist/collection/components/bal-checkbox/radio-checkbox.css +1 -1
- package/dist/collection/components/bal-close/bal-close.css +1 -1
- package/dist/collection/components/bal-date/bal-date-calendar/bal-date-calendar.css +1 -1
- package/dist/collection/components/bal-modal/bal-modal.css +1 -1
- package/dist/collection/components/bal-steps/bal-steps.css +1 -1
- package/dist/collection/components/bal-tabs/bal-tabs.css +1 -1
- package/dist/collection/components/bal-time-input/bal-time-input.css +1 -1
- package/dist/collection/utils/constants/version.constant.js +1 -1
- package/dist/esm/{global-181336dc.js → app-globals-5b18a75c.js} +4 -2
- package/dist/esm/bal-carousel_2.entry.js +3 -3
- package/dist/esm/bal-checkbox_2.entry.js +1 -1
- package/dist/esm/bal-close.entry.js +1 -1
- package/dist/esm/bal-date-calendar_2.entry.js +1 -1
- package/dist/esm/bal-date.entry.js +1 -1
- package/dist/esm/bal-dropdown.entry.js +1 -1
- 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-modal_3.entry.js +1 -1
- 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-popup.entry.js +1 -1
- package/dist/esm/bal-progress-bar.entry.js +4 -4
- package/dist/esm/bal-radio_2.entry.js +1 -1
- package/dist/esm/bal-segment_2.entry.js +4 -4
- package/dist/esm/bal-shape.entry.js +1 -1
- package/dist/esm/bal-steps.entry.js +4 -4
- package/dist/esm/bal-tab-item_2.entry.js +4 -4
- package/dist/esm/bal-time-input.entry.js +1 -1
- package/dist/esm/bal-tooltip.entry.js +1 -1
- package/dist/esm/baloise-design-system.js +2 -3
- package/dist/esm/{breakpoints.decorator-43a5539d.js → breakpoints.decorator-a6d3eb5c.js} +1 -1
- package/dist/esm/{breakpoints.subject-41117dc4.js → breakpoints.subject-02e0dc05.js} +1 -1
- package/dist/esm/{floating-ui-d05a7ad6.js → floating-ui-90bc6e58.js} +1 -1
- package/dist/esm/{floating-ui.dom.esm-efb93616.js → floating-ui.dom.esm-8dcdb8d6.js} +77 -205
- package/dist/esm/index.js +3 -3
- package/dist/esm/initialize-66a526c0.js +1 -1
- package/dist/esm/loader.js +2 -3
- package/dist/esm/{tokens.esm-376de6fe.js → tokens.esm-2c058527.js} +1 -1
- package/dist/esm/{window-resize.decorator-66d8fd79.js → window-resize.decorator-37add7cf.js} +1 -1
- package/dist/esm-es5/app-globals-5b18a75c.js +1 -0
- package/dist/esm-es5/bal-carousel_2.entry.js +1 -1
- package/dist/esm-es5/bal-checkbox_2.entry.js +1 -1
- package/dist/esm-es5/bal-close.entry.js +1 -1
- package/dist/esm-es5/bal-date-calendar_2.entry.js +1 -1
- package/dist/esm-es5/bal-date.entry.js +1 -1
- package/dist/esm-es5/bal-dropdown.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-modal_3.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-popup.entry.js +1 -1
- package/dist/esm-es5/bal-progress-bar.entry.js +1 -1
- package/dist/esm-es5/bal-radio_2.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/bal-time-input.entry.js +1 -1
- package/dist/esm-es5/bal-tooltip.entry.js +1 -1
- package/dist/esm-es5/baloise-design-system.js +1 -1
- package/dist/esm-es5/breakpoints.decorator-a6d3eb5c.js +1 -0
- package/dist/esm-es5/{breakpoints.subject-41117dc4.js → breakpoints.subject-02e0dc05.js} +1 -1
- package/dist/esm-es5/{floating-ui-d05a7ad6.js → floating-ui-90bc6e58.js} +1 -1
- package/dist/esm-es5/floating-ui.dom.esm-8dcdb8d6.js +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/initialize-66a526c0.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{window-resize.decorator-66d8fd79.js → window-resize.decorator-37add7cf.js} +1 -1
- package/dist/types/components.d.ts +0 -37
- package/package.json +8 -6
- package/components/bal-app2.js +0 -95
- package/components/bal-doc-app.d.ts +0 -11
- package/components/bal-doc-app.js +0 -262
- package/components/initialize.js +0 -312
- package/dist/baloise-design-system/p-07bae1fdcc.system.entry.js +0 -1
- package/dist/baloise-design-system/p-0d5459caac.system.entry.js +0 -1
- package/dist/baloise-design-system/p-10ff0eaf.js +0 -1
- package/dist/baloise-design-system/p-1c8e64e58b.system.entry.js +0 -1
- package/dist/baloise-design-system/p-2724ad9065.entry.js +0 -1
- package/dist/baloise-design-system/p-50f3b012.js +0 -1
- package/dist/baloise-design-system/p-55fc8522eb.system.entry.js +0 -1
- package/dist/baloise-design-system/p-59d9918c.system.js +0 -1
- package/dist/baloise-design-system/p-9fbf3690.system.js +0 -1
- package/dist/baloise-design-system/p-b21f2874.system.js +0 -1
- package/dist/baloise-design-system/p-c017695c41.entry.js +0 -1
- package/dist/baloise-design-system/p-e48a46d6d7.entry.js +0 -1
- package/dist/baloise-design-system/p-e4b50159.js +0 -1
- package/dist/baloise-design-system/p-ec5776f5.js +0 -1
- package/dist/baloise-design-system/p-f1849ab83d.entry.js +0 -1
- package/dist/baloise-design-system/p-f55c127cb5.system.entry.js +0 -1
- package/dist/baloise-design-system/p-ffe0476dde.entry.js +0 -1
- package/dist/cjs/app-globals-44d3a5af.js +0 -7
- package/dist/cjs/bal-doc-app.cjs.entry.js +0 -233
- 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 -247
- package/dist/esm/app-globals-c5ea8144.js +0 -5
- package/dist/esm/bal-doc-app.entry.js +0 -229
- package/dist/esm-es5/app-globals-c5ea8144.js +0 -1
- package/dist/esm-es5/bal-doc-app.entry.js +0 -1
- package/dist/esm-es5/breakpoints.decorator-43a5539d.js +0 -1
- package/dist/esm-es5/floating-ui.dom.esm-efb93616.js +0 -1
- package/dist/esm-es5/global-181336dc.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 -82
- /package/dist/baloise-design-system/{p-6e1e6cc5.js → p-25431930.js} +0 -0
- /package/dist/baloise-design-system/{p-b119ef19.system.js → p-80a4075f.system.js} +0 -0
- /package/dist/esm-es5/{tokens.esm-376de6fe.js → tokens.esm-2c058527.js} +0 -0
package/dist/baloise-design-system/{p-4440f31c6b.system.entry.js → p-afa8aa0eec.system.entry.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,e,n,a){function i(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,r){function o(t){try{d(a.next(t))}catch(t){r(t)}}function s(t){try{d(a["throw"](t))}catch(t){r(t)}}function d(t){t.done?n(t.value):i(t.value).then(o,s)}d((a=a.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},a,i,r,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(t){return function(e){return d([t,e])}}function d(s){if(a)throw new TypeError("Generator is already executing.");while(o&&(o=0,s[0]&&(n=0)),n)try{if(a=1,i&&(r=s[0]&2?i["return"]:s[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,s[1])).done)return r;if(i=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;i=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(r=n.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){n.label=s[1];break}if(s[0]===6&&n.label<r[1]){n.label=r[1];r=s;break}if(r&&n.label<r[2]){n.label=r[2];n.ops.push(s);break}if(r[2])n.ops.pop();n.trys.pop();continue}s=e.call(t,n)}catch(t){s=[6,t];i=0}finally{a=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-7961e095.system.js","./p-9727e05e.system.js","./p-5cd2674f.system.js","./p-f19ea306.system.js","./p-a1f6e944.system.js","./p-ef3bfa9f.system.js"],(function(t){"use strict";var e,n,a,i,r,o,s,d,l,c,u,m,f,h,_;return{setters:[function(t){e=t.r;n=t.c;a=t.w;i=t.h;r=t.H;o=t.g},function(t){s=t.p;d=t.d;l=t.e;c=t.F},function(t){u=t.c;m=t.h;f=t.i},function(t){h=t.B},function(t){_=t.b},function(){}],execute:function(){var b=this;var p=function(t,e,n,a,i){return __awaiter(b,void 0,void 0,(function(){var r;return __generator(this,(function(o){switch(o.label){case 0:if(t){return[2,t.attachViewToDom(e,n,i,a)]}if(typeof n!=="string"&&!(n instanceof HTMLElement)){throw new Error("framework delegate is missing")}r=typeof n==="string"?e.ownerDocument&&e.ownerDocument.createElement(n):n;if(a){a.forEach((function(t){return r.classList.add(t)}))}if(i){Object.assign(r,i)}e.appendChild(r);return[4,new Promise((function(t){return u(r,t)}))];case 1:o.sent();return[2,r]}}))}))};var g=function(t,e){if(e){if(t){var n=e.parentElement;return t.removeViewFromDom(n,e)}e.remove()}return Promise.resolve()};var v=function(t){var e={};w(t).forEach((function(t){return e[t]=true}));return e};var w=function(t){if(t!==undefined){var e=Array.isArray(t)?t:t.split(" ");return e.filter((function(t){return t!=null})).map((function(t){return t.trim()})).filter((function(t){return t!==""}))}return[]};var y=".bal-modal,.bal-modal__background{bottom:0;left:0;position:absolute;right:0;top:0}:root{--bal-modal-background:var(--bal-color-white);--bal-modal-backdrop-background:var(--bal-color-primary-6);--bal-modal-backdrop-opacity:.6;--bal-modal-radius:var(--bal-radius-large)}.bal-modal{-ms-flex-align:center;align-items:center;display:none;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:start;justify-content:flex-start;overflow:hidden;position:fixed;z-index:var(--bal-z-index-modal)}.bal-modal--is-active{display:-ms-flexbox;display:flex}.bal-modal__background{background:var(--bal-modal-backdrop-background);opacity:var(--bal-modal-backdrop-opacity)}.bal-modal__header__title{padding-right:2.5rem;line-height:2rem}.bal-modal__header__close{position:absolute !important;display:-ms-flexbox !important;display:flex !important;right:1.25rem !important;top:1.5rem !important;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-width:2rem;max-width:2rem;min-height:2rem;max-height:2rem}.bal-modal__container{position:fixed;top:0;bottom:0;left:0;right:0;overflow-x:none;overflow-y:auto;-ms-overflow-y:visible;padding:.5rem}@media screen and (min-width: 769px),print{.bal-modal__container{padding:0}}.bal-modal__content{overflow:none;position:relative;width:100%;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;background:var(--bal-modal-background);border-radius:var(--bal-modal-radius);padding:1rem}@media screen and (min-width: 769px),print{.bal-modal__content{margin:3rem auto;width:var(--bal-modal-width, var(--bal-width, 40rem))}}.bal-modal__content .bal-modal__header{padding-bottom:1rem}.bal-modal__content .bal-modal__header__close{right:1.2rem !important;top:.7rem !important}@media screen and (min-width: 769px),print{.bal-modal__content{padding:1.5rem}.bal-modal__content .bal-modal__header{padding-bottom:1.5rem}.bal-modal__content .bal-modal__header__close{right:1.6rem !important;top:1.2rem !important}}@media screen and (min-width: 1024px){.bal-modal__content{padding:2.5rem}.bal-modal__content .bal-modal__header{padding-bottom:2.5rem}.bal-modal__content .bal-modal__header__close{right:2.7rem !important;top:2.2rem !important}}@media screen and (min-width: 769px),print{.bal-modal__content--has-spacing-small{padding:1rem}.bal-modal__content--has-spacing-small .bal-modal__header{padding-bottom:1rem}.bal-modal__content--has-spacing-small .bal-modal__header__close{right:1.1rem !important;top:.7rem !important}}@media screen and (min-width: 1024px){.bal-modal__content--has-spacing-small{padding:1rem}.bal-modal__content--has-spacing-small .bal-modal__header{padding-bottom:1rem}.bal-modal__content--has-spacing-small .bal-modal__header__close{right:1.1rem !important;top:.7rem !important}}@media screen and (min-width: 769px),print{.bal-modal__content--has-spacing-medium{padding:1.5rem}.bal-modal__content--has-spacing-medium .bal-modal__header{padding-bottom:1.5rem}.bal-modal__content--has-spacing-medium .bal-modal__header__close{right:1.6rem !important;top:1.2rem !important}}@media screen and (min-width: 1024px){.bal-modal__content--has-spacing-medium{padding:1.5rem}.bal-modal__content--has-spacing-medium .bal-modal__header{padding-bottom:1.5rem}.bal-modal__content--has-spacing-medium .bal-modal__header__close{right:1.6rem !important;top:1.2rem !important}}.bal-modal__body>bal-button-group{padding-top:1rem}";var x=y;var k=t("bal_modal",function(){function t(t){e(this,t);this.didPresent=n(this,"balModalDidPresent",7);this.willPresent=n(this,"balModalWillPresent",7);this.willDismiss=n(this,"balModalWillDismiss",7);this.didDismiss=n(this,"balModalDidDismiss",7);this.isClickedOutsideOnMouseDown=false;this.isClickedOutsideOnMouseUp=false;this.bodyScrollHandler=new h;this.presented=false;this.overlayIndex=undefined;this.delegate=undefined;this.dataTestId=undefined;this.modalWidth=640;this.space="";this.hasBackdrop=true;this.isClosable=true;this.component=undefined;this.componentProps=undefined;this.cssClass=undefined;this.backdropDismiss=true;this.focusTrap=true;this.demo=false}t.prototype.connectedCallback=function(){this.bodyScrollHandler.connect();s(this);if(_.hasDocument&&this.demo){this.open()}};t.prototype.disconnectedCallback=function(){this.bodyScrollHandler.disconnect()};t.prototype.open=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(e){switch(e.label){case 0:return[4,m(this.usersElement)];case 1:e.sent();this.setModalActiveOnBody();a((function(){if(t.modalBackgroundElement){t.modalBackgroundElement.classList.add("fadeIn")}if(t.modalContentElement){t.modalContentElement.classList.add("fadeInDown")}}));if(this.presented){return[2]}this.willPresent.emit();this.presented=true;return[4,f(150)];case 2:e.sent();a((function(){if(t.modalBackgroundElement){t.modalBackgroundElement.classList.remove("fadeIn")}if(t.modalContentElement){t.modalContentElement.classList.remove("fadeInDown")}}));this.didPresent.emit();return[2]}}))}))};t.prototype.close=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.willDismiss.emit();this.unsetModalActiveOnBody();this.presented=false;this.didDismiss.emit();return[2]}))}))};t.prototype.present=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,n;return __generator(this,(function(a){switch(a.label){case 0:this.setModalActiveOnBody();if(this.presented){return[2]}t=this.el.querySelector(".bal-modal__content");if(!t){throw new Error("container is undefined")}e=Object.assign(Object.assign({},this.componentProps),{modal:this.el});n=this;return[4,p(this.delegate,t,this.component,[],e)];case 1:n.usersElement=a.sent();return[4,this.open()];case 2:a.sent();return[2]}}))}))};t.prototype.dismiss=function(t,e){return __awaiter(this,void 0,void 0,(function(){var n;var i=this;return __generator(this,(function(r){switch(r.label){case 0:this.unsetModalActiveOnBody();if(!(this.delegate===undefined))return[3,2];return[4,this.close()];case 1:r.sent();return[2,true];case 2:return[4,d(this,t,e,(function(){return __awaiter(i,void 0,void 0,(function(){var t=this;return __generator(this,(function(e){switch(e.label){case 0:a((function(){if(t.modalBackgroundElement){t.modalBackgroundElement.classList.add("fadeOut")}if(t.modalContentElement){t.modalContentElement.classList.add("fadeOutUp")}}));return[4,f(140)];case 1:e.sent();return[2]}}))}))}))];case 3:n=r.sent();if(!n)return[3,5];return[4,g(this.delegate,this.usersElement)];case 4:r.sent();r.label=5;case 5:return[2,n]}}))}))};t.prototype.onDidDismiss=function(){return l(this.el,"balModalDidDismiss")};t.prototype.onWillDismiss=function(){return l(this.el,"balModalWillDismiss")};t.prototype.onClickCloseButton=function(t){return __awaiter(this,void 0,void 0,(function(){var e,n;return __generator(this,(function(a){switch(a.label){case 0:if(!(this.isClosable&&this.presented&&t&&t.target))return[3,4];e=t.target;n=e.closest("bal-button");if(!(n&&n.hasAttribute("modal-close")))return[3,2];return[4,this.dismiss(undefined,"model-close")];case 1:a.sent();a.label=2;case 2:if(!(this.backdropDismiss&&this.isClickedOutsideOnMouseUp&&this.isClickedOutsideOnMouseDown))return[3,4];return[4,this.dismiss(undefined,"model-close")];case 3:a.sent();a.label=4;case 4:return[2]}}))}))};t.prototype.onMouseDown=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.isClickedOutsideOnMouseDown=this.isClickedOutside(t);return[2]}))}))};t.prototype.onMouseUp=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.isClickedOutsideOnMouseUp=this.isClickedOutside(t);return[2]}))}))};t.prototype.handleKeyUp=function(t){return __awaiter(this,void 0,void 0,(function(){var e,n,a;return __generator(this,(function(i){switch(i.label){case 0:e=Array.from(document.querySelectorAll("bal-modal")).filter((function(t){return t.hasAttribute("aria-presented")}));n=e.map((function(t){return t.overlayIndex})).map((function(t){return parseInt(t)})).filter((function(t){return!Number.isNaN(t)}));a=Math.max.apply(Math,n);if(!(this.overlayIndex===a))return[3,4];t.preventDefault();t.stopPropagation();if(!(this.presented&&this.isClosable))return[3,4];if(!(t.key==="Escape"||t.key==="Esc"))return[3,4];if(!this.delegate)return[3,2];return[4,this.dismiss(undefined,"model-escape")];case 1:i.sent();return[3,4];case 2:return[4,this.close()];case 3:i.sent();i.label=4;case 4:return[2]}}))}))};t.prototype.setModalActiveOnBody=function(){if(!this.demo){this.bodyScrollHandler.disable()}};t.prototype.unsetModalActiveOnBody=function(){this.bodyScrollHandler.enable()};t.prototype.isClickedOutside=function(t){if(this.isClosable&&this.presented&&t&&t.target&&this.backdropDismiss){var e=t.target;return e.classList.contains("bal-modal__container")}return false};t.prototype.render=function(){var t,e;var n=this;return i(r,{key:"0117e63bcdf529eee9b754275b3f82335a7274b5","aria-modal":"true","aria-presented":this.presented?"true":null,"data-testid":this.dataTestId,tabindex:"-1",class:Object.assign((t={"bal-modal":true,"bal-modal--is-closable":this.isClosable,"bal-modal--is-active":this.presented},t[c]=this.focusTrap===false,t),v(this.cssClass)),style:{"--bal-width":"".concat(this.modalWidth,"px")}},i("div",{key:"d566874640e88e886438f0ada7c6073c99539d8c",class:{"bal-modal__background":true,"is-hidden":!this.hasBackdrop},ref:function(t){return n.modalBackgroundElement=t}}),i("div",{key:"654dda321cef68bb052b042f2cae54a2882e7483",class:{"bal-modal__container":true},ref:function(t){return n.modalContainerElement=t}},i("div",{key:"9778735ba48d6db90aeb9098d3885a3813fc4c3c",class:(e={"bal-modal__content":true},e["bal-modal__content--has-spacing-".concat(this.space)]=true,e),ref:function(t){return n.modalContentElement=t}},i("slot",{key:"c797ba16081d241799e8ea0d36793cd1deff1e9b"}))))};Object.defineProperty(t.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});return t}());k.style=x;var j=t("bal_modal_body",function(){function t(t){e(this,t)}t.prototype.render=function(){return i(r,{key:"832389ef4fb2876265130421194e971d14c1d664",class:"bal-modal__body"},i("slot",{key:"8a0e7b7bc0f015b9d1a208767214964e1a6a083d"}))};return t}());var M=t("bal_modal_header",function(){function t(t){var n=this;e(this,t);this.closeHandler=function(){if(n.parentModal){n.parentModal.dismiss(undefined,"model-close")}}}Object.defineProperty(t.prototype,"parentModal",{get:function(){return this.el.closest("bal-modal")},enumerable:false,configurable:true});t.prototype.render=function(){var t;return i(r,{key:"a168b477c3b25d6b634cae28dfdfe80662835c28",class:"bal-modal__header"},i("div",{key:"ede951e810c8dd9ee74f18bd2aaeb9938256eaa0",class:"bal-modal__header__title"},i("bal-heading",{key:"58aa9747176c2fb610b3d5e269b5e5318e6f1545",level:"h2",space:"none"},i("slot",{key:"35b58496692d5fafadba77727cd60a70f507b327"}))),((t=this.parentModal)===null||t===void 0?void 0:t.isClosable)?i("bal-close",{class:"bal-modal__header__close data-test-modal-close",onClick:this.closeHandler}):"")};Object.defineProperty(t.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});return t}())}}}));
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,e,n,a){function i(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,r){function o(t){try{d(a.next(t))}catch(t){r(t)}}function s(t){try{d(a["throw"](t))}catch(t){r(t)}}function d(t){t.done?n(t.value):i(t.value).then(o,s)}d((a=a.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},a,i,r,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(t){return function(e){return d([t,e])}}function d(s){if(a)throw new TypeError("Generator is already executing.");while(o&&(o=0,s[0]&&(n=0)),n)try{if(a=1,i&&(r=s[0]&2?i["return"]:s[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,s[1])).done)return r;if(i=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;i=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(r=n.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){n.label=s[1];break}if(s[0]===6&&n.label<r[1]){n.label=r[1];r=s;break}if(r&&n.label<r[2]){n.label=r[2];n.ops.push(s);break}if(r[2])n.ops.pop();n.trys.pop();continue}s=e.call(t,n)}catch(t){s=[6,t];i=0}finally{a=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-7961e095.system.js","./p-9727e05e.system.js","./p-5cd2674f.system.js","./p-f19ea306.system.js","./p-a1f6e944.system.js","./p-ef3bfa9f.system.js"],(function(t){"use strict";var e,n,a,i,r,o,s,d,l,c,u,m,f,h,_;return{setters:[function(t){e=t.r;n=t.c;a=t.w;i=t.h;r=t.H;o=t.g},function(t){s=t.p;d=t.d;l=t.e;c=t.F},function(t){u=t.c;m=t.h;f=t.i},function(t){h=t.B},function(t){_=t.b},function(){}],execute:function(){var b=this;var p=function(t,e,n,a,i){return __awaiter(b,void 0,void 0,(function(){var r;return __generator(this,(function(o){switch(o.label){case 0:if(t){return[2,t.attachViewToDom(e,n,i,a)]}if(typeof n!=="string"&&!(n instanceof HTMLElement)){throw new Error("framework delegate is missing")}r=typeof n==="string"?e.ownerDocument&&e.ownerDocument.createElement(n):n;if(a){a.forEach((function(t){return r.classList.add(t)}))}if(i){Object.assign(r,i)}e.appendChild(r);return[4,new Promise((function(t){return u(r,t)}))];case 1:o.sent();return[2,r]}}))}))};var g=function(t,e){if(e){if(t){var n=e.parentElement;return t.removeViewFromDom(n,e)}e.remove()}return Promise.resolve()};var v=function(t){var e={};w(t).forEach((function(t){return e[t]=true}));return e};var w=function(t){if(t!==undefined){var e=Array.isArray(t)?t:t.split(" ");return e.filter((function(t){return t!=null})).map((function(t){return t.trim()})).filter((function(t){return t!==""}))}return[]};var y=".bal-modal__background,.bal-modal{bottom:0;left:0;position:absolute;right:0;top:0}:root{--bal-modal-background:var(--bal-color-white);--bal-modal-backdrop-background:var(--bal-color-primary-6);--bal-modal-backdrop-opacity:.6;--bal-modal-radius:var(--bal-radius-large)}.bal-modal{-ms-flex-align:center;align-items:center;display:none;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:start;justify-content:flex-start;overflow:hidden;position:fixed;z-index:var(--bal-z-index-modal)}.bal-modal--is-active{display:-ms-flexbox;display:flex}.bal-modal__background{background:var(--bal-modal-backdrop-background);opacity:var(--bal-modal-backdrop-opacity)}.bal-modal__header__title{padding-right:2.5rem;line-height:2rem}.bal-modal__header__close{position:absolute !important;display:-ms-flexbox !important;display:flex !important;right:1.25rem !important;top:1.5rem !important;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-width:2rem;max-width:2rem;min-height:2rem;max-height:2rem}.bal-modal__container{position:fixed;top:0;bottom:0;left:0;right:0;overflow-x:none;overflow-y:auto;-ms-overflow-y:visible;padding:.5rem}@media screen and (min-width: 769px),print{.bal-modal__container{padding:0}}.bal-modal__content{overflow:none;position:relative;width:100%;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;background:var(--bal-modal-background);border-radius:var(--bal-modal-radius);padding:1rem}@media screen and (min-width: 769px),print{.bal-modal__content{margin:3rem auto;width:var(--bal-modal-width, var(--bal-width, 40rem))}}.bal-modal__content .bal-modal__header{padding-bottom:1rem}.bal-modal__content .bal-modal__header__close{right:1.2rem !important;top:.7rem !important}@media screen and (min-width: 769px),print{.bal-modal__content{padding:1.5rem}.bal-modal__content .bal-modal__header{padding-bottom:1.5rem}.bal-modal__content .bal-modal__header__close{right:1.6rem !important;top:1.2rem !important}}@media screen and (min-width: 1024px){.bal-modal__content{padding:2.5rem}.bal-modal__content .bal-modal__header{padding-bottom:2.5rem}.bal-modal__content .bal-modal__header__close{right:2.7rem !important;top:2.2rem !important}}@media screen and (min-width: 769px),print{.bal-modal__content--has-spacing-small{padding:1rem}.bal-modal__content--has-spacing-small .bal-modal__header{padding-bottom:1rem}.bal-modal__content--has-spacing-small .bal-modal__header__close{right:1.1rem !important;top:.7rem !important}}@media screen and (min-width: 1024px){.bal-modal__content--has-spacing-small{padding:1rem}.bal-modal__content--has-spacing-small .bal-modal__header{padding-bottom:1rem}.bal-modal__content--has-spacing-small .bal-modal__header__close{right:1.1rem !important;top:.7rem !important}}@media screen and (min-width: 769px),print{.bal-modal__content--has-spacing-medium{padding:1.5rem}.bal-modal__content--has-spacing-medium .bal-modal__header{padding-bottom:1.5rem}.bal-modal__content--has-spacing-medium .bal-modal__header__close{right:1.6rem !important;top:1.2rem !important}}@media screen and (min-width: 1024px){.bal-modal__content--has-spacing-medium{padding:1.5rem}.bal-modal__content--has-spacing-medium .bal-modal__header{padding-bottom:1.5rem}.bal-modal__content--has-spacing-medium .bal-modal__header__close{right:1.6rem !important;top:1.2rem !important}}.bal-modal__body>bal-button-group{padding-top:1rem}";var x=y;var k=t("bal_modal",function(){function t(t){e(this,t);this.didPresent=n(this,"balModalDidPresent",7);this.willPresent=n(this,"balModalWillPresent",7);this.willDismiss=n(this,"balModalWillDismiss",7);this.didDismiss=n(this,"balModalDidDismiss",7);this.isClickedOutsideOnMouseDown=false;this.isClickedOutsideOnMouseUp=false;this.bodyScrollHandler=new h;this.presented=false;this.overlayIndex=undefined;this.delegate=undefined;this.dataTestId=undefined;this.modalWidth=640;this.space="";this.hasBackdrop=true;this.isClosable=true;this.component=undefined;this.componentProps=undefined;this.cssClass=undefined;this.backdropDismiss=true;this.focusTrap=true;this.demo=false}t.prototype.connectedCallback=function(){this.bodyScrollHandler.connect();s(this);if(_.hasDocument&&this.demo){this.open()}};t.prototype.disconnectedCallback=function(){this.bodyScrollHandler.disconnect()};t.prototype.open=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(e){switch(e.label){case 0:return[4,m(this.usersElement)];case 1:e.sent();this.setModalActiveOnBody();a((function(){if(t.modalBackgroundElement){t.modalBackgroundElement.classList.add("fadeIn")}if(t.modalContentElement){t.modalContentElement.classList.add("fadeInDown")}}));if(this.presented){return[2]}this.willPresent.emit();this.presented=true;return[4,f(150)];case 2:e.sent();a((function(){if(t.modalBackgroundElement){t.modalBackgroundElement.classList.remove("fadeIn")}if(t.modalContentElement){t.modalContentElement.classList.remove("fadeInDown")}}));this.didPresent.emit();return[2]}}))}))};t.prototype.close=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.willDismiss.emit();this.unsetModalActiveOnBody();this.presented=false;this.didDismiss.emit();return[2]}))}))};t.prototype.present=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,n;return __generator(this,(function(a){switch(a.label){case 0:this.setModalActiveOnBody();if(this.presented){return[2]}t=this.el.querySelector(".bal-modal__content");if(!t){throw new Error("container is undefined")}e=Object.assign(Object.assign({},this.componentProps),{modal:this.el});n=this;return[4,p(this.delegate,t,this.component,[],e)];case 1:n.usersElement=a.sent();return[4,this.open()];case 2:a.sent();return[2]}}))}))};t.prototype.dismiss=function(t,e){return __awaiter(this,void 0,void 0,(function(){var n;var i=this;return __generator(this,(function(r){switch(r.label){case 0:this.unsetModalActiveOnBody();if(!(this.delegate===undefined))return[3,2];return[4,this.close()];case 1:r.sent();return[2,true];case 2:return[4,d(this,t,e,(function(){return __awaiter(i,void 0,void 0,(function(){var t=this;return __generator(this,(function(e){switch(e.label){case 0:a((function(){if(t.modalBackgroundElement){t.modalBackgroundElement.classList.add("fadeOut")}if(t.modalContentElement){t.modalContentElement.classList.add("fadeOutUp")}}));return[4,f(140)];case 1:e.sent();return[2]}}))}))}))];case 3:n=r.sent();if(!n)return[3,5];return[4,g(this.delegate,this.usersElement)];case 4:r.sent();r.label=5;case 5:return[2,n]}}))}))};t.prototype.onDidDismiss=function(){return l(this.el,"balModalDidDismiss")};t.prototype.onWillDismiss=function(){return l(this.el,"balModalWillDismiss")};t.prototype.onClickCloseButton=function(t){return __awaiter(this,void 0,void 0,(function(){var e,n;return __generator(this,(function(a){switch(a.label){case 0:if(!(this.isClosable&&this.presented&&t&&t.target))return[3,4];e=t.target;n=e.closest("bal-button");if(!(n&&n.hasAttribute("modal-close")))return[3,2];return[4,this.dismiss(undefined,"model-close")];case 1:a.sent();a.label=2;case 2:if(!(this.backdropDismiss&&this.isClickedOutsideOnMouseUp&&this.isClickedOutsideOnMouseDown))return[3,4];return[4,this.dismiss(undefined,"model-close")];case 3:a.sent();a.label=4;case 4:return[2]}}))}))};t.prototype.onMouseDown=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.isClickedOutsideOnMouseDown=this.isClickedOutside(t);return[2]}))}))};t.prototype.onMouseUp=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.isClickedOutsideOnMouseUp=this.isClickedOutside(t);return[2]}))}))};t.prototype.handleKeyUp=function(t){return __awaiter(this,void 0,void 0,(function(){var e,n,a;return __generator(this,(function(i){switch(i.label){case 0:e=Array.from(document.querySelectorAll("bal-modal")).filter((function(t){return t.hasAttribute("aria-presented")}));n=e.map((function(t){return t.overlayIndex})).map((function(t){return parseInt(t)})).filter((function(t){return!Number.isNaN(t)}));a=Math.max.apply(Math,n);if(!(this.overlayIndex===a))return[3,4];t.preventDefault();t.stopPropagation();if(!(this.presented&&this.isClosable))return[3,4];if(!(t.key==="Escape"||t.key==="Esc"))return[3,4];if(!this.delegate)return[3,2];return[4,this.dismiss(undefined,"model-escape")];case 1:i.sent();return[3,4];case 2:return[4,this.close()];case 3:i.sent();i.label=4;case 4:return[2]}}))}))};t.prototype.setModalActiveOnBody=function(){if(!this.demo){this.bodyScrollHandler.disable()}};t.prototype.unsetModalActiveOnBody=function(){this.bodyScrollHandler.enable()};t.prototype.isClickedOutside=function(t){if(this.isClosable&&this.presented&&t&&t.target&&this.backdropDismiss){var e=t.target;return e.classList.contains("bal-modal__container")}return false};t.prototype.render=function(){var t,e;var n=this;return i(r,{key:"0117e63bcdf529eee9b754275b3f82335a7274b5","aria-modal":"true","aria-presented":this.presented?"true":null,"data-testid":this.dataTestId,tabindex:"-1",class:Object.assign((t={"bal-modal":true,"bal-modal--is-closable":this.isClosable,"bal-modal--is-active":this.presented},t[c]=this.focusTrap===false,t),v(this.cssClass)),style:{"--bal-width":"".concat(this.modalWidth,"px")}},i("div",{key:"d566874640e88e886438f0ada7c6073c99539d8c",class:{"bal-modal__background":true,"is-hidden":!this.hasBackdrop},ref:function(t){return n.modalBackgroundElement=t}}),i("div",{key:"654dda321cef68bb052b042f2cae54a2882e7483",class:{"bal-modal__container":true},ref:function(t){return n.modalContainerElement=t}},i("div",{key:"9778735ba48d6db90aeb9098d3885a3813fc4c3c",class:(e={"bal-modal__content":true},e["bal-modal__content--has-spacing-".concat(this.space)]=true,e),ref:function(t){return n.modalContentElement=t}},i("slot",{key:"c797ba16081d241799e8ea0d36793cd1deff1e9b"}))))};Object.defineProperty(t.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});return t}());k.style=x;var j=t("bal_modal_body",function(){function t(t){e(this,t)}t.prototype.render=function(){return i(r,{key:"832389ef4fb2876265130421194e971d14c1d664",class:"bal-modal__body"},i("slot",{key:"8a0e7b7bc0f015b9d1a208767214964e1a6a083d"}))};return t}());var M=t("bal_modal_header",function(){function t(t){var n=this;e(this,t);this.closeHandler=function(){if(n.parentModal){n.parentModal.dismiss(undefined,"model-close")}}}Object.defineProperty(t.prototype,"parentModal",{get:function(){return this.el.closest("bal-modal")},enumerable:false,configurable:true});t.prototype.render=function(){var t;return i(r,{key:"a168b477c3b25d6b634cae28dfdfe80662835c28",class:"bal-modal__header"},i("div",{key:"ede951e810c8dd9ee74f18bd2aaeb9938256eaa0",class:"bal-modal__header__title"},i("bal-heading",{key:"58aa9747176c2fb610b3d5e269b5e5318e6f1545",level:"h2",space:"none"},i("slot",{key:"35b58496692d5fafadba77727cd60a70f507b327"}))),((t=this.parentModal)===null||t===void 0?void 0:t.isClosable)?i("bal-close",{class:"bal-modal__header__close data-test-modal-close",onClick:this.closeHandler}):"")};Object.defineProperty(t.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});return t}())}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,h as s,H as a,g as e}from"./p-2ccbe55a.js";import{_ as o,a as n}from"./p-43c9f5e9.js";import{B as p}from"./p-ae86d0a0.js";import{b as r}from"./p-a65354df.js";import{s as h}from"./p-e3e1d211.js";import{k as l}from"./p-ef6a64f4.js";import{L as c}from"./p-b77e3348.js";import{f as d}from"./p-ca119357.js";import{b}from"./p-13d7688b.js";import{c as u}from"./p-dc98854c.js";import"./p-46251973.js";class v{showContainerElement(t){t.containerEl&&this.showElement(t.containerEl)}hideContainerElement(t){t.containerEl&&this.hideElement(t.containerEl)}showArrowElement(t,i=t.arrow){i&&t.arrowEl&&this.showElement(t.arrowEl)}hideArrowElement(t){t.arrowEl&&Object.assign(t.arrowEl.style,{left:"",top:"",display:"none",visibility:"hidden"})}showBackdropElement(t,i=t.backdrop){i&&t.backdropEl&&this.showElement(t.backdropEl)}hideBackdropElement(t){t.backdropEl&&this.hideElement(t.backdropEl)}showElement(t){t&&(t.style.setProperty("display","block"),t.style.setProperty("visibility","visible"))}hideElement(t){t&&(t.style.removeProperty("display"),t.style.removeProperty("visibility"))}}class m extends v{constructor(){super(...arguments),this.backdrop=!1,this.offset=0}async present(t){return!!(t.containerEl&&t.trigger&&t.backdropEl)&&(this.backdrop=t.getBooleanValue(t.trigger,"bal-popup-backdrop",t.backdrop),this.offset=t.getValue(t.trigger,"bal-popup-offset",t.offset),t.containerEl.style.setProperty("inset","auto 0px 0px 0px"),t.containerEl.style.setProperty("bottom",`${this.offset}px`),t.backdropEl.style.setProperty("bottom",`${this.offset}px`),this.showBackdropElement(t,this.backdrop),this.showContainerElement(t),!0)}async update(t){return!1}async dismiss(t){return!(!t.containerEl||!t.backdropEl||(t.balWillAnimate.emit(),this.hideBackdropElement(t),this.hideContainerElement(t),t.containerEl.style.removeProperty("inset"),t.containerEl.style.removeProperty("bottom"),t.backdropEl.style.removeProperty("bottom"),0))}}class w extends v{constructor(){super(...arguments),this.offset=0}async present(t){return!(!t.containerEl||!t.trigger||(this.offset=t.getValue(t.trigger,"bal-popup-offset",t.offset),t.containerEl.style.setProperty("inset",`${this.offset}px auto auto 0px`),this.offset>0&&t.containerEl.style.setProperty("box-shadow","inset var(--bal-nav-meta-bar-variant-white-shadow)"),this.showBackdropElement(t),this.showContainerElement(t),this.hideArrowElement(t),0))}async update(t){return!1}async dismiss(t){return!!t.containerEl&&(this.hideBackdropElement(t),this.hideContainerElement(t),this.hideArrowElement(t),t.containerEl.style.removeProperty("box-shadow"),t.containerEl.style.removeProperty("inset"),!0)}}class g extends v{constructor(){super(...arguments),this.placement="bottom",this.offset=0,this.arrow=!1,this.backdrop=!1,this.reference=void 0,this.triggerEl=null}async present(t){const i=await b.load();if(!t.trigger&&r.hasDocument){const i=Array.from(document.querySelectorAll(`[bal-popup="${t.el.id}"]`))[0];t.trigger=i}if(t.trigger&&t.containerEl&&t.arrowEl){if(this.placement=t.getValue(t.trigger,"bal-popup-placement",t.placement),this.arrow=t.getBooleanValue(t.trigger,"bal-popup-arrow",t.arrow),this.backdrop=t.getBooleanValue(t.trigger,"bal-popup-backdrop",t.backdrop),this.reference=t.getValue(t.trigger,"bal-popup-reference",t.reference),this.offset=t.getNumberValue(t.trigger,"bal-popup-offset",t.offset),this.triggerEl=t.trigger,this.reference&&r.hasDocument){const i=document.getElementById(this.reference);this.triggerEl=i||t.trigger}if(this.triggerEl)return this.showContainerElement(t),this.showBackdropElement(t,this.backdrop),this.showArrowElement(t,this.arrow),this.triggerEl.classList.add("bal-popup-variant-popover-trigger"),"bottom-end"===this.placement&&this.triggerEl!==t.trigger&&t.setMinWidth(this.triggerEl.clientWidth),this.cleanup=i.autoUpdate(this.triggerEl,t.containerEl,(()=>{this.update(t)}),{ancestorScroll:!0,ancestorResize:!0,elementResize:!1,layoutShift:!0,animationFrame:!0}),!0}return!1}async update(t){var i,s;if(this.triggerEl&&t.trigger&&t.containerEl&&t.arrowEl){const a=await b.load(),e="bottom-end"===this.placement&&this.triggerEl!==t.trigger,o=null===(i=this.triggerEl)||void 0===i?void 0:i.getBoundingClientRect(),n=null===(s=t.trigger)||void 0===s?void 0:s.getBoundingClientRect();let p=!1;return r.hasWindow&&(p=!!window.frameElement),a.computePosition(this.triggerEl,t.containerEl,{placement:this.placement,middleware:[p?void 0:a.shift(),a.flip(),a.offset(this.arrow?16:this.offset),a.arrow({element:t.arrowEl,padding:4})]}).then((({x:i,y:s,middlewareData:a,placement:p})=>{if(t.containerEl){Object.assign(t.containerEl.style,{left:`${i}px`,top:`${s}px`});const r={top:"bottom",right:"left",bottom:"top",left:"right"}[p.split("-")[0]];if(a.arrow&&t.arrowEl){const p=a.arrow;Object.assign(t.arrowEl.style,e?{right:o.right-n.right-4+n.width/2+"px",left:"",top:null!=s&&null!=p.y?`${p.y}px`:"",bottom:"",[r]:"-4px"}:{left:null!=i&&null!=p.x?`${p.x}px`:"",top:null!=s&&null!=p.y?`${p.y}px`:"",right:"",bottom:"",[r]:"-4px"})}}})),!0}return!1}async dismiss(t){return!!(t.containerEl&&t.arrowEl&&this.triggerEl)&&(this.cleanup&&this.cleanup(),this.triggerEl.classList.remove("bal-popup-variant-popover-trigger"),this.hideBackdropElement(t),this.hideContainerElement(t),this.hideArrowElement(t),!0)}}class f{constructor(t){this.renderer=t}async present(t){t.balWillAnimate.emit();const i=await this.renderer.present(t);return i&&(t.presented=!0,t.balDidAnimate.emit()),i}async update(t){t.balWillAnimate.emit();const i=await this.renderer.update(t);return i&&t.balDidAnimate.emit(),i}async dismiss(t){t.balWillAnimate.emit();const i=await this.renderer.dismiss(t);return i&&(t.presented=!1,t.balDidAnimate.emit()),i}}const y=class{constructor(s){t(this,s),this.balChange=i(this,"balChange",7),this.balWillAnimate=i(this,"balWillAnimate",7),this.balDidAnimate=i(this,"balDidAnimate",7),this.popupId="bal-pu-"+x++,this.isClickedOutsideOnMouseDown=!1,this.isClickedOutsideOnMouseUp=!1,this.popoverVariantRenderer=new f(new g),this.fullscreenVariantRenderer=new f(new w),this.drawerVariantRenderer=new f(new m),this.lastVariant="popover",this.initialActive=this.active,this.debouncedGlobalClick=l((t=>this.notifyGlobalClick(t)),10),this.onBackdropClick=t=>!!(this.activeBackdropDismiss&&this.presented&&t&&t.target)&&t.target.classList.contains("bal-popup__backdrop"),this.onCloseClick=()=>{this.activeClosable&&this.dismiss()},this.activeClosable=!1,this.activeBackdropDismiss=!1,this.activeVariant="popover",this.trigger=void 0,this.lastTrigger=void 0,this.minContainerWidth=0,this.label="",this.reference=void 0,this.variant="popover",this.placement="bottom",this.arrow=!1,this.backdrop=!1,this.offset=0,this.closable=!1,this.backdropDismiss=!1,this.active=!1,this.presented=!1,this.contentWidth=void 0,this.demo=!1}createLogger(t){this.log=t}async variantChanged(t,i){t!==i&&(await this.getVariantRenderer(i).dismiss(this),this.activeVariant!==t&&(this.lastVariant=this.activeVariant,this.activeVariant=t,await this.getVariantRenderer(this.lastVariant).dismiss(this)),this.presented&&await this.getVariantRenderer(t).present(this))}async activeChanged(t,i){t!==i&&t!==this.presented&&(t?this.present():this.dismiss())}contentWidthChanged(t,i){t!==i&&(void 0===t?this.el.style.removeProperty("--bal-popup-variant-popover-max-width"):this.el.style.setProperty("--bal-popup-variant-popover-max-width",`${this.contentWidth}px`))}componentDidLoad(){this.contentWidthChanged(this.contentWidth,0),!0===this.initialActive&&!0!==this.presented&&this.present(),this.demo&&this.present()}async listenOnGlobalClick(t){var i;const s=t.target.closest("[bal-popup]");if(s&&r.hasWindow){const t=(null===(i=s.attributes.getNamedItem("bal-popup"))||void 0===i?void 0:i.nodeValue)||"";this.el.id===t&&this.debouncedGlobalClick(s)}}async listenOnKeyDown(t){this.activeClosable&&this.presented&&u(t)&&(h(t),this.dismiss())}async listenOnMouseDown(t){this.isClickedOutsideOnMouseDown=this.onBackdropClick(t)}async listenOnMouseUp(t){this.isClickedOutsideOnMouseUp=this.onBackdropClick(t)}async listenOnComponentClick(){this.presented&&this.activeBackdropDismiss&&this.isClickedOutsideOnMouseUp&&this.isClickedOutsideOnMouseDown&&await this.dismiss()}async present(){await this.resetAllVariants(),await this._present()&&(this.lastTrigger=this.trigger,this.balChange.emit(this.presented))}async dismiss(){await this.resetAllVariants(),await this._dismiss()&&(this.lastTrigger=this.trigger,this.balChange.emit(this.presented))}async toggle(){return this.presented?this.dismiss():this.present()}async setMinWidth(t){this.containerEl&&(this.containerEl.style.minWidth=`${t}px`,this.minContainerWidth=t)}async _emitChange(){this.balChange.emit(this.presented)}async _present(){r.hasDocument&&(this.lastFocus=document.activeElement||void 0),this.lastVariantRenderer&&(await this.lastVariantRenderer.dismiss(this),this.presented=!0),this.lastVariantRenderer=this.getVariantRenderer();const t=await this.lastVariantRenderer.present(this);return this.focusFirstDescendant(),t}async _dismiss(){var t;const i=await this.getVariantRenderer().dismiss(this);return this.lastVariantRenderer=void 0,this.lastFocus&&this.lastFocus.focus&&(null===(t=this.lastFocus)||void 0===t||t.focus()),i}getVariantRenderer(t=this.activeVariant){switch(t){case"fullscreen":return this.fullscreenVariantRenderer;case"drawer":return this.drawerVariantRenderer;default:return this.popoverVariantRenderer}}getValue(t,i,s){const a=t.attributes.getNamedItem(i);return a?a.value:s}getNumberValue(t,i,s){const a=t.attributes.getNamedItem(i);return a&&parseInt(a.value,10)||s}getBooleanValue(t,i,s){const a=t.attributes.getNamedItem(i);return a&&a?""===a.value||"true"===a.value:s}notifyGlobalClick(t){this.trigger=t,this.lastTrigger=void 0===this.lastTrigger?this.trigger:this.lastTrigger,this.activeVariant=this.getValue(t,"bal-popup-variant",this.variant),this.activeClosable=this.getBooleanValue(t,"bal-popup-closable",this.closable),this.activeBackdropDismiss=this.getBooleanValue(t,"bal-popup-backdrop-dismiss",this.backdropDismiss),this.presented&&this.lastTrigger!==this.trigger?(this._present(),this.lastTrigger=this.trigger):this.toggle()}async resetAllVariants(){if(await this.dismissAllOtherPopups(),this.lastVariant!==this.activeVariant){const t=this.getVariantRenderer(this.lastVariant);await t.dismiss(this)}this.lastVariant=this.activeVariant}async dismissAllOtherPopups(){if(r.hasDocument){const t=Array.from(document.getElementsByTagName("bal-popup")).filter((t=>t.id!==this.el.id&&"true"!==t.ariaHidden));for(let i=0;i<t.length;i++){const s=t[i];await s._dismiss(),await s._emitChange()}}}focusFirstDescendant(){const{el:t}=this,i=t.querySelector(d);i?i.focus():t.focus()}render(){const t=p.block("popup"),i=t.element("container"),e=t.element("arrow"),o=t.element("backdrop"),n=t.element("inner"),r=n.element("head"),h=n.element("content");return s(a,{key:"55c0f5b114d115cd7c1d51aab5674d0e818b1250",class:Object.assign({},t.class()),role:"dialog","aria-hidden":`${!0!==this.presented}`,"aria-modal":`${!0===this.presented}`,"aria-presented":`${!0===this.presented}`,"aria-labelledby":`${this.popupId}-heading`},s("div",{key:"962ee2a6f7e6504b48e464c5e2ced9ca67765c36",class:Object.assign({},o.class()),ref:t=>this.backdropEl=t}),s("div",{key:"b586c483ea4ec62c066486823b3a8f76493a2d6c",class:Object.assign(Object.assign({},i.class()),i.modifier(`variant-${this.activeVariant}`).class()),ref:t=>this.containerEl=t,style:{minWidth:`${this.minContainerWidth}px`}},s("div",{key:"4f0664a3e528eb9b68ecd11d7b9ffb14bbf7eaaa",class:Object.assign({},e.class()),ref:t=>this.arrowEl=t}),s("bal-stack",{key:"621e7ef166b71e781dc404f78be49e24e6183118",layout:"vertical",px:"popover"===this.activeVariant?"medium":"none",py:"medium",class:Object.assign({},n.class())},this.label?s("bal-stack",{space:"auto",class:Object.assign({},r.class())},s("bal-heading",{"data-test":"bal-popup-label",level:"span","visual-level":"large",id:`${this.popupId}-heading`},this.label),this.activeClosable?s("bal-close",{"data-test":"bal-popup-close",tabindex:-1,onClick:()=>this.onCloseClick()}):""):"",s("div",{key:"04c6546ba5da40340316bf0e8ecfb296421d69dd",class:Object.assign({},h.class()),ref:t=>this.contentEl=t,"data-test":"bal-popup-content"},s("slot",{key:"66f837e1b090db0c997c8b4d9673db7652ccfd85"})))))}get el(){return e(this)}static get watchers(){return{variant:["variantChanged"],active:["activeChanged"],contentWidth:["contentWidthChanged"]}}};o([c("bal-popup"),n("design:type",Function),n("design:paramtypes",[Function]),n("design:returntype",void 0)],y.prototype,"createLogger",null);let x=0;y.style=":root{--bal-popup-backdrop-background:rgba(0,7,57,.8);--bal-popup-container-padding-top:0;--bal-popup-container-padding-bottom:0;--bal-popup-container-background:var(--bal-color-white);--bal-popup-variant-popover-max-width:auto;--bal-popup-variant-popover-radius:var(--bal-radius-large);--bal-popup-variant-popover-shadow:var(--bal-shadow-normal);--bal-popup-variant-drawer-radius:var(--bal-radius-large);--bal-popup-arrow-background:var(--bal-color-white)}.bal-popup{position:static;display:inline;z-index:var(--bal-z-index-popup)}.bal-popup__container{background:var(--bal-popup-container-background);display:none;visibility:hidden;padding-top:var(--bal-popup-container-padding-top);padding-bottom:var(--bal-popup-container-padding-bottom);-ms-flex-positive:1;flex-grow:1;margin:0 auto;position:relative;width:auto}.bal-popup__container--variant-popover{border-radius:var(--bal-popup-variant-popover-radius);-webkit-box-shadow:var(--bal-popup-variant-popover-shadow);box-shadow:var(--bal-popup-variant-popover-shadow);width:var(--bal-popup-variant-popover-max-width);position:absolute;top:0;left:0}.bal-popup__container--variant-fullscreen{position:fixed;margin:0;width:100%;min-width:100%;max-width:100% !important;min-height:var(--bal-app-height, 100%)}.bal-popup__container--variant-fullscreen .bal-popup__inner{padding-left:var(--bal-container-space);padding-right:var(--bal-container-space)}.bal-popup__container--variant-drawer{position:fixed;border-top-left-radius:var(--bal-popup-variant-drawer-radius);border-top-right-radius:var(--bal-popup-variant-drawer-radius);padding-left:var(--bal-container-space);padding-right:var(--bal-container-space);width:100%}.bal-popup__inner{overflow-y:auto;max-height:calc(var(--bal-app-height, 100%) - 4rem)}.bal-popup__inner__head{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.bal-popup__inner__content{width:100%}.bal-popup__arrow{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:absolute;width:8px;height:8px;background:var(--bal-popup-arrow-background);-webkit-transform:rotate(45deg);transform:rotate(45deg);display:none;visibility:hidden}.bal-popup__backdrop{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:fixed;bottom:0;left:0;right:0;top:0;background-color:var(--bal-popup-backdrop-background);width:100vw;display:none;visibility:hidden}.bal-popup-variant-popover-trigger,.bal-popup-permanent-trigger{z-index:calc(var(--bal-z-index-popup) + 1) !important;position:relative !important}";export{y as bal_popup}
|
|
1
|
+
import{r as t,c as i,h as s,H as a,g as e}from"./p-2ccbe55a.js";import{_ as o,a as n}from"./p-43c9f5e9.js";import{B as p}from"./p-ae86d0a0.js";import{b as r}from"./p-a65354df.js";import{s as h}from"./p-e3e1d211.js";import{k as l}from"./p-ef6a64f4.js";import{L as c}from"./p-b77e3348.js";import{f as d}from"./p-ca119357.js";import{b}from"./p-35baa468.js";import{c as u}from"./p-dc98854c.js";import"./p-46251973.js";class v{showContainerElement(t){t.containerEl&&this.showElement(t.containerEl)}hideContainerElement(t){t.containerEl&&this.hideElement(t.containerEl)}showArrowElement(t,i=t.arrow){i&&t.arrowEl&&this.showElement(t.arrowEl)}hideArrowElement(t){t.arrowEl&&Object.assign(t.arrowEl.style,{left:"",top:"",display:"none",visibility:"hidden"})}showBackdropElement(t,i=t.backdrop){i&&t.backdropEl&&this.showElement(t.backdropEl)}hideBackdropElement(t){t.backdropEl&&this.hideElement(t.backdropEl)}showElement(t){t&&(t.style.setProperty("display","block"),t.style.setProperty("visibility","visible"))}hideElement(t){t&&(t.style.removeProperty("display"),t.style.removeProperty("visibility"))}}class m extends v{constructor(){super(...arguments),this.backdrop=!1,this.offset=0}async present(t){return!!(t.containerEl&&t.trigger&&t.backdropEl)&&(this.backdrop=t.getBooleanValue(t.trigger,"bal-popup-backdrop",t.backdrop),this.offset=t.getValue(t.trigger,"bal-popup-offset",t.offset),t.containerEl.style.setProperty("inset","auto 0px 0px 0px"),t.containerEl.style.setProperty("bottom",`${this.offset}px`),t.backdropEl.style.setProperty("bottom",`${this.offset}px`),this.showBackdropElement(t,this.backdrop),this.showContainerElement(t),!0)}async update(t){return!1}async dismiss(t){return!(!t.containerEl||!t.backdropEl||(t.balWillAnimate.emit(),this.hideBackdropElement(t),this.hideContainerElement(t),t.containerEl.style.removeProperty("inset"),t.containerEl.style.removeProperty("bottom"),t.backdropEl.style.removeProperty("bottom"),0))}}class w extends v{constructor(){super(...arguments),this.offset=0}async present(t){return!(!t.containerEl||!t.trigger||(this.offset=t.getValue(t.trigger,"bal-popup-offset",t.offset),t.containerEl.style.setProperty("inset",`${this.offset}px auto auto 0px`),this.offset>0&&t.containerEl.style.setProperty("box-shadow","inset var(--bal-nav-meta-bar-variant-white-shadow)"),this.showBackdropElement(t),this.showContainerElement(t),this.hideArrowElement(t),0))}async update(t){return!1}async dismiss(t){return!!t.containerEl&&(this.hideBackdropElement(t),this.hideContainerElement(t),this.hideArrowElement(t),t.containerEl.style.removeProperty("box-shadow"),t.containerEl.style.removeProperty("inset"),!0)}}class g extends v{constructor(){super(...arguments),this.placement="bottom",this.offset=0,this.arrow=!1,this.backdrop=!1,this.reference=void 0,this.triggerEl=null}async present(t){const i=await b.load();if(!t.trigger&&r.hasDocument){const i=Array.from(document.querySelectorAll(`[bal-popup="${t.el.id}"]`))[0];t.trigger=i}if(t.trigger&&t.containerEl&&t.arrowEl){if(this.placement=t.getValue(t.trigger,"bal-popup-placement",t.placement),this.arrow=t.getBooleanValue(t.trigger,"bal-popup-arrow",t.arrow),this.backdrop=t.getBooleanValue(t.trigger,"bal-popup-backdrop",t.backdrop),this.reference=t.getValue(t.trigger,"bal-popup-reference",t.reference),this.offset=t.getNumberValue(t.trigger,"bal-popup-offset",t.offset),this.triggerEl=t.trigger,this.reference&&r.hasDocument){const i=document.getElementById(this.reference);this.triggerEl=i||t.trigger}if(this.triggerEl)return this.showContainerElement(t),this.showBackdropElement(t,this.backdrop),this.showArrowElement(t,this.arrow),this.triggerEl.classList.add("bal-popup-variant-popover-trigger"),"bottom-end"===this.placement&&this.triggerEl!==t.trigger&&t.setMinWidth(this.triggerEl.clientWidth),this.cleanup=i.autoUpdate(this.triggerEl,t.containerEl,(()=>{this.update(t)}),{ancestorScroll:!0,ancestorResize:!0,elementResize:!1,layoutShift:!0,animationFrame:!0}),!0}return!1}async update(t){var i,s;if(this.triggerEl&&t.trigger&&t.containerEl&&t.arrowEl){const a=await b.load(),e="bottom-end"===this.placement&&this.triggerEl!==t.trigger,o=null===(i=this.triggerEl)||void 0===i?void 0:i.getBoundingClientRect(),n=null===(s=t.trigger)||void 0===s?void 0:s.getBoundingClientRect();let p=!1;return r.hasWindow&&(p=!!window.frameElement),a.computePosition(this.triggerEl,t.containerEl,{placement:this.placement,middleware:[p?void 0:a.shift(),a.flip(),a.offset(this.arrow?16:this.offset),a.arrow({element:t.arrowEl,padding:4})]}).then((({x:i,y:s,middlewareData:a,placement:p})=>{if(t.containerEl){Object.assign(t.containerEl.style,{left:`${i}px`,top:`${s}px`});const r={top:"bottom",right:"left",bottom:"top",left:"right"}[p.split("-")[0]];if(a.arrow&&t.arrowEl){const p=a.arrow;Object.assign(t.arrowEl.style,e?{right:o.right-n.right-4+n.width/2+"px",left:"",top:null!=s&&null!=p.y?`${p.y}px`:"",bottom:"",[r]:"-4px"}:{left:null!=i&&null!=p.x?`${p.x}px`:"",top:null!=s&&null!=p.y?`${p.y}px`:"",right:"",bottom:"",[r]:"-4px"})}}})),!0}return!1}async dismiss(t){return!!(t.containerEl&&t.arrowEl&&this.triggerEl)&&(this.cleanup&&this.cleanup(),this.triggerEl.classList.remove("bal-popup-variant-popover-trigger"),this.hideBackdropElement(t),this.hideContainerElement(t),this.hideArrowElement(t),!0)}}class f{constructor(t){this.renderer=t}async present(t){t.balWillAnimate.emit();const i=await this.renderer.present(t);return i&&(t.presented=!0,t.balDidAnimate.emit()),i}async update(t){t.balWillAnimate.emit();const i=await this.renderer.update(t);return i&&t.balDidAnimate.emit(),i}async dismiss(t){t.balWillAnimate.emit();const i=await this.renderer.dismiss(t);return i&&(t.presented=!1,t.balDidAnimate.emit()),i}}const y=class{constructor(s){t(this,s),this.balChange=i(this,"balChange",7),this.balWillAnimate=i(this,"balWillAnimate",7),this.balDidAnimate=i(this,"balDidAnimate",7),this.popupId="bal-pu-"+x++,this.isClickedOutsideOnMouseDown=!1,this.isClickedOutsideOnMouseUp=!1,this.popoverVariantRenderer=new f(new g),this.fullscreenVariantRenderer=new f(new w),this.drawerVariantRenderer=new f(new m),this.lastVariant="popover",this.initialActive=this.active,this.debouncedGlobalClick=l((t=>this.notifyGlobalClick(t)),10),this.onBackdropClick=t=>!!(this.activeBackdropDismiss&&this.presented&&t&&t.target)&&t.target.classList.contains("bal-popup__backdrop"),this.onCloseClick=()=>{this.activeClosable&&this.dismiss()},this.activeClosable=!1,this.activeBackdropDismiss=!1,this.activeVariant="popover",this.trigger=void 0,this.lastTrigger=void 0,this.minContainerWidth=0,this.label="",this.reference=void 0,this.variant="popover",this.placement="bottom",this.arrow=!1,this.backdrop=!1,this.offset=0,this.closable=!1,this.backdropDismiss=!1,this.active=!1,this.presented=!1,this.contentWidth=void 0,this.demo=!1}createLogger(t){this.log=t}async variantChanged(t,i){t!==i&&(await this.getVariantRenderer(i).dismiss(this),this.activeVariant!==t&&(this.lastVariant=this.activeVariant,this.activeVariant=t,await this.getVariantRenderer(this.lastVariant).dismiss(this)),this.presented&&await this.getVariantRenderer(t).present(this))}async activeChanged(t,i){t!==i&&t!==this.presented&&(t?this.present():this.dismiss())}contentWidthChanged(t,i){t!==i&&(void 0===t?this.el.style.removeProperty("--bal-popup-variant-popover-max-width"):this.el.style.setProperty("--bal-popup-variant-popover-max-width",`${this.contentWidth}px`))}componentDidLoad(){this.contentWidthChanged(this.contentWidth,0),!0===this.initialActive&&!0!==this.presented&&this.present(),this.demo&&this.present()}async listenOnGlobalClick(t){var i;const s=t.target.closest("[bal-popup]");if(s&&r.hasWindow){const t=(null===(i=s.attributes.getNamedItem("bal-popup"))||void 0===i?void 0:i.nodeValue)||"";this.el.id===t&&this.debouncedGlobalClick(s)}}async listenOnKeyDown(t){this.activeClosable&&this.presented&&u(t)&&(h(t),this.dismiss())}async listenOnMouseDown(t){this.isClickedOutsideOnMouseDown=this.onBackdropClick(t)}async listenOnMouseUp(t){this.isClickedOutsideOnMouseUp=this.onBackdropClick(t)}async listenOnComponentClick(){this.presented&&this.activeBackdropDismiss&&this.isClickedOutsideOnMouseUp&&this.isClickedOutsideOnMouseDown&&await this.dismiss()}async present(){await this.resetAllVariants(),await this._present()&&(this.lastTrigger=this.trigger,this.balChange.emit(this.presented))}async dismiss(){await this.resetAllVariants(),await this._dismiss()&&(this.lastTrigger=this.trigger,this.balChange.emit(this.presented))}async toggle(){return this.presented?this.dismiss():this.present()}async setMinWidth(t){this.containerEl&&(this.containerEl.style.minWidth=`${t}px`,this.minContainerWidth=t)}async _emitChange(){this.balChange.emit(this.presented)}async _present(){r.hasDocument&&(this.lastFocus=document.activeElement||void 0),this.lastVariantRenderer&&(await this.lastVariantRenderer.dismiss(this),this.presented=!0),this.lastVariantRenderer=this.getVariantRenderer();const t=await this.lastVariantRenderer.present(this);return this.focusFirstDescendant(),t}async _dismiss(){var t;const i=await this.getVariantRenderer().dismiss(this);return this.lastVariantRenderer=void 0,this.lastFocus&&this.lastFocus.focus&&(null===(t=this.lastFocus)||void 0===t||t.focus()),i}getVariantRenderer(t=this.activeVariant){switch(t){case"fullscreen":return this.fullscreenVariantRenderer;case"drawer":return this.drawerVariantRenderer;default:return this.popoverVariantRenderer}}getValue(t,i,s){const a=t.attributes.getNamedItem(i);return a?a.value:s}getNumberValue(t,i,s){const a=t.attributes.getNamedItem(i);return a&&parseInt(a.value,10)||s}getBooleanValue(t,i,s){const a=t.attributes.getNamedItem(i);return a&&a?""===a.value||"true"===a.value:s}notifyGlobalClick(t){this.trigger=t,this.lastTrigger=void 0===this.lastTrigger?this.trigger:this.lastTrigger,this.activeVariant=this.getValue(t,"bal-popup-variant",this.variant),this.activeClosable=this.getBooleanValue(t,"bal-popup-closable",this.closable),this.activeBackdropDismiss=this.getBooleanValue(t,"bal-popup-backdrop-dismiss",this.backdropDismiss),this.presented&&this.lastTrigger!==this.trigger?(this._present(),this.lastTrigger=this.trigger):this.toggle()}async resetAllVariants(){if(await this.dismissAllOtherPopups(),this.lastVariant!==this.activeVariant){const t=this.getVariantRenderer(this.lastVariant);await t.dismiss(this)}this.lastVariant=this.activeVariant}async dismissAllOtherPopups(){if(r.hasDocument){const t=Array.from(document.getElementsByTagName("bal-popup")).filter((t=>t.id!==this.el.id&&"true"!==t.ariaHidden));for(let i=0;i<t.length;i++){const s=t[i];await s._dismiss(),await s._emitChange()}}}focusFirstDescendant(){const{el:t}=this,i=t.querySelector(d);i?i.focus():t.focus()}render(){const t=p.block("popup"),i=t.element("container"),e=t.element("arrow"),o=t.element("backdrop"),n=t.element("inner"),r=n.element("head"),h=n.element("content");return s(a,{key:"55c0f5b114d115cd7c1d51aab5674d0e818b1250",class:Object.assign({},t.class()),role:"dialog","aria-hidden":`${!0!==this.presented}`,"aria-modal":`${!0===this.presented}`,"aria-presented":`${!0===this.presented}`,"aria-labelledby":`${this.popupId}-heading`},s("div",{key:"962ee2a6f7e6504b48e464c5e2ced9ca67765c36",class:Object.assign({},o.class()),ref:t=>this.backdropEl=t}),s("div",{key:"b586c483ea4ec62c066486823b3a8f76493a2d6c",class:Object.assign(Object.assign({},i.class()),i.modifier(`variant-${this.activeVariant}`).class()),ref:t=>this.containerEl=t,style:{minWidth:`${this.minContainerWidth}px`}},s("div",{key:"4f0664a3e528eb9b68ecd11d7b9ffb14bbf7eaaa",class:Object.assign({},e.class()),ref:t=>this.arrowEl=t}),s("bal-stack",{key:"621e7ef166b71e781dc404f78be49e24e6183118",layout:"vertical",px:"popover"===this.activeVariant?"medium":"none",py:"medium",class:Object.assign({},n.class())},this.label?s("bal-stack",{space:"auto",class:Object.assign({},r.class())},s("bal-heading",{"data-test":"bal-popup-label",level:"span","visual-level":"large",id:`${this.popupId}-heading`},this.label),this.activeClosable?s("bal-close",{"data-test":"bal-popup-close",tabindex:-1,onClick:()=>this.onCloseClick()}):""):"",s("div",{key:"04c6546ba5da40340316bf0e8ecfb296421d69dd",class:Object.assign({},h.class()),ref:t=>this.contentEl=t,"data-test":"bal-popup-content"},s("slot",{key:"66f837e1b090db0c997c8b4d9673db7652ccfd85"})))))}get el(){return e(this)}static get watchers(){return{variant:["variantChanged"],active:["activeChanged"],contentWidth:["contentWidthChanged"]}}};o([c("bal-popup"),n("design:type",Function),n("design:paramtypes",[Function]),n("design:returntype",void 0)],y.prototype,"createLogger",null);let x=0;y.style=":root{--bal-popup-backdrop-background:rgba(0,7,57,.8);--bal-popup-container-padding-top:0;--bal-popup-container-padding-bottom:0;--bal-popup-container-background:var(--bal-color-white);--bal-popup-variant-popover-max-width:auto;--bal-popup-variant-popover-radius:var(--bal-radius-large);--bal-popup-variant-popover-shadow:var(--bal-shadow-normal);--bal-popup-variant-drawer-radius:var(--bal-radius-large);--bal-popup-arrow-background:var(--bal-color-white)}.bal-popup{position:static;display:inline;z-index:var(--bal-z-index-popup)}.bal-popup__container{background:var(--bal-popup-container-background);display:none;visibility:hidden;padding-top:var(--bal-popup-container-padding-top);padding-bottom:var(--bal-popup-container-padding-bottom);-ms-flex-positive:1;flex-grow:1;margin:0 auto;position:relative;width:auto}.bal-popup__container--variant-popover{border-radius:var(--bal-popup-variant-popover-radius);-webkit-box-shadow:var(--bal-popup-variant-popover-shadow);box-shadow:var(--bal-popup-variant-popover-shadow);width:var(--bal-popup-variant-popover-max-width);position:absolute;top:0;left:0}.bal-popup__container--variant-fullscreen{position:fixed;margin:0;width:100%;min-width:100%;max-width:100% !important;min-height:var(--bal-app-height, 100%)}.bal-popup__container--variant-fullscreen .bal-popup__inner{padding-left:var(--bal-container-space);padding-right:var(--bal-container-space)}.bal-popup__container--variant-drawer{position:fixed;border-top-left-radius:var(--bal-popup-variant-drawer-radius);border-top-right-radius:var(--bal-popup-variant-drawer-radius);padding-left:var(--bal-container-space);padding-right:var(--bal-container-space);width:100%}.bal-popup__inner{overflow-y:auto;max-height:calc(var(--bal-app-height, 100%) - 4rem)}.bal-popup__inner__head{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.bal-popup__inner__content{width:100%}.bal-popup__arrow{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:absolute;width:8px;height:8px;background:var(--bal-popup-arrow-background);-webkit-transform:rotate(45deg);transform:rotate(45deg);display:none;visibility:hidden}.bal-popup__backdrop{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:fixed;bottom:0;left:0;right:0;top:0;background-color:var(--bal-popup-backdrop-background);width:100vw;display:none;visibility:hidden}.bal-popup-variant-popover-trigger,.bal-popup-permanent-trigger{z-index:calc(var(--bal-z-index-popup) + 1) !important;position:relative !important}";export{y as bal_popup}
|
package/dist/baloise-design-system/{p-34a93475db.system.entry.js → p-c2f12a9f5c.system.entry.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,i,n){function a(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function o(e){try{l(n["throw"](e))}catch(e){r(e)}}function l(e){e.done?i(e.value):a(e.value).then(s,o)}l((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,a,r,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(e){return function(t){return l([e,t])}}function l(o){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,o[0]&&(i=0)),i)try{if(n=1,a&&(r=o[0]&2?a["return"]:o[0]?a["throw"]||((r=a["return"])&&r.call(a),0):a.next)&&!(r=r.call(a,o[1])).done)return r;if(a=0,r)o=[o[0]&2,r.value];switch(o[0]){case 0:case 1:r=o;break;case 4:i.label++;return{value:o[1],done:false};case 5:i.label++;a=o[1];o=[0];continue;case 7:o=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(o[0]===6||o[0]===2)){i=0;continue}if(o[0]===3&&(!r||o[1]>r[0]&&o[1]<r[3])){i.label=o[1];break}if(o[0]===6&&i.label<r[1]){i.label=r[1];r=o;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(o);break}if(r[2])i.ops.pop();i.trys.pop();continue}o=t.call(e,i)}catch(e){o=[6,e];a=0}finally{n=r=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};System.register(["./p-7961e095.system.js","./p-6dbef894.system.js","./p-db0895e2.system.js","./p-23bdd8dc.system.js","./p-980e4b57.system.js","./p-b52ad8d5.system.js","./p-5cd2674f.system.js","./p-907368ff.system.js","./p-4e642b63.system.js","./p-0d3f11e3.system.js","./p-68bef926.system.js","./p-e60e0c65.system.js","./p-d5cb701b.system.js","./p-9e489928.system.js","./p-7720b262.system.js","./p-a1f6e944.system.js","./p-ef3bfa9f.system.js","./p-eecefb0a.system.js","./p-363254ce.system.js","./p-ec9a7cf5.system.js","./p-b119ef19.system.js"],(function(e){"use strict";var t,i,n,a,r,s,o,l,c,b,m,d,u,f,g,h,v,p,k,_,y,x,w,j,O,z,F,S,L,A;return{setters:[function(e){t=e.r;i=e.c;n=e.w;a=e.h;r=e.H;s=e.g},function(e){o=e._;l=e.a},function(e){c=e.B},function(e){b=e.L},function(e){m=e.s},function(e){d=e.F},function(e){u=e.o;f=e.l;g=e.r},function(e){h=e.d},function(e){v=e.d;p=e.b;k=e.a;_=e.e;y=e.i;x=e.f;w=e.g;j=e.h},function(e){O=e.L},function(e){z=e.L},function(e){F=e.L},function(e){S=e.L},function(e){L=e.L},function(e){A=e.i},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var C=":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}";var E=C;var X=e("bal_segment",function(){function e(e){var n=this;t(this,e);this.balFocus=i(this,"balFocus",7);this.balBlur=i(this,"balBlur",7);this.balChange=i(this,"balChange",7);this.balSelect=i(this,"balSelect",7);this.balVertical=i(this,"balVertical",7);this.hasFocus=false;this.getSegmentItem=function(e){var t,i;var a=n.allItems.filter((function(e){return!e.disabled}));var r=a.findIndex((function(e){return e===document.activeElement.closest("bal-segment-item")}));switch(e){case"current":return a[r];case"first":return a[0];case"last":return a[a.length-1];case"next":return(t=a[r+1])!==null&&t!==void 0?t:a[0];case"previous":return(i=a[r-1])!==null&&i!==void 0?i:a[a.length-1];default:return null}};this.onPointerDown=function(){n.keyboardMode=false};this.onSlottedItemsChange=function(){n.valueChanged(n.value);n.defineWidth()};this.onClick=function(e){if(n.disabled){return}var t=e.target;var i=n.checked;if(t.tagName==="BAL-SEGMENT"){return}if(t&&t.setFocus){t.setFocus()}if(i){n.checkButton(i,t)}else{n.setCheckedClasses();n.checkButton(t,t)}if(t!==i){n.emitValueChange()}};this.focusedValue=undefined;this.keyboardMode=true;this.isVertical=false;this.isMobile=false;this.maxWidth=0;this.ariaForm=h;this.invalid=false;this.disabled=false;this.vertical=false;this.scrollable=false;this.expanded=false;this.value=undefined}e.prototype.createLogger=function(e){this.log=e};e.prototype.disabledChanged=function(){var e=this;this.allItems.map((function(t){return t.disabled=e.disabled}))};e.prototype.valueChanged=function(e){this.balSelect.emit(e)};e.prototype.connectedCallback=function(){this.el.addEventListener("touchstart",this.onPointerDown);this.el.addEventListener("mousedown",this.onPointerDown);this.disabledChanged();this.isVertical=this.vertical};e.prototype.disconnectedCallback=function(){this.el.removeEventListener("touchstart",this.onPointerDown);this.el.removeEventListener("mousedown",this.onPointerDown)};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.setCheckedClasses();this.defineWidth();return[2]}))}))};e.prototype.focusInListener=function(e){this.balFocus.emit(e)};e.prototype.focusOutListener=function(e){this.balBlur.emit(e)};e.prototype.animationListener=function(){var e=this.el.getBoundingClientRect();this.maxWidth=e.width;this.windowResizeListener()};e.prototype.visibilityListener=function(){var e=this.el.getBoundingClientRect();this.maxWidth=e.width;this.windowResizeListener()};e.prototype.breakpointListener=function(e){this.isMobile=e.mobile};e.prototype.windowResizeListener=function(){if(this.vertical===false&&this.maxWidth>0){var e=this.el.parentElement.getBoundingClientRect();if(e.width<this.maxWidth){this.emitVerticalChange(true)}else{this.emitVerticalChange(false)}}else{this.emitVerticalChange(true)}};e.prototype.listenOnKeyDownOutside=function(){this.keyboardMode=true};e.prototype.listenOnKeyDown=function(e){this.keyboardMode=d.includes(e.key);var t=false;var i;if(v(e)||p(e)){m(e);i=this.getSegmentItem("current");t=this.value!==i.value;this.value=i.value}else if(k(e)||_(e)){m(e);i=this.getSegmentItem("previous")}else if(y(e)||x(e)){m(e);i=this.getSegmentItem("next")}else if(w(e)){m(e);i=this.getSegmentItem("first")}else if(j(e)){m(e);i=this.getSegmentItem("last")}if(!i){return}var n=this.checked;if(i!==n||t){this.checkButton(n,i);this.emitValueChange()}if(i){i.setFocus()}};e.prototype.setAriaForm=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.ariaForm=Object.assign({},e);return[2]}))}))};Object.defineProperty(e.prototype,"allItems",{get:function(){return Array.from(this.el.querySelectorAll("bal-segment-item"))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"checked",{get:function(){var e=this;return this.allItems.find((function(t){return t.value===e.value}))},enumerable:false,configurable:true});e.prototype.emitValueChange=function(){this.balChange.emit(this.value)};e.prototype.emitVerticalChange=function(e){if(this.isVertical!==e){this.isVertical=e;this.balVertical.emit(this.isVertical)}};e.prototype.defineWidth=function(){var e=this;u((function(){if(e.isVertical===false){var t=e.el.getBoundingClientRect();e.maxWidth=t.width}e.windowResizeListener()}))};e.prototype.getIndicator=function(e){if(e){var t=e.shadowRoot||e;return t.querySelector(".bal-segment-item__indicator")}return null};e.prototype.checkButton=function(e,t){var i=this.getIndicator(e);var a=this.getIndicator(t);if(i===null||a===null){return}var r=i.getBoundingClientRect();var s=a.getBoundingClientRect();var o=r.width/s.width;var l=r.left-s.left;var c="translate3d(".concat(l,"px, 0, 0) scaleX(").concat(o,")");if(this.isVertical){var b=r.height/s.height;var m=r.top-s.top;c="translate3d(0, ".concat(m,"px, 0) scaleY(").concat(b,")")}n((function(){a.classList.remove("bal-segment-item__indicator--animated");a.style.setProperty("transform",c);a.getBoundingClientRect();a.classList.add("bal-segment-item__indicator--animated");a.style.setProperty("transform","")}));this.value=t.value;this.setCheckedClasses()};e.prototype.setCheckedClasses=function(){var e=this;var t=this.allItems;var i=t.findIndex((function(t){return t.value===e.value}));var n=i+1;var a=i-1;for(var r=0,s=t;r<s.length;r++){var o=s[r];o.classList.remove("bal-segment-item--after-checked");o.classList.remove("bal-segment-item--before-checked")}if(n<t.length){t[n].classList.add("bal-segment-item--after-checked")}if(a<t.length&&a>=0){t[a].classList.add("bal-segment-item--before-checked")}};e.prototype.render=function(){var e=this,t=e.invalid,i=e.isVertical,n=e.scrollable,s=e.keyboardMode,o=e.expanded,l=e.isMobile,b=e.disabled;var m=c.block("segment");return a(r,{key:"8994703f0fda236656407691599b01ab1034222b",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({},m.class()),m.modifier("invalid").class(t)),m.modifier("vertical").class(i)),m.modifier("scrollable").class(n)),m.modifier("keyboard").class(s)),m.modifier("disabled").class(b)),m.modifier("expanded").class((o||l)&&!i)),onClick:this.onClick},a("slot",{key:"e5c55ac6fd670064f3a45ebaee7112268222cdbc",onSlotchange:this.onSlottedItemsChange}))};Object.defineProperty(e.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{disabled:["disabledChanged"],value:["valueChanged"]}},enumerable:false,configurable:true});return e}());o([b("bal-segment"),l("design:type",Function),l("design:paramtypes",[Function]),l("design:returntype",void 0)],X.prototype,"createLogger",null);o([O(),l("design:type",Function),l("design:paramtypes",[FocusEvent]),l("design:returntype",void 0)],X.prototype,"focusInListener",null);o([O(),l("design:type",Function),l("design:paramtypes",[FocusEvent]),l("design:returntype",void 0)],X.prototype,"focusOutListener",null);o([z(),l("design:type",Function),l("design:paramtypes",[]),l("design:returntype",void 0)],X.prototype,"animationListener",null);o([F(),l("design:type",Function),l("design:paramtypes",[]),l("design:returntype",void 0)],X.prototype,"visibilityListener",null);o([L(),l("design:type",Function),l("design:paramtypes",[Object]),l("design:returntype",void 0)],X.prototype,"breakpointListener",null);o([S(),l("design:type",Function),l("design:paramtypes",[]),l("design:returntype",void 0)],X.prototype,"windowResizeListener",null);X.style=E;var I=':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}';var V=I;var B=0;var G=e("bal_segment_item",function(){function e(e){var i=this;t(this,e);this.segmentEl=null;this.inheritedAttributes={};this.internalId=B++;this.inputId="bal-si-".concat(this.internalId);this.updateVertical=function(e){i.isVertical=e.detail};this.updateState=function(){var e=i.segmentEl;if(e){if(e.value===""||e.value===undefined||e.value===null){var t=i.allAvailableOptions;if(t.length>0){var n=t[0];i.isFocusable=n===i.el}}else{i.checked=e.value===i.value;i.isFocusable=e.value===i.value}if(e.disabled){i.disabled=true}i.isLast=e.lastElementChild===i.el;i.isFirst=e.firstElementChild===i.el;i.calculateEmptyValue()}};this.onSlottedItemsChange=function(){i.checkSlotContent()};this.hasSlotContent=false;this.isFocusable=false;this.isVertical=false;this.isLast=false;this.isFirst=false;this.hasEmptyValue=true;this.ariaForm=h;this.disabled=false;this.invalid=false;this.focused=false;this.checked=false;this.label="";this.value="bal-si-"+this.internalId}e.prototype.valueChanged=function(e,t){if(e!==t){this.updateState()}};e.prototype.componentWillLoad=function(){this.inheritedAttributes=Object.assign({},A(this.el,["aria-label"]))};e.prototype.connectedCallback=function(){var e=this.segmentEl=this.el.closest("bal-segment");if(e&&e.vertical){this.isVertical=e.vertical}};e.prototype.componentDidLoad=function(){var e=this;var t=this.segmentEl=this.el.closest("bal-segment");if(t){f(t,"balSelect",this.updateState);f(t,"balVertical",this.updateVertical)}u((function(){e.checkSlotContent();e.updateState()}))};e.prototype.disconnectedCallback=function(){var e=this.segmentEl;if(e){g(e,"balSelect",this.updateState);g(e,"balVertical",this.updateVertical);this.segmentEl=null}};e.prototype.calculateEmptyValue=function(){var e=this;if(this.segmentEl){var t=Array.from(this.segmentEl.querySelectorAll("bal-segment-item"));this.hasEmptyValue=!t.some((function(t){return t.value===e.segmentEl.value}))}else{this.hasEmptyValue=false}};e.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){e=this.nativeEl;if(e!==undefined){e.focus()}return[2]}))}))};e.prototype.setAriaForm=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.ariaForm=Object.assign({},e);return[2]}))}))};Object.defineProperty(e.prototype,"allAvailableOptions",{get:function(){return this.allOptions.filter((function(e){return!e.disabled}))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"allOptions",{get:function(){var e=this.segmentEl;if(e){return Array.from(e.querySelectorAll("bal-segment-item"))}return[]},enumerable:false,configurable:true});e.prototype.checkSlotContent=function(){var e=this.el.querySelector('[part="slot"]');var t=e?e.innerHTML.trim():"";this.hasSlotContent=t.length>0};e.prototype.render=function(){var e=this;var t=this,i=t.checked,n=t.focused,s=t.segmentEl,o=t.label,l=t.isFocusable,b=t.isFirst,m=t.hasEmptyValue;var d=c.block("segment-item");var u=d.element("button");var f=d.element("indicator");var g=this.invalid||s&&s.invalid;var h=this.disabled||s&&s.disabled;var v=this.isVertical;var p=m&&b||l&&!h;var k=p&&this.ariaForm.controlId||this.inputId;var _={};if(p){_={"aria-labelledby":this.ariaForm.labelId,"aria-describedby":this.ariaForm.messageId}}return a(r,{key:"6da240d029f07e7760a962e388998c9c94390d4a",class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},d.class()),d.modifier("vertical").class(v)),d.modifier("disabled").class(h)),d.modifier("checked").class(i)),d.modifier("invalid").class(g)),d.modifier("last").class(this.isLast&&!i))},a("button",Object.assign({key:"b388ce322243a5f47831d0ef1a65b332c191045b",id:k,role:"radio","aria-checked":i?"true":"false"},_,{class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},u.class()),u.modifier("checked").class(i)),u.modifier("invalid").class(g)),u.modifier("disabled").class(h)),u.modifier("focused").class(n)),u.modifier("vertical").class(v)),type:"button",tabIndex:p?0:-1,part:"native",disabled:h,ref:function(t){return e.nativeEl=t}},this.inheritedAttributes),a("bal-icon",{key:"d5ba38e05534eb5ea281cc81a4ad5686b1a4f69b",name:"check",size:"small",class:Object.assign(Object.assign(Object.assign({},u.element("icon").class()),u.element("icon").modifier("animated").class(i)),u.element("icon").modifier("vertical").class(v)),color:h?"grey-dark":g?"white":"primary"}),a("bal-stack",{key:"4a23ae6b4562a685f77f800ff6aca3e5c5e8226e",space:"x-small",layout:"horizontal"},a("bal-content",{key:"a2fb5cf35391ca37fe328534a29cad6e41a7f8fb",space:"none"},a("bal-label",{key:"b3f633a9fe0ea22a71c05982af9dabc366c72495",htmlId:"bal-si-".concat(this.internalId,"-label")},o),a("span",{key:"badf00b587d14525f4cea6ceda85c7f67b1b216e",part:"slot",class:Object.assign({},u.element("slot").modifier("hidden").class(!this.hasSlotContent))}," ",a("slot",{key:"375942fc35e764ef3d91d62a03d08c16165c595b",onSlotchange:this.onSlottedItemsChange}))))),a("div",{key:"b3a0cf381958ad671555306484ca791e93cfe21e",class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},f.class()),f.modifier("animated").class()),f.modifier("background").class()),f.modifier("disabled").class(h)),f.modifier("invalid").class(g)),f.modifier("checked").class(i)),f.modifier("vertical").class(v))}))};Object.defineProperty(e.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{value:["valueChanged"]}},enumerable:false,configurable:true});return e}());G.style=V}}}));
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,i,n){function a(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function o(e){try{l(n["throw"](e))}catch(e){r(e)}}function l(e){e.done?i(e.value):a(e.value).then(s,o)}l((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,a,r,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(e){return function(t){return l([e,t])}}function l(o){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,o[0]&&(i=0)),i)try{if(n=1,a&&(r=o[0]&2?a["return"]:o[0]?a["throw"]||((r=a["return"])&&r.call(a),0):a.next)&&!(r=r.call(a,o[1])).done)return r;if(a=0,r)o=[o[0]&2,r.value];switch(o[0]){case 0:case 1:r=o;break;case 4:i.label++;return{value:o[1],done:false};case 5:i.label++;a=o[1];o=[0];continue;case 7:o=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(o[0]===6||o[0]===2)){i=0;continue}if(o[0]===3&&(!r||o[1]>r[0]&&o[1]<r[3])){i.label=o[1];break}if(o[0]===6&&i.label<r[1]){i.label=r[1];r=o;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(o);break}if(r[2])i.ops.pop();i.trys.pop();continue}o=t.call(e,i)}catch(e){o=[6,e];a=0}finally{n=r=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};System.register(["./p-7961e095.system.js","./p-6dbef894.system.js","./p-db0895e2.system.js","./p-23bdd8dc.system.js","./p-980e4b57.system.js","./p-b52ad8d5.system.js","./p-5cd2674f.system.js","./p-907368ff.system.js","./p-4e642b63.system.js","./p-0d3f11e3.system.js","./p-68bef926.system.js","./p-e60e0c65.system.js","./p-cbef3146.system.js","./p-03470b7c.system.js","./p-7720b262.system.js","./p-a1f6e944.system.js","./p-ef3bfa9f.system.js","./p-eecefb0a.system.js","./p-ca5cbdaf.system.js","./p-ec9a7cf5.system.js","./p-80a4075f.system.js"],(function(e){"use strict";var t,i,n,a,r,s,o,l,c,b,m,d,u,f,g,h,v,p,k,_,y,x,w,j,O,z,F,S,L,A;return{setters:[function(e){t=e.r;i=e.c;n=e.w;a=e.h;r=e.H;s=e.g},function(e){o=e._;l=e.a},function(e){c=e.B},function(e){b=e.L},function(e){m=e.s},function(e){d=e.F},function(e){u=e.o;f=e.l;g=e.r},function(e){h=e.d},function(e){v=e.d;p=e.b;k=e.a;_=e.e;y=e.i;x=e.f;w=e.g;j=e.h},function(e){O=e.L},function(e){z=e.L},function(e){F=e.L},function(e){S=e.L},function(e){L=e.L},function(e){A=e.i},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var C=":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}";var E=C;var X=e("bal_segment",function(){function e(e){var n=this;t(this,e);this.balFocus=i(this,"balFocus",7);this.balBlur=i(this,"balBlur",7);this.balChange=i(this,"balChange",7);this.balSelect=i(this,"balSelect",7);this.balVertical=i(this,"balVertical",7);this.hasFocus=false;this.getSegmentItem=function(e){var t,i;var a=n.allItems.filter((function(e){return!e.disabled}));var r=a.findIndex((function(e){return e===document.activeElement.closest("bal-segment-item")}));switch(e){case"current":return a[r];case"first":return a[0];case"last":return a[a.length-1];case"next":return(t=a[r+1])!==null&&t!==void 0?t:a[0];case"previous":return(i=a[r-1])!==null&&i!==void 0?i:a[a.length-1];default:return null}};this.onPointerDown=function(){n.keyboardMode=false};this.onSlottedItemsChange=function(){n.valueChanged(n.value);n.defineWidth()};this.onClick=function(e){if(n.disabled){return}var t=e.target;var i=n.checked;if(t.tagName==="BAL-SEGMENT"){return}if(t&&t.setFocus){t.setFocus()}if(i){n.checkButton(i,t)}else{n.setCheckedClasses();n.checkButton(t,t)}if(t!==i){n.emitValueChange()}};this.focusedValue=undefined;this.keyboardMode=true;this.isVertical=false;this.isMobile=false;this.maxWidth=0;this.ariaForm=h;this.invalid=false;this.disabled=false;this.vertical=false;this.scrollable=false;this.expanded=false;this.value=undefined}e.prototype.createLogger=function(e){this.log=e};e.prototype.disabledChanged=function(){var e=this;this.allItems.map((function(t){return t.disabled=e.disabled}))};e.prototype.valueChanged=function(e){this.balSelect.emit(e)};e.prototype.connectedCallback=function(){this.el.addEventListener("touchstart",this.onPointerDown);this.el.addEventListener("mousedown",this.onPointerDown);this.disabledChanged();this.isVertical=this.vertical};e.prototype.disconnectedCallback=function(){this.el.removeEventListener("touchstart",this.onPointerDown);this.el.removeEventListener("mousedown",this.onPointerDown)};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.setCheckedClasses();this.defineWidth();return[2]}))}))};e.prototype.focusInListener=function(e){this.balFocus.emit(e)};e.prototype.focusOutListener=function(e){this.balBlur.emit(e)};e.prototype.animationListener=function(){var e=this.el.getBoundingClientRect();this.maxWidth=e.width;this.windowResizeListener()};e.prototype.visibilityListener=function(){var e=this.el.getBoundingClientRect();this.maxWidth=e.width;this.windowResizeListener()};e.prototype.breakpointListener=function(e){this.isMobile=e.mobile};e.prototype.windowResizeListener=function(){if(this.vertical===false&&this.maxWidth>0){var e=this.el.parentElement.getBoundingClientRect();if(e.width<this.maxWidth){this.emitVerticalChange(true)}else{this.emitVerticalChange(false)}}else{this.emitVerticalChange(true)}};e.prototype.listenOnKeyDownOutside=function(){this.keyboardMode=true};e.prototype.listenOnKeyDown=function(e){this.keyboardMode=d.includes(e.key);var t=false;var i;if(v(e)||p(e)){m(e);i=this.getSegmentItem("current");t=this.value!==i.value;this.value=i.value}else if(k(e)||_(e)){m(e);i=this.getSegmentItem("previous")}else if(y(e)||x(e)){m(e);i=this.getSegmentItem("next")}else if(w(e)){m(e);i=this.getSegmentItem("first")}else if(j(e)){m(e);i=this.getSegmentItem("last")}if(!i){return}var n=this.checked;if(i!==n||t){this.checkButton(n,i);this.emitValueChange()}if(i){i.setFocus()}};e.prototype.setAriaForm=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.ariaForm=Object.assign({},e);return[2]}))}))};Object.defineProperty(e.prototype,"allItems",{get:function(){return Array.from(this.el.querySelectorAll("bal-segment-item"))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"checked",{get:function(){var e=this;return this.allItems.find((function(t){return t.value===e.value}))},enumerable:false,configurable:true});e.prototype.emitValueChange=function(){this.balChange.emit(this.value)};e.prototype.emitVerticalChange=function(e){if(this.isVertical!==e){this.isVertical=e;this.balVertical.emit(this.isVertical)}};e.prototype.defineWidth=function(){var e=this;u((function(){if(e.isVertical===false){var t=e.el.getBoundingClientRect();e.maxWidth=t.width}e.windowResizeListener()}))};e.prototype.getIndicator=function(e){if(e){var t=e.shadowRoot||e;return t.querySelector(".bal-segment-item__indicator")}return null};e.prototype.checkButton=function(e,t){var i=this.getIndicator(e);var a=this.getIndicator(t);if(i===null||a===null){return}var r=i.getBoundingClientRect();var s=a.getBoundingClientRect();var o=r.width/s.width;var l=r.left-s.left;var c="translate3d(".concat(l,"px, 0, 0) scaleX(").concat(o,")");if(this.isVertical){var b=r.height/s.height;var m=r.top-s.top;c="translate3d(0, ".concat(m,"px, 0) scaleY(").concat(b,")")}n((function(){a.classList.remove("bal-segment-item__indicator--animated");a.style.setProperty("transform",c);a.getBoundingClientRect();a.classList.add("bal-segment-item__indicator--animated");a.style.setProperty("transform","")}));this.value=t.value;this.setCheckedClasses()};e.prototype.setCheckedClasses=function(){var e=this;var t=this.allItems;var i=t.findIndex((function(t){return t.value===e.value}));var n=i+1;var a=i-1;for(var r=0,s=t;r<s.length;r++){var o=s[r];o.classList.remove("bal-segment-item--after-checked");o.classList.remove("bal-segment-item--before-checked")}if(n<t.length){t[n].classList.add("bal-segment-item--after-checked")}if(a<t.length&&a>=0){t[a].classList.add("bal-segment-item--before-checked")}};e.prototype.render=function(){var e=this,t=e.invalid,i=e.isVertical,n=e.scrollable,s=e.keyboardMode,o=e.expanded,l=e.isMobile,b=e.disabled;var m=c.block("segment");return a(r,{key:"8994703f0fda236656407691599b01ab1034222b",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({},m.class()),m.modifier("invalid").class(t)),m.modifier("vertical").class(i)),m.modifier("scrollable").class(n)),m.modifier("keyboard").class(s)),m.modifier("disabled").class(b)),m.modifier("expanded").class((o||l)&&!i)),onClick:this.onClick},a("slot",{key:"e5c55ac6fd670064f3a45ebaee7112268222cdbc",onSlotchange:this.onSlottedItemsChange}))};Object.defineProperty(e.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{disabled:["disabledChanged"],value:["valueChanged"]}},enumerable:false,configurable:true});return e}());o([b("bal-segment"),l("design:type",Function),l("design:paramtypes",[Function]),l("design:returntype",void 0)],X.prototype,"createLogger",null);o([O(),l("design:type",Function),l("design:paramtypes",[FocusEvent]),l("design:returntype",void 0)],X.prototype,"focusInListener",null);o([O(),l("design:type",Function),l("design:paramtypes",[FocusEvent]),l("design:returntype",void 0)],X.prototype,"focusOutListener",null);o([z(),l("design:type",Function),l("design:paramtypes",[]),l("design:returntype",void 0)],X.prototype,"animationListener",null);o([F(),l("design:type",Function),l("design:paramtypes",[]),l("design:returntype",void 0)],X.prototype,"visibilityListener",null);o([L(),l("design:type",Function),l("design:paramtypes",[Object]),l("design:returntype",void 0)],X.prototype,"breakpointListener",null);o([S(),l("design:type",Function),l("design:paramtypes",[]),l("design:returntype",void 0)],X.prototype,"windowResizeListener",null);X.style=E;var I=':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}';var V=I;var B=0;var G=e("bal_segment_item",function(){function e(e){var i=this;t(this,e);this.segmentEl=null;this.inheritedAttributes={};this.internalId=B++;this.inputId="bal-si-".concat(this.internalId);this.updateVertical=function(e){i.isVertical=e.detail};this.updateState=function(){var e=i.segmentEl;if(e){if(e.value===""||e.value===undefined||e.value===null){var t=i.allAvailableOptions;if(t.length>0){var n=t[0];i.isFocusable=n===i.el}}else{i.checked=e.value===i.value;i.isFocusable=e.value===i.value}if(e.disabled){i.disabled=true}i.isLast=e.lastElementChild===i.el;i.isFirst=e.firstElementChild===i.el;i.calculateEmptyValue()}};this.onSlottedItemsChange=function(){i.checkSlotContent()};this.hasSlotContent=false;this.isFocusable=false;this.isVertical=false;this.isLast=false;this.isFirst=false;this.hasEmptyValue=true;this.ariaForm=h;this.disabled=false;this.invalid=false;this.focused=false;this.checked=false;this.label="";this.value="bal-si-"+this.internalId}e.prototype.valueChanged=function(e,t){if(e!==t){this.updateState()}};e.prototype.componentWillLoad=function(){this.inheritedAttributes=Object.assign({},A(this.el,["aria-label"]))};e.prototype.connectedCallback=function(){var e=this.segmentEl=this.el.closest("bal-segment");if(e&&e.vertical){this.isVertical=e.vertical}};e.prototype.componentDidLoad=function(){var e=this;var t=this.segmentEl=this.el.closest("bal-segment");if(t){f(t,"balSelect",this.updateState);f(t,"balVertical",this.updateVertical)}u((function(){e.checkSlotContent();e.updateState()}))};e.prototype.disconnectedCallback=function(){var e=this.segmentEl;if(e){g(e,"balSelect",this.updateState);g(e,"balVertical",this.updateVertical);this.segmentEl=null}};e.prototype.calculateEmptyValue=function(){var e=this;if(this.segmentEl){var t=Array.from(this.segmentEl.querySelectorAll("bal-segment-item"));this.hasEmptyValue=!t.some((function(t){return t.value===e.segmentEl.value}))}else{this.hasEmptyValue=false}};e.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){e=this.nativeEl;if(e!==undefined){e.focus()}return[2]}))}))};e.prototype.setAriaForm=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.ariaForm=Object.assign({},e);return[2]}))}))};Object.defineProperty(e.prototype,"allAvailableOptions",{get:function(){return this.allOptions.filter((function(e){return!e.disabled}))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"allOptions",{get:function(){var e=this.segmentEl;if(e){return Array.from(e.querySelectorAll("bal-segment-item"))}return[]},enumerable:false,configurable:true});e.prototype.checkSlotContent=function(){var e=this.el.querySelector('[part="slot"]');var t=e?e.innerHTML.trim():"";this.hasSlotContent=t.length>0};e.prototype.render=function(){var e=this;var t=this,i=t.checked,n=t.focused,s=t.segmentEl,o=t.label,l=t.isFocusable,b=t.isFirst,m=t.hasEmptyValue;var d=c.block("segment-item");var u=d.element("button");var f=d.element("indicator");var g=this.invalid||s&&s.invalid;var h=this.disabled||s&&s.disabled;var v=this.isVertical;var p=m&&b||l&&!h;var k=p&&this.ariaForm.controlId||this.inputId;var _={};if(p){_={"aria-labelledby":this.ariaForm.labelId,"aria-describedby":this.ariaForm.messageId}}return a(r,{key:"6da240d029f07e7760a962e388998c9c94390d4a",class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},d.class()),d.modifier("vertical").class(v)),d.modifier("disabled").class(h)),d.modifier("checked").class(i)),d.modifier("invalid").class(g)),d.modifier("last").class(this.isLast&&!i))},a("button",Object.assign({key:"b388ce322243a5f47831d0ef1a65b332c191045b",id:k,role:"radio","aria-checked":i?"true":"false"},_,{class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},u.class()),u.modifier("checked").class(i)),u.modifier("invalid").class(g)),u.modifier("disabled").class(h)),u.modifier("focused").class(n)),u.modifier("vertical").class(v)),type:"button",tabIndex:p?0:-1,part:"native",disabled:h,ref:function(t){return e.nativeEl=t}},this.inheritedAttributes),a("bal-icon",{key:"d5ba38e05534eb5ea281cc81a4ad5686b1a4f69b",name:"check",size:"small",class:Object.assign(Object.assign(Object.assign({},u.element("icon").class()),u.element("icon").modifier("animated").class(i)),u.element("icon").modifier("vertical").class(v)),color:h?"grey-dark":g?"white":"primary"}),a("bal-stack",{key:"4a23ae6b4562a685f77f800ff6aca3e5c5e8226e",space:"x-small",layout:"horizontal"},a("bal-content",{key:"a2fb5cf35391ca37fe328534a29cad6e41a7f8fb",space:"none"},a("bal-label",{key:"b3f633a9fe0ea22a71c05982af9dabc366c72495",htmlId:"bal-si-".concat(this.internalId,"-label")},o),a("span",{key:"badf00b587d14525f4cea6ceda85c7f67b1b216e",part:"slot",class:Object.assign({},u.element("slot").modifier("hidden").class(!this.hasSlotContent))}," ",a("slot",{key:"375942fc35e764ef3d91d62a03d08c16165c595b",onSlotchange:this.onSlottedItemsChange}))))),a("div",{key:"b3a0cf381958ad671555306484ca791e93cfe21e",class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},f.class()),f.modifier("animated").class()),f.modifier("background").class()),f.modifier("disabled").class(h)),f.modifier("invalid").class(g)),f.modifier("checked").class(i)),f.modifier("vertical").class(v))}))};Object.defineProperty(e.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{value:["valueChanged"]}},enumerable:false,configurable:true});return e}());G.style=V}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var __extends=this&&this.__extends||function(){var t=function(e,i){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i))t[i]=e[i]};return t(e,i)};return function(e,i){if(typeof i!=="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");t(e,i);function n(){this.constructor=e}e.prototype=i===null?Object.create(i):(n.prototype=i.prototype,new n)}}();var __awaiter=this&&this.__awaiter||function(t,e,i,n){function a(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,r){function s(t){try{o(n.next(t))}catch(t){r(t)}}function l(t){try{o(n["throw"](t))}catch(t){r(t)}}function o(t){t.done?i(t.value):a(t.value).then(s,l)}o((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,a,r,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(t){return function(e){return o([t,e])}}function o(l){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,l[0]&&(i=0)),i)try{if(n=1,a&&(r=l[0]&2?a["return"]:l[0]?a["throw"]||((r=a["return"])&&r.call(a),0):a.next)&&!(r=r.call(a,l[1])).done)return r;if(a=0,r)l=[l[0]&2,r.value];switch(l[0]){case 0:case 1:r=l;break;case 4:i.label++;return{value:l[1],done:false};case 5:i.label++;a=l[1];l=[0];continue;case 7:l=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(l[0]===6||l[0]===2)){i=0;continue}if(l[0]===3&&(!r||l[1]>r[0]&&l[1]<r[3])){i.label=l[1];break}if(l[0]===6&&i.label<r[1]){i.label=r[1];r=l;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(l);break}if(r[2])i.ops.pop();i.trys.pop();continue}l=e.call(t,i)}catch(t){l=[6,t];a=0}finally{n=r=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(t,e,i){if(i||arguments.length===2)for(var n=0,a=e.length,r;n<a;n++){if(r||!(n in e)){if(!r)r=Array.prototype.slice.call(e,0,n);r[n]=e[n]}}return t.concat(r||Array.prototype.slice.call(e))};System.register(["./p-7961e095.system.js","./p-6dbef894.system.js","./p-fa6b5cde.system.js","./p-6913b916.system.js","./p-64aca444.system.js","./p-23bdd8dc.system.js","./p-5cd2674f.system.js","./p-db0895e2.system.js","./p-0f37a65c.system.js","./p-130a16ee.system.js","./p-b63742f3.system.js","./p-7720b262.system.js","./p-980e4b57.system.js","./p-907368ff.system.js","./p-2da669b4.system.js","./p-ba579059.system.js","./p-5f26e92f.system.js","./p-2880433e.system.js","./p-ef3bfa9f.system.js","./p-a1f6e944.system.js","./p-b1c18bf1.system.js","./p-ec9a7cf5.system.js","./p-eecefb0a.system.js"],(function(t){"use strict";var e,i,n,a,r,s,l,o,u,c,f,d,h,b,v,_,m,g,y,p,w,x,j,k,O,C,D;return{setters:[function(t){e=t.h;i=t.r;n=t.c;a=t.H;r=t.g},function(t){s=t._;l=t.a},function(t){o=t.l},function(t){u=t.l},function(t){c=t.B;f=t.i;d=t.d},function(t){h=t.L},function(t){b=t.b;v=t.u},function(t){_=t.B},function(t){m=t.d},function(t){g=t.L},function(t){y=t.L},function(t){p=t.i},function(t){w=t.m;x=t.c;j=t.d},function(t){k=t.d},function(t){O=t.a},function(t){C=t.N},function(t){D=t.I},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){function z(t,e){if(e<1||t<0){return undefined}return new Date(t,e,0).getDate()}function A(t,e,i){return"".concat(i,"-").concat(o("".concat(e),2,"0"),"-").concat(o("".concat(t),2,"0"))}function M(){var t=new Date;return"".concat(t.getFullYear(),"-").concat(o("".concat(t.getMonth()+1),2,"0"),"-").concat(o("".concat(t.getDate()),2,"0"))}function P(t,e,i,n,a){var r=[];var s=z(t,e);var l=L(t,e);if(s!==undefined&&l){var o=M();var f=c.fromISO(i);var d=c.fromISO(n);var h=function(t){if(u(a)){return false}return!a(t)};for(var b=1;b<=s;b++){var v=A(b,e,t);r.push({day:b,month:e,year:t,isoDate:v,fullDate:c.fromISO(v).toFormat(),today:o===v,disabled:f.isAfter(v)||d.isBefore(v)||h(v)})}}return r}function S(t,e){if(e<1||t<0){return 1}var i=new Date(t,e-1,1);var n=i.getDay();return n===0?7:n}function K(t){if(["en","de","fr","it","nl","es","pl","pt","sv","fi"].includes(t)){return t}return"de"}function V(t,e,i){var n=[];var a=new Date;var r=a.getFullYear();for(var s=e;s<=i;s++){n.push({value:s,label:"".concat(s),disabled:false,today:r===s,selected:t===s})}return n}function F(t,e,i,n,a){var r=K(t);var s=c.infoMonths({format:"long",locale:r});var l=c.fromISO(i);var o=new Date;var u=o.getFullYear();var f=o.getMonth()+1;var d=0;if(n&&e!==undefined){var h=c.fromISO(n);if(h.isValid){if(e>h.year){d=0}else{d=h.month||d}}}var b=12;if(a&&e!==undefined){var v=c.fromISO(a);if(v.isValid){if(e<v.year){b=12}else{b=v.month||b}}}return s.map((function(t,i){var n=i+1;return{label:t,value:n,today:n===f&&e===u,selected:n===l.month&&e===l.year,disabled:n<d||n>b}}))}function I(t){var e=K(t);var i=c.infoWeekdays({format:"short",locale:e});var n=c.infoWeekdays({format:"long",locale:e});return i.map((function(t,e){return{ariaLabel:n[e],textContent:t}}))}function L(t,e){if(e<1||e>12||t<0){return undefined}return new Date(t,e-1,1)}var T=function(t){var i=t.name,n=t.isVisible,a=t.girdHeight,r=t.list,s=t.onSelect,l=t.ref;var o=_.block("date-calendar");var u=o.element("body");var c=u.element("list");return e("ul",{class:Object.assign(Object.assign(Object.assign({},c.class()),c.modifier(i).class()),c.modifier("visible").class(n)),"aria-hidden":n?"false":"true",style:{height:"".concat(a-2-8-8,"px")},ref:function(t){return l?l(t):undefined}},r.map((function(t){return e("li",{key:t.value,id:"".concat(i,"-").concat(t.value)},e("button",{class:Object.assign(Object.assign(Object.assign(Object.assign({},c.element("item").class()),c.element("item").modifier("today").class(t.today)),c.element("item").modifier("selected").class(t.selected)),c.element("item").modifier("disabled").class(t.disabled)),disabled:t.disabled,tabIndex:-1,onClick:function(){if(!t.disabled){s(t)}}},t.label))})))};var E=function(t){var i=t.isVisible,n=t.ref,a=t.grid,r=t.weekdays,s=t.selectedDate,l=t.firstDayOfWeek,o=t.onSelectDay;var u=_.block("date-calendar");var c=u.element("body");var f=c.element("grid");return e("div",{role:"grid",class:Object.assign(Object.assign({},f.class()),f.modifier("visible").class(i)),"aria-hidden":i?"false":"true",ref:function(t){return n(t)}},e("div",{role:"row",class:Object.assign({},f.element("head").class())},r.map((function(t){return e("span",{key:t.textContent,role:"columnheader","aria-label":t.ariaLabel,title:t.ariaLabel},t.textContent)}))),e("div",{role:"row",class:Object.assign({},f.element("body").class()),style:{"--bal-date-first-week-day":"".concat(l)}},a.map((function(t){return e("bal-date-calendar-cell",Object.assign({key:t.isoDate},t,{selected:t.isoDate===s,onBalSelectDay:function(t){var e=t.detail;return o(e)}}))}))))};var N=function(t){var i=t.language,n=t.onClickSelectMonthAndYear,a=t.monthFullNames,r=t.month,s=t.year,l=t.isCalendarVisible,o=t.isListVisible,u=t.onClickPreviousMonth,c=t.onClickNextMonth;var d=_.block("date-calendar");var h=d.element("nav");var b=f[i].nextMonth;var v=f[i].previousMonth;var m=f[i].selectMonth;return e("div",{class:Object.assign({},h.class())},e("div",{class:Object.assign({},h.modifier("start").class())},e("button",{title:m,"aria-label":m,tabIndex:-1,"data-test":"change-year-month",onClick:n},e("span",null,a[r-1]," ",s),e("bal-icon",{name:"caret-up",color:"primary",size:"small",turn:l}))),e("div",{class:Object.assign({},h.modifier("end").class()),style:{display:o?"none":"flex"}},e("button",{title:v,"aria-label":v,onClick:u,tabIndex:-1,"data-test":"previous-month"},e("bal-icon",{name:"caret-left",color:"primary",size:"small"})),e("button",{title:b,"aria-label":b,onClick:c,tabIndex:-1,"data-test":"next-month"},e("bal-icon",{name:"caret-right",color:"primary",size:"small"}))))};var R=':host{--bal-date-first-week-day:0;--bal-date-calendar-background:var(--bal-color-red-3)}:host{--bal-date-first-week-day:0;--bal-date-calendar-background:var(--bal-color-red-3)}:host{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-block;background:var(--bal-color-white);border-radius:var(--bal-radius-normal)}.bal-date-calendar__nav{display:-ms-flexbox;display:flex;width:calc(100% - 1rem);-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;padding:.5rem;gap:.5rem}.bal-date-calendar__nav--start>button{display:-ms-flexbox;display:flex;gap:.5rem}.bal-date-calendar__nav--end{display:-ms-flexbox;display:flex;gap:.5rem}.bal-date-calendar__nav button{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;cursor:pointer;border-radius:var(--bal-radius-normal);font-family:var(--bal-font-family-text);font-weight:var(--bal-font-weight-regular);color:var(--bal-color-text-primary);border:none;background:rgba(0,0,0,0);text-align:center;font-size:var(--bal-text-size-normal);line-height:var(--bal-line-height-normal);-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;outline:none;min-height:2rem;min-width:2rem;padding:.25rem;border-radius:var(--bal-button-radius);font-family:var(--bal-font-family-title);font-weight:var(--bal-font-weight-bold)}@media (hover: hover)and (pointer: fine){.bal-date-calendar__nav button:not(.bal-date-calendar__nav button--selected):not(.bal-date-calendar__nav button--disabled):hover{background:var(--bal-color-light-blue-1)}}.bal-date-calendar__nav button:not(.bal-date-calendar__nav button--selected):not(.bal-date-calendar__nav button--disabled):active{background:var(--bal-color-light-blue-2)}.bal-date-calendar__nav button--today:not(.bal-date-calendar__nav button--selected):not(.bal-date-calendar__nav button--disabled){color:var(--bal-color-light-blue-3);font-weight:var(--bal-font-weight-bold)}@media (hover: hover)and (pointer: fine){.bal-date-calendar__nav button--today:not(.bal-date-calendar__nav button--selected):not(.bal-date-calendar__nav button--disabled):hover{color:var(--bal-color-text-primary)}}.bal-date-calendar__nav button--today:not(.bal-date-calendar__nav button--selected):not(.bal-date-calendar__nav button--disabled):active{color:var(--bal-color-text-primary)}.bal-date-calendar__nav button--selected{background:var(--bal-color-primary);color:var(--bal-color-text-white);font-weight:var(--bal-font-weight-bold)}.bal-date-calendar__nav button--disabled{cursor:default;background:rgba(0,0,0,0);color:var(--bal-color-text-grey-light)}.bal-date-calendar__body{display:block}.bal-date-calendar__body__grid{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;padding:.5rem;height:0;padding-top:0;padding-bottom:0;visibility:hidden}.bal-date-calendar__body__grid--visible{height:auto;padding-top:.5rem;padding-bottom:.5rem;visibility:visible}.bal-date-calendar__body__grid__head{position:relative;display:grid;grid-template-columns:repeat(7, 1fr);-webkit-column-gap:.5rem;-moz-column-gap:.5rem;column-gap:.5rem;row-gap:.5rem;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.bal-date-calendar__body__grid__head::after{position:absolute;content:"";height:2px;width:calc(100% + 1rem);bottom:0;left:-0.5rem;right:-0.5rem;background:var(--bal-color-border)}.bal-date-calendar__body__grid__head span{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;height:2rem;width:2rem;font-family:var(--bal-font-family-title);font-weight:var(--bal-font-weight-bold);font-size:var(--bal-text-size-normal);line-height:var(--bal-line-height-normal);-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;text-wrap:nowrap}.bal-date-calendar__body__grid__body{display:grid;grid-template-columns:repeat(7, 1fr);-webkit-column-gap:.5rem;-moz-column-gap:.5rem;column-gap:.5rem;row-gap:.5rem;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;padding-top:.5rem}.bal-date-calendar__body__grid__body>.bal-date-calendar-cell{width:2rem;height:2rem;text-align:center;font-size:var(--bal-text-size-normal);line-height:var(--bal-line-height-normal);-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto}.bal-date-calendar__body__grid__body>.bal-date-calendar-cell:first-child{grid-column:var(--bal-date-first-week-day)}.bal-date-calendar__body__list{display:none;list-style:none;margin:0;padding:0;-webkit-column-gap:.5rem;-moz-column-gap:.5rem;column-gap:.5rem;row-gap:.5rem;width:calc(100% - 1rem);overflow-y:auto;max-height:18rem;position:relative;padding:.5rem;border-top:2px solid var(--bal-color-border)}.bal-date-calendar__body__list .bal-date-calendar__body__list__item{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;cursor:pointer;border-radius:var(--bal-radius-normal);font-family:var(--bal-font-family-text);font-weight:var(--bal-font-weight-regular);color:var(--bal-color-text-primary);border:none;background:rgba(0,0,0,0);text-align:center;font-size:var(--bal-text-size-normal);line-height:var(--bal-line-height-normal);-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;outline:none;width:100%}@media (hover: hover)and (pointer: fine){.bal-date-calendar__body__list .bal-date-calendar__body__list__item:not(.bal-date-calendar__body__list .bal-date-calendar__body__list__item--selected):not(.bal-date-calendar__body__list .bal-date-calendar__body__list__item--disabled):hover{background:var(--bal-color-light-blue-1)}}.bal-date-calendar__body__list .bal-date-calendar__body__list__item:not(.bal-date-calendar__body__list .bal-date-calendar__body__list__item--selected):not(.bal-date-calendar__body__list .bal-date-calendar__body__list__item--disabled):active{background:var(--bal-color-light-blue-2)}.bal-date-calendar__body__list .bal-date-calendar__body__list__item--today:not(.bal-date-calendar__body__list .bal-date-calendar__body__list__item--selected):not(.bal-date-calendar__body__list .bal-date-calendar__body__list__item--disabled){color:var(--bal-color-light-blue-3);font-weight:var(--bal-font-weight-bold)}@media (hover: hover)and (pointer: fine){.bal-date-calendar__body__list .bal-date-calendar__body__list__item--today:not(.bal-date-calendar__body__list .bal-date-calendar__body__list__item--selected):not(.bal-date-calendar__body__list .bal-date-calendar__body__list__item--disabled):hover{color:var(--bal-color-text-primary)}}.bal-date-calendar__body__list .bal-date-calendar__body__list__item--today:not(.bal-date-calendar__body__list .bal-date-calendar__body__list__item--selected):not(.bal-date-calendar__body__list .bal-date-calendar__body__list__item--disabled):active{color:var(--bal-color-text-primary)}.bal-date-calendar__body__list .bal-date-calendar__body__list__item--selected{background:var(--bal-color-primary);color:var(--bal-color-text-white);font-weight:var(--bal-font-weight-bold)}.bal-date-calendar__body__list .bal-date-calendar__body__list__item--disabled{cursor:default;background:rgba(0,0,0,0);color:var(--bal-color-text-grey-light)}.bal-date-calendar__body__list--visible{display:grid}.bal-date-calendar__body__list--year{grid-template-columns:repeat(4, 1fr)}.bal-date-calendar__body__list--month{grid-template-columns:repeat(2, 1fr)}.bal-date-calendar-cell{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;cursor:pointer;border-radius:var(--bal-radius-normal);font-family:var(--bal-font-family-text);font-weight:var(--bal-font-weight-regular);color:var(--bal-color-text-primary);border:none;background:rgba(0,0,0,0);text-align:center;font-size:var(--bal-text-size-normal);line-height:var(--bal-line-height-normal);-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;outline:none;width:2rem;height:2rem}@media (hover: hover)and (pointer: fine){.bal-date-calendar-cell:not(.bal-date-calendar-cell--selected):not(.bal-date-calendar-cell--disabled):hover{background:var(--bal-color-light-blue-1)}}.bal-date-calendar-cell:not(.bal-date-calendar-cell--selected):not(.bal-date-calendar-cell--disabled):active{background:var(--bal-color-light-blue-2)}.bal-date-calendar-cell--today:not(.bal-date-calendar-cell--selected):not(.bal-date-calendar-cell--disabled){color:var(--bal-color-light-blue-3);font-weight:var(--bal-font-weight-bold)}@media (hover: hover)and (pointer: fine){.bal-date-calendar-cell--today:not(.bal-date-calendar-cell--selected):not(.bal-date-calendar-cell--disabled):hover{color:var(--bal-color-text-primary)}}.bal-date-calendar-cell--today:not(.bal-date-calendar-cell--selected):not(.bal-date-calendar-cell--disabled):active{color:var(--bal-color-text-primary)}.bal-date-calendar-cell--selected{background:var(--bal-color-primary);color:var(--bal-color-text-white);font-weight:var(--bal-font-weight-bold)}.bal-date-calendar-cell--disabled{cursor:default;background:rgba(0,0,0,0);color:var(--bal-color-text-grey-light)}';var Y=R;var B=t("bal_date_calendar",function(){function t(t){var e=this;i(this,t);this.balChange=n(this,"balChange",7);this.oldMin="";this.oldMax="";this.onSelectDay=function(t){e.valueChanged(t,e.selectedDate);e.balChange.emit(e.selectedDate)};this.onClickNextMonth=function(){var t=e.year;var i=e.month+1;if(i>12){i=1;t=t+1}e.generateGridByMonthAndYear(i,t)};this.onClickPreviousMonth=function(){var t=e.year;var i=e.month-1;if(i<1){i=12;t=t-1}e.generateGridByMonthAndYear(i,t)};this.onClickSelectMonthAndYear=function(){return __awaiter(e,void 0,void 0,(function(){var t,e;return __generator(this,(function(i){switch(i.label){case 0:this.updateSelections();if(!(this.isCalendarVisible===true))return[3,2];this.isCalendarVisible=false;this.isYearListVisible=true;this.isMonthListVisible=false;return[4,b()];case 1:i.sent();if(this.yearListEl){t=this.yearListEl.querySelector("#year-".concat(this.year));if(t){e=26+8+4;this.yearListEl.scrollTop=t.offsetTop-e*2}else{this.yearListEl.scrollTop=0}}return[3,3];case 2:this.isCalendarVisible=true;this.isYearListVisible=false;this.isMonthListVisible=false;i.label=3;case 3:return[2]}}))}))};this.onClickYear=function(t){e.isYearListVisible=false;e.isMonthListVisible=true;e.generateGridByMonthAndYear(e.month,t);e.months=F(e.language,t,e.selectedDate,e.min,e.max)};this.onClickMonth=function(t){e.isYearListVisible=false;e.isMonthListVisible=false;e.isCalendarVisible=true;e.generateGridByMonthAndYear(t,e.year)};this.selectedDate="";this.monthFullNames=[];this.weekdays=[];this.months=[];this.years=[];this.calendarGrid=[];this.firstDayOfWeek=0;this.month=0;this.year=0;this.language=m.language;this.isCalendarVisible=true;this.isYearListVisible=false;this.isMonthListVisible=false;this.value=undefined;this.defaultDate=undefined;this.allowedDates=undefined;this.min=undefined;this.max=undefined;this.minYearProp=undefined;this.maxYearProp=undefined}t.prototype.createLogger=function(t){this.log=t};t.prototype.valueChanged=function(t,e){if(t!==e){var i=c.fromISO(t);if(!i.isValid){this.generateGridByDefaultDate();this.selectedDate=""}else{this.generateGridByDate(i);this.selectedDate=i.toISODate()}this.updateSelections()}};t.prototype.rangePropChanged=function(){this.updateSelections();this.generateGrid()};t.prototype.yearRangePropChanged=function(){this.updateSelections()};t.prototype.connectedCallback=function(){this.generateGridByDefaultDate();this.valueChanged(this.value,undefined)};t.prototype.configChanged=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.language=t.language;this.monthFullNames=c.infoMonths({format:"long",locale:this.language});this.weekdays=I(this.language);this.updateSelections();return[2]}))}))};t.prototype.swipeListener=function(t){var e=t.left,i=t.right;if(e){this.onClickNextMonth()}else if(i){this.onClickPreviousMonth()}};Object.defineProperty(t.prototype,"minYear",{get:function(){if(this.minYearProp===undefined){var t=new Date;var e=t.getFullYear();var i=e-100;if(this.min){var n=c.fromISO(this.min);return n.year||i}else{return i}}return this.minYearProp},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"maxYear",{get:function(){if(this.maxYearProp===undefined){var t=new Date;var e=t.getFullYear();var i=e+50;if(this.max){var n=c.fromISO(this.max);return n.year||i}else{return i}}return this.maxYearProp},enumerable:false,configurable:true});t.prototype.updateSelections=function(){this.years=V(this.year,this.minYear,this.maxYear);this.months=F(this.language,this.year,this.selectedDate,this.min,this.max)};t.prototype.generateGrid=function(){var t=c.fromISO(this.value);if(t.isValid){this.generateGridByDate(t)}else{this.generateGridByDefaultDate()}};t.prototype.generateGridByDate=function(t){if(t.year!==undefined&&t.month!==undefined){this.generateGridByMonthAndYear(t.month,t.year)}};t.prototype.generateGridByDefaultDate=function(){var t=c.fromISO(this.defaultDate);if(t.isValid){this.generateGridByDate(t)}else{var e=new Date;this.month=e.getMonth()+1;this.year=e.getFullYear();this.calendarGrid=P(this.year,this.month,this.min,this.max,this.allowedDates);this.firstDayOfWeek=S(this.year,this.month)}};t.prototype.generateGridByMonthAndYear=function(t,e){if(this.month!==t||this.year!==e||this.oldMin!==this.min||this.oldMax!==this.max){this.calendarGrid=P(e,t,this.min,this.max,this.allowedDates);this.firstDayOfWeek=S(e,t)}this.month=t;this.year=e;this.oldMin=this.min;this.oldMax=this.max};t.prototype.render=function(){var t=this;var i;var n=((i=this.gridEl)===null||i===void 0?void 0:i.clientHeight)||0;var r=_.block("date-calendar");var s=r.element("body");var l=r.element("foot");return e(a,{key:"2d3c53228071c0a19b7195a60f655bffec5fcfc0",class:Object.assign({},r.class())},e(N,{key:"4722788040473eb1c25f3446658d7b958e874291",language:this.language,monthFullNames:this.monthFullNames,month:this.month,year:this.year,isCalendarVisible:this.isCalendarVisible,isListVisible:this.isMonthListVisible||this.isYearListVisible,onClickSelectMonthAndYear:this.onClickSelectMonthAndYear,onClickPreviousMonth:this.onClickPreviousMonth,onClickNextMonth:this.onClickNextMonth}),e("div",{key:"02dcfdf4f715f41c59e2a9df96a290c27cf08ae1",class:Object.assign({},s.class())},e(E,{key:"4c46752a54d57421757d861233960d03f5ba699e",isVisible:this.isCalendarVisible,grid:this.calendarGrid,weekdays:this.weekdays,firstDayOfWeek:this.firstDayOfWeek,selectedDate:this.selectedDate,ref:function(e){return t.gridEl=e},onSelectDay:function(e){return t.onSelectDay(e)}}),e(T,{key:"30104d40aa8929886651789d7c06ad87f3e6378f",name:"year",isVisible:this.isYearListVisible,girdHeight:n,list:this.years,ref:function(e){return t.yearListEl=e},onSelect:function(e){return t.onClickYear(e.value)}}),e(T,{key:"0e2fa6041ac31f0144086d1b8026af06e3008251",name:"month",isVisible:this.isMonthListVisible,girdHeight:n,list:this.months,onSelect:function(e){return t.onClickMonth(e.value)}})),e("div",{key:"21a7d0cc3c36217f69fb4b07b42b065c3c82299d",class:Object.assign({},l.class())},e("slot",{key:"8aafbfd98fd66b25e313c15864831d4538c56487"})))};Object.defineProperty(t.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{value:["valueChanged"],min:["rangePropChanged"],max:["rangePropChanged"],minYearProp:["yearRangePropChanged"],maxYearProp:["yearRangePropChanged"]}},enumerable:false,configurable:true});return t}());s([h("bal-date-calendar"),l("design:type",Function),l("design:paramtypes",[Function]),l("design:returntype",void 0)],B.prototype,"createLogger",null);s([g(),l("design:type",Function),l("design:paramtypes",[Object]),l("design:returntype",Promise)],B.prototype,"configChanged",null);s([y({mobileOnly:true}),l("design:type",Function),l("design:paramtypes",[Object]),l("design:returntype",void 0)],B.prototype,"swipeListener",null);B.style=Y;var H=function(){function t(t){this._options=t;this._position=0;this._positionEnd=0;this._isRangeSelection=false;if(t.component&&t.component.nativeInput){this._position=t.component.nativeInput.selectionStart||0;this._positionEnd=t.component.nativeInput.selectionEnd||0;this._isRangeSelection=this._position!==this._positionEnd}}Object.defineProperty(t.prototype,"isRangeSelection",{get:function(){return this._isRangeSelection},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"value",{get:function(){if(this._options.isBackspace&&this._position>0){return this._position-1}return this._position},set:function(t){var e=t<0?0:t>this._options.mask.maxLength?this._options.mask.maxLength:t;this._position=e},enumerable:false,configurable:true});t.prototype.toStart=function(){this.value=0};t.prototype.toEnd=function(){var t=this.getTarget();if(t){this.value=t.value.length}};t.prototype.next=function(t){if(t===void 0){t=1}var e=this._position+t;if(e<=this._options.mask.maxLength){this._position=e}return this._position};t.prototype.previous=function(t){if(t===void 0){t=1}var e=this._position-t;if(e>=0){this._position=e}else{this._position=0}return this._position};t.prototype.submit=function(){var t=this.getTarget();if(t&&t.selectionStart!==this._position&&t.selectionEnd!==this._position){t.selectionStart=this._position;t.selectionEnd=this._position}};t.prototype.getTarget=function(){if(this._options.component&&this._options.component.nativeInput){return this._options.component.nativeInput}return undefined};return t}();var J=function(){function t(t){this._options=t;this._value="";if(this._options.component&&this._options.component.nativeInput){this._value=this._options.component.nativeInput.value}this.position=new H(this._options);this.component=this._options.component}Object.defineProperty(t.prototype,"target",{get:function(){if(this._options.component&&this._options.component.nativeInput){return this._options.component.nativeInput}return undefined},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"value",{get:function(){return this._value},set:function(t){this._value=t},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"focused",{get:function(){return this._options.component.focused},enumerable:false,configurable:true});t.prototype.isValueEmpty=function(){return this.value===""||this.value===undefined||this.value===null};t.prototype.preventDefault=function(){if(this._options.event.preventDefault){this._options.event.preventDefault()}};t.prototype.stopPropagation=function(){this.preventDefault();if(this._options.event.stopPropagation){this._options.event.stopPropagation()}};t.prototype.submit=function(){return __awaiter(this,arguments,void 0,(function(t,e){if(t===void 0){t="input"}return __generator(this,(function(i){if(this.target){this.target.value=this.value;if(t!=="blur"&&t!=="tab"){this.position.submit()}if(this._options.component){if(t==="input"||t==="tab"){this._options.component.balInput.emit(this.value)}if((t==="change"||t==="blur")&&e!==undefined){if(w(this._options.component.value,e)){this._options.component.value=e;this._options.component.balChange.emit(e)}}}}return[2]}))}))};return t}();var G=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}Object.defineProperty(e.prototype,"clipboardData",{get:function(){var t;return(t=this._options.event.clipboardData)===null||t===void 0?void 0:t.getData("text")},enumerable:false,configurable:true});return e}(J);var W=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(J);var q=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}Object.defineProperty(e.prototype,"key",{get:function(){return this._options.event.key},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isCtrlOrCommandKey",{get:function(){return this._options.event.metaKey||this._options.event.ctrlKey},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isBackspaceKey",{get:function(){return this._options.event.key==="Backspace"},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isTabKey",{get:function(){return this._options.event.key==="Tab"},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isWhiteSpaceKey",{get:function(){return this._options.event.key===" "},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isDeleteKey",{get:function(){return this._options.event.key==="Delete"||this._options.event.key==="Del"},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isNumberKey",{get:function(){return e.NUMBER_KEYS.includes(this._options.event.key)},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isNavigationKey",{get:function(){return e.NAVIGATION_KEYS.includes(this._options.event.key)},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isSelectAllCommand",{get:function(){return(this._options.event.ctrlKey||this._options.event.metaKey)&&this.key==="a"},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isCopyCommand",{get:function(){return(this._options.event.ctrlKey||this._options.event.metaKey)&&this.key==="c"},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isPasteCommand",{get:function(){return(this._options.event.ctrlKey||this._options.event.metaKey)&&this.key==="v"},enumerable:false,configurable:true});e.prototype.getCharAt=function(t){if(t===void 0){t=this.position.value}return this.value.charAt(t)};e.prototype.getCharAtBackspacePosition=function(){return this.getCharAt(this.position.value-1)};e.prototype.setChar=function(t,e){if(t===void 0){t=this._options.event.key}if(e===void 0){e=this.position.value}this.value=this.value.substring(0,e)+t+this.value.substring(e+1)};return e}(J);q.NUMBER_KEYS=["0","1","2","3","4","5","6","7","8","9"];q.NAVIGATION_KEYS=["Home","End","ArrowLeft","Left","ArrowRight","Right","Tab","Enter","Esc","Escape"];var Q=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}Object.defineProperty(e.prototype,"locale",{get:function(){return this._options.event.locale},enumerable:false,configurable:true});return e}(J);var U=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(J);var X=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}Object.defineProperty(e.prototype,"newValue",{get:function(){return this._options.event.newValue},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"oldValue",{get:function(){return this._options.event.oldValue},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"didValueChange",{get:function(){return this.newValue!==this.oldValue},enumerable:false,configurable:true});return e}(J);var Z=function(){function t(t){this._isSeparator=false;this._allowedKeys=[];this._locale="de-CH";this._from=t.from||0;this._to=t.to||0;this._isSeparator=t.isSeparator===undefined?false:t.isSeparator;this._mask=t.mask||"_";this._allowedKeys=t.allowedKeys?t.allowedKeys:this.allowedKeys;this._format=t.format}t.prototype.format=function(t){if(this._format){return this._format(t.replace(this.mask,""),this._locale,this.mask)}return t};Object.defineProperty(t.prototype,"isSeparator",{get:function(){return this._isSeparator},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"to",{get:function(){return this._to},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"from",{get:function(){return this._from},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"mask",{get:function(){if(typeof this._mask==="function"){return this._mask(this._locale)}return this._mask},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"allowedKeys",{get:function(){return this._allowedKeys},enumerable:false,configurable:true});t.prototype.onI18nChange=function(t){this._locale=t};t.prototype.getValueOfTheBlock=function(t){return t.slice(this._from,this._to)};t.prototype.isTouched=function(t){var e=this;var i=this.getValueOfTheBlock(t);return!i.split("").every((function(t){return t===e.mask}))};t.prototype.verifyAllowedKeyHits=function(t){if(this.isSeparator&&t===this.mask){return true}else if(this.allowedKeys.indexOf(t)>=0){return true}else{return false}};return t}();var $=function(){function t(t){if(t===void 0){t=[]}this._list=t}Object.defineProperty(t.prototype,"lastPosition",{get:function(){return this._list[this._list.length-1].to},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"list",{get:function(){return this._list},set:function(t){this._list=t},enumerable:false,configurable:true});t.prototype.clone=function(){return new t(__spreadArray([],this._list,true))};t.prototype.findByIndex=function(t,e){if(e===void 0){e=this.list}return e.find((function(e){return e.from<=t&&t<e.to}))};t.prototype.getPlaceholderMask=function(){var t=[];this.list.forEach((function(e){var i=e.to-e.from;for(var n=0;n<i;n++){t.push(e.mask)}}));return t.join("")};t.prototype.getRawValueWithoutMaskByContext=function(t){return this.getRawValueWithoutMask(t.value)};t.prototype.getRawValueWithoutMask=function(t){if(t){var e=[];var i=t.split("");for(var n=0;n<i.length;n++){var a=i[n];var r=this.findByIndex(n);if(r&&!r.isSeparator){e.push(a.replace(r.mask,""))}else{e.push(a)}}e=e.filter((function(t){return t}));var s=this.list.filter((function(t){return t.isSeparator})).length;if(s===e.length){return""}return e.join("")}return""};t.prototype.formatBlocks=function(t,e){var i="".concat(t);for(var n=0;n<this.list.length;n++){var a=this.list[n];if(e!==n&&!a.isSeparator&&a.isTouched(i)){var r=a.getValueOfTheBlock(i);var s=a.format(r);i=i.substring(0,a.from)+s+i.substring(a.to)}}return i};t.prototype.getBlockIndexFromPosition=function(t){var e=this.list.reduce((function(t,e){return t+e.to-e.from}),0);if(t===e){return this.list.length-1}var i=this.list.findIndex((function(e){return e.from<=t&&t<e.to}));return i<0?undefined:Math.min(e,i)};t.prototype.verifyCallOfNextSeparator=function(t,e){if(this.list.length-1>e){var i=this.list[e+1];if(i.isSeparator&&i.mask===t){return true}}return false};return t}();var tt=function(){function t(t){if(t===void 0){t=[]}this.inputMode="text";this.locale="de-CH";this.blocks=new $(t)}t.prototype.onLocaleChange=function(t,e,i){if(t.target){var n=t.value;var a=n.split("");for(var r=0;r<a.length;r++){var s=a[r];var l=this.blocks.findByIndex(r);var o=i.findByIndex(r);if(l&&o){if(l.isSeparator){a[r]=l.mask}else if(s===o.mask){a[r]=l.mask}}}t.value=a.join("")}};t.prototype.onFocus=function(t){};t.prototype.onBlur=function(t){};t.prototype.onChange=function(t){t.submit("change",this.onParseValue(t.value))};t.prototype.onNavigationDown=function(t,e,i){};t.prototype.onSelectAll=function(t,e,i){};t.prototype.onPaste=function(t,e,i){var n=t.clipboardData||"";t.value=n;t.position.toEnd()};t.prototype.onBlockChange=function(t,e,i){t.setChar();t.position.next();var n=this.blocks.list[i+1];if(t.position.value===e.to&&n&&n.isSeparator){t.position.next()}};t.prototype.onBackspaceDown=function(t,e,i){t.position.previous();if(!e.isSeparator){t.setChar(e.mask);var n=this.blocks.list[i-1];if(t.position.value===e.from&&n&&n.isSeparator){t.position.previous()}}};t.prototype.onDeleteDown=function(t,e,i){t.setChar(e.mask);t.position.next();var n=this.blocks.list[i+1];if(t.position.value===e.to&&n&&n.isSeparator){t.position.next()}};t.prototype.onValueChanged=function(t){var e=this.onFormatValue(t.newValue);var i=t.focused&&e===""?this.blocks.getPlaceholderMask():e;t.value=i;t.position.toEnd()};t.prototype.onParseValue=function(t,e){if(e===void 0){e={allowInvalidValue:false}}if(t){return t.trim()}return t||""};t.prototype.onFormatValue=function(t){if(t){return t.trim()}return t||""};t.prototype.toParsedValue=function(t){return this.onParseValue(t)};t.prototype.toFormattedValue=function(t){return this.onFormatValue(t)};t.prototype.fireI18nChange=function(t){var e=this.blocks.clone();var i="".concat(t.locale);this.locale=t.locale;this.blocks.list.forEach((function(e){return e.onI18nChange(t.locale)}));this.onLocaleChange(t,i,e)};t.prototype.fireValueChanged=function(t){if(t.didValueChange){this.onValueChanged(t)}};t.prototype.firePaste=function(t){var e=this.blocks.getBlockIndexFromPosition(t.position.value);if(e!==undefined){var i=this.blocks.list[e];this.onPaste(t,i,e);this.onChange(t)}};t.prototype.fireClick=function(t){var e=this.blocks.getPlaceholderMask();if(e===t.value){t.position.toStart()}};t.prototype.fireFocus=function(t){if(t.target&&t.isValueEmpty()){this.resetInputValueWithMask(t)}this.onFocus(t)};t.prototype.fireBlur=function(t){if(t.target){if(this.isValueEmptyMask(t)){this.emptyInputValue(t)}else{this.onBlur(t);t.submit("blur",this.onParseValue(t.value,{allowInvalidValue:t.component.allowInvalidValue}))}}};t.prototype.fireKeyDown=function(t){var e=t.isBackspaceKey?Math.max(0,t.position.value-1):t.position.value;var i=this.blocks.getBlockIndexFromPosition(e);if(e>=this.blocks.lastPosition&&!t.isNavigationKey&&!t.isSelectAllCommand){t.preventDefault();t.stopPropagation();return}if(i!==undefined&&!t.position.isRangeSelection){var n=this.blocks.list[i];if(t.isNavigationKey){this.onNavigationDown(t,n,i)}else if(t.isSelectAllCommand){this.onSelectAll(t,n,i)}else if(t.isCopyCommand);else if(t.isPasteCommand);else if(t.isBackspaceKey){t.preventDefault();this.onBackspaceDown(t,n,i)}else if(t.isDeleteKey){t.preventDefault();this.onDeleteDown(t,n,i)}else if(t.isWhiteSpaceKey){t.preventDefault();var a=t.value[t.position.value];if(a==="."){t.stopPropagation();var r=t.value;t.value=r.substring(0,t.position.value)+"_"+r.substring(t.position.value+1)}}else if(n.verifyAllowedKeyHits(t.key)){t.preventDefault();this.onBlockChange(t,n,i)}else if(this.blocks.verifyCallOfNextSeparator(t.key,i)){t.preventDefault();var s=this.blocks.list[i];if(t.position.value>s.from){var l=this.blocks.list[i+1];var r=t.value;var o=n.getValueOfTheBlock(r);var u=n.format(o);t.value=r.substring(0,n.from)+u+r.substring(n.to);t.position.value=l.to}}var c=this.blocks.getBlockIndexFromPosition(t.position.value);if(c&&!t.isBackspaceKey){var f=this.blocks.formatBlocks(t.value,c);var d=t.position.value;t.value=f;t.position.value=d}}else{if(!t.isTabKey){t.preventDefault()}if(t.isBackspaceKey||t.isDeleteKey){this.resetInputValueWithMask(t)}else if(this.blocks.list[0].verifyAllowedKeyHits(t.key)){this.onBlockChange(t,this.blocks.list[0],0)}}};t.prototype.resetInputValueWithMask=function(t){t.value=this.blocks.getPlaceholderMask();t.position.toStart()};t.prototype.isValueEmptyMask=function(t){var e=this.blocks.getPlaceholderMask();return e===t.value};t.prototype.emptyInputValue=function(t){t.value="";t.submit("blur",t.value)};return t}();var et=function(t){__extends(e,t);function e(){var e=t.call(this,[new Z({from:0,to:2,allowedKeys:__spreadArray([],C,true),format:function(t,e,i){if(Number.isNaN(parseInt(t,10))){return"".concat(i).concat(i)}return t.padStart(2,"0")},mask:function(t){return e.dayMask[t.split("-")[0]]||e.dayMask["de"]}}),new Z({from:2,to:3,mask:function(t){return d(t)},isSeparator:true}),new Z({from:3,to:5,allowedKeys:__spreadArray([],C,true),format:function(t,e,i){if(Number.isNaN(parseInt(t,10))){return"".concat(i).concat(i)}return t.padStart(2,"0")},mask:function(t){return e.monthMask[t.split("-")[0]]||e.monthMask["de"]}}),new Z({from:5,to:6,mask:function(t){return d(t)},isSeparator:true}),new Z({from:6,to:10,allowedKeys:__spreadArray([],C,true),mask:function(t){return e.yearMask[t.split("-")[0]]||e.yearMask["de"]}})])||this;e.maxLength=10;e.minLength=10;e.inputMode="decimal";e.dayMask={de:"T",en:"D",fr:"J",it:"G",nl:"D",es:"D",pl:"D",pt:"D",sv:"D",fi:"M"};e.monthMask={de:"M",en:"M",fr:"M",it:"M",nl:"M",es:"M",pl:"M",pt:"M",sv:"M",fi:"K"};e.yearMask={de:"J",en:"Y",fr:"A",it:"A",nl:"J",es:"A",pl:"R",pt:"A",sv:"Å",fi:"V"};return e}e.prototype.onParseValue=function(t,e){if(e===void 0){e={allowInvalidValue:false}}if(t){var i=c.fromAnyFormat(this.blocks.getRawValueWithoutMask(t));if(i.isValid){return i.toISODate()}else if(e&&e.allowInvalidValue){return D}}return""};e.prototype.onFormatValue=function(t){if(t){var e=c.fromISO(t);if(e.isValid){return e.toFormat()}}return""};e.prototype.onPaste=function(t,e,i){var n=t.clipboardData||"";var a=c.fromAnyFormat(n);if(a.isValid){t.value=a.toFormat();t.position.toEnd()}};e.prototype.onBlur=function(t){var e=this.blocks.getRawValueWithoutMaskByContext(t);var i=c.fromAnyFormat(e);if(i.isValid){var n=i.toFormat();if(n!==t.value){t.value=n}}else if(t.component.allowInvalidValue){if(e!==t.value){t.value=e}}};return e}(tt);var it=function(){function t(t){this.mask=t}Object.defineProperty(t.prototype,"attributes",{get:function(){return{inputMode:this.mask.inputMode,maxLength:this.mask.maxLength,minLength:this.mask.minLength,type:"text",autoCapitalize:"off",autoCorrect:"off",spellcheck:false}},enumerable:false,configurable:true});t.prototype.bindComponent=function(t){this.component=t};t.prototype.bindComponentDidLoad=function(){if(this.component&&this.component.nativeInput){this.component.nativeInput.value=this.component.value||""}this.bindValueChanged(this.component.value,undefined)};t.prototype.bindConfigChanged=function(t){var e=this,i=e.component,n=e.mask;var a=new Q({component:i,mask:n,event:{locale:"".concat(t.language,"-").concat(t.region)}});this.mask.fireI18nChange(a);a.submit()};t.prototype.bindValueChanged=function(t,e){var i=this,n=i.component,a=i.mask;var r=new X({component:n,mask:a,event:{newValue:t,oldValue:e}});this.mask.fireValueChanged(r);r.submit("blur")};t.prototype.bindKeyDown=function(t){if(this.isComponentAccessible){var e=this,i=e.component,n=e.mask;var a=new q({event:t,component:i,mask:n});this.mask.fireKeyDown(a);var r=t.key==="Tab";a.submit(r?"tab":"input");i.balKeyPress.emit(t)}};t.prototype.bindFocus=function(t){if(this.isComponentAccessible){var e=this,i=e.component,n=e.mask;i.focused=true;var a=new W({event:t,component:i,mask:n});this.mask.fireFocus(a);a.submit();i.balFocus.emit(t)}};t.prototype.bindBlur=function(t){if(this.isComponentAccessible){var e=this,i=e.component,n=e.mask;i.focused=false;var a=new W({event:t,component:i,mask:n});this.mask.fireBlur(a);a.submit("blur");i.balBlur.emit(t)}};t.prototype.bindPaste=function(t){if(this.isComponentAccessible){var e=this,i=e.component,n=e.mask;var a=new G({event:t,component:i,mask:n});this.mask.firePaste(a);a.submit()}};t.prototype.bindFormReset=function(t){var e=this;var i=t.target;if(i&&(i===this.component.el||i.contains(this.component.el))){this.component.value=this.component.initialValue;this.component.inputValue=this.component.initialValue;clearTimeout(this.resetHandlerTimer);this.resetHandlerTimer=setTimeout((function(){if(e.component.nativeInput){e.component.nativeInput.value=e.mask.toFormattedValue(e.component.value||"")}}))}};t.prototype.bindClick=function(t){if(this.isComponentAccessible){var e=this,i=e.component,n=e.mask;var a=new U({event:t,component:i,mask:n});this.mask.fireClick(a);a.submit()}};t.prototype.bindHostClick=function(t){if(!this.isComponentAccessible){t.preventDefault();t.stopPropagation()}};t.prototype.bindGlobalClick=function(t){if(!this.isComponentAccessible){if(t.target&&t.target===this.component.el){t.preventDefault();t.stopPropagation()}}};Object.defineProperty(t.prototype,"isComponentAccessible",{get:function(){return!this.component.disabled&&!this.component.readonly},enumerable:false,configurable:true});return t}();var nt=".bal-input-date{display:block;width:100%;-ms-flex:1;flex:1}.bal-input-date input:not(:-moz-placeholder-shown){letter-spacing:.4px}.bal-input-date input:not(:-ms-input-placeholder){letter-spacing:.4px}.bal-input-date input:not(:placeholder-shown){letter-spacing:.4px}.bal-input-date__native{position:absolute !important;left:0;top:0;margin:0;padding:0;opacity:0;outline:0;border:none;width:1px;height:1px;clip:rect(1px, 1px, 1px, 1px);overflow:hidden}";var at=nt;var rt=t("bal_input_date",function(){function t(t){i(this,t);this.balKeyPress=n(this,"balKeyPress",7);this.balChange=n(this,"balChange",7);this.balInput=n(this,"balInput",7);this.balBlur=n(this,"balBlur",7);this.balFocus=n(this,"balFocus",7);this.inputId="bal-i-date-".concat(st++);this.inheritedAttributes={};this.maskAdapter=new it(new et);this.inputValue=this.value;this.initialValue=this.value||"";this.focused=false;this.isGrouped=false;this.ariaForm=k;this.name=this.inputId;this.invalid=false;this.required=false;this.disabled=false;this.readonly=false;this.placeholder=undefined;this.clickable=false;this.min=undefined;this.max=undefined;this.autocomplete="off";this.hasIconRight=false;this.value=undefined;this.autoInvalidOff=false;this.allowInvalidValue=false}t.prototype.createLogger=function(t){this.log=t};t.prototype.valueChanged=function(t,e){this.maskAdapter.bindValueChanged(t,e)};t.prototype.connectedCallback=function(){this.maskAdapter.bindComponent(this);this.isGrouped=v("bal-input-group",this.el)};t.prototype.componentDidLoad=function(){this.maskAdapter.bindComponentDidLoad()};t.prototype.componentWillRender=function(){this.inheritedAttributes=p(this.el,["aria-label","tabindex","title"])};t.prototype.configChanged=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.maskAdapter.bindConfigChanged(t);return[2]}))}))};t.prototype.resetHandler=function(t){this.maskAdapter.bindFormReset(t)};t.prototype.listenOnClick=function(t){this.maskAdapter.bindGlobalClick(t)};t.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){x(this);return[2]}))}))};t.prototype.setBlur=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){j(this);return[2]}))}))};t.prototype.getInputElement=function(){return Promise.resolve(this.nativeInput)};t.prototype.setAriaForm=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.ariaForm=Object.assign({},t);return[2]}))}))};t.prototype.render=function(){var t=this;var i=_.block("input-date");var n=i.element("native");return e(a,{key:"38b2bfc91f2249540a9f5d2536d34b917070e903",onClick:function(e){return t.maskAdapter.bindHostClick(e)},class:Object.assign({},i.class())},e("input",Object.assign({key:"b689f1780889807f91d776f903712cd3e6341283",class:{input:true,"is-disabled":this.disabled||this.readonly,"is-danger":this.invalid,"is-clickable":this.clickable&&!(this.disabled||this.readonly),"bal-focusable":!this.disabled,"has-icon-right":this.hasIconRight},"data-testid":"bal-date-input",ref:function(e){return t.nativeInput=e},id:this.ariaForm.controlId||this.inputId,"aria-labelledby":this.ariaForm.labelId,"aria-describedby":this.ariaForm.messageId,"aria-invalid":this.invalid===true?"true":"false","aria-disabled":O(this.disabled),required:this.required,disabled:this.disabled,readonly:this.readonly,autoComplete:this.autocomplete},this.maskAdapter.attributes,this.inheritedAttributes,{placeholder:this.placeholder,value:this.inputValue,onKeyDown:function(e){return t.maskAdapter.bindKeyDown(e)},onClick:function(e){return t.maskAdapter.bindClick(e)},onFocus:function(e){return t.maskAdapter.bindFocus(e)},onBlur:function(e){return t.maskAdapter.bindBlur(e)},onPaste:function(e){return t.maskAdapter.bindPaste(e)}})),e("input",{key:"80414fe198d63903a23853e603053771c50448d3",type:"date",class:Object.assign({},n.class()),name:this.name,min:this.min,max:this.max,value:this.value,tabindex:-1,"aria-hidden":"true"}))};Object.defineProperty(t.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{value:["valueChanged"]}},enumerable:false,configurable:true});return t}());s([h("bal-input-date"),l("design:type",Function),l("design:paramtypes",[Function]),l("design:returntype",void 0)],rt.prototype,"createLogger",null);s([g(),l("design:type",Function),l("design:paramtypes",[Object]),l("design:returntype",Promise)],rt.prototype,"configChanged",null);var st=0;rt.style=at}}}));
|