@brandsync/wc 0.0.7 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (195) hide show
  1. package/custom-elements.json +1810 -355
  2. package/dist/brandsync-wc/brandsync-wc.esm.js +1 -1
  3. package/dist/brandsync-wc/p-0d64ea40.entry.js +1 -0
  4. package/dist/brandsync-wc/{p-c63d16e1.entry.js → p-1515498e.entry.js} +1 -1
  5. package/dist/brandsync-wc/p-16a54578.entry.js +1 -0
  6. package/dist/brandsync-wc/p-18af02df.entry.js +1 -0
  7. package/dist/brandsync-wc/p-30a0e168.entry.js +1 -0
  8. package/dist/brandsync-wc/p-3dacae70.entry.js +1 -0
  9. package/dist/brandsync-wc/p-5333bb5a.entry.js +1 -0
  10. package/dist/brandsync-wc/p-575ce905.entry.js +1 -0
  11. package/dist/brandsync-wc/{p-dd0fea0e.entry.js → p-7776b57b.entry.js} +1 -1
  12. package/dist/brandsync-wc/{p-bfd09c98.entry.js → p-805644e4.entry.js} +1 -1
  13. package/dist/brandsync-wc/{p-f88d9a6e.entry.js → p-8a78d6ea.entry.js} +1 -1
  14. package/dist/brandsync-wc/p-8d12ed96.entry.js +1 -0
  15. package/dist/brandsync-wc/p-94ed898a.entry.js +1 -0
  16. package/dist/brandsync-wc/{p-9e5d2211.entry.js → p-96f374be.entry.js} +1 -1
  17. package/dist/brandsync-wc/{p-ab5cc7af.entry.js → p-a34f460d.entry.js} +1 -1
  18. package/dist/brandsync-wc/p-bc72439a.entry.js +1 -0
  19. package/dist/brandsync-wc/{p-76eca100.entry.js → p-ce0914a7.entry.js} +1 -1
  20. package/dist/brandsync-wc/{p-5a0fe72e.entry.js → p-d682675e.entry.js} +1 -1
  21. package/dist/brandsync-wc/p-dad4a92c.entry.js +1 -0
  22. package/dist/brandsync-wc/{p-cfc3421b.entry.js → p-dd747a12.entry.js} +1 -1
  23. package/dist/brandsync-wc/{p-2742ecef.entry.js → p-eb4d87f0.entry.js} +1 -1
  24. package/dist/cjs/brandsync-wc.cjs.js +1 -1
  25. package/dist/cjs/bs-ai-disclaimer.cjs.entry.js +17 -0
  26. package/dist/cjs/bs-ai-greeting.cjs.entry.js +24 -0
  27. package/dist/cjs/bs-ai-thinking.cjs.entry.js +2 -2
  28. package/dist/cjs/bs-attachment-list.cjs.entry.js +47 -0
  29. package/dist/cjs/bs-attachment.cjs.entry.js +46 -0
  30. package/dist/cjs/bs-badge.cjs.entry.js +1 -1
  31. package/dist/cjs/bs-button-skeleton.cjs.entry.js +1 -1
  32. package/dist/cjs/bs-button.cjs.entry.js +1 -1
  33. package/dist/cjs/bs-card.cjs.entry.js +1 -1
  34. package/dist/cjs/bs-chatbot-feedback.cjs.entry.js +94 -0
  35. package/dist/cjs/bs-chatbot-header.cjs.entry.js +1 -1
  36. package/dist/cjs/bs-chatbot-response-action.cjs.entry.js +1 -1
  37. package/dist/cjs/bs-chatbot-sources-drawer.cjs.entry.js +38 -0
  38. package/dist/cjs/bs-chatbot-suggestion-button.cjs.entry.js +1 -1
  39. package/dist/cjs/bs-composer-status-banner.cjs.entry.js +43 -0
  40. package/dist/cjs/bs-composer.cjs.entry.js +16 -2
  41. package/dist/cjs/bs-data-table.cjs.entry.js +2 -2
  42. package/dist/cjs/bs-input.cjs.entry.js +270 -4
  43. package/dist/cjs/{bs-menu-item.cjs.entry.js → bs-menu_2.cjs.entry.js} +14 -1
  44. package/dist/cjs/bs-source-link.cjs.entry.js +39 -0
  45. package/dist/cjs/bs-tooltip.cjs.entry.js +1 -1
  46. package/dist/cjs/loader.cjs.js +1 -1
  47. package/dist/collection/collection-manifest.json +8 -0
  48. package/dist/collection/components/bs-ai-chatbot/bs-ai-chatbot.stories.js +180 -0
  49. package/dist/collection/components/bs-ai-disclaimer/bs-ai-disclaimer.cmp.test.js +14 -0
  50. package/dist/collection/components/bs-ai-disclaimer/bs-ai-disclaimer.css +27 -0
  51. package/dist/collection/components/bs-ai-disclaimer/bs-ai-disclaimer.js +41 -0
  52. package/dist/collection/components/bs-ai-disclaimer/bs-ai-disclaimer.stories.js +15 -0
  53. package/dist/collection/components/bs-ai-greeting/bs-ai-greeting.cmp.test.js +22 -0
  54. package/dist/collection/components/bs-ai-greeting/bs-ai-greeting.css +53 -0
  55. package/dist/collection/components/bs-ai-greeting/bs-ai-greeting.js +103 -0
  56. package/dist/collection/components/bs-ai-greeting/bs-ai-greeting.stories.js +23 -0
  57. package/dist/collection/components/bs-ai-thinking/bs-ai-thinking.css +31 -17
  58. package/dist/collection/components/bs-ai-thinking/bs-ai-thinking.js +9 -11
  59. package/dist/collection/components/bs-attachment/bs-attachment.cmp.test.js +41 -0
  60. package/dist/collection/components/bs-attachment/bs-attachment.css +184 -0
  61. package/dist/collection/components/bs-attachment/bs-attachment.js +230 -0
  62. package/dist/collection/components/bs-attachment/bs-attachment.stories.js +58 -0
  63. package/dist/collection/components/bs-attachment-list/bs-attachment-list.cmp.test.js +28 -0
  64. package/dist/collection/components/bs-attachment-list/bs-attachment-list.css +56 -0
  65. package/dist/collection/components/bs-attachment-list/bs-attachment-list.js +105 -0
  66. package/dist/collection/components/bs-attachment-list/bs-attachment-list.stories.js +47 -0
  67. package/dist/collection/components/bs-badge/bs-badge.js +1 -1
  68. package/dist/collection/components/bs-button/bs-button.js +1 -1
  69. package/dist/collection/components/bs-button-skeleton/bs-button-skeleton.js +1 -1
  70. package/dist/collection/components/bs-card/bs-card.js +1 -1
  71. package/dist/collection/components/bs-chatbot-feedback/bs-chatbot-feedback.cmp.test.js +73 -0
  72. package/dist/collection/components/bs-chatbot-feedback/bs-chatbot-feedback.css +253 -0
  73. package/dist/collection/components/bs-chatbot-feedback/bs-chatbot-feedback.js +324 -0
  74. package/dist/collection/components/bs-chatbot-feedback/bs-chatbot-feedback.stories.js +54 -0
  75. package/dist/collection/components/bs-chatbot-header/bs-chatbot-header.js +1 -1
  76. package/dist/collection/components/bs-chatbot-response-action/bs-chatbot-response-action.js +1 -1
  77. package/dist/collection/components/bs-chatbot-sources-drawer/bs-chatbot-sources-drawer.cmp.test.js +34 -0
  78. package/dist/collection/components/bs-chatbot-sources-drawer/bs-chatbot-sources-drawer.css +106 -0
  79. package/dist/collection/components/bs-chatbot-sources-drawer/bs-chatbot-sources-drawer.js +142 -0
  80. package/dist/collection/components/bs-chatbot-sources-drawer/bs-chatbot-sources-drawer.stories.js +44 -0
  81. package/dist/collection/components/bs-chatbot-suggestion-button/bs-chatbot-suggestion-button.js +1 -1
  82. package/dist/collection/components/bs-composer/bs-composer.cmp.test.js +12 -0
  83. package/dist/collection/components/bs-composer/bs-composer.css +10 -0
  84. package/dist/collection/components/bs-composer/bs-composer.js +25 -1
  85. package/dist/collection/components/bs-composer/bs-composer.stories.js +13 -0
  86. package/dist/collection/components/bs-composer-status-banner/bs-composer-status-banner.cmp.test.js +42 -0
  87. package/dist/collection/components/bs-composer-status-banner/bs-composer-status-banner.css +173 -0
  88. package/dist/collection/components/bs-composer-status-banner/bs-composer-status-banner.js +270 -0
  89. package/dist/collection/components/bs-composer-status-banner/bs-composer-status-banner.stories.js +75 -0
  90. package/dist/collection/components/bs-data-table/bs-data-table.js +2 -2
  91. package/dist/collection/components/bs-input/bs-input.cmp.test.js +296 -0
  92. package/dist/collection/components/bs-input/bs-input.css +333 -23
  93. package/dist/collection/components/bs-input/bs-input.js +647 -11
  94. package/dist/collection/components/bs-input/bs-input.stories.js +128 -1
  95. package/dist/collection/components/bs-menu/bs-menu.js +1 -1
  96. package/dist/collection/components/bs-menu-item/bs-menu-item.js +1 -1
  97. package/dist/collection/components/bs-source-link/bs-source-link.cmp.test.js +42 -0
  98. package/dist/collection/components/bs-source-link/bs-source-link.css +114 -0
  99. package/dist/collection/components/bs-source-link/bs-source-link.js +192 -0
  100. package/dist/collection/components/bs-source-link/bs-source-link.stories.js +33 -0
  101. package/dist/collection/components/bs-tooltip/bs-tooltip.js +1 -1
  102. package/dist/components/bs-ai-disclaimer.d.ts +11 -0
  103. package/dist/components/bs-ai-disclaimer.js +1 -0
  104. package/dist/components/bs-ai-greeting.d.ts +11 -0
  105. package/dist/components/bs-ai-greeting.js +1 -0
  106. package/dist/components/bs-ai-thinking.js +1 -1
  107. package/dist/components/bs-attachment-list.d.ts +11 -0
  108. package/dist/components/bs-attachment-list.js +1 -0
  109. package/dist/components/bs-attachment.d.ts +11 -0
  110. package/dist/components/bs-attachment.js +1 -0
  111. package/dist/components/bs-badge.js +1 -1
  112. package/dist/components/bs-button-skeleton.js +1 -1
  113. package/dist/components/bs-button.js +1 -1
  114. package/dist/components/bs-card.js +1 -1
  115. package/dist/components/bs-chatbot-feedback.d.ts +11 -0
  116. package/dist/components/bs-chatbot-feedback.js +1 -0
  117. package/dist/components/bs-chatbot-header.js +1 -1
  118. package/dist/components/bs-chatbot-response-action.js +1 -1
  119. package/dist/components/bs-chatbot-sources-drawer.d.ts +11 -0
  120. package/dist/components/bs-chatbot-sources-drawer.js +1 -0
  121. package/dist/components/bs-chatbot-suggestion-button.js +1 -1
  122. package/dist/components/bs-composer-status-banner.d.ts +11 -0
  123. package/dist/components/bs-composer-status-banner.js +1 -0
  124. package/dist/components/bs-composer.js +1 -1
  125. package/dist/components/bs-data-table.js +1 -1
  126. package/dist/components/bs-input.js +1 -1
  127. package/dist/components/bs-menu-item.js +1 -1
  128. package/dist/components/bs-menu.js +1 -1
  129. package/dist/components/bs-source-link.d.ts +11 -0
  130. package/dist/components/bs-source-link.js +1 -0
  131. package/dist/components/bs-tooltip.js +1 -1
  132. package/dist/components/{p-CoC4LQCI.js → p-Cz2nfz2j.js} +1 -1
  133. package/dist/components/p-DndQiCMP.js +1 -0
  134. package/dist/components/p-_vXDfB3V.js +1 -0
  135. package/dist/esm/brandsync-wc.js +1 -1
  136. package/dist/esm/bs-ai-disclaimer.entry.js +15 -0
  137. package/dist/esm/bs-ai-greeting.entry.js +22 -0
  138. package/dist/esm/bs-ai-thinking.entry.js +2 -2
  139. package/dist/esm/bs-attachment-list.entry.js +45 -0
  140. package/dist/esm/bs-attachment.entry.js +44 -0
  141. package/dist/esm/bs-badge.entry.js +1 -1
  142. package/dist/esm/bs-button-skeleton.entry.js +1 -1
  143. package/dist/esm/bs-button.entry.js +1 -1
  144. package/dist/esm/bs-card.entry.js +1 -1
  145. package/dist/esm/bs-chatbot-feedback.entry.js +92 -0
  146. package/dist/esm/bs-chatbot-header.entry.js +1 -1
  147. package/dist/esm/bs-chatbot-response-action.entry.js +1 -1
  148. package/dist/esm/bs-chatbot-sources-drawer.entry.js +36 -0
  149. package/dist/esm/bs-chatbot-suggestion-button.entry.js +1 -1
  150. package/dist/esm/bs-composer-status-banner.entry.js +41 -0
  151. package/dist/esm/bs-composer.entry.js +17 -3
  152. package/dist/esm/bs-data-table.entry.js +2 -2
  153. package/dist/esm/bs-input.entry.js +271 -5
  154. package/dist/esm/{bs-menu-item.entry.js → bs-menu_2.entry.js} +15 -3
  155. package/dist/esm/bs-source-link.entry.js +37 -0
  156. package/dist/esm/bs-tooltip.entry.js +1 -1
  157. package/dist/esm/loader.js +1 -1
  158. package/dist/types/components/bs-ai-chatbot/bs-ai-chatbot.stories.d.ts +18 -0
  159. package/dist/types/components/bs-ai-disclaimer/bs-ai-disclaimer.cmp.test.d.ts +1 -0
  160. package/dist/types/components/bs-ai-disclaimer/bs-ai-disclaimer.d.ts +26 -0
  161. package/dist/types/components/bs-ai-disclaimer/bs-ai-disclaimer.stories.d.ts +8 -0
  162. package/dist/types/components/bs-ai-greeting/bs-ai-greeting.cmp.test.d.ts +1 -0
  163. package/dist/types/components/bs-ai-greeting/bs-ai-greeting.d.ts +42 -0
  164. package/dist/types/components/bs-ai-greeting/bs-ai-greeting.stories.d.ts +10 -0
  165. package/dist/types/components/bs-ai-thinking/bs-ai-thinking.d.ts +8 -10
  166. package/dist/types/components/bs-attachment/bs-attachment.cmp.test.d.ts +1 -0
  167. package/dist/types/components/bs-attachment/bs-attachment.d.ts +59 -0
  168. package/dist/types/components/bs-attachment/bs-attachment.stories.d.ts +17 -0
  169. package/dist/types/components/bs-attachment-list/bs-attachment-list.cmp.test.d.ts +1 -0
  170. package/dist/types/components/bs-attachment-list/bs-attachment-list.d.ts +42 -0
  171. package/dist/types/components/bs-attachment-list/bs-attachment-list.stories.d.ts +10 -0
  172. package/dist/types/components/bs-chatbot-feedback/bs-chatbot-feedback.cmp.test.d.ts +1 -0
  173. package/dist/types/components/bs-chatbot-feedback/bs-chatbot-feedback.d.ts +90 -0
  174. package/dist/types/components/bs-chatbot-feedback/bs-chatbot-feedback.stories.d.ts +16 -0
  175. package/dist/types/components/bs-chatbot-sources-drawer/bs-chatbot-sources-drawer.cmp.test.d.ts +1 -0
  176. package/dist/types/components/bs-chatbot-sources-drawer/bs-chatbot-sources-drawer.d.ts +54 -0
  177. package/dist/types/components/bs-chatbot-sources-drawer/bs-chatbot-sources-drawer.stories.d.ts +10 -0
  178. package/dist/types/components/bs-composer/bs-composer.d.ts +14 -0
  179. package/dist/types/components/bs-composer/bs-composer.stories.d.ts +1 -0
  180. package/dist/types/components/bs-composer-status-banner/bs-composer-status-banner.cmp.test.d.ts +1 -0
  181. package/dist/types/components/bs-composer-status-banner/bs-composer-status-banner.d.ts +88 -0
  182. package/dist/types/components/bs-composer-status-banner/bs-composer-status-banner.stories.d.ts +20 -0
  183. package/dist/types/components/bs-input/bs-input.d.ts +139 -6
  184. package/dist/types/components/bs-input/bs-input.stories.d.ts +19 -0
  185. package/dist/types/components/bs-source-link/bs-source-link.cmp.test.d.ts +1 -0
  186. package/dist/types/components/bs-source-link/bs-source-link.d.ts +51 -0
  187. package/dist/types/components/bs-source-link/bs-source-link.stories.d.ts +13 -0
  188. package/dist/types/components.d.ts +1778 -55
  189. package/package.json +1 -1
  190. package/dist/brandsync-wc/p-6abdfaf0.entry.js +0 -1
  191. package/dist/brandsync-wc/p-6c1fa4da.entry.js +0 -1
  192. package/dist/brandsync-wc/p-a12d0a60.entry.js +0 -1
  193. package/dist/brandsync-wc/p-f5f443e2.entry.js +0 -1
  194. package/dist/cjs/bs-menu.cjs.entry.js +0 -17
  195. package/dist/esm/bs-menu.entry.js +0 -15
