@brandsync/wc 1.11.0 → 1.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +155 -0
- package/custom-elements.json +9 -13
- package/dist/brandsync-wc/brandsync-wc.esm.js +1 -1
- package/dist/brandsync-wc/{p-afb07368.entry.js → p-452f9c1c.entry.js} +1 -1
- package/dist/brandsync-wc/{p-5f27f04d.entry.js → p-83c90489.entry.js} +1 -1
- package/dist/brandsync-wc/p-89099a39.entry.js +1 -0
- package/dist/brandsync-wc/{p-061ddc46.entry.js → p-b8d2ce91.entry.js} +1 -1
- package/dist/cjs/brandsync-wc.cjs.js +1 -1
- package/dist/cjs/bs-breadcrumb.cjs.entry.js +5 -2
- package/dist/cjs/bs-chatbot-header.cjs.entry.js +2 -2
- package/dist/cjs/bs-composer.cjs.entry.js +1 -1
- package/dist/cjs/bs-input_3.cjs.entry.js +5 -4
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/bs-attachment/bs-attachment.stories.js +4 -3
- package/dist/collection/components/bs-breadcrumb/bs-breadcrumb/bs-breadcrumb.js +6 -3
- package/dist/collection/components/bs-chatbot-header/bs-chatbot-header.cmp.test.js +2 -2
- package/dist/collection/components/bs-chatbot-header/bs-chatbot-header.css +1 -1
- package/dist/collection/components/bs-chatbot-header/bs-chatbot-header.js +1 -1
- package/dist/collection/components/bs-composer/bs-composer.css +4 -2
- package/dist/collection/components/bs-input/bs-input.cmp.test.js +2 -2
- package/dist/collection/components/bs-input/bs-input.css +6 -21
- package/dist/collection/components/bs-input/bs-input.js +8 -4
- package/dist/components/bs-breadcrumb.js +1 -1
- package/dist/components/bs-chatbot-header.js +1 -1
- package/dist/components/bs-composer.js +1 -1
- package/dist/components/bs-datepicker.js +1 -1
- package/dist/components/bs-input.js +1 -1
- package/dist/components/bs-session-timeout.js +1 -1
- package/dist/components/bs-timepicker.js +1 -1
- package/dist/components/p-BUskqBR6.js +1 -0
- package/dist/esm/brandsync-wc.js +1 -1
- package/dist/esm/bs-breadcrumb.entry.js +5 -2
- package/dist/esm/bs-chatbot-header.entry.js +2 -2
- package/dist/esm/bs-composer.entry.js +1 -1
- package/dist/esm/bs-input_3.entry.js +5 -4
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/bs-attachment/bs-attachment.stories.d.ts +1 -1
- package/dist/types/components/bs-breadcrumb/bs-breadcrumb/bs-breadcrumb.d.ts +4 -1
- package/dist/types/components/bs-input/bs-input.d.ts +4 -1
- package/dist/types/components.d.ts +6 -2
- package/package.json +3 -2
- package/dist/brandsync-wc/p-c0a92750.entry.js +0 -1
- package/dist/components/p-B_I4UEMp.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e,p as t,H as a,c as s,h as i}from"./p-CVrEuVFo.js";import{d as r}from"./p-CA31vqjL.js";import{d as n}from"./p-B_I4UEMp.js";import{d}from"./p-CeUK3n7D.js";import{d as o}from"./p-C_j_jDM6.js";const c=t(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.bsChange=s(this,"bsChange"),this.internals=this.attachInternals()}get el(){return this}internals;initialValue="";initialStart="";initialEnd="";name;range=!1;value="";start="";end="";min;max;locale="en-GB";firstDayOfWeek=0;startLabel="Start date";endLabel="End date";monthLabel="Month";yearLabel="Year";previousLabel="Previous month";nextLabel="Next month";bsChange;viewDate=p(new Date);focusedIso="";hoverIso="";draft={};openMenu=null;shouldFocusDay=!1;menuToScroll=!1;componentWillLoad(){this.initialValue=this.value,this.initialStart=this.start,this.initialEnd=this.end,this.showSelection(),this.syncFormValue()}componentDidRender(){if(this.menuToScroll){this.menuToScroll=!1;const e=()=>{const e=this.el.shadowRoot?.querySelector(".bs-datepicker__menu"),t=e?.querySelector("[data-current]");e&&t&&(e.scrollTop=t.offsetTop-e.clientHeight/2+t.offsetHeight/2)};requestAnimationFrame((()=>requestAnimationFrame(e)))}if(!this.shouldFocusDay)return;this.shouldFocusDay=!1;const e=this.el.shadowRoot.querySelector(`[data-date="${this.focusedIso}"]`);e?.focus()}onSelectionChange(){this.syncFormValue()}onSelectionJump(){this.showSelection()}formResetCallback(){this.value=this.initialValue,this.start=this.initialStart,this.end=this.initialEnd,this.draft={}}showSelection(){const e=h(this.range?this.start:this.value);e&&(this.viewDate=p(e))}syncFormValue(){if(this.internals?.setFormValue)if(this.range){if(!this.name)return void this.internals.setFormValue(null);const e=new FormData;e.append(this.name+"-start",this.start??""),e.append(this.name+"-end",this.end??""),this.internals.setFormValue(e)}else this.internals.setFormValue(this.value??"")}isDisabled(e){const t=h(this.min),a=h(this.max);return!!t&&e<t||!!a&&e>a}selectDay(e){if(this.isDisabled(e))return;const t=l(e);if(e.getMonth()===this.viewDate.getMonth()&&e.getFullYear()===this.viewDate.getFullYear()||(this.viewDate=p(e)),this.focusedIso=t,!this.range)return this.value=t,void this.bsChange.emit({value:t});!this.start||this.end||t<this.start?(this.start=t,this.end=""):this.end=t,this.hoverIso="",this.draft={},this.bsChange.emit({start:this.start,end:this.end})}commitDraft(e){const t=this.draft[e];if(void 0===t)return;const a=h(t),s={...this.draft};if(delete s[e],this.draft=s,!a||this.isDisabled(a))return;let i="start"===e?l(a):this.start,r="end"===e?l(a):this.end;i&&r&&r<i&&("start"===e?r="":i=""),this.start=i,this.end=r,this.showSelection(),this.bsChange.emit({start:i,end:r})}moveView(e){const t=this.viewDate;this.viewDate=new Date(t.getFullYear(),t.getMonth()+e,1)}onKeyDown=(e,t)=>{const a={ArrowLeft:-1,ArrowRight:1,ArrowUp:-7,ArrowDown:7};let s;if(e.key in a)s=u(t,a[e.key]);else if("Home"===e.key||"End"===e.key){const a=(t.getDay()-this.safeFirstDay+7)%7;s=u(t,"Home"===e.key?-a:6-a)}else{if("PageUp"!==e.key&&"PageDown"!==e.key)return;{const a="PageUp"===e.key?-1:1;s=function(e,t){const a=new Date(e.getFullYear(),e.getMonth()+t,1),s=new Date(a.getFullYear(),a.getMonth()+1,0).getDate();return new Date(a.getFullYear(),a.getMonth(),Math.min(e.getDate(),s))}(t,e.shiftKey?12*a:a)}}e.preventDefault(),this.focusedIso=l(s),this.viewDate=p(s),this.shouldFocusDay=!0};get safeFirstDay(){const e=Math.trunc(Number(this.firstDayOfWeek));return Number.isFinite(e)?(e%7+7)%7:0}get fmt(){const e=this.locale||"en-GB";try{return e}catch{return"en-GB"}}formatField(e){const t=h(e);return t?new Intl.DateTimeFormat(this.fmt,{day:"numeric",month:"short",year:"numeric"}).format(t):""}titleText(){const e=this.range?void 0:h(this.value);return e?new Intl.DateTimeFormat(this.fmt,{day:"numeric",month:"long",year:"numeric"}).format(e):new Intl.DateTimeFormat(this.fmt,{month:"long",year:"numeric"}).format(this.viewDate)}monthOptions(){const e=new Intl.DateTimeFormat(this.fmt,{month:"long"});return Array.from({length:12},((t,a)=>({label:e.format(new Date(2e3,a,1)),value:a+""})))}yearOptions(){const e=this.viewDate.getFullYear(),t=h(this.min)?.getFullYear()??e-100,a=h(this.max)?.getFullYear()??e+100,s=[];for(let i=Math.min(t,e);i<=Math.max(a,e);i++)s.push({label:i+"",value:i+""});return s}weekdays(){const e=new Intl.DateTimeFormat(this.fmt,{weekday:"short"});return Array.from({length:7},((t,a)=>e.format(new Date(2023,0,1+(this.safeFirstDay+a)%7))))}gridDays(){const e=this.viewDate,t=(e.getDay()-this.safeFirstDay+7)%7,a=u(e,-t);return Array.from({length:42},((e,t)=>u(a,t)))}renderHeader(){if(this.range){const e=(e,t)=>i("bs-input",{label:t,placeholder:"YYYY-MM-DD",value:this.draft[e]??this.formatField(this[e]),onBsInput:t=>this.draft={...this.draft,[e]:t.detail},onBsChange:()=>this.commitDraft(e),onFocusin:()=>{void 0===this.draft[e]&&(this.draft={...this.draft,[e]:this[e]})},onFocusout:()=>this.commitDraft(e)});return i("div",{part:"header",class:"bs-datepicker__header bs-datepicker__header--range"},e("start",this.startLabel),e("end",this.endLabel))}return i("div",{part:"header",class:"bs-datepicker__header"},this.renderDropdown("month",this.monthLabel,this.monthOptions(),this.viewDate.getMonth()+"",(e=>this.viewDate=new Date(this.viewDate.getFullYear(),Number(e),1))),this.renderDropdown("year",this.yearLabel,this.yearOptions(),this.viewDate.getFullYear()+"",(e=>this.viewDate=new Date(Number(e),this.viewDate.getMonth(),1))))}renderDropdown(e,t,a,s,r){const n=this.openMenu===e,d=()=>{this.openMenu=null};return i("div",{class:"bs-datepicker__dropdown",onKeyDown:e=>{"Escape"===e.key&&n&&(d(),e.currentTarget.querySelector("bs-input")?.focus())},onFocusout:e=>{const t=e.relatedTarget;!n||t&&e.currentTarget.contains(t)||d()}},i("bs-input",{type:"dropdown",class:"bs-datepicker__select",label:t,value:a.find((e=>e.value===s))?.label??"",open:n,onBsOpen:()=>{this.menuToScroll=!n,this.openMenu=n?null:e}}),n&&i("bs-menu",{part:"menu",class:"bs-datepicker__menu",role:"listbox"},a.map((e=>i("bs-menu-item",{key:e.value,"data-current":e.value===s?"":void 0,"aria-current":e.value===s?"true":void 0,onBsSelect:()=>{r(e.value),d(),this.el.shadowRoot.querySelector(`.bs-datepicker__dropdown bs-input[label="${t}"]`)?.focus()}},i("span",{class:"bs-datepicker__option"},i("span",null,e.label),e.value===s&&i("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},i("path",{d:"M5 12.5L10 17.5L19 7.5",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))))))))}render(){const e=this.gridDays(),t=l(new Date),a=this.range?this.start:this.value,s=this.range?this.end:"",r=this.range&&this.start&&!this.end&&this.hoverIso>this.start?this.hoverIso:s,n=e.some((e=>l(e)===this.focusedIso&&e.getMonth()===this.viewDate.getMonth()))?this.focusedIso:this.defaultTabbable(e),d=e=>!!a&&!!r&&e>a&&e<r,o=this.weekdays();return i("bs-card",{key:"cd66b2bc8f611383ea5df6d01e29b03a940bc06b",part:"container",class:"bs-datepicker",surface:"raised"},i("div",{key:"7020d13ee4ea5f05c2548966cb56c20b59eb067b",class:"bs-datepicker__body"},this.renderHeader(),i("div",{key:"4ed03f1fb642d2a3a226a27e6e86001a478eab4c",part:"nav",class:"bs-datepicker__nav"},i("button",{key:"e844a021afa02f834026ebb4237f5b2f5b9d1a4c",part:"prev",type:"button",class:"bs-datepicker__nav-button","aria-label":this.previousLabel,onClick:()=>this.moveView(-1)},i("svg",{key:"f68be6b62a9deb6334b63c6e7152b4968ebdbeab",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},i("path",{key:"a7ee70143ce7b839c44483c1d15daf2714306bf7",d:"M15 18L9 12L15 6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))),i("div",{key:"7eb7fd38ca59a4a6ba9692180bcd5096f54ac783",part:"title",class:"bs-datepicker__title","aria-live":"polite"},this.titleText()),i("button",{key:"1e515d27746a10acfe9f04f08c4a09753cb5b98b",part:"next",type:"button",class:"bs-datepicker__nav-button","aria-label":this.nextLabel,onClick:()=>this.moveView(1)},i("svg",{key:"f5dde56a61d31b93aa9877b0fc473264d40305ba",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},i("path",{key:"765b53c7f7e8618618622a5121ecab294610bf8a",d:"M9 18L15 12L9 6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})))),i("div",{key:"e56fa1a425055d77ae04039890758b823f14ee8d",part:"grid",class:"bs-datepicker__grid",role:"grid","aria-label":this.titleText()},i("div",{key:"2471a9291aa29111217aaaa1f02f2cfc8861e49e",class:"bs-datepicker__row",role:"row"},o.map((e=>i("div",{part:"weekday",class:"bs-datepicker__weekday",role:"columnheader"},e)))),Array.from({length:6},((r,o)=>{const c=e.slice(7*o,7*o+7);return i("div",{class:"bs-datepicker__row",role:"row"},c.map(((e,r)=>{const o=l(e),b=e.getMonth()!==this.viewDate.getMonth(),h=o===a||!!s&&o===s,p=d(o),u={"bs-datepicker__cell":!0,"bs-datepicker__cell--in-range":p,"bs-datepicker__cell--band-start":p&&!(r>0&&d(l(c[r-1]))),"bs-datepicker__cell--band-end":p&&!(r<6&&d(l(c[r+1])))},k=["day",h&&"selected",p&&"in-range",b&&"outside",o===t&&"today"].filter(Boolean).join(" ");return i("div",{class:u,role:"gridcell","aria-selected":h||p?"true":"false"},i("button",{part:k,type:"button",class:{"bs-datepicker__day":!0,"bs-datepicker__day--selected":h,"bs-datepicker__day--in-range":p,"bs-datepicker__day--outside":b,"bs-datepicker__day--today":o===t},"data-date":o,tabindex:o===n?0:-1,disabled:this.isDisabled(e),"aria-current":o===t?"date":void 0,"aria-label":new Intl.DateTimeFormat(this.fmt,{weekday:"long",day:"2-digit",month:"long",year:"numeric"}).format(e),onClick:()=>this.selectDay(e),onKeyDown:t=>this.onKeyDown(t,e),onMouseEnter:()=>{this.range&&this.start&&!this.end&&(this.hoverIso=o)}},(e.getDate()+"").padStart(2,"0")))})))})))))}defaultTabbable(e){const t=t=>e.some((e=>l(e)===t&&e.getMonth()===this.viewDate.getMonth())),a=this.range?this.start:this.value;if(a&&t(a))return a;const s=l(new Date);return t(s)?s:l(this.viewDate)}static get formAssociated(){return!0}static get watchers(){return{value:[{onSelectionChange:0},{onSelectionJump:0}],start:[{onSelectionChange:0},{onSelectionJump:0}],end:[{onSelectionChange:0}],range:[{onSelectionChange:0}],name:[{onSelectionChange:0}]}}static get style(){return":host{display:inline-block;--bs-datepicker-width:364px;--bs-datepicker-bg:var(--bs-paper-bg-raised);--bs-datepicker-radius:var(--bs-border-radius-150);--bs-datepicker-padding:var(--bs-spacing-200);--bs-datepicker-gap:var(--bs-spacing-150);--bs-datepicker-shadow:var(--bs-shadow-md);--bs-datepicker-menu-max-height:280px;--bs-datepicker-day-size:var(--bs-spacing-550);--bs-datepicker-day-radius:var(--bs-border-radius-100);--bs-datepicker-day-gap:var(--bs-spacing-50);--bs-datepicker-band-bridge:var(--bs-spacing-50);--bs-datepicker-font-size:var(--bs-font-size-md);--bs-datepicker-line-height:var(--bs-line-height-body-md);--bs-datepicker-weekday-font-size:var(--bs-font-size-sm);--bs-datepicker-weekday-line-height:var(--bs-line-height-body-sm);--bs-datepicker-color:var(--bs-text-default);--bs-datepicker-color-muted:var(--bs-text-muted);--bs-datepicker-color-weekday:var(--bs-text-secondary);--bs-datepicker-color-disabled:var(--bs-text-on-disabled);--bs-datepicker-hover:var(--bs-surface-hover);--bs-datepicker-pressed:var(--bs-surface-pressed);--bs-datepicker-focus-bg:var(--bs-surface-focus);--bs-datepicker-selected-bg:var(--bs-color-primary-default);--bs-datepicker-selected-bg-hover:var(--bs-color-primary-hover);--bs-datepicker-selected-bg-pressed:var(--bs-color-primary-pressed);--bs-datepicker-selected-bg-focus:var(--bs-color-primary-focused);--bs-datepicker-selected-bg-disabled:var(--bs-surface-action-disabled);--bs-datepicker-selected-color:var(--bs-text-on-action);--bs-datepicker-range-bg:var(--bs-color-primary-container);--bs-datepicker-today-border:var(--bs-border-primary);--bs-datepicker-focus-ring-color:var(--bs-border-neutral-focus)}.bs-datepicker{width:var(--bs-datepicker-width);max-width:100%;color:var(--bs-datepicker-color);font-size:var(--bs-datepicker-font-size);--bs-card-bg:var(--bs-datepicker-bg);--bs-card-radius:var(--bs-datepicker-radius);--bs-card-padding:var(--bs-datepicker-padding);--bs-card-shadow:var(--bs-datepicker-shadow);--bs-card-overflow:visible}.bs-datepicker__body{display:flex;flex-direction:column;gap:var(--bs-datepicker-gap)}.bs-datepicker__header{display:flex;align-items:flex-start;gap:var(--bs-spacing-100)}.bs-datepicker__header--range>bs-input{--bs-input-label-font-size:var(--bs-font-size-md);--bs-input-label-font-weight:var(--bs-font-weight-semibold);--bs-input-label-line-height:calc(var(--bs-line-height-body-md) * 1px)}.bs-datepicker__header>bs-input{flex:1 1 0;min-width:0}.bs-datepicker__select::part(label){position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.bs-datepicker__dropdown{position:relative;flex:1 1 0;min-width:0}.bs-datepicker__dropdown bs-input{width:100%}.bs-datepicker__menu{position:absolute;top:calc(100% + var(--bs-spacing-50));inset-inline:0;z-index:2;max-height:var(--bs-datepicker-menu-max-height);overflow-y:auto;border-radius:var(--bs-border-radius-100);background:var(--bs-surface-raised);box-shadow:var(--bs-shadow-md);--bs-menu-shadow:none}.bs-datepicker__menu bs-menu-item{--bs-menu-item-color:var(--bs-datepicker-color)}.bs-datepicker__menu bs-menu-item::part(label){flex:1;text-align:start}.bs-datepicker__option{display:flex;align-items:center;justify-content:space-between;gap:var(--bs-spacing-100)}.bs-datepicker__option svg{width:20px;height:20px;flex:none}.bs-datepicker__nav{display:flex;align-items:center;justify-content:space-between}.bs-datepicker__title{font-weight:var(--bs-font-weight-semibold);line-height:calc(var(--bs-datepicker-line-height) * 1px)}.bs-datepicker__nav-button{display:flex;align-items:center;justify-content:center;width:var(--bs-spacing-600);height:var(--bs-spacing-600);padding:0;border:none;border-radius:var(--bs-datepicker-day-radius);background:transparent;color:var(--bs-icon-default);cursor:pointer}.bs-datepicker__nav-button svg{width:24px;height:24px}.bs-datepicker__nav-button:hover{background:var(--bs-datepicker-hover)}.bs-datepicker__grid{display:flex;flex-direction:column;gap:var(--bs-datepicker-day-gap)}.bs-datepicker__row{display:grid;grid-template-columns:repeat(7, var(--bs-datepicker-day-size));justify-content:space-between}.bs-datepicker__weekday{display:flex;align-items:center;justify-content:center;height:var(--bs-datepicker-day-size);color:var(--bs-datepicker-color-weekday);font-size:var(--bs-datepicker-weekday-font-size);font-weight:var(--bs-font-weight-semibold);line-height:calc(var(--bs-datepicker-weekday-line-height) * 1px)}.bs-datepicker__cell{display:flex;justify-content:center}.bs-datepicker__cell--in-range{background:var(--bs-datepicker-range-bg);box-shadow:calc(var(--bs-datepicker-band-bridge) + 1px) 0 0 var(--bs-datepicker-range-bg)}.bs-datepicker__cell--band-start{border-start-start-radius:var(--bs-datepicker-day-radius);border-end-start-radius:var(--bs-datepicker-day-radius)}.bs-datepicker__cell--band-end{border-start-end-radius:var(--bs-datepicker-day-radius);border-end-end-radius:var(--bs-datepicker-day-radius);box-shadow:none}.bs-datepicker__day{width:var(--bs-datepicker-day-size);height:var(--bs-datepicker-day-size);padding:0;border:none;border-radius:var(--bs-datepicker-day-radius);background:transparent;color:var(--bs-datepicker-color);font-family:inherit;font-size:var(--bs-datepicker-font-size);line-height:calc(var(--bs-datepicker-line-height) * 1px);cursor:pointer}.bs-datepicker__day--outside{color:var(--bs-datepicker-color-muted)}.bs-datepicker__day--today{box-shadow:inset 0 0 0 1px var(--bs-datepicker-today-border)}.bs-datepicker__day:not(:disabled):hover{background:var(--bs-datepicker-hover)}.bs-datepicker__day:not(:disabled):active{background:var(--bs-datepicker-pressed)}.bs-datepicker__day--in-range:not(:disabled):hover,.bs-datepicker__day--in-range:not(:disabled):active{background:var(--bs-datepicker-range-bg)}.bs-datepicker__day--selected,.bs-datepicker__day--selected.bs-datepicker__day--outside{background:var(--bs-datepicker-selected-bg);color:var(--bs-datepicker-selected-color)}.bs-datepicker__day--selected:not(:disabled):hover{background:var(--bs-datepicker-selected-bg-hover)}.bs-datepicker__day--selected:not(:disabled):active{background:var(--bs-datepicker-selected-bg-pressed)}.bs-datepicker__day:disabled{color:var(--bs-datepicker-color-disabled);cursor:not-allowed}.bs-datepicker__day--selected:disabled{background:var(--bs-datepicker-selected-bg-disabled)}.bs-datepicker__day:focus-visible{background:var(--bs-datepicker-focus-bg);outline:2px solid var(--bs-datepicker-focus-ring-color);outline-offset:0}.bs-datepicker__day--selected:focus-visible{background:var(--bs-datepicker-selected-bg-focus)}.bs-datepicker__nav-button:focus-visible{outline:2px solid var(--bs-datepicker-focus-ring-color);outline-offset:2px}"}},[577,"bs-datepicker",{name:[513],range:[516],value:[1537],start:[1537],end:[1537],min:[1],max:[1],locale:[1],firstDayOfWeek:[2,"first-day-of-week"],startLabel:[1,"start-label"],endLabel:[1,"end-label"],monthLabel:[1,"month-label"],yearLabel:[1,"year-label"],previousLabel:[1,"previous-label"],nextLabel:[1,"next-label"],viewDate:[32],focusedIso:[32],hoverIso:[32],draft:[32],openMenu:[32]},void 0,{value:[{onSelectionChange:0},{onSelectionJump:0}],start:[{onSelectionChange:0},{onSelectionJump:0}],end:[{onSelectionChange:0}],range:[{onSelectionChange:0}],name:[{onSelectionChange:0}]}]);function b(e){return(e+"").padStart(2,"0")}function l(e){return`${e.getFullYear()}-${b(e.getMonth()+1)}-${b(e.getDate())}`}function h(e){const t=/^(\d{4})-(\d{2})-(\d{2})$/.exec((e??"").trim());if(!t)return;const a=new Date(Number(t[1]),Number(t[2])-1,Number(t[3]));return l(a)===`${t[1]}-${t[2]}-${t[3]}`?a:void 0}function p(e){return new Date(e.getFullYear(),e.getMonth(),1)}function u(e,t){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+t)}function k(){"undefined"!=typeof customElements&&["bs-datepicker","bs-card","bs-input","bs-menu","bs-menu-item"].forEach((t=>{switch(t){case"bs-datepicker":customElements.get(e(t))||customElements.define(e(t),c);break;case"bs-card":customElements.get(e(t))||r();break;case"bs-input":customElements.get(e(t))||n();break;case"bs-menu":customElements.get(e(t))||d();break;case"bs-menu-item":customElements.get(e(t))||o()}}))}k();const v=c,g=k;export{v as BsDatepicker,g as defineCustomElement}
|
|
1
|
+
import{t as e,p as t,H as a,c as s,h as i}from"./p-CVrEuVFo.js";import{d as r}from"./p-CA31vqjL.js";import{d as n}from"./p-DuLL7Ouw.js";import{d}from"./p-zTHlbyH6.js";import{d as o}from"./p-BUskqBR6.js";import{d as c}from"./p-CeUK3n7D.js";import{d as b}from"./p-C_j_jDM6.js";const l=t(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.bsChange=s(this,"bsChange"),this.internals=this.attachInternals()}get el(){return this}internals;initialValue="";initialStart="";initialEnd="";name;range=!1;value="";start="";end="";min;max;locale="en-GB";firstDayOfWeek=0;startLabel="Start date";endLabel="End date";monthLabel="Month";yearLabel="Year";previousLabel="Previous month";nextLabel="Next month";bsChange;viewDate=k(new Date);focusedIso="";hoverIso="";draft={};openMenu=null;shouldFocusDay=!1;menuToScroll=!1;componentWillLoad(){this.initialValue=this.value,this.initialStart=this.start,this.initialEnd=this.end,this.showSelection(),this.syncFormValue()}componentDidRender(){if(this.menuToScroll){this.menuToScroll=!1;const e=()=>{const e=this.el.shadowRoot?.querySelector(".bs-datepicker__menu"),t=e?.querySelector("[data-current]");e&&t&&(e.scrollTop=t.offsetTop-e.clientHeight/2+t.offsetHeight/2)};requestAnimationFrame((()=>requestAnimationFrame(e)))}if(!this.shouldFocusDay)return;this.shouldFocusDay=!1;const e=this.el.shadowRoot.querySelector(`[data-date="${this.focusedIso}"]`);e?.focus()}onSelectionChange(){this.syncFormValue()}onSelectionJump(){this.showSelection()}formResetCallback(){this.value=this.initialValue,this.start=this.initialStart,this.end=this.initialEnd,this.draft={}}showSelection(){const e=u(this.range?this.start:this.value);e&&(this.viewDate=k(e))}syncFormValue(){if(this.internals?.setFormValue)if(this.range){if(!this.name)return void this.internals.setFormValue(null);const e=new FormData;e.append(this.name+"-start",this.start??""),e.append(this.name+"-end",this.end??""),this.internals.setFormValue(e)}else this.internals.setFormValue(this.value??"")}isDisabled(e){const t=u(this.min),a=u(this.max);return!!t&&e<t||!!a&&e>a}selectDay(e){if(this.isDisabled(e))return;const t=h(e);if(e.getMonth()===this.viewDate.getMonth()&&e.getFullYear()===this.viewDate.getFullYear()||(this.viewDate=k(e)),this.focusedIso=t,!this.range)return this.value=t,void this.bsChange.emit({value:t});!this.start||this.end||t<this.start?(this.start=t,this.end=""):this.end=t,this.hoverIso="",this.draft={},this.bsChange.emit({start:this.start,end:this.end})}commitDraft(e){const t=this.draft[e];if(void 0===t)return;const a=u(t),s={...this.draft};if(delete s[e],this.draft=s,!a||this.isDisabled(a))return;let i="start"===e?h(a):this.start,r="end"===e?h(a):this.end;i&&r&&r<i&&("start"===e?r="":i=""),this.start=i,this.end=r,this.showSelection(),this.bsChange.emit({start:i,end:r})}moveView(e){const t=this.viewDate;this.viewDate=new Date(t.getFullYear(),t.getMonth()+e,1)}onKeyDown=(e,t)=>{const a={ArrowLeft:-1,ArrowRight:1,ArrowUp:-7,ArrowDown:7};let s;if(e.key in a)s=v(t,a[e.key]);else if("Home"===e.key||"End"===e.key){const a=(t.getDay()-this.safeFirstDay+7)%7;s=v(t,"Home"===e.key?-a:6-a)}else{if("PageUp"!==e.key&&"PageDown"!==e.key)return;{const a="PageUp"===e.key?-1:1;s=function(e,t){const a=new Date(e.getFullYear(),e.getMonth()+t,1),s=new Date(a.getFullYear(),a.getMonth()+1,0).getDate();return new Date(a.getFullYear(),a.getMonth(),Math.min(e.getDate(),s))}(t,e.shiftKey?12*a:a)}}e.preventDefault(),this.focusedIso=h(s),this.viewDate=k(s),this.shouldFocusDay=!0};get safeFirstDay(){const e=Math.trunc(Number(this.firstDayOfWeek));return Number.isFinite(e)?(e%7+7)%7:0}get fmt(){const e=this.locale||"en-GB";try{return e}catch{return"en-GB"}}formatField(e){const t=u(e);return t?new Intl.DateTimeFormat(this.fmt,{day:"numeric",month:"short",year:"numeric"}).format(t):""}titleText(){const e=this.range?void 0:u(this.value);return e?new Intl.DateTimeFormat(this.fmt,{day:"numeric",month:"long",year:"numeric"}).format(e):new Intl.DateTimeFormat(this.fmt,{month:"long",year:"numeric"}).format(this.viewDate)}monthOptions(){const e=new Intl.DateTimeFormat(this.fmt,{month:"long"});return Array.from({length:12},((t,a)=>({label:e.format(new Date(2e3,a,1)),value:a+""})))}yearOptions(){const e=this.viewDate.getFullYear(),t=u(this.min)?.getFullYear()??e-100,a=u(this.max)?.getFullYear()??e+100,s=[];for(let i=Math.min(t,e);i<=Math.max(a,e);i++)s.push({label:i+"",value:i+""});return s}weekdays(){const e=new Intl.DateTimeFormat(this.fmt,{weekday:"short"});return Array.from({length:7},((t,a)=>e.format(new Date(2023,0,1+(this.safeFirstDay+a)%7))))}gridDays(){const e=this.viewDate,t=(e.getDay()-this.safeFirstDay+7)%7,a=v(e,-t);return Array.from({length:42},((e,t)=>v(a,t)))}renderHeader(){if(this.range){const e=(e,t)=>i("bs-input",{label:t,placeholder:"YYYY-MM-DD",value:this.draft[e]??this.formatField(this[e]),onBsInput:t=>this.draft={...this.draft,[e]:t.detail},onBsChange:()=>this.commitDraft(e),onFocusin:()=>{void 0===this.draft[e]&&(this.draft={...this.draft,[e]:this[e]})},onFocusout:()=>this.commitDraft(e)});return i("div",{part:"header",class:"bs-datepicker__header bs-datepicker__header--range"},e("start",this.startLabel),e("end",this.endLabel))}return i("div",{part:"header",class:"bs-datepicker__header"},this.renderDropdown("month",this.monthLabel,this.monthOptions(),this.viewDate.getMonth()+"",(e=>this.viewDate=new Date(this.viewDate.getFullYear(),Number(e),1))),this.renderDropdown("year",this.yearLabel,this.yearOptions(),this.viewDate.getFullYear()+"",(e=>this.viewDate=new Date(Number(e),this.viewDate.getMonth(),1))))}renderDropdown(e,t,a,s,r){const n=this.openMenu===e,d=()=>{this.openMenu=null};return i("div",{class:"bs-datepicker__dropdown",onKeyDown:e=>{"Escape"===e.key&&n&&(d(),e.currentTarget.querySelector("bs-input")?.focus())},onFocusout:e=>{const t=e.relatedTarget;!n||t&&e.currentTarget.contains(t)||d()}},i("bs-input",{type:"dropdown",class:"bs-datepicker__select",label:t,value:a.find((e=>e.value===s))?.label??"",open:n,onBsOpen:()=>{this.menuToScroll=!n,this.openMenu=n?null:e}}),n&&i("bs-menu",{part:"menu",class:"bs-datepicker__menu",role:"listbox"},a.map((e=>i("bs-menu-item",{key:e.value,"data-current":e.value===s?"":void 0,"aria-current":e.value===s?"true":void 0,onBsSelect:()=>{r(e.value),d(),this.el.shadowRoot.querySelector(`.bs-datepicker__dropdown bs-input[label="${t}"]`)?.focus()}},i("span",{class:"bs-datepicker__option"},i("span",null,e.label),e.value===s&&i("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},i("path",{d:"M5 12.5L10 17.5L19 7.5",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))))))))}render(){const e=this.gridDays(),t=h(new Date),a=this.range?this.start:this.value,s=this.range?this.end:"",r=this.range&&this.start&&!this.end&&this.hoverIso>this.start?this.hoverIso:s,n=e.some((e=>h(e)===this.focusedIso&&e.getMonth()===this.viewDate.getMonth()))?this.focusedIso:this.defaultTabbable(e),d=e=>!!a&&!!r&&e>a&&e<r,o=this.weekdays();return i("bs-card",{key:"cd66b2bc8f611383ea5df6d01e29b03a940bc06b",part:"container",class:"bs-datepicker",surface:"raised"},i("div",{key:"7020d13ee4ea5f05c2548966cb56c20b59eb067b",class:"bs-datepicker__body"},this.renderHeader(),i("div",{key:"4ed03f1fb642d2a3a226a27e6e86001a478eab4c",part:"nav",class:"bs-datepicker__nav"},i("button",{key:"e844a021afa02f834026ebb4237f5b2f5b9d1a4c",part:"prev",type:"button",class:"bs-datepicker__nav-button","aria-label":this.previousLabel,onClick:()=>this.moveView(-1)},i("svg",{key:"f68be6b62a9deb6334b63c6e7152b4968ebdbeab",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},i("path",{key:"a7ee70143ce7b839c44483c1d15daf2714306bf7",d:"M15 18L9 12L15 6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))),i("div",{key:"7eb7fd38ca59a4a6ba9692180bcd5096f54ac783",part:"title",class:"bs-datepicker__title","aria-live":"polite"},this.titleText()),i("button",{key:"1e515d27746a10acfe9f04f08c4a09753cb5b98b",part:"next",type:"button",class:"bs-datepicker__nav-button","aria-label":this.nextLabel,onClick:()=>this.moveView(1)},i("svg",{key:"f5dde56a61d31b93aa9877b0fc473264d40305ba",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},i("path",{key:"765b53c7f7e8618618622a5121ecab294610bf8a",d:"M9 18L15 12L9 6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})))),i("div",{key:"e56fa1a425055d77ae04039890758b823f14ee8d",part:"grid",class:"bs-datepicker__grid",role:"grid","aria-label":this.titleText()},i("div",{key:"2471a9291aa29111217aaaa1f02f2cfc8861e49e",class:"bs-datepicker__row",role:"row"},o.map((e=>i("div",{part:"weekday",class:"bs-datepicker__weekday",role:"columnheader"},e)))),Array.from({length:6},((r,o)=>{const c=e.slice(7*o,7*o+7);return i("div",{class:"bs-datepicker__row",role:"row"},c.map(((e,r)=>{const o=h(e),b=e.getMonth()!==this.viewDate.getMonth(),l=o===a||!!s&&o===s,p=d(o),u={"bs-datepicker__cell":!0,"bs-datepicker__cell--in-range":p,"bs-datepicker__cell--band-start":p&&!(r>0&&d(h(c[r-1]))),"bs-datepicker__cell--band-end":p&&!(r<6&&d(h(c[r+1])))},k=["day",l&&"selected",p&&"in-range",b&&"outside",o===t&&"today"].filter(Boolean).join(" ");return i("div",{class:u,role:"gridcell","aria-selected":l||p?"true":"false"},i("button",{part:k,type:"button",class:{"bs-datepicker__day":!0,"bs-datepicker__day--selected":l,"bs-datepicker__day--in-range":p,"bs-datepicker__day--outside":b,"bs-datepicker__day--today":o===t},"data-date":o,tabindex:o===n?0:-1,disabled:this.isDisabled(e),"aria-current":o===t?"date":void 0,"aria-label":new Intl.DateTimeFormat(this.fmt,{weekday:"long",day:"2-digit",month:"long",year:"numeric"}).format(e),onClick:()=>this.selectDay(e),onKeyDown:t=>this.onKeyDown(t,e),onMouseEnter:()=>{this.range&&this.start&&!this.end&&(this.hoverIso=o)}},(e.getDate()+"").padStart(2,"0")))})))})))))}defaultTabbable(e){const t=t=>e.some((e=>h(e)===t&&e.getMonth()===this.viewDate.getMonth())),a=this.range?this.start:this.value;if(a&&t(a))return a;const s=h(new Date);return t(s)?s:h(this.viewDate)}static get formAssociated(){return!0}static get watchers(){return{value:[{onSelectionChange:0},{onSelectionJump:0}],start:[{onSelectionChange:0},{onSelectionJump:0}],end:[{onSelectionChange:0}],range:[{onSelectionChange:0}],name:[{onSelectionChange:0}]}}static get style(){return":host{display:inline-block;--bs-datepicker-width:364px;--bs-datepicker-bg:var(--bs-paper-bg-raised);--bs-datepicker-radius:var(--bs-border-radius-150);--bs-datepicker-padding:var(--bs-spacing-200);--bs-datepicker-gap:var(--bs-spacing-150);--bs-datepicker-shadow:var(--bs-shadow-md);--bs-datepicker-menu-max-height:280px;--bs-datepicker-day-size:var(--bs-spacing-550);--bs-datepicker-day-radius:var(--bs-border-radius-100);--bs-datepicker-day-gap:var(--bs-spacing-50);--bs-datepicker-band-bridge:var(--bs-spacing-50);--bs-datepicker-font-size:var(--bs-font-size-md);--bs-datepicker-line-height:var(--bs-line-height-body-md);--bs-datepicker-weekday-font-size:var(--bs-font-size-sm);--bs-datepicker-weekday-line-height:var(--bs-line-height-body-sm);--bs-datepicker-color:var(--bs-text-default);--bs-datepicker-color-muted:var(--bs-text-muted);--bs-datepicker-color-weekday:var(--bs-text-secondary);--bs-datepicker-color-disabled:var(--bs-text-on-disabled);--bs-datepicker-hover:var(--bs-surface-hover);--bs-datepicker-pressed:var(--bs-surface-pressed);--bs-datepicker-focus-bg:var(--bs-surface-focus);--bs-datepicker-selected-bg:var(--bs-color-primary-default);--bs-datepicker-selected-bg-hover:var(--bs-color-primary-hover);--bs-datepicker-selected-bg-pressed:var(--bs-color-primary-pressed);--bs-datepicker-selected-bg-focus:var(--bs-color-primary-focused);--bs-datepicker-selected-bg-disabled:var(--bs-surface-action-disabled);--bs-datepicker-selected-color:var(--bs-text-on-action);--bs-datepicker-range-bg:var(--bs-color-primary-container);--bs-datepicker-today-border:var(--bs-border-primary);--bs-datepicker-focus-ring-color:var(--bs-border-neutral-focus)}.bs-datepicker{width:var(--bs-datepicker-width);max-width:100%;color:var(--bs-datepicker-color);font-size:var(--bs-datepicker-font-size);--bs-card-bg:var(--bs-datepicker-bg);--bs-card-radius:var(--bs-datepicker-radius);--bs-card-padding:var(--bs-datepicker-padding);--bs-card-shadow:var(--bs-datepicker-shadow);--bs-card-overflow:visible}.bs-datepicker__body{display:flex;flex-direction:column;gap:var(--bs-datepicker-gap)}.bs-datepicker__header{display:flex;align-items:flex-start;gap:var(--bs-spacing-100)}.bs-datepicker__header--range>bs-input{--bs-input-label-font-size:var(--bs-font-size-md);--bs-input-label-font-weight:var(--bs-font-weight-semibold);--bs-input-label-line-height:calc(var(--bs-line-height-body-md) * 1px)}.bs-datepicker__header>bs-input{flex:1 1 0;min-width:0}.bs-datepicker__select::part(label){position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.bs-datepicker__dropdown{position:relative;flex:1 1 0;min-width:0}.bs-datepicker__dropdown bs-input{width:100%}.bs-datepicker__menu{position:absolute;top:calc(100% + var(--bs-spacing-50));inset-inline:0;z-index:2;max-height:var(--bs-datepicker-menu-max-height);overflow-y:auto;border-radius:var(--bs-border-radius-100);background:var(--bs-surface-raised);box-shadow:var(--bs-shadow-md);--bs-menu-shadow:none}.bs-datepicker__menu bs-menu-item{--bs-menu-item-color:var(--bs-datepicker-color)}.bs-datepicker__menu bs-menu-item::part(label){flex:1;text-align:start}.bs-datepicker__option{display:flex;align-items:center;justify-content:space-between;gap:var(--bs-spacing-100)}.bs-datepicker__option svg{width:20px;height:20px;flex:none}.bs-datepicker__nav{display:flex;align-items:center;justify-content:space-between}.bs-datepicker__title{font-weight:var(--bs-font-weight-semibold);line-height:calc(var(--bs-datepicker-line-height) * 1px)}.bs-datepicker__nav-button{display:flex;align-items:center;justify-content:center;width:var(--bs-spacing-600);height:var(--bs-spacing-600);padding:0;border:none;border-radius:var(--bs-datepicker-day-radius);background:transparent;color:var(--bs-icon-default);cursor:pointer}.bs-datepicker__nav-button svg{width:24px;height:24px}.bs-datepicker__nav-button:hover{background:var(--bs-datepicker-hover)}.bs-datepicker__grid{display:flex;flex-direction:column;gap:var(--bs-datepicker-day-gap)}.bs-datepicker__row{display:grid;grid-template-columns:repeat(7, var(--bs-datepicker-day-size));justify-content:space-between}.bs-datepicker__weekday{display:flex;align-items:center;justify-content:center;height:var(--bs-datepicker-day-size);color:var(--bs-datepicker-color-weekday);font-size:var(--bs-datepicker-weekday-font-size);font-weight:var(--bs-font-weight-semibold);line-height:calc(var(--bs-datepicker-weekday-line-height) * 1px)}.bs-datepicker__cell{display:flex;justify-content:center}.bs-datepicker__cell--in-range{background:var(--bs-datepicker-range-bg);box-shadow:calc(var(--bs-datepicker-band-bridge) + 1px) 0 0 var(--bs-datepicker-range-bg)}.bs-datepicker__cell--band-start{border-start-start-radius:var(--bs-datepicker-day-radius);border-end-start-radius:var(--bs-datepicker-day-radius)}.bs-datepicker__cell--band-end{border-start-end-radius:var(--bs-datepicker-day-radius);border-end-end-radius:var(--bs-datepicker-day-radius);box-shadow:none}.bs-datepicker__day{width:var(--bs-datepicker-day-size);height:var(--bs-datepicker-day-size);padding:0;border:none;border-radius:var(--bs-datepicker-day-radius);background:transparent;color:var(--bs-datepicker-color);font-family:inherit;font-size:var(--bs-datepicker-font-size);line-height:calc(var(--bs-datepicker-line-height) * 1px);cursor:pointer}.bs-datepicker__day--outside{color:var(--bs-datepicker-color-muted)}.bs-datepicker__day--today{box-shadow:inset 0 0 0 1px var(--bs-datepicker-today-border)}.bs-datepicker__day:not(:disabled):hover{background:var(--bs-datepicker-hover)}.bs-datepicker__day:not(:disabled):active{background:var(--bs-datepicker-pressed)}.bs-datepicker__day--in-range:not(:disabled):hover,.bs-datepicker__day--in-range:not(:disabled):active{background:var(--bs-datepicker-range-bg)}.bs-datepicker__day--selected,.bs-datepicker__day--selected.bs-datepicker__day--outside{background:var(--bs-datepicker-selected-bg);color:var(--bs-datepicker-selected-color)}.bs-datepicker__day--selected:not(:disabled):hover{background:var(--bs-datepicker-selected-bg-hover)}.bs-datepicker__day--selected:not(:disabled):active{background:var(--bs-datepicker-selected-bg-pressed)}.bs-datepicker__day:disabled{color:var(--bs-datepicker-color-disabled);cursor:not-allowed}.bs-datepicker__day--selected:disabled{background:var(--bs-datepicker-selected-bg-disabled)}.bs-datepicker__day:focus-visible{background:var(--bs-datepicker-focus-bg);outline:2px solid var(--bs-datepicker-focus-ring-color);outline-offset:0}.bs-datepicker__day--selected:focus-visible{background:var(--bs-datepicker-selected-bg-focus)}.bs-datepicker__nav-button:focus-visible{outline:2px solid var(--bs-datepicker-focus-ring-color);outline-offset:2px}"}},[577,"bs-datepicker",{name:[513],range:[516],value:[1537],start:[1537],end:[1537],min:[1],max:[1],locale:[1],firstDayOfWeek:[2,"first-day-of-week"],startLabel:[1,"start-label"],endLabel:[1,"end-label"],monthLabel:[1,"month-label"],yearLabel:[1,"year-label"],previousLabel:[1,"previous-label"],nextLabel:[1,"next-label"],viewDate:[32],focusedIso:[32],hoverIso:[32],draft:[32],openMenu:[32]},void 0,{value:[{onSelectionChange:0},{onSelectionJump:0}],start:[{onSelectionChange:0},{onSelectionJump:0}],end:[{onSelectionChange:0}],range:[{onSelectionChange:0}],name:[{onSelectionChange:0}]}]);function p(e){return(e+"").padStart(2,"0")}function h(e){return`${e.getFullYear()}-${p(e.getMonth()+1)}-${p(e.getDate())}`}function u(e){const t=/^(\d{4})-(\d{2})-(\d{2})$/.exec((e??"").trim());if(!t)return;const a=new Date(Number(t[1]),Number(t[2])-1,Number(t[3]));return h(a)===`${t[1]}-${t[2]}-${t[3]}`?a:void 0}function k(e){return new Date(e.getFullYear(),e.getMonth(),1)}function v(e,t){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+t)}function g(){"undefined"!=typeof customElements&&["bs-datepicker","bs-card","bs-chip-informative","bs-icon-button","bs-input","bs-menu","bs-menu-item"].forEach((t=>{switch(t){case"bs-datepicker":customElements.get(e(t))||customElements.define(e(t),l);break;case"bs-card":customElements.get(e(t))||r();break;case"bs-chip-informative":customElements.get(e(t))||n();break;case"bs-icon-button":customElements.get(e(t))||d();break;case"bs-input":customElements.get(e(t))||o();break;case"bs-menu":customElements.get(e(t))||c();break;case"bs-menu-item":customElements.get(e(t))||b()}}))}g();const f=l,m=g;export{f as BsDatepicker,m as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as
|
|
1
|
+
import{B as s,d as o}from"./p-BUskqBR6.js";const p=s,r=o;export{p as BsInput,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as s,t,p as e,H as i,c as o}from"./p-CVrEuVFo.js";import{d as n}from"./p-Dr0Qk9Zc.js";import{d as a}from"./p-qmS2CBqi.js";import{d as r}from"./p-CA31vqjL.js";import{d as b}from"./p-CncySD_-.js";import{d as c}from"./p-B_I4UEMp.js";import{d as l}from"./p-CeUK3n7D.js";import{d}from"./p-C_j_jDM6.js";import{d as u}from"./p-CbimDNGY.js";const m=e(class extends i{constructor(s){super(),!1!==s&&this.__registerHost(),this.__attachShadow(),this.bsPrimary=o(this,"bsPrimary"),this.bsSecondary=o(this,"bsSecondary"),this.bsAlternative=o(this,"bsAlternative"),this.bsCancel=o(this,"bsCancel"),this.bsExpire=o(this,"bsExpire")}get el(){return this}type="warning";heading;headingLevel=2;description;hideIcon=!1;primaryLabel;secondaryLabel;secondsLeft=0;totalSeconds=0;countdown=!1;timeLeftLabel="minutes left";secondsLeftLabel="seconds left";savedMessage;accountName;accountEmail;accountInitials;passwordLabel="Password";passwordError;dividerLabel="or";alternatives=[{id:"passkey",label:"Use passkey",icon:"fingerprint"},{id:"bankid",label:"Use BankID",icon:"key"}];cancelLabel="Cancel";bsPrimary;bsSecondary;bsAlternative;bsCancel;bsExpire;password="";announcement="";initialTotal=0;timer;componentWillLoad(){this.initialTotal=this.secondsLeft}componentDidLoad(){this.syncTimer()}disconnectedCallback(){this.stopTimer()}connectedCallback(){void 0===this.timer&&this.el.isConnected&&this.syncTimer()}onTimerInputsChange(){this.syncTimer()}stopTimer(){void 0!==this.timer&&clearInterval(this.timer),this.timer=void 0}syncTimer(){this.stopTimer(),!this.countdown||"warning"!==this.type||this.secondsLeft<=0||(this.timer=setInterval((()=>this.tick()),1e3))}tick(){this.secondsLeft<=0||(this.secondsLeft=this.secondsLeft-1,[60,30,10].includes(this.secondsLeft)&&(this.announcement=`${h(this.secondsLeft)} ${this.secondsLeft>=60?this.timeLeftLabel:this.secondsLeftLabel}`),this.secondsLeft<=0&&(this.stopTimer(),this.bsExpire.emit()))}get defaults(){return w[this.type]??w.warning}renderHeading(t,e){const i=Math.min(6,Math.max(1,Math.trunc(Number(this.headingLevel))||2));return s("div",{class:"bs-session-timeout__heading-group"},s("h"+i,{part:"heading",id:"heading",class:{"bs-session-timeout__heading":!0}},t),e&&s("p",{part:"description",class:"bs-session-timeout__description"},e))}renderWarning(){const t=this.totalSeconds>0?this.totalSeconds:this.initialTotal||this.secondsLeft,e=t>0?Math.max(0,Math.min(100,this.secondsLeft/t*100)):0,i=this.secondsLeft>=60?this.timeLeftLabel:this.secondsLeftLabel;return s("div",{part:"countdown",class:"bs-session-timeout__countdown"},s("div",{class:"bs-session-timeout__time-row"},s("span",{part:"time",class:"bs-session-timeout__time",role:"timer"},h(this.secondsLeft)),s("span",{class:"bs-session-timeout__unit"},i)),s("bs-progress-linear",{type:"determinate",size:"large",value:e,showLabel:!1,ariaLabel:`${h(this.secondsLeft)} ${i}`}))}renderAccount(){const t=this.accountName??"",e=this.accountInitials??t.split(/\s+/).filter(Boolean).slice(0,2).map((s=>s[0].toUpperCase())).join("");return t||this.accountEmail?s("div",{part:"account",class:"bs-session-timeout__account"},s("bs-avatar",{type:"initials",size:"lg",initials:e,ariaLabel:t||this.accountEmail}),s("div",{class:"bs-session-timeout__account-text"},t&&s("span",{class:"bs-session-timeout__account-name"},t),this.accountEmail&&s("span",{class:"bs-session-timeout__account-email"},this.accountEmail))):null}renderConfirm(){const t=this.alternatives??[];return[s("bs-input",{part:"password",class:"bs-session-timeout__password",type:"password",label:this.passwordLabel,value:this.password,error:this.passwordError,onBsInput:s=>this.password=s.detail,onBsChange:s=>this.password=s.detail}),s("bs-button",{part:"primary",class:"bs-session-timeout__block-button",variant:"primary",onClick:()=>this.bsPrimary.emit({password:this.password})},this.primaryLabel??this.defaults.primary),t.length>0&&s("div",{part:"divider",class:"bs-session-timeout__divider",role:"separator"},s("span",{class:"bs-session-timeout__rule"}),s("span",{class:"bs-session-timeout__divider-label"},this.dividerLabel),s("span",{class:"bs-session-timeout__rule"})),t.length>0&&s("div",{part:"alternatives",class:"bs-session-timeout__alternatives"},t.map((t=>s("bs-button",{key:t.id,variant:"outlined",onClick:()=>this.bsAlternative.emit({id:t.id})},s("key"===t.icon?_:v,{slot:"icon"}),t.label)))),this.cancelLabel&&s("bs-button",{part:"cancel",class:"bs-session-timeout__block-button bs-session-timeout__text-button",variant:"subtle",size:"lg",onClick:()=>this.bsCancel.emit()},this.cancelLabel)]}render(){const t=this.defaults,e=this.heading??t.heading,i=this.description??t.description,o=this.primaryLabel??t.primary,n=this.secondaryLabel??t.secondary;return s("bs-card",{key:"45a056eabc2f536128ee6adbc6104d76793301f4",part:"container",class:"bs-session-timeout",surface:"base",role:"region","aria-labelledby":"heading"},s("div",{key:"035795cb4b5b0252212270236f048e3216d5d401",class:"bs-session-timeout__body"},!this.hideIcon&&s("bs-icon-tile",{key:"857db99f58d07483d3c7dadd95e5951a645d0c59",part:"art",intent:t.intent,size:"lg"},s("slot",{key:"41504daf4751677d9b1df0d211e719d8f441f5b2",name:"icon"},t.glyph())),this.renderHeading(e,i),"warning"===this.type&&this.renderWarning(),"warning"===this.type&&this.savedMessage&&s("p",{key:"8ba10b3921db4b3cedbeb3d45bddfb89425bbdbb",part:"saved",class:"bs-session-timeout__saved"},s(y,{key:"44ea938fca553c67ae23628833471ceb98e63b06"}),s("span",{key:"672ebc96828437ffbc67711082fd7018611153b7"},this.savedMessage)),"signed-out"===this.type&&this.renderAccount(),"confirm-identity"===this.type&&this.renderConfirm(),"warning"===this.type&&(o||n)&&s("div",{key:"94221156fe30010bd0fbe4fb0146c95feceab50f",part:"actions",class:"bs-session-timeout__actions"},n&&s("bs-button",{key:"09b14d30bc185a4644902e52100f0493da6109a0",part:"secondary",variant:"outlined",onClick:()=>this.bsSecondary.emit()},n),o&&s("bs-button",{key:"be381ed4be453efd306b28da3e1f4b7f0740c024",part:"primary",variant:"primary",onClick:()=>this.bsPrimary.emit()},o)),"signed-out"===this.type&&(o||n)&&s("div",{key:"6b3b3622809165f70d83c68db409e2373ea1008e",part:"actions",class:"bs-session-timeout__actions bs-session-timeout__actions--stacked"},o&&s("bs-button",{key:"f03d85c00ce0c18e14e26d2b4332ddb987b93f9e",part:"primary",class:"bs-session-timeout__block-button",variant:"primary",onClick:()=>this.bsPrimary.emit()},o),n&&s("bs-button",{key:"a9bf95d13955110f7f36561b9acc3c89a5862de5",part:"secondary",class:"bs-session-timeout__text-button",variant:"subtle",size:"lg",onClick:()=>this.bsSecondary.emit()},n)),s("div",{key:"69ada1eed62f93587b2c2f45aa1d3ea933ba682f",class:"bs-session-timeout__sr-only",role:"status","aria-live":"polite"},this.announcement)))}static get watchers(){return{countdown:[{onTimerInputsChange:0}],type:[{onTimerInputsChange:0}]}}static get style(){return":host{display:block;width:var(--bs-session-timeout-width);min-width:var(--bs-session-timeout-min-width);max-width:var(--bs-session-timeout-max-width);--bs-session-timeout-width:440px;--bs-session-timeout-min-width:380px;--bs-session-timeout-max-width:560px;--bs-session-timeout-bg:var(--bs-paper-bg-base);--bs-session-timeout-radius:var(--bs-border-radius-150);--bs-session-timeout-padding:var(--bs-spacing-200);--bs-session-timeout-gap:var(--bs-spacing-150);--bs-session-timeout-shadow:0 8px 8px var(--bs-elevation-higher);--bs-session-timeout-color:var(--bs-text-default);--bs-session-timeout-color-secondary:var(--bs-text-secondary);--bs-session-timeout-countdown-bg:var(--bs-surface-container);--bs-session-timeout-countdown-fill:var(--bs-color-warning-default);--bs-session-timeout-countdown-track:var(--bs-surface-hover);--bs-session-timeout-rule:var(--bs-border-default)}.bs-session-timeout{--bs-card-bg:var(--bs-session-timeout-bg);--bs-card-radius:var(--bs-session-timeout-radius);--bs-card-padding:var(--bs-session-timeout-padding);--bs-card-shadow:var(--bs-session-timeout-shadow);color:var(--bs-session-timeout-color)}.bs-session-timeout__body{display:flex;flex-direction:column;align-items:stretch;gap:var(--bs-session-timeout-gap)}bs-icon-tile{align-self:flex-start}.bs-session-timeout__glyph,::slotted([slot='icon']){width:24px;height:24px}.bs-session-timeout__heading-group{display:flex;flex-direction:column;gap:6px}.bs-session-timeout__heading{margin:0;font-size:var(--bs-font-size-2xl);font-weight:var(--bs-font-weight-bold);line-height:32px}.bs-session-timeout__description{margin:0;color:var(--bs-session-timeout-color-secondary);font-size:var(--bs-font-size-md);line-height:24px}.bs-session-timeout__countdown{display:flex;flex-direction:column;gap:var(--bs-spacing-100);padding:var(--bs-spacing-200);border-radius:var(--bs-border-radius-100);background:var(--bs-session-timeout-countdown-bg)}.bs-session-timeout__countdown bs-progress-linear{--bs-progress-linear-fill:var(--bs-session-timeout-countdown-fill);--bs-progress-linear-track:var(--bs-session-timeout-countdown-track)}.bs-session-timeout__time-row{display:flex;align-items:flex-end;gap:var(--bs-spacing-100)}.bs-session-timeout__time{font-size:var(--bs-font-size-3xl);font-weight:var(--bs-font-weight-bold);line-height:40px;font-variant-numeric:tabular-nums}.bs-session-timeout__unit{padding-bottom:6px;color:var(--bs-session-timeout-color-secondary);font-size:var(--bs-font-size-sm);line-height:20px}.bs-session-timeout__saved{display:flex;align-items:center;gap:var(--bs-spacing-100);margin:0;color:var(--bs-session-timeout-color-secondary);font-size:var(--bs-font-size-sm);line-height:20px}.bs-session-timeout__saved-icon{flex:none;width:16px;height:16px}.bs-session-timeout__actions{display:flex;align-items:center;justify-content:flex-end;gap:var(--bs-spacing-100)}.bs-session-timeout__actions bs-button,.bs-session-timeout__alternatives bs-button,.bs-session-timeout__block-button{--bs-button-height-md:var(--bs-spacing-550)}.bs-session-timeout__account{display:flex;align-items:center;gap:var(--bs-spacing-200);padding:var(--bs-spacing-150) var(--bs-spacing-200);border:1px solid var(--bs-session-timeout-rule);border-radius:var(--bs-border-radius-100)}.bs-session-timeout__account-text{display:flex;flex-direction:column;gap:var(--bs-spacing-25);min-width:0;line-height:24px}.bs-session-timeout__account-name{font-weight:var(--bs-font-weight-semibold)}.bs-session-timeout__account-email{overflow-wrap:anywhere}.bs-session-timeout__actions--stacked{flex-direction:column;align-items:stretch;justify-content:flex-start}.bs-session-timeout__block-button,.bs-session-timeout__alternatives bs-button,.bs-session-timeout__actions--stacked bs-button{--bs-button-width:100%}.bs-session-timeout__text-button{--bs-button-subtle-color:var(--bs-text-action);--bs-button-height-lg:var(--bs-spacing-600)}.bs-session-timeout__password{display:block;--bs-input-label-font-size:var(--bs-font-size-md);--bs-input-label-font-weight:var(--bs-font-weight-semibold);--bs-input-label-line-height:calc(var(--bs-line-height-body-md) * 1px);margin-bottom:calc(var(--bs-spacing-200) - var(--bs-session-timeout-gap))}.bs-session-timeout__divider{display:flex;align-items:center;gap:var(--bs-spacing-100);align-self:center;width:320px;max-width:100%;color:var(--bs-session-timeout-color-secondary);font-size:var(--bs-font-size-xs);line-height:16px}.bs-session-timeout__rule{flex:1 1 0;height:1px;background:var(--bs-session-timeout-rule)}.bs-session-timeout__alternatives{display:grid;grid-template-columns:repeat(auto-fit, minmax(0, 1fr));gap:var(--bs-spacing-100)}.bs-session-timeout__sr-only{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}"}},[769,"bs-session-timeout",{type:[513],heading:[1],headingLevel:[2,"heading-level"],description:[1],hideIcon:[4,"hide-icon"],primaryLabel:[1,"primary-label"],secondaryLabel:[1,"secondary-label"],secondsLeft:[1026,"seconds-left"],totalSeconds:[2,"total-seconds"],countdown:[4],timeLeftLabel:[1,"time-left-label"],secondsLeftLabel:[1,"seconds-left-label"],savedMessage:[1,"saved-message"],accountName:[1,"account-name"],accountEmail:[1,"account-email"],accountInitials:[1,"account-initials"],passwordLabel:[1,"password-label"],passwordError:[1,"password-error"],dividerLabel:[1,"divider-label"],alternatives:[16],cancelLabel:[1,"cancel-label"],password:[32],announcement:[32],initialTotal:[32]},void 0,{countdown:[{onTimerInputsChange:0}],type:[{onTimerInputsChange:0}]}]);function h(s){const t=Math.max(0,Math.trunc(Number(s))||0);return`${Math.floor(t/60)}:${function(s){return(s+"").padStart(2,"0")}(t%60)}`}const p=t=>e=>s("svg",{class:"bs-session-timeout__glyph",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",...e},t),g=p(s("g",null,s("circle",{cx:"12",cy:"13.5",r:"7"}),s("path",{d:"M12 10V13.5L14 15"}),s("path",{d:"M9.5 3.5H14.5"}))),f=p(s("g",null,s("rect",{x:"5",y:"10.5",width:"14",height:"9.5",rx:"1.5"}),s("path",{d:"M8.5 10.5V8A3.5 3.5 0 0 1 15.5 8V10.5"}))),v=p(s("g",null,s("path",{d:"M6 10A6 6 0 0 1 18 10"}),s("path",{d:"M9 20C10 18 10 16 10 13A2 2 0 0 1 14 13C14 16 13.5 18.5 12.5 20.5"}),s("path",{d:"M6 13C6 15.5 5.5 17.5 4.5 19.5"}),s("path",{d:"M18 13C18 15.5 17.5 18 16.5 20"}),s("path",{d:"M12 13C12 15 11.5 17 10.8 18.5"}))),_=p(s("g",null,s("circle",{cx:"8",cy:"15",r:"4"}),s("path",{d:"M11 12L19.5 3.5"}),s("path",{d:"M16 7L19 10"}))),y=()=>s("svg",{class:"bs-session-timeout__saved-icon",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.3","stroke-linecap":"round","aria-hidden":"true"},s("circle",{cx:"8",cy:"8",r:"6.2"}),s("path",{d:"M8 7.2V11"}),s("path",{d:"M8 5V5.1"})),w={warning:{intent:"warning",heading:"You’ll be signed out soon",description:"For your security, we sign you out after a period without activity.",primary:"Stay signed in",secondary:"Sign out now",glyph:()=>s(g,null)},"signed-out":{intent:"default",heading:"You’ve been signed out",description:"You were inactive for a while. Your work was saved and will be there when you sign in.",primary:"Sign in again",secondary:"Use a different account",glyph:()=>s(f,null)},"confirm-identity":{intent:"default",heading:"Confirm it’s you",description:"This action needs a fresh sign-in.",primary:"Confirm",secondary:"",glyph:()=>s(v,null)}};function x(){"undefined"!=typeof customElements&&["bs-session-timeout","bs-avatar","bs-button","bs-card","bs-icon-tile","bs-input","bs-menu","bs-menu-item","bs-progress-linear"].forEach((s=>{switch(s){case"bs-session-timeout":customElements.get(t(s))||customElements.define(t(s),m);break;case"bs-avatar":customElements.get(t(s))||n();break;case"bs-button":customElements.get(t(s))||a();break;case"bs-card":customElements.get(t(s))||r();break;case"bs-icon-tile":customElements.get(t(s))||b();break;case"bs-input":customElements.get(t(s))||c();break;case"bs-menu":customElements.get(t(s))||l();break;case"bs-menu-item":customElements.get(t(s))||d();break;case"bs-progress-linear":customElements.get(t(s))||u()}}))}x();const k=m,C=x;export{k as BsSessionTimeout,C as defineCustomElement}
|
|
1
|
+
import{h as s,t,p as e,H as i,c as o}from"./p-CVrEuVFo.js";import{d as n}from"./p-Dr0Qk9Zc.js";import{d as a}from"./p-qmS2CBqi.js";import{d as r}from"./p-CA31vqjL.js";import{d as b}from"./p-DuLL7Ouw.js";import{d as c}from"./p-zTHlbyH6.js";import{d as l}from"./p-CncySD_-.js";import{d}from"./p-BUskqBR6.js";import{d as u}from"./p-CeUK3n7D.js";import{d as m}from"./p-C_j_jDM6.js";import{d as h}from"./p-CbimDNGY.js";const p=e(class extends i{constructor(s){super(),!1!==s&&this.__registerHost(),this.__attachShadow(),this.bsPrimary=o(this,"bsPrimary"),this.bsSecondary=o(this,"bsSecondary"),this.bsAlternative=o(this,"bsAlternative"),this.bsCancel=o(this,"bsCancel"),this.bsExpire=o(this,"bsExpire")}get el(){return this}type="warning";heading;headingLevel=2;description;hideIcon=!1;primaryLabel;secondaryLabel;secondsLeft=0;totalSeconds=0;countdown=!1;timeLeftLabel="minutes left";secondsLeftLabel="seconds left";savedMessage;accountName;accountEmail;accountInitials;passwordLabel="Password";passwordError;dividerLabel="or";alternatives=[{id:"passkey",label:"Use passkey",icon:"fingerprint"},{id:"bankid",label:"Use BankID",icon:"key"}];cancelLabel="Cancel";bsPrimary;bsSecondary;bsAlternative;bsCancel;bsExpire;password="";announcement="";initialTotal=0;timer;componentWillLoad(){this.initialTotal=this.secondsLeft}componentDidLoad(){this.syncTimer()}disconnectedCallback(){this.stopTimer()}connectedCallback(){void 0===this.timer&&this.el.isConnected&&this.syncTimer()}onTimerInputsChange(){this.syncTimer()}stopTimer(){void 0!==this.timer&&clearInterval(this.timer),this.timer=void 0}syncTimer(){this.stopTimer(),!this.countdown||"warning"!==this.type||this.secondsLeft<=0||(this.timer=setInterval((()=>this.tick()),1e3))}tick(){this.secondsLeft<=0||(this.secondsLeft=this.secondsLeft-1,[60,30,10].includes(this.secondsLeft)&&(this.announcement=`${g(this.secondsLeft)} ${this.secondsLeft>=60?this.timeLeftLabel:this.secondsLeftLabel}`),this.secondsLeft<=0&&(this.stopTimer(),this.bsExpire.emit()))}get defaults(){return k[this.type]??k.warning}renderHeading(t,e){const i=Math.min(6,Math.max(1,Math.trunc(Number(this.headingLevel))||2));return s("div",{class:"bs-session-timeout__heading-group"},s("h"+i,{part:"heading",id:"heading",class:{"bs-session-timeout__heading":!0}},t),e&&s("p",{part:"description",class:"bs-session-timeout__description"},e))}renderWarning(){const t=this.totalSeconds>0?this.totalSeconds:this.initialTotal||this.secondsLeft,e=t>0?Math.max(0,Math.min(100,this.secondsLeft/t*100)):0,i=this.secondsLeft>=60?this.timeLeftLabel:this.secondsLeftLabel;return s("div",{part:"countdown",class:"bs-session-timeout__countdown"},s("div",{class:"bs-session-timeout__time-row"},s("span",{part:"time",class:"bs-session-timeout__time",role:"timer"},g(this.secondsLeft)),s("span",{class:"bs-session-timeout__unit"},i)),s("bs-progress-linear",{type:"determinate",size:"large",value:e,showLabel:!1,ariaLabel:`${g(this.secondsLeft)} ${i}`}))}renderAccount(){const t=this.accountName??"",e=this.accountInitials??t.split(/\s+/).filter(Boolean).slice(0,2).map((s=>s[0].toUpperCase())).join("");return t||this.accountEmail?s("div",{part:"account",class:"bs-session-timeout__account"},s("bs-avatar",{type:"initials",size:"lg",initials:e,ariaLabel:t||this.accountEmail}),s("div",{class:"bs-session-timeout__account-text"},t&&s("span",{class:"bs-session-timeout__account-name"},t),this.accountEmail&&s("span",{class:"bs-session-timeout__account-email"},this.accountEmail))):null}renderConfirm(){const t=this.alternatives??[];return[s("bs-input",{part:"password",class:"bs-session-timeout__password",type:"password",label:this.passwordLabel,value:this.password,error:this.passwordError,onBsInput:s=>this.password=s.detail,onBsChange:s=>this.password=s.detail}),s("bs-button",{part:"primary",class:"bs-session-timeout__block-button",variant:"primary",onClick:()=>this.bsPrimary.emit({password:this.password})},this.primaryLabel??this.defaults.primary),t.length>0&&s("div",{part:"divider",class:"bs-session-timeout__divider",role:"separator"},s("span",{class:"bs-session-timeout__rule"}),s("span",{class:"bs-session-timeout__divider-label"},this.dividerLabel),s("span",{class:"bs-session-timeout__rule"})),t.length>0&&s("div",{part:"alternatives",class:"bs-session-timeout__alternatives"},t.map((t=>s("bs-button",{key:t.id,variant:"outlined",onClick:()=>this.bsAlternative.emit({id:t.id})},s("key"===t.icon?w:y,{slot:"icon"}),t.label)))),this.cancelLabel&&s("bs-button",{part:"cancel",class:"bs-session-timeout__block-button bs-session-timeout__text-button",variant:"subtle",size:"lg",onClick:()=>this.bsCancel.emit()},this.cancelLabel)]}render(){const t=this.defaults,e=this.heading??t.heading,i=this.description??t.description,o=this.primaryLabel??t.primary,n=this.secondaryLabel??t.secondary;return s("bs-card",{key:"45a056eabc2f536128ee6adbc6104d76793301f4",part:"container",class:"bs-session-timeout",surface:"base",role:"region","aria-labelledby":"heading"},s("div",{key:"035795cb4b5b0252212270236f048e3216d5d401",class:"bs-session-timeout__body"},!this.hideIcon&&s("bs-icon-tile",{key:"857db99f58d07483d3c7dadd95e5951a645d0c59",part:"art",intent:t.intent,size:"lg"},s("slot",{key:"41504daf4751677d9b1df0d211e719d8f441f5b2",name:"icon"},t.glyph())),this.renderHeading(e,i),"warning"===this.type&&this.renderWarning(),"warning"===this.type&&this.savedMessage&&s("p",{key:"8ba10b3921db4b3cedbeb3d45bddfb89425bbdbb",part:"saved",class:"bs-session-timeout__saved"},s(x,{key:"44ea938fca553c67ae23628833471ceb98e63b06"}),s("span",{key:"672ebc96828437ffbc67711082fd7018611153b7"},this.savedMessage)),"signed-out"===this.type&&this.renderAccount(),"confirm-identity"===this.type&&this.renderConfirm(),"warning"===this.type&&(o||n)&&s("div",{key:"94221156fe30010bd0fbe4fb0146c95feceab50f",part:"actions",class:"bs-session-timeout__actions"},n&&s("bs-button",{key:"09b14d30bc185a4644902e52100f0493da6109a0",part:"secondary",variant:"outlined",onClick:()=>this.bsSecondary.emit()},n),o&&s("bs-button",{key:"be381ed4be453efd306b28da3e1f4b7f0740c024",part:"primary",variant:"primary",onClick:()=>this.bsPrimary.emit()},o)),"signed-out"===this.type&&(o||n)&&s("div",{key:"6b3b3622809165f70d83c68db409e2373ea1008e",part:"actions",class:"bs-session-timeout__actions bs-session-timeout__actions--stacked"},o&&s("bs-button",{key:"f03d85c00ce0c18e14e26d2b4332ddb987b93f9e",part:"primary",class:"bs-session-timeout__block-button",variant:"primary",onClick:()=>this.bsPrimary.emit()},o),n&&s("bs-button",{key:"a9bf95d13955110f7f36561b9acc3c89a5862de5",part:"secondary",class:"bs-session-timeout__text-button",variant:"subtle",size:"lg",onClick:()=>this.bsSecondary.emit()},n)),s("div",{key:"69ada1eed62f93587b2c2f45aa1d3ea933ba682f",class:"bs-session-timeout__sr-only",role:"status","aria-live":"polite"},this.announcement)))}static get watchers(){return{countdown:[{onTimerInputsChange:0}],type:[{onTimerInputsChange:0}]}}static get style(){return":host{display:block;width:var(--bs-session-timeout-width);min-width:var(--bs-session-timeout-min-width);max-width:var(--bs-session-timeout-max-width);--bs-session-timeout-width:440px;--bs-session-timeout-min-width:380px;--bs-session-timeout-max-width:560px;--bs-session-timeout-bg:var(--bs-paper-bg-base);--bs-session-timeout-radius:var(--bs-border-radius-150);--bs-session-timeout-padding:var(--bs-spacing-200);--bs-session-timeout-gap:var(--bs-spacing-150);--bs-session-timeout-shadow:0 8px 8px var(--bs-elevation-higher);--bs-session-timeout-color:var(--bs-text-default);--bs-session-timeout-color-secondary:var(--bs-text-secondary);--bs-session-timeout-countdown-bg:var(--bs-surface-container);--bs-session-timeout-countdown-fill:var(--bs-color-warning-default);--bs-session-timeout-countdown-track:var(--bs-surface-hover);--bs-session-timeout-rule:var(--bs-border-default)}.bs-session-timeout{--bs-card-bg:var(--bs-session-timeout-bg);--bs-card-radius:var(--bs-session-timeout-radius);--bs-card-padding:var(--bs-session-timeout-padding);--bs-card-shadow:var(--bs-session-timeout-shadow);color:var(--bs-session-timeout-color)}.bs-session-timeout__body{display:flex;flex-direction:column;align-items:stretch;gap:var(--bs-session-timeout-gap)}bs-icon-tile{align-self:flex-start}.bs-session-timeout__glyph,::slotted([slot='icon']){width:24px;height:24px}.bs-session-timeout__heading-group{display:flex;flex-direction:column;gap:6px}.bs-session-timeout__heading{margin:0;font-size:var(--bs-font-size-2xl);font-weight:var(--bs-font-weight-bold);line-height:32px}.bs-session-timeout__description{margin:0;color:var(--bs-session-timeout-color-secondary);font-size:var(--bs-font-size-md);line-height:24px}.bs-session-timeout__countdown{display:flex;flex-direction:column;gap:var(--bs-spacing-100);padding:var(--bs-spacing-200);border-radius:var(--bs-border-radius-100);background:var(--bs-session-timeout-countdown-bg)}.bs-session-timeout__countdown bs-progress-linear{--bs-progress-linear-fill:var(--bs-session-timeout-countdown-fill);--bs-progress-linear-track:var(--bs-session-timeout-countdown-track)}.bs-session-timeout__time-row{display:flex;align-items:flex-end;gap:var(--bs-spacing-100)}.bs-session-timeout__time{font-size:var(--bs-font-size-3xl);font-weight:var(--bs-font-weight-bold);line-height:40px;font-variant-numeric:tabular-nums}.bs-session-timeout__unit{padding-bottom:6px;color:var(--bs-session-timeout-color-secondary);font-size:var(--bs-font-size-sm);line-height:20px}.bs-session-timeout__saved{display:flex;align-items:center;gap:var(--bs-spacing-100);margin:0;color:var(--bs-session-timeout-color-secondary);font-size:var(--bs-font-size-sm);line-height:20px}.bs-session-timeout__saved-icon{flex:none;width:16px;height:16px}.bs-session-timeout__actions{display:flex;align-items:center;justify-content:flex-end;gap:var(--bs-spacing-100)}.bs-session-timeout__actions bs-button,.bs-session-timeout__alternatives bs-button,.bs-session-timeout__block-button{--bs-button-height-md:var(--bs-spacing-550)}.bs-session-timeout__account{display:flex;align-items:center;gap:var(--bs-spacing-200);padding:var(--bs-spacing-150) var(--bs-spacing-200);border:1px solid var(--bs-session-timeout-rule);border-radius:var(--bs-border-radius-100)}.bs-session-timeout__account-text{display:flex;flex-direction:column;gap:var(--bs-spacing-25);min-width:0;line-height:24px}.bs-session-timeout__account-name{font-weight:var(--bs-font-weight-semibold)}.bs-session-timeout__account-email{overflow-wrap:anywhere}.bs-session-timeout__actions--stacked{flex-direction:column;align-items:stretch;justify-content:flex-start}.bs-session-timeout__block-button,.bs-session-timeout__alternatives bs-button,.bs-session-timeout__actions--stacked bs-button{--bs-button-width:100%}.bs-session-timeout__text-button{--bs-button-subtle-color:var(--bs-text-action);--bs-button-height-lg:var(--bs-spacing-600)}.bs-session-timeout__password{display:block;--bs-input-label-font-size:var(--bs-font-size-md);--bs-input-label-font-weight:var(--bs-font-weight-semibold);--bs-input-label-line-height:calc(var(--bs-line-height-body-md) * 1px);margin-bottom:calc(var(--bs-spacing-200) - var(--bs-session-timeout-gap))}.bs-session-timeout__divider{display:flex;align-items:center;gap:var(--bs-spacing-100);align-self:center;width:320px;max-width:100%;color:var(--bs-session-timeout-color-secondary);font-size:var(--bs-font-size-xs);line-height:16px}.bs-session-timeout__rule{flex:1 1 0;height:1px;background:var(--bs-session-timeout-rule)}.bs-session-timeout__alternatives{display:grid;grid-template-columns:repeat(auto-fit, minmax(0, 1fr));gap:var(--bs-spacing-100)}.bs-session-timeout__sr-only{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}"}},[769,"bs-session-timeout",{type:[513],heading:[1],headingLevel:[2,"heading-level"],description:[1],hideIcon:[4,"hide-icon"],primaryLabel:[1,"primary-label"],secondaryLabel:[1,"secondary-label"],secondsLeft:[1026,"seconds-left"],totalSeconds:[2,"total-seconds"],countdown:[4],timeLeftLabel:[1,"time-left-label"],secondsLeftLabel:[1,"seconds-left-label"],savedMessage:[1,"saved-message"],accountName:[1,"account-name"],accountEmail:[1,"account-email"],accountInitials:[1,"account-initials"],passwordLabel:[1,"password-label"],passwordError:[1,"password-error"],dividerLabel:[1,"divider-label"],alternatives:[16],cancelLabel:[1,"cancel-label"],password:[32],announcement:[32],initialTotal:[32]},void 0,{countdown:[{onTimerInputsChange:0}],type:[{onTimerInputsChange:0}]}]);function g(s){const t=Math.max(0,Math.trunc(Number(s))||0);return`${Math.floor(t/60)}:${function(s){return(s+"").padStart(2,"0")}(t%60)}`}const f=t=>e=>s("svg",{class:"bs-session-timeout__glyph",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",...e},t),v=f(s("g",null,s("circle",{cx:"12",cy:"13.5",r:"7"}),s("path",{d:"M12 10V13.5L14 15"}),s("path",{d:"M9.5 3.5H14.5"}))),_=f(s("g",null,s("rect",{x:"5",y:"10.5",width:"14",height:"9.5",rx:"1.5"}),s("path",{d:"M8.5 10.5V8A3.5 3.5 0 0 1 15.5 8V10.5"}))),y=f(s("g",null,s("path",{d:"M6 10A6 6 0 0 1 18 10"}),s("path",{d:"M9 20C10 18 10 16 10 13A2 2 0 0 1 14 13C14 16 13.5 18.5 12.5 20.5"}),s("path",{d:"M6 13C6 15.5 5.5 17.5 4.5 19.5"}),s("path",{d:"M18 13C18 15.5 17.5 18 16.5 20"}),s("path",{d:"M12 13C12 15 11.5 17 10.8 18.5"}))),w=f(s("g",null,s("circle",{cx:"8",cy:"15",r:"4"}),s("path",{d:"M11 12L19.5 3.5"}),s("path",{d:"M16 7L19 10"}))),x=()=>s("svg",{class:"bs-session-timeout__saved-icon",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.3","stroke-linecap":"round","aria-hidden":"true"},s("circle",{cx:"8",cy:"8",r:"6.2"}),s("path",{d:"M8 7.2V11"}),s("path",{d:"M8 5V5.1"})),k={warning:{intent:"warning",heading:"You’ll be signed out soon",description:"For your security, we sign you out after a period without activity.",primary:"Stay signed in",secondary:"Sign out now",glyph:()=>s(v,null)},"signed-out":{intent:"default",heading:"You’ve been signed out",description:"You were inactive for a while. Your work was saved and will be there when you sign in.",primary:"Sign in again",secondary:"Use a different account",glyph:()=>s(_,null)},"confirm-identity":{intent:"default",heading:"Confirm it’s you",description:"This action needs a fresh sign-in.",primary:"Confirm",secondary:"",glyph:()=>s(y,null)}};function C(){"undefined"!=typeof customElements&&["bs-session-timeout","bs-avatar","bs-button","bs-card","bs-chip-informative","bs-icon-button","bs-icon-tile","bs-input","bs-menu","bs-menu-item","bs-progress-linear"].forEach((s=>{switch(s){case"bs-session-timeout":customElements.get(t(s))||customElements.define(t(s),p);break;case"bs-avatar":customElements.get(t(s))||n();break;case"bs-button":customElements.get(t(s))||a();break;case"bs-card":customElements.get(t(s))||r();break;case"bs-chip-informative":customElements.get(t(s))||b();break;case"bs-icon-button":customElements.get(t(s))||c();break;case"bs-icon-tile":customElements.get(t(s))||l();break;case"bs-input":customElements.get(t(s))||d();break;case"bs-menu":customElements.get(t(s))||u();break;case"bs-menu-item":customElements.get(t(s))||m();break;case"bs-progress-linear":customElements.get(t(s))||h()}}))}C();const L=p,M=C;export{L as BsSessionTimeout,M as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e,p as i,H as t,c as s,h as r}from"./p-CVrEuVFo.js";import{d as a}from"./p-qmS2CBqi.js";import{d as c}from"./p-CA31vqjL.js";import{d as n}from"./p-B_I4UEMp.js";import{d as o}from"./p-CeUK3n7D.js";import{d as b}from"./p-C_j_jDM6.js";import{d as l}from"./p-Bl_tVzeq.js";const p=i(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.bsChange=s(this,"bsChange"),this.bsCancel=s(this,"bsCancel"),this.internals=this.attachInternals()}get el(){return this}internals;initialValue="";typed="";name;value="";format="12h";minuteStep=1;heading="Select Time";formatLabel="24h";confirmLabel="Confirm";cancelLabel="Cancel";hourLabel="Hour";minuteLabel="Minute";periodLabel="AM/PM";bsChange;bsCancel;hour=0;minute=0;componentWillLoad(){this.initialValue=this.value,this.resetDraft(),this.syncFormValue()}onValueChange(){this.resetDraft(),this.syncFormValue()}onNameChange(){this.syncFormValue()}formResetCallback(){this.value=this.initialValue}resetDraft(){const e=function(e){const i=/^(\d{1,2}):(\d{2})$/.exec((e??"").trim());if(!i)return;const t=Number(i[1]),s=Number(i[2]);return t<=23&&s<=59?{hour:t,minute:s}:void 0}(this.value);this.hour=e?e.hour:0,this.minute=e?e.minute:0}syncFormValue(){this.internals?.setFormValue&&this.internals.setFormValue(this.value??"")}get step(){const e=Math.trunc(Number(this.minuteStep));return Number.isFinite(e)&&e>=1&&e<=59?e:1}get is12h(){return"24h"!==this.format}get isPm(){return this.hour>=12}shown(e){return"minute"===e?this.minute:this.is12h?this.hour%12||12:this.hour}bounds(e){return"minute"===e?[0,59]:this.is12h?[1,12]:[0,23]}setShown(e,i){"minute"===e?this.minute=i:this.hour=this.is12h?i%12+(this.isPm?12:0):i}stepBy(e,i){const[t,s]=this.bounds(e),r=s-t+1,a="minute"===e?this.step:1;let c=this.shown(e)+i*a;if("minute"===e){const t=this.shown(e);c=1===i?Math.floor(t/a)*a+a:Math.ceil(t/a)*a-a}this.setShown(e,((c-t)%r+r)%r+t)}onKeyDown=e=>i=>{const[t,s]=this.bounds(e);if("ArrowUp"===i.key)this.stepBy(e,1);else if("ArrowDown"===i.key)this.stepBy(e,-1);else if("Home"===i.key)this.setShown(e,t);else{if("End"!==i.key){if(/^\d$/.test(i.key)){const r=Number((this.typed+i.key).slice(-2));if(this.typed=(this.typed+i.key).slice(-2),r>=t&&r<=s)this.setShown(e,r);else{this.typed=i.key;const r=Number(i.key);r>=t&&r<=s&&this.setShown(e,r)}return 2===this.typed.length&&(this.typed=""),void i.preventDefault()}return}this.setShown(e,s)}this.typed="",i.preventDefault()};confirm=()=>{const e=`${d(this.hour)}:${d(this.minute)}`;this.value=e,this.bsChange.emit({value:e})};cancel=()=>{this.resetDraft(),this.bsCancel.emit()};renderColumn(e,i){const[t,s]=this.bounds(e),a=this.shown(e),c=e=>`${e} ${i.toLowerCase()}`;return r("div",{part:"spinner",class:"bs-timepicker__spinner"},r("button",{part:"step",type:"button",class:"bs-timepicker__step","aria-label":c("Increase"),tabindex:-1,onClick:()=>this.stepBy(e,1)},r("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},r("path",{d:"M18 15L12 9L6 15",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))),r("div",{part:"value",class:"bs-timepicker__value",role:"spinbutton",tabindex:0,"aria-label":i,"aria-valuemin":t,"aria-valuemax":s,"aria-valuenow":a,"aria-valuetext":d(a),onKeyDown:this.onKeyDown(e),onBlur:()=>this.typed=""},d(a)),r("button",{part:"step",type:"button",class:"bs-timepicker__step","aria-label":c("Decrease"),tabindex:-1,onClick:()=>this.stepBy(e,-1)},r("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},r("path",{d:"M6 9L12 15L18 9",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))))}render(){return r("bs-card",{key:"e0545d99e052005bcad5509f81505f628adb5dc4",part:"container",class:"bs-timepicker",surface:"raised"},r("div",{key:"664c7184dcefe5c63f03afad3953787cbc3064cc",class:"bs-timepicker__body"},r("div",{key:"602d4f0ca6975b22daa7c7a37a6d53a259c39768",part:"header",class:"bs-timepicker__header"},r("div",{key:"1650464c84e066f14f6343f18f779e35932535c3",part:"title",class:"bs-timepicker__title"},this.heading),r("label",{key:"debc6155ccf39b90f281d49240203d642fb5039d",class:"bs-timepicker__format"},r("span",{key:"147a6d85b4f0922b5c7d96ebef88b3c70d1fbe05"},this.formatLabel),r("bs-switch",{key:"ddb0be1751ce8246acbfd6c187e66fb6bc878cd5",part:"format-toggle",size:"md",ariaLabel:this.formatLabel,checked:!this.is12h,onBsChange:e=>this.format=e.detail?"24h":"12h"}))),r("div",{key:"35f13bd74133f2c1109df96aafdc456178e4a32f",class:"bs-timepicker__divider"}),r("div",{key:"9c979a8d3300a8f5dba7d8df784dc8ef691a40a6",part:"selector",class:"bs-timepicker__selector"},this.renderColumn("hour",this.hourLabel),r("div",{key:"5b4af0371fd816067b92854da2b35e5a7de8e4ea",part:"separator",class:"bs-timepicker__separator","aria-hidden":"true"},r("svg",{key:"a70450b5068add559c48e795ce6aca204b30d02d",viewBox:"0 0 4 32",fill:"currentColor"},r("circle",{key:"26a760f4d4712eca3df48b97bde276ce241511d5",cx:"2",cy:"10",r:"2"}),r("circle",{key:"3c6eb56e2736353dc5e5bc4a1d6ef64242f6a367",cx:"2",cy:"22",r:"2"}))),this.renderColumn("minute",this.minuteLabel),this.is12h&&r("bs-input",{key:"948e724c331008bbd00fd84c516d02e919e622e1",part:"period",class:"bs-timepicker__period",type:"dropdown",label:this.periodLabel,value:this.isPm?"PM":"AM",options:[{label:"AM",value:"AM"},{label:"PM",value:"PM"}],onBsChange:e=>{"PM"===e.detail!==this.isPm&&(this.hour=(this.hour+12)%24)}})),r("div",{key:"08b57e8c0b895e272d98386fe5b2ac2e55a87de0",class:"bs-timepicker__divider"}),r("div",{key:"5b1af1da10c4333ef6b826eaafd75fa12ef2e785",part:"footer",class:"bs-timepicker__footer"},r("bs-button",{key:"ad24615dbe6ae46e00ca558f71cee030504573a5",part:"cancel",variant:"subtle",onClick:this.cancel},this.cancelLabel),r("bs-button",{key:"f76cd192e1e7e0bb524080cf54a655c5b4508a3c",part:"confirm",variant:"primary",onClick:this.confirm},this.confirmLabel))))}static get formAssociated(){return!0}static get watchers(){return{value:[{onValueChange:0}],name:[{onNameChange:0}]}}static get style(){return":host{display:inline-block;--bs-timepicker-width:294px;--bs-timepicker-bg:var(--bs-paper-bg-raised);--bs-timepicker-radius:var(--bs-border-radius-100);--bs-timepicker-padding-y:var(--bs-spacing-200);--bs-timepicker-padding-x:var(--bs-spacing-200);--bs-timepicker-gap:var(--bs-spacing-200);--bs-timepicker-shadow:var(--bs-shadow-md);--bs-timepicker-title-size:var(--bs-font-size-2xl);--bs-timepicker-title-line-height:var(--bs-line-height-heading-h6);--bs-timepicker-color:var(--bs-text-default);--bs-timepicker-color-secondary:var(--bs-text-secondary);--bs-timepicker-divider:var(--bs-border-neutral-container);--bs-timepicker-cell-size:var(--bs-spacing-550);--bs-timepicker-cell-radius:var(--bs-border-radius-100);--bs-timepicker-value-radius:var(--bs-border-radius-50);--bs-timepicker-hover:var(--bs-surface-hover);--bs-timepicker-pressed:var(--bs-surface-pressed);--bs-timepicker-focus-ring-color:var(--bs-border-neutral-container-focused)}.bs-timepicker{width:var(--bs-timepicker-width);max-width:100%;color:var(--bs-timepicker-color);font-size:var(--bs-font-size-md);--bs-card-bg:var(--bs-timepicker-bg);--bs-card-radius:var(--bs-timepicker-radius);--bs-card-padding:var(--bs-timepicker-padding-y) 0;--bs-card-shadow:var(--bs-timepicker-shadow);--bs-card-overflow:visible}.bs-timepicker__body{display:flex;flex-direction:column;gap:var(--bs-timepicker-gap)}.bs-timepicker__header{display:flex;align-items:center;gap:var(--bs-spacing-100);padding:0 var(--bs-timepicker-padding-x)}.bs-timepicker__title{flex:1 1 0;min-width:0;font-size:var(--bs-timepicker-title-size);font-weight:var(--bs-font-weight-bold);line-height:calc(var(--bs-timepicker-title-line-height) * 1px)}.bs-timepicker__format{display:flex;align-items:center;gap:var(--bs-spacing-50);color:var(--bs-timepicker-color-secondary);line-height:calc(var(--bs-line-height-body-md) * 1px)}.bs-timepicker__divider{height:1px;background:var(--bs-timepicker-divider)}.bs-timepicker__selector{display:flex;align-items:center;justify-content:center;gap:var(--bs-spacing-200);padding:0 var(--bs-timepicker-padding-x)}.bs-timepicker__spinner{display:flex;flex-direction:column;align-items:center;gap:var(--bs-spacing-100);width:var(--bs-timepicker-cell-size)}.bs-timepicker__step,.bs-timepicker__value{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--bs-timepicker-cell-size);height:var(--bs-timepicker-cell-size);padding:0;border:none;background:transparent;font-family:inherit}.bs-timepicker__step{border-radius:var(--bs-timepicker-cell-radius);color:var(--bs-timepicker-color-secondary);cursor:pointer}.bs-timepicker__step svg{width:24px;height:24px}.bs-timepicker__value{border-radius:var(--bs-timepicker-value-radius);color:var(--bs-timepicker-color);font-size:var(--bs-timepicker-title-size);font-weight:var(--bs-font-weight-bold);line-height:calc(var(--bs-timepicker-title-line-height) * 1px);font-variant-numeric:tabular-nums;cursor:pointer;user-select:none}.bs-timepicker__step:hover,.bs-timepicker__value:hover{background:var(--bs-timepicker-hover)}.bs-timepicker__step:active,.bs-timepicker__value:active{background:var(--bs-timepicker-pressed)}.bs-timepicker__step:focus-visible,.bs-timepicker__value:focus-visible{outline:2px solid var(--bs-timepicker-focus-ring-color);outline-offset:0}.bs-timepicker__separator{display:flex;align-items:center;color:var(--bs-timepicker-color)}.bs-timepicker__separator svg{width:4px;height:32px}.bs-timepicker__period::part(label){position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.bs-timepicker__period{width:112px}.bs-timepicker__period::part(control){caret-color:transparent;cursor:pointer;text-overflow:clip}.bs-timepicker__footer{display:flex;align-items:flex-start;justify-content:flex-end;gap:var(--bs-spacing-100);padding:0 var(--bs-timepicker-padding-x)}"}},[577,"bs-timepicker",{name:[513],value:[1537],format:[1537],minuteStep:[2,"minute-step"],heading:[1],formatLabel:[1,"format-label"],confirmLabel:[1,"confirm-label"],cancelLabel:[1,"cancel-label"],hourLabel:[1,"hour-label"],minuteLabel:[1,"minute-label"],periodLabel:[1,"period-label"],hour:[32],minute:[32]},void 0,{value:[{onValueChange:0}],name:[{onNameChange:0}]}]);function d(e){return(e+"").padStart(2,"0")}function m(){"undefined"!=typeof customElements&&["bs-timepicker","bs-button","bs-card","bs-input","bs-menu","bs-menu-item","bs-switch"].forEach((i=>{switch(i){case"bs-timepicker":customElements.get(e(i))||customElements.define(e(i),p);break;case"bs-button":customElements.get(e(i))||a();break;case"bs-card":customElements.get(e(i))||c();break;case"bs-input":customElements.get(e(i))||n();break;case"bs-menu":customElements.get(e(i))||o();break;case"bs-menu-item":customElements.get(e(i))||b();break;case"bs-switch":customElements.get(e(i))||l()}}))}m();const h=p,u=m;export{h as BsTimepicker,u as defineCustomElement}
|
|
1
|
+
import{t as e,p as i,H as t,c as s,h as r}from"./p-CVrEuVFo.js";import{d as a}from"./p-qmS2CBqi.js";import{d as c}from"./p-CA31vqjL.js";import{d as n}from"./p-DuLL7Ouw.js";import{d as o}from"./p-zTHlbyH6.js";import{d as b}from"./p-BUskqBR6.js";import{d as l}from"./p-CeUK3n7D.js";import{d as p}from"./p-C_j_jDM6.js";import{d}from"./p-Bl_tVzeq.js";const m=i(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.bsChange=s(this,"bsChange"),this.bsCancel=s(this,"bsCancel"),this.internals=this.attachInternals()}get el(){return this}internals;initialValue="";typed="";name;value="";format="12h";minuteStep=1;heading="Select Time";formatLabel="24h";confirmLabel="Confirm";cancelLabel="Cancel";hourLabel="Hour";minuteLabel="Minute";periodLabel="AM/PM";bsChange;bsCancel;hour=0;minute=0;componentWillLoad(){this.initialValue=this.value,this.resetDraft(),this.syncFormValue()}onValueChange(){this.resetDraft(),this.syncFormValue()}onNameChange(){this.syncFormValue()}formResetCallback(){this.value=this.initialValue}resetDraft(){const e=function(e){const i=/^(\d{1,2}):(\d{2})$/.exec((e??"").trim());if(!i)return;const t=Number(i[1]),s=Number(i[2]);return t<=23&&s<=59?{hour:t,minute:s}:void 0}(this.value);this.hour=e?e.hour:0,this.minute=e?e.minute:0}syncFormValue(){this.internals?.setFormValue&&this.internals.setFormValue(this.value??"")}get step(){const e=Math.trunc(Number(this.minuteStep));return Number.isFinite(e)&&e>=1&&e<=59?e:1}get is12h(){return"24h"!==this.format}get isPm(){return this.hour>=12}shown(e){return"minute"===e?this.minute:this.is12h?this.hour%12||12:this.hour}bounds(e){return"minute"===e?[0,59]:this.is12h?[1,12]:[0,23]}setShown(e,i){"minute"===e?this.minute=i:this.hour=this.is12h?i%12+(this.isPm?12:0):i}stepBy(e,i){const[t,s]=this.bounds(e),r=s-t+1,a="minute"===e?this.step:1;let c=this.shown(e)+i*a;if("minute"===e){const t=this.shown(e);c=1===i?Math.floor(t/a)*a+a:Math.ceil(t/a)*a-a}this.setShown(e,((c-t)%r+r)%r+t)}onKeyDown=e=>i=>{const[t,s]=this.bounds(e);if("ArrowUp"===i.key)this.stepBy(e,1);else if("ArrowDown"===i.key)this.stepBy(e,-1);else if("Home"===i.key)this.setShown(e,t);else{if("End"!==i.key){if(/^\d$/.test(i.key)){const r=Number((this.typed+i.key).slice(-2));if(this.typed=(this.typed+i.key).slice(-2),r>=t&&r<=s)this.setShown(e,r);else{this.typed=i.key;const r=Number(i.key);r>=t&&r<=s&&this.setShown(e,r)}return 2===this.typed.length&&(this.typed=""),void i.preventDefault()}return}this.setShown(e,s)}this.typed="",i.preventDefault()};confirm=()=>{const e=`${h(this.hour)}:${h(this.minute)}`;this.value=e,this.bsChange.emit({value:e})};cancel=()=>{this.resetDraft(),this.bsCancel.emit()};renderColumn(e,i){const[t,s]=this.bounds(e),a=this.shown(e),c=e=>`${e} ${i.toLowerCase()}`;return r("div",{part:"spinner",class:"bs-timepicker__spinner"},r("button",{part:"step",type:"button",class:"bs-timepicker__step","aria-label":c("Increase"),tabindex:-1,onClick:()=>this.stepBy(e,1)},r("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},r("path",{d:"M18 15L12 9L6 15",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))),r("div",{part:"value",class:"bs-timepicker__value",role:"spinbutton",tabindex:0,"aria-label":i,"aria-valuemin":t,"aria-valuemax":s,"aria-valuenow":a,"aria-valuetext":h(a),onKeyDown:this.onKeyDown(e),onBlur:()=>this.typed=""},h(a)),r("button",{part:"step",type:"button",class:"bs-timepicker__step","aria-label":c("Decrease"),tabindex:-1,onClick:()=>this.stepBy(e,-1)},r("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},r("path",{d:"M6 9L12 15L18 9",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))))}render(){return r("bs-card",{key:"e0545d99e052005bcad5509f81505f628adb5dc4",part:"container",class:"bs-timepicker",surface:"raised"},r("div",{key:"664c7184dcefe5c63f03afad3953787cbc3064cc",class:"bs-timepicker__body"},r("div",{key:"602d4f0ca6975b22daa7c7a37a6d53a259c39768",part:"header",class:"bs-timepicker__header"},r("div",{key:"1650464c84e066f14f6343f18f779e35932535c3",part:"title",class:"bs-timepicker__title"},this.heading),r("label",{key:"debc6155ccf39b90f281d49240203d642fb5039d",class:"bs-timepicker__format"},r("span",{key:"147a6d85b4f0922b5c7d96ebef88b3c70d1fbe05"},this.formatLabel),r("bs-switch",{key:"ddb0be1751ce8246acbfd6c187e66fb6bc878cd5",part:"format-toggle",size:"md",ariaLabel:this.formatLabel,checked:!this.is12h,onBsChange:e=>this.format=e.detail?"24h":"12h"}))),r("div",{key:"35f13bd74133f2c1109df96aafdc456178e4a32f",class:"bs-timepicker__divider"}),r("div",{key:"9c979a8d3300a8f5dba7d8df784dc8ef691a40a6",part:"selector",class:"bs-timepicker__selector"},this.renderColumn("hour",this.hourLabel),r("div",{key:"5b4af0371fd816067b92854da2b35e5a7de8e4ea",part:"separator",class:"bs-timepicker__separator","aria-hidden":"true"},r("svg",{key:"a70450b5068add559c48e795ce6aca204b30d02d",viewBox:"0 0 4 32",fill:"currentColor"},r("circle",{key:"26a760f4d4712eca3df48b97bde276ce241511d5",cx:"2",cy:"10",r:"2"}),r("circle",{key:"3c6eb56e2736353dc5e5bc4a1d6ef64242f6a367",cx:"2",cy:"22",r:"2"}))),this.renderColumn("minute",this.minuteLabel),this.is12h&&r("bs-input",{key:"948e724c331008bbd00fd84c516d02e919e622e1",part:"period",class:"bs-timepicker__period",type:"dropdown",label:this.periodLabel,value:this.isPm?"PM":"AM",options:[{label:"AM",value:"AM"},{label:"PM",value:"PM"}],onBsChange:e=>{"PM"===e.detail!==this.isPm&&(this.hour=(this.hour+12)%24)}})),r("div",{key:"08b57e8c0b895e272d98386fe5b2ac2e55a87de0",class:"bs-timepicker__divider"}),r("div",{key:"5b1af1da10c4333ef6b826eaafd75fa12ef2e785",part:"footer",class:"bs-timepicker__footer"},r("bs-button",{key:"ad24615dbe6ae46e00ca558f71cee030504573a5",part:"cancel",variant:"subtle",onClick:this.cancel},this.cancelLabel),r("bs-button",{key:"f76cd192e1e7e0bb524080cf54a655c5b4508a3c",part:"confirm",variant:"primary",onClick:this.confirm},this.confirmLabel))))}static get formAssociated(){return!0}static get watchers(){return{value:[{onValueChange:0}],name:[{onNameChange:0}]}}static get style(){return":host{display:inline-block;--bs-timepicker-width:294px;--bs-timepicker-bg:var(--bs-paper-bg-raised);--bs-timepicker-radius:var(--bs-border-radius-100);--bs-timepicker-padding-y:var(--bs-spacing-200);--bs-timepicker-padding-x:var(--bs-spacing-200);--bs-timepicker-gap:var(--bs-spacing-200);--bs-timepicker-shadow:var(--bs-shadow-md);--bs-timepicker-title-size:var(--bs-font-size-2xl);--bs-timepicker-title-line-height:var(--bs-line-height-heading-h6);--bs-timepicker-color:var(--bs-text-default);--bs-timepicker-color-secondary:var(--bs-text-secondary);--bs-timepicker-divider:var(--bs-border-neutral-container);--bs-timepicker-cell-size:var(--bs-spacing-550);--bs-timepicker-cell-radius:var(--bs-border-radius-100);--bs-timepicker-value-radius:var(--bs-border-radius-50);--bs-timepicker-hover:var(--bs-surface-hover);--bs-timepicker-pressed:var(--bs-surface-pressed);--bs-timepicker-focus-ring-color:var(--bs-border-neutral-container-focused)}.bs-timepicker{width:var(--bs-timepicker-width);max-width:100%;color:var(--bs-timepicker-color);font-size:var(--bs-font-size-md);--bs-card-bg:var(--bs-timepicker-bg);--bs-card-radius:var(--bs-timepicker-radius);--bs-card-padding:var(--bs-timepicker-padding-y) 0;--bs-card-shadow:var(--bs-timepicker-shadow);--bs-card-overflow:visible}.bs-timepicker__body{display:flex;flex-direction:column;gap:var(--bs-timepicker-gap)}.bs-timepicker__header{display:flex;align-items:center;gap:var(--bs-spacing-100);padding:0 var(--bs-timepicker-padding-x)}.bs-timepicker__title{flex:1 1 0;min-width:0;font-size:var(--bs-timepicker-title-size);font-weight:var(--bs-font-weight-bold);line-height:calc(var(--bs-timepicker-title-line-height) * 1px)}.bs-timepicker__format{display:flex;align-items:center;gap:var(--bs-spacing-50);color:var(--bs-timepicker-color-secondary);line-height:calc(var(--bs-line-height-body-md) * 1px)}.bs-timepicker__divider{height:1px;background:var(--bs-timepicker-divider)}.bs-timepicker__selector{display:flex;align-items:center;justify-content:center;gap:var(--bs-spacing-200);padding:0 var(--bs-timepicker-padding-x)}.bs-timepicker__spinner{display:flex;flex-direction:column;align-items:center;gap:var(--bs-spacing-100);width:var(--bs-timepicker-cell-size)}.bs-timepicker__step,.bs-timepicker__value{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--bs-timepicker-cell-size);height:var(--bs-timepicker-cell-size);padding:0;border:none;background:transparent;font-family:inherit}.bs-timepicker__step{border-radius:var(--bs-timepicker-cell-radius);color:var(--bs-timepicker-color-secondary);cursor:pointer}.bs-timepicker__step svg{width:24px;height:24px}.bs-timepicker__value{border-radius:var(--bs-timepicker-value-radius);color:var(--bs-timepicker-color);font-size:var(--bs-timepicker-title-size);font-weight:var(--bs-font-weight-bold);line-height:calc(var(--bs-timepicker-title-line-height) * 1px);font-variant-numeric:tabular-nums;cursor:pointer;user-select:none}.bs-timepicker__step:hover,.bs-timepicker__value:hover{background:var(--bs-timepicker-hover)}.bs-timepicker__step:active,.bs-timepicker__value:active{background:var(--bs-timepicker-pressed)}.bs-timepicker__step:focus-visible,.bs-timepicker__value:focus-visible{outline:2px solid var(--bs-timepicker-focus-ring-color);outline-offset:0}.bs-timepicker__separator{display:flex;align-items:center;color:var(--bs-timepicker-color)}.bs-timepicker__separator svg{width:4px;height:32px}.bs-timepicker__period::part(label){position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.bs-timepicker__period{width:112px}.bs-timepicker__period::part(control){caret-color:transparent;cursor:pointer;text-overflow:clip}.bs-timepicker__footer{display:flex;align-items:flex-start;justify-content:flex-end;gap:var(--bs-spacing-100);padding:0 var(--bs-timepicker-padding-x)}"}},[577,"bs-timepicker",{name:[513],value:[1537],format:[1537],minuteStep:[2,"minute-step"],heading:[1],formatLabel:[1,"format-label"],confirmLabel:[1,"confirm-label"],cancelLabel:[1,"cancel-label"],hourLabel:[1,"hour-label"],minuteLabel:[1,"minute-label"],periodLabel:[1,"period-label"],hour:[32],minute:[32]},void 0,{value:[{onValueChange:0}],name:[{onNameChange:0}]}]);function h(e){return(e+"").padStart(2,"0")}function u(){"undefined"!=typeof customElements&&["bs-timepicker","bs-button","bs-card","bs-chip-informative","bs-icon-button","bs-input","bs-menu","bs-menu-item","bs-switch"].forEach((i=>{switch(i){case"bs-timepicker":customElements.get(e(i))||customElements.define(e(i),m);break;case"bs-button":customElements.get(e(i))||a();break;case"bs-card":customElements.get(e(i))||c();break;case"bs-chip-informative":customElements.get(e(i))||n();break;case"bs-icon-button":customElements.get(e(i))||o();break;case"bs-input":customElements.get(e(i))||b();break;case"bs-menu":customElements.get(e(i))||l();break;case"bs-menu-item":customElements.get(e(i))||p();break;case"bs-switch":customElements.get(e(i))||d()}}))}u();const k=m,f=u;export{k as BsTimepicker,f as defineCustomElement}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as i,p as t,H as e,c as s,h as n}from"./p-CVrEuVFo.js";import{d as r}from"./p-DuLL7Ouw.js";import{d as o}from"./p-zTHlbyH6.js";import{d as a}from"./p-CeUK3n7D.js";import{d as l}from"./p-C_j_jDM6.js";const p=t(class extends e{constructor(i){super(),!1!==i&&this.__registerHost(),this.__attachShadow(),this.bsInput=s(this,"bsInput"),this.bsChange=s(this,"bsChange"),this.bsOpen=s(this,"bsOpen"),this.bsChipAdd=s(this,"bsChipAdd"),this.bsChipRemove=s(this,"bsChipRemove"),this.bsTitleChange=s(this,"bsTitleChange"),this.bsCountryChange=s(this,"bsCountryChange"),this.internals=this.attachInternals()}get el(){return this}internals;initialValue="";name;value="";type="text";label;placeholder;description;error;disabled=!1;required=!1;step=1;min;max;options=[];rows=3;chips=[];titleOptions=[];initialsTitle="";countryOptions=[];country="";length=4;open=!1;bsInput;bsChange;bsOpen;bsChipAdd;bsChipRemove;bsTitleChange;bsCountryChange;hasIcon=!1;hasEndIcon=!1;passwordVisible=!1;chipDraft="";pinInputs=[];componentWillLoad(){this.initialValue=this.value,this.syncFormValue(),this.hasIcon=this.hasSlottedContent("icon"),this.hasEndIcon=this.hasSlottedContent("end-icon")}onFormStateChange(){this.syncFormValue()}syncFormValue(){if(this.internals?.setFormValue){if("chip"===this.type&&this.name){const i=new FormData;this.chips.forEach((t=>i.append(this.name,t))),this.internals.setFormValue(i)}else this.internals.setFormValue(this.value??"");this.required&&("chip"===this.type?0===this.chips.length:!this.value)?this.internals.setValidity({valueMissing:!0},"Please fill out this field."):this.internals.setValidity({})}}formResetCallback(){this.value=this.initialValue}formStateRestoreCallback(i){"string"==typeof i&&(this.value=i)}hasSlottedContent(i){return Array.from(this.el.childNodes).some((t=>t.nodeType===Node.ELEMENT_NODE&&t.getAttribute("slot")===i))}onIconSlotchange=i=>{this.hasIcon=i.target.assignedNodes().length>0};onEndIconSlotchange=i=>{this.hasEndIcon=i.target.assignedNodes().length>0};onInput=i=>{const t=i.target.value;this.value=t,this.bsInput.emit(t)};onChange=i=>{const t=i.target.value;this.value=t,this.bsChange.emit(t)};clampNumber(i){return void 0!==this.min&&i<this.min&&(i=this.min),void 0!==this.max&&i>this.max&&(i=this.max),i}onStepperIncrement=()=>{if(this.disabled)return;const i=this.clampNumber((parseFloat(this.value)||0)+this.step);this.value=String(i),this.bsChange.emit(this.value)};onStepperDecrement=()=>{if(this.disabled)return;const i=this.clampNumber((parseFloat(this.value)||0)-this.step);this.value=String(i),this.bsChange.emit(this.value)};onTogglePasswordVisibility=()=>{this.passwordVisible=!this.passwordVisible};onDropdownToggle=()=>{this.disabled||(this.open=!this.open,this.bsOpen.emit(this.open))};onDropdownKeydown=i=>{"Enter"!==i.key&&" "!==i.key||(i.preventDefault(),this.onDropdownToggle())};onDropdownOptionSelect=i=>()=>{this.value=i.label,this.open=!1,this.bsChange.emit(this.value)};onHostKeydown(i){"dropdown"===this.type&&this.open&&"Escape"===i.key&&(this.open=!1)}onHostFocusOut(i){if("dropdown"!==this.type||!this.open)return;const t=i.relatedTarget;t&&this.el.contains(t)||(this.open=!1)}onChipDraftInput=i=>{this.chipDraft=i.target.value};onChipDraftKeydown=i=>{if("Enter"===i.key){i.preventDefault();const t=this.chipDraft.trim();t&&(this.bsChipAdd.emit(t),this.chipDraft="")}};onChipRemove=i=>()=>{this.bsChipRemove.emit(i)};onTitleChange=i=>{this.bsTitleChange.emit(i.target.value)};onCountryChange=i=>{this.bsCountryChange.emit(i.target.value)};onPinInput=i=>t=>{const e=t.target;let s=e.value;s.length>1&&(s=s.slice(-1),e.value=s),s&&i<this.length-1&&this.pinInputs[i+1]?.focus(),this.value=this.pinInputs.map((i=>i?.value??"")).join(""),this.bsChange.emit(this.value)};onPinKeydown=i=>t=>{"Backspace"===t.key&&!t.target.value&&i>0&&this.pinInputs[i-1]?.focus()};get showsEndIconArea(){return"number"===this.type||"password"===this.type||"dropdown"===this.type||"date"===this.type||this.hasEndIcon}get showsIconArea(){return"search"===this.type&&!this.hasIcon||this.hasIcon}renderIconContent(){return"search"!==this.type||this.hasIcon?n("slot",{name:"icon",onSlotchange:this.onIconSlotchange}):n("svg",{class:"bs-input__search-icon",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true"},n("circle",{cx:"7",cy:"7",r:"5",stroke:"currentColor","stroke-width":"1.3"}),n("path",{d:"M11 11L14.5 14.5",stroke:"currentColor","stroke-width":"1.3","stroke-linecap":"round"}))}renderEndIconContent(){return"number"===this.type?n("span",{class:"bs-input__stepper"},n("button",{type:"button",part:"control",class:"bs-input__stepper-btn","aria-label":"Increment",tabIndex:-1,disabled:this.disabled,onClick:this.onStepperIncrement},n("svg",{viewBox:"0 0 10 6",width:"10",height:"6","aria-hidden":"true"},n("path",{d:"M1 5L5 1L9 5",stroke:"currentColor","stroke-width":"1.3",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"}))),n("button",{type:"button",part:"control",class:"bs-input__stepper-btn","aria-label":"Decrement",tabIndex:-1,disabled:this.disabled,onClick:this.onStepperDecrement},n("svg",{viewBox:"0 0 10 6",width:"10",height:"6","aria-hidden":"true"},n("path",{d:"M1 1L5 5L9 1",stroke:"currentColor","stroke-width":"1.3",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"})))):"password"===this.type?n("button",{type:"button",part:"control",class:"bs-input__password-toggle","aria-label":this.passwordVisible?"Hide password":"Show password",disabled:this.disabled,onClick:this.onTogglePasswordVisibility},this.passwordVisible?n("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true"},n("path",{d:"M1 8C2.2 5.5 4.9 3 8 3C11.1 3 13.8 5.5 15 8C13.8 10.5 11.1 13 8 13C4.9 13 2.2 10.5 1 8Z",stroke:"currentColor","stroke-width":"1.2","stroke-linejoin":"round"}),n("circle",{cx:"8",cy:"8",r:"2",stroke:"currentColor","stroke-width":"1.2"}),n("path",{d:"M2 2L14 14",stroke:"currentColor","stroke-width":"1.2","stroke-linecap":"round"})):n("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true"},n("path",{d:"M1 8C2.2 5.5 4.9 3 8 3C11.1 3 13.8 5.5 15 8C13.8 10.5 11.1 13 8 13C4.9 13 2.2 10.5 1 8Z",stroke:"currentColor","stroke-width":"1.2","stroke-linejoin":"round"}),n("circle",{cx:"8",cy:"8",r:"2",stroke:"currentColor","stroke-width":"1.2"}))):"dropdown"===this.type?n("svg",{class:"bs-input__chevron",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true"},n("path",{d:"M4 6L8 10L12 6",stroke:"currentColor","stroke-width":"1.3","stroke-linecap":"round","stroke-linejoin":"round"})):"date"!==this.type||this.hasEndIcon?n("slot",{name:"end-icon",onSlotchange:this.onEndIconSlotchange}):n("svg",{class:"bs-input__calendar",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true"},n("rect",{x:"2",y:"3",width:"12",height:"11",rx:"1",stroke:"currentColor","stroke-width":"1.2"}),n("path",{d:"M2 6.5H14",stroke:"currentColor","stroke-width":"1.2"}),n("path",{d:"M5 1.5V4M11 1.5V4",stroke:"currentColor","stroke-width":"1.2","stroke-linecap":"round"}))}renderStandardControl(){return n("input",{id:"control",part:"control",class:"bs-input__control",type:"password"===this.type?this.passwordVisible?"text":"password":"dropdown"===this.type?"text":this.type,value:this.value,placeholder:this.placeholder,disabled:this.disabled,readOnly:"dropdown"===this.type,role:"dropdown"===this.type?"combobox":void 0,"aria-haspopup":"dropdown"===this.type?"listbox":void 0,"aria-expanded":"dropdown"===this.type?String(this.open):void 0,min:"number"===this.type?this.min:void 0,max:"number"===this.type?this.max:void 0,step:"number"===this.type?this.step:void 0,"aria-describedby":this.error||this.description?"description-or-error":void 0,"aria-invalid":this.error?"true":void 0,"aria-required":this.required?"true":void 0,onInput:this.onInput,onChange:this.onChange})}renderSelectControl(){return n("select",{id:"control",part:"control",class:"bs-input__control",disabled:this.disabled,"aria-describedby":this.error||this.description?"description-or-error":void 0,"aria-invalid":this.error?"true":void 0,"aria-required":this.required?"true":void 0,onInput:this.onInput,onChange:this.onChange},this.options.map((i=>n("option",{value:i.value,selected:i.value===this.value},i.label))))}renderTextareaControl(){return n("textarea",{id:"control",part:"control",class:"bs-input__control bs-input__control--textarea",rows:this.rows,value:this.value,placeholder:this.placeholder,disabled:this.disabled,"aria-describedby":this.error||this.description?"description-or-error":void 0,"aria-invalid":this.error?"true":void 0,"aria-required":this.required?"true":void 0,onInput:this.onInput,onChange:this.onChange})}renderChipControl(){return n("div",{class:"bs-input__chips"},this.chips.map((i=>n("bs-chip-informative",{part:"chip",class:"bs-input__chip",size:"sm",disabled:this.disabled},i,n("bs-icon-button",{part:"chip-remove",class:"bs-input__chip-remove",variant:"subtle",size:"md",ariaLabel:`Remove ${i}`,disabled:this.disabled,onClick:this.onChipRemove(i)},n(d,null))))),n("input",{id:"control",part:"control",class:"bs-input__control bs-input__chip-input",type:"text",value:this.chipDraft,placeholder:this.placeholder,disabled:this.disabled,"aria-required":this.required?"true":void 0,onInput:this.onChipDraftInput,onKeyDown:this.onChipDraftKeydown}))}renderInitialsField(){const i=this.disabled?"bs-input__field--disabled":"";return n("div",{class:"bs-input__initials-row"},n("div",{part:"field",class:`bs-input__field bs-input__field--initials-title ${this.error?"bs-input__field--error":""} ${i}`},n("select",{part:"control",class:"bs-input__control bs-input__title-select",disabled:this.disabled,onChange:this.onTitleChange},this.titleOptions.map((i=>n("option",{value:i,selected:i===this.initialsTitle},i)))),this.renderSelectChevron()),n("div",{part:"field",class:`bs-input__field bs-input__field--initials-value ${this.error?"bs-input__field--error":""} ${i}`},n("input",{id:"control",part:"control",class:"bs-input__control",type:"text",value:this.value,placeholder:this.placeholder,disabled:this.disabled,"aria-required":this.required?"true":void 0,onInput:this.onInput,onChange:this.onChange})))}renderSelectChevron(){return n("svg",{class:"bs-input__select-chevron",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true"},n("path",{d:"M4 6L8 10L12 6",stroke:"currentColor","stroke-width":"1.3","stroke-linecap":"round","stroke-linejoin":"round"}))}renderCountryControl(){return[n("select",{part:"control",class:"bs-input__control bs-input__country-select",disabled:this.disabled,onChange:this.onCountryChange},this.countryOptions.map((i=>n("option",{value:i.code,selected:i.code===this.country},i.flagIcon?`${i.flagIcon} `:"",i.code," ",i.label)))),this.renderSelectChevron(),n("input",{id:"control",part:"control",class:"bs-input__control",type:"text",value:this.value,placeholder:this.placeholder,disabled:this.disabled,"aria-required":this.required?"true":void 0,onInput:this.onInput,onChange:this.onChange})]}renderControl(){switch(this.type){case"select":return this.renderSelectControl();case"textarea":return this.renderTextareaControl();case"chip":return this.renderChipControl();case"country":return this.renderCountryControl();default:return this.renderStandardControl()}}renderField(){const i=["bs-input__field",this.error?"bs-input__field--error":"",this.disabled?"bs-input__field--disabled":"","textarea"===this.type?"bs-input__field--textarea":"","chip"===this.type?"bs-input__field--chip":""].filter(Boolean).join(" "),t="dropdown"===this.type;return n("div",{class:"bs-input__field-wrapper"},n("div",{part:"field",class:i,onClick:t?this.onDropdownToggle:void 0,onKeyDown:t?this.onDropdownKeydown:void 0},n("span",{part:"icon",class:"bs-input__icon "+(this.showsIconArea?"bs-input__icon--visible":"")},this.renderIconContent()),this.renderControl(),n("span",{part:"end-icon",class:"bs-input__end-icon "+(this.showsEndIconArea?"bs-input__end-icon--visible":"")},this.renderEndIconContent())),t&&this.open&&this.options.length>0&&n("bs-menu",{part:"menu",class:"bs-input__dropdown-menu",role:"listbox"},this.options.map((i=>n("bs-menu-item",{key:i.value,onBsSelect:this.onDropdownOptionSelect(i)},i.label)))))}renderPinField(){return this.pinInputs=[],n("div",{part:"field",class:`bs-input__field bs-input__field--pin ${this.error?"bs-input__field--error":""} ${this.disabled?"bs-input__field--disabled":""}`},Array.from({length:this.length}).map(((i,t)=>n("input",{id:0===t?"control":void 0,ref:i=>this.pinInputs[t]=i,part:"control",class:"bs-input__pin-cell",type:"text",inputMode:"numeric",maxLength:1,value:this.value[t]??"",disabled:this.disabled,"aria-required":this.required?"true":void 0,onInput:this.onPinInput(t),onKeyDown:this.onPinKeydown(t)}))))}render(){return n("div",{key:"6921873fb72be6f26a2389697f6b2f816d8011a9",class:"bs-input "+(this.error?"bs-input--error":"")},this.label&&n("label",{key:"64ec1ba4a6c8c87db6b45dfd38731adbdfd5d6a8",part:"label",class:"bs-input__label",htmlFor:"control"},this.label,this.required&&n("span",{key:"5176edfc672132f1c6aaec978002851ff27179a0",part:"required",class:"bs-input__required","aria-hidden":"true"},"*")),"pin"===this.type?this.renderPinField():"initials"===this.type?this.renderInitialsField():this.renderField(),this.error?n("span",{id:"description-or-error",part:"error",class:"bs-input__error"},n("svg",{part:"error-icon",class:"bs-input__error-icon",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true"},n("circle",{cx:"8",cy:"8",r:"6.5",stroke:"currentColor","stroke-width":"1.2"}),n("path",{d:"M8 5V8.5",stroke:"currentColor","stroke-width":"1.2","stroke-linecap":"round"}),n("circle",{cx:"8",cy:"11",r:"0.75",fill:"currentColor"})),this.error):this.description?n("span",{id:"description-or-error",part:"description",class:"bs-input__description"},this.description):null)}static get delegatesFocus(){return!0}static get formAssociated(){return!0}static get watchers(){return{value:[{onFormStateChange:0}],type:[{onFormStateChange:0}],chips:[{onFormStateChange:0}],required:[{onFormStateChange:0}]}}static get style(){return":host{display:block;--bs-input-radius:var(--bs-border-radius-100);--bs-input-height:var(--bs-spacing-550);--bs-input-padding-x:var(--bs-spacing-150);--bs-input-padding-y:var(--bs-spacing-100);--bs-input-gap:var(--bs-spacing-200);--bs-input-icon-size:var(--bs-spacing-300);--bs-input-stack-gap:var(--bs-spacing-50);--bs-input-error-icon-size:var(--bs-spacing-250);--bs-input-field-bg:var(--bs-input-bg-default);--bs-input-field-bg-disabled:var(--bs-input-bg-disabled);--bs-input-field-border:var(--bs-input-border-default);--bs-input-field-border-hover:var(--bs-input-border-hover);--bs-input-field-border-focus:var(--bs-input-border-focus);--bs-input-field-border-error:var(--bs-input-border-error);--bs-input-field-text:var(--bs-input-text);--bs-input-field-placeholder:var(--bs-input-placeholder);--bs-input-label-color:var(--bs-input-label);--bs-input-label-font-size:var(--bs-font-size-sm);--bs-input-label-font-weight:var(--bs-font-weight-medium);--bs-input-label-line-height:normal;--bs-input-description-color:var(--bs-input-description);--bs-input-error-color:var(--bs-input-error);--bs-input-icon-color:var(--bs-icon-muted);--bs-input-icon-color-error:var(--bs-input-icon-error);--bs-input-icon-color-disabled:var(--bs-input-icon-disabled);--bs-input-initials-title-width:80px;--bs-input-initials-gap:var(--bs-spacing-50)}.bs-input{display:flex;flex-direction:column;gap:var(--bs-input-stack-gap);font-family:inherit}.bs-input__label{font-size:var(--bs-input-label-font-size);font-weight:var(--bs-input-label-font-weight);line-height:var(--bs-input-label-line-height);color:var(--bs-input-label-color)}.bs-input__required{color:var(--bs-input-error-color);margin-inline-start:2px}.bs-input__field{box-sizing:border-box;display:flex;align-items:center;gap:var(--bs-input-gap);height:var(--bs-input-height);padding:var(--bs-input-padding-y) var(--bs-input-padding-x);border:1px solid var(--bs-input-field-border);border-radius:var(--bs-input-radius);background:var(--bs-input-field-bg)}.bs-input__field:hover:not(.bs-input__field--disabled){border-color:var(--bs-input-field-border-hover)}.bs-input__field:focus-within{border-color:var(--bs-input-field-border-focus)}.bs-input__field--error{border-color:var(--bs-input-field-border-error)}.bs-input__field--disabled{background:var(--bs-input-field-bg-disabled);cursor:not-allowed}.bs-input__control{flex:1;min-width:0;border:none;outline:none;padding:0;background:transparent;color:var(--bs-input-field-text);font-size:var(--bs-font-size-md);font-family:inherit}.bs-input__control::placeholder{color:var(--bs-input-field-placeholder)}.bs-input__control:disabled{color:var(--bs-input-text-disabled);cursor:not-allowed}.bs-input__control::-webkit-strong-password-auto-fill-button,.bs-input__control::-webkit-credentials-auto-fill-button{display:none !important;visibility:hidden;pointer-events:none;position:absolute;inset-inline-end:0}.bs-input__control::-webkit-textfield-decoration-container{visibility:hidden}.bs-input__control::-ms-reveal,.bs-input__control::-ms-clear{display:none}.bs-input--error .bs-input__label{color:var(--bs-input-label-color)}.bs-input__icon,.bs-input__end-icon{display:none;align-items:center;flex-shrink:0;color:var(--bs-input-icon-color)}.bs-input__icon--visible,.bs-input__end-icon--visible{display:flex}.bs-input__icon ::slotted(*),.bs-input__end-icon ::slotted(*){display:block;width:var(--bs-input-icon-size);height:var(--bs-input-icon-size)}.bs-input__field--error .bs-input__icon,.bs-input__field--error .bs-input__end-icon{color:var(--bs-input-icon-color-error)}.bs-input__field--disabled .bs-input__icon,.bs-input__field--disabled .bs-input__end-icon{color:var(--bs-input-icon-color-disabled)}.bs-input__description{font-size:var(--bs-font-size-xs);color:var(--bs-input-description-color)}.bs-input__error{display:flex;align-items:center;gap:var(--bs-input-stack-gap);font-size:var(--bs-font-size-xs);color:var(--bs-input-error-color)}.bs-input__error-icon{flex-shrink:0;width:var(--bs-input-error-icon-size);height:var(--bs-input-error-icon-size)}.bs-input__field--textarea{height:auto;align-items:flex-start}.bs-input__control--textarea{resize:vertical}.bs-input__stepper{display:flex;flex-direction:column}.bs-input__stepper-btn{display:flex;align-items:center;justify-content:center;border:none;background:transparent;color:inherit;padding:0;cursor:pointer}.bs-input__stepper-btn:disabled{cursor:not-allowed}.bs-input__password-toggle{display:flex;align-items:center;justify-content:center;border:none;background:transparent;color:inherit;padding:0;cursor:pointer;width:var(--bs-input-icon-size);height:var(--bs-input-icon-size)}.bs-input__password-toggle:disabled{cursor:not-allowed}.bs-input__password-toggle svg{width:100%;height:100%}.bs-input__chevron{width:var(--bs-input-icon-size);height:var(--bs-input-icon-size)}.bs-input__field-wrapper{position:relative;width:100%}.bs-input__dropdown-menu{position:absolute;top:calc(100% + var(--bs-input-stack-gap));inset-inline-start:0;inset-inline-end:0;z-index:1}.bs-input__calendar{width:var(--bs-input-icon-size);height:var(--bs-input-icon-size)}.bs-input__search-icon{width:var(--bs-input-icon-size);height:var(--bs-input-icon-size)}.bs-input__field--chip{flex-wrap:wrap;height:auto;min-height:var(--bs-input-height)}.bs-input__chips{display:flex;flex-wrap:wrap;align-items:center;gap:var(--bs-spacing-100);flex:1;min-width:0}.bs-input__chip{--bs-chip-informative-padding-x-plain-side:var(--bs-spacing-150)}.bs-input__chip-remove{--bs-icon-button-size-xs:20px;--bs-icon-button-icon-size-xs:12px;margin-inline-end:calc(var(--bs-spacing-50) * -1)}.bs-input__chip-input{flex:1;min-width:60px}.bs-input__country-select{flex-shrink:0;width:auto;border:none;outline:none;background:transparent;color:var(--bs-input-field-text);font-size:var(--bs-font-size-md);font-family:inherit}.bs-input__title-select,.bs-input__country-select{appearance:none;-webkit-appearance:none;-moz-appearance:none}.bs-input__title-select::-ms-expand,.bs-input__country-select::-ms-expand{display:none}.bs-input__select-chevron{flex-shrink:0;width:var(--bs-input-icon-size);height:var(--bs-input-icon-size);color:var(--bs-input-icon-color);pointer-events:none}.bs-input__field--disabled .bs-input__select-chevron{color:var(--bs-input-icon-color-disabled)}.bs-input__initials-row{display:flex;gap:var(--bs-input-initials-gap);width:100%}.bs-input__field--initials-title{flex:0 0 auto;width:var(--bs-input-initials-title-width);gap:var(--bs-spacing-50)}.bs-input__field--initials-title .bs-input__select-chevron{width:10px;height:10px}.bs-input__field--initials-value{flex:1;min-width:0}.bs-input__country-select{width:auto}.bs-input__field--pin{border:none;padding:0;background:transparent;gap:var(--bs-input-gap)}.bs-input__pin-cell{box-sizing:border-box;width:var(--bs-input-height);height:var(--bs-input-height);text-align:center;border:1px solid var(--bs-input-field-border);border-radius:var(--bs-input-radius);background:var(--bs-input-field-bg);color:var(--bs-input-field-text);font-size:var(--bs-font-size-md);font-family:inherit;outline:none}.bs-input__pin-cell:focus{border-color:var(--bs-input-field-border-focus)}.bs-input__field--pin.bs-input__field--disabled .bs-input__pin-cell{background:var(--bs-input-field-bg-disabled);cursor:not-allowed}.bs-input__field--pin.bs-input__field--error .bs-input__pin-cell{border-color:var(--bs-input-field-border-error)}@media (forced-colors: active){.bs-input__control{border:1px solid FieldText}.bs-input__control:focus-visible{outline:2px solid Highlight;outline-offset:2px}}"}},[849,"bs-input",{name:[513],value:[1025],type:[1],label:[1],placeholder:[1],description:[1],error:[1],disabled:[516],required:[4],step:[2],min:[2],max:[2],options:[16],rows:[2],chips:[16],titleOptions:[16],initialsTitle:[1,"initials-title"],countryOptions:[16],country:[1],length:[2],open:[1540],hasIcon:[32],hasEndIcon:[32],passwordVisible:[32],chipDraft:[32]},[[0,"keydown","onHostKeydown"],[0,"focusout","onHostFocusOut"]],{value:[{onFormStateChange:0}],type:[{onFormStateChange:0}],chips:[{onFormStateChange:0}],required:[{onFormStateChange:0}]}]),d=()=>n("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},n("path",{d:"M18.75 5.25L5.25 18.75",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),n("path",{d:"M18.75 18.75L5.25 5.25",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}));function h(){"undefined"!=typeof customElements&&["bs-input","bs-chip-informative","bs-icon-button","bs-menu","bs-menu-item"].forEach((t=>{switch(t){case"bs-input":customElements.get(i(t))||customElements.define(i(t),p);break;case"bs-chip-informative":customElements.get(i(t))||r();break;case"bs-icon-button":customElements.get(i(t))||o();break;case"bs-menu":customElements.get(i(t))||a();break;case"bs-menu-item":customElements.get(i(t))||l()}}))}h();export{p as B,h as d}
|
package/dist/esm/brandsync-wc.js
CHANGED
|
@@ -16,5 +16,5 @@ var patchBrowser = () => {
|
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(async (options) => {
|
|
18
18
|
await globalScripts();
|
|
19
|
-
return bootstrapLazy(JSON.parse("[[\"bs-session-timeout\",[[769,\"bs-session-timeout\",{\"type\":[513],\"heading\":[1],\"headingLevel\":[2,\"heading-level\"],\"description\":[1],\"hideIcon\":[4,\"hide-icon\"],\"primaryLabel\":[1,\"primary-label\"],\"secondaryLabel\":[1,\"secondary-label\"],\"secondsLeft\":[1026,\"seconds-left\"],\"totalSeconds\":[2,\"total-seconds\"],\"countdown\":[4],\"timeLeftLabel\":[1,\"time-left-label\"],\"secondsLeftLabel\":[1,\"seconds-left-label\"],\"savedMessage\":[1,\"saved-message\"],\"accountName\":[1,\"account-name\"],\"accountEmail\":[1,\"account-email\"],\"accountInitials\":[1,\"account-initials\"],\"passwordLabel\":[1,\"password-label\"],\"passwordError\":[1,\"password-error\"],\"dividerLabel\":[1,\"divider-label\"],\"alternatives\":[16],\"cancelLabel\":[1,\"cancel-label\"],\"password\":[32],\"announcement\":[32],\"initialTotal\":[32]},null,{\"countdown\":[{\"onTimerInputsChange\":0}],\"type\":[{\"onTimerInputsChange\":0}]}]]],[\"bs-cookie-consent\",[[769,\"bs-cookie-consent\",{\"type\":[513],\"heading\":[1],\"headingLevel\":[2,\"heading-level\"],\"description\":[1],\"policyUrl\":[1,\"policy-url\"],\"policyLabel\":[1,\"policy-label\"],\"customiseLabel\":[1,\"customise-label\"],\"rejectLabel\":[1,\"reject-label\"],\"acceptLabel\":[1,\"accept-label\"],\"saveLabel\":[1,\"save-label\"],\"changeLabel\":[1,\"change-label\"],\"alwaysOnLabel\":[1,\"always-on-label\"],\"seeCookiesLabel\":[1,\"see-cookies-label\"],\"closeLabel\":[1,\"close-label\"],\"categories\":[16],\"choices\":[32],\"open\":[32]},null,{\"categories\":[{\"onCategoriesChange\":0}]}]]],[\"bs-whats-new\",[[769,\"bs-whats-new\",{\"type\":[513],\"heading\":[1],\"headingLevel\":[2,\"heading-level\"],\"closable\":[4],\"closeLabel\":[1,\"close-label\"],\"entries\":[16],\"filters\":[16],\"filter\":[1537],\"markAllReadLabel\":[1,\"mark-all-read-label\"],\"releaseNotesLabel\":[1,\"release-notes-label\"],\"releaseNotesUrl\":[1,\"release-notes-url\"],\"emptyLabel\":[1,\"empty-label\"],\"tag\":[1],\"tagColor\":[1,\"tag-color\"],\"image\":[1],\"points\":[16],\"step\":[2],\"total\":[2],\"stepLabel\":[1,\"step-label\"],\"secondaryLabel\":[1,\"secondary-label\"],\"primaryLabel\":[1,\"primary-label\"],\"date\":[1],\"description\":[1],\"actionLabel\":[1,\"action-label\"],\"hasHeroSlot\":[32]}]]],[\"bs-onboarding-checklist\",[[769,\"bs-onboarding-checklist\",{\"type\":[513],\"launcherLayout\":[513,\"launcher-layout\"],\"steps\":[16],\"heading\":[1],\"description\":[1],\"headingLevel\":[2,\"heading-level\"],\"progressText\":[1,\"progress-text\"],\"closable\":[4],\"progressLabel\":[1,\"progress-label\"],\"skipLabel\":[1,\"skip-label\"],\"startLabel\":[1,\"start-label\"],\"seeAllLabel\":[1,\"see-all-label\"],\"afterLabel\":[1,\"after-label\"],\"doneLabel\":[1,\"done-label\"],\"hideLabel\":[1,\"hide-label\"],\"closeLabel\":[1,\"close-label\"],\"statusDoneLabel\":[1,\"status-done-label\"],\"statusTodoLabel\":[1,\"status-todo-label\"]}]]],[\"bs-timepicker\",[[577,\"bs-timepicker\",{\"name\":[513],\"value\":[1537],\"format\":[1537],\"minuteStep\":[2,\"minute-step\"],\"heading\":[1],\"formatLabel\":[1,\"format-label\"],\"confirmLabel\":[1,\"confirm-label\"],\"cancelLabel\":[1,\"cancel-label\"],\"hourLabel\":[1,\"hour-label\"],\"minuteLabel\":[1,\"minute-label\"],\"periodLabel\":[1,\"period-label\"],\"hour\":[32],\"minute\":[32]},null,{\"value\":[{\"onValueChange\":0}],\"name\":[{\"onNameChange\":0}]}]]],[\"bs-qr-code\",[[769,\"bs-qr-code\",{\"type\":[513],\"size\":[513],\"state\":[513],\"heading\":[1],\"description\":[1],\"url\":[1],\"amount\":[1],\"amountLabel\":[1,\"amount-label\"],\"expiry\":[1],\"matrix\":[16],\"codeLabel\":[1,\"code-label\"],\"closable\":[4],\"hideActions\":[4,\"hide-actions\"],\"hideDownload\":[4,\"hide-download\"],\"hideCopy\":[4,\"hide-copy\"],\"downloadLabel\":[1,\"download-label\"],\"copyLabel\":[1,\"copy-label\"],\"retryLabel\":[1,\"retry-label\"],\"refreshLabel\":[1,\"refresh-label\"],\"loadingLabel\":[1,\"loading-label\"],\"errorLabel\":[1,\"error-label\"],\"expiredLabel\":[1,\"expired-label\"],\"scannedLabel\":[1,\"scanned-label\"],\"closeLabel\":[1,\"close-label\"],\"hasLogo\":[32]}]]],[\"bs-datepicker\",[[577,\"bs-datepicker\",{\"name\":[513],\"range\":[516],\"value\":[1537],\"start\":[1537],\"end\":[1537],\"min\":[1],\"max\":[1],\"locale\":[1],\"firstDayOfWeek\":[2,\"first-day-of-week\"],\"startLabel\":[1,\"start-label\"],\"endLabel\":[1,\"end-label\"],\"monthLabel\":[1,\"month-label\"],\"yearLabel\":[1,\"year-label\"],\"previousLabel\":[1,\"previous-label\"],\"nextLabel\":[1,\"next-label\"],\"viewDate\":[32],\"focusedIso\":[32],\"hoverIso\":[32],\"draft\":[32],\"openMenu\":[32]},null,{\"value\":[{\"onSelectionChange\":0},{\"onSelectionJump\":0}],\"start\":[{\"onSelectionChange\":0},{\"onSelectionJump\":0}],\"end\":[{\"onSelectionChange\":0}],\"range\":[{\"onSelectionChange\":0}],\"name\":[{\"onSelectionChange\":0}]}]]],[\"bs-product-tour\",[[769,\"bs-product-tour\",{\"type\":[513],\"direction\":[513],\"heading\":[1],\"description\":[1],\"step\":[2],\"total\":[2],\"progressLabel\":[1,\"progress-label\"],\"primaryLabel\":[1,\"primary-label\"],\"secondaryLabel\":[1,\"secondary-label\"],\"closable\":[4],\"closeLabel\":[1,\"close-label\"]}]]],[\"bs-carousel\",[[769,\"bs-carousel\",{\"tracker\":[1],\"slidesPerView\":[2,\"slides-per-view\"],\"currentPage\":[1538,\"current-page\"],\"autoplay\":[4],\"interval\":[2],\"paused\":[1540],\"label\":[1],\"previousLabel\":[1,\"previous-label\"],\"nextLabel\":[1,\"next-label\"],\"pauseLabel\":[1,\"pause-label\"],\"playLabel\":[1,\"play-label\"],\"slideCount\":[32],\"interacting\":[32]},[[1,\"mouseenter\",\"onMouseEnter\"],[1,\"mouseleave\",\"onMouseLeave\"],[0,\"focusin\",\"onFocusIn\"],[0,\"focusout\",\"onFocusOut\"]],{\"currentPage\":[{\"onCurrentPageChange\":0}],\"autoplay\":[{\"updateTimer\":0}],\"paused\":[{\"updateTimer\":0}],\"interval\":[{\"updateTimer\":0}],\"interacting\":[{\"updateTimer\":0}],\"slideCount\":[{\"updateTimer\":0}],\"slidesPerView\":[{\"updateTimer\":0}]}]]],[\"bs-error-page\",[[769,\"bs-error-page\",{\"type\":[513],\"code\":[1],\"heading\":[1],\"headingLevel\":[2,\"heading-level\"],\"description\":[1],\"primaryLabel\":[1,\"primary-label\"],\"secondaryLabel\":[1,\"secondary-label\"],\"reference\":[1]}]]],[\"bs-file-upload-item\",[[769,\"bs-file-upload-item\",{\"state\":[513],\"fileName\":[1,\"file-name\"],\"fileSize\":[1,\"file-size\"],\"progress\":[2],\"message\":[1],\"thumbnailSrc\":[1,\"thumbnail-src\"],\"thumbnailAlt\":[1,\"thumbnail-alt\"],\"cancelLabel\":[1,\"cancel-label\"],\"removeLabel\":[1,\"remove-label\"]}]]],[\"bs-attachment\",[[513,\"bs-attachment\",{\"type\":[1],\"fileName\":[1,\"file-name\"],\"imageSrc\":[1,\"image-src\"],\"imageAlt\":[1,\"image-alt\"],\"loading\":[4],\"removable\":[4]}]]],[\"bs-breadcrumb-overflow\",[[513,\"bs-breadcrumb-overflow\",{\"items\":[16],\"overflowLabel\":[1,\"overflow-label\"],\"size\":[513],\"open\":[32]},[[0,\"keydown\",\"onHostKeydown\"],[0,\"focusout\",\"onHostFocusOut\"]]]]],[\"bs-chatbot-header\",[[769,\"bs-chatbot-header\",{\"heading\":[1],\"expanded\":[1540]}]]],[\"bs-dialog\",[[769,\"bs-dialog\",{\"open\":[1540],\"heading\":[1],\"size\":[1],\"centered\":[516],\"hasFooter\":[32],\"hasImage\":[32],\"hasIcon\":[32]},[[4,\"keydown\",\"onKeydown\"],[4,\"focusin\",\"onFocusIn\"]]]]],[\"bs-file-upload\",[[769,\"bs-file-upload\",{\"direction\":[513],\"heading\":[1],\"description\":[1],\"buttonLabel\":[1,\"button-label\"],\"accept\":[1],\"multiple\":[4],\"disabled\":[516],\"dragging\":[1540]}]]],[\"bs-navigation-drawer\",[[769,\"bs-navigation-drawer\",{\"heading\":[1],\"collapsible\":[4],\"collapsed\":[1540],\"logoBackground\":[1,\"logo-background\"],\"showLogo\":[4,\"show-logo\"],\"open\":[1540],\"mobile\":[32]},[[4,\"keydown\",\"onDocumentKeydown\"],[4,\"focusin\",\"onDocumentFocusIn\"]],{\"collapsed\":[{\"onCollapsedChange\":0}],\"mobile\":[{\"onMobileChange\":0}],\"open\":[{\"onOpenChange\":0}]}]]],[\"bs-navigation-header\",[[769,\"bs-navigation-header\",{\"alignment\":[1],\"ariaLabel\":[1,\"aria-label\"],\"skipToContentHref\":[1,\"skip-to-content-href\"],\"skipToContentLabel\":[1,\"skip-to-content-label\"],\"logoBackground\":[1,\"logo-background\"]}]]],[\"bs-accordion\",[[769,\"bs-accordion\",{\"expanded\":[516],\"size\":[1],\"disabled\":[4],\"showIcon\":[4,\"show-icon\"],\"showPreview\":[4,\"show-preview\"]}]]],[\"bs-ai-disclaimer\",[[257,\"bs-ai-disclaimer\"]]],[\"bs-ai-greeting\",[[513,\"bs-ai-greeting\",{\"assistantName\":[1,\"assistant-name\"],\"productName\":[1,\"product-name\"]}]]],[\"bs-ai-thinking\",[[513,\"bs-ai-thinking\",{\"label\":[1]}]]],[\"bs-attachment-list\",[[769,\"bs-attachment-list\",{\"ariaLabel\":[1,\"aria-label\"],\"canScrollRight\":[32]}]]],[\"bs-badge\",[[769,\"bs-badge\",{\"variant\":[1]}]]],[\"bs-breadcrumb\",[[769,\"bs-breadcrumb\",{\"href\":[1],\"current\":[516],\"size\":[513]}]]],[\"bs-breadcrumbs\",[[769,\"bs-breadcrumbs\",{\"label\":[1],\"size\":[1]},null,{\"size\":[{\"onSizeChange\":0}]}]]],[\"bs-button-skeleton\",[[513,\"bs-button-skeleton\",{\"size\":[1]}]]],[\"bs-chatbot-feedback\",[[513,\"bs-chatbot-feedback\",{\"rating\":[1538],\"submitted\":[1540],\"comment\":[1025],\"heading\":[1],\"subtitle\":[1]}]]],[\"bs-chatbot-response-action\",[[769,\"bs-chatbot-response-action\",{\"sourcesCount\":[2,\"sources-count\"],\"menuOpen\":[1540,\"menu-open\"]},[[4,\"click\",\"onDocumentClick\"],[4,\"keydown\",\"onKeydown\"]]]]],[\"bs-chatbot-sources-drawer\",[[769,\"bs-chatbot-sources-drawer\",{\"heading\":[1],\"count\":[2],\"slottedCount\":[32]}]]],[\"bs-chatbot-suggestion-button\",[[769,\"bs-chatbot-suggestion-button\",{\"disabled\":[4]}]]],[\"bs-checkbox\",[[849,\"bs-checkbox\",{\"name\":[513],\"value\":[1],\"required\":[4],\"size\":[1],\"checked\":[1540],\"indeterminate\":[1540],\"disabled\":[516],\"error\":[4],\"ariaLabel\":[1,\"aria-label\"]},null,{\"checked\":[{\"syncFormValue\":0}],\"value\":[{\"syncFormValue\":0}],\"required\":[{\"syncFormValue\":0}],\"indeterminate\":[{\"onIndeterminateChange\":0}]}]]],[\"bs-checkbox-skeleton\",[[513,\"bs-checkbox-skeleton\",{\"size\":[1]}]]],[\"bs-chip-filter\",[[785,\"bs-chip-filter\",{\"size\":[1],\"selected\":[516],\"dropdown\":[4],\"disabled\":[4],\"ariaLabel\":[1,\"aria-label\"],\"hasIcon\":[32]}]]],[\"bs-chip-input\",[[785,\"bs-chip-input\",{\"size\":[1],\"selected\":[1540],\"disabled\":[516],\"hasIcon\":[32],\"labelText\":[32]}]]],[\"bs-composer\",[[785,\"bs-composer\",{\"variant\":[1],\"placeholder\":[1],\"value\":[1025],\"state\":[513],\"ariaLabel\":[1,\"aria-label\"],\"hasAttachments\":[32]}]]],[\"bs-composer-status-banner\",[[769,\"bs-composer-status-banner\",{\"type\":[1],\"message\":[1],\"showIcon\":[4,\"show-icon\"],\"showButton\":[4,\"show-button\"],\"actionLabel\":[1,\"action-label\"],\"allowClose\":[4,\"allow-close\"]}]]],[\"bs-data-table\",[[513,\"bs-data-table\",{\"columns\":[16],\"rows\":[16],\"sortColumn\":[1,\"sort-column\"],\"sortDirection\":[1,\"sort-direction\"],\"selectable\":[4],\"cellRenderer\":[16],\"selectedIds\":[32],\"clearSelection\":[64]}]]],[\"bs-inline-tab\",[[769,\"bs-inline-tab\",{\"selected\":[516],\"disabled\":[4],\"ariaLabel\":[1,\"aria-label\"],\"value\":[513],\"tabbable\":[4],\"hasIcon\":[32],\"hasLabel\":[32]}]]],[\"bs-navigation-drawer-item\",[[769,\"bs-navigation-drawer-item\",{\"selected\":[516],\"expandable\":[4],\"expanded\":[1540],\"nested\":[4],\"ariaLabel\":[1,\"aria-label\"],\"collapsed\":[516],\"hasIcon\":[32]}]]],[\"bs-radio\",[[849,\"bs-radio\",{\"name\":[513],\"value\":[1],\"checked\":[1540],\"disabled\":[516],\"groupHasChecked\":[32]},[[4,\"bsChange\",\"onAnyRadioChange\"]],{\"checked\":[{\"onCheckedChange\":0}],\"value\":[{\"onCheckedChange\":0}]}]]],[\"bs-slider\",[[593,\"bs-slider\",{\"type\":[1],\"name\":[513],\"showLabel\":[4,\"show-label\"],\"label\":[1],\"min\":[2],\"max\":[2],\"step\":[2],\"value\":[1026],\"valueStart\":[1026,\"value-start\"],\"valueEnd\":[1026,\"value-end\"],\"segments\":[2],\"disabled\":[516],\"ariaLabel\":[1,\"aria-label\"]},null,{\"value\":[{\"syncFormValue\":0}],\"valueStart\":[{\"syncFormValue\":0}],\"valueEnd\":[{\"syncFormValue\":0}],\"type\":[{\"syncFormValue\":0}]}]]],[\"bs-source-link\",[[769,\"bs-source-link\",{\"fileName\":[1,\"file-name\"],\"sourceName\":[1,\"source-name\"],\"version\":[1],\"href\":[1],\"target\":[1]}]]],[\"bs-stepper\",[[769,\"bs-stepper\",{\"currentStep\":[2,\"current-step\"],\"direction\":[513],\"showDescription\":[4,\"show-description\"]},null,{\"currentStep\":[{\"onPropChange\":0}],\"direction\":[{\"onPropChange\":0}],\"showDescription\":[{\"onPropChange\":0}]}]]],[\"bs-stepper-step\",[[513,\"bs-stepper-step\",{\"name\":[1],\"description\":[1],\"error\":[4],\"disabled\":[4],\"computedState\":[1,\"computed-state\"],\"direction\":[1],\"showDescription\":[4,\"show-description\"]}]]],[\"bs-toast\",[[769,\"bs-toast\",{\"state\":[1]}]]],[\"bs-snackbar\",[[769,\"bs-snackbar\",{\"variant\":[1],\"loading\":[4],\"actionLabel\":[1,\"action-label\"],\"actionVariant\":[1,\"action-variant\"],\"hideClose\":[4,\"hide-close\"]}]]],[\"bs-avatar\",[[513,\"bs-avatar\",{\"type\":[1],\"size\":[1],\"initials\":[1],\"src\":[1],\"alt\":[1],\"ariaLabel\":[1,\"aria-label\"],\"disabled\":[516]}]]],[\"bs-pagination\",[[513,\"bs-pagination\",{\"totalPages\":[2,\"total-pages\"],\"currentPage\":[1538,\"current-page\"],\"siblingCount\":[2,\"sibling-count\"],\"previousLabel\":[1,\"previous-label\"],\"nextLabel\":[1,\"next-label\"]}]]],[\"bs-tooltip\",[[769,\"bs-tooltip\",{\"placement\":[1]}]]],[\"bs-logo\",[[513,\"bs-logo\",{\"variant\":[1],\"background\":[1],\"src\":[1],\"alt\":[1]}]]],[\"bs-progress\",[[513,\"bs-progress\",{\"type\":[1],\"size\":[1],\"strokeWidth\":[2,\"stroke-width\"],\"value\":[2],\"showLabel\":[4,\"show-label\"],\"ariaLabel\":[1,\"aria-label\"]}]]],[\"bs-switch\",[[849,\"bs-switch\",{\"name\":[513],\"value\":[1],\"size\":[1],\"checked\":[1540],\"disabled\":[516],\"ariaLabel\":[1,\"aria-label\"]},null,{\"checked\":[{\"syncFormValue\":0}],\"value\":[{\"syncFormValue\":0}]}]]],[\"bs-progress-linear\",[[769,\"bs-progress-linear\",{\"type\":[1],\"size\":[1],\"value\":[2],\"showLabel\":[4,\"show-label\"],\"ariaLabel\":[1,\"aria-label\"],\"hasLabelContent\":[32]}]]],[\"bs-chip-informative\",[[769,\"bs-chip-informative\",{\"color\":[1],\"size\":[1],\"disabled\":[516],\"hasIcon\":[32]}]]],[\"bs-icon-tile\",[[769,\"bs-icon-tile\",{\"size\":[513],\"intent\":[513],\"label\":[1],\"hasCustomIcon\":[32],\"hasText\":[32]}]]],[\"bs-card\",[[769,\"bs-card\",{\"surface\":[513],\"hasImage\":[32]}]]],[\"bs-icon-button\",[[849,\"bs-icon-button\",{\"variant\":[1],\"size\":[1],\"disabled\":[4],\"type\":[1],\"ariaLabel\":[1,\"aria-label\"]}]]],[\"bs-button\",[[849,\"bs-button\",{\"variant\":[1],\"size\":[1],\"disabled\":[4],\"type\":[1],\"ariaLabel\":[1,\"aria-label\"],\"hasIcon\":[32],\"hasEndIcon\":[32],\"hasLabel\":[32]}]]],[\"bs-tab_3\",[[769,\"bs-whats-new-entry\",{\"tag\":[1],\"tagColor\":[1,\"tag-color\"],\"date\":[1],\"unread\":[516],\"heading\":[1],\"headingLevel\":[2,\"heading-level\"],\"description\":[1],\"actionLabel\":[1,\"action-label\"],\"divider\":[4],\"unreadLabel\":[1,\"unread-label\"],\"hasImage\":[32]}],[769,\"bs-tab\",{\"selected\":[516],\"disabled\":[4],\"iconPosition\":[1,\"icon-position\"],\"ariaLabel\":[1,\"aria-label\"],\"value\":[513],\"tabbable\":[4],\"hasIcon\":[32],\"hasLabel\":[32],\"hasBadge\":[32]}],[769,\"bs-tabs\",{\"type\":[1],\"orientation\":[1],\"value\":[1537]},[[0,\"bsSelect\",\"onTabSelect\"],[0,\"keydown\",\"onKeyDown\"]],{\"value\":[{\"onValueChange\":0}],\"orientation\":[{\"syncRovingTabindex\":0}]}]]],[\"bs-input_3\",[[849,\"bs-input\",{\"name\":[513],\"value\":[1025],\"type\":[1],\"label\":[1],\"placeholder\":[1],\"description\":[1],\"error\":[1],\"disabled\":[516],\"required\":[4],\"step\":[2],\"min\":[2],\"max\":[2],\"options\":[16],\"rows\":[2],\"chips\":[16],\"titleOptions\":[16],\"initialsTitle\":[1,\"initials-title\"],\"countryOptions\":[16],\"country\":[1],\"length\":[2],\"open\":[1540],\"hasIcon\":[32],\"hasEndIcon\":[32],\"passwordVisible\":[32],\"chipDraft\":[32]},[[0,\"keydown\",\"onHostKeydown\"],[0,\"focusout\",\"onHostFocusOut\"]],{\"value\":[{\"onFormStateChange\":0}],\"type\":[{\"onFormStateChange\":0}],\"chips\":[{\"onFormStateChange\":0}],\"required\":[{\"onFormStateChange\":0}]}],[769,\"bs-menu-item\",{\"disabled\":[4],\"hasIcon\":[32]}],[257,\"bs-menu\",null,[[0,\"keydown\",\"onKeyDown\"]]]]]]"), options);
|
|
19
|
+
return bootstrapLazy(JSON.parse("[[\"bs-session-timeout\",[[769,\"bs-session-timeout\",{\"type\":[513],\"heading\":[1],\"headingLevel\":[2,\"heading-level\"],\"description\":[1],\"hideIcon\":[4,\"hide-icon\"],\"primaryLabel\":[1,\"primary-label\"],\"secondaryLabel\":[1,\"secondary-label\"],\"secondsLeft\":[1026,\"seconds-left\"],\"totalSeconds\":[2,\"total-seconds\"],\"countdown\":[4],\"timeLeftLabel\":[1,\"time-left-label\"],\"secondsLeftLabel\":[1,\"seconds-left-label\"],\"savedMessage\":[1,\"saved-message\"],\"accountName\":[1,\"account-name\"],\"accountEmail\":[1,\"account-email\"],\"accountInitials\":[1,\"account-initials\"],\"passwordLabel\":[1,\"password-label\"],\"passwordError\":[1,\"password-error\"],\"dividerLabel\":[1,\"divider-label\"],\"alternatives\":[16],\"cancelLabel\":[1,\"cancel-label\"],\"password\":[32],\"announcement\":[32],\"initialTotal\":[32]},null,{\"countdown\":[{\"onTimerInputsChange\":0}],\"type\":[{\"onTimerInputsChange\":0}]}]]],[\"bs-timepicker\",[[577,\"bs-timepicker\",{\"name\":[513],\"value\":[1537],\"format\":[1537],\"minuteStep\":[2,\"minute-step\"],\"heading\":[1],\"formatLabel\":[1,\"format-label\"],\"confirmLabel\":[1,\"confirm-label\"],\"cancelLabel\":[1,\"cancel-label\"],\"hourLabel\":[1,\"hour-label\"],\"minuteLabel\":[1,\"minute-label\"],\"periodLabel\":[1,\"period-label\"],\"hour\":[32],\"minute\":[32]},null,{\"value\":[{\"onValueChange\":0}],\"name\":[{\"onNameChange\":0}]}]]],[\"bs-cookie-consent\",[[769,\"bs-cookie-consent\",{\"type\":[513],\"heading\":[1],\"headingLevel\":[2,\"heading-level\"],\"description\":[1],\"policyUrl\":[1,\"policy-url\"],\"policyLabel\":[1,\"policy-label\"],\"customiseLabel\":[1,\"customise-label\"],\"rejectLabel\":[1,\"reject-label\"],\"acceptLabel\":[1,\"accept-label\"],\"saveLabel\":[1,\"save-label\"],\"changeLabel\":[1,\"change-label\"],\"alwaysOnLabel\":[1,\"always-on-label\"],\"seeCookiesLabel\":[1,\"see-cookies-label\"],\"closeLabel\":[1,\"close-label\"],\"categories\":[16],\"choices\":[32],\"open\":[32]},null,{\"categories\":[{\"onCategoriesChange\":0}]}]]],[\"bs-whats-new\",[[769,\"bs-whats-new\",{\"type\":[513],\"heading\":[1],\"headingLevel\":[2,\"heading-level\"],\"closable\":[4],\"closeLabel\":[1,\"close-label\"],\"entries\":[16],\"filters\":[16],\"filter\":[1537],\"markAllReadLabel\":[1,\"mark-all-read-label\"],\"releaseNotesLabel\":[1,\"release-notes-label\"],\"releaseNotesUrl\":[1,\"release-notes-url\"],\"emptyLabel\":[1,\"empty-label\"],\"tag\":[1],\"tagColor\":[1,\"tag-color\"],\"image\":[1],\"points\":[16],\"step\":[2],\"total\":[2],\"stepLabel\":[1,\"step-label\"],\"secondaryLabel\":[1,\"secondary-label\"],\"primaryLabel\":[1,\"primary-label\"],\"date\":[1],\"description\":[1],\"actionLabel\":[1,\"action-label\"],\"hasHeroSlot\":[32]}]]],[\"bs-datepicker\",[[577,\"bs-datepicker\",{\"name\":[513],\"range\":[516],\"value\":[1537],\"start\":[1537],\"end\":[1537],\"min\":[1],\"max\":[1],\"locale\":[1],\"firstDayOfWeek\":[2,\"first-day-of-week\"],\"startLabel\":[1,\"start-label\"],\"endLabel\":[1,\"end-label\"],\"monthLabel\":[1,\"month-label\"],\"yearLabel\":[1,\"year-label\"],\"previousLabel\":[1,\"previous-label\"],\"nextLabel\":[1,\"next-label\"],\"viewDate\":[32],\"focusedIso\":[32],\"hoverIso\":[32],\"draft\":[32],\"openMenu\":[32]},null,{\"value\":[{\"onSelectionChange\":0},{\"onSelectionJump\":0}],\"start\":[{\"onSelectionChange\":0},{\"onSelectionJump\":0}],\"end\":[{\"onSelectionChange\":0}],\"range\":[{\"onSelectionChange\":0}],\"name\":[{\"onSelectionChange\":0}]}]]],[\"bs-onboarding-checklist\",[[769,\"bs-onboarding-checklist\",{\"type\":[513],\"launcherLayout\":[513,\"launcher-layout\"],\"steps\":[16],\"heading\":[1],\"description\":[1],\"headingLevel\":[2,\"heading-level\"],\"progressText\":[1,\"progress-text\"],\"closable\":[4],\"progressLabel\":[1,\"progress-label\"],\"skipLabel\":[1,\"skip-label\"],\"startLabel\":[1,\"start-label\"],\"seeAllLabel\":[1,\"see-all-label\"],\"afterLabel\":[1,\"after-label\"],\"doneLabel\":[1,\"done-label\"],\"hideLabel\":[1,\"hide-label\"],\"closeLabel\":[1,\"close-label\"],\"statusDoneLabel\":[1,\"status-done-label\"],\"statusTodoLabel\":[1,\"status-todo-label\"]}]]],[\"bs-qr-code\",[[769,\"bs-qr-code\",{\"type\":[513],\"size\":[513],\"state\":[513],\"heading\":[1],\"description\":[1],\"url\":[1],\"amount\":[1],\"amountLabel\":[1,\"amount-label\"],\"expiry\":[1],\"matrix\":[16],\"codeLabel\":[1,\"code-label\"],\"closable\":[4],\"hideActions\":[4,\"hide-actions\"],\"hideDownload\":[4,\"hide-download\"],\"hideCopy\":[4,\"hide-copy\"],\"downloadLabel\":[1,\"download-label\"],\"copyLabel\":[1,\"copy-label\"],\"retryLabel\":[1,\"retry-label\"],\"refreshLabel\":[1,\"refresh-label\"],\"loadingLabel\":[1,\"loading-label\"],\"errorLabel\":[1,\"error-label\"],\"expiredLabel\":[1,\"expired-label\"],\"scannedLabel\":[1,\"scanned-label\"],\"closeLabel\":[1,\"close-label\"],\"hasLogo\":[32]}]]],[\"bs-product-tour\",[[769,\"bs-product-tour\",{\"type\":[513],\"direction\":[513],\"heading\":[1],\"description\":[1],\"step\":[2],\"total\":[2],\"progressLabel\":[1,\"progress-label\"],\"primaryLabel\":[1,\"primary-label\"],\"secondaryLabel\":[1,\"secondary-label\"],\"closable\":[4],\"closeLabel\":[1,\"close-label\"]}]]],[\"bs-carousel\",[[769,\"bs-carousel\",{\"tracker\":[1],\"slidesPerView\":[2,\"slides-per-view\"],\"currentPage\":[1538,\"current-page\"],\"autoplay\":[4],\"interval\":[2],\"paused\":[1540],\"label\":[1],\"previousLabel\":[1,\"previous-label\"],\"nextLabel\":[1,\"next-label\"],\"pauseLabel\":[1,\"pause-label\"],\"playLabel\":[1,\"play-label\"],\"slideCount\":[32],\"interacting\":[32]},[[1,\"mouseenter\",\"onMouseEnter\"],[1,\"mouseleave\",\"onMouseLeave\"],[0,\"focusin\",\"onFocusIn\"],[0,\"focusout\",\"onFocusOut\"]],{\"currentPage\":[{\"onCurrentPageChange\":0}],\"autoplay\":[{\"updateTimer\":0}],\"paused\":[{\"updateTimer\":0}],\"interval\":[{\"updateTimer\":0}],\"interacting\":[{\"updateTimer\":0}],\"slideCount\":[{\"updateTimer\":0}],\"slidesPerView\":[{\"updateTimer\":0}]}]]],[\"bs-error-page\",[[769,\"bs-error-page\",{\"type\":[513],\"code\":[1],\"heading\":[1],\"headingLevel\":[2,\"heading-level\"],\"description\":[1],\"primaryLabel\":[1,\"primary-label\"],\"secondaryLabel\":[1,\"secondary-label\"],\"reference\":[1]}]]],[\"bs-file-upload-item\",[[769,\"bs-file-upload-item\",{\"state\":[513],\"fileName\":[1,\"file-name\"],\"fileSize\":[1,\"file-size\"],\"progress\":[2],\"message\":[1],\"thumbnailSrc\":[1,\"thumbnail-src\"],\"thumbnailAlt\":[1,\"thumbnail-alt\"],\"cancelLabel\":[1,\"cancel-label\"],\"removeLabel\":[1,\"remove-label\"]}]]],[\"bs-attachment\",[[513,\"bs-attachment\",{\"type\":[1],\"fileName\":[1,\"file-name\"],\"imageSrc\":[1,\"image-src\"],\"imageAlt\":[1,\"image-alt\"],\"loading\":[4],\"removable\":[4]}]]],[\"bs-breadcrumb-overflow\",[[513,\"bs-breadcrumb-overflow\",{\"items\":[16],\"overflowLabel\":[1,\"overflow-label\"],\"size\":[513],\"open\":[32]},[[0,\"keydown\",\"onHostKeydown\"],[0,\"focusout\",\"onHostFocusOut\"]]]]],[\"bs-chatbot-header\",[[769,\"bs-chatbot-header\",{\"heading\":[1],\"expanded\":[1540]}]]],[\"bs-dialog\",[[769,\"bs-dialog\",{\"open\":[1540],\"heading\":[1],\"size\":[1],\"centered\":[516],\"hasFooter\":[32],\"hasImage\":[32],\"hasIcon\":[32]},[[4,\"keydown\",\"onKeydown\"],[4,\"focusin\",\"onFocusIn\"]]]]],[\"bs-file-upload\",[[769,\"bs-file-upload\",{\"direction\":[513],\"heading\":[1],\"description\":[1],\"buttonLabel\":[1,\"button-label\"],\"accept\":[1],\"multiple\":[4],\"disabled\":[516],\"dragging\":[1540]}]]],[\"bs-navigation-drawer\",[[769,\"bs-navigation-drawer\",{\"heading\":[1],\"collapsible\":[4],\"collapsed\":[1540],\"logoBackground\":[1,\"logo-background\"],\"showLogo\":[4,\"show-logo\"],\"open\":[1540],\"mobile\":[32]},[[4,\"keydown\",\"onDocumentKeydown\"],[4,\"focusin\",\"onDocumentFocusIn\"]],{\"collapsed\":[{\"onCollapsedChange\":0}],\"mobile\":[{\"onMobileChange\":0}],\"open\":[{\"onOpenChange\":0}]}]]],[\"bs-navigation-header\",[[769,\"bs-navigation-header\",{\"alignment\":[1],\"ariaLabel\":[1,\"aria-label\"],\"skipToContentHref\":[1,\"skip-to-content-href\"],\"skipToContentLabel\":[1,\"skip-to-content-label\"],\"logoBackground\":[1,\"logo-background\"]}]]],[\"bs-accordion\",[[769,\"bs-accordion\",{\"expanded\":[516],\"size\":[1],\"disabled\":[4],\"showIcon\":[4,\"show-icon\"],\"showPreview\":[4,\"show-preview\"]}]]],[\"bs-ai-disclaimer\",[[257,\"bs-ai-disclaimer\"]]],[\"bs-ai-greeting\",[[513,\"bs-ai-greeting\",{\"assistantName\":[1,\"assistant-name\"],\"productName\":[1,\"product-name\"]}]]],[\"bs-ai-thinking\",[[513,\"bs-ai-thinking\",{\"label\":[1]}]]],[\"bs-attachment-list\",[[769,\"bs-attachment-list\",{\"ariaLabel\":[1,\"aria-label\"],\"canScrollRight\":[32]}]]],[\"bs-badge\",[[769,\"bs-badge\",{\"variant\":[1]}]]],[\"bs-breadcrumb\",[[769,\"bs-breadcrumb\",{\"href\":[1],\"current\":[516],\"size\":[513]}]]],[\"bs-breadcrumbs\",[[769,\"bs-breadcrumbs\",{\"label\":[1],\"size\":[1]},null,{\"size\":[{\"onSizeChange\":0}]}]]],[\"bs-button-skeleton\",[[513,\"bs-button-skeleton\",{\"size\":[1]}]]],[\"bs-chatbot-feedback\",[[513,\"bs-chatbot-feedback\",{\"rating\":[1538],\"submitted\":[1540],\"comment\":[1025],\"heading\":[1],\"subtitle\":[1]}]]],[\"bs-chatbot-response-action\",[[769,\"bs-chatbot-response-action\",{\"sourcesCount\":[2,\"sources-count\"],\"menuOpen\":[1540,\"menu-open\"]},[[4,\"click\",\"onDocumentClick\"],[4,\"keydown\",\"onKeydown\"]]]]],[\"bs-chatbot-sources-drawer\",[[769,\"bs-chatbot-sources-drawer\",{\"heading\":[1],\"count\":[2],\"slottedCount\":[32]}]]],[\"bs-chatbot-suggestion-button\",[[769,\"bs-chatbot-suggestion-button\",{\"disabled\":[4]}]]],[\"bs-checkbox\",[[849,\"bs-checkbox\",{\"name\":[513],\"value\":[1],\"required\":[4],\"size\":[1],\"checked\":[1540],\"indeterminate\":[1540],\"disabled\":[516],\"error\":[4],\"ariaLabel\":[1,\"aria-label\"]},null,{\"checked\":[{\"syncFormValue\":0}],\"value\":[{\"syncFormValue\":0}],\"required\":[{\"syncFormValue\":0}],\"indeterminate\":[{\"onIndeterminateChange\":0}]}]]],[\"bs-checkbox-skeleton\",[[513,\"bs-checkbox-skeleton\",{\"size\":[1]}]]],[\"bs-chip-filter\",[[785,\"bs-chip-filter\",{\"size\":[1],\"selected\":[516],\"dropdown\":[4],\"disabled\":[4],\"ariaLabel\":[1,\"aria-label\"],\"hasIcon\":[32]}]]],[\"bs-chip-input\",[[785,\"bs-chip-input\",{\"size\":[1],\"selected\":[1540],\"disabled\":[516],\"hasIcon\":[32],\"labelText\":[32]}]]],[\"bs-composer\",[[785,\"bs-composer\",{\"variant\":[1],\"placeholder\":[1],\"value\":[1025],\"state\":[513],\"ariaLabel\":[1,\"aria-label\"],\"hasAttachments\":[32]}]]],[\"bs-composer-status-banner\",[[769,\"bs-composer-status-banner\",{\"type\":[1],\"message\":[1],\"showIcon\":[4,\"show-icon\"],\"showButton\":[4,\"show-button\"],\"actionLabel\":[1,\"action-label\"],\"allowClose\":[4,\"allow-close\"]}]]],[\"bs-data-table\",[[513,\"bs-data-table\",{\"columns\":[16],\"rows\":[16],\"sortColumn\":[1,\"sort-column\"],\"sortDirection\":[1,\"sort-direction\"],\"selectable\":[4],\"cellRenderer\":[16],\"selectedIds\":[32],\"clearSelection\":[64]}]]],[\"bs-inline-tab\",[[769,\"bs-inline-tab\",{\"selected\":[516],\"disabled\":[4],\"ariaLabel\":[1,\"aria-label\"],\"value\":[513],\"tabbable\":[4],\"hasIcon\":[32],\"hasLabel\":[32]}]]],[\"bs-navigation-drawer-item\",[[769,\"bs-navigation-drawer-item\",{\"selected\":[516],\"expandable\":[4],\"expanded\":[1540],\"nested\":[4],\"ariaLabel\":[1,\"aria-label\"],\"collapsed\":[516],\"hasIcon\":[32]}]]],[\"bs-radio\",[[849,\"bs-radio\",{\"name\":[513],\"value\":[1],\"checked\":[1540],\"disabled\":[516],\"groupHasChecked\":[32]},[[4,\"bsChange\",\"onAnyRadioChange\"]],{\"checked\":[{\"onCheckedChange\":0}],\"value\":[{\"onCheckedChange\":0}]}]]],[\"bs-slider\",[[593,\"bs-slider\",{\"type\":[1],\"name\":[513],\"showLabel\":[4,\"show-label\"],\"label\":[1],\"min\":[2],\"max\":[2],\"step\":[2],\"value\":[1026],\"valueStart\":[1026,\"value-start\"],\"valueEnd\":[1026,\"value-end\"],\"segments\":[2],\"disabled\":[516],\"ariaLabel\":[1,\"aria-label\"]},null,{\"value\":[{\"syncFormValue\":0}],\"valueStart\":[{\"syncFormValue\":0}],\"valueEnd\":[{\"syncFormValue\":0}],\"type\":[{\"syncFormValue\":0}]}]]],[\"bs-source-link\",[[769,\"bs-source-link\",{\"fileName\":[1,\"file-name\"],\"sourceName\":[1,\"source-name\"],\"version\":[1],\"href\":[1],\"target\":[1]}]]],[\"bs-stepper\",[[769,\"bs-stepper\",{\"currentStep\":[2,\"current-step\"],\"direction\":[513],\"showDescription\":[4,\"show-description\"]},null,{\"currentStep\":[{\"onPropChange\":0}],\"direction\":[{\"onPropChange\":0}],\"showDescription\":[{\"onPropChange\":0}]}]]],[\"bs-stepper-step\",[[513,\"bs-stepper-step\",{\"name\":[1],\"description\":[1],\"error\":[4],\"disabled\":[4],\"computedState\":[1,\"computed-state\"],\"direction\":[1],\"showDescription\":[4,\"show-description\"]}]]],[\"bs-toast\",[[769,\"bs-toast\",{\"state\":[1]}]]],[\"bs-snackbar\",[[769,\"bs-snackbar\",{\"variant\":[1],\"loading\":[4],\"actionLabel\":[1,\"action-label\"],\"actionVariant\":[1,\"action-variant\"],\"hideClose\":[4,\"hide-close\"]}]]],[\"bs-avatar\",[[513,\"bs-avatar\",{\"type\":[1],\"size\":[1],\"initials\":[1],\"src\":[1],\"alt\":[1],\"ariaLabel\":[1,\"aria-label\"],\"disabled\":[516]}]]],[\"bs-pagination\",[[513,\"bs-pagination\",{\"totalPages\":[2,\"total-pages\"],\"currentPage\":[1538,\"current-page\"],\"siblingCount\":[2,\"sibling-count\"],\"previousLabel\":[1,\"previous-label\"],\"nextLabel\":[1,\"next-label\"]}]]],[\"bs-tooltip\",[[769,\"bs-tooltip\",{\"placement\":[1]}]]],[\"bs-logo\",[[513,\"bs-logo\",{\"variant\":[1],\"background\":[1],\"src\":[1],\"alt\":[1]}]]],[\"bs-progress\",[[513,\"bs-progress\",{\"type\":[1],\"size\":[1],\"strokeWidth\":[2,\"stroke-width\"],\"value\":[2],\"showLabel\":[4,\"show-label\"],\"ariaLabel\":[1,\"aria-label\"]}]]],[\"bs-switch\",[[849,\"bs-switch\",{\"name\":[513],\"value\":[1],\"size\":[1],\"checked\":[1540],\"disabled\":[516],\"ariaLabel\":[1,\"aria-label\"]},null,{\"checked\":[{\"syncFormValue\":0}],\"value\":[{\"syncFormValue\":0}]}]]],[\"bs-progress-linear\",[[769,\"bs-progress-linear\",{\"type\":[1],\"size\":[1],\"value\":[2],\"showLabel\":[4,\"show-label\"],\"ariaLabel\":[1,\"aria-label\"],\"hasLabelContent\":[32]}]]],[\"bs-icon-tile\",[[769,\"bs-icon-tile\",{\"size\":[513],\"intent\":[513],\"label\":[1],\"hasCustomIcon\":[32],\"hasText\":[32]}]]],[\"bs-chip-informative\",[[769,\"bs-chip-informative\",{\"color\":[1],\"size\":[1],\"disabled\":[516],\"hasIcon\":[32]}]]],[\"bs-card\",[[769,\"bs-card\",{\"surface\":[513],\"hasImage\":[32]}]]],[\"bs-button\",[[849,\"bs-button\",{\"variant\":[1],\"size\":[1],\"disabled\":[4],\"type\":[1],\"ariaLabel\":[1,\"aria-label\"],\"hasIcon\":[32],\"hasEndIcon\":[32],\"hasLabel\":[32]}]]],[\"bs-tab_3\",[[769,\"bs-whats-new-entry\",{\"tag\":[1],\"tagColor\":[1,\"tag-color\"],\"date\":[1],\"unread\":[516],\"heading\":[1],\"headingLevel\":[2,\"heading-level\"],\"description\":[1],\"actionLabel\":[1,\"action-label\"],\"divider\":[4],\"unreadLabel\":[1,\"unread-label\"],\"hasImage\":[32]}],[769,\"bs-tab\",{\"selected\":[516],\"disabled\":[4],\"iconPosition\":[1,\"icon-position\"],\"ariaLabel\":[1,\"aria-label\"],\"value\":[513],\"tabbable\":[4],\"hasIcon\":[32],\"hasLabel\":[32],\"hasBadge\":[32]}],[769,\"bs-tabs\",{\"type\":[1],\"orientation\":[1],\"value\":[1537]},[[0,\"bsSelect\",\"onTabSelect\"],[0,\"keydown\",\"onKeyDown\"]],{\"value\":[{\"onValueChange\":0}],\"orientation\":[{\"syncRovingTabindex\":0}]}]]],[\"bs-icon-button\",[[849,\"bs-icon-button\",{\"variant\":[1],\"size\":[1],\"disabled\":[4],\"type\":[1],\"ariaLabel\":[1,\"aria-label\"]}]]],[\"bs-input_3\",[[849,\"bs-input\",{\"name\":[513],\"value\":[1025],\"type\":[1],\"label\":[1],\"placeholder\":[1],\"description\":[1],\"error\":[1],\"disabled\":[516],\"required\":[4],\"step\":[2],\"min\":[2],\"max\":[2],\"options\":[16],\"rows\":[2],\"chips\":[16],\"titleOptions\":[16],\"initialsTitle\":[1,\"initials-title\"],\"countryOptions\":[16],\"country\":[1],\"length\":[2],\"open\":[1540],\"hasIcon\":[32],\"hasEndIcon\":[32],\"passwordVisible\":[32],\"chipDraft\":[32]},[[0,\"keydown\",\"onHostKeydown\"],[0,\"focusout\",\"onHostFocusOut\"]],{\"value\":[{\"onFormStateChange\":0}],\"type\":[{\"onFormStateChange\":0}],\"chips\":[{\"onFormStateChange\":0}],\"required\":[{\"onFormStateChange\":0}]}],[769,\"bs-menu-item\",{\"disabled\":[4],\"hasIcon\":[32]}],[257,\"bs-menu\",null,[[0,\"keydown\",\"onKeyDown\"]]]]]]"), options);
|
|
20
20
|
});
|
|
@@ -8,7 +8,10 @@ const BsBreadcrumb = class {
|
|
|
8
8
|
this.bsNavigate = createEvent(this, "bsNavigate");
|
|
9
9
|
}
|
|
10
10
|
/** Destination for a non-current crumb. Ignored when `current` is true -- the current page is
|
|
11
|
-
* never a link, even if `href` is set (see the class JSDoc).
|
|
11
|
+
* never a link, even if `href` is set (see the class JSDoc). A non-current crumb **without** `href`
|
|
12
|
+
* renders as plain text that looks identical to a link crumb at rest (only link crumbs get the
|
|
13
|
+
* hover/focus styles), so give every non-current crumb an `href` unless it is deliberately not
|
|
14
|
+
* navigable. */
|
|
12
15
|
href;
|
|
13
16
|
/** Whether this crumb is the current page. Renders as plain (non-link) text marked
|
|
14
17
|
* `aria-current="page"`, reflected as an attribute so consumers/CSS can target
|
|
@@ -36,7 +39,7 @@ const BsBreadcrumb = class {
|
|
|
36
39
|
ev.preventDefault();
|
|
37
40
|
};
|
|
38
41
|
render() {
|
|
39
|
-
return (h(Host, { key: '
|
|
42
|
+
return (h(Host, { key: 'a9ccd034d839eb8c2b3e3dfb7536737cd0189b75', role: "listitem" }, h("span", { key: '5b10b00b1b2ac1a5246f8d658edb2f2a1110df56', part: "separator", class: "bs-breadcrumb__separator", "aria-hidden": "true" }, h(CaretRightIcon, { key: 'c3d867d49f00e09a333116f9f87aeb6c9478379b' })), this.current ? (h("span", { part: "current", class: "bs-breadcrumb__current", "aria-current": "page" }, h("slot", null))) : this.href ? (h("a", { part: "link", class: "bs-breadcrumb__link", href: this.href, onClick: this.onLinkClick }, h("slot", null))) : (h("span", { part: "link", class: "bs-breadcrumb__link" }, h("slot", null)))));
|
|
40
43
|
}
|
|
41
44
|
};
|
|
42
45
|
const CaretRightIcon = () => (h("svg", { viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, h("path", { d: "M6 3L11 8L6 13", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" })));
|
|
@@ -87,7 +87,7 @@ const GENIE_LOGO_SVG = `<svg width="99" height="35" viewBox="0 0 99 35" fill="no
|
|
|
87
87
|
</defs>
|
|
88
88
|
</svg>`;
|
|
89
89
|
|
|
90
|
-
const bsChatbotHeaderCss = () => `:host{display:block;--bs-chatbot-header-bg:var(--bs-surface-base);--bs-chatbot-header-border:var(--bs-border-default);--bs-chatbot-header-padding-top:var(--bs-spacing-200);--bs-chatbot-header-padding-bottom:var(--bs-spacing-100);--bs-chatbot-header-padding-x:var(--bs-
|
|
90
|
+
const bsChatbotHeaderCss = () => `:host{display:block;--bs-chatbot-header-bg:var(--bs-surface-base);--bs-chatbot-header-border:var(--bs-border-default);--bs-chatbot-header-padding-top:var(--bs-spacing-200);--bs-chatbot-header-padding-bottom:var(--bs-spacing-100);--bs-chatbot-header-padding-x:var(--bs-spacing-200);--bs-chatbot-header-gap:var(--bs-navigation-header-gap);--bs-chatbot-header-actions-gap:var(--bs-spacing-100);--bs-chatbot-header-button-size:var(--bs-spacing-600);--bs-chatbot-header-button-radius:var(--bs-border-radius-100);--bs-chatbot-header-button-hover:var(--bs-color-neutral-container);--bs-chatbot-header-button-pressed:var(--bs-color-neutral-container-pressed);--bs-chatbot-header-icon:var(--bs-icon-default)}.bs-chatbot-header{box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;gap:var(--bs-chatbot-header-gap);background:var(--bs-chatbot-header-bg);border-bottom:1px solid var(--bs-chatbot-header-border);padding:var(--bs-chatbot-header-padding-top) var(--bs-chatbot-header-padding-x) var(--bs-chatbot-header-padding-bottom);font-family:inherit}.bs-chatbot-header__logo{display:block;width:99px;height:35px;flex-shrink:0}.bs-chatbot-header__logo svg{display:block;width:100%;height:100%}.bs-chatbot-header__actions{display:flex;align-items:center;gap:var(--bs-chatbot-header-actions-gap);flex-shrink:0}.bs-chatbot-header__button{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;border:none;padding:0;cursor:pointer;background:transparent;color:var(--bs-chatbot-header-icon);font-family:inherit;border-radius:var(--bs-chatbot-header-button-radius);width:var(--bs-chatbot-header-button-size);height:var(--bs-chatbot-header-button-size);flex-shrink:0;transition:background-color var(--bs-duration-fast) var(--bs-easing-standard)}.bs-chatbot-header__button:focus-visible{outline:2px solid var(--bs-border-neutral-focus);outline-offset:2px}.bs-chatbot-header__button svg{width:24px;height:24px}.bs-chatbot-header__button:hover{background:var(--bs-chatbot-header-button-hover)}.bs-chatbot-header__button:active{background:var(--bs-chatbot-header-button-pressed)}.bs-chatbot-header__tooltip-wrapper{position:relative;display:inline-flex}.bs-chatbot-header__tooltip{position:absolute;top:100%;left:50%;transform:translateX(-50%);margin-top:var(--bs-spacing-100);opacity:0;visibility:hidden;pointer-events:none;transition:opacity var(--bs-duration-fast) var(--bs-easing-standard);transition-delay:0s;white-space:nowrap;z-index:1}.bs-chatbot-header__tooltip-wrapper:hover .bs-chatbot-header__tooltip,.bs-chatbot-header__tooltip-wrapper:focus-within .bs-chatbot-header__tooltip{opacity:1;visibility:visible;transition-delay:var(--bs-duration-slow)}`;
|
|
91
91
|
|
|
92
92
|
const BsChatbotHeader = class {
|
|
93
93
|
constructor(hostRef) {
|
|
@@ -130,7 +130,7 @@ const BsChatbotHeader = class {
|
|
|
130
130
|
this.bsClose.emit();
|
|
131
131
|
};
|
|
132
132
|
render() {
|
|
133
|
-
return (h("div", { key: 'c77fcfa340df9342111e77588804f51c66788e90', class: "bs-chatbot-header", role: "banner", "aria-label": this.heading }, h("div", { key: 'c17b3297adacb61edbfbdc77832d1c0e5e1c1f02', part: "logo", class: "bs-chatbot-header__logo", role: "img", "aria-label": this.heading, innerHTML: GENIE_LOGO_SVG }), h("div", { key: '9c07b22fa0a41a21fd95966d25c619a6e1b3dfa8', class: "bs-chatbot-header__actions" }, h("span", { key: '5f640f6c5df74ae59cb302aa4d66456fbd71c3b0', class: "bs-chatbot-header__tooltip-wrapper" }, h("button", { key: 'd50d84593711b1b045cc2ff66d1efc2d71c73755', type: "button", part: "new-chat", class: "bs-chatbot-header__button", "aria-label": "New chat", onClick: this.onNewChatClick }, h("slot", { key: '29dc1d8da07329d304e94d4baac0ab1104ea5815', name: "new-chat-icon" }, h(NewChatIcon, { key: '9e584349507e736f7f5c24f8fb2253ad29bbf09b' }))), h("bs-tooltip", { key: 'd99a994539368edc0aa053e474ab9aff155050ed', class: "bs-chatbot-header__tooltip", placement: "top", "aria-hidden": "true" }, "New chat")), h("span", { key: '85f4e439d95a56da740a37c41a39b3a9b7ac2f13', class: "bs-chatbot-header__tooltip-wrapper" }, h("button", { key: 'a2d0d468c03d6a83cbdfb69ca0edc30168c3f8a8', type: "button", part: "history", class: "bs-chatbot-header__button", "aria-label": "History", onClick: this.onHistoryClick }, h("slot", { key: 'd6f6bd60b8931229602aaebee485cb5a1fbb8ca8', name: "history-icon" }, h(HistoryIcon, { key: 'f2de17ccd1e23077e57bd4a092d2432f854b5161' }))), h("bs-tooltip", { key: '6cce933959793a959cf288df3323ed5d8f80dba8', class: "bs-chatbot-header__tooltip", placement: "top", "aria-hidden": "true" }, "History")), h("span", { key: '019a198d91c9c93266efd1a3df823d13ea2455d4', class: "bs-chatbot-header__tooltip-wrapper" }, h("button", { key: '
|
|
133
|
+
return (h("div", { key: 'c77fcfa340df9342111e77588804f51c66788e90', class: "bs-chatbot-header", role: "banner", "aria-label": this.heading }, h("div", { key: 'c17b3297adacb61edbfbdc77832d1c0e5e1c1f02', part: "logo", class: "bs-chatbot-header__logo", role: "img", "aria-label": this.heading, innerHTML: GENIE_LOGO_SVG }), h("div", { key: '9c07b22fa0a41a21fd95966d25c619a6e1b3dfa8', class: "bs-chatbot-header__actions" }, h("span", { key: '5f640f6c5df74ae59cb302aa4d66456fbd71c3b0', class: "bs-chatbot-header__tooltip-wrapper" }, h("button", { key: 'd50d84593711b1b045cc2ff66d1efc2d71c73755', type: "button", part: "new-chat", class: "bs-chatbot-header__button", "aria-label": "New chat", onClick: this.onNewChatClick }, h("slot", { key: '29dc1d8da07329d304e94d4baac0ab1104ea5815', name: "new-chat-icon" }, h(NewChatIcon, { key: '9e584349507e736f7f5c24f8fb2253ad29bbf09b' }))), h("bs-tooltip", { key: 'd99a994539368edc0aa053e474ab9aff155050ed', class: "bs-chatbot-header__tooltip", placement: "top", "aria-hidden": "true" }, "New chat")), h("span", { key: '85f4e439d95a56da740a37c41a39b3a9b7ac2f13', class: "bs-chatbot-header__tooltip-wrapper" }, h("button", { key: 'a2d0d468c03d6a83cbdfb69ca0edc30168c3f8a8', type: "button", part: "history", class: "bs-chatbot-header__button", "aria-label": "History", onClick: this.onHistoryClick }, h("slot", { key: 'd6f6bd60b8931229602aaebee485cb5a1fbb8ca8', name: "history-icon" }, h(HistoryIcon, { key: 'f2de17ccd1e23077e57bd4a092d2432f854b5161' }))), h("bs-tooltip", { key: '6cce933959793a959cf288df3323ed5d8f80dba8', class: "bs-chatbot-header__tooltip", placement: "top", "aria-hidden": "true" }, "History")), h("span", { key: '019a198d91c9c93266efd1a3df823d13ea2455d4', class: "bs-chatbot-header__tooltip-wrapper" }, h("button", { key: '26cb1a7436d213b1ce003f33abe419d8fab0deb9', type: "button", part: "expand", class: "bs-chatbot-header__button", "aria-label": this.expanded ? 'Exit fullscreen' : 'Fullscreen', "aria-pressed": this.expanded ? 'true' : 'false', onClick: this.onExpandClick }, h("slot", { key: 'e36dca1a33834d5f6a4f3a9434535b280de26e52', name: "expand-icon" }, h(ExpandIcon, { key: 'e045048d9044b29b2de00b529e5aa2d634c41520' }))), h("bs-tooltip", { key: '9e7911c8544776e6939b7e704a2206d95ff69126', class: "bs-chatbot-header__tooltip", placement: "top", "aria-hidden": "true" }, this.expanded ? 'Exit fullscreen' : 'Fullscreen')), h("span", { key: '6d23ab86e5b21dbb44d7f21443d19f1a6b2b2727', class: "bs-chatbot-header__tooltip-wrapper" }, h("button", { key: 'a9d5765cf1db4f1278f922acbb54a41ad7477a10', type: "button", part: "close", class: "bs-chatbot-header__button", "aria-label": "Close", onClick: this.onCloseClick }, h("slot", { key: '3570a4fadc9e52bc4b9db393f9351ae2dcb4c877', name: "close-icon" }, h(CloseIcon, { key: 'ca1ee8c7733e74db4b464e7e1af4addec847c950' }))), h("bs-tooltip", { key: '6fbdd96e577b485f7268501c2cfd3805dc3acefc', class: "bs-chatbot-header__tooltip", placement: "top", "aria-hidden": "true" }, "Close")))));
|
|
134
134
|
}
|
|
135
135
|
};
|
|
136
136
|
const NewChatIcon = () => (h("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, h("path", { d: "M12 15H9V12L18 3L21 6L12 15Z", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M15.75 5.25L18.75 8.25", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M20.25 12V19.5C20.25 19.6989 20.171 19.8897 20.0303 20.0303C19.8897 20.171 19.6989 20.25 19.5 20.25H4.5C4.30109 20.25 4.11032 20.171 3.96967 20.0303C3.82902 19.8897 3.75 19.6989 3.75 19.5V4.5C3.75 4.30109 3.82902 4.11032 3.96967 3.96967C4.11032 3.82902 4.30109 3.75 4.5 3.75H12", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, a as getElement, h } from './index-DqQRXQMx.js';
|
|
2
2
|
|
|
3
|
-
const bsComposerCss = () => `:host{display:block;--bs-composer-radius:var(--bs-border-radius-150);--bs-composer-button-radius:var(--bs-border-radius-100);--bs-composer-button-size:var(--bs-spacing-
|
|
3
|
+
const bsComposerCss = () => `:host{display:block;--bs-composer-radius:var(--bs-border-radius-150);--bs-composer-button-radius:var(--bs-border-radius-100);--bs-composer-button-size:var(--bs-spacing-550);--bs-composer-bg:var(--bs-input-bg-default);--bs-composer-border:var(--bs-input-border-default);--bs-composer-border-focus:var(--bs-input-border-focus);--bs-composer-border-human:var(--bs-border-neutral-hover);--bs-composer-action-bg:var(--bs-color-primary-default);--bs-composer-action-bg-hover:var(--bs-color-primary-hover);--bs-composer-action-bg-pressed:var(--bs-color-primary-pressed);--bs-composer-action-bg-disabled:var(--bs-surface-action-disabled);--bs-composer-action-icon:var(--bs-text-on-action);--bs-composer-action-icon-disabled:var(--bs-text-on-disabled);--bs-composer-attach-icon:var(--bs-icon-default);--bs-composer-mic-icon:var(--bs-icon-default);--bs-composer-mic-icon-disabled:var(--bs-icon-disabled);--bs-composer-mic-recording-icon:var(--bs-icon-default);--bs-composer-subtle-hover:var(--bs-color-neutral-container);--bs-composer-subtle-pressed:var(--bs-color-neutral-container-pressed);--bs-composer-waveform-color:var(--bs-border-default);--bs-composer-input-max-lines:10}.bs-composer{box-sizing:border-box;display:flex;flex-direction:column;border:1px solid var(--bs-composer-border);border-radius:var(--bs-composer-radius);background:var(--bs-composer-bg);font-family:inherit}.bs-composer--human{border-style:dashed;border-color:var(--bs-composer-border-human)}.bs-composer:focus-within{border-color:var(--bs-composer-border-focus)}.bs-composer__attachments-row{display:none}.bs-composer__attachments-row--visible{display:block}.bs-composer__text-row{display:flex;align-items:center;gap:var(--bs-spacing-150);padding:var(--bs-spacing-150)}.bs-composer__input{flex:1;min-width:0;box-sizing:border-box;padding:0;border:none;outline:none;resize:none;background:transparent;color:var(--bs-input-text);font-family:inherit;font-size:var(--bs-font-size-md);line-height:calc(var(--bs-line-height-body-md) * 1px);max-height:calc(var(--bs-composer-input-max-lines) * var(--bs-line-height-body-md) * 1px);overflow-y:auto}.bs-composer__input::placeholder{color:var(--bs-input-placeholder)}.bs-composer__input:disabled{color:var(--bs-input-text-disabled);cursor:not-allowed}.bs-composer__waveform{display:inline-flex;flex:1;min-width:0;align-items:center;justify-content:center;gap:3px;overflow:hidden}.bs-composer__waveform-bar{display:inline-block;flex-shrink:0;width:2.5px;border-radius:1.5px;background:var(--bs-composer-waveform-color);height:var(--bs-composer-bar-height, 6px)}.bs-composer__controls-row{display:flex;align-items:center;gap:var(--bs-spacing-100);padding:var(--bs-spacing-150)}.bs-composer__spacer{flex:1}.bs-composer__attach,.bs-composer__mic,.bs-composer__action{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;border:none;padding:0;cursor:pointer;font-family:inherit;border-radius:var(--bs-composer-button-radius);width:var(--bs-composer-button-size);height:var(--bs-composer-button-size);flex-shrink:0;transition:background-color var(--bs-duration-fast) var(--bs-easing-standard)}.bs-composer__attach:focus-visible,.bs-composer__mic:focus-visible,.bs-composer__action:focus-visible{outline:2px solid var(--bs-border-neutral-focus);outline-offset:2px}.bs-composer__attach svg,.bs-composer__mic svg,.bs-composer__action svg{width:24px;height:24px}.bs-composer__attach,.bs-composer__mic{background:transparent}.bs-composer__attach:hover:not(:disabled),.bs-composer__mic:hover:not(:disabled){background:var(--bs-composer-subtle-hover)}.bs-composer__attach:active:not(:disabled),.bs-composer__mic:active:not(:disabled){background:var(--bs-composer-subtle-pressed)}.bs-composer__attach{color:var(--bs-composer-attach-icon)}.bs-composer__mic{color:var(--bs-composer-mic-icon)}.bs-composer__mic--recording{color:var(--bs-composer-mic-recording-icon)}.bs-composer__mic:disabled{color:var(--bs-composer-mic-icon-disabled);cursor:not-allowed}.bs-composer__action{background:var(--bs-composer-action-bg);color:var(--bs-composer-action-icon)}.bs-composer__action:hover:not(:disabled){background:var(--bs-composer-action-bg-hover)}.bs-composer__action:active:not(:disabled){background:var(--bs-composer-action-bg-pressed)}.bs-composer__action:disabled{background:var(--bs-composer-action-bg-disabled);color:var(--bs-composer-action-icon-disabled);cursor:not-allowed}`;
|
|
4
4
|
|
|
5
5
|
const DEFAULT_PLACEHOLDERS = {
|
|
6
6
|
ai: 'Ask Genie something...',
|