@brandsync/wc 0.0.8 → 0.0.9
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 +1808 -353
- package/dist/brandsync-wc/brandsync-wc.esm.js +1 -1
- package/dist/brandsync-wc/p-0d64ea40.entry.js +1 -0
- package/dist/brandsync-wc/{p-c63d16e1.entry.js → p-1515498e.entry.js} +1 -1
- package/dist/brandsync-wc/p-16a54578.entry.js +1 -0
- package/dist/brandsync-wc/p-18af02df.entry.js +1 -0
- package/dist/brandsync-wc/p-30a0e168.entry.js +1 -0
- package/dist/brandsync-wc/p-3dacae70.entry.js +1 -0
- package/dist/brandsync-wc/p-5333bb5a.entry.js +1 -0
- package/dist/brandsync-wc/p-575ce905.entry.js +1 -0
- package/dist/brandsync-wc/{p-dd0fea0e.entry.js → p-7776b57b.entry.js} +1 -1
- package/dist/brandsync-wc/{p-260bd201.entry.js → p-805644e4.entry.js} +1 -1
- package/dist/brandsync-wc/{p-f88d9a6e.entry.js → p-8a78d6ea.entry.js} +1 -1
- package/dist/brandsync-wc/p-8d12ed96.entry.js +1 -0
- package/dist/brandsync-wc/p-94ed898a.entry.js +1 -0
- package/dist/brandsync-wc/{p-9e5d2211.entry.js → p-96f374be.entry.js} +1 -1
- package/dist/brandsync-wc/{p-ab5cc7af.entry.js → p-a34f460d.entry.js} +1 -1
- package/dist/brandsync-wc/p-bc72439a.entry.js +1 -0
- package/dist/brandsync-wc/{p-76eca100.entry.js → p-ce0914a7.entry.js} +1 -1
- package/dist/brandsync-wc/{p-5a0fe72e.entry.js → p-d682675e.entry.js} +1 -1
- package/dist/brandsync-wc/p-dad4a92c.entry.js +1 -0
- package/dist/brandsync-wc/{p-cfc3421b.entry.js → p-dd747a12.entry.js} +1 -1
- package/dist/brandsync-wc/{p-2742ecef.entry.js → p-eb4d87f0.entry.js} +1 -1
- package/dist/cjs/brandsync-wc.cjs.js +1 -1
- package/dist/cjs/bs-ai-disclaimer.cjs.entry.js +17 -0
- package/dist/cjs/bs-ai-greeting.cjs.entry.js +24 -0
- package/dist/cjs/bs-ai-thinking.cjs.entry.js +1 -1
- package/dist/cjs/bs-attachment-list.cjs.entry.js +47 -0
- package/dist/cjs/bs-attachment.cjs.entry.js +46 -0
- package/dist/cjs/bs-badge.cjs.entry.js +1 -1
- package/dist/cjs/bs-button-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/bs-button.cjs.entry.js +1 -1
- package/dist/cjs/bs-card.cjs.entry.js +1 -1
- package/dist/cjs/bs-chatbot-feedback.cjs.entry.js +94 -0
- 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 +38 -0
- package/dist/cjs/bs-chatbot-suggestion-button.cjs.entry.js +1 -1
- package/dist/cjs/bs-composer-status-banner.cjs.entry.js +43 -0
- package/dist/cjs/bs-composer.cjs.entry.js +16 -2
- package/dist/cjs/bs-data-table.cjs.entry.js +2 -2
- package/dist/cjs/bs-input.cjs.entry.js +270 -4
- package/dist/cjs/{bs-menu-item.cjs.entry.js → bs-menu_2.cjs.entry.js} +14 -1
- package/dist/cjs/bs-source-link.cjs.entry.js +39 -0
- package/dist/cjs/bs-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +8 -0
- package/dist/collection/components/bs-ai-chatbot/bs-ai-chatbot.stories.js +180 -0
- package/dist/collection/components/bs-ai-disclaimer/bs-ai-disclaimer.cmp.test.js +14 -0
- package/dist/collection/components/bs-ai-disclaimer/bs-ai-disclaimer.css +27 -0
- package/dist/collection/components/bs-ai-disclaimer/bs-ai-disclaimer.js +41 -0
- package/dist/collection/components/bs-ai-disclaimer/bs-ai-disclaimer.stories.js +15 -0
- package/dist/collection/components/bs-ai-greeting/bs-ai-greeting.cmp.test.js +22 -0
- package/dist/collection/components/bs-ai-greeting/bs-ai-greeting.css +53 -0
- package/dist/collection/components/bs-ai-greeting/bs-ai-greeting.js +103 -0
- package/dist/collection/components/bs-ai-greeting/bs-ai-greeting.stories.js +23 -0
- package/dist/collection/components/bs-ai-thinking/bs-ai-thinking.js +1 -1
- package/dist/collection/components/bs-attachment/bs-attachment.cmp.test.js +41 -0
- package/dist/collection/components/bs-attachment/bs-attachment.css +184 -0
- package/dist/collection/components/bs-attachment/bs-attachment.js +230 -0
- package/dist/collection/components/bs-attachment/bs-attachment.stories.js +58 -0
- package/dist/collection/components/bs-attachment-list/bs-attachment-list.cmp.test.js +28 -0
- package/dist/collection/components/bs-attachment-list/bs-attachment-list.css +56 -0
- package/dist/collection/components/bs-attachment-list/bs-attachment-list.js +105 -0
- package/dist/collection/components/bs-attachment-list/bs-attachment-list.stories.js +47 -0
- package/dist/collection/components/bs-badge/bs-badge.js +1 -1
- package/dist/collection/components/bs-button/bs-button.js +1 -1
- package/dist/collection/components/bs-button-skeleton/bs-button-skeleton.js +1 -1
- package/dist/collection/components/bs-card/bs-card.js +1 -1
- package/dist/collection/components/bs-chatbot-feedback/bs-chatbot-feedback.cmp.test.js +73 -0
- package/dist/collection/components/bs-chatbot-feedback/bs-chatbot-feedback.css +253 -0
- package/dist/collection/components/bs-chatbot-feedback/bs-chatbot-feedback.js +324 -0
- package/dist/collection/components/bs-chatbot-feedback/bs-chatbot-feedback.stories.js +54 -0
- 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.cmp.test.js +34 -0
- package/dist/collection/components/bs-chatbot-sources-drawer/bs-chatbot-sources-drawer.css +106 -0
- package/dist/collection/components/bs-chatbot-sources-drawer/bs-chatbot-sources-drawer.js +142 -0
- package/dist/collection/components/bs-chatbot-sources-drawer/bs-chatbot-sources-drawer.stories.js +44 -0
- package/dist/collection/components/bs-chatbot-suggestion-button/bs-chatbot-suggestion-button.js +1 -1
- package/dist/collection/components/bs-composer/bs-composer.cmp.test.js +12 -0
- package/dist/collection/components/bs-composer/bs-composer.css +10 -0
- package/dist/collection/components/bs-composer/bs-composer.js +25 -1
- package/dist/collection/components/bs-composer/bs-composer.stories.js +13 -0
- package/dist/collection/components/bs-composer-status-banner/bs-composer-status-banner.cmp.test.js +42 -0
- package/dist/collection/components/bs-composer-status-banner/bs-composer-status-banner.css +173 -0
- package/dist/collection/components/bs-composer-status-banner/bs-composer-status-banner.js +270 -0
- package/dist/collection/components/bs-composer-status-banner/bs-composer-status-banner.stories.js +75 -0
- package/dist/collection/components/bs-data-table/bs-data-table.js +2 -2
- package/dist/collection/components/bs-input/bs-input.cmp.test.js +296 -0
- package/dist/collection/components/bs-input/bs-input.css +333 -23
- package/dist/collection/components/bs-input/bs-input.js +647 -11
- package/dist/collection/components/bs-input/bs-input.stories.js +128 -1
- 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-source-link/bs-source-link.cmp.test.js +42 -0
- package/dist/collection/components/bs-source-link/bs-source-link.css +114 -0
- package/dist/collection/components/bs-source-link/bs-source-link.js +192 -0
- package/dist/collection/components/bs-source-link/bs-source-link.stories.js +33 -0
- package/dist/collection/components/bs-tooltip/bs-tooltip.js +1 -1
- package/dist/components/bs-ai-disclaimer.d.ts +11 -0
- package/dist/components/bs-ai-disclaimer.js +1 -0
- package/dist/components/bs-ai-greeting.d.ts +11 -0
- package/dist/components/bs-ai-greeting.js +1 -0
- package/dist/components/bs-ai-thinking.js +1 -1
- package/dist/components/bs-attachment-list.d.ts +11 -0
- package/dist/components/bs-attachment-list.js +1 -0
- package/dist/components/bs-attachment.d.ts +11 -0
- package/dist/components/bs-attachment.js +1 -0
- package/dist/components/bs-badge.js +1 -1
- package/dist/components/bs-button-skeleton.js +1 -1
- package/dist/components/bs-button.js +1 -1
- package/dist/components/bs-card.js +1 -1
- package/dist/components/bs-chatbot-feedback.d.ts +11 -0
- package/dist/components/bs-chatbot-feedback.js +1 -0
- 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.d.ts +11 -0
- package/dist/components/bs-chatbot-sources-drawer.js +1 -0
- package/dist/components/bs-chatbot-suggestion-button.js +1 -1
- package/dist/components/bs-composer-status-banner.d.ts +11 -0
- package/dist/components/bs-composer-status-banner.js +1 -0
- package/dist/components/bs-composer.js +1 -1
- package/dist/components/bs-data-table.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-source-link.d.ts +11 -0
- package/dist/components/bs-source-link.js +1 -0
- package/dist/components/bs-tooltip.js +1 -1
- package/dist/components/{p-CoC4LQCI.js → p-Cz2nfz2j.js} +1 -1
- package/dist/components/p-DndQiCMP.js +1 -0
- package/dist/components/p-_vXDfB3V.js +1 -0
- package/dist/esm/brandsync-wc.js +1 -1
- package/dist/esm/bs-ai-disclaimer.entry.js +15 -0
- package/dist/esm/bs-ai-greeting.entry.js +22 -0
- package/dist/esm/bs-ai-thinking.entry.js +1 -1
- package/dist/esm/bs-attachment-list.entry.js +45 -0
- package/dist/esm/bs-attachment.entry.js +44 -0
- package/dist/esm/bs-badge.entry.js +1 -1
- package/dist/esm/bs-button-skeleton.entry.js +1 -1
- package/dist/esm/bs-button.entry.js +1 -1
- package/dist/esm/bs-card.entry.js +1 -1
- package/dist/esm/bs-chatbot-feedback.entry.js +92 -0
- 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 +36 -0
- package/dist/esm/bs-chatbot-suggestion-button.entry.js +1 -1
- package/dist/esm/bs-composer-status-banner.entry.js +41 -0
- package/dist/esm/bs-composer.entry.js +17 -3
- package/dist/esm/bs-data-table.entry.js +2 -2
- package/dist/esm/bs-input.entry.js +271 -5
- package/dist/esm/{bs-menu-item.entry.js → bs-menu_2.entry.js} +15 -3
- package/dist/esm/bs-source-link.entry.js +37 -0
- package/dist/esm/bs-tooltip.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/bs-ai-chatbot/bs-ai-chatbot.stories.d.ts +18 -0
- package/dist/types/components/bs-ai-disclaimer/bs-ai-disclaimer.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-ai-disclaimer/bs-ai-disclaimer.d.ts +26 -0
- package/dist/types/components/bs-ai-disclaimer/bs-ai-disclaimer.stories.d.ts +8 -0
- package/dist/types/components/bs-ai-greeting/bs-ai-greeting.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-ai-greeting/bs-ai-greeting.d.ts +42 -0
- package/dist/types/components/bs-ai-greeting/bs-ai-greeting.stories.d.ts +10 -0
- package/dist/types/components/bs-attachment/bs-attachment.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-attachment/bs-attachment.d.ts +59 -0
- package/dist/types/components/bs-attachment/bs-attachment.stories.d.ts +17 -0
- package/dist/types/components/bs-attachment-list/bs-attachment-list.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-attachment-list/bs-attachment-list.d.ts +42 -0
- package/dist/types/components/bs-attachment-list/bs-attachment-list.stories.d.ts +10 -0
- package/dist/types/components/bs-chatbot-feedback/bs-chatbot-feedback.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-chatbot-feedback/bs-chatbot-feedback.d.ts +90 -0
- package/dist/types/components/bs-chatbot-feedback/bs-chatbot-feedback.stories.d.ts +16 -0
- package/dist/types/components/bs-chatbot-sources-drawer/bs-chatbot-sources-drawer.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-chatbot-sources-drawer/bs-chatbot-sources-drawer.d.ts +54 -0
- package/dist/types/components/bs-chatbot-sources-drawer/bs-chatbot-sources-drawer.stories.d.ts +10 -0
- package/dist/types/components/bs-composer/bs-composer.d.ts +14 -0
- package/dist/types/components/bs-composer/bs-composer.stories.d.ts +1 -0
- package/dist/types/components/bs-composer-status-banner/bs-composer-status-banner.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-composer-status-banner/bs-composer-status-banner.d.ts +88 -0
- package/dist/types/components/bs-composer-status-banner/bs-composer-status-banner.stories.d.ts +20 -0
- package/dist/types/components/bs-input/bs-input.d.ts +139 -6
- package/dist/types/components/bs-input/bs-input.stories.d.ts +19 -0
- package/dist/types/components/bs-source-link/bs-source-link.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-source-link/bs-source-link.d.ts +51 -0
- package/dist/types/components/bs-source-link/bs-source-link.stories.d.ts +13 -0
- package/dist/types/components.d.ts +1746 -19
- package/package.json +1 -1
- package/dist/brandsync-wc/p-6abdfaf0.entry.js +0 -1
- package/dist/brandsync-wc/p-6c1fa4da.entry.js +0 -1
- package/dist/brandsync-wc/p-a12d0a60.entry.js +0 -1
- package/dist/brandsync-wc/p-f5f443e2.entry.js +0 -1
- package/dist/cjs/bs-menu.cjs.entry.js +0 -17
- package/dist/esm/bs-menu.entry.js +0 -15
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t,p as e,H as o,c as s,h as n}from"./p-BpvhHQSw.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:"d372000276bedcf0bd64015d955a4ed4ff1c83cc",class:"bs-chatbot-response-action"},n("button",{key:"6fff591650e4f6114a653ff37bfebe100d4874b7",type:"button",part:"like",class:"bs-chatbot-response-action__button","aria-label":"Like",onClick:this.onLikeClick},n("slot",{key:"e92d29243291141fd63120b4bc6a5024f1908066",name:"like-icon"},n(a,{key:"d1a7e8d922f5e712e48e19c6176fdb60ac511240"}))),n("button",{key:"7115ff6c49c5388440f0fe8a352ddd4459a5f8ed",type:"button",part:"dislike",class:"bs-chatbot-response-action__button","aria-label":"Dislike",onClick:this.onDislikeClick},n("slot",{key:"d3642d52b90cbd3f6c60d8b8ead3d14fab29f531",name:"dislike-icon"},n(i,{key:"8cff196faabd164cf023bfa8bac02f3455885261"}))),n("button",{key:"d32e2ebce71ab91327d7ad7406ae581b2ff98443",type:"button",part:"copy",class:"bs-chatbot-response-action__button","aria-label":"Copy",onClick:this.onCopyClick},n("slot",{key:"1c0459f9fb78202d41e5bf7b3bf5a11ac9c00ecd",name:"copy-icon"},n(c,{key:"b3d8e9f3cb2125c26967156f046ce3caf44ab8b1"}))),n("button",{key:"c14f8a2580018edac6b16c82be5b339c7a4033af",type:"button",part:"regenerate",class:"bs-chatbot-response-action__button","aria-label":"Regenerate",onClick:this.onRegenerateClick},n("slot",{key:"cf67332b681da43a7a305909e14a16bf6a3ca962",name:"regenerate-icon"},n(b,{key:"76b5b9c39624007532b2c2b7f20554f12cd8eee4"}))),n("div",{key:"b62694c42bf23484362e188b6b74559810fce693",class:"bs-chatbot-response-action__menu-wrapper"},n("button",{key:"36715b97f529bfc9c064020d434d0210a3674e52",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:"f11d837af777a04cc9031921f92b57e139758f2c",name:"menu-icon"},n(d,{key:"3c0c0a70edcf1e8c817a121fce315b8a747ee8e4"}))),this.menuOpen&&n("div",{key:"5a4848466caecf26ce3797b14609932e76ca653d",class:"bs-chatbot-response-action__menu-popup"},n("slot",{key:"f79ac9bcde08eadd0a904223f6f13c9850066827",name:"menu"}))),t&&n("button",{key:"ef9663bbbb7f74482743177bdfa8053575c3330e",type:"button",part:"sources",class:"bs-chatbot-response-action__sources",onClick:this.onSourcesClick},n("slot",{key:"f848fd2b5e545d186a7f337c2d0fe0f300c567f7",name:"sources-icon"},n(p,{key:"7a8be099bcf97209b30c1b941b1f13691d9c07d3"})),n("span",{key:"e91be28b3d36b1cc3a91c17218ca5ea77938f887",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 h=r,u=l;export{h as BsChatbotResponseAction,u as defineCustomElement}
|
|
1
|
+
import{t as e,p as t,H as o,c as s,h as n}from"./p-BpvhHQSw.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:"bae036e0fce39e91ad77e048e6c169ea72ce78e4",class:"bs-chatbot-response-action"},n("button",{key:"aadfb92da35ba7b5b105cfdc3ad506c7a7fd78e7",type:"button",part:"like",class:"bs-chatbot-response-action__button","aria-label":"Like",onClick:this.onLikeClick},n("slot",{key:"f61c62fa761d277b3ef1b6c7a1bf4b8077ac340b",name:"like-icon"},n(a,{key:"a95b09db3fee703c4d2e31a5efa590feb777f3b5"}))),n("button",{key:"37bdacfab99f444ae215b0da5a7b11912562baf7",type:"button",part:"dislike",class:"bs-chatbot-response-action__button","aria-label":"Dislike",onClick:this.onDislikeClick},n("slot",{key:"b948f912ce5cd82c570bfcf7fe69f01f4bf993b0",name:"dislike-icon"},n(i,{key:"59e901ec41273c235fb0e484e53d23e529a1f429"}))),n("button",{key:"5f0f954f0cadcfda62d0493ebbf07651dc9c43c3",type:"button",part:"copy",class:"bs-chatbot-response-action__button","aria-label":"Copy",onClick:this.onCopyClick},n("slot",{key:"a965380a2c3af43ba49b735c19c7b4afb5ec9c9f",name:"copy-icon"},n(c,{key:"c9e7d8ef53a14728bced9c753aba3529ac97152f"}))),n("button",{key:"e06f0c60698dea9a17005d6b233e59e5389c2c11",type:"button",part:"regenerate",class:"bs-chatbot-response-action__button","aria-label":"Regenerate",onClick:this.onRegenerateClick},n("slot",{key:"9a5aad36b3f1e217b2ab1718c25d451bc4f0b326",name:"regenerate-icon"},n(b,{key:"02aa85caf9c69a84fab24fd97361fa0a2a42c784"}))),n("div",{key:"6c48442ee1c32fcdecab2521c7e7773aae413c61",class:"bs-chatbot-response-action__menu-wrapper"},n("button",{key:"749474386109e0c6bf3d0c18396ab75514a84db5",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:"a48edebb1eb697e7ebb80ceee8b674ad28ae760b",name:"menu-icon"},n(d,{key:"3bc463d9d8882ae373221b754d234938bd47f7de"}))),this.menuOpen&&n("div",{key:"b1217dd05886155d65b6c6e52933b23ddfbeda4e",class:"bs-chatbot-response-action__menu-popup"},n("slot",{key:"5a22ff4ffe417bbd25dfddbf18a943862b499f24",name:"menu"}))),e&&n("button",{key:"35d6be1ee305a8549ebc1bed28884c0c5dc83220",type:"button",part:"sources",class:"bs-chatbot-response-action__sources",onClick:this.onSourcesClick},n("slot",{key:"af5a033146160fc90eb9ad3d28eb0ecc3628347c",name:"sources-icon"},n(p,{key:"908029587106b710ddcee80fe207dddc8f77723c"})),n("span",{key:"aa64462f7f5f4d96adfdf7172a5c2ac18cb1e608",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 h=r,u=l;export{h as BsChatbotResponseAction,u as defineCustomElement}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface BsChatbotSourcesDrawer extends Components.BsChatbotSourcesDrawer, HTMLElement {}
|
|
4
|
+
export const BsChatbotSourcesDrawer: {
|
|
5
|
+
prototype: BsChatbotSourcesDrawer;
|
|
6
|
+
new (): BsChatbotSourcesDrawer;
|
|
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 s,p as e,H as r,c as a,h as o}from"./p-BpvhHQSw.js";const t=e(class extends r{constructor(s){super(),!1!==s&&this.__registerHost(),this.__attachShadow(),this.bsCollapse=a(this,"bsCollapse")}get el(){return this}heading="Sources";count;bsCollapse;slottedCount=0;onSlotchange=s=>{this.slottedCount=s.target.assignedElements().filter((s=>"bs-source-link"===s.tagName.toLowerCase())).length};onCollapseClick=()=>{this.bsCollapse.emit()};render(){const s=this.count??this.slottedCount;return o("div",{key:"54cb56455b630d5ed30dd2a925728f2803143b17",class:"bs-chatbot-sources-drawer",role:"region","aria-label":this.heading},o("div",{key:"d24eabd0ac2c36ec4033a9b5c361aa32225fa78a",class:"bs-chatbot-sources-drawer__header"},o("div",{key:"0bec3fb848552496e1884b4731c5e1964570c70d",class:"bs-chatbot-sources-drawer__title-group"},o("h2",{key:"955389bd4f3ba1950c9af404e5880a6837298384",part:"heading",class:"bs-chatbot-sources-drawer__heading"},this.heading),s>0&&o("span",{key:"40d83288bbd257504ef814247c7bd4664df9e169",part:"count",class:"bs-chatbot-sources-drawer__count"},s)),o("button",{key:"56a15c64faea80790387d4918843c806b684268b",type:"button",part:"collapse",class:"bs-chatbot-sources-drawer__collapse","aria-label":"Collapse sources",onClick:this.onCollapseClick},o("slot",{key:"c321f53482f0265357a6a29fc40e0ff3766f0b74",name:"collapse-icon"},o(c,{key:"c3d4c17bebd2611b27c3e7f87d359e4b46c41d4f"})))),o("div",{key:"d6c4b8e3660f765112f0c33dd72021af118332d9",part:"list",class:"bs-chatbot-sources-drawer__list"},o("slot",{key:"19759a01d921ed2517cbca2b01ea53741a207b8b",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((e=>{"bs-chatbot-sources-drawer"===e&&(customElements.get(s(e))||customElements.define(s(e),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-BpvhHQSw.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-BpvhHQSw.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:"2a5213dc81a29dd68f99717b93e6f5396db5c5da",type:"button",part:"button",class:"bs-chatbot-suggestion-button",disabled:this.disabled,onClick:this.onClick},e("slot",{key:"28b5ac8ddcdab80fb377a897dc1af62257473385"}))}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 r(){"undefined"!=typeof customElements&&["bs-chatbot-suggestion-button"].forEach((o=>{"bs-chatbot-suggestion-button"===o&&(customElements.get(t(o))||customElements.define(t(o),n))}))}r();const a=n,i=r;export{a as BsChatbotSuggestionButton,i as defineCustomElement}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface BsComposerStatusBanner extends Components.BsComposerStatusBanner, HTMLElement {}
|
|
4
|
+
export const BsComposerStatusBanner: {
|
|
5
|
+
prototype: BsComposerStatusBanner;
|
|
6
|
+
new (): BsComposerStatusBanner;
|
|
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 s,p as r,H as o,c as e,h as a}from"./p-BpvhHQSw.js";const n=r(class extends o{constructor(s){super(),!1!==s&&this.__registerHost(),this.__attachShadow(),this.bsAction=e(this,"bsAction"),this.bsClose=e(this,"bsClose")}type="error";message="This is a message";showIcon=!0;showButton=!1;actionLabel="Continue";allowClose=!0;bsAction;bsClose;onActionClick=()=>{this.bsAction.emit()};onCloseClick=()=>{this.bsClose.emit()};render(){return a("div",{key:"b51067b9af0210682fc60b5340560bf6ee42d655",class:"bs-composer-status-banner bs-composer-status-banner--"+this.type},a("div",{key:"a6774d57e22e1b39fe0c9add8d96ed1c349bfeae",class:"bs-composer-status-banner__message-group"},this.showIcon&&a("span",{key:"6a2b131a63a2d2cbe33f62519d1602752bc98204",part:"icon",class:"bs-composer-status-banner__icon"},a("slot",{key:"6123c6a61652dfb504cf2e140a012fcba27e7468",name:"icon"},a(t,{key:"5415d7c71e2976a552955606e7288a4b806f1dbe"}))),a("p",{key:"1580b9f2b53390c32e38763c0cef23cb5d7ffa4c",part:"message",class:"bs-composer-status-banner__message"},this.message)),this.showButton&&a("button",{key:"bb08fce8f48253787015308bfc66e04835069670",type:"button",part:"action",class:"bs-composer-status-banner__action",onClick:this.onActionClick},this.actionLabel),this.allowClose&&a("button",{key:"b9d64c66155cb8c5b884b48a442c9e0d09be9111",type:"button",part:"close",class:"bs-composer-status-banner__close","aria-label":"Dismiss",onClick:this.onCloseClick},a(b,{key:"2779b3af1d5348ee510cd1fe4978cbfbbfb33c5e"})))}static get style(){return":host{display:block;--bs-composer-status-banner-radius:var(--bs-border-radius-150);--bs-composer-status-banner-padding-x:var(--bs-spacing-150);--bs-composer-status-banner-padding-top:var(--bs-spacing-100);--bs-composer-status-banner-padding-bottom:var(--bs-spacing-200);--bs-composer-status-banner-gap:var(--bs-spacing-100);--bs-composer-status-banner-icon-gap:var(--bs-spacing-75);--bs-composer-status-banner-error-bg:var(--bs-color-error-container);--bs-composer-status-banner-error-text:var(--bs-text-error);--bs-composer-status-banner-error-action-bg:var(--bs-color-error-default);--bs-composer-status-banner-error-action-bg-hover:var(--bs-color-error-hover);--bs-composer-status-banner-info-bg:var(--bs-color-info-container);--bs-composer-status-banner-info-text:var(--bs-text-info);--bs-composer-status-banner-info-action-bg:var(--bs-color-info-default);--bs-composer-status-banner-info-action-bg-hover:var(--bs-color-info-hover);--bs-composer-status-banner-neutral-bg:var(--bs-color-neutral-container);--bs-composer-status-banner-neutral-text:var(--bs-text-default);--bs-composer-status-banner-neutral-action-bg:var(--bs-color-neutral-container);--bs-composer-status-banner-neutral-action-bg-hover:var(--bs-color-neutral-container-hover);--bs-composer-status-banner-neutral-action-border:var(--bs-border-neutral-container);--bs-composer-status-banner-warning-bg:var(--bs-color-warning-container);--bs-composer-status-banner-warning-text:var(--bs-text-warning);--bs-composer-status-banner-warning-action-bg:var(--bs-color-warning-default);--bs-composer-status-banner-warning-action-bg-hover:var(--bs-color-warning-hover);--bs-composer-status-banner-close-hover-bg:var(--bs-color-neutral-container-hover)}.bs-composer-status-banner{box-sizing:border-box;display:flex;align-items:center;gap:var(--bs-composer-status-banner-gap);padding:var(--bs-composer-status-banner-padding-top) var(--bs-composer-status-banner-padding-x) var(--bs-composer-status-banner-padding-bottom);border-radius:var(--bs-composer-status-banner-radius) var(--bs-composer-status-banner-radius) 0 0;font-family:inherit}.bs-composer-status-banner--error{background:var(--bs-composer-status-banner-error-bg);color:var(--bs-composer-status-banner-error-text)}.bs-composer-status-banner--info{background:var(--bs-composer-status-banner-info-bg);color:var(--bs-composer-status-banner-info-text)}.bs-composer-status-banner--neutral{background:var(--bs-composer-status-banner-neutral-bg);color:var(--bs-composer-status-banner-neutral-text)}.bs-composer-status-banner--warning{background:var(--bs-composer-status-banner-warning-bg);color:var(--bs-composer-status-banner-warning-text)}.bs-composer-status-banner__message-group{box-sizing:border-box;display:flex;align-items:center;flex:1 0 0;min-width:0;gap:var(--bs-composer-status-banner-icon-gap)}.bs-composer-status-banner__icon{display:inline-flex;flex-shrink:0;width:20px;height:20px}.bs-composer-status-banner__icon ::slotted(*){display:block;width:100%;height:100%}.bs-composer-status-banner__message{margin:0;flex:1 0 0;min-width:0;font-size:var(--bs-font-size-md);line-height:calc(var(--bs-line-height-body-md) * 1px);word-break:break-word}.bs-composer-status-banner__action{box-sizing:border-box;flex-shrink:0;height:32px;padding:0 var(--bs-spacing-150);border:none;border-radius:var(--bs-border-radius-100);color:var(--bs-text-on-action);font-family:inherit;font-size:var(--bs-font-size-sm);font-weight:var(--bs-font-weight-medium);line-height:calc(var(--bs-line-height-body-sm) * 1px);cursor:pointer;transition:background-color var(--bs-duration-fast) var(--bs-easing-standard)}.bs-composer-status-banner--error .bs-composer-status-banner__action{background:var(--bs-composer-status-banner-error-action-bg)}.bs-composer-status-banner--error .bs-composer-status-banner__action:hover{background:var(--bs-composer-status-banner-error-action-bg-hover)}.bs-composer-status-banner--info .bs-composer-status-banner__action{background:var(--bs-composer-status-banner-info-action-bg)}.bs-composer-status-banner--info .bs-composer-status-banner__action:hover{background:var(--bs-composer-status-banner-info-action-bg-hover)}.bs-composer-status-banner--warning .bs-composer-status-banner__action{background:var(--bs-composer-status-banner-warning-action-bg)}.bs-composer-status-banner--warning .bs-composer-status-banner__action:hover{background:var(--bs-composer-status-banner-warning-action-bg-hover)}.bs-composer-status-banner--neutral .bs-composer-status-banner__action{background:var(--bs-composer-status-banner-neutral-action-bg);border:var(--bs-border-width-thin) solid var(--bs-composer-status-banner-neutral-action-border);color:var(--bs-text-default)}.bs-composer-status-banner--neutral .bs-composer-status-banner__action:hover{background:var(--bs-composer-status-banner-neutral-action-bg-hover)}.bs-composer-status-banner__close{box-sizing:border-box;display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;width:32px;height:32px;padding:0;background:transparent;border:none;border-radius:var(--bs-border-radius-100);color:inherit;cursor:pointer;transition:background-color var(--bs-duration-fast) var(--bs-easing-standard)}.bs-composer-status-banner__close:hover{background:var(--bs-composer-status-banner-close-hover-bg)}.bs-composer-status-banner__close svg{width:20px;height:20px}.bs-composer-status-banner__close:focus-visible,.bs-composer-status-banner__action:focus-visible{outline:2px solid var(--bs-border-neutral-focus);outline-offset:1px}"}},[769,"bs-composer-status-banner",{type:[1],message:[1],showIcon:[4,"show-icon"],showButton:[4,"show-button"],actionLabel:[1,"action-label"],allowClose:[4,"allow-close"]}]),t=()=>a("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},a("circle",{cx:"10",cy:"10",r:"7.25",stroke:"currentColor","stroke-width":"1.3"}),a("path",{d:"M10 5.83V10L12.5 11.67",stroke:"currentColor","stroke-width":"1.3","stroke-linecap":"round","stroke-linejoin":"round"})),b=()=>a("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},a("path",{d:"M15 5L5 15",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),a("path",{d:"M15 15L5 5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}));function c(){"undefined"!=typeof customElements&&["bs-composer-status-banner"].forEach((r=>{"bs-composer-status-banner"===r&&(customElements.get(s(r))||customElements.define(s(r),n))}))}c();const i=n,u=c;export{i as BsComposerStatusBanner,u as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as o,p as s,H as e,c as r,h as t}from"./p-BpvhHQSw.js";const i={ai:"Ask Genie something...",human:"Message your support agent..."},a=[6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,18,14,34,22,22,10,28,18,12,24,6,20,30,14,8,26,16,32,10,22,18,12,28,8,20,14,24,10,16,30,12,22,6,18,26,8,14,32,20,10,24,6],c=s(class extends e{constructor(o){super(),!1!==o&&this.__registerHost(),this.__attachShadow(),this.bsInput=r(this,"bsInput"),this.bsSubmit=r(this,"bsSubmit"),this.bsStop=r(this,"bsStop"),this.bsVoiceConfirm=r(this,"bsVoiceConfirm"),this.bsAttach=r(this,"bsAttach"),this.bsMicToggle=r(this,"bsMicToggle")}variant="ai";placeholder;value="";state="idle";ariaLabel=null;bsInput;bsSubmit;bsStop;bsVoiceConfirm;bsAttach;bsMicToggle;onInput=o=>{this.bsInput.emit(o.target.value)};onAttachClick=()=>{this.bsAttach.emit()};onMicClick=()=>{this.bsMicToggle.emit()};onActionClick=()=>{"idle"===this.state?this.bsSubmit.emit():"generating"===this.state?this.bsStop.emit():"recording"===this.state&&this.bsVoiceConfirm.emit()};actionLabel(){return"generating"===this.state?"Stop":"recording"===this.state?"Confirm":"Send"}renderActionIcon(){return t("generating"===this.state?l:"recording"===this.state?p:d,null)}render(){const o="disabled"===this.state,s="recording"===this.state;return t("div",{key:"04c250520759948faa89bd625646a62c79cc6cee",class:`bs-composer bs-composer--${this.state} bs-composer--${this.variant}`},t("div",{key:"8d5d99b90141d3dbeff1b31851cbbb5eaae3d920",class:"bs-composer__text-row"},t("input",{key:"4eb1ef1b51a41de86da466c8a2c9ea93a7746b43",part:"input",class:"bs-composer__input",type:"text",value:this.value,placeholder:this.placeholder??i[this.variant],disabled:o,"aria-label":this.ariaLabel,onInput:this.onInput})),t("div",{key:"8a733762c56ae3f4de7f2af1d89fb05d521b1d17",class:"bs-composer__controls-row"},t("button",{key:"b4cd13546ec447f2650a02f43dc2fc0b6d65c8ef",type:"button",part:"attach",class:"bs-composer__attach","aria-label":"Attach",onClick:this.onAttachClick},t(n,{key:"af8da06a2550d5c37d3737b145ad70c006e1ce66"})),s?t("span",{class:"bs-composer__waveform","aria-hidden":"true"},a.map((o=>t("span",{class:"bs-composer__waveform-bar",style:{"--bs-composer-bar-height":o+"px"}})))):t("span",{class:"bs-composer__spacer"}),t("button",{key:"18b81bf7dd6057c3954566cd12994bb8589ff4ee",type:"button",part:"mic",class:"bs-composer__mic "+(s?"bs-composer__mic--recording":""),"aria-label":s?"Stop recording":"Start voice input",disabled:o,onClick:this.onMicClick},t(s?l:b,null)),t("button",{key:"a1cf9435fa7dc8e52db7ae148e07fde06971f27c",type:"button",part:"action",class:"bs-composer__action bs-composer__action--"+this.state,"aria-label":this.actionLabel(),disabled:o,onClick:this.onActionClick},this.renderActionIcon()),t("slot",{key:"6779413b48314161a75ec75be273e72fe4d622c3",name:"actions-end"})))}static get delegatesFocus(){return!0}static get style(){return":host{display:block;--bs-composer-radius:var(--bs-border-radius-150);--bs-composer-button-radius:var(--bs-border-radius-100);--bs-composer-button-size:var(--bs-spacing-600);--bs-composer-bg:var(--bs-input-bg-default);--bs-composer-border:var(--bs-input-border-default);--bs-composer-border-focus:var(--bs-input-border-focus);--bs-composer-action-bg:var(--bs-color-primary-default);--bs-composer-action-bg-hover:var(--bs-color-primary-hover);--bs-composer-action-bg-pressed:var(--bs-color-primary-pressed);--bs-composer-action-bg-disabled:var(--bs-surface-action-disabled);--bs-composer-action-icon:var(--bs-text-on-action);--bs-composer-action-icon-disabled:var(--bs-text-on-disabled);--bs-composer-attach-icon:var(--bs-icon-default);--bs-composer-mic-icon:var(--bs-icon-default);--bs-composer-mic-icon-disabled:var(--bs-icon-disabled);--bs-composer-mic-recording-icon:var(--bs-icon-default);--bs-composer-subtle-hover:var(--bs-color-neutral-container);--bs-composer-subtle-pressed:var(--bs-color-neutral-container-pressed);--bs-composer-waveform-color:var(--bs-border-default)}.bs-composer{box-sizing:border-box;display:flex;flex-direction:column;border:1px solid var(--bs-composer-border);border-radius:var(--bs-composer-radius);background:var(--bs-composer-bg);font-family:inherit}.bs-composer--human{border-style:dashed}.bs-composer:focus-within{border-color:var(--bs-composer-border-focus)}.bs-composer__text-row{display:flex;align-items:center;gap:var(--bs-spacing-150);padding:var(--bs-spacing-150)}.bs-composer__input{flex:1;min-width:0;border:none;outline:none;background:transparent;color:var(--bs-input-text);font-family:inherit;font-size:var(--bs-font-size-md)}.bs-composer__input::placeholder{color:var(--bs-input-placeholder)}.bs-composer__input:disabled{color:var(--bs-input-text-disabled);cursor:not-allowed}.bs-composer__waveform{display:inline-flex;flex:1;min-width:0;align-items:center;justify-content:center;gap:3px;overflow:hidden}.bs-composer__waveform-bar{display:inline-block;flex-shrink:0;width:2.5px;border-radius:1.5px;background:var(--bs-composer-waveform-color);height:var(--bs-composer-bar-height, 6px)}.bs-composer__controls-row{display:flex;align-items:center;gap:var(--bs-spacing-200);padding:var(--bs-spacing-150)}.bs-composer__spacer{flex:1}.bs-composer__attach,.bs-composer__mic,.bs-composer__action{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;border:none;padding:0;cursor:pointer;font-family:inherit;border-radius:var(--bs-composer-button-radius);width:var(--bs-composer-button-size);height:var(--bs-composer-button-size);flex-shrink:0;transition:background-color var(--bs-duration-fast) var(--bs-easing-standard)}.bs-composer__attach:focus-visible,.bs-composer__mic:focus-visible,.bs-composer__action:focus-visible{outline:2px solid var(--bs-border-neutral-focus);outline-offset:2px}.bs-composer__attach svg,.bs-composer__mic svg,.bs-composer__action svg{width:24px;height:24px}.bs-composer__attach,.bs-composer__mic{background:transparent}.bs-composer__attach:hover:not(:disabled),.bs-composer__mic:hover:not(:disabled){background:var(--bs-composer-subtle-hover)}.bs-composer__attach:active:not(:disabled),.bs-composer__mic:active:not(:disabled){background:var(--bs-composer-subtle-pressed)}.bs-composer__attach{color:var(--bs-composer-attach-icon)}.bs-composer__mic{color:var(--bs-composer-mic-icon)}.bs-composer__mic--recording{color:var(--bs-composer-mic-recording-icon)}.bs-composer__mic:disabled{color:var(--bs-composer-mic-icon-disabled);cursor:not-allowed}.bs-composer__action{background:var(--bs-composer-action-bg);color:var(--bs-composer-action-icon)}.bs-composer__action:hover:not(:disabled){background:var(--bs-composer-action-bg-hover)}.bs-composer__action:active:not(:disabled){background:var(--bs-composer-action-bg-pressed)}.bs-composer__action:disabled{background:var(--bs-composer-action-bg-disabled);color:var(--bs-composer-action-icon-disabled);cursor:not-allowed}"}},[785,"bs-composer",{variant:[1],placeholder:[1],value:[1],state:[1],ariaLabel:[1,"aria-label"]}]),n=()=>t("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},t("path",{d:"M8 2.5V13.5M2.5 8H13.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})),b=()=>t("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},t("path",{d:"M8 9.5C9.10457 9.5 10 8.60457 10 7.5V3.5C10 2.39543 9.10457 1.5 8 1.5C6.89543 1.5 6 2.39543 6 3.5V7.5C6 8.60457 6.89543 9.5 8 9.5Z",stroke:"currentColor","stroke-width":"1.4"}),t("path",{d:"M3.5 7V7.5C3.5 9.98528 5.51472 12 8 12C10.4853 12 12.5 9.98528 12.5 7.5V7",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round"}),t("path",{d:"M8 12V14.5",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round"})),d=()=>t("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},t("path",{d:"M13.5 12H7.5",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),t("path",{d:"M4.54594 20.745C4.4932 20.889 4.48589 21.0457 4.52499 21.1941C4.56409 21.3424 4.64771 21.4751 4.76459 21.5744C4.88147 21.6737 5.02599 21.7348 5.17866 21.7494C5.33133 21.7641 5.48482 21.7315 5.61844 21.6562L21.3684 12.6478C21.4857 12.583 21.5834 12.4879 21.6514 12.3725C21.7195 12.2571 21.7553 12.1255 21.7553 11.9916C21.7553 11.8576 21.7195 11.7261 21.6514 11.6107C21.5834 11.4952 21.4857 11.4002 21.3684 11.3353L5.61844 2.34937C5.48523 2.27487 5.33245 2.24278 5.18052 2.2574C5.02859 2.27201 4.88474 2.33264 4.76817 2.43117C4.65161 2.5297 4.56788 2.66145 4.52817 2.80882C4.48846 2.9562 4.49466 3.11218 4.54594 3.25594L7.5 12L4.54594 20.745Z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})),l=()=>t("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},t("rect",{x:"6",y:"6",width:"8",height:"8",rx:"1.5",fill:"currentColor"})),p=()=>t("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},t("path",{d:"M4.5 10.5L8 14L15.5 6",stroke:"currentColor","stroke-width":"1.75","stroke-linecap":"round","stroke-linejoin":"round"}));function m(){"undefined"!=typeof customElements&&["bs-composer"].forEach((s=>{"bs-composer"===s&&(customElements.get(o(s))||customElements.define(o(s),c))}))}m();const u=c,h=m;export{u as BsComposer,h as defineCustomElement}
|
|
1
|
+
import{t as o,p as s,H as e,c as r,h as t}from"./p-BpvhHQSw.js";const a={ai:"Ask Genie something...",human:"Message your support agent..."},c=[6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,18,14,34,22,22,10,28,18,12,24,6,20,30,14,8,26,16,32,10,22,18,12,28,8,20,14,24,10,16,30,12,22,6,18,26,8,14,32,20,10,24,6],i=s(class extends e{constructor(o){super(),!1!==o&&this.__registerHost(),this.__attachShadow(),this.bsInput=r(this,"bsInput"),this.bsSubmit=r(this,"bsSubmit"),this.bsStop=r(this,"bsStop"),this.bsVoiceConfirm=r(this,"bsVoiceConfirm"),this.bsAttach=r(this,"bsAttach"),this.bsMicToggle=r(this,"bsMicToggle")}get el(){return this}variant="ai";placeholder;value="";state="idle";ariaLabel=null;hasAttachments=!1;bsInput;bsSubmit;bsStop;bsVoiceConfirm;bsAttach;bsMicToggle;componentWillLoad(){this.hasAttachments=Array.from(this.el.childNodes).some((o=>o.nodeType===Node.ELEMENT_NODE&&"attachments"===o.getAttribute("slot")))}onAttachmentsSlotchange=o=>{this.hasAttachments=o.target.assignedNodes().length>0};onInput=o=>{this.bsInput.emit(o.target.value)};onAttachClick=()=>{this.bsAttach.emit()};onMicClick=()=>{this.bsMicToggle.emit()};onActionClick=()=>{"idle"===this.state?this.bsSubmit.emit():"generating"===this.state?this.bsStop.emit():"recording"===this.state&&this.bsVoiceConfirm.emit()};actionLabel(){return"generating"===this.state?"Stop":"recording"===this.state?"Confirm":"Send"}renderActionIcon(){return t("generating"===this.state?l:"recording"===this.state?p:d,null)}render(){const o=this.placeholder??a[this.variant],s="disabled"===this.state,e="recording"===this.state;return t("div",{key:"5b367f64f2cfe04d7815b52d6abc3baebf46453e",class:`bs-composer bs-composer--${this.state} bs-composer--${this.variant}`},t("div",{key:"f1e7dbeb16e8f2cd0b4e2345f6c5fc03bcc5177c",part:"attachments",class:"bs-composer__attachments-row "+(this.hasAttachments?"bs-composer__attachments-row--visible":"")},t("slot",{key:"6e59f2f3857c81a132c5873d9a32dbed27eb2c02",name:"attachments",onSlotchange:this.onAttachmentsSlotchange})),t("div",{key:"79a0a03a7f66b654f5ab8379447cf00459c7a6c3",class:"bs-composer__text-row"},t("input",{key:"b9560af8433d186fdadd5b05368290d077c5e8ce",part:"input",class:"bs-composer__input",type:"text",value:this.value,placeholder:o,disabled:s,"aria-label":this.ariaLabel,onInput:this.onInput})),t("div",{key:"5b9a8edd0412e1a86efd33afae37fb73559a89f6",class:"bs-composer__controls-row"},t("button",{key:"5c405e009e9f61902ca6623e09efa238e71737a3",type:"button",part:"attach",class:"bs-composer__attach","aria-label":"Attach",onClick:this.onAttachClick},t(n,{key:"5832b29579d3c8c855237f286366944aeb6553f6"})),e?t("span",{class:"bs-composer__waveform","aria-hidden":"true"},c.map((o=>t("span",{class:"bs-composer__waveform-bar",style:{"--bs-composer-bar-height":o+"px"}})))):t("span",{class:"bs-composer__spacer"}),t("button",{key:"b4006fe5d452d02d0093d1dba0b65e6f33e5a65b",type:"button",part:"mic",class:"bs-composer__mic "+(e?"bs-composer__mic--recording":""),"aria-label":e?"Stop recording":"Start voice input",disabled:s,onClick:this.onMicClick},t(e?l:b,null)),t("button",{key:"b647f1dd0c40dc795b96da5cad695300b0c9dfd3",type:"button",part:"action",class:"bs-composer__action bs-composer__action--"+this.state,"aria-label":this.actionLabel(),disabled:s,onClick:this.onActionClick},this.renderActionIcon()),t("slot",{key:"2c78b5641091024925e84ca1a779ac1fc37fc0ae",name:"actions-end"})))}static get delegatesFocus(){return!0}static get style(){return":host{display:block;--bs-composer-radius:var(--bs-border-radius-150);--bs-composer-button-radius:var(--bs-border-radius-100);--bs-composer-button-size:var(--bs-spacing-600);--bs-composer-bg:var(--bs-input-bg-default);--bs-composer-border:var(--bs-input-border-default);--bs-composer-border-focus:var(--bs-input-border-focus);--bs-composer-action-bg:var(--bs-color-primary-default);--bs-composer-action-bg-hover:var(--bs-color-primary-hover);--bs-composer-action-bg-pressed:var(--bs-color-primary-pressed);--bs-composer-action-bg-disabled:var(--bs-surface-action-disabled);--bs-composer-action-icon:var(--bs-text-on-action);--bs-composer-action-icon-disabled:var(--bs-text-on-disabled);--bs-composer-attach-icon:var(--bs-icon-default);--bs-composer-mic-icon:var(--bs-icon-default);--bs-composer-mic-icon-disabled:var(--bs-icon-disabled);--bs-composer-mic-recording-icon:var(--bs-icon-default);--bs-composer-subtle-hover:var(--bs-color-neutral-container);--bs-composer-subtle-pressed:var(--bs-color-neutral-container-pressed);--bs-composer-waveform-color:var(--bs-border-default)}.bs-composer{box-sizing:border-box;display:flex;flex-direction:column;border:1px solid var(--bs-composer-border);border-radius:var(--bs-composer-radius);background:var(--bs-composer-bg);font-family:inherit}.bs-composer--human{border-style:dashed}.bs-composer:focus-within{border-color:var(--bs-composer-border-focus)}.bs-composer__attachments-row{display:none}.bs-composer__attachments-row--visible{display:block}.bs-composer__text-row{display:flex;align-items:center;gap:var(--bs-spacing-150);padding:var(--bs-spacing-150)}.bs-composer__input{flex:1;min-width:0;border:none;outline:none;background:transparent;color:var(--bs-input-text);font-family:inherit;font-size:var(--bs-font-size-md)}.bs-composer__input::placeholder{color:var(--bs-input-placeholder)}.bs-composer__input:disabled{color:var(--bs-input-text-disabled);cursor:not-allowed}.bs-composer__waveform{display:inline-flex;flex:1;min-width:0;align-items:center;justify-content:center;gap:3px;overflow:hidden}.bs-composer__waveform-bar{display:inline-block;flex-shrink:0;width:2.5px;border-radius:1.5px;background:var(--bs-composer-waveform-color);height:var(--bs-composer-bar-height, 6px)}.bs-composer__controls-row{display:flex;align-items:center;gap:var(--bs-spacing-200);padding:var(--bs-spacing-150)}.bs-composer__spacer{flex:1}.bs-composer__attach,.bs-composer__mic,.bs-composer__action{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;border:none;padding:0;cursor:pointer;font-family:inherit;border-radius:var(--bs-composer-button-radius);width:var(--bs-composer-button-size);height:var(--bs-composer-button-size);flex-shrink:0;transition:background-color var(--bs-duration-fast) var(--bs-easing-standard)}.bs-composer__attach:focus-visible,.bs-composer__mic:focus-visible,.bs-composer__action:focus-visible{outline:2px solid var(--bs-border-neutral-focus);outline-offset:2px}.bs-composer__attach svg,.bs-composer__mic svg,.bs-composer__action svg{width:24px;height:24px}.bs-composer__attach,.bs-composer__mic{background:transparent}.bs-composer__attach:hover:not(:disabled),.bs-composer__mic:hover:not(:disabled){background:var(--bs-composer-subtle-hover)}.bs-composer__attach:active:not(:disabled),.bs-composer__mic:active:not(:disabled){background:var(--bs-composer-subtle-pressed)}.bs-composer__attach{color:var(--bs-composer-attach-icon)}.bs-composer__mic{color:var(--bs-composer-mic-icon)}.bs-composer__mic--recording{color:var(--bs-composer-mic-recording-icon)}.bs-composer__mic:disabled{color:var(--bs-composer-mic-icon-disabled);cursor:not-allowed}.bs-composer__action{background:var(--bs-composer-action-bg);color:var(--bs-composer-action-icon)}.bs-composer__action:hover:not(:disabled){background:var(--bs-composer-action-bg-hover)}.bs-composer__action:active:not(:disabled){background:var(--bs-composer-action-bg-pressed)}.bs-composer__action:disabled{background:var(--bs-composer-action-bg-disabled);color:var(--bs-composer-action-icon-disabled);cursor:not-allowed}"}},[785,"bs-composer",{variant:[1],placeholder:[1],value:[1],state:[1],ariaLabel:[1,"aria-label"],hasAttachments:[32]}]),n=()=>t("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},t("path",{d:"M8 2.5V13.5M2.5 8H13.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})),b=()=>t("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},t("path",{d:"M8 9.5C9.10457 9.5 10 8.60457 10 7.5V3.5C10 2.39543 9.10457 1.5 8 1.5C6.89543 1.5 6 2.39543 6 3.5V7.5C6 8.60457 6.89543 9.5 8 9.5Z",stroke:"currentColor","stroke-width":"1.4"}),t("path",{d:"M3.5 7V7.5C3.5 9.98528 5.51472 12 8 12C10.4853 12 12.5 9.98528 12.5 7.5V7",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round"}),t("path",{d:"M8 12V14.5",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round"})),d=()=>t("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},t("path",{d:"M13.5 12H7.5",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),t("path",{d:"M4.54594 20.745C4.4932 20.889 4.48589 21.0457 4.52499 21.1941C4.56409 21.3424 4.64771 21.4751 4.76459 21.5744C4.88147 21.6737 5.02599 21.7348 5.17866 21.7494C5.33133 21.7641 5.48482 21.7315 5.61844 21.6562L21.3684 12.6478C21.4857 12.583 21.5834 12.4879 21.6514 12.3725C21.7195 12.2571 21.7553 12.1255 21.7553 11.9916C21.7553 11.8576 21.7195 11.7261 21.6514 11.6107C21.5834 11.4952 21.4857 11.4002 21.3684 11.3353L5.61844 2.34937C5.48523 2.27487 5.33245 2.24278 5.18052 2.2574C5.02859 2.27201 4.88474 2.33264 4.76817 2.43117C4.65161 2.5297 4.56788 2.66145 4.52817 2.80882C4.48846 2.9562 4.49466 3.11218 4.54594 3.25594L7.5 12L4.54594 20.745Z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})),l=()=>t("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},t("rect",{x:"6",y:"6",width:"8",height:"8",rx:"1.5",fill:"currentColor"})),p=()=>t("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},t("path",{d:"M4.5 10.5L8 14L15.5 6",stroke:"currentColor","stroke-width":"1.75","stroke-linecap":"round","stroke-linejoin":"round"}));function m(){"undefined"!=typeof customElements&&["bs-composer"].forEach((s=>{"bs-composer"===s&&(customElements.get(o(s))||customElements.define(o(s),i))}))}m();const h=i,u=m;export{h as BsComposer,u as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t,p as e,H as s,c as a,h as o}from"./p-BpvhHQSw.js";const r=e(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.bsSort=a(this,"bsSort"),this.bsRowSelect=a(this,"bsRowSelect")}columns=[];rows=[];sortColumn;sortDirection="asc";selectable=!1;cellRenderer;bsSort;bsRowSelect;selectedIds=new Set;onHeaderClick=t=>{t.sortable&&this.bsSort.emit({column:t.key,direction:this.sortColumn===t.key&&"asc"===this.sortDirection?"desc":"asc"})};onRowCheckboxChange=(t,e)=>{const s=e.target.checked,a=new Set(this.selectedIds);s?a.add(t.id):a.delete(t.id),this.selectedIds=a,this.bsRowSelect.emit({id:t.id,selected:s})};render(){return o("table",{key:"
|
|
1
|
+
import{t,p as e,H as s,c as a,h as o}from"./p-BpvhHQSw.js";const r=e(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.bsSort=a(this,"bsSort"),this.bsRowSelect=a(this,"bsRowSelect")}columns=[];rows=[];sortColumn;sortDirection="asc";selectable=!1;cellRenderer;bsSort;bsRowSelect;selectedIds=new Set;onHeaderClick=t=>{t.sortable&&this.bsSort.emit({column:t.key,direction:this.sortColumn===t.key&&"asc"===this.sortDirection?"desc":"asc"})};onRowCheckboxChange=(t,e)=>{const s=e.target.checked,a=new Set(this.selectedIds);s?a.add(t.id):a.delete(t.id),this.selectedIds=a,this.bsRowSelect.emit({id:t.id,selected:s})};render(){return o("table",{key:"9b16ade44ff85120e9629722de8e8c1738835c1b",part:"table",class:"bs-data-table"},o("thead",{key:"644eed606e68782ada42c289bb7bfc8d6de4affb",part:"head"},o("tr",{key:"4e4ea75018796c77f14703c1c1402022f8c8cde9"},this.selectable&&o("th",{key:"85460f7c2eab6ad0f3604f72bcd81a4aa8699c03",class:"bs-data-table__select-col"}),this.columns.map((t=>{const e=this.sortColumn===t.key;return o("th",{part:"header-cell",class:"bs-data-table__header-cell","aria-sort":t.sortable?e?"asc"===this.sortDirection?"ascending":"descending":"none":void 0},t.sortable?o("button",{type:"button",class:"bs-data-table__sort-button",onClick:()=>this.onHeaderClick(t)},t.label,e&&o("span",{class:"bs-data-table__sort-indicator"},"asc"===this.sortDirection?" ▲":" ▼")):t.label)})))),o("tbody",{key:"024cb8a25cc6471e7074d119b78e6a8e22f86450",part:"body"},this.rows.map((t=>o("tr",{part:"row",class:"bs-data-table__row"},this.selectable&&o("td",{class:"bs-data-table__select-col"},o("input",{type:"checkbox",checked:this.selectedIds.has(t.id),onChange:e=>this.onRowCheckboxChange(t,e)})),this.columns.map((e=>this.cellRenderer?o("td",{part:"cell",class:"bs-data-table__cell",innerHTML:this.cellRenderer(t,e)}):o("td",{part:"cell",class:"bs-data-table__cell"},(t[e.key]??"")+""))))))))}static get style(){return":host{display:block}.bs-data-table{width:100%;border-collapse:collapse;font-family:inherit;font-size:var(--bs-font-size-sm);color:var(--bs-text-default)}.bs-data-table__header-cell{text-align:left;padding:var(--bs-spacing-200) var(--bs-spacing-300);border-bottom:1px solid var(--bs-border-default);font-weight:var(--bs-font-weight-semibold);color:var(--bs-text-secondary);white-space:nowrap}.bs-data-table__sort-button{display:inline-flex;align-items:center;border:none;background:none;padding:0;font:inherit;color:inherit;cursor:pointer;user-select:none}.bs-data-table__sort-button:focus-visible{outline:2px solid var(--bs-border-neutral-focus);outline-offset:2px}.bs-data-table__sort-indicator{color:var(--bs-text-action)}.bs-data-table__row:hover{background:var(--bs-surface-hover)}.bs-data-table__cell{padding:var(--bs-spacing-200) var(--bs-spacing-300);border-bottom:1px solid var(--bs-border-default)}.bs-data-table__select-col{width:var(--bs-spacing-500);padding:var(--bs-spacing-200) var(--bs-spacing-300);border-bottom:1px solid var(--bs-border-default)}"}},[513,"bs-data-table",{columns:[16],rows:[16],sortColumn:[1,"sort-column"],sortDirection:[1,"sort-direction"],selectable:[4],cellRenderer:[16],selectedIds:[32]}]);function c(){"undefined"!=typeof customElements&&["bs-data-table"].forEach((e=>{"bs-data-table"===e&&(customElements.get(t(e))||customElements.define(t(e),r))}))}c();const l=r,b=c;export{l as BsDataTable,b as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as r,p as t,H as s,c as i,h as e}from"./p-BpvhHQSw.js";const o=t(class extends s{constructor(r){super(),!1!==r&&this.__registerHost(),this.__attachShadow(),this.bsInput=i(this,"bsInput"),this.bsChange=i(this,"bsChange")}value="";type="text";label;placeholder;description;error;disabled=!1;bsInput;bsChange;onInput=r=>{this.bsInput.emit(r.target.value)};onChange=r=>{this.bsChange.emit(r.target.value)};render(){return e("div",{key:"2c6b38b4594ccde2536515fcd252831bacb6aaeb",class:"bs-input "+(this.error?"bs-input--error":"")},this.label&&e("label",{key:"9df0fae013470d8a77b0cc6288c8178b1ac62e0d",part:"label",class:"bs-input__label",htmlFor:"control"},this.label),e("input",{key:"a6ddc857d33c4e51a4c64b422a7df5b6261f5180",id:"control",part:"control",class:"bs-input__control",type:this.type,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,onInput:this.onInput,onChange:this.onChange}),this.error?e("span",{id:"description-or-error",part:"error",class:"bs-input__error"},this.error):this.description?e("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{display:flex;flex-direction:column;gap:var(--bs-spacing-100);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)}.bs-input__control{height:var(--bs-spacing-600);padding:0 var(--bs-spacing-300);border:1px solid var(--bs-input-border-default);border-radius:var(--bs-border-radius-100);background:var(--bs-input-bg-default);color:var(--bs-input-text);font-size:var(--bs-font-size-md);font-family:inherit}.bs-input__control::placeholder{color:var(--bs-input-placeholder)}.bs-input__control:hover:not(:disabled){border-color:var(--bs-input-border-hover)}.bs-input__control:focus-visible{outline:none;border-color:var(--bs-input-border-focus)}.bs-input__control:disabled{background:var(--bs-input-bg-disabled);color:var(--bs-input-text-disabled);cursor:not-allowed}.bs-input--error .bs-input__control{border-color:var(--bs-input-border-error)}.bs-input--error .bs-input__label{color:var(--bs-input-label)}.bs-input__description{font-size:var(--bs-font-size-xs);color:var(--bs-input-description)}.bs-input__error{font-size:var(--bs-font-size-xs);color:var(--bs-input-error)}"}},[529,"bs-input",{value:[1],type:[1],label:[1],placeholder:[1],description:[1],error:[1],disabled:[4]}]);function n(){"undefined"!=typeof customElements&&["bs-input"].forEach((t=>{"bs-input"===t&&(customElements.get(r(t))||customElements.define(r(t),o))}))}n();const a=o,b=n;export{a as BsInput,b as defineCustomElement}
|
|
1
|
+
import{t as i,p as t,H as s,c as e,h as r}from"./p-BpvhHQSw.js";import{d as n}from"./p-DndQiCMP.js";import{d as o}from"./p-_vXDfB3V.js";const a=t(class extends s{constructor(i){super(),!1!==i&&this.__registerHost(),this.__attachShadow(),this.bsInput=e(this,"bsInput"),this.bsChange=e(this,"bsChange"),this.bsOpen=e(this,"bsOpen"),this.bsChipAdd=e(this,"bsChipAdd"),this.bsChipRemove=e(this,"bsChipRemove"),this.bsTitleChange=e(this,"bsTitleChange"),this.bsCountryChange=e(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 s=t.target;let e=s.value;e.length>1&&(e=e.slice(-1),s.value=e),e&&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?r("slot",{name:"icon",onSlotchange:this.onIconSlotchange}):r("svg",{class:"bs-input__search-icon",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true"},r("circle",{cx:"7",cy:"7",r:"5",stroke:"currentColor","stroke-width":"1.3"}),r("path",{d:"M11 11L14.5 14.5",stroke:"currentColor","stroke-width":"1.3","stroke-linecap":"round"}))}renderEndIconContent(){return"number"===this.type?r("span",{class:"bs-input__stepper"},r("button",{type:"button",part:"control",class:"bs-input__stepper-btn","aria-label":"Increment",tabIndex:-1,disabled:this.disabled,onClick:this.onStepperIncrement},r("svg",{viewBox:"0 0 10 6",width:"10",height:"6","aria-hidden":"true"},r("path",{d:"M1 5L5 1L9 5",stroke:"currentColor","stroke-width":"1.3",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"}))),r("button",{type:"button",part:"control",class:"bs-input__stepper-btn","aria-label":"Decrement",tabIndex:-1,disabled:this.disabled,onClick:this.onStepperDecrement},r("svg",{viewBox:"0 0 10 6",width:"10",height:"6","aria-hidden":"true"},r("path",{d:"M1 1L5 5L9 1",stroke:"currentColor","stroke-width":"1.3",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"})))):"password"===this.type?r("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?r("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true"},r("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"}),r("circle",{cx:"8",cy:"8",r:"2",stroke:"currentColor","stroke-width":"1.2"}),r("path",{d:"M2 2L14 14",stroke:"currentColor","stroke-width":"1.2","stroke-linecap":"round"})):r("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true"},r("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"}),r("circle",{cx:"8",cy:"8",r:"2",stroke:"currentColor","stroke-width":"1.2"}))):"dropdown"===this.type?r("svg",{class:"bs-input__chevron",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true"},r("path",{d:"M4 6L8 10L12 6",stroke:"currentColor","stroke-width":"1.3","stroke-linecap":"round","stroke-linejoin":"round"})):"date"!==this.type||this.hasEndIcon?r("slot",{name:"end-icon",onSlotchange:this.onEndIconSlotchange}):r("svg",{class:"bs-input__calendar",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true"},r("rect",{x:"2",y:"3",width:"12",height:"11",rx:"1",stroke:"currentColor","stroke-width":"1.2"}),r("path",{d:"M2 6.5H14",stroke:"currentColor","stroke-width":"1.2"}),r("path",{d:"M5 1.5V4M11 1.5V4",stroke:"currentColor","stroke-width":"1.2","stroke-linecap":"round"}))}renderStandardControl(){return r("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 r("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=>r("option",{value:i.value,selected:i.value===this.value},i.label))))}renderTextareaControl(){return r("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 r("div",{class:"bs-input__chips"},this.chips.map((i=>r("span",{part:"chip",class:"bs-input__chip"},i,r("button",{type:"button",class:"bs-input__chip-remove","aria-label":"Remove "+i,onClick:this.onChipRemove(i)},"×")))),r("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}))}renderInitialsControl(){return[r("select",{part:"control",class:"bs-input__control bs-input__title-select",disabled:this.disabled,onChange:this.onTitleChange},this.titleOptions.map((i=>r("option",{value:i,selected:i===this.initialsTitle},i)))),r("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})]}renderCountryControl(){return[r("select",{part:"control",class:"bs-input__control bs-input__country-select",disabled:this.disabled,onChange:this.onCountryChange},this.countryOptions.map((i=>r("option",{value:i.code,selected:i.code===this.country},i.flagIcon?i.flagIcon+" ":"",i.code," ",i.label)))),r("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"initials":return this.renderInitialsControl();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 r("div",{class:"bs-input__field-wrapper"},r("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},r("span",{part:"icon",class:"bs-input__icon "+(this.showsIconArea?"bs-input__icon--visible":"")},this.renderIconContent()),this.renderControl(),r("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&&r("bs-menu",{part:"menu",class:"bs-input__dropdown-menu",role:"listbox"},this.options.map((i=>r("bs-menu-item",{key:i.value,onBsSelect:this.onDropdownOptionSelect(i)},i.label)))))}renderPinField(){return this.pinInputs=[],r("div",{part:"field",class:"bs-input__field bs-input__field--pin "+(this.disabled?"bs-input__field--disabled":"")},Array.from({length:this.length}).map(((i,t)=>r("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 r("div",{key:"a929eee8f7b100f372763a259f5d5fed298c8dff",class:"bs-input "+(this.error?"bs-input--error":"")},this.label&&r("label",{key:"fba27eccc9a351caa58fd849aad54e9388de361c",part:"label",class:"bs-input__label",htmlFor:"control"},this.label,this.required&&r("span",{key:"d4852798433e75b6c4cac34a9fbc5f9c23c8925d",part:"required",class:"bs-input__required","aria-hidden":"true"},"*")),"pin"===this.type?this.renderPinField():this.renderField(),this.error?r("span",{id:"description-or-error",part:"error",class:"bs-input__error"},r("svg",{part:"error-icon",class:"bs-input__error-icon",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true"},r("circle",{cx:"8",cy:"8",r:"6.5",stroke:"currentColor","stroke-width":"1.2"}),r("path",{d:"M8 5V8.5",stroke:"currentColor","stroke-width":"1.2","stroke-linecap":"round"}),r("circle",{cx:"8",cy:"11",r:"0.75",fill:"currentColor"})),this.error):this.description?r("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{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__title-select,.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__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}"}},[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 p(){"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))||n();break;case"bs-menu-item":customElements.get(i(t))||o()}}))}p();const l=a,d=p;export{l as BsInput,d as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{B as o,d as s}from"./p-_vXDfB3V.js";const p=o,r=s;export{p as BsMenuItem,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{B as o,d as s}from"./p-DndQiCMP.js";const p=o,r=s;export{p as BsMenu,r as defineCustomElement}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface BsSourceLink extends Components.BsSourceLink, HTMLElement {}
|
|
4
|
+
export const BsSourceLink: {
|
|
5
|
+
prototype: BsSourceLink;
|
|
6
|
+
new (): BsSourceLink;
|
|
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 r,c as o,h as n}from"./p-BpvhHQSw.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:"0e55cdcd04b7d6574835c1b5b21c20ad804fc36c",class:"bs-source-link__left"},n("span",{key:"989f52e1b6b0a353470d65f5e3d75e40486b3842",class:"bs-source-link__filename-row"},n("span",{key:"e21ccdb9b78d4db3b18ca07039d61632b4390d80",part:"icon",class:"bs-source-link__icon"},n("slot",{key:"fe35c5c3084af9ddba25db3c46c2d8bbe7e927d0",name:"icon"},n(a,{key:"5612acc39809cca4d483ab22f2e0b1cb95cdb2e8"}))),n("p",{key:"39d92f5e7e7a50e943ff9a85efd314df5a2abf0b",part:"filename",class:"bs-source-link__filename"},this.fileName)),n("span",{key:"d2eace60d67a344cd2bf522af38950fd3275bea2",class:"bs-source-link__meta"},this.sourceName&&n("span",{key:"d8d3fa79fa888db77ef44f402fd8747eb2cecad1",part:"source",class:"bs-source-link__source"},this.sourceName),this.sourceName&&this.version&&n("span",{key:"738770f5c4b091e59832100a17bda2f2d251ed75",class:"bs-source-link__dot","aria-hidden":"true"}),this.version&&n("span",{key:"56fcf72b43eebb138745d212e8bcaa680f808cd0",part:"version",class:"bs-source-link__version"},this.version))),n("span",{key:"da453b51265f923c19505645cb33832c93863179",part:"arrow",class:"bs-source-link__arrow","aria-hidden":"true"},n(c,{key:"c23d308322df780d109691f87945bb511461304f"}))];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}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as o,d as s}from"./p-
|
|
1
|
+
import{B as o,d as s}from"./p-Cz2nfz2j.js";const p=o,r=s;export{p as BsTooltip,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t,p as o,H as s,h as i}from"./p-BpvhHQSw.js";const
|
|
1
|
+
import{t,p as o,H as s,h as i}from"./p-BpvhHQSw.js";const a=o(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow()}placement="top";render(){return i("div",{key:"7020be9b961d1370449ce37570ae0c9162bd6176",class:"bs-tooltip"},i("span",{key:"e21d62d8f701917c7a074c105a7509c9f4582f64",part:"arrow",class:"bs-tooltip__arrow"}),i("div",{key:"f011584e85c9d10371f961e49d44b67a3983bd2e",part:"bubble",class:"bs-tooltip__bubble"},i("slot",{key:"f27da1c55a31d3e1a7ee330440ee9b4a3c577e9a"})))}static get style(){return":host{display:inline-block;--bs-tooltip-bg:var(--bs-surface-inverse);--bs-tooltip-color:var(--bs-text-inverse);--bs-tooltip-radius:var(--bs-border-radius-50);--bs-tooltip-padding-x:var(--bs-spacing-200);--bs-tooltip-padding-y:var(--bs-spacing-100);--bs-tooltip-max-width:200px;--bs-tooltip-shadow:-1px 4px 8px rgba(0, 0, 0, 0.08);--bs-tooltip-font-size:var(--bs-font-size-sm);--bs-tooltip-line-height:var(--bs-line-height-body-sm)}.bs-tooltip{position:relative;display:inline-block}.bs-tooltip__bubble{box-sizing:border-box;max-width:var(--bs-tooltip-max-width);padding:var(--bs-tooltip-padding-y) var(--bs-tooltip-padding-x);background:var(--bs-tooltip-bg);color:var(--bs-tooltip-color);border-radius:var(--bs-tooltip-radius);box-shadow:var(--bs-tooltip-shadow);font-family:inherit;font-size:var(--bs-tooltip-font-size);line-height:calc(var(--bs-tooltip-line-height) * 1px)}.bs-tooltip__arrow{position:absolute;top:-6px;left:50%;transform:translateX(-50%);width:8px;height:8px;background:var(--bs-tooltip-bg);clip-path:polygon(50% 0, 0% 100%, 100% 100%)}"}},[769,"bs-tooltip",{placement:[1]}]);function e(){"undefined"!=typeof customElements&&["bs-tooltip"].forEach((o=>{"bs-tooltip"===o&&(customElements.get(t(o))||customElements.define(t(o),a))}))}e();export{a as B,e as d}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as s,p as e,H as a,h as n}from"./p-BpvhHQSw.js";const r=e(class extends a{constructor(s){super(),!1!==s&&this.__registerHost(),this.__attachShadow()}render(){return n("div",{key:"e49c52a18ea8c10399d818a00e0c6b748f0c9b8f",part:"list",class:"bs-menu",role:"menu"},n("slot",{key:"7e8cef2af1a068d0ab31fc3aee0abf8b59645a08"}))}static get style(){return":host{display:block;--bs-menu-bg:var(--bs-surface-raised);--bs-menu-radius:var(--bs-border-radius-100);--bs-menu-padding-y:var(--bs-spacing-50);--bs-menu-gap:var(--bs-spacing-50);--bs-menu-shadow:var(--bs-shadow-sm)}.bs-menu{box-sizing:border-box;display:flex;flex-direction:column;gap:var(--bs-menu-gap);background:var(--bs-menu-bg);border-radius:var(--bs-menu-radius);padding:var(--bs-menu-padding-y) 0;box-shadow:var(--bs-menu-shadow);font-family:inherit}"}},[257,"bs-menu"]);function b(){"undefined"!=typeof customElements&&["bs-menu"].forEach((e=>{"bs-menu"===e&&(customElements.get(s(e))||customElements.define(s(e),r))}))}b();export{r as B,b as d}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e,p as s,H as t,c as n,h as i}from"./p-BpvhHQSw.js";const a=s(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.bsSelect=n(this,"bsSelect")}hasIcon=!1;bsSelect;onIconSlotchange=e=>{this.hasIcon=e.target.assignedNodes().length>0};onClick=()=>{this.bsSelect.emit()};render(){return i("button",{key:"dee92b0e122d1a1d100e950ac5b3a368a94d075b",type:"button",part:"item",role:"menuitem",class:"bs-menu-item",onClick:this.onClick},i("span",{key:"e4ce02b4df1ec40bf0f3f72bd1611816e8851909",part:"icon",class:"bs-menu-item__icon "+(this.hasIcon?"bs-menu-item__icon--has-content":"")},i("slot",{key:"9e19fea7d90078577047b5aea0170c09d27fb340",name:"icon",onSlotchange:this.onIconSlotchange})),i("span",{key:"179ce497185c4f9f5bbd238bd0c781a189743ad1",part:"label",class:"bs-menu-item__label"},i("slot",{key:"dfe5de71a770cc9ff9847d8f687bba01ae9e1b1e"})))}static get style(){return":host{display:block;--bs-menu-item-radius:var(--bs-border-radius-100);--bs-menu-item-padding-y:var(--bs-spacing-100);--bs-menu-item-padding-x:var(--bs-spacing-150);--bs-menu-item-gap:var(--bs-spacing-100);--bs-menu-item-hover:var(--bs-color-neutral-container);--bs-menu-item-pressed:var(--bs-color-neutral-container-pressed);--bs-menu-item-icon-color:var(--bs-icon-default);--bs-menu-item-color:var(--bs-text-muted);--bs-menu-item-font-size:var(--bs-font-size-md);--bs-menu-item-line-height:var(--bs-line-height-body-md)}.bs-menu-item{box-sizing:border-box;display:flex;align-items:center;width:100%;height:48px;border:none;cursor:pointer;background:transparent;color:var(--bs-menu-item-color);font-family:inherit;border-radius:var(--bs-menu-item-radius);padding:var(--bs-menu-item-padding-y) var(--bs-menu-item-padding-x);gap:var(--bs-menu-item-gap);transition:background-color var(--bs-duration-fast) var(--bs-easing-standard)}.bs-menu-item:focus-visible{outline:2px solid var(--bs-border-neutral-focus);outline-offset:2px}.bs-menu-item:hover{background:var(--bs-menu-item-hover)}.bs-menu-item:active{background:var(--bs-menu-item-pressed)}.bs-menu-item__icon{display:none;width:24px;height:24px;flex-shrink:0;color:var(--bs-menu-item-icon-color)}.bs-menu-item__icon--has-content{display:inline-flex;align-items:center;justify-content:center}.bs-menu-item__icon ::slotted(svg){width:24px;height:24px}.bs-menu-item__label{font-size:var(--bs-menu-item-font-size);line-height:calc(var(--bs-menu-item-line-height) * 1px);white-space:nowrap}"}},[769,"bs-menu-item",{hasIcon:[32]}]);function o(){"undefined"!=typeof customElements&&["bs-menu-item"].forEach((s=>{"bs-menu-item"===s&&(customElements.get(e(s))||customElements.define(e(s),a))}))}o();export{a as B,o as d}
|
package/dist/esm/brandsync-wc.js
CHANGED
|
@@ -16,5 +16,5 @@ var patchBrowser = () => {
|
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(async (options) => {
|
|
18
18
|
await globalScripts();
|
|
19
|
-
return bootstrapLazy([["bs-chatbot-header",[[769,"bs-chatbot-header",{"heading":[1],"expanded":[1540]}]]],["bs-ai-thinking",[[513,"bs-ai-thinking",{"label":[1]}]]],["bs-badge",[[769,"bs-badge",{"variant":[1]}]]],["bs-button",[[785,"bs-button",{"variant":[1],"size":[1],"disabled":[4],"type":[1],"ariaLabel":[1,"aria-label"],"hasIcon":[32],"hasEndIcon":[32],"hasLabel":[32]}]]],["bs-button-skeleton",[[513,"bs-button-skeleton",{"size":[1]}]]],["bs-card",[[769,"bs-card",{"surface":[1]}]]],["bs-chatbot-response-action",[[769,"bs-chatbot-response-action",{"sourcesCount":[2,"sources-count"],"menuOpen":[1540,"menu-open"]},[[4,"click","onDocumentClick"],[4,"keydown","onKeydown"]]]]],["bs-chatbot-suggestion-button",[[769,"bs-chatbot-suggestion-button",{"disabled":[4]}]]],["bs-composer",[[785,"bs-composer",{"variant":[1],"placeholder":[1],"value":[1],"state":[1],"ariaLabel":[1,"aria-label"]}]]],["bs-data-table",[[513,"bs-data-table",{"columns":[16],"rows":[16],"sortColumn":[1,"sort-column"],"sortDirection":[1,"sort-direction"],"selectable":[4],"cellRenderer":[16],"selectedIds":[32]}]]],["bs-
|
|
19
|
+
return bootstrapLazy([["bs-input",[[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"]]]]],["bs-chatbot-header",[[769,"bs-chatbot-header",{"heading":[1],"expanded":[1540]}]]],["bs-ai-disclaimer",[[257,"bs-ai-disclaimer"]]],["bs-ai-greeting",[[513,"bs-ai-greeting",{"assistantName":[1,"assistant-name"],"productName":[1,"product-name"]}]]],["bs-ai-thinking",[[513,"bs-ai-thinking",{"label":[1]}]]],["bs-attachment",[[513,"bs-attachment",{"type":[1],"fileName":[1,"file-name"],"imageSrc":[1,"image-src"],"imageAlt":[1,"image-alt"],"loading":[4],"removable":[4]}]]],["bs-attachment-list",[[769,"bs-attachment-list",{"ariaLabel":[1,"aria-label"],"canScrollRight":[32]}]]],["bs-badge",[[769,"bs-badge",{"variant":[1]}]]],["bs-button",[[785,"bs-button",{"variant":[1],"size":[1],"disabled":[4],"type":[1],"ariaLabel":[1,"aria-label"],"hasIcon":[32],"hasEndIcon":[32],"hasLabel":[32]}]]],["bs-button-skeleton",[[513,"bs-button-skeleton",{"size":[1]}]]],["bs-card",[[769,"bs-card",{"surface":[1]}]]],["bs-chatbot-feedback",[[513,"bs-chatbot-feedback",{"rating":[1538],"submitted":[1540],"comment":[1025],"heading":[1],"subtitle":[1]}]]],["bs-chatbot-response-action",[[769,"bs-chatbot-response-action",{"sourcesCount":[2,"sources-count"],"menuOpen":[1540,"menu-open"]},[[4,"click","onDocumentClick"],[4,"keydown","onKeydown"]]]]],["bs-chatbot-sources-drawer",[[769,"bs-chatbot-sources-drawer",{"heading":[1],"count":[2],"slottedCount":[32]}]]],["bs-chatbot-suggestion-button",[[769,"bs-chatbot-suggestion-button",{"disabled":[4]}]]],["bs-composer",[[785,"bs-composer",{"variant":[1],"placeholder":[1],"value":[1],"state":[1],"ariaLabel":[1,"aria-label"],"hasAttachments":[32]}]]],["bs-composer-status-banner",[[769,"bs-composer-status-banner",{"type":[1],"message":[1],"showIcon":[4,"show-icon"],"showButton":[4,"show-button"],"actionLabel":[1,"action-label"],"allowClose":[4,"allow-close"]}]]],["bs-data-table",[[513,"bs-data-table",{"columns":[16],"rows":[16],"sortColumn":[1,"sort-column"],"sortDirection":[1,"sort-direction"],"selectable":[4],"cellRenderer":[16],"selectedIds":[32]}]]],["bs-modal",[[769,"bs-modal",{"open":[1540],"heading":[1],"size":[1],"hasFooter":[32]},[[4,"keydown","onKeydown"],[4,"focusin","onFocusIn"]]]]],["bs-source-link",[[769,"bs-source-link",{"fileName":[1,"file-name"],"sourceName":[1,"source-name"],"version":[1],"href":[1],"target":[1]}]]],["bs-tooltip",[[769,"bs-tooltip",{"placement":[1]}]]],["bs-menu_2",[[257,"bs-menu"],[769,"bs-menu-item",{"hasIcon":[32]}]]]], options);
|
|
20
20
|
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './index-nLORuTUY.js';
|
|
2
|
+
|
|
3
|
+
const bsAiDisclaimerCss = () => `:host{display:block;--bs-ai-disclaimer-padding-x:var(--bs-spacing-200);--bs-ai-disclaimer-text-color:var(--bs-text-secondary);--bs-ai-disclaimer-font-size:var(--bs-font-size-sm);--bs-ai-disclaimer-line-height:var(--bs-line-height-body-sm)}.bs-ai-disclaimer{box-sizing:border-box;display:flex;align-items:center;justify-content:center;padding:0 var(--bs-ai-disclaimer-padding-x);font-family:inherit}.bs-ai-disclaimer__text{margin:0;flex:1 0 0;min-width:0;color:var(--bs-ai-disclaimer-text-color);font-size:var(--bs-ai-disclaimer-font-size);line-height:calc(var(--bs-ai-disclaimer-line-height) * 1px);text-align:center;word-break:break-word}`;
|
|
4
|
+
|
|
5
|
+
const BsAiDisclaimer = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
}
|
|
9
|
+
render() {
|
|
10
|
+
return (h("div", { key: 'c306fa7e8f7f9dca07642e1038708847847e2d7e', class: "bs-ai-disclaimer" }, h("p", { key: '7f42e2094e7baf287c886ce966a3813657a99a61', part: "text", class: "bs-ai-disclaimer__text" }, h("slot", { key: 'c5a66f6093b413274c20de59e7f82d4f7372b56c' }))));
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
BsAiDisclaimer.style = bsAiDisclaimerCss();
|
|
14
|
+
|
|
15
|
+
export { BsAiDisclaimer as bs_ai_disclaimer };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './index-nLORuTUY.js';
|
|
2
|
+
|
|
3
|
+
const bsAiGreetingCss = () => `:host{display:block;--bs-ai-greeting-gap:var(--bs-spacing-200);--bs-ai-greeting-max-width:490px;--bs-ai-greeting-heading-color:var(--bs-text-default);--bs-ai-greeting-heading-font-size:var(--bs-font-size-4xl);--bs-ai-greeting-heading-line-height:var(--bs-line-height-body-lg);--bs-ai-greeting-heading-weight:var(--bs-font-weight-bold);--bs-ai-greeting-heading-gap:var(--bs-spacing-200);--bs-ai-greeting-subtext-color:var(--bs-text-secondary);--bs-ai-greeting-subtext-font-size:var(--bs-font-size-xl);--bs-ai-greeting-subtext-line-height:var(--bs-line-height-body-lg)}.bs-ai-greeting{box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--bs-ai-greeting-gap);max-width:var(--bs-ai-greeting-max-width);margin:0 auto;text-align:center;font-family:inherit}.bs-ai-greeting__heading{display:flex;flex-direction:column;gap:var(--bs-ai-greeting-heading-gap);color:var(--bs-ai-greeting-heading-color);font-size:var(--bs-ai-greeting-heading-font-size);font-weight:var(--bs-ai-greeting-heading-weight);line-height:calc(var(--bs-ai-greeting-heading-line-height) * 1px)}.bs-ai-greeting__heading-line{margin:0}.bs-ai-greeting__subtext{margin:0;color:var(--bs-ai-greeting-subtext-color);font-size:var(--bs-ai-greeting-subtext-font-size);font-weight:var(--bs-font-weight-regular);line-height:calc(var(--bs-ai-greeting-subtext-line-height) * 1px)}`;
|
|
4
|
+
|
|
5
|
+
const BsAiGreeting = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
}
|
|
9
|
+
/** The assistant's name, used in the heading ("Hi. I'm {assistantName},"). */
|
|
10
|
+
assistantName = 'Genie';
|
|
11
|
+
/** The product name mentioned in the subtext. Omit to use a product-agnostic subtext. */
|
|
12
|
+
productName;
|
|
13
|
+
render() {
|
|
14
|
+
const subtext = this.productName
|
|
15
|
+
? `How can I help you with ${this.productName} today?`
|
|
16
|
+
: 'How can I help you today?';
|
|
17
|
+
return (h("div", { key: '7931e7404b70476a5488e31f07981c97617c1e5b', class: "bs-ai-greeting" }, h("div", { key: '1ba75538642eebb9fe7c24eae2aae9a4eed176cf', part: "heading", class: "bs-ai-greeting__heading" }, h("p", { key: '6cf5d97d81249298d02d3983a039e664a75fbb40', class: "bs-ai-greeting__heading-line" }, "Hi. I'm ", this.assistantName, ","), h("p", { key: 'f7a1b0235b5b32b1319bc7748e0073fae0defef0', class: "bs-ai-greeting__heading-line" }, "your AI assistant.")), h("p", { key: '5f07b44ca8d000c39204374f99c6608ecbfc22d3', part: "subtext", class: "bs-ai-greeting__subtext" }, subtext)));
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
BsAiGreeting.style = bsAiGreetingCss();
|
|
21
|
+
|
|
22
|
+
export { BsAiGreeting as bs_ai_greeting };
|
|
@@ -24,7 +24,7 @@ const BsAiThinking = class {
|
|
|
24
24
|
/** The status text shown next to the icon, e.g. "Retrieving", "Thinking", "Searching". */
|
|
25
25
|
label = 'Thinking';
|
|
26
26
|
render() {
|
|
27
|
-
return (h("div", { key: '
|
|
27
|
+
return (h("div", { key: 'b72bc5095cc94257821541517f3446bac960df49', class: "bs-ai-thinking", role: "status", "aria-live": "polite" }, h("img", { key: '6c41c71416fc77f7385505754a68786b5f3412fa', part: "icon", class: "bs-ai-thinking__icon", src: GENIE_MARK_ICON, alt: "", "aria-hidden": "true" }), h("span", { key: '8edef57f7b31a03e2add401e42acdb7b6525a432', part: "label", class: "bs-ai-thinking__label" }, this.label)));
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
30
|
BsAiThinking.style = bsAiThinkingCss();
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { r as registerInstance, a as getElement, h } from './index-nLORuTUY.js';
|
|
2
|
+
|
|
3
|
+
const bsAttachmentListCss = () => `:host{display:block;--bs-attachment-list-gap:10px;--bs-attachment-list-padding:var(--bs-spacing-150);--bs-attachment-list-fade-color:var(--bs-static-white);--bs-attachment-list-fade-width:var(--bs-spacing-800);--bs-attachment-list-scrollbar-thumb:var(--bs-neutral-300)}.bs-attachment-list{box-sizing:border-box;position:relative}.bs-attachment-list__row{box-sizing:border-box;display:flex;align-items:flex-start;gap:var(--bs-attachment-list-gap);padding:var(--bs-attachment-list-padding);overflow-x:auto;scrollbar-width:none}.bs-attachment-list__row::-webkit-scrollbar{height:4px}.bs-attachment-list__row::-webkit-scrollbar-track{background:transparent}.bs-attachment-list__row::-webkit-scrollbar-thumb{background:transparent;border-radius:var(--bs-border-radius-full)}.bs-attachment-list__row:hover::-webkit-scrollbar-thumb,.bs-attachment-list__row:focus-within::-webkit-scrollbar-thumb{background:var(--bs-attachment-list-scrollbar-thumb)}.bs-attachment-list__fade{position:absolute;top:0;right:0;bottom:0;width:var(--bs-attachment-list-fade-width);pointer-events:none;background:linear-gradient(to right, transparent, var(--bs-attachment-list-fade-color))}`;
|
|
4
|
+
|
|
5
|
+
const BsAttachmentList = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
}
|
|
9
|
+
get el() { return getElement(this); }
|
|
10
|
+
/** Accessible name for the scrollable region. */
|
|
11
|
+
ariaLabel = 'Attachments';
|
|
12
|
+
/** Whether the row currently has more content than fits (drives the fade + scrollbar-on-hover). */
|
|
13
|
+
canScrollRight = false;
|
|
14
|
+
row;
|
|
15
|
+
resizeObserver;
|
|
16
|
+
componentDidLoad() {
|
|
17
|
+
this.updateScrollState();
|
|
18
|
+
this.resizeObserver = new ResizeObserver(() => this.updateScrollState());
|
|
19
|
+
this.resizeObserver.observe(this.el);
|
|
20
|
+
}
|
|
21
|
+
disconnectedCallback() {
|
|
22
|
+
this.resizeObserver?.disconnect();
|
|
23
|
+
}
|
|
24
|
+
onSlotchange = () => {
|
|
25
|
+
this.updateScrollState();
|
|
26
|
+
};
|
|
27
|
+
onScroll = () => {
|
|
28
|
+
this.updateScrollState();
|
|
29
|
+
};
|
|
30
|
+
updateScrollState = () => {
|
|
31
|
+
const row = this.row;
|
|
32
|
+
if (!row)
|
|
33
|
+
return;
|
|
34
|
+
// +1 tolerance: some browsers report fractional scrollWidth/clientWidth that differ by less
|
|
35
|
+
// than a pixel even when there's nothing left to scroll, which would otherwise leave the fade
|
|
36
|
+
// stuck on permanently.
|
|
37
|
+
this.canScrollRight = row.scrollWidth - row.clientWidth - row.scrollLeft > 1;
|
|
38
|
+
};
|
|
39
|
+
render() {
|
|
40
|
+
return (h("div", { key: 'adf8ddac319b3d891d0895cb7e488b875f4bce5e', class: "bs-attachment-list" }, h("div", { key: 'd4247a77596a1a33d03f8657ec015f2d00b4138d', part: "row", class: "bs-attachment-list__row", ref: el => (this.row = el), onScroll: this.onScroll, role: "group", "aria-label": this.ariaLabel, tabIndex: 0 }, h("slot", { key: 'b4745ab38ca82a43bc48a7bc02669942b2eb0e0f', onSlotchange: this.onSlotchange })), this.canScrollRight && h("div", { key: '58bb4815a8fb296f0788c8a4adfb9780049d641d', part: "fade", class: "bs-attachment-list__fade", "aria-hidden": "true" })));
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
BsAttachmentList.style = bsAttachmentListCss();
|
|
44
|
+
|
|
45
|
+
export { BsAttachmentList as bs_attachment_list };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-nLORuTUY.js';
|
|
2
|
+
|
|
3
|
+
const bsAttachmentCss = () => `:host{display:inline-block;--bs-attachment-size:112px;--bs-attachment-radius:var(--bs-border-radius-100);--bs-attachment-border-color:var(--bs-border-default);--bs-attachment-card-bg:var(--bs-surface-base);--bs-attachment-filename-color:var(--bs-text-default);--bs-attachment-badge-bg-pdf:var(--bs-badge-bg-error);--bs-attachment-badge-bg-document:var(--bs-badge-bg-info);--bs-attachment-remove-bg:var(--bs-button-neutral-container);--bs-attachment-remove-hover:var(--bs-button-neutral-hover);--bs-attachment-remove-pressed:var(--bs-button-neutral-pressed);--bs-attachment-remove-focus:var(--bs-border-neutral-focus)}.bs-attachment{box-sizing:border-box;position:relative;display:inline-flex;font-family:inherit}.bs-attachment__thumbnail{position:relative;width:var(--bs-attachment-size);height:var(--bs-attachment-size);border-radius:var(--bs-attachment-radius);overflow:hidden}.bs-attachment--loading .bs-attachment__thumbnail{border:var(--bs-border-width-thin) solid var(--bs-attachment-border-color)}.bs-attachment__image{display:block;width:100%;height:100%;object-fit:cover}.bs-attachment--loading .bs-attachment__image{filter:blur(2px)}.bs-attachment__spinner--overlay{position:absolute;top:50%;left:50%}.bs-attachment__card{box-sizing:border-box;display:flex;flex-direction:column;align-items:flex-start;gap:var(--bs-spacing-100);width:var(--bs-attachment-size);height:var(--bs-attachment-size);padding:var(--bs-spacing-100);background:var(--bs-attachment-card-bg);border:var(--bs-border-width-thin) solid var(--bs-attachment-border-color);border-radius:var(--bs-attachment-radius)}.bs-attachment__filename{margin:0;flex:1 0 0;min-height:0;width:100%;overflow:hidden;color:var(--bs-attachment-filename-color);font-size:var(--bs-font-size-xs);line-height:calc(var(--bs-line-height-caption-sm) * 1px);text-overflow:ellipsis;word-break:break-word}.bs-attachment__badge{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;padding:var(--bs-spacing-50);border-radius:var(--bs-border-radius-50)}.bs-attachment__badge--pdf{background:var(--bs-attachment-badge-bg-pdf)}.bs-attachment__badge--document{background:var(--bs-attachment-badge-bg-document)}.bs-attachment__remove{box-sizing:border-box;position:absolute;top:var(--bs-spacing-50);right:var(--bs-spacing-50);display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;padding:0;background:var(--bs-attachment-remove-bg);border:none;border-radius:var(--bs-border-radius-50);color:var(--bs-icon-default);cursor:pointer;opacity:0;pointer-events:none;transition:background-color var(--bs-duration-fast) var(--bs-easing-standard), opacity var(--bs-duration-fast) var(--bs-easing-standard)}.bs-attachment__remove:hover{background:var(--bs-attachment-remove-hover)}.bs-attachment__remove:active{background:var(--bs-attachment-remove-pressed)}.bs-attachment:hover .bs-attachment__remove,.bs-attachment:focus-within .bs-attachment__remove{opacity:1;pointer-events:auto}.bs-attachment__remove:focus-visible{outline:2px solid var(--bs-attachment-remove-focus);outline-offset:1px}.bs-attachment__spinner{display:inline-block;box-sizing:border-box;border:2px solid rgba(255, 255, 255, 0.35);border-top-color:var(--bs-white);border-radius:50%;animation:bs-attachment-spin 0.8s linear infinite}.bs-attachment__spinner.bs-attachment__spinner--overlay{animation-name:bs-attachment-spin-centered}@keyframes bs-attachment-spin{to{transform:rotate(360deg)}}@keyframes bs-attachment-spin-centered{from{transform:translate(-50%, -50%) rotate(0deg)}to{transform:translate(-50%, -50%) rotate(360deg)}}@media (prefers-reduced-motion: reduce){.bs-attachment__spinner{animation:none}}`;
|
|
4
|
+
|
|
5
|
+
const BsAttachment = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
this.bsRemove = createEvent(this, "bsRemove");
|
|
9
|
+
}
|
|
10
|
+
/** Which kind of attachment preview to render. */
|
|
11
|
+
type = 'image';
|
|
12
|
+
/** The filename shown on the card. Only used when `type` is "pdf" or "document". */
|
|
13
|
+
fileName = 'Attachment';
|
|
14
|
+
/** The thumbnail image URL. Only used when `type` is "image". */
|
|
15
|
+
imageSrc;
|
|
16
|
+
/** Accessible alt text for the image thumbnail. Only used when `type` is "image". */
|
|
17
|
+
imageAlt = '';
|
|
18
|
+
/** Shows an upload-in-progress spinner (blurred + overlaid for images, in the badge for files). */
|
|
19
|
+
loading = false;
|
|
20
|
+
/** Whether the hover/focus-revealed remove button is rendered at all. */
|
|
21
|
+
removable = true;
|
|
22
|
+
/** Fires when the remove button is clicked. */
|
|
23
|
+
bsRemove;
|
|
24
|
+
onRemoveClick = () => {
|
|
25
|
+
this.bsRemove.emit();
|
|
26
|
+
};
|
|
27
|
+
render() {
|
|
28
|
+
const isImage = this.type === 'image';
|
|
29
|
+
return (h("div", { key: '7cebfc51b0453ac6c1fa57d38856b4b54f15def9', class: { 'bs-attachment': true, 'bs-attachment--loading': this.loading }, "aria-busy": this.loading ? 'true' : 'false' }, isImage ? this.renderImage() : this.renderCard(), this.removable && (h("button", { key: '935eb0f9507a9c9d24a1a6121c2fcd0575ac9d16', type: "button", part: "remove", class: "bs-attachment__remove", "aria-label": "Remove attachment", onClick: this.onRemoveClick }, h(CloseIcon, { key: '00e45c411ec831a66dd29d039568f57fc97b3930' })))));
|
|
30
|
+
}
|
|
31
|
+
renderImage() {
|
|
32
|
+
return (h("div", { part: "thumbnail", class: "bs-attachment__thumbnail" }, h("img", { class: "bs-attachment__image", src: this.imageSrc, alt: this.imageAlt }), this.loading && h(Spinner, { class: "bs-attachment__spinner bs-attachment__spinner--overlay", size: 16 })));
|
|
33
|
+
}
|
|
34
|
+
renderCard() {
|
|
35
|
+
return (h("div", { part: "card", class: "bs-attachment__card" }, h("p", { part: "filename", class: "bs-attachment__filename" }, this.fileName), h("span", { part: "badge", class: `bs-attachment__badge bs-attachment__badge--${this.type}` }, this.loading ? h(Spinner, { size: 16 }) : this.type === 'pdf' ? h(FilePdfIcon, null) : h(FileDocIcon, null))));
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
const Spinner = ({ class: className, size = 16 }) => (h("span", { class: `bs-attachment__spinner ${className ?? ''}`, style: { width: `${size}px`, height: `${size}px` }, role: "status", "aria-label": "Uploading" }));
|
|
39
|
+
const CloseIcon = () => (h("svg", { width: "8", height: "8", viewBox: "0 0 8 8", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, h("path", { d: "M6.25 1.75L1.75 6.25", stroke: "currentColor", "stroke-width": "0.666667", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M6.25 6.25L1.75 1.75", stroke: "currentColor", "stroke-width": "0.666667", "stroke-linecap": "round", "stroke-linejoin": "round" })));
|
|
40
|
+
const FilePdfIcon = () => (h("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, h("path", { d: "M13.5 9.5H11.5V13", stroke: "white", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M13 11.5H11.5", stroke: "white", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M3 12H4C4.33152 12 4.64946 11.8683 4.88388 11.6339C5.1183 11.3995 5.25 11.0815 5.25 10.75C5.25 10.4185 5.1183 10.1005 4.88388 9.86612C4.64946 9.6317 4.33152 9.5 4 9.5H3V13", stroke: "white", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M7 9.5V13H8C8.46413 13 8.90925 12.8156 9.23744 12.4874C9.56563 12.1592 9.75 11.7141 9.75 11.25C9.75 10.7859 9.56563 10.3408 9.23744 10.0126C8.90925 9.68437 8.46413 9.5 8 9.5H7Z", stroke: "white", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M3 7V2.5C3 2.36739 3.05268 2.24021 3.14645 2.14645C3.24021 2.05268 3.36739 2 3.5 2H9.5L13 5.5V7", stroke: "white", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M9.5 2V5.5H13", stroke: "white", "stroke-linecap": "round", "stroke-linejoin": "round" })));
|
|
41
|
+
const FileDocIcon = () => (h("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, h("path", { d: "M2.25 9.5V13H3.25C3.71413 13 4.15925 12.8156 4.48744 12.4874C4.81563 12.1592 5 11.7141 5 11.25C5 10.7859 4.81563 10.3408 4.48744 10.0126C4.15925 9.68437 3.71413 9.5 3.25 9.5H2.25Z", stroke: "white", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M13.5 12.5544C13.3724 12.6928 13.2179 12.8038 13.046 12.8804C12.874 12.957 12.6882 12.9977 12.5 13C11.6712 13 11 12.2163 11 11.25C11 10.2837 11.6712 9.5 12.5 9.5C12.6882 9.50228 12.874 9.54298 13.046 9.61961C13.2179 9.69624 13.3724 9.80718 13.5 9.94563", stroke: "white", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M3 7V2.5C3 2.36739 3.05268 2.24021 3.14645 2.14645C3.24021 2.05268 3.36739 2 3.5 2H9.5L13 5.5V7", stroke: "white", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M9.5 2V5.5H13", stroke: "white", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M8 13C8.82843 13 9.5 12.2165 9.5 11.25C9.5 10.2835 8.82843 9.5 8 9.5C7.17157 9.5 6.5 10.2835 6.5 11.25C6.5 12.2165 7.17157 13 8 13Z", stroke: "white", "stroke-linecap": "round", "stroke-linejoin": "round" })));
|
|
42
|
+
BsAttachment.style = bsAttachmentCss();
|
|
43
|
+
|
|
44
|
+
export { BsAttachment as bs_attachment };
|
|
@@ -9,7 +9,7 @@ const BsBadge = class {
|
|
|
9
9
|
/** Maps directly to the brandsync-tokens `--bs-badge-bg-*` / `--bs-badge-text-*` sets. */
|
|
10
10
|
variant = 'default';
|
|
11
11
|
render() {
|
|
12
|
-
return (h("span", { key: '
|
|
12
|
+
return (h("span", { key: '33a4103fad2c535c1eeb787a4ba8e7633ef92082', part: "container", class: `bs-badge bs-badge--${this.variant}` }, h("slot", { key: '68c95c6e9dd8a90fbec5853f7274f5ff2859faa3' })));
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
15
|
BsBadge.style = bsBadgeCss();
|