@@ -0,0 +1,59 @@
1
+ import { EventEmitter } from '../../stencil-public-runtime';
2
+ export type BsAttachmentType = 'image' | 'pdf' | 'document';
3
+ /**
4
+ * A single file attachment preview for `bs-composer` -- an image thumbnail, or a filename card
5
+ * with a colored file-type badge (PDF/Document), with an optional upload-in-progress spinner and
6
+ * a hover/focus-revealed remove button.
7
+ *
8
+ * ## When to use
9
+ * - Rendered by the consuming app for each file a user has attached to a Genie AI chat message,
10
+ * typically alongside or inside `bs-composer`.
11
+ *
12
+ * ## When not to use
13
+ * - A generic file-upload control -- this is a preview-only presentational component. The
14
+ * consuming app owns the actual file picker/upload logic and drives `loading` from that state.
15
+ *
16
+ * @part thumbnail - The image thumbnail wrapper (type="image" only).
17
+ * @part card - The filename card (type="pdf" / type="document" only).
18
+ * @part filename - The truncated filename text inside the card.
19
+ * @part badge - The colored file-type badge inside the card.
20
+ * @part remove - The remove button.
21
+ * @prop --bs-attachment-size - Width/height of the image thumbnail and of the card. Defaults to 112px.
22
+ * @prop --bs-attachment-radius - Corner radius of the thumbnail/card. Aliased to
23
+ * `--bs-border-radius-100`.
24
+ * @prop --bs-attachment-border-color - Border color of the card / loading image wrap. Aliased to
25
+ * `--bs-border-default`.
26
+ * @prop --bs-attachment-card-bg - Card background. Aliased to `--bs-surface-base`.
27
+ * @prop --bs-attachment-filename-color - Filename text color. Aliased to `--bs-text-default`.
28
+ * @prop --bs-attachment-badge-bg-pdf - PDF badge background. Aliased to `--bs-badge-bg-error`.
29
+ * @prop --bs-attachment-badge-bg-document - Document badge background. Aliased to
30
+ * `--bs-badge-bg-info`.
31
+ * @prop --bs-attachment-remove-bg - Remove button (neutral icon button) default background.
32
+ * Aliased to `--bs-button-neutral-container`.
33
+ * @prop --bs-attachment-remove-hover - Remove button hover background. Aliased to
34
+ * `--bs-button-neutral-hover`.
35
+ * @prop --bs-attachment-remove-pressed - Remove button active/pressed background. Aliased to
36
+ * `--bs-button-neutral-pressed`.
37
+ * @prop --bs-attachment-remove-focus - Remove button focus outline color. Aliased to
38
+ * `--bs-border-neutral-focus`.
39
+ */
40
+ export declare class BsAttachment {
41
+ /** Which kind of attachment preview to render. */
42
+ type: BsAttachmentType;
43
+ /** The filename shown on the card. Only used when `type` is "pdf" or "document". */
44
+ fileName: string;
45
+ /** The thumbnail image URL. Only used when `type` is "image". */
46
+ imageSrc?: string;
47
+ /** Accessible alt text for the image thumbnail. Only used when `type` is "image". */
48
+ imageAlt: string;
49
+ /** Shows an upload-in-progress spinner (blurred + overlaid for images, in the badge for files). */
50
+ loading: boolean;
51
+ /** Whether the hover/focus-revealed remove button is rendered at all. */
52
+ removable: boolean;
53
+ /** Fires when the remove button is clicked. */
54
+ bsRemove: EventEmitter<void>;
55
+ private onRemoveClick;
56
+ render(): any;
57
+ private renderImage;
58
+ private renderCard;
59
+ }
@@ -0,0 +1,17 @@
1
+ import type { Meta, StoryObj } from '@storybook/web-components-vite';
2
+ interface BsAttachmentArgs {
3
+ type: 'image' | 'pdf' | 'document';
4
+ fileName: string;
5
+ imageSrc: string;
6
+ loading: boolean;
7
+ removable: boolean;
8
+ }
9
+ declare const meta: Meta<BsAttachmentArgs>;
10
+ export default meta;
11
+ type Story = StoryObj<BsAttachmentArgs>;
12
+ export declare const Default: Story;
13
+ export declare const Pdf: Story;
14
+ export declare const Document: Story;
15
+ export declare const ImageLoading: Story;
16
+ export declare const PdfLoading: Story;
17
+ export declare const Gallery: Story;
@@ -0,0 +1,42 @@
1
+ /**
2
+ * A horizontally-scrolling row wrapper for one or more `bs-attachment` previews, for slotting into
3
+ * `bs-composer`'s `attachments` slot when a Genie AI chat message has file attachments.
4
+ *
5
+ * ## When to use
6
+ * - Wrapping any number of `bs-attachment` elements the user has attached to a message, so they
7
+ * lay out in a single row and scroll horizontally instead of wrapping/overflowing once there
8
+ * are more than fit the available width.
9
+ *
10
+ * ## When not to use
11
+ * - A single attachment on its own — just render `bs-attachment` directly, this wrapper's
12
+ * scroll/fade affordance only matters once there's more content than fits.
13
+ *
14
+ * @slot - One or more `bs-attachment` elements.
15
+ * @part row - The scrollable flex row containing the slotted attachments.
16
+ * @part fade - The right-edge fade-out overlay shown only while the row has more content to
17
+ * scroll to.
18
+ * @prop --bs-attachment-list-gap - Gap between attachments. Matches the 10px Figma spec (not tied
19
+ * to the `--bs-spacing-*` scale, which only has 8px/12px neighbors).
20
+ * @prop --bs-attachment-list-padding - Padding around the row. Aliased to `--bs-spacing-150`.
21
+ * @prop --bs-attachment-list-fade-color - Color the right-edge fade blends into. Aliased to
22
+ * `--bs-static-white`.
23
+ * @prop --bs-attachment-list-fade-width - Width of the right-edge fade overlay. Aliased to
24
+ * `--bs-spacing-800`.
25
+ * @prop --bs-attachment-list-scrollbar-thumb - Color of the scrollbar thumb that appears on
26
+ * hover/focus once the row is scrollable. Aliased to `--bs-neutral-300`.
27
+ */
28
+ export declare class BsAttachmentList {
29
+ el: HTMLElement;
30
+ /** Accessible name for the scrollable region. */
31
+ ariaLabel: string | null;
32
+ /** Whether the row currently has more content than fits (drives the fade + scrollbar-on-hover). */
33
+ canScrollRight: boolean;
34
+ private row?;
35
+ private resizeObserver?;
36
+ componentDidLoad(): void;
37
+ disconnectedCallback(): void;
38
+ private onSlotchange;
39
+ private onScroll;
40
+ private updateScrollState;
41
+ render(): any;
42
+ }
@@ -0,0 +1,10 @@
1
+ import type { Meta, StoryObj } from '@storybook/web-components-vite';
2
+ interface BsAttachmentListArgs {
3
+ ariaLabel: string;
4
+ }
5
+ declare const meta: Meta<BsAttachmentListArgs>;
6
+ export default meta;
7
+ type Story = StoryObj<BsAttachmentListArgs>;
8
+ export declare const OneAttachment: Story;
9
+ export declare const ThreeAttachments: Story;
10
+ export declare const ManyAttachments: Story;
@@ -0,0 +1,90 @@
1
+ import { EventEmitter } from '../../stencil-public-runtime';
2
+ /**
3
+ * A star-rating feedback card shown at the end of a Genie AI chat: a heading/subtitle, a 5-star
4
+ * rating, an optional comment, and either "Submit feedback" + "Start new chat" (before
5
+ * submitting) or just "Start new chat" (after).
6
+ *
7
+ * ## When to use
8
+ * - Prompting for feedback on a Genie response or chat session, typically after the user ends or
9
+ * restarts a conversation.
10
+ *
11
+ * ## When not to use
12
+ * - A generic star-rating input elsewhere in the product -- this component's copy and layout are
13
+ * purpose-built for the Genie feedback flow, not a reusable rating control.
14
+ *
15
+ * The heading and subtitle are not freeform props: before submitting, they're always the fixed
16
+ * "How was your experience..." copy; after submitting, they're determined entirely by `rating`
17
+ * (1-2 stars reads apologetic, 3 neutral, 4-5 positive), matching the Figma source exactly. Use
18
+ * `heading`/`subtitle` only if a consuming app genuinely needs to override that copy.
19
+ *
20
+ * @part close - The close button.
21
+ * @part heading - The heading text.
22
+ * @part subtitle - The subtitle text.
23
+ * @part star - A single star button (`::part(star)` matches all five).
24
+ * @part label - The "Tell us what you think" label (only rendered before submitting).
25
+ * @part textarea - The comment textarea (only rendered before submitting).
26
+ * @part comment - The submitted comment, read-only (only rendered after submitting, if a comment was given).
27
+ * @part submit - The "Submit feedback" button (only rendered before submitting).
28
+ * @part new-chat - The "Start new chat" button.
29
+ * @prop --bs-chatbot-feedback-bg - Card background. Aliased to `--bs-surface-raised`.
30
+ * @prop --bs-chatbot-feedback-border - Card border color. Aliased to `--bs-border-default`.
31
+ * @prop --bs-chatbot-feedback-radius - Card corner radius. Aliased to `--bs-border-radius-200`.
32
+ * @prop --bs-chatbot-feedback-padding-x - Card horizontal padding. Aliased to `--bs-spacing-250`.
33
+ * @prop --bs-chatbot-feedback-padding-y - Card vertical padding. Aliased to `--bs-spacing-550`.
34
+ * @prop --bs-chatbot-feedback-max-width - Max width of the card. Matches Figma's 762px.
35
+ * @prop --bs-chatbot-feedback-gap - Gap between the top content block and the button(s). Aliased
36
+ * to `--bs-spacing-300`.
37
+ * @prop --bs-chatbot-feedback-top-gap - Gap between heading/subtitle, stars, and the
38
+ * textarea/comment within the top block. Aliased to `--bs-spacing-250`.
39
+ * @prop --bs-chatbot-feedback-heading-color - Aliased to `--bs-text-default`.
40
+ * @prop --bs-chatbot-feedback-subtitle-color - Aliased to `--bs-text-secondary`.
41
+ * @prop --bs-chatbot-feedback-star-filled - Filled star color. Aliased to `--bs-color-primary-default`.
42
+ * @prop --bs-chatbot-feedback-star-empty - Empty star color. Aliased to `--bs-border-neutral-container`.
43
+ * @prop --bs-chatbot-feedback-comment-color - Submitted comment text color. Aliased to `--bs-text-default`.
44
+ * @prop --bs-chatbot-feedback-close-hover - Close button hover background. Aliased to `--bs-surface-hover`.
45
+ * @prop --bs-chatbot-feedback-primary-bg - "Submit feedback" / post-submit "Start new chat"
46
+ * background. Aliased to `--bs-button-primary-default`.
47
+ * @prop --bs-chatbot-feedback-primary-bg-hover - Aliased to `--bs-button-primary-hover`.
48
+ * @prop --bs-chatbot-feedback-primary-bg-disabled - Aliased to `--bs-button-primary-disabled`.
49
+ * @prop --bs-chatbot-feedback-outlined-border - Pre-submit "Start new chat" border. Aliased to
50
+ * `--bs-border-primary`.
51
+ * @prop --bs-chatbot-feedback-outlined-hover - Pre-submit "Start new chat" hover background.
52
+ * Aliased to `--bs-color-primary-container-hover`.
53
+ * @prop --bs-chatbot-feedback-outlined-text - Pre-submit "Start new chat" text/icon color.
54
+ * Aliased to `--bs-text-action`.
55
+ */
56
+ export declare class BsChatbotFeedback {
57
+ /** Current star rating, 0-5. 0 means no rating has been given yet. */
58
+ rating: number;
59
+ /** Whether feedback has been submitted. Switches the card from the editable form to the
60
+ * read-only "thanks" view. */
61
+ submitted: boolean;
62
+ /** The comment text. */
63
+ comment: string;
64
+ /** Overrides the computed heading (see the class doc for why this is computed by default). */
65
+ heading?: string;
66
+ /** Overrides the computed subtitle. */
67
+ subtitle?: string;
68
+ /** Fires when a star is clicked, with the new rating. */
69
+ bsRatingChange: EventEmitter<number>;
70
+ /** Fires on every keystroke in the comment textarea, with the current value. */
71
+ bsCommentInput: EventEmitter<string>;
72
+ /** Fires when "Submit feedback" is clicked, with the current rating and comment. Also sets
73
+ * `submitted` to true. */
74
+ bsSubmit: EventEmitter<{
75
+ rating: number;
76
+ comment: string;
77
+ }>;
78
+ /** Fires when "Start new chat" is clicked. The consuming app owns actually starting a new chat. */
79
+ bsNewChat: EventEmitter<void>;
80
+ /** Fires when the close button is clicked. The consuming app owns actually hiding the card. */
81
+ bsClose: EventEmitter<void>;
82
+ private onStarClick;
83
+ private onCommentInput;
84
+ private onSubmitClick;
85
+ private onNewChatClick;
86
+ private onCloseClick;
87
+ private computedHeading;
88
+ private computedSubtitle;
89
+ render(): any;
90
+ }
@@ -0,0 +1,16 @@
1
+ import type { Meta, StoryObj } from '@storybook/web-components-vite';
2
+ interface BsChatbotFeedbackArgs {
3
+ rating: number;
4
+ submitted: boolean;
5
+ comment: string;
6
+ }
7
+ declare const meta: Meta<BsChatbotFeedbackArgs>;
8
+ export default meta;
9
+ type Story = StoryObj<BsChatbotFeedbackArgs>;
10
+ export declare const Default: Story;
11
+ export declare const OneStarSubmitted: Story;
12
+ export declare const TwoStarsSubmitted: Story;
13
+ export declare const ThreeStarsSubmitted: Story;
14
+ export declare const FourStarsSubmitted: Story;
15
+ export declare const FiveStarsSubmitted: Story;
16
+ export declare const AllStates: Story;
@@ -0,0 +1,54 @@
1
+ import { EventEmitter } from '../../stencil-public-runtime';
2
+ /**
3
+ * The "Sources" panel shown alongside a Genie AI chat response -- a header with a title, a count
4
+ * badge, and a collapse chevron, above a stack of `bs-source-link` citation rows.
5
+ *
6
+ * ## When to use
7
+ * - Displaying the documents/sources a Genie response cited, typically opened from a "view
8
+ * sources" action on a `bs-chatbot-response-action` bar.
9
+ *
10
+ * ## When not to use
11
+ * - A generic list container -- this component's header (title + count + collapse) is
12
+ * purpose-built for the sources use case.
13
+ *
14
+ * @slot - One or more `bs-source-link` rows.
15
+ * @slot collapse-icon - Overrides the default collapse chevron icon.
16
+ * @part heading - The "Sources" title text.
17
+ * @part count - The count badge next to the title.
18
+ * @part collapse - The collapse chevron button.
19
+ * @part list - The scrollable container of slotted `bs-source-link` rows.
20
+ * @prop --bs-chatbot-sources-drawer-bg - Background of the whole panel. Aliased to `--bs-surface-raised`.
21
+ * @prop --bs-chatbot-sources-drawer-header-shadow - Drop shadow under the header, separating it
22
+ * from the scrolled list. Aliased to `--bs-shadow-xs`.
23
+ * @prop --bs-chatbot-sources-drawer-header-padding-x - Aliased to `--bs-spacing-200`.
24
+ * @prop --bs-chatbot-sources-drawer-header-padding-top - Aliased to `--bs-spacing-150`.
25
+ * @prop --bs-chatbot-sources-drawer-header-padding-bottom - Aliased to `--bs-spacing-100`.
26
+ * @prop --bs-chatbot-sources-drawer-heading-color - Aliased to `--bs-text-default`.
27
+ * @prop --bs-chatbot-sources-drawer-count-bg - Count badge background. Aliased to
28
+ * `--bs-badge-bg-neutral-container`.
29
+ * @prop --bs-chatbot-sources-drawer-count-color - Count badge text color. Aliased to
30
+ * `--bs-badge-text-neutral`.
31
+ * @prop --bs-chatbot-sources-drawer-collapse-hover - Collapse button background on hover. Aliased
32
+ * to `--bs-surface-hover`.
33
+ * @prop --bs-chatbot-sources-drawer-section-gap - Gap between the header and the list. Aliased to
34
+ * `--bs-spacing-200`.
35
+ * @prop --bs-chatbot-sources-drawer-list-padding - Horizontal/bottom padding of the list. Aliased
36
+ * to `--bs-spacing-200`.
37
+ * @prop --bs-chatbot-sources-drawer-list-gap - Gap between rows. Aliased to `--bs-spacing-50`.
38
+ */
39
+ export declare class BsChatbotSourcesDrawer {
40
+ el: HTMLElement;
41
+ /** The panel title. */
42
+ heading: string;
43
+ /**
44
+ * Overrides the auto-detected count badge. By default the badge reflects the number of slotted
45
+ * `bs-source-link` children, so most consumers don't need to set this.
46
+ */
47
+ count?: number;
48
+ /** Fires when the collapse chevron is clicked. The consuming app owns actually hiding the panel. */
49
+ bsCollapse: EventEmitter<void>;
50
+ private slottedCount;
51
+ private onSlotchange;
52
+ private onCollapseClick;
53
+ render(): any;
54
+ }
@@ -0,0 +1,10 @@
1
+ import type { Meta, StoryObj } from '@storybook/web-components-vite';
2
+ interface BsChatbotSourcesDrawerArgs {
3
+ heading: string;
4
+ }
5
+ declare const meta: Meta<BsChatbotSourcesDrawerArgs>;
6
+ export default meta;
7
+ type Story = StoryObj<BsChatbotSourcesDrawerArgs>;
8
+ export declare const Default: Story;
9
+ export declare const Empty: Story;
10
+ export declare const ManySources: Story;
@@ -19,10 +19,14 @@ export type BsComposerState = 'idle' | 'generating' | 'disabled' | 'recording';
19
19
  * useful for e.g. focusing the composer after a parent view mounts, without reaching into its
