@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,94 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index-CVh-sqA_.js');
4
+
5
+ const bsChatbotFeedbackCss = () => `:host{display:block;--bs-chatbot-feedback-bg:var(--bs-surface-raised);--bs-chatbot-feedback-border:var(--bs-border-default);--bs-chatbot-feedback-radius:var(--bs-border-radius-200);--bs-chatbot-feedback-padding-x:var(--bs-spacing-250);--bs-chatbot-feedback-padding-y:var(--bs-spacing-550);--bs-chatbot-feedback-max-width:762px;--bs-chatbot-feedback-gap:var(--bs-spacing-300);--bs-chatbot-feedback-top-gap:var(--bs-spacing-250);--bs-chatbot-feedback-heading-color:var(--bs-text-default);--bs-chatbot-feedback-subtitle-color:var(--bs-text-secondary);--bs-chatbot-feedback-star-filled:var(--bs-color-primary-default);--bs-chatbot-feedback-star-empty:var(--bs-border-neutral-container);--bs-chatbot-feedback-comment-color:var(--bs-text-default);--bs-chatbot-feedback-close-hover:var(--bs-surface-hover);--bs-chatbot-feedback-primary-bg:var(--bs-button-primary-default);--bs-chatbot-feedback-primary-bg-hover:var(--bs-button-primary-hover);--bs-chatbot-feedback-primary-bg-disabled:var(--bs-button-primary-disabled);--bs-chatbot-feedback-outlined-border:var(--bs-border-primary);--bs-chatbot-feedback-outlined-hover:var(--bs-color-primary-container-hover);--bs-chatbot-feedback-outlined-text:var(--bs-text-action)}.bs-chatbot-feedback{box-sizing:border-box;position:relative;display:flex;flex-direction:column;align-items:center;gap:var(--bs-chatbot-feedback-gap);max-width:var(--bs-chatbot-feedback-max-width);padding:var(--bs-chatbot-feedback-padding-y) var(--bs-chatbot-feedback-padding-x);background:var(--bs-chatbot-feedback-bg);border:1px solid var(--bs-chatbot-feedback-border);border-radius:var(--bs-chatbot-feedback-radius);font-family:inherit}.bs-chatbot-feedback__close{box-sizing:border-box;position:absolute;top:var(--bs-spacing-100);right:var(--bs-spacing-100);display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;background:transparent;border:none;border-radius:var(--bs-border-radius-100);color:var(--bs-icon-default);cursor:pointer;transition:background-color var(--bs-duration-fast) var(--bs-easing-standard)}.bs-chatbot-feedback__close svg{width:20px;height:20px}.bs-chatbot-feedback__close:hover{background:var(--bs-chatbot-feedback-close-hover)}.bs-chatbot-feedback__top{box-sizing:border-box;display:flex;flex-direction:column;align-items:center;gap:var(--bs-chatbot-feedback-top-gap);width:100%}.bs-chatbot-feedback__text{display:flex;flex-direction:column;gap:var(--bs-spacing-50);width:100%;text-align:center}.bs-chatbot-feedback__heading{margin:0;color:var(--bs-chatbot-feedback-heading-color);font-size:var(--bs-font-size-xl);font-weight:var(--bs-font-weight-bold);line-height:calc(var(--bs-line-height-heading-h5) * 1px)}.bs-chatbot-feedback__subtitle{margin:0;color:var(--bs-chatbot-feedback-subtitle-color);font-size:var(--bs-font-size-md);line-height:calc(var(--bs-line-height-body-md) * 1px)}.bs-chatbot-feedback__stars{display:flex;gap:var(--bs-spacing-350)}.bs-chatbot-feedback__star{box-sizing:border-box;display:inline-flex;width:36px;height:36px;padding:0;background:transparent;border:none;color:var(--bs-chatbot-feedback-star-empty);cursor:pointer}.bs-chatbot-feedback__star[aria-checked='true']{color:var(--bs-chatbot-feedback-star-filled)}.bs-chatbot-feedback__star:disabled{cursor:default}.bs-chatbot-feedback__star:focus-visible{outline:2px solid var(--bs-border-neutral-focus);outline-offset:2px;border-radius:var(--bs-border-radius-50)}.bs-chatbot-feedback__field{display:flex;flex-direction:column;gap:var(--bs-spacing-50);width:100%}.bs-chatbot-feedback__label{color:var(--bs-input-label);font-size:var(--bs-font-size-md);font-weight:var(--bs-font-weight-semibold);line-height:calc(var(--bs-line-height-body-md) * 1px)}.bs-chatbot-feedback__textarea{box-sizing:border-box;width:100%;min-height:103px;padding:var(--bs-spacing-100) var(--bs-spacing-150);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-family:inherit;font-size:var(--bs-font-size-md);line-height:calc(var(--bs-line-height-body-md) * 1px);resize:vertical}.bs-chatbot-feedback__textarea::placeholder{color:var(--bs-input-placeholder)}.bs-chatbot-feedback__textarea:hover{border-color:var(--bs-input-border-hover)}.bs-chatbot-feedback__textarea:focus-visible{outline:none;border-color:var(--bs-input-border-focus)}.bs-chatbot-feedback__comment{box-sizing:border-box;width:100%;min-height:103px;margin:0;padding:var(--bs-spacing-100) var(--bs-spacing-150);border:1px solid var(--bs-input-border-default);border-radius:var(--bs-border-radius-100);background:var(--bs-input-bg-filled);color:var(--bs-chatbot-feedback-comment-color);font-size:var(--bs-font-size-md);line-height:calc(var(--bs-line-height-body-md) * 1px);word-break:break-word}.bs-chatbot-feedback__actions{display:flex;flex-direction:column;gap:var(--bs-spacing-150);width:100%}.bs-chatbot-feedback__submit,.bs-chatbot-feedback__new-chat{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;gap:var(--bs-spacing-50);width:100%;height:44px;padding:0 var(--bs-spacing-250) 0 var(--bs-spacing-150);border-radius:var(--bs-border-radius-100);font-family:inherit;font-size:var(--bs-font-size-md);font-weight:var(--bs-font-weight-medium);cursor:pointer;transition:background-color var(--bs-duration-fast) var(--bs-easing-standard)}.bs-chatbot-feedback__submit svg,.bs-chatbot-feedback__new-chat svg{width:24px;height:24px;flex-shrink:0}.bs-chatbot-feedback__submit,.bs-chatbot-feedback__new-chat--primary{background:var(--bs-chatbot-feedback-primary-bg);border:none;color:var(--bs-text-on-action)}.bs-chatbot-feedback__submit:hover:not(:disabled),.bs-chatbot-feedback__new-chat--primary:hover{background:var(--bs-chatbot-feedback-primary-bg-hover)}.bs-chatbot-feedback__submit:disabled{background:var(--bs-chatbot-feedback-primary-bg-disabled);color:var(--bs-text-on-disabled);cursor:not-allowed}.bs-chatbot-feedback__new-chat--outlined{background:transparent;border:1px solid var(--bs-chatbot-feedback-outlined-border);color:var(--bs-chatbot-feedback-outlined-text)}.bs-chatbot-feedback__new-chat--outlined:hover{background:var(--bs-chatbot-feedback-outlined-hover)}.bs-chatbot-feedback__submit:focus-visible,.bs-chatbot-feedback__new-chat:focus-visible{outline:2px solid var(--bs-border-neutral-focus);outline-offset:2px}`;
6
+
7
+ const RATING_COPY = {
8
+ 1: { heading: "We're sorry we couldn't help.", subtitle: "We'll use your feedback to improve." },
9
+ 2: { heading: "We're sorry we didn't get it right.", subtitle: "We'll use your feedback to improve." },
10
+ 3: { heading: 'Thanks for your feedback.', subtitle: "We're always looking for ways to improve." },
11
+ 4: { heading: "Thanks! We're glad we could help.", subtitle: 'We appreciate your feedback.' },
12
+ 5: { heading: 'Thanks for the great rating!', subtitle: "We're happy we could help." },
13
+ };
14
+ const DEFAULT_HEADING = 'How was your experience with us?';
15
+ const DEFAULT_SUBTITLE = 'Your feedback helps us make Genie better.';
16
+ const BsChatbotFeedback = class {
17
+ constructor(hostRef) {
18
+ index.registerInstance(this, hostRef);
19
+ this.bsRatingChange = index.createEvent(this, "bsRatingChange");
20
+ this.bsCommentInput = index.createEvent(this, "bsCommentInput");
21
+ this.bsSubmit = index.createEvent(this, "bsSubmit");
22
+ this.bsNewChat = index.createEvent(this, "bsNewChat");
23
+ this.bsClose = index.createEvent(this, "bsClose");
24
+ }
25
+ /** Current star rating, 0-5. 0 means no rating has been given yet. */
26
+ rating = 0;
27
+ /** Whether feedback has been submitted. Switches the card from the editable form to the
28
+ * read-only "thanks" view. */
29
+ submitted = false;
30
+ /** The comment text. */
31
+ comment = '';
32
+ /** Overrides the computed heading (see the class doc for why this is computed by default). */
33
+ heading;
34
+ /** Overrides the computed subtitle. */
35
+ subtitle;
36
+ /** Fires when a star is clicked, with the new rating. */
37
+ bsRatingChange;
38
+ /** Fires on every keystroke in the comment textarea, with the current value. */
39
+ bsCommentInput;
40
+ /** Fires when "Submit feedback" is clicked, with the current rating and comment. Also sets
41
+ * `submitted` to true. */
42
+ bsSubmit;
43
+ /** Fires when "Start new chat" is clicked. The consuming app owns actually starting a new chat. */
44
+ bsNewChat;
45
+ /** Fires when the close button is clicked. The consuming app owns actually hiding the card. */
46
+ bsClose;
47
+ onStarClick = (value) => {
48
+ if (this.submitted)
49
+ return;
50
+ this.rating = value;
51
+ this.bsRatingChange.emit(value);
52
+ };
53
+ onCommentInput = (ev) => {
54
+ this.comment = ev.target.value;
55
+ this.bsCommentInput.emit(this.comment);
56
+ };
57
+ onSubmitClick = () => {
58
+ if (this.rating === 0)
59
+ return;
60
+ this.submitted = true;
61
+ this.bsSubmit.emit({ rating: this.rating, comment: this.comment });
62
+ };
63
+ onNewChatClick = () => {
64
+ this.bsNewChat.emit();
65
+ };
66
+ onCloseClick = () => {
67
+ this.bsClose.emit();
68
+ };
69
+ computedHeading() {
70
+ if (this.heading)
71
+ return this.heading;
72
+ if (this.submitted && RATING_COPY[this.rating])
73
+ return RATING_COPY[this.rating].heading;
74
+ return DEFAULT_HEADING;
75
+ }
76
+ computedSubtitle() {
77
+ if (this.subtitle)
78
+ return this.subtitle;
79
+ if (this.submitted && RATING_COPY[this.rating])
80
+ return RATING_COPY[this.rating].subtitle;
81
+ return DEFAULT_SUBTITLE;
82
+ }
83
+ render() {
84
+ const stars = [1, 2, 3, 4, 5];
85
+ return (index.h("div", { key: 'e509feb04a65ee7908c9021befe43ddb0727fd00', class: "bs-chatbot-feedback", role: "region", "aria-label": this.computedHeading() }, index.h("button", { key: '3c1e7f84bb1a2e0e6f89323f2c45102c3714c0f6', type: "button", part: "close", class: "bs-chatbot-feedback__close", "aria-label": "Close", onClick: this.onCloseClick }, index.h(CloseIcon, { key: '30202380a79f55d4187ff6f50fc0a11d7a282b81' })), index.h("div", { key: '228f8195087f1d6d3ec6ba53f954ab722cae2971', class: "bs-chatbot-feedback__top" }, index.h("div", { key: 'd7fb1f58d21aed4fa9b0e5da83a5506e8082c5ff', class: "bs-chatbot-feedback__text" }, index.h("p", { key: '7e275ebb91562a2f3b4eaf8076a7238f82260bcf', part: "heading", class: "bs-chatbot-feedback__heading" }, this.computedHeading()), index.h("p", { key: '0bd022e0594dee0a084a83fcce90abeb2b8c8a98', part: "subtitle", class: "bs-chatbot-feedback__subtitle" }, this.computedSubtitle())), index.h("div", { key: '0c54cd7cfc1b14c4feac0859e1ad2dd3ee2af8a1', class: "bs-chatbot-feedback__stars", role: "radiogroup", "aria-label": "Rating" }, stars.map(value => (index.h("button", { type: "button", part: "star", class: "bs-chatbot-feedback__star", role: "radio", "aria-checked": (this.rating >= value).toString(), "aria-label": `${value} star${value > 1 ? 's' : ''}`, disabled: this.submitted, onClick: () => this.onStarClick(value) }, index.h(StarIcon, { filled: this.rating >= value }))))), !this.submitted && (index.h("div", { key: '4e00821d17646c1d71d9893a7459557f9fcf24d2', class: "bs-chatbot-feedback__field" }, index.h("label", { key: '11d31fb2ff6897e97e2ec4196ead7269d60cec7b', part: "label", class: "bs-chatbot-feedback__label", htmlFor: "bs-chatbot-feedback-comment" }, "Tell us what you think"), index.h("textarea", { key: 'd6228e4d737e90ab61cca91d633e36ac69f1c172', part: "textarea", id: "bs-chatbot-feedback-comment", class: "bs-chatbot-feedback__textarea", placeholder: "e.g.The response was helpful ....", value: this.comment, onInput: this.onCommentInput }))), this.submitted && this.comment && (index.h("p", { key: 'bb5fdd240b07a6051cb784077b3476af1e1217fb', part: "comment", class: "bs-chatbot-feedback__comment" }, this.comment))), index.h("div", { key: '0d262521f8f13b464f4cbfa746ce49bd330986c6', class: "bs-chatbot-feedback__actions" }, !this.submitted && (index.h("button", { key: 'a5e8cc2a7bdd290cc95afeefe5d1fc5a1dde86ce', type: "button", part: "submit", class: "bs-chatbot-feedback__submit", disabled: this.rating === 0, onClick: this.onSubmitClick }, index.h(SendIcon, { key: '163b0c11e0038ae01d7bc61ae1f8c50930b7f8f2' }), "Submit feedback")), index.h("button", { key: '3cf2d4b2cd6b9043d4194a991cc0e33fa09c69e4', type: "button", part: "new-chat", class: `bs-chatbot-feedback__new-chat ${this.submitted ? 'bs-chatbot-feedback__new-chat--primary' : 'bs-chatbot-feedback__new-chat--outlined'}`, onClick: this.onNewChatClick }, index.h(EditIcon, { key: 'a0fddede710c06b60302e4cb12b7affe9ed8afec' }), "Start new chat"))));
86
+ }
87
+ };
88
+ const StarIcon = ({ filled }) => (index.h("svg", { viewBox: "0 0 24 24", fill: filled ? 'currentColor' : 'none', xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, index.h("path", { d: "M12 2.5L15.09 8.75L22 9.77L17 14.62L18.18 21.5L12 18.22L5.82 21.5L7 14.62L2 9.77L8.91 8.75L12 2.5Z", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" })));
89
+ const SendIcon = () => (index.h("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, index.h("path", { d: "M13.5 12H7.5", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), index.h("path", { d: "M4.55 20.75C4.44 20.99 4.47 21.27 4.63 21.48C4.79 21.69 5.05 21.79 5.31 21.75L21.37 12.65C21.6 12.52 21.75 12.27 21.75 12C21.75 11.73 21.6 11.48 21.37 11.35L5.31 2.25C5.05 2.21 4.79 2.31 4.63 2.52C4.47 2.73 4.44 3.01 4.55 3.25L7.5 12L4.55 20.75Z", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" })));
90
+ const EditIcon = () => (index.h("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, index.h("path", { d: "M16.5 3.5L20.5 7.5L8 20H4V16L16.5 3.5Z", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), index.h("path", { d: "M14.5 5.5L18.5 9.5", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" })));
91
+ const CloseIcon = () => (index.h("svg", { viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, index.h("path", { d: "M15 5L5 15", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), index.h("path", { d: "M15 15L5 5", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" })));
92
+ BsChatbotFeedback.style = bsChatbotFeedbackCss();
93
+
94
+ exports.bs_chatbot_feedback = BsChatbotFeedback;
@@ -132,7 +132,7 @@ const BsChatbotHeader = class {
132
132
  this.bsClose.emit();
133
133
  };
134
134
  render() {
135
- return (index.h("div", { key: '9ae798e8d79c992933228383823d3160dc660f90', class: "bs-chatbot-header", role: "banner", "aria-label": this.heading }, index.h("div", { key: 'c80243df90e7ed74cea0679b94c139fc6bba8cc5', part: "logo", class: "bs-chatbot-header__logo", role: "img", "aria-label": this.heading, innerHTML: GENIE_LOGO_SVG }), index.h("div", { key: 'ebcfc959d4d7c606866870f1f107c4fc771d25b1', class: "bs-chatbot-header__actions" }, index.h("span", { key: '153e84f8e63faf67c180338da94e86d2b28da945', class: "bs-chatbot-header__tooltip-wrapper" }, index.h("button", { key: '76b48c5dcaf482dfbafacf8125a5c2908bbc27c3', type: "button", part: "new-chat", class: "bs-chatbot-header__button", "aria-label": "New chat", onClick: this.onNewChatClick }, index.h("slot", { key: 'b09177f97df5a1ddb20374d260858f0ae3afea12', name: "new-chat-icon" }, index.h(NewChatIcon, { key: 'a1907a4fd8730c83af15ad7dbf8ec1d784fac88d' }))), index.h("bs-tooltip", { key: '77b453884b760bf4687b26adbb06f6220c49dbca', class: "bs-chatbot-header__tooltip", placement: "top", "aria-hidden": "true" }, "New chat")), index.h("span", { key: '8b775f74bd28efa4b812f959658cae97ffce085f', class: "bs-chatbot-header__tooltip-wrapper" }, index.h("button", { key: '1a8c279aa94175b2d90654aa4d3c959273147a7c', type: "button", part: "history", class: "bs-chatbot-header__button", "aria-label": "History", onClick: this.onHistoryClick }, index.h("slot", { key: '8660d04481d3d846731e83b23c865e2bab1cbea7', name: "history-icon" }, index.h(HistoryIcon, { key: 'a34ed34be60fbc2869b34480342007aa59700177' }))), index.h("bs-tooltip", { key: '7ba408053f7b0e88330720d3dff4f188f233f46a', class: "bs-chatbot-header__tooltip", placement: "top", "aria-hidden": "true" }, "History")), index.h("span", { key: '4b4d24319a9b5b2085c8180748f72bfcc532a942', class: "bs-chatbot-header__tooltip-wrapper" }, index.h("button", { key: 'b9055bd0344465df6afb40aad28ea9565865751e', type: "button", part: "expand", class: "bs-chatbot-header__button", "aria-label": this.expanded ? 'Collapse' : 'Expand', "aria-pressed": this.expanded ? 'true' : 'false', onClick: this.onExpandClick }, index.h("slot", { key: '460b3c1d20f2a48945df6385e3ebf7f54577881e', name: "expand-icon" }, index.h(ExpandIcon, { key: '890b772fff27703a7d3da00ff4ad5f2844714075' }))), index.h("bs-tooltip", { key: 'b43756a31171e14b70bc80574741b28b4dad2c98', class: "bs-chatbot-header__tooltip", placement: "top", "aria-hidden": "true" }, this.expanded ? 'Collapse' : 'Expand')), index.h("span", { key: '2023c06216607d6205ec3a0a13d2b06a10babae5', class: "bs-chatbot-header__tooltip-wrapper" }, index.h("button", { key: '1bdc7a342af4b6b37121edb9a93c30ba659d95bf', type: "button", part: "close", class: "bs-chatbot-header__button", "aria-label": "Close", onClick: this.onCloseClick }, index.h("slot", { key: '1c47b5499cf15ca73aa8a9dab792bf72c441ff38', name: "close-icon" }, index.h(CloseIcon, { key: '2ce1bad2bca776187e238647c02e3cc4b68018de' }))), index.h("bs-tooltip", { key: 'd7a3016e6eab564ab0cd9f5ab1d79be2b6408c17', class: "bs-chatbot-header__tooltip", placement: "top", "aria-hidden": "true" }, "Close")))));
135
+ return (index.h("div", { key: 'b1f536775af30bea47474dbcf41f444e9361fabd', class: "bs-chatbot-header", role: "banner", "aria-label": this.heading }, index.h("div", { key: '1e650269ff177b26e1dce30d9e04b4fab9de9698', part: "logo", class: "bs-chatbot-header__logo", role: "img", "aria-label": this.heading, innerHTML: GENIE_LOGO_SVG }), index.h("div", { key: '6a35a216f3bbda37ebd14ba801bf83f1f4941616', class: "bs-chatbot-header__actions" }, index.h("span", { key: 'af2b8a3eeafd27a946e1dd1c51c326c6f7e73531', class: "bs-chatbot-header__tooltip-wrapper" }, index.h("button", { key: '2928c845fd3737d68d672305437d9edd76d1deb3', type: "button", part: "new-chat", class: "bs-chatbot-header__button", "aria-label": "New chat", onClick: this.onNewChatClick }, index.h("slot", { key: 'bdab9f84e61bc92e16abcb7a9019300291690387', name: "new-chat-icon" }, index.h(NewChatIcon, { key: 'c61ddb8d3b8f9945f9986253cbe16e462c836f28' }))), index.h("bs-tooltip", { key: '3edbc3aae276ad91d2e70d21040efaffef101381', class: "bs-chatbot-header__tooltip", placement: "top", "aria-hidden": "true" }, "New chat")), index.h("span", { key: 'ef3bc303486fea9088b3855ac211baf6e1acae8b', class: "bs-chatbot-header__tooltip-wrapper" }, index.h("button", { key: '60e2787be7401832a29f806723414b361c480c47', type: "button", part: "history", class: "bs-chatbot-header__button", "aria-label": "History", onClick: this.onHistoryClick }, index.h("slot", { key: '2bbf8e675aa150740a23d59015446e012adbcb05', name: "history-icon" }, index.h(HistoryIcon, { key: '55badb6fc7cf1a17abbdae74896789cf2802be01' }))), index.h("bs-tooltip", { key: 'd4fd6cffbff586949b9357605cf23362a09fbd86', class: "bs-chatbot-header__tooltip", placement: "top", "aria-hidden": "true" }, "History")), index.h("span", { key: 'e2aa88c87d900d581b5a353cb2a4d014818b238b', class: "bs-chatbot-header__tooltip-wrapper" }, index.h("button", { key: 'aa5357f502a32b586b2d5c4837b37364f00d344a', type: "button", part: "expand", class: "bs-chatbot-header__button", "aria-label": this.expanded ? 'Collapse' : 'Expand', "aria-pressed": this.expanded ? 'true' : 'false', onClick: this.onExpandClick }, index.h("slot", { key: '312e8c17f49c84672533e37989c73072038ca07f', name: "expand-icon" }, index.h(ExpandIcon, { key: 'a0b666ae7b3660d4eb892407a82a84a0d8c8607b' }))), index.h("bs-tooltip", { key: '3c43e4d14ef4cdedaaecebed43927eb8f59e3391', class: "bs-chatbot-header__tooltip", placement: "top", "aria-hidden": "true" }, this.expanded ? 'Collapse' : 'Expand')), index.h("span", { key: '1e252dcc382c0f2c5ae89a8dcf96e9d76c086b01', class: "bs-chatbot-header__tooltip-wrapper" }, index.h("button", { key: 'b95104b5dc629e70c43f0eb01f34fd0ba57db670', type: "button", part: "close", class: "bs-chatbot-header__button", "aria-label": "Close", onClick: this.onCloseClick }, index.h("slot", { key: '7c24bb86799528bc1e1bcc6419217b2048f70835', name: "close-icon" }, index.h(CloseIcon, { key: 'c53e2028c86264bac5082e9e145deb79eca3156d' }))), index.h("bs-tooltip", { key: 'f132fa96cc7942a3c4574403da1f2a0d586c0068', class: "bs-chatbot-header__tooltip", placement: "top", "aria-hidden": "true" }, "Close")))));
136
136
  }
137
137
  };
138
138
  const NewChatIcon = () => (index.h("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, index.h("path", { d: "M12 15H9V12L18 3L21 6L12 15Z", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }), index.h("path", { d: "M15.75 5.25L18.75 8.25", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }), index.h("path", { d: "M20.25 12V19.5C20.25 19.6989 20.171 19.8897 20.0303 20.0303C19.8897 20.171 19.6989 20.25 19.5 20.25H4.5C4.30109 20.25 4.11032 20.171 3.96967 20.0303C3.82902 19.8897 3.75 19.6989 3.75 19.5V4.5C3.75 4.30109 3.82902 4.11032 3.96967 3.96967C4.11032 3.82902 4.30109 3.75 4.5 3.75H12", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })));
@@ -78,7 +78,7 @@ const BsChatbotResponseAction = class {
78
78
  };
79
79
  render() {
80
80
  const hasSources = !!this.sourcesCount && this.sourcesCount > 0;
81
- return (index.h("div", { key: 'd372000276bedcf0bd64015d955a4ed4ff1c83cc', class: "bs-chatbot-response-action" }, index.h("button", { key: '6fff591650e4f6114a653ff37bfebe100d4874b7', type: "button", part: "like", class: "bs-chatbot-response-action__button", "aria-label": "Like", onClick: this.onLikeClick }, index.h("slot", { key: 'e92d29243291141fd63120b4bc6a5024f1908066', name: "like-icon" }, index.h(ThumbsUpIcon, { key: 'd1a7e8d922f5e712e48e19c6176fdb60ac511240' }))), index.h("button", { key: '7115ff6c49c5388440f0fe8a352ddd4459a5f8ed', type: "button", part: "dislike", class: "bs-chatbot-response-action__button", "aria-label": "Dislike", onClick: this.onDislikeClick }, index.h("slot", { key: 'd3642d52b90cbd3f6c60d8b8ead3d14fab29f531', name: "dislike-icon" }, index.h(ThumbsDownIcon, { key: '8cff196faabd164cf023bfa8bac02f3455885261' }))), index.h("button", { key: 'd32e2ebce71ab91327d7ad7406ae581b2ff98443', type: "button", part: "copy", class: "bs-chatbot-response-action__button", "aria-label": "Copy", onClick: this.onCopyClick }, index.h("slot", { key: '1c0459f9fb78202d41e5bf7b3bf5a11ac9c00ecd', name: "copy-icon" }, index.h(CopyIcon, { key: 'b3d8e9f3cb2125c26967156f046ce3caf44ab8b1' }))), index.h("button", { key: 'c14f8a2580018edac6b16c82be5b339c7a4033af', type: "button", part: "regenerate", class: "bs-chatbot-response-action__button", "aria-label": "Regenerate", onClick: this.onRegenerateClick }, index.h("slot", { key: 'cf67332b681da43a7a305909e14a16bf6a3ca962', name: "regenerate-icon" }, index.h(RegenerateIcon, { key: '76b5b9c39624007532b2c2b7f20554f12cd8eee4' }))), index.h("div", { key: 'b62694c42bf23484362e188b6b74559810fce693', class: "bs-chatbot-response-action__menu-wrapper" }, index.h("button", { key: '36715b97f529bfc9c064020d434d0210a3674e52', type: "button", part: "menu", class: "bs-chatbot-response-action__button", "aria-label": "More options", "aria-haspopup": "menu", "aria-expanded": this.menuOpen ? 'true' : 'false', onClick: this.onMenuClick }, index.h("slot", { key: 'f11d837af777a04cc9031921f92b57e139758f2c', name: "menu-icon" }, index.h(MenuIcon, { key: '3c0c0a70edcf1e8c817a121fce315b8a747ee8e4' }))), this.menuOpen && (index.h("div", { key: '5a4848466caecf26ce3797b14609932e76ca653d', class: "bs-chatbot-response-action__menu-popup" }, index.h("slot", { key: 'f79ac9bcde08eadd0a904223f6f13c9850066827', name: "menu" })))), hasSources && (index.h("button", { key: 'ef9663bbbb7f74482743177bdfa8053575c3330e', type: "button", part: "sources", class: "bs-chatbot-response-action__sources", onClick: this.onSourcesClick }, index.h("slot", { key: 'f848fd2b5e545d186a7f337c2d0fe0f300c567f7', name: "sources-icon" }, index.h(SourcesIcon, { key: '7a8be099bcf97209b30c1b941b1f13691d9c07d3' })), index.h("span", { key: 'e91be28b3d36b1cc3a91c17218ca5ea77938f887', class: "bs-chatbot-response-action__sources-label" }, this.sourcesCount, " ", this.sourcesCount === 1 ? 'source' : 'sources')))));
81
+ return (index.h("div", { key: 'bae036e0fce39e91ad77e048e6c169ea72ce78e4', class: "bs-chatbot-response-action" }, index.h("button", { key: 'aadfb92da35ba7b5b105cfdc3ad506c7a7fd78e7', type: "button", part: "like", class: "bs-chatbot-response-action__button", "aria-label": "Like", onClick: this.onLikeClick }, index.h("slot", { key: 'f61c62fa761d277b3ef1b6c7a1bf4b8077ac340b', name: "like-icon" }, index.h(ThumbsUpIcon, { key: 'a95b09db3fee703c4d2e31a5efa590feb777f3b5' }))), index.h("button", { key: '37bdacfab99f444ae215b0da5a7b11912562baf7', type: "button", part: "dislike", class: "bs-chatbot-response-action__button", "aria-label": "Dislike", onClick: this.onDislikeClick }, index.h("slot", { key: 'b948f912ce5cd82c570bfcf7fe69f01f4bf993b0', name: "dislike-icon" }, index.h(ThumbsDownIcon, { key: '59e901ec41273c235fb0e484e53d23e529a1f429' }))), index.h("button", { key: '5f0f954f0cadcfda62d0493ebbf07651dc9c43c3', type: "button", part: "copy", class: "bs-chatbot-response-action__button", "aria-label": "Copy", onClick: this.onCopyClick }, index.h("slot", { key: 'a965380a2c3af43ba49b735c19c7b4afb5ec9c9f', name: "copy-icon" }, index.h(CopyIcon, { key: 'c9e7d8ef53a14728bced9c753aba3529ac97152f' }))), index.h("button", { key: 'e06f0c60698dea9a17005d6b233e59e5389c2c11', type: "button", part: "regenerate", class: "bs-chatbot-response-action__button", "aria-label": "Regenerate", onClick: this.onRegenerateClick }, index.h("slot", { key: '9a5aad36b3f1e217b2ab1718c25d451bc4f0b326', name: "regenerate-icon" }, index.h(RegenerateIcon, { key: '02aa85caf9c69a84fab24fd97361fa0a2a42c784' }))), index.h("div", { key: '6c48442ee1c32fcdecab2521c7e7773aae413c61', class: "bs-chatbot-response-action__menu-wrapper" }, index.h("button", { key: '749474386109e0c6bf3d0c18396ab75514a84db5', type: "button", part: "menu", class: "bs-chatbot-response-action__button", "aria-label": "More options", "aria-haspopup": "menu", "aria-expanded": this.menuOpen ? 'true' : 'false', onClick: this.onMenuClick }, index.h("slot", { key: 'a48edebb1eb697e7ebb80ceee8b674ad28ae760b', name: "menu-icon" }, index.h(MenuIcon, { key: '3bc463d9d8882ae373221b754d234938bd47f7de' }))), this.menuOpen && (index.h("div", { key: 'b1217dd05886155d65b6c6e52933b23ddfbeda4e', class: "bs-chatbot-response-action__menu-popup" }, index.h("slot", { key: '5a22ff4ffe417bbd25dfddbf18a943862b499f24', name: "menu" })))), hasSources && (index.h("button", { key: '35d6be1ee305a8549ebc1bed28884c0c5dc83220', type: "button", part: "sources", class: "bs-chatbot-response-action__sources", onClick: this.onSourcesClick }, index.h("slot", { key: 'af5a033146160fc90eb9ad3d28eb0ecc3628347c', name: "sources-icon" }, index.h(SourcesIcon, { key: '908029587106b710ddcee80fe207dddc8f77723c' })), index.h("span", { key: 'aa64462f7f5f4d96adfdf7172a5c2ac18cb1e608', class: "bs-chatbot-response-action__sources-label" }, this.sourcesCount, " ", this.sourcesCount === 1 ? 'source' : 'sources')))));
82
82
  }
83
83
  };
84
84
  const ThumbsUpIcon = () => (index.h("svg", { viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, index.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" }), index.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,38 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index-CVh-sqA_.js');
4
+
5
+ const bsChatbotSourcesDrawerCss = () => `:host{display:block;--bs-chatbot-sources-drawer-bg:var(--bs-surface-raised);--bs-chatbot-sources-drawer-header-shadow:var(--bs-shadow-xs);--bs-chatbot-sources-drawer-header-padding-x:var(--bs-spacing-200);--bs-chatbot-sources-drawer-header-padding-top:var(--bs-spacing-150);--bs-chatbot-sources-drawer-header-padding-bottom:var(--bs-spacing-100);--bs-chatbot-sources-drawer-heading-color:var(--bs-text-default);--bs-chatbot-sources-drawer-count-bg:var(--bs-badge-bg-neutral-container);--bs-chatbot-sources-drawer-count-color:var(--bs-badge-text-neutral);--bs-chatbot-sources-drawer-collapse-hover:var(--bs-surface-hover);--bs-chatbot-sources-drawer-section-gap:var(--bs-spacing-200);--bs-chatbot-sources-drawer-list-padding:var(--bs-spacing-200);--bs-chatbot-sources-drawer-list-gap:var(--bs-spacing-50)}.bs-chatbot-sources-drawer{box-sizing:border-box;display:flex;flex-direction:column;gap:var(--bs-chatbot-sources-drawer-section-gap);width:100%;height:100%;background:var(--bs-chatbot-sources-drawer-bg);font-family:inherit}.bs-chatbot-sources-drawer__header{box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;flex-shrink:0;padding:var(--bs-chatbot-sources-drawer-header-padding-top) var(--bs-chatbot-sources-drawer-header-padding-x) var(--bs-chatbot-sources-drawer-header-padding-bottom);box-shadow:var(--bs-chatbot-sources-drawer-header-shadow)}.bs-chatbot-sources-drawer__title-group{display:flex;align-items:center;gap:var(--bs-spacing-100)}.bs-chatbot-sources-drawer__heading{margin:0;color:var(--bs-chatbot-sources-drawer-heading-color);font-size:var(--bs-font-size-2xl);font-weight:var(--bs-font-weight-bold);line-height:calc(var(--bs-line-height-heading-h4) * 1px)}.bs-chatbot-sources-drawer__count{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;min-width:16px;max-width:34px;padding:var(--bs-spacing-50) var(--bs-spacing-100);background:var(--bs-chatbot-sources-drawer-count-bg);border-radius:var(--bs-border-radius-50);color:var(--bs-chatbot-sources-drawer-count-color);font-size:var(--bs-font-size-xs);line-height:calc(var(--bs-line-height-caption-sm) * 1px)}.bs-chatbot-sources-drawer__collapse{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;background:none;border:none;border-radius:var(--bs-border-radius-100);color:var(--bs-icon-default);cursor:pointer}.bs-chatbot-sources-drawer__collapse:hover{background:var(--bs-chatbot-sources-drawer-collapse-hover)}.bs-chatbot-sources-drawer__collapse:focus-visible{outline:2px solid var(--bs-border-neutral-focus);outline-offset:1px}.bs-chatbot-sources-drawer__list{box-sizing:border-box;display:flex;flex-direction:column;gap:var(--bs-chatbot-sources-drawer-list-gap);padding:0 var(--bs-chatbot-sources-drawer-list-padding) var(--bs-chatbot-sources-drawer-list-padding);overflow-y:auto}`;
6
+
7
+ const BsChatbotSourcesDrawer = class {
8
+ constructor(hostRef) {
9
+ index.registerInstance(this, hostRef);
10
+ this.bsCollapse = index.createEvent(this, "bsCollapse");
11
+ }
12
+ get el() { return index.getElement(this); }
13
+ /** The panel title. */
14
+ heading = 'Sources';
15
+ /**
16
+ * Overrides the auto-detected count badge. By default the badge reflects the number of slotted
17
+ * `bs-source-link` children, so most consumers don't need to set this.
18
+ */
19
+ count;
20
+ /** Fires when the collapse chevron is clicked. The consuming app owns actually hiding the panel. */
21
+ bsCollapse;
22
+ slottedCount = 0;
23
+ onSlotchange = (event) => {
24
+ const slot = event.target;
25
+ this.slottedCount = slot.assignedElements().filter(el => el.tagName.toLowerCase() === 'bs-source-link').length;
26
+ };
27
+ onCollapseClick = () => {
28
+ this.bsCollapse.emit();
29
+ };
30
+ render() {
31
+ const displayCount = this.count ?? this.slottedCount;
32
+ return (index.h("div", { key: '54cb56455b630d5ed30dd2a925728f2803143b17', class: "bs-chatbot-sources-drawer", role: "region", "aria-label": this.heading }, index.h("div", { key: 'd24eabd0ac2c36ec4033a9b5c361aa32225fa78a', class: "bs-chatbot-sources-drawer__header" }, index.h("div", { key: '0bec3fb848552496e1884b4731c5e1964570c70d', class: "bs-chatbot-sources-drawer__title-group" }, index.h("h2", { key: '955389bd4f3ba1950c9af404e5880a6837298384', part: "heading", class: "bs-chatbot-sources-drawer__heading" }, this.heading), displayCount > 0 && (index.h("span", { key: '40d83288bbd257504ef814247c7bd4664df9e169', part: "count", class: "bs-chatbot-sources-drawer__count" }, displayCount))), index.h("button", { key: '56a15c64faea80790387d4918843c806b684268b', type: "button", part: "collapse", class: "bs-chatbot-sources-drawer__collapse", "aria-label": "Collapse sources", onClick: this.onCollapseClick }, index.h("slot", { key: 'c321f53482f0265357a6a29fc40e0ff3766f0b74', name: "collapse-icon" }, index.h(CaretRightIcon, { key: 'c3d4c17bebd2611b27c3e7f87d359e4b46c41d4f' })))), index.h("div", { key: 'd6c4b8e3660f765112f0c33dd72021af118332d9', part: "list", class: "bs-chatbot-sources-drawer__list" }, index.h("slot", { key: '19759a01d921ed2517cbca2b01ea53741a207b8b', onSlotchange: this.onSlotchange }))));
33
+ }
34
+ };
35
+ const CaretRightIcon = () => (index.h("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, index.h("path", { d: "M7.5 4.375L13.125 10L7.5 15.625", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" })));
36
+ BsChatbotSourcesDrawer.style = bsChatbotSourcesDrawerCss();
37
+
38
+ exports.bs_chatbot_sources_drawer = BsChatbotSourcesDrawer;
@@ -17,7 +17,7 @@ const BsChatbotSuggestionButton = class {
17
17
  this.bsSelect.emit();
18
18
  };
19
19
  render() {
20
- return (index.h("button", { key: 'fc87dab75d560ce5f6612c2bf61875d574eddd1f', type: "button", part: "button", class: "bs-chatbot-suggestion-button", disabled: this.disabled, onClick: this.onClick }, index.h("slot", { key: '27ae5b010dcac9ebbb3924c72299cbb5a067ce6b' })));
20
+ return (index.h("button", { key: '2a5213dc81a29dd68f99717b93e6f5396db5c5da', type: "button", part: "button", class: "bs-chatbot-suggestion-button", disabled: this.disabled, onClick: this.onClick }, index.h("slot", { key: '28b5ac8ddcdab80fb377a897dc1af62257473385' })));
21
21
  }
22
22
  };
23
23
  BsChatbotSuggestionButton.style = bsChatbotSuggestionButtonCss();
@@ -0,0 +1,43 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index-CVh-sqA_.js');
4
+
5
+ const bsComposerStatusBannerCss = () => `:host{display:block;--bs-composer-status-banner-radius:var(--bs-border-radius-150);--bs-composer-status-banner-padding-x:var(--bs-spacing-150);--bs-composer-status-banner-padding-top:var(--bs-spacing-100);--bs-composer-status-banner-padding-bottom:var(--bs-spacing-200);--bs-composer-status-banner-gap:var(--bs-spacing-100);--bs-composer-status-banner-icon-gap:var(--bs-spacing-75);--bs-composer-status-banner-error-bg:var(--bs-color-error-container);--bs-composer-status-banner-error-text:var(--bs-text-error);--bs-composer-status-banner-error-action-bg:var(--bs-color-error-default);--bs-composer-status-banner-error-action-bg-hover:var(--bs-color-error-hover);--bs-composer-status-banner-info-bg:var(--bs-color-info-container);--bs-composer-status-banner-info-text:var(--bs-text-info);--bs-composer-status-banner-info-action-bg:var(--bs-color-info-default);--bs-composer-status-banner-info-action-bg-hover:var(--bs-color-info-hover);--bs-composer-status-banner-neutral-bg:var(--bs-color-neutral-container);--bs-composer-status-banner-neutral-text:var(--bs-text-default);--bs-composer-status-banner-neutral-action-bg:var(--bs-color-neutral-container);--bs-composer-status-banner-neutral-action-bg-hover:var(--bs-color-neutral-container-hover);--bs-composer-status-banner-neutral-action-border:var(--bs-border-neutral-container);--bs-composer-status-banner-warning-bg:var(--bs-color-warning-container);--bs-composer-status-banner-warning-text:var(--bs-text-warning);--bs-composer-status-banner-warning-action-bg:var(--bs-color-warning-default);--bs-composer-status-banner-warning-action-bg-hover:var(--bs-color-warning-hover);--bs-composer-status-banner-close-hover-bg:var(--bs-color-neutral-container-hover)}.bs-composer-status-banner{box-sizing:border-box;display:flex;align-items:center;gap:var(--bs-composer-status-banner-gap);padding:var(--bs-composer-status-banner-padding-top) var(--bs-composer-status-banner-padding-x) var(--bs-composer-status-banner-padding-bottom);border-radius:var(--bs-composer-status-banner-radius) var(--bs-composer-status-banner-radius) 0 0;font-family:inherit}.bs-composer-status-banner--error{background:var(--bs-composer-status-banner-error-bg);color:var(--bs-composer-status-banner-error-text)}.bs-composer-status-banner--info{background:var(--bs-composer-status-banner-info-bg);color:var(--bs-composer-status-banner-info-text)}.bs-composer-status-banner--neutral{background:var(--bs-composer-status-banner-neutral-bg);color:var(--bs-composer-status-banner-neutral-text)}.bs-composer-status-banner--warning{background:var(--bs-composer-status-banner-warning-bg);color:var(--bs-composer-status-banner-warning-text)}.bs-composer-status-banner__message-group{box-sizing:border-box;display:flex;align-items:center;flex:1 0 0;min-width:0;gap:var(--bs-composer-status-banner-icon-gap)}.bs-composer-status-banner__icon{display:inline-flex;flex-shrink:0;width:20px;height:20px}.bs-composer-status-banner__icon ::slotted(*){display:block;width:100%;height:100%}.bs-composer-status-banner__message{margin:0;flex:1 0 0;min-width:0;font-size:var(--bs-font-size-md);line-height:calc(var(--bs-line-height-body-md) * 1px);word-break:break-word}.bs-composer-status-banner__action{box-sizing:border-box;flex-shrink:0;height:32px;padding:0 var(--bs-spacing-150);border:none;border-radius:var(--bs-border-radius-100);color:var(--bs-text-on-action);font-family:inherit;font-size:var(--bs-font-size-sm);font-weight:var(--bs-font-weight-medium);line-height:calc(var(--bs-line-height-body-sm) * 1px);cursor:pointer;transition:background-color var(--bs-duration-fast) var(--bs-easing-standard)}.bs-composer-status-banner--error .bs-composer-status-banner__action{background:var(--bs-composer-status-banner-error-action-bg)}.bs-composer-status-banner--error .bs-composer-status-banner__action:hover{background:var(--bs-composer-status-banner-error-action-bg-hover)}.bs-composer-status-banner--info .bs-composer-status-banner__action{background:var(--bs-composer-status-banner-info-action-bg)}.bs-composer-status-banner--info .bs-composer-status-banner__action:hover{background:var(--bs-composer-status-banner-info-action-bg-hover)}.bs-composer-status-banner--warning .bs-composer-status-banner__action{background:var(--bs-composer-status-banner-warning-action-bg)}.bs-composer-status-banner--warning .bs-composer-status-banner__action:hover{background:var(--bs-composer-status-banner-warning-action-bg-hover)}.bs-composer-status-banner--neutral .bs-composer-status-banner__action{background:var(--bs-composer-status-banner-neutral-action-bg);border:var(--bs-border-width-thin) solid var(--bs-composer-status-banner-neutral-action-border);color:var(--bs-text-default)}.bs-composer-status-banner--neutral .bs-composer-status-banner__action:hover{background:var(--bs-composer-status-banner-neutral-action-bg-hover)}.bs-composer-status-banner__close{box-sizing:border-box;display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;width:32px;height:32px;padding:0;background:transparent;border:none;border-radius:var(--bs-border-radius-100);color:inherit;cursor:pointer;transition:background-color var(--bs-duration-fast) var(--bs-easing-standard)}.bs-composer-status-banner__close:hover{background:var(--bs-composer-status-banner-close-hover-bg)}.bs-composer-status-banner__close svg{width:20px;height:20px}.bs-composer-status-banner__close:focus-visible,.bs-composer-status-banner__action:focus-visible{outline:2px solid var(--bs-border-neutral-focus);outline-offset:1px}`;
6
+
7
+ const BsComposerStatusBanner = class {
8
+ constructor(hostRef) {
9
+ index.registerInstance(this, hostRef);
10
+ this.bsAction = index.createEvent(this, "bsAction");
11
+ this.bsClose = index.createEvent(this, "bsClose");
12
+ }
13
+ /** Which severity/style to render. Drives background, text/icon color, and the action button's color. */
14
+ type = 'error';
15
+ /** The message text. */
16
+ message = 'This is a message';
17
+ /** Whether the leading icon (default: clock) is rendered. */
18
+ showIcon = true;
19
+ /** Whether the "Continue"-style action button is rendered. */
20
+ showButton = false;
21
+ /** Label for the action button, only rendered when `showButton` is true. */
22
+ actionLabel = 'Continue';
23
+ /** Whether the close button is rendered. */
24
+ allowClose = true;
25
+ /** Fires when the action button is clicked. Only relevant when `showButton` is true. */
26
+ bsAction;
27
+ /** Fires when the close button is clicked. Only relevant when `allowClose` is true. */
28
+ bsClose;
29
+ onActionClick = () => {
30
+ this.bsAction.emit();
31
+ };
32
+ onCloseClick = () => {
33
+ this.bsClose.emit();
34
+ };
35
+ render() {
36
+ return (index.h("div", { key: 'b51067b9af0210682fc60b5340560bf6ee42d655', class: `bs-composer-status-banner bs-composer-status-banner--${this.type}` }, index.h("div", { key: 'a6774d57e22e1b39fe0c9add8d96ed1c349bfeae', class: "bs-composer-status-banner__message-group" }, this.showIcon && (index.h("span", { key: '6a2b131a63a2d2cbe33f62519d1602752bc98204', part: "icon", class: "bs-composer-status-banner__icon" }, index.h("slot", { key: '6123c6a61652dfb504cf2e140a012fcba27e7468', name: "icon" }, index.h(ClockIcon, { key: '5415d7c71e2976a552955606e7288a4b806f1dbe' })))), index.h("p", { key: '1580b9f2b53390c32e38763c0cef23cb5d7ffa4c', part: "message", class: "bs-composer-status-banner__message" }, this.message)), this.showButton && (index.h("button", { key: 'bb08fce8f48253787015308bfc66e04835069670', type: "button", part: "action", class: "bs-composer-status-banner__action", onClick: this.onActionClick }, this.actionLabel)), this.allowClose && (index.h("button", { key: 'b9d64c66155cb8c5b884b48a442c9e0d09be9111', type: "button", part: "close", class: "bs-composer-status-banner__close", "aria-label": "Dismiss", onClick: this.onCloseClick }, index.h(CloseIcon, { key: '2779b3af1d5348ee510cd1fe4978cbfbbfb33c5e' })))));
37
+ }
38
+ };
39
+ const ClockIcon = () => (index.h("svg", { viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, index.h("circle", { cx: "10", cy: "10", r: "7.25", stroke: "currentColor", "stroke-width": "1.3" }), index.h("path", { d: "M10 5.83V10L12.5 11.67", stroke: "currentColor", "stroke-width": "1.3", "stroke-linecap": "round", "stroke-linejoin": "round" })));
40
+ const CloseIcon = () => (index.h("svg", { viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, index.h("path", { d: "M15 5L5 15", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), index.h("path", { d: "M15 15L5 5", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" })));
41
+ BsComposerStatusBanner.style = bsComposerStatusBannerCss();
42
+
43
+ exports.bs_composer_status_banner = BsComposerStatusBanner;
@@ -2,7 +2,7 @@
2
2
 
3
3
  var index = require('./index-CVh-sqA_.js');
4
4
 
5
- const bsComposerCss = () => `:host{display:block;--bs-composer-radius:var(--bs-border-radius-150);--bs-composer-button-radius:var(--bs-border-radius-100);--bs-composer-button-size:var(--bs-spacing-600);--bs-composer-bg:var(--bs-input-bg-default);--bs-composer-border:var(--bs-input-border-default);--bs-composer-border-focus:var(--bs-input-border-focus);--bs-composer-action-bg:var(--bs-color-primary-default);--bs-composer-action-bg-hover:var(--bs-color-primary-hover);--bs-composer-action-bg-pressed:var(--bs-color-primary-pressed);--bs-composer-action-bg-disabled:var(--bs-surface-action-disabled);--bs-composer-action-icon:var(--bs-text-on-action);--bs-composer-action-icon-disabled:var(--bs-text-on-disabled);--bs-composer-attach-icon:var(--bs-icon-default);--bs-composer-mic-icon:var(--bs-icon-default);--bs-composer-mic-icon-disabled:var(--bs-icon-disabled);--bs-composer-mic-recording-icon:var(--bs-icon-default);--bs-composer-subtle-hover:var(--bs-color-neutral-container);--bs-composer-subtle-pressed:var(--bs-color-neutral-container-pressed);--bs-composer-waveform-color:var(--bs-border-default)}.bs-composer{box-sizing:border-box;display:flex;flex-direction:column;border:1px solid var(--bs-composer-border);border-radius:var(--bs-composer-radius);background:var(--bs-composer-bg);font-family:inherit}.bs-composer--human{border-style:dashed}.bs-composer:focus-within{border-color:var(--bs-composer-border-focus)}.bs-composer__text-row{display:flex;align-items:center;gap:var(--bs-spacing-150);padding:var(--bs-spacing-150)}.bs-composer__input{flex:1;min-width:0;border:none;outline:none;background:transparent;color:var(--bs-input-text);font-family:inherit;font-size:var(--bs-font-size-md)}.bs-composer__input::placeholder{color:var(--bs-input-placeholder)}.bs-composer__input:disabled{color:var(--bs-input-text-disabled);cursor:not-allowed}.bs-composer__waveform{display:inline-flex;flex:1;min-width:0;align-items:center;justify-content:center;gap:3px;overflow:hidden}.bs-composer__waveform-bar{display:inline-block;flex-shrink:0;width:2.5px;border-radius:1.5px;background:var(--bs-composer-waveform-color);height:var(--bs-composer-bar-height, 6px)}.bs-composer__controls-row{display:flex;align-items:center;gap:var(--bs-spacing-200);padding:var(--bs-spacing-150)}.bs-composer__spacer{flex:1}.bs-composer__attach,.bs-composer__mic,.bs-composer__action{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;border:none;padding:0;cursor:pointer;font-family:inherit;border-radius:var(--bs-composer-button-radius);width:var(--bs-composer-button-size);height:var(--bs-composer-button-size);flex-shrink:0;transition:background-color var(--bs-duration-fast) var(--bs-easing-standard)}.bs-composer__attach:focus-visible,.bs-composer__mic:focus-visible,.bs-composer__action:focus-visible{outline:2px solid var(--bs-border-neutral-focus);outline-offset:2px}.bs-composer__attach svg,.bs-composer__mic svg,.bs-composer__action svg{width:24px;height:24px}.bs-composer__attach,.bs-composer__mic{background:transparent}.bs-composer__attach:hover:not(:disabled),.bs-composer__mic:hover:not(:disabled){background:var(--bs-composer-subtle-hover)}.bs-composer__attach:active:not(:disabled),.bs-composer__mic:active:not(:disabled){background:var(--bs-composer-subtle-pressed)}.bs-composer__attach{color:var(--bs-composer-attach-icon)}.bs-composer__mic{color:var(--bs-composer-mic-icon)}.bs-composer__mic--recording{color:var(--bs-composer-mic-recording-icon)}.bs-composer__mic:disabled{color:var(--bs-composer-mic-icon-disabled);cursor:not-allowed}.bs-composer__action{background:var(--bs-composer-action-bg);color:var(--bs-composer-action-icon)}.bs-composer__action:hover:not(:disabled){background:var(--bs-composer-action-bg-hover)}.bs-composer__action:active:not(:disabled){background:var(--bs-composer-action-bg-pressed)}.bs-composer__action:disabled{background:var(--bs-composer-action-bg-disabled);color:var(--bs-composer-action-icon-disabled);cursor:not-allowed}`;
5
+ const bsComposerCss = () => `:host{display:block;--bs-composer-radius:var(--bs-border-radius-150);--bs-composer-button-radius:var(--bs-border-radius-100);--bs-composer-button-size:var(--bs-spacing-600);--bs-composer-bg:var(--bs-input-bg-default);--bs-composer-border:var(--bs-input-border-default);--bs-composer-border-focus:var(--bs-input-border-focus);--bs-composer-action-bg:var(--bs-color-primary-default);--bs-composer-action-bg-hover:var(--bs-color-primary-hover);--bs-composer-action-bg-pressed:var(--bs-color-primary-pressed);--bs-composer-action-bg-disabled:var(--bs-surface-action-disabled);--bs-composer-action-icon:var(--bs-text-on-action);--bs-composer-action-icon-disabled:var(--bs-text-on-disabled);--bs-composer-attach-icon:var(--bs-icon-default);--bs-composer-mic-icon:var(--bs-icon-default);--bs-composer-mic-icon-disabled:var(--bs-icon-disabled);--bs-composer-mic-recording-icon:var(--bs-icon-default);--bs-composer-subtle-hover:var(--bs-color-neutral-container);--bs-composer-subtle-pressed:var(--bs-color-neutral-container-pressed);--bs-composer-waveform-color:var(--bs-border-default)}.bs-composer{box-sizing:border-box;display:flex;flex-direction:column;border:1px solid var(--bs-composer-border);border-radius:var(--bs-composer-radius);background:var(--bs-composer-bg);font-family:inherit}.bs-composer--human{border-style:dashed}.bs-composer:focus-within{border-color:var(--bs-composer-border-focus)}.bs-composer__attachments-row{display:none}.bs-composer__attachments-row--visible{display:block}.bs-composer__text-row{display:flex;align-items:center;gap:var(--bs-spacing-150);padding:var(--bs-spacing-150)}.bs-composer__input{flex:1;min-width:0;border:none;outline:none;background:transparent;color:var(--bs-input-text);font-family:inherit;font-size:var(--bs-font-size-md)}.bs-composer__input::placeholder{color:var(--bs-input-placeholder)}.bs-composer__input:disabled{color:var(--bs-input-text-disabled);cursor:not-allowed}.bs-composer__waveform{display:inline-flex;flex:1;min-width:0;align-items:center;justify-content:center;gap:3px;overflow:hidden}.bs-composer__waveform-bar{display:inline-block;flex-shrink:0;width:2.5px;border-radius:1.5px;background:var(--bs-composer-waveform-color);height:var(--bs-composer-bar-height, 6px)}.bs-composer__controls-row{display:flex;align-items:center;gap:var(--bs-spacing-200);padding:var(--bs-spacing-150)}.bs-composer__spacer{flex:1}.bs-composer__attach,.bs-composer__mic,.bs-composer__action{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;border:none;padding:0;cursor:pointer;font-family:inherit;border-radius:var(--bs-composer-button-radius);width:var(--bs-composer-button-size);height:var(--bs-composer-button-size);flex-shrink:0;transition:background-color var(--bs-duration-fast) var(--bs-easing-standard)}.bs-composer__attach:focus-visible,.bs-composer__mic:focus-visible,.bs-composer__action:focus-visible{outline:2px solid var(--bs-border-neutral-focus);outline-offset:2px}.bs-composer__attach svg,.bs-composer__mic svg,.bs-composer__action svg{width:24px;height:24px}.bs-composer__attach,.bs-composer__mic{background:transparent}.bs-composer__attach:hover:not(:disabled),.bs-composer__mic:hover:not(:disabled){background:var(--bs-composer-subtle-hover)}.bs-composer__attach:active:not(:disabled),.bs-composer__mic:active:not(:disabled){background:var(--bs-composer-subtle-pressed)}.bs-composer__attach{color:var(--bs-composer-attach-icon)}.bs-composer__mic{color:var(--bs-composer-mic-icon)}.bs-composer__mic--recording{color:var(--bs-composer-mic-recording-icon)}.bs-composer__mic:disabled{color:var(--bs-composer-mic-icon-disabled);cursor:not-allowed}.bs-composer__action{background:var(--bs-composer-action-bg);color:var(--bs-composer-action-icon)}.bs-composer__action:hover:not(:disabled){background:var(--bs-composer-action-bg-hover)}.bs-composer__action:active:not(:disabled){background:var(--bs-composer-action-bg-pressed)}.bs-composer__action:disabled{background:var(--bs-composer-action-bg-disabled);color:var(--bs-composer-action-icon-disabled);cursor:not-allowed}`;
6
6
 
7
7
  const DEFAULT_PLACEHOLDERS = {
8
8
  ai: 'Ask Genie something...',
@@ -25,6 +25,7 @@ const BsComposer = class {
25
25
  this.bsAttach = index.createEvent(this, "bsAttach");
26
26
  this.bsMicToggle = index.createEvent(this, "bsMicToggle");
27
27
  }
28
+ get el() { return index.getElement(this); }
28
29
  /**
29
30
  * Which flavor of composer this is: changes the *default* placeholder text (set `placeholder`
30
31
  * directly to override it) and, per the Figma design, renders the container border dashed
@@ -49,6 +50,10 @@ const BsComposer = class {
49
50
  * accessible name -- set it in every real usage.
50
51
  */
51
52
  ariaLabel = null;
53
+ /** Tracks whether the `attachments` slot has assigned content, so the row above the text field
54
+ * (padding, border) only takes up space when a consumer has actually put something there --
55
+ * same reasoning/pattern as `hasIcon`/`hasLabel` in `bs-attachment`. */
56
+ hasAttachments = false;
52
57
  /** Fires on every keystroke in the text field, with the current value. */
53
58
  bsInput;
54
59
  /** Fires when the primary action button is clicked while `state="idle"`. */
@@ -62,6 +67,15 @@ const BsComposer = class {
62
67
  /** Fires when the mic/stop-recording button is clicked. The consumer decides what that means
63
68
  * (e.g. start recording when idle/generating, or stop recording when `state="recording"`). */
64
69
  bsMicToggle;
70
+ /** Computes the initial `hasAttachments` state directly from the host's light DOM children,
71
+ * before first render -- same reasoning as `bs-attachment`'s `componentWillLoad`: `slotchange`
72
+ * alone never fires for a slot that starts out empty and stays that way. */
73
+ componentWillLoad() {
74
+ this.hasAttachments = Array.from(this.el.childNodes).some(node => node.nodeType === Node.ELEMENT_NODE && node.getAttribute('slot') === 'attachments');
75
+ }
76
+ onAttachmentsSlotchange = (ev) => {
77
+ this.hasAttachments = ev.target.assignedNodes().length > 0;
78
+ };
65
79
  onInput = (ev) => {
66
80
  const value = ev.target.value;
67
81
  this.bsInput.emit(value);
@@ -101,7 +115,7 @@ const BsComposer = class {
101
115
  const placeholder = this.placeholder ?? DEFAULT_PLACEHOLDERS[this.variant];
102
116
  const disabled = this.state === 'disabled';
103
117
  const recording = this.state === 'recording';
104
- return (index.h("div", { key: '04c250520759948faa89bd625646a62c79cc6cee', class: `bs-composer bs-composer--${this.state} bs-composer--${this.variant}` }, index.h("div", { key: '8d5d99b90141d3dbeff1b31851cbbb5eaae3d920', class: "bs-composer__text-row" }, index.h("input", { key: '4eb1ef1b51a41de86da466c8a2c9ea93a7746b43', part: "input", class: "bs-composer__input", type: "text", value: this.value, placeholder: placeholder, disabled: disabled, "aria-label": this.ariaLabel, onInput: this.onInput })), index.h("div", { key: '8a733762c56ae3f4de7f2af1d89fb05d521b1d17', class: "bs-composer__controls-row" }, index.h("button", { key: 'b4cd13546ec447f2650a02f43dc2fc0b6d65c8ef', type: "button", part: "attach", class: "bs-composer__attach", "aria-label": "Attach", onClick: this.onAttachClick }, index.h(PlusIcon, { key: 'af8da06a2550d5c37d3737b145ad70c006e1ce66' })), recording ? (index.h("span", { class: "bs-composer__waveform", "aria-hidden": "true" }, WAVEFORM_BAR_HEIGHTS.map(height => (index.h("span", { class: "bs-composer__waveform-bar", style: { '--bs-composer-bar-height': `${height}px` } }))))) : (index.h("span", { class: "bs-composer__spacer" })), index.h("button", { key: '18b81bf7dd6057c3954566cd12994bb8589ff4ee', type: "button", part: "mic", class: `bs-composer__mic ${recording ? 'bs-composer__mic--recording' : ''}`, "aria-label": recording ? 'Stop recording' : 'Start voice input', disabled: disabled, onClick: this.onMicClick }, recording ? index.h(StopIcon, null) : index.h(MicIcon, null)), index.h("button", { key: 'a1cf9435fa7dc8e52db7ae148e07fde06971f27c', type: "button", part: "action", class: `bs-composer__action bs-composer__action--${this.state}`, "aria-label": this.actionLabel(), disabled: disabled, onClick: this.onActionClick }, this.renderActionIcon()), index.h("slot", { key: '6779413b48314161a75ec75be273e72fe4d622c3', name: "actions-end" }))));
118
+ return (index.h("div", { key: '5b367f64f2cfe04d7815b52d6abc3baebf46453e', class: `bs-composer bs-composer--${this.state} bs-composer--${this.variant}` }, index.h("div", { key: 'f1e7dbeb16e8f2cd0b4e2345f6c5fc03bcc5177c', part: "attachments", class: `bs-composer__attachments-row ${this.hasAttachments ? 'bs-composer__attachments-row--visible' : ''}` }, index.h("slot", { key: '6e59f2f3857c81a132c5873d9a32dbed27eb2c02', name: "attachments", onSlotchange: this.onAttachmentsSlotchange })), index.h("div", { key: '79a0a03a7f66b654f5ab8379447cf00459c7a6c3', class: "bs-composer__text-row" }, index.h("input", { key: 'b9560af8433d186fdadd5b05368290d077c5e8ce', part: "input", class: "bs-composer__input", type: "text", value: this.value, placeholder: placeholder, disabled: disabled, "aria-label": this.ariaLabel, onInput: this.onInput })), index.h("div", { key: '5b9a8edd0412e1a86efd33afae37fb73559a89f6', class: "bs-composer__controls-row" }, index.h("button", { key: '5c405e009e9f61902ca6623e09efa238e71737a3', type: "button", part: "attach", class: "bs-composer__attach", "aria-label": "Attach", onClick: this.onAttachClick }, index.h(PlusIcon, { key: '5832b29579d3c8c855237f286366944aeb6553f6' })), recording ? (index.h("span", { class: "bs-composer__waveform", "aria-hidden": "true" }, WAVEFORM_BAR_HEIGHTS.map(height => (index.h("span", { class: "bs-composer__waveform-bar", style: { '--bs-composer-bar-height': `${height}px` } }))))) : (index.h("span", { class: "bs-composer__spacer" })), index.h("button", { key: 'b4006fe5d452d02d0093d1dba0b65e6f33e5a65b', type: "button", part: "mic", class: `bs-composer__mic ${recording ? 'bs-composer__mic--recording' : ''}`, "aria-label": recording ? 'Stop recording' : 'Start voice input', disabled: disabled, onClick: this.onMicClick }, recording ? index.h(StopIcon, null) : index.h(MicIcon, null)), index.h("button", { key: 'b647f1dd0c40dc795b96da5cad695300b0c9dfd3', type: "button", part: "action", class: `bs-composer__action bs-composer__action--${this.state}`, "aria-label": this.actionLabel(), disabled: disabled, onClick: this.onActionClick }, this.renderActionIcon()), index.h("slot", { key: '2c78b5641091024925e84ca1a779ac1fc37fc0ae', name: "actions-end" }))));
105
119
  }
106
120
  static get delegatesFocus() { return true; }
107
121
  };
@@ -43,11 +43,11 @@ const BsDataTable = class {
43
43
  this.bsRowSelect.emit({ id: row.id, selected });
44
44
  };
45
45
  render() {
46
- return (index.h("table", { key: '8276a72f6539690dd8189cd29e42993c3d61862c', part: "table", class: "bs-data-table" }, index.h("thead", { key: '2d3e42222eec0bcbe3d06f26f7a3ae53dd5ccdc0', part: "head" }, index.h("tr", { key: '45994ea59d9a1a347bb8abdf25d7b1b919822a61' }, this.selectable && index.h("th", { key: '05d5efa74feee1545e1c4b9dfc45acd7ffd10e6a', class: "bs-data-table__select-col" }), this.columns.map(column => {
46
+ return (index.h("table", { key: '9b16ade44ff85120e9629722de8e8c1738835c1b', part: "table", class: "bs-data-table" }, index.h("thead", { key: '644eed606e68782ada42c289bb7bfc8d6de4affb', part: "head" }, index.h("tr", { key: '4e4ea75018796c77f14703c1c1402022f8c8cde9' }, this.selectable && index.h("th", { key: '85460f7c2eab6ad0f3604f72bcd81a4aa8699c03', class: "bs-data-table__select-col" }), this.columns.map(column => {
47
47
  const isSorted = this.sortColumn === column.key;
48
48
  const ariaSort = column.sortable ? (isSorted ? (this.sortDirection === 'asc' ? 'ascending' : 'descending') : 'none') : undefined;
49
49
  return (index.h("th", { part: "header-cell", class: "bs-data-table__header-cell", "aria-sort": ariaSort }, column.sortable ? (index.h("button", { type: "button", class: "bs-data-table__sort-button", onClick: () => this.onHeaderClick(column) }, column.label, isSorted && index.h("span", { class: "bs-data-table__sort-indicator" }, this.sortDirection === 'asc' ? ' ▲' : ' ▼'))) : (column.label)));
50
- }))), index.h("tbody", { key: '9c1dc006341b63e5d22df655836f326ba27e7b9d', part: "body" }, this.rows.map(row => (index.h("tr", { part: "row", class: "bs-data-table__row" }, this.selectable && (index.h("td", { class: "bs-data-table__select-col" }, index.h("input", { type: "checkbox", checked: this.selectedIds.has(row.id), onChange: ev => this.onRowCheckboxChange(row, ev) }))), this.columns.map(column => this.cellRenderer ? (
50
+ }))), index.h("tbody", { key: '024cb8a25cc6471e7074d119b78e6a8e22f86450', part: "body" }, this.rows.map(row => (index.h("tr", { part: "row", class: "bs-data-table__row" }, this.selectable && (index.h("td", { class: "bs-data-table__select-col" }, index.h("input", { type: "checkbox", checked: this.selectedIds.has(row.id), onChange: ev => this.onRowCheckboxChange(row, ev) }))), this.columns.map(column => this.cellRenderer ? (
51
51
  // cellRenderer is a developer-supplied, trusted function (JS-property-only, never
52
52
  // derived from untrusted input) -- its HTML output is intentionally not escaped,
53
53
  // same trust model as React's dangerouslySetInnerHTML.