@brandsync/wc 1.1.0 → 1.2.0

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 (165) hide show
  1. package/custom-elements.json +169 -0
  2. package/dist/brandsync-wc/brandsync-wc.esm.js +1 -1
  3. package/dist/brandsync-wc/{p-6fc78ccf.entry.js → p-03f9fd54.entry.js} +1 -1
  4. package/dist/brandsync-wc/{p-e230ed08.entry.js → p-04d6aa95.entry.js} +1 -1
  5. package/dist/brandsync-wc/{p-3e8728dc.entry.js → p-17dbd4b3.entry.js} +1 -1
  6. package/dist/brandsync-wc/{p-32fe390d.entry.js → p-1e9ceb9d.entry.js} +1 -1
  7. package/dist/brandsync-wc/{p-6ef0a0ed.entry.js → p-205deb32.entry.js} +1 -1
  8. package/dist/brandsync-wc/{p-696f885c.entry.js → p-260e14de.entry.js} +1 -1
  9. package/dist/brandsync-wc/p-3e6d37a4.entry.js +1 -0
  10. package/dist/brandsync-wc/{p-bb2ec290.entry.js → p-41732f18.entry.js} +1 -1
  11. package/dist/brandsync-wc/{p-778fcc55.entry.js → p-650b7eef.entry.js} +1 -1
  12. package/dist/brandsync-wc/{p-c7427962.entry.js → p-67bc2ec8.entry.js} +1 -1
  13. package/dist/brandsync-wc/{p-790fadf9.entry.js → p-6970a24c.entry.js} +1 -1
  14. package/dist/brandsync-wc/{p-0a2d690f.entry.js → p-718ce85f.entry.js} +1 -1
  15. package/dist/brandsync-wc/{p-aa1cc2b6.entry.js → p-7655e741.entry.js} +1 -1
  16. package/dist/brandsync-wc/{p-3e61d206.entry.js → p-7f14660d.entry.js} +1 -1
  17. package/dist/brandsync-wc/{p-0cf117f4.entry.js → p-8f2cfe31.entry.js} +1 -1
  18. package/dist/brandsync-wc/{p-31b28025.entry.js → p-a35d5ea7.entry.js} +1 -1
  19. package/dist/brandsync-wc/{p-82953f42.entry.js → p-a597dc2b.entry.js} +1 -1
  20. package/dist/brandsync-wc/p-aac6b59b.entry.js +1 -0
  21. package/dist/brandsync-wc/{p-5321186f.entry.js → p-b6425ac2.entry.js} +1 -1
  22. package/dist/brandsync-wc/{p-ac12372f.entry.js → p-c8480d21.entry.js} +1 -1
  23. package/dist/brandsync-wc/{p-1abacfe8.entry.js → p-ce08c9d7.entry.js} +1 -1
  24. package/dist/brandsync-wc/{p-579fbe4d.entry.js → p-ed704126.entry.js} +1 -1
  25. package/dist/brandsync-wc/{p-63906504.entry.js → p-f6fafbd6.entry.js} +1 -1
  26. package/dist/brandsync-wc/{p-a7704457.entry.js → p-f94449da.entry.js} +1 -1
  27. package/dist/cjs/brandsync-wc.cjs.js +1 -1
  28. package/dist/cjs/bs-ai-disclaimer.cjs.entry.js +1 -1
  29. package/dist/cjs/bs-ai-greeting.cjs.entry.js +1 -1
  30. package/dist/cjs/bs-ai-thinking.cjs.entry.js +1 -1
  31. package/dist/cjs/bs-attachment-list.cjs.entry.js +1 -1
  32. package/dist/cjs/bs-breadcrumbs.cjs.entry.js +1 -1
  33. package/dist/cjs/bs-button-skeleton.cjs.entry.js +1 -1
  34. package/dist/cjs/bs-chatbot-feedback.cjs.entry.js +1 -1
  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 +1 -1
  38. package/dist/cjs/bs-chatbot-suggestion-button.cjs.entry.js +1 -1
  39. package/dist/cjs/bs-checkbox-skeleton.cjs.entry.js +1 -1
  40. package/dist/cjs/bs-inline-tab.cjs.entry.js +1 -1
  41. package/dist/cjs/bs-input.cjs.entry.js +2 -2
  42. package/dist/cjs/bs-menu-item.cjs.entry.js +1 -1
  43. package/dist/cjs/bs-menu.cjs.entry.js +1 -1
  44. package/dist/cjs/bs-navigation-drawer-item.cjs.entry.js +1 -1
  45. package/dist/cjs/bs-navigation-drawer.cjs.entry.js +1 -1
  46. package/dist/cjs/bs-pagination.cjs.entry.js +1 -1
  47. package/dist/cjs/bs-radio.cjs.entry.js +1 -1
  48. package/dist/cjs/bs-source-link.cjs.entry.js +2 -2
  49. package/dist/cjs/bs-stepper.cjs.entry.js +1 -1
  50. package/dist/cjs/bs-toast.cjs.entry.js +45 -0
  51. package/dist/cjs/bs-tooltip.cjs.entry.js +1 -1
  52. package/dist/cjs/loader.cjs.js +1 -1
  53. package/dist/collection/collection-manifest.json +1 -0
  54. package/dist/collection/components/bs-ai-disclaimer/bs-ai-disclaimer.js +1 -1
  55. package/dist/collection/components/bs-ai-greeting/bs-ai-greeting.js +1 -1
  56. package/dist/collection/components/bs-ai-thinking/bs-ai-thinking.js +1 -1
  57. package/dist/collection/components/bs-attachment/bs-attachment.js +1 -1
  58. package/dist/collection/components/bs-attachment-list/bs-attachment-list.js +1 -1
  59. package/dist/collection/components/bs-avatar/bs-avatar.js +2 -2
  60. package/dist/collection/components/bs-badge/bs-badge.js +1 -1
  61. package/dist/collection/components/bs-breadcrumb/bs-breadcrumb/bs-breadcrumb.js +1 -1
  62. package/dist/collection/components/bs-breadcrumb/bs-breadcrumb-overflow/bs-breadcrumb-overflow.js +1 -1
  63. package/dist/collection/components/bs-breadcrumb/bs-breadcrumbs/bs-breadcrumbs.js +1 -1
  64. package/dist/collection/components/bs-button/bs-button/bs-button.js +2 -2
  65. package/dist/collection/components/bs-button/bs-icon-button/bs-icon-button.js +2 -2
  66. package/dist/collection/components/bs-button-skeleton/bs-button-skeleton.js +1 -1
  67. package/dist/collection/components/bs-card/bs-card.js +1 -1
  68. package/dist/collection/components/bs-chatbot-feedback/bs-chatbot-feedback.js +1 -1
  69. package/dist/collection/components/bs-chatbot-header/bs-chatbot-header.js +1 -1
  70. package/dist/collection/components/bs-chatbot-response-action/bs-chatbot-response-action.js +1 -1
  71. package/dist/collection/components/bs-chatbot-sources-drawer/bs-chatbot-sources-drawer.js +1 -1
  72. package/dist/collection/components/bs-chatbot-suggestion-button/bs-chatbot-suggestion-button.js +1 -1
  73. package/dist/collection/components/bs-checkbox/bs-checkbox-skeleton/bs-checkbox-skeleton.js +1 -1
  74. package/dist/collection/components/bs-checkbox/bs-checkbox.js +1 -1
  75. package/dist/collection/components/bs-chip/bs-chip-filter/bs-chip-filter.js +1 -1
  76. package/dist/collection/components/bs-chip/bs-chip-informative/bs-chip-informative.js +2 -2
  77. package/dist/collection/components/bs-chip/bs-chip-input/bs-chip-input.js +1 -1
  78. package/dist/collection/components/bs-composer/bs-composer.js +2 -2
  79. package/dist/collection/components/bs-composer-status-banner/bs-composer-status-banner.js +1 -1
  80. package/dist/collection/components/bs-data-table/bs-data-table.js +4 -4
  81. package/dist/collection/components/bs-dialog/bs-dialog.js +1 -1
  82. package/dist/collection/components/bs-input/bs-input.js +2 -2
  83. package/dist/collection/components/bs-logo/bs-logo.js +2 -2
  84. package/dist/collection/components/bs-menu/bs-menu.js +1 -1
  85. package/dist/collection/components/bs-menu-item/bs-menu-item.js +1 -1
  86. package/dist/collection/components/bs-pagination/bs-pagination.js +1 -1
  87. package/dist/collection/components/bs-radio/bs-radio.js +1 -1
  88. package/dist/collection/components/bs-slider/bs-slider.js +1 -1
  89. package/dist/collection/components/bs-snackbar/bs-snackbar.js +1 -1
  90. package/dist/collection/components/bs-source-link/bs-source-link.js +2 -2
  91. package/dist/collection/components/bs-stepper/bs-stepper/bs-stepper.js +1 -1
  92. package/dist/collection/components/bs-stepper/bs-stepper-step/bs-stepper-step.js +2 -2
  93. package/dist/collection/components/bs-switch/bs-switch.js +1 -1
  94. package/dist/collection/components/bs-tab/bs-inline-tab/bs-inline-tab.js +1 -1
  95. package/dist/collection/components/bs-tab/bs-tab/bs-tab.js +1 -1
  96. package/dist/collection/components/bs-tab/bs-tabs/bs-tabs.js +2 -2
  97. package/dist/collection/components/bs-toast/bs-toast.cmp.test.js +59 -0
  98. package/dist/collection/components/bs-toast/bs-toast.css +151 -0
  99. package/dist/collection/components/bs-toast/bs-toast.js +108 -0
  100. package/dist/collection/components/bs-toast/bs-toast.stories.js +39 -0
  101. package/dist/collection/components/bs-tooltip/bs-tooltip.js +1 -1
  102. package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.js +1 -1
  103. package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer-item/bs-navigation-drawer-item.js +1 -1
  104. package/dist/collection/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.js +1 -1
  105. package/dist/components/bs-ai-disclaimer.js +1 -1
  106. package/dist/components/bs-ai-greeting.js +1 -1
  107. package/dist/components/bs-ai-thinking.js +1 -1
  108. package/dist/components/bs-attachment-list.js +1 -1
  109. package/dist/components/bs-breadcrumb-overflow.js +1 -1
  110. package/dist/components/bs-breadcrumbs.js +1 -1
  111. package/dist/components/bs-button-skeleton.js +1 -1
  112. package/dist/components/bs-chatbot-feedback.js +1 -1
  113. package/dist/components/bs-chatbot-header.js +1 -1
  114. package/dist/components/bs-chatbot-response-action.js +1 -1
  115. package/dist/components/bs-chatbot-sources-drawer.js +1 -1
  116. package/dist/components/bs-chatbot-suggestion-button.js +1 -1
  117. package/dist/components/bs-checkbox-skeleton.js +1 -1
  118. package/dist/components/bs-inline-tab.js +1 -1
  119. package/dist/components/bs-input.js +1 -1
  120. package/dist/components/bs-menu-item.js +1 -1
  121. package/dist/components/bs-menu.js +1 -1
  122. package/dist/components/bs-navigation-drawer-item.js +1 -1
  123. package/dist/components/bs-navigation-drawer.js +1 -1
  124. package/dist/components/bs-pagination.js +1 -1
  125. package/dist/components/bs-radio.js +1 -1
  126. package/dist/components/bs-source-link.js +1 -1
  127. package/dist/components/bs-stepper.js +1 -1
  128. package/dist/components/bs-toast.d.ts +11 -0
  129. package/dist/components/bs-toast.js +1 -0
  130. package/dist/components/bs-tooltip.js +1 -1
  131. package/dist/components/{p-BPUNjzjH.js → p-BOP5EJrQ.js} +1 -1
  132. package/dist/components/{p-BFVUq5m5.js → p-Bg98eW9H.js} +1 -1
  133. package/dist/components/{p-Bb6vh9PN.js → p-BlCziuES.js} +1 -1
  134. package/dist/esm/brandsync-wc.js +1 -1
  135. package/dist/esm/bs-ai-disclaimer.entry.js +1 -1
  136. package/dist/esm/bs-ai-greeting.entry.js +1 -1
  137. package/dist/esm/bs-ai-thinking.entry.js +1 -1
  138. package/dist/esm/bs-attachment-list.entry.js +1 -1
  139. package/dist/esm/bs-breadcrumbs.entry.js +1 -1
  140. package/dist/esm/bs-button-skeleton.entry.js +1 -1
  141. package/dist/esm/bs-chatbot-feedback.entry.js +1 -1
  142. package/dist/esm/bs-chatbot-header.entry.js +1 -1
  143. package/dist/esm/bs-chatbot-response-action.entry.js +1 -1
  144. package/dist/esm/bs-chatbot-sources-drawer.entry.js +1 -1
  145. package/dist/esm/bs-chatbot-suggestion-button.entry.js +1 -1
  146. package/dist/esm/bs-checkbox-skeleton.entry.js +1 -1
  147. package/dist/esm/bs-inline-tab.entry.js +1 -1
  148. package/dist/esm/bs-input.entry.js +2 -2
  149. package/dist/esm/bs-menu-item.entry.js +1 -1
  150. package/dist/esm/bs-menu.entry.js +1 -1
  151. package/dist/esm/bs-navigation-drawer-item.entry.js +1 -1
  152. package/dist/esm/bs-navigation-drawer.entry.js +1 -1
  153. package/dist/esm/bs-pagination.entry.js +1 -1
  154. package/dist/esm/bs-radio.entry.js +1 -1
  155. package/dist/esm/bs-source-link.entry.js +2 -2
  156. package/dist/esm/bs-stepper.entry.js +1 -1
  157. package/dist/esm/bs-toast.entry.js +43 -0
  158. package/dist/esm/bs-tooltip.entry.js +1 -1
  159. package/dist/esm/loader.js +1 -1
  160. package/dist/types/components/bs-toast/bs-toast.cmp.test.d.ts +1 -0
  161. package/dist/types/components/bs-toast/bs-toast.d.ts +27 -0
  162. package/dist/types/components/bs-toast/bs-toast.stories.d.ts +12 -0
  163. package/dist/types/components.d.ts +79 -0
  164. package/package.json +1 -1
  165. package/dist/brandsync-wc/p-cc9f85d6.entry.js +0 -1
