@brandsync/wc 0.1.0 → 1.0.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/custom-elements.json +419 -0
- package/dist/brandsync-wc/brandsync-wc.esm.js +1 -1
- package/dist/brandsync-wc/{p-d3265e70.entry.js → p-16c960b5.entry.js} +1 -1
- package/dist/brandsync-wc/{p-1ce7dd64.entry.js → p-17a695af.entry.js} +1 -1
- package/dist/brandsync-wc/{p-321ed4d3.entry.js → p-196cfcf0.entry.js} +1 -1
- package/dist/brandsync-wc/{p-2063a6d6.entry.js → p-1fcc9f47.entry.js} +1 -1
- package/dist/brandsync-wc/{p-d55bbcec.entry.js → p-27cce165.entry.js} +1 -1
- package/dist/brandsync-wc/p-37365a51.entry.js +1 -0
- package/dist/brandsync-wc/p-3efb76dd.entry.js +1 -0
- package/dist/brandsync-wc/{p-20c24179.entry.js → p-45016a37.entry.js} +1 -1
- package/dist/brandsync-wc/{p-6b469b2d.entry.js → p-48000949.entry.js} +1 -1
- package/dist/brandsync-wc/{p-11f3fceb.entry.js → p-4ec24ccb.entry.js} +1 -1
- package/dist/brandsync-wc/{p-f4f22015.entry.js → p-4f8459ae.entry.js} +1 -1
- package/dist/brandsync-wc/p-613ff380.entry.js +1 -0
- package/dist/brandsync-wc/{p-18813680.entry.js → p-63167373.entry.js} +1 -1
- package/dist/brandsync-wc/{p-73217b90.entry.js → p-69c5bc2e.entry.js} +1 -1
- package/dist/brandsync-wc/{p-171fed0c.entry.js → p-7e544766.entry.js} +1 -1
- package/dist/brandsync-wc/{p-79af762c.entry.js → p-9f1e4a91.entry.js} +1 -1
- package/dist/brandsync-wc/{p-9876e83c.entry.js → p-ab8de9b6.entry.js} +1 -1
- package/dist/brandsync-wc/{p-81d49240.entry.js → p-b18e4845.entry.js} +1 -1
- package/dist/brandsync-wc/{p-111974df.entry.js → p-b5cbe30b.entry.js} +1 -1
- package/dist/brandsync-wc/{p-91551e7b.entry.js → p-baa4e2e0.entry.js} +1 -1
- package/dist/brandsync-wc/{p-9c4768aa.entry.js → p-c04cf1bb.entry.js} +1 -1
- package/dist/brandsync-wc/{p-00bb9bda.entry.js → p-c90f5a74.entry.js} +1 -1
- package/dist/brandsync-wc/{p-e93e944b.entry.js → p-d037b619.entry.js} +1 -1
- package/dist/brandsync-wc/{p-0f3cb0c4.entry.js → p-d22990c0.entry.js} +1 -1
- package/dist/brandsync-wc/{p-6d85fba4.entry.js → p-e231e4cf.entry.js} +1 -1
- package/dist/brandsync-wc/{p-0847f5c0.entry.js → p-e2a37bda.entry.js} +1 -1
- package/dist/brandsync-wc/{p-eb04c578.entry.js → p-e3ce0c8c.entry.js} +1 -1
- package/dist/cjs/brandsync-wc.cjs.js +1 -1
- package/dist/cjs/bs-ai-disclaimer.cjs.entry.js +1 -1
- package/dist/cjs/bs-ai-greeting.cjs.entry.js +1 -1
- package/dist/cjs/bs-ai-thinking.cjs.entry.js +1 -1
- package/dist/cjs/bs-attachment-list.cjs.entry.js +1 -1
- package/dist/cjs/bs-breadcrumbs.cjs.entry.js +1 -1
- package/dist/cjs/bs-button-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/bs-chatbot-feedback.cjs.entry.js +1 -1
- package/dist/cjs/bs-chatbot-header.cjs.entry.js +1 -1
- package/dist/cjs/bs-chatbot-response-action.cjs.entry.js +1 -1
- package/dist/cjs/bs-chatbot-sources-drawer.cjs.entry.js +1 -1
- package/dist/cjs/bs-chatbot-suggestion-button.cjs.entry.js +1 -1
- package/dist/cjs/bs-checkbox-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/bs-inline-tab.cjs.entry.js +1 -1
- package/dist/cjs/bs-input.cjs.entry.js +2 -2
- package/dist/cjs/bs-menu-item.cjs.entry.js +1 -1
- package/dist/cjs/bs-menu.cjs.entry.js +1 -1
- package/dist/cjs/bs-navigation-drawer-item.cjs.entry.js +1 -1
- package/dist/cjs/bs-navigation-drawer.cjs.entry.js +1 -1
- package/dist/cjs/bs-pagination.cjs.entry.js +1 -1
- package/dist/cjs/bs-radio.cjs.entry.js +1 -1
- package/dist/cjs/bs-source-link.cjs.entry.js +2 -2
- package/dist/cjs/bs-stepper-step.cjs.entry.js +44 -0
- package/dist/cjs/bs-stepper.cjs.entry.js +62 -0
- package/dist/cjs/bs-switch.cjs.entry.js +1 -1
- package/dist/cjs/bs-tab.cjs.entry.js +1 -1
- package/dist/cjs/bs-tabs.cjs.entry.js +1 -1
- package/dist/cjs/bs-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/bs-ai-disclaimer/bs-ai-disclaimer.js +1 -1
- package/dist/collection/components/bs-ai-greeting/bs-ai-greeting.js +1 -1
- package/dist/collection/components/bs-ai-thinking/bs-ai-thinking.js +1 -1
- package/dist/collection/components/bs-attachment-list/bs-attachment-list.js +1 -1
- package/dist/collection/components/bs-breadcrumb/bs-breadcrumbs/bs-breadcrumbs.js +1 -1
- package/dist/collection/components/bs-button-skeleton/bs-button-skeleton.js +1 -1
- package/dist/collection/components/bs-chatbot-feedback/bs-chatbot-feedback.js +1 -1
- package/dist/collection/components/bs-chatbot-header/bs-chatbot-header.js +1 -1
- package/dist/collection/components/bs-chatbot-response-action/bs-chatbot-response-action.js +1 -1
- package/dist/collection/components/bs-chatbot-sources-drawer/bs-chatbot-sources-drawer.js +1 -1
- package/dist/collection/components/bs-chatbot-suggestion-button/bs-chatbot-suggestion-button.js +1 -1
- package/dist/collection/components/bs-checkbox/bs-checkbox-skeleton/bs-checkbox-skeleton.js +1 -1
- package/dist/collection/components/bs-input/bs-input.js +2 -2
- package/dist/collection/components/bs-menu/bs-menu.js +1 -1
- package/dist/collection/components/bs-menu-item/bs-menu-item.js +1 -1
- package/dist/collection/components/bs-pagination/bs-pagination.js +1 -1
- package/dist/collection/components/bs-radio/bs-radio.js +1 -1
- package/dist/collection/components/bs-source-link/bs-source-link.js +2 -2
- package/dist/collection/components/bs-stepper/bs-stepper/bs-stepper.cmp.test.js +42 -0
- package/dist/collection/components/bs-stepper/bs-stepper/bs-stepper.css +29 -0
- package/dist/collection/components/bs-stepper/bs-stepper/bs-stepper.js +162 -0
- package/dist/collection/components/bs-stepper/bs-stepper/bs-stepper.stories.js +59 -0
- package/dist/collection/components/bs-stepper/bs-stepper-step/bs-stepper-step.cmp.test.js +73 -0
- package/dist/collection/components/bs-stepper/bs-stepper-step/bs-stepper-step.css +258 -0
- package/dist/collection/components/bs-stepper/bs-stepper-step/bs-stepper-step.js +231 -0
- package/dist/collection/components/bs-switch/bs-switch.js +1 -1
- package/dist/collection/components/bs-tab/bs-inline-tab/bs-inline-tab.js +1 -1
- package/dist/collection/components/bs-tab/bs-tab/bs-tab.js +1 -1
- package/dist/collection/components/bs-tab/bs-tabs/bs-tabs.js +1 -1
- package/dist/collection/components/bs-tooltip/bs-tooltip.js +1 -1
- package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.js +1 -1
- package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer-item/bs-navigation-drawer-item.js +1 -1
- package/dist/components/bs-ai-disclaimer.js +1 -1
- package/dist/components/bs-ai-greeting.js +1 -1
- package/dist/components/bs-ai-thinking.js +1 -1
- package/dist/components/bs-attachment-list.js +1 -1
- package/dist/components/bs-breadcrumb-overflow.js +1 -1
- package/dist/components/bs-breadcrumbs.js +1 -1
- package/dist/components/bs-button-skeleton.js +1 -1
- package/dist/components/bs-chatbot-feedback.js +1 -1
- package/dist/components/bs-chatbot-header.js +1 -1
- package/dist/components/bs-chatbot-response-action.js +1 -1
- package/dist/components/bs-chatbot-sources-drawer.js +1 -1
- package/dist/components/bs-chatbot-suggestion-button.js +1 -1
- package/dist/components/bs-checkbox-skeleton.js +1 -1
- package/dist/components/bs-inline-tab.js +1 -1
- package/dist/components/bs-input.js +1 -1
- package/dist/components/bs-menu-item.js +1 -1
- package/dist/components/bs-menu.js +1 -1
- package/dist/components/bs-navigation-drawer-item.js +1 -1
- package/dist/components/bs-navigation-drawer.js +1 -1
- package/dist/components/bs-pagination.js +1 -1
- package/dist/components/bs-radio.js +1 -1
- package/dist/components/bs-source-link.js +1 -1
- package/dist/components/bs-stepper-step.d.ts +11 -0
- package/dist/components/bs-stepper-step.js +1 -0
- package/dist/components/bs-stepper.d.ts +11 -0
- package/dist/components/bs-stepper.js +1 -0
- package/dist/components/bs-switch.js +1 -1
- package/dist/components/bs-tab.js +1 -1
- package/dist/components/bs-tabs.js +1 -1
- package/dist/components/bs-tooltip.js +1 -1
- package/dist/components/{p-BtX5URLk.js → p-Bs7nEbqK.js} +1 -1
- package/dist/components/{p-CgaPcyEJ.js → p-CPSCOLIf.js} +1 -1
- package/dist/components/{p-qK1XlpTA.js → p-CUa8zihb.js} +1 -1
- package/dist/esm/brandsync-wc.js +1 -1
- package/dist/esm/bs-ai-disclaimer.entry.js +1 -1
- package/dist/esm/bs-ai-greeting.entry.js +1 -1
- package/dist/esm/bs-ai-thinking.entry.js +1 -1
- package/dist/esm/bs-attachment-list.entry.js +1 -1
- package/dist/esm/bs-breadcrumbs.entry.js +1 -1
- package/dist/esm/bs-button-skeleton.entry.js +1 -1
- package/dist/esm/bs-chatbot-feedback.entry.js +1 -1
- package/dist/esm/bs-chatbot-header.entry.js +1 -1
- package/dist/esm/bs-chatbot-response-action.entry.js +1 -1
- package/dist/esm/bs-chatbot-sources-drawer.entry.js +1 -1
- package/dist/esm/bs-chatbot-suggestion-button.entry.js +1 -1
- package/dist/esm/bs-checkbox-skeleton.entry.js +1 -1
- package/dist/esm/bs-inline-tab.entry.js +1 -1
- package/dist/esm/bs-input.entry.js +2 -2
- package/dist/esm/bs-menu-item.entry.js +1 -1
- package/dist/esm/bs-menu.entry.js +1 -1
- package/dist/esm/bs-navigation-drawer-item.entry.js +1 -1
- package/dist/esm/bs-navigation-drawer.entry.js +1 -1
- package/dist/esm/bs-pagination.entry.js +1 -1
- package/dist/esm/bs-radio.entry.js +1 -1
- package/dist/esm/bs-source-link.entry.js +2 -2
- package/dist/esm/bs-stepper-step.entry.js +42 -0
- package/dist/esm/bs-stepper.entry.js +60 -0
- package/dist/esm/bs-switch.entry.js +1 -1
- package/dist/esm/bs-tab.entry.js +1 -1
- package/dist/esm/bs-tabs.entry.js +1 -1
- package/dist/esm/bs-tooltip.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/bs-stepper/bs-stepper/bs-stepper.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-stepper/bs-stepper/bs-stepper.d.ts +48 -0
- package/dist/types/components/bs-stepper/bs-stepper/bs-stepper.stories.d.ts +14 -0
- package/dist/types/components/bs-stepper/bs-stepper-step/bs-stepper-step.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-stepper/bs-stepper-step/bs-stepper-step.d.ts +55 -0
- package/dist/types/components.d.ts +298 -0
- package/package.json +1 -1
- package/dist/brandsync-wc/p-1b7c9928.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t,p as e,H as o,c as s,h as n}from"./p-BJZYe7M4.js";const r=e(class extends o{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.bsLike=s(this,"bsLike"),this.bsDislike=s(this,"bsDislike"),this.bsCopy=s(this,"bsCopy"),this.bsRegenerate=s(this,"bsRegenerate"),this.bsMenuOpen=s(this,"bsMenuOpen"),this.bsSourcesClick=s(this,"bsSourcesClick")}get host(){return this}sourcesCount;menuOpen=!1;bsLike;bsDislike;bsCopy;bsRegenerate;bsMenuOpen;bsSourcesClick;onLikeClick=()=>{this.bsLike.emit()};onDislikeClick=()=>{this.bsDislike.emit()};onCopyClick=()=>{this.bsCopy.emit()};onRegenerateClick=()=>{this.bsRegenerate.emit()};onMenuClick=()=>{this.menuOpen=!this.menuOpen,this.bsMenuOpen.emit(this.menuOpen)};closeMenu=()=>{this.menuOpen&&(this.menuOpen=!1,this.bsMenuOpen.emit(this.menuOpen))};onDocumentClick(t){this.menuOpen&&!t.composedPath().includes(this.host)&&this.closeMenu()}onKeydown(t){this.menuOpen&&"Escape"===t.key&&this.closeMenu()}onSourcesClick=()=>{this.bsSourcesClick.emit()};render(){const t=!!this.sourcesCount&&this.sourcesCount>0;return n("div",{key:"6f0fe6d237fa76a44aebc5452d77619f8a6f3e07",class:"bs-chatbot-response-action"},n("button",{key:"e46a78f8a28c8b23780d86ea52618bb96003bbc6",type:"button",part:"like",class:"bs-chatbot-response-action__button","aria-label":"Like",onClick:this.onLikeClick},n("slot",{key:"cf59ea0115e99fef5e5398f8101ecd4702f6d13c",name:"like-icon"},n(a,{key:"0597457db34f2e4677f63a7253dd59015bbcbaf5"}))),n("button",{key:"9dd6db57941126a2b50f3c1c45653e35cc4e9113",type:"button",part:"dislike",class:"bs-chatbot-response-action__button","aria-label":"Dislike",onClick:this.onDislikeClick},n("slot",{key:"8ab78179e979275461cd420e1ab7919396e6126e",name:"dislike-icon"},n(i,{key:"5f9eeeb87c3bb3f635468dfcdddb323069c20c6f"}))),n("button",{key:"6bf0a37024846ababcfc0c1593f6d9fd4bd2b6af",type:"button",part:"copy",class:"bs-chatbot-response-action__button","aria-label":"Copy",onClick:this.onCopyClick},n("slot",{key:"68c68be3274b3bf2c0f59178640e6009ec5869da",name:"copy-icon"},n(c,{key:"229bd54acaad25cc05da69361142be1588c723f9"}))),n("button",{key:"1cc152937d132b179b72daf1342f63cbabcc67f2",type:"button",part:"regenerate",class:"bs-chatbot-response-action__button","aria-label":"Regenerate",onClick:this.onRegenerateClick},n("slot",{key:"407f9527d50f75d0063b92a6f68ed6a4364b72bc",name:"regenerate-icon"},n(b,{key:"f1d5fca176ef8f90c167a62307bda06bdc86b4a6"}))),n("div",{key:"2fe454900888c46dc17d24ce28c3af1d2d9afcf6",class:"bs-chatbot-response-action__menu-wrapper"},n("button",{key:"3046ca6507dd70c734a37e6aed89613167ce5e29",type:"button",part:"menu",class:"bs-chatbot-response-action__button","aria-label":"More options","aria-haspopup":"menu","aria-expanded":this.menuOpen?"true":"false",onClick:this.onMenuClick},n("slot",{key:"3e6814659655c0ba61bc84a3eacae0a13b2c9cd6",name:"menu-icon"},n(d,{key:"70a898b1158a284f1c8e07a6d92ce11de1265844"}))),this.menuOpen&&n("div",{key:"95bc1e4c5a8e8d160a6b59c36bf3485ecfdc8505",class:"bs-chatbot-response-action__menu-popup"},n("slot",{key:"80dd0220745586c213c4372ded2f2138c4e3dadb",name:"menu"}))),t&&n("button",{key:"4f1036874d1a02347820bb0d19a77c18f5d33bc0",type:"button",part:"sources",class:"bs-chatbot-response-action__sources",onClick:this.onSourcesClick},n("slot",{key:"11c4b6b5399ffd011bb60da19265e19bc4407061",name:"sources-icon"},n(p,{key:"fd64afb252fb5b32332cc46ff664fc947df22ea5"})),n("span",{key:"ef47e93369d033e3306e7006516470d5b1c9c13f",class:"bs-chatbot-response-action__sources-label"},this.sourcesCount," ",1===this.sourcesCount?"source":"sources")))}static get style(){return":host{display:block;--bs-chatbot-response-action-gap:var(--bs-spacing-100);--bs-chatbot-response-action-padding-top:var(--bs-spacing-150);--bs-chatbot-response-action-padding-bottom:var(--bs-spacing-50);--bs-chatbot-response-action-button-size:var(--bs-spacing-400);--bs-chatbot-response-action-button-radius:var(--bs-border-radius-100);--bs-chatbot-response-action-button-hover:var(--bs-color-neutral-container);--bs-chatbot-response-action-button-pressed:var(--bs-color-neutral-container-pressed);--bs-chatbot-response-action-icon:var(--bs-icon-neutral-default);--bs-chatbot-response-action-sources-gap:var(--bs-spacing-50);--bs-chatbot-response-action-sources-padding-left:var(--bs-spacing-100);--bs-chatbot-response-action-sources-padding-right:var(--bs-spacing-150);--bs-chatbot-response-action-sources-color:var(--bs-text-neutral-default);--bs-chatbot-response-action-sources-font-size:var(--bs-font-size-sm);--bs-chatbot-response-action-sources-line-height:var(--bs-line-height-body-sm)}.bs-chatbot-response-action{box-sizing:border-box;display:flex;align-items:center;gap:var(--bs-chatbot-response-action-gap);padding-top:var(--bs-chatbot-response-action-padding-top);padding-bottom:var(--bs-chatbot-response-action-padding-bottom);background:transparent;font-family:inherit}.bs-chatbot-response-action__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-response-action-icon);font-family:inherit;border-radius:var(--bs-chatbot-response-action-button-radius);width:var(--bs-chatbot-response-action-button-size);height:var(--bs-chatbot-response-action-button-size);flex-shrink:0;transition:background-color var(--bs-duration-fast) var(--bs-easing-standard)}.bs-chatbot-response-action__button:focus-visible{outline:2px solid var(--bs-border-neutral-focus);outline-offset:2px}.bs-chatbot-response-action__button svg{width:20px;height:20px}.bs-chatbot-response-action__button:hover{background:var(--bs-chatbot-response-action-button-hover)}.bs-chatbot-response-action__button:active{background:var(--bs-chatbot-response-action-button-pressed)}.bs-chatbot-response-action__menu-wrapper{position:relative;display:inline-flex;flex-shrink:0}.bs-chatbot-response-action__menu-popup{position:absolute;top:calc(100% + var(--bs-spacing-50));left:0;z-index:1}.bs-chatbot-response-action__sources{display:inline-flex;align-items:center;box-sizing:border-box;border:none;cursor:pointer;background:transparent;color:var(--bs-chatbot-response-action-sources-color);font-family:inherit;font-size:var(--bs-chatbot-response-action-sources-font-size);line-height:calc(var(--bs-chatbot-response-action-sources-line-height) * 1px);gap:var(--bs-chatbot-response-action-sources-gap);border-radius:var(--bs-chatbot-response-action-button-radius);height:var(--bs-chatbot-response-action-button-size);padding-left:var(--bs-chatbot-response-action-sources-padding-left);padding-right:var(--bs-chatbot-response-action-sources-padding-right);flex-shrink:0;transition:background-color var(--bs-duration-fast) var(--bs-easing-standard)}.bs-chatbot-response-action__sources:focus-visible{outline:2px solid var(--bs-border-neutral-focus);outline-offset:2px}.bs-chatbot-response-action__sources svg{width:20px;height:20px;flex-shrink:0}.bs-chatbot-response-action__sources:hover{background:var(--bs-chatbot-response-action-button-hover)}.bs-chatbot-response-action__sources:active{background:var(--bs-chatbot-response-action-button-pressed)}.bs-chatbot-response-action__sources-label{white-space:nowrap}"}},[769,"bs-chatbot-response-action",{sourcesCount:[2,"sources-count"],menuOpen:[1540,"menu-open"]},[[4,"click","onDocumentClick"],[4,"keydown","onKeydown"]]]),a=()=>n("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},n("path",{d:"M2.5 8.125H6.25V16.25H2.5C2.33424 16.25 2.17527 16.1842 2.05806 16.0669C1.94085 15.9497 1.875 15.7908 1.875 15.625V8.75C1.875 8.58424 1.94085 8.42527 2.05806 8.30806C2.17527 8.19085 2.33424 8.125 2.5 8.125Z",stroke:"currentColor","stroke-width":"1.66667","stroke-linecap":"round","stroke-linejoin":"round"}),n("path",{d:"M6.25 8.125L9.375 1.875C10.038 1.875 10.6739 2.13839 11.1428 2.60723C11.6116 3.07607 11.875 3.71196 11.875 4.375V6.25H16.875C17.0523 6.25005 17.2276 6.28782 17.3892 6.36081C17.5508 6.4338 17.695 6.54033 17.8123 6.67333C17.9295 6.80634 18.0172 6.96277 18.0693 7.13223C18.1215 7.3017 18.137 7.48033 18.1148 7.65625L17.1773 15.1562C17.1393 15.4583 16.9923 15.736 16.7641 15.9374C16.5358 16.1388 16.2419 16.2499 15.9375 16.25H6.25",stroke:"currentColor","stroke-width":"1.66667","stroke-linecap":"round","stroke-linejoin":"round"})),i=()=>n("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},n("path",{d:"M2.5 3.75H6.25V11.875H2.5C2.33424 11.875 2.17527 11.8092 2.05806 11.6919C1.94085 11.5747 1.875 11.4158 1.875 11.25V4.375C1.875 4.20924 1.94085 4.05027 2.05806 3.93306C2.17527 3.81585 2.33424 3.75 2.5 3.75Z",stroke:"currentColor","stroke-width":"1.66667","stroke-linecap":"round","stroke-linejoin":"round"}),n("path",{d:"M6.25 11.875L9.375 18.125C10.038 18.125 10.6739 17.8616 11.1428 17.3928C11.6116 16.9239 11.875 16.288 11.875 15.625V13.75H16.875C17.0523 13.75 17.2276 13.7122 17.3892 13.6392C17.5508 13.5662 17.695 13.4597 17.8123 13.3267C17.9295 13.1937 18.0172 13.0372 18.0693 12.8678C18.1215 12.6983 18.137 12.5197 18.1148 12.3438L17.1773 4.84375C17.1393 4.54174 16.9923 4.26399 16.7641 4.06262C16.5358 3.86124 16.2419 3.75009 15.9375 3.75H6.25",stroke:"currentColor","stroke-width":"1.66667","stroke-linecap":"round","stroke-linejoin":"round"})),c=()=>n("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},n("path",{d:"M13.125 13.125H16.875V3.125H6.875V6.875",stroke:"currentColor","stroke-width":"1.66667","stroke-linecap":"round","stroke-linejoin":"round"}),n("path",{d:"M13.125 6.875H3.125V16.875H13.125V6.875Z",stroke:"currentColor","stroke-width":"1.66667","stroke-linecap":"round","stroke-linejoin":"round"})),b=()=>n("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},n("path",{d:"M13.125 7.5H16.875V3.75",stroke:"currentColor","stroke-width":"1.66667","stroke-linecap":"round","stroke-linejoin":"round"}),n("path",{d:"M16.875 7.5L14.6656 5.29063C13.3861 4.01117 11.6538 3.28772 9.84437 3.27719C8.03494 3.26666 6.29431 3.9699 5 5.23438",stroke:"currentColor","stroke-width":"1.66667","stroke-linecap":"round","stroke-linejoin":"round"}),n("path",{d:"M6.875 12.5H3.125V16.25",stroke:"currentColor","stroke-width":"1.66667","stroke-linecap":"round","stroke-linejoin":"round"}),n("path",{d:"M3.125 12.5L5.33437 14.7094C6.61388 15.9888 8.34621 16.7123 10.1556 16.7228C11.9651 16.7333 13.7057 16.0301 15 14.7656",stroke:"currentColor","stroke-width":"1.66667","stroke-linecap":"round","stroke-linejoin":"round"})),d=()=>n("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},n("path",{d:"M10 9.11426C10.489 9.11426 10.8857 9.511 10.8857 10C10.8857 10.489 10.489 10.8857 10 10.8857C9.511 10.8857 9.11426 10.489 9.11426 10C9.11426 9.511 9.511 9.11426 10 9.11426Z",fill:"currentColor",stroke:"currentColor","stroke-width":"0.104167"}),n("path",{d:"M10 3.80176C10.489 3.80176 10.8857 4.1985 10.8857 4.6875C10.8857 5.1765 10.489 5.57324 10 5.57324C9.511 5.57324 9.11426 5.1765 9.11426 4.6875C9.11426 4.1985 9.511 3.80176 10 3.80176Z",fill:"currentColor",stroke:"currentColor","stroke-width":"0.104167"}),n("path",{d:"M10 16.25C10.5178 16.25 10.9375 15.8303 10.9375 15.3125C10.9375 14.7947 10.5178 14.375 10 14.375C9.48223 14.375 9.0625 14.7947 9.0625 15.3125C9.0625 15.8303 9.48223 16.25 10 16.25Z",fill:"currentColor"})),p=()=>n("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},n("path",{d:"M13.125 17.5H4.375C4.20924 17.5 4.05027 17.4342 3.93306 17.3169C3.81585 17.1997 3.75 17.0408 3.75 16.875V5.625C3.75 5.45924 3.81585 5.30027 3.93306 5.18306C4.05027 5.06585 4.20924 5 4.375 5H10.625L13.75 8.125V16.875C13.75 17.0408 13.6842 17.1997 13.5669 17.3169C13.4497 17.4342 13.2908 17.5 13.125 17.5Z",stroke:"currentColor","stroke-width":"1.66667","stroke-linecap":"round","stroke-linejoin":"round"}),n("path",{d:"M6.25 5V3.125C6.25 2.95924 6.31585 2.80027 6.43306 2.68306C6.55027 2.56585 6.70924 2.5 6.875 2.5H13.125L16.25 5.625V14.375C16.25 14.5408 16.1842 14.6997 16.0669 14.8169C15.9497 14.9342 15.7908 15 15.625 15H13.75",stroke:"currentColor","stroke-width":"1.66667","stroke-linecap":"round","stroke-linejoin":"round"}),n("path",{d:"M6.875 11.875H10.625",stroke:"currentColor","stroke-width":"1.66667","stroke-linecap":"round","stroke-linejoin":"round"}),n("path",{d:"M6.875 14.375H10.625",stroke:"currentColor","stroke-width":"1.66667","stroke-linecap":"round","stroke-linejoin":"round"}));function l(){"undefined"!=typeof customElements&&["bs-chatbot-response-action"].forEach((e=>{"bs-chatbot-response-action"===e&&(customElements.get(t(e))||customElements.define(t(e),r))}))}l();const u=r,h=l;export{u as BsChatbotResponseAction,h as defineCustomElement}
|
|
1
|
+
import{t as e,p as t,H as o,c as s,h as n}from"./p-BJZYe7M4.js";const r=t(class extends o{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.bsLike=s(this,"bsLike"),this.bsDislike=s(this,"bsDislike"),this.bsCopy=s(this,"bsCopy"),this.bsRegenerate=s(this,"bsRegenerate"),this.bsMenuOpen=s(this,"bsMenuOpen"),this.bsSourcesClick=s(this,"bsSourcesClick")}get host(){return this}sourcesCount;menuOpen=!1;bsLike;bsDislike;bsCopy;bsRegenerate;bsMenuOpen;bsSourcesClick;onLikeClick=()=>{this.bsLike.emit()};onDislikeClick=()=>{this.bsDislike.emit()};onCopyClick=()=>{this.bsCopy.emit()};onRegenerateClick=()=>{this.bsRegenerate.emit()};onMenuClick=()=>{this.menuOpen=!this.menuOpen,this.bsMenuOpen.emit(this.menuOpen)};closeMenu=()=>{this.menuOpen&&(this.menuOpen=!1,this.bsMenuOpen.emit(this.menuOpen))};onDocumentClick(e){this.menuOpen&&!e.composedPath().includes(this.host)&&this.closeMenu()}onKeydown(e){this.menuOpen&&"Escape"===e.key&&this.closeMenu()}onSourcesClick=()=>{this.bsSourcesClick.emit()};render(){const e=!!this.sourcesCount&&this.sourcesCount>0;return n("div",{key:"36a3a372af16e57f0747d0afacede280c75e2baa",class:"bs-chatbot-response-action"},n("button",{key:"5d67c3cb0b3488d3f3ac84fe593cacc66e119a3b",type:"button",part:"like",class:"bs-chatbot-response-action__button","aria-label":"Like",onClick:this.onLikeClick},n("slot",{key:"b9447e9cb87c841cb75b015324780a926275643d",name:"like-icon"},n(a,{key:"d5b8b4cb03eb08d12ef92d6ef7e8747830f496f0"}))),n("button",{key:"e510cc2d7edf1b85b9c298f7d988b994f716821b",type:"button",part:"dislike",class:"bs-chatbot-response-action__button","aria-label":"Dislike",onClick:this.onDislikeClick},n("slot",{key:"94aa62133ad644a1423539a2854e24bd809ae934",name:"dislike-icon"},n(i,{key:"5770a79e906a6ff99ca9e632a2dbcfccf3478756"}))),n("button",{key:"b8477c11b99ba291406ebc8fcb953ca87d21e5d5",type:"button",part:"copy",class:"bs-chatbot-response-action__button","aria-label":"Copy",onClick:this.onCopyClick},n("slot",{key:"f2ebadfff852af1e1f1462257a1132ef16fd538d",name:"copy-icon"},n(c,{key:"57c470579a282b8fbd0aad5e1153e4e5666c8c04"}))),n("button",{key:"d27f9d32f57296011f8c69848b678b745e068074",type:"button",part:"regenerate",class:"bs-chatbot-response-action__button","aria-label":"Regenerate",onClick:this.onRegenerateClick},n("slot",{key:"eb8dc45632ecf993cbdb78a4174eee93fc8a1df8",name:"regenerate-icon"},n(b,{key:"a1a72e6fdc499b4f76caeb747c4711b31985e5b8"}))),n("div",{key:"e51c762ded01dcacbfcc554b858992ecf818b890",class:"bs-chatbot-response-action__menu-wrapper"},n("button",{key:"43cb51c908e6e57f35d6ff84a0e7fba850c3c410",type:"button",part:"menu",class:"bs-chatbot-response-action__button","aria-label":"More options","aria-haspopup":"menu","aria-expanded":this.menuOpen?"true":"false",onClick:this.onMenuClick},n("slot",{key:"515f26fb7b3c861c5fb67e6831fa0cff568006d2",name:"menu-icon"},n(d,{key:"93c50b2d7ed0d710c30d33a0483943e12111f479"}))),this.menuOpen&&n("div",{key:"098e59c3e121fe9565d349372d84cc8106762968",class:"bs-chatbot-response-action__menu-popup"},n("slot",{key:"bc7a4ec19beeaf66d7dbd506914d185233677760",name:"menu"}))),e&&n("button",{key:"703c714cf207a1475069cc8c93155b9be002310a",type:"button",part:"sources",class:"bs-chatbot-response-action__sources",onClick:this.onSourcesClick},n("slot",{key:"8184596f5a98cbaaa276d337269aea27f3de5ba4",name:"sources-icon"},n(p,{key:"eb5984310dc77e1aa082c9275105bbca923cc7ab"})),n("span",{key:"52ba085dd94415e7ee36fce236375bd9d66f6145",class:"bs-chatbot-response-action__sources-label"},this.sourcesCount," ",1===this.sourcesCount?"source":"sources")))}static get style(){return":host{display:block;--bs-chatbot-response-action-gap:var(--bs-spacing-100);--bs-chatbot-response-action-padding-top:var(--bs-spacing-150);--bs-chatbot-response-action-padding-bottom:var(--bs-spacing-50);--bs-chatbot-response-action-button-size:var(--bs-spacing-400);--bs-chatbot-response-action-button-radius:var(--bs-border-radius-100);--bs-chatbot-response-action-button-hover:var(--bs-color-neutral-container);--bs-chatbot-response-action-button-pressed:var(--bs-color-neutral-container-pressed);--bs-chatbot-response-action-icon:var(--bs-icon-neutral-default);--bs-chatbot-response-action-sources-gap:var(--bs-spacing-50);--bs-chatbot-response-action-sources-padding-left:var(--bs-spacing-100);--bs-chatbot-response-action-sources-padding-right:var(--bs-spacing-150);--bs-chatbot-response-action-sources-color:var(--bs-text-neutral-default);--bs-chatbot-response-action-sources-font-size:var(--bs-font-size-sm);--bs-chatbot-response-action-sources-line-height:var(--bs-line-height-body-sm)}.bs-chatbot-response-action{box-sizing:border-box;display:flex;align-items:center;gap:var(--bs-chatbot-response-action-gap);padding-top:var(--bs-chatbot-response-action-padding-top);padding-bottom:var(--bs-chatbot-response-action-padding-bottom);background:transparent;font-family:inherit}.bs-chatbot-response-action__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-response-action-icon);font-family:inherit;border-radius:var(--bs-chatbot-response-action-button-radius);width:var(--bs-chatbot-response-action-button-size);height:var(--bs-chatbot-response-action-button-size);flex-shrink:0;transition:background-color var(--bs-duration-fast) var(--bs-easing-standard)}.bs-chatbot-response-action__button:focus-visible{outline:2px solid var(--bs-border-neutral-focus);outline-offset:2px}.bs-chatbot-response-action__button svg{width:20px;height:20px}.bs-chatbot-response-action__button:hover{background:var(--bs-chatbot-response-action-button-hover)}.bs-chatbot-response-action__button:active{background:var(--bs-chatbot-response-action-button-pressed)}.bs-chatbot-response-action__menu-wrapper{position:relative;display:inline-flex;flex-shrink:0}.bs-chatbot-response-action__menu-popup{position:absolute;top:calc(100% + var(--bs-spacing-50));left:0;z-index:1}.bs-chatbot-response-action__sources{display:inline-flex;align-items:center;box-sizing:border-box;border:none;cursor:pointer;background:transparent;color:var(--bs-chatbot-response-action-sources-color);font-family:inherit;font-size:var(--bs-chatbot-response-action-sources-font-size);line-height:calc(var(--bs-chatbot-response-action-sources-line-height) * 1px);gap:var(--bs-chatbot-response-action-sources-gap);border-radius:var(--bs-chatbot-response-action-button-radius);height:var(--bs-chatbot-response-action-button-size);padding-left:var(--bs-chatbot-response-action-sources-padding-left);padding-right:var(--bs-chatbot-response-action-sources-padding-right);flex-shrink:0;transition:background-color var(--bs-duration-fast) var(--bs-easing-standard)}.bs-chatbot-response-action__sources:focus-visible{outline:2px solid var(--bs-border-neutral-focus);outline-offset:2px}.bs-chatbot-response-action__sources svg{width:20px;height:20px;flex-shrink:0}.bs-chatbot-response-action__sources:hover{background:var(--bs-chatbot-response-action-button-hover)}.bs-chatbot-response-action__sources:active{background:var(--bs-chatbot-response-action-button-pressed)}.bs-chatbot-response-action__sources-label{white-space:nowrap}"}},[769,"bs-chatbot-response-action",{sourcesCount:[2,"sources-count"],menuOpen:[1540,"menu-open"]},[[4,"click","onDocumentClick"],[4,"keydown","onKeydown"]]]),a=()=>n("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},n("path",{d:"M2.5 8.125H6.25V16.25H2.5C2.33424 16.25 2.17527 16.1842 2.05806 16.0669C1.94085 15.9497 1.875 15.7908 1.875 15.625V8.75C1.875 8.58424 1.94085 8.42527 2.05806 8.30806C2.17527 8.19085 2.33424 8.125 2.5 8.125Z",stroke:"currentColor","stroke-width":"1.66667","stroke-linecap":"round","stroke-linejoin":"round"}),n("path",{d:"M6.25 8.125L9.375 1.875C10.038 1.875 10.6739 2.13839 11.1428 2.60723C11.6116 3.07607 11.875 3.71196 11.875 4.375V6.25H16.875C17.0523 6.25005 17.2276 6.28782 17.3892 6.36081C17.5508 6.4338 17.695 6.54033 17.8123 6.67333C17.9295 6.80634 18.0172 6.96277 18.0693 7.13223C18.1215 7.3017 18.137 7.48033 18.1148 7.65625L17.1773 15.1562C17.1393 15.4583 16.9923 15.736 16.7641 15.9374C16.5358 16.1388 16.2419 16.2499 15.9375 16.25H6.25",stroke:"currentColor","stroke-width":"1.66667","stroke-linecap":"round","stroke-linejoin":"round"})),i=()=>n("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},n("path",{d:"M2.5 3.75H6.25V11.875H2.5C2.33424 11.875 2.17527 11.8092 2.05806 11.6919C1.94085 11.5747 1.875 11.4158 1.875 11.25V4.375C1.875 4.20924 1.94085 4.05027 2.05806 3.93306C2.17527 3.81585 2.33424 3.75 2.5 3.75Z",stroke:"currentColor","stroke-width":"1.66667","stroke-linecap":"round","stroke-linejoin":"round"}),n("path",{d:"M6.25 11.875L9.375 18.125C10.038 18.125 10.6739 17.8616 11.1428 17.3928C11.6116 16.9239 11.875 16.288 11.875 15.625V13.75H16.875C17.0523 13.75 17.2276 13.7122 17.3892 13.6392C17.5508 13.5662 17.695 13.4597 17.8123 13.3267C17.9295 13.1937 18.0172 13.0372 18.0693 12.8678C18.1215 12.6983 18.137 12.5197 18.1148 12.3438L17.1773 4.84375C17.1393 4.54174 16.9923 4.26399 16.7641 4.06262C16.5358 3.86124 16.2419 3.75009 15.9375 3.75H6.25",stroke:"currentColor","stroke-width":"1.66667","stroke-linecap":"round","stroke-linejoin":"round"})),c=()=>n("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},n("path",{d:"M13.125 13.125H16.875V3.125H6.875V6.875",stroke:"currentColor","stroke-width":"1.66667","stroke-linecap":"round","stroke-linejoin":"round"}),n("path",{d:"M13.125 6.875H3.125V16.875H13.125V6.875Z",stroke:"currentColor","stroke-width":"1.66667","stroke-linecap":"round","stroke-linejoin":"round"})),b=()=>n("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},n("path",{d:"M13.125 7.5H16.875V3.75",stroke:"currentColor","stroke-width":"1.66667","stroke-linecap":"round","stroke-linejoin":"round"}),n("path",{d:"M16.875 7.5L14.6656 5.29063C13.3861 4.01117 11.6538 3.28772 9.84437 3.27719C8.03494 3.26666 6.29431 3.9699 5 5.23438",stroke:"currentColor","stroke-width":"1.66667","stroke-linecap":"round","stroke-linejoin":"round"}),n("path",{d:"M6.875 12.5H3.125V16.25",stroke:"currentColor","stroke-width":"1.66667","stroke-linecap":"round","stroke-linejoin":"round"}),n("path",{d:"M3.125 12.5L5.33437 14.7094C6.61388 15.9888 8.34621 16.7123 10.1556 16.7228C11.9651 16.7333 13.7057 16.0301 15 14.7656",stroke:"currentColor","stroke-width":"1.66667","stroke-linecap":"round","stroke-linejoin":"round"})),d=()=>n("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},n("path",{d:"M10 9.11426C10.489 9.11426 10.8857 9.511 10.8857 10C10.8857 10.489 10.489 10.8857 10 10.8857C9.511 10.8857 9.11426 10.489 9.11426 10C9.11426 9.511 9.511 9.11426 10 9.11426Z",fill:"currentColor",stroke:"currentColor","stroke-width":"0.104167"}),n("path",{d:"M10 3.80176C10.489 3.80176 10.8857 4.1985 10.8857 4.6875C10.8857 5.1765 10.489 5.57324 10 5.57324C9.511 5.57324 9.11426 5.1765 9.11426 4.6875C9.11426 4.1985 9.511 3.80176 10 3.80176Z",fill:"currentColor",stroke:"currentColor","stroke-width":"0.104167"}),n("path",{d:"M10 16.25C10.5178 16.25 10.9375 15.8303 10.9375 15.3125C10.9375 14.7947 10.5178 14.375 10 14.375C9.48223 14.375 9.0625 14.7947 9.0625 15.3125C9.0625 15.8303 9.48223 16.25 10 16.25Z",fill:"currentColor"})),p=()=>n("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},n("path",{d:"M13.125 17.5H4.375C4.20924 17.5 4.05027 17.4342 3.93306 17.3169C3.81585 17.1997 3.75 17.0408 3.75 16.875V5.625C3.75 5.45924 3.81585 5.30027 3.93306 5.18306C4.05027 5.06585 4.20924 5 4.375 5H10.625L13.75 8.125V16.875C13.75 17.0408 13.6842 17.1997 13.5669 17.3169C13.4497 17.4342 13.2908 17.5 13.125 17.5Z",stroke:"currentColor","stroke-width":"1.66667","stroke-linecap":"round","stroke-linejoin":"round"}),n("path",{d:"M6.25 5V3.125C6.25 2.95924 6.31585 2.80027 6.43306 2.68306C6.55027 2.56585 6.70924 2.5 6.875 2.5H13.125L16.25 5.625V14.375C16.25 14.5408 16.1842 14.6997 16.0669 14.8169C15.9497 14.9342 15.7908 15 15.625 15H13.75",stroke:"currentColor","stroke-width":"1.66667","stroke-linecap":"round","stroke-linejoin":"round"}),n("path",{d:"M6.875 11.875H10.625",stroke:"currentColor","stroke-width":"1.66667","stroke-linecap":"round","stroke-linejoin":"round"}),n("path",{d:"M6.875 14.375H10.625",stroke:"currentColor","stroke-width":"1.66667","stroke-linecap":"round","stroke-linejoin":"round"}));function l(){"undefined"!=typeof customElements&&["bs-chatbot-response-action"].forEach((t=>{"bs-chatbot-response-action"===t&&(customElements.get(e(t))||customElements.define(e(t),r))}))}l();const u=r,h=l;export{u as BsChatbotResponseAction,h as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as
|
|
1
|
+
import{t as e,p as s,H as a,c as r,h as o}from"./p-BJZYe7M4.js";const t=s(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.bsCollapse=r(this,"bsCollapse")}get el(){return this}heading="Sources";count;bsCollapse;slottedCount=0;onSlotchange=e=>{this.slottedCount=e.target.assignedElements().filter((e=>"bs-source-link"===e.tagName.toLowerCase())).length};onCollapseClick=()=>{this.bsCollapse.emit()};render(){const e=this.count??this.slottedCount;return o("div",{key:"bbec982298c928942775b7543865781a3fd0c555",class:"bs-chatbot-sources-drawer",role:"region","aria-label":this.heading},o("div",{key:"9e6e7c89bdf061c89a608fcdc9aa9e85a8de731c",class:"bs-chatbot-sources-drawer__header"},o("div",{key:"648efdba7da08457adf1e9fe5cb69b1a4d2f9266",class:"bs-chatbot-sources-drawer__title-group"},o("h2",{key:"08557ea95eae88878c3c0971ce8aa5fa6a72bdcc",part:"heading",class:"bs-chatbot-sources-drawer__heading"},this.heading),e>0&&o("span",{key:"3aaf595afc3170bf8f18cf06a119555ff386aaa4",part:"count",class:"bs-chatbot-sources-drawer__count"},e)),o("button",{key:"ccf98e8772366e8c91e6cb6f824194d4ec8a8b35",type:"button",part:"collapse",class:"bs-chatbot-sources-drawer__collapse","aria-label":"Collapse sources",onClick:this.onCollapseClick},o("slot",{key:"d1f41711fd871e0f5ef0d23fd7ffb8ae0d6aa595",name:"collapse-icon"},o(c,{key:"55dea932bcfa2dcdb776cf452737362c52ea879e"})))),o("div",{key:"f3f8e5fd96df856ecb965c7e75b706c1f8fe6488",part:"list",class:"bs-chatbot-sources-drawer__list"},o("slot",{key:"27f35d19a5f00275c983f17a2709932fdf2f2b61",onSlotchange:this.onSlotchange})))}static get style(){return":host{display:block;--bs-chatbot-sources-drawer-bg:var(--bs-surface-raised);--bs-chatbot-sources-drawer-header-shadow:var(--bs-shadow-xs);--bs-chatbot-sources-drawer-header-padding-x:var(--bs-spacing-200);--bs-chatbot-sources-drawer-header-padding-top:var(--bs-spacing-150);--bs-chatbot-sources-drawer-header-padding-bottom:var(--bs-spacing-100);--bs-chatbot-sources-drawer-heading-color:var(--bs-text-default);--bs-chatbot-sources-drawer-count-bg:var(--bs-badge-bg-neutral-container);--bs-chatbot-sources-drawer-count-color:var(--bs-badge-text-neutral);--bs-chatbot-sources-drawer-collapse-hover:var(--bs-surface-hover);--bs-chatbot-sources-drawer-section-gap:var(--bs-spacing-200);--bs-chatbot-sources-drawer-list-padding:var(--bs-spacing-200);--bs-chatbot-sources-drawer-list-gap:var(--bs-spacing-50)}.bs-chatbot-sources-drawer{box-sizing:border-box;display:flex;flex-direction:column;gap:var(--bs-chatbot-sources-drawer-section-gap);width:100%;height:100%;background:var(--bs-chatbot-sources-drawer-bg);font-family:inherit}.bs-chatbot-sources-drawer__header{box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;flex-shrink:0;padding:var(--bs-chatbot-sources-drawer-header-padding-top) var(--bs-chatbot-sources-drawer-header-padding-x) var(--bs-chatbot-sources-drawer-header-padding-bottom);box-shadow:var(--bs-chatbot-sources-drawer-header-shadow)}.bs-chatbot-sources-drawer__title-group{display:flex;align-items:center;gap:var(--bs-spacing-100)}.bs-chatbot-sources-drawer__heading{margin:0;color:var(--bs-chatbot-sources-drawer-heading-color);font-size:var(--bs-font-size-2xl);font-weight:var(--bs-font-weight-bold);line-height:calc(var(--bs-line-height-heading-h4) * 1px)}.bs-chatbot-sources-drawer__count{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;min-width:16px;max-width:34px;padding:var(--bs-spacing-50) var(--bs-spacing-100);background:var(--bs-chatbot-sources-drawer-count-bg);border-radius:var(--bs-border-radius-50);color:var(--bs-chatbot-sources-drawer-count-color);font-size:var(--bs-font-size-xs);line-height:calc(var(--bs-line-height-caption-sm) * 1px)}.bs-chatbot-sources-drawer__collapse{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;background:none;border:none;border-radius:var(--bs-border-radius-100);color:var(--bs-icon-default);cursor:pointer}.bs-chatbot-sources-drawer__collapse:hover{background:var(--bs-chatbot-sources-drawer-collapse-hover)}.bs-chatbot-sources-drawer__collapse:focus-visible{outline:2px solid var(--bs-border-neutral-focus);outline-offset:1px}.bs-chatbot-sources-drawer__list{box-sizing:border-box;display:flex;flex-direction:column;gap:var(--bs-chatbot-sources-drawer-list-gap);padding:0 var(--bs-chatbot-sources-drawer-list-padding) var(--bs-chatbot-sources-drawer-list-padding);overflow-y:auto}"}},[769,"bs-chatbot-sources-drawer",{heading:[1],count:[2],slottedCount:[32]}]),c=()=>o("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},o("path",{d:"M7.5 4.375L13.125 10L7.5 15.625",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}));function b(){"undefined"!=typeof customElements&&["bs-chatbot-sources-drawer"].forEach((s=>{"bs-chatbot-sources-drawer"===s&&(customElements.get(e(s))||customElements.define(e(s),t))}))}b();const d=t,i=b;export{d as BsChatbotSourcesDrawer,i as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t,p as o,H as s,c as b,h as e}from"./p-BJZYe7M4.js";const n=o(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.bsSelect=b(this,"bsSelect")}disabled=!1;bsSelect;onClick=()=>{this.bsSelect.emit()};render(){return e("button",{key:"
|
|
1
|
+
import{t,p as o,H as s,c as b,h as e}from"./p-BJZYe7M4.js";const n=o(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.bsSelect=b(this,"bsSelect")}disabled=!1;bsSelect;onClick=()=>{this.bsSelect.emit()};render(){return e("button",{key:"26a03adfaace4fffed0f3c371b665f49a68dbfae",type:"button",part:"button",class:"bs-chatbot-suggestion-button",disabled:this.disabled,onClick:this.onClick},e("slot",{key:"e40d0b911d11329ea5f07cffe1a0f60acf777dd5"}))}static get style(){return":host{display:inline-block;--bs-chatbot-suggestion-button-radius:var(--bs-border-radius-full);--bs-chatbot-suggestion-button-border-color:var(--bs-border-primary);--bs-chatbot-suggestion-button-bg-default:var(--bs-color-primary-container);--bs-chatbot-suggestion-button-bg-hover:var(--bs-color-primary-container-hover);--bs-chatbot-suggestion-button-bg-pressed:var(--bs-brand-200);--bs-chatbot-suggestion-button-bg-focus:var(--bs-color-primary-container-hover);--bs-chatbot-suggestion-button-text-default:var(--bs-text-action);--bs-chatbot-suggestion-button-text-hover:var(--bs-text-action-hover);--bs-chatbot-suggestion-button-focus-ring-color:var(--bs-border-primary-focus)}.bs-chatbot-suggestion-button{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;height:40px;min-width:80px;padding:var(--bs-spacing-100) var(--bs-spacing-200);border:var(--bs-border-width-thin) solid var(--bs-chatbot-suggestion-button-border-color);border-radius:var(--bs-chatbot-suggestion-button-radius);background:var(--bs-chatbot-suggestion-button-bg-default);color:var(--bs-chatbot-suggestion-button-text-default);font-family:inherit;font-size:var(--bs-font-size-md);line-height:calc(var(--bs-line-height-body-md) * 1px);text-align:center;cursor:pointer;transition:background-color var(--bs-duration-fast) var(--bs-easing-standard)}.bs-chatbot-suggestion-button:hover:not(:disabled){background:var(--bs-chatbot-suggestion-button-bg-hover);color:var(--bs-chatbot-suggestion-button-text-hover)}.bs-chatbot-suggestion-button:active:not(:disabled){background:var(--bs-chatbot-suggestion-button-bg-pressed);color:var(--bs-chatbot-suggestion-button-text-hover)}.bs-chatbot-suggestion-button:focus-visible{background:var(--bs-chatbot-suggestion-button-bg-focus);color:var(--bs-chatbot-suggestion-button-text-hover);outline:var(--bs-border-width-medium) solid var(--bs-chatbot-suggestion-button-focus-ring-color);outline-offset:3px}.bs-chatbot-suggestion-button:disabled{opacity:var(--bs-opacity-disabled);cursor:not-allowed}"}},[769,"bs-chatbot-suggestion-button",{disabled:[4]}]);function a(){"undefined"!=typeof customElements&&["bs-chatbot-suggestion-button"].forEach((o=>{"bs-chatbot-suggestion-button"===o&&(customElements.get(t(o))||customElements.define(t(o),n))}))}a();const r=n,i=a;export{r as BsChatbotSuggestionButton,i as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e,p as s,H as o,h as b}from"./p-BJZYe7M4.js";const c=s(class extends o{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}size="lg";render(){return b("span",{key:"
|
|
1
|
+
import{t as e,p as s,H as o,h as b}from"./p-BJZYe7M4.js";const c=s(class extends o{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}size="lg";render(){return b("span",{key:"c2a6166646dde6d30242d16582706d0e422eb4d6",part:"container",class:"bs-checkbox-skeleton",role:"status","aria-label":"Loading"},b("span",{key:"f1be3fc565db55eac147901c8035b9b83a75911d",part:"box",class:"bs-checkbox-skeleton__box bs-checkbox-skeleton__box--"+this.size}),b("span",{key:"4dcce33b22c6930795d2c1ea3bc5d0aa84f3601b",part:"label",class:"bs-checkbox-skeleton__label"}))}static get style(){return":host{display:inline-block;--bs-checkbox-skeleton-size-sm:var(--bs-spacing-200);--bs-checkbox-skeleton-size-md:var(--bs-spacing-250);--bs-checkbox-skeleton-size-lg:var(--bs-spacing-300);--bs-checkbox-skeleton-gap:var(--bs-spacing-100);--bs-checkbox-skeleton-label-width:96px}.bs-checkbox-skeleton{display:inline-flex;align-items:center;gap:var(--bs-checkbox-skeleton-gap)}.bs-checkbox-skeleton__box,.bs-checkbox-skeleton__label{background:var(--bs-color-neutral-container);animation:bs-checkbox-skeleton-pulse 1.5s ease-in-out infinite}.bs-checkbox-skeleton__box{flex-shrink:0;border-radius:var(--bs-border-radius-50)}.bs-checkbox-skeleton__box--sm{width:var(--bs-checkbox-skeleton-size-sm);height:var(--bs-checkbox-skeleton-size-sm)}.bs-checkbox-skeleton__box--md{width:var(--bs-checkbox-skeleton-size-md);height:var(--bs-checkbox-skeleton-size-md)}.bs-checkbox-skeleton__box--lg{width:var(--bs-checkbox-skeleton-size-lg);height:var(--bs-checkbox-skeleton-size-lg)}.bs-checkbox-skeleton__label{width:var(--bs-checkbox-skeleton-label-width);height:16px;border-radius:var(--bs-border-radius-50)}@keyframes bs-checkbox-skeleton-pulse{0%,100%{opacity:1}50%{opacity:0.5}}@media (prefers-reduced-motion: reduce){.bs-checkbox-skeleton__box,.bs-checkbox-skeleton__label{animation:none}}"}},[513,"bs-checkbox-skeleton",{size:[1]}]);function t(){"undefined"!=typeof customElements&&["bs-checkbox-skeleton"].forEach((s=>{"bs-checkbox-skeleton"===s&&(customElements.get(e(s))||customElements.define(e(s),c))}))}t();const n=c,l=t;export{n as BsCheckboxSkeleton,l as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as i,p as e,H as n,c as a,h as s}from"./p-BJZYe7M4.js";const t=e(class extends n{constructor(i){super(),!1!==i&&this.__registerHost(),this.__attachShadow(),this.bsSelect=a(this,"bsSelect")}get el(){return this}selected=!1;disabled=!1;ariaLabel=null;hasIcon=!1;hasLabel=!1;bsSelect;componentWillLoad(){this.hasIcon=this.hasSlottedContent("icon"),this.hasLabel=this.hasSlottedContent(null)}hasSlottedContent(i){return Array.from(this.el.childNodes).some((e=>e.nodeType===Node.ELEMENT_NODE?e.getAttribute("slot")===i:null===i))}onIconSlotchange=i=>{this.hasIcon=i.target.assignedNodes().length>0};onLabelSlotchange=i=>{this.hasLabel=i.target.assignedNodes().length>0};onClick=()=>{this.disabled||this.bsSelect.emit()};render(){return s("button",{key:"
|
|
1
|
+
import{t as i,p as e,H as n,c as a,h as s}from"./p-BJZYe7M4.js";const t=e(class extends n{constructor(i){super(),!1!==i&&this.__registerHost(),this.__attachShadow(),this.bsSelect=a(this,"bsSelect")}get el(){return this}selected=!1;disabled=!1;ariaLabel=null;hasIcon=!1;hasLabel=!1;bsSelect;componentWillLoad(){this.hasIcon=this.hasSlottedContent("icon"),this.hasLabel=this.hasSlottedContent(null)}hasSlottedContent(i){return Array.from(this.el.childNodes).some((e=>e.nodeType===Node.ELEMENT_NODE?e.getAttribute("slot")===i:null===i))}onIconSlotchange=i=>{this.hasIcon=i.target.assignedNodes().length>0};onLabelSlotchange=i=>{this.hasLabel=i.target.assignedNodes().length>0};onClick=()=>{this.disabled||this.bsSelect.emit()};render(){return s("button",{key:"f500457efe9f3397d7137a3dc647758e59d601a1",type:"button",part:"tab",role:"tab",class:`bs-inline-tab ${this.selected?"bs-inline-tab--selected":""} ${this.disabled?"bs-inline-tab--disabled":""} ${this.hasIcon&&!this.hasLabel?"bs-inline-tab--icon-only":""} ${this.hasIcon?"bs-inline-tab--has-icon":""}`,disabled:this.disabled,"aria-selected":this.selected+"","aria-disabled":this.disabled?"true":void 0,"aria-label":this.ariaLabel,onClick:this.onClick},s("span",{key:"8ebede54d5ebd8a4e67a721dfc62e9c7d022fef9",part:"icon",class:"bs-inline-tab__icon "+(this.hasIcon?"bs-inline-tab__icon--has-content":"")},s("slot",{key:"1e742bf36b7342966829aad269ce21754653fd1f",name:"icon",onSlotchange:this.onIconSlotchange})),s("span",{key:"b457e2134cde29157add1d315835e081727dbf17",part:"label",class:"bs-inline-tab__label "+(this.hasLabel?"bs-inline-tab__label--has-content":"")},s("slot",{key:"2d50e9691930fac8b0dada3614f3a19b52e6bb8d",onSlotchange:this.onLabelSlotchange})))}static get style(){return":host{display:inline-block;--bs-inline-tab-radius:var(--bs-border-radius-full);--bs-inline-tab-padding-y:var(--bs-spacing-100);--bs-inline-tab-padding-x:var(--bs-spacing-200);--bs-inline-tab-padding-left-with-icon:var(--bs-spacing-150);--bs-inline-tab-padding-right-with-icon:var(--bs-spacing-200);--bs-inline-tab-gap:var(--bs-spacing-50);--bs-inline-tab-bg-default:var(--bs-color-neutral-container);--bs-inline-tab-color-default:var(--bs-text-secondary);--bs-inline-tab-bg-hover:var(--bs-color-neutral-container-hover);--bs-inline-tab-color-hover:var(--bs-text-default);--bs-inline-tab-bg-focus:var(--bs-color-neutral-container-focused);--bs-inline-tab-bg-pressed:var(--bs-color-neutral-container-pressed);--bs-inline-tab-focus-ring-color:var(--bs-border-neutral-focus);--bs-inline-tab-bg-disabled:var(--bs-surface-action-disabled);--bs-inline-tab-color-disabled:var(--bs-text-on-disabled);--bs-inline-tab-bg-selected:var(--bs-color-primary-default);--bs-inline-tab-color-selected:var(--bs-text-on-action);--bs-inline-tab-bg-selected-hover:var(--bs-color-primary-hover);--bs-inline-tab-bg-selected-focus:var(--bs-color-primary-focused);--bs-inline-tab-bg-selected-pressed:var(--bs-color-primary-pressed);--bs-inline-tab-font-size:var(--bs-font-size-sm);--bs-inline-tab-font-weight:var(--bs-font-weight-semibold);--bs-inline-tab-line-height:var(--bs-line-height-body-sm)}.bs-inline-tab{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;border:none;cursor:pointer;font-family:inherit;border-radius:var(--bs-inline-tab-radius);padding:var(--bs-inline-tab-padding-y) var(--bs-inline-tab-padding-x);background:var(--bs-inline-tab-bg-default);color:var(--bs-inline-tab-color-default);transition:color var(--bs-duration-fast) var(--bs-easing-standard), background-color var(--bs-duration-fast) var(--bs-easing-standard)}.bs-inline-tab--has-icon{padding-top:var(--bs-inline-tab-padding-y);padding-bottom:var(--bs-inline-tab-padding-y);padding-left:var(--bs-inline-tab-padding-left-with-icon);padding-right:var(--bs-inline-tab-padding-right-with-icon);gap:var(--bs-inline-tab-gap)}.bs-inline-tab:focus-visible{outline:2px solid var(--bs-inline-tab-focus-ring-color);outline-offset:2px}.bs-inline-tab:not(.bs-inline-tab--selected):not(.bs-inline-tab--disabled):hover{background:var(--bs-inline-tab-bg-hover);color:var(--bs-inline-tab-color-hover)}.bs-inline-tab:not(.bs-inline-tab--selected):not(.bs-inline-tab--disabled):focus-visible{background:var(--bs-inline-tab-bg-focus);color:var(--bs-inline-tab-color-hover)}.bs-inline-tab:not(.bs-inline-tab--selected):not(.bs-inline-tab--disabled):active{background:var(--bs-inline-tab-bg-pressed);color:var(--bs-inline-tab-color-hover)}.bs-inline-tab--selected{background:var(--bs-inline-tab-bg-selected);color:var(--bs-inline-tab-color-selected)}.bs-inline-tab--selected:not(.bs-inline-tab--disabled):hover{background:var(--bs-inline-tab-bg-selected-hover)}.bs-inline-tab--selected:not(.bs-inline-tab--disabled):focus-visible{background:var(--bs-inline-tab-bg-selected-focus)}.bs-inline-tab--selected:not(.bs-inline-tab--disabled):active{background:var(--bs-inline-tab-bg-selected-pressed)}.bs-inline-tab--disabled{background:var(--bs-inline-tab-bg-disabled);color:var(--bs-inline-tab-color-disabled);cursor:not-allowed}.bs-inline-tab__icon{display:none;width:24px;height:24px;flex-shrink:0;color:inherit}.bs-inline-tab__icon--has-content{display:inline-flex;align-items:center;justify-content:center}.bs-inline-tab__icon ::slotted(svg){width:24px;height:24px}.bs-inline-tab__label{display:none;font-size:var(--bs-inline-tab-font-size);font-weight:var(--bs-inline-tab-font-weight);line-height:calc(var(--bs-inline-tab-line-height) * 1px);white-space:nowrap}.bs-inline-tab__label--has-content{display:inline-block}"}},[769,"bs-inline-tab",{selected:[516],disabled:[4],ariaLabel:[1,"aria-label"],hasIcon:[32],hasLabel:[32]}]);function b(){"undefined"!=typeof customElements&&["bs-inline-tab"].forEach((e=>{"bs-inline-tab"===e&&(customElements.get(i(e))||customElements.define(i(e),t))}))}b();const l=t,o=b;export{l as BsInlineTab,o as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as i,p as t,H as e,c as s,h as n}from"./p-BJZYe7M4.js";import{d as r}from"./p-BtX5URLk.js";import{d as o}from"./p-qK1XlpTA.js";const a=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")}get el(){return this}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.hasIcon=this.hasSlottedContent("icon"),this.hasEndIcon=this.hasSlottedContent("end-icon")}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=>{this.bsInput.emit(i.target.value)};onChange=i=>{this.bsChange.emit(i.target.value)};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=i+"",this.bsChange.emit(this.value)};onStepperDecrement=()=>{if(this.disabled)return;const i=this.clampNumber((parseFloat(this.value)||0)-this.step);this.value=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.bsChange.emit(this.pinInputs.map((i=>i?.value??"")).join(""))};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,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("span",{part:"chip",class:"bs-input__chip"},i,n("button",{type:"button",class:"bs-input__chip-remove","aria-label":"Remove "+i,onClick:this.onChipRemove(i)},"×")))),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,"aria-haspopup":t?"listbox":void 0,"aria-expanded":t?this.open+"":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:"3647d132e96c281ba68522647ab422040c6752c2",class:"bs-input "+(this.error?"bs-input--error":"")},this.label&&n("label",{key:"95eb3e3308a746797565480318b35ea2f20c36d0",part:"label",class:"bs-input__label",htmlFor:"control"},this.label,this.required&&n("span",{key:"5c30e73a9e474ac3138aff9868e6b98d42d3771c",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 style(){return":host{display:block;--bs-input-radius:var(--bs-border-radius-100);--bs-input-height:var(--bs-spacing-600);--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-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-chip-bg:var(--bs-input-bg-disabled);--bs-input-chip-text:var(--bs-input-text);--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-font-size-sm);font-weight:var(--bs-font-weight-medium);color:var(--bs-input-label-color)}.bs-input__required{color:var(--bs-input-error-color);margin-left: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;right: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));left:0;right: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{display:inline-flex;align-items:center;gap:4px;background:var(--bs-input-chip-bg);color:var(--bs-input-chip-text);border-radius:var(--bs-input-radius);padding:2px 6px;font-size:var(--bs-font-size-sm)}.bs-input__chip-remove{border:none;background:transparent;color:inherit;cursor:pointer;padding:0;line-height: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)}"}},[785,"bs-input",{value:[1025],type:[1],label:[1],placeholder:[1],description:[1],error:[1],disabled:[4],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"]]]);function l(){"undefined"!=typeof customElements&&["bs-input","bs-menu","bs-menu-item"].forEach((t=>{switch(t){case"bs-input":customElements.get(i(t))||customElements.define(i(t),a);break;case"bs-menu":customElements.get(i(t))||r();break;case"bs-menu-item":customElements.get(i(t))||o()}}))}l();const p=a,d=l;export{p as BsInput,d as defineCustomElement}
|
|
1
|
+
import{t as i,p as t,H as e,c as s,h as n}from"./p-BJZYe7M4.js";import{d as r}from"./p-Bs7nEbqK.js";import{d as o}from"./p-CUa8zihb.js";const a=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")}get el(){return this}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.hasIcon=this.hasSlottedContent("icon"),this.hasEndIcon=this.hasSlottedContent("end-icon")}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=>{this.bsInput.emit(i.target.value)};onChange=i=>{this.bsChange.emit(i.target.value)};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=i+"",this.bsChange.emit(this.value)};onStepperDecrement=()=>{if(this.disabled)return;const i=this.clampNumber((parseFloat(this.value)||0)-this.step);this.value=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.bsChange.emit(this.pinInputs.map((i=>i?.value??"")).join(""))};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,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("span",{part:"chip",class:"bs-input__chip"},i,n("button",{type:"button",class:"bs-input__chip-remove","aria-label":"Remove "+i,onClick:this.onChipRemove(i)},"×")))),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,"aria-haspopup":t?"listbox":void 0,"aria-expanded":t?this.open+"":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:"453a7f62d3fc7f9127ad3cdd56d1ab5eb8ec443d",class:"bs-input "+(this.error?"bs-input--error":"")},this.label&&n("label",{key:"3c416fdcd928a9c96d902b6367ee9a5eb0680f28",part:"label",class:"bs-input__label",htmlFor:"control"},this.label,this.required&&n("span",{key:"a22575f1ba2bbce601b9bf65d475bdd3abd4c4b9",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 style(){return":host{display:block;--bs-input-radius:var(--bs-border-radius-100);--bs-input-height:var(--bs-spacing-600);--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-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-chip-bg:var(--bs-input-bg-disabled);--bs-input-chip-text:var(--bs-input-text);--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-font-size-sm);font-weight:var(--bs-font-weight-medium);color:var(--bs-input-label-color)}.bs-input__required{color:var(--bs-input-error-color);margin-left: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;right: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));left:0;right: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{display:inline-flex;align-items:center;gap:4px;background:var(--bs-input-chip-bg);color:var(--bs-input-chip-text);border-radius:var(--bs-input-radius);padding:2px 6px;font-size:var(--bs-font-size-sm)}.bs-input__chip-remove{border:none;background:transparent;color:inherit;cursor:pointer;padding:0;line-height: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)}"}},[785,"bs-input",{value:[1025],type:[1],label:[1],placeholder:[1],description:[1],error:[1],disabled:[4],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"]]]);function l(){"undefined"!=typeof customElements&&["bs-input","bs-menu","bs-menu-item"].forEach((t=>{switch(t){case"bs-input":customElements.get(i(t))||customElements.define(i(t),a);break;case"bs-menu":customElements.get(i(t))||r();break;case"bs-menu-item":customElements.get(i(t))||o()}}))}l();const p=a,d=l;export{p as BsInput,d as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as o,d as
|
|
1
|
+
import{B as o,d as s}from"./p-CUa8zihb.js";const a=o,p=s;export{a as BsMenuItem,p as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as
|
|
1
|
+
import{B as s,d as o}from"./p-Bs7nEbqK.js";const p=s,r=o;export{p as BsMenu,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e,p as a,H as i,c as t,h as n}from"./p-BJZYe7M4.js";const r=a(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.bsSelect=t(this,"bsSelect"),this.bsToggle=t(this,"bsToggle")}get el(){return this}selected=!1;expandable=!1;expanded=!1;nested=!1;ariaLabel=null;collapsed=!1;bsSelect;bsToggle;hasIcon=!1;componentWillLoad(){this.hasIcon=this.hasSlottedContent("icon")}hasSlottedContent(e){return Array.from(this.el.childNodes).some((a=>a.nodeType===Node.ELEMENT_NODE&&a.getAttribute("slot")===e))}onIconSlotchange=e=>{this.hasIcon=e.target.assignedNodes().length>0};onClick=()=>{this.expandable?(this.expanded=!this.expanded,this.bsToggle.emit(this.expanded)):this.bsSelect.emit()};render(){const e=["bs-navigation-drawer-item",this.selected&&!this.expandable?"bs-navigation-drawer-item--selected":"",this.nested?"bs-navigation-drawer-item--nested":""].filter(Boolean).join(" ");return n("div",{key:"6fd089698cd27459fc10a2806fba5a792dbfec2b",class:"bs-navigation-drawer-item__root"},n("button",{key:"5c4448c9f16dfe9356ce069a5f069db9ed084f3b",type:"button",part:"item",class:e,"aria-expanded":this.expandable?this.expanded+"":void 0,"aria-label":this.ariaLabel??void 0,onClick:this.onClick},!this.nested&&n("span",{key:"bcfd23ef22e33ed6dcb3ec70b8263a4dccb14914",part:"icon",class:"bs-navigation-drawer-item__icon "+(this.hasIcon?"bs-navigation-drawer-item__icon--has-content":"")},n("slot",{key:"170f97cc6ca93bf5e9e336b7c39c3d3bb02adca8",name:"icon",onSlotchange:this.onIconSlotchange})),n("span",{key:"abbc25976aa21e94e503497430d2be0895fd8987",part:"label",class:"bs-navigation-drawer-item__label"},n("slot",{key:"0b9e12703c42e326634bb5adb49f1994b9c19754"})),this.expandable&&n("span",{key:"25e2a8517451cced2993390cd194420d57ee5489",part:"chevron",class:"bs-navigation-drawer-item__chevron "+(this.expanded?"bs-navigation-drawer-item__chevron--expanded":"")},n(s,{key:"7b15770e5a071f8f49b06d811dbe1925ff9b5054"}))),this.expandable&&n("span",{key:"861ac7d088e527486c43f80a933e796c05980bc0",part:"children",class:"bs-navigation-drawer-item__children"},n("slot",{key:"fc673a4f19b0aee8c4c3d9d718cb239746e04221",name:"children"})))}static get style(){return":host{display:block;--bs-navigation-drawer-item-gap:var(--bs-spacing-100);--bs-navigation-drawer-item-radius:var(--bs-border-radius-100);--bs-navigation-drawer-item-padding-y:var(--bs-spacing-150);--bs-navigation-drawer-item-padding-x:var(--bs-spacing-100);--bs-navigation-drawer-item-padding-left-nested:var(--bs-spacing-600);--bs-navigation-drawer-item-font-weight:var(--bs-font-weight-medium);--bs-navigation-drawer-item-font-size:var(--bs-font-size-md);--bs-navigation-drawer-item-line-height:var(--bs-line-height-body-md);--bs-navigation-drawer-item-color:var(--bs-text-muted);--bs-navigation-drawer-item-color-selected:var(--bs-text-default);--bs-navigation-drawer-item-color-hover:var(--bs-text-secondary);--bs-navigation-drawer-item-bg-selected:var(--bs-surface-selected);--bs-navigation-drawer-item-bg-hover:var(--bs-surface-hover);--bs-navigation-drawer-item-bg-pressed:var(--bs-surface-pressed);--bs-navigation-drawer-item-bg-focus:var(--bs-surface-focus);--bs-navigation-drawer-item-bg-selected-hover:var(--bs-surface-selected-hover);--bs-navigation-drawer-item-bg-selected-pressed:var(--bs-surface-selected-pressed);--bs-navigation-drawer-item-bg-selected-focus:var(--bs-surface-selected-focus);--bs-navigation-drawer-item-focus-ring-color:var(--bs-border-neutral-focus);--bs-navigation-drawer-item-children-gap:var(--bs-spacing-100);--bs-navigation-drawer-item-collapsed-gap:var(--bs-spacing-100);--bs-navigation-drawer-item-collapsed-padding:var(--bs-spacing-100);--bs-navigation-drawer-item-collapsed-icon-padding-x:var(--bs-spacing-300);--bs-navigation-drawer-item-collapsed-icon-padding-y:var(--bs-spacing-50);--bs-navigation-drawer-item-collapsed-font-size:var(--bs-fontsize-caption-sm);--bs-navigation-drawer-item-collapsed-line-height:var(--bs-line-height-caption-sm)}.bs-navigation-drawer-item__root{display:contents}.bs-navigation-drawer-item{box-sizing:border-box;width:100%;display:flex;align-items:center;gap:var(--bs-navigation-drawer-item-gap);border:none;border-radius:var(--bs-navigation-drawer-item-radius);padding:var(--bs-navigation-drawer-item-padding-y) var(--bs-navigation-drawer-item-padding-x);background:transparent;color:var(--bs-navigation-drawer-item-color);font-family:inherit;font-weight:var(--bs-navigation-drawer-item-font-weight);font-size:var(--bs-navigation-drawer-item-font-size);line-height:calc(var(--bs-navigation-drawer-item-line-height) * 1px);text-align:left;cursor:pointer;transition:color var(--bs-duration-fast) var(--bs-easing-standard), background-color var(--bs-duration-fast) var(--bs-easing-standard)}:host(:not([collapsed])) .bs-navigation-drawer-item:hover:not(.bs-navigation-drawer-item--selected){background:var(--bs-navigation-drawer-item-bg-hover);color:var(--bs-navigation-drawer-item-color-hover)}:host(:not([collapsed])) .bs-navigation-drawer-item:active:not(.bs-navigation-drawer-item--selected){background:var(--bs-navigation-drawer-item-bg-pressed);color:var(--bs-navigation-drawer-item-color-hover)}:host(:not([collapsed])) .bs-navigation-drawer-item:focus-visible:not(.bs-navigation-drawer-item--selected){background:var(--bs-navigation-drawer-item-bg-focus);color:var(--bs-navigation-drawer-item-color-hover)}:host(:not([collapsed])) .bs-navigation-drawer-item--selected:hover{background:var(--bs-navigation-drawer-item-bg-selected-hover)}:host(:not([collapsed])) .bs-navigation-drawer-item--selected:active{background:var(--bs-navigation-drawer-item-bg-selected-pressed)}:host(:not([collapsed])) .bs-navigation-drawer-item--selected:focus-visible{background:var(--bs-navigation-drawer-item-bg-selected-focus)}.bs-navigation-drawer-item:focus-visible{outline:2px solid var(--bs-navigation-drawer-item-focus-ring-color);outline-offset:-2px}.bs-navigation-drawer-item--nested{padding-left:var(--bs-navigation-drawer-item-padding-left-nested)}.bs-navigation-drawer-item--selected{background:var(--bs-navigation-drawer-item-bg-selected);color:var(--bs-navigation-drawer-item-color-selected)}.bs-navigation-drawer-item--selected .bs-navigation-drawer-item__icon--has-content{color:var(--bs-navigation-drawer-item-color-selected)}:host([collapsed]) .bs-navigation-drawer-item{flex-direction:column;justify-content:center;gap:var(--bs-navigation-drawer-item-collapsed-gap);padding:var(--bs-navigation-drawer-item-collapsed-padding);background:transparent}.bs-navigation-drawer-item__icon{display:none;width:24px;height:24px;flex-shrink:0;color:inherit}.bs-navigation-drawer-item__icon--has-content{display:inline-flex;align-items:center;justify-content:center}.bs-navigation-drawer-item__icon ::slotted(svg){width:24px;height:24px}:host([collapsed]) .bs-navigation-drawer-item__icon--has-content{padding:var(--bs-navigation-drawer-item-collapsed-icon-padding-y) var(--bs-navigation-drawer-item-collapsed-icon-padding-x);border-radius:var(--bs-navigation-drawer-item-radius)}:host([collapsed][selected]) .bs-navigation-drawer-item__icon--has-content{background:var(--bs-navigation-drawer-item-bg-selected)}:host([collapsed]:not([selected])) .bs-navigation-drawer-item:hover .bs-navigation-drawer-item__icon--has-content{background:var(--bs-navigation-drawer-item-bg-hover)}:host([collapsed]:not([selected])) .bs-navigation-drawer-item:active .bs-navigation-drawer-item__icon--has-content{background:var(--bs-navigation-drawer-item-bg-pressed)}:host([collapsed]:not([selected])) .bs-navigation-drawer-item:focus-visible .bs-navigation-drawer-item__icon--has-content{background:var(--bs-navigation-drawer-item-bg-focus)}:host([collapsed][selected]) .bs-navigation-drawer-item:hover .bs-navigation-drawer-item__icon--has-content{background:var(--bs-navigation-drawer-item-bg-selected-hover)}:host([collapsed][selected]) .bs-navigation-drawer-item:active .bs-navigation-drawer-item__icon--has-content{background:var(--bs-navigation-drawer-item-bg-selected-pressed)}:host([collapsed][selected]) .bs-navigation-drawer-item:focus-visible .bs-navigation-drawer-item__icon--has-content{background:var(--bs-navigation-drawer-item-bg-selected-focus)}:host([collapsed]:not([selected])) .bs-navigation-drawer-item:hover .bs-navigation-drawer-item__label,:host([collapsed]:not([selected])) .bs-navigation-drawer-item:active .bs-navigation-drawer-item__label,:host([collapsed]:not([selected])) .bs-navigation-drawer-item:focus-visible .bs-navigation-drawer-item__label,:host([collapsed]:not([selected])) .bs-navigation-drawer-item:hover .bs-navigation-drawer-item__icon--has-content,:host([collapsed]:not([selected])) .bs-navigation-drawer-item:active .bs-navigation-drawer-item__icon--has-content,:host([collapsed]:not([selected])) .bs-navigation-drawer-item:focus-visible .bs-navigation-drawer-item__icon--has-content{color:var(--bs-navigation-drawer-item-color-hover)}.bs-navigation-drawer-item__label{flex:1;min-width:0;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host([collapsed]) .bs-navigation-drawer-item__label{flex:none;width:100%;text-align:center;font-size:var(--bs-navigation-drawer-item-collapsed-font-size);line-height:calc(var(--bs-navigation-drawer-item-collapsed-line-height) * 1px)}.bs-navigation-drawer-item__chevron{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;color:inherit;transition:transform var(--bs-duration-fast) var(--bs-easing-standard)}.bs-navigation-drawer-item__chevron svg{width:16px;height:16px}.bs-navigation-drawer-item__chevron--expanded{transform:rotate(180deg)}.bs-navigation-drawer-item__children{display:flex;flex-direction:column;gap:var(--bs-navigation-drawer-item-children-gap)}:host(:not([expanded])) .bs-navigation-drawer-item__children{display:none}:host([collapsed]) .bs-navigation-drawer-item__chevron,:host([collapsed]) .bs-navigation-drawer-item__children{display:none}"}},[769,"bs-navigation-drawer-item",{selected:[516],expandable:[4],expanded:[1540],nested:[4],ariaLabel:[1,"aria-label"],collapsed:[516],hasIcon:[32]}]),s=()=>n("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},n("path",{d:"M4 6L8 10L12 6",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}));function o(){"undefined"!=typeof customElements&&["bs-navigation-drawer-item"].forEach((a=>{"bs-navigation-drawer-item"===a&&(customElements.get(e(a))||customElements.define(e(a),r))}))}o();const d=r,c=o;export{d as BsNavigationDrawerItem,c as defineCustomElement}
|
|
1
|
+
import{t as e,p as a,H as i,c as t,h as n}from"./p-BJZYe7M4.js";const r=a(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.bsSelect=t(this,"bsSelect"),this.bsToggle=t(this,"bsToggle")}get el(){return this}selected=!1;expandable=!1;expanded=!1;nested=!1;ariaLabel=null;collapsed=!1;bsSelect;bsToggle;hasIcon=!1;componentWillLoad(){this.hasIcon=this.hasSlottedContent("icon")}hasSlottedContent(e){return Array.from(this.el.childNodes).some((a=>a.nodeType===Node.ELEMENT_NODE&&a.getAttribute("slot")===e))}onIconSlotchange=e=>{this.hasIcon=e.target.assignedNodes().length>0};onClick=()=>{this.expandable?(this.expanded=!this.expanded,this.bsToggle.emit(this.expanded)):this.bsSelect.emit()};render(){const e=["bs-navigation-drawer-item",this.selected&&!this.expandable?"bs-navigation-drawer-item--selected":"",this.nested?"bs-navigation-drawer-item--nested":""].filter(Boolean).join(" ");return n("div",{key:"f7d7b69e1823f1ff5e2b4bbf8f7a4aeb916b73ad",class:"bs-navigation-drawer-item__root"},n("button",{key:"7d89692e783e4c8a6615b315cdf37184188359c4",type:"button",part:"item",class:e,"aria-expanded":this.expandable?this.expanded+"":void 0,"aria-label":this.ariaLabel??void 0,onClick:this.onClick},!this.nested&&n("span",{key:"cc056e1618ec955127d8fb0f450325ea5fd7b9da",part:"icon",class:"bs-navigation-drawer-item__icon "+(this.hasIcon?"bs-navigation-drawer-item__icon--has-content":"")},n("slot",{key:"dbb065933d53aee6915d93c70f78c86ad06e9d51",name:"icon",onSlotchange:this.onIconSlotchange})),n("span",{key:"b4e3af94dde1a32befe82b0b64ce527ae7d2ecbf",part:"label",class:"bs-navigation-drawer-item__label"},n("slot",{key:"0a944daf8a50fc82546ebf9afd0c3b4ca4b39fc7"})),this.expandable&&n("span",{key:"44b2637ba4f418dc6f5d57859d3cbe8fe61ba0b2",part:"chevron",class:"bs-navigation-drawer-item__chevron "+(this.expanded?"bs-navigation-drawer-item__chevron--expanded":"")},n(s,{key:"40154d9ba61a237364938d976a47db6b1f96f29f"}))),this.expandable&&n("span",{key:"a206e4304fceddb3decc6643e452ac5d58b7a917",part:"children",class:"bs-navigation-drawer-item__children"},n("slot",{key:"4a19fbc6a63bc4bef5edf7742eed82322c87b43d",name:"children"})))}static get style(){return":host{display:block;--bs-navigation-drawer-item-gap:var(--bs-spacing-100);--bs-navigation-drawer-item-radius:var(--bs-border-radius-100);--bs-navigation-drawer-item-padding-y:var(--bs-spacing-150);--bs-navigation-drawer-item-padding-x:var(--bs-spacing-100);--bs-navigation-drawer-item-padding-left-nested:var(--bs-spacing-600);--bs-navigation-drawer-item-font-weight:var(--bs-font-weight-medium);--bs-navigation-drawer-item-font-size:var(--bs-font-size-md);--bs-navigation-drawer-item-line-height:var(--bs-line-height-body-md);--bs-navigation-drawer-item-color:var(--bs-text-muted);--bs-navigation-drawer-item-color-selected:var(--bs-text-default);--bs-navigation-drawer-item-color-hover:var(--bs-text-secondary);--bs-navigation-drawer-item-bg-selected:var(--bs-surface-selected);--bs-navigation-drawer-item-bg-hover:var(--bs-surface-hover);--bs-navigation-drawer-item-bg-pressed:var(--bs-surface-pressed);--bs-navigation-drawer-item-bg-focus:var(--bs-surface-focus);--bs-navigation-drawer-item-bg-selected-hover:var(--bs-surface-selected-hover);--bs-navigation-drawer-item-bg-selected-pressed:var(--bs-surface-selected-pressed);--bs-navigation-drawer-item-bg-selected-focus:var(--bs-surface-selected-focus);--bs-navigation-drawer-item-focus-ring-color:var(--bs-border-neutral-focus);--bs-navigation-drawer-item-children-gap:var(--bs-spacing-100);--bs-navigation-drawer-item-collapsed-gap:var(--bs-spacing-100);--bs-navigation-drawer-item-collapsed-padding:var(--bs-spacing-100);--bs-navigation-drawer-item-collapsed-icon-padding-x:var(--bs-spacing-300);--bs-navigation-drawer-item-collapsed-icon-padding-y:var(--bs-spacing-50);--bs-navigation-drawer-item-collapsed-font-size:var(--bs-fontsize-caption-sm);--bs-navigation-drawer-item-collapsed-line-height:var(--bs-line-height-caption-sm)}.bs-navigation-drawer-item__root{display:contents}.bs-navigation-drawer-item{box-sizing:border-box;width:100%;display:flex;align-items:center;gap:var(--bs-navigation-drawer-item-gap);border:none;border-radius:var(--bs-navigation-drawer-item-radius);padding:var(--bs-navigation-drawer-item-padding-y) var(--bs-navigation-drawer-item-padding-x);background:transparent;color:var(--bs-navigation-drawer-item-color);font-family:inherit;font-weight:var(--bs-navigation-drawer-item-font-weight);font-size:var(--bs-navigation-drawer-item-font-size);line-height:calc(var(--bs-navigation-drawer-item-line-height) * 1px);text-align:left;cursor:pointer;transition:color var(--bs-duration-fast) var(--bs-easing-standard), background-color var(--bs-duration-fast) var(--bs-easing-standard)}:host(:not([collapsed])) .bs-navigation-drawer-item:hover:not(.bs-navigation-drawer-item--selected){background:var(--bs-navigation-drawer-item-bg-hover);color:var(--bs-navigation-drawer-item-color-hover)}:host(:not([collapsed])) .bs-navigation-drawer-item:active:not(.bs-navigation-drawer-item--selected){background:var(--bs-navigation-drawer-item-bg-pressed);color:var(--bs-navigation-drawer-item-color-hover)}:host(:not([collapsed])) .bs-navigation-drawer-item:focus-visible:not(.bs-navigation-drawer-item--selected){background:var(--bs-navigation-drawer-item-bg-focus);color:var(--bs-navigation-drawer-item-color-hover)}:host(:not([collapsed])) .bs-navigation-drawer-item--selected:hover{background:var(--bs-navigation-drawer-item-bg-selected-hover)}:host(:not([collapsed])) .bs-navigation-drawer-item--selected:active{background:var(--bs-navigation-drawer-item-bg-selected-pressed)}:host(:not([collapsed])) .bs-navigation-drawer-item--selected:focus-visible{background:var(--bs-navigation-drawer-item-bg-selected-focus)}.bs-navigation-drawer-item:focus-visible{outline:2px solid var(--bs-navigation-drawer-item-focus-ring-color);outline-offset:-2px}.bs-navigation-drawer-item--nested{padding-left:var(--bs-navigation-drawer-item-padding-left-nested)}.bs-navigation-drawer-item--selected{background:var(--bs-navigation-drawer-item-bg-selected);color:var(--bs-navigation-drawer-item-color-selected)}.bs-navigation-drawer-item--selected .bs-navigation-drawer-item__icon--has-content{color:var(--bs-navigation-drawer-item-color-selected)}:host([collapsed]) .bs-navigation-drawer-item{flex-direction:column;justify-content:center;gap:var(--bs-navigation-drawer-item-collapsed-gap);padding:var(--bs-navigation-drawer-item-collapsed-padding);background:transparent}.bs-navigation-drawer-item__icon{display:none;width:24px;height:24px;flex-shrink:0;color:inherit}.bs-navigation-drawer-item__icon--has-content{display:inline-flex;align-items:center;justify-content:center}.bs-navigation-drawer-item__icon ::slotted(svg){width:24px;height:24px}:host([collapsed]) .bs-navigation-drawer-item__icon--has-content{padding:var(--bs-navigation-drawer-item-collapsed-icon-padding-y) var(--bs-navigation-drawer-item-collapsed-icon-padding-x);border-radius:var(--bs-navigation-drawer-item-radius)}:host([collapsed][selected]) .bs-navigation-drawer-item__icon--has-content{background:var(--bs-navigation-drawer-item-bg-selected)}:host([collapsed]:not([selected])) .bs-navigation-drawer-item:hover .bs-navigation-drawer-item__icon--has-content{background:var(--bs-navigation-drawer-item-bg-hover)}:host([collapsed]:not([selected])) .bs-navigation-drawer-item:active .bs-navigation-drawer-item__icon--has-content{background:var(--bs-navigation-drawer-item-bg-pressed)}:host([collapsed]:not([selected])) .bs-navigation-drawer-item:focus-visible .bs-navigation-drawer-item__icon--has-content{background:var(--bs-navigation-drawer-item-bg-focus)}:host([collapsed][selected]) .bs-navigation-drawer-item:hover .bs-navigation-drawer-item__icon--has-content{background:var(--bs-navigation-drawer-item-bg-selected-hover)}:host([collapsed][selected]) .bs-navigation-drawer-item:active .bs-navigation-drawer-item__icon--has-content{background:var(--bs-navigation-drawer-item-bg-selected-pressed)}:host([collapsed][selected]) .bs-navigation-drawer-item:focus-visible .bs-navigation-drawer-item__icon--has-content{background:var(--bs-navigation-drawer-item-bg-selected-focus)}:host([collapsed]:not([selected])) .bs-navigation-drawer-item:hover .bs-navigation-drawer-item__label,:host([collapsed]:not([selected])) .bs-navigation-drawer-item:active .bs-navigation-drawer-item__label,:host([collapsed]:not([selected])) .bs-navigation-drawer-item:focus-visible .bs-navigation-drawer-item__label,:host([collapsed]:not([selected])) .bs-navigation-drawer-item:hover .bs-navigation-drawer-item__icon--has-content,:host([collapsed]:not([selected])) .bs-navigation-drawer-item:active .bs-navigation-drawer-item__icon--has-content,:host([collapsed]:not([selected])) .bs-navigation-drawer-item:focus-visible .bs-navigation-drawer-item__icon--has-content{color:var(--bs-navigation-drawer-item-color-hover)}.bs-navigation-drawer-item__label{flex:1;min-width:0;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host([collapsed]) .bs-navigation-drawer-item__label{flex:none;width:100%;text-align:center;font-size:var(--bs-navigation-drawer-item-collapsed-font-size);line-height:calc(var(--bs-navigation-drawer-item-collapsed-line-height) * 1px)}.bs-navigation-drawer-item__chevron{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;color:inherit;transition:transform var(--bs-duration-fast) var(--bs-easing-standard)}.bs-navigation-drawer-item__chevron svg{width:16px;height:16px}.bs-navigation-drawer-item__chevron--expanded{transform:rotate(180deg)}.bs-navigation-drawer-item__children{display:flex;flex-direction:column;gap:var(--bs-navigation-drawer-item-children-gap)}:host(:not([expanded])) .bs-navigation-drawer-item__children{display:none}:host([collapsed]) .bs-navigation-drawer-item__chevron,:host([collapsed]) .bs-navigation-drawer-item__children{display:none}"}},[769,"bs-navigation-drawer-item",{selected:[516],expandable:[4],expanded:[1540],nested:[4],ariaLabel:[1,"aria-label"],collapsed:[516],hasIcon:[32]}]),s=()=>n("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},n("path",{d:"M4 6L8 10L12 6",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}));function o(){"undefined"!=typeof customElements&&["bs-navigation-drawer-item"].forEach((a=>{"bs-navigation-drawer-item"===a&&(customElements.get(e(a))||customElements.define(e(a),r))}))}o();const d=r,c=o;export{d as BsNavigationDrawerItem,c as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as a,p as r,H as e,c as i,h as s}from"./p-BJZYe7M4.js";import{d as n}from"./p-BKaZWFE1.js";const t=r(class extends e{constructor(a){super(),!1!==a&&this.__registerHost(),this.__attachShadow(),this.bsCollapse=i(this,"bsCollapse"),this.bsSearchClick=i(this,"bsSearchClick")}get el(){return this}heading="Main Menu";collapsible=!0;collapsed=!1;bsCollapse;bsSearchClick;logoBackground="auto";showLogo=!0;onCollapsedChange(a){this.syncItemsCollapsed(a)}componentDidLoad(){this.syncItemsCollapsed(this.collapsed)}syncItemsCollapsed(a){this.el.querySelectorAll(":scope > bs-navigation-drawer-item").forEach((r=>{r.collapsed=a}))}onCollapseClick=()=>{this.collapsed=!this.collapsed,this.bsCollapse.emit(this.collapsed)};onSearchTriggerClick=()=>{this.bsSearchClick.emit()};render(){return s("nav",{key:"
|
|
1
|
+
import{t as a,p as r,H as e,c as i,h as s}from"./p-BJZYe7M4.js";import{d as n}from"./p-BKaZWFE1.js";const t=r(class extends e{constructor(a){super(),!1!==a&&this.__registerHost(),this.__attachShadow(),this.bsCollapse=i(this,"bsCollapse"),this.bsSearchClick=i(this,"bsSearchClick")}get el(){return this}heading="Main Menu";collapsible=!0;collapsed=!1;bsCollapse;bsSearchClick;logoBackground="auto";showLogo=!0;onCollapsedChange(a){this.syncItemsCollapsed(a)}componentDidLoad(){this.syncItemsCollapsed(this.collapsed)}syncItemsCollapsed(a){this.el.querySelectorAll(":scope > bs-navigation-drawer-item").forEach((r=>{r.collapsed=a}))}onCollapseClick=()=>{this.collapsed=!this.collapsed,this.bsCollapse.emit(this.collapsed)};onSearchTriggerClick=()=>{this.bsSearchClick.emit()};render(){return s("nav",{key:"42b4c661f9ac6b903f05689a8c7f896d4df5d410",class:"bs-navigation-drawer","aria-label":this.heading},this.showLogo&&s("div",{key:"fac62a9fbb25b30fd1a407d5b7298d2d444f72f1",part:"logo",class:"bs-navigation-drawer__logo bs-navigation-drawer__logo--full"},s("bs-logo",{key:"9c7bb05d6dffa379d8c8ca630075e02a2247a924",variant:"full",background:this.logoBackground})),this.showLogo&&s("div",{key:"4fd5ddb608bea958d8bea97f3ecdd61d595ba673",part:"logo",class:"bs-navigation-drawer__logo bs-navigation-drawer__logo--mark"},s("bs-logo",{key:"f8f3f79635b9b15f0a165d00ba50231e53b36102",variant:"mark",background:this.logoBackground})),s("div",{key:"22a67b0c1ef6f7ab431d7727332ec216f2f92afc",class:"bs-navigation-drawer__title-row"},s("span",{key:"64e3c8e3a4ac377b6b99fe5d4444d313671555bf",part:"title",class:"bs-navigation-drawer__title"},this.heading),this.collapsible&&s("button",{key:"be0712ef51d7e90d82e272e069a2c2dbcf5914bd",type:"button",part:"collapse",class:"bs-navigation-drawer__collapse","aria-label":this.collapsed?"Expand":"Collapse","aria-pressed":this.collapsed?"true":"false",onClick:this.onCollapseClick},s(o,{key:"98a33e8a3e654147ca4e412b6e5e07a19645962b"}))),s("div",{key:"945db8cdec027c252a5ea5900e70b9d937d239e4",part:"search",class:"bs-navigation-drawer__search"},s("slot",{key:"4d0e1103e23fd92a63e1b5b6d9971687bd5abb70",name:"search"})),s("button",{key:"06f214ba7661974b1928c75216e7359205a1b86b",type:"button",part:"search-trigger",class:"bs-navigation-drawer__search-trigger","aria-label":"Search",onClick:this.onSearchTriggerClick},s(d,{key:"0f57bedd8a334059279b9416e475d25bd805aca5"})),s("div",{key:"c7da235d6e116318707cf6f90cbad117edd9f336",part:"items",class:"bs-navigation-drawer__items"},s("slot",{key:"0fee6305ae2c06d6068dcddc7c4aed369bca6aa3"})))}static get watchers(){return{collapsed:[{onCollapsedChange:0}]}}static get style(){return":host{display:block;--bs-navigation-drawer-bg:var(--bs-surface-base);--bs-navigation-drawer-border:var(--bs-border-neutral-container);--bs-navigation-drawer-padding-y:var(--bs-spacing-300);--bs-navigation-drawer-padding-left:var(--bs-spacing-300);--bs-navigation-drawer-padding-right:var(--bs-spacing-200);--bs-navigation-drawer-gap:var(--bs-spacing-300);--bs-navigation-drawer-width:280px;--bs-navigation-drawer-title-font-family:var(--bs-typography-font-family-heading);--bs-navigation-drawer-title-font-weight:var(--bs-font-weight-bold);--bs-navigation-drawer-title-font-size:var(--bs-font-size-md);--bs-navigation-drawer-title-line-height:var(--bs-line-height-heading-h6);--bs-navigation-drawer-title-color:var(--bs-text-default);--bs-navigation-drawer-collapse-size:48px;--bs-navigation-drawer-collapse-radius:var(--bs-border-radius-100);--bs-navigation-drawer-collapse-hover:var(--bs-color-neutral-container);--bs-navigation-drawer-collapse-pressed:var(--bs-color-neutral-container-pressed);--bs-navigation-drawer-collapse-icon:var(--bs-icon-default);--bs-navigation-drawer-items-gap:var(--bs-spacing-100);--bs-navigation-drawer-collapsed-width:96px;--bs-navigation-drawer-search-trigger-size:44px;--bs-navigation-drawer-search-trigger-bg:var(--bs-color-neutral-container);--bs-navigation-drawer-search-trigger-border:var(--bs-border-neutral-container);--bs-navigation-drawer-search-trigger-icon:var(--bs-icon-default)}.bs-navigation-drawer{box-sizing:border-box;display:flex;flex-direction:column;gap:var(--bs-navigation-drawer-gap);width:var(--bs-navigation-drawer-width);height:100%;background:var(--bs-navigation-drawer-bg);border-right:1px solid var(--bs-navigation-drawer-border);padding:var(--bs-navigation-drawer-padding-y) var(--bs-navigation-drawer-padding-right) var(--bs-navigation-drawer-padding-y) var(--bs-navigation-drawer-padding-left);font-family:inherit;transition:width var(--bs-duration-fast) var(--bs-easing-standard), padding var(--bs-duration-fast) var(--bs-easing-standard)}:host([collapsed]) .bs-navigation-drawer{width:var(--bs-navigation-drawer-collapsed-width);padding-left:0;padding-right:0;align-items:center}.bs-navigation-drawer__logo{flex-shrink:0;display:flex;align-items:center}.bs-navigation-drawer__logo--mark{display:none}:host([collapsed]) .bs-navigation-drawer__logo--full{display:none}:host([collapsed]) .bs-navigation-drawer__logo--mark{display:flex}.bs-navigation-drawer__title-row{flex-shrink:0;display:flex;align-items:center;gap:var(--bs-navigation-drawer-gap)}.bs-navigation-drawer__title{flex:1;min-width:0;font-family:var(--bs-navigation-drawer-title-font-family);font-weight:var(--bs-navigation-drawer-title-font-weight);font-size:var(--bs-navigation-drawer-title-font-size);line-height:calc(var(--bs-navigation-drawer-title-line-height) * 1px);color:var(--bs-navigation-drawer-title-color);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host([collapsed]) .bs-navigation-drawer__title{display:none}.bs-navigation-drawer__collapse{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--bs-navigation-drawer-collapse-size);height:var(--bs-navigation-drawer-collapse-size);border:none;border-radius:var(--bs-navigation-drawer-collapse-radius);padding:0;background:transparent;color:var(--bs-navigation-drawer-collapse-icon);cursor:pointer;transition:background-color var(--bs-duration-fast) var(--bs-easing-standard)}.bs-navigation-drawer__collapse svg{width:24px;height:24px}.bs-navigation-drawer__collapse:hover{background:var(--bs-navigation-drawer-collapse-hover)}.bs-navigation-drawer__collapse:active{background:var(--bs-navigation-drawer-collapse-pressed)}.bs-navigation-drawer__collapse:focus-visible{outline:2px solid var(--bs-border-neutral-focus);outline-offset:2px}.bs-navigation-drawer__search{flex-shrink:0;width:100%}:host([collapsed]) .bs-navigation-drawer__search{display:none}.bs-navigation-drawer__search-trigger{display:none;flex-shrink:0;align-items:center;justify-content:center;box-sizing:border-box;width:var(--bs-navigation-drawer-search-trigger-size);height:var(--bs-navigation-drawer-search-trigger-size);border:1px solid var(--bs-navigation-drawer-search-trigger-border);border-radius:var(--bs-navigation-drawer-collapse-radius);background:var(--bs-navigation-drawer-search-trigger-bg);color:var(--bs-navigation-drawer-search-trigger-icon);cursor:pointer;transition:background-color var(--bs-duration-fast) var(--bs-easing-standard)}.bs-navigation-drawer__search-trigger svg{width:24px;height:24px}.bs-navigation-drawer__search-trigger:focus-visible{outline:2px solid var(--bs-border-neutral-focus);outline-offset:2px}:host([collapsed]) .bs-navigation-drawer__search-trigger{display:inline-flex}.bs-navigation-drawer__items{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:var(--bs-navigation-drawer-items-gap);scrollbar-width:none}.bs-navigation-drawer__items::-webkit-scrollbar{display:none}"}},[769,"bs-navigation-drawer",{heading:[1],collapsible:[4],collapsed:[1540],logoBackground:[1,"logo-background"],showLogo:[4,"show-logo"]},void 0,{collapsed:[{onCollapsedChange:0}]}]),o=()=>s("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},s("path",{d:"M15 18L9 12L15 6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})),d=()=>s("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},s("circle",{cx:"11",cy:"11",r:"7",stroke:"currentColor","stroke-width":"2"}),s("path",{d:"M16.5 16.5L21 21",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"}));function l(){"undefined"!=typeof customElements&&["bs-navigation-drawer","bs-logo"].forEach((r=>{switch(r){case"bs-navigation-drawer":customElements.get(a(r))||customElements.define(a(r),t);break;case"bs-logo":customElements.get(a(r))||n()}}))}l();const g=t,b=l;export{g as BsNavigationDrawer,b as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as i,p as a,H as t,c as n,h as e}from"./p-BJZYe7M4.js";const s=a(class extends t{constructor(i){super(),!1!==i&&this.__registerHost(),this.__attachShadow(),this.bsPageChange=n(this,"bsPageChange")}totalPages=1;currentPage=1;siblingCount=1;previousLabel="Previous page";nextLabel="Next page";bsPageChange;get safeTotalPages(){return Number.isFinite(this.totalPages)&&this.totalPages>=1?this.totalPages:1}get safeSiblingCount(){return Number.isFinite(this.siblingCount)&&this.siblingCount>=0?this.siblingCount:1}goToPage(i){i===this.currentPage||i<1||i>this.safeTotalPages||(this.currentPage=i,this.bsPageChange.emit(i))}getPageList(){const{currentPage:i}=this,a=this.safeTotalPages,t=this.safeSiblingCount;if(2*t+5>=a)return o(1,a);const n=Math.max(i-t,1),e=Math.min(i+t,a),s=n>2,r=e<a-1;return!s&&r?[...o(1,2*t+1),"ellipsis",a]:s&&!r?[1,"ellipsis",...o(a-(2*t+1)+1,a)]:[1,"ellipsis",...o(n,e),"ellipsis",a]}render(){const i=this.getPageList();return e("nav",{key:"
|
|
1
|
+
import{t as i,p as a,H as t,c as n,h as e}from"./p-BJZYe7M4.js";const s=a(class extends t{constructor(i){super(),!1!==i&&this.__registerHost(),this.__attachShadow(),this.bsPageChange=n(this,"bsPageChange")}totalPages=1;currentPage=1;siblingCount=1;previousLabel="Previous page";nextLabel="Next page";bsPageChange;get safeTotalPages(){return Number.isFinite(this.totalPages)&&this.totalPages>=1?this.totalPages:1}get safeSiblingCount(){return Number.isFinite(this.siblingCount)&&this.siblingCount>=0?this.siblingCount:1}goToPage(i){i===this.currentPage||i<1||i>this.safeTotalPages||(this.currentPage=i,this.bsPageChange.emit(i))}getPageList(){const{currentPage:i}=this,a=this.safeTotalPages,t=this.safeSiblingCount;if(2*t+5>=a)return o(1,a);const n=Math.max(i-t,1),e=Math.min(i+t,a),s=n>2,r=e<a-1;return!s&&r?[...o(1,2*t+1),"ellipsis",a]:s&&!r?[1,"ellipsis",...o(a-(2*t+1)+1,a)]:[1,"ellipsis",...o(n,e),"ellipsis",a]}render(){const i=this.getPageList();return e("nav",{key:"0672f1f0264fb21d352bcdc1400d9cc712e703d0","aria-label":"Pagination"},e("ul",{key:"525ba6927de5a4b37a258a1513ac08d0e72ecef7",part:"list",class:"bs-pagination__list"},e("li",{key:"c40905f2ccf7fa9df67cde3c106d5f176f7bda4e",part:"item",class:"bs-pagination__item"},e("button",{key:"e09624f4c9a006a69d2c4dab14c744abb347b804",part:"prev",type:"button",class:"bs-pagination__control","aria-label":this.previousLabel,disabled:this.currentPage<=1,onClick:()=>this.goToPage(this.currentPage-1)},e(r,{key:"52e2a323c484f208c2dcbd0a783241eecdb6435d"}))),i.map(((i,a)=>"ellipsis"===i?e("li",{part:"item",class:"bs-pagination__item",key:"ellipsis-"+a},e("span",{part:"ellipsis",class:"bs-pagination__ellipsis","aria-hidden":"true"},e(p,null))):e("li",{part:"item",class:"bs-pagination__item",key:i},e("button",{part:i===this.currentPage?"page current":"page",type:"button",class:"bs-pagination__control bs-pagination__page "+(i===this.currentPage?"bs-pagination__page--current":""),"aria-label":"Go to page "+i,"aria-current":i===this.currentPage?"page":void 0,onClick:()=>this.goToPage(i)},i)))),e("li",{key:"01a3a6e391db347827cad882dcd762a246b2dd38",part:"item",class:"bs-pagination__item"},e("button",{key:"cf7389e94bf91d3878caefe6053aaa923d509b29",part:"next",type:"button",class:"bs-pagination__control","aria-label":this.nextLabel,disabled:this.currentPage>=this.safeTotalPages,onClick:()=>this.goToPage(this.currentPage+1)},e(l,{key:"a77f841c472840f7d1560715e88b823ce65c8e9b"})))))}static get style(){return":host{display:inline-block;--bs-pagination-gap:var(--bs-spacing-50);--bs-pagination-size:var(--bs-spacing-550);--bs-pagination-radius:var(--bs-border-radius-100);--bs-pagination-font-size:var(--bs-font-size-md);--bs-pagination-line-height:var(--bs-line-height-body-md);--bs-pagination-color:var(--bs-text-secondary);--bs-pagination-color-disabled:var(--bs-icon-disabled);--bs-pagination-hover:var(--bs-color-neutral-container-hover);--bs-pagination-pressed:var(--bs-color-neutral-container-pressed);--bs-pagination-current-bg:var(--bs-color-primary-default);--bs-pagination-current-bg-hover:var(--bs-color-primary-hover);--bs-pagination-current-bg-pressed:var(--bs-color-primary-pressed);--bs-pagination-current-color:var(--bs-text-on-action);--bs-pagination-focus-ring-color:var(--bs-border-neutral-focus)}.bs-pagination__list{display:flex;align-items:center;flex-wrap:wrap;margin:0;padding:0;list-style:none;gap:var(--bs-pagination-gap);font-family:inherit}.bs-pagination__item{display:flex}.bs-pagination__control{display:flex;align-items:center;justify-content:center;width:var(--bs-pagination-size);height:var(--bs-pagination-size);padding:0;border:none;border-radius:var(--bs-pagination-radius);background:transparent;color:var(--bs-pagination-color);font-family:inherit;font-size:var(--bs-pagination-font-size);line-height:calc(var(--bs-pagination-line-height) * 1px);cursor:pointer}.bs-pagination__control svg{width:24px;height:24px}.bs-pagination__control:disabled{color:var(--bs-pagination-color-disabled);cursor:not-allowed}.bs-pagination__page:not(:disabled):hover{background:var(--bs-pagination-hover)}.bs-pagination__page:not(:disabled):active{background:var(--bs-pagination-pressed)}.bs-pagination__control:focus-visible{outline:2px solid var(--bs-pagination-focus-ring-color);outline-offset:2px}.bs-pagination__page--current{background:var(--bs-pagination-current-bg);color:var(--bs-pagination-current-color)}.bs-pagination__page--current:hover{background:var(--bs-pagination-current-bg-hover)}.bs-pagination__page--current:active{background:var(--bs-pagination-current-bg-pressed)}.bs-pagination__ellipsis{display:flex;align-items:center;justify-content:center;width:var(--bs-pagination-size);height:var(--bs-pagination-size);color:var(--bs-pagination-color)}.bs-pagination__ellipsis svg{width:24px;height:24px}"}},[513,"bs-pagination",{totalPages:[2,"total-pages"],currentPage:[1538,"current-page"],siblingCount:[2,"sibling-count"],previousLabel:[1,"previous-label"],nextLabel:[1,"next-label"]}]);function o(i,a){return Array.from({length:a-i+1},((a,t)=>i+t))}const r=()=>e("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},e("path",{d:"M15 18L9 12L15 6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})),l=()=>e("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},e("path",{d:"M9 18L15 12L9 6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})),p=()=>e("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},e("path",{d:"M12 13C12.5523 13 13 12.5523 13 12C13 11.4477 12.5523 11 12 11C11.4477 11 11 11.4477 11 12C11 12.5523 11.4477 13 12 13Z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),e("path",{d:"M19 13C19.5523 13 20 12.5523 20 12C20 11.4477 19.5523 11 19 11C18.4477 11 18 11.4477 18 12C18 12.5523 18.4477 13 19 13Z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),e("path",{d:"M5 13C5.55228 13 6 12.5523 6 12C6 11.4477 5.55228 11 5 11C4.44772 11 4 11.4477 4 12C4 12.5523 4.44772 13 5 13Z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}));function b(){"undefined"!=typeof customElements&&["bs-pagination"].forEach((a=>{"bs-pagination"===a&&(customElements.get(i(a))||customElements.define(i(a),s))}))}b();const g=s,c=b;export{g as BsPagination,c as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as a,p as
|
|
1
|
+
import{t as a,p as r,H as e,c as i,h as s}from"./p-BJZYe7M4.js";const d=r(class extends e{constructor(a){super(),!1!==a&&this.__registerHost(),this.__attachShadow(),this.bsChange=i(this,"bsChange")}get el(){return this}name;value;checked=!1;disabled=!1;bsChange;onChange=a=>{const r=a.target.checked;this.checked=r,r&&this.bsChange.emit(this.value)};render(){return s("label",{key:"6d78b0c2ec41903227ff468952ac1972a1948f61",class:"bs-radio "+(this.disabled?"bs-radio--disabled":"")},s("input",{key:"0d777f016ccc089ef96c66ae36bab7bdda398e4b",class:"bs-radio__input",type:"radio",name:this.name,value:this.value,checked:this.checked,disabled:this.disabled,onChange:this.onChange}),s("span",{key:"7fbcc84ffad6dfb7304b7d62396ef3733c8ac30c",class:"bs-radio__hit-area"},s("span",{key:"a818b5bea42ebdd0713c92a1e70db3c27fe1bd20",class:"bs-radio__state-layer"},s("span",{key:"ac42d940f1ad3f868e940ec8507a51595829f369",part:"circle",class:"bs-radio__circle "+(this.checked?"bs-radio__circle--selected":"")},this.checked&&s("span",{key:"b56060d980c6579b31f8f9de0cd7367b0c145955",part:"dot",class:"bs-radio__dot"})))),s("span",{key:"287cadc837f4477c12c46e01c94799d951746ce6",part:"label",class:"bs-radio__label"},s("slot",{key:"0230d91af5c327b7a941c6e5b0459f82fda2b516"})))}static get delegatesFocus(){return!0}static get style(){return":host{display:inline-block;--bs-radio-size:var(--bs-spacing-300);--bs-radio-border-width:2px;--bs-radio-state-layer-size:40px;--bs-radio-hit-area-size:48px;--bs-radio-gap:var(--bs-spacing-100)}.bs-radio{position:relative;display:inline-flex;align-items:center;gap:var(--bs-radio-gap);font-family:inherit;cursor:pointer}.bs-radio--disabled{cursor:not-allowed}.bs-radio__input{position:absolute;top:0;left:0;width:100%;height:100%;margin:0;padding:0;opacity:0;cursor:pointer}.bs-radio__input:disabled{cursor:not-allowed}.bs-radio__hit-area{box-sizing:border-box;position:relative;display:flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--bs-radio-hit-area-size);height:var(--bs-radio-hit-area-size)}.bs-radio__state-layer{box-sizing:border-box;display:flex;align-items:center;justify-content:center;width:var(--bs-radio-state-layer-size);height:var(--bs-radio-state-layer-size);border-radius:50%;background:var(--bs-radio-bg-default)}.bs-radio__circle{box-sizing:border-box;display:flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--bs-radio-size);height:var(--bs-radio-size);border:var(--bs-radio-border-width) solid var(--bs-radio-enabled-border-default);border-radius:50%;background:transparent}.bs-radio__circle--selected{border-color:var(--bs-radio-selected-border-default)}.bs-radio__dot{width:50%;height:50%;border-radius:50%;background:var(--bs-radio-icon-checked)}.bs-radio__input:hover:not(:disabled)~.bs-radio__hit-area .bs-radio__state-layer{background:var(--bs-radio-bg-hover)}.bs-radio__input:hover:not(:disabled)~.bs-radio__hit-area .bs-radio__circle{border-color:var(--bs-radio-enabled-border-hover)}.bs-radio__input:hover:not(:disabled)~.bs-radio__hit-area .bs-radio__circle--selected{border-color:var(--bs-radio-selected-border-hover)}.bs-radio__input:hover:not(:disabled)~.bs-radio__hit-area .bs-radio__circle--selected .bs-radio__dot{background:var(--bs-radio-icon-hover)}.bs-radio__input:focus-visible~.bs-radio__hit-area .bs-radio__state-layer{background:var(--bs-radio-bg-focus);outline:2px solid var(--bs-radio-focus-ring);outline-offset:2px}.bs-radio__input:focus-visible~.bs-radio__hit-area .bs-radio__circle{border-color:var(--bs-radio-enabled-border-focus)}.bs-radio__input:focus-visible~.bs-radio__hit-area .bs-radio__circle--selected{border-color:var(--bs-radio-selected-border-focus)}.bs-radio__input:active:not(:disabled)~.bs-radio__hit-area .bs-radio__state-layer{background:var(--bs-radio-bg-pressed)}.bs-radio__input:active:not(:disabled)~.bs-radio__hit-area .bs-radio__circle{border-color:var(--bs-radio-enabled-border-pressed)}.bs-radio__input:active:not(:disabled)~.bs-radio__hit-area .bs-radio__circle--selected{border-color:var(--bs-radio-selected-border-pressed)}.bs-radio__input:disabled~.bs-radio__hit-area .bs-radio__state-layer{background:var(--bs-radio-bg-disabled)}.bs-radio__input:disabled~.bs-radio__hit-area .bs-radio__circle{border-color:var(--bs-radio-border-disabled)}.bs-radio__input:disabled~.bs-radio__hit-area .bs-radio__circle--selected .bs-radio__dot{background:var(--bs-radio-icon-disabled)}.bs-radio__label{font-size:var(--bs-font-size-md);color:var(--bs-radio-label-default)}.bs-radio--disabled .bs-radio__label{color:var(--bs-radio-label-disabled)}"}},[785,"bs-radio",{name:[1],value:[1],checked:[1540],disabled:[4]}]);function o(){"undefined"!=typeof customElements&&["bs-radio"].forEach((r=>{"bs-radio"===r&&(customElements.get(a(r))||customElements.define(a(r),d))}))}o();const b=d,t=o;export{b as BsRadio,t as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e,p as s,H as r,c as o,h as n}from"./p-BJZYe7M4.js";const i=s(class extends r{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.bsOpen=o(this,"bsOpen")}fileName="Source";sourceName;version;href;target="_blank";bsOpen;onClick=()=>{this.bsOpen.emit()};render(){const e=[n("span",{key:"
|
|
1
|
+
import{t as e,p as s,H as r,c as o,h as n}from"./p-BJZYe7M4.js";const i=s(class extends r{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.bsOpen=o(this,"bsOpen")}fileName="Source";sourceName;version;href;target="_blank";bsOpen;onClick=()=>{this.bsOpen.emit()};render(){const e=[n("span",{key:"753542a7656a7794bc572c25530f0a5eb1669d90",class:"bs-source-link__left"},n("span",{key:"fd80592c0236828d9a42c5e38136f8ef0534cb4c",class:"bs-source-link__filename-row"},n("span",{key:"94343cc0f4defb5db6398758ae415dbf15b78496",part:"icon",class:"bs-source-link__icon"},n("slot",{key:"3c07138dd24d92ee705185fa911aea7afff12a80",name:"icon"},n(a,{key:"ec9732d23d30f5b6a2300a25195369bd5f48db28"}))),n("p",{key:"a74356f5ccc3afb88900b726432f3205d8a10fc5",part:"filename",class:"bs-source-link__filename"},this.fileName)),n("span",{key:"682fcd2ecc83004dc0f59f93c3cf7b60dd9c6399",class:"bs-source-link__meta"},this.sourceName&&n("span",{key:"6dc9967534fb2cf0d23f50a00e837d2979438af2",part:"source",class:"bs-source-link__source"},this.sourceName),this.sourceName&&this.version&&n("span",{key:"3e8679e0495224b3e178ec963da886c520880e74",class:"bs-source-link__dot","aria-hidden":"true"}),this.version&&n("span",{key:"9ccb6b36baebadb43531c58a1668838d3073fc05",part:"version",class:"bs-source-link__version"},this.version))),n("span",{key:"0dd405de92bbda04ddf6aeb137cc2bfa4687bcb9",part:"arrow",class:"bs-source-link__arrow","aria-hidden":"true"},n(c,{key:"4b07b527923871b6ece0a48800a1bf30812c53df"}))];return this.href?n("a",{class:"bs-source-link",href:this.href,target:this.target,rel:"noopener noreferrer",onClick:this.onClick},e):n("button",{type:"button",class:"bs-source-link",onClick:this.onClick},e)}static get style(){return":host{display:block;--bs-source-link-radius:var(--bs-border-radius-150);--bs-source-link-padding:var(--bs-spacing-150);--bs-source-link-gap:var(--bs-spacing-50);--bs-source-link-icon-gap:var(--bs-spacing-75);--bs-source-link-hover:var(--bs-surface-hover);--bs-source-link-pressed:var(--bs-surface-pressed);--bs-source-link-focus:var(--bs-border-neutral-focus);--bs-source-link-filename-color:var(--bs-text-default);--bs-source-link-meta-color:var(--bs-text-secondary);--bs-source-link-icon-color:var(--bs-icon-default);--bs-source-link-dot-color:var(--bs-text-secondary)}.bs-source-link{box-sizing:border-box;display:flex;align-items:center;gap:var(--bs-source-link-gap);width:100%;padding:var(--bs-source-link-padding);background:none;border:none;border-radius:var(--bs-source-link-radius);font-family:inherit;text-align:left;text-decoration:none;cursor:pointer;transition:background-color var(--bs-duration-fast) var(--bs-easing-standard)}.bs-source-link:hover,.bs-source-link:focus-visible{background:var(--bs-source-link-hover)}.bs-source-link:active{background:var(--bs-source-link-pressed)}.bs-source-link:focus-visible{outline:2px solid var(--bs-source-link-focus);outline-offset:1px}.bs-source-link__icon{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;width:16px;height:16px;color:var(--bs-source-link-icon-color)}.bs-source-link__left{display:flex;flex:1 0 0;flex-direction:column;gap:2px;min-width:0}.bs-source-link__filename-row{display:flex;align-items:center;gap:var(--bs-source-link-icon-gap);width:100%}.bs-source-link__filename{margin:0;overflow:hidden;color:var(--bs-source-link-filename-color);font-size:var(--bs-font-size-md);font-weight:var(--bs-font-weight-semibold);line-height:var(--bs-line-height-normal);text-overflow:ellipsis;white-space:nowrap}.bs-source-link__meta{display:flex;align-items:center;gap:var(--bs-spacing-50);padding-left:22px}.bs-source-link__source,.bs-source-link__version{color:var(--bs-source-link-meta-color);font-size:var(--bs-font-size-sm);line-height:var(--bs-line-height-normal);white-space:nowrap}.bs-source-link__dot{width:4px;height:4px;border-radius:50%;background:var(--bs-source-link-dot-color);flex-shrink:0}.bs-source-link__arrow{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;width:24px;height:24px;color:var(--bs-source-link-icon-color)}"}},[769,"bs-source-link",{fileName:[1,"file-name"],sourceName:[1,"source-name"],version:[1],href:[1],target:[1]}]),a=()=>n("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},n("path",{d:"M9.5 1.5H4C3.73478 1.5 3.48043 1.60536 3.29289 1.79289C3.10536 1.98043 3 2.23478 3 2.5V13.5C3 13.7652 3.10536 14.0196 3.29289 14.2071C3.48043 14.3946 3.73478 14.5 4 14.5H12C12.2652 14.5 12.5196 14.3946 12.7071 14.2071C12.8946 14.0196 13 13.7652 13 13.5V5L9.5 1.5Z",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"}),n("path",{d:"M9.5 1.5V5H13",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"}),n("path",{d:"M5.5 8.5H10.5",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"}),n("path",{d:"M5.5 11H10.5",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"})),c=()=>n("svg",{width:"24",height:"24",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},n("path",{d:"M6.25 13.75L13.75 6.25",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),n("path",{d:"M7.5 6.25H13.75V12.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}));function t(){"undefined"!=typeof customElements&&["bs-source-link"].forEach((s=>{"bs-source-link"===s&&(customElements.get(e(s))||customElements.define(e(s),i))}))}t();const l=i,d=t;export{l as BsSourceLink,d as defineCustomElement}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface BsStepperStep extends Components.BsStepperStep, HTMLElement {}
|
|
4
|
+
export const BsStepperStep: {
|
|
5
|
+
prototype: BsStepperStep;
|
|
6
|
+
new (): BsStepperStep;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e,p as s,H as t,h as p,d as r}from"./p-BJZYe7M4.js";const o=s(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}name="";description;error=!1;disabled=!1;computedState="enabled";direction="horizontal";showDescription=!0;get state(){return this.disabled?"disabled":this.error?"error":this.computedState}render(){const e=this.state;return p(r,{key:"434e05ca150a24b2c9d5e3017198b1c5938460ba",role:"listitem",class:"bs-stepper-step--"+this.direction},p("div",{key:"b9c924f3f834a6c4bb45f6f2b5a655c48f5439fb",class:"bs-stepper-step__top"},p("span",{key:"89b61162775733afef65c862e60b66e3eb732382",part:"icon",class:"bs-stepper-step__icon bs-stepper-step__icon--"+e},"current"===e&&p("span",{key:"7633c0612a65bbbc48fee9da55be642c22e8cc8f",class:"bs-stepper-step__icon-dot"}),"done"===e&&p(i,{key:"608682cbba1ad1f3bff467b1139cbd76d703ac2f"}),"error"===e&&p(n,{key:"51123ab8c6a73faad6905c52065af8b59325a819"})),p("span",{key:"93d157b4df08963ab5febcf0cf855575cc1ed53f",part:"connector",class:"bs-stepper-step__connector","aria-hidden":"true"},p("span",{key:"1af364efa632e94cf6e51a3e95f94b82dd1a51fd",class:"bs-stepper-step__connector-line"}))),p("span",{key:"3fb8c121d7180d82000ce516955e2597a43cefff",part:"label",class:"bs-stepper-step__label bs-stepper-step__label--"+e},p("span",{key:"07c716576b437a6e936be7746fa5db130bdf5e70",part:"name",class:"bs-stepper-step__name"},this.name),this.showDescription&&this.description&&p("span",{key:"8240af6eca62f42101c3101e653d6e4b3c1470da",part:"description",class:"bs-stepper-step__description"},this.description)))}static get style(){return":host{display:flex;font-family:inherit;font-size:var(--bs-stepper-step-font-size);line-height:calc(var(--bs-stepper-step-line-height) * 1px);--bs-stepper-step-gap:var(--bs-spacing-100);--bs-stepper-step-icon-size:24px;--bs-stepper-step-icon-border-width:1.5px;--bs-stepper-step-connector-color:var(--bs-border-default);--bs-stepper-step-connector-thickness:2px;--bs-stepper-step-icon-border-enabled:var(--bs-border-default);--bs-stepper-step-icon-border-current:var(--bs-color-primary-default);--bs-stepper-step-icon-dot-current:var(--bs-color-primary-default);--bs-stepper-step-icon-bg-done:var(--bs-color-primary-default);--bs-stepper-step-icon-color-done:var(--bs-text-on-action);--bs-stepper-step-icon-border-error:var(--bs-border-error);--bs-stepper-step-icon-color-error:var(--bs-border-error);--bs-stepper-step-icon-border-disabled:var(--bs-border-neutral-disabled);--bs-stepper-step-text-enabled:var(--bs-text-muted);--bs-stepper-step-text-active:var(--bs-text-default);--bs-stepper-step-text-disabled:var(--bs-text-on-disabled);--bs-stepper-step-font-size:var(--bs-font-size-md);--bs-stepper-step-line-height:var(--bs-line-height-body-md);--bs-stepper-step-name-font-weight:var(--bs-font-weight-semibold);--bs-stepper-step-description-font-weight:var(--bs-font-weight-regular)}:host(.bs-stepper-step--horizontal){flex:1 1 0;flex-direction:column}:host(.bs-stepper-step--vertical){width:100%;flex-direction:row;}.bs-stepper-step__top{display:flex;align-items:center}:host(.bs-stepper-step--horizontal) .bs-stepper-step__top{flex-direction:row}:host(.bs-stepper-step--vertical) .bs-stepper-step__top{flex-direction:column}.bs-stepper-step__icon{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--bs-stepper-step-icon-size);height:var(--bs-stepper-step-icon-size);border-radius:50%;box-sizing:border-box}.bs-stepper-step__icon svg{width:16px;height:16px}.bs-stepper-step__icon--enabled{border:var(--bs-stepper-step-icon-border-width) solid var(--bs-stepper-step-icon-border-enabled)}.bs-stepper-step__icon--current{border:var(--bs-stepper-step-icon-border-width) solid var(--bs-stepper-step-icon-border-current)}.bs-stepper-step__icon-dot{width:16px;height:16px;border-radius:50%;background:var(--bs-stepper-step-icon-dot-current)}.bs-stepper-step__icon--done{background:var(--bs-stepper-step-icon-bg-done);color:var(--bs-stepper-step-icon-color-done)}.bs-stepper-step__icon--error{border:var(--bs-stepper-step-icon-border-width) solid var(--bs-stepper-step-icon-border-error);color:var(--bs-stepper-step-icon-color-error)}.bs-stepper-step__icon--disabled{border:var(--bs-stepper-step-icon-border-width) solid var(--bs-stepper-step-icon-border-disabled)}.bs-stepper-step__connector{display:flex;align-items:center;justify-content:center}:host(.bs-stepper-step--horizontal) .bs-stepper-step__connector{flex:1 1 auto;margin-left:var(--bs-stepper-step-gap)}:host(.bs-stepper-step--vertical) .bs-stepper-step__connector{flex:1 1 auto;flex-direction:column;align-items:center;width:var(--bs-stepper-step-icon-size);margin:var(--bs-stepper-step-gap) 0;min-height:var(--bs-stepper-step-icon-size)}.bs-stepper-step__connector-line{display:block;border-radius:calc(var(--bs-stepper-step-connector-thickness) / 2);background:var(--bs-stepper-step-connector-color)}:host(.bs-stepper-step--horizontal) .bs-stepper-step__connector-line{width:100%;height:var(--bs-stepper-step-connector-thickness)}:host(.bs-stepper-step--vertical) .bs-stepper-step__connector-line{flex:1 1 auto;width:var(--bs-stepper-step-connector-thickness)}:host(:last-child) .bs-stepper-step__connector{visibility:hidden}.bs-stepper-step__label{display:flex;flex-direction:column}:host(.bs-stepper-step--horizontal) .bs-stepper-step__label{margin-top:var(--bs-stepper-step-gap);width:var(--bs-stepper-step-icon-size);align-self:flex-start;align-items:center;text-align:center}:host(.bs-stepper-step--vertical) .bs-stepper-step__label{margin-left:var(--bs-stepper-step-gap);text-align:left}.bs-stepper-step__name{font-weight:var(--bs-stepper-step-name-font-weight);white-space:nowrap}.bs-stepper-step__description{font-weight:var(--bs-stepper-step-description-font-weight);white-space:nowrap}.bs-stepper-step__label--enabled .bs-stepper-step__name,.bs-stepper-step__label--enabled .bs-stepper-step__description,.bs-stepper-step__label--error .bs-stepper-step__name,.bs-stepper-step__label--error .bs-stepper-step__description{color:var(--bs-stepper-step-text-enabled)}.bs-stepper-step__label--current .bs-stepper-step__name,.bs-stepper-step__label--current .bs-stepper-step__description,.bs-stepper-step__label--done .bs-stepper-step__name,.bs-stepper-step__label--done .bs-stepper-step__description{color:var(--bs-stepper-step-text-active)}.bs-stepper-step__label--disabled .bs-stepper-step__name,.bs-stepper-step__label--disabled .bs-stepper-step__description{color:var(--bs-stepper-step-text-disabled)}"}},[513,"bs-stepper-step",{name:[1],description:[1],error:[4],disabled:[4],computedState:[1,"computed-state"],direction:[1],showDescription:[4,"show-description"]}]),i=()=>p("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},p("path",{d:"M2.5 9L6 12.5L14 4.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})),n=()=>p("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},p("path",{d:"M8 3V9.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),p("circle",{cx:"8",cy:"12.5",r:"1",fill:"currentColor"}));function b(){"undefined"!=typeof customElements&&["bs-stepper-step"].forEach((s=>{"bs-stepper-step"===s&&(customElements.get(e(s))||customElements.define(e(s),o))}))}b();const a=o,c=b;export{a as BsStepperStep,c as defineCustomElement}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface BsStepper extends Components.BsStepper, HTMLElement {}
|
|
4
|
+
export const BsStepper: {
|
|
5
|
+
prototype: BsStepper;
|
|
6
|
+
new (): BsStepper;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e,p as t,H as o,h as s}from"./p-BJZYe7M4.js";const n=t(class extends o{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}get el(){return this}currentStep=0;direction="horizontal";showDescription=!0;onPropChange(){this.propagateToSteps()}componentDidLoad(){this.propagateToSteps()}onSlotChange=()=>{this.propagateToSteps()};propagateToSteps(){this.el.querySelectorAll(":scope > bs-stepper-step").forEach(((e,t)=>{Object.assign(e,{computedState:t<this.currentStep?"done":t===this.currentStep?"current":"enabled",direction:this.direction,showDescription:this.showDescription})}))}render(){return s("slot",{key:"aed14a6d1d81b19d7d53fe9a536b2eb4912a2108",onSlotchange:this.onSlotChange})}static get watchers(){return{currentStep:[{onPropChange:0}],direction:[{onPropChange:0}],showDescription:[{onPropChange:0}]}}static get style(){return":host{display:flex;width:100%;--bs-stepper-edge-padding:var(--bs-spacing-800)}:host([direction='vertical']){flex-direction:column}:host(:not([direction='vertical'])){flex-direction:row;align-items:flex-start;padding:0 var(--bs-stepper-edge-padding)}"}},[769,"bs-stepper",{currentStep:[2,"current-step"],direction:[513],showDescription:[4,"show-description"]},void 0,{currentStep:[{onPropChange:0}],direction:[{onPropChange:0}],showDescription:[{onPropChange:0}]}]);function r(){"undefined"!=typeof customElements&&["bs-stepper"].forEach((t=>{"bs-stepper"===t&&(customElements.get(e(t))||customElements.define(e(t),n))}))}r();const i=n,p=r;export{i as BsStepper,p as defineCustomElement}
|