@brandsync/wc 0.0.4 → 0.0.6

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.
Files changed (61) hide show
  1. package/custom-elements.json +203 -2
  2. package/dist/brandsync-wc/brandsync-wc.esm.js +1 -1
  3. package/dist/brandsync-wc/p-1dc6d7f5.entry.js +1 -0
  4. package/dist/brandsync-wc/{p-ea705742.entry.js → p-4a0da8e9.entry.js} +1 -1
  5. package/dist/brandsync-wc/p-4d999a8d.entry.js +1 -0
  6. package/dist/brandsync-wc/p-518b02bf.entry.js +1 -0
  7. package/dist/brandsync-wc/p-6648d251.entry.js +1 -0
  8. package/dist/cjs/brandsync-wc.cjs.js +1 -1
  9. package/dist/cjs/bs-chatbot-response-action.cjs.entry.js +30 -4
  10. package/dist/cjs/bs-chatbot-suggestion-button.cjs.entry.js +25 -0
  11. package/dist/cjs/bs-input.cjs.entry.js +2 -2
  12. package/dist/cjs/bs-menu-item.cjs.entry.js +29 -0
  13. package/dist/cjs/bs-menu.cjs.entry.js +17 -0
  14. package/dist/cjs/loader.cjs.js +1 -1
  15. package/dist/collection/collection-manifest.json +4 -1
  16. package/dist/collection/components/bs-chatbot-response-action/bs-chatbot-response-action.cmp.test.js +43 -2
  17. package/dist/collection/components/bs-chatbot-response-action/bs-chatbot-response-action.css +13 -0
  18. package/dist/collection/components/bs-chatbot-response-action/bs-chatbot-response-action.js +70 -6
  19. package/dist/collection/components/bs-chatbot-response-action/bs-chatbot-response-action.stories.js +96 -0
  20. package/dist/collection/components/bs-chatbot-suggestion-button/bs-chatbot-suggestion-button.cmp.test.js +24 -0
  21. package/dist/collection/components/bs-chatbot-suggestion-button/bs-chatbot-suggestion-button.css +57 -0
  22. package/dist/collection/components/bs-chatbot-suggestion-button/bs-chatbot-suggestion-button.js +104 -0
  23. package/dist/collection/components/bs-chatbot-suggestion-button/bs-chatbot-suggestion-button.stories.js +30 -0
  24. package/dist/collection/components/bs-input/bs-input.js +2 -2
  25. package/dist/collection/components/bs-menu/bs-menu.cmp.test.js +18 -0
  26. package/dist/collection/components/bs-menu/bs-menu.css +20 -0
  27. package/dist/collection/components/bs-menu/bs-menu.js +39 -0
  28. package/dist/collection/components/bs-menu/bs-menu.stories.js +15 -0
  29. package/dist/collection/components/bs-menu-item/bs-menu-item.cmp.test.js +33 -0
  30. package/dist/collection/components/bs-menu-item/bs-menu-item.css +68 -0
  31. package/dist/collection/components/bs-menu-item/bs-menu-item.js +79 -0
  32. package/dist/collection/components/bs-menu-item/bs-menu-item.stories.js +37 -0
  33. package/dist/components/bs-chatbot-response-action.js +1 -1
  34. package/dist/components/bs-chatbot-suggestion-button.d.ts +11 -0
  35. package/dist/components/bs-chatbot-suggestion-button.js +1 -0
  36. package/dist/components/bs-input.js +1 -1
  37. package/dist/components/bs-menu-item.d.ts +11 -0
  38. package/dist/components/bs-menu-item.js +1 -0
  39. package/dist/components/bs-menu.d.ts +11 -0
  40. package/dist/components/bs-menu.js +1 -0
  41. package/dist/esm/brandsync-wc.js +1 -1
  42. package/dist/esm/bs-chatbot-response-action.entry.js +31 -5
  43. package/dist/esm/bs-chatbot-suggestion-button.entry.js +23 -0
  44. package/dist/esm/bs-input.entry.js +2 -2
  45. package/dist/esm/bs-menu-item.entry.js +27 -0
  46. package/dist/esm/bs-menu.entry.js +15 -0
  47. package/dist/esm/loader.js +1 -1
  48. package/dist/types/components/bs-chatbot-response-action/bs-chatbot-response-action.d.ts +16 -2
  49. package/dist/types/components/bs-chatbot-response-action/bs-chatbot-response-action.stories.d.ts +1 -0
  50. package/dist/types/components/bs-chatbot-suggestion-button/bs-chatbot-suggestion-button.cmp.test.d.ts +1 -0
  51. package/dist/types/components/bs-chatbot-suggestion-button/bs-chatbot-suggestion-button.d.ts +46 -0
  52. package/dist/types/components/bs-chatbot-suggestion-button/bs-chatbot-suggestion-button.stories.d.ts +10 -0
  53. package/dist/types/components/bs-menu/bs-menu.cmp.test.d.ts +1 -0
  54. package/dist/types/components/bs-menu/bs-menu.d.ts +24 -0
  55. package/dist/types/components/bs-menu/bs-menu.stories.d.ts +5 -0
  56. package/dist/types/components/bs-menu-item/bs-menu-item.cmp.test.d.ts +1 -0
  57. package/dist/types/components/bs-menu-item/bs-menu-item.d.ts +38 -0
  58. package/dist/types/components/bs-menu-item/bs-menu-item.stories.d.ts +7 -0
  59. package/dist/types/components.d.ts +364 -3
  60. package/package.json +2 -1
  61. package/dist/brandsync-wc/p-4ce458bf.entry.js +0 -1
