@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
@@ -1,15 +1,22 @@
1
- import { r as registerInstance, c as createEvent, h } from './index-nLORuTUY.js';
1
+ import { r as registerInstance, c as createEvent, a as getElement, h } from './index-nLORuTUY.js';
2
2
 
3
- const bsInputCss = () => `:host{display:block}.bs-input{display:flex;flex-direction:column;gap:var(--bs-spacing-100);font-family:inherit}.bs-input__label{font-size:var(--bs-font-size-sm);font-weight:var(--bs-font-weight-medium);color:var(--bs-input-label)}.bs-input__control{height:var(--bs-spacing-600);padding:0 var(--bs-spacing-300);border:1px solid var(--bs-input-border-default);border-radius:var(--bs-border-radius-100);background:var(--bs-input-bg-default);color:var(--bs-input-text);font-size:var(--bs-font-size-md);font-family:inherit}.bs-input__control::placeholder{color:var(--bs-input-placeholder)}.bs-input__control:hover:not(:disabled){border-color:var(--bs-input-border-hover)}.bs-input__control:focus-visible{outline:none;border-color:var(--bs-input-border-focus)}.bs-input__control:disabled{background:var(--bs-input-bg-disabled);color:var(--bs-input-text-disabled);cursor:not-allowed}.bs-input--error .bs-input__control{border-color:var(--bs-input-border-error)}.bs-input--error .bs-input__label{color:var(--bs-input-label)}.bs-input__description{font-size:var(--bs-font-size-xs);color:var(--bs-input-description)}.bs-input__error{font-size:var(--bs-font-size-xs);color:var(--bs-input-error)}`;
3
+ const bsInputCss = () => `:host{display:block;--bs-input-radius:var(--bs-border-radius-100);--bs-input-height:var(--bs-spacing-600);--bs-input-padding-x:var(--bs-spacing-150);--bs-input-padding-y:var(--bs-spacing-100);--bs-input-gap:var(--bs-spacing-200);--bs-input-icon-size:var(--bs-spacing-300);--bs-input-stack-gap:var(--bs-spacing-50);--bs-input-error-icon-size:var(--bs-spacing-250);--bs-input-field-bg:var(--bs-input-bg-default);--bs-input-field-bg-disabled:var(--bs-input-bg-disabled);--bs-input-field-border:var(--bs-input-border-default);--bs-input-field-border-hover:var(--bs-input-border-hover);--bs-input-field-border-focus:var(--bs-input-border-focus);--bs-input-field-border-error:var(--bs-input-border-error);--bs-input-field-text:var(--bs-input-text);--bs-input-field-placeholder:var(--bs-input-placeholder);--bs-input-label-color:var(--bs-input-label);--bs-input-description-color:var(--bs-input-description);--bs-input-error-color:var(--bs-input-error);--bs-input-icon-color:var(--bs-icon-muted);--bs-input-icon-color-error:var(--bs-input-icon-error);--bs-input-icon-color-disabled:var(--bs-input-icon-disabled);--bs-input-chip-bg:var(--bs-input-bg-disabled);--bs-input-chip-text:var(--bs-input-text)}.bs-input{display:flex;flex-direction:column;gap:var(--bs-input-stack-gap);font-family:inherit}.bs-input__label{font-size:var(--bs-font-size-sm);font-weight:var(--bs-font-weight-medium);color:var(--bs-input-label-color)}.bs-input__required{color:var(--bs-input-error-color);margin-left:2px}.bs-input__field{box-sizing:border-box;display:flex;align-items:center;gap:var(--bs-input-gap);height:var(--bs-input-height);padding:var(--bs-input-padding-y) var(--bs-input-padding-x);border:1px solid var(--bs-input-field-border);border-radius:var(--bs-input-radius);background:var(--bs-input-field-bg)}.bs-input__field:hover:not(.bs-input__field--disabled){border-color:var(--bs-input-field-border-hover)}.bs-input__field:focus-within{border-color:var(--bs-input-field-border-focus)}.bs-input__field--error{border-color:var(--bs-input-field-border-error)}.bs-input__field--disabled{background:var(--bs-input-field-bg-disabled);cursor:not-allowed}.bs-input__control{flex:1;min-width:0;border:none;outline:none;padding:0;background:transparent;color:var(--bs-input-field-text);font-size:var(--bs-font-size-md);font-family:inherit}.bs-input__control::placeholder{color:var(--bs-input-field-placeholder)}.bs-input__control:disabled{color:var(--bs-input-text-disabled);cursor:not-allowed}.bs-input__control::-webkit-strong-password-auto-fill-button,.bs-input__control::-webkit-credentials-auto-fill-button{display:none !important;visibility:hidden;pointer-events:none;position:absolute;right:0}.bs-input__control::-webkit-textfield-decoration-container{visibility:hidden}.bs-input__control::-ms-reveal,.bs-input__control::-ms-clear{display:none}.bs-input--error .bs-input__label{color:var(--bs-input-label-color)}.bs-input__icon,.bs-input__end-icon{display:none;align-items:center;flex-shrink:0;color:var(--bs-input-icon-color)}.bs-input__icon--visible,.bs-input__end-icon--visible{display:flex}.bs-input__icon ::slotted(*),.bs-input__end-icon ::slotted(*){display:block;width:var(--bs-input-icon-size);height:var(--bs-input-icon-size)}.bs-input__field--error .bs-input__icon,.bs-input__field--error .bs-input__end-icon{color:var(--bs-input-icon-color-error)}.bs-input__field--disabled .bs-input__icon,.bs-input__field--disabled .bs-input__end-icon{color:var(--bs-input-icon-color-disabled)}.bs-input__description{font-size:var(--bs-font-size-xs);color:var(--bs-input-description-color)}.bs-input__error{display:flex;align-items:center;gap:var(--bs-input-stack-gap);font-size:var(--bs-font-size-xs);color:var(--bs-input-error-color)}.bs-input__error-icon{flex-shrink:0;width:var(--bs-input-error-icon-size);height:var(--bs-input-error-icon-size)}.bs-input__field--textarea{height:auto;align-items:flex-start}.bs-input__control--textarea{resize:vertical}.bs-input__stepper{display:flex;flex-direction:column}.bs-input__stepper-btn{display:flex;align-items:center;justify-content:center;border:none;background:transparent;color:inherit;padding:0;cursor:pointer}.bs-input__stepper-btn:disabled{cursor:not-allowed}.bs-input__password-toggle{display:flex;align-items:center;justify-content:center;border:none;background:transparent;color:inherit;padding:0;cursor:pointer;width:var(--bs-input-icon-size);height:var(--bs-input-icon-size)}.bs-input__password-toggle:disabled{cursor:not-allowed}.bs-input__password-toggle svg{width:100%;height:100%}.bs-input__chevron{width:var(--bs-input-icon-size);height:var(--bs-input-icon-size)}.bs-input__field-wrapper{position:relative;width:100%}.bs-input__dropdown-menu{position:absolute;top:calc(100% + var(--bs-input-stack-gap));left:0;right:0;z-index:1}.bs-input__calendar{width:var(--bs-input-icon-size);height:var(--bs-input-icon-size)}.bs-input__search-icon{width:var(--bs-input-icon-size);height:var(--bs-input-icon-size)}.bs-input__field--chip{flex-wrap:wrap;height:auto;min-height:var(--bs-input-height)}.bs-input__chips{display:flex;flex-wrap:wrap;align-items:center;gap:var(--bs-spacing-100);flex:1;min-width:0}.bs-input__chip{display:inline-flex;align-items:center;gap:4px;background:var(--bs-input-chip-bg);color:var(--bs-input-chip-text);border-radius:var(--bs-input-radius);padding:2px 6px;font-size:var(--bs-font-size-sm)}.bs-input__chip-remove{border:none;background:transparent;color:inherit;cursor:pointer;padding:0;line-height:1}.bs-input__chip-input{flex:1;min-width:60px}.bs-input__title-select,.bs-input__country-select{flex-shrink:0;width:auto;border:none;outline:none;background:transparent;color:var(--bs-input-field-text);font-size:var(--bs-font-size-md);font-family:inherit}.bs-input__field--pin{border:none;padding:0;background:transparent;gap:var(--bs-input-gap)}.bs-input__pin-cell{box-sizing:border-box;width:var(--bs-input-height);height:var(--bs-input-height);text-align:center;border:1px solid var(--bs-input-field-border);border-radius:var(--bs-input-radius);background:var(--bs-input-field-bg);color:var(--bs-input-field-text);font-size:var(--bs-font-size-md);font-family:inherit;outline:none}.bs-input__pin-cell:focus{border-color:var(--bs-input-field-border-focus)}.bs-input__field--pin.bs-input__field--disabled .bs-input__pin-cell{background:var(--bs-input-field-bg-disabled);cursor:not-allowed}`;
4
4
 
