@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,270 @@
1
+ import { h } from "@stencil/core";
2
+ /**
3
+ * A full-width status banner for use directly above `bs-composer`, surfacing a message about the
4
+ * composer's current state (e.g. a send failure, an informational notice) with an optional
5
+ * "Continue"-style action button and an optional close button.
6
+ *
7
+ * ## When to use
8
+ * - A message tied to the composer itself (send failed, rate-limited, draft restored, etc.) that
9
+ * needs to sit directly above it, not a general-purpose alert -- see `CONVENTIONS.md` if this
10
+ * library gains a generic banner/alert component later, and prefer that instead once it exists.
11
+ *
12
+ * ## When not to use
13
+ * - A toast/snackbar notification unrelated to the composer -- this component is not
14
+ * self-dismissing and has no positioning of its own (it's a static block, not an overlay).
15
+ *
16
+ * @slot icon - Overrides the default leading icon. Only rendered when `showIcon` is true.
17
+ * @part icon - The leading icon wrapper.
18
+ * @part message - The message text.
19
+ * @part action - The optional "Continue"-style action button.
20
+ * @part close - The optional close button.
21
+ * @prop --bs-composer-status-banner-radius - Corner radius of the top-left/top-right corners
22
+ * (bottom corners are square, so this sits flush above `bs-composer`). Aliased to
23
+ * `--bs-border-radius-150`.
24
+ * @prop --bs-composer-status-banner-padding-x - Horizontal padding. Aliased to `--bs-spacing-150`.
25
+ * @prop --bs-composer-status-banner-padding-top - Top padding. Aliased to `--bs-spacing-100`.
26
+ * @prop --bs-composer-status-banner-padding-bottom - Bottom padding. Aliased to `--bs-spacing-200`.
27
+ * @prop --bs-composer-status-banner-gap - Gap between the message group and the action/close
28
+ * controls. Aliased to `--bs-spacing-100`.
29
+ * @prop --bs-composer-status-banner-icon-gap - Gap between the icon and the message text.
30
+ * Aliased to `--bs-spacing-75`.
31
+ * @prop --bs-composer-status-banner-error-bg - Background for `type="error"`. Aliased to
32
+ * `--bs-color-error-container`.
33
+ * @prop --bs-composer-status-banner-error-text - Text/icon color for `type="error"`. Aliased to
34
+ * `--bs-text-error`.
35
+ * @prop --bs-composer-status-banner-error-action-bg - Action button background for
36
+ * `type="error"`. Aliased to `--bs-color-error-default`.
37
+ * @prop --bs-composer-status-banner-error-action-bg-hover - Aliased to `--bs-color-error-hover`.
38
+ * @prop --bs-composer-status-banner-info-bg - Background for `type="info"`. Aliased to
39
+ * `--bs-color-info-container`.
40
+ * @prop --bs-composer-status-banner-info-text - Text/icon color for `type="info"`. Aliased to
41
+ * `--bs-text-info`.
42
+ * @prop --bs-composer-status-banner-info-action-bg - Action button background for `type="info"`.
43
+ * Aliased to `--bs-color-info-default`.
44
+ * @prop --bs-composer-status-banner-info-action-bg-hover - Aliased to `--bs-color-info-hover`.
45
+ * @prop --bs-composer-status-banner-neutral-bg - Background for `type="neutral"`. Aliased to
46
+ * `--bs-color-neutral-container`.
47
+ * @prop --bs-composer-status-banner-neutral-text - Text/icon color for `type="neutral"`. Aliased
48
+ * to `--bs-text-default`.
49
+ * @prop --bs-composer-status-banner-neutral-action-bg - Action button background for
50
+ * `type="neutral"`. Aliased to `--bs-color-neutral-container`.
51
+ * @prop --bs-composer-status-banner-neutral-action-bg-hover - Aliased to
52
+ * `--bs-color-neutral-container-hover`.
53
+ * @prop --bs-composer-status-banner-neutral-action-border - Action button border for
54
+ * `type="neutral"` (the only variant whose action button is outlined). Aliased to
55
+ * `--bs-border-neutral-container`.
56
+ * @prop --bs-composer-status-banner-warning-bg - Background for `type="warning"`. Aliased to
57
+ * `--bs-color-warning-container`.
58
+ * @prop --bs-composer-status-banner-warning-text - Text/icon color for `type="warning"`. Aliased
59
+ * to `--bs-text-warning`.
60
+ * @prop --bs-composer-status-banner-warning-action-bg - Action button background for
61
+ * `type="warning"`. Aliased to `--bs-color-warning-default`.
62
+ * @prop --bs-composer-status-banner-warning-action-bg-hover - Aliased to
63
+ * `--bs-color-warning-hover`.
64
+ * @prop --bs-composer-status-banner-close-hover-bg - Close button hover background (same across
65
+ * every `type`). Aliased to `--bs-color-neutral-container-hover`.
66
+ */
67
+ export class BsComposerStatusBanner {
68
+ /** Which severity/style to render. Drives background, text/icon color, and the action button's color. */
69
+ type = 'error';
70
+ /** The message text. */
71
+ message = 'This is a message';
72
+ /** Whether the leading icon (default: clock) is rendered. */
73
+ showIcon = true;
74
+ /** Whether the "Continue"-style action button is rendered. */
75
+ showButton = false;
76
+ /** Label for the action button, only rendered when `showButton` is true. */
77
+ actionLabel = 'Continue';
78
+ /** Whether the close button is rendered. */
79
+ allowClose = true;
80
+ /** Fires when the action button is clicked. Only relevant when `showButton` is true. */
81
+ bsAction;
82
+ /** Fires when the close button is clicked. Only relevant when `allowClose` is true. */
83
+ bsClose;
84
+ onActionClick = () => {
85
+ this.bsAction.emit();
86
+ };
87
+ onCloseClick = () => {
88
+ this.bsClose.emit();
89
+ };
90
+ render() {
91
+ return (h("div", { key: 'b51067b9af0210682fc60b5340560bf6ee42d655', class: `bs-composer-status-banner bs-composer-status-banner--${this.type}` }, h("div", { key: 'a6774d57e22e1b39fe0c9add8d96ed1c349bfeae', class: "bs-composer-status-banner__message-group" }, this.showIcon && (h("span", { key: '6a2b131a63a2d2cbe33f62519d1602752bc98204', part: "icon", class: "bs-composer-status-banner__icon" }, h("slot", { key: '6123c6a61652dfb504cf2e140a012fcba27e7468', name: "icon" }, h(ClockIcon, { key: '5415d7c71e2976a552955606e7288a4b806f1dbe' })))), h("p", { key: '1580b9f2b53390c32e38763c0cef23cb5d7ffa4c', part: "message", class: "bs-composer-status-banner__message" }, this.message)), this.showButton && (h("button", { key: 'bb08fce8f48253787015308bfc66e04835069670', type: "button", part: "action", class: "bs-composer-status-banner__action", onClick: this.onActionClick }, this.actionLabel)), this.allowClose && (h("button", { key: 'b9d64c66155cb8c5b884b48a442c9e0d09be9111', type: "button", part: "close", class: "bs-composer-status-banner__close", "aria-label": "Dismiss", onClick: this.onCloseClick }, h(CloseIcon, { key: '2779b3af1d5348ee510cd1fe4978cbfbbfb33c5e' })))));
92
+ }
93
+ static get is() { return "bs-composer-status-banner"; }
94
+ static get encapsulation() { return "shadow"; }
95
+ static get originalStyleUrls() {
96
+ return {
97
+ "$": ["bs-composer-status-banner.css"]
98
+ };
99
+ }
100
+ static get styleUrls() {
101
+ return {
102
+ "$": ["bs-composer-status-banner.css"]
103
+ };
104
+ }
105
+ static get properties() {
106
+ return {
107
+ "type": {
108
+ "type": "string",
109
+ "mutable": false,
110
+ "complexType": {
111
+ "original": "BsComposerStatusBannerType",
112
+ "resolved": "\"error\" | \"info\" | \"neutral\" | \"warning\"",
113
+ "references": {
114
+ "BsComposerStatusBannerType": {
115
+ "location": "local",
116
+ "path": "/Users/vivka/brandsync-web-components/src/components/bs-composer-status-banner/bs-composer-status-banner.tsx",
117
+ "id": "src/components/bs-composer-status-banner/bs-composer-status-banner.tsx::BsComposerStatusBannerType"
118
+ }
119
+ }
120
+ },
121
+ "required": false,
122
+ "optional": false,
123
+ "docs": {
124
+ "tags": [],
125
+ "text": "Which severity/style to render. Drives background, text/icon color, and the action button's color."
126
+ },
127
+ "getter": false,
128
+ "setter": false,
129
+ "reflect": false,
130
+ "attribute": "type",
131
+ "defaultValue": "'error'"
132
+ },
133
+ "message": {
134
+ "type": "string",
135
+ "mutable": false,
136
+ "complexType": {
137
+ "original": "string",
138
+ "resolved": "string",
139
+ "references": {}
140
+ },
141
+ "required": false,
142
+ "optional": false,
143
+ "docs": {
144
+ "tags": [],
145
+ "text": "The message text."
146
+ },
147
+ "getter": false,
148
+ "setter": false,
149
+ "reflect": false,
150
+ "attribute": "message",
151
+ "defaultValue": "'This is a message'"
152
+ },
153
+ "showIcon": {
154
+ "type": "boolean",
155
+ "mutable": false,
156
+ "complexType": {
157
+ "original": "boolean",
158
+ "resolved": "boolean",
159
+ "references": {}
160
+ },
161
+ "required": false,
162
+ "optional": false,
163
+ "docs": {
164
+ "tags": [],
165
+ "text": "Whether the leading icon (default: clock) is rendered."
166
+ },
167
+ "getter": false,
168
+ "setter": false,
169
+ "reflect": false,
170
+ "attribute": "show-icon",
171
+ "defaultValue": "true"
172
+ },
173
+ "showButton": {
174
+ "type": "boolean",
175
+ "mutable": false,
176
+ "complexType": {
177
+ "original": "boolean",
178
+ "resolved": "boolean",
179
+ "references": {}
180
+ },
181
+ "required": false,
182
+ "optional": false,
183
+ "docs": {
184
+ "tags": [],
185
+ "text": "Whether the \"Continue\"-style action button is rendered."
186
+ },
187
+ "getter": false,
188
+ "setter": false,
189
+ "reflect": false,
190
+ "attribute": "show-button",
191
+ "defaultValue": "false"
192
+ },
193
+ "actionLabel": {
194
+ "type": "string",
195
+ "mutable": false,
196
+ "complexType": {
197
+ "original": "string",
198
+ "resolved": "string",
199
+ "references": {}
200
+ },
201
+ "required": false,
202
+ "optional": false,
203
+ "docs": {
204
+ "tags": [],
205
+ "text": "Label for the action button, only rendered when `showButton` is true."
206
+ },
207
+ "getter": false,
208
+ "setter": false,
209
+ "reflect": false,
210
+ "attribute": "action-label",
211
+ "defaultValue": "'Continue'"
212
+ },
213
+ "allowClose": {
214
+ "type": "boolean",
215
+ "mutable": false,
216
+ "complexType": {
217
+ "original": "boolean",
218
+ "resolved": "boolean",
219
+ "references": {}
220
+ },
221
+ "required": false,
222
+ "optional": false,
223
+ "docs": {
224
+ "tags": [],
225
+ "text": "Whether the close button is rendered."
226
+ },
227
+ "getter": false,
228
+ "setter": false,
229
+ "reflect": false,
230
+ "attribute": "allow-close",
231
+ "defaultValue": "true"
232
+ }
233
+ };
234
+ }
235
+ static get events() {
236
+ return [{
237
+ "method": "bsAction",
238
+ "name": "bsAction",
239
+ "bubbles": true,
240
+ "cancelable": true,
241
+ "composed": true,
242
+ "docs": {
243
+ "tags": [],
244
+ "text": "Fires when the action button is clicked. Only relevant when `showButton` is true."
245
+ },
246
+ "complexType": {
247
+ "original": "void",
248
+ "resolved": "void",
249
+ "references": {}
250
+ }
251
+ }, {
252
+ "method": "bsClose",
253
+ "name": "bsClose",
254
+ "bubbles": true,
255
+ "cancelable": true,
256
+ "composed": true,
257
+ "docs": {
258
+ "tags": [],
259
+ "text": "Fires when the close button is clicked. Only relevant when `allowClose` is true."
260
+ },
261
+ "complexType": {
262
+ "original": "void",
263
+ "resolved": "void",
264
+ "references": {}
265
+ }
266
+ }];
267
+ }
268
+ }
269
+ const ClockIcon = () => (h("svg", { viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, h("circle", { cx: "10", cy: "10", r: "7.25", stroke: "currentColor", "stroke-width": "1.3" }), h("path", { d: "M10 5.83V10L12.5 11.67", stroke: "currentColor", "stroke-width": "1.3", "stroke-linecap": "round", "stroke-linejoin": "round" })));
270
+ const CloseIcon = () => (h("svg", { viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, h("path", { d: "M15 5L5 15", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M15 15L5 5", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" })));
@@ -0,0 +1,75 @@
1
+ import { html } from "lit";
2
+ import { componentDescription, propDescription } from "../../stories-utils";
3
+ const types = ['error', 'info', 'neutral', 'warning'];
4
+ const meta = {
5
+ title: 'Genie AI Components/bs-composer-status-banner',
6
+ parameters: { docs: { description: { component: componentDescription('bs-composer-status-banner') } } },
7
+ render: args => html `
8
+ <bs-composer-status-banner
9
+ type=${args.type}
10
+ message=${args.message}
11
+ ?show-icon=${args.showIcon}
12
+ ?show-button=${args.showButton}
13
+ action-label=${args.actionLabel}
14
+ ?allow-close=${args.allowClose}
15
+ ></bs-composer-status-banner>
16
+ `,
17
+ argTypes: {
18
+ type: { control: 'select', options: types, description: propDescription('bs-composer-status-banner', 'type') },
19
+ message: { control: 'text', description: propDescription('bs-composer-status-banner', 'message') },
20
+ showIcon: { control: 'boolean', description: propDescription('bs-composer-status-banner', 'showIcon') },
21
+ showButton: { control: 'boolean', description: propDescription('bs-composer-status-banner', 'showButton') },
22
+ actionLabel: { control: 'text', description: propDescription('bs-composer-status-banner', 'actionLabel') },
23
+ allowClose: { control: 'boolean', description: propDescription('bs-composer-status-banner', 'allowClose') },
24
+ },
25
+ args: {
26
+ type: 'error',
27
+ message: 'This is a message',
28
+ showIcon: true,
29
+ showButton: false,
30
+ actionLabel: 'Continue',
31
+ allowClose: true,
32
+ },
33
+ };
34
+ export default meta;
35
+ export const Default = {};
36
+ export const Info = {
37
+ args: { type: 'info' },
38
+ };
39
+ export const Neutral = {
40
+ args: { type: 'neutral' },
41
+ };
42
+ export const Warning = {
43
+ args: { type: 'warning' },
44
+ };
45
+ export const WithAction = {
46
+ name: 'With action button',
47
+ args: { showButton: true },
48
+ };
49
+ export const AllTypes = {
50
+ name: 'All types',
51
+ render: () => html `
52
+ <div style="display:flex; flex-direction:column; gap:8px; max-width: 600px;">
53
+ ${types.map(type => html ` <bs-composer-status-banner type=${type} show-button></bs-composer-status-banner> `)}
54
+ </div>
55
+ `,
56
+ };
57
+ const SAMPLE_IMAGE = 'https://images.unsplash.com/photo-1512917774080-9991f1c4c750?w=200&h=200&fit=crop';
58
+ export const AboveComposer = {
59
+ name: 'Above bs-composer',
60
+ render: () => html `
61
+ <div style="display:flex; flex-direction:column; max-width: 420px;">
62
+ <bs-composer-status-banner
63
+ type="info"
64
+ message="Uploading files, please wait."
65
+ style="margin-bottom: calc(-1 * var(--bs-spacing-150));"
66
+ ></bs-composer-status-banner>
67
+ <bs-composer aria-label="Message">
68
+ <bs-attachment-list slot="attachments">
69
+ <bs-attachment type="image" image-src=${SAMPLE_IMAGE} loading></bs-attachment>
70
+ <bs-attachment type="pdf" file-name="Dummy-pdf-in-here" loading></bs-attachment>
71
+ </bs-attachment-list>
72
+ </bs-composer>
73
+ </div>
74
+ `,
75
+ };
@@ -54,11 +54,11 @@ export class BsDataTable {
54
54
  this.bsRowSelect.emit({ id: row.id, selected });
55
55
  };
56
56
  render() {
57
- return (h("table", { key: '8276a72f6539690dd8189cd29e42993c3d61862c', part: "table", class: "bs-data-table" }, h("thead", { key: '2d3e42222eec0bcbe3d06f26f7a3ae53dd5ccdc0', part: "head" }, h("tr", { key: '45994ea59d9a1a347bb8abdf25d7b1b919822a61' }, this.selectable && h("th", { key: '05d5efa74feee1545e1c4b9dfc45acd7ffd10e6a', class: "bs-data-table__select-col" }), this.columns.map(column => {
57
+ return (h("table", { key: '9b16ade44ff85120e9629722de8e8c1738835c1b', part: "table", class: "bs-data-table" }, h("thead", { key: '644eed606e68782ada42c289bb7bfc8d6de4affb', part: "head" }, h("tr", { key: '4e4ea75018796c77f14703c1c1402022f8c8cde9' }, this.selectable && h("th", { key: '85460f7c2eab6ad0f3604f72bcd81a4aa8699c03', class: "bs-data-table__select-col" }), this.columns.map(column => {
58
58
  const isSorted = this.sortColumn === column.key;
59
59
  const ariaSort = column.sortable ? (isSorted ? (this.sortDirection === 'asc' ? 'ascending' : 'descending') : 'none') : undefined;
60
60
  return (h("th", { part: "header-cell", class: "bs-data-table__header-cell", "aria-sort": ariaSort }, column.sortable ? (h("button", { type: "button", class: "bs-data-table__sort-button", onClick: () => this.onHeaderClick(column) }, column.label, isSorted && h("span", { class: "bs-data-table__sort-indicator" }, this.sortDirection === 'asc' ? ' ▲' : ' ▼'))) : (column.label)));
61
- }))), h("tbody", { key: '9c1dc006341b63e5d22df655836f326ba27e7b9d', part: "body" }, this.rows.map(row => (h("tr", { part: "row", class: "bs-data-table__row" }, this.selectable && (h("td", { class: "bs-data-table__select-col" }, h("input", { type: "checkbox", checked: this.selectedIds.has(row.id), onChange: ev => this.onRowCheckboxChange(row, ev) }))), this.columns.map(column => this.cellRenderer ? (
61
+ }))), h("tbody", { key: '024cb8a25cc6471e7074d119b78e6a8e22f86450', part: "body" }, this.rows.map(row => (h("tr", { part: "row", class: "bs-data-table__row" }, this.selectable && (h("td", { class: "bs-data-table__select-col" }, h("input", { type: "checkbox", checked: this.selectedIds.has(row.id), onChange: ev => this.onRowCheckboxChange(row, ev) }))), this.columns.map(column => this.cellRenderer ? (
62
62
  // cellRenderer is a developer-supplied, trusted function (JS-property-only, never
63
63
  // derived from untrusted input) -- its HTML output is intentionally not escaped,
64
64
  // same trust model as React's dangerouslySetInnerHTML.