@@ -341,10 +341,10 @@ export class BsInput {
341
341
  return (h("div", { part: "field", class: `bs-input__field bs-input__field--pin ${errorClass} ${disabledClass}` }, 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) })))));
342
342
  }
343
343
  render() {
344
- return (h("div", { key: '10554d997d7c52834c033e68f1b0b30e823844d6', class: `bs-input ${this.error ? 'bs-input--error' : ''}` }, this.label && (
344
+ return (h("div", { key: 'd9cf2c23e899ddf058e58e17856ff45fbc94aefe', class: `bs-input ${this.error ? 'bs-input--error' : ''}` }, this.label && (
345
345
  // "control" is a fixed id, not a generated one -- safe because Shadow DOM scopes ids
346
346
  // to this instance's own shadow root, so it can never collide with another bs-input.
347
- h("label", { key: 'd5819ef4b34973a510dc7582e32baae4a6da4119', part: "label", class: "bs-input__label", htmlFor: "control" }, this.label, this.required && (h("span", { key: '6c066e8c528133288be0f050f8e7ca5527561cba', part: "required", class: "bs-input__required", "aria-hidden": "true" }, "*")))), this.type === 'pin' ? this.renderPinField() : this.type === 'initials' ? this.renderInitialsField() : 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));
347
+ h("label", { key: '717e519713f58bf226319378415e2c52fbfddfb1', part: "label", class: "bs-input__label", htmlFor: "control" }, this.label, this.required && (h("span", { key: 'e3352ca754e5d579bfbda81c14ea491d4091c80c', part: "required", class: "bs-input__required", "aria-hidden": "true" }, "*")))), this.type === 'pin' ? this.renderPinField() : this.type === 'initials' ? this.renderInitialsField() : 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));
348
348
  }
349
349
  static get is() { return "bs-input"; }
350
350
  static get encapsulation() { return "shadow"; }
