@brandsync/wc 1.13.0 → 1.14.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 (201) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/REFERENCE.md +31 -0
  3. package/custom-elements.json +204 -0
  4. package/dist/brandsync-wc/brandsync-wc.esm.js +1 -1
  5. package/dist/brandsync-wc/{p-c3da3080.entry.js → p-056608f0.entry.js} +1 -1
  6. package/dist/brandsync-wc/{p-cd53bba9.entry.js → p-0e738622.entry.js} +1 -1
  7. package/dist/brandsync-wc/{p-4ea9b6a1.entry.js → p-16c78ff6.entry.js} +1 -1
  8. package/dist/brandsync-wc/{p-3f6682f8.entry.js → p-204cc690.entry.js} +1 -1
  9. package/dist/brandsync-wc/p-221244a9.entry.js +1 -0
  10. package/dist/brandsync-wc/{p-ed5c2d97.entry.js → p-227a5182.entry.js} +1 -1
  11. package/dist/brandsync-wc/{p-9b58c0c5.entry.js → p-2967240d.entry.js} +1 -1
  12. package/dist/brandsync-wc/{p-68f0be29.entry.js → p-2c1efaa1.entry.js} +1 -1
  13. package/dist/brandsync-wc/{p-cceb8484.entry.js → p-2e68b76e.entry.js} +1 -1
  14. package/dist/brandsync-wc/{p-23cc532f.entry.js → p-315b510c.entry.js} +1 -1
  15. package/dist/brandsync-wc/{p-53362609.entry.js → p-31cd66e0.entry.js} +1 -1
  16. package/dist/brandsync-wc/p-3477539c.entry.js +1 -0
  17. package/dist/brandsync-wc/{p-0e940ee1.entry.js → p-3dabf202.entry.js} +1 -1
  18. package/dist/brandsync-wc/{p-d64cae57.entry.js → p-4b40a596.entry.js} +1 -1
  19. package/dist/brandsync-wc/{p-f134a502.entry.js → p-51f40972.entry.js} +1 -1
  20. package/dist/brandsync-wc/{p-9cf8274a.entry.js → p-617bd76d.entry.js} +1 -1
  21. package/dist/brandsync-wc/{p-f8d47004.entry.js → p-686297f1.entry.js} +1 -1
  22. package/dist/brandsync-wc/{p-86028548.entry.js → p-80700878.entry.js} +1 -1
  23. package/dist/brandsync-wc/{p-b0b2e525.entry.js → p-833f9dc4.entry.js} +1 -1
  24. package/dist/brandsync-wc/{p-fb4d0093.entry.js → p-9fa67924.entry.js} +1 -1
  25. package/dist/brandsync-wc/{p-fa34fe20.entry.js → p-a2e59aca.entry.js} +1 -1
  26. package/dist/brandsync-wc/{p-95f034fc.entry.js → p-b793a0d6.entry.js} +1 -1
  27. package/dist/brandsync-wc/{p-ab07c9b5.entry.js → p-c488cc8b.entry.js} +1 -1
  28. package/dist/brandsync-wc/p-c67bc817.entry.js +1 -0
  29. package/dist/brandsync-wc/{p-4ea435a6.entry.js → p-cc1055e6.entry.js} +1 -1
  30. package/dist/brandsync-wc/{p-c679b631.entry.js → p-cc25ee67.entry.js} +1 -1
  31. package/dist/brandsync-wc/{p-07966676.entry.js → p-d892277f.entry.js} +1 -1
  32. package/dist/brandsync-wc/{p-e0504a4b.entry.js → p-dd52209a.entry.js} +1 -1
  33. package/dist/brandsync-wc/{p-694fe468.entry.js → p-df3e7973.entry.js} +1 -1
  34. package/dist/brandsync-wc/{p-7e24dbd7.entry.js → p-e0927a9a.entry.js} +1 -1
  35. package/dist/brandsync-wc/{p-4054a944.entry.js → p-e6fc2cd4.entry.js} +1 -1
  36. package/dist/cjs/brandsync-wc.cjs.js +1 -1
  37. package/dist/cjs/bs-accordion-group.cjs.entry.js +1 -1
  38. package/dist/cjs/bs-ai-disclaimer.cjs.entry.js +1 -1
  39. package/dist/cjs/bs-ai-greeting.cjs.entry.js +1 -1
  40. package/dist/cjs/bs-ai-thinking.cjs.entry.js +1 -1
  41. package/dist/cjs/bs-attachment-list.cjs.entry.js +1 -1
  42. package/dist/cjs/bs-breadcrumbs.cjs.entry.js +1 -1
  43. package/dist/cjs/bs-button-skeleton.cjs.entry.js +1 -1
  44. package/dist/cjs/bs-chatbot-feedback.cjs.entry.js +1 -1
  45. package/dist/cjs/bs-chatbot-header.cjs.entry.js +1 -1
  46. package/dist/cjs/bs-chatbot-response-action.cjs.entry.js +1 -1
  47. package/dist/cjs/bs-chatbot-sources-drawer.cjs.entry.js +1 -1
  48. package/dist/cjs/bs-chatbot-suggestion-button.cjs.entry.js +1 -1
  49. package/dist/cjs/bs-checkbox-skeleton.cjs.entry.js +1 -1
  50. package/dist/cjs/bs-citation-preview.cjs.entry.js +1 -1
  51. package/dist/cjs/bs-inline-tab.cjs.entry.js +1 -1
  52. package/dist/cjs/bs-input_3.cjs.entry.js +4 -4
  53. package/dist/cjs/bs-message-list.cjs.entry.js +1 -1
  54. package/dist/cjs/bs-navigation-drawer-item.cjs.entry.js +1 -1
  55. package/dist/cjs/bs-navigation-drawer.cjs.entry.js +2 -2
  56. package/dist/cjs/bs-pagination.cjs.entry.js +1 -1
  57. package/dist/cjs/bs-radio.cjs.entry.js +1 -1
  58. package/dist/cjs/bs-source-link.cjs.entry.js +2 -2
  59. package/dist/cjs/bs-split-pane.cjs.entry.js +193 -0
  60. package/dist/cjs/bs-stepper-step.cjs.entry.js +1 -1
  61. package/dist/cjs/bs-stepper.cjs.entry.js +1 -1
  62. package/dist/cjs/bs-switch.cjs.entry.js +1 -1
  63. package/dist/cjs/bs-tab_3.cjs.entry.js +3 -3
  64. package/dist/cjs/bs-timepicker.cjs.entry.js +2 -2
  65. package/dist/cjs/bs-toast.cjs.entry.js +1 -1
  66. package/dist/cjs/bs-tooltip-trigger.cjs.entry.js +1 -1
  67. package/dist/cjs/bs-tooltip.cjs.entry.js +1 -1
  68. package/dist/cjs/loader.cjs.js +1 -1
  69. package/dist/collection/collection-manifest.json +1 -0
  70. package/dist/collection/components/bs-accordion-group/bs-accordion-group.js +1 -1
  71. package/dist/collection/components/bs-ai-disclaimer/bs-ai-disclaimer.js +1 -1
  72. package/dist/collection/components/bs-ai-greeting/bs-ai-greeting.js +1 -1
  73. package/dist/collection/components/bs-ai-thinking/bs-ai-thinking.js +1 -1
  74. package/dist/collection/components/bs-attachment-list/bs-attachment-list.js +1 -1
  75. package/dist/collection/components/bs-breadcrumb/bs-breadcrumbs/bs-breadcrumbs.js +1 -1
  76. package/dist/collection/components/bs-button-skeleton/bs-button-skeleton.js +1 -1
  77. package/dist/collection/components/bs-chatbot-feedback/bs-chatbot-feedback.js +1 -1
  78. package/dist/collection/components/bs-chatbot-header/bs-chatbot-header.js +1 -1
  79. package/dist/collection/components/bs-chatbot-response-action/bs-chatbot-response-action.js +1 -1
  80. package/dist/collection/components/bs-chatbot-sources-drawer/bs-chatbot-sources-drawer.js +1 -1
  81. package/dist/collection/components/bs-chatbot-suggestion-button/bs-chatbot-suggestion-button.js +1 -1
  82. package/dist/collection/components/bs-checkbox/bs-checkbox-skeleton/bs-checkbox-skeleton.js +1 -1
  83. package/dist/collection/components/bs-citation-preview/bs-citation-preview.js +1 -1
  84. package/dist/collection/components/bs-input/bs-input.js +2 -2
  85. package/dist/collection/components/bs-menu/bs-menu.js +1 -1
  86. package/dist/collection/components/bs-menu-item/bs-menu-item.js +1 -1
  87. package/dist/collection/components/bs-message-list/bs-message-list.js +1 -1
  88. package/dist/collection/components/bs-pagination/bs-pagination.js +1 -1
  89. package/dist/collection/components/bs-radio/bs-radio.js +1 -1
  90. package/dist/collection/components/bs-source-link/bs-source-link.js +2 -2
  91. package/dist/collection/components/bs-split-pane/bs-split-pane.cmp.test.js +107 -0
  92. package/dist/collection/components/bs-split-pane/bs-split-pane.css +108 -0
  93. package/dist/collection/components/bs-split-pane/bs-split-pane.js +404 -0
  94. package/dist/collection/components/bs-split-pane/bs-split-pane.stories.js +47 -0
  95. package/dist/collection/components/bs-stepper/bs-stepper/bs-stepper.js +1 -1
  96. package/dist/collection/components/bs-stepper/bs-stepper-step/bs-stepper-step.js +1 -1
  97. package/dist/collection/components/bs-switch/bs-switch.js +1 -1
  98. package/dist/collection/components/bs-tab/bs-inline-tab/bs-inline-tab.js +1 -1
  99. package/dist/collection/components/bs-tab/bs-tab/bs-tab.js +1 -1
  100. package/dist/collection/components/bs-tab/bs-tabs/bs-tabs.js +1 -1
  101. package/dist/collection/components/bs-timepicker/bs-timepicker.js +2 -2
  102. package/dist/collection/components/bs-toast/bs-toast.js +1 -1
  103. package/dist/collection/components/bs-tooltip/bs-tooltip.js +1 -1
  104. package/dist/collection/components/bs-tooltip-trigger/bs-tooltip-trigger.js +1 -1
  105. package/dist/collection/components/bs-whats-new-entry/bs-whats-new-entry.js +1 -1
  106. package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.js +2 -2
  107. package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer-item/bs-navigation-drawer-item.js +1 -1
  108. package/dist/components/bs-accordion-group.js +1 -1
  109. package/dist/components/bs-ai-disclaimer.js +1 -1
  110. package/dist/components/bs-ai-greeting.js +1 -1
  111. package/dist/components/bs-ai-thinking.js +1 -1
  112. package/dist/components/bs-attachment-list.js +1 -1
  113. package/dist/components/bs-breadcrumb-overflow.js +1 -1
  114. package/dist/components/bs-breadcrumbs.js +1 -1
  115. package/dist/components/bs-button-skeleton.js +1 -1
  116. package/dist/components/bs-carousel.js +1 -1
  117. package/dist/components/bs-chatbot-feedback.js +1 -1
  118. package/dist/components/bs-chatbot-header.js +1 -1
  119. package/dist/components/bs-chatbot-response-action.js +1 -1
  120. package/dist/components/bs-chatbot-sources-drawer.js +1 -1
  121. package/dist/components/bs-chatbot-suggestion-button.js +1 -1
  122. package/dist/components/bs-checkbox-skeleton.js +1 -1
  123. package/dist/components/bs-citation-preview.js +1 -1
  124. package/dist/components/bs-cookie-consent.js +1 -1
  125. package/dist/components/bs-datepicker.js +1 -1
  126. package/dist/components/bs-inline-tab.js +1 -1
  127. package/dist/components/bs-input.js +1 -1
  128. package/dist/components/bs-menu-item.js +1 -1
  129. package/dist/components/bs-menu.js +1 -1
  130. package/dist/components/bs-message-list.js +1 -1
  131. package/dist/components/bs-navigation-drawer-item.js +1 -1
  132. package/dist/components/bs-navigation-drawer.js +1 -1
  133. package/dist/components/bs-pagination.js +1 -1
  134. package/dist/components/bs-radio.js +1 -1
  135. package/dist/components/bs-session-timeout.js +1 -1
  136. package/dist/components/bs-source-link.js +1 -1
  137. package/dist/components/bs-split-pane.d.ts +11 -0
  138. package/dist/components/bs-split-pane.js +1 -0
  139. package/dist/components/bs-stepper-step.js +1 -1
  140. package/dist/components/bs-stepper.js +1 -1
  141. package/dist/components/bs-switch.js +1 -1
  142. package/dist/components/bs-tab.js +1 -1
  143. package/dist/components/bs-tabs.js +1 -1
  144. package/dist/components/bs-timepicker.js +1 -1
  145. package/dist/components/bs-toast.js +1 -1
  146. package/dist/components/bs-tooltip-trigger.js +1 -1
  147. package/dist/components/bs-tooltip.js +1 -1
  148. package/dist/components/bs-whats-new-entry.js +1 -1
  149. package/dist/components/bs-whats-new.js +1 -1
  150. package/dist/components/{p-Bfq5YVOv.js → p-BESyTlfT.js} +1 -1
  151. package/dist/components/{p-C9jIMBG3.js → p-BIW9eUic.js} +1 -1
  152. package/dist/components/{p-owdeCW0M.js → p-BJR8KVFc.js} +1 -1
  153. package/dist/components/{p-BVhF8cZQ.js → p-CDYw4Eyj.js} +1 -1
  154. package/dist/components/{p-C2NR1v3p.js → p-CiSEDtbE.js} +1 -1
  155. package/dist/components/{p-DfzrJKwN.js → p-Dm3TqgV_.js} +1 -1
  156. package/dist/components/{p-uHvS81XA.js → p-HAmR4gM2.js} +1 -1
  157. package/dist/components/{p-DqXI9V2A.js → p-HzaOqQ0U.js} +1 -1
  158. package/dist/components/{p-Dqg8l1y6.js → p-nC2VxRNo.js} +1 -1
  159. package/dist/components/{p-Cu-aeY9t.js → p-zscW5LNR.js} +1 -1
  160. package/dist/esm/brandsync-wc.js +1 -1
  161. package/dist/esm/bs-accordion-group.entry.js +1 -1
  162. package/dist/esm/bs-ai-disclaimer.entry.js +1 -1
  163. package/dist/esm/bs-ai-greeting.entry.js +1 -1
  164. package/dist/esm/bs-ai-thinking.entry.js +1 -1
  165. package/dist/esm/bs-attachment-list.entry.js +1 -1
  166. package/dist/esm/bs-breadcrumbs.entry.js +1 -1
  167. package/dist/esm/bs-button-skeleton.entry.js +1 -1
  168. package/dist/esm/bs-chatbot-feedback.entry.js +1 -1
  169. package/dist/esm/bs-chatbot-header.entry.js +1 -1
  170. package/dist/esm/bs-chatbot-response-action.entry.js +1 -1
  171. package/dist/esm/bs-chatbot-sources-drawer.entry.js +1 -1
  172. package/dist/esm/bs-chatbot-suggestion-button.entry.js +1 -1
  173. package/dist/esm/bs-checkbox-skeleton.entry.js +1 -1
  174. package/dist/esm/bs-citation-preview.entry.js +1 -1
  175. package/dist/esm/bs-inline-tab.entry.js +1 -1
  176. package/dist/esm/bs-input_3.entry.js +4 -4
  177. package/dist/esm/bs-message-list.entry.js +1 -1
  178. package/dist/esm/bs-navigation-drawer-item.entry.js +1 -1
  179. package/dist/esm/bs-navigation-drawer.entry.js +2 -2
  180. package/dist/esm/bs-pagination.entry.js +1 -1
  181. package/dist/esm/bs-radio.entry.js +1 -1
  182. package/dist/esm/bs-source-link.entry.js +2 -2
  183. package/dist/esm/bs-split-pane.entry.js +191 -0
  184. package/dist/esm/bs-stepper-step.entry.js +1 -1
  185. package/dist/esm/bs-stepper.entry.js +1 -1
  186. package/dist/esm/bs-switch.entry.js +1 -1
  187. package/dist/esm/bs-tab_3.entry.js +3 -3
  188. package/dist/esm/bs-timepicker.entry.js +2 -2
  189. package/dist/esm/bs-toast.entry.js +1 -1
  190. package/dist/esm/bs-tooltip-trigger.entry.js +1 -1
  191. package/dist/esm/bs-tooltip.entry.js +1 -1
  192. package/dist/esm/loader.js +1 -1
  193. package/dist/types/components/bs-split-pane/bs-split-pane.cmp.test.d.ts +1 -0
  194. package/dist/types/components/bs-split-pane/bs-split-pane.d.ts +85 -0
  195. package/dist/types/components/bs-split-pane/bs-split-pane.stories.d.ts +15 -0
  196. package/dist/types/components.d.ts +216 -0
  197. package/package.json +1 -1
  198. package/reference.d.ts +3 -0
  199. package/reference.json +108 -0
  200. package/dist/brandsync-wc/p-4bbc4809.entry.js +0 -1
  201. package/dist/brandsync-wc/p-bf8bd386.entry.js +0 -1