5
5
  const BsInput = class {
6
6
  constructor(hostRef) {
7
7
  registerInstance(this, hostRef);
8
8
  this.bsInput = createEvent(this, "bsInput");
9
9
  this.bsChange = createEvent(this, "bsChange");
10
+ this.bsOpen = createEvent(this, "bsOpen");
11
+ this.bsChipAdd = createEvent(this, "bsChipAdd");
12
+ this.bsChipRemove = createEvent(this, "bsChipRemove");
13
+ this.bsTitleChange = createEvent(this, "bsTitleChange");
14
+ this.bsCountryChange = createEvent(this, "bsCountryChange");
10
15
  }
16
+ get el() { return getElement(this); }
11
17
  /** Current value. Native `input`/`change` events don't cross the Shadow DOM boundary, so this
12
- * component re-dispatches them as `bsInput`/`bsChange` custom events instead. */
18
+ * component re-dispatches them as `bsInput`/`bsChange` custom events instead. Mutable so the
19
+ * `number` type's stepper buttons can update it directly. */
13
20
  value = '';
14
21
  type = 'text';
15
22
  label;
@@ -17,8 +24,83 @@ const BsInput = class {
17
24
  description;
18
25
  error;
19
26
  disabled = false;
27
+ /** Marks the field as required: renders a red `*` after the label and sets `aria-required="true"`
28
+ * on the control. Applies regardless of `type`. */
29
+ required = false;
30
+ /** Step size for `type="number"`'s increment/decrement stepper buttons. */
31
+ step = 1;
32
+ /** Minimum value for `type="number"`'s stepper buttons. */
33
+ min;
34
+ /** Maximum value for `type="number"`'s stepper buttons. */
35
+ max;
36
+ /** Options for `type="select"` (rendered as native `<option>`s) and `type="dropdown"` (rendered
37
+ * as a `bs-menu` of `bs-menu-item`s when `open`). Must be set as a JS property, not an HTML
38
+ * attribute -- see CONVENTIONS.md's non-string props rule. */
39
+ options = [];
40
+ /** Number of visible rows for `type="textarea"`. */
41
+ rows = 3;
42
+ /** Current chips for `type="chip"`. Must be set as a JS property, not an HTML attribute -- see
43
+ * CONVENTIONS.md's non-string props rule. */
44
+ chips = [];
45
+ /** Title select options for `type="initials"` (e.g. `['Mrs.', 'Mr.', 'Dr.']`). Must be set as a
46
+ * JS property, not an HTML attribute -- see CONVENTIONS.md's non-string props rule. */
47
+ titleOptions = [];
48
+ /** Current selected title for `type="initials"`. Named `initialsTitle` rather than `title` --
49
+ * `title` is a reserved standard HTML attribute (tooltip text) inherited by every element, and
50
+ * Stencil warns against shadowing it with a component `@Prop`. */
51
+ initialsTitle = '';
52
+ /** Country select options for `type="country"`. Must be set as a JS property, not an HTML
53
+ * attribute -- see CONVENTIONS.md's non-string props rule. */
54
+ countryOptions = [];
55
+ /** Current selected country code for `type="country"`. */
56
+ country = '';
57
+ /** Number of cells for `type="pin"`. */
58
+ length = 4;
59
+ /** Whether the `type="dropdown"` trigger is open. Reflects to an attribute so consumers can style
60
+ * an open state via CSS. When `options` is non-empty, this also controls whether the `bs-menu`
61
+ * of `bs-menu-item`s is rendered below the field. */
62
+ open = false;
20
63
  bsInput;
21
64
  bsChange;
65
+ /** Emitted when `type="dropdown"`'s trigger is toggled. See `open`'s doc comment for this type's
66
+ * shell-only limitation. */
67
+ bsOpen;
68
+ /** Emitted when a chip is committed (Enter pressed in the draft input) for `type="chip"`. */
69
+ bsChipAdd;
70
+ /** Emitted when a chip's remove button is clicked for `type="chip"`. */
71
+ bsChipRemove;
72
+ /** Emitted when the title `<select>` changes for `type="initials"`. */
73
+ bsTitleChange;
74
+ /** Emitted when the country `<select>` changes for `type="country"`. */
75
+ bsCountryChange;
76
+ /** Tracks whether the `icon` slot has assigned content, so the leading icon wrapper only takes
77
+ * up space in the field when there's actually an icon (same pattern as `bs-button`). */
78
+ hasIcon = false;
79
+ /** Tracks whether the `end-icon` slot has assigned content, so the trailing icon wrapper only
80
+ * takes up space in the field when there's actually a trailing icon. */
81
+ hasEndIcon = false;
82
+ /** Whether `type="password"`'s native input is currently rendered as `type="text"` (revealed). The
83
+ * `type` prop itself stays `'password'` -- this only toggles the rendered native input's type. */
84
+ passwordVisible = false;
85
+ /** Draft text for `type="chip"`'s trailing input, committed to a chip on Enter. */
86
+ chipDraft = '';
87
+ pinInputs = [];
88
+ /** Computes the initial `hasIcon`/`hasEndIcon` state directly from the host's light DOM
89
+ * children, before first render -- see `bs-button`'s `componentWillLoad` for why `slotchange`
90
+ * alone isn't enough for a slot that starts (and stays) empty. */
91
+ componentWillLoad() {
92
+ this.hasIcon = this.hasSlottedContent('icon');
93
+ this.hasEndIcon = this.hasSlottedContent('end-icon');
94
+ }
95
+ hasSlottedContent(slotName) {
96
+ return Array.from(this.el.childNodes).some(node => node.nodeType === Node.ELEMENT_NODE && node.getAttribute('slot') === slotName);
97
+ }
98
+ onIconSlotchange = (ev) => {
99
+ this.hasIcon = ev.target.assignedNodes().length > 0;
100
+ };
101
+ onEndIconSlotchange = (ev) => {
102
+ this.hasEndIcon = ev.target.assignedNodes().length > 0;
103
+ };
22
104
  onInput = (ev) => {
23
105
  const value = ev.target.value;
24
106
  this.bsInput.emit(value);
@@ -27,11 +109,195 @@ const BsInput = class {
27
109
  const value = ev.target.value;
28
110
  this.bsChange.emit(value);
29
111
  };
112
+ clampNumber(n) {
113
+ if (this.min !== undefined && n < this.min)
114
+ n = this.min;
115
+ if (this.max !== undefined && n > this.max)
116
+ n = this.max;
117
+ return n;
118
+ }
119
+ onStepperIncrement = () => {
120
+ if (this.disabled)
121
+ return;
122
+ const next = this.clampNumber((parseFloat(this.value) || 0) + this.step);
123
+ this.value = String(next);
124
+ this.bsChange.emit(this.value);
125
+ };
126
+ onStepperDecrement = () => {
127
+ if (this.disabled)
128
+ return;
129
+ const next = this.clampNumber((parseFloat(this.value) || 0) - this.step);
130
+ this.value = String(next);
131
+ this.bsChange.emit(this.value);
132
+ };
133
+ onTogglePasswordVisibility = () => {
134
+ this.passwordVisible = !this.passwordVisible;
135
+ };
136
+ onDropdownToggle = () => {
137
+ if (this.disabled)
138
+ return;
139
+ this.open = !this.open;
140
+ this.bsOpen.emit(this.open);
141
+ };
142
+ onDropdownKeydown = (ev) => {
143
+ if (ev.key === 'Enter' || ev.key === ' ') {
144
+ ev.preventDefault();
145
+ this.onDropdownToggle();
146
+ }
147
+ };
148
+ onDropdownOptionSelect = (option) => () => {
149
+ this.value = option.label;
150
+ this.open = false;
151
+ this.bsChange.emit(this.value);
152
+ };
153
+ /** Closes the `type="dropdown"` menu on Escape, from anywhere within the component (host is the
154
+ * default @Listen target, and both keydown from the native control and from `bs-menu-item`
155
+ * buttons bubble/compose up to it). */
156
+ onHostKeydown(ev) {
157
+ if (this.type === 'dropdown' && this.open && ev.key === 'Escape') {
158
+ this.open = false;
159
+ }
160
+ }
161
+ /** Closes the `type="dropdown"` menu once focus leaves the component entirely (e.g. Tab away, or
162
+ * a click outside that moves focus elsewhere) -- `focusout` is composed, so it bubbles across
163
+ * the `bs-menu-item` shadow boundary too. */
164
+ onHostFocusOut(ev) {
165
+ if (this.type !== 'dropdown' || !this.open)
166
+ return;
167
+ const related = ev.relatedTarget;
168
+ if (!related || !this.el.contains(related)) {
169
+ this.open = false;
170
+ }
171
+ }
172
+ onChipDraftInput = (ev) => {
173
+ this.chipDraft = ev.target.value;
174
+ };
175
+ onChipDraftKeydown = (ev) => {
176
+ if (ev.key === 'Enter') {
177
+ ev.preventDefault();
178
+ const value = this.chipDraft.trim();
179
+ if (value) {
180
+ this.bsChipAdd.emit(value);
181
+ this.chipDraft = '';
182
+ }
183
+ }
184
+ };
185
+ onChipRemove = (chip) => () => {
186
+ this.bsChipRemove.emit(chip);
187
+ };
188
+ onTitleChange = (ev) => {
189
+ this.bsTitleChange.emit(ev.target.value);
190
+ };
191
+ onCountryChange = (ev) => {
192
+ this.bsCountryChange.emit(ev.target.value);
193
+ };
194
+ onPinInput = (index) => (ev) => {
195
+ const input = ev.target;
196
+ let value = input.value;
197
+ if (value.length > 1) {
198
+ value = value.slice(-1);
199
+ input.value = value;
200
+ }
201
+ if (value && index < this.length - 1) {
202
+ this.pinInputs[index + 1]?.focus();
203
+ }
204
+ this.bsChange.emit(this.pinInputs.map(i => i?.value ?? '').join(''));
205
+ };
206
+ onPinKeydown = (index) => (ev) => {
207
+ if (ev.key === 'Backspace' && !ev.target.value && index > 0) {
208
+ this.pinInputs[index - 1]?.focus();
209
+ }
210
+ };
211
+ get showsEndIconArea() {
212
+ return (this.type === 'number' || this.type === 'password' || this.type === 'dropdown' || this.type === 'date' || this.hasEndIcon);
213
+ }
214
+ get showsIconArea() {
215
+ return (this.type === 'search' && !this.hasIcon) || this.hasIcon;
216
+ }
217
+ renderIconContent() {
218
+ if (this.type === 'search' && !this.hasIcon) {
219
+ return (h("svg", { class: "bs-input__search-icon", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true" }, h("circle", { cx: "7", cy: "7", r: "5", stroke: "currentColor", "stroke-width": "1.3" }), h("path", { d: "M11 11L14.5 14.5", stroke: "currentColor", "stroke-width": "1.3", "stroke-linecap": "round" })));
220
+ }
221
+ return h("slot", { name: "icon", onSlotchange: this.onIconSlotchange });
222
+ }
223
+ renderEndIconContent() {
224
+ if (this.type === 'number') {
225
+ return (h("span", { class: "bs-input__stepper" }, h("button", { type: "button", part: "control", class: "bs-input__stepper-btn", "aria-label": "Increment", tabIndex: -1, disabled: this.disabled, onClick: this.onStepperIncrement }, h("svg", { viewBox: "0 0 10 6", width: "10", height: "6", "aria-hidden": "true" }, h("path", { d: "M1 5L5 1L9 5", stroke: "currentColor", "stroke-width": "1.3", fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }))), h("button", { type: "button", part: "control", class: "bs-input__stepper-btn", "aria-label": "Decrement", tabIndex: -1, disabled: this.disabled, onClick: this.onStepperDecrement }, h("svg", { viewBox: "0 0 10 6", width: "10", height: "6", "aria-hidden": "true" }, h("path", { d: "M1 1L5 5L9 1", stroke: "currentColor", "stroke-width": "1.3", fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" })))));
226
+ }
227
+ if (this.type === 'password') {
228
+ return (h("button", { type: "button", part: "control", class: "bs-input__password-toggle", "aria-label": this.passwordVisible ? 'Hide password' : 'Show password', disabled: this.disabled, onClick: this.onTogglePasswordVisibility }, this.passwordVisible ? (h("svg", { viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true" }, h("path", { d: "M1 8C2.2 5.5 4.9 3 8 3C11.1 3 13.8 5.5 15 8C13.8 10.5 11.1 13 8 13C4.9 13 2.2 10.5 1 8Z", stroke: "currentColor", "stroke-width": "1.2", "stroke-linejoin": "round" }), h("circle", { cx: "8", cy: "8", r: "2", stroke: "currentColor", "stroke-width": "1.2" }), h("path", { d: "M2 2L14 14", stroke: "currentColor", "stroke-width": "1.2", "stroke-linecap": "round" }))) : (h("svg", { viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true" }, h("path", { d: "M1 8C2.2 5.5 4.9 3 8 3C11.1 3 13.8 5.5 15 8C13.8 10.5 11.1 13 8 13C4.9 13 2.2 10.5 1 8Z", stroke: "currentColor", "stroke-width": "1.2", "stroke-linejoin": "round" }), h("circle", { cx: "8", cy: "8", r: "2", stroke: "currentColor", "stroke-width": "1.2" })))));
229
+ }
230
+ if (this.type === 'dropdown') {
231
+ return (h("svg", { class: "bs-input__chevron", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true" }, h("path", { d: "M4 6L8 10L12 6", stroke: "currentColor", "stroke-width": "1.3", "stroke-linecap": "round", "stroke-linejoin": "round" })));
232
+ }
233
+ if (this.type === 'date' && !this.hasEndIcon) {
234
+ return (h("svg", { class: "bs-input__calendar", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true" }, h("rect", { x: "2", y: "3", width: "12", height: "11", rx: "1", stroke: "currentColor", "stroke-width": "1.2" }), h("path", { d: "M2 6.5H14", stroke: "currentColor", "stroke-width": "1.2" }), h("path", { d: "M5 1.5V4M11 1.5V4", stroke: "currentColor", "stroke-width": "1.2", "stroke-linecap": "round" })));
235
+ }
236
+ return h("slot", { name: "end-icon", onSlotchange: this.onEndIconSlotchange });
237
+ }
238
+ renderStandardControl() {
239
+ const nativeType = this.type === 'password' ? (this.passwordVisible ? 'text' : 'password') : this.type === 'dropdown' ? 'text' : this.type;
240
+ return (h("input", { id: "control", part: "control", class: "bs-input__control", type: nativeType, value: this.value, placeholder: this.placeholder, disabled: this.disabled, readOnly: this.type === 'dropdown', min: this.type === 'number' ? this.min : undefined, max: this.type === 'number' ? this.max : undefined, step: this.type === 'number' ? this.step : undefined, "aria-describedby": this.error || this.description ? 'description-or-error' : undefined, "aria-invalid": this.error ? 'true' : undefined, "aria-required": this.required ? 'true' : undefined, onInput: this.onInput, onChange: this.onChange }));
241
+ }
242
+ renderSelectControl() {
243
+ return (h("select", { id: "control", part: "control", class: "bs-input__control", disabled: this.disabled, "aria-describedby": this.error || this.description ? 'description-or-error' : undefined, "aria-invalid": this.error ? 'true' : undefined, "aria-required": this.required ? 'true' : undefined, onInput: this.onInput, onChange: this.onChange }, this.options.map(opt => (h("option", { value: opt.value, selected: opt.value === this.value }, opt.label)))));
244
+ }
245
+ renderTextareaControl() {
246
+ return (h("textarea", { id: "control", part: "control", class: "bs-input__control bs-input__control--textarea", rows: this.rows, value: this.value, placeholder: this.placeholder, disabled: this.disabled, "aria-describedby": this.error || this.description ? 'description-or-error' : undefined, "aria-invalid": this.error ? 'true' : undefined, "aria-required": this.required ? 'true' : undefined, onInput: this.onInput, onChange: this.onChange }));
247
+ }
248
+ renderChipControl() {
249
+ return (h("div", { class: "bs-input__chips" }, this.chips.map(chip => (h("span", { part: "chip", class: "bs-input__chip" }, chip, h("button", { type: "button", class: "bs-input__chip-remove", "aria-label": `Remove ${chip}`, onClick: this.onChipRemove(chip) }, "\u00D7")))), h("input", { id: "control", part: "control", class: "bs-input__control bs-input__chip-input", type: "text", value: this.chipDraft, placeholder: this.placeholder, disabled: this.disabled, "aria-required": this.required ? 'true' : undefined, onInput: this.onChipDraftInput, onKeyDown: this.onChipDraftKeydown })));
250
+ }
251
+ renderInitialsControl() {
252
+ return [
253
+ h("select", { part: "control", class: "bs-input__control bs-input__title-select", disabled: this.disabled, onChange: this.onTitleChange }, this.titleOptions.map(opt => (h("option", { value: opt, selected: opt === this.initialsTitle }, opt)))),
254
+ h("input", { id: "control", part: "control", class: "bs-input__control", type: "text", value: this.value, placeholder: this.placeholder, disabled: this.disabled, "aria-required": this.required ? 'true' : undefined, onInput: this.onInput, onChange: this.onChange }),
255
+ ];
256
+ }
257
+ renderCountryControl() {
258
+ return [
259
+ h("select", { part: "control", class: "bs-input__control bs-input__country-select", disabled: this.disabled, onChange: this.onCountryChange }, this.countryOptions.map(opt => (h("option", { value: opt.code, selected: opt.code === this.country }, opt.flagIcon ? `${opt.flagIcon} ` : '', opt.code, " ", opt.label)))),
260
+ h("input", { id: "control", part: "control", class: "bs-input__control", type: "text", value: this.value, placeholder: this.placeholder, disabled: this.disabled, "aria-required": this.required ? 'true' : undefined, onInput: this.onInput, onChange: this.onChange }),
261
+ ];
262
+ }
263
+ renderControl() {
264
+ switch (this.type) {
265
+ case 'select':
266
+ return this.renderSelectControl();
267
+ case 'textarea':
268
+ return this.renderTextareaControl();
269
+ case 'chip':
270
+ return this.renderChipControl();
271
+ case 'initials':
272
+ return this.renderInitialsControl();
273
+ case 'country':
274
+ return this.renderCountryControl();
275
+ default:
276
+ return this.renderStandardControl();
277
+ }
278
+ }
279
+ renderField() {
280
+ const fieldClasses = [
281
+ 'bs-input__field',
282
+ this.error ? 'bs-input__field--error' : '',
283
+ this.disabled ? 'bs-input__field--disabled' : '',
284
+ this.type === 'textarea' ? 'bs-input__field--textarea' : '',
285
+ this.type === 'chip' ? 'bs-input__field--chip' : '',
286
+ ]
287
+ .filter(Boolean)
288
+ .join(' ');
289
+ const isDropdown = this.type === 'dropdown';
290
+ return (h("div", { class: "bs-input__field-wrapper" }, h("div", { part: "field", class: fieldClasses, onClick: isDropdown ? this.onDropdownToggle : undefined, onKeyDown: isDropdown ? this.onDropdownKeydown : undefined, "aria-haspopup": isDropdown ? 'listbox' : undefined, "aria-expanded": isDropdown ? String(this.open) : undefined }, h("span", { part: "icon", class: `bs-input__icon ${this.showsIconArea ? 'bs-input__icon--visible' : ''}` }, this.renderIconContent()), this.renderControl(), h("span", { part: "end-icon", class: `bs-input__end-icon ${this.showsEndIconArea ? 'bs-input__end-icon--visible' : ''}` }, this.renderEndIconContent())), isDropdown && this.open && this.options.length > 0 && (h("bs-menu", { part: "menu", class: "bs-input__dropdown-menu", role: "listbox" }, this.options.map(option => (h("bs-menu-item", { key: option.value, onBsSelect: this.onDropdownOptionSelect(option) }, option.label)))))));
291
+ }
292
+ renderPinField() {
293
+ this.pinInputs = [];
294
+ return (h("div", { part: "field", class: `bs-input__field bs-input__field--pin ${this.disabled ? 'bs-input__field--disabled' : ''}` }, Array.from({ length: this.length }).map((_, i) => (h("input", { id: i === 0 ? 'control' : undefined, ref: el => (this.pinInputs[i] = el), part: "control", class: "bs-input__pin-cell", type: "text", inputMode: "numeric", maxLength: 1, value: this.value[i] ?? '', disabled: this.disabled, "aria-required": this.required ? 'true' : undefined, onInput: this.onPinInput(i), onKeyDown: this.onPinKeydown(i) })))));
295
+ }
30
296
  render() {
31
- return (h("div", { key: '2c6b38b4594ccde2536515fcd252831bacb6aaeb', class: `bs-input ${this.error ? 'bs-input--error' : ''}` }, this.label && (
297
+ return (h("div", { key: 'a929eee8f7b100f372763a259f5d5fed298c8dff', class: `bs-input ${this.error ? 'bs-input--error' : ''}` }, this.label && (
32
298
  // "control" is a fixed id, not a generated one -- safe because Shadow DOM scopes ids
33
299
  // to this instance's own shadow root, so it can never collide with another bs-input.
34
- h("label", { key: '9df0fae013470d8a77b0cc6288c8178b1ac62e0d', part: "label", class: "bs-input__label", htmlFor: "control" }, this.label)), h("input", { key: 'a6ddc857d33c4e51a4c64b422a7df5b6261f5180', id: "control", part: "control", class: "bs-input__control", type: this.type, value: this.value, placeholder: this.placeholder, disabled: this.disabled, "aria-describedby": this.error || this.description ? 'description-or-error' : undefined, "aria-invalid": this.error ? 'true' : undefined, onInput: this.onInput, onChange: this.onChange }), this.error ? (h("span", { id: "description-or-error", part: "error", class: "bs-input__error" }, this.error)) : this.description ? (h("span", { id: "description-or-error", part: "description", class: "bs-input__description" }, this.description)) : null));
300
+ h("label", { key: 'fba27eccc9a351caa58fd849aad54e9388de361c', part: "label", class: "bs-input__label", htmlFor: "control" }, this.label, this.required && (h("span", { key: 'd4852798433e75b6c4cac34a9fbc5f9c23c8925d', part: "required", class: "bs-input__required", "aria-hidden": "true" }, "*")))), this.type === 'pin' ? this.renderPinField() : this.renderField(), this.error ? (h("span", { id: "description-or-error", part: "error", class: "bs-input__error" }, h("svg", { part: "error-icon", class: "bs-input__error-icon", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true" }, h("circle", { cx: "8", cy: "8", r: "6.5", stroke: "currentColor", "stroke-width": "1.2" }), h("path", { d: "M8 5V8.5", stroke: "currentColor", "stroke-width": "1.2", "stroke-linecap": "round" }), h("circle", { cx: "8", cy: "11", r: "0.75", fill: "currentColor" })), this.error)) : this.description ? (h("span", { id: "description-or-error", part: "description", class: "bs-input__description" }, this.description)) : null));
35
301
  }
36
302
  static get delegatesFocus() { return true; }
37
303
  };
@@ -1,4 +1,16 @@
1
- import { r as registerInstance, c as createEvent, h } from './index-nLORuTUY.js';
1
+ import { r as registerInstance, h, c as createEvent } from './index-nLORuTUY.js';
2
+
3
+ const bsMenuCss = () => `:host{display:block;--bs-menu-bg:var(--bs-surface-raised);--bs-menu-radius:var(--bs-border-radius-100);--bs-menu-padding-y:var(--bs-spacing-50);--bs-menu-gap:var(--bs-spacing-50);--bs-menu-shadow:var(--bs-shadow-sm)}.bs-menu{box-sizing:border-box;display:flex;flex-direction:column;gap:var(--bs-menu-gap);background:var(--bs-menu-bg);border-radius:var(--bs-menu-radius);padding:var(--bs-menu-padding-y) 0;box-shadow:var(--bs-menu-shadow);font-family:inherit}`;
4
+
5
+ const BsMenu = class {
6
+ constructor(hostRef) {
7
+ registerInstance(this, hostRef);
8
+ }
9
+ render() {
10
+ return (h("div", { key: 'e49c52a18ea8c10399d818a00e0c6b748f0c9b8f', part: "list", class: "bs-menu", role: "menu" }, h("slot", { key: '7e8cef2af1a068d0ab31fc3aee0abf8b59645a08' })));
11
+ }
12
+ };
13
+ BsMenu.style = bsMenuCss();
2
14
 
3
15
  const bsMenuItemCss = () => `:host{display:block;--bs-menu-item-radius:var(--bs-border-radius-100);--bs-menu-item-padding-y:var(--bs-spacing-100);--bs-menu-item-padding-x:var(--bs-spacing-150);--bs-menu-item-gap:var(--bs-spacing-100);--bs-menu-item-hover:var(--bs-color-neutral-container);--bs-menu-item-pressed:var(--bs-color-neutral-container-pressed);--bs-menu-item-icon-color:var(--bs-icon-default);--bs-menu-item-color:var(--bs-text-muted);--bs-menu-item-font-size:var(--bs-font-size-md);--bs-menu-item-line-height:var(--bs-line-height-body-md)}.bs-menu-item{box-sizing:border-box;display:flex;align-items:center;width:100%;height:48px;border:none;cursor:pointer;background:transparent;color:var(--bs-menu-item-color);font-family:inherit;border-radius:var(--bs-menu-item-radius);padding:var(--bs-menu-item-padding-y) var(--bs-menu-item-padding-x);gap:var(--bs-menu-item-gap);transition:background-color var(--bs-duration-fast) var(--bs-easing-standard)}.bs-menu-item:focus-visible{outline:2px solid var(--bs-border-neutral-focus);outline-offset:2px}.bs-menu-item:hover{background:var(--bs-menu-item-hover)}.bs-menu-item:active{background:var(--bs-menu-item-pressed)}.bs-menu-item__icon{display:none;width:24px;height:24px;flex-shrink:0;color:var(--bs-menu-item-icon-color)}.bs-menu-item__icon--has-content{display:inline-flex;align-items:center;justify-content:center}.bs-menu-item__icon ::slotted(svg){width:24px;height:24px}.bs-menu-item__label{font-size:var(--bs-menu-item-font-size);line-height:calc(var(--bs-menu-item-line-height) * 1px);white-space:nowrap}`;
4
16
 
@@ -19,9 +31,9 @@ const BsMenuItem = class {
19
31
  this.bsSelect.emit();
20
32
  };
21
33
  render() {
22
- return (h("button", { key: '6083688b1903b514b0ed6a95a7ee2e64766a94f1', type: "button", part: "item", role: "menuitem", class: "bs-menu-item", onClick: this.onClick }, h("span", { key: '65f3df1d22c0e44ed77073de68ce36631b80a31e', part: "icon", class: `bs-menu-item__icon ${this.hasIcon ? 'bs-menu-item__icon--has-content' : ''}` }, h("slot", { key: 'a41d500967d857cc5e326194c422992aeab74055', name: "icon", onSlotchange: this.onIconSlotchange })), h("span", { key: 'ab17fb6fd7014b7ec74a2eb93de300812a610136', part: "label", class: "bs-menu-item__label" }, h("slot", { key: '9b41e86d17fecd71cfe0ff1e5c735aaa143a8d12' }))));
34
+ return (h("button", { key: 'dee92b0e122d1a1d100e950ac5b3a368a94d075b', type: "button", part: "item", role: "menuitem", class: "bs-menu-item", onClick: this.onClick }, h("span", { key: 'e4ce02b4df1ec40bf0f3f72bd1611816e8851909', part: "icon", class: `bs-menu-item__icon ${this.hasIcon ? 'bs-menu-item__icon--has-content' : ''}` }, h("slot", { key: '9e19fea7d90078577047b5aea0170c09d27fb340', name: "icon", onSlotchange: this.onIconSlotchange })), h("span", { key: '179ce497185c4f9f5bbd238bd0c781a189743ad1', part: "label", class: "bs-menu-item__label" }, h("slot", { key: 'dfe5de71a770cc9ff9847d8f687bba01ae9e1b1e' }))));
23
35
  }
24
36
  };
25
37
  BsMenuItem.style = bsMenuItemCss();
26
38
 
27
- export { BsMenuItem as bs_menu_item };
39
+ export { BsMenu as bs_menu, BsMenuItem as bs_menu_item };
@@ -0,0 +1,37 @@
1
+ import { r as registerInstance, c as createEvent, h } from './index-nLORuTUY.js';
2
+
3
+ const bsSourceLinkCss = () => `:host{display:block;--bs-source-link-radius:var(--bs-border-radius-150);--bs-source-link-padding:var(--bs-spacing-150);--bs-source-link-gap:var(--bs-spacing-50);--bs-source-link-icon-gap:var(--bs-spacing-75);--bs-source-link-hover:var(--bs-surface-hover);--bs-source-link-pressed:var(--bs-surface-pressed);--bs-source-link-focus:var(--bs-border-neutral-focus);--bs-source-link-filename-color:var(--bs-text-default);--bs-source-link-meta-color:var(--bs-text-secondary);--bs-source-link-icon-color:var(--bs-icon-default);--bs-source-link-dot-color:var(--bs-text-secondary)}.bs-source-link{box-sizing:border-box;display:flex;align-items:center;gap:var(--bs-source-link-gap);width:100%;padding:var(--bs-source-link-padding);background:none;border:none;border-radius:var(--bs-source-link-radius);font-family:inherit;text-align:left;text-decoration:none;cursor:pointer;transition:background-color var(--bs-duration-fast) var(--bs-easing-standard)}.bs-source-link:hover,.bs-source-link:focus-visible{background:var(--bs-source-link-hover)}.bs-source-link:active{background:var(--bs-source-link-pressed)}.bs-source-link:focus-visible{outline:2px solid var(--bs-source-link-focus);outline-offset:1px}.bs-source-link__icon{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;width:16px;height:16px;color:var(--bs-source-link-icon-color)}.bs-source-link__left{display:flex;flex:1 0 0;flex-direction:column;gap:2px;min-width:0}.bs-source-link__filename-row{display:flex;align-items:center;gap:var(--bs-source-link-icon-gap);width:100%}.bs-source-link__filename{margin:0;overflow:hidden;color:var(--bs-source-link-filename-color);font-size:var(--bs-font-size-md);font-weight:var(--bs-font-weight-semibold);line-height:var(--bs-line-height-normal);text-overflow:ellipsis;white-space:nowrap}.bs-source-link__meta{display:flex;align-items:center;gap:var(--bs-spacing-50);padding-left:22px}.bs-source-link__source,.bs-source-link__version{color:var(--bs-source-link-meta-color);font-size:var(--bs-font-size-sm);line-height:var(--bs-line-height-normal);white-space:nowrap}.bs-source-link__dot{width:4px;height:4px;border-radius:50%;background:var(--bs-source-link-dot-color);flex-shrink:0}.bs-source-link__arrow{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;width:24px;height:24px;color:var(--bs-source-link-icon-color)}`;
4
+
5
+ const BsSourceLink = class {
6
+ constructor(hostRef) {
7
+ registerInstance(this, hostRef);
8
+ this.bsOpen = createEvent(this, "bsOpen");
9
+ }
10
+ /** The cited document's filename. */
11
+ fileName = 'Source';
12
+ /** The system/app the document came from (e.g. "HoltePortalen"). */
13
+ sourceName;
14
+ /** The document's version label (e.g. "v3.2"). Omit if the source has no version. */
15
+ version;
16
+ /** If set, renders the row as a link that opens this URL; otherwise as a button that only emits `bsOpen`. */
17
+ href;
18
+ /** `target` used when `href` is set. */
19
+ target = '_blank';
20
+ /** Fires on click/activation, whether or not `href` is set -- lets the consuming app log or handle the open. */
21
+ bsOpen;
22
+ onClick = () => {
23
+ this.bsOpen.emit();
24
+ };
25
+ render() {
26
+ const inner = [
27
+ h("span", { key: '0e55cdcd04b7d6574835c1b5b21c20ad804fc36c', class: "bs-source-link__left" }, h("span", { key: '989f52e1b6b0a353470d65f5e3d75e40486b3842', class: "bs-source-link__filename-row" }, h("span", { key: 'e21ccdb9b78d4db3b18ca07039d61632b4390d80', part: "icon", class: "bs-source-link__icon" }, h("slot", { key: 'fe35c5c3084af9ddba25db3c46c2d8bbe7e927d0', name: "icon" }, h(FileTextIcon, { key: '5612acc39809cca4d483ab22f2e0b1cb95cdb2e8' }))), h("p", { key: '39d92f5e7e7a50e943ff9a85efd314df5a2abf0b', part: "filename", class: "bs-source-link__filename" }, this.fileName)), h("span", { key: 'd2eace60d67a344cd2bf522af38950fd3275bea2', class: "bs-source-link__meta" }, this.sourceName && (h("span", { key: 'd8d3fa79fa888db77ef44f402fd8747eb2cecad1', part: "source", class: "bs-source-link__source" }, this.sourceName)), this.sourceName && this.version && h("span", { key: '738770f5c4b091e59832100a17bda2f2d251ed75', class: "bs-source-link__dot", "aria-hidden": "true" }), this.version && (h("span", { key: '56fcf72b43eebb138745d212e8bcaa680f808cd0', part: "version", class: "bs-source-link__version" }, this.version)))),
28
+ h("span", { key: 'da453b51265f923c19505645cb33832c93863179', part: "arrow", class: "bs-source-link__arrow", "aria-hidden": "true" }, h(ArrowUpRightIcon, { key: 'c23d308322df780d109691f87945bb511461304f' })),
29
+ ];
30
+ return this.href ? (h("a", { class: "bs-source-link", href: this.href, target: this.target, rel: "noopener noreferrer", onClick: this.onClick }, inner)) : (h("button", { type: "button", class: "bs-source-link", onClick: this.onClick }, inner));
31
+ }
32
+ };
33
+ const FileTextIcon = () => (h("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, h("path", { d: "M9.5 1.5H4C3.73478 1.5 3.48043 1.60536 3.29289 1.79289C3.10536 1.98043 3 2.23478 3 2.5V13.5C3 13.7652 3.10536 14.0196 3.29289 14.2071C3.48043 14.3946 3.73478 14.5 4 14.5H12C12.2652 14.5 12.5196 14.3946 12.7071 14.2071C12.8946 14.0196 13 13.7652 13 13.5V5L9.5 1.5Z", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M9.5 1.5V5H13", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M5.5 8.5H10.5", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M5.5 11H10.5", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round" })));
34
+ const ArrowUpRightIcon = () => (h("svg", { width: "24", height: "24", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, h("path", { d: "M6.25 13.75L13.75 6.25", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M7.5 6.25H13.75V12.5", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" })));
35
+ BsSourceLink.style = bsSourceLinkCss();
36
+
37
+ export { BsSourceLink as bs_source_link };
@@ -14,7 +14,7 @@ const BsTooltip = class {
14
14
  */
15
15
  placement = 'top';
16
16
  render() {
17
- return (h("div", { key: '784b59f0a817e4756e7954588cd5e42a52508262', class: "bs-tooltip" }, h("span", { key: 'b564933fb13a90ab5482c4fde14c99b7431216e5', part: "arrow", class: "bs-tooltip__arrow" }), h("div", { key: 'ffb9c4d052d7b8ce618ec825d3989b6311c90c03', part: "bubble", class: "bs-tooltip__bubble" }, h("slot", { key: 'cb6cdfe74feb87b23b90da251aa08e76f3bcf0ff' }))));
17
+ return (h("div", { key: '7020be9b961d1370449ce37570ae0c9162bd6176', class: "bs-tooltip" }, h("span", { key: 'e21d62d8f701917c7a074c105a7509c9f4582f64', part: "arrow", class: "bs-tooltip__arrow" }), h("div", { key: 'f011584e85c9d10371f961e49d44b67a3983bd2e', part: "bubble", class: "bs-tooltip__bubble" }, h("slot", { key: 'f27da1c55a31d3e1a7ee330440ee9b4a3c577e9a' }))));
18
18
  }
19
19
  };
20
20
  BsTooltip.style = bsTooltipCss();
@@ -4,7 +4,7 @@ export { s as setNonce } from './index-nLORuTUY.js';
4
4
  const defineCustomElements = async (win, options) => {
5
5
  if (typeof window === 'undefined') return undefined;
6
6
  await globalScripts();
7
- return bootstrapLazy([["bs-chatbot-header",[[769,"bs-chatbot-header",{"heading":[1],"expanded":[1540]}]]],["bs-ai-thinking",[[513,"bs-ai-thinking",{"label":[1]}]]],["bs-badge",[[769,"bs-badge",{"variant":[1]}]]],["bs-button",[[785,"bs-button",{"variant":[1],"size":[1],"disabled":[4],"type":[1],"ariaLabel":[1,"aria-label"],"hasIcon":[32],"hasEndIcon":[32],"hasLabel":[32]}]]],["bs-button-skeleton",[[513,"bs-button-skeleton",{"size":[1]}]]],["bs-card",[[769,"bs-card",{"surface":[1]}]]],["bs-chatbot-response-action",[[769,"bs-chatbot-response-action",{"sourcesCount":[2,"sources-count"],"menuOpen":[1540,"menu-open"]},[[4,"click","onDocumentClick"],[4,"keydown","onKeydown"]]]]],["bs-chatbot-suggestion-button",[[769,"bs-chatbot-suggestion-button",{"disabled":[4]}]]],["bs-composer",[[785,"bs-composer",{"variant":[1],"placeholder":[1],"value":[1],"state":[1],"ariaLabel":[1,"aria-label"]}]]],["bs-data-table",[[513,"bs-data-table",{"columns":[16],"rows":[16],"sortColumn":[1,"sort-column"],"sortDirection":[1,"sort-direction"],"selectable":[4],"cellRenderer":[16],"selectedIds":[32]}]]],["bs-input",[[529,"bs-input",{"value":[1],"type":[1],"label":[1],"placeholder":[1],"description":[1],"error":[1],"disabled":[4]}]]],["bs-menu",[[257,"bs-menu"]]],["bs-menu-item",[[769,"bs-menu-item",{"hasIcon":[32]}]]],["bs-modal",[[769,"bs-modal",{"open":[1540],"heading":[1],"size":[1],"hasFooter":[32]},[[4,"keydown","onKeydown"],[4,"focusin","onFocusIn"]]]]],["bs-tooltip",[[769,"bs-tooltip",{"placement":[1]}]]]], options);
7
+ return bootstrapLazy([["bs-input",[[785,"bs-input",{"value":[1025],"type":[1],"label":[1],"placeholder":[1],"description":[1],"error":[1],"disabled":[4],"required":[4],"step":[2],"min":[2],"max":[2],"options":[16],"rows":[2],"chips":[16],"titleOptions":[16],"initialsTitle":[1,"initials-title"],"countryOptions":[16],"country":[1],"length":[2],"open":[1540],"hasIcon":[32],"hasEndIcon":[32],"passwordVisible":[32],"chipDraft":[32]},[[0,"keydown","onHostKeydown"],[0,"focusout","onHostFocusOut"]]]]],["bs-chatbot-header",[[769,"bs-chatbot-header",{"heading":[1],"expanded":[1540]}]]],["bs-ai-disclaimer",[[257,"bs-ai-disclaimer"]]],["bs-ai-greeting",[[513,"bs-ai-greeting",{"assistantName":[1,"assistant-name"],"productName":[1,"product-name"]}]]],["bs-ai-thinking",[[513,"bs-ai-thinking",{"label":[1]}]]],["bs-attachment",[[513,"bs-attachment",{"type":[1],"fileName":[1,"file-name"],"imageSrc":[1,"image-src"],"imageAlt":[1,"image-alt"],"loading":[4],"removable":[4]}]]],["bs-attachment-list",[[769,"bs-attachment-list",{"ariaLabel":[1,"aria-label"],"canScrollRight":[32]}]]],["bs-badge",[[769,"bs-badge",{"variant":[1]}]]],["bs-button",[[785,"bs-button",{"variant":[1],"size":[1],"disabled":[4],"type":[1],"ariaLabel":[1,"aria-label"],"hasIcon":[32],"hasEndIcon":[32],"hasLabel":[32]}]]],["bs-button-skeleton",[[513,"bs-button-skeleton",{"size":[1]}]]],["bs-card",[[769,"bs-card",{"surface":[1]}]]],["bs-chatbot-feedback",[[513,"bs-chatbot-feedback",{"rating":[1538],"submitted":[1540],"comment":[1025],"heading":[1],"subtitle":[1]}]]],["bs-chatbot-response-action",[[769,"bs-chatbot-response-action",{"sourcesCount":[2,"sources-count"],"menuOpen":[1540,"menu-open"]},[[4,"click","onDocumentClick"],[4,"keydown","onKeydown"]]]]],["bs-chatbot-sources-drawer",[[769,"bs-chatbot-sources-drawer",{"heading":[1],"count":[2],"slottedCount":[32]}]]],["bs-chatbot-suggestion-button",[[769,"bs-chatbot-suggestion-button",{"disabled":[4]}]]],["bs-composer",[[785,"bs-composer",{"variant":[1],"placeholder":[1],"value":[1],"state":[1],"ariaLabel":[1,"aria-label"],"hasAttachments":[32]}]]],["bs-composer-status-banner",[[769,"bs-composer-status-banner",{"type":[1],"message":[1],"showIcon":[4,"show-icon"],"showButton":[4,"show-button"],"actionLabel":[1,"action-label"],"allowClose":[4,"allow-close"]}]]],["bs-data-table",[[513,"bs-data-table",{"columns":[16],"rows":[16],"sortColumn":[1,"sort-column"],"sortDirection":[1,"sort-direction"],"selectable":[4],"cellRenderer":[16],"selectedIds":[32]}]]],["bs-modal",[[769,"bs-modal",{"open":[1540],"heading":[1],"size":[1],"hasFooter":[32]},[[4,"keydown","onKeydown"],[4,"focusin","onFocusIn"]]]]],["bs-source-link",[[769,"bs-source-link",{"fileName":[1,"file-name"],"sourceName":[1,"source-name"],"version":[1],"href":[1],"target":[1]}]]],["bs-tooltip",[[769,"bs-tooltip",{"placement":[1]}]]],["bs-menu_2",[[257,"bs-menu"],[769,"bs-menu-item",{"hasIcon":[32]}]]]], options);
8
8
  };
9
9
 
10
10
  export { defineCustomElements };
@@ -0,0 +1,18 @@
1
+ import type { Meta, StoryObj } from '@storybook/web-components-vite';
2
+ /**
3
+ * This is not a real component -- `bs-ai-chatbot` isn't a registered custom element. It's a
4
+ * showcase composing the existing Genie AI components (bs-chatbot-header, bs-ai-greeting,
5
+ * bs-chatbot-suggestion-button, bs-composer, bs-composer-status-banner, bs-attachment-list,
6
+ * bs-ai-thinking, bs-chatbot-response-action, bs-chatbot-sources-drawer, bs-ai-disclaimer) into
7
+ * realistic full-panel use cases, since no single component's own story shows how they fit
8
+ * together end to end.
9
+ */
10
+ declare const meta: Meta;
11
+ export default meta;
12
+ type Story = StoryObj;
13
+ export declare const EmptyState: Story;
14
+ export declare const ActiveConversation: Story;
15
+ export declare const Thinking: Story;
16
+ export declare const WithSourcesDrawerOpen: Story;
17
+ export declare const UploadingAttachments: Story;
18
+ export declare const SendFailed: Story;
@@ -0,0 +1,26 @@
1
+ /**
2
+ * A centered caption disclaimer for Genie AI surfaces, e.g. "AI can make mistakes. Please verify
3
+ * important information."
4
+ *
5
+ * ## When to use
6
+ * - Below or above `bs-composer` in a Genie AI chat panel, to remind users AI output can be wrong.
7
+ *
8
+ * ## When not to use
9
+ * - A general-purpose caption/helper text — use plain text or `bs-input`'s description slot for
10
+ * non-AI-related helper copy.
11
+ *
12
+ * The default slot (rather than a fixed prop) is intentional: Figma only specifies plain text, but
13
+ * some consuming apps link out to a policy/help page from this copy, and a slot supports that
14
+ * without inventing an unconfirmed `href`/link prop.
15
+ *
16
+ * @slot - The disclaimer text/content, centered. Defaults to no content -- the consumer supplies
17
+ * the copy, e.g. "AI can make mistakes. Please verify important information."
18
+ * @part text - The disclaimer text container.
19
+ * @prop --bs-ai-disclaimer-padding-x - Horizontal padding. Aliased to `--bs-spacing-200`.
20
+ * @prop --bs-ai-disclaimer-text-color - Text color. Aliased to `--bs-text-secondary`.
21
+ * @prop --bs-ai-disclaimer-font-size - Text font size. Aliased to `--bs-font-size-sm`.
22
+ * @prop --bs-ai-disclaimer-line-height - Text line height. Aliased to `--bs-line-height-body-sm`.
23
+ */
24
+ export declare class BsAiDisclaimer {
25
+ render(): any;
26
+ }
@@ -0,0 +1,8 @@
1
+ import type { Meta, StoryObj } from '@storybook/web-components-vite';
2
+ interface BsAiDisclaimerArgs {
3
+ text: string;
4
+ }
5
+ declare const meta: Meta<BsAiDisclaimerArgs>;
6
+ export default meta;
7
+ type Story = StoryObj<BsAiDisclaimerArgs>;
8
+ export declare const Default: Story;
@@ -0,0 +1,42 @@
1
+ /**
2
+ * The centered welcome heading shown at the top of an empty Genie AI chat panel, e.g.
3
+ * "Hi. I'm Genie, your AI assistant." + "How can I help you with [product] today?"
4
+ *
5
+ * ## When to use
6
+ * - The empty/initial state of a Genie AI chat panel, before the user has sent a message.
7
+ *
8
+ * ## When not to use
9
+ * - Once a conversation has started -- this is a one-time empty-state greeting, not a persistent
10
+ * header (see `bs-chatbot-header` for that).
11
+ *
12
+ * `productName` is optional: Figma's copy has a `[product_name]` placeholder the consuming app is
13
+ * expected to fill in, but a component shouldn't force a product name to exist, so leaving it
14
+ * unset falls back to a product-agnostic "How can I help you today?".
15
+ *
16
+ * @part heading - The bold "Hi. I'm {assistantName}, your AI assistant." heading.
17
+ * @part subtext - The "How can I help you..." subtext.
18
+ * @prop --bs-ai-greeting-gap - Gap between heading and subtext. Aliased to `--bs-spacing-200`.
19
+ * @prop --bs-ai-greeting-max-width - Max width of the centered content block. Matches Figma's
20
+ * 490px.
21
+ * @prop --bs-ai-greeting-heading-color - Heading text color. Aliased to `--bs-text-default`.
22
+ * @prop --bs-ai-greeting-heading-font-size - Heading font size. Aliased to `--bs-font-size-4xl`.
23
+ * @prop --bs-ai-greeting-heading-line-height - Heading line height. Figma specifies 28px, which
24
+ * doesn't match any `--bs-line-height-heading-*` token (h4 is 32) -- aliased directly to
25
+ * `--bs-line-height-body-lg`, the token that happens to share the same numeric value.
26
+ * @prop --bs-ai-greeting-heading-weight - Heading font weight. Aliased to `--bs-font-weight-bold`.
27
+ * @prop --bs-ai-greeting-heading-gap - Gap between the two heading lines. Aliased to
28
+ * `--bs-spacing-200`.
29
+ * @prop --bs-ai-greeting-subtext-color - Subtext color. Aliased to `--bs-text-secondary`.
30
+ * @prop --bs-ai-greeting-subtext-font-size - Subtext font size. Figma specifies 20px, which
31
+ * doesn't match the semantic `--bs-text-style-body-lg-size` (18px) -- aliased directly to the
32
+ * raw `--bs-font-size-xl` primitive instead.
33
+ * @prop --bs-ai-greeting-subtext-line-height - Subtext line height. Aliased to
34
+ * `--bs-line-height-body-lg`.
35
+ */
36
+ export declare class BsAiGreeting {
37
+ /** The assistant's name, used in the heading ("Hi. I'm {assistantName},"). */
38
+ assistantName: string;
39
+ /** The product name mentioned in the subtext. Omit to use a product-agnostic subtext. */
40
+ productName?: string;
41
+ render(): any;
42
+ }
@@ -0,0 +1,10 @@
1
+ import type { Meta, StoryObj } from '@storybook/web-components-vite';
2
+ interface BsAiGreetingArgs {
3
+ assistantName: string;
4
+ productName: string;
5
+ }
6
+ declare const meta: Meta<BsAiGreetingArgs>;
7
+ export default meta;
8
+ type Story = StoryObj<BsAiGreetingArgs>;
9
+ export declare const Default: Story;
10
+ export declare const WithoutProductName: Story;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * A small inline status indicator for Genie AI surfaces: the colorful Genie mark next to a label
3
- * (e.g. "Retrieving", "Thinking", "Searching") whose text pulses in a slow breathing loop while
4
- * an operation is in progress.
3
+ * (e.g. "Retrieving", "Thinking", "Searching") whose text shimmers with a moving highlight band
4
+ * while an operation is in progress.
5
5
  *
6
6
  * ## When to use
7
7
  * - Inline in a Genie AI chat transcript to show what the assistant is currently doing while a
@@ -10,20 +10,18 @@
10
10
  * ## When not to use
11
11
  * - A blocking/full-panel loading state -- this is a small inline indicator, not a spinner overlay.
12
12
  *
13
- * The label's pulse animation reproduces Figma's exact keyframe track (a plain opacity
14
- * fade-in/hold/reset with the source's own cubic-bezier easing) rather than an invented
15
- * shimmer-sweep -- the source design only specifies this one animation.
16
- *
17
13
  * @part icon - The Genie mark icon.
18
14
  * @part label - The status label text.
19
15
  * @prop --bs-ai-thinking-gap - Gap between icon and label. Aliased to `--bs-spacing-100`.
20
16
  * @prop --bs-ai-thinking-icon-size - Width/height of the icon.
21
- * @prop --bs-ai-thinking-text - Label color. Aliased to `--bs-text-muted`.
17
+ * @prop --bs-ai-thinking-text - Label base color. Aliased to `--bs-text-muted`.
18
+ * @prop --bs-ai-thinking-shimmer-highlight - Color of the moving highlight band. Aliased to
19
+ * `--bs-text-default` (more prominent than `--bs-text-muted` in both themes).
22
20
  * @prop --bs-ai-thinking-font-size - Label font size. Aliased to `--bs-font-size-md`.
23
21
  * @prop --bs-ai-thinking-line-height - Label line height. Aliased to `--bs-line-height-body-md`.
24
- * @prop --bs-ai-thinking-cycle-duration - Duration of one pulse loop. Figma specifies exactly 2s,
25
- * longer than any `--bs-duration-*` token (max `--bs-duration-slower` is 500ms), so this is
26
- * aliased directly to the literal value.
22
+ * @prop --bs-ai-thinking-cycle-duration - Duration of one shimmer sweep. Figma's own keyframe
23
+ * track for this label runs over exactly 2s, longer than any `--bs-duration-*` token (max
24
+ * `--bs-duration-slower` is 500ms), so this is aliased directly to the literal value.
27
25
  */
28
26
  export declare class BsAiThinking {
29
27
  /** The status text shown next to the icon, e.g. "Retrieving", "Thinking", "Searching". */