@brandsync/wc 0.0.3 → 0.0.5
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 +417 -0
- package/dist/brandsync-wc/brandsync-wc.esm.js +1 -1
- package/dist/brandsync-wc/{p-f9e93a35.entry.js → p-0ded3be8.entry.js} +1 -1
- package/dist/brandsync-wc/p-1dc6d7f5.entry.js +1 -0
- package/dist/brandsync-wc/{p-2b693545.entry.js → p-27288299.entry.js} +1 -1
- package/dist/brandsync-wc/{p-c2cc0d6f.entry.js → p-2742ecef.entry.js} +1 -1
- package/dist/brandsync-wc/p-300eea85.entry.js +1 -0
- package/dist/brandsync-wc/{p-69faa19c.entry.js → p-6c1fa4da.entry.js} +1 -1
- package/dist/brandsync-wc/{p-da11e421.entry.js → p-880ea3f8.entry.js} +1 -1
- package/dist/brandsync-wc/{p-f0ca3562.entry.js → p-9e5d2211.entry.js} +1 -1
- package/dist/brandsync-wc/{p-3134f5f5.entry.js → p-ab5cc7af.entry.js} +1 -1
- package/dist/brandsync-wc/p-b24c455f.entry.js +1 -0
- package/dist/brandsync-wc/p-cdbad27a.entry.js +1 -0
- package/dist/brandsync-wc/{p-5739acaf.entry.js → p-cfc3421b.entry.js} +1 -1
- package/dist/brandsync-wc/{p-BOj_41o9.js → p-nLORuTUY.js} +2 -2
- package/dist/cjs/brandsync-wc.cjs.js +2 -2
- package/dist/cjs/bs-badge.cjs.entry.js +1 -1
- package/dist/cjs/bs-button-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/bs-button.cjs.entry.js +1 -1
- package/dist/cjs/bs-card.cjs.entry.js +1 -1
- package/dist/cjs/bs-chatbot-header.cjs.entry.js +144 -0
- package/dist/cjs/bs-chatbot-response-action.cjs.entry.js +92 -0
- package/dist/cjs/bs-composer.cjs.entry.js +1 -1
- package/dist/cjs/bs-data-table.cjs.entry.js +1 -1
- package/dist/cjs/bs-input.cjs.entry.js +3 -3
- package/dist/cjs/bs-menu-item.cjs.entry.js +29 -0
- package/dist/cjs/bs-menu.cjs.entry.js +17 -0
- package/dist/cjs/bs-modal.cjs.entry.js +1 -1
- package/dist/cjs/{index-nyOcuVbF.js → index-CVh-sqA_.js} +3 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +5 -1
- package/dist/collection/components/bs-chatbot-header/bs-chatbot-header.cmp.test.js +94 -0
- package/dist/collection/components/bs-chatbot-header/bs-chatbot-header.css +81 -0
- package/dist/collection/components/bs-chatbot-header/bs-chatbot-header.js +194 -0
- package/dist/collection/components/bs-chatbot-header/bs-chatbot-header.stories.js +53 -0
- package/dist/collection/components/bs-chatbot-header/genie-logo.js +86 -0
- package/dist/collection/components/bs-chatbot-response-action/bs-chatbot-response-action.cmp.test.js +174 -0
- package/dist/collection/components/bs-chatbot-response-action/bs-chatbot-response-action.css +120 -0
- package/dist/collection/components/bs-chatbot-response-action/bs-chatbot-response-action.js +280 -0
- package/dist/collection/components/bs-chatbot-response-action/bs-chatbot-response-action.stories.js +129 -0
- package/dist/collection/components/bs-input/bs-input.js +2 -2
- package/dist/collection/components/bs-menu/bs-menu.cmp.test.js +18 -0
- package/dist/collection/components/bs-menu/bs-menu.css +20 -0
- package/dist/collection/components/bs-menu/bs-menu.js +39 -0
- package/dist/collection/components/bs-menu/bs-menu.stories.js +15 -0
- package/dist/collection/components/bs-menu-item/bs-menu-item.cmp.test.js +33 -0
- package/dist/collection/components/bs-menu-item/bs-menu-item.css +68 -0
- package/dist/collection/components/bs-menu-item/bs-menu-item.js +79 -0
- package/dist/collection/components/bs-menu-item/bs-menu-item.stories.js +37 -0
- package/dist/components/bs-badge.js +1 -1
- package/dist/components/bs-button-skeleton.js +1 -1
- package/dist/components/bs-button.js +1 -1
- package/dist/components/bs-card.js +1 -1
- package/dist/components/bs-chatbot-header.d.ts +11 -0
- package/dist/components/bs-chatbot-header.js +1 -0
- package/dist/components/bs-chatbot-response-action.d.ts +11 -0
- package/dist/components/bs-chatbot-response-action.js +1 -0
- package/dist/components/bs-composer.js +1 -1
- package/dist/components/bs-data-table.js +1 -1
- package/dist/components/bs-input.js +1 -1
- package/dist/components/bs-menu-item.d.ts +11 -0
- package/dist/components/bs-menu-item.js +1 -0
- package/dist/components/bs-menu.d.ts +11 -0
- package/dist/components/bs-menu.js +1 -0
- package/dist/components/bs-modal.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/{p-Cu4gTknX.js → p-BpvhHQSw.js} +1 -1
- package/dist/esm/brandsync-wc.js +3 -3
- package/dist/esm/bs-badge.entry.js +1 -1
- package/dist/esm/bs-button-skeleton.entry.js +1 -1
- package/dist/esm/bs-button.entry.js +1 -1
- package/dist/esm/bs-card.entry.js +1 -1
- package/dist/esm/bs-chatbot-header.entry.js +142 -0
- package/dist/esm/bs-chatbot-response-action.entry.js +90 -0
- package/dist/esm/bs-composer.entry.js +1 -1
- package/dist/esm/bs-data-table.entry.js +1 -1
- package/dist/esm/bs-input.entry.js +3 -3
- package/dist/esm/bs-menu-item.entry.js +27 -0
- package/dist/esm/bs-menu.entry.js +15 -0
- package/dist/esm/bs-modal.entry.js +1 -1
- package/dist/esm/{index-BOj_41o9.js → index-nLORuTUY.js} +3 -0
- package/dist/esm/loader.js +3 -3
- package/dist/types/components/bs-chatbot-header/bs-chatbot-header.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-chatbot-header/bs-chatbot-header.d.ts +59 -0
- package/dist/types/components/bs-chatbot-header/bs-chatbot-header.stories.d.ts +9 -0
- package/dist/types/components/bs-chatbot-header/genie-logo.d.ts +1 -0
- package/dist/types/components/bs-chatbot-response-action/bs-chatbot-response-action.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-chatbot-response-action/bs-chatbot-response-action.d.ts +81 -0
- package/dist/types/components/bs-chatbot-response-action/bs-chatbot-response-action.stories.d.ts +11 -0
- package/dist/types/components/bs-menu/bs-menu.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-menu/bs-menu.d.ts +24 -0
- package/dist/types/components/bs-menu/bs-menu.stories.d.ts +5 -0
- package/dist/types/components/bs-menu-item/bs-menu-item.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-menu-item/bs-menu-item.d.ts +38 -0
- package/dist/types/components/bs-menu-item/bs-menu-item.stories.d.ts +7 -0
- package/dist/types/components.d.ts +507 -0
- package/package.json +2 -1
- package/readme.md +38 -0
- package/dist/brandsync-wc/brandsync-wc.esm.js.map +0 -1
- package/dist/brandsync-wc/index-Cqxk7LcP.js.map +0 -1
- package/dist/brandsync-wc/index.esm.js.map +0 -1
package/dist/collection/components/bs-chatbot-response-action/bs-chatbot-response-action.cmp.test.js
ADDED
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { render, h, describe, it, expect } from "@stencil/vitest";
|
|
2
|
+
describe('bs-chatbot-response-action', () => {
|
|
3
|
+
it('renders all five icon buttons with the correct parts, and no sources button by default', async () => {
|
|
4
|
+
const { root } = await render(h("bs-chatbot-response-action", null));
|
|
5
|
+
expect(root.shadowRoot.querySelector('[part="like"]')).not.toBeNull();
|
|
6
|
+
expect(root.shadowRoot.querySelector('[part="dislike"]')).not.toBeNull();
|
|
7
|
+
expect(root.shadowRoot.querySelector('[part="copy"]')).not.toBeNull();
|
|
8
|
+
expect(root.shadowRoot.querySelector('[part="regenerate"]')).not.toBeNull();
|
|
9
|
+
expect(root.shadowRoot.querySelector('[part="menu"]')).not.toBeNull();
|
|
10
|
+
expect(root.shadowRoot.querySelector('[part="sources"]')).toBeNull();
|
|
11
|
+
});
|
|
12
|
+
it('does not render the sources button when sourcesCount is 0', async () => {
|
|
13
|
+
const { root } = await render(h("bs-chatbot-response-action", { sourcesCount: 0 }));
|
|
14
|
+
expect(root.shadowRoot.querySelector('[part="sources"]')).toBeNull();
|
|
15
|
+
});
|
|
16
|
+
it('renders the sources button with singular text when sourcesCount is 1', async () => {
|
|
17
|
+
const { root } = await render(h("bs-chatbot-response-action", { sourcesCount: 1 }));
|
|
18
|
+
const sources = root.shadowRoot.querySelector('[part="sources"]');
|
|
19
|
+
expect(sources).not.toBeNull();
|
|
20
|
+
expect(sources).toHaveTextContent('1 source');
|
|
21
|
+
});
|
|
22
|
+
it('renders the sources button with plural text when sourcesCount is greater than 1', async () => {
|
|
23
|
+
const { root } = await render(h("bs-chatbot-response-action", { sourcesCount: 3 }));
|
|
24
|
+
const sources = root.shadowRoot.querySelector('[part="sources"]');
|
|
25
|
+
expect(sources).not.toBeNull();
|
|
26
|
+
expect(sources).toHaveTextContent('3 sources');
|
|
27
|
+
});
|
|
28
|
+
it('emits bsLike when the like button is clicked, and not the other events', async () => {
|
|
29
|
+
const { root, spyOnEvent } = await render(h("bs-chatbot-response-action", { sourcesCount: 3 }));
|
|
30
|
+
const likeSpy = spyOnEvent('bsLike');
|
|
31
|
+
const dislikeSpy = spyOnEvent('bsDislike');
|
|
32
|
+
const copySpy = spyOnEvent('bsCopy');
|
|
33
|
+
const regenerateSpy = spyOnEvent('bsRegenerate');
|
|
34
|
+
const menuSpy = spyOnEvent('bsMenuOpen');
|
|
35
|
+
const sourcesSpy = spyOnEvent('bsSourcesClick');
|
|
36
|
+
root.shadowRoot.querySelector('[part="like"]').click();
|
|
37
|
+
expect(likeSpy).toHaveReceivedEventTimes(1);
|
|
38
|
+
expect(dislikeSpy.length).toBe(0);
|
|
39
|
+
expect(copySpy.length).toBe(0);
|
|
40
|
+
expect(regenerateSpy.length).toBe(0);
|
|
41
|
+
expect(menuSpy.length).toBe(0);
|
|
42
|
+
expect(sourcesSpy.length).toBe(0);
|
|
43
|
+
});
|
|
44
|
+
it('emits bsDislike when the dislike button is clicked, and not the other events', async () => {
|
|
45
|
+
const { root, spyOnEvent } = await render(h("bs-chatbot-response-action", { sourcesCount: 3 }));
|
|
46
|
+
const likeSpy = spyOnEvent('bsLike');
|
|
47
|
+
const dislikeSpy = spyOnEvent('bsDislike');
|
|
48
|
+
const copySpy = spyOnEvent('bsCopy');
|
|
49
|
+
const regenerateSpy = spyOnEvent('bsRegenerate');
|
|
50
|
+
const menuSpy = spyOnEvent('bsMenuOpen');
|
|
51
|
+
const sourcesSpy = spyOnEvent('bsSourcesClick');
|
|
52
|
+
root.shadowRoot.querySelector('[part="dislike"]').click();
|
|
53
|
+
expect(dislikeSpy).toHaveReceivedEventTimes(1);
|
|
54
|
+
expect(likeSpy.length).toBe(0);
|
|
55
|
+
expect(copySpy.length).toBe(0);
|
|
56
|
+
expect(regenerateSpy.length).toBe(0);
|
|
57
|
+
expect(menuSpy.length).toBe(0);
|
|
58
|
+
expect(sourcesSpy.length).toBe(0);
|
|
59
|
+
});
|
|
60
|
+
it('emits bsCopy when the copy button is clicked, and not the other events', async () => {
|
|
61
|
+
const { root, spyOnEvent } = await render(h("bs-chatbot-response-action", { sourcesCount: 3 }));
|
|
62
|
+
const likeSpy = spyOnEvent('bsLike');
|
|
63
|
+
const dislikeSpy = spyOnEvent('bsDislike');
|
|
64
|
+
const copySpy = spyOnEvent('bsCopy');
|
|
65
|
+
const regenerateSpy = spyOnEvent('bsRegenerate');
|
|
66
|
+
const menuSpy = spyOnEvent('bsMenuOpen');
|
|
67
|
+
const sourcesSpy = spyOnEvent('bsSourcesClick');
|
|
68
|
+
root.shadowRoot.querySelector('[part="copy"]').click();
|
|
69
|
+
expect(copySpy).toHaveReceivedEventTimes(1);
|
|
70
|
+
expect(likeSpy.length).toBe(0);
|
|
71
|
+
expect(dislikeSpy.length).toBe(0);
|
|
72
|
+
expect(regenerateSpy.length).toBe(0);
|
|
73
|
+
expect(menuSpy.length).toBe(0);
|
|
74
|
+
expect(sourcesSpy.length).toBe(0);
|
|
75
|
+
});
|
|
76
|
+
it('emits bsRegenerate when the regenerate button is clicked, and not the other events', async () => {
|
|
77
|
+
const { root, spyOnEvent } = await render(h("bs-chatbot-response-action", { sourcesCount: 3 }));
|
|
78
|
+
const likeSpy = spyOnEvent('bsLike');
|
|
79
|
+
const dislikeSpy = spyOnEvent('bsDislike');
|
|
80
|
+
const copySpy = spyOnEvent('bsCopy');
|
|
81
|
+
const regenerateSpy = spyOnEvent('bsRegenerate');
|
|
82
|
+
const menuSpy = spyOnEvent('bsMenuOpen');
|
|
83
|
+
const sourcesSpy = spyOnEvent('bsSourcesClick');
|
|
84
|
+
root.shadowRoot.querySelector('[part="regenerate"]').click();
|
|
85
|
+
expect(regenerateSpy).toHaveReceivedEventTimes(1);
|
|
86
|
+
expect(likeSpy.length).toBe(0);
|
|
87
|
+
expect(dislikeSpy.length).toBe(0);
|
|
88
|
+
expect(copySpy.length).toBe(0);
|
|
89
|
+
expect(menuSpy.length).toBe(0);
|
|
90
|
+
expect(sourcesSpy.length).toBe(0);
|
|
91
|
+
});
|
|
92
|
+
it('emits bsMenuOpen with true when the more-options button is clicked, and not the other events', async () => {
|
|
93
|
+
const { root, waitForChanges, spyOnEvent } = await render(h("bs-chatbot-response-action", { sourcesCount: 3 }));
|
|
94
|
+
const likeSpy = spyOnEvent('bsLike');
|
|
95
|
+
const dislikeSpy = spyOnEvent('bsDislike');
|
|
96
|
+
const copySpy = spyOnEvent('bsCopy');
|
|
97
|
+
const regenerateSpy = spyOnEvent('bsRegenerate');
|
|
98
|
+
const menuSpy = spyOnEvent('bsMenuOpen');
|
|
99
|
+
const sourcesSpy = spyOnEvent('bsSourcesClick');
|
|
100
|
+
root.shadowRoot.querySelector('[part="menu"]').click();
|
|
101
|
+
await waitForChanges();
|
|
102
|
+
expect(menuSpy).toHaveReceivedEventTimes(1);
|
|
103
|
+
expect(menuSpy).toHaveReceivedEventDetail(true);
|
|
104
|
+
expect(root.menuOpen).toBe(true);
|
|
105
|
+
expect(likeSpy.length).toBe(0);
|
|
106
|
+
expect(dislikeSpy.length).toBe(0);
|
|
107
|
+
expect(copySpy.length).toBe(0);
|
|
108
|
+
expect(regenerateSpy.length).toBe(0);
|
|
109
|
+
expect(sourcesSpy.length).toBe(0);
|
|
110
|
+
});
|
|
111
|
+
it('emits bsMenuOpen with false when the more-options button is clicked again to close it', async () => {
|
|
112
|
+
const { root, waitForChanges, spyOnEvent } = await render(h("bs-chatbot-response-action", { sourcesCount: 3 }));
|
|
113
|
+
const menuSpy = spyOnEvent('bsMenuOpen');
|
|
114
|
+
const menuButton = root.shadowRoot.querySelector('[part="menu"]');
|
|
115
|
+
menuButton.click();
|
|
116
|
+
await waitForChanges();
|
|
117
|
+
menuButton.click();
|
|
118
|
+
await waitForChanges();
|
|
119
|
+
expect(menuSpy).toHaveReceivedEventTimes(2);
|
|
120
|
+
expect(menuSpy).toHaveReceivedEventDetail(false);
|
|
121
|
+
expect(root.menuOpen).toBe(false);
|
|
122
|
+
});
|
|
123
|
+
it('does not render the menu slot wrapper when menuOpen is false', async () => {
|
|
124
|
+
const { root } = await render(h("bs-chatbot-response-action", null));
|
|
125
|
+
expect(root.shadowRoot.querySelector('slot[name="menu"]')).toBeNull();
|
|
126
|
+
});
|
|
127
|
+
it('renders the menu slot wrapper when menuOpen is true', async () => {
|
|
128
|
+
const { root } = await render(h("bs-chatbot-response-action", { menuOpen: true }));
|
|
129
|
+
expect(root.shadowRoot.querySelector('slot[name="menu"]')).not.toBeNull();
|
|
130
|
+
});
|
|
131
|
+
it('closes the menu and emits bsMenuOpen(false) on a click outside the host', async () => {
|
|
132
|
+
const { root, waitForChanges, spyOnEvent } = await render(h("bs-chatbot-response-action", { menuOpen: true }));
|
|
133
|
+
const menuSpy = spyOnEvent('bsMenuOpen');
|
|
134
|
+
document.body.click();
|
|
135
|
+
await waitForChanges();
|
|
136
|
+
expect(root.menuOpen).toBe(false);
|
|
137
|
+
expect(menuSpy).toHaveReceivedEventTimes(1);
|
|
138
|
+
expect(menuSpy).toHaveReceivedEventDetail(false);
|
|
139
|
+
});
|
|
140
|
+
it('closes the menu on Escape', async () => {
|
|
141
|
+
const { root, waitForChanges, spyOnEvent } = await render(h("bs-chatbot-response-action", { menuOpen: true }));
|
|
142
|
+
const menuSpy = spyOnEvent('bsMenuOpen');
|
|
143
|
+
document.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape' }));
|
|
144
|
+
await waitForChanges();
|
|
145
|
+
expect(root.menuOpen).toBe(false);
|
|
146
|
+
expect(menuSpy).toHaveReceivedEventTimes(1);
|
|
147
|
+
expect(menuSpy).toHaveReceivedEventDetail(false);
|
|
148
|
+
});
|
|
149
|
+
it('emits bsSourcesClick when the sources button is clicked, and not the other events', async () => {
|
|
150
|
+
const { root, spyOnEvent } = await render(h("bs-chatbot-response-action", { sourcesCount: 3 }));
|
|
151
|
+
const likeSpy = spyOnEvent('bsLike');
|
|
152
|
+
const dislikeSpy = spyOnEvent('bsDislike');
|
|
153
|
+
const copySpy = spyOnEvent('bsCopy');
|
|
154
|
+
const regenerateSpy = spyOnEvent('bsRegenerate');
|
|
155
|
+
const menuSpy = spyOnEvent('bsMenuOpen');
|
|
156
|
+
const sourcesSpy = spyOnEvent('bsSourcesClick');
|
|
157
|
+
root.shadowRoot.querySelector('[part="sources"]').click();
|
|
158
|
+
expect(sourcesSpy).toHaveReceivedEventTimes(1);
|
|
159
|
+
expect(likeSpy.length).toBe(0);
|
|
160
|
+
expect(dislikeSpy.length).toBe(0);
|
|
161
|
+
expect(copySpy.length).toBe(0);
|
|
162
|
+
expect(regenerateSpy.length).toBe(0);
|
|
163
|
+
expect(menuSpy.length).toBe(0);
|
|
164
|
+
});
|
|
165
|
+
it('renders consumer-supplied content in the like-icon slot instead of the default icon', async () => {
|
|
166
|
+
const { root } = await render(h("bs-chatbot-response-action", null, h("span", { slot: "like-icon" }, "CUSTOM")));
|
|
167
|
+
const likeButton = root.shadowRoot.querySelector('[part="like"]');
|
|
168
|
+
const slot = likeButton.querySelector('slot[name="like-icon"]');
|
|
169
|
+
expect(slot).not.toBeNull();
|
|
170
|
+
const assigned = slot.assignedElements();
|
|
171
|
+
expect(assigned).toHaveLength(1);
|
|
172
|
+
expect(assigned[0]).toHaveTextContent('CUSTOM');
|
|
173
|
+
});
|
|
174
|
+
});
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
--bs-chatbot-response-action-gap: var(--bs-spacing-100);
|
|
4
|
+
--bs-chatbot-response-action-padding-top: var(--bs-spacing-150);
|
|
5
|
+
--bs-chatbot-response-action-padding-bottom: var(--bs-spacing-50);
|
|
6
|
+
--bs-chatbot-response-action-button-size: var(--bs-spacing-400);
|
|
7
|
+
--bs-chatbot-response-action-button-radius: var(--bs-border-radius-100);
|
|
8
|
+
--bs-chatbot-response-action-button-hover: var(--bs-color-neutral-container);
|
|
9
|
+
--bs-chatbot-response-action-button-pressed: var(--bs-color-neutral-container-pressed);
|
|
10
|
+
--bs-chatbot-response-action-icon: var(--bs-icon-neutral-default);
|
|
11
|
+
--bs-chatbot-response-action-sources-gap: var(--bs-spacing-50);
|
|
12
|
+
--bs-chatbot-response-action-sources-padding-left: var(--bs-spacing-100);
|
|
13
|
+
--bs-chatbot-response-action-sources-padding-right: var(--bs-spacing-150);
|
|
14
|
+
--bs-chatbot-response-action-sources-color: var(--bs-text-neutral-default);
|
|
15
|
+
--bs-chatbot-response-action-sources-font-size: var(--bs-font-size-sm);
|
|
16
|
+
--bs-chatbot-response-action-sources-line-height: var(--bs-line-height-body-sm);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.bs-chatbot-response-action {
|
|
20
|
+
box-sizing: border-box;
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
gap: var(--bs-chatbot-response-action-gap);
|
|
24
|
+
padding-top: var(--bs-chatbot-response-action-padding-top);
|
|
25
|
+
padding-bottom: var(--bs-chatbot-response-action-padding-bottom);
|
|
26
|
+
background: transparent;
|
|
27
|
+
font-family: inherit;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.bs-chatbot-response-action__button {
|
|
31
|
+
display: inline-flex;
|
|
32
|
+
align-items: center;
|
|
33
|
+
justify-content: center;
|
|
34
|
+
box-sizing: border-box;
|
|
35
|
+
border: none;
|
|
36
|
+
padding: 0;
|
|
37
|
+
cursor: pointer;
|
|
38
|
+
background: transparent;
|
|
39
|
+
color: var(--bs-chatbot-response-action-icon);
|
|
40
|
+
font-family: inherit;
|
|
41
|
+
border-radius: var(--bs-chatbot-response-action-button-radius);
|
|
42
|
+
width: var(--bs-chatbot-response-action-button-size);
|
|
43
|
+
height: var(--bs-chatbot-response-action-button-size);
|
|
44
|
+
flex-shrink: 0;
|
|
45
|
+
transition: background-color var(--bs-duration-fast) var(--bs-easing-standard);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.bs-chatbot-response-action__button:focus-visible {
|
|
49
|
+
outline: 2px solid var(--bs-border-neutral-focus);
|
|
50
|
+
outline-offset: 2px;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.bs-chatbot-response-action__button svg {
|
|
54
|
+
width: 20px;
|
|
55
|
+
height: 20px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.bs-chatbot-response-action__button:hover {
|
|
59
|
+
background: var(--bs-chatbot-response-action-button-hover);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.bs-chatbot-response-action__button:active {
|
|
63
|
+
background: var(--bs-chatbot-response-action-button-pressed);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.bs-chatbot-response-action__menu-wrapper {
|
|
67
|
+
position: relative;
|
|
68
|
+
display: inline-flex;
|
|
69
|
+
flex-shrink: 0;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.bs-chatbot-response-action__menu-popup {
|
|
73
|
+
position: absolute;
|
|
74
|
+
top: calc(100% + var(--bs-spacing-50));
|
|
75
|
+
left: 0;
|
|
76
|
+
z-index: 1;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.bs-chatbot-response-action__sources {
|
|
80
|
+
display: inline-flex;
|
|
81
|
+
align-items: center;
|
|
82
|
+
box-sizing: border-box;
|
|
83
|
+
border: none;
|
|
84
|
+
cursor: pointer;
|
|
85
|
+
background: transparent;
|
|
86
|
+
color: var(--bs-chatbot-response-action-sources-color);
|
|
87
|
+
font-family: inherit;
|
|
88
|
+
font-size: var(--bs-chatbot-response-action-sources-font-size);
|
|
89
|
+
line-height: calc(var(--bs-chatbot-response-action-sources-line-height) * 1px);
|
|
90
|
+
gap: var(--bs-chatbot-response-action-sources-gap);
|
|
91
|
+
border-radius: var(--bs-chatbot-response-action-button-radius);
|
|
92
|
+
height: var(--bs-chatbot-response-action-button-size);
|
|
93
|
+
padding-left: var(--bs-chatbot-response-action-sources-padding-left);
|
|
94
|
+
padding-right: var(--bs-chatbot-response-action-sources-padding-right);
|
|
95
|
+
flex-shrink: 0;
|
|
96
|
+
transition: background-color var(--bs-duration-fast) var(--bs-easing-standard);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.bs-chatbot-response-action__sources:focus-visible {
|
|
100
|
+
outline: 2px solid var(--bs-border-neutral-focus);
|
|
101
|
+
outline-offset: 2px;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.bs-chatbot-response-action__sources svg {
|
|
105
|
+
width: 20px;
|
|
106
|
+
height: 20px;
|
|
107
|
+
flex-shrink: 0;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.bs-chatbot-response-action__sources:hover {
|
|
111
|
+
background: var(--bs-chatbot-response-action-button-hover);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.bs-chatbot-response-action__sources:active {
|
|
115
|
+
background: var(--bs-chatbot-response-action-button-pressed);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.bs-chatbot-response-action__sources-label {
|
|
119
|
+
white-space: nowrap;
|
|
120
|
+
}
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
/**
|
|
3
|
+
* The row of action buttons that appears below an AI response message in a Genie chat panel:
|
|
4
|
+
* like, dislike, copy, regenerate, and more-options icon buttons, plus an optional "N sources"
|
|
5
|
+
* button.
|
|
6
|
+
*
|
|
7
|
+
* ## When to use
|
|
8
|
+
* - Directly below an AI-generated response message in a Genie chat panel.
|
|
9
|
+
*
|
|
10
|
+
* ## When not to use
|
|
11
|
+
* - Below a user's own message -- these actions (regenerate, like/dislike a response, etc.) only
|
|
12
|
+
* make sense for AI-generated content.
|
|
13
|
+
*
|
|
14
|
+
* @slot like-icon - Overrides the default "Like" button icon.
|
|
15
|
+
* @slot dislike-icon - Overrides the default "Dislike" button icon.
|
|
16
|
+
* @slot copy-icon - Overrides the default "Copy" button icon.
|
|
17
|
+
* @slot regenerate-icon - Overrides the default "Regenerate" button icon.
|
|
18
|
+
* @slot menu-icon - Overrides the default "More options" button icon.
|
|
19
|
+
* @slot menu - A `bs-menu` (or other content) rendered in a popup positioned below the "More
|
|
20
|
+
* options" button, shown only while `menuOpen` is `true`.
|
|
21
|
+
* @slot sources-icon - Overrides the default icon in the "N sources" button.
|
|
22
|
+
* @part like - The "Like" icon button.
|
|
23
|
+
* @part dislike - The "Dislike" icon button.
|
|
24
|
+
* @part copy - The "Copy" icon button.
|
|
25
|
+
* @part regenerate - The "Regenerate" icon button.
|
|
26
|
+
* @part menu - The "More options" icon button.
|
|
27
|
+
* @part sources - The "N sources" button (only rendered when `sourcesCount` is set).
|
|
28
|
+
* @prop --bs-chatbot-response-action-gap - Gap between all buttons in the row. Aliased to `--bs-spacing-100`.
|
|
29
|
+
* @prop --bs-chatbot-response-action-padding-top - Aliased to `--bs-spacing-150`.
|
|
30
|
+
* @prop --bs-chatbot-response-action-padding-bottom - Aliased to `--bs-spacing-50`.
|
|
31
|
+
* @prop --bs-chatbot-response-action-button-size - Width/height of each icon button. Aliased to `--bs-spacing-400`.
|
|
32
|
+
* @prop --bs-chatbot-response-action-button-radius - Corner radius of each button. Aliased to `--bs-border-radius-100`.
|
|
33
|
+
* @prop --bs-chatbot-response-action-button-hover - Button background on hover. Aliased to `--bs-color-neutral-container`.
|
|
34
|
+
* @prop --bs-chatbot-response-action-button-pressed - Button background when pressed. Aliased to `--bs-color-neutral-container-pressed`.
|
|
35
|
+
* @prop --bs-chatbot-response-action-icon - Icon color. Aliased to `--bs-icon-neutral-default`.
|
|
36
|
+
* @prop --bs-chatbot-response-action-sources-gap - Gap between the sources icon and its label. Aliased to `--bs-spacing-50`.
|
|
37
|
+
* @prop --bs-chatbot-response-action-sources-padding-left - Aliased to `--bs-spacing-100`.
|
|
38
|
+
* @prop --bs-chatbot-response-action-sources-padding-right - Aliased to `--bs-spacing-150`.
|
|
39
|
+
* @prop --bs-chatbot-response-action-sources-color - Text color of the sources label. Aliased to `--bs-text-neutral-default`.
|
|
40
|
+
* @prop --bs-chatbot-response-action-sources-font-size - Aliased to `--bs-font-size-sm`.
|
|
41
|
+
* @prop --bs-chatbot-response-action-sources-line-height - Aliased to `--bs-line-height-body-sm`.
|
|
42
|
+
*/
|
|
43
|
+
export class BsChatbotResponseAction {
|
|
44
|
+
host;
|
|
45
|
+
/**
|
|
46
|
+
* Number of sources backing the response. When set to a positive number, renders the "N
|
|
47
|
+
* sources" button (singular "1 source" / plural "N sources"). When unset or `0`, the button is
|
|
48
|
+
* not rendered at all.
|
|
49
|
+
*/
|
|
50
|
+
sourcesCount;
|
|
51
|
+
/**
|
|
52
|
+
* Whether the "more options" popup menu (the `menu` slot) is currently open. Mutable + reflected
|
|
53
|
+
* so the component can track/close itself (kebab click, click outside, Escape) the same way
|
|
54
|
+
* `bs-chatbot-header`'s `expanded` prop tracks its own toggle state, while still emitting
|
|
55
|
+
* `bsMenuOpen` for the consumer to react to.
|
|
56
|
+
*/
|
|
57
|
+
menuOpen = false;
|
|
58
|
+
/** Fires when the "Like" button is clicked. */
|
|
59
|
+
bsLike;
|
|
60
|
+
/** Fires when the "Dislike" button is clicked. */
|
|
61
|
+
bsDislike;
|
|
62
|
+
/** Fires when the "Copy" button is clicked. */
|
|
63
|
+
bsCopy;
|
|
64
|
+
/** Fires when the "Regenerate" button is clicked. */
|
|
65
|
+
bsRegenerate;
|
|
66
|
+
/** Fires when the "More options" button is clicked or the menu is closed (click outside,
|
|
67
|
+
* Escape), with the new `menuOpen` value. */
|
|
68
|
+
bsMenuOpen;
|
|
69
|
+
/** Fires when the "N sources" button is clicked. */
|
|
70
|
+
bsSourcesClick;
|
|
71
|
+
onLikeClick = () => {
|
|
72
|
+
this.bsLike.emit();
|
|
73
|
+
};
|
|
74
|
+
onDislikeClick = () => {
|
|
75
|
+
this.bsDislike.emit();
|
|
76
|
+
};
|
|
77
|
+
onCopyClick = () => {
|
|
78
|
+
this.bsCopy.emit();
|
|
79
|
+
};
|
|
80
|
+
onRegenerateClick = () => {
|
|
81
|
+
this.bsRegenerate.emit();
|
|
82
|
+
};
|
|
83
|
+
onMenuClick = () => {
|
|
84
|
+
this.menuOpen = !this.menuOpen;
|
|
85
|
+
this.bsMenuOpen.emit(this.menuOpen);
|
|
86
|
+
};
|
|
87
|
+
closeMenu = () => {
|
|
88
|
+
if (!this.menuOpen)
|
|
89
|
+
return;
|
|
90
|
+
this.menuOpen = false;
|
|
91
|
+
this.bsMenuOpen.emit(this.menuOpen);
|
|
92
|
+
};
|
|
93
|
+
onDocumentClick(ev) {
|
|
94
|
+
if (this.menuOpen && !ev.composedPath().includes(this.host)) {
|
|
95
|
+
this.closeMenu();
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
onKeydown(ev) {
|
|
99
|
+
if (this.menuOpen && ev.key === 'Escape') {
|
|
100
|
+
this.closeMenu();
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
onSourcesClick = () => {
|
|
104
|
+
this.bsSourcesClick.emit();
|
|
105
|
+
};
|
|
106
|
+
render() {
|
|
107
|
+
const hasSources = !!this.sourcesCount && this.sourcesCount > 0;
|
|
108
|
+
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')))));
|
|
109
|
+
}
|
|
110
|
+
static get is() { return "bs-chatbot-response-action"; }
|
|
111
|
+
static get encapsulation() { return "shadow"; }
|
|
112
|
+
static get originalStyleUrls() {
|
|
113
|
+
return {
|
|
114
|
+
"$": ["bs-chatbot-response-action.css"]
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
static get styleUrls() {
|
|
118
|
+
return {
|
|
119
|
+
"$": ["bs-chatbot-response-action.css"]
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
static get properties() {
|
|
123
|
+
return {
|
|
124
|
+
"sourcesCount": {
|
|
125
|
+
"type": "number",
|
|
126
|
+
"mutable": false,
|
|
127
|
+
"complexType": {
|
|
128
|
+
"original": "number",
|
|
129
|
+
"resolved": "number",
|
|
130
|
+
"references": {}
|
|
131
|
+
},
|
|
132
|
+
"required": false,
|
|
133
|
+
"optional": true,
|
|
134
|
+
"docs": {
|
|
135
|
+
"tags": [],
|
|
136
|
+
"text": "Number of sources backing the response. When set to a positive number, renders the \"N\nsources\" button (singular \"1 source\" / plural \"N sources\"). When unset or `0`, the button is\nnot rendered at all."
|
|
137
|
+
},
|
|
138
|
+
"getter": false,
|
|
139
|
+
"setter": false,
|
|
140
|
+
"reflect": false,
|
|
141
|
+
"attribute": "sources-count"
|
|
142
|
+
},
|
|
143
|
+
"menuOpen": {
|
|
144
|
+
"type": "boolean",
|
|
145
|
+
"mutable": true,
|
|
146
|
+
"complexType": {
|
|
147
|
+
"original": "boolean",
|
|
148
|
+
"resolved": "boolean",
|
|
149
|
+
"references": {}
|
|
150
|
+
},
|
|
151
|
+
"required": false,
|
|
152
|
+
"optional": false,
|
|
153
|
+
"docs": {
|
|
154
|
+
"tags": [],
|
|
155
|
+
"text": "Whether the \"more options\" popup menu (the `menu` slot) is currently open. Mutable + reflected\nso the component can track/close itself (kebab click, click outside, Escape) the same way\n`bs-chatbot-header`'s `expanded` prop tracks its own toggle state, while still emitting\n`bsMenuOpen` for the consumer to react to."
|
|
156
|
+
},
|
|
157
|
+
"getter": false,
|
|
158
|
+
"setter": false,
|
|
159
|
+
"reflect": true,
|
|
160
|
+
"attribute": "menu-open",
|
|
161
|
+
"defaultValue": "false"
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
static get events() {
|
|
166
|
+
return [{
|
|
167
|
+
"method": "bsLike",
|
|
168
|
+
"name": "bsLike",
|
|
169
|
+
"bubbles": true,
|
|
170
|
+
"cancelable": true,
|
|
171
|
+
"composed": true,
|
|
172
|
+
"docs": {
|
|
173
|
+
"tags": [],
|
|
174
|
+
"text": "Fires when the \"Like\" button is clicked."
|
|
175
|
+
},
|
|
176
|
+
"complexType": {
|
|
177
|
+
"original": "void",
|
|
178
|
+
"resolved": "void",
|
|
179
|
+
"references": {}
|
|
180
|
+
}
|
|
181
|
+
}, {
|
|
182
|
+
"method": "bsDislike",
|
|
183
|
+
"name": "bsDislike",
|
|
184
|
+
"bubbles": true,
|
|
185
|
+
"cancelable": true,
|
|
186
|
+
"composed": true,
|
|
187
|
+
"docs": {
|
|
188
|
+
"tags": [],
|
|
189
|
+
"text": "Fires when the \"Dislike\" button is clicked."
|
|
190
|
+
},
|
|
191
|
+
"complexType": {
|
|
192
|
+
"original": "void",
|
|
193
|
+
"resolved": "void",
|
|
194
|
+
"references": {}
|
|
195
|
+
}
|
|
196
|
+
}, {
|
|
197
|
+
"method": "bsCopy",
|
|
198
|
+
"name": "bsCopy",
|
|
199
|
+
"bubbles": true,
|
|
200
|
+
"cancelable": true,
|
|
201
|
+
"composed": true,
|
|
202
|
+
"docs": {
|
|
203
|
+
"tags": [],
|
|
204
|
+
"text": "Fires when the \"Copy\" button is clicked."
|
|
205
|
+
},
|
|
206
|
+
"complexType": {
|
|
207
|
+
"original": "void",
|
|
208
|
+
"resolved": "void",
|
|
209
|
+
"references": {}
|
|
210
|
+
}
|
|
211
|
+
}, {
|
|
212
|
+
"method": "bsRegenerate",
|
|
213
|
+
"name": "bsRegenerate",
|
|
214
|
+
"bubbles": true,
|
|
215
|
+
"cancelable": true,
|
|
216
|
+
"composed": true,
|
|
217
|
+
"docs": {
|
|
218
|
+
"tags": [],
|
|
219
|
+
"text": "Fires when the \"Regenerate\" button is clicked."
|
|
220
|
+
},
|
|
221
|
+
"complexType": {
|
|
222
|
+
"original": "void",
|
|
223
|
+
"resolved": "void",
|
|
224
|
+
"references": {}
|
|
225
|
+
}
|
|
226
|
+
}, {
|
|
227
|
+
"method": "bsMenuOpen",
|
|
228
|
+
"name": "bsMenuOpen",
|
|
229
|
+
"bubbles": true,
|
|
230
|
+
"cancelable": true,
|
|
231
|
+
"composed": true,
|
|
232
|
+
"docs": {
|
|
233
|
+
"tags": [],
|
|
234
|
+
"text": "Fires when the \"More options\" button is clicked or the menu is closed (click outside,\nEscape), with the new `menuOpen` value."
|
|
235
|
+
},
|
|
236
|
+
"complexType": {
|
|
237
|
+
"original": "boolean",
|
|
238
|
+
"resolved": "boolean",
|
|
239
|
+
"references": {}
|
|
240
|
+
}
|
|
241
|
+
}, {
|
|
242
|
+
"method": "bsSourcesClick",
|
|
243
|
+
"name": "bsSourcesClick",
|
|
244
|
+
"bubbles": true,
|
|
245
|
+
"cancelable": true,
|
|
246
|
+
"composed": true,
|
|
247
|
+
"docs": {
|
|
248
|
+
"tags": [],
|
|
249
|
+
"text": "Fires when the \"N sources\" button is clicked."
|
|
250
|
+
},
|
|
251
|
+
"complexType": {
|
|
252
|
+
"original": "void",
|
|
253
|
+
"resolved": "void",
|
|
254
|
+
"references": {}
|
|
255
|
+
}
|
|
256
|
+
}];
|
|
257
|
+
}
|
|
258
|
+
static get elementRef() { return "host"; }
|
|
259
|
+
static get listeners() {
|
|
260
|
+
return [{
|
|
261
|
+
"name": "click",
|
|
262
|
+
"method": "onDocumentClick",
|
|
263
|
+
"target": "document",
|
|
264
|
+
"capture": false,
|
|
265
|
+
"passive": false
|
|
266
|
+
}, {
|
|
267
|
+
"name": "keydown",
|
|
268
|
+
"method": "onKeydown",
|
|
269
|
+
"target": "document",
|
|
270
|
+
"capture": false,
|
|
271
|
+
"passive": false
|
|
272
|
+
}];
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
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" })));
|
|
276
|
+
const ThumbsDownIcon = () => (h("svg", { viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, h("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" }), h("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" })));
|
|
277
|
+
const CopyIcon = () => (h("svg", { viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, h("path", { d: "M13.125 13.125H16.875V3.125H6.875V6.875", stroke: "currentColor", "stroke-width": "1.66667", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M13.125 6.875H3.125V16.875H13.125V6.875Z", stroke: "currentColor", "stroke-width": "1.66667", "stroke-linecap": "round", "stroke-linejoin": "round" })));
|
|
278
|
+
const RegenerateIcon = () => (h("svg", { viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, h("path", { d: "M13.125 7.5H16.875V3.75", stroke: "currentColor", "stroke-width": "1.66667", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("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" }), h("path", { d: "M6.875 12.5H3.125V16.25", stroke: "currentColor", "stroke-width": "1.66667", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("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" })));
|
|
279
|
+
const MenuIcon = () => (h("svg", { viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, h("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" }), h("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" }), h("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" })));
|
|
280
|
+
const SourcesIcon = () => (h("svg", { viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, h("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" }), h("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" }), h("path", { d: "M6.875 11.875H10.625", stroke: "currentColor", "stroke-width": "1.66667", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M6.875 14.375H10.625", stroke: "currentColor", "stroke-width": "1.66667", "stroke-linecap": "round", "stroke-linejoin": "round" })));
|