@@ -0,0 +1,404 @@
1
+ import { h } from "@stencil/core";
2
+ const MAX_PANES = 3;
3
+ const DEFAULT_MIN_SIZE = 96;
4
+ /**
5
+ * A resizable layout of two or three panes separated by draggable, keyboard-operable dividers
6
+ * (the WAI-ARIA "window splitter" pattern). Content goes into the named slots `pane-1`, `pane-2`
7
+ * and (optionally) `pane-3`; the pane count follows which slots have content.
8
+ *
9
+ * `orientation="horizontal"` places panes side by side (vertical dividers); `"vertical"` stacks
10
+ * them (horizontal dividers). The first pane has a fixed size (`--bs-split-pane-first-size`) that
11
+ * the user can change by dragging; the last pane absorbs the remaining space. `collapsed` shrinks
12
+ * the first pane to a narrow rail (`--bs-split-pane-collapsed-size`) -- the component reflects the
13
+ * attribute so slotted content can switch to its compact rendering (e.g. icon-only list items).
14
+ *
15
+ * ## When to use
16
+ * - Master/detail layouts: a navigation or list pane next to one or two detail panes.
17
+ *
18
+ * ## When not to use
19
+ * - A temporary overlay panel (use `bs-side-panel`).
20
+ * - A fixed, non-resizable two-column layout (plain CSS grid; or set `resizable="false"` to keep
21
+ * the dividers purely visual).
22
+ *
23
+ * @slot pane-1 - The first pane (the one that collapses).
24
+ * @slot pane-2 - The second pane.
25
+ * @slot pane-3 - Optional third pane.
26
+ * @part container - The flex wrapper around all panes and dividers.
27
+ * @part pane - Every pane wrapper (`pane-1`, `pane-2`, `pane-3` are also exposed as separate parts).
28
+ * @part divider - Every divider (the focusable `role="separator"` element).
29
+ * @part divider-thumb - The visible thumb on a divider.
30
+ * @prop --bs-split-pane-radius - Corner radius of the container. Aliased to `--bs-border-radius-100`.
31
+ * @prop --bs-split-pane-bg - Pane background. Aliased to `--bs-surface-base`.
32
+ * @prop --bs-split-pane-color - Text colour inherited by slotted content. Aliased to `--bs-text-default`.
33
+ * @prop --bs-split-pane-first-size - Initial size of the first pane along the layout axis. Defaults to `333px` (Figma).
34
+ * @prop --bs-split-pane-collapsed-size - Size of the first pane while `collapsed`. Defaults to `106px` (Figma).
35
+ * @prop --bs-split-pane-min-size - Smallest size a resized pane may take. Defaults to `96px`.
36
+ * @prop --bs-split-pane-divider-size - Thickness of a divider. Aliased to `--bs-spacing-75`.
37
+ * @prop --bs-split-pane-divider-bg - Divider track colour. Aliased to `--bs-surface-container`.
38
+ * @prop --bs-split-pane-divider-thumb - Divider thumb colour. Aliased to `--bs-border-neutral-container`.
39
+ * @prop --bs-split-pane-divider-thumb-active - Divider thumb colour on hover, focus and drag. Aliased to `--bs-border-neutral-hover`.
40
+ * @prop --bs-split-pane-divider-thumb-length - Length of the divider thumb. Defaults to `250px` (Figma).
41
+ * @prop --bs-split-pane-border - Border between the first pane and the rest when dividers are not resizable. Aliased to `--bs-border-neutral-container`.
42
+ * @prop --bs-split-pane-focus-ring - Divider focus ring colour. Aliased to `--bs-border-neutral-focus`.
43
+ */
44
+ export class BsSplitPane {
45
+ el;
46
+ /** `horizontal` = panes side by side, `vertical` = panes stacked. */
47
+ orientation = 'horizontal';
48
+ /** Collapses the first pane to a narrow rail. Mutable: the Enter key on the first divider toggles it. */
49
+ collapsed = false;
50
+ /** Whether the dividers can be dragged / operated by keyboard. `false` keeps them as visual separators. */
51
+ resizable = true;
52
+ /** Accessible name of each divider. */
53
+ dividerLabel = 'Resize panes';
54
+ /** Pixels moved per arrow-key press (Shift multiplies by 4). */
55
+ step = 16;
56
+ /** Fires after a resize (pointer release or key press) with the pixel size of every pane except the last. */
57
+ bsResize;
58
+ /** Fires when `collapsed` changes through user interaction. */
59
+ bsCollapsedChange;
60
+ paneCount = 2;
61
+ sizes = [];
62
+ draggingIndex = -1;
63
+ observer;
64
+ dragStart;
65
+ /** Toggles `collapsed` and emits `bsCollapsedChange`. */
66
+ async toggleCollapsed() {
67
+ this.collapsed = !this.collapsed;
68
+ this.bsCollapsedChange.emit(this.collapsed);
69
+ }
70
+ componentWillLoad() {
71
+ this.countPanes();
72
+ }
73
+ connectedCallback() {
74
+ this.observer = new MutationObserver(() => this.countPanes());
75
+ this.observer.observe(this.el, { childList: true, attributes: true, attributeFilter: ['slot'], subtree: false });
76
+ }
77
+ disconnectedCallback() {
78
+ this.observer?.disconnect();
79
+ }
80
+ countPanes() {
81
+ let count = 1;
82
+ for (let i = 1; i <= MAX_PANES; i++) {
83
+ if (this.el.querySelector(`:scope > [slot="pane-${i}"]`))
84
+ count = i;
85
+ }
86
+ this.paneCount = Math.max(count, 1);
87
+ }
88
+ isRtl() {
89
+ return this.orientation === 'horizontal' && getComputedStyle(this.el).direction === 'rtl';
90
+ }
91
+ axisSize(pane) {
92
+ const rect = pane.getBoundingClientRect();
93
+ return this.orientation === 'horizontal' ? rect.width : rect.height;
94
+ }
95
+ minSize() {
96
+ const raw = parseFloat(getComputedStyle(this.el).getPropertyValue('--bs-split-pane-min-size'));
97
+ return Number.isFinite(raw) ? raw : DEFAULT_MIN_SIZE;
98
+ }
99
+ /** Largest size pane `index` may take: leave `minSize` for each pane after it, and the dividers. */
100
+ maxSize(index) {
101
+ const container = this.el.shadowRoot.querySelector('.bs-split-pane');
102
+ const total = this.axisSize(container);
103
+ const dividers = Array.from(container.querySelectorAll('.bs-split-pane__divider'));
104
+ const dividerTotal = dividers.reduce((sum, d) => sum + this.axisSize(d), 0);
105
+ const before = Array.from(container.querySelectorAll('.bs-split-pane__pane'))
106
+ .slice(0, index)
107
+ .reduce((sum, p) => sum + this.axisSize(p), 0);
108
+ const after = (this.paneCount - 1 - index) * this.minSize();
109
+ return Math.max(this.minSize(), total - dividerTotal - before - after);
110
+ }
111
+ paneEl(index) {
112
+ return this.el.shadowRoot.querySelectorAll('.bs-split-pane__pane')[index];
113
+ }
114
+ setSize(index, value) {
115
+ const clamped = Math.min(Math.max(value, this.minSize()), this.maxSize(index));
116
+ const next = this.sizes.slice();
117
+ next[index] = clamped;
118
+ this.sizes = next;
119
+ }
120
+ emitResize() {
121
+ const sizes = [];
122
+ // Prefer the size just committed to state: the DOM hasn't re-rendered yet when this runs.
123
+ for (let i = 0; i < this.paneCount - 1; i++)
124
+ sizes.push(Math.round(this.sizes[i] ?? this.axisSize(this.paneEl(i))));
125
+ this.bsResize.emit(sizes);
126
+ }
127
+ onPointerDown = (index) => (ev) => {
128
+ if (!this.resizable || (index === 0 && this.collapsed))
129
+ return;
130
+ ev.preventDefault();
131
+ ev.currentTarget.setPointerCapture(ev.pointerId);
132
+ this.dragStart = {
133
+ pointer: this.orientation === 'horizontal' ? ev.clientX : ev.clientY,
134
+ size: this.axisSize(this.paneEl(index)),
135
+ index,
136
+ };
137
+ this.draggingIndex = index;
138
+ };
139
+ onPointerMove = (ev) => {
140
+ if (!this.dragStart)
141
+ return;
142
+ const pointer = this.orientation === 'horizontal' ? ev.clientX : ev.clientY;
143
+ const delta = (pointer - this.dragStart.pointer) * (this.isRtl() ? -1 : 1);
144
+ this.setSize(this.dragStart.index, this.dragStart.size + delta);
145
+ };
146
+ onPointerUp = (ev) => {
147
+ if (!this.dragStart)
148
+ return;
149
+ ev.currentTarget.releasePointerCapture?.(ev.pointerId);
150
+ this.dragStart = undefined;
151
+ this.draggingIndex = -1;
152
+ this.emitResize();
153
+ };
154
+ onKeyDown = (index) => (ev) => {
155
+ if (!this.resizable)
156
+ return;
157
+ const horizontal = this.orientation === 'horizontal';
158
+ const grow = horizontal ? (this.isRtl() ? 'ArrowLeft' : 'ArrowRight') : 'ArrowDown';
159
+ const shrink = horizontal ? (this.isRtl() ? 'ArrowRight' : 'ArrowLeft') : 'ArrowUp';
160
+ const amount = this.step * (ev.shiftKey ? 4 : 1);
161
+ const current = this.axisSize(this.paneEl(index));
162
+ let handled = true;
163
+ if (ev.key === 'Enter' && index === 0) {
164
+ void this.toggleCollapsed();
165
+ }
166
+ else if (this.collapsed && index === 0) {
167
+ handled = false;
168
+ }
169
+ else if (ev.key === grow) {
170
+ this.setSize(index, current + amount);
171
+ }
172
+ else if (ev.key === shrink) {
173
+ this.setSize(index, current - amount);
174
+ }
175
+ else if (ev.key === 'Home') {
176
+ this.setSize(index, this.minSize());
177
+ }
178
+ else if (ev.key === 'End') {
179
+ this.setSize(index, this.maxSize(index));
180
+ }
181
+ else {
182
+ handled = false;
183
+ }
184
+ if (!handled)
185
+ return;
186
+ ev.preventDefault();
187
+ this.emitResize();
188
+ };
189
+ paneStyle(index) {
190
+ const last = index === this.paneCount - 1;
191
+ if (index === 0 && this.collapsed && this.paneCount > 1) {
192
+ return { flex: '0 0 var(--bs-split-pane-collapsed-size)' };
193
+ }
194
+ const size = this.sizes[index];
195
+ if (size !== undefined && !last)
196
+ return { flex: `0 0 ${size}px` };
197
+ if (index === 0 && !last)
198
+ return { flex: '0 0 var(--bs-split-pane-first-size)' };
199
+ return { flex: '1 1 0' };
200
+ }
201
+ percentFor(index) {
202
+ const container = this.el.shadowRoot?.querySelector('.bs-split-pane');
203
+ const pane = this.el.shadowRoot?.querySelectorAll('.bs-split-pane__pane')[index];
204
+ if (!container || !pane)
205
+ return 0;
206
+ const total = this.axisSize(container);
207
+ return total ? Math.round((this.axisSize(pane) / total) * 100) : 0;
208
+ }
209
+ render() {
210
+ const dividerOrientation = this.orientation === 'horizontal' ? 'vertical' : 'horizontal';
211
+ const nodes = [];
212
+ for (let i = 0; i < this.paneCount; i++) {
213
+ nodes.push(h("div", { part: `pane pane-${i + 1}`, class: `bs-split-pane__pane bs-split-pane__pane--${i + 1}`, style: this.paneStyle(i) }, h("slot", { name: `pane-${i + 1}` })));
214
+ if (i < this.paneCount - 1) {
215
+ nodes.push(h("div", { part: "divider", class: { 'bs-split-pane__divider': true, 'bs-split-pane__divider--active': this.draggingIndex === i, 'bs-split-pane__divider--static': !this.resizable }, role: "separator", "aria-orientation": dividerOrientation, "aria-label": this.dividerLabel, "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": this.percentFor(i), tabindex: this.resizable ? 0 : undefined, onPointerDown: this.onPointerDown(i), onPointerMove: this.onPointerMove, onPointerUp: this.onPointerUp, onPointerCancel: this.onPointerUp, onKeyDown: this.onKeyDown(i) }, h("span", { part: "divider-thumb", class: "bs-split-pane__thumb" })));
216
+ }
217
+ }
218
+ return (h("div", { key: '8ef79e5ccc0ac2e8d4204f82b3507bef387e95cc', part: "container", class: `bs-split-pane bs-split-pane--${this.orientation}` }, nodes));
219
+ }
220
+ static get is() { return "bs-split-pane"; }
221
+ static get encapsulation() { return "shadow"; }
222
+ static get originalStyleUrls() {
223
+ return {
224
+ "$": ["bs-split-pane.css"]
225
+ };
226
+ }
227
+ static get styleUrls() {
228
+ return {
229
+ "$": ["bs-split-pane.css"]
230
+ };
231
+ }
232
+ static get properties() {
233
+ return {
234
+ "orientation": {
235
+ "type": "string",
236
+ "mutable": false,
237
+ "complexType": {
238
+ "original": "BsSplitPaneOrientation",
239
+ "resolved": "\"horizontal\" | \"vertical\"",
240
+ "references": {
241
+ "BsSplitPaneOrientation": {
242
+ "location": "local",
243
+ "path": "/home/runner/work/eg-brandsync-storybook/eg-brandsync-storybook/packages/wc/src/components/bs-split-pane/bs-split-pane.tsx",
244
+ "id": "src/components/bs-split-pane/bs-split-pane.tsx::BsSplitPaneOrientation"
245
+ }
246
+ }
247
+ },
248
+ "required": false,
249
+ "optional": false,
250
+ "docs": {
251
+ "tags": [],
252
+ "text": "`horizontal` = panes side by side, `vertical` = panes stacked."
253
+ },
254
+ "getter": false,
255
+ "setter": false,
256
+ "reflect": true,
257
+ "attribute": "orientation",
258
+ "defaultValue": "'horizontal'"
259
+ },
260
+ "collapsed": {
261
+ "type": "boolean",
262
+ "mutable": true,
263
+ "complexType": {
264
+ "original": "boolean",
265
+ "resolved": "boolean",
266
+ "references": {}
267
+ },
268
+ "required": false,
269
+ "optional": false,
270
+ "docs": {
271
+ "tags": [],
272
+ "text": "Collapses the first pane to a narrow rail. Mutable: the Enter key on the first divider toggles it."
273
+ },
274
+ "getter": false,
275
+ "setter": false,
276
+ "reflect": true,
277
+ "attribute": "collapsed",
278
+ "defaultValue": "false"
279
+ },
280
+ "resizable": {
281
+ "type": "boolean",
282
+ "mutable": false,
283
+ "complexType": {
284
+ "original": "boolean",
285
+ "resolved": "boolean",
286
+ "references": {}
287
+ },
288
+ "required": false,
289
+ "optional": false,
290
+ "docs": {
291
+ "tags": [],
292
+ "text": "Whether the dividers can be dragged / operated by keyboard. `false` keeps them as visual separators."
293
+ },
294
+ "getter": false,
295
+ "setter": false,
296
+ "reflect": false,
297
+ "attribute": "resizable",
298
+ "defaultValue": "true"
299
+ },
300
+ "dividerLabel": {
301
+ "type": "string",
302
+ "mutable": false,
303
+ "complexType": {
304
+ "original": "string",
305
+ "resolved": "string",
306
+ "references": {}
307
+ },
308
+ "required": false,
309
+ "optional": false,
310
+ "docs": {
311
+ "tags": [],
312
+ "text": "Accessible name of each divider."
313
+ },
314
+ "getter": false,
315
+ "setter": false,
316
+ "reflect": false,
317
+ "attribute": "divider-label",
318
+ "defaultValue": "'Resize panes'"
319
+ },
320
+ "step": {
321
+ "type": "number",
322
+ "mutable": false,
323
+ "complexType": {
324
+ "original": "number",
325
+ "resolved": "number",
326
+ "references": {}
327
+ },
328
+ "required": false,
329
+ "optional": false,
330
+ "docs": {
331
+ "tags": [],
332
+ "text": "Pixels moved per arrow-key press (Shift multiplies by 4)."
333
+ },
334
+ "getter": false,
335
+ "setter": false,
336
+ "reflect": false,
337
+ "attribute": "step",
338
+ "defaultValue": "16"
339
+ }
340
+ };
341
+ }
342
+ static get states() {
343
+ return {
344
+ "paneCount": {},
345
+ "sizes": {},
346
+ "draggingIndex": {}
347
+ };
348
+ }
349
+ static get events() {
350
+ return [{
351
+ "method": "bsResize",
352
+ "name": "bsResize",
353
+ "bubbles": true,
354
+ "cancelable": true,
355
+ "composed": true,
356
+ "docs": {
357
+ "tags": [],
358
+ "text": "Fires after a resize (pointer release or key press) with the pixel size of every pane except the last."
359
+ },
360
+ "complexType": {
361
+ "original": "number[]",
362
+ "resolved": "number[]",
363
+ "references": {}
364
+ }
365
+ }, {
366
+ "method": "bsCollapsedChange",
367
+ "name": "bsCollapsedChange",
368
+ "bubbles": true,
369
+ "cancelable": true,
370
+ "composed": true,
371
+ "docs": {
372
+ "tags": [],
373
+ "text": "Fires when `collapsed` changes through user interaction."
374
+ },
375
+ "complexType": {
376
+ "original": "boolean",
377
+ "resolved": "boolean",
378
+ "references": {}
379
+ }
380
+ }];
381
+ }
382
+ static get methods() {
383
+ return {
384
+ "toggleCollapsed": {
385
+ "complexType": {
386
+ "signature": "() => Promise<void>",
387
+ "parameters": [],
388
+ "references": {
389
+ "Promise": {
390
+ "location": "global",
391
+ "id": "global::Promise"
392
+ }
393
+ },
394
+ "return": "Promise<void>"
395
+ },
396
+ "docs": {
397
+ "text": "Toggles `collapsed` and emits `bsCollapsedChange`.",
398
+ "tags": []
399
+ }
400
+ }
401
+ };
402
+ }
403
+ static get elementRef() { return "el"; }
404
+ }
@@ -0,0 +1,47 @@
1
+ import { html } from "lit";
2
+ import { componentDescription } from "../../stories-utils";
3
+ const list = html `
4
+ <div style="padding: var(--bs-spacing-300)">
5
+ <strong>Pane title</strong>
6
+ <div>Description</div>
7
+ </div>
8
+ `;
9
+ const detail = (title) => html `
10
+ <div style="padding: var(--bs-spacing-300)">
11
+ <strong>${title}</strong>
12
+ <div>Description</div>
13
+ <p>Title<br /><strong>Details</strong></p>
14
+ <p>Title<br /><strong>Details</strong></p>
15
+ </div>
16
+ `;
17
+ const meta = {
18
+ title: 'Components/bs-split-pane',
19
+ parameters: { docs: { description: { component: componentDescription('bs-split-pane') } } },
20
+ render: args => html `
21
+ <div style="height: 480px; border: 1px solid var(--bs-border-neutral-container)">
22
+ <bs-split-pane orientation=${args.orientation} ?collapsed=${args.collapsed} .resizable=${args.resizable}>
23
+ <div slot="pane-1">${list}</div>
24
+ <div slot="pane-2">${detail('Detail pane')}</div>
25
+ ${args.panes === 3 ? html `<div slot="pane-3">${detail('Second detail pane')}</div>` : ''}
26
+ </bs-split-pane>
27
+ </div>
28
+ `,
29
+ argTypes: {
30
+ orientation: { control: 'inline-radio', options: ['horizontal', 'vertical'] },
31
+ collapsed: { control: 'boolean' },
32
+ resizable: { control: 'boolean' },
33
+ panes: { control: 'inline-radio', options: [2, 3] },
34
+ },
35
+ args: { orientation: 'horizontal', collapsed: false, resizable: true, panes: 3 },
36
+ };
37
+ export default meta;
38
+ export const Horizontal = {};
39
+ export const HorizontalCollapsed = { args: { collapsed: true } };
40
+ export const Vertical = { args: { orientation: 'vertical' } };
41
+ export const TwoPanes = {
42
+ args: {
43
+ panes: 2,
44
+ orientation: 'vertical',
45
+ },
46
+ };
47
+ export const NotResizable = { args: { resizable: false } };
@@ -62,7 +62,7 @@ export class BsStepper {
62
62
  }