@@ -0,0 +1,39 @@
1
+ import { h } from "@stencil/core";
2
+ /**
3
+ * A generic dropdown/popup menu container: a rounded, elevated list of items (typically
4
+ * `bs-menu-item` elements).
5
+ *
6
+ * ## When to use
7
+ * - A popup list of actions/options triggered by another control (e.g. a "more options" kebab
8
+ * button), such as `bs-chatbot-response-action`'s `menu` slot.
9
+ *
10
+ * ## When not to use
11
+ * - A persistent, always-visible list of options -- this component is purpose-built as a popup
12
+ * surface (rounded corners, elevation shadow), not a plain list.
13
+ *
14
+ * @slot - Default slot: the menu's items (typically `bs-menu-item` elements, though anything can
15
+ * be slotted in -- this component doesn't restrict slot content via JS).
16
+ * @part list - The rounded, elevated box wrapping the slotted items.
17
+ * @prop --bs-menu-bg - Background of the menu box. Aliased to `--bs-surface-raised`.
18
+ * @prop --bs-menu-radius - Corner radius of the menu box. Aliased to `--bs-border-radius-100`.
19
+ * @prop --bs-menu-padding-y - Top/bottom padding of the menu box. Aliased to `--bs-spacing-50`.
20
+ * @prop --bs-menu-gap - Gap between slotted items. Aliased to `--bs-spacing-50`.
21
+ * @prop --bs-menu-shadow - Elevation shadow of the menu box. Aliased to `--bs-shadow-sm`.
22
+ */
23
+ export class BsMenu {
24
+ render() {
25
+ return (h("div", { key: 'e5008951228aa528404f810fe9ce90a5ee7298b1', part: "list", class: "bs-menu", role: "menu" }, h("slot", { key: 'd2e590cf51f626bd22dce58535fbea81291f9068' })));
26
+ }
27
+ static get is() { return "bs-menu"; }
28
+ static get encapsulation() { return "shadow"; }
29
+ static get originalStyleUrls() {
30
+ return {
31
+ "$": ["bs-menu.css"]
32
+ };
33
+ }
34
+ static get styleUrls() {
35
+ return {
36
+ "$": ["bs-menu.css"]
37
+ };
38
+ }
39
+ }
@@ -0,0 +1,15 @@
1
+ import { html } from "lit";
2
+ import { componentDescription } from "../../stories-utils";
3
+ const meta = {
4
+ title: 'Components/bs-menu',
5
+ parameters: { docs: { description: { component: componentDescription('bs-menu') } } },
6
+ render: () => html `
7
+ <bs-menu style="width: 210px;">
8
+ <bs-menu-item>Read aloud</bs-menu-item>
9
+ <bs-menu-item>Chat with a human</bs-menu-item>
10
+ <bs-menu-item>Raise a ticket</bs-menu-item>
11
+ </bs-menu>
12
+ `,
13
+ };
14
+ export default meta;
15
+ export const Default = {};
@@ -0,0 +1,33 @@
1
+ import { render, h, describe, it, expect } from "@stencil/vitest";
2
+ describe('bs-menu-item', () => {
3
+ it('renders a button with role="menuitem" and part="item"', async () => {
4
+ const { root } = await render(h("bs-menu-item", null, "Read aloud"));
5
+ const button = root.shadowRoot.querySelector('[part="item"]');
6
+ expect(button).not.toBeNull();
7
+ expect(button.tagName).toBe('BUTTON');
8
+ expect(button.getAttribute('role')).toBe('menuitem');
9
+ expect(button.getAttribute('type')).toBe('button');
10
+ });
11
+ it('renders the label slot content', async () => {
12
+ const { root } = await render(h("bs-menu-item", null, "Read aloud"));
13
+ expect(root).toHaveTextContent('Read aloud');
14
+ });
15
+ it('does not reserve icon space when no icon is slotted', async () => {
16
+ const { root } = await render(h("bs-menu-item", null, "Read aloud"));
17
+ const icon = root.shadowRoot.querySelector('[part="icon"]');
18
+ expect(icon).not.toBeNull();
19
+ expect(icon).not.toHaveClass('bs-menu-item__icon--has-content');
20
+ expect(getComputedStyle(icon).display).toBe('none');
21
+ });
22
+ it('shows the icon wrapper when an icon is slotted', async () => {
23
+ const { root } = await render(h("bs-menu-item", null, h("span", { slot: "icon" }, "ICON"), "Read aloud"));
24
+ const icon = root.shadowRoot.querySelector('[part="icon"]');
25
+ expect(icon).toHaveClass('bs-menu-item__icon--has-content');
26
+ });
27
+ it('emits bsSelect when clicked', async () => {
28
+ const { root, spyOnEvent } = await render(h("bs-menu-item", null, "Read aloud"));
29
+ const selectSpy = spyOnEvent('bsSelect');
30
+ root.shadowRoot.querySelector('[part="item"]').click();
31
+ expect(selectSpy).toHaveReceivedEventTimes(1);
32
+ });
33
+ });
@@ -0,0 +1,68 @@
1
+ :host {
2
+ display: block;
3
+ --bs-menu-item-radius: var(--bs-border-radius-100);
4
+ --bs-menu-item-padding-y: var(--bs-spacing-100);
5
+ --bs-menu-item-padding-x: var(--bs-spacing-150);
6
+ --bs-menu-item-gap: var(--bs-spacing-100);
7
+ --bs-menu-item-hover: var(--bs-color-neutral-container);
8
+ --bs-menu-item-pressed: var(--bs-color-neutral-container-pressed);
9
+ --bs-menu-item-icon-color: var(--bs-icon-default);
10
+ --bs-menu-item-color: var(--bs-text-muted);
11
+ --bs-menu-item-font-size: var(--bs-font-size-md);
12
+ --bs-menu-item-line-height: var(--bs-line-height-body-md);
13
+ }
14
+
15
+ .bs-menu-item {
16
+ box-sizing: border-box;
17
+ display: flex;
18
+ align-items: center;
19
+ width: 100%;
20
+ height: 48px;
21
+ border: none;
22
+ cursor: pointer;
23
+ background: transparent;
24
+ color: var(--bs-menu-item-color);
25
+ font-family: inherit;
26
+ border-radius: var(--bs-menu-item-radius);
27
+ padding: var(--bs-menu-item-padding-y) var(--bs-menu-item-padding-x);
28
+ gap: var(--bs-menu-item-gap);
29
+ transition: background-color var(--bs-duration-fast) var(--bs-easing-standard);
30
+ }
31
+
32
+ .bs-menu-item:focus-visible {
33
+ outline: 2px solid var(--bs-border-neutral-focus);
34
+ outline-offset: 2px;
35
+ }
36
+
37
+ .bs-menu-item:hover {
38
+ background: var(--bs-menu-item-hover);
39
+ }
40
+
41
+ .bs-menu-item:active {
42
+ background: var(--bs-menu-item-pressed);
43
+ }
44
+
45
+ .bs-menu-item__icon {
46
+ display: none;
47
+ width: 24px;
48
+ height: 24px;
49
+ flex-shrink: 0;
50
+ color: var(--bs-menu-item-icon-color);
51
+ }
52
+
53
+ .bs-menu-item__icon--has-content {
54
+ display: inline-flex;
55
+ align-items: center;
56
+ justify-content: center;
57
+ }
58
+
59
+ .bs-menu-item__icon ::slotted(svg) {
60
+ width: 24px;
61
+ height: 24px;
62
+ }
63
+
64
+ .bs-menu-item__label {
65
+ font-size: var(--bs-menu-item-font-size);
66
+ line-height: calc(var(--bs-menu-item-line-height) * 1px);
67
+ white-space: nowrap;
68
+ }
@@ -0,0 +1,79 @@
1
+ import { h } from "@stencil/core";
2
+ /**
3
+ * A single selectable row inside a `bs-menu`: an optional icon plus a text label, rendered as a
4
+ * real `<button>` for correct keyboard/click semantics.
5
+ *
6
+ * ## When to use
7
+ * - As a child of `bs-menu`, one per selectable action/option.
8
+ *
9
+ * ## When not to use
10
+ * - Outside of `bs-menu` -- this component's sizing/hover treatment is designed to sit inside the
11
+ * menu's rounded, padded list box.
12
+ *
13
+ * @slot icon - Optional leading icon (24x24). When left empty, no icon space is reserved.
14
+ * @slot - Default slot: the item's text label.
15
+ * @part item - The button element.
16
+ * @part icon - The icon wrapper.
17
+ * @part label - The label wrapper.
18
+ * @prop --bs-menu-item-radius - Corner radius of the row. Aliased to `--bs-border-radius-100`.
19
+ * @prop --bs-menu-item-padding-y - Top/bottom padding. Aliased to `--bs-spacing-100`.
20
+ * @prop --bs-menu-item-padding-x - Left/right padding. Aliased to `--bs-spacing-150`.
21
+ * @prop --bs-menu-item-gap - Gap between icon and label. Aliased to `--bs-spacing-100`.
22
+ * @prop --bs-menu-item-hover - Background on hover. Aliased to `--bs-color-neutral-container`.
23
+ * @prop --bs-menu-item-pressed - Background when pressed. Aliased to `--bs-color-neutral-container-pressed`.
24
+ * @prop --bs-menu-item-icon-color - Icon color. Aliased to `--bs-icon-default`.
25
+ * @prop --bs-menu-item-color - Label text color. Aliased to `--bs-text-muted`.
26
+ * @prop --bs-menu-item-font-size - Aliased to `--bs-font-size-md`.
27
+ * @prop --bs-menu-item-line-height - Aliased to `--bs-line-height-body-md`.
28
+ */
29
+ export class BsMenuItem {
30
+ /** Tracks whether the `icon` slot has assigned content, so the icon wrapper (and its gap) only
31
+ * renders when there's actually an icon to show. */
32
+ hasIcon = false;
33
+ /** Fires when the item is clicked. */
34
+ bsSelect;
35
+ onIconSlotchange = (ev) => {
36
+ this.hasIcon = ev.target.assignedNodes().length > 0;
37
+ };
38
+ onClick = () => {
39
+ this.bsSelect.emit();
40
+ };
41
+ render() {
42
+ return (h("button", { key: '0fbb5f8802a2866794682b90a850d5455c86d69e', type: "button", part: "item", role: "menuitem", class: "bs-menu-item", onClick: this.onClick }, h("span", { key: '810cd5b7bebf0f0f411a956fa13357b4bc3b18ae', part: "icon", class: `bs-menu-item__icon ${this.hasIcon ? 'bs-menu-item__icon--has-content' : ''}` }, h("slot", { key: '683105e1dd44932ac0b569d57eccc3fb54dc1497', name: "icon", onSlotchange: this.onIconSlotchange })), h("span", { key: '2d0edd4325f535020b04bcea93db47ef60d33127', part: "label", class: "bs-menu-item__label" }, h("slot", { key: 'b7ca912d7ec3b5ac3a78f09eb03b8d6b0f96cc2e' }))));
43
+ }
44
+ static get is() { return "bs-menu-item"; }
45
+ static get encapsulation() { return "shadow"; }
46
+ static get originalStyleUrls() {
47
+ return {
48
+ "$": ["bs-menu-item.css"]
49
+ };
50
+ }
51
+ static get styleUrls() {
52
+ return {
53
+ "$": ["bs-menu-item.css"]
54
+ };
55
+ }
56
+ static get states() {
57
+ return {
58
+ "hasIcon": {}
59
+ };
60
+ }
61
+ static get events() {
62
+ return [{
63
+ "method": "bsSelect",
64
+ "name": "bsSelect",
65
+ "bubbles": true,
66
+ "cancelable": true,
67
+ "composed": true,
68
+ "docs": {
69
+ "tags": [],
70
+ "text": "Fires when the item is clicked."
71
+ },
72
+ "complexType": {
73
+ "original": "void",
74
+ "resolved": "void",
75
+ "references": {}
76
+ }
77
+ }];
78
+ }
79
+ }
@@ -0,0 +1,37 @@
1
+ import { html } from "lit";
2
+ import { componentDescription } from "../../stories-utils";
3
+ const meta = {
4
+ title: 'Components/bs-menu-item',
5
+ parameters: { docs: { description: { component: componentDescription('bs-menu-item') } } },
6
+ render: () => html ` <bs-menu-item style="width: 210px;">Read aloud</bs-menu-item> `,
7
+ };
8
+ export default meta;
9
+ export const Default = {};
10
+ export const WithIcon = {
11
+ name: 'With an icon',
12
+ render: () => html `
13
+ <bs-menu-item style="width: 210px;">
14
+ <svg slot="icon" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
15
+ <path
16
+ d="M7.5 15.75H3C2.80109 15.75 2.61032 15.671 2.46967 15.5303C2.32902 15.3897 2.25 15.1989 2.25 15V9C2.25 8.80109 2.32902 8.61032 2.46967 8.46967C2.61032 8.32902 2.80109 8.25 3 8.25H7.5L14.25 3V21L7.5 15.75Z"
17
+ stroke="currentColor"
18
+ stroke-width="2"
19
+ stroke-linecap="round"
20
+ stroke-linejoin="round"
21
+ />
22
+ <path d="M7.5 8.25V15.75" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
23
+ </svg>
24
+ Read aloud
25
+ </bs-menu-item>
26
+ `,
27
+ };
28
+ export const InAMenu = {
29
+ name: 'In a bs-menu',
30
+ render: () => html `
31
+ <bs-menu style="width: 210px;">
32
+ <bs-menu-item>Read aloud</bs-menu-item>
33
+ <bs-menu-item>Chat with a human</bs-menu-item>
34
+ <bs-menu-item>Raise a ticket</bs-menu-item>
35
+ </bs-menu>
36
+ `,
37
+ };
@@ -1 +1 @@
1
- import{t,p as o,H as e,c as s,h as n}from"./p-BpvhHQSw.js";const r=o(class extends e{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")}sourcesCount;bsLike;bsDislike;bsCopy;bsRegenerate;bsMenuOpen;bsSourcesClick;onLikeClick=()=>{this.bsLike.emit()};onDislikeClick=()=>{this.bsDislike.emit()};onCopyClick=()=>{this.bsCopy.emit()};onRegenerateClick=()=>{this.bsRegenerate.emit()};onMenuClick=()=>{this.bsMenuOpen.emit()};onSourcesClick=()=>{this.bsSourcesClick.emit()};render(){const t=!!this.sourcesCount&&this.sourcesCount>0;return n("div",{key:"61a46c51ffba5e1256a94cbab87ce6e06e45941f",class:"bs-chatbot-response-action"},n("button",{key:"33e8e29235191bc2a4128074d5df08cc304dbefb",type:"button",part:"like",class:"bs-chatbot-response-action__button","aria-label":"Like",onClick:this.onLikeClick},n("slot",{key:"2337aa07fec93d12e6706ded394248f0353b91e6",name:"like-icon"},n(a,{key:"9be56ca48cbb7027ba608ea9f8e89c2c14f98eee"}))),n("button",{key:"fcdd8f3d4028a0e91cd5e10525ac97febf2261b6",type:"button",part:"dislike",class:"bs-chatbot-response-action__button","aria-label":"Dislike",onClick:this.onDislikeClick},n("slot",{key:"bc219702b5e935659aa7824596511e8b01d2014f",name:"dislike-icon"},n(i,{key:"5ec9da81d5a89d1d2a35dbfe88682214178204cb"}))),n("button",{key:"59d6b3032d141092537d9e56ced8e3045b40384f",type:"button",part:"copy",class:"bs-chatbot-response-action__button","aria-label":"Copy",onClick:this.onCopyClick},n("slot",{key:"e5bd9fbc4774ae9d67707803819697b56c516984",name:"copy-icon"},n(c,{key:"e7f8f643920bad3f88c597bb183cfc71f8319c46"}))),n("button",{key:"a6bd1be8be7f0f70157a5a5e37bc18d2c94462fc",type:"button",part:"regenerate",class:"bs-chatbot-response-action__button","aria-label":"Regenerate",onClick:this.onRegenerateClick},n("slot",{key:"7d35981706ea38ae1e613047945dde9d67a94c62",name:"regenerate-icon"},n(b,{key:"1d2dacd4bba68fcd120317bb207e7aa25bc0f62f"}))),n("button",{key:"32f3f790f4024cd7b58ba6f291d32b3f5f0dbbc8",type:"button",part:"menu",class:"bs-chatbot-response-action__button","aria-label":"More options",onClick:this.onMenuClick},n("slot",{key:"0aaf67bbc34bdf5d12247f9ab264a75dad63f996",name:"menu-icon"},n(d,{key:"c32d76d1e6f73cd9a82bbf4371a4d047b807b80c"}))),t&&n("button",{key:"240f26ed6ec5faded1efe1f171da10e4a292011e",type:"button",part:"sources",class:"bs-chatbot-response-action__sources",onClick:this.onSourcesClick},n("slot",{key:"e97e26840df27d2ff281882823bae7556d53bdc6",name:"sources-icon"},n(l,{key:"5dd3538a28ee3cf22b2801258024386827b9c774"})),n("span",{key:"acf07f2bba262a08c3f2d9650b9fd09fab51d172",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__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"]}]),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"})),l=()=>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 p(){"undefined"!=typeof customElements&&["bs-chatbot-response-action"].forEach((o=>{"bs-chatbot-response-action"===o&&(customElements.get(t(o))||customElements.define(t(o),r))}))}p();const u=r,h=p;export{u as BsChatbotResponseAction,h as defineCustomElement}
1
+ import{t as e,p as t,H as o,c as s,h as n}from"./p-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:"6595c290930eacb48dc9d52db12a29e2942c2d8f",class:"bs-chatbot-response-action"},n("button",{key:"e3acdbb150047bce0718a168c048ee9db6c829f2",type:"button",part:"like",class:"bs-chatbot-response-action__button","aria-label":"Like",onClick:this.onLikeClick},n("slot",{key:"bc9339dafb25f7529a097eaa578ef9ff5d61cafe",name:"like-icon"},n(a,{key:"49bf4ef39238d9763838ee72ca1b1799e2a284ff"}))),n("button",{key:"1a9900dbb7b1892233477cc4140b690de9d87cf3",type:"button",part:"dislike",class:"bs-chatbot-response-action__button","aria-label":"Dislike",onClick:this.onDislikeClick},n("slot",{key:"db4555adfb4a8cc83cb73ff13d537806e5918f25",name:"dislike-icon"},n(i,{key:"a741f40e3f0ea3a11e839277ad5659e0689fb13a"}))),n("button",{key:"19fbad2e8ae607368b78dc076188ec2b30d21325",type:"button",part:"copy",class:"bs-chatbot-response-action__button","aria-label":"Copy",onClick:this.onCopyClick},n("slot",{key:"8789336bec82b3335be38628d00664246d0f4015",name:"copy-icon"},n(c,{key:"e65198dff09540ce0d9af3fa2ed1e5ece12396cf"}))),n("button",{key:"09c16cca24ab255299d9f892e3d2c5334fcaf7f8",type:"button",part:"regenerate",class:"bs-chatbot-response-action__button","aria-label":"Regenerate",onClick:this.onRegenerateClick},n("slot",{key:"9758f958967908ce1a25805d9d3bea968f3590f4",name:"regenerate-icon"},n(b,{key:"608515ede5570b2482cc46c3f2910d56e086f0b3"}))),n("div",{key:"81c609157f7bb8024a2d0b1a3da30ae3d93f46e8",class:"bs-chatbot-response-action__menu-wrapper"},n("button",{key:"588d3eef27b342c784fd925e7ff4478370ef8b48",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:"f14e53e800cc2976306824a6b5131a98cf22ee49",name:"menu-icon"},n(d,{key:"7ce9bc2ee29ab3f7d56b4a5cbead2a014f586841"}))),this.menuOpen&&n("div",{key:"80e0e9688f639c51601f891e46c82059ee1fd921",class:"bs-chatbot-response-action__menu-popup"},n("slot",{key:"9b1a2652e3460a1d97b4de856269516eaf1273e1",name:"menu"}))),e&&n("button",{key:"15febee771c334afddbbdedc21add700ed44ceb1",type:"button",part:"sources",class:"bs-chatbot-response-action__sources",onClick:this.onSourcesClick},n("slot",{key:"39d2cf88bda64d2f2b0a6d767e6ba5fcb1acc8bd",name:"sources-icon"},n(p,{key:"358a3b2c1e8479c7ee92e89401edc5e68ff93e1c"})),n("span",{key:"96b364bdfc9f8ae1ba605f0fd751e19e77959720",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 BsChatbotSuggestionButton extends Components.BsChatbotSuggestionButton, HTMLElement {}
4
+ export const BsChatbotSuggestionButton: {
5
+ prototype: BsChatbotSuggestionButton;
6
+ new (): BsChatbotSuggestionButton;
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,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:"e19ad1fd5e95f84f6bff54cbc326e78f70ef3677",type:"button",part:"button",class:"bs-chatbot-suggestion-button",disabled:this.disabled,onClick:this.onClick},e("slot",{key:"4048fb336d69f0ca78e50ea9d5cba52921906966"}))}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}
@@ -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:"53b4d56fb2c955f061ac113b7dc2dbe8548a85d1",class:"bs-input "+(this.error?"bs-input--error":"")},this.label&&e("label",{key:"60ac25b59a78410843dbe9416398d4e0ec15c976",part:"label",class:"bs-input__label",htmlFor:"control"},this.label),e("input",{key:"a9f801b2a7e16550c5d22c1301435e7a7082b362",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 r,p as t,H as s,c as e,h as i}from"./p-BpvhHQSw.js";const o=t(class extends s{constructor(r){super(),!1!==r&&this.__registerHost(),this.__attachShadow(),this.bsInput=e(this,"bsInput"),this.bsChange=e(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 i("div",{key:"571583a0d1181a2e307ba86679003c6cc37e4e63",class:"bs-input "+(this.error?"bs-input--error":"")},this.label&&i("label",{key:"0a6c34ad8de3227e1264af649c1ac227e64c67bd",part:"label",class:"bs-input__label",htmlFor:"control"},this.label),i("input",{key:"de46e2c3272735160ca1773abf6fd270d042cfdd",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?i("span",{id:"description-or-error",part:"error",class:"bs-input__error"},this.error):this.description?i("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,l=n;export{a as BsInput,l as defineCustomElement}
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface BsMenuItem extends Components.BsMenuItem, HTMLElement {}
4
+ export const BsMenuItem: {
5
+ prototype: BsMenuItem;
6
+ new (): BsMenuItem;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1 @@
1
+ import{t as e,p as t,H as n,c as s,h as i}from"./p-BpvhHQSw.js";const a=t(class extends n{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.bsSelect=s(this,"bsSelect")}hasIcon=!1;bsSelect;onIconSlotchange=e=>{this.hasIcon=e.target.assignedNodes().length>0};onClick=()=>{this.bsSelect.emit()};render(){return i("button",{key:"0fbb5f8802a2866794682b90a850d5455c86d69e",type:"button",part:"item",role:"menuitem",class:"bs-menu-item",onClick:this.onClick},i("span",{key:"810cd5b7bebf0f0f411a956fa13357b4bc3b18ae",part:"icon",class:"bs-menu-item__icon "+(this.hasIcon?"bs-menu-item__icon--has-content":"")},i("slot",{key:"683105e1dd44932ac0b569d57eccc3fb54dc1497",name:"icon",onSlotchange:this.onIconSlotchange})),i("span",{key:"2d0edd4325f535020b04bcea93db47ef60d33127",part:"label",class:"bs-menu-item__label"},i("slot",{key:"b7ca912d7ec3b5ac3a78f09eb03b8d6b0f96cc2e"})))}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((t=>{"bs-menu-item"===t&&(customElements.get(e(t))||customElements.define(e(t),a))}))}o();const r=a,b=o;export{r as BsMenuItem,b as defineCustomElement}
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface BsMenu extends Components.BsMenu, HTMLElement {}
4
+ export const BsMenu: {
5
+ prototype: BsMenu;
6
+ new (): BsMenu;
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 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:"e5008951228aa528404f810fe9ce90a5ee7298b1",part:"list",class:"bs-menu",role:"menu"},n("slot",{key:"d2e590cf51f626bd22dce58535fbea81291f9068"}))}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();const u=r,t=b;export{u as BsMenu,t as defineCustomElement}
@@ -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-chatbot-header",[[769,"bs-chatbot-header",{"heading":[1],"expanded":[1540]}]]],["bs-chatbot-response-action",[[769,"bs-chatbot-response-action",{"sourcesCount":[2,"sources-count"]}]]],["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);
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-chatbot-header",[[769,"bs-chatbot-header",{"heading":[1],"expanded":[1540]}]]],["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-input",[[529,"bs-input",{"value":[1],"type":[1],"label":[1],"placeholder":[1],"description":[1],"error":[1],"disabled":[4]}]]],["bs-menu",[[257,"bs-menu"]]],["bs-menu-item",[[769,"bs-menu-item",{"hasIcon":[32]}]]],["bs-modal",[[769,"bs-modal",{"open":[1540],"heading":[1],"size":[1],"hasFooter":[32]},[[4,"keydown","onKeydown"],[4,"focusin","onFocusIn"]]]]]], options);
20
20
  });
@@ -1,6 +1,6 @@
1
- import { r as registerInstance, c as createEvent, h } from './index-nLORuTUY.js';
1
+ import { r as registerInstance, c as createEvent, a as getElement, h } from './index-nLORuTUY.js';
2
2
 
3
- const bsChatbotResponseActionCss = () => `: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__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}`;
3
+ const bsChatbotResponseActionCss = () => `: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}`;
4
4
 
5
5
  const BsChatbotResponseAction = class {
6
6
  constructor(hostRef) {
@@ -12,12 +12,20 @@ const BsChatbotResponseAction = class {
12
12
  this.bsMenuOpen = createEvent(this, "bsMenuOpen");
13
13
  this.bsSourcesClick = createEvent(this, "bsSourcesClick");
14
14
  }
15
+ get host() { return getElement(this); }
15
16
  /**
16
17
  * Number of sources backing the response. When set to a positive number, renders the "N
17
18
  * sources" button (singular "1 source" / plural "N sources"). When unset or `0`, the button is
18
19
  * not rendered at all.
19
20
  */
20
21
  sourcesCount;
22
+ /**
23
+ * Whether the "more options" popup menu (the `menu` slot) is currently open. Mutable + reflected
24
+ * so the component can track/close itself (kebab click, click outside, Escape) the same way
25
+ * `bs-chatbot-header`'s `expanded` prop tracks its own toggle state, while still emitting
26
+ * `bsMenuOpen` for the consumer to react to.
27
+ */
28
+ menuOpen = false;
21
29
  /** Fires when the "Like" button is clicked. */
22
30
  bsLike;
23
31
  /** Fires when the "Dislike" button is clicked. */
@@ -26,7 +34,8 @@ const BsChatbotResponseAction = class {
26
34
  bsCopy;
27
35
  /** Fires when the "Regenerate" button is clicked. */
28
36
  bsRegenerate;
29
- /** Fires when the "More options" button is clicked. */
37
+ /** Fires when the "More options" button is clicked or the menu is closed (click outside,
38
+ * Escape), with the new `menuOpen` value. */
30
39
  bsMenuOpen;
31
40
  /** Fires when the "N sources" button is clicked. */
32
41
  bsSourcesClick;
@@ -43,14 +52,31 @@ const BsChatbotResponseAction = class {
43
52
  this.bsRegenerate.emit();
44
53
  };
45
54
  onMenuClick = () => {
46
- this.bsMenuOpen.emit();
55
+ this.menuOpen = !this.menuOpen;
56
+ this.bsMenuOpen.emit(this.menuOpen);
57
+ };
58
+ closeMenu = () => {
59
+ if (!this.menuOpen)
60
+ return;
61
+ this.menuOpen = false;
62
+ this.bsMenuOpen.emit(this.menuOpen);
47
63
  };
64
+ onDocumentClick(ev) {
65
+ if (this.menuOpen && !ev.composedPath().includes(this.host)) {
66
+ this.closeMenu();
67
+ }
68
+ }
69
+ onKeydown(ev) {
70
+ if (this.menuOpen && ev.key === 'Escape') {
71
+ this.closeMenu();
72
+ }
73
+ }
48
74
  onSourcesClick = () => {
49
75
  this.bsSourcesClick.emit();
50
76
  };
51
77
  render() {
52
78
  const hasSources = !!this.sourcesCount && this.sourcesCount > 0;
53
- return (h("div", { key: '61a46c51ffba5e1256a94cbab87ce6e06e45941f', class: "bs-chatbot-response-action" }, h("button", { key: '33e8e29235191bc2a4128074d5df08cc304dbefb', type: "button", part: "like", class: "bs-chatbot-response-action__button", "aria-label": "Like", onClick: this.onLikeClick }, h("slot", { key: '2337aa07fec93d12e6706ded394248f0353b91e6', name: "like-icon" }, h(ThumbsUpIcon, { key: '9be56ca48cbb7027ba608ea9f8e89c2c14f98eee' }))), h("button", { key: 'fcdd8f3d4028a0e91cd5e10525ac97febf2261b6', type: "button", part: "dislike", class: "bs-chatbot-response-action__button", "aria-label": "Dislike", onClick: this.onDislikeClick }, h("slot", { key: 'bc219702b5e935659aa7824596511e8b01d2014f', name: "dislike-icon" }, h(ThumbsDownIcon, { key: '5ec9da81d5a89d1d2a35dbfe88682214178204cb' }))), h("button", { key: '59d6b3032d141092537d9e56ced8e3045b40384f', type: "button", part: "copy", class: "bs-chatbot-response-action__button", "aria-label": "Copy", onClick: this.onCopyClick }, h("slot", { key: 'e5bd9fbc4774ae9d67707803819697b56c516984', name: "copy-icon" }, h(CopyIcon, { key: 'e7f8f643920bad3f88c597bb183cfc71f8319c46' }))), h("button", { key: 'a6bd1be8be7f0f70157a5a5e37bc18d2c94462fc', type: "button", part: "regenerate", class: "bs-chatbot-response-action__button", "aria-label": "Regenerate", onClick: this.onRegenerateClick }, h("slot", { key: '7d35981706ea38ae1e613047945dde9d67a94c62', name: "regenerate-icon" }, h(RegenerateIcon, { key: '1d2dacd4bba68fcd120317bb207e7aa25bc0f62f' }))), h("button", { key: '32f3f790f4024cd7b58ba6f291d32b3f5f0dbbc8', type: "button", part: "menu", class: "bs-chatbot-response-action__button", "aria-label": "More options", onClick: this.onMenuClick }, h("slot", { key: '0aaf67bbc34bdf5d12247f9ab264a75dad63f996', name: "menu-icon" }, h(MenuIcon, { key: 'c32d76d1e6f73cd9a82bbf4371a4d047b807b80c' }))), hasSources && (h("button", { key: '240f26ed6ec5faded1efe1f171da10e4a292011e', type: "button", part: "sources", class: "bs-chatbot-response-action__sources", onClick: this.onSourcesClick }, h("slot", { key: 'e97e26840df27d2ff281882823bae7556d53bdc6', name: "sources-icon" }, h(SourcesIcon, { key: '5dd3538a28ee3cf22b2801258024386827b9c774' })), h("span", { key: 'acf07f2bba262a08c3f2d9650b9fd09fab51d172', class: "bs-chatbot-response-action__sources-label" }, this.sourcesCount, " ", this.sourcesCount === 1 ? 'source' : 'sources')))));
79
+ return (h("div", { key: '6595c290930eacb48dc9d52db12a29e2942c2d8f', class: "bs-chatbot-response-action" }, h("button", { key: 'e3acdbb150047bce0718a168c048ee9db6c829f2', type: "button", part: "like", class: "bs-chatbot-response-action__button", "aria-label": "Like", onClick: this.onLikeClick }, h("slot", { key: 'bc9339dafb25f7529a097eaa578ef9ff5d61cafe', name: "like-icon" }, h(ThumbsUpIcon, { key: '49bf4ef39238d9763838ee72ca1b1799e2a284ff' }))), h("button", { key: '1a9900dbb7b1892233477cc4140b690de9d87cf3', type: "button", part: "dislike", class: "bs-chatbot-response-action__button", "aria-label": "Dislike", onClick: this.onDislikeClick }, h("slot", { key: 'db4555adfb4a8cc83cb73ff13d537806e5918f25', name: "dislike-icon" }, h(ThumbsDownIcon, { key: 'a741f40e3f0ea3a11e839277ad5659e0689fb13a' }))), h("button", { key: '19fbad2e8ae607368b78dc076188ec2b30d21325', type: "button", part: "copy", class: "bs-chatbot-response-action__button", "aria-label": "Copy", onClick: this.onCopyClick }, h("slot", { key: '8789336bec82b3335be38628d00664246d0f4015', name: "copy-icon" }, h(CopyIcon, { key: 'e65198dff09540ce0d9af3fa2ed1e5ece12396cf' }))), h("button", { key: '09c16cca24ab255299d9f892e3d2c5334fcaf7f8', type: "button", part: "regenerate", class: "bs-chatbot-response-action__button", "aria-label": "Regenerate", onClick: this.onRegenerateClick }, h("slot", { key: '9758f958967908ce1a25805d9d3bea968f3590f4', name: "regenerate-icon" }, h(RegenerateIcon, { key: '608515ede5570b2482cc46c3f2910d56e086f0b3' }))), h("div", { key: '81c609157f7bb8024a2d0b1a3da30ae3d93f46e8', class: "bs-chatbot-response-action__menu-wrapper" }, h("button", { key: '588d3eef27b342c784fd925e7ff4478370ef8b48', 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 }, h("slot", { key: 'f14e53e800cc2976306824a6b5131a98cf22ee49', name: "menu-icon" }, h(MenuIcon, { key: '7ce9bc2ee29ab3f7d56b4a5cbead2a014f586841' }))), this.menuOpen && (h("div", { key: '80e0e9688f639c51601f891e46c82059ee1fd921', class: "bs-chatbot-response-action__menu-popup" }, h("slot", { key: '9b1a2652e3460a1d97b4de856269516eaf1273e1', name: "menu" })))), hasSources && (h("button", { key: '15febee771c334afddbbdedc21add700ed44ceb1', type: "button", part: "sources", class: "bs-chatbot-response-action__sources", onClick: this.onSourcesClick }, h("slot", { key: '39d2cf88bda64d2f2b0a6d767e6ba5fcb1acc8bd', name: "sources-icon" }, h(SourcesIcon, { key: '358a3b2c1e8479c7ee92e89401edc5e68ff93e1c' })), h("span", { key: '96b364bdfc9f8ae1ba605f0fd751e19e77959720', class: "bs-chatbot-response-action__sources-label" }, this.sourcesCount, " ", this.sourcesCount === 1 ? 'source' : 'sources')))));
54
80
  }
55
81
  };
56
82
  const ThumbsUpIcon = () => (h("svg", { viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, h("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" }), h("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" })));
@@ -0,0 +1,23 @@
1
+ import { r as registerInstance, c as createEvent, h } from './index-nLORuTUY.js';
2
+
3
+ const bsChatbotSuggestionButtonCss = () => `: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}`;
4
+
5
+ const BsChatbotSuggestionButton = class {
6
+ constructor(hostRef) {
7
+ registerInstance(this, hostRef);
8
+ this.bsSelect = createEvent(this, "bsSelect");
9
+ }
10
+ /** Disables the button and applies a reduced-opacity treatment. */
11
+ disabled = false;
12
+ /** Fires when the button is clicked. */
13
+ bsSelect;
14
+ onClick = () => {
15
+ this.bsSelect.emit();
16
+ };
17
+ render() {
18
+ return (h("button", { key: 'e19ad1fd5e95f84f6bff54cbc326e78f70ef3677', type: "button", part: "button", class: "bs-chatbot-suggestion-button", disabled: this.disabled, onClick: this.onClick }, h("slot", { key: '4048fb336d69f0ca78e50ea9d5cba52921906966' })));
19
+ }
20
+ };
21
+ BsChatbotSuggestionButton.style = bsChatbotSuggestionButtonCss();
22
+
23
+ export { BsChatbotSuggestionButton as bs_chatbot_suggestion_button };
@@ -28,10 +28,10 @@ const BsInput = class {
28
28
  this.bsChange.emit(value);
29
29
  };
30
30
  render() {
31
- return (h("div", { key: '53b4d56fb2c955f061ac113b7dc2dbe8548a85d1', class: `bs-input ${this.error ? 'bs-input--error' : ''}` }, this.label && (
31
+ return (h("div", { key: '571583a0d1181a2e307ba86679003c6cc37e4e63', 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: '60ac25b59a78410843dbe9416398d4e0ec15c976', part: "label", class: "bs-input__label", htmlFor: "control" }, this.label)), h("input", { key: 'a9f801b2a7e16550c5d22c1301435e7a7082b362', 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));
34
+ h("label", { key: '0a6c34ad8de3227e1264af649c1ac227e64c67bd', part: "label", class: "bs-input__label", htmlFor: "control" }, this.label)), h("input", { key: 'de46e2c3272735160ca1773abf6fd270d042cfdd', 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
  };
@@ -0,0 +1,27 @@
1
+ import { r as registerInstance, c as createEvent, h } from './index-nLORuTUY.js';
2
+
3
+ const bsMenuItemCss = () => `: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}`;
4
+
5
+ const BsMenuItem = class {
6
+ constructor(hostRef) {
7
+ registerInstance(this, hostRef);
8
+ this.bsSelect = createEvent(this, "bsSelect");
9
+ }
10
+ /** Tracks whether the `icon` slot has assigned content, so the icon wrapper (and its gap) only
11
+ * renders when there's actually an icon to show. */
12
+ hasIcon = false;
13
+ /** Fires when the item is clicked. */
14
+ bsSelect;
15
+ onIconSlotchange = (ev) => {
16
+ this.hasIcon = ev.target.assignedNodes().length > 0;
17
+ };
18
+ onClick = () => {
19
+ this.bsSelect.emit();
20
+ };
21
+ render() {
22
+ return (h("button", { key: '0fbb5f8802a2866794682b90a850d5455c86d69e', type: "button", part: "item", role: "menuitem", class: "bs-menu-item", onClick: this.onClick }, h("span", { key: '810cd5b7bebf0f0f411a956fa13357b4bc3b18ae', part: "icon", class: `bs-menu-item__icon ${this.hasIcon ? 'bs-menu-item__icon--has-content' : ''}` }, h("slot", { key: '683105e1dd44932ac0b569d57eccc3fb54dc1497', name: "icon", onSlotchange: this.onIconSlotchange })), h("span", { key: '2d0edd4325f535020b04bcea93db47ef60d33127', part: "label", class: "bs-menu-item__label" }, h("slot", { key: 'b7ca912d7ec3b5ac3a78f09eb03b8d6b0f96cc2e' }))));
23
+ }
24
+ };
25
+ BsMenuItem.style = bsMenuItemCss();
26
+
27
+ export { BsMenuItem as bs_menu_item };