@@ -105,7 +105,7 @@ export class BsLogo {
105
105
  "references": {
106
106
  "BsLogoVariant": {
107
107
  "location": "local",
108
- "path": "/home/runner/work/Brandsync-web-components/Brandsync-web-components/packages/wc/src/components/bs-logo/bs-logo.tsx",
108
+ "path": "/home/runner/work/Brandsync-webcomponents/Brandsync-webcomponents/packages/wc/src/components/bs-logo/bs-logo.tsx",
109
109
  "id": "src/components/bs-logo/bs-logo.tsx::BsLogoVariant"
110
110
  }
111
111
  }
@@ -131,7 +131,7 @@ export class BsLogo {
131
131
  "references": {
132
132
  "BsLogoBackground": {
133
133
  "location": "local",
134
- "path": "/home/runner/work/Brandsync-web-components/Brandsync-web-components/packages/wc/src/components/bs-logo/bs-logo.tsx",
134
+ "path": "/home/runner/work/Brandsync-webcomponents/Brandsync-webcomponents/packages/wc/src/components/bs-logo/bs-logo.tsx",
135
135
  "id": "src/components/bs-logo/bs-logo.tsx::BsLogoBackground"
136
136
  }
137
137
  }
@@ -22,7 +22,7 @@ import { h } from "@stencil/core";
22
22
  */
23
23
  export class BsMenu {
24
24
  render() {
25
- return (h("div", { key: '23a5c16e982c711bfa9f8e914869601be45812b9', part: "list", class: "bs-menu", role: "menu" }, h("slot", { key: 'a7d9116f56d91721231b3f94e727626c6c221aa8' })));
25
+ return (h("div", { key: '3eec5b00fa0448900321d3f0b4b60f924b404c82', part: "list", class: "bs-menu", role: "menu" }, h("slot", { key: '4ba792af9042becd0b4dc9733fb835e2e9429442' })));
26
26
  }
27
27
  static get is() { return "bs-menu"; }
28
28
  static get encapsulation() { return "shadow"; }
@@ -47,7 +47,7 @@ export class BsMenuItem {
47
47
  this.bsSelect.emit();
48
48
  };
49
49
  render() {
50
- return (h("button", { key: 'f328aa848cc8ae0c908640a23834f3fd8d8ffea7', type: "button", part: "item", role: "menuitem", class: `bs-menu-item ${this.disabled ? 'bs-menu-item--disabled' : ''}`, disabled: this.disabled, "aria-disabled": this.disabled ? 'true' : undefined, onClick: this.onClick }, h("span", { key: '75a23a3ee9a9896e2607222b18155651d6ada39f', part: "icon", class: `bs-menu-item__icon ${this.hasIcon ? 'bs-menu-item__icon--has-content' : ''}` }, h("slot", { key: '08d468b52d6913d89f2443e8597a44bfacc4f2ea', name: "icon", onSlotchange: this.onIconSlotchange })), h("span", { key: '148053d9ff48297dfa276ddbf46f57c13675a5c4', part: "label", class: "bs-menu-item__label" }, h("slot", { key: '05d417308229673796e014788f25de2b4c2d4eaf' }))));
50
+ return (h("button", { key: '7f167cd83f9a8eeae18f128355d5ffb8f436ac79', type: "button", part: "item", role: "menuitem", class: `bs-menu-item ${this.disabled ? 'bs-menu-item--disabled' : ''}`, disabled: this.disabled, "aria-disabled": this.disabled ? 'true' : undefined, onClick: this.onClick }, h("span", { key: '4df57b5696b2c4853f6ea94b0316b6ae5094708b', part: "icon", class: `bs-menu-item__icon ${this.hasIcon ? 'bs-menu-item__icon--has-content' : ''}` }, h("slot", { key: '31a576332ed664d476376d1ae526dea00f6b9a3d', name: "icon", onSlotchange: this.onIconSlotchange })), h("span", { key: 'fc59ab3bb2c7229a97c3aff9a0442e8c3d346e96', part: "label", class: "bs-menu-item__label" }, h("slot", { key: '1d295c872f60b32e8230acbc2f63474b4d869bc8' }))));
51
51
  }
52
52
  static get is() { return "bs-menu-item"; }
53
53
  static get encapsulation() { return "shadow"; }
@@ -87,7 +87,7 @@ export class BsPagination {
87
87
  }
88
88
  render() {
89
89
  const pageList = this.getPageList();
90
- return (h("nav", { key: '1a60cd70c34f8d1f8f2d3a8aa62f99d4d38ab462', "aria-label": "Pagination" }, h("ul", { key: '42381f91ef2ebff6c4cc1a9c4ffb28a993931c43', part: "list", class: "bs-pagination__list" }, h("li", { key: '655ad21a3198ea47f85d6dbfa09df9fb05d09e4f', part: "item", class: "bs-pagination__item" }, h("button", { key: '8342d94ae7f7164445a09356acee9ce4d0cb6d1b', part: "prev", type: "button", class: "bs-pagination__control", "aria-label": this.previousLabel, disabled: this.currentPage <= 1, onClick: () => this.goToPage(this.currentPage - 1) }, h(ChevronLeftIcon, { key: '8f7b7a32551781a04c5525dedbeeae586453bb7f' }))), pageList.map((item, index) => item === 'ellipsis' ? (h("li", { part: "item", class: "bs-pagination__item", key: `ellipsis-${index}` }, h("span", { part: "ellipsis", class: "bs-pagination__ellipsis", "aria-hidden": "true" }, h(EllipsisIcon, null)))) : (h("li", { part: "item", class: "bs-pagination__item", key: item }, h("button", { part: item === this.currentPage ? 'page current' : 'page', type: "button", class: `bs-pagination__control bs-pagination__page ${item === this.currentPage ? 'bs-pagination__page--current' : ''}`, "aria-label": `Go to page ${item}`, "aria-current": item === this.currentPage ? 'page' : undefined, onClick: () => this.goToPage(item) }, item)))), h("li", { key: '0a7d4a39c332130e865a16d7f3751db44ea777bb', part: "item", class: "bs-pagination__item" }, h("button", { key: 'e3b5276ca79d150bd8fe89f86973a9fb3458c481', part: "next", type: "button", class: "bs-pagination__control", "aria-label": this.nextLabel, disabled: this.currentPage >= this.safeTotalPages, onClick: () => this.goToPage(this.currentPage + 1) }, h(ChevronRightIcon, { key: 'fe89db6f4c5bbd4fdaa3ee499b448c8603a7f132' }))))));
90
+ return (h("nav", { key: 'd9f5e2b792e86a7d4d2571986a4fac1ae4f44fdc', "aria-label": "Pagination" }, h("ul", { key: 'cd277ba70a358c6425ed507378190373f4e39ecc', part: "list", class: "bs-pagination__list" }, h("li", { key: 'a0a1071f87a56c4c7c060261382ab70a4dc8c1fa', part: "item", class: "bs-pagination__item" }, h("button", { key: '6a6f0a0141db4c12f9a3d39c6ae609d003be308a', part: "prev", type: "button", class: "bs-pagination__control", "aria-label": this.previousLabel, disabled: this.currentPage <= 1, onClick: () => this.goToPage(this.currentPage - 1) }, h(ChevronLeftIcon, { key: '8687c2b631c801a89104718f370ac811d75b6ba4' }))), pageList.map((item, index) => item === 'ellipsis' ? (h("li", { part: "item", class: "bs-pagination__item", key: `ellipsis-${index}` }, h("span", { part: "ellipsis", class: "bs-pagination__ellipsis", "aria-hidden": "true" }, h(EllipsisIcon, null)))) : (h("li", { part: "item", class: "bs-pagination__item", key: item }, h("button", { part: item === this.currentPage ? 'page current' : 'page', type: "button", class: `bs-pagination__control bs-pagination__page ${item === this.currentPage ? 'bs-pagination__page--current' : ''}`, "aria-label": `Go to page ${item}`, "aria-current": item === this.currentPage ? 'page' : undefined, onClick: () => this.goToPage(item) }, item)))), h("li", { key: '27dfa774e3e541706a45a8d078c6ce1299128733', part: "item", class: "bs-pagination__item" }, h("button", { key: 'eaf59317f590798049f9206596b7ffd6b30c3429', part: "next", type: "button", class: "bs-pagination__control", "aria-label": this.nextLabel, disabled: this.currentPage >= this.safeTotalPages, onClick: () => this.goToPage(this.currentPage + 1) }, h(ChevronRightIcon, { key: 'ecbc2337e1db1dcf15f69f098b28c0d560aece9a' }))))));
91
91
  }
92
92
  static get is() { return "bs-pagination"; }
93
93
  static get encapsulation() { return "shadow"; }
@@ -51,7 +51,7 @@ export class BsRadio {
51
51
  }
52
52
  };
53
53
  render() {
54
- return (h("label", { key: '349589d9d20270aedcbd67d528057b9b0c41c486', class: `bs-radio ${this.disabled ? 'bs-radio--disabled' : ''}` }, h("input", { key: '36da81bb4a82a78cd1e49ca2d27b4837e6077bd9', class: "bs-radio__input", type: "radio", name: this.name, value: this.value, checked: this.checked, disabled: this.disabled, onChange: this.onChange }), h("span", { key: '1f5e0d0a2c49875b63b70bf1618f1c374d7f5dae', class: "bs-radio__hit-area" }, h("span", { key: '63f4e1e619aa3faca1cda08ad878f23b83836d0c', class: "bs-radio__state-layer" }, h("span", { key: '5487d7782497766e8d3c1261c035214055b4ecf3', part: "circle", class: `bs-radio__circle ${this.checked ? 'bs-radio__circle--selected' : ''}` }, this.checked && h("span", { key: '6a8cd123cf6588c8e18c5841176556bf8f22b1bb', part: "dot", class: "bs-radio__dot" })))), h("span", { key: 'b21075cb92382cbdcb3d11404b5db27ac5823308', part: "label", class: "bs-radio__label" }, h("slot", { key: '8ca2bb29e32c2f0d52832b42643c0efd7cc89e9a' }))));
54
+ return (h("label", { key: 'd2b90d388d4a165490c9e97f4716dc7b07a97d48', class: `bs-radio ${this.disabled ? 'bs-radio--disabled' : ''}` }, h("input", { key: 'a748a2fbcf810332d4046c4daec9c4a138ee127d', class: "bs-radio__input", type: "radio", name: this.name, value: this.value, checked: this.checked, disabled: this.disabled, onChange: this.onChange }), h("span", { key: 'f4aa8ca7333a598d921cad22c2ceb9e44745dbf4', class: "bs-radio__hit-area" }, h("span", { key: 'ecc93fe3be2284e86d2e8a8539edad55d40ce176', class: "bs-radio__state-layer" }, h("span", { key: 'e0f23810c8a7608654a75718aff71c468c24aecf', part: "circle", class: `bs-radio__circle ${this.checked ? 'bs-radio__circle--selected' : ''}` }, this.checked && h("span", { key: 'bb25cca2041b6c8a8978ee81d3c745530a1b660c', part: "dot", class: "bs-radio__dot" })))), h("span", { key: 'f8acfe4cac4182d922c63d7d9e96241c3eefabe9', part: "label", class: "bs-radio__label" }, h("slot", { key: '4b50c3944202d40f268c1e55bea8804273339e51' }))));
55
55
  }
56
56
  static get is() { return "bs-radio"; }
57
57
  static get encapsulation() { return "shadow"; }
@@ -225,7 +225,7 @@ export class BsSlider {
225
225
  "references": {
226
226
  "BsSliderType": {
227
227
  "location": "local",
228
- "path": "/home/runner/work/Brandsync-web-components/Brandsync-web-components/packages/wc/src/components/bs-slider/bs-slider.tsx",
228
+ "path": "/home/runner/work/Brandsync-webcomponents/Brandsync-webcomponents/packages/wc/src/components/bs-slider/bs-slider.tsx",
229
229
  "id": "src/components/bs-slider/bs-slider.tsx::BsSliderType"
230
230
  }
231
231
  }
@@ -76,7 +76,7 @@ export class BsSnackbar {
76
76
  "references": {
77
77
  "BsSnackbarVariant": {
78
78
  "location": "local",
79
- "path": "/home/runner/work/Brandsync-web-components/Brandsync-web-components/packages/wc/src/components/bs-snackbar/bs-snackbar.tsx",
79
+ "path": "/home/runner/work/Brandsync-webcomponents/Brandsync-webcomponents/packages/wc/src/components/bs-snackbar/bs-snackbar.tsx",
80
80
  "id": "src/components/bs-snackbar/bs-snackbar.tsx::BsSnackbarVariant"
81
81
  }
82
82
  }
@@ -51,8 +51,8 @@ export class BsSourceLink {
51
51
  };
52
52
  render() {
53
53
  const inner = [
54
- h("span", { key: 'f439433f45bc81b4c515903661311431d99637cd', class: "bs-source-link__left" }, h("span", { key: '4ede9ae3793da7453679723866a519e73ee963aa', class: "bs-source-link__filename-row" }, h("span", { key: '6b4b95fde466988248d34d27705df76acce5927a', part: "icon", class: "bs-source-link__icon" }, h("slot", { key: '24cf2dcc3d04fb2d6e543d1e8bae0e96d0df2d14', name: "icon" }, h(FileTextIcon, { key: 'f04e008075912dfac619c1a2e676346bc7d226d5' }))), h("p", { key: '16b2120d5391930dfc239cb5dd18c40de0cb7aa0', part: "filename", class: "bs-source-link__filename" }, this.fileName)), h("span", { key: 'ec10ed741f33eba57624e0840253f96851f1481a', class: "bs-source-link__meta" }, this.sourceName && (h("span", { key: '56d4a784e30ceff1568bb393d4c3b368f81a0f3e', part: "source", class: "bs-source-link__source" }, this.sourceName)), this.sourceName && this.version && h("span", { key: '95db8a3be1c61741e7d30229c642fea7d321b6b0', class: "bs-source-link__dot", "aria-hidden": "true" }), this.version && (h("span", { key: '4f8caac5193d8671811f9972654ab049f23bac49', part: "version", class: "bs-source-link__version" }, this.version)))),
55
- h("span", { key: '6009485aa7f7d802a82195c50374693f66782737', part: "arrow", class: "bs-source-link__arrow", "aria-hidden": "true" }, h(ArrowUpRightIcon, { key: '1032169a5bfb02f9fbf1d7a5d5d255f313e1da29' })),
54
+ h("span", { key: '2729f16097550b7d60f116006c0cce86085e7fe4', class: "bs-source-link__left" }, h("span", { key: 'ba631a3a1c9c42e855dcbeb9554808dbb1b1f564', class: "bs-source-link__filename-row" }, h("span", { key: '324fec2cf91add6f8b7d7a5eeecfb8d5bcf8d087', part: "icon", class: "bs-source-link__icon" }, h("slot", { key: '504e4702cfe7c49c1c8186f12e5e893dc0cf166d', name: "icon" }, h(FileTextIcon, { key: 'c7eeca554f6b7fa7b4a7091676ccf6344292abc4' }))), h("p", { key: '7631367fe476e307120ea7e6f0f529016bbc86f7', part: "filename", class: "bs-source-link__filename" }, this.fileName)), h("span", { key: 'd67eaeb3e770d9119698bafe8f5c952b99999f5d', class: "bs-source-link__meta" }, this.sourceName && (h("span", { key: '67a08ca2742a10ac99734724e6a4ff0e1abfe870', part: "source", class: "bs-source-link__source" }, this.sourceName)), this.sourceName && this.version && h("span", { key: '5416ffb3915e03d901901455a47fd97ee7eadde5', class: "bs-source-link__dot", "aria-hidden": "true" }), this.version && (h("span", { key: '2c404027613850e260f93ed561306aa73a9eefd0', part: "version", class: "bs-source-link__version" }, this.version)))),
55
+ h("span", { key: '92e95ac26643f3035dc827a568512032622071e3', part: "arrow", class: "bs-source-link__arrow", "aria-hidden": "true" }, h(ArrowUpRightIcon, { key: 'baf53b5ec528ddf042f1717efdf51658a03aae3f' })),
56
56
  ];
57
57
  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));
58
58
  }
@@ -61,7 +61,7 @@ export class BsStepper {
61
61
  });
62
62
  }