63
63
  render() {
64
64
  // role="list" so each bs-stepper-step's role="listitem" has the required parent.
65
- return (h(Host, { key: '94662e1c7a6539f13c9405e638fb2713d1cadf6c', role: "list" }, h("slot", { key: 'ed491d1b2e37e8b4f581bf0cc06063414c9aac59', onSlotchange: this.onSlotChange })));
65
+ return (h(Host, { key: '7956314c41e9add72583aa8e2bd7271e6cf1068b', role: "list" }, h("slot", { key: '0ace9928ce7f573d9202a11e489a50e976d0e351', onSlotchange: this.onSlotChange })));
66
66
  }
67
67
  static get is() { return "bs-stepper"; }
68
68
  static get encapsulation() { return "shadow"; }
@@ -57,7 +57,7 @@ export class BsStepperStep {
57
57
  }
58
58
  render() {
59
59
  const state = this.state;
60
- return (h(Host, { key: '1c5694e67c967484efa955425ec3ed12d8f7a03e', role: "listitem", class: `bs-stepper-step--${this.direction}` }, h("div", { key: 'fe84861fb98c195f54b0032bfdeb0f1002ed9ebb', class: "bs-stepper-step__top" }, h("span", { key: '2d3d16b27bb87230f14ccda2442614db65f703d8', part: "icon", class: `bs-stepper-step__icon bs-stepper-step__icon--${state}` }, state === 'current' && h("span", { key: 'c547471f2fe4e5a75a255ce09cc6a0c2f2bc11ec', class: "bs-stepper-step__icon-dot" }), state === 'done' && h(CheckIcon, { key: 'da0d947ad7661120b764257e3dbd7ae7c9940e75' }), state === 'error' && h(ExclamationIcon, { key: 'a5004b5d62b18e34b34d0c81eb53a4dbd65bc1c2' })), h("span", { key: 'b7e9d951076dfa1aa62bcde535a29d877cc618d3', part: "connector", class: "bs-stepper-step__connector", "aria-hidden": "true" }, h("span", { key: '415ecffabac4da1354660d508db420dbb2610a0a', class: "bs-stepper-step__connector-line" }))), h("span", { key: '99d30eb3bb209f1d4cb98bd8fcc3821c70508a1f', part: "label", class: `bs-stepper-step__label bs-stepper-step__label--${state}` }, h("span", { key: '82c9c1e5fac460d45f7aaa6e1ecdaf4a717c408f', part: "name", class: "bs-stepper-step__name" }, this.name), this.showDescription && this.description && (h("span", { key: 'c782b740f87d29aee56c523fccbeeff4a2032562', part: "description", class: "bs-stepper-step__description" }, this.description)))));
60
+ return (h(Host, { key: 'f51401da1a777c73fa70faa5a9f05f0234f517f1', role: "listitem", class: `bs-stepper-step--${this.direction}` }, h("div", { key: '30a1c060295b4addfc53ab67757661c7750ca781', class: "bs-stepper-step__top" }, h("span", { key: 'c4acc0a90fe006ed779072025c0aefc30a96c43f', part: "icon", class: `bs-stepper-step__icon bs-stepper-step__icon--${state}` }, state === 'current' && h("span", { key: '2a03c4c0b2e07a3879b7dbbcfc2022c6d753072d', class: "bs-stepper-step__icon-dot" }), state === 'done' && h(CheckIcon, { key: 'a6492fbd22bc9659fa7e71340bab908eee807dbb' }), state === 'error' && h(ExclamationIcon, { key: '5390c086f6c8314040862b5a4f680685d67a1f86' })), h("span", { key: '535e553bca360fe96538afb4baf0063e18b88fd8', part: "connector", class: "bs-stepper-step__connector", "aria-hidden": "true" }, h("span", { key: 'a04809fbdb2a47a129cf1a499bf0f9956d425e95', class: "bs-stepper-step__connector-line" }))), h("span", { key: 'ff4b573a3f0b1bac78cabbc68d58d4ecfe330fe9', part: "label", class: `bs-stepper-step__label bs-stepper-step__label--${state}` }, h("span", { key: '2cecc129a85da61efaa8c670754feca4a56fe717', part: "name", class: "bs-stepper-step__name" }, this.name), this.showDescription && this.description && (h("span", { key: '5c06546a24247733d7df9c99c753074809272feb', part: "description", class: "bs-stepper-step__description" }, this.description)))));
61
61
  }
