@brandsync/wc 0.0.1 → 0.0.3
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 +7 -1
- package/dist/brandsync-wc/brandsync-wc.esm.js +1 -1
- package/dist/brandsync-wc/{p-e38a9744.entry.js → p-2b693545.entry.js} +1 -1
- package/dist/brandsync-wc/p-69faa19c.entry.js +1 -0
- package/dist/brandsync-wc/{p-2c4df28d.entry.js → p-f0ca3562.entry.js} +1 -1
- package/dist/brandsync-wc/{p-db3934d2.entry.js → p-f9e93a35.entry.js} +1 -1
- package/dist/cjs/brandsync-wc.cjs.js +1 -1
- package/dist/cjs/bs-button-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/bs-composer.cjs.entry.js +1 -1
- package/dist/cjs/bs-data-table.cjs.entry.js +2 -2
- package/dist/cjs/bs-input.cjs.entry.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/bs-button-skeleton/bs-button-skeleton.js +1 -1
- package/dist/collection/components/bs-composer/bs-composer.cmp.test.js +13 -0
- package/dist/collection/components/bs-composer/bs-composer.js +11 -1
- package/dist/collection/components/bs-data-table/bs-data-table.js +2 -2
- package/dist/collection/components/bs-input/bs-input.js +2 -2
- package/dist/components/bs-button-skeleton.js +1 -1
- 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/esm/brandsync-wc.js +1 -1
- package/dist/esm/bs-button-skeleton.entry.js +1 -1
- package/dist/esm/bs-composer.entry.js +1 -1
- package/dist/esm/bs-data-table.entry.js +2 -2
- package/dist/esm/bs-input.entry.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/bs-composer/bs-composer.d.ts +10 -0
- package/dist/types/components.d.ts +20 -0
- package/package.json +2 -1
- package/dist/brandsync-wc/p-042ad15a.entry.js +0 -1
package/custom-elements.json
CHANGED
|
@@ -432,7 +432,7 @@
|
|
|
432
432
|
"customElement": true,
|
|
433
433
|
"tagName": "bs-composer",
|
|
434
434
|
"name": "BsComposer",
|
|
435
|
-
"description": "A chat composer input for Genie AI-style conversational interfaces: a text field\nplus an attach button, a mic/voice-recording toggle, and a single primary action button whose\nicon and behavior change with `state` (send, stop generating, or confirm a voice recording).\n\n## When to use\n- The message-entry bar for an AI chat/assistant or human support conversation.\n\n## When not to use\n- A general-purpose text field — use `bs-input` instead; this component's layout and states are\n purpose-built for a chat composer, not a generic form field.",
|
|
435
|
+
"description": "A chat composer input for Genie AI-style conversational interfaces: a text field\nplus an attach button, a mic/voice-recording toggle, and a single primary action button whose\nicon and behavior change with `state` (send, stop generating, or confirm a voice recording).\n\n## When to use\n- The message-entry bar for an AI chat/assistant or human support conversation.\n\n## When not to use\n- A general-purpose text field — use `bs-input` instead; this component's layout and states are\n purpose-built for a chat composer, not a generic form field.\n\n## Focus\nUses `shadow: { delegatesFocus: true }`, so calling `.focus()` on the `<bs-composer>` host\nelement itself (not just its internal `<input>`) moves focus into the shadow-DOM text field --\nuseful for e.g. focusing the composer after a parent view mounts, without reaching into its\nshadow root.",
|
|
436
436
|
"attributes": [
|
|
437
437
|
{
|
|
438
438
|
"name": "aria-label",
|
|
@@ -599,6 +599,12 @@
|
|
|
599
599
|
}
|
|
600
600
|
}
|
|
601
601
|
],
|
|
602
|
+
"slots": [
|
|
603
|
+
{
|
|
604
|
+
"name": "actions-end",
|
|
605
|
+
"description": "Extra consumer-supplied controls appended after the primary action button\nin the controls row (e.g. a product-specific \"Tools\" button). Slotted content is placed\ninline in the same flex row as attach/mic/action, so a slotted element should size itself to\nroughly match `--bs-composer-button-size` to align visually."
|
|
606
|
+
}
|
|
607
|
+
],
|
|
602
608
|
"cssParts": [
|
|
603
609
|
{
|
|
604
610
|
"name": "action",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as a,g as e,b as o}from"./p-BOj_41o9.js";export{s as setNonce}from"./p-BOj_41o9.js";(()=>{const e=import.meta.url,s={};return""!==e&&(s.resourcesUrl=new URL(".",e).href),a(s)})().then((async a=>(await e(),o([["p-3134f5f5",[[769,"bs-badge",{variant:[1]}]]],["p-c2cc0d6f",[[785,"bs-button",{variant:[1],size:[1],disabled:[4],type:[1],ariaLabel:[1,"aria-label"],hasIcon:[32],hasEndIcon:[32],hasLabel:[32]}]]],["p-
|
|
1
|
+
import{p as a,g as e,b as o}from"./p-BOj_41o9.js";export{s as setNonce}from"./p-BOj_41o9.js";(()=>{const e=import.meta.url,s={};return""!==e&&(s.resourcesUrl=new URL(".",e).href),a(s)})().then((async a=>(await e(),o([["p-3134f5f5",[[769,"bs-badge",{variant:[1]}]]],["p-c2cc0d6f",[[785,"bs-button",{variant:[1],size:[1],disabled:[4],type:[1],ariaLabel:[1,"aria-label"],hasIcon:[32],hasEndIcon:[32],hasLabel:[32]}]]],["p-2b693545",[[513,"bs-button-skeleton",{size:[1]}]]],["p-5739acaf",[[769,"bs-card",{surface:[1]}]]],["p-69faa19c",[[785,"bs-composer",{variant:[1],placeholder:[1],value:[1],state:[1],ariaLabel:[1,"aria-label"]}]]],["p-f0ca3562",[[513,"bs-data-table",{columns:[16],rows:[16],sortColumn:[1,"sort-column"],sortDirection:[1,"sort-direction"],selectable:[4],cellRenderer:[16],selectedIds:[32]}]]],["p-f9e93a35",[[529,"bs-input",{value:[1],type:[1],label:[1],placeholder:[1],description:[1],error:[1],disabled:[4]}]]],["p-da11e421",[[769,"bs-modal",{open:[1540],heading:[1],size:[1],hasFooter:[32]},[[4,"keydown","onKeydown"],[4,"focusin","onFocusIn"]]]]]],a))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as e}from"./p-BOj_41o9.js";const s=class{constructor(e){t(this,e)}size="md";render(){return e("span",{key:"
|
|
1
|
+
import{r as t,h as e}from"./p-BOj_41o9.js";const s=class{constructor(e){t(this,e)}size="md";render(){return e("span",{key:"5b51879877adc5abbe6f28d79f27a1f33654a1a4",part:"container",class:`bs-button-skeleton bs-button-skeleton--${this.size}`,role:"status","aria-label":"Loading"})}};s.style=":host{display:inline-block;--bs-button-skeleton-height-sm:var(--bs-spacing-500);--bs-button-skeleton-height-md:var(--bs-spacing-600);--bs-button-skeleton-height-lg:var(--bs-spacing-700);--bs-button-skeleton-width:96px}.bs-button-skeleton{display:inline-block;border-radius:var(--bs-border-radius-100);width:var(--bs-button-skeleton-width);background:var(--bs-color-neutral-container);animation:bs-button-skeleton-pulse 1.5s ease-in-out infinite}.bs-button-skeleton--sm{height:var(--bs-button-skeleton-height-sm)}.bs-button-skeleton--md{height:var(--bs-button-skeleton-height-md)}.bs-button-skeleton--lg{height:var(--bs-button-skeleton-height-lg)}@keyframes bs-button-skeleton-pulse{0%,100%{opacity:1}50%{opacity:0.5}}@media (prefers-reduced-motion: reduce){.bs-button-skeleton{animation:none}}";export{s as bs_button_skeleton}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as o,c as s,h as r}from"./p-BOj_41o9.js";const e={ai:"Ask Genie something...",human:"Message your support agent..."},t=[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=class{constructor(r){o(this,r),this.bsInput=s(this,"bsInput"),this.bsSubmit=s(this,"bsSubmit"),this.bsStop=s(this,"bsStop"),this.bsVoiceConfirm=s(this,"bsVoiceConfirm"),this.bsAttach=s(this,"bsAttach"),this.bsMicToggle=s(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 r("generating"===this.state?b:"recording"===this.state?d:n,null)}render(){const o="disabled"===this.state,s="recording"===this.state;return r("div",{key:"04c250520759948faa89bd625646a62c79cc6cee",class:`bs-composer bs-composer--${this.state} bs-composer--${this.variant}`},r("div",{key:"8d5d99b90141d3dbeff1b31851cbbb5eaae3d920",class:"bs-composer__text-row"},r("input",{key:"4eb1ef1b51a41de86da466c8a2c9ea93a7746b43",part:"input",class:"bs-composer__input",type:"text",value:this.value,placeholder:this.placeholder??e[this.variant],disabled:o,"aria-label":this.ariaLabel,onInput:this.onInput})),r("div",{key:"8a733762c56ae3f4de7f2af1d89fb05d521b1d17",class:"bs-composer__controls-row"},r("button",{key:"b4cd13546ec447f2650a02f43dc2fc0b6d65c8ef",type:"button",part:"attach",class:"bs-composer__attach","aria-label":"Attach",onClick:this.onAttachClick},r(a,{key:"af8da06a2550d5c37d3737b145ad70c006e1ce66"})),s?r("span",{class:"bs-composer__waveform","aria-hidden":"true"},t.map((o=>r("span",{class:"bs-composer__waveform-bar",style:{"--bs-composer-bar-height":`${o}px`}})))):r("span",{class:"bs-composer__spacer"}),r("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},r(s?b:c,null)),r("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()),r("slot",{key:"6779413b48314161a75ec75be273e72fe4d622c3",name:"actions-end"})))}static get delegatesFocus(){return!0}},a=()=>r("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},r("path",{d:"M8 2.5V13.5M2.5 8H13.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})),c=()=>r("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},r("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"}),r("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"}),r("path",{d:"M8 12V14.5",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round"})),n=()=>r("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},r("path",{d:"M13.5 12H7.5",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),r("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"})),b=()=>r("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},r("rect",{x:"6",y:"6",width:"8",height:"8",rx:"1.5",fill:"currentColor"})),d=()=>r("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},r("path",{d:"M4.5 10.5L8 14L15.5 6",stroke:"currentColor","stroke-width":"1.75","stroke-linecap":"round","stroke-linejoin":"round"}));i.style=":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}";export{i as bs_composer}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,h as a}from"./p-BOj_41o9.js";const s=class{constructor(a){t(this,a),this.bsSort=e(this,"bsSort"),this.bsRowSelect=e(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 a=e.target.checked,s=new Set(this.selectedIds);a?s.add(t.id):s.delete(t.id),this.selectedIds=s,this.bsRowSelect.emit({id:t.id,selected:a})};render(){return a("table",{key:"
|
|
1
|
+
import{r as t,c as e,h as a}from"./p-BOj_41o9.js";const s=class{constructor(a){t(this,a),this.bsSort=e(this,"bsSort"),this.bsRowSelect=e(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 a=e.target.checked,s=new Set(this.selectedIds);a?s.add(t.id):s.delete(t.id),this.selectedIds=s,this.bsRowSelect.emit({id:t.id,selected:a})};render(){return a("table",{key:"8276a72f6539690dd8189cd29e42993c3d61862c",part:"table",class:"bs-data-table"},a("thead",{key:"2d3e42222eec0bcbe3d06f26f7a3ae53dd5ccdc0",part:"head"},a("tr",{key:"45994ea59d9a1a347bb8abdf25d7b1b919822a61"},this.selectable&&a("th",{key:"05d5efa74feee1545e1c4b9dfc45acd7ffd10e6a",class:"bs-data-table__select-col"}),this.columns.map((t=>{const e=this.sortColumn===t.key;return a("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?a("button",{type:"button",class:"bs-data-table__sort-button",onClick:()=>this.onHeaderClick(t)},t.label,e&&a("span",{class:"bs-data-table__sort-indicator"},"asc"===this.sortDirection?" ▲":" ▼")):t.label)})))),a("tbody",{key:"9c1dc006341b63e5d22df655836f326ba27e7b9d",part:"body"},this.rows.map((t=>a("tr",{part:"row",class:"bs-data-table__row"},this.selectable&&a("td",{class:"bs-data-table__select-col"},a("input",{type:"checkbox",checked:this.selectedIds.has(t.id),onChange:e=>this.onRowCheckboxChange(t,e)})),this.columns.map((e=>this.cellRenderer?a("td",{part:"cell",class:"bs-data-table__cell",innerHTML:this.cellRenderer(t,e)}):a("td",{part:"cell",class:"bs-data-table__cell"},String(t[e.key]??"")))))))))}};s.style=":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)}";export{s as bs_data_table}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r,c as s,h as t}from"./p-BOj_41o9.js";const i=class{constructor(t){r(this,t),this.bsInput=s(this,"bsInput"),this.bsChange=s(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 t("div",{key:"
|
|
1
|
+
import{r,c as s,h as t}from"./p-BOj_41o9.js";const i=class{constructor(t){r(this,t),this.bsInput=s(this,"bsInput"),this.bsChange=s(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 t("div",{key:"d6b382224eba07a1d6cf3de0707cd9e8afe3790f",class:"bs-input "+(this.error?"bs-input--error":"")},this.label&&t("label",{key:"72b14f0557fb0cd3648daf6839b2ae3f1e9547f0",part:"label",class:"bs-input__label",htmlFor:"control"},this.label),t("input",{key:"8ff7c5281c853fa9567f997b506dd722ddd866b5",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?t("span",{id:"description-or-error",part:"error",class:"bs-input__error"},this.error):this.description?t("span",{id:"description-or-error",part:"description",class:"bs-input__description"},this.description):null)}static get delegatesFocus(){return!0}};i.style=":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)}";export{i as bs_input}
|
|
@@ -18,7 +18,7 @@ var patchBrowser = () => {
|
|
|
18
18
|
|
|
19
19
|
patchBrowser().then(async (options) => {
|
|
20
20
|
await index.globalScripts();
|
|
21
|
-
return index.bootstrapLazy([["bs-badge.cjs",[[769,"bs-badge",{"variant":[1]}]]],["bs-button.cjs",[[785,"bs-button",{"variant":[1],"size":[1],"disabled":[4],"type":[1],"ariaLabel":[1,"aria-label"],"hasIcon":[32],"hasEndIcon":[32],"hasLabel":[32]}]]],["bs-button-skeleton.cjs",[[513,"bs-button-skeleton",{"size":[1]}]]],["bs-card.cjs",[[769,"bs-card",{"surface":[1]}]]],["bs-composer.cjs",[[
|
|
21
|
+
return index.bootstrapLazy([["bs-badge.cjs",[[769,"bs-badge",{"variant":[1]}]]],["bs-button.cjs",[[785,"bs-button",{"variant":[1],"size":[1],"disabled":[4],"type":[1],"ariaLabel":[1,"aria-label"],"hasIcon":[32],"hasEndIcon":[32],"hasLabel":[32]}]]],["bs-button-skeleton.cjs",[[513,"bs-button-skeleton",{"size":[1]}]]],["bs-card.cjs",[[769,"bs-card",{"surface":[1]}]]],["bs-composer.cjs",[[785,"bs-composer",{"variant":[1],"placeholder":[1],"value":[1],"state":[1],"ariaLabel":[1,"aria-label"]}]]],["bs-data-table.cjs",[[513,"bs-data-table",{"columns":[16],"rows":[16],"sortColumn":[1,"sort-column"],"sortDirection":[1,"sort-direction"],"selectable":[4],"cellRenderer":[16],"selectedIds":[32]}]]],["bs-input.cjs",[[529,"bs-input",{"value":[1],"type":[1],"label":[1],"placeholder":[1],"description":[1],"error":[1],"disabled":[4]}]]],["bs-modal.cjs",[[769,"bs-modal",{"open":[1540],"heading":[1],"size":[1],"hasFooter":[32]},[[4,"keydown","onKeydown"],[4,"focusin","onFocusIn"]]]]]], options);
|
|
22
22
|
});
|
|
23
23
|
|
|
24
24
|
exports.setNonce = index.setNonce;
|
|
@@ -11,7 +11,7 @@ const BsButtonSkeleton = class {
|
|
|
11
11
|
/** Sizing scale, matching the `bs-button` size it stands in for. */
|
|
12
12
|
size = 'md';
|
|
13
13
|
render() {
|
|
14
|
-
return index.h("span", { key: '
|
|
14
|
+
return index.h("span", { key: '5b51879877adc5abbe6f28d79f27a1f33654a1a4', part: "container", class: `bs-button-skeleton bs-button-skeleton--${this.size}`, role: "status", "aria-label": "Loading" });
|
|
15
15
|
}
|
|
16
16
|
};
|
|
17
17
|
BsButtonSkeleton.style = bsButtonSkeletonCss();
|
|
@@ -101,7 +101,7 @@ const BsComposer = class {
|
|
|
101
101
|
const placeholder = this.placeholder ?? DEFAULT_PLACEHOLDERS[this.variant];
|
|
102
102
|
const disabled = this.state === 'disabled';
|
|
103
103
|
const recording = this.state === 'recording';
|
|
104
|
-
return (index.h("div", { key: '
|
|
104
|
+
return (index.h("div", { key: '04c250520759948faa89bd625646a62c79cc6cee', class: `bs-composer bs-composer--${this.state} bs-composer--${this.variant}` }, index.h("div", { key: '8d5d99b90141d3dbeff1b31851cbbb5eaae3d920', class: "bs-composer__text-row" }, index.h("input", { key: '4eb1ef1b51a41de86da466c8a2c9ea93a7746b43', part: "input", class: "bs-composer__input", type: "text", value: this.value, placeholder: placeholder, disabled: disabled, "aria-label": this.ariaLabel, onInput: this.onInput })), index.h("div", { key: '8a733762c56ae3f4de7f2af1d89fb05d521b1d17', class: "bs-composer__controls-row" }, index.h("button", { key: 'b4cd13546ec447f2650a02f43dc2fc0b6d65c8ef', type: "button", part: "attach", class: "bs-composer__attach", "aria-label": "Attach", onClick: this.onAttachClick }, index.h(PlusIcon, { key: 'af8da06a2550d5c37d3737b145ad70c006e1ce66' })), recording ? (index.h("span", { class: "bs-composer__waveform", "aria-hidden": "true" }, WAVEFORM_BAR_HEIGHTS.map(height => (index.h("span", { class: "bs-composer__waveform-bar", style: { '--bs-composer-bar-height': `${height}px` } }))))) : (index.h("span", { class: "bs-composer__spacer" })), index.h("button", { key: '18b81bf7dd6057c3954566cd12994bb8589ff4ee', type: "button", part: "mic", class: `bs-composer__mic ${recording ? 'bs-composer__mic--recording' : ''}`, "aria-label": recording ? 'Stop recording' : 'Start voice input', disabled: disabled, onClick: this.onMicClick }, recording ? index.h(StopIcon, null) : index.h(MicIcon, null)), index.h("button", { key: 'a1cf9435fa7dc8e52db7ae148e07fde06971f27c', type: "button", part: "action", class: `bs-composer__action bs-composer__action--${this.state}`, "aria-label": this.actionLabel(), disabled: disabled, onClick: this.onActionClick }, this.renderActionIcon()), index.h("slot", { key: '6779413b48314161a75ec75be273e72fe4d622c3', name: "actions-end" }))));
|
|
105
105
|
}
|
|
106
106
|
static get delegatesFocus() { return true; }
|
|
107
107
|
};
|
|
@@ -43,11 +43,11 @@ const BsDataTable = class {
|
|
|
43
43
|
this.bsRowSelect.emit({ id: row.id, selected });
|
|
44
44
|
};
|
|
45
45
|
render() {
|
|
46
|
-
return (index.h("table", { key: '
|
|
46
|
+
return (index.h("table", { key: '8276a72f6539690dd8189cd29e42993c3d61862c', part: "table", class: "bs-data-table" }, index.h("thead", { key: '2d3e42222eec0bcbe3d06f26f7a3ae53dd5ccdc0', part: "head" }, index.h("tr", { key: '45994ea59d9a1a347bb8abdf25d7b1b919822a61' }, this.selectable && index.h("th", { key: '05d5efa74feee1545e1c4b9dfc45acd7ffd10e6a', class: "bs-data-table__select-col" }), this.columns.map(column => {
|
|
47
47
|
const isSorted = this.sortColumn === column.key;
|
|
48
48
|
const ariaSort = column.sortable ? (isSorted ? (this.sortDirection === 'asc' ? 'ascending' : 'descending') : 'none') : undefined;
|
|
49
49
|
return (index.h("th", { part: "header-cell", class: "bs-data-table__header-cell", "aria-sort": ariaSort }, column.sortable ? (index.h("button", { type: "button", class: "bs-data-table__sort-button", onClick: () => this.onHeaderClick(column) }, column.label, isSorted && index.h("span", { class: "bs-data-table__sort-indicator" }, this.sortDirection === 'asc' ? ' ▲' : ' ▼'))) : (column.label)));
|
|
50
|
-
}))), index.h("tbody", { key: '
|
|
50
|
+
}))), index.h("tbody", { key: '9c1dc006341b63e5d22df655836f326ba27e7b9d', part: "body" }, this.rows.map(row => (index.h("tr", { part: "row", class: "bs-data-table__row" }, this.selectable && (index.h("td", { class: "bs-data-table__select-col" }, index.h("input", { type: "checkbox", checked: this.selectedIds.has(row.id), onChange: ev => this.onRowCheckboxChange(row, ev) }))), this.columns.map(column => this.cellRenderer ? (
|
|
51
51
|
// cellRenderer is a developer-supplied, trusted function (JS-property-only, never
|
|
52
52
|
// derived from untrusted input) -- its HTML output is intentionally not escaped,
|
|
53
53
|
// same trust model as React's dangerouslySetInnerHTML.
|
|
@@ -30,10 +30,10 @@ const BsInput = class {
|
|
|
30
30
|
this.bsChange.emit(value);
|
|
31
31
|
};
|
|
32
32
|
render() {
|
|
33
|
-
return (index.h("div", { key: '
|
|
33
|
+
return (index.h("div", { key: 'd6b382224eba07a1d6cf3de0707cd9e8afe3790f', class: `bs-input ${this.error ? 'bs-input--error' : ''}` }, this.label && (
|
|
34
34
|
// "control" is a fixed id, not a generated one -- safe because Shadow DOM scopes ids
|
|
35
35
|
// to this instance's own shadow root, so it can never collide with another bs-input.
|
|
36
|
-
index.h("label", { key: '
|
|
36
|
+
index.h("label", { key: '72b14f0557fb0cd3648daf6839b2ae3f1e9547f0', part: "label", class: "bs-input__label", htmlFor: "control" }, this.label)), index.h("input", { key: '8ff7c5281c853fa9567f997b506dd722ddd866b5', 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' : undefined, "aria-invalid": this.error ? 'true' : undefined, onInput: this.onInput, onChange: this.onChange }), this.error ? (index.h("span", { id: "description-or-error", part: "error", class: "bs-input__error" }, this.error)) : this.description ? (index.h("span", { id: "description-or-error", part: "description", class: "bs-input__description" }, this.description)) : null));
|
|
37
37
|
}
|
|
38
38
|
static get delegatesFocus() { return true; }
|
|
39
39
|
};
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -5,7 +5,7 @@ var index = require('./index-nyOcuVbF.js');
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|
|
6
6
|
if (typeof window === 'undefined') return undefined;
|
|
7
7
|
await index.globalScripts();
|
|
8
|
-
return index.bootstrapLazy([["bs-badge.cjs",[[769,"bs-badge",{"variant":[1]}]]],["bs-button.cjs",[[785,"bs-button",{"variant":[1],"size":[1],"disabled":[4],"type":[1],"ariaLabel":[1,"aria-label"],"hasIcon":[32],"hasEndIcon":[32],"hasLabel":[32]}]]],["bs-button-skeleton.cjs",[[513,"bs-button-skeleton",{"size":[1]}]]],["bs-card.cjs",[[769,"bs-card",{"surface":[1]}]]],["bs-composer.cjs",[[
|
|
8
|
+
return index.bootstrapLazy([["bs-badge.cjs",[[769,"bs-badge",{"variant":[1]}]]],["bs-button.cjs",[[785,"bs-button",{"variant":[1],"size":[1],"disabled":[4],"type":[1],"ariaLabel":[1,"aria-label"],"hasIcon":[32],"hasEndIcon":[32],"hasLabel":[32]}]]],["bs-button-skeleton.cjs",[[513,"bs-button-skeleton",{"size":[1]}]]],["bs-card.cjs",[[769,"bs-card",{"surface":[1]}]]],["bs-composer.cjs",[[785,"bs-composer",{"variant":[1],"placeholder":[1],"value":[1],"state":[1],"ariaLabel":[1,"aria-label"]}]]],["bs-data-table.cjs",[[513,"bs-data-table",{"columns":[16],"rows":[16],"sortColumn":[1,"sort-column"],"sortDirection":[1,"sort-direction"],"selectable":[4],"cellRenderer":[16],"selectedIds":[32]}]]],["bs-input.cjs",[[529,"bs-input",{"value":[1],"type":[1],"label":[1],"placeholder":[1],"description":[1],"error":[1],"disabled":[4]}]]],["bs-modal.cjs",[[769,"bs-modal",{"open":[1540],"heading":[1],"size":[1],"hasFooter":[32]},[[4,"keydown","onKeydown"],[4,"focusin","onFocusIn"]]]]]], options);
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
exports.setNonce = index.setNonce;
|
|
@@ -25,7 +25,7 @@ export class BsButtonSkeleton {
|
|
|
25
25
|
/** Sizing scale, matching the `bs-button` size it stands in for. */
|
|
26
26
|
size = 'md';
|
|
27
27
|
render() {
|
|
28
|
-
return h("span", { key: '
|
|
28
|
+
return h("span", { key: '5b51879877adc5abbe6f28d79f27a1f33654a1a4', part: "container", class: `bs-button-skeleton bs-button-skeleton--${this.size}`, role: "status", "aria-label": "Loading" });
|
|
29
29
|
}
|
|
30
30
|
static get is() { return "bs-button-skeleton"; }
|
|
31
31
|
static get encapsulation() { return "shadow"; }
|
|
@@ -31,6 +31,19 @@ describe('bs-composer', () => {
|
|
|
31
31
|
const input = root.shadowRoot.querySelector('input');
|
|
32
32
|
expect(input).toEqualAttribute('aria-label', 'Message');
|
|
33
33
|
});
|
|
34
|
+
it('renders consumer-supplied content in the actions-end slot, after the primary action button', async () => {
|
|
35
|
+
const { root } = await render(h("bs-composer", null, h("button", { slot: "actions-end", "aria-label": "Tools" }, "Tools")));
|
|
36
|
+
const slot = root.shadowRoot.querySelector('slot[name="actions-end"]');
|
|
37
|
+
expect(slot).not.toBeNull();
|
|
38
|
+
const assigned = slot.assignedElements();
|
|
39
|
+
expect(assigned).toHaveLength(1);
|
|
40
|
+
expect(assigned[0]).toEqualAttribute('aria-label', 'Tools');
|
|
41
|
+
const controlsRow = root.shadowRoot.querySelector('.bs-composer__controls-row');
|
|
42
|
+
const children = Array.from(controlsRow.children);
|
|
43
|
+
const slotIndex = children.indexOf(slot);
|
|
44
|
+
const actionIndex = children.findIndex(el => el.getAttribute('part') === 'action');
|
|
45
|
+
expect(slotIndex).toBeGreaterThan(actionIndex);
|
|
46
|
+
});
|
|
34
47
|
it('emits bsInput with the current value as the user types', async () => {
|
|
35
48
|
const { root, spyOnEvent } = await render(h("bs-composer", null));
|
|
36
49
|
const spy = spyOnEvent('bsInput');
|
|
@@ -22,6 +22,16 @@ const WAVEFORM_BAR_HEIGHTS = [
|
|
|
22
22
|
* - A general-purpose text field — use `bs-input` instead; this component's layout and states are
|
|
23
23
|
* purpose-built for a chat composer, not a generic form field.
|
|
24
24
|
*
|
|
25
|
+
* ## Focus
|
|
26
|
+
* Uses `shadow: { delegatesFocus: true }`, so calling `.focus()` on the `<bs-composer>` host
|
|
27
|
+
* element itself (not just its internal `<input>`) moves focus into the shadow-DOM text field --
|
|
28
|
+
* useful for e.g. focusing the composer after a parent view mounts, without reaching into its
|
|
29
|
+
* shadow root.
|
|
30
|
+
*
|
|
31
|
+
* @slot actions-end - Extra consumer-supplied controls appended after the primary action button
|
|
32
|
+
* in the controls row (e.g. a product-specific "Tools" button). Slotted content is placed
|
|
33
|
+
* inline in the same flex row as attach/mic/action, so a slotted element should size itself to
|
|
34
|
+
* roughly match `--bs-composer-button-size` to align visually.
|
|
25
35
|
* @part attach - The "+" attach button.
|
|
26
36
|
* @part input - The native text `<input>`.
|
|
27
37
|
* @part mic - The secondary icon button (microphone, or the stop-recording square while `state="recording"`).
|
|
@@ -121,7 +131,7 @@ export class BsComposer {
|
|
|
121
131
|
const placeholder = this.placeholder ?? DEFAULT_PLACEHOLDERS[this.variant];
|
|
122
132
|
const disabled = this.state === 'disabled';
|
|
123
133
|
const recording = this.state === 'recording';
|
|
124
|
-
return (h("div", { key: '
|
|
134
|
+
return (h("div", { key: '04c250520759948faa89bd625646a62c79cc6cee', class: `bs-composer bs-composer--${this.state} bs-composer--${this.variant}` }, h("div", { key: '8d5d99b90141d3dbeff1b31851cbbb5eaae3d920', class: "bs-composer__text-row" }, h("input", { key: '4eb1ef1b51a41de86da466c8a2c9ea93a7746b43', part: "input", class: "bs-composer__input", type: "text", value: this.value, placeholder: placeholder, disabled: disabled, "aria-label": this.ariaLabel, onInput: this.onInput })), h("div", { key: '8a733762c56ae3f4de7f2af1d89fb05d521b1d17', class: "bs-composer__controls-row" }, h("button", { key: 'b4cd13546ec447f2650a02f43dc2fc0b6d65c8ef', type: "button", part: "attach", class: "bs-composer__attach", "aria-label": "Attach", onClick: this.onAttachClick }, h(PlusIcon, { key: 'af8da06a2550d5c37d3737b145ad70c006e1ce66' })), recording ? (h("span", { class: "bs-composer__waveform", "aria-hidden": "true" }, WAVEFORM_BAR_HEIGHTS.map(height => (h("span", { class: "bs-composer__waveform-bar", style: { '--bs-composer-bar-height': `${height}px` } }))))) : (h("span", { class: "bs-composer__spacer" })), h("button", { key: '18b81bf7dd6057c3954566cd12994bb8589ff4ee', type: "button", part: "mic", class: `bs-composer__mic ${recording ? 'bs-composer__mic--recording' : ''}`, "aria-label": recording ? 'Stop recording' : 'Start voice input', disabled: disabled, onClick: this.onMicClick }, recording ? h(StopIcon, null) : h(MicIcon, null)), h("button", { key: 'a1cf9435fa7dc8e52db7ae148e07fde06971f27c', type: "button", part: "action", class: `bs-composer__action bs-composer__action--${this.state}`, "aria-label": this.actionLabel(), disabled: disabled, onClick: this.onActionClick }, this.renderActionIcon()), h("slot", { key: '6779413b48314161a75ec75be273e72fe4d622c3', name: "actions-end" }))));
|
|
125
135
|
}
|
|
126
136
|
static get is() { return "bs-composer"; }
|
|
127
137
|
static get encapsulation() { return "shadow"; }
|
|
@@ -54,11 +54,11 @@ export class BsDataTable {
|
|
|
54
54
|
this.bsRowSelect.emit({ id: row.id, selected });
|
|
55
55
|
};
|
|
56
56
|
render() {
|
|
57
|
-
return (h("table", { key: '
|
|
57
|
+
return (h("table", { key: '8276a72f6539690dd8189cd29e42993c3d61862c', part: "table", class: "bs-data-table" }, h("thead", { key: '2d3e42222eec0bcbe3d06f26f7a3ae53dd5ccdc0', part: "head" }, h("tr", { key: '45994ea59d9a1a347bb8abdf25d7b1b919822a61' }, this.selectable && h("th", { key: '05d5efa74feee1545e1c4b9dfc45acd7ffd10e6a', class: "bs-data-table__select-col" }), this.columns.map(column => {
|
|
58
58
|
const isSorted = this.sortColumn === column.key;
|
|
59
59
|
const ariaSort = column.sortable ? (isSorted ? (this.sortDirection === 'asc' ? 'ascending' : 'descending') : 'none') : undefined;
|
|
60
60
|
return (h("th", { part: "header-cell", class: "bs-data-table__header-cell", "aria-sort": ariaSort }, column.sortable ? (h("button", { type: "button", class: "bs-data-table__sort-button", onClick: () => this.onHeaderClick(column) }, column.label, isSorted && h("span", { class: "bs-data-table__sort-indicator" }, this.sortDirection === 'asc' ? ' ▲' : ' ▼'))) : (column.label)));
|
|
61
|
-
}))), h("tbody", { key: '
|
|
61
|
+
}))), h("tbody", { key: '9c1dc006341b63e5d22df655836f326ba27e7b9d', part: "body" }, this.rows.map(row => (h("tr", { part: "row", class: "bs-data-table__row" }, this.selectable && (h("td", { class: "bs-data-table__select-col" }, h("input", { type: "checkbox", checked: this.selectedIds.has(row.id), onChange: ev => this.onRowCheckboxChange(row, ev) }))), this.columns.map(column => this.cellRenderer ? (
|
|
62
62
|
// cellRenderer is a developer-supplied, trusted function (JS-property-only, never
|
|
63
63
|
// derived from untrusted input) -- its HTML output is intentionally not escaped,
|
|
64
64
|
// same trust model as React's dangerouslySetInnerHTML.
|
|
@@ -36,10 +36,10 @@ export class BsInput {
|
|
|
36
36
|
this.bsChange.emit(value);
|
|
37
37
|
};
|
|
38
38
|
render() {
|
|
39
|
-
return (h("div", { key: '
|
|
39
|
+
return (h("div", { key: 'd6b382224eba07a1d6cf3de0707cd9e8afe3790f', class: `bs-input ${this.error ? 'bs-input--error' : ''}` }, this.label && (
|
|
40
40
|
// "control" is a fixed id, not a generated one -- safe because Shadow DOM scopes ids
|
|
41
41
|
// to this instance's own shadow root, so it can never collide with another bs-input.
|
|
42
|
-
h("label", { key: '
|
|
42
|
+
h("label", { key: '72b14f0557fb0cd3648daf6839b2ae3f1e9547f0', part: "label", class: "bs-input__label", htmlFor: "control" }, this.label)), h("input", { key: '8ff7c5281c853fa9567f997b506dd722ddd866b5', 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' : undefined, "aria-invalid": this.error ? 'true' : undefined, onInput: this.onInput, onChange: this.onChange }), this.error ? (h("span", { id: "description-or-error", part: "error", class: "bs-input__error" }, this.error)) : this.description ? (h("span", { id: "description-or-error", part: "description", class: "bs-input__description" }, this.description)) : null));
|
|
43
43
|
}
|
|
44
44
|
static get is() { return "bs-input"; }
|
|
45
45
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t,p as e,H as s,h as n}from"./p-Cu4gTknX.js";const o=e(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow()}size="md";render(){return n("span",{key:"
|
|
1
|
+
import{t,p as e,H as s,h as n}from"./p-Cu4gTknX.js";const o=e(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow()}size="md";render(){return n("span",{key:"5b51879877adc5abbe6f28d79f27a1f33654a1a4",part:"container",class:"bs-button-skeleton bs-button-skeleton--"+this.size,role:"status","aria-label":"Loading"})}static get style(){return":host{display:inline-block;--bs-button-skeleton-height-sm:var(--bs-spacing-500);--bs-button-skeleton-height-md:var(--bs-spacing-600);--bs-button-skeleton-height-lg:var(--bs-spacing-700);--bs-button-skeleton-width:96px}.bs-button-skeleton{display:inline-block;border-radius:var(--bs-border-radius-100);width:var(--bs-button-skeleton-width);background:var(--bs-color-neutral-container);animation:bs-button-skeleton-pulse 1.5s ease-in-out infinite}.bs-button-skeleton--sm{height:var(--bs-button-skeleton-height-sm)}.bs-button-skeleton--md{height:var(--bs-button-skeleton-height-md)}.bs-button-skeleton--lg{height:var(--bs-button-skeleton-height-lg)}@keyframes bs-button-skeleton-pulse{0%,100%{opacity:1}50%{opacity:0.5}}@media (prefers-reduced-motion: reduce){.bs-button-skeleton{animation:none}}"}},[513,"bs-button-skeleton",{size:[1]}]);function b(){"undefined"!=typeof customElements&&["bs-button-skeleton"].forEach((e=>{"bs-button-skeleton"===e&&(customElements.get(t(e))||customElements.define(t(e),o))}))}b();const i=o,a=b;export{i as BsButtonSkeleton,a as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as o,p as s,H as
|
|
1
|
+
import{t as o,p as s,H as e,c as r,h as t}from"./p-Cu4gTknX.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 +1 @@
|
|
|
1
|
-
import{t,p as e,H as s,c as a,h as o}from"./p-Cu4gTknX.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-Cu4gTknX.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:"8276a72f6539690dd8189cd29e42993c3d61862c",part:"table",class:"bs-data-table"},o("thead",{key:"2d3e42222eec0bcbe3d06f26f7a3ae53dd5ccdc0",part:"head"},o("tr",{key:"45994ea59d9a1a347bb8abdf25d7b1b919822a61"},this.selectable&&o("th",{key:"05d5efa74feee1545e1c4b9dfc45acd7ffd10e6a",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:"9c1dc006341b63e5d22df655836f326ba27e7b9d",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 l(){"undefined"!=typeof customElements&&["bs-data-table"].forEach((e=>{"bs-data-table"===e&&(customElements.get(t(e))||customElements.define(t(e),r))}))}l();const c=r,d=l;export{c as BsDataTable,d as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as r,p as t,H as s,c as
|
|
1
|
+
import{t as r,p as t,H as s,c as i,h as e}from"./p-Cu4gTknX.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:"d6b382224eba07a1d6cf3de0707cd9e8afe3790f",class:"bs-input "+(this.error?"bs-input--error":"")},this.label&&e("label",{key:"72b14f0557fb0cd3648daf6839b2ae3f1e9547f0",part:"label",class:"bs-input__label",htmlFor:"control"},this.label),e("input",{key:"8ff7c5281c853fa9567f997b506dd722ddd866b5",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}
|
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-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-composer",[[
|
|
19
|
+
return bootstrapLazy([["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-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-input",[[529,"bs-input",{"value":[1],"type":[1],"label":[1],"placeholder":[1],"description":[1],"error":[1],"disabled":[4]}]]],["bs-modal",[[769,"bs-modal",{"open":[1540],"heading":[1],"size":[1],"hasFooter":[32]},[[4,"keydown","onKeydown"],[4,"focusin","onFocusIn"]]]]]], options);
|
|
20
20
|
});
|
|
@@ -9,7 +9,7 @@ const BsButtonSkeleton = class {
|
|
|
9
9
|
/** Sizing scale, matching the `bs-button` size it stands in for. */
|
|
10
10
|
size = 'md';
|
|
11
11
|
render() {
|
|
12
|
-
return h("span", { key: '
|
|
12
|
+
return h("span", { key: '5b51879877adc5abbe6f28d79f27a1f33654a1a4', part: "container", class: `bs-button-skeleton bs-button-skeleton--${this.size}`, role: "status", "aria-label": "Loading" });
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
15
|
BsButtonSkeleton.style = bsButtonSkeletonCss();
|
|
@@ -99,7 +99,7 @@ const BsComposer = class {
|
|
|
99
99
|
const placeholder = this.placeholder ?? DEFAULT_PLACEHOLDERS[this.variant];
|
|
100
100
|
const disabled = this.state === 'disabled';
|
|
101
101
|
const recording = this.state === 'recording';
|
|
102
|
-
return (h("div", { key: '
|
|
102
|
+
return (h("div", { key: '04c250520759948faa89bd625646a62c79cc6cee', class: `bs-composer bs-composer--${this.state} bs-composer--${this.variant}` }, h("div", { key: '8d5d99b90141d3dbeff1b31851cbbb5eaae3d920', class: "bs-composer__text-row" }, h("input", { key: '4eb1ef1b51a41de86da466c8a2c9ea93a7746b43', part: "input", class: "bs-composer__input", type: "text", value: this.value, placeholder: placeholder, disabled: disabled, "aria-label": this.ariaLabel, onInput: this.onInput })), h("div", { key: '8a733762c56ae3f4de7f2af1d89fb05d521b1d17', class: "bs-composer__controls-row" }, h("button", { key: 'b4cd13546ec447f2650a02f43dc2fc0b6d65c8ef', type: "button", part: "attach", class: "bs-composer__attach", "aria-label": "Attach", onClick: this.onAttachClick }, h(PlusIcon, { key: 'af8da06a2550d5c37d3737b145ad70c006e1ce66' })), recording ? (h("span", { class: "bs-composer__waveform", "aria-hidden": "true" }, WAVEFORM_BAR_HEIGHTS.map(height => (h("span", { class: "bs-composer__waveform-bar", style: { '--bs-composer-bar-height': `${height}px` } }))))) : (h("span", { class: "bs-composer__spacer" })), h("button", { key: '18b81bf7dd6057c3954566cd12994bb8589ff4ee', type: "button", part: "mic", class: `bs-composer__mic ${recording ? 'bs-composer__mic--recording' : ''}`, "aria-label": recording ? 'Stop recording' : 'Start voice input', disabled: disabled, onClick: this.onMicClick }, recording ? h(StopIcon, null) : h(MicIcon, null)), h("button", { key: 'a1cf9435fa7dc8e52db7ae148e07fde06971f27c', type: "button", part: "action", class: `bs-composer__action bs-composer__action--${this.state}`, "aria-label": this.actionLabel(), disabled: disabled, onClick: this.onActionClick }, this.renderActionIcon()), h("slot", { key: '6779413b48314161a75ec75be273e72fe4d622c3', name: "actions-end" }))));
|
|
103
103
|
}
|
|
104
104
|
static get delegatesFocus() { return true; }
|
|
105
105
|
};
|
|
@@ -41,11 +41,11 @@ const BsDataTable = class {
|
|
|
41
41
|
this.bsRowSelect.emit({ id: row.id, selected });
|
|
42
42
|
};
|
|
43
43
|
render() {
|
|
44
|
-
return (h("table", { key: '
|
|
44
|
+
return (h("table", { key: '8276a72f6539690dd8189cd29e42993c3d61862c', part: "table", class: "bs-data-table" }, h("thead", { key: '2d3e42222eec0bcbe3d06f26f7a3ae53dd5ccdc0', part: "head" }, h("tr", { key: '45994ea59d9a1a347bb8abdf25d7b1b919822a61' }, this.selectable && h("th", { key: '05d5efa74feee1545e1c4b9dfc45acd7ffd10e6a', class: "bs-data-table__select-col" }), this.columns.map(column => {
|
|
45
45
|
const isSorted = this.sortColumn === column.key;
|
|
46
46
|
const ariaSort = column.sortable ? (isSorted ? (this.sortDirection === 'asc' ? 'ascending' : 'descending') : 'none') : undefined;
|
|
47
47
|
return (h("th", { part: "header-cell", class: "bs-data-table__header-cell", "aria-sort": ariaSort }, column.sortable ? (h("button", { type: "button", class: "bs-data-table__sort-button", onClick: () => this.onHeaderClick(column) }, column.label, isSorted && h("span", { class: "bs-data-table__sort-indicator" }, this.sortDirection === 'asc' ? ' ▲' : ' ▼'))) : (column.label)));
|
|
48
|
-
}))), h("tbody", { key: '
|
|
48
|
+
}))), h("tbody", { key: '9c1dc006341b63e5d22df655836f326ba27e7b9d', part: "body" }, this.rows.map(row => (h("tr", { part: "row", class: "bs-data-table__row" }, this.selectable && (h("td", { class: "bs-data-table__select-col" }, h("input", { type: "checkbox", checked: this.selectedIds.has(row.id), onChange: ev => this.onRowCheckboxChange(row, ev) }))), this.columns.map(column => this.cellRenderer ? (
|
|
49
49
|
// cellRenderer is a developer-supplied, trusted function (JS-property-only, never
|
|
50
50
|
// derived from untrusted input) -- its HTML output is intentionally not escaped,
|
|
51
51
|
// same trust model as React's dangerouslySetInnerHTML.
|
|
@@ -28,10 +28,10 @@ const BsInput = class {
|
|
|
28
28
|
this.bsChange.emit(value);
|
|
29
29
|
};
|
|
30
30
|
render() {
|
|
31
|
-
return (h("div", { key: '
|
|
31
|
+
return (h("div", { key: 'd6b382224eba07a1d6cf3de0707cd9e8afe3790f', class: `bs-input ${this.error ? 'bs-input--error' : ''}` }, this.label && (
|
|
32
32
|
// "control" is a fixed id, not a generated one -- safe because Shadow DOM scopes ids
|
|
33
33
|
// to this instance's own shadow root, so it can never collide with another bs-input.
|
|
34
|
-
h("label", { key: '
|
|
34
|
+
h("label", { key: '72b14f0557fb0cd3648daf6839b2ae3f1e9547f0', part: "label", class: "bs-input__label", htmlFor: "control" }, this.label)), h("input", { key: '8ff7c5281c853fa9567f997b506dd722ddd866b5', 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' : undefined, "aria-invalid": this.error ? 'true' : undefined, onInput: this.onInput, onChange: this.onChange }), this.error ? (h("span", { id: "description-or-error", part: "error", class: "bs-input__error" }, this.error)) : this.description ? (h("span", { id: "description-or-error", part: "description", class: "bs-input__description" }, this.description)) : null));
|
|
35
35
|
}
|
|
36
36
|
static get delegatesFocus() { return true; }
|
|
37
37
|
};
|
package/dist/esm/loader.js
CHANGED
|
@@ -4,7 +4,7 @@ export { s as setNonce } from './index-BOj_41o9.js';
|
|
|
4
4
|
const defineCustomElements = async (win, options) => {
|
|
5
5
|
if (typeof window === 'undefined') return undefined;
|
|
6
6
|
await globalScripts();
|
|
7
|
-
return bootstrapLazy([["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-composer",[[
|
|
7
|
+
return bootstrapLazy([["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-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-input",[[529,"bs-input",{"value":[1],"type":[1],"label":[1],"placeholder":[1],"description":[1],"error":[1],"disabled":[4]}]]],["bs-modal",[[769,"bs-modal",{"open":[1540],"heading":[1],"size":[1],"hasFooter":[32]},[[4,"keydown","onKeydown"],[4,"focusin","onFocusIn"]]]]]], options);
|
|
8
8
|
};
|
|
9
9
|
|
|
10
10
|
export { defineCustomElements };
|
|
@@ -13,6 +13,16 @@ export type BsComposerState = 'idle' | 'generating' | 'disabled' | 'recording';
|
|
|
13
13
|
* - A general-purpose text field — use `bs-input` instead; this component's layout and states are
|
|
14
14
|
* purpose-built for a chat composer, not a generic form field.
|
|
15
15
|
*
|
|
16
|
+
* ## Focus
|
|
17
|
+
* Uses `shadow: { delegatesFocus: true }`, so calling `.focus()` on the `<bs-composer>` host
|
|
18
|
+
* element itself (not just its internal `<input>`) moves focus into the shadow-DOM text field --
|
|
19
|
+
* useful for e.g. focusing the composer after a parent view mounts, without reaching into its
|
|
20
|
+
* shadow root.
|
|
21
|
+
*
|
|
22
|
+
* @slot actions-end - Extra consumer-supplied controls appended after the primary action button
|
|
23
|
+
* in the controls row (e.g. a product-specific "Tools" button). Slotted content is placed
|
|
24
|
+
* inline in the same flex row as attach/mic/action, so a slotted element should size itself to
|
|
25
|
+
* roughly match `--bs-composer-button-size` to align visually.
|
|
16
26
|
* @part attach - The "+" attach button.
|
|
17
27
|
* @part input - The native text `<input>`.
|
|
18
28
|
* @part mic - The secondary icon button (microphone, or the stop-recording square while `state="recording"`).
|
|
@@ -132,6 +132,11 @@ export namespace Components {
|
|
|
132
132
|
* ## When not to use
|
|
133
133
|
* - A general-purpose text field — use `bs-input` instead; this component's layout and states are
|
|
134
134
|
* purpose-built for a chat composer, not a generic form field.
|
|
135
|
+
* ## Focus
|
|
136
|
+
* Uses `shadow: { delegatesFocus: true }`, so calling `.focus()` on the `<bs-composer>` host
|
|
137
|
+
* element itself (not just its internal `<input>`) moves focus into the shadow-DOM text field --
|
|
138
|
+
* useful for e.g. focusing the composer after a parent view mounts, without reaching into its
|
|
139
|
+
* shadow root.
|
|
135
140
|
* @prop --bs-composer-radius - Corner radius of the container. Aliased to `--bs-border-radius-150`.
|
|
136
141
|
* @prop --bs-composer-button-radius - Corner radius of the attach/mic/action buttons. Aliased to `--bs-border-radius-100`.
|
|
137
142
|
* @prop --bs-composer-button-size - Width/height of the attach/mic/action buttons. Aliased to `--bs-spacing-600`.
|
|
@@ -377,6 +382,11 @@ declare global {
|
|
|
377
382
|
* ## When not to use
|
|
378
383
|
* - A general-purpose text field — use `bs-input` instead; this component's layout and states are
|
|
379
384
|
* purpose-built for a chat composer, not a generic form field.
|
|
385
|
+
* ## Focus
|
|
386
|
+
* Uses `shadow: { delegatesFocus: true }`, so calling `.focus()` on the `<bs-composer>` host
|
|
387
|
+
* element itself (not just its internal `<input>`) moves focus into the shadow-DOM text field --
|
|
388
|
+
* useful for e.g. focusing the composer after a parent view mounts, without reaching into its
|
|
389
|
+
* shadow root.
|
|
380
390
|
* @prop --bs-composer-radius - Corner radius of the container. Aliased to `--bs-border-radius-150`.
|
|
381
391
|
* @prop --bs-composer-button-radius - Corner radius of the attach/mic/action buttons. Aliased to `--bs-border-radius-100`.
|
|
382
392
|
* @prop --bs-composer-button-size - Width/height of the attach/mic/action buttons. Aliased to `--bs-spacing-600`.
|
|
@@ -617,6 +627,11 @@ declare namespace LocalJSX {
|
|
|
617
627
|
* ## When not to use
|
|
618
628
|
* - A general-purpose text field — use `bs-input` instead; this component's layout and states are
|
|
619
629
|
* purpose-built for a chat composer, not a generic form field.
|
|
630
|
+
* ## Focus
|
|
631
|
+
* Uses `shadow: { delegatesFocus: true }`, so calling `.focus()` on the `<bs-composer>` host
|
|
632
|
+
* element itself (not just its internal `<input>`) moves focus into the shadow-DOM text field --
|
|
633
|
+
* useful for e.g. focusing the composer after a parent view mounts, without reaching into its
|
|
634
|
+
* shadow root.
|
|
620
635
|
* @prop --bs-composer-radius - Corner radius of the container. Aliased to `--bs-border-radius-150`.
|
|
621
636
|
* @prop --bs-composer-button-radius - Corner radius of the attach/mic/action buttons. Aliased to `--bs-border-radius-100`.
|
|
622
637
|
* @prop --bs-composer-button-size - Width/height of the attach/mic/action buttons. Aliased to `--bs-spacing-600`.
|
|
@@ -904,6 +919,11 @@ declare module "@stencil/core" {
|
|
|
904
919
|
* ## When not to use
|
|
905
920
|
* - A general-purpose text field — use `bs-input` instead; this component's layout and states are
|
|
906
921
|
* purpose-built for a chat composer, not a generic form field.
|
|
922
|
+
* ## Focus
|
|
923
|
+
* Uses `shadow: { delegatesFocus: true }`, so calling `.focus()` on the `<bs-composer>` host
|
|
924
|
+
* element itself (not just its internal `<input>`) moves focus into the shadow-DOM text field --
|
|
925
|
+
* useful for e.g. focusing the composer after a parent view mounts, without reaching into its
|
|
926
|
+
* shadow root.
|
|
907
927
|
* @prop --bs-composer-radius - Corner radius of the container. Aliased to `--bs-border-radius-150`.
|
|
908
928
|
* @prop --bs-composer-button-radius - Corner radius of the attach/mic/action buttons. Aliased to `--bs-border-radius-100`.
|
|
909
929
|
* @prop --bs-composer-button-size - Width/height of the attach/mic/action buttons. Aliased to `--bs-spacing-600`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brandsync/wc",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
"types": "./dist/components/*"
|
|
27
27
|
},
|
|
28
28
|
"./dist/brandsync-wc/brandsync-wc.css": "./dist/brandsync-wc/brandsync-wc.css",
|
|
29
|
+
"./custom-elements.json": "./custom-elements.json",
|
|
29
30
|
"./loader": {
|
|
30
31
|
"import": "./loader/index.js",
|
|
31
32
|
"require": "./loader/index.cjs",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,c as s,h as r}from"./p-BOj_41o9.js";const e={ai:"Ask Genie something...",human:"Message your support agent..."},t=[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=class{constructor(r){o(this,r),this.bsInput=s(this,"bsInput"),this.bsSubmit=s(this,"bsSubmit"),this.bsStop=s(this,"bsStop"),this.bsVoiceConfirm=s(this,"bsVoiceConfirm"),this.bsAttach=s(this,"bsAttach"),this.bsMicToggle=s(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 r("generating"===this.state?b:"recording"===this.state?d:n,null)}render(){const o="disabled"===this.state,s="recording"===this.state;return r("div",{key:"785b4da8ddb23f4762ac7ea379b3ecdaa9584f40",class:`bs-composer bs-composer--${this.state} bs-composer--${this.variant}`},r("div",{key:"5b470cc47221f93ce9852ebaeaf9a35d740d5df1",class:"bs-composer__text-row"},r("input",{key:"3f4093d98bc0a0ba8440da9fec1d5cb2e302b746",part:"input",class:"bs-composer__input",type:"text",value:this.value,placeholder:this.placeholder??e[this.variant],disabled:o,"aria-label":this.ariaLabel,onInput:this.onInput})),r("div",{key:"21103c8d6ac108e705487f670aeb4aaf89d45981",class:"bs-composer__controls-row"},r("button",{key:"570ef86150f5b0072008fb0215ed1f0affac7af4",type:"button",part:"attach",class:"bs-composer__attach","aria-label":"Attach",onClick:this.onAttachClick},r(a,{key:"ea030569c8b5d2bafaae3ecfe29b956a54921f34"})),s?r("span",{class:"bs-composer__waveform","aria-hidden":"true"},t.map((o=>r("span",{class:"bs-composer__waveform-bar",style:{"--bs-composer-bar-height":`${o}px`}})))):r("span",{class:"bs-composer__spacer"}),r("button",{key:"1906485b13395c9c730f7091176dab4e81ecbcb9",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},r(s?b:c,null)),r("button",{key:"3486957673a3bbf7c3dbac41fd5c19e8dbb6258a",type:"button",part:"action",class:`bs-composer__action bs-composer__action--${this.state}`,"aria-label":this.actionLabel(),disabled:o,onClick:this.onActionClick},this.renderActionIcon())))}static get delegatesFocus(){return!0}},a=()=>r("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},r("path",{d:"M8 2.5V13.5M2.5 8H13.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})),c=()=>r("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},r("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"}),r("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"}),r("path",{d:"M8 12V14.5",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round"})),n=()=>r("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},r("path",{d:"M13.5 12H7.5",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),r("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"})),b=()=>r("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},r("rect",{x:"6",y:"6",width:"8",height:"8",rx:"1.5",fill:"currentColor"})),d=()=>r("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},r("path",{d:"M4.5 10.5L8 14L15.5 6",stroke:"currentColor","stroke-width":"1.75","stroke-linecap":"round","stroke-linejoin":"round"}));i.style=":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}";export{i as bs_composer}
|