@trendyol/baklava 2.4.0-beta.1 → 2.4.0-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/baklava-react.d.ts +24 -1
- package/dist/baklava-react.d.ts.map +1 -1
- package/dist/baklava-react.js +1 -1
- package/dist/baklava-react.js.map +3 -3
- package/dist/baklava-vue.d.ts +2 -0
- package/dist/baklava.d.ts +2 -0
- package/dist/baklava.d.ts.map +1 -1
- package/dist/baklava.js +1 -1
- package/dist/{chunk-SX5PCXCH.js → chunk-5EFPA3CA.js} +2 -2
- package/dist/chunk-5EFPA3CA.js.map +7 -0
- package/dist/{chunk-RD3RUK2N.js → chunk-6UTBN2XX.js} +2 -2
- package/dist/chunk-7QGSFS64.js +16 -0
- package/dist/chunk-7QGSFS64.js.map +7 -0
- package/dist/chunk-AAGDUS7G.js +11 -0
- package/dist/chunk-AAGDUS7G.js.map +7 -0
- package/dist/chunk-AMAOGVPQ.js +106 -0
- package/dist/chunk-AMAOGVPQ.js.map +7 -0
- package/dist/{chunk-6F253HWQ.js → chunk-AVMAZXZT.js} +2 -2
- package/dist/chunk-AYJMIZZ3.js +11 -0
- package/dist/{chunk-YOV2DMM7.js.map → chunk-AYJMIZZ3.js.map} +4 -4
- package/dist/chunk-BEGAFK2I.js +18 -0
- package/dist/chunk-BEGAFK2I.js.map +7 -0
- package/dist/chunk-CYCIT2TG.js +2 -0
- package/dist/chunk-ECPWEUBG.js +2 -0
- package/dist/chunk-ECPWEUBG.js.map +7 -0
- package/dist/{chunk-VGRVU3IL.js → chunk-EPFBV6RC.js} +2 -2
- package/dist/chunk-EPFBV6RC.js.map +7 -0
- package/dist/{chunk-OQ22A5U6.js → chunk-FJTTJ5ZT.js} +2 -2
- package/dist/{chunk-2HHDYA7P.js → chunk-FSFO7DCO.js} +2 -2
- package/dist/{chunk-LDNUCSUE.js → chunk-JI2OEPG2.js} +2 -2
- package/dist/{chunk-RMYPWPMS.js → chunk-KR6AUZ77.js} +2 -2
- package/dist/{chunk-4CK6AU4F.js → chunk-KXWP6EDU.js} +2 -2
- package/dist/{chunk-5PMB453Q.js → chunk-L4XYDFNG.js} +2 -2
- package/dist/{chunk-GYWKNHAH.js → chunk-LWG2UXQG.js} +2 -2
- package/dist/{chunk-FAMBVSX3.js → chunk-MNNOI75G.js} +2 -2
- package/dist/chunk-MPKYBU46.js +33 -0
- package/dist/chunk-MPKYBU46.js.map +7 -0
- package/dist/chunk-PCREGBBF.js +7 -0
- package/dist/chunk-PCREGBBF.js.map +7 -0
- package/dist/chunk-RFUZBNM4.js +34 -0
- package/dist/chunk-RFUZBNM4.js.map +7 -0
- package/dist/{chunk-AIIJINAR.js → chunk-RQG2GHCK.js} +2 -2
- package/dist/{chunk-7RZ45QDQ.js → chunk-SLY6IY2R.js} +2 -2
- package/dist/chunk-V5OMCBVZ.js +23 -0
- package/dist/chunk-V5OMCBVZ.js.map +7 -0
- package/dist/{chunk-5F2BYHAE.js → chunk-VOYAVKU3.js} +2 -2
- package/dist/{chunk-R5GCM62W.js → chunk-WA7DDIST.js} +2 -2
- package/dist/{chunk-IRDH7CN2.js → chunk-X2KXJYXQ.js} +5 -5
- package/dist/{chunk-IRDH7CN2.js.map → chunk-X2KXJYXQ.js.map} +4 -4
- package/dist/chunk-X5MXYPRD.js +31 -0
- package/dist/chunk-X5MXYPRD.js.map +7 -0
- package/dist/chunk-XQUQIQBO.js +21 -0
- package/dist/chunk-XQUQIQBO.js.map +7 -0
- package/dist/components/alert/bl-alert.js +1 -1
- package/dist/components/badge/bl-badge.js +1 -1
- package/dist/components/button/bl-button.js +1 -1
- package/dist/components/checkbox-group/bl-checkbox-group.js +1 -1
- package/dist/components/checkbox-group/checkbox/bl-checkbox.js +1 -1
- package/dist/components/dialog/bl-dialog.d.ts +8 -0
- package/dist/components/dialog/bl-dialog.d.ts.map +1 -1
- package/dist/components/dialog/bl-dialog.js +1 -1
- package/dist/components/dialog/bl-dialog.stories.js +8 -13
- package/dist/components/dialog/bl-dialog.stories.js.map +4 -4
- package/dist/components/drawer/bl-drawer.js +1 -1
- package/dist/components/dropdown/bl-dropdown.d.ts.map +1 -1
- package/dist/components/dropdown/bl-dropdown.js +1 -1
- package/dist/components/dropdown/group/bl-dropdown-group.js +1 -1
- package/dist/components/dropdown/item/bl-dropdown-item.js +1 -1
- package/dist/components/icon/bl-icon.js +1 -1
- package/dist/components/icon/icon-list.js +1 -1
- package/dist/components/input/bl-input.js +1 -1
- package/dist/components/notification/bl-notification.d.ts +70 -0
- package/dist/components/notification/bl-notification.d.ts.map +1 -0
- package/dist/components/notification/bl-notification.js +2 -0
- package/dist/components/notification/bl-notification.js.map +7 -0
- package/dist/components/notification/bl-notification.stories.d.ts +18 -0
- package/dist/components/notification/bl-notification.stories.d.ts.map +1 -0
- package/dist/components/notification/bl-notification.stories.js +149 -0
- package/dist/components/notification/bl-notification.stories.js.map +7 -0
- package/dist/components/notification/bl-notification.test.d.ts +2 -0
- package/dist/components/notification/bl-notification.test.d.ts.map +1 -0
- package/dist/components/notification/card/bl-notification-card.d.ts +83 -0
- package/dist/components/notification/card/bl-notification-card.d.ts.map +1 -0
- package/dist/components/notification/card/bl-notification-card.js +2 -0
- package/dist/components/notification/card/bl-notification-card.js.map +7 -0
- package/dist/components/notification/card/bl-notification-card.test.d.ts +2 -0
- package/dist/components/notification/card/bl-notification-card.test.d.ts.map +1 -0
- package/dist/components/pagination/bl-pagination.js +1 -1
- package/dist/components/popover/bl-popover.js +1 -1
- package/dist/components/progress-indicator/bl-progress-indicator.js +1 -1
- package/dist/components/radio-group/bl-radio-group.js +1 -1
- package/dist/components/radio-group/radio/bl-radio.js +1 -1
- package/dist/components/select/bl-select.d.ts +39 -0
- package/dist/components/select/bl-select.d.ts.map +1 -1
- package/dist/components/select/bl-select.js +1 -1
- package/dist/components/select/bl-select.test.d.ts +1 -1
- package/dist/components/select/bl-select.test.d.ts.map +1 -1
- package/dist/components/select/option/bl-select-option.js +1 -1
- package/dist/components/switch/bl-switch.d.ts.map +1 -1
- package/dist/components/switch/bl-switch.js +1 -1
- package/dist/components/tab-group/bl-tab-group.js +1 -1
- package/dist/components/tab-group/tab/bl-tab.js +1 -1
- package/dist/components/tab-group/tab-panel/bl-tab-panel.js +1 -1
- package/dist/components/textarea/bl-textarea.js +1 -1
- package/dist/components/tooltip/bl-tooltip.js +1 -1
- package/dist/custom-elements.json +280 -4
- package/dist/themes/default.css +1 -1
- package/dist/themes/default.css.map +2 -2
- package/dist/utilities/elements.d.ts +5 -0
- package/dist/utilities/elements.d.ts.map +1 -0
- package/package.json +2 -2
- package/dist/chunk-4HHOA5GY.js +0 -23
- package/dist/chunk-4HHOA5GY.js.map +0 -7
- package/dist/chunk-5HXMVHTD.js +0 -5
- package/dist/chunk-5HXMVHTD.js.map +0 -7
- package/dist/chunk-DOUEBILK.js +0 -16
- package/dist/chunk-DOUEBILK.js.map +0 -7
- package/dist/chunk-FJQ4VEP3.js +0 -31
- package/dist/chunk-FJQ4VEP3.js.map +0 -7
- package/dist/chunk-IRY7JHJ4.js +0 -50
- package/dist/chunk-IRY7JHJ4.js.map +0 -7
- package/dist/chunk-M4N2NT5C.js +0 -33
- package/dist/chunk-M4N2NT5C.js.map +0 -7
- package/dist/chunk-SX5PCXCH.js.map +0 -7
- package/dist/chunk-VGRVU3IL.js.map +0 -7
- package/dist/chunk-VO7C5OZC.js +0 -2
- package/dist/chunk-YOV2DMM7.js +0 -18
- /package/dist/{chunk-RD3RUK2N.js.map → chunk-6UTBN2XX.js.map} +0 -0
- /package/dist/{chunk-6F253HWQ.js.map → chunk-AVMAZXZT.js.map} +0 -0
- /package/dist/{chunk-VO7C5OZC.js.map → chunk-CYCIT2TG.js.map} +0 -0
- /package/dist/{chunk-OQ22A5U6.js.map → chunk-FJTTJ5ZT.js.map} +0 -0
- /package/dist/{chunk-2HHDYA7P.js.map → chunk-FSFO7DCO.js.map} +0 -0
- /package/dist/{chunk-LDNUCSUE.js.map → chunk-JI2OEPG2.js.map} +0 -0
- /package/dist/{chunk-RMYPWPMS.js.map → chunk-KR6AUZ77.js.map} +0 -0
- /package/dist/{chunk-4CK6AU4F.js.map → chunk-KXWP6EDU.js.map} +0 -0
- /package/dist/{chunk-5PMB453Q.js.map → chunk-L4XYDFNG.js.map} +0 -0
- /package/dist/{chunk-GYWKNHAH.js.map → chunk-LWG2UXQG.js.map} +0 -0
- /package/dist/{chunk-FAMBVSX3.js.map → chunk-MNNOI75G.js.map} +0 -0
- /package/dist/{chunk-AIIJINAR.js.map → chunk-RQG2GHCK.js.map} +0 -0
- /package/dist/{chunk-7RZ45QDQ.js.map → chunk-SLY6IY2R.js.map} +0 -0
- /package/dist/{chunk-5F2BYHAE.js.map → chunk-VOYAVKU3.js.map} +0 -0
- /package/dist/{chunk-R5GCM62W.js.map → chunk-WA7DDIST.js.map} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{a as w,b as g,c as f,d as E,e as y,f as x,g as _,h as k}from"./chunk-EZSEQHRH.js";import{a as u}from"./chunk-6LT7O7T2.js";import{a as n}from"./chunk-GRL4DWKG.js";import{a as b,b as i,c as a,
|
|
1
|
+
import{a as w,b as g,c as f,d as E,e as y,f as x,g as _,h as k}from"./chunk-EZSEQHRH.js";import{a as u}from"./chunk-6LT7O7T2.js";import{a as n}from"./chunk-GRL4DWKG.js";import{a as b,b as i,c as a,e as s}from"./chunk-X2KXJYXQ.js";import{a as h,b as c,f as m}from"./chunk-4OT5AMS5.js";import{c as r}from"./chunk-CYCIT2TG.js";var M=h`:host{display:contents}.popover{--arrow-display:var(--bl-popover-arrow-display, none);--background-color:var(--bl-popover-background-color, var(--bl-color-neutral-full));--border-color:var(--bl-popover-border-color, var(--bl-color-primary-highlight));--border-size:var(--bl-popover-border-size, 1px);--padding:var(--bl-popover-padding, var(--bl-size-m));--border-radius:var(--bl-popover-border-radius, var(--bl-size-3xs));--position:var(--bl-popover-position, fixed);--max-width:var(--bl-popover-max-width, 100vw);--max-viewport:calc(100vw - var(--bl-size-s));position:var(--position);box-sizing:border-box;border:var(--border-size) solid var(--border-color);padding:var(--padding);border-radius:var(--border-radius);z-index:var(--bl-index-popover);max-width:min(var(--max-viewport), var(--max-width));width:max-content;hyphens:auto;background-color:var(--background-color);font:var(--bl-font-title-3-regular);color:var(--bl-color-neutral-darker)}.popover:not(.visible){visibility:hidden}.arrow{--arrow-rotation:45deg;--size:var(--bl-size-2xs);--arrow-position:calc((var(--size) / -2) - var(--border-size));box-sizing:border-box;display:var(--arrow-display);position:absolute;background-color:var(--background-color);width:var(--size);height:var(--size);transform:rotate(var(--arrow-rotation));border:var(--border-size) solid var(--border-color);border-bottom:none;border-right:none}.popover[data-placement*="bottom"] .arrow{top:var(--arrow-position)}.popover[data-placement*="top"] .arrow{--arrow-rotation:225deg;bottom:var(--arrow-position)}.popover[data-placement*="left"] .arrow{--arrow-rotation:135deg;right:var(--arrow-position)}.popover[data-placement*="right"] .arrow{--arrow-rotation:315deg;left:var(--arrow-position)}`,z=M;var t=class extends m{constructor(){super(...arguments);this.placement="bottom";this.fitSize=!1;this.offset=8;this._visible=!1;this._handleClickOutside=e=>{let o=e.composedPath();!o.includes(this._target)&&!o.includes(this)&&this.hide()}}static get styles(){return[z]}connectedCallback(){super.connectedCallback(),this._handlePopoverShowEvent=this._handlePopoverShowEvent.bind(this),this._handleKeydownEvent=this._handleKeydownEvent.bind(this),this._handleClickOutside=this._handleClickOutside.bind(this)}disconnectedCallback(){super.disconnectedCallback(),this.popoverAutoUpdateCleanup&&this.popoverAutoUpdateCleanup()}getMiddleware(){let e=[];return e.push(E(this.offset),f(),g(),y({padding:4})),this.fitSize&&e.push(x({apply(o){o.elements.floating&&o.elements.reference&&Object.assign(o.elements.floating.style,{"min-width":`${o.elements.reference.getBoundingClientRect().width}px`})}})),e.push(w({element:this.arrow,padding:5})),e}setPopover(){this.target&&(this.popoverAutoUpdateCleanup=_(this.target,this.popover,()=>{k(this.target,this.popover,{placement:this.placement,strategy:"fixed",middleware:this.getMiddleware()}).then(({x:e,y:o,placement:l,middlewareData:p})=>{if(Object.assign(this.popover.style,{left:`${e}px`,top:`${o}px`}),this.popover.dataset.placement=l,p.arrow){let{x:d,y:v}=p.arrow;Object.assign(this.arrow.style,{left:d!=null?`${d}px`:"",top:v!=null?`${v}px`:""})}})}))}get target(){return this._target}set target(e){typeof e=="string"?this._target=document.getElementById(e):e instanceof Element?this._target=e:console.warn("BlPopover target only accepts an Element instance or a string id of a DOM element.")}show(){this._visible=!0,this.setPopover(),this.onBlPopoverShow(""),document.addEventListener("click",this._handleClickOutside),document.addEventListener("keydown",this._handleKeydownEvent),document.addEventListener("bl-popover-show",this._handlePopoverShowEvent)}hide(){this._visible=!1,document.removeEventListener("click",this._handleClickOutside),document.removeEventListener("keydown",this._handleKeydownEvent),document.removeEventListener("bl-popover-show",this._handlePopoverShowEvent),this.onBlPopoverHide("")}get visible(){return this._visible}_handlePopoverShowEvent(e){if(e.target!==this){let{parentElement:o}=e.target;this.contains(o)||this.hide()}}_handleKeydownEvent(e){e.key==="Escape"&&this.visible&&(e.preventDefault(),this.hide())}render(){let e=u({popover:!0,visible:this._visible});return c`<div class=${e}>
|
|
2
2
|
<slot id="popover" aria-live=${this._visible?"polite":"off"}></slot>
|
|
3
3
|
<div class="arrow" aria-hidden="true"></div>
|
|
4
4
|
</div>`}};r([s(".popover")],t.prototype,"popover",2),r([s(".arrow")],t.prototype,"arrow",2),r([i({type:String})],t.prototype,"placement",2),r([a()],t.prototype,"_target",2),r([i({type:Boolean,attribute:"fit-size"})],t.prototype,"fitSize",2),r([i({type:Number})],t.prototype,"offset",2),r([a()],t.prototype,"_visible",2),r([n("bl-popover-show")],t.prototype,"onBlPopoverShow",2),r([n("bl-popover-hide")],t.prototype,"onBlPopoverHide",2),r([i()],t.prototype,"target",1),t=r([b("bl-popover")],t);export{t as a};
|
|
5
|
-
//# sourceMappingURL=chunk-
|
|
5
|
+
//# sourceMappingURL=chunk-L4XYDFNG.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s,b as i,c as d}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s,b as i,c as d}from"./chunk-X2KXJYXQ.js";import{a as l,b as o,f as a}from"./chunk-4OT5AMS5.js";import{c as r}from"./chunk-CYCIT2TG.js";var u=l`div{padding:var(--bl-size-xl);background-color:var(--bl-color-neutral-full);border-radius:0 0 var(--bl-border-radius-m) var(--bl-border-radius-m)}div[hidden]{display:none}`,p=u;var t=class extends a{constructor(){super(...arguments);this.hidden=!0}static get styles(){return[p]}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{var e;this.tabGroup=this.closest("bl-tab-group"),(e=this.tabGroup)==null||e.registerTabPanel(this)})}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.tabGroup)==null||e.unregisterTabPanel(this)}render(){return o`<div ?hidden=${this.hidden}><slot></slot></div>`}};r([d()],t.prototype,"hidden",2),r([i({type:String,reflect:!0})],t.prototype,"tab",2),t=r([s("bl-tab-panel")],t);export{t as a};
|
|
2
|
+
//# sourceMappingURL=chunk-LWG2UXQG.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as k}from"./chunk-OSNB4BPE.js";import{a as $}from"./chunk-
|
|
1
|
+
import{b as k}from"./chunk-OSNB4BPE.js";import{a as $}from"./chunk-AAGDUS7G.js";import{a as z}from"./chunk-DJOD4BTL.js";import{a as w}from"./chunk-6LT7O7T2.js";import{a as c}from"./chunk-GRL4DWKG.js";import{a as b,b as a,c as u,e as m}from"./chunk-X2KXJYXQ.js";import{a as s}from"./chunk-DINNT5P2.js";import{a as f,b as y,c as x}from"./chunk-7GK5LKBV.js";import{a as v,b as d,c as g,f as p}from"./chunk-4OT5AMS5.js";import{c as r}from"./chunk-CYCIT2TG.js";var C="important",I=" !"+C,S=y(class extends x{constructor(o){var l;if(super(o),o.type!==f.ATTRIBUTE||o.name!=="style"||((l=o.strings)===null||l===void 0?void 0:l.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(o){return Object.keys(o).reduce((l,e)=>{let i=o[e];return i==null?l:l+`${e=e.includes("-")?e:e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`},"")}update(o,[l]){let{style:e}=o.element;if(this.ht===void 0){this.ht=new Set;for(let i in l)this.ht.add(i);return this.render(l)}this.ht.forEach(i=>{l[i]==null&&(this.ht.delete(i),i.includes("-")?e.removeProperty(i):e[i]="")});for(let i in l){let n=l[i];if(n!=null){this.ht.add(i);let h=typeof n=="string"&&n.endsWith(I);i.includes("-")||h?e.setProperty(i,h?n.slice(0,-11):n,h?C:""):e[i]=n}}return g}});var L=v`:host{display:inline-block;width:200px;position:relative}.wrapper{--row-count:1;--maxrow-count: ;--line-height:var(--bl-font-title-3-line-height);--scroll-height:var(--line-height);--padding-vertical:var(--bl-size-2xs);--padding-horizontal:var(--bl-size-xs);--label-padding:var(--bl-size-3xs);--border-size:1px;--default-scroll-height:calc((var(--row-count) * var(--line-height)) + var(--padding-vertical));--height:max(var(--scroll-height), var(--default-scroll-height));--input-font:var(--bl-font-body-text-2);--border-radius:var(--bl-size-3xs);--border-color:var(--bl-color-neutral-lighter);--background-color:var(--bl-color-neutral-full);display:flex;flex-direction:column;position:relative;gap:var(--bl-size-3xs)}.input-wrapper{border:solid var(--border-size) var(--border-color);border-radius:var(--border-radius);padding:0 calc(var(--padding-horizontal) - var(--label-padding) - var(--border-size));padding-top:var(--padding-vertical);display:flex;box-sizing:border-box;background-color:var(--background-color);margin:0;width:0;min-width:100%}textarea{--parent-padding:calc(var(--padding-horizontal) - var(--label-padding) - var(--border-size));width:100%;align-self:stretch;outline:none;font:var(--input-font);padding:0 calc(var(--padding-horizontal) - var(--border-size));padding-bottom:var(--padding-vertical);margin:0 calc(-1 * var(--parent-padding));border:none;border-radius:var(--border-radius);color:var(--bl-color-neutral-darker);resize:vertical;background-color:transparent;display:block}:host([size="large"]) .wrapper{--padding-vertical:var(--bl-size-xs);--padding-horizontal:var(--bl-size-m)}:host([size="small"]) .wrapper{--padding-vertical:var(--bl-size-3xs);--padding-horizontal:var(--bl-size-xs);--input-font:var(--bl-font-body-text-3);--line-height:var(--bl-font-title-4-line-height)}textarea:disabled{background-color:var(--bl-color-neutral-lightest);color:var(--bl-color-neutral-light);cursor:not-allowed}:host([disabled]) .wrapper{--background-color:var(--bl-color-neutral-lightest)}:host([expand]) textarea{overflow:hidden;resize:none;height:var(--height)}:host([expand][max-rows]) textarea{--maxrow-height:calc((var(--maxrow-count) * var(--line-height)) + var(--padding-vertical));overflow-y:scroll;height:min(var(--height), var(--maxrow-height))}.wrapper:focus-within{--border-color:var(--bl-color-primary)}.dirty.max-len-invalid,.dirty.invalid{--border-color:var(--bl-color-danger)}:host([label]) ::placeholder{color:transparent;transition:color ease-out 0.4s}.input-wrapper legend,label{padding:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}label{max-width:max-content;position:absolute;transition:all ease-in 0.1s;font:var(--bl-font-title-3-regular);top:var(--padding-vertical);left:var(--padding-horizontal);right:var(--padding-horizontal);pointer-events:none;color:var(--bl-color-neutral-light)}.input-wrapper legend{height:0;visibility:hidden;display:none}.input-wrapper legend span{padding:0 var(--label-padding);display:inline-block;opacity:0;visibility:visible}:where(.wrapper:focus-within, .wrapper.has-value) label{top:0;left:var(--padding-horizontal);transform:translateY(-50%);font:var(--bl-font-caption);color:var(--bl-color-neutral-dark);pointer-events:initial;z-index:var(--bl-index-base)}:host([label]) :where(.wrapper:focus-within, .wrapper.has-value) legend{max-width:100%;font:var(--bl-font-caption);display:block}:host ::placeholder,:host([label-fixed]) ::placeholder{color:var(--bl-color-neutral-light)}:host([label-fixed]) label{position:static;transition:none;transform:none;pointer-events:initial;font:var(--bl-font-caption);color:var(--bl-color-neutral-dark);background-color:initial;padding:0}:host([label-fixed]) legend{display:none}.hint{display:none;font:var(--bl-font-body-text-3)}:host([character-counter]) .hint,:host([help-text]) .hint,.dirty.invalid .hint{display:flex;gap:var(--bl-size-3xs)}.hint > *{margin:0;padding:0}.help-text,.invalid-text{flex:1}.counter-text{color:var(--bl-color-neutral-dark);margin-left:auto}:where(.max-len-invalid, .dirty.invalid) .hint > .counter-text{color:var(--bl-color-danger)}.dirty.invalid label{color:var(--bl-color-danger)}.invalid-text{display:none;color:var(--bl-color-danger)}.help-text{color:var(--bl-color-neutral-dark)}:where(.dirty.max-len-invalid, .dirty.invalid) .hint > .invalid-text{display:inline-block}.dirty.invalid .hint > .help-text{display:none}`,E=L;var t=class extends z(p){constructor(){super(...arguments);this.name="";this.required=!1;this.disabled=!1;this.expand=!1;this.size="medium";this.labelFixed=!1;this.characterCounter=!1;this.value="";this.rows=4;this.autofocus=!1;this.spellchecker="false";this.customScrollHeight=null;this.inputId=Math.random().toString(36).substring(2);this.onError=()=>{this.onInvalid(this.internals.validity)};this.dirty=!1}static get styles(){return[E]}connectedCallback(){var e;super.connectedCallback(),(e=this.internals.form)==null||e.addEventListener("submit",()=>{this.reportValidity()})}inputHandler(e){this.autoResize();let i=e.target.value;this.value=i,this.onInput(i)}changeHandler(e){let i=e.target.value;this.dirty=!0,this.value=i,this.onChange(i)}firstUpdated(){this.setValue(this.value),this.autoResize()}async updated(e){e.has("rows")&&this.autoResize(),e.has("value")&&(this.setValue(this.value),await this.validationComplete,this.requestUpdate())}reportValidity(){return this.dirty=!0,this.checkValidity()}valueChangedCallback(e){this.value=e}validityCallback(){var e;return this.customInvalidText||((e=this.validationTarget)==null?void 0:e.validationMessage)}autoResize(){if(!this.expand)return;this.validationTarget.style.height="auto";let e=this.validationTarget.scrollHeight;this.customScrollHeight=`${e}px`,this.validationTarget.style.removeProperty("height")}render(){let e=this.internals.validity.tooLong,i=this.checkValidity()?"":d`<p class="invalid-text">${this.validationMessage}</p>`,n=this.helpText?d`<p class="help-text">${this.helpText}</p>`:"",h=this.label?d`<label for="${this.inputId}">${this.label}</label>`:"",M=this.characterCounter&&this.maxlength?`${this.value.length}/${this.maxlength}`:this.characterCounter?`${this.value.length}`:"",R=this.characterCounter?d`<p class="counter-text">${M}</p>`:"",H={wrapper:!0,"has-value":this.value!==null&&this.value!=="",dirty:this.dirty,"max-len-invalid":e,invalid:!this.checkValidity()},V={"--row-count":`${this.rows}`,"--maxrow-count":this.maxRows?`${this.maxRows}`:null,"--scroll-height":this.customScrollHeight};return d`
|
|
2
2
|
<div style=${S(V)} class=${w(H)}>
|
|
3
3
|
${h}
|
|
4
4
|
<fieldset class="input-wrapper">
|
|
@@ -34,4 +34,4 @@ lit-html/directives/style-map.js:
|
|
|
34
34
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
35
35
|
*)
|
|
36
36
|
*/
|
|
37
|
-
//# sourceMappingURL=chunk-
|
|
37
|
+
//# sourceMappingURL=chunk-MNNOI75G.js.map
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import{a as g}from"./chunk-6LT7O7T2.js";import{a as c}from"./chunk-GRL4DWKG.js";import{a as b,b as d,e as n}from"./chunk-X2KXJYXQ.js";import{a as u,b as r,f}from"./chunk-4OT5AMS5.js";import{c as t}from"./chunk-CYCIT2TG.js";var y=u`:host{display:contents}.container{--background-color:var(--bl-color-neutral-full);display:flex;flex-direction:column;background:var(--background-color);max-width:calc(100vw - var(--bl-size-4xl));max-height:calc(100vh - var(--bl-size-4xl));min-width:424px;padding:0;border:0;border-radius:var(--bl-border-radius-l)}.dialog,.dialog-polyfill .container{padding:0;border:0;border-radius:var(--bl-border-radius-l)}.dialog-polyfill .container{position:fixed;z-index:var(--bl-index-dialog)}.dialog::backdrop{background-color:#273142b3}.dialog-polyfill{display:none;position:fixed;left:0;top:0;width:100vw;height:100vh;align-items:center;justify-content:center;z-index:var(--bl-index-dialog);background-color:#273142b3}:host([open]) .dialog-polyfill{display:flex}header{display:flex;justify-content:space-between;align-items:center;gap:var(--bl-size-2xs);padding:var(--bl-size-xl) var(--bl-size-xl) 0 var(--bl-size-xl)}header bl-button{margin-left:auto}header h2{font:var(--bl-font-title-1-medium);color:var(--bl-color-neutral-darker);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0;padding:0}.content{padding:var(--bl-size-xl);overflow:auto}.container.has-footer .content{padding-bottom:0}footer{padding:var(--bl-size-xl);display:flex;flex-flow:row-reverse wrap;gap:var(--bl-size-m)}footer.shadow{/* FIXME: Use variables for sizes */box-shadow:0 -4px 15px #27314226}@media only screen and (max-width: 471px){.container{max-width:calc(100vw - var(--bl-size-2xl));max-height:calc(100vh - var(--bl-size-2xl));min-width:auto;min-height:auto}footer{flex-flow:column wrap}}`,m=y;var o=class extends f{constructor(){super(...arguments);this.open=!1;this.polyfilled=!0;this.clickOutsideHandler=e=>{e.composedPath().includes(this.container)||this.closeDialog("backdrop")};this.onKeydown=e=>{e.code==="Escape"&&this.open&&(e.preventDefault(),this.closeDialog("keyboard"))}}static get styles(){return[m]}updated(e){(e.has("open")||e.has("polyfilled"))&&this.toggleDialogHandler()}get _hasFooter(){return[...this.childNodes].some(e=>e.nodeName==="BL-BUTTON")}toggleDialogHandler(){var e,i,a,l;this.open?((i=(e=this.dialog)==null?void 0:e.showModal)==null||i.call(e),this.onOpen({isOpen:!0}),document.body.style.overflow="hidden",this.toggleFooterShadow(),window==null||window.addEventListener("keydown",s=>this.onKeydown(s)),window==null||window.addEventListener("resize",()=>this.toggleFooterShadow())):((l=(a=this.dialog)==null?void 0:a.close)==null||l.call(a),this.onClose({isOpen:!1}),document.body.style.overflow="auto",window==null||window.removeEventListener("keydown",this.onKeydown),window==null||window.removeEventListener("resize",this.toggleFooterShadow))}closeDialog(e){this.onRequestClose({source:e},{cancelable:!0}).defaultPrevented||(this.open=!1)}toggleFooterShadow(){var e,i,a,l,s,v;((e=this.content)==null?void 0:e.scrollHeight)>((i=this.content)==null?void 0:i.offsetHeight)?(l=(a=this.footer)==null?void 0:a.classList)==null||l.add("shadow"):(v=(s=this.footer)==null?void 0:s.classList)==null||v.remove("shadow")}renderFooter(){return this._hasFooter?r`<footer>
|
|
2
|
+
<slot name="primary-action"></slot>
|
|
3
|
+
<slot name="secondary-action"></slot>
|
|
4
|
+
<slot name="tertiary-action"></slot>
|
|
5
|
+
</footer>`:""}renderContainer(){let e=this.caption?r`<h2 id="dialog-caption">${this.caption}</h2>`:"",i={container:!0,"has-footer":this._hasFooter};return r` <div class="${g(i)}">
|
|
6
|
+
<header>
|
|
7
|
+
${e}
|
|
8
|
+
<bl-button
|
|
9
|
+
@click="${()=>this.closeDialog("close-button")}"
|
|
10
|
+
icon="close"
|
|
11
|
+
variant="tertiary"
|
|
12
|
+
kind="neutral"
|
|
13
|
+
></bl-button>
|
|
14
|
+
</header>
|
|
15
|
+
<section class="content"><slot></slot></section>
|
|
16
|
+
${this.renderFooter()}
|
|
17
|
+
</div>`}render(){return this.polyfilled||!window.HTMLDialogElement?r`<div
|
|
18
|
+
class="dialog-polyfill"
|
|
19
|
+
role="dialog"
|
|
20
|
+
aria-labelledby="dialog-caption"
|
|
21
|
+
@click=${this.clickOutsideHandler}
|
|
22
|
+
>
|
|
23
|
+
${this.renderContainer()}
|
|
24
|
+
</div>`:r`
|
|
25
|
+
<dialog
|
|
26
|
+
class="dialog"
|
|
27
|
+
aria-labelledby="dialog-caption"
|
|
28
|
+
@click=${this.clickOutsideHandler}
|
|
29
|
+
>
|
|
30
|
+
${this.renderContainer()}
|
|
31
|
+
</dialog>
|
|
32
|
+
`}};t([d({type:Boolean,reflect:!0,hasChanged(p,h){return p===!1&&h===void 0?!1:p!==h}})],o.prototype,"open",2),t([d({type:String})],o.prototype,"caption",2),t([d({type:Boolean,reflect:!0})],o.prototype,"polyfilled",2),t([n(".dialog")],o.prototype,"dialog",2),t([n("footer")],o.prototype,"footer",2),t([n(".container")],o.prototype,"container",2),t([n(".content")],o.prototype,"content",2),t([c("bl-dialog-open")],o.prototype,"onOpen",2),t([c("bl-dialog-request-close")],o.prototype,"onRequestClose",2),t([c("bl-dialog-close")],o.prototype,"onClose",2),o=t([b("bl-dialog")],o);export{o as a};
|
|
33
|
+
//# sourceMappingURL=chunk-MPKYBU46.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/components/dialog/bl-dialog.css", "../src/components/dialog/bl-dialog.ts"],
|
|
4
|
+
"sourcesContent": ["import {css} from 'lit';\nexport const styles = css`:host{display:contents}.container{--background-color:var(--bl-color-neutral-full);display:flex;flex-direction:column;background:var(--background-color);max-width:calc(100vw - var(--bl-size-4xl));max-height:calc(100vh - var(--bl-size-4xl));min-width:424px;padding:0;border:0;border-radius:var(--bl-border-radius-l)}.dialog,.dialog-polyfill .container{padding:0;border:0;border-radius:var(--bl-border-radius-l)}.dialog-polyfill .container{position:fixed;z-index:var(--bl-index-dialog)}.dialog::backdrop{background-color:#273142b3}.dialog-polyfill{display:none;position:fixed;left:0;top:0;width:100vw;height:100vh;align-items:center;justify-content:center;z-index:var(--bl-index-dialog);background-color:#273142b3}:host([open]) .dialog-polyfill{display:flex}header{display:flex;justify-content:space-between;align-items:center;gap:var(--bl-size-2xs);padding:var(--bl-size-xl) var(--bl-size-xl) 0 var(--bl-size-xl)}header bl-button{margin-left:auto}header h2{font:var(--bl-font-title-1-medium);color:var(--bl-color-neutral-darker);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0;padding:0}.content{padding:var(--bl-size-xl);overflow:auto}.container.has-footer .content{padding-bottom:0}footer{padding:var(--bl-size-xl);display:flex;flex-flow:row-reverse wrap;gap:var(--bl-size-m)}footer.shadow{/* FIXME: Use variables for sizes */box-shadow:0 -4px 15px #27314226}@media only screen and (max-width: 471px){.container{max-width:calc(100vw - var(--bl-size-2xl));max-height:calc(100vh - var(--bl-size-2xl));min-width:auto;min-height:auto}footer{flex-flow:column wrap}}`;\nexport default styles;\n", "import { CSSResultGroup, html, LitElement, PropertyValues, TemplateResult } from \"lit\";\nimport { customElement, property, query } from \"lit/decorators.js\";\nimport { classMap } from \"lit/directives/class-map.js\";\nimport { event, EventDispatcher } from \"../../utilities/event\";\nimport \"../button/bl-button\";\nimport style from \"./bl-dialog.css\";\n\ntype DialogElement = {\n showModal: () => void;\n close: () => void;\n};\n\n/**\n * @tag bl-dialog\n * @summary Baklava Dialog component\n */\n@customElement(\"bl-dialog\")\nexport default class BlDialog extends LitElement {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n /**\n * Sets dialog open-close status\n */\n @property({\n type: Boolean,\n reflect: true,\n hasChanged(newVal: boolean, oldVal: boolean | undefined) {\n if (newVal === false && oldVal === undefined) {\n // Assume that the initial value is false\n return false;\n }\n return newVal !== oldVal;\n },\n })\n open = false;\n\n /**\n * Sets the dialog title\n */\n @property({ type: String })\n caption?: string;\n\n /**\n * Determines if dialog currently uses polyfilled version instead of native HTML Dialog. By\n * default, it uses native Dialog if the browser supports it, otherwise polyfills. You can force\n * using polyfill by setting this to true in some cases like to show some content on top of dialog\n * in case you are not able to use Popover API. Be aware that, polyfilled version can cause some\n * inconsistencies in terms of accessibility and stacking context. So use it with extra caution.\n *\n * As of the current implementation, you can render above the dialog HTML element using the Popover API. However,\n * it will block any actions on the Popover element. This issue was encountered during the development of the `bl-notification` component.\n * As a result, we decided to enable the polyfill for the `bl-dialog` component by default. If you prefer to use the native dialog, you can set\n * this property to false. Please note, doing so will cause notifications to render under the dialog backdrop.\n * For more information, refer to the comment linked below:\n *\n * https://github.com/Trendyol/baklava/issues/141#issuecomment-1810301413\n */\n @property({ type: Boolean, reflect: true })\n polyfilled = true;\n\n @query(\".dialog\")\n private dialog: HTMLDialogElement & DialogElement;\n\n @query(\"footer\")\n private footer: HTMLElement;\n\n @query(\".container\")\n private container: HTMLElement;\n\n @query(\".content\")\n private content: HTMLElement;\n\n /**\n * Fires when the dialog is opened\n */\n @event(\"bl-dialog-open\") private onOpen: EventDispatcher<object>;\n\n /**\n * Fires before the dialog is closed with internal actions like clicking close button,\n * pressing Escape key or clicking backdrop. Can be prevented by calling `event.preventDefault()`\n */\n @event(\"bl-dialog-request-close\") private onRequestClose: EventDispatcher<{\n source: \"close-button\" | \"keyboard\" | \"backdrop\";\n }>;\n\n /**\n * Fires when the dialog is closed\n */\n @event(\"bl-dialog-close\") private onClose: EventDispatcher<object>;\n\n updated(changedProperties: PropertyValues<this>) {\n if (changedProperties.has(\"open\") || changedProperties.has(\"polyfilled\")) {\n this.toggleDialogHandler();\n }\n }\n\n private get _hasFooter() {\n return [...this.childNodes].some(node => node.nodeName === \"BL-BUTTON\");\n }\n\n private toggleDialogHandler() {\n if (this.open) {\n this.dialog?.showModal?.();\n this.onOpen({ isOpen: true });\n document.body.style.overflow = \"hidden\";\n this.toggleFooterShadow();\n window?.addEventListener(\"keydown\", event => this.onKeydown(event));\n window?.addEventListener(\"resize\", () => this.toggleFooterShadow());\n } else {\n this.dialog?.close?.();\n this.onClose({ isOpen: false });\n document.body.style.overflow = \"auto\";\n window?.removeEventListener(\"keydown\", this.onKeydown);\n window?.removeEventListener(\"resize\", this.toggleFooterShadow);\n }\n }\n\n private closeDialog(source: \"close-button\" | \"keyboard\" | \"backdrop\") {\n const requestCloseEvent = this.onRequestClose({ source }, { cancelable: true });\n\n if (requestCloseEvent.defaultPrevented) {\n return;\n }\n\n this.open = false;\n }\n\n private clickOutsideHandler = (event: MouseEvent) => {\n const eventPath = event.composedPath() as HTMLElement[];\n\n if (!eventPath.includes(this.container)) {\n this.closeDialog(\"backdrop\");\n }\n };\n\n private onKeydown = (event: KeyboardEvent): void => {\n if (event.code === \"Escape\" && this.open) {\n event.preventDefault();\n this.closeDialog(\"keyboard\");\n }\n };\n\n private toggleFooterShadow() {\n if (this.content?.scrollHeight > this.content?.offsetHeight) {\n this.footer?.classList?.add(\"shadow\");\n } else {\n this.footer?.classList?.remove(\"shadow\");\n }\n }\n\n private renderFooter() {\n return this._hasFooter\n ? html`<footer>\n <slot name=\"primary-action\"></slot>\n <slot name=\"secondary-action\"></slot>\n <slot name=\"tertiary-action\"></slot>\n </footer>`\n : \"\";\n }\n\n private renderContainer() {\n const title = this.caption ? html`<h2 id=\"dialog-caption\">${this.caption}</h2>` : \"\";\n\n const classes = {\n \"container\": true,\n \"has-footer\": this._hasFooter,\n };\n\n return html` <div class=\"${classMap(classes)}\">\n <header>\n ${title}\n <bl-button\n @click=\"${() => this.closeDialog(\"close-button\")}\"\n icon=\"close\"\n variant=\"tertiary\"\n kind=\"neutral\"\n ></bl-button>\n </header>\n <section class=\"content\"><slot></slot></section>\n ${this.renderFooter()}\n </div>`;\n }\n\n render(): TemplateResult {\n return this.polyfilled || !window.HTMLDialogElement\n ? html`<div\n class=\"dialog-polyfill\"\n role=\"dialog\"\n aria-labelledby=\"dialog-caption\"\n @click=${this.clickOutsideHandler}\n >\n ${this.renderContainer()}\n </div>`\n : html`\n <dialog\n class=\"dialog\"\n aria-labelledby=\"dialog-caption\"\n @click=${this.clickOutsideHandler}\n >\n ${this.renderContainer()}\n </dialog>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bl-dialog\": BlDialog;\n }\n}\n"],
|
|
5
|
+
"mappings": "+NACO,IAAMA,EAASC,+iDACfC,EAAQF,ECef,IAAqBG,EAArB,cAAsCC,CAAW,CAAjD,kCAmBE,UAAO,GAwBP,gBAAa,GAqEb,KAAQ,oBAAuBC,GAAsB,CACjCA,EAAM,aAAa,EAEtB,SAAS,KAAK,SAAS,GACpC,KAAK,YAAY,UAAU,CAE/B,EAEA,KAAQ,UAAaA,GAA+B,CAC9CA,EAAM,OAAS,UAAY,KAAK,OAClCA,EAAM,eAAe,EACrB,KAAK,YAAY,UAAU,EAE/B,EA5HA,WAAW,QAAyB,CAClC,MAAO,CAACC,CAAK,CACf,CAwEA,QAAQC,EAAyC,EAC3CA,EAAkB,IAAI,MAAM,GAAKA,EAAkB,IAAI,YAAY,IACrE,KAAK,oBAAoB,CAE7B,CAEA,IAAY,YAAa,CACvB,MAAO,CAAC,GAAG,KAAK,UAAU,EAAE,KAAKC,GAAQA,EAAK,WAAa,W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AAA;AAAA,UAErCD;AAAA;AAAA,oBAEU,IAAM,KAAK,YAAY,cAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAOjD,KAAK,aAAa;AAAA,WAExB,CAEA,QAAyB,CACvB,OAAO,KAAK,YAAc,CAAC,OAAO,kBAC9BD;AAAA;AAAA;AAAA;AAAA,mBAIW,KAAK;AAAA;AAAA,YAEZ,KAAK,gBAAgB;AAAA,gBAEzBA;AAAA;AAAA;AAAA;AAAA,qBAIa,KAAK;AAAA;AAAA,cAEZ,KAAK,gBAAgB;AAAA;AAAA,SAGjC,CACF,EAzKEI,EAAA,CAXCC,EAAS,CACR,KAAM,QACN,QAAS,GACT,WAAWC,EAAiBC,EAA6B,CACvD,OAAID,IAAW,IAASC,IAAW,OAE1B,GAEFD,IAAWC,CACpB,CACF,CAAC,GAlBkBpB,EAmBnB,oBAMAiB,EAAA,CADCC,EAAS,CAAE,KAAM,MAAO,CAAC,GAxBPlB,EAyBnB,uBAkBAiB,EAAA,CADCC,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GA1CvBlB,EA2CnB,0BAGQiB,EAAA,CADPI,EAAM,SAAS,GA7CGrB,EA8CX,sBAGAiB,EAAA,CADPI,EAAM,QAAQ,GAhDIrB,EAiDX,sBAGAiB,EAAA,CADPI,EAAM,YAAY,GAnDArB,EAoDX,yBAGAiB,EAAA,CADPI,EAAM,UAAU,GAtDErB,EAuDX,uBAKyBiB,EAAA,CAAhCf,EAAM,gBAAgB,GA5DJF,EA4Dc,sBAMSiB,EAAA,CAAzCf,EAAM,yBAAyB,GAlEbF,EAkEuB,8BAORiB,EAAA,CAAjCf,EAAM,iBAAiB,GAzELF,EAyEe,uBAzEfA,EAArBiB,EAAA,CADCC,EAAc,WAAW,GACLlB",
|
|
6
|
+
"names": ["styles", "i", "bl_dialog_default", "BlDialog", "s", "event", "bl_dialog_default", "changedProperties", "node", "_a", "_b", "_c", "_d", "source", "_e", "_f", "x", "title", "classes", "o", "__decorateClass", "e", "newVal", "oldVal", "i"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{b as r}from"./chunk-4OT5AMS5.js";import{a as c,b as l}from"./chunk-CYCIT2TG.js";var a=c((s,i)=>{i.exports=function(o){let e=o||typeof window<"u"&&window;return!!(e&&(e.navigator.userAgent.match(/Chromatic/)||e.location.href.match(/chromatic=true/)))}});var n=l(a(),1),p=(t,o)=>(0,n.default)()?r`${o}
|
|
2
|
+
<div class="chromatic-wrapper">${t()}</div>`:r`${t()}`;var y=t=>p(t,r`<style>
|
|
3
|
+
#root-inner {
|
|
4
|
+
height: 600px;
|
|
5
|
+
}
|
|
6
|
+
</style>`);export{y as a};
|
|
7
|
+
//# sourceMappingURL=chunk-PCREGBBF.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../node_modules/chromatic/isChromatic.js", "../src/utilities/chromatic-decorators.ts"],
|
|
4
|
+
"sourcesContent": ["/* eslint-env browser */\n\nmodule.exports = function isChromatic(windowArg) {\n const windowToCheck = windowArg || (typeof window !== 'undefined' && window);\n return !!(\n windowToCheck &&\n (windowToCheck.navigator.userAgent.match(/Chromatic/) ||\n windowToCheck.location.href.match(/chromatic=true/))\n );\n};\n", "import { html, TemplateResult } from \"lit\";\nimport { PartialStoryFn } from \"@storybook/types\";\nimport isChromatic from \"chromatic/isChromatic\";\n\nconst chromaticDecorator = (story: PartialStoryFn, addition: TemplateResult) =>\n isChromatic()\n ? html`${addition}\n <div class=\"chromatic-wrapper\">${story()}</div>`\n : html`${story()}`;\n\nexport const withNoAnimation = (story: PartialStoryFn) =>\n chromaticDecorator(\n story,\n html`<style>\n .chromatic-wrapper {\n --bl-drawer-animation-duration: 0;\n }\n </style>`\n );\n\nexport const extraPadding = (story: PartialStoryFn) =>\n chromaticDecorator(\n story,\n html`<style>\n .chromatic-wrapper {\n display: inline-block;\n padding: 25px;\n }\n </style>`\n );\n\nexport const centeredLayout = (story: PartialStoryFn) =>\n chromaticDecorator(\n story,\n html`<style>\n #root-inner {\n width: 1000px;\n height: 400px;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .chromatic-wrapper {\n display: flex;\n }\n </style>`\n );\n\nexport const fullscreenLayout = (story: PartialStoryFn) =>\n chromaticDecorator(\n story,\n html`<style>\n #root-inner {\n height: 600px;\n }\n </style>`\n );\n"],
|
|
5
|
+
"mappings": "uFAAA,IAAAA,EAAAC,EAAA,CAAAC,EAAAC,IAAA,CAEAA,EAAO,QAAU,SAAqBC,EAAW,CAC/C,IAAMC,EAAgBD,GAAc,OAAO,OAAW,KAAe,OACrE,MAAO,CAAC,EACNC,IACCA,EAAc,UAAU,UAAU,MAAM,WAAW,GAClDA,EAAc,SAAS,KAAK,MAAM,gBAAgB,GAExD,ICPA,IAAAC,EAAwB,SAElBC,EAAqB,CAACC,EAAuBC,OACjD,EAAAC,SAAY,EACRC,IAAOF;AAAA,yCAC4BD,EAAM,UACzCG,IAAOH,EAAM,IAwCZ,IAAMI,EAAoBC,GAC/BC,EACED,EACAE;AAAA;AAAA;AAAA;AAAA,aAKF",
|
|
6
|
+
"names": ["require_isChromatic", "__commonJSMin", "exports", "module", "windowArg", "windowToCheck", "import_isChromatic", "chromaticDecorator", "story", "addition", "isChromatic", "x", "fullscreenLayout", "story", "chromaticDecorator", "x"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import{b as y,c as g,d as D,e as H,f as $}from"./chunk-AYJMIZZ3.js";import{a as k,b as A,c as M,d as S}from"./chunk-X2KXJYXQ.js";import{a as Y}from"./chunk-DINNT5P2.js";import{a as N,b as L,c as R}from"./chunk-7GK5LKBV.js";import{a as P,b as w,c as z,f as C}from"./chunk-4OT5AMS5.js";import{c as v}from"./chunk-CYCIT2TG.js";var I=(s,f,t)=>{let o=new Map;for(let n=f;n<=t;n++)o.set(s[n],n);return o},V=L(class extends R{constructor(s){if(super(s),s.type!==N.CHILD)throw Error("repeat() can only be used in text expressions")}ct(s,f,t){let o;t===void 0?t=f:f!==void 0&&(o=f);let n=[],i=[],a=0;for(let c of s)n[a]=o?o(c,a):a,i[a]=t(c,a),a++;return{values:i,keys:n}}render(s,f,t){return this.ct(s,f,t).values}update(s,[f,t,o]){var n;let i=H(s),{values:a,keys:c}=this.ct(f,t,o);if(!Array.isArray(i))return this.ut=c,a;let p=(n=this.ut)!==null&&n!==void 0?n:this.ut=[],m=[],b,x,e=0,l=i.length-1,r=0,d=a.length-1;for(;e<=l&&r<=d;)if(i[e]===null)e++;else if(i[l]===null)l--;else if(p[e]===c[r])m[r]=g(i[e],a[r]),e++,r++;else if(p[l]===c[d])m[d]=g(i[l],a[d]),l--,d--;else if(p[e]===c[d])m[d]=g(i[e],a[d]),y(s,m[d+1],i[e]),e++,d--;else if(p[l]===c[r])m[r]=g(i[l],a[r]),y(s,i[e],i[l]),l--,r++;else if(b===void 0&&(b=I(c,r,d),x=I(p,e,l)),b.has(p[e]))if(b.has(p[l])){let h=x.get(c[r]),T=h!==void 0?i[h]:null;if(T===null){let E=y(s,i[e]);g(E,a[r]),m[r]=E}else m[r]=g(T,a[r]),y(s,i[e],T),i[h]=null;r++}else $(i[l]),l--;else $(i[e]),e++;for(;r<=d;){let h=y(s,m[d+1]);g(h,a[r]),m[r++]=h}for(;e<=l;){let h=i[e++];h!==null&&$(h)}return this.ut=c,D(s,m),z}});var G=P`:host{--bl-notification-width:396px;--bl-notification-gap:var(--bl-size-2xs);--bl-notification-animation-duration:0.3s}.wrapper{--margin:var(--bl-size-xl);display:flex;flex-direction:column-reverse;position:fixed;top:0;right:0;max-width:var(--bl-notification-width);margin:var(--margin);width:calc(100% - var(--margin) * 2);z-index:var(--bl-index-notification)}@media screen and (max-width: 480px){.wrapper{flex-direction:column;max-width:100%}}.notification{will-change:transform height margin;animation:slide-in-right var(--bl-notification-animation-duration) ease;margin-bottom:var(--bl-notification-gap);touch-action:none}.notification[data-slide="top"]{animation:slide-in-top var(--bl-notification-animation-duration) ease}:host([no-animation]) .notification{animation:none}.notification.removing{animation:slide-out-right var(--bl-notification-animation-duration) ease forwards,size-to-zero var(--bl-notification-animation-duration) ease var(--bl-notification-animation-duration) forwards}.notification[data-slide="top"].removing{animation:slide-out-top var(--bl-notification-animation-duration) ease forwards,size-to-zero var(--bl-notification-animation-duration) ease var(--bl-notification-animation-duration) forwards}:host([no-animation]) .notification.removing{animation:size-to-zero 0}@media (prefers-reduced-motion){.notification.removing{animation:size-to-zero 0}.notification{animation:none}}@keyframes slide-in-right{from{transform:translateX(var(--travel-distance, 10px));height:0;opacity:0;margin:0}}@keyframes slide-out-right{to{transform:translateX(var(--travel-distance, 10px));opacity:0}}@keyframes slide-in-top{from{transform:translateY(var(--travel-distance, -10px));height:0;opacity:0;margin:0}}@keyframes slide-out-top{to{transform:translateY(var(--travel-distance, -10px));opacity:0}}@keyframes size-to-zero{to{height:0;margin:0}}`,B=G;var O=-50,u=class extends C{constructor(){super(...arguments);this.noAnimation=!1;this.duration=7;this.notifications=[];this.touchStartY=0}static get styles(){return[B]}get notificationList(){return this.notifications}get touchStart(){return{y:this.touchStartY}}get isMobile(){return window.matchMedia("(max-width: 480px)").matches}addNotification(t){let o=Math.random().toString(36).substr(2,9),n={...t,id:o,duration:t.duration||this.duration,remove:()=>this.removeNotification(o)},i=[...this.notifications,n];return this.notifications=i,n}async removeNotification(t){return new Promise(o=>{var i;let n=(i=this.shadowRoot)==null?void 0:i.getElementById(t);if(!n){o(!1);return}n.style.height=`${n.clientHeight}px`,n.addEventListener("animationend",({animationName:a})=>{a==="size-to-zero"&&(this.notifications=this.notifications.filter(c=>c.id!==t),o(!0))}),n.classList.add("removing")})}handleTouchStart(t){this.isMobile&&(t.stopPropagation(),this.touchStartY=t.touches[0].clientY)}handleTouchMove(t){if(!this.isMobile)return;t.stopPropagation();let o=t.currentTarget,n=t.touches[0].clientY,i=Math.min(n-this.touchStartY,0);o.style.transform=`translateY(${i}px)`}handleTouchEnd(t){if(!this.isMobile)return;t.stopPropagation();let o=t.currentTarget,i=t.changedTouches[0].clientY-this.touchStartY;i<O?(o.style.setProperty("--travel-distance",`${i-10}px`),this.removeNotification(o.id)):(o.style.transition="transform 0.3s ease",o.style.transform="translateY(0px)",o.addEventListener("transitionend",()=>{o.style.transition="",o.style.transform=""})),this.touchStartY=0}renderActionSlot(t,o){let n=t==="primary-action"?o.primaryAction:o.secondaryAction;return!n||!n.label?"":w`<bl-button slot="${t}" @bl-click=${()=>n.onClick(o)}>
|
|
2
|
+
${n.label}
|
|
3
|
+
</bl-button>`}render(){return w`
|
|
4
|
+
<div class="wrapper">
|
|
5
|
+
${V(this.notifications,t=>t.id,t=>{let{caption:o,description:n,icon:i=!0,variant:a="info",id:c,duration:p=this.duration,permanent:m}=t,b=this.renderActionSlot("primary-action",t),x=this.renderActionSlot("secondary-action",t);return w`
|
|
6
|
+
<bl-notification-card
|
|
7
|
+
id="${c}"
|
|
8
|
+
class="notification"
|
|
9
|
+
data-slide=${this.isMobile?"top":"right"}
|
|
10
|
+
duration=${p}
|
|
11
|
+
caption="${Y(o)}"
|
|
12
|
+
icon=${i}
|
|
13
|
+
variant=${Y(a)}
|
|
14
|
+
?permanent=${m}
|
|
15
|
+
@bl-notification-card-request-close=${e=>{e.preventDefault(),this.removeNotification(c)}}
|
|
16
|
+
@touchstart=${this.handleTouchStart}
|
|
17
|
+
@touchmove=${this.handleTouchMove}
|
|
18
|
+
@touchend=${this.handleTouchEnd}
|
|
19
|
+
>
|
|
20
|
+
${n} ${b} ${x}
|
|
21
|
+
</bl-notification-card>
|
|
22
|
+
`})}
|
|
23
|
+
</div>
|
|
24
|
+
`}};v([A({type:Boolean,attribute:"no-animation",reflect:!0})],u.prototype,"noAnimation",2),v([A({type:Number})],u.prototype,"duration",2),v([M()],u.prototype,"notifications",2),v([S({passive:!0})],u.prototype,"handleTouchStart",1),v([S({passive:!0})],u.prototype,"handleTouchMove",1),v([S({passive:!0})],u.prototype,"handleTouchEnd",1),u=v([k("bl-notification")],u);export{O as a,u as b};
|
|
25
|
+
/*! Bundled license information:
|
|
26
|
+
|
|
27
|
+
lit-html/directives/repeat.js:
|
|
28
|
+
(**
|
|
29
|
+
* @license
|
|
30
|
+
* Copyright 2017 Google LLC
|
|
31
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
32
|
+
*)
|
|
33
|
+
*/
|
|
34
|
+
//# sourceMappingURL=chunk-RFUZBNM4.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../node_modules/lit-html/src/directives/repeat.ts", "../src/components/notification/bl-notification.css", "../src/components/notification/bl-notification.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {ChildPart, noChange} from '../lit-html.js';\nimport {directive, Directive, PartInfo, PartType} from '../directive.js';\nimport {\n insertPart,\n getCommittedValue,\n removePart,\n setCommittedValue,\n setChildPartValue,\n} from '../directive-helpers.js';\n\nexport type KeyFn<T> = (item: T, index: number) => unknown;\nexport type ItemTemplate<T> = (item: T, index: number) => unknown;\n\n// Helper for generating a map of array item to its index over a subset\n// of an array (used to lazily generate `newKeyToIndexMap` and\n// `oldKeyToIndexMap`)\nconst generateMap = (list: unknown[], start: number, end: number) => {\n const map = new Map<unknown, number>();\n for (let i = start; i <= end; i++) {\n map.set(list[i], i);\n }\n return map;\n};\n\nclass RepeatDirective extends Directive {\n private _itemKeys?: unknown[];\n\n constructor(partInfo: PartInfo) {\n super(partInfo);\n if (partInfo.type !== PartType.CHILD) {\n throw new Error('repeat() can only be used in text expressions');\n }\n }\n\n private _getValuesAndKeys<T>(\n items: Iterable<T>,\n keyFnOrTemplate: KeyFn<T> | ItemTemplate<T>,\n template?: ItemTemplate<T>\n ) {\n let keyFn: KeyFn<T> | undefined;\n if (template === undefined) {\n template = keyFnOrTemplate;\n } else if (keyFnOrTemplate !== undefined) {\n keyFn = keyFnOrTemplate as KeyFn<T>;\n }\n const keys = [];\n const values = [];\n let index = 0;\n for (const item of items) {\n keys[index] = keyFn ? keyFn(item, index) : index;\n values[index] = template!(item, index);\n index++;\n }\n return {\n values,\n keys,\n };\n }\n\n render<T>(items: Iterable<T>, template: ItemTemplate<T>): Array<unknown>;\n render<T>(\n items: Iterable<T>,\n keyFn: KeyFn<T> | ItemTemplate<T>,\n template: ItemTemplate<T>\n ): Array<unknown>;\n render<T>(\n items: Iterable<T>,\n keyFnOrTemplate: KeyFn<T> | ItemTemplate<T>,\n template?: ItemTemplate<T>\n ) {\n return this._getValuesAndKeys(items, keyFnOrTemplate, template).values;\n }\n\n override update<T>(\n containerPart: ChildPart,\n [items, keyFnOrTemplate, template]: [\n Iterable<T>,\n KeyFn<T> | ItemTemplate<T>,\n ItemTemplate<T>\n ]\n ) {\n // Old part & key lists are retrieved from the last update (which may\n // be primed by hydration)\n const oldParts = getCommittedValue(\n containerPart\n ) as Array<ChildPart | null>;\n const {values: newValues, keys: newKeys} = this._getValuesAndKeys(\n items,\n keyFnOrTemplate,\n template\n );\n\n // We check that oldParts, the committed value, is an Array as an\n // indicator that the previous value came from a repeat() call. If\n // oldParts is not an Array then this is the first render and we return\n // an array for lit-html's array handling to render, and remember the\n // keys.\n if (!Array.isArray(oldParts)) {\n this._itemKeys = newKeys;\n return newValues;\n }\n\n // In SSR hydration it's possible for oldParts to be an array but for us\n // to not have item keys because the update() hasn't run yet. We set the\n // keys to an empty array. This will cause all oldKey/newKey comparisons\n // to fail and execution to fall to the last nested brach below which\n // reuses the oldPart.\n const oldKeys = (this._itemKeys ??= []);\n\n // New part list will be built up as we go (either reused from\n // old parts or created for new keys in this update). This is\n // saved in the above cache at the end of the update.\n const newParts: ChildPart[] = [];\n\n // Maps from key to index for current and previous update; these\n // are generated lazily only when needed as a performance\n // optimization, since they are only required for multiple\n // non-contiguous changes in the list, which are less common.\n let newKeyToIndexMap!: Map<unknown, number>;\n let oldKeyToIndexMap!: Map<unknown, number>;\n\n // Head and tail pointers to old parts and new values\n let oldHead = 0;\n let oldTail = oldParts.length - 1;\n let newHead = 0;\n let newTail = newValues.length - 1;\n\n // Overview of O(n) reconciliation algorithm (general approach\n // based on ideas found in ivi, vue, snabbdom, etc.):\n //\n // * We start with the list of old parts and new values (and\n // arrays of their respective keys), head/tail pointers into\n // each, and we build up the new list of parts by updating\n // (and when needed, moving) old parts or creating new ones.\n // The initial scenario might look like this (for brevity of\n // the diagrams, the numbers in the array reflect keys\n // associated with the old parts or new values, although keys\n // and parts/values are actually stored in parallel arrays\n // indexed using the same head/tail pointers):\n //\n // oldHead v v oldTail\n // oldKeys: [0, 1, 2, 3, 4, 5, 6]\n // newParts: [ , , , , , , ]\n // newKeys: [0, 2, 1, 4, 3, 7, 6] <- reflects the user's new\n // item order\n // newHead ^ ^ newTail\n //\n // * Iterate old & new lists from both sides, updating,\n // swapping, or removing parts at the head/tail locations\n // until neither head nor tail can move.\n //\n // * Example below: keys at head pointers match, so update old\n // part 0 in-place (no need to move it) and record part 0 in\n // the `newParts` list. The last thing we do is advance the\n // `oldHead` and `newHead` pointers (will be reflected in the\n // next diagram).\n //\n // oldHead v v oldTail\n // oldKeys: [0, 1, 2, 3, 4, 5, 6]\n // newParts: [0, , , , , , ] <- heads matched: update 0\n // newKeys: [0, 2, 1, 4, 3, 7, 6] and advance both oldHead\n // & newHead\n // newHead ^ ^ newTail\n //\n // * Example below: head pointers don't match, but tail\n // pointers do, so update part 6 in place (no need to move\n // it), and record part 6 in the `newParts` list. Last,\n // advance the `oldTail` and `oldHead` pointers.\n //\n // oldHead v v oldTail\n // oldKeys: [0, 1, 2, 3, 4, 5, 6]\n // newParts: [0, , , , , , 6] <- tails matched: update 6\n // newKeys: [0, 2, 1, 4, 3, 7, 6] and advance both oldTail\n // & newTail\n // newHead ^ ^ newTail\n //\n // * If neither head nor tail match; next check if one of the\n // old head/tail items was removed. We first need to generate\n // the reverse map of new keys to index (`newKeyToIndexMap`),\n // which is done once lazily as a performance optimization,\n // since we only hit this case if multiple non-contiguous\n // changes were made. Note that for contiguous removal\n // anywhere in the list, the head and tails would advance\n // from either end and pass each other before we get to this\n // case and removals would be handled in the final while loop\n // without needing to generate the map.\n //\n // * Example below: The key at `oldTail` was removed (no longer\n // in the `newKeyToIndexMap`), so remove that part from the\n // DOM and advance just the `oldTail` pointer.\n //\n // oldHead v v oldTail\n // oldKeys: [0, 1, 2, 3, 4, 5, 6]\n // newParts: [0, , , , , , 6] <- 5 not in new map: remove\n // newKeys: [0, 2, 1, 4, 3, 7, 6] 5 and advance oldTail\n // newHead ^ ^ newTail\n //\n // * Once head and tail cannot move, any mismatches are due to\n // either new or moved items; if a new key is in the previous\n // \"old key to old index\" map, move the old part to the new\n // location, otherwise create and insert a new part. Note\n // that when moving an old part we null its position in the\n // oldParts array if it lies between the head and tail so we\n // know to skip it when the pointers get there.\n //\n // * Example below: neither head nor tail match, and neither\n // were removed; so find the `newHead` key in the\n // `oldKeyToIndexMap`, and move that old part's DOM into the\n // next head position (before `oldParts[oldHead]`). Last,\n // null the part in the `oldPart` array since it was\n // somewhere in the remaining oldParts still to be scanned\n // (between the head and tail pointers) so that we know to\n // skip that old part on future iterations.\n //\n // oldHead v v oldTail\n // oldKeys: [0, 1, -, 3, 4, 5, 6]\n // newParts: [0, 2, , , , , 6] <- stuck: update & move 2\n // newKeys: [0, 2, 1, 4, 3, 7, 6] into place and advance\n // newHead\n // newHead ^ ^ newTail\n //\n // * Note that for moves/insertions like the one above, a part\n // inserted at the head pointer is inserted before the\n // current `oldParts[oldHead]`, and a part inserted at the\n // tail pointer is inserted before `newParts[newTail+1]`. The\n // seeming asymmetry lies in the fact that new parts are\n // moved into place outside in, so to the right of the head\n // pointer are old parts, and to the right of the tail\n // pointer are new parts.\n //\n // * We always restart back from the top of the algorithm,\n // allowing matching and simple updates in place to\n // continue...\n //\n // * Example below: the head pointers once again match, so\n // simply update part 1 and record it in the `newParts`\n // array. Last, advance both head pointers.\n //\n // oldHead v v oldTail\n // oldKeys: [0, 1, -, 3, 4, 5, 6]\n // newParts: [0, 2, 1, , , , 6] <- heads matched: update 1\n // newKeys: [0, 2, 1, 4, 3, 7, 6] and advance both oldHead\n // & newHead\n // newHead ^ ^ newTail\n //\n // * As mentioned above, items that were moved as a result of\n // being stuck (the final else clause in the code below) are\n // marked with null, so we always advance old pointers over\n // these so we're comparing the next actual old value on\n // either end.\n //\n // * Example below: `oldHead` is null (already placed in\n // newParts), so advance `oldHead`.\n //\n // oldHead v v oldTail\n // oldKeys: [0, 1, -, 3, 4, 5, 6] <- old head already used:\n // newParts: [0, 2, 1, , , , 6] advance oldHead\n // newKeys: [0, 2, 1, 4, 3, 7, 6]\n // newHead ^ ^ newTail\n //\n // * Note it's not critical to mark old parts as null when they\n // are moved from head to tail or tail to head, since they\n // will be outside the pointer range and never visited again.\n //\n // * Example below: Here the old tail key matches the new head\n // key, so the part at the `oldTail` position and move its\n // DOM to the new head position (before `oldParts[oldHead]`).\n // Last, advance `oldTail` and `newHead` pointers.\n //\n // oldHead v v oldTail\n // oldKeys: [0, 1, -, 3, 4, 5, 6]\n // newParts: [0, 2, 1, 4, , , 6] <- old tail matches new\n // newKeys: [0, 2, 1, 4, 3, 7, 6] head: update & move 4,\n // advance oldTail & newHead\n // newHead ^ ^ newTail\n //\n // * Example below: Old and new head keys match, so update the\n // old head part in place, and advance the `oldHead` and\n // `newHead` pointers.\n //\n // oldHead v oldTail\n // oldKeys: [0, 1, -, 3, 4, 5, 6]\n // newParts: [0, 2, 1, 4, 3, ,6] <- heads match: update 3\n // newKeys: [0, 2, 1, 4, 3, 7, 6] and advance oldHead &\n // newHead\n // newHead ^ ^ newTail\n //\n // * Once the new or old pointers move past each other then all\n // we have left is additions (if old list exhausted) or\n // removals (if new list exhausted). Those are handled in the\n // final while loops at the end.\n //\n // * Example below: `oldHead` exceeded `oldTail`, so we're done\n // with the main loop. Create the remaining part and insert\n // it at the new head position, and the update is complete.\n //\n // (oldHead > oldTail)\n // oldKeys: [0, 1, -, 3, 4, 5, 6]\n // newParts: [0, 2, 1, 4, 3, 7 ,6] <- create and insert 7\n // newKeys: [0, 2, 1, 4, 3, 7, 6]\n // newHead ^ newTail\n //\n // * Note that the order of the if/else clauses is not\n // important to the algorithm, as long as the null checks\n // come first (to ensure we're always working on valid old\n // parts) and that the final else clause comes last (since\n // that's where the expensive moves occur). The order of\n // remaining clauses is is just a simple guess at which cases\n // will be most common.\n //\n // * Note, we could calculate the longest\n // increasing subsequence (LIS) of old items in new position,\n // and only move those not in the LIS set. However that costs\n // O(nlogn) time and adds a bit more code, and only helps\n // make rare types of mutations require fewer moves. The\n // above handles removes, adds, reversal, swaps, and single\n // moves of contiguous items in linear time, in the minimum\n // number of moves. As the number of multiple moves where LIS\n // might help approaches a random shuffle, the LIS\n // optimization becomes less helpful, so it seems not worth\n // the code at this point. Could reconsider if a compelling\n // case arises.\n\n while (oldHead <= oldTail && newHead <= newTail) {\n if (oldParts[oldHead] === null) {\n // `null` means old part at head has already been used\n // below; skip\n oldHead++;\n } else if (oldParts[oldTail] === null) {\n // `null` means old part at tail has already been used\n // below; skip\n oldTail--;\n } else if (oldKeys[oldHead] === newKeys[newHead]) {\n // Old head matches new head; update in place\n newParts[newHead] = setChildPartValue(\n oldParts[oldHead]!,\n newValues[newHead]\n );\n oldHead++;\n newHead++;\n } else if (oldKeys[oldTail] === newKeys[newTail]) {\n // Old tail matches new tail; update in place\n newParts[newTail] = setChildPartValue(\n oldParts[oldTail]!,\n newValues[newTail]\n );\n oldTail--;\n newTail--;\n } else if (oldKeys[oldHead] === newKeys[newTail]) {\n // Old head matches new tail; update and move to new tail\n newParts[newTail] = setChildPartValue(\n oldParts[oldHead]!,\n newValues[newTail]\n );\n insertPart(containerPart, newParts[newTail + 1], oldParts[oldHead]!);\n oldHead++;\n newTail--;\n } else if (oldKeys[oldTail] === newKeys[newHead]) {\n // Old tail matches new head; update and move to new head\n newParts[newHead] = setChildPartValue(\n oldParts[oldTail]!,\n newValues[newHead]\n );\n insertPart(containerPart, oldParts[oldHead]!, oldParts[oldTail]!);\n oldTail--;\n newHead++;\n } else {\n if (newKeyToIndexMap === undefined) {\n // Lazily generate key-to-index maps, used for removals &\n // moves below\n newKeyToIndexMap = generateMap(newKeys, newHead, newTail);\n oldKeyToIndexMap = generateMap(oldKeys, oldHead, oldTail);\n }\n if (!newKeyToIndexMap.has(oldKeys[oldHead])) {\n // Old head is no longer in new list; remove\n removePart(oldParts[oldHead]!);\n oldHead++;\n } else if (!newKeyToIndexMap.has(oldKeys[oldTail])) {\n // Old tail is no longer in new list; remove\n removePart(oldParts[oldTail]!);\n oldTail--;\n } else {\n // Any mismatches at this point are due to additions or\n // moves; see if we have an old part we can reuse and move\n // into place\n const oldIndex = oldKeyToIndexMap.get(newKeys[newHead]);\n const oldPart = oldIndex !== undefined ? oldParts[oldIndex] : null;\n if (oldPart === null) {\n // No old part for this value; create a new one and\n // insert it\n const newPart = insertPart(containerPart, oldParts[oldHead]!);\n setChildPartValue(newPart, newValues[newHead]);\n newParts[newHead] = newPart;\n } else {\n // Reuse old part\n newParts[newHead] = setChildPartValue(oldPart, newValues[newHead]);\n insertPart(containerPart, oldParts[oldHead]!, oldPart);\n // This marks the old part as having been used, so that\n // it will be skipped in the first two checks above\n oldParts[oldIndex as number] = null;\n }\n newHead++;\n }\n }\n }\n // Add parts for any remaining new values\n while (newHead <= newTail) {\n // For all remaining additions, we insert before last new\n // tail, since old pointers are no longer valid\n const newPart = insertPart(containerPart, newParts[newTail + 1]);\n setChildPartValue(newPart, newValues[newHead]);\n newParts[newHead++] = newPart;\n }\n // Remove any remaining unused old parts\n while (oldHead <= oldTail) {\n const oldPart = oldParts[oldHead++];\n if (oldPart !== null) {\n removePart(oldPart);\n }\n }\n\n // Save order of new parts for next round\n this._itemKeys = newKeys;\n // Directly set part value, bypassing it's dirty-checking\n setCommittedValue(containerPart, newParts);\n return noChange;\n }\n}\n\nexport interface RepeatDirectiveFn {\n <T>(\n items: Iterable<T>,\n keyFnOrTemplate: KeyFn<T> | ItemTemplate<T>,\n template?: ItemTemplate<T>\n ): unknown;\n <T>(items: Iterable<T>, template: ItemTemplate<T>): unknown;\n <T>(\n items: Iterable<T>,\n keyFn: KeyFn<T> | ItemTemplate<T>,\n template: ItemTemplate<T>\n ): unknown;\n}\n\n/**\n * A directive that repeats a series of values (usually `TemplateResults`)\n * generated from an iterable, and updates those items efficiently when the\n * iterable changes based on user-provided `keys` associated with each item.\n *\n * Note that if a `keyFn` is provided, strict key-to-DOM mapping is maintained,\n * meaning previous DOM for a given key is moved into the new position if\n * needed, and DOM will never be reused with values for different keys (new DOM\n * will always be created for new keys). This is generally the most efficient\n * way to use `repeat` since it performs minimum unnecessary work for insertions\n * and removals.\n *\n * The `keyFn` takes two parameters, the item and its index, and returns a unique key value.\n *\n * ```js\n * html`\n * <ol>\n * ${repeat(this.items, (item) => item.id, (item, index) => {\n * return html`<li>${index}: ${item.name}</li>`;\n * })}\n * </ol>\n * `\n * ```\n *\n * **Important**: If providing a `keyFn`, keys *must* be unique for all items in a\n * given call to `repeat`. The behavior when two or more items have the same key\n * is undefined.\n *\n * If no `keyFn` is provided, this directive will perform similar to mapping\n * items to values, and DOM will be reused against potentially different items.\n */\nexport const repeat = directive(RepeatDirective) as RepeatDirectiveFn;\n\n/**\n * The type of the class that powers this directive. Necessary for naming the\n * directive's return type.\n */\nexport type {RepeatDirective};\n", "import {css} from 'lit';\nexport const styles = css`:host{--bl-notification-width:396px;--bl-notification-gap:var(--bl-size-2xs);--bl-notification-animation-duration:0.3s}.wrapper{--margin:var(--bl-size-xl);display:flex;flex-direction:column-reverse;position:fixed;top:0;right:0;max-width:var(--bl-notification-width);margin:var(--margin);width:calc(100% - var(--margin) * 2);z-index:var(--bl-index-notification)}@media screen and (max-width: 480px){.wrapper{flex-direction:column;max-width:100%}}.notification{will-change:transform height margin;animation:slide-in-right var(--bl-notification-animation-duration) ease;margin-bottom:var(--bl-notification-gap);touch-action:none}.notification[data-slide=\"top\"]{animation:slide-in-top var(--bl-notification-animation-duration) ease}:host([no-animation]) .notification{animation:none}.notification.removing{animation:slide-out-right var(--bl-notification-animation-duration) ease forwards,size-to-zero var(--bl-notification-animation-duration) ease var(--bl-notification-animation-duration) forwards}.notification[data-slide=\"top\"].removing{animation:slide-out-top var(--bl-notification-animation-duration) ease forwards,size-to-zero var(--bl-notification-animation-duration) ease var(--bl-notification-animation-duration) forwards}:host([no-animation]) .notification.removing{animation:size-to-zero 0}@media (prefers-reduced-motion){.notification.removing{animation:size-to-zero 0}.notification{animation:none}}@keyframes slide-in-right{from{transform:translateX(var(--travel-distance, 10px));height:0;opacity:0;margin:0}}@keyframes slide-out-right{to{transform:translateX(var(--travel-distance, 10px));opacity:0}}@keyframes slide-in-top{from{transform:translateY(var(--travel-distance, -10px));height:0;opacity:0;margin:0}}@keyframes slide-out-top{to{transform:translateY(var(--travel-distance, -10px));opacity:0}}@keyframes size-to-zero{to{height:0;margin:0}}`;\nexport default styles;\n", "import { CSSResultGroup, html, LitElement, TemplateResult } from \"lit\";\nimport { customElement, eventOptions, property, state } from \"lit/decorators.js\";\nimport { ifDefined } from \"lit/directives/if-defined.js\";\nimport { repeat } from \"lit/directives/repeat.js\";\nimport BlAlert from \"../alert/bl-alert\";\nimport { BaklavaIcon } from \"../icon/icon-list\";\nimport style from \"./bl-notification.css\";\nimport BlNotificationCard, { CloseSource, NotificationVariant } from \"./card/bl-notification-card\";\n\ntype Action = {\n label: string;\n onClick: (notification: Notification) => void;\n};\n\nexport type NotificationProps = {\n caption?: string;\n description: string;\n icon?: boolean | BaklavaIcon;\n variant?: NotificationVariant;\n primaryAction?: Action;\n secondaryAction?: Action;\n duration?: number;\n permanent?: boolean;\n};\n\nexport type Notification = NotificationProps & {\n id: string;\n remove: () => Promise<boolean>;\n};\n\nexport const SWIPE_UP_THRESHOLD = -50;\n\n/**\n * @tag bl-notification\n * @summary Baklava Notification component\n */\n\n@customElement(\"bl-notification\")\nexport default class BlNotification extends LitElement {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n /**\n * Disable animations.\n * It will not be possible to use animations if the user has disabled them.\n * Animations will respect the user's preferences regardless of this property.\n */\n @property({ type: Boolean, attribute: \"no-animation\", reflect: true })\n noAnimation = false;\n\n /**\n * Sets the default duration of notifications in seconds\n */\n @property({ type: Number })\n duration = 7;\n\n @state()\n private notifications: Notification[] = [];\n\n public get notificationList() {\n return this.notifications;\n }\n\n private touchStartY = 0;\n\n public get touchStart() {\n return {\n y: this.touchStartY,\n };\n }\n\n private get isMobile() {\n return window.matchMedia(\"(max-width: 480px)\").matches;\n }\n\n /**\n * Adds a notification to the list of notifications.\n * @param {NotificationProps} props Notification properties\n * @returns {Notification} A notification object with a remove method.\n */\n public addNotification(props: NotificationProps) {\n // TODO id generation\n const id = Math.random().toString(36).substr(2, 9);\n const notification: Notification = {\n ...props,\n id,\n duration: props.duration || this.duration,\n remove: () => this.removeNotification(id),\n };\n\n const newNotifications = [...this.notifications, notification];\n\n this.notifications = newNotifications;\n\n return notification;\n }\n\n /**\n * Removes a notification from the list of notifications.\n * @param {string} id Notification id\n * @returns {Promise<boolean>} A promise that resolves with a boolean indicating whether the notification was removed.\n */\n public async removeNotification(id: string): Promise<boolean> {\n return new Promise(resolve => {\n const notificationEl = this.shadowRoot?.getElementById(id) as BlAlert;\n\n if (!notificationEl) {\n resolve(false);\n return;\n }\n\n notificationEl.style.height = `${notificationEl.clientHeight}px`;\n notificationEl.addEventListener(\"animationend\", ({ animationName }: AnimationEvent) => {\n if (animationName !== \"size-to-zero\") {\n return;\n }\n\n this.notifications = this.notifications.filter(notification => notification.id !== id);\n resolve(true);\n });\n\n notificationEl.classList.add(\"removing\");\n });\n }\n\n @eventOptions({ passive: true })\n private handleTouchStart(event: TouchEvent) {\n if (!this.isMobile) {\n return;\n }\n\n event.stopPropagation();\n\n this.touchStartY = event.touches[0].clientY;\n }\n\n @eventOptions({ passive: true })\n private handleTouchMove(event: TouchEvent) {\n if (!this.isMobile) {\n return;\n }\n event.stopPropagation();\n\n const currentTarget = event.currentTarget as BlNotificationCard;\n\n const currentY = event.touches[0].clientY;\n // Allow only moving up\n const movedY = Math.min(currentY - this.touchStartY, 0);\n\n currentTarget.style.transform = `translateY(${movedY}px)`;\n }\n\n @eventOptions({ passive: true })\n private handleTouchEnd(event: TouchEvent) {\n if (!this.isMobile) {\n return;\n }\n event.stopPropagation();\n\n const currentTarget = event.currentTarget as BlNotificationCard;\n\n const currentY = event.changedTouches[0].clientY;\n const movedY = currentY - this.touchStartY;\n\n if (movedY < SWIPE_UP_THRESHOLD) {\n currentTarget.style.setProperty(\"--travel-distance\", `${movedY - 10}px`);\n this.removeNotification(currentTarget.id);\n } else {\n currentTarget.style.transition = \"transform 0.3s ease\";\n currentTarget.style.transform = \"translateY(0px)\";\n\n currentTarget.addEventListener(\"transitionend\", () => {\n currentTarget.style.transition = \"\";\n currentTarget.style.transform = \"\";\n });\n }\n\n this.touchStartY = 0;\n }\n\n private renderActionSlot(\n slotName: \"primary-action\" | \"secondary-action\",\n notification: Notification\n ) {\n const action =\n slotName === \"primary-action\" ? notification.primaryAction : notification.secondaryAction;\n\n if (!action || !action.label) {\n return \"\";\n }\n\n return html`<bl-button slot=\"${slotName}\" @bl-click=${() => action.onClick(notification)}>\n ${action.label}\n </bl-button>`;\n }\n\n render(): TemplateResult {\n return html`\n <div class=\"wrapper\">\n ${repeat(\n this.notifications,\n notification => notification.id,\n notification => {\n const {\n caption,\n description,\n icon = true,\n variant = \"info\",\n id,\n duration = this.duration,\n permanent,\n } = notification;\n\n const actionButton = this.renderActionSlot(\"primary-action\", notification);\n const secondaryActionButton = this.renderActionSlot(\"secondary-action\", notification);\n\n return html`\n <bl-notification-card\n id=\"${id}\"\n class=\"notification\"\n data-slide=${this.isMobile ? \"top\" : \"right\"}\n duration=${duration}\n caption=\"${ifDefined(caption)}\"\n icon=${icon}\n variant=${ifDefined(variant)}\n ?permanent=${permanent}\n @bl-notification-card-request-close=${(\n event: CustomEvent<{ source: CloseSource }>\n ) => {\n // We will run animations on the notification card\n // so we need to prevent the default close behavior\n event.preventDefault();\n this.removeNotification(id);\n }}\n @touchstart=${this.handleTouchStart}\n @touchmove=${this.handleTouchMove}\n @touchend=${this.handleTouchEnd}\n >\n ${description} ${actionButton} ${secondaryActionButton}\n </bl-notification-card>\n `;\n }\n )}\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"bl-notification\": BlNotification;\n }\n}\n"],
|
|
5
|
+
"mappings": "oUAsBA,IAAMA,EAAc,CAACC,EAAiBC,EAAeC,IAAAA,CACnD,IAAMC,EAAM,IAAIC,IAChB,QAASC,EAAIJ,EAAOI,GAAKH,EAAKG,IAC5BF,EAAIG,IAAIN,EAAKK,CAAAA,EAAIA,CAAAA,EAEnB,OAAOF,CAAG,EAqcCI,EAASC,EAlctB,cAA8BC,CAAAA,CAG5BC,YAAYC,EAAAA,CAEV,GADAC,MAAMD,CAAAA,EACFA,EAASE,OAASC,EAASC,MAC7B,MAAUC,MAAM,+CAAA,CAEnB,CAEOC,GACNC,EACAC,EACAC,EAAAA,CAEA,IAAIC,EACAD,IADAC,OAEFD,EAAWD,EACFA,IADEA,SAEXE,EAAQF,GAEV,IAAMG,EAAO,CAAA,EACPC,EAAS,CAAA,EACXC,EAAQ,EACZ,QAAWC,KAAQP,EACjBI,EAAKE,CAAAA,EAASH,EAAQA,EAAMI,EAAMD,CAAAA,EAASA,EAC3CD,EAAOC,CAAAA,EAASJ,EAAUK,EAAMD,CAAAA,EAChCA,IAEF,MAAO,CACLD,OAAAA,EACAD,KAAAA,CAAAA,CAEH,CAQDI,OACER,EACAC,EACAC,EAAAA,CAEA,OAAOO,KAAKV,GAAkBC,EAAOC,EAAiBC,CAAAA,EAAUG,MACjE,CAEQK,OACPC,EAAAA,CACCX,EAAOC,EAAiBC,CAAAA,EAAAA,CAAAA,IAAAA,EAQzB,IAAMU,EAAWC,EACfF,CA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AK;AAAA,4BACN,KAAK;AAAA;AAAA,kBAEfgB,KAAeK,KAAgBC;AAAA;AAAA,aAGvC,CACF;AAAA;AAAA,KAGN,CACF,EAtMEE,EAAA,CADCC,EAAS,CAAE,KAAM,QAAS,UAAW,eAAgB,QAAS,EAAK,CAAC,GAVlD7B,EAWnB,2BAMA4B,EAAA,CADCC,EAAS,CAAE,KAAM,MAAO,CAAC,GAhBP7B,EAiBnB,wBAGQ4B,EAAA,CADPE,EAAM,GAnBY9B,EAoBX,6BAqEA4B,EAAA,CADPC,EAAa,CAAE,QAAS,EAAK,CAAC,GAxFZ7B,EAyFX,gCAWA4B,EAAA,CADPC,EAAa,CAAE,QAAS,EAAK,CAAC,GAnGZ7B,EAoGX,+BAgBA4B,EAAA,CADPC,EAAa,CAAE,QAAS,EAAK,CAAC,GAnHZ7B,EAoHX,8BApHWA,EAArB4B,EAAA,CADCC,EAAc,iBAAiB,GACX7B",
|
|
6
|
+
"names": ["generateMap", "list", "start", "end", "map", "Map", "i", "set", "repeat", "directive", "Directive", "constructor", "partInfo", "super", "type", "PartType", "CHILD", "Error", "_getValuesAndKeys", "items", "keyFnOrTemplate", "template", "keyFn", "keys", "values", "index", "item", "render", "this", "update", "containerPart", "oldParts", "getCommittedValue", "newValues", "newKeys", "Array", "isArray", "_itemKeys", "oldKeys", "_a", "newParts", "newKeyToIndexMap", "oldKeyToIndexMap", "oldHead", "oldTail", "length", "newHead", "newTail", "setChildPartValue", "insertPart", "has", "oldIndex", "get", "oldPart", "newPart", "removePart", "setCommittedValue", "noChange", "styles", "i", "bl_notification_default", "SWIPE_UP_THRESHOLD", "BlNotification", "s", "bl_notification_default", "props", "id", "notification", "newNotifications", "resolve", "_a", "notificationEl", "animationName", "event", "currentTarget", "currentY", "movedY", "slotName", "action", "x", "c", "caption", "description", "icon", "variant", "duration", "permanent", "actionButton", "secondaryActionButton", "l", "__decorateClass", "e", "t"]
|
|
7
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as v}from"./chunk-
|
|
1
|
+
import{a as v}from"./chunk-AAGDUS7G.js";import{a as d}from"./chunk-DJOD4BTL.js";import{a as o}from"./chunk-GRL4DWKG.js";import{a as c,b as r,e as m}from"./chunk-X2KXJYXQ.js";import{a as f}from"./chunk-DINNT5P2.js";import{a as s,b as a,f as n}from"./chunk-4OT5AMS5.js";import{c as t}from"./chunk-CYCIT2TG.js";var E=s`:host{display:flex;flex-direction:row}fieldset{border:none;padding:0}legend{font:var(--bl-font-title-3-medium);color:var(--bl-color-neutral-darker)}.options{display:flex;flex-flow:var(--bl-checkbox-direction, column) wrap;gap:var(--bl-size-m);margin-block:var(--bl-size-xs)}`,g=E;var u="bl-checkbox-group",p="bl-checkbox-group-change",l=class extends d(n){constructor(){super(...arguments);this.value=[];this.required=!1;this.focusedOptionIndex=0}static get styles(){return[g]}get options(){return[...this.querySelectorAll(h)]}get checkedOptions(){return this.options.filter(e=>e.checked).map(e=>e.value)}get availableOptions(){return this.options.filter(e=>!e.disabled)}connectedCallback(){super.connectedCallback(),this.tabIndex=0,this.addEventListener("focus",this.handleFocus),this.addEventListener("keydown",this.handleKeyDown)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focus",this.handleFocus),this.removeEventListener("keydown",this.handleKeyDown)}updated(e){e.has("value")&&(this.setValue(this.checkedOptions.join(",")),this.onChange(this.value))}handleOptionChecked(){this.value=this.checkedOptions}handleKeyDown(e){if(["ArrowDown","ArrowRight"].includes(e.key))this.focusedOptionIndex++;else if(["ArrowUp","ArrowLeft"].includes(e.key))this.focusedOptionIndex--;else if(e.key==="Tab"){if(e.shiftKey?this.focusedOptionIndex--:this.focusedOptionIndex++,this.focusedOptionIndex===this.availableOptions.length){this.tabIndex=0,this.focusedOptionIndex=0;return}}else return;this.focusedOptionIndex=Math.max(0,Math.min(this.focusedOptionIndex,this.availableOptions.length-1)),this.availableOptions[this.focusedOptionIndex].focus(),e.preventDefault()}handleFocus(){this.availableOptions[this.focusedOptionIndex].focus()}render(){return a`<fieldset role="group" aria-labelledby="label" aria-required=${this.required}>
|
|
2
2
|
<legend id="label">${this.label}</legend>
|
|
3
3
|
<div class="options" @bl-checkbox-change=${this.handleOptionChecked}>
|
|
4
4
|
<slot></slot>
|
|
@@ -20,4 +20,4 @@ import{a as v}from"./chunk-YOV2DMM7.js";import{a as d}from"./chunk-DJOD4BTL.js";
|
|
|
20
20
|
<slot class="label"></slot>
|
|
21
21
|
</label>
|
|
22
22
|
`}};i.shadowRootOptions={...n.shadowRootOptions,delegatesFocus:!0},t([r({type:Boolean,reflect:!0})],i.prototype,"checked",2),t([r()],i.prototype,"value",2),t([r({type:Boolean,reflect:!0})],i.prototype,"required",2),t([r({type:Boolean,reflect:!0})],i.prototype,"disabled",2),t([r({type:Boolean,reflect:!0})],i.prototype,"indeterminate",2),t([o("bl-checkbox-change")],i.prototype,"onChange",2),t([o("bl-focus")],i.prototype,"onFocus",2),t([o("bl-blur")],i.prototype,"onBlur",2),t([m("[type=checkbox]")],i.prototype,"checkboxElement",2),i=t([c(h)],i);export{h as a,i as b,u as c,p as d,l as e};
|
|
23
|
-
//# sourceMappingURL=chunk-
|
|
23
|
+
//# sourceMappingURL=chunk-RQG2GHCK.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{a as l,b as t}from"./chunk-
|
|
1
|
+
import{a as l,b as t}from"./chunk-X2KXJYXQ.js";import{a as i,b as r,f as a}from"./chunk-4OT5AMS5.js";import{c as o}from"./chunk-CYCIT2TG.js";var c=i`:host{display:inline-block;max-width:100%}.badge{--bg-color:var(--bl-badge-bg-color, var(--bl-color-primary-contrast));--color:var(--bl-badge-color, var(--bl-color-primary));--font:var(--bl-font-title-4-medium);--padding-vertical:var(--bl-size-4xs);--padding-horizontal:var(--bl-size-3xs);--margin-icon:var(--bl-size-3xs);--icon-size:var(--bl-size-s);--height:var(--bl-size-xl);display:flex;gap:var(--margin-icon);justify-content:center;align-items:center;box-sizing:border-box;width:100%;border:none;border-radius:var(--bl-size-4xs);margin:0;padding:var(--padding-vertical) var(--padding-horizontal);background-color:var(--bg-color);color:var(--color, white);font:var(--font);font-kerning:none;height:var(--height)}:host([size="small"]) .badge{--font:var(--bl-font-caption);--height:var(--bl-size-m)}:host([size="large"]) .badge{--font:var(--bl-font-title-3-medium);--padding-vertical:var(--bl-size-2xs);--padding-horizontal:var(--bl-size-2xs);--height:var(--bl-size-2xl);--icon-size:var(--bl-size-m)}:host ::slotted(bl-icon){font-size:var(--icon-size)}:host([size="small"]) bl-icon{display:none}`,n=c;var e=class extends a{constructor(){super(...arguments);this.size="medium"}static get styles(){return[n]}render(){let s=this.icon?r`<bl-icon name=${this.icon}></bl-icon>`:"";return r`<span class="badge">
|
|
2
2
|
<slot name="icon">${s}</slot>
|
|
3
3
|
<slot></slot>
|
|
4
4
|
</span>`}};o([t({type:String,reflect:!0})],e.prototype,"size",2),o([t({type:String})],e.prototype,"icon",2),e=o([l("bl-badge")],e);export{e as a};
|
|
5
|
-
//# sourceMappingURL=chunk-
|
|
5
|
+
//# sourceMappingURL=chunk-SLY6IY2R.js.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import{a as u}from"./chunk-7QGSFS64.js";import{a as l}from"./chunk-GRL4DWKG.js";import{a as d,b as o,c as h,e as n}from"./chunk-X2KXJYXQ.js";import{a as b}from"./chunk-DINNT5P2.js";import{a as s,b as p,f as a}from"./chunk-4OT5AMS5.js";import{c as e}from"./chunk-CYCIT2TG.js";var g=s`:host{position:relative;display:inline-block}:host([kind="neutral"]) bl-popover{--bl-popover-border-color:var(--bl-color-neutral-darker)}:host([kind="success"]) bl-popover{--bl-popover-border-color:var(--bl-color-success)}:host([kind="danger"]) bl-popover{--bl-popover-border-color:var(--bl-color-danger)}.popover-content{display:flex;flex-direction:column;gap:var(--bl-size-xs)}`,v=g;var c="bl-dropdown",t=class extends a{constructor(){super(...arguments);this._isPopoverOpen=!1;this.variant="primary";this.kind="default";this.size="medium";this.disabled=!1;this.focusedOptionIndex=-1}static get styles(){return[v]}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this.handleKeyDown)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this.handleKeyDown)}firstUpdated(){this._popover.target=this._button}get opened(){return this._isPopoverOpen}_handleClick(){!this._isPopoverOpen&&!this.disabled?this.open():this.close()}handleKeyDown(i){if(["ArrowDown","ArrowRight"].includes(i.key))this.focusedOptionIndex++;else if(["ArrowUp","ArrowLeft"].includes(i.key))this.focusedOptionIndex--;else if(i.key==="Escape"){this.focusedOptionIndex=-1,this.close();return}else return;this.focusedOptionIndex=Math.max(0,Math.min(this.focusedOptionIndex,this.options.length-1)),this.options[this.focusedOptionIndex].focus(),i.preventDefault()}get options(){return[...this.querySelectorAll(m)]}open(){this._isPopoverOpen=!0,this._popover.show(),this.onOpen("Dropdown opened!")}close(){this._isPopoverOpen=!1,this._popover.visible&&this._popover.hide(),this.onClose("Dropdown closed!")}render(){return p`<bl-button
|
|
2
|
+
dropdown
|
|
3
|
+
.active=${this.opened}
|
|
4
|
+
?disabled=${this.disabled}
|
|
5
|
+
variant="${this.variant}"
|
|
6
|
+
kind="${this.kind}"
|
|
7
|
+
size="${this.size}"
|
|
8
|
+
@bl-click="${this._handleClick}"
|
|
9
|
+
>
|
|
10
|
+
${this.label}
|
|
11
|
+
</bl-button>
|
|
12
|
+
<bl-popover fit-size placement="bottom-start" @bl-popover-hide="${this.close}"
|
|
13
|
+
><div class="popover-content">
|
|
14
|
+
<slot></slot></div
|
|
15
|
+
></bl-popover> `}};e([n("bl-popover")],t.prototype,"_popover",2),e([n("bl-button")],t.prototype,"_button",2),e([h()],t.prototype,"_isPopoverOpen",2),e([o({type:String,reflect:!0})],t.prototype,"label",2),e([o({type:String,reflect:!0})],t.prototype,"variant",2),e([o({type:String,reflect:!0})],t.prototype,"kind",2),e([o({type:String,reflect:!0})],t.prototype,"size",2),e([o({type:Boolean,reflect:!0})],t.prototype,"disabled",2),e([l("bl-dropdown-open")],t.prototype,"onOpen",2),e([l("bl-dropdown-close")],t.prototype,"onClose",2),t=e([d(c)],t);var w=s`:host{width:100%;--bl-button-display:block;--bl-button-justify:start}`,f=w;var m="bl-dropdown-item",r=class extends a{static get styles(){return[f]}_handleClick(){var i;(i=this.BlDropdownField)==null||i.close(),this.onClick("Action clicked!")}focus(){this.menuElement.focus()}connectedCallback(){super.connectedCallback(),this.BlDropdownGroupField=this.closest(u),this.BlDropdownField=this.closest(c),!this.BlDropdownField&&!this.BlDropdownGroupField&&console.warn(`bl-dropdown-item is designed to be used inside a ${u} or ${c}`,this)}disconnectedCallback(){super.disconnectedCallback()}render(){return p`<bl-button
|
|
16
|
+
variant="tertiary"
|
|
17
|
+
kind="neutral"
|
|
18
|
+
icon="${b(this.icon)}"
|
|
19
|
+
role="menuitem"
|
|
20
|
+
@click="${this._handleClick}"
|
|
21
|
+
><slot></slot>
|
|
22
|
+
</bl-button>`}};e([o({type:String})],r.prototype,"icon",2),e([l("bl-dropdown-item-click")],r.prototype,"onClick",2),e([n("[role=menuitem]")],r.prototype,"menuElement",2),r=e([d(m)],r);export{m as a,r as b,c,t as d};
|
|
23
|
+
//# sourceMappingURL=chunk-V5OMCBVZ.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/components/dropdown/bl-dropdown.css", "../src/components/dropdown/bl-dropdown.ts", "../src/components/dropdown/item/bl-dropdown-item.css", "../src/components/dropdown/item/bl-dropdown-item.ts"],
|
|
4
|
+
"sourcesContent": ["import {css} from 'lit';\nexport const styles = css`:host{position:relative;display:inline-block}:host([kind=\"neutral\"]) bl-popover{--bl-popover-border-color:var(--bl-color-neutral-darker)}:host([kind=\"success\"]) bl-popover{--bl-popover-border-color:var(--bl-color-success)}:host([kind=\"danger\"]) bl-popover{--bl-popover-border-color:var(--bl-color-danger)}.popover-content{display:flex;flex-direction:column;gap:var(--bl-size-xs)}`;\nexport default styles;\n", "import { LitElement, html, CSSResultGroup, TemplateResult } from \"lit\";\nimport { customElement, property, state, query } from \"lit/decorators.js\";\nimport { event, EventDispatcher } from \"../../utilities/event\";\nimport \"../button/bl-button\";\nimport BlButton, { ButtonSize, ButtonVariant, ButtonKind } from \"../button/bl-button\";\nimport BlPopover from \"../popover/bl-popover\";\nimport style from \"./bl-dropdown.css\";\nimport BlDropdownItem, { blDropdownItemTag } from \"./item/bl-dropdown-item\";\n\nexport const blDropdownTag = \"bl-dropdown\";\n\n/**\n * @tag bl-dropdown\n * @summary Baklava Dropdown component\n */\n@customElement(blDropdownTag)\nexport default class BlDropdown extends LitElement {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n @query(\"bl-popover\")\n private _popover: BlPopover;\n\n @query(\"bl-button\")\n private _button: BlButton;\n\n @state() private _isPopoverOpen = false;\n\n /**\n * Sets the dropdown button label\n */\n @property({ type: String, reflect: true })\n label: string;\n\n /**\n * Sets the dropdown button variant\n */\n @property({ type: String, reflect: true })\n variant: ButtonVariant = \"primary\";\n\n /**\n * Sets the dropdown button kind\n */\n @property({ type: String, reflect: true })\n kind: ButtonKind = \"default\";\n\n /**\n * Sets the dropdown button size\n */\n @property({ type: String, reflect: true })\n size: ButtonSize = \"medium\";\n\n /**\n * Sets button as disabled\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * Fires when dropdown opened\n */\n @event(\"bl-dropdown-open\") private onOpen: EventDispatcher<string>;\n\n /**\n * Fires when dropdown closed\n */\n @event(\"bl-dropdown-close\") private onClose: EventDispatcher<string>;\n\n connectedCallback() {\n super.connectedCallback();\n this.addEventListener(\"keydown\", this.handleKeyDown);\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.removeEventListener(\"keydown\", this.handleKeyDown);\n }\n\n firstUpdated() {\n // `_button` will be undefined during the initial render.\n // To ensure proper rendering, we set `_popover.target` after the template has been created.\n this._popover.target = this._button;\n }\n\n get opened() {\n return this._isPopoverOpen;\n }\n\n private _handleClick() {\n !this._isPopoverOpen && !this.disabled ? this.open() : this.close();\n }\n\n private focusedOptionIndex = -1;\n\n private handleKeyDown(event: KeyboardEvent) {\n // Next action\n if ([\"ArrowDown\", \"ArrowRight\"].includes(event.key)) {\n this.focusedOptionIndex++;\n\n // Previous action\n } else if ([\"ArrowUp\", \"ArrowLeft\"].includes(event.key)) {\n this.focusedOptionIndex--;\n // Select action\n } else if (event.key === \"Escape\") {\n this.focusedOptionIndex = -1;\n this.close();\n return;\n } else {\n // Other keys are not our interest here\n return;\n }\n\n // Don't exceed array indexes\n this.focusedOptionIndex = Math.max(\n 0,\n Math.min(this.focusedOptionIndex, this.options.length - 1)\n );\n\n this.options[this.focusedOptionIndex].focus();\n\n event.preventDefault();\n }\n\n get options(): BlDropdownItem[] {\n return [...this.querySelectorAll(blDropdownItemTag)];\n }\n\n open() {\n this._isPopoverOpen = true;\n this._popover.show();\n this.onOpen(\"Dropdown opened!\");\n }\n\n close() {\n this._isPopoverOpen = false;\n this._popover.visible && this._popover.hide();\n this.onClose(\"Dropdown closed!\");\n }\n\n render(): TemplateResult {\n return html`<bl-button\n dropdown\n .active=${this.opened}\n ?disabled=${this.disabled}\n variant=\"${this.variant}\"\n kind=\"${this.kind}\"\n size=\"${this.size}\"\n @bl-click=\"${this._handleClick}\"\n >\n ${this.label}\n </bl-button>\n <bl-popover fit-size placement=\"bottom-start\" @bl-popover-hide=\"${this.close}\"\n ><div class=\"popover-content\">\n <slot></slot></div\n ></bl-popover> `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n [blDropdownTag]: BlDropdown;\n }\n}\n", "import {css} from 'lit';\nexport const styles = css`:host{width:100%;--bl-button-display:block;--bl-button-justify:start}`;\nexport default styles;\n", "import { LitElement, html, CSSResultGroup, TemplateResult } from \"lit\";\nimport { customElement, property, query } from \"lit/decorators.js\";\nimport { ifDefined } from \"lit/directives/if-defined.js\";\nimport { event, EventDispatcher } from \"../../../utilities/event\";\nimport \"../../button/bl-button\";\nimport BlButton from \"../../button/bl-button\";\nimport { BaklavaIcon } from \"../../icon/icon-list\";\nimport type BlDropdown from \"../bl-dropdown\";\nimport { blDropdownTag } from \"../bl-dropdown\";\nimport type BlDropdownGroup from \"../group/bl-dropdown-group\";\nimport { blDropdownGroupTag } from \"../group/bl-dropdown-group\";\nimport style from \"./bl-dropdown-item.css\";\n\nexport const blDropdownItemTag = \"bl-dropdown-item\";\n\n/**\n * @tag bl-dropdown-item\n * @summary Baklava Dropdown Item component\n */\n@customElement(blDropdownItemTag)\nexport default class BlDropdownItem extends LitElement {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n /**\n * Sets the icon name. Shows icon with bl-icon component\n */\n\n @property({ type: String })\n icon?: BaklavaIcon;\n\n @event(\"bl-dropdown-item-click\") private onClick: EventDispatcher<string>;\n\n private _handleClick() {\n this.BlDropdownField?.close();\n this.onClick(\"Action clicked!\");\n }\n\n @query(\"[role=menuitem]\") private menuElement: BlButton;\n\n /**\n * Focuses this action\n */\n focus() {\n this.menuElement.focus();\n }\n\n private BlDropdownGroupField: BlDropdownGroup | null;\n private BlDropdownField: BlDropdown | null;\n\n connectedCallback(): void {\n super.connectedCallback();\n\n this.BlDropdownGroupField = this.closest<BlDropdownGroup>(blDropdownGroupTag);\n this.BlDropdownField = this.closest<BlDropdown>(blDropdownTag);\n\n if (!this.BlDropdownField && !this.BlDropdownGroupField) {\n console.warn(\n `bl-dropdown-item is designed to be used inside a ${blDropdownGroupTag} or ${blDropdownTag}`,\n this\n );\n }\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n }\n\n render(): TemplateResult {\n return html`<bl-button\n variant=\"tertiary\"\n kind=\"neutral\"\n icon=\"${ifDefined(this.icon)}\"\n role=\"menuitem\"\n @click=\"${this._handleClick}\"\n ><slot></slot>\n </bl-button>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n [blDropdownItemTag]: BlDropdownItem;\n }\n}\n"],
|
|
5
|
+
"mappings": "mRACO,IAAMA,EA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M,kBAAkB,EAExB,KAAK,qBAAuB,KAAK,QAAyBC,CAAkB,EAC5E,KAAK,gBAAkB,KAAK,QAAoBC,CAAa,EAEzD,CAAC,KAAK,iBAAmB,CAAC,KAAK,sBACjC,QAAQ,KACN,oDAAoDD,QAAyBC,IAC7E,IACF,CAEJ,CAEA,sBAA6B,CAC3B,MAAM,qBAAqB,CAC7B,CAEA,QAAyB,CACvB,OAAOC;AAAA;AAAA;AAAA,cAGGC,EAAU,KAAK,IAAI;AAAA;AAAA,gBAEjB,KAAK;AAAA;AAAA,iBAGnB,CACF,EAjDEC,EAAA,CADCC,EAAS,CAAE,KAAM,MAAO,CAAC,GATPT,EAUnB,oBAEyCQ,EAAA,CAAxCE,EAAM,wBAAwB,GAZZV,EAYsB,uBAOPQ,EAAA,CAAjCG,EAAM,iBAAiB,GAnBLX,EAmBe,2BAnBfA,EAArBQ,EAAA,CADCC,EAAcV,CAAiB,GACXC",
|
|
6
|
+
"names": ["styles", "i", "bl_dropdown_default", "blDropdownTag", "BlDropdown", "s", "bl_dropdown_default", "event", "blDropdownItemTag", "x", "__decorateClass", "i", "t", "e", "styles", "i", "bl_dropdown_item_default", "blDropdownItemTag", "BlDropdownItem", "s", "bl_dropdown_item_default", "_a", "blDropdownGroupTag", "blDropdownTag", "x", "l", "__decorateClass", "e", "event", "i"]
|
|
7
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as c}from"./chunk-GRL4DWKG.js";import{a as n,b as i,
|
|
1
|
+
import{a as c}from"./chunk-GRL4DWKG.js";import{a as n,b as i,e as s}from"./chunk-X2KXJYXQ.js";import{a as l,b as r,f as a}from"./chunk-4OT5AMS5.js";import{c as e}from"./chunk-CYCIT2TG.js";var v=l`:host{position:relative;display:flex;align-items:center;background-color:var(--bl-color-neutral-full)}.container{--title-padding-vertical:var(--bl-size-m);--title-padding-horizontal:var(--bl-size-xl);--title-color:var(--bl-color-neutral-darker);--caption-color:var(--bl-color-neutral-darker);--icon-color:var(--bl-color-neutral-darker);--border-bottom-width:var(--bl-size-4xs);--border-left-space:var(--bl-size-xl);--font-title:var(--bl-font-title-3-medium);--font-caption:var(--bl-font-title-4-regular);--tab-right-padding:var(--bl-size-xl);--help-container-width:var(--bl-size-2xl);--tab-height:calc(var(--bl-size-3xl) + var(--bl-size-s));display:flex;border:none;cursor:pointer;background-color:initial;width:max-content;height:var(--tab-height);padding:0 var(--tab-right-padding);margin-right:1px}.container::after{position:absolute;content:"";right:0;top:var(--bl-size-m);height:calc(100% - var(--bl-size-2xl));border-right:1px solid var(--bl-color-neutral-lighter)}:host(:last-of-type) .container::after{border-right:none}:host(:focus-visible){outline:none}:host(:focus-visible) .container,.container:focus-visible{outline:2px solid var(--bl-color-primary);outline-offset:calc(-1 * var(--bl-size-3xs));border-radius:var(--bl-border-radius-s)}:host .container::before{content:"";position:absolute;opacity:0;bottom:calc(-1 * var(--bl-size-4xs));left:var(--border-left-space);width:calc(100% - var(--bl-size-4xl));border-bottom:var(--border-bottom-width) solid var(--bl-color-primary)}:host([selected]:not([disabled])) .container::before{opacity:1}:host(.__ONLY_FOR_STORYBOOK_DEMONSTRATION_HOVER__) .container,:host([selected]) .container,:host(:hover) .container,:host([selected]) .container{--title-color:var(--bl-color-primary);--icon-color:var(--bl-color-primary)}:host([disabled]) .container{cursor:not-allowed;--title-color:var(--bl-color-neutral-lighter);--caption-color:var(--bl-color-neutral-lighter);--icon-color:var(--bl-color-neutral-lighter)}:host(.__ONLY_FOR_STORYBOOK_DEMONSTRATION_HOVER__) :where(.title, .icon),:host(:hover) :where(.title, .icon){transition:color 120ms ease-out}:host([selected]) .border-bottom{display:inline-block}:host([disabled]) .container.__ONLY_FOR_STORYBOOK_DEMONSTRATION_HOVER__,:host([disabled]) .container:hover{cursor:not-allowed}:host([help-text]) button{padding-right:0}.tab-button{width:max-content}.help-container{display:flex;justify-content:center;align-items:center;width:var(--help-container-width);height:100%;font-size:var(--bl-font-size-m);pointer-events:visible;padding-right:var(--tab-right-padding)}bl-tooltip{--bl-tooltip-position:fixed;display:flex}.title{display:flex;align-items:center;justify-content:center;font:var(--font-title);color:var(--title-color);line-height:var(--bl-size-m);white-space:nowrap}.title-container{display:flex;align-items:center;justify-content:center;flex-direction:column;margin:auto}.badge-container{padding-left:var(--bl-size-3xs);display:flex;margin-bottom:1px}.caption{font:var(--font-caption);line-height:var(--bl-size-xs);color:var(--caption-color);text-align:center;margin-top:var(--bl-size-4xs)}.icon{display:flex;color:var(--icon-color);font-size:var(--bl-font-size-l);margin-right:var(--bl-size-3xs);margin-bottom:1px}:host([notify]) .title::after{content:"";height:var(--bl-size-2xs);width:var(--bl-size-2xs);border-radius:var(--bl-size-3xs);margin-left:var(--bl-size-3xs);background-color:var(--bl-color-danger);margin-bottom:1px}`,d=v;var t=class extends a{constructor(){super(...arguments);this.notify=!1;this.badge="";this.selected=!1;this.disabled=!1}static get styles(){return[d]}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{var o;this.tabGroup=this.closest("bl-tab-group"),(o=this.tabGroup)==null||o.registerTab(this)})}disconnectedCallback(){var o;super.disconnectedCallback(),(o=this.tabGroup)==null||o.unregisterTab(this)}select(){this.selected=!0}focus(){this.tab.focus()}updated(o){this.tabIndex=this.selected?0:-1,o.has("selected")&&this.selected&&this._onSelect(this.name)}render(){let o=r` <slot></slot>`,b=this.helpText?r` <div class="help-container">
|
|
2
2
|
<bl-tooltip>
|
|
3
3
|
<bl-button
|
|
4
4
|
slot="tooltip-trigger"
|
|
@@ -28,4 +28,4 @@ import{a as c}from"./chunk-GRL4DWKG.js";import{a as n,b as i,d as s}from"./chunk
|
|
|
28
28
|
${b}
|
|
29
29
|
</button>
|
|
30
30
|
`}};e([i({type:String})],t.prototype,"caption",2),e([i({type:String,reflect:!0})],t.prototype,"name",2),e([i({type:String,attribute:"help-text",reflect:!0})],t.prototype,"helpText",2),e([i({type:String})],t.prototype,"icon",2),e([i({type:Boolean,reflect:!0})],t.prototype,"notify",2),e([i({type:String})],t.prototype,"badge",2),e([i({type:Boolean,reflect:!0})],t.prototype,"selected",2),e([i({type:Boolean,reflect:!0})],t.prototype,"disabled",2),e([c("bl-tab-selected")],t.prototype,"_onSelect",2),e([s(".container")],t.prototype,"tab",2),t=e([n("bl-tab")],t);export{t as a};
|
|
31
|
-
//# sourceMappingURL=chunk-
|
|
31
|
+
//# sourceMappingURL=chunk-VOYAVKU3.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as _}from"./chunk-6LT7O7T2.js";import{a as y}from"./chunk-GRL4DWKG.js";import{a as m,b as e,c as g,
|
|
1
|
+
import{a as _}from"./chunk-6LT7O7T2.js";import{a as y}from"./chunk-GRL4DWKG.js";import{a as m,b as e,c as g,e as f}from"./chunk-X2KXJYXQ.js";import{a as n}from"./chunk-DINNT5P2.js";import{a as p,b as a,f as v}from"./chunk-4OT5AMS5.js";import{c as o}from"./chunk-CYCIT2TG.js";var x=l=>{if(!(!l.noValidate&&!l.reportValidity())){let d=new SubmitEvent("submit",{bubbles:!0,cancelable:!0});l.dispatchEvent(d),d.defaultPrevented||l.submit()}};var z=p`@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(359deg)}}:host{display:var(--bl-button-display, inline-block);max-width:100%;position:relative}.button{--main-color:var(--bl-color-primary);--main-hover-color:var(--bl-color-primary-highlight);--text-hover-color:var(--bl-color-neutral-lightest);--content-color:var(--bl-color-neutral-full);--bg-color:var(--main-color);--border-color:var(--main-color);--padding-vertical:var(--bl-size-2xs);--padding-horizontal:var(--bl-size-m);--margin-icon:var(--padding-vertical);--icon-size:var(--bl-size-m);--font:var(--bl-font-title-3-medium);--height:var(--bl-size-2xl);display:flex;gap:var(--margin-icon);justify-content:var(--bl-button-justify, center);align-items:center;box-sizing:border-box;width:100%;height:var(--height);border:solid 1px var(--border-color);border-radius:var(--bl-border-radius-m);text-decoration:none;padding:var(--padding-vertical) var(--padding-horizontal);cursor:pointer;background-color:var(--bg-color);color:var(--content-color);font:var(--font);font-kerning:none;user-select:none}:host(.__ONLY_FOR_STORYBOOK_DEMONSTRATION_HOVER__) .button,:host(:hover) .button{--bg-color:var(--main-hover-color);--border-color:var(--main-hover-color)}.label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host([size="small"]) .button{--font:var(--bl-font-title-4-medium);--padding-vertical:var(--bl-size-3xs);--padding-horizontal:var(--bl-size-2xs);--icon-size:var(--bl-size-s);--height:var(--bl-size-xl)}:host([size="large"]) .button{--font:var(--bl-font-title-3-medium);--padding-vertical:var(--bl-size-xs);--padding-horizontal:var(--bl-size-xl);--margin-icon:var(--bl-size-2xs);--height:var(--bl-size-3xl)}.button:focus{outline:none}.button:focus-visible{position:relative;outline:none}.button:focus-visible::after{border:2px solid var(--main-color);border-radius:var(--bl-border-radius-l);content:"";position:absolute;inset:-4px}.loading-icon{animation:spin 1s linear infinite;font-size:var(--icon-size)}:host ::slotted(bl-icon){font-size:var(--icon-size)}:host([loading]) ::slotted(bl-icon){display:none}:host .has-icon:not(.has-content){--padding-horizontal:var(--padding-vertical);--margin-icon:0}:host([variant="secondary"]) .button{--bg-color:transparent;--content-color:var(--main-color)}:host([variant="tertiary"]) .button{--content-color:var(--main-color);--border-color:transparent;--bg-color:transparent}:host([kind="neutral"]) .button{--main-color:var(--bl-color-neutral-darker);--main-hover-color:var(--bl-color-neutral-darkest)}:host([kind="success"]) .button{--main-color:var(--bl-color-success);--main-hover-color:var(--bl-color-success-highlight)}:host([kind="danger"]) .button{--main-color:var(--bl-color-danger);--main-hover-color:var(--bl-color-danger-highlight)}:host([disabled]){cursor:not-allowed}:host([loading]){cursor:wait}:host([loading]) bl-icon:not(.loading-icon){display:none}:host .button[aria-disabled="true"]{--main-color:var(--bl-color-neutral-lightest);--main-hover-color:var(--bl-color-neutral-lightest);--content-color:var(--bl-color-neutral-lighter);--bg-color:var(--main-color);pointer-events:none;text-decoration:none}:host([variant="tertiary"]) .button[aria-disabled="true"]{--main-color:transparent}:host([variant="secondary"].__ONLY_FOR_STORYBOOK_DEMONSTRATION_HOVER__) .button[aria-disabled="false"],:host([variant="secondary"]:hover) .button[aria-disabled="false"]{--content-color:var(--bl-color-neutral-full);--bg-color:var(--main-hover-color)}:host([variant="tertiary"].__ONLY_FOR_STORYBOOK_DEMONSTRATION_HOVER__) .button[aria-disabled="false"],:host([variant="tertiary"]:hover) .button[aria-disabled="false"]{--content-color:var(--main-hover-color);--bg-color:var(--text-hover-color)}:host([dropdown]) .open{display:none}:host([dropdown]) .active .open{display:inline-block}:host([dropdown]) .active .close{display:none}:host .active.button{--bg-color:var(--main-hover-color);--border-color:var(--main-hover-color)}:host([variant="secondary"]) .active.button{--content-color:var(--bl-color-neutral-full);--bg-color:var(--main-hover-color)}:host([variant="tertiary"]) .active.button{--content-color:var(--main-color);--bg-color:var(--bl-color-neutral-lightest);--border-color:transparent}`,T=z;var t=class extends v{constructor(){super(...arguments);this.variant="primary";this.kind="default";this.size="medium";this.loading=!1;this.disabled=!1;this.target="_self";this.dropdown=!1;this.autofocus=!1;this.active=!1}static get styles(){return[T]}get _isActive(){return this.active}connectedCallback(){super.connectedCallback()}caretTemplate(){return a` <bl-icon class="open" name="arrow_up"></bl-icon>
|
|
2
2
|
<bl-icon class="close" name="arrow_down"></bl-icon>`}_handleClick(){if(this.type==="submit"){let r;this.form instanceof HTMLFormElement?r=this.form:typeof this.form=="string"?r=document.getElementById(this.form):r=this.closest("form"),r&&x(r)}this.onClick("Click event fired!")}focus(){this.button.focus()}get _hasIconSlot(){return this.querySelector(':scope > [slot="icon"]')!==null}get _hasDefaultSlot(){return[...this.childNodes].some(i=>{var c;let s=i.nodeType;return s===i.TEXT_NODE&&((c=i.textContent)==null?void 0:c.trim())!==""||s===i.ELEMENT_NODE&&!i.hasAttribute("slot")})}render(){let r=this.loading||this.disabled,i=this.loading&&this.loadingLabel?this.loadingLabel:a`<slot></slot>`,s=!!this.href,c=this.icon?a`<bl-icon name=${this.icon}></bl-icon>`:"",b=this.loading?a`<bl-icon class="loading-icon" name="loading"></bl-icon>`:"",h=a`<slot name="icon">${c}</slot> <span class="label">${i}</span>`,E=this.dropdown?this.caretTemplate():"",u=_({button:!0,"has-icon":this.icon||this._hasIconSlot,"has-content":this._hasDefaultSlot,active:!s&&this._isActive});return s?a`<a
|
|
3
3
|
class=${u}
|
|
4
4
|
?autofocus=${this.autofocus}
|
|
@@ -18,4 +18,4 @@ import{a as _}from"./chunk-6LT7O7T2.js";import{a as y}from"./chunk-GRL4DWKG.js";
|
|
|
18
18
|
>
|
|
19
19
|
${b} ${h} ${E}
|
|
20
20
|
</button>`}};o([e({type:String,reflect:!0})],t.prototype,"variant",2),o([e({type:String,reflect:!0})],t.prototype,"kind",2),o([e({type:String,reflect:!0})],t.prototype,"size",2),o([e({type:String})],t.prototype,"label",2),o([e({type:String,attribute:"loading-label"})],t.prototype,"loadingLabel",2),o([e({type:Boolean,reflect:!0})],t.prototype,"loading",2),o([e({type:Boolean,reflect:!0})],t.prototype,"disabled",2),o([e({type:String})],t.prototype,"href",2),o([e({type:String})],t.prototype,"icon",2),o([e({type:String})],t.prototype,"target",2),o([e({type:String})],t.prototype,"type",2),o([e({type:Boolean})],t.prototype,"dropdown",2),o([e({type:Boolean,reflect:!0})],t.prototype,"autofocus",2),o([e({type:String})],t.prototype,"form",2),o([g({})],t.prototype,"active",2),o([f(".button")],t.prototype,"button",2),o([y("bl-click")],t.prototype,"onClick",2),t=o([m("bl-button")],t);export{x as a,t as b};
|
|
21
|
-
//# sourceMappingURL=chunk-
|
|
21
|
+
//# sourceMappingURL=chunk-WA7DDIST.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var p=t=>e=>typeof e=="function"?((r,o)=>(customElements.define(r,o),o))(t,e):((r,o)=>{let{kind:i,elements:n}=o;return{kind:i,elements:n,finisher(
|
|
1
|
+
var p=t=>e=>typeof e=="function"?((r,o)=>(customElements.define(r,o),o))(t,e):((r,o)=>{let{kind:i,elements:n}=o;return{kind:i,elements:n,finisher(l){customElements.define(r,l)}}})(t,e);var c=(t,e)=>e.kind==="method"&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(r){r.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){typeof e.initializer=="function"&&(this[e.key]=e.initializer.call(this))},finisher(r){r.createProperty(e.key,t)}};function a(t){return(e,r)=>r!==void 0?((o,i,n)=>{i.constructor.createProperty(n,o)})(t,e,r):c(t,e)}function v(t){return a({...t,state:!0})}var s=({finisher:t,descriptor:e})=>(r,o)=>{var i;if(o===void 0){let n=(i=r.originalKey)!==null&&i!==void 0?i:r.key,l=e!=null?{kind:"method",placement:"prototype",key:n,descriptor:e(r.key)}:{...r,key:n};return t!=null&&(l.finisher=function(u){t(u,n)}),l}{let n=r.constructor;e!==void 0&&Object.defineProperty(r,o,e(o)),t==null||t(n,o)}};function b(t){return s({finisher:(e,r)=>{Object.assign(e.prototype[r],t)}})}function q(t,e){return s({descriptor:r=>{let o={get(){var i,n;return(n=(i=this.renderRoot)===null||i===void 0?void 0:i.querySelector(t))!==null&&n!==void 0?n:null},enumerable:!0,configurable:!0};if(e){let i=typeof r=="symbol"?Symbol():"__"+r;o.get=function(){var n,l;return this[i]===void 0&&(this[i]=(l=(n=this.renderRoot)===null||n===void 0?void 0:n.querySelector(t))!==null&&l!==void 0?l:null),this[i]}}return o}})}function A(t){return s({descriptor:e=>({get(){var r,o;return(o=(r=this.renderRoot)===null||r===void 0?void 0:r.querySelectorAll(t))!==null&&o!==void 0?o:[]},enumerable:!0,configurable:!0})})}var d,w=((d=window.HTMLSlotElement)===null||d===void 0?void 0:d.prototype.assignedElements)!=null?(t,e)=>t.assignedElements(e):(t,e)=>t.assignedNodes(e).filter(r=>r.nodeType===Node.ELEMENT_NODE);export{p as a,a as b,v as c,b as d,q as e,A as f};
|
|
2
2
|
/*! Bundled license information:
|
|
3
3
|
|
|
4
4
|
@lit/reactive-element/decorators/custom-element.js:
|
|
@@ -29,21 +29,21 @@ var p=t=>e=>typeof e=="function"?((r,o)=>(customElements.define(r,o),o))(t,e):((
|
|
|
29
29
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
30
30
|
*)
|
|
31
31
|
|
|
32
|
-
@lit/reactive-element/decorators/
|
|
32
|
+
@lit/reactive-element/decorators/event-options.js:
|
|
33
33
|
(**
|
|
34
34
|
* @license
|
|
35
35
|
* Copyright 2017 Google LLC
|
|
36
36
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
37
37
|
*)
|
|
38
38
|
|
|
39
|
-
@lit/reactive-element/decorators/query
|
|
39
|
+
@lit/reactive-element/decorators/query.js:
|
|
40
40
|
(**
|
|
41
41
|
* @license
|
|
42
42
|
* Copyright 2017 Google LLC
|
|
43
43
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
44
44
|
*)
|
|
45
45
|
|
|
46
|
-
@lit/reactive-element/decorators/
|
|
46
|
+
@lit/reactive-element/decorators/query-all.js:
|
|
47
47
|
(**
|
|
48
48
|
* @license
|
|
49
49
|
* Copyright 2017 Google LLC
|
|
@@ -71,4 +71,4 @@ var p=t=>e=>typeof e=="function"?((r,o)=>(customElements.define(r,o),o))(t,e):((
|
|
|
71
71
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
72
72
|
*)
|
|
73
73
|
*/
|
|
74
|
-
//# sourceMappingURL=chunk-
|
|
74
|
+
//# sourceMappingURL=chunk-X2KXJYXQ.js.map
|