62
62
  static get is() { return "bs-stepper-step"; }
63
63
  static get encapsulation() { return "shadow"; }
@@ -75,7 +75,7 @@ export class BsSwitch {
75
75
  const knobClasses = ['bs-switch__knob', `bs-switch__knob--${this.size}`, this.disabled ? 'bs-switch__knob--disabled' : '']
76
76
  .filter(Boolean)
77
77
  .join(' ');
78
- return (h("label", { key: 'c0b36dcd360b286a7b926268f15389c327071ff5', class: `bs-switch ${this.disabled ? 'bs-switch--disabled' : ''}` }, h("input", { key: 'b6194c6f6c247aa59f56677e0a8505baebe4cd20', class: "bs-switch__input", type: "checkbox", role: "switch", checked: this.checked, disabled: this.disabled, "aria-checked": String(this.checked), "aria-label": this.ariaLabel, onChange: this.onChange }), h("span", { key: 'bd49a6013acddfff26cdcbbd412725b7b4b0d1d9', part: "track", class: trackClasses }, h("span", { key: '3973bc2716435c5aaf050f772b43a35827362d39', part: "knob", class: knobClasses })), h("span", { key: 'b7dd216fed4ebc98bd83cc7934523ef25e91f9a4', part: "label", class: "bs-switch__label" }, h("slot", { key: '24a8cd4c77ed2fc3038f46e0e619de19a536b8c0' }))));
78
+ return (h("label", { key: '11ad9e104dabafbecba8395436f4f88fff141449', class: `bs-switch ${this.disabled ? 'bs-switch--disabled' : ''}` }, h("input", { key: '4a6c4400f9193f481b1134517ed7d53828cca27d', class: "bs-switch__input", type: "checkbox", role: "switch", checked: this.checked, disabled: this.disabled, "aria-checked": String(this.checked), "aria-label": this.ariaLabel, onChange: this.onChange }), h("span", { key: 'f6dca44c46b5412135cb43220ece5a8d161018d0', part: "track", class: trackClasses }, h("span", { key: '6a06911e7f17822a4b5df219f9c564cf8d130fbb', part: "knob", class: knobClasses })), h("span", { key: '6628c4ef4e1097d5b41b0b8eaac47eb0af627722', part: "label", class: "bs-switch__label" }, h("slot", { key: 'd1ce12e2a63a3a1a067c4080bae9c7612e8dd933' }))));
79
79
  }