63
63
  render() {
64
- return h("slot", { key: '1c5d7d0c6a9fef9c06dfd08bd529a1582fe18478', onSlotchange: this.onSlotChange });
64
+ return h("slot", { key: 'e897ba6e9153f8449bb5189245a22153d0e7e02e', onSlotchange: this.onSlotChange });
65
65
  }
66
66
  static get is() { return "bs-stepper"; }
67
67
  static get encapsulation() { return "shadow"; }
@@ -161,7 +161,7 @@ export class BsStepperStep {
161
161
  "references": {
162
162
  "BsStepperStepComputedState": {
163
163
  "location": "local",
164
- "path": "/home/runner/work/Brandsync-web-components/Brandsync-web-components/packages/wc/src/components/bs-stepper/bs-stepper-step/bs-stepper-step.tsx",
164
+ "path": "/home/runner/work/Brandsync-webcomponents/Brandsync-webcomponents/packages/wc/src/components/bs-stepper/bs-stepper-step/bs-stepper-step.tsx",
165
165
  "id": "src/components/bs-stepper/bs-stepper-step/bs-stepper-step.tsx::BsStepperStepComputedState"
166
166
  }
167
167
  }
@@ -187,7 +187,7 @@ export class BsStepperStep {
187
187
  "references": {
188
188
  "BsStepperDirection": {
189
189
  "location": "local",
190
- "path": "/home/runner/work/Brandsync-web-components/Brandsync-web-components/packages/wc/src/components/bs-stepper/bs-stepper-step/bs-stepper-step.tsx",
190
+ "path": "/home/runner/work/Brandsync-webcomponents/Brandsync-webcomponents/packages/wc/src/components/bs-stepper/bs-stepper-step/bs-stepper-step.tsx",
191
191
  "id": "src/components/bs-stepper/bs-stepper-step/bs-stepper-step.tsx::BsStepperDirection"
192
192
  }
193
193
  }
@@ -84,7 +84,7 @@ export class BsSwitch {
84
84
  "references": {
85
85
  "BsSwitchSize": {
86
86
  "location": "local",
87
- "path": "/home/runner/work/Brandsync-web-components/Brandsync-web-components/packages/wc/src/components/bs-switch/bs-switch.tsx",
87
+ "path": "/home/runner/work/Brandsync-webcomponents/Brandsync-webcomponents/packages/wc/src/components/bs-switch/bs-switch.tsx",
88
88
  "id": "src/components/bs-switch/bs-switch.tsx::BsSwitchSize"
89
89
  }
90
90
  }
@@ -86,7 +86,7 @@ export class BsInlineTab {
86
86
  };
87
87
  render() {
88
88
  const iconOnly = this.hasIcon && !this.hasLabel;
89
- return (h("button", { key: '6313c5d454cd53665dee3180dcf17d37548fa5c5', type: "button", part: "tab", role: "tab", class: `bs-inline-tab ${this.selected ? 'bs-inline-tab--selected' : ''} ${this.disabled ? 'bs-inline-tab--disabled' : ''} ${iconOnly ? 'bs-inline-tab--icon-only' : ''} ${this.hasIcon ? 'bs-inline-tab--has-icon' : ''}`, disabled: this.disabled, "aria-selected": String(this.selected), "aria-disabled": this.disabled ? 'true' : undefined, "aria-label": this.ariaLabel, onClick: this.onClick }, h("span", { key: '14255949e0df5e3d7c763841844964b2d507bc86', part: "icon", class: `bs-inline-tab__icon ${this.hasIcon ? 'bs-inline-tab__icon--has-content' : ''}` }, h("slot", { key: 'f81037da9dbff2c105f0eacad4acd8a7eef84cbe', name: "icon", onSlotchange: this.onIconSlotchange })), h("span", { key: '176c52323b9df0ca53aae20cc80dfc8d5625aa97', part: "label", class: `bs-inline-tab__label ${this.hasLabel ? 'bs-inline-tab__label--has-content' : ''}` }, h("slot", { key: 'b8db261b88931be4e822b2849bd50530d9acc196', onSlotchange: this.onLabelSlotchange }))));
89
+ return (h("button", { key: '613b3ae3cfc8f3589a4c98d834cebadeb7d251c2', type: "button", part: "tab", role: "tab", class: `bs-inline-tab ${this.selected ? 'bs-inline-tab--selected' : ''} ${this.disabled ? 'bs-inline-tab--disabled' : ''} ${iconOnly ? 'bs-inline-tab--icon-only' : ''} ${this.hasIcon ? 'bs-inline-tab--has-icon' : ''}`, disabled: this.disabled, "aria-selected": String(this.selected), "aria-disabled": this.disabled ? 'true' : undefined, "aria-label": this.ariaLabel, onClick: this.onClick }, h("span", { key: 'ee761ca1154bc2c111f5691dc2958f191ec75170', part: "icon", class: `bs-inline-tab__icon ${this.hasIcon ? 'bs-inline-tab__icon--has-content' : ''}` }, h("slot", { key: '2387c2f156ba8207ab337e8f32662a50765b70c4', name: "icon", onSlotchange: this.onIconSlotchange })), h("span", { key: 'e5c4ede4855ba79deffb7566c178c3339605b56c', part: "label", class: `bs-inline-tab__label ${this.hasLabel ? 'bs-inline-tab__label--has-content' : ''}` }, h("slot", { key: '20d73f50caad707f3f5b6853bbda906ced0e3620', onSlotchange: this.onLabelSlotchange }))));
90
90
  }
91
91
  static get is() { return "bs-inline-tab"; }
92
92
  static get encapsulation() { return "shadow"; }
@@ -164,7 +164,7 @@ export class BsTab {
164
164
  "references": {
165
165
  "BsTabIconPosition": {
166
166
  "location": "local",
167
- "path": "/home/runner/work/Brandsync-web-components/Brandsync-web-components/packages/wc/src/components/bs-tab/bs-tab/bs-tab.tsx",
167
+ "path": "/home/runner/work/Brandsync-webcomponents/Brandsync-webcomponents/packages/wc/src/components/bs-tab/bs-tab/bs-tab.tsx",
168
168
  "id": "src/components/bs-tab/bs-tab/bs-tab.tsx::BsTabIconPosition"
169
169
  }
170
170
  }
@@ -75,7 +75,7 @@ export class BsTabs {
75
75
  "references": {
76
76
  "BsTabsType": {
77
77
  "location": "local",
78
- "path": "/home/runner/work/Brandsync-web-components/Brandsync-web-components/packages/wc/src/components/bs-tab/bs-tabs/bs-tabs.tsx",
78
+ "path": "/home/runner/work/Brandsync-webcomponents/Brandsync-webcomponents/packages/wc/src/components/bs-tab/bs-tabs/bs-tabs.tsx",
79
79
  "id": "src/components/bs-tab/bs-tabs/bs-tabs.tsx::BsTabsType"
80
80
  }
81
81
  }
@@ -101,7 +101,7 @@ export class BsTabs {
101
101
  "references": {
102
102
  "BsTabsOrientation": {
103
103
  "location": "local",
104
- "path": "/home/runner/work/Brandsync-web-components/Brandsync-web-components/packages/wc/src/components/bs-tab/bs-tabs/bs-tabs.tsx",
104
+ "path": "/home/runner/work/Brandsync-webcomponents/Brandsync-webcomponents/packages/wc/src/components/bs-tab/bs-tabs/bs-tabs.tsx",
105
105
  "id": "src/components/bs-tab/bs-tabs/bs-tabs.tsx::BsTabsOrientation"
106
106
  }
107
107
  }
@@ -0,0 +1,59 @@
1
+ import { render, h, describe, it, expect } from "@stencil/vitest";
2
+ describe('bs-toast', () => {
3
+ it('defaults to the "info" state', async () => {
4
+ const { root } = await render(h("bs-toast", null, "Files uploaded successfully."));
5
+ const container = root.shadowRoot.querySelector('[part="container"]');
6
+ expect(container).toHaveClass('bs-toast--info');
7
+ });
8
+ ['info', 'success', 'warning', 'error'].forEach(state => {
9
+ it(`applies the "${state}" state class`, async () => {
10
+ const { root } = await render(h("bs-toast", { state: state }, "Message"));
11
+ const container = root.shadowRoot.querySelector('[part="container"]');
12
+ expect(container).toHaveClass(`bs-toast--${state}`);
13
+ });
14
+ });
15
+ it('renders the slotted message', async () => {
16
+ const { root } = await render(h("bs-toast", null, "Files uploaded successfully."));
17
+ expect(root).toHaveTextContent('Files uploaded successfully.');
18
+ });
19
+ describe('icon per state', () => {
20
+ it('renders an icon for the info state', async () => {
21
+ const { root } = await render(h("bs-toast", { state: "info" }, "Message"));
22
+ const icon = root.shadowRoot.querySelector('[part="icon"]');
23
+ expect(icon.querySelector('svg')).not.toBeNull();
24
+ });
25
+ it('renders a different icon markup per state', async () => {
26
+ const renders = await Promise.all(['info', 'success', 'warning', 'error'].map(async (state) => {
27
+ const { root } = await render(h("bs-toast", { state: state }, "Message"));
28
+ return root.shadowRoot.querySelector('[part="icon"]').innerHTML;
29
+ }));
30
+ expect(new Set(renders).size).toBe(renders.length);
31
+ });
32
+ });
33
+ describe('close button', () => {
34
+ it('always renders a close button with an accessible name', async () => {
35
+ const { root } = await render(h("bs-toast", null, "Message"));
36
+ const close = root.shadowRoot.querySelector('[part="close"]');
37
+ expect(close).not.toBeNull();
38
+ expect(close).toEqualAttribute('aria-label', 'Dismiss');
39
+ });
40
+ it('emits bsDismiss when the close button is clicked', async () => {
41
+ const { root, spyOnEvent } = await render(h("bs-toast", null, "Message"));
42
+ const dismissSpy = spyOnEvent('bsDismiss');
43
+ root.shadowRoot.querySelector('[part="close"]').click();
44
+ expect(dismissSpy).toHaveReceivedEventTimes(1);
45
+ });
46
+ });
47
+ describe('aria-live', () => {
48
+ it('uses aria-live="polite" for non-error states', async () => {
49
+ const { root } = await render(h("bs-toast", { state: "success" }, "Message"));
50
+ const container = root.shadowRoot.querySelector('[part="container"]');
51
+ expect(container).toEqualAttribute('aria-live', 'polite');
52
+ });
53
+ it('uses aria-live="assertive" for the error state', async () => {
54
+ const { root } = await render(h("bs-toast", { state: "error" }, "Message"));
55
+ const container = root.shadowRoot.querySelector('[part="container"]');
56
+ expect(container).toEqualAttribute('aria-live', 'assertive');
57
+ });
58
+ });
59
+ });
@@ -0,0 +1,151 @@
1
+ /**
2
+ * @prop --bs-toast-radius: Corner radius of the toast. Aliased to --bs-border-radius-100.
3
+ * @prop --bs-toast-shadow: Elevation shadow, since a toast floats above page content. Aliased to --bs-shadow-md.
4
+ * @prop --bs-toast-content-padding-y: Top/bottom padding of the content area. Aliased to --bs-spacing-200.
5
+ * @prop --bs-toast-content-padding-x: Left padding of the content area (the toast's own left edge). Aliased to --bs-spacing-200.
6
+ * @prop --bs-toast-content-gap: Gap between the icon and the message. Aliased to --bs-spacing-150.
7
+ * @prop --bs-toast-font-size: Message font size. Aliased to --bs-font-size-md.
8
+ * @prop --bs-toast-line-height: Message line height. Aliased to --bs-line-height-body-md.
9
+ * @prop --bs-toast-actions-padding-y: Top/bottom padding of the actions area. Aliased to --bs-spacing-50.
10
+ * @prop --bs-toast-actions-padding-x: Right padding of the actions area (the toast's own right edge). Aliased to --bs-spacing-100.
11
+ * @prop --bs-toast-close-radius: Corner radius of the close button. Aliased to --bs-border-radius-100.
12
+ * @prop --bs-toast-surface-info: Toast background, state="info". Aliased to --bs-color-info-container.
13
+ * @prop --bs-toast-text-info: Icon/message/close color, state="info". Aliased to --bs-text-info.
14
+ * @prop --bs-toast-surface-warning: Toast background, state="warning". Aliased to --bs-color-warning-container.
15
+ * @prop --bs-toast-text-warning: Icon/message/close color, state="warning". Aliased to --bs-text-warning.
16
+ * @prop --bs-toast-surface-success: Toast background, state="success". Aliased to --bs-color-success-container.
17
+ * @prop --bs-toast-text-success: Icon/message/close color, state="success". Aliased to --bs-text-success.
18
+ * @prop --bs-toast-surface-error: Toast background, state="error". Aliased to --bs-color-error-container.
19
+ * @prop --bs-toast-text-error: Icon/message/close color, state="error". Aliased to --bs-text-error.
20
+ */
21
+ :host {
22
+ display: inline-flex;
23
+
24
+ --bs-toast-radius: var(--bs-border-radius-100);
25
+ --bs-toast-shadow: var(--bs-shadow-md);
26
+ --bs-toast-content-padding-y: var(--bs-spacing-200);
27
+ --bs-toast-content-padding-x: var(--bs-spacing-200);
28
+ --bs-toast-content-gap: var(--bs-spacing-150);
29
+ --bs-toast-font-size: var(--bs-font-size-md);
30
+ --bs-toast-line-height: var(--bs-line-height-body-md);
31
+ --bs-toast-actions-padding-y: var(--bs-spacing-50);
32
+ --bs-toast-actions-padding-x: var(--bs-spacing-100);
33
+ --bs-toast-close-radius: var(--bs-border-radius-100);
34
+
35
+ --bs-toast-surface-info: var(--bs-color-info-container);
36
+ --bs-toast-text-info: var(--bs-text-info);
37
+
38
+ --bs-toast-surface-warning: var(--bs-color-warning-container);
39
+ --bs-toast-text-warning: var(--bs-text-warning);
40
+
41
+ --bs-toast-surface-success: var(--bs-color-success-container);
42
+ --bs-toast-text-success: var(--bs-text-success);
43
+
44
+ --bs-toast-surface-error: var(--bs-color-error-container);
45
+ --bs-toast-text-error: var(--bs-text-error);
46
+ }
47
+
48
+ .bs-toast {
49
+ display: flex;
50
+ align-items: center;
51
+ border-radius: var(--bs-toast-radius);
52
+ box-shadow: var(--bs-toast-shadow);
53
+ font-family: inherit;
54
+ }
55
+
56
+ /* Each state sets its own surface/text pair -- .bs-toast__icon, .bs-toast__message, and
57
+ .bs-toast__close all inherit `color` from here rather than each redeclaring it. */
58
+ .bs-toast--info {
59
+ background: var(--bs-toast-surface-info);
60
+ color: var(--bs-toast-text-info);
61
+ }
62
+
63
+ .bs-toast--warning {
64
+ background: var(--bs-toast-surface-warning);
65
+ color: var(--bs-toast-text-warning);
66
+ }
67
+
68
+ .bs-toast--success {
69
+ background: var(--bs-toast-surface-success);
70
+ color: var(--bs-toast-text-success);
71
+ }
72
+
73
+ .bs-toast--error {
74
+ background: var(--bs-toast-surface-error);
75
+ color: var(--bs-toast-text-error);
76
+ }
77
+
78
+ .bs-toast__content {
79
+ display: flex;
80
+ align-items: center;
81
+ gap: var(--bs-toast-content-gap);
82
+ flex: 1 1 auto;
83
+ min-width: 0;
84
+ padding: var(--bs-toast-content-padding-y) 0 var(--bs-toast-content-padding-y) var(--bs-toast-content-padding-x);
85
+ }
86
+
87
+ .bs-toast__icon {
88
+ display: flex;
89
+ align-items: center;
90
+ justify-content: center;
91
+ width: 24px;
92
+ height: 24px;
93
+ flex-shrink: 0;
94
+ color: inherit;
95
+ }
96
+
97
+ .bs-toast__icon svg {
98
+ width: 24px;
99
+ height: 24px;
100
+ }
101
+
102
+ .bs-toast__message {
103
+ flex: 1 1 auto;
104
+ min-width: 0;
105
+ font-size: var(--bs-toast-font-size);
106
+ line-height: calc(var(--bs-toast-line-height) * 1px);
107
+ }
108
+
109
+ .bs-toast__actions {
110
+ display: flex;
111
+ align-items: center;
112
+ align-self: stretch;
113
+ flex-shrink: 0;
114
+ padding: var(--bs-toast-actions-padding-y) var(--bs-toast-actions-padding-x) var(--bs-toast-actions-padding-y) 0;
115
+ }
116
+
117
+ .bs-toast__close {
118
+ display: flex;
119
+ align-items: center;
120
+ justify-content: center;
121
+ width: 44px;
122
+ height: 44px;
123
+ flex-shrink: 0;
124
+ padding: 0;
125
+ border: none;
126
+ background: transparent;
127
+ border-radius: var(--bs-toast-close-radius);
128
+ color: inherit;
129
+ cursor: pointer;
130
+ }
131
+
132
+ .bs-toast__close svg {
133
+ width: 24px;
134
+ height: 24px;
135
+ }
136
+
137
+ /* Same color-mix tint technique as bs-snackbar's close button -- a transparent background with
138
+ only text color, so a real added tint (not an opacity blend toward whatever's behind) is needed
139
+ for hover/pressed feedback to read correctly on the light pastel state surfaces. */
140
+ .bs-toast__close:hover {
141
+ background: color-mix(in srgb, currentColor 12%, transparent);
142
+ }
143
+
144
+ .bs-toast__close:active {
145
+ background: color-mix(in srgb, currentColor 24%, transparent);
146
+ }
147
+
148
+ .bs-toast__close:focus-visible {
149
+ outline: 2px solid currentColor;
150
+ outline-offset: 2px;
151
+ }
@@ -0,0 +1,108 @@
1
+ import { h } from "@stencil/core";
2
+ /**
3
+ * A transient status message for confirming the result of an action (e.g. "Files uploaded
4
+ * successfully.") -- a state-specific icon, a message, and a close button.
5
+ *
6
+ * This component only renders the toast itself -- it doesn't manage its own visibility, timing, or
7
+ * stacking. A consumer (typically a small "toast manager" utility) creates one per message and
8
+ * removes it from the DOM again, whether on a timer or on `bsDismiss`. Figma's spec doesn't show
9
+ * auto-dismiss timing at all (it's a static visual spec), so this deliberately doesn't invent one.
10
+ *
11
+ * @slot - Default slot: the message text.
12
+ * @part container - The outer toast.
13
+ * @part icon - The leading icon wrapper.
14
+ * @part message - The message text wrapper.
15
+ * @part close - The close button.
16
+ */
17
+ export class BsToast {
18
+ /** Semantic state. Each state has its own icon and matching container/text tokens -- there is
19
+ * no neutral/default state. */
20
+ state = 'info';
21
+ /** Fires when the close button is clicked. This component doesn't remove itself from the DOM --
22
+ * the consumer is expected to do that (or hide it) in response to this event. */
23
+ bsDismiss;
24
+ onDismiss = () => {
25
+ this.bsDismiss.emit();
26
+ };
27
+ render() {
28
+ return (h("div", { key: '46791568d11373681bdb2eae526fc29f93cc1ba6', part: "container", class: `bs-toast bs-toast--${this.state}`, role: "status", "aria-live": this.state === 'error' ? 'assertive' : 'polite' }, h("div", { key: '77b3faf40813c86dd624ec665e6e4eb0e6cb80b8', class: "bs-toast__content" }, h("span", { key: 'b8c2e8d6c729b8aaaf540906f55feaf95ea0d42c', part: "icon", class: "bs-toast__icon", "aria-hidden": "true" }, h(StateIcon, { key: '4c69c6dc371c2f7bc1cf393c293fadfd30fabcea', state: this.state })), h("span", { key: '3938894f0ad2c99bece035b5049b806847b6fc69', part: "message", class: "bs-toast__message" }, h("slot", { key: '35566107844c74a57b37b00d369a8396db821f5f' }))), h("div", { key: 'df56dba231fa2e6cf4ad5bd57bb2b4608161294d', class: "bs-toast__actions" }, h("button", { key: 'c0f78562bd1acbc421b87d6915d48c7768795e78', part: "close", type: "button", class: "bs-toast__close", "aria-label": "Dismiss", onClick: this.onDismiss }, h(CloseIcon, { key: 'b74a4cbb76307190bf9af2651e52791ba814b2af' })))));
29
+ }
30
+ static get is() { return "bs-toast"; }
31
+ static get encapsulation() { return "shadow"; }
32
+ static get originalStyleUrls() {
33
+ return {
34
+ "$": ["bs-toast.css"]
35
+ };
36
+ }
37
+ static get styleUrls() {
38
+ return {
39
+ "$": ["bs-toast.css"]
40
+ };
41
+ }
42
+ static get properties() {
43
+ return {
44
+ "state": {
45
+ "type": "string",
46
+ "mutable": false,
47
+ "complexType": {
48
+ "original": "BsToastState",
49
+ "resolved": "\"error\" | \"info\" | \"success\" | \"warning\"",
50
+ "references": {
51
+ "BsToastState": {
52
+ "location": "local",
53
+ "path": "/home/runner/work/Brandsync-webcomponents/Brandsync-webcomponents/packages/wc/src/components/bs-toast/bs-toast.tsx",
54
+ "id": "src/components/bs-toast/bs-toast.tsx::BsToastState"
55
+ }
56
+ }
57
+ },
58
+ "required": false,
59
+ "optional": false,
60
+ "docs": {
61
+ "tags": [],
62
+ "text": "Semantic state. Each state has its own icon and matching container/text tokens -- there is\nno neutral/default state."
63
+ },
64
+ "getter": false,
65
+ "setter": false,
66
+ "reflect": false,
67
+ "attribute": "state",
68
+ "defaultValue": "'info'"
69
+ }
70
+ };
71
+ }
72
+ static get events() {
73
+ return [{
74
+ "method": "bsDismiss",
75
+ "name": "bsDismiss",
76
+ "bubbles": true,
77
+ "cancelable": true,
78
+ "composed": true,
79
+ "docs": {
80
+ "tags": [],
81
+ "text": "Fires when the close button is clicked. This component doesn't remove itself from the DOM --\nthe consumer is expected to do that (or hide it) in response to this event."
82
+ },
83
+ "complexType": {
84
+ "original": "void",
85
+ "resolved": "void",
86
+ "references": {}
87
+ }
88
+ }];
89
+ }
90
+ }
91
+ const StateIcon = ({ state }) => {
92
+ switch (state) {
93
+ case 'success':
94
+ return h(CheckCircleIcon, null);
95
+ case 'warning':
96
+ return h(WarningIcon, null);
97
+ case 'error':
98
+ return h(XCircleIcon, null);
99
+ case 'info':
100
+ default:
101
+ return h(InfoIcon, null);
102
+ }
103
+ };
104
+ const InfoIcon = () => (h("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, h("path", { d: "M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21Z", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M12 11V16.5", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M12 8.25V7.75", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" })));
105
+ const CheckCircleIcon = () => (h("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, h("path", { d: "M8.25 12.75L10.5 15L15.75 9.75", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21Z", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" })));
106
+ const WarningIcon = () => (h("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, h("path", { d: "M10.4384 4.42212C11.1155 3.22528 12.8845 3.22528 13.5616 4.42212L20.6023 16.8508C21.2627 18.0182 20.4022 19.5 19.0407 19.5H4.95933C3.5978 19.5 2.73734 18.0182 3.39773 16.8508L10.4384 4.42212Z", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M12 9.75V13.5", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M12 16.25V16.75", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" })));
107
+ const XCircleIcon = () => (h("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, h("path", { d: "M9.75 9.75L14.25 14.25", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M14.25 9.75L9.75 14.25", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21Z", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" })));
108
+ const CloseIcon = () => (h("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, h("path", { d: "M18.75 5.25L5.25 18.75", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M18.75 18.75L5.25 5.25", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })));
@@ -0,0 +1,39 @@
1
+ import { html } from "lit";
2
+ import { componentDescription, propDescription } from "../../stories-utils";
3
+ const states = ['info', 'success', 'warning', 'error'];
4
+ // Demonstrates a real consumer reaction to bsDismiss -- the component itself doesn't remove or
5
+ // hide anything on dismiss (see the class JSDoc: that's deliberately left to the consumer). Without
6
+ // this, clicking the close button visibly does nothing in the story, which reads as "the button
7
+ // doesn't work" even though the click handler did fire (see the bsDismiss test coverage).
8
+ const hideOnDismiss = (ev) => {
9
+ ev.currentTarget.style.display = 'none';
10
+ };
11
+ const meta = {
12
+ title: 'Components/bs-toast',
13
+ parameters: { docs: { description: { component: componentDescription('bs-toast') } } },
14
+ render: args => html `
15
+ <bs-toast state=${args.state} @bsDismiss=${hideOnDismiss}>${args.message}</bs-toast>
16
+ `,
17
+ argTypes: {
18
+ state: { control: { type: 'select' }, options: states, description: propDescription('bs-toast', 'state') },
19
+ message: { control: 'text', description: 'Slotted message content (not a real attribute -- see the default slot).' },
20
+ },
21
+ args: {
22
+ state: 'info',
23
+ message: 'Files uploaded successfully.',
24
+ },
25
+ };
26
+ export default meta;
27
+ export const Default = {};
28
+ // One instance per state, side by side, matching the Figma spec's column layout.
29
+ export const AllStates = {
30
+ name: 'All states',
31
+ render: () => html `
32
+ <div style="display: flex; flex-direction: column; gap: 12px;">
33
+ ${states.map(state => html ` <bs-toast state=${state} @bsDismiss=${hideOnDismiss}>Files uploaded successfully.</bs-toast> `)}
34
+ </div>
35
+ `,
36
+ };
37
+ export const Overflow = {
38
+ args: { message: 'Your changes were saved, but some fields may fail.' },
39
+ };
@@ -42,7 +42,7 @@ export class BsTooltip {
42
42
  */
43
43
  placement = 'top';
44
44
  render() {
45
- return (h("div", { key: '826c86a864ed2b09e1889908daf64fe8cc7062b8', class: "bs-tooltip" }, h("span", { key: 'e04ca83b8422ccd1fdb64c8a91e2e4e332f226ed', part: "arrow", class: "bs-tooltip__arrow" }), h("div", { key: 'c02cf0ed9cfeedc3c6ca71e5770e546b841bf70f', part: "bubble", class: "bs-tooltip__bubble" }, h("slot", { key: '2279ab519e7372a339823c252e0e9da2aa7a6789' }))));
45
+ return (h("div", { key: '425dac71d4f76074266a2e1676f8b443e300fd94', class: "bs-tooltip" }, h("span", { key: '0af2492abc554c9def9e338eada6ba7ac156fc28', part: "arrow", class: "bs-tooltip__arrow" }), h("div", { key: '34c5700bfac8ecadd0712a5356f334eac5d497fd', part: "bubble", class: "bs-tooltip__bubble" }, h("slot", { key: 'd46c949de53165a7a0f7f2fa3ffb2058558ce18d' }))));
46
46
  }
47
47
  static get is() { return "bs-tooltip"; }
48
48
  static get encapsulation() { return "shadow"; }
@@ -117,7 +117,7 @@ export class BsNavigationDrawer {
117
117
  this.bsSearchClick.emit();
118
118
  };
119
119
  render() {
120
- return (h("nav", { key: '17b56ce49345a5b231562b93813062eaf21e4428', class: "bs-navigation-drawer", "aria-label": this.heading }, this.showLogo && (h("div", { key: '09ef0345e3c0036d4998aa6acc5f8c4bda0b534f', part: "logo", class: "bs-navigation-drawer__logo bs-navigation-drawer__logo--full" }, h("bs-logo", { key: 'c3c32c4e56e7b48b0af47ffc6bde76380906377b', variant: "full", background: this.logoBackground }))), this.showLogo && (h("div", { key: 'ddb44276e763d7ac380023bb73da2de8ff937b5b', part: "logo", class: "bs-navigation-drawer__logo bs-navigation-drawer__logo--mark" }, h("bs-logo", { key: '983e33610e902ba037c7c25a3f7c31d5f6a36cfa', variant: "mark", background: this.logoBackground }))), h("div", { key: 'db121c85fdd60dceee275d252c525e6ee85e24c9', class: "bs-navigation-drawer__title-row" }, h("span", { key: '6b8588a9fbfb3c015690ac7b0d144a852599a3c5', part: "title", class: "bs-navigation-drawer__title" }, this.heading), this.collapsible && (h("button", { key: '3ec776f2552d99deaa02468e659efd9d061fdbd3', type: "button", part: "collapse", class: "bs-navigation-drawer__collapse", "aria-label": this.collapsed ? 'Expand' : 'Collapse', "aria-pressed": this.collapsed ? 'true' : 'false', onClick: this.onCollapseClick }, h(CaretLeftIcon, { key: '60490f60829b436bd7ddd66631152f01a8b8790d' })))), h("div", { key: '72ec3f2adeaa8cb5f1d771151424ab8f41cfb8c2', part: "search", class: "bs-navigation-drawer__search" }, h("slot", { key: '6ed64f9cae2c25102e96eb92802304e77e31b3ee', name: "search" })), h("button", { key: '314a6a509224ee5a1ccac82ac13b9ac958d0add7', type: "button", part: "search-trigger", class: "bs-navigation-drawer__search-trigger", "aria-label": "Search", onClick: this.onSearchTriggerClick }, h(SearchIcon, { key: 'e68d5d4812d35c043feabca90b560deca2a69b6b' })), h("div", { key: '8dd4c3a0249a290ad313c4bf68c5a2f9bd903835', part: "items", class: "bs-navigation-drawer__items" }, h("slot", { key: '82a2278750f673a714fa9ed44c78636387e621b8' }))));
120
+ return (h("nav", { key: 'fcd220918c861178927434a20225de51d2d37d35', class: "bs-navigation-drawer", "aria-label": this.heading }, this.showLogo && (h("div", { key: 'd156193396387f2785300f56e79af12509b74634', part: "logo", class: "bs-navigation-drawer__logo bs-navigation-drawer__logo--full" }, h("bs-logo", { key: '0d136d743d63b455fa837e0f8a14f66dd4ecce40', variant: "full", background: this.logoBackground }))), this.showLogo && (h("div", { key: '913420e2692e0acff0dfb2375042dbd197e971c2', part: "logo", class: "bs-navigation-drawer__logo bs-navigation-drawer__logo--mark" }, h("bs-logo", { key: '44e1a6f3dc00b3545bcf0967a81562759fde8eff', variant: "mark", background: this.logoBackground }))), h("div", { key: '63aa4a6c561987a6b8308b85403fcca5507b5916', class: "bs-navigation-drawer__title-row" }, h("span", { key: 'd3dec951669d8462c3b5ca24691fb83c4778d787', part: "title", class: "bs-navigation-drawer__title" }, this.heading), this.collapsible && (h("button", { key: '84f6d11f0bdfbd9a01bb2897a637aaf0288299dc', type: "button", part: "collapse", class: "bs-navigation-drawer__collapse", "aria-label": this.collapsed ? 'Expand' : 'Collapse', "aria-pressed": this.collapsed ? 'true' : 'false', onClick: this.onCollapseClick }, h(CaretLeftIcon, { key: 'f5dc6909ddbd27c5782bba9eb1f3cfe9d0d94c56' })))), h("div", { key: '62d76c3000619b51b0f6748e7a85c30bade186b8', part: "search", class: "bs-navigation-drawer__search" }, h("slot", { key: 'bafd49641220d77c6a8b94b83869910e7dfc3d84', name: "search" })), h("button", { key: '07d29e4f52aca08fbba9f5a9ecab272a7755a45e', type: "button", part: "search-trigger", class: "bs-navigation-drawer__search-trigger", "aria-label": "Search", onClick: this.onSearchTriggerClick }, h(SearchIcon, { key: '773925119f869af5a6f797a36225c7b25a25069a' })), h("div", { key: 'c84356cb2061037cb5e5a152acf2e69f23eb6be8', part: "items", class: "bs-navigation-drawer__items" }, h("slot", { key: 'a449e8919b8b6cd29c33013d3691894ccae9a03f' }))));
121
121
  }
122
122
  static get is() { return "bs-navigation-drawer"; }
123
123
  static get encapsulation() { return "shadow"; }