20
20
  * shadow root.
21
21
  *
22
+ * @slot attachments - A `bs-attachment-list` (or other content) rendered inside the composer's own
23
+ * bordered container, above the text field -- only takes up space/padding when it has assigned
24
+ * content, so leaving it empty renders identically to not having the slot at all.
22
25
  * @slot actions-end - Extra consumer-supplied controls appended after the primary action button
23
26
  * in the controls row (e.g. a product-specific "Tools" button). Slotted content is placed
24
27
  * inline in the same flex row as attach/mic/action, so a slotted element should size itself to
25
28
  * roughly match `--bs-composer-button-size` to align visually.
29
+ * @part attachments - The wrapper around the `attachments` slot.
26
30
  * @part attach - The "+" attach button.
27
31
  * @part input - The native text `<input>`.
28
32
  * @part mic - The secondary icon button (microphone, or the stop-recording square while `state="recording"`).
@@ -46,6 +50,7 @@ export type BsComposerState = 'idle' | 'generating' | 'disabled' | 'recording';
46
50
  * @prop --bs-composer-subtle-pressed - Background of the attach/mic buttons when pressed. Aliased to `--bs-color-neutral-container-pressed`.
47
51
  */
48
52
  export declare class BsComposer {
53
+ el: HTMLElement;
49
54
  /**
50
55
  * Which flavor of composer this is: changes the *default* placeholder text (set `placeholder`
51
56
  * directly to override it) and, per the Figma design, renders the container border dashed
@@ -70,6 +75,10 @@ export declare class BsComposer {
70
75
  * accessible name -- set it in every real usage.
71
76
  */
72
77
  ariaLabel: string | null;
78
+ /** Tracks whether the `attachments` slot has assigned content, so the row above the text field
79
+ * (padding, border) only takes up space when a consumer has actually put something there --
80
+ * same reasoning/pattern as `hasIcon`/`hasLabel` in `bs-attachment`. */
81
+ hasAttachments: boolean;
73
82
  /** Fires on every keystroke in the text field, with the current value. */
74
83
  bsInput: EventEmitter<string>;
75
84
  /** Fires when the primary action button is clicked while `state="idle"`. */
@@ -83,6 +92,11 @@ export declare class BsComposer {
83
92
  /** Fires when the mic/stop-recording button is clicked. The consumer decides what that means
84
93
  * (e.g. start recording when idle/generating, or stop recording when `state="recording"`). */
85
94
  bsMicToggle: EventEmitter<void>;
95
+ /** Computes the initial `hasAttachments` state directly from the host's light DOM children,
96
+ * before first render -- same reasoning as `bs-attachment`'s `componentWillLoad`: `slotchange`
97
+ * alone never fires for a slot that starts out empty and stays that way. */
98
+ componentWillLoad(): void;
99
+ private onAttachmentsSlotchange;
86
100
  private onInput;
87
101
  private onAttachClick;
88
102
  private onMicClick;
@@ -14,4 +14,5 @@ export declare const Human: Story;
14
14
  export declare const Generating: Story;
15
15
  export declare const Disabled: Story;
16
16
  export declare const Recording: Story;
17
+ export declare const WithAttachments: Story;
17
18
  export declare const AllStates: Story;
@@ -0,0 +1,88 @@
1
+ import { EventEmitter } from '../../stencil-public-runtime';
2
+ export type BsComposerStatusBannerType = 'error' | 'info' | 'neutral' | 'warning';
3
+ /**
4
+ * A full-width status banner for use directly above `bs-composer`, surfacing a message about the
5
+ * composer's current state (e.g. a send failure, an informational notice) with an optional
6
+ * "Continue"-style action button and an optional close button.
7
+ *
8
+ * ## When to use
9
+ * - A message tied to the composer itself (send failed, rate-limited, draft restored, etc.) that
10
+ * needs to sit directly above it, not a general-purpose alert -- see `CONVENTIONS.md` if this
11
+ * library gains a generic banner/alert component later, and prefer that instead once it exists.
12
+ *
13
+ * ## When not to use
14
+ * - A toast/snackbar notification unrelated to the composer -- this component is not
15
+ * self-dismissing and has no positioning of its own (it's a static block, not an overlay).
16
+ *
17
+ * @slot icon - Overrides the default leading icon. Only rendered when `showIcon` is true.
18
+ * @part icon - The leading icon wrapper.
19
+ * @part message - The message text.
20
+ * @part action - The optional "Continue"-style action button.
21
+ * @part close - The optional close button.
22
+ * @prop --bs-composer-status-banner-radius - Corner radius of the top-left/top-right corners
23
+ * (bottom corners are square, so this sits flush above `bs-composer`). Aliased to
24
+ * `--bs-border-radius-150`.
25
+ * @prop --bs-composer-status-banner-padding-x - Horizontal padding. Aliased to `--bs-spacing-150`.
26
+ * @prop --bs-composer-status-banner-padding-top - Top padding. Aliased to `--bs-spacing-100`.
27
+ * @prop --bs-composer-status-banner-padding-bottom - Bottom padding. Aliased to `--bs-spacing-200`.
28
+ * @prop --bs-composer-status-banner-gap - Gap between the message group and the action/close
29
+ * controls. Aliased to `--bs-spacing-100`.
30
+ * @prop --bs-composer-status-banner-icon-gap - Gap between the icon and the message text.
31
+ * Aliased to `--bs-spacing-75`.
32
+ * @prop --bs-composer-status-banner-error-bg - Background for `type="error"`. Aliased to
33
+ * `--bs-color-error-container`.
34
+ * @prop --bs-composer-status-banner-error-text - Text/icon color for `type="error"`. Aliased to
35
+ * `--bs-text-error`.
36
+ * @prop --bs-composer-status-banner-error-action-bg - Action button background for
37
+ * `type="error"`. Aliased to `--bs-color-error-default`.
38
+ * @prop --bs-composer-status-banner-error-action-bg-hover - Aliased to `--bs-color-error-hover`.
39
+ * @prop --bs-composer-status-banner-info-bg - Background for `type="info"`. Aliased to
40
+ * `--bs-color-info-container`.
41
+ * @prop --bs-composer-status-banner-info-text - Text/icon color for `type="info"`. Aliased to
42
+ * `--bs-text-info`.
43
+ * @prop --bs-composer-status-banner-info-action-bg - Action button background for `type="info"`.
44
+ * Aliased to `--bs-color-info-default`.
45
+ * @prop --bs-composer-status-banner-info-action-bg-hover - Aliased to `--bs-color-info-hover`.
46
+ * @prop --bs-composer-status-banner-neutral-bg - Background for `type="neutral"`. Aliased to
47
+ * `--bs-color-neutral-container`.
48
+ * @prop --bs-composer-status-banner-neutral-text - Text/icon color for `type="neutral"`. Aliased
49
+ * to `--bs-text-default`.
50
+ * @prop --bs-composer-status-banner-neutral-action-bg - Action button background for
51
+ * `type="neutral"`. Aliased to `--bs-color-neutral-container`.
52
+ * @prop --bs-composer-status-banner-neutral-action-bg-hover - Aliased to
53
+ * `--bs-color-neutral-container-hover`.
54
+ * @prop --bs-composer-status-banner-neutral-action-border - Action button border for
55
+ * `type="neutral"` (the only variant whose action button is outlined). Aliased to
56
+ * `--bs-border-neutral-container`.
57
+ * @prop --bs-composer-status-banner-warning-bg - Background for `type="warning"`. Aliased to
58
+ * `--bs-color-warning-container`.
59
+ * @prop --bs-composer-status-banner-warning-text - Text/icon color for `type="warning"`. Aliased
60
+ * to `--bs-text-warning`.
61
+ * @prop --bs-composer-status-banner-warning-action-bg - Action button background for
62
+ * `type="warning"`. Aliased to `--bs-color-warning-default`.
63
+ * @prop --bs-composer-status-banner-warning-action-bg-hover - Aliased to
64
+ * `--bs-color-warning-hover`.
65
+ * @prop --bs-composer-status-banner-close-hover-bg - Close button hover background (same across
66
+ * every `type`). Aliased to `--bs-color-neutral-container-hover`.
67
+ */
68
+ export declare class BsComposerStatusBanner {
69
+ /** Which severity/style to render. Drives background, text/icon color, and the action button's color. */
70
+ type: BsComposerStatusBannerType;
71
+ /** The message text. */
72
+ message: string;
73
+ /** Whether the leading icon (default: clock) is rendered. */
74
+ showIcon: boolean;
75
+ /** Whether the "Continue"-style action button is rendered. */
76
+ showButton: boolean;
77
+ /** Label for the action button, only rendered when `showButton` is true. */
78
+ actionLabel: string;
79
+ /** Whether the close button is rendered. */
80
+ allowClose: boolean;
81
+ /** Fires when the action button is clicked. Only relevant when `showButton` is true. */
82
+ bsAction: EventEmitter<void>;
83
+ /** Fires when the close button is clicked. Only relevant when `allowClose` is true. */
84
+ bsClose: EventEmitter<void>;
85
+ private onActionClick;
86
+ private onCloseClick;
87
+ render(): any;
88
+ }
@@ -0,0 +1,20 @@
1
+ import type { Meta, StoryObj } from '@storybook/web-components-vite';
2
+ import type { BsComposerStatusBannerType } from './bs-composer-status-banner';
3
+ interface BsComposerStatusBannerArgs {
4
+ type: BsComposerStatusBannerType;
5
+ message: string;
6
+ showIcon: boolean;
7
+ showButton: boolean;
8
+ actionLabel: string;
9
+ allowClose: boolean;
10
+ }
11
+ declare const meta: Meta<BsComposerStatusBannerArgs>;
12
+ export default meta;
13
+ type Story = StoryObj<BsComposerStatusBannerArgs>;
14
+ export declare const Default: Story;
15
+ export declare const Info: Story;
16
+ export declare const Neutral: Story;
17
+ export declare const Warning: Story;
18
+ export declare const WithAction: Story;
19
+ export declare const AllTypes: Story;
20
+ export declare const AboveComposer: Story;