80
80
  static get is() { return "bs-switch"; }
81
81
  static get encapsulation() { return "shadow"; }
@@ -94,7 +94,7 @@ export class BsInlineTab {
94
94
  };
95
95
  render() {
96
96
  const iconOnly = this.hasIcon && !this.hasLabel;
97
- return (h("button", { key: '3c512a80e93fec29f2cfd70cf921477b323064fa', 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, tabIndex: this.tabbable === undefined ? undefined : this.tabbable ? 0 : -1, onClick: this.onClick }, h("span", { key: 'a206bde98f6b17c667c3e9690b6dcd3715376f99', part: "icon", class: `bs-inline-tab__icon ${this.hasIcon ? 'bs-inline-tab__icon--has-content' : ''}` }, h("slot", { key: '9a8ef173b7d97db176c66de0a8f7215c967f07bc', name: "icon", onSlotchange: this.onIconSlotchange })), h("span", { key: '53d9fd3a06976bb9366829864ae7f1e86c39ef50', part: "label", class: `bs-inline-tab__label ${this.hasLabel ? 'bs-inline-tab__label--has-content' : ''}` }, h("slot", { key: '37a6840ad59a98a0bdc13dfc1c87ece5e8d8ec54', onSlotchange: this.onLabelSlotchange }))));
97
+ return (h("button", { key: 'bccfcaa980bc351de48dc6e0611614721f7e63aa', 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, tabIndex: this.tabbable === undefined ? undefined : this.tabbable ? 0 : -1, onClick: this.onClick }, h("span", { key: 'f9bb9caedc8fb34d90dd23a14e431714d2175389', part: "icon", class: `bs-inline-tab__icon ${this.hasIcon ? 'bs-inline-tab__icon--has-content' : ''}` }, h("slot", { key: '457be6231cd41bfe12198cda4780bff83af84d52', name: "icon", onSlotchange: this.onIconSlotchange })), h("span", { key: 'dea0e6da1a85682c7e04c93bb6c07165b720e168', part: "label", class: `bs-inline-tab__label ${this.hasLabel ? 'bs-inline-tab__label--has-content' : ''}` }, h("slot", { key: '6e2c366f47f47a976cdcc667222e281306dbfc63', onSlotchange: this.onLabelSlotchange }))));
98
98
  }
99
99
  static get is() { return "bs-inline-tab"; }
100
100
  static get encapsulation() { return "shadow"; }
@@ -107,7 +107,7 @@ export class BsTab {
107
107
  const iconOnly = this.hasIcon && !this.hasLabel;
108
108
  const vertical = this.hasIcon && this.hasLabel && this.iconPosition === 'top';
109
109
  const showBadge = this.hasBadge && !iconOnly && !vertical;
110
- return (h("button", { key: '445a6cb3dd289641e7499a612e90a1916b6e85b7', type: "button", part: "tab", role: "tab", class: `bs-tab ${this.selected ? 'bs-tab--selected' : ''} ${this.disabled ? 'bs-tab--disabled' : ''} ${iconOnly ? 'bs-tab--icon-only' : ''} ${vertical ? 'bs-tab--vertical' : ''}`, disabled: this.disabled, "aria-selected": String(this.selected), "aria-disabled": this.disabled ? 'true' : undefined, "aria-label": this.ariaLabel, tabIndex: this.tabbable === undefined ? undefined : this.tabbable ? 0 : -1, onClick: this.onClick }, h("span", { key: 'c14a3671a22711ff388dc5dbd08ed7d337e97f3d', part: "icon", class: `bs-tab__icon ${this.hasIcon ? 'bs-tab__icon--has-content' : ''}` }, h("slot", { key: '0baa4ff03cfc81ca1c76d10f77997fc85b55d403', name: "icon", onSlotchange: this.onIconSlotchange })), h("span", { key: '710df7af9639d65a2d4cb750f73a2369607931ad', part: "label", class: `bs-tab__label ${this.hasLabel ? 'bs-tab__label--has-content' : ''}` }, h("slot", { key: 'b60afb9f8478feb6fbc9fa5d6a7b402029238807', onSlotchange: this.onLabelSlotchange })), h("span", { key: '7621d5e89eacbe23e66451f294db0012c7fbd18b', part: "badge", class: `bs-tab__badge ${showBadge ? 'bs-tab__badge--has-content' : ''}` }, h("slot", { key: '9c26f2322701714939b072431e9f9aa91cffc778', name: "badge", onSlotchange: this.onBadgeSlotchange })), h("span", { key: '77f31d38361e15b81a72acbf43e2ab6d852b835d', part: "indicator", class: "bs-tab__indicator" })));
110
+ return (h("button", { key: '088ea367ad3b8b1afa36e8bb4cac7fb150aae7f2', type: "button", part: "tab", role: "tab", class: `bs-tab ${this.selected ? 'bs-tab--selected' : ''} ${this.disabled ? 'bs-tab--disabled' : ''} ${iconOnly ? 'bs-tab--icon-only' : ''} ${vertical ? 'bs-tab--vertical' : ''}`, disabled: this.disabled, "aria-selected": String(this.selected), "aria-disabled": this.disabled ? 'true' : undefined, "aria-label": this.ariaLabel, tabIndex: this.tabbable === undefined ? undefined : this.tabbable ? 0 : -1, onClick: this.onClick }, h("span", { key: 'a68c2b1a582dbdae20dad694e4d69b80aa5223ea', part: "icon", class: `bs-tab__icon ${this.hasIcon ? 'bs-tab__icon--has-content' : ''}` }, h("slot", { key: '80a7d2856033c87f9f7cce7b3637e6a91106d76d', name: "icon", onSlotchange: this.onIconSlotchange })), h("span", { key: '77e038473baf0bd124c589ce24c25ba0bebe2cde', part: "label", class: `bs-tab__label ${this.hasLabel ? 'bs-tab__label--has-content' : ''}` }, h("slot", { key: 'dd09813d9c8dcb66fd338ff238861b0b02a8df07', onSlotchange: this.onLabelSlotchange })), h("span", { key: '22f74bafa1ad5948c0e1f09e9eb6f20f3b8d16ae', part: "badge", class: `bs-tab__badge ${showBadge ? 'bs-tab__badge--has-content' : ''}` }, h("slot", { key: '65b8f288b9fcbfdb492d594226ef5da09fe082dd', name: "badge", onSlotchange: this.onBadgeSlotchange })), h("span", { key: 'fcda37d86c4c799e97ec0bf60ea7edd647e9c45e', part: "indicator", class: "bs-tab__indicator" })));
111
111
  }
112
112
  static get is() { return "bs-tab"; }
113
113
  static get encapsulation() { return "shadow"; }
@@ -135,7 +135,7 @@ export class BsTabs {
135
135
  }
136
136
  render() {
137
137
  const vertical = this.orientation === 'vertical';
138
- return (h("div", { key: 'dcee9772097aec3389f8a87e4bb29ea88cef5298', part: "tablist", role: "tablist", "aria-orientation": this.orientation, class: `bs-tabs bs-tabs--${this.type} ${vertical ? 'bs-tabs--vertical' : ''}` }, h("slot", { key: 'dd253eade8f13fd774fb688e01abc8cc05b6af81', onSlotchange: () => this.syncRovingTabindex() })));
138
+ return (h("div", { key: '0bc0de64c29c4bca86e2709fd3f376e4c195eab2', part: "tablist", role: "tablist", "aria-orientation": this.orientation, class: `bs-tabs bs-tabs--${this.type} ${vertical ? 'bs-tabs--vertical' : ''}` }, h("slot", { key: '0751673c06ae93234a987fd809a49c9d5517d29c', onSlotchange: () => this.syncRovingTabindex() })));
139
139
  }
140
140
  static get is() { return "bs-tabs"; }
141
141
  static get encapsulation() { return "shadow"; }
@@ -200,14 +200,14 @@ export class BsTimepicker {
200
200
  return (h("div", { part: "spinner", class: "bs-timepicker__spinner" }, h("button", { part: "step", type: "button", class: "bs-timepicker__step", "aria-label": stepLabel(this.increaseLabel), tabindex: -1, onClick: () => this.stepBy(col, 1) }, h("svg", { viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true" }, h("path", { d: "M18 15L12 9L6 15", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }))), h("div", { part: "value", class: "bs-timepicker__value", role: "spinbutton", tabindex: 0, "aria-label": label, "aria-valuemin": min, "aria-valuemax": max, "aria-valuenow": n, "aria-valuetext": pad(n), onKeyDown: this.onKeyDown(col), onBlur: () => (this.typed = '') }, pad(n)), h("button", { part: "step", type: "button", class: "bs-timepicker__step", "aria-label": stepLabel(this.decreaseLabel), tabindex: -1, onClick: () => this.stepBy(col, -1) }, h("svg", { viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true" }, h("path", { d: "M6 9L12 15L18 9", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })))));
201
201
  }
202
202
  render() {
203
- return (h("bs-card", { key: '2033e822eb65c41caeb338bd7b0ea569e775b715', part: "container", class: "bs-timepicker", surface: "raised" }, h("div", { key: '952ccde08ccf1c56404c9364c16980c5008abb62', class: "bs-timepicker__body" }, h("div", { key: '39b3370e55682275901c68c84ad8db8142525d31', part: "header", class: "bs-timepicker__header" }, h("div", { key: '77858996498a08dc30cad647eec89ec975db71a9', part: "title", class: "bs-timepicker__title" }, this.heading), h("label", { key: 'f29d33b987ae0a5d1448f0636787b1b1abc79187', class: "bs-timepicker__format" }, h("span", { key: '975b259c50cc3f10366327a75da5e1293ee803f3' }, this.formatLabel), h("bs-switch", { key: 'db35c8e82b52549e5d63e3eb5188f094f3ac56ae', part: "format-toggle", size: "md", ariaLabel: this.formatLabel, checked: !this.is12h, onBsChange: (ev) => (this.format = ev.detail ? '24h' : '12h') }))), h("div", { key: 'bb8875c816372d424f8bbba86d6a1e0bc409f5b2', class: "bs-timepicker__divider" }), h("div", { key: '2dfdd3a449ad53f6d6af142007f73486ce9d852e', part: "selector", class: "bs-timepicker__selector" }, this.renderColumn('hour', this.hourLabel), h("div", { key: '05a3adb45f35c3bd51a275d38cae8f9fe4f3afbf', part: "separator", class: "bs-timepicker__separator", "aria-hidden": "true" }, h("svg", { key: 'b51e22b366c29a293b99ea91f46872f767295d4f', viewBox: "0 0 4 32", fill: "currentColor" }, h("circle", { key: '33e566b81ad2e96bf0033ed43f2b70dfe54371f2', cx: "2", cy: "10", r: "2" }), h("circle", { key: '4210a5cd7058385bd983225951d94aeda4aa9c06', cx: "2", cy: "22", r: "2" }))), this.renderColumn('minute', this.minuteLabel), this.is12h && (h("bs-input", { key: '8f557a95389fbbc579539744230933000a559526', part: "period", class: "bs-timepicker__period", type: "dropdown", label: this.periodLabel, value: this.isPm ? 'PM' : 'AM', options: [
203
+ return (h("bs-card", { key: '74af930fdaa05b2d91f4ca447078175a1c978994', part: "container", class: "bs-timepicker", surface: "raised" }, h("div", { key: 'f67c4d6f522e5ee39dad612521324d87a1d2c48d', class: "bs-timepicker__body" }, h("div", { key: 'c9bef71e51c20f5a09ae38519f89b7823fd2f9ad', part: "header", class: "bs-timepicker__header" }, h("div", { key: '4c4aa31d8f11f92bb789d7720222a39914a283a7', part: "title", class: "bs-timepicker__title" }, this.heading), h("label", { key: 'db8fbe9176836ccf19d60079fd21655a6f078eed', class: "bs-timepicker__format" }, h("span", { key: '42dd4163160e475dc5b27ec99534edf5df1e5a3d' }, this.formatLabel), h("bs-switch", { key: '1eca77cb8284366630ec8a53c2e5ca00ecea4382', part: "format-toggle", size: "md", ariaLabel: this.formatLabel, checked: !this.is12h, onBsChange: (ev) => (this.format = ev.detail ? '24h' : '12h') }))), h("div", { key: 'ec60756f323a04ddc74f9cf8bd6c84276cbe2a0b', class: "bs-timepicker__divider" }), h("div", { key: '15609379e051fe0eddbe491f0ccaeb7efad3ae81', part: "selector", class: "bs-timepicker__selector" }, this.renderColumn('hour', this.hourLabel), h("div", { key: '40760ac8da6112c1c82554ed807f156c3998ceeb', part: "separator", class: "bs-timepicker__separator", "aria-hidden": "true" }, h("svg", { key: 'b15b5bf4db3790c167b13caae40e1d1e7e92bfb7', viewBox: "0 0 4 32", fill: "currentColor" }, h("circle", { key: 'cdc4cee6cd246b05be5f11939425b44160a65d54', cx: "2", cy: "10", r: "2" }), h("circle", { key: '65a5393d6f05c241d7c1aa3c8090c22266386b0e', cx: "2", cy: "22", r: "2" }))), this.renderColumn('minute', this.minuteLabel), this.is12h && (h("bs-input", { key: '4292168e81da8883d93b1ce9e3e60edd00726cfb', part: "period", class: "bs-timepicker__period", type: "dropdown", label: this.periodLabel, value: this.isPm ? 'PM' : 'AM', options: [
204
204
  { label: 'AM', value: 'AM' },
205
205
  { label: 'PM', value: 'PM' },
206
206
  ], onBsChange: (ev) => {
207
207
  const pm = ev.detail === 'PM';
208
208
  if (pm !== this.isPm)
209
209
  this.hour = (this.hour + 12) % 24;
210
- } }))), h("div", { key: 'fa37a2d7ac535f62e3c7d56eebee4bf6a6dbba5c', class: "bs-timepicker__divider" }), h("div", { key: 'f0c0e549ae1282ee4e93504163c279a9ccd6f241', part: "footer", class: "bs-timepicker__footer" }, h("bs-button", { key: '301330874cad2f9beb3b82e580c24168fc5b0052', part: "cancel", variant: "subtle", onClick: this.cancel }, this.cancelLabel), h("bs-button", { key: 'bf193dbb17a2c71c16b574b31035f1752c89765b', part: "confirm", variant: "primary", onClick: this.confirm }, this.confirmLabel)))));
210
+ } }))), h("div", { key: '9ceb4e065f2851ae0b4adc22fa6795d593df362a', class: "bs-timepicker__divider" }), h("div", { key: '8cbe32e5381d83e27ab7b97c50091fbf837428b8', part: "footer", class: "bs-timepicker__footer" }, h("bs-button", { key: '17fb1f5fcb3b40033951d13c460500c0bbc3f5a1', part: "cancel", variant: "subtle", onClick: this.cancel }, this.cancelLabel), h("bs-button", { key: '4a3a6a6bb3ef01a66e6198c1bcb148b94a164f8d', part: "confirm", variant: "primary", onClick: this.confirm }, this.confirmLabel)))));
211
211
  }
212
212
  static get is() { return "bs-timepicker"; }
213
213
  static get encapsulation() { return "shadow"; }
@@ -27,7 +27,7 @@ export class BsToast {
27
27
  this.bsDismiss.emit();
28
28
  };
29
29
  render() {
30
- return (h("div", { key: '376303627d6ffb7b0003dc83e874784ede700486', part: "container", class: `bs-toast bs-toast--${this.state}`, role: "status", "aria-live": this.state === 'error' ? 'assertive' : 'polite' }, h("div", { key: '767b01d764404a3b801d451ea2b2f52bcccb8425', class: "bs-toast__content" }, h("span", { key: '701619d874f9849da38d4e1c19503ea93773cd75', part: "icon", class: "bs-toast__icon", "aria-hidden": "true" }, h(StateIcon, { key: 'b3dfc1ae57ed798985074d4572349da5875c1e0a', state: this.state })), h("span", { key: 'e41d7a06af64543073371b57d02439ca93068261', part: "message", class: "bs-toast__message" }, h("slot", { key: '5e4e717afea3ad71c66a06a8c0ab265b8a850fa1' }))), h("div", { key: 'daa05fc5a4911cdadd52169377b8bb72bf0e11f7', class: "bs-toast__actions" }, h("button", { key: '0a2dad22af165429ef95db499f44ee6568a51bfb', part: "close", type: "button", class: "bs-toast__close", "aria-label": this.dismissLabel, onClick: this.onDismiss }, h(CloseIcon, { key: '74b90cc634d5bec5e8e0d64bf1e4ad347d41a533' })))));
30
+ return (h("div", { key: '759d3745ca8ffca53fa286408fa694ffe374b99d', part: "container", class: `bs-toast bs-toast--${this.state}`, role: "status", "aria-live": this.state === 'error' ? 'assertive' : 'polite' }, h("div", { key: '7f46844194cbb5fa9efd7ac475c8a417fbde9f27', class: "bs-toast__content" }, h("span", { key: 'cc4ca41ce6060f7ad6b84a9d0400d0515d200877', part: "icon", class: "bs-toast__icon", "aria-hidden": "true" }, h(StateIcon, { key: 'dc3754b7390e54fd84bde93903c57326046a5d3f', state: this.state })), h("span", { key: '1fbecaf2d09591e08708ee99381d0acc1ded3a8f', part: "message", class: "bs-toast__message" }, h("slot", { key: 'b7aba4aee990aec06d3782ab38332825b74ed85a' }))), h("div", { key: '1a4bb03633bf3aa703005c44b4d0d807a20dd51d', class: "bs-toast__actions" }, h("button", { key: 'a8ca2bc51acd31d3b21a63e128d98d029d638030', part: "close", type: "button", class: "bs-toast__close", "aria-label": this.dismissLabel, onClick: this.onDismiss }, h(CloseIcon, { key: '97dc7540e08a0bff5784a8bb22830370513b930b' })))));
31
31
  }
32
32
  static get is() { return "bs-toast"; }
33
33
  static get encapsulation() { return "shadow"; }
@@ -42,7 +42,7 @@ export class BsTooltip {
42
42
  */
43
43
  placement = 'top';
44
44
  render() {
45
- return (h("div", { key: 'cd34354a526f3bfe60473dcccd3199149cb8dd62', class: "bs-tooltip" }, h("span", { key: '17943240c38e9c9ebaf80860462afaab841c8049', part: "arrow", class: "bs-tooltip__arrow" }), h("div", { key: '6c2a1c40f7d6ce8b2d14eddb143fe90bb896077c', part: "bubble", class: "bs-tooltip__bubble" }, h("slot", { key: '3b3f22ea81394e4ee95e3e78400599cd570f5d98' }))));
45
+ return (h("div", { key: 'f29c467c70eb488ef6d1d83af7a71be2d26307be', class: "bs-tooltip" }, h("span", { key: 'e74432210ae015c44a87f1d5f60c3e448f016893', part: "arrow", class: "bs-tooltip__arrow" }), h("div", { key: '10ef531bf6076636e890ae6f679c0bd368714802', part: "bubble", class: "bs-tooltip__bubble" }, h("slot", { key: '0a634836408d120230bfed0c9dc11c014c4f0c4d' }))));
46
46
  }
47
47
  static get is() { return "bs-tooltip"; }
48
48
  static get encapsulation() { return "shadow"; }
@@ -48,7 +48,7 @@ export class BsTooltipTrigger {
48
48
  };
49
49
  render() {
50
50
  const show = this.visible && !!this.text;
51
- return (h("div", { key: '2fc1cae6e9561dcb1849011c40771038efd0f546', part: "trigger", class: "bs-tooltip-trigger", "aria-describedby": this.tooltipId, onMouseEnter: this.show, onMouseLeave: this.hide, onFocusin: this.show, onFocusout: this.hide, onKeyDown: this.onKeyDown }, h("slot", { key: 'ceb7dd09728db2917e47db7178b543a8766a9147' }), h("div", { key: '8a1809cc681b826a44de2d49a672933d48a2163b', part: "tooltip", id: this.tooltipId, class: "bs-tooltip-trigger__tooltip", role: "tooltip", hidden: !show }, h("bs-tooltip", { key: '00df96c8a33440e72bd46ada9aca02ba75fb1cd5' }, this.text))));
51
+ return (h("div", { key: 'a0038c387bb975237a46686d49a8cab159809056', part: "trigger", class: "bs-tooltip-trigger", "aria-describedby": this.tooltipId, onMouseEnter: this.show, onMouseLeave: this.hide, onFocusin: this.show, onFocusout: this.hide, onKeyDown: this.onKeyDown }, h("slot", { key: 'ab487b1303922867a4f36f148c504af7bc01f454' }), h("div", { key: '336ebebfd45f33b0a22c31af8d024d9c271e8793', part: "tooltip", id: this.tooltipId, class: "bs-tooltip-trigger__tooltip", role: "tooltip", hidden: !show }, h("bs-tooltip", { key: '97ffe6cc68d68fd4716169dd7a158ac5586435f8' }, this.text))));
52
52
  }
53
53
  static get is() { return "bs-tooltip-trigger"; }
54
54
  static get encapsulation() { return "shadow"; }
@@ -50,7 +50,7 @@ export class BsWhatsNewEntry {
50
50
  hasImage = false;
51
51
  render() {
52
52
  const level = Math.min(6, Math.max(1, Math.trunc(Number(this.headingLevel)) || 3));
53
- return (h("div", { key: 'ff956b15aeb7267e70e15fd447d7ccc02bdf488f', class: "bs-whats-new-entry" }, (this.tag || this.date || this.unread) && (h("div", { key: '7bd5e8ea1e0a3628ece59407cc58354c3d30426e', part: "meta", class: "bs-whats-new-entry__meta" }, this.tag && (h("bs-chip-informative", { key: '6ae5623bf2e65c1d7a52ec93f0801c9ea188de08', part: "tag", size: "sm", color: this.tagColor }, this.tag)), this.date && (h("span", { key: '741b8fbb241b9ee321a8e77fbb81550d8a61cf21', part: "date", class: "bs-whats-new-entry__date" }, this.date)), this.unread && (h("span", { key: 'caa348708573629d60ccf047357dd086f2c7350e', part: "unread", class: "bs-whats-new-entry__unread" }, h("span", { key: 'a5671ad6a6ec951b4cb20ae5dfb6dbcd1e6b3006', class: "bs-whats-new-entry__sr-only" }, this.unreadLabel))))), h("div", { key: '10953346635c715ca0eb5c82f2b281a5a7113a90', part: "image", class: { 'bs-whats-new-entry__image': true, 'bs-whats-new-entry__image--visible': this.hasImage } }, h("slot", { key: '63764e4700d494eb78c0fe0c9c203575ddced731', name: "image", onSlotchange: (ev) => (this.hasImage = ev.target.assignedNodes().length > 0) })), h("div", { key: 'b81d30298930bb2f1aa3ac3256ece61f700d0480', class: "bs-whats-new-entry__content" }, this.heading && h(`h${level}`, { part: 'heading', class: { 'bs-whats-new-entry__heading': true } }, this.heading), this.description && (h("p", { key: '5a0c0096dd06fb735ec4f5f897c9a392d37aa723', part: "description", class: "bs-whats-new-entry__description" }, this.description)), this.actionLabel && (h("bs-button", { key: 'dc86c02b65b3dca892873b08f3b541d92db9058c', part: "action", class: "bs-whats-new-entry__action", variant: "subtle", size: "sm", onClick: () => this.bsAction.emit() }, this.actionLabel, h("svg", { key: '2b6bdb66eff8f452bec1ea47e5c2ec6cb4854b8b', slot: "end-icon", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, h("path", { key: '67299241e7a3d29adfd9b97512b3e6ee49f833c7', d: "M5 12H19" }), h("path", { key: 'd7e8ee2608e3345b0ab0aa1988d6da42b1f14ecf', d: "M13 6L19 12L13 18" }))))), this.divider && h("div", { key: '3c7d0fb5f1aebc224de840c68bb66f1bbc9b540e', part: "divider", class: "bs-whats-new-entry__divider" })));
53
+ return (h("div", { key: 'c63cac0c83439a236c70326ad5a96c7f81937a9b', class: "bs-whats-new-entry" }, (this.tag || this.date || this.unread) && (h("div", { key: '3fd787ee36bc22757f2ed6afe14b722800ae2fc0', part: "meta", class: "bs-whats-new-entry__meta" }, this.tag && (h("bs-chip-informative", { key: '9df6bfdc16ed643a30eb41091e1fa3a3596afd72', part: "tag", size: "sm", color: this.tagColor }, this.tag)), this.date && (h("span", { key: 'dd69ccd630870d45a917141e354eacc58af2a0c6', part: "date", class: "bs-whats-new-entry__date" }, this.date)), this.unread && (h("span", { key: '953e0f25aa8eb15bf2a6b3dd314595ca89f07e4d', part: "unread", class: "bs-whats-new-entry__unread" }, h("span", { key: '70b11972fd39cf3fdc5d75e77d78069f75be0d66', class: "bs-whats-new-entry__sr-only" }, this.unreadLabel))))), h("div", { key: '85e754c3c08e60fdf96e437c86fa04528a1bd685', part: "image", class: { 'bs-whats-new-entry__image': true, 'bs-whats-new-entry__image--visible': this.hasImage } }, h("slot", { key: 'd2af24357183cd5a2055a7629d9d0b6a521cd7c6', name: "image", onSlotchange: (ev) => (this.hasImage = ev.target.assignedNodes().length > 0) })), h("div", { key: '5faf816a5c7399c78ffefa0aa7fdce1263e0c541', class: "bs-whats-new-entry__content" }, this.heading && h(`h${level}`, { part: 'heading', class: { 'bs-whats-new-entry__heading': true } }, this.heading), this.description && (h("p", { key: '48e4d51341ebb9b3f22891dc3143b0820b094e53', part: "description", class: "bs-whats-new-entry__description" }, this.description)), this.actionLabel && (h("bs-button", { key: 'a7172c19eb22972e55fffdd3f655b98a891e07fb', part: "action", class: "bs-whats-new-entry__action", variant: "subtle", size: "sm", onClick: () => this.bsAction.emit() }, this.actionLabel, h("svg", { key: '125e1d135e8e02d986a3dd3c7bedc63c114c7562', slot: "end-icon", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, h("path", { key: 'aecdc16aeb47469208eda8429c40118236a54c29', d: "M5 12H19" }), h("path", { key: '5cc3567f128808906a1e688606fc1e3e5f6afd32', d: "M13 6L19 12L13 18" }))))), this.divider && h("div", { key: '3207ac68a8ab88d6698110338d998a4d42a6caf2', part: "divider", class: "bs-whats-new-entry__divider" })));
54
54
  }
55
55
  static get is() { return "bs-whats-new-entry"; }
56
56
  static get encapsulation() { return